mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-12-12 08:41:46 -05:00
Merge branch 'master' into production
This commit is contained in:
commit
4efb1d69dd
2 changed files with 8 additions and 16 deletions
|
@ -444,7 +444,7 @@ body[lang='ru'], body[lang='uk'], body[lang='bg'], body[lang^='mk'], body[lang='
|
||||||
#footer
|
#footer
|
||||||
background-image: url("/images/pages/home/footer_background.png")
|
background-image: url("/images/pages/home/footer_background.png")
|
||||||
height: 229px
|
height: 229px
|
||||||
margin: -22px auto 0
|
margin: 65px auto 0
|
||||||
color: white
|
color: white
|
||||||
|
|
||||||
@media (max-width: $screen-sm-min)
|
@media (max-width: $screen-sm-min)
|
||||||
|
|
|
@ -111,9 +111,6 @@ module.exports = class TeacherClassView extends RootView
|
||||||
return dir * diff if diff
|
return dir * diff if diff
|
||||||
return (if student1.broadName().toLowerCase() < student2.broadName().toLowerCase() then -dir else dir)
|
return (if student1.broadName().toLowerCase() < student2.broadName().toLowerCase() then -dir else dir)
|
||||||
|
|
||||||
@campaigns = new Campaigns()
|
|
||||||
@supermodel.trackRequest @campaigns.fetchByType('course', { data: { project: 'levels,slug,type' } })
|
|
||||||
|
|
||||||
@courses = new Courses()
|
@courses = new Courses()
|
||||||
@supermodel.trackRequest @courses.fetch()
|
@supermodel.trackRequest @courses.fetch()
|
||||||
|
|
||||||
|
@ -331,23 +328,18 @@ module.exports = class TeacherClassView extends RootView
|
||||||
courseLabels += "CS#{index + 1} Playtime,"
|
courseLabels += "CS#{index + 1} Playtime,"
|
||||||
courseOrder.push(course._id)
|
courseOrder.push(course._id)
|
||||||
csvContent = "data:text/csv;charset=utf-8,Username,Email,Total Playtime,#{courseLabels}Concepts\n"
|
csvContent = "data:text/csv;charset=utf-8,Username,Email,Total Playtime,#{courseLabels}Concepts\n"
|
||||||
campaignCourseMap = {}
|
|
||||||
courseMap = {}
|
|
||||||
for course in @courses.models
|
|
||||||
campaignCourseMap[course.get('campaignID')] = course
|
|
||||||
courseMap[course.id] = course
|
|
||||||
levelCourseMap = {}
|
levelCourseMap = {}
|
||||||
for campaign in @campaigns.models
|
for trimCourse in @classroom.get('courses')
|
||||||
continue unless campaignCourseMap[campaign.id]
|
for trimLevel in trimCourse.levels
|
||||||
for levelID, level of campaign.get('levels')
|
levelCourseMap[trimLevel.original] = @courses.get(trimCourse._id)
|
||||||
levelCourseMap[levelID] = campaignCourseMap[campaign.id]
|
|
||||||
for student in @students.models
|
for student in @students.models
|
||||||
concepts = []
|
concepts = []
|
||||||
for course in @courses.models
|
for trimCourse in @classroom.get('courses')
|
||||||
|
course = @courses.get(trimCourse._id)
|
||||||
instance = @courseInstances.findWhere({ courseID: course.id, classroomID: @classroom.id })
|
instance = @courseInstances.findWhere({ courseID: course.id, classroomID: @classroom.id })
|
||||||
if instance and instance.hasMember(student)
|
if instance and instance.hasMember(student)
|
||||||
# TODO: @levels collection is for the classroom, and not per-course
|
for trimLevel in trimCourse.levels
|
||||||
for level in @levels.models
|
level = @levels.findWhere({ original: trimLevel.original })
|
||||||
progress = @state.get('progressData').get({ classroom: @classroom, course: course, level: level, user: student })
|
progress = @state.get('progressData').get({ classroom: @classroom, course: course, level: level, user: student })
|
||||||
concepts.push(level.get('concepts') ? []) if progress?.completed
|
concepts.push(level.get('concepts') ? []) if progress?.completed
|
||||||
concepts = _.union(_.flatten(concepts))
|
concepts = _.union(_.flatten(concepts))
|
||||||
|
|
Loading…
Reference in a new issue