From 9bf131fed85506f350ce154b304aa559e159c601 Mon Sep 17 00:00:00 2001 From: Bryann Valderrama Date: Thu, 16 Nov 2023 16:42:40 -0500 Subject: [PATCH] refactor: rename assessment_filter to assessment_type --- lms/djangoapps/ora_staff_grader/constants.py | 2 +- lms/djangoapps/ora_staff_grader/ora_api.py | 4 ++-- lms/djangoapps/ora_staff_grader/views.py | 8 ++++---- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/lms/djangoapps/ora_staff_grader/constants.py b/lms/djangoapps/ora_staff_grader/constants.py index d57f525401..1ff67d79d2 100644 --- a/lms/djangoapps/ora_staff_grader/constants.py +++ b/lms/djangoapps/ora_staff_grader/constants.py @@ -3,7 +3,7 @@ # Query params PARAM_ORA_LOCATION = "oraLocation" PARAM_SUBMISSION_ID = "submissionUUID" -PARAM_ASSESSMENT_FILTER = "assessmentFilter" +PARAM_ASSESSMENT_TYPE = "assessmentType" # Error codes ERR_UNKNOWN = "ERR_UNKNOWN" diff --git a/lms/djangoapps/ora_staff_grader/ora_api.py b/lms/djangoapps/ora_staff_grader/ora_api.py index 408c097936..432b6b817c 100644 --- a/lms/djangoapps/ora_staff_grader/ora_api.py +++ b/lms/djangoapps/ora_staff_grader/ora_api.py @@ -34,12 +34,12 @@ def get_submissions(request, usage_id): return json.loads(response.content) -def get_assessments(request, usage_id, submission_uuid, assessment_filter): +def get_assessments(request, usage_id, submission_uuid, assessment_type): """ Get a list of assessments from the ORA's 'list_assessments_grades' XBlock.json_handler """ handler_name = "list_assessments" - body = {"item_id": usage_id, "submission_uuid": submission_uuid, "assessment_filter": assessment_filter} + body = {"item_id": usage_id, "submission_uuid": submission_uuid, "assessment_type": assessment_type} response = call_xblock_json_handler(request, usage_id, handler_name, body) diff --git a/lms/djangoapps/ora_staff_grader/views.py b/lms/djangoapps/ora_staff_grader/views.py index 0f74e56d32..90d09ed4cb 100644 --- a/lms/djangoapps/ora_staff_grader/views.py +++ b/lms/djangoapps/ora_staff_grader/views.py @@ -24,7 +24,7 @@ from lms.djangoapps.ora_staff_grader.constants import ( PARAM_ORA_LOCATION, PARAM_SUBMISSION_ID, - PARAM_ASSESSMENT_FILTER, + PARAM_ASSESSMENT_TYPE, ) from lms.djangoapps.ora_staff_grader.errors import ( BadOraLocationResponse, @@ -182,13 +182,13 @@ class AssessmentFeedbackView(StaffGraderBaseView): - UnknownError (HTTP 500) for other errors """ - @require_params([PARAM_ORA_LOCATION, PARAM_SUBMISSION_ID, PARAM_ASSESSMENT_FILTER]) - def get(self, request, ora_location, submission_uuid, assessment_filter, *args, **kwargs): + @require_params([PARAM_ORA_LOCATION, PARAM_SUBMISSION_ID, PARAM_ASSESSMENT_TYPE]) + def get(self, request, ora_location, submission_uuid, assessment_type, *args, **kwargs): try: assessments_data = { "assessments": get_assessments( - request, ora_location, submission_uuid, assessment_filter + request, ora_location, submission_uuid, assessment_type ) }