diff --git a/app/templates/teachers/teacher-student-view.jade b/app/templates/teachers/teacher-student-view.jade index 0551a03d9..ab36a1b47 100644 --- a/app/templates/teachers/teacher-student-view.jade +++ b/app/templates/teachers/teacher-student-view.jade @@ -48,45 +48,49 @@ block content span(data-i18n="TODO") Our Recommendation .recommendation(style="width:100%") - // get view.courseComparisonMap - // warn = [] -- push course name when -2 - // great = []-- push course name when +2 - // good = [] -- push course name when +/- 1 - // for all courses in courseComparisonMap - // get perf, push course to one of the three arrays based on value + - var warn = [] + - var great = [] + - var good = [] + each course in view.courseComparisonMap || [] + if (Math.abs(course.performance)) == 1 + - good.push(course.courseName) + else if (course.performance) >= 2 + - great.push(course.courseName) + else if (course.performance) <= -2 + - warn.push(course.courseName) - - // only display if warn.length > 0 - div(class="glyphicon glyphicon-exclamation-sign") - div(class="small-details", style="padding:0 15px 0 60px; width: 94%" ) - strong - span.spr= view.user.get('name') - span(data-i18n="TODO") might need some help in the following courses: - // stringfy course names from warn[] - .warn Computer Science 1, Web Development 1 - .status - span(data-i18n="TODO") This student’s level playtimes for these courses indicate that they might need some help with new concepts that are introduced. + if warn.length > 0 + div(class="glyphicon glyphicon-exclamation-sign") + div(class="small-details", style="padding:0 15px 0 60px; width: 94%" ) + strong + span.spr= view.user.get('name') + span(data-i18n="TODO") might need some help in the following courses: + .warn + span= warn.join(', ') + .status + span(data-i18n="TODO") This student’s level playtimes for these courses indicate that they might need some help with new concepts that are introduced. - // only display if great.length > 0 - div(class="glyphicon glyphicon-star", style="") - div(class="small-details", style="padding:0 15px 0 60px; width: 94%" ) - strong - span.spr= view.user.get('name') - span(data-i18n="TODO") is exceeding expectations in the following courses: - // stringfy course names from great[] - .great Computer Science 1, Web Development 1 - .status - span(data-i18n="TODO") This student’s level playtimes for these courses indicate that they might be a good candidate to help other students in this class. + if great.length > 0 + div(class="glyphicon glyphicon-star", style="") + div(class="small-details", style="padding:0 15px 0 60px; width: 94%" ) + strong + span.spr= view.user.get('name') + span(data-i18n="TODO") is doing great in the following courses: + .great + span= great.join(', ') + .status + span(data-i18n="TODO") This student’s level playtimes for these courses indicate that they might be a good candidate to help other students in this class. - // only display if good.length > 0 - div(class="glyphicon glyphicon-thumbs-up") - div(class="small-details", style="padding:0 15px 0 60px; width: 94%" ) - strong - span.spr= view.user.get('name') - span(data-i18n="TODO") is doing great! - // also stringfy course names from good[]? not sure. - .status - span(data-i18n="TODO") This student’s level playtimes indicate that they are keeping pace with this class’s average playtimes for each course. + if good.length > 0 + div(class="glyphicon glyphicon-thumbs-up") + div(class="small-details", style="padding:0 15px 0 60px; width: 94%" ) + strong + span.spr= view.user.get('name') + span(data-i18n="TODO") is doing well! + .status + span(data-i18n="TODO") This student’s level playtimes indicate that they are keeping pace with this class’s average playtimes for the following courses: + .good + span= good.join(', ') .playtime-charts h4(data-i18n="teacher.playtime_detail") diff --git a/app/views/teachers/TeacherStudentView.coffee b/app/views/teachers/TeacherStudentView.coffee index a075487ff..bfa12822e 100644 --- a/app/views/teachers/TeacherStudentView.coffee +++ b/app/views/teachers/TeacherStudentView.coffee @@ -119,6 +119,7 @@ module.exports = class TeacherStudentView extends RootView @courseComparisonMap.push { courseID: course.get('_id') + courseName: course.get('name') studentCourseTotal: studentCourseTotal standardDev: StandardDev mean: mean