2015-11-03 19:41:06 -05:00
|
|
|
extends /templates/base
|
|
|
|
|
|
|
|
block content
|
|
|
|
|
2015-11-30 17:39:46 -05:00
|
|
|
.text-center
|
|
|
|
if me.isAnonymous() || !me.get('name')
|
2015-12-08 15:05:08 -05:00
|
|
|
.welcome
|
|
|
|
span(data-i18n="courses.welcome")
|
|
|
|
span !
|
2015-11-30 17:39:46 -05:00
|
|
|
else
|
2015-12-08 15:05:08 -05:00
|
|
|
.welcome
|
|
|
|
span(data-i18n="courses.welcome")
|
|
|
|
span , #{me.get('name')}!
|
2015-11-30 17:39:46 -05:00
|
|
|
|
2015-12-02 18:19:48 -05:00
|
|
|
.container-fluid
|
|
|
|
.row
|
|
|
|
.col-md-2
|
|
|
|
.col-md-8
|
|
|
|
.well
|
|
|
|
.text-center
|
2015-12-08 15:05:08 -05:00
|
|
|
strong.uppercase(data-i18n="courses.getting_started")
|
2015-12-02 18:19:48 -05:00
|
|
|
br
|
|
|
|
.text-center
|
2015-12-18 08:21:06 -05:00
|
|
|
a.btn.btn-info(href='http://codecombat.com/docs/CodeCombatCoursesGettingStartedGuide.pdf', data-i18n="courses.download_getting_started")
|
2015-12-02 18:19:48 -05:00
|
|
|
br
|
|
|
|
ol
|
2015-12-08 15:05:08 -05:00
|
|
|
li(data-i18n="courses.getting_started_1")
|
|
|
|
li(data-i18n="courses.getting_started_2")
|
|
|
|
li(data-i18n="courses.getting_started_3")
|
2015-12-02 18:19:48 -05:00
|
|
|
br
|
|
|
|
.text-center
|
2015-12-09 09:57:33 -05:00
|
|
|
strong(data-i18n="courses.additional_resources")
|
2015-12-02 18:19:48 -05:00
|
|
|
ul
|
2015-12-02 20:28:25 -05:00
|
|
|
li
|
2015-12-09 09:57:33 -05:00
|
|
|
span.spr(data-i18n="courses.additional_resources_1_pref")
|
|
|
|
a(href='http://codecombat.com/docs/CodeCombatTeacherGuideCourse1.pdf', data-i18n="courses.additional_resources_1_mid")
|
2016-01-15 16:15:08 -05:00
|
|
|
span.spl.spr(data-i18n="courses.additional_resources_1_mid2")
|
|
|
|
a(href='http://codecombat.com/docs/CodeCombatTeacherGuideCourse2.pdf', data-i18n="courses.additional_resources_1_mid3")
|
|
|
|
span.spl.spr(data-i18n="courses.additional_resources_1_suff")
|
|
|
|
li
|
|
|
|
span.spr(data-i18n="courses.educator_wiki_pref")
|
|
|
|
a(href='https://sites.google.com/a/codecombat.com/teacher-guides/', data-i18n="courses.educator_wiki_mid")
|
|
|
|
span.spl(data-i18n="courses.educator_wiki_suff")
|
2015-12-02 18:19:48 -05:00
|
|
|
li
|
2015-12-09 09:57:33 -05:00
|
|
|
span.spr(data-i18n="courses.additional_resources_2_pref")
|
2016-01-21 17:41:57 -05:00
|
|
|
a(href='/teachers/quote', data-i18n="teachers_quote.name")
|
2015-12-09 09:57:33 -05:00
|
|
|
span.spl(data-i18n="courses.additional_resources_2_suff")
|
2015-12-02 18:19:48 -05:00
|
|
|
li
|
2015-12-09 09:57:33 -05:00
|
|
|
span.spr(data-i18n="courses.additional_resources_3_pref")
|
|
|
|
a(href='http://discourse.codecombat.com/c/teachers', data-i18n="courses.additional_resources_3_mid")
|
|
|
|
span.spl(data-i18n="courses.additional_resources_3_suff")
|
2015-12-21 18:02:11 -05:00
|
|
|
li
|
|
|
|
span.spr(data-i18n="courses.additional_resources_4_pref")
|
2015-12-22 09:43:19 -05:00
|
|
|
a(href='/schools', data-i18n="courses.additional_resources_4_mid")
|
2015-12-21 18:02:11 -05:00
|
|
|
span.spl(data-i18n="courses.additional_resources_4_suff")
|
2015-11-30 17:39:46 -05:00
|
|
|
|
2015-12-08 15:05:08 -05:00
|
|
|
.section-header(data-i18n="courses.your_classes")
|
2015-11-30 17:39:46 -05:00
|
|
|
|
|
|
|
if view.classrooms.models.length > 0
|
|
|
|
.container-fluid
|
|
|
|
each classroom in view.classrooms.models
|
|
|
|
+classroom(classroom)
|
|
|
|
else
|
2015-12-08 15:05:08 -05:00
|
|
|
.no-students(data-i18n="courses.no_classes")
|
2015-11-30 17:39:46 -05:00
|
|
|
|
|
|
|
.text-center
|
2015-12-08 15:05:08 -05:00
|
|
|
button.btn.btn-lg.btn-success.uppercase.create-new-class(data-i18n="courses.create_new_class1")
|
2015-11-30 17:39:46 -05:00
|
|
|
|
2015-11-30 19:40:14 -05:00
|
|
|
br
|
2015-12-08 15:05:08 -05:00
|
|
|
.section-header(data-i18n="courses.available_courses")
|
|
|
|
|
2015-12-04 18:02:58 -05:00
|
|
|
if !me.isAnonymous()
|
|
|
|
p.text-center
|
2015-12-08 15:05:08 -05:00
|
|
|
strong.spr(data-i18n="courses.unused_enrollments")
|
2015-12-04 18:02:58 -05:00
|
|
|
strong.spr= view.prepaids.totalAvailable()
|
2015-12-08 15:05:08 -05:00
|
|
|
a.btn.btn-success.btn(href="/courses/purchase", data-i18n="courses.purchase_enrollments")
|
2015-12-21 18:01:14 -05:00
|
|
|
button#activate-licenses-btn.btn.btn-info(data-i18n="courses.enroll_paid")
|
2015-12-08 15:05:08 -05:00
|
|
|
|
|
|
|
p(data-i18n="courses.students_access")
|
|
|
|
|
2015-11-30 19:40:14 -05:00
|
|
|
.container-fluid
|
|
|
|
- var courses = view.courses.models;
|
|
|
|
- var i = 0;
|
|
|
|
while i < courses.length
|
|
|
|
- var course = courses[i];
|
|
|
|
- i++;
|
|
|
|
.row
|
|
|
|
.col-md-6
|
|
|
|
+course-info(course)
|
|
|
|
if i < courses.length
|
|
|
|
- course = courses[i];
|
|
|
|
- i++;
|
|
|
|
.col-md-6
|
|
|
|
+course-info(course)
|
2015-11-09 20:58:40 -05:00
|
|
|
|
2015-11-30 17:39:46 -05:00
|
|
|
block footer
|
2015-11-04 19:54:13 -05:00
|
|
|
|
2015-11-30 17:39:46 -05:00
|
|
|
mixin classroom(classroom)
|
|
|
|
.row
|
2015-11-30 19:20:24 -05:00
|
|
|
- var classMemberCount = classroom.get('members') ? classroom.get('members').length : 0;
|
2015-11-30 17:39:46 -05:00
|
|
|
if classMemberCount > 0
|
|
|
|
.col-md-8
|
|
|
|
p
|
|
|
|
span.spr.class-name= classroom.get('name')
|
2015-11-30 19:20:24 -05:00
|
|
|
if classroom.get('aceConfig') && classroom.get('aceConfig').language === 'javascript'
|
|
|
|
span.spr.class-name (JavaScript)
|
2015-11-30 17:39:46 -05:00
|
|
|
else
|
|
|
|
span.spr.class-name (Python)
|
2015-11-30 19:20:24 -05:00
|
|
|
a.edit-classroom-small(data-i18n="courses.edit_settings", data-classroom-id="#{classroom.id}")
|
2015-12-21 17:19:35 -05:00
|
|
|
if classMemberCount === 1
|
|
|
|
p There is #{classMemberCount} student in this class.
|
|
|
|
else
|
|
|
|
p There are #{classMemberCount} students in this class.
|
2015-12-08 15:05:08 -05:00
|
|
|
.active-courses(data-i18n="courses.active_courses")
|
2015-11-30 19:20:24 -05:00
|
|
|
- var courseInstances = view.courseInstances.where({classroomID: classroom.id});
|
2015-12-21 19:17:58 -05:00
|
|
|
table.active-course-container
|
|
|
|
each courseInstance in courseInstances
|
|
|
|
tr
|
|
|
|
+course(courseInstance, classMemberCount)
|
2015-11-30 17:39:46 -05:00
|
|
|
else
|
|
|
|
.col-md-12
|
|
|
|
p
|
|
|
|
span.spr.class-name= classroom.get('name')
|
2015-11-30 19:20:24 -05:00
|
|
|
if classroom.get('aceConfig') && classroom.get('aceConfig').language === 'javascript'
|
|
|
|
span.spr.class-name (JavaScript)
|
2015-11-30 17:39:46 -05:00
|
|
|
else
|
|
|
|
span.spr.class-name (Python)
|
2015-11-30 19:20:24 -05:00
|
|
|
a.edit-classroom-small(data-i18n="courses.edit_settings", data-classroom-id="#{classroom.id}")
|
2015-12-08 15:05:08 -05:00
|
|
|
.no-students(data-i18n="courses.no_students")
|
2015-11-30 17:39:46 -05:00
|
|
|
.text-center
|
2015-12-08 15:05:08 -05:00
|
|
|
button.btn.btn-info.uppercase.btn-add-students(data-classroom-id="#{classroom.id}", data-i18n="courses.add_students1")
|
2015-11-30 17:39:46 -05:00
|
|
|
br
|
|
|
|
if classMemberCount > 0
|
|
|
|
.col-md-4.text-center
|
|
|
|
.class-count= classMemberCount
|
2015-12-08 15:05:08 -05:00
|
|
|
.active-courses(style='margin:6px;', data-i18n="courses.students1")
|
|
|
|
a.btn.btn-info.uppercase(href='/courses/#{classroom.id}', data-i18n="courses.view_edit")
|
2015-11-30 17:39:46 -05:00
|
|
|
.row
|
|
|
|
.col-md-12
|
|
|
|
.divider
|
|
|
|
|
|
|
|
mixin course(courseInstance, classMemberCount)
|
2015-11-30 19:20:24 -05:00
|
|
|
- var courseMemberCount = courseInstance.get('members') ? courseInstance.get('members').length : 0;
|
2015-11-30 17:39:46 -05:00
|
|
|
if courseMemberCount > 0
|
2015-11-30 19:20:24 -05:00
|
|
|
- var course = view.courses.get(courseInstance.get('courseID'));
|
2015-12-21 19:17:58 -05:00
|
|
|
td
|
|
|
|
span.course-name= course.get('name')
|
|
|
|
td
|
|
|
|
span.course-enrolled
|
|
|
|
span #{courseMemberCount} / #{classMemberCount}
|
|
|
|
span.spl(data-i18n="courses.students_enrolled")
|
2015-11-30 19:40:14 -05:00
|
|
|
|
|
|
|
mixin course-info(course)
|
|
|
|
.media
|
2015-12-01 17:41:10 -05:00
|
|
|
img.media-object(src=course.get('screenshot'))
|
2015-11-30 19:40:14 -05:00
|
|
|
.media-body
|
|
|
|
span.spr.course-name= course.get('name')
|
|
|
|
p= course.get('description')
|
|
|
|
p
|
2015-12-08 15:05:08 -05:00
|
|
|
strong
|
|
|
|
span(data-i18n="courses.concepts")
|
|
|
|
span.spr :
|
2015-11-30 19:40:14 -05:00
|
|
|
each concept in course.get('concepts')
|
|
|
|
span(data-i18n="concepts." + concept)
|
|
|
|
if course.get('concepts').indexOf(concept) !== course.get('concepts').length - 1
|
|
|
|
span.spr ,
|
|
|
|
p
|
2015-12-08 15:05:08 -05:00
|
|
|
strong.spr(data-i18n="courses.length")
|
|
|
|
span= course.get('duration') || 0
|
|
|
|
span.spl(data-i18n="units.hours")
|