     for courseId, roster of @_local
       students = roster.students
       student = _.findWhere(students, id: studentId)
-      student.is_active = true
+      student?.is_active = true
     @emitChange()
 
 

  exports:

    getActiveStudentsForPeriod: (courseId, periodId) ->
      _.where(@_get(courseId).students, period_id: periodId, is_active: true)

    getDroppedStudents: (courseId, periodId) ->
      _.where(@_get(courseId).students, period_id: periodId, is_active: false)

}


    for courseId, roster of @_local
      students = roster.students
      student = _.findWhere(students, id: studentId)
      student?.is_active = false
    @emitChange()

  undrop: (unused, studentId) ->
