     @state.set('searchTerm', $(e.target).val())
 
   onChangeCourseSelect: (e) ->
-    @trigger 'course-select:change', { selectedCourse: @courses.get($(e.currentTarget).val()) }
+    selectedCourseId = $(e.currentTarget).val()
+    localStorage.setItem getLastSelectedCourseKey(this.classroom.id), selectedCourseId
+    @trigger 'course-select:change', { selectedCourse: @courses.get(selectedCourseId) }
 
   onChangeLockedLevelSelect: (e) ->
     level = $(e.currentTarget).val()

DOMPurify = require 'dompurify'

{ STARTER_LICENSE_COURSE_IDS } = require 'core/constants'

module.exports = class TeacherClassView extends RootView
  id: 'teacher-class-view'

    @listenTo @courses, 'sync change update', ->
      @setCourseMembers() # Is this necessary?
      unless @state.get 'selectedCourse'
        courseId = localStorage.getItem getLastSelectedCourseKey this.classroom.id
        @state.set 'selectedCourse', if courseId then @courses.get(courseId) else @courses.first()
      @setSelectedCourseInstance()
    @listenTo @courseInstances, 'sync change update', ->
      @setCourseMembers()
