         paginationLinks = xhr.getResponseHeader('Link')
         lastLink = paginationLinks.match(/<[^>]+>; *rel="last"/)
         unless lastLink?
-          gotAllStudents.resolve()
+          gotAllStudentsPromise.resolve()
           return
         lastPage = lastLink[0].match(/page=(\d+)/)[1]
         lastPage = parseInt lastPage, 10
         if lastPage == 1
-          gotAllStudents.resolve()
+          gotAllStudentsPromise.resolve()
           return
 
         fetchEnrollments = (page) =>

            @gotChunkOfStudents responses[0]
          else
            @gotChunkOfStudents(students) for [students, x, y] in responses
          gotAllStudents.resolve()

      gotCustomColumns = @getCustomColumns()
      @gotAllData = $.when(gotCustomColumns, gotAllStudents, @gotAllAssignmentGroupsPromise)

      @allSubmissionsLoaded.done =>
        for c in @customColumns

      else
        'students_url'

      gotAllStudentsPromise = $.Deferred()
      @gotAllAssignmentGroupsPromise = $.Deferred()
      gotAllStudentsAndAssignmentsPromise = $.Deferred()

      $.when(gotAllStudentsPromise, @gotAllAssignmentGroupsPromise).then =>
        @gotAllAssignmentGroups()
        @gotAllStudents()
        gotAllStudentsAndAssignmentsPromise.resolve()

      @assignmentGroupsParams = {exclude_descriptions: true}
      if @mgpEnabled && @gradingPeriodToShow && @gradingPeriodToShow != '0' && @gradingPeriodToShow != ''
