mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-23 23:58:02 -05:00
🐛Exclude practice levels from course progress counts
This commit is contained in:
parent
9888bb7cef
commit
0316cc507e
2 changed files with 3 additions and 2 deletions
|
@ -13,6 +13,7 @@ module.exports =
|
|||
instance.numCompleted = 0
|
||||
instance.started = false
|
||||
levels = classroom.getLevels({courseID: course.id})
|
||||
levels.remove(levels.filter((level) => level.get('practice')))
|
||||
for userID in instance.get('members')
|
||||
instance.started ||= _.any levels.models, (level) ->
|
||||
session = _.find classroom.sessions.models, (session) ->
|
||||
|
@ -180,7 +181,7 @@ module.exports =
|
|||
if _.find(sessions, (s) -> s.completed()) # have finished this level
|
||||
courseProgress.completed &&= true #no-op
|
||||
courseProgress[userID].completed &&= true #no-op
|
||||
courseProgress[userID].levelsCompleted += 1
|
||||
courseProgress[userID].levelsCompleted += 1 unless level.get('practice')
|
||||
courseProgress[levelID].completed &&= true #no-op
|
||||
# courseProgress[levelID].numCompleted += 1
|
||||
courseProgress[levelID][userID].completed = true
|
||||
|
|
|
@ -226,7 +226,7 @@ mixin studentRow(student)
|
|||
- var instance = view.courseInstances.findWhere({ courseID: course.id, classroomID: classroom.id })
|
||||
if instance && instance.hasMember(student)
|
||||
- var progress = state.get('progressData').get({ classroom: view.classroom, course: course, user: student })
|
||||
- var levelsTotal = trimCourse.levels.length
|
||||
- var levelsTotal = _.reject(trimCourse.levels, 'practice').length
|
||||
//- - var level = ???
|
||||
- var label = courseLabelsArray[index];
|
||||
+studentCourseProgressDot(progress, levelsTotal, level, label)
|
||||
|
|
Loading…
Reference in a new issue