lms.djangoapps.ora_staff_grader.mock package#

Submodules#

lms.djangoapps.ora_staff_grader.mock.urls module#

URLs for Enhanced Staff Grader (ESG) backend-for-frontend (BFF)

NOTE - This should be the same as ../urls.py

lms.djangoapps.ora_staff_grader.mock.utils module#

Mocking/testing utils for ESG

lms.djangoapps.ora_staff_grader.mock.utils.fetch_response(submission_id)#

Return a default response, the same for all submissions

lms.djangoapps.ora_staff_grader.mock.utils.fetch_submission(ora_location, submission_id)#

Fetch an individual submission, indexed first by ORA block location then Submission ID

lms.djangoapps.ora_staff_grader.mock.utils.get_course_metadata(ora_location)#

Get course metadata, indexed by ORA block location

lms.djangoapps.ora_staff_grader.mock.utils.get_ora_metadata(ora_location)#

Get ORA metadata, indexed by ORA block location

lms.djangoapps.ora_staff_grader.mock.utils.get_submissions(ora_location)#

Get Submission list, scoped by ORA block location

lms.djangoapps.ora_staff_grader.mock.utils.read_data_file(file_name)#

Return data from a JSON file in the /data dir

lms.djangoapps.ora_staff_grader.mock.utils.save_submission_update(ora_location, submission)#

Update a submission key with new data

lms.djangoapps.ora_staff_grader.mock.utils.update_data_file(file_name, update_key_path, update_value)#

Update a single key/value within a JSON file

params: - file_name: string path of file relative to DATA_ROOT - update_key_path: array-like list of keys to traverse, necessary for editing multiple levels down in hierarchy

lms.djangoapps.ora_staff_grader.mock.views module#

Mock views for ESG

class lms.djangoapps.ora_staff_grader.mock.views.InitializeView(**kwargs)#

Bases: RetrieveAPIView

Returns initial app state

get(request)#
class lms.djangoapps.ora_staff_grader.mock.views.SubmissionFetchView(**kwargs)#

Bases: RetrieveAPIView

Get a submission

get(request)#
class lms.djangoapps.ora_staff_grader.mock.views.SubmissionLockView(**kwargs)#

Bases: APIView

Lock a submission for grading

delete(request)#

Delete a submission lock, updating lock status

post(request)#

Claim a submission lock, updating lock status

class lms.djangoapps.ora_staff_grader.mock.views.SubmissionStatusFetchView(**kwargs)#

Bases: RetrieveAPIView

Get a submission status, leaving out the response

get(request)#
class lms.djangoapps.ora_staff_grader.mock.views.UpdateGradeView(**kwargs)#

Bases: RetrieveAPIView

Submit a grade

post(request)#

Save a grade update to the data store

update_grade_data(submission, grade_data)#

Mutate grade shape and add a mock score

Module contents#

Mock tooling for ESG