   class SubmissionDetailsDialog
     constructor: (@assignment, @student, @options) ->
       @url = @options.change_grade_url.replace(":assignment", @assignment.id).replace(":submission", @student.id)
-      @submission = $.extend {}, @student["assignment_#{@assignment.id}"], 
+      @submission = $.extend {}, @student["assignment_#{@assignment.id}"],
         assignment: @assignment
         speedGraderUrl: "#{@options.context_url}/gradebook/speed_grader?assignment_id=#{@assignment.id}#%7B%22student_id%22%3A#{@student.id}%7D"
         loading: true

          event.preventDefault()
          $(event.currentTarget).disableWhileLoading $.ajaxJSON @url, 'PUT', $(event.currentTarget).getFormData(), (data) =>
            @update(data)
            setTimeout => 
              @dialog.dialog('close')
            , 500


      @dialog.html(submissionDetailsDialog(@submission))
      @dialog.find('select').trigger('change')
      @scrollCommentsToBottom()

    @cachedDialogs: {}

    @open: (assignment, student, options) ->
