🐛/courses wd2 Start button goes to wrong level

We can’t cache course instance sessions by course because of web dev
primer levels and classroom versioning.
This commit is contained in:
Matt Lott 2016-08-31 17:04:40 -07:00
parent 527ba277ab
commit df69cb54a8

View file

@ -68,13 +68,9 @@ module.exports = class CoursesView extends RootView
@onClassLoadError()
onCourseInstancesLoaded: ->
map = {}
for courseInstance in @courseInstances.models
courseID = courseInstance.get('courseID')
if map[courseID]
courseInstance.sessions = map[courseID]
continue
map[courseID] = courseInstance.sessions = new CocoCollection([], {
courseInstance.sessions = new CocoCollection([], {
url: courseInstance.url() + '/my-course-level-sessions',
model: LevelSession
})