Skip to content

Commit

Permalink
refactor: rename assessment_filter to assessment_type
Browse files Browse the repository at this point in the history
  • Loading branch information
BryanttV authored and Ian2012 committed Nov 22, 2023
1 parent 441860f commit 9bf131f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion lms/djangoapps/ora_staff_grader/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
4 changes: 2 additions & 2 deletions lms/djangoapps/ora_staff_grader/ora_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
8 changes: 4 additions & 4 deletions lms/djangoapps/ora_staff_grader/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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
)
}

Expand Down

0 comments on commit 9bf131f

Please sign in to comment.