Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Call ChainQueryMaps to New Query
staff_grading_data()

module, _ = StudentModule.objects.get_or_create(
course_id=self.course_id,
module_state_key=self.location,
student=user,
defaults={
'state': '{}',
'module_type': self.category,
})

 
staff_upload_annotated()

module = StudentModule.objects.get(pk=request.params['module_id'])

And finally, .save()

 
staff_download_annotated()

module = StudentModule.objects.get(pk=request.params['module_id'])

 
enter_grade()

module = StudentModule.objects.get(pk=request.params['module_id'])

And finally, .save()

 
remove_grade()

module = StudentModule.objects.get(pk=request.params['module_id'])

And finally, .save()

 

src/edx-sga/edx_sga/tests.py

Tests of staff-graded assignments XBlock.

Several tests perform direct StudentModule.object() access.

src/edx-sga/edx_sga/management/commands/sga_migrate_submissions.py

Django management command that migrates existing SGA submissions for a course from old SGA implementation to newer version that uses the 'submissions' application.

Call ChainQueryMaps to New Query
 

student_modules = StudentModule.objects.filter(
course_id=course.id).filter(
module_state_key__contains='edx_sga')