diff --git a/app/styles/courses/classroom-view.sass b/app/styles/courses/classroom-view.sass index 8c59390fa..41e57aa02 100644 --- a/app/styles/courses/classroom-view.sass +++ b/app/styles/courses/classroom-view.sass @@ -11,3 +11,7 @@ .progress-bar border-right: 1px solid grey + + .progress-bar-default + background-color: white + color: grey \ No newline at end of file diff --git a/app/templates/courses/classroom-level-popover.jade b/app/templates/courses/classroom-level-popover.jade index 93ab35460..02e143780 100644 --- a/app/templates/courses/classroom-level-popover.jade +++ b/app/templates/courses/classroom-level-popover.jade @@ -1,10 +1,11 @@ - var completed = session && session.get('state').complete; -h3 #{i + 1}. #{level.name.replace('Course: ', '')} -p - span.spr(data-i18n="courses.play_time") - span #{moment.duration(session.get('playtime'), "seconds").humanize()} -p - span.spr(data-i18n=completed ? "courses.completed" : "clans.last_played") - span #{moment(session.get('changed')).format('MMMM Do YYYY, h:mm:ss a')} -if canViewSolution +h3 #{i}. #{level.name.replace('Course: ', '')} +if session + p + span.spr(data-i18n="courses.play_time") + span #{moment.duration(session.get('playtime'), "seconds").humanize()} + p + span.spr(data-i18n=completed ? "courses.completed" : "clans.last_played") + span #{moment(session.get('changed')).format('MMMM Do YYYY, h:mm:ss a')} +if session && canViewSolution strong(data-i18n=completed ? "clans.view_solution" : "clans.view_attempt") diff --git a/app/templates/courses/classroom-view.jade b/app/templates/courses/classroom-view.jade index 541c2e527..c1f275692 100644 --- a/app/templates/courses/classroom-view.jade +++ b/app/templates/courses/classroom-view.jade @@ -69,16 +69,16 @@ block content - var i = 0; .progress each level, levelID in campaign.get('levels') + - i++ - var session = sessionMap[levelID]; - if !session - - break; a(href=view.getLevelURL(level, course, courseInstance, session)) - var content = view.levelPopoverContent(level, session, i); if session && session.get('state').complete - .progress-bar.progress-bar-success(style=css, data-content=content, data-toggle='popover')= i + 1 + .progress-bar.progress-bar-success(style=css, data-content=content, data-toggle='popover')= i + else if session + .progress-bar.progress-bar-warning(style=css, data-content=content, data-toggle='popover')= i else - .progress-bar.progress-bar-warning(style=css, data-content=content, data-toggle='popover')= i + 1 - - i++ + .progress-bar.progress-bar-default(style=css, data-content=content, data-toggle='popover')= i else if paidFor button.enable-btn.btn.btn-info.btn-sm(data-user-id=user.id, data-course-instance-cid=courseInstance.cid) Enable diff --git a/app/views/courses/ClassroomView.coffee b/app/views/courses/ClassroomView.coffee index 3cb2cd78e..ab2b95f5f 100644 --- a/app/views/courses/ClassroomView.coffee +++ b/app/views/courses/ClassroomView.coffee @@ -163,7 +163,7 @@ module.exports = class ClassroomView extends RootView @render() levelPopoverContent: (level, session, i) -> - return null unless level and session + return null unless level context = { moment: moment level: level