       kept
 
     @dropUnpointed: (submissions, keepHighest, keepLowest) ->
-      sortedSubmissions = submissions.sort (a,b) -> a.score - b.score
+      sortedSubmissions = submissions.sort @stableSubmissionSort(
+        (a,b) -> a.score - b.score,
+        (s) -> s.submission.assignment_id
+      )
+
       _.chain(sortedSubmissions).last(keepHighest).first(keepLowest).value()
 
     @dropPointed: (submissions, cantDrop, keepHighest, keepLowest) ->


        kept

      kept = keepHelper(submissions, keepHighest, ([a,xx], [b,yy]) -> b - a)
      kept = keepHelper(kept, keepLowest, ([a,xx], [b,yy]) -> a - b)

    @estimateQHigh: (pointed, unpointed, grades) ->
      if unpointed.length > 0

      keepHighest = submissions.length - dropLowest
      keepLowest  = keepHighest - dropHighest

      hasPointed = (s.total for s in submissions when s.total > 0).length > 0
      kept = if hasPointed
        @dropPointed submissions, cantDrop, keepHighest, keepLowest
