diff --git a/openassessment/__init__.py b/openassessment/__init__.py index 0060fe0172..d005e0b20e 100644 --- a/openassessment/__init__.py +++ b/openassessment/__init__.py @@ -2,4 +2,4 @@ Initialization Information for Open Assessment Module """ -__version__ = '6.0.17' +__version__ = '6.0.18' diff --git a/openassessment/xblock/ui_mixins/mfe/mixin.py b/openassessment/xblock/ui_mixins/mfe/mixin.py index 37b45bcf65..dce3db5f30 100644 --- a/openassessment/xblock/ui_mixins/mfe/mixin.py +++ b/openassessment/xblock/ui_mixins/mfe/mixin.py @@ -3,8 +3,10 @@ XBlock handlers which surface info about an ORA, instead of being tied to views. """ +from edx_django_utils.monitoring import function_trace from xblock.core import XBlock from xblock.exceptions import JsonHandlerError + from openassessment.fileupload.exceptions import FileUploadError from openassessment.assessment.errors import AssessmentError from openassessment.workflow.errors import AssessmentWorkflowError @@ -65,11 +67,14 @@ def __init__(self, status_code, error_code, error_context=''): class MfeMixin: + + @function_trace("get_block_info") @XBlock.json_handler def get_block_info(self, data, suffix=""): # pylint: disable=unused-argument block_info = OraBlockInfoSerializer(self) return block_info.data + @function_trace("get_learner_data") @XBlock.json_handler def get_learner_data(self, data, suffix=""): # pylint: disable=unused-argument """ @@ -104,6 +109,7 @@ def get_learner_data(self, data, suffix=""): # pylint: disable=unused-argument serializer_context["requested_step"] = requested_step return PageDataSerializer(self, context=serializer_context).data + @function_trace("submission_draft") def _submission_draft_handler(self, data): try: student_submission_data = data['response']['textResponses'] @@ -115,6 +121,7 @@ def _submission_draft_handler(self, data): except DraftSaveException as e: raise OraApiException(500, error_codes.INTERNAL_EXCEPTION) from e + @function_trace("submission_create") def _submission_create_handler(self, data): from submissions import api as submission_api try: @@ -148,6 +155,7 @@ def submission(self, data, suffix=""): else: raise OraApiException(404, error_codes.UNKNOWN_SUFFIX) + @function_trace("file_delete") def _file_delete_handler(self, data): try: file_index = int(data['fileIndex']) @@ -174,6 +182,7 @@ def _get_new_file_from_list(self, file_to_add, new_list): return file_entry return None + @function_trace("file_add") def _file_add_handler(self, data): serializer = AddFileRequestSerializer(data=data) if not serializer.is_valid(): @@ -219,6 +228,7 @@ def _file_add_handler(self, data): 'fileIndex': newly_added_file.index, } + @function_trace("file_callback") def _file_upload_callback_handler(self, data): serializer = FileUploadCallbackRequestSerializer(data=data) if not serializer.is_valid(): @@ -285,6 +295,7 @@ def get_learner_submission_data(self): 'file_data': file_data, } + @function_trace("assessment_submit") def _assessment_submit_handler(self, data): serializer = AssessmentSubmitRequestSerializer(data=data) if not serializer.is_valid(): diff --git a/package-lock.json b/package-lock.json index 38de312603..789b781fb2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "edx-ora2", - "version": "6.0.17", + "version": "6.0.18", "lockfileVersion": 3, "requires": true, "packages": { diff --git a/package.json b/package.json index fb1c9bcb72..65803a0b02 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "edx-ora2", - "version": "6.0.17", + "version": "6.0.18", "repository": "https://github.com/openedx/edx-ora2.git", "dependencies": { "@edx/frontend-build": "8.0.6",