codecombat/app/templates/courses/teacher-courses-view.jade

113 lines
5.4 KiB
Text
Raw Normal View History

2016-03-30 16:57:19 -04:00
extends /templates/base-flat
2015-11-03 19:41:06 -05:00
2016-03-30 16:57:19 -04:00
block page_nav
include ./teacher-dashboard-nav.jade
2016-03-30 16:57:19 -04:00
block content
if !me.isTeacher() && view.ownedClassrooms.size()
.alert.alert-danger.text-center
.container
// DNT: Temporary
h3 ATTENTION: Please upgrade your account to a Teacher Account.
p
| We are transitioning to a new improved classroom management system for instructors.
| Please convert your account to ensure you retain access to your classrooms.
a.btn.btn-primary.btn-lg(href="/teachers/update-account") Upgrade to teacher account
2016-03-30 16:57:19 -04:00
.container
h1(data-i18n="courses.title")
h2(data-i18n="courses.subtitle")
//- p
//- a(href="https://discourse.codecombat.com/t/course-level-changelog/7352" data-i18n="courses.changelog")
2016-03-30 16:57:19 -04:00
.courses.container
- var courses = view.courses.models;
2016-04-08 15:59:10 -04:00
- var courseIndex = 0;
while courseIndex < courses.length
- var course = courses[courseIndex];
- courseIndex++;
2016-03-30 16:57:19 -04:00
.course.row
.col-sm-9
+course-info(course)
if me.isTeacher() || me.isAdmin()
.col-sm-3
.play-level-form(data-course-id=course.id)
.form-group
label.control-label
span(data-i18n="courses.select_language")
| :
select.language-select.form-control
//- TODO: Automate this list @scott
//- Web dev courses use HTML and JavaScript, except web-dev-1 which doesn't have scripting
if course.get('slug') === 'web-dev-1'
option(value="javascript")
| HTML
else if course.get('slug').indexOf('web-dev') >= 0
option(value="javascript")
| HTML / JavaScript
else
option(value="python")
| Python
option(value="javascript")
| JavaScript
//- option(value="coffeescript")
//- | CoffeeScript (Experimental)
//- option(value="clojure")
//- | Clojure (Experimental)
//- option(value="lua")
//- | Lua
//- option(value="java")
//- | Java
.form-group
label.control-label
span(data-i18n="courses.select_level")
| :
select.level-select.form-control
if view.campaigns.loaded
- var campaign = view.campaigns.get(course.get('campaignID'))
if campaign
each level, levelIndex in campaign.getLevels().models
- var levelNumber = campaign.getLevelNumber(level.get('original'), levelIndex + 1)
option(value=level.get('slug'))
span
= levelNumber
span.spr
| .
span
= level.get('name').replace('Course: ', '')
a.play-level-button.btn.btn-lg.btn-primary
span(data-i18n="courses.play_level")
.clearfix
2016-03-30 16:57:19 -04:00
mixin course-info(course)
2016-04-13 12:54:24 -04:00
- var campaign = view.campaigns.get(course.get('campaignID'));
2016-03-30 16:57:19 -04:00
.course-info
.text-h4.semibold
= course.get('name')
p= course.get('description')
p.concepts.semibold
span(data-i18n="courses.concepts_covered")
| :
each concept in course.get('concepts')
span(data-i18n="concepts." + concept)
if course.get('concepts').indexOf(concept) !== course.get('concepts').length - 1
span.spr ,
if me.isTeacher() || view.ownedClassrooms.size() || me.isAdmin()
//- Web dev courses use HTML and JavaScript, except web-dev-1 which doesn't have scripting
if course.get('slug') === 'web-dev-1'
a.guide-btn.btn.btn-primary(href=("/teachers/course-solution/" + course.id + "/javascript") data-course-id=course.id data-course-name=course.get('name') data-event-action="Classes Guides Guide JavaScript" class=(me.isTeacher() || me.isAdmin() ? '': 'disabled'))
span(data-i18n="courses.view_guide_online")
| &mdash; HTML
else if course.get('slug').indexOf('web-dev') >= 0
a.guide-btn.btn.btn-primary(href=("/teachers/course-solution/" + course.id + "/javascript") data-course-id=course.id data-course-name=course.get('name') data-event-action="Classes Guides Guide JavaScript" class=(me.isTeacher() || me.isAdmin() ? '': 'disabled'))
span(data-i18n="courses.view_guide_online")
| &mdash; HTML / JavaScript
else
a.guide-btn.btn.btn-primary(href=("/teachers/course-solution/" + course.id + "/javascript") data-course-id=course.id data-course-name=course.get('name') data-event-action="Classes Guides Guide JavaScript" class=(me.isTeacher() || me.isAdmin() ? '': 'disabled'))
Stuff Partially fix ActivateLicensesModal.spec [IN PROGRESS] Don't display deleted users Move userID to classroom.deletedMembers on user delete (not retroactive) Fix PDF links for course guides, remove old PDFs from repo Remove deprecated SalesView Remove underline for not-yet-linked student names Only show class select when there's more than one Ignore case when sorting student names Use student.broadName instead of name for display and sorting Fix initial load not showing progress after joining a course (hacky) Fix text entry for enrollment number input Fix enrollment statistics Fix enrollment stats completely (and add back in per-class unenrolled count) Add deletedMembers to classroom schema More fixes to enrollment stats (don't count nonmember prepaids) Don't use 0 as implicit false for openSpots Update suggested number of credit to buy automatically Fix classroom edit form ignoring cleared values Add alert text when more users selected than enrollments available Alert user when trying to assign course to unenrolled students Alert user when assigning course to nobody Add some tests for TeacherClassView bulk assign alerts Fix TeacherClassView tests failing without demos Use model/collection.fakeRequests :D Remove unused comment Fix handling of improperly sorted deleted users on clientside Add test for moving deleted users to deletedMembers Add script for moving all deleted classroom members to classroom.deletedMembers Completely rewrite tallying up enrollment statistics Fix some tests to not be dependent on logged-in user Address PR comments Fix default number of enrollments to buy Fix i18n for not enough enrollments Use custom error message for classroom name length
2016-04-07 17:55:42 -04:00
span(data-i18n="courses.view_guide_online")
| &mdash; JavaScript
a.guide-btn.btn.btn-primary(href=("/teachers/course-solution/" + course.id + "/python") data-course-id=course.id data-course-name=course.get('name') data-event-action="Classes Guides Guide Python" class=(me.isTeacher() || me.isAdmin() ? '': 'disabled'))
span(data-i18n="courses.view_guide_online")
| &mdash; Python