
from django.db import models


class PeerReviewAssignmentManager(models.Manager):

    def from_course(self, course):
        return self.get_query_set().filter(kq__unit__course=course)


from django.db import models


class PeerReviewAssignmentManager(models.Manager):

    def from_course(self, course):
        return self.get_query_set().filter(
            kq__unit__course=course).order_by('kq__unit__order')

Fix the order of assignments
Fix the order of assignments

  
  from django.db import models
  
  
  class PeerReviewAssignmentManager(models.Manager):
  
      def from_course(self, course):
-         return self.get_query_set().filter(kq__unit__course=course)
+         return self.get_query_set().filter(
+             kq__unit__course=course).order_by('kq__unit__order')
  
Fix the order of assignments
## Code Before:

from django.db import models


class PeerReviewAssignmentManager(models.Manager):

    def from_course(self, course):
        return self.get_query_set().filter(kq__unit__course=course)

## Instruction:
Fix the order of assignments
## Code After:

from django.db import models


class PeerReviewAssignmentManager(models.Manager):

    def from_course(self, course):
        return self.get_query_set().filter(
            kq__unit__course=course).order_by('kq__unit__order')
