           .then ([projectPreferences]) =>
             window.prefs = projectPreferences
             projectPreferences?.preferences?.minicourses?.completed_at?["id_#{minicourse.id}"]?
-      # else
-      #   Promise.resolve minicoursesCompletedThisSession[minicourse.id]?
 
     handleOptOut: (project, user, minicourseID) ->
       if user?

          # Create default preferences
          newProjectPreferences = @createProjectPreferences(projectPreferences, @props.minicourse.id, @props.project.id)
          @setState { projectPreferences: newProjectPreferences }
    # else
    #   if sessionStorage.getItem('minicourse_slide_to_start')?
    #     @refs.stepThrough.goTo sessionStorage.getItem('minicourse_slide_to_start')
  
  componentWillUnmount: ->
    if @state.projectPreferences?
      @handleProjectPreferencesOnUnmount()
    # else
      # now = new Date().toISOString()
      # minicoursesCompletedThisSession[@props.minicourse.id] = now
      # sessionStorage.setItem('minicourse_slide_to_start', @state.slideToStart + 1)
  
  render: ->
    <StepThrough ref="stepThrough" className="tutorial-steps">

              # Create default preferences if they don't exist
              @createProjectPreferences(projectPreferences, minicourse.id, project.id).then =>
                @start minicourse, user

    startIfNecessary: ({workflow, project, user}) ->
      if user?
