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
|
||||
background-image: url("/images/pages/home/footer_background.png")
|
||||
height: 229px
|
||||
margin: -22px auto 0
|
||||
margin: 65px auto 0
|
||||
color: white
|
||||
|
||||
@media (max-width: $screen-sm-min)
|
||||
|
|
|
@ -111,9 +111,6 @@ module.exports = class TeacherClassView extends RootView
|
|||
return dir * diff if diff
|
||||
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()
|
||||
@supermodel.trackRequest @courses.fetch()
|
||||
|
||||
|
@ -331,23 +328,18 @@ module.exports = class TeacherClassView extends RootView
|
|||
courseLabels += "CS#{index + 1} Playtime,"
|
||||
courseOrder.push(course._id)
|
||||
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 = {}
|
||||
for campaign in @campaigns.models
|
||||
continue unless campaignCourseMap[campaign.id]
|
||||
for levelID, level of campaign.get('levels')
|
||||
levelCourseMap[levelID] = campaignCourseMap[campaign.id]
|
||||
for trimCourse in @classroom.get('courses')
|
||||
for trimLevel in trimCourse.levels
|
||||
levelCourseMap[trimLevel.original] = @courses.get(trimCourse._id)
|
||||
for student in @students.models
|
||||
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 })
|
||||
if instance and instance.hasMember(student)
|
||||
# TODO: @levels collection is for the classroom, and not per-course
|
||||
for level in @levels.models
|
||||
for trimLevel in trimCourse.levels
|
||||
level = @levels.findWhere({ original: trimLevel.original })
|
||||
progress = @state.get('progressData').get({ classroom: @classroom, course: course, level: level, user: student })
|
||||
concepts.push(level.get('concepts') ? []) if progress?.completed
|
||||
concepts = _.union(_.flatten(concepts))
|
||||
|
|
Loading…
Reference in a new issue