From 5bcbd67b104ad61d1f6a6834c3a2df603b187a6a Mon Sep 17 00:00:00 2001 From: leangseu-edx <83240113+leangseu-edx@users.noreply.github.com> Date: Wed, 20 Sep 2023 14:45:54 -0400 Subject: [PATCH 01/27] feat: make legacy template (#2046) * chore: move template to legacy folder * chore: add lms+cms restart script to install-local-ora * chore: update test * chore: add top level block view --- Makefile | 2 + openassessment/templates/base.html | 3 + .../edit/oa_edit.html | 12 ++-- .../edit/oa_edit_assessment_steps.html | 2 +- .../edit/oa_edit_basic_settings_list.html | 0 .../edit/oa_edit_criterion.html | 2 +- .../edit/oa_edit_header_and_validation.html | 12 ++-- .../edit/oa_edit_option.html | 0 .../edit/oa_edit_peer_assessment.html | 0 .../oa_edit_peer_assessment_schedule.html | 0 .../edit/oa_edit_prompt.html | 0 .../edit/oa_edit_prompts.html | 4 +- .../edit/oa_edit_rubric.html | 8 +-- .../edit/oa_edit_schedule.html | 4 +- .../edit/oa_edit_self_assessment.html | 0 .../oa_edit_self_assessment_schedule.html | 0 .../edit/oa_edit_settings.html | 2 +- .../edit/oa_edit_staff_assessment.html | 0 .../edit/oa_edit_student_training.html | 6 +- .../edit/oa_rubric_reuse.html | 0 .../edit/oa_training_example.html | 2 +- .../edit/oa_training_example_criterion.html | 0 .../grade/oa_assessment_feedback.html | 0 .../grade/oa_assessment_title.html | 0 .../grade/oa_grade_cancelled.html | 0 .../grade/oa_grade_complete.html | 10 +-- .../grade/oa_grade_incomplete.html | 0 .../grade/oa_grade_not_started.html | 0 .../grade/oa_grade_waiting.html | 0 .../icons/warning_filled.html | 0 .../oa_grade_available_responses.html | 2 +- .../instructor_dashboard/oa_listing.html | 2 +- .../oa_waiting_step_details.html | 0 ...pen-response-assessment-summary.underscore | 0 .../leaderboard/oa_leaderboard_show.html | 4 +- .../leaderboard/oa_leaderboard_waiting.html | 0 .../message/oa_message_cancelled.html | 0 .../message/oa_message_closed.html | 0 .../message/oa_message_complete.html | 0 .../message/oa_message_incomplete.html | 0 .../message/oa_message_no_team.html | 0 .../message/oa_message_open.html | 0 .../message/oa_message_unavailable.html | 0 .../oa_base.html | 0 .../oa_error.html | 0 .../oa_latex_preview.html | 0 .../oa_rubric.html | 4 +- .../oa_submission_answer.html | 0 .../oa_team_uploaded_files.html | 0 .../oa_uploaded_file.html | 0 .../peer/oa_peer_assessment.html | 6 +- .../peer/oa_peer_cancelled.html | 2 +- .../peer/oa_peer_closed.html | 2 +- .../peer/oa_peer_complete.html | 2 +- .../peer/oa_peer_turbo_mode.html | 8 +-- .../peer/oa_peer_turbo_mode_waiting.html | 2 +- .../peer/oa_peer_unavailable.html | 2 +- .../peer/oa_peer_waiting.html | 2 +- .../response/oa_response.html | 8 +-- .../response/oa_response_cancelled.html | 2 +- .../response/oa_response_closed.html | 2 +- .../response/oa_response_graded.html | 8 +-- .../response/oa_response_studio_preview.html | 0 .../response/oa_response_submitted.html | 8 +-- .../oa_response_team_already_submitted.html | 2 +- .../response/oa_response_unavailable.html | 2 +- .../self/oa_self_assessment.html | 6 +- .../self/oa_self_cancelled.html | 2 +- .../self/oa_self_closed.html | 2 +- .../self/oa_self_complete.html | 2 +- .../self/oa_self_unavailable.html | 2 +- .../staff/oa_staff_grade.html | 0 .../staff_area/oa_staff_area.html | 2 +- .../staff_area/oa_staff_grade_learners.html | 2 +- .../oa_staff_grade_learners_assessment.html | 6 +- .../oa_staff_grade_learners_count.html | 0 .../oa_staff_override_assessment.html | 6 +- .../staff_area/oa_student_info.html | 14 ++-- .../oa_student_info_assessment_detail.html | 0 .../student_training/student_training.html | 2 +- .../student_training_cancelled.html | 2 +- .../student_training_closed.html | 2 +- .../student_training_complete.html | 2 +- .../student_training_error.html | 2 +- .../student_training_unavailable.html | 2 +- openassessment/xblock/grade_mixin.py | 10 +-- openassessment/xblock/leaderboard_mixin.py | 4 +- openassessment/xblock/message_mixin.py | 16 ++--- openassessment/xblock/openassessmentblock.py | 10 +-- openassessment/xblock/staff_area_mixin.py | 8 +-- .../xblock/static/js/fixtures/templates.json | 60 ++++++++--------- openassessment/xblock/studio_mixin.py | 2 +- .../test/data/student_training_mixin.json | 2 +- .../xblock/test/test_leaderboard.py | 4 +- openassessment/xblock/test/test_message.py | 66 +++++++++---------- openassessment/xblock/test/test_peer.py | 24 +++---- openassessment/xblock/test/test_self.py | 24 +++---- openassessment/xblock/test/test_staff.py | 2 +- openassessment/xblock/test/test_staff_area.py | 14 ++-- .../xblock/test/test_student_training.py | 12 ++-- openassessment/xblock/test/test_submission.py | 42 ++++++------ scripts/render_templates.py | 2 +- 102 files changed, 251 insertions(+), 246 deletions(-) create mode 100644 openassessment/templates/base.html rename openassessment/templates/{openassessmentblock => legacy}/edit/oa_edit.html (62%) rename openassessment/templates/{openassessmentblock => legacy}/edit/oa_edit_assessment_steps.html (88%) rename openassessment/templates/{openassessmentblock => legacy}/edit/oa_edit_basic_settings_list.html (100%) rename openassessment/templates/{openassessmentblock => legacy}/edit/oa_edit_criterion.html (94%) rename openassessment/templates/{openassessmentblock => legacy}/edit/oa_edit_header_and_validation.html (85%) rename openassessment/templates/{openassessmentblock => legacy}/edit/oa_edit_option.html (100%) rename openassessment/templates/{openassessmentblock => legacy}/edit/oa_edit_peer_assessment.html (100%) rename openassessment/templates/{openassessmentblock => legacy}/edit/oa_edit_peer_assessment_schedule.html (100%) rename openassessment/templates/{openassessmentblock => legacy}/edit/oa_edit_prompt.html (100%) rename openassessment/templates/{openassessmentblock => legacy}/edit/oa_edit_prompts.html (74%) rename openassessment/templates/{openassessmentblock => legacy}/edit/oa_edit_rubric.html (80%) rename openassessment/templates/{openassessmentblock => legacy}/edit/oa_edit_schedule.html (97%) rename openassessment/templates/{openassessmentblock => legacy}/edit/oa_edit_self_assessment.html (100%) rename openassessment/templates/{openassessmentblock => legacy}/edit/oa_edit_self_assessment_schedule.html (100%) rename openassessment/templates/{openassessmentblock => legacy}/edit/oa_edit_settings.html (60%) rename openassessment/templates/{openassessmentblock => legacy}/edit/oa_edit_staff_assessment.html (100%) rename openassessment/templates/{openassessmentblock => legacy}/edit/oa_edit_student_training.html (89%) rename openassessment/templates/{openassessmentblock => legacy}/edit/oa_rubric_reuse.html (100%) rename openassessment/templates/{openassessmentblock => legacy}/edit/oa_training_example.html (91%) rename openassessment/templates/{openassessmentblock => legacy}/edit/oa_training_example_criterion.html (100%) rename openassessment/templates/{openassessmentblock => legacy}/grade/oa_assessment_feedback.html (100%) rename openassessment/templates/{openassessmentblock => legacy}/grade/oa_assessment_title.html (100%) rename openassessment/templates/{openassessmentblock => legacy}/grade/oa_grade_cancelled.html (100%) rename openassessment/templates/{openassessmentblock => legacy}/grade/oa_grade_complete.html (95%) rename openassessment/templates/{openassessmentblock => legacy}/grade/oa_grade_incomplete.html (100%) rename openassessment/templates/{openassessmentblock => legacy}/grade/oa_grade_not_started.html (100%) rename openassessment/templates/{openassessmentblock => legacy}/grade/oa_grade_waiting.html (100%) rename openassessment/templates/{openassessmentblock => legacy}/icons/warning_filled.html (100%) rename openassessment/templates/{openassessmentblock => legacy}/instructor_dashboard/oa_grade_available_responses.html (85%) rename openassessment/templates/{openassessmentblock => legacy}/instructor_dashboard/oa_listing.html (89%) rename openassessment/templates/{openassessmentblock => legacy}/instructor_dashboard/oa_waiting_step_details.html (100%) rename openassessment/templates/{openassessmentblock => legacy}/instructor_dashboard/open-response-assessment-summary.underscore (100%) rename openassessment/templates/{openassessmentblock => legacy}/leaderboard/oa_leaderboard_show.html (80%) rename openassessment/templates/{openassessmentblock => legacy}/leaderboard/oa_leaderboard_waiting.html (100%) rename openassessment/templates/{openassessmentblock => legacy}/message/oa_message_cancelled.html (100%) rename openassessment/templates/{openassessmentblock => legacy}/message/oa_message_closed.html (100%) rename openassessment/templates/{openassessmentblock => legacy}/message/oa_message_complete.html (100%) rename openassessment/templates/{openassessmentblock => legacy}/message/oa_message_incomplete.html (100%) rename openassessment/templates/{openassessmentblock => legacy}/message/oa_message_no_team.html (100%) rename openassessment/templates/{openassessmentblock => legacy}/message/oa_message_open.html (100%) rename openassessment/templates/{openassessmentblock => legacy}/message/oa_message_unavailable.html (100%) rename openassessment/templates/{openassessmentblock => legacy}/oa_base.html (100%) rename openassessment/templates/{openassessmentblock => legacy}/oa_error.html (100%) rename openassessment/templates/{openassessmentblock => legacy}/oa_latex_preview.html (100%) rename openassessment/templates/{openassessmentblock => legacy}/oa_rubric.html (95%) rename openassessment/templates/{openassessmentblock => legacy}/oa_submission_answer.html (100%) rename openassessment/templates/{openassessmentblock => legacy}/oa_team_uploaded_files.html (100%) rename openassessment/templates/{openassessmentblock => legacy}/oa_uploaded_file.html (100%) rename openassessment/templates/{openassessmentblock => legacy}/peer/oa_peer_assessment.html (89%) rename openassessment/templates/{openassessmentblock => legacy}/peer/oa_peer_cancelled.html (90%) rename openassessment/templates/{openassessmentblock => legacy}/peer/oa_peer_closed.html (96%) rename openassessment/templates/{openassessmentblock => legacy}/peer/oa_peer_complete.html (97%) rename openassessment/templates/{openassessmentblock => legacy}/peer/oa_peer_turbo_mode.html (83%) rename openassessment/templates/{openassessmentblock => legacy}/peer/oa_peer_turbo_mode_waiting.html (96%) rename openassessment/templates/{openassessmentblock => legacy}/peer/oa_peer_unavailable.html (89%) rename openassessment/templates/{openassessmentblock => legacy}/peer/oa_peer_waiting.html (96%) rename openassessment/templates/{openassessmentblock => legacy}/response/oa_response.html (96%) rename openassessment/templates/{openassessmentblock => legacy}/response/oa_response_cancelled.html (97%) rename openassessment/templates/{openassessmentblock => legacy}/response/oa_response_closed.html (96%) rename openassessment/templates/{openassessmentblock => legacy}/response/oa_response_graded.html (65%) rename openassessment/templates/{openassessmentblock => legacy}/response/oa_response_studio_preview.html (100%) rename openassessment/templates/{openassessmentblock => legacy}/response/oa_response_submitted.html (80%) rename openassessment/templates/{openassessmentblock => legacy}/response/oa_response_team_already_submitted.html (96%) rename openassessment/templates/{openassessmentblock => legacy}/response/oa_response_unavailable.html (89%) rename openassessment/templates/{openassessmentblock => legacy}/self/oa_self_assessment.html (88%) rename openassessment/templates/{openassessmentblock => legacy}/self/oa_self_cancelled.html (91%) rename openassessment/templates/{openassessmentblock => legacy}/self/oa_self_closed.html (95%) rename openassessment/templates/{openassessmentblock => legacy}/self/oa_self_complete.html (91%) rename openassessment/templates/{openassessmentblock => legacy}/self/oa_self_unavailable.html (90%) rename openassessment/templates/{openassessmentblock => legacy}/staff/oa_staff_grade.html (100%) rename openassessment/templates/{openassessmentblock => legacy}/staff_area/oa_staff_area.html (98%) rename openassessment/templates/{openassessmentblock => legacy}/staff_area/oa_staff_grade_learners.html (76%) rename openassessment/templates/{openassessmentblock => legacy}/staff_area/oa_staff_grade_learners_assessment.html (85%) rename openassessment/templates/{openassessmentblock => legacy}/staff_area/oa_staff_grade_learners_count.html (100%) rename openassessment/templates/{openassessmentblock => legacy}/staff_area/oa_staff_override_assessment.html (82%) rename openassessment/templates/{openassessmentblock => legacy}/staff_area/oa_student_info.html (93%) rename openassessment/templates/{openassessmentblock => legacy}/staff_area/oa_student_info_assessment_detail.html (100%) rename openassessment/templates/{openassessmentblock => legacy}/student_training/student_training.html (98%) rename openassessment/templates/{openassessmentblock => legacy}/student_training/student_training_cancelled.html (88%) rename openassessment/templates/{openassessmentblock => legacy}/student_training/student_training_closed.html (94%) rename openassessment/templates/{openassessmentblock => legacy}/student_training/student_training_complete.html (88%) rename openassessment/templates/{openassessmentblock => legacy}/student_training/student_training_error.html (93%) rename openassessment/templates/{openassessmentblock => legacy}/student_training/student_training_unavailable.html (87%) diff --git a/Makefile b/Makefile index ca8769f672..07d19c2a41 100644 --- a/Makefile +++ b/Makefile @@ -155,6 +155,8 @@ install-osx-requirements: ## Install OSX specific requirements using Homebrew install-local-ora: ## installs your local ORA2 code into the LMS and Studio python virtualenvs docker exec -t edx.devstack.lms bash -c '. /edx/app/edxapp/venvs/edxapp/bin/activate && cd /edx/app/edxapp/edx-platform && pip uninstall -y ora2 && pip install -e /edx/src/edx-ora2 && pip freeze | grep ora2' docker exec -t edx.devstack.cms bash -c '. /edx/app/edxapp/venvs/edxapp/bin/activate && cd /edx/app/edxapp/edx-platform && pip uninstall -y ora2 && pip install -e /edx/src/edx-ora2 && pip freeze | grep ora2' + docker exec -t edx.devstack.lms bash -c 'kill $$(ps aux | egrep "manage.py ?\w* runserver" | egrep -v "while|grep" | awk "{print \$$2}")' + docker exec -t edx.devstack.cms bash -c 'kill $$(ps aux | egrep "manage.py ?\w* runserver" | egrep -v "while|grep" | awk "{print \$$2}")' install_transifex_client: ## Install the Transifex client # Instaling client will skip CHANGELOG and LICENSE files from git changes diff --git a/openassessment/templates/base.html b/openassessment/templates/base.html new file mode 100644 index 0000000000..355760ecf3 --- /dev/null +++ b/openassessment/templates/base.html @@ -0,0 +1,3 @@ +
").concat(t,"
\n")})),t.html(n)}},{key:"areSRStepsLoading",value:function(){return this.responseView.isRendering||this.peerView.isRendering||this.selfView.isRendering||this.gradeView.isRendering||this.trainingView.isRendering||this.staffView.isRendering}},{key:"announceStatusChangeToSRandFocus",value:function(e,t,n,r,a){var i=this.getStatus(e,r,n);void 0!==t&&$(e,r.element).hasClass("is--showing")&&void 0!==a?($(a,r.element).focus(),this.srStatusUpdates.push(i)):r.announceStatus&&this.srStatusUpdates.push(i),!this.areSRStepsLoading()&&this.srStatusUpdates.length>0&&(this.srReadTexts(this.srStatusUpdates),this.srStatusUpdates=[]),r.announceStatus=!1}},{key:"getStatus",value:function(e,t,n){var r="".concat(e," .step__header .step__title "),a="".concat(r,".step__label"),i="".concat(r,".step__status");return n&&(i="".concat(r,".grade__value")),"".concat($(a,t.element).text().trim()," ").concat($(i,t.element).text().trim())}},{key:"setUpCollapseExpand",value:function(e){var t=this;$(".".concat(t.SLIDABLE_CONTROLS_CLASS),e).each((function(){$(this).on("click",(function(e){e.preventDefault();var n=$(e.target).closest(".".concat(t.SLIDABLE_CONTROLS_CLASS)),r=n.closest(".".concat(t.SLIDABLE_CONTAINER_CLASS)),a=n.find(".".concat(t.SLIDABLE_CLASS)),i=n.next(".".concat(t.SLIDABLE_CONTENT_CLASS));r.hasClass("is--showing")?(i.slideUp(),a.attr("aria-expanded","false"),r.removeClass("is--showing")):r.hasClass("has--error")||r.hasClass("is--empty")||r.hasClass("is--unavailable")||(i.slideDown(),a.attr("aria-expanded","true"),r.addClass("is--showing")),r.removeClass("is--initially--collapsed ")}))}))}},{key:"bindLatexPreview",value:function(e){e.find(".submission__preview__item").hide(),e.find(".submission__preview").click((function(t){t.preventDefault();var n=$(t.target).data("input"),r=e.find('textarea[data-preview="'.concat(n,'"]')).val(),a=e.find('.preview_content[data-preview="'.concat(n,'"]'));a.html(r.replace(/\r\n|\r|\n/g,"".concat(t?_.escape(t):"","
")),$(r,n).toggleClass("has--error",null!==t),$("".concat(r," > .message"),n).focus()),null!==t){var a=$("".concat(r," .message__title")).text();this.srReadTexts([a,t])}}},{key:"showLoadError",value:function(e,t){t||(t=gettext("Unable to load"));var n=$(".step--".concat(e));n.toggleClass("has--error",!0),n.removeClass("is--showing"),n.find(".ui-slidable").attr("aria-expanded","false"),n.find(".step__status__value i").removeClass().addClass("icon fa fa-exclamation-triangle"),n.find(".step__status__value .copy").html(_.escape(t))}},{key:"unsavedWarningEnabled",value:function(e,t,n){if(void 0===e)return null!==window.onbeforeunload;var r=$(this.element).data("usage-id");e?(void 0!==this.unsavedChanges[r]&&this.unsavedChanges[r]||(this.unsavedChanges[r]={}),this.unsavedChanges[r][t]=n,window.onbeforeunload=function(){var e,n=this;return Object.keys(this.unsavedChanges).some((function(r){if(n.unsavedChanges.hasOwnProperty(r)){var a=n.unsavedChanges[r];return Object.keys(a).some((function(n){return!!a.hasOwnProperty(t)&&(e=a[t],!0)}))}return!1})),e}):void 0!==this.unsavedChanges[r]&&(delete this.unsavedChanges[r][t],$.isEmptyObject(this.unsavedChanges[r])&&delete this.unsavedChanges[r],$.isEmptyObject(this.unsavedChanges)&&(window.onbeforeunload=null))}},{key:"buttonEnabled",value:function(e,t){var n=$(e,this.element);return void 0===t?!n.prop("disabled"):(n.prop("disabled",!t),t)}}])&&wy(t.prototype,n),r&&wy(t,r),e}();window.OpenAssessmentBlock=function(e,t,n){var a=new r.a(e,t);new Ty(e,t,a,n).load()},window.CourseOpenResponsesListingBlock=function(e,t,n){new a.a(e,t,n).refreshGrids()},window.StaffAssessmentBlock=function(e,t,n){var a=new r.a(e,t);new Ty(e,t,a,n).staffAreaView.installHandlers()},window.WaitingStepDetailsBlock=function(e,t,n){var a=new r.a(e,t),i=new Ty(e,t,a,n);Ly(i,n)}},,,,,,,,,,,function(e,t,n){"use strict";(function(e){var r=n(0);function a(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,a=!1,i=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){a=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(a)throw i}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return i(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return i(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n").concat(t,"
\n")})),t.html(n)}},{key:"areSRStepsLoading",value:function(){return this.responseView.isRendering||this.peerView.isRendering||this.selfView.isRendering||this.gradeView.isRendering||this.trainingView.isRendering||this.staffView.isRendering}},{key:"announceStatusChangeToSRandFocus",value:function(e,t,n,r,a){var i=this.getStatus(e,r,n);void 0!==t&&$(e,r.element).hasClass("is--showing")&&void 0!==a?($(a,r.element).focus(),this.srStatusUpdates.push(i)):r.announceStatus&&this.srStatusUpdates.push(i),!this.areSRStepsLoading()&&this.srStatusUpdates.length>0&&(this.srReadTexts(this.srStatusUpdates),this.srStatusUpdates=[]),r.announceStatus=!1}},{key:"getStatus",value:function(e,t,n){var r="".concat(e," .step__header .step__title "),a="".concat(r,".step__label"),i="".concat(r,".step__status");return n&&(i="".concat(r,".grade__value")),"".concat($(a,t.element).text().trim()," ").concat($(i,t.element).text().trim())}},{key:"setUpCollapseExpand",value:function(e){var t=this;$(".".concat(t.SLIDABLE_CONTROLS_CLASS),e).each((function(){$(this).on("click",(function(e){e.preventDefault();var n=$(e.target).closest(".".concat(t.SLIDABLE_CONTROLS_CLASS)),r=n.closest(".".concat(t.SLIDABLE_CONTAINER_CLASS)),a=n.find(".".concat(t.SLIDABLE_CLASS)),i=n.next(".".concat(t.SLIDABLE_CONTENT_CLASS));r.hasClass("is--showing")?(i.slideUp(),a.attr("aria-expanded","false"),r.removeClass("is--showing")):r.hasClass("has--error")||r.hasClass("is--empty")||r.hasClass("is--unavailable")||(i.slideDown(),a.attr("aria-expanded","true"),r.addClass("is--showing")),r.removeClass("is--initially--collapsed ")}))}))}},{key:"bindLatexPreview",value:function(e){e.find(".submission__preview__item").hide(),e.find(".submission__preview").click((function(t){t.preventDefault();var n=$(t.target).data("input"),r=e.find('textarea[data-preview="'.concat(n,'"]')).val(),a=e.find('.preview_content[data-preview="'.concat(n,'"]'));a.html(r.replace(/\r\n|\r|\n/g,"".concat(t?_.escape(t):"","
")),$(r,n).toggleClass("has--error",null!==t),$("".concat(r," > .message"),n).focus()),null!==t){var a=$("".concat(r," .message__title")).text();this.srReadTexts([a,t])}}},{key:"showLoadError",value:function(e,t){t||(t=gettext("Unable to load"));var n=$(".step--".concat(e));n.toggleClass("has--error",!0),n.removeClass("is--showing"),n.find(".ui-slidable").attr("aria-expanded","false"),n.find(".step__status__value i").removeClass().addClass("icon fa fa-exclamation-triangle"),n.find(".step__status__value .copy").html(_.escape(t))}},{key:"unsavedWarningEnabled",value:function(e,t,n){if(void 0===e)return null!==window.onbeforeunload;var r=$(this.element).data("usage-id");e?(void 0!==this.unsavedChanges[r]&&this.unsavedChanges[r]||(this.unsavedChanges[r]={}),this.unsavedChanges[r][t]=n,window.onbeforeunload=function(){var e,n=this;return Object.keys(this.unsavedChanges).some((function(r){if(n.unsavedChanges.hasOwnProperty(r)){var a=n.unsavedChanges[r];return Object.keys(a).some((function(n){return!!a.hasOwnProperty(t)&&(e=a[t],!0)}))}return!1})),e}):void 0!==this.unsavedChanges[r]&&(delete this.unsavedChanges[r][t],$.isEmptyObject(this.unsavedChanges[r])&&delete this.unsavedChanges[r],$.isEmptyObject(this.unsavedChanges)&&(window.onbeforeunload=null))}},{key:"buttonEnabled",value:function(e,t){var n=$(e,this.element);return void 0===t?!n.prop("disabled"):(n.prop("disabled",!t),t)}}])&&wy(t.prototype,n),r&&wy(t,r),e}();window.OpenAssessmentBlock=function(e,t,n){var a=new r.a(e,t);new Ty(e,t,a,n).load()},window.CourseOpenResponsesListingBlock=function(e,t,n){new a.a(e,t,n).refreshGrids()},window.StaffAssessmentBlock=function(e,t,n){var a=new r.a(e,t);new Ty(e,t,a,n).staffAreaView.installHandlers()},window.WaitingStepDetailsBlock=function(e,t,n){var a=new r.a(e,t),i=new Ty(e,t,a,n);Ly(i,n)}},,,,,,,,,,,function(e,t,n){"use strict";(function(e){var r=n(0);function a(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,a=!1,i=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){a=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(a)throw i}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return i(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return i(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n