                     null # We don't really care if the user canceled or completed the tutorial.
                   .then =>
                     now = new Date().toISOString()
+                    completedThisSession[project.id] = now
                     if user?
                       user.get('project_preferences', project_id: project.id).then ([projectPreferences]) =>
                         projectPreferences ?= apiClient.type('project_preferences').create({


  statics:
    checkIfCompleted: (user, project) ->
      getCompletedAt = if user?
        user.get 'project_preferences', project_id: project.id
          .catch =>
            []
          .then ([projectPreferences]) =>
            new Date projectPreferences?.preferences?.tutorial_completed_at
      else
        Promise.resolve new Date completedThisSession[project.id]

      getCompletedAt.then (completedAt) =>
        if isNaN completedAt.valueOf()

                        })
                        projectPreferences.update 'preferences.tutorial_completed_at': now
                        projectPreferences.save()

    startIfNecessary: (user, project) ->
      @checkIfCompleted user, project
