diff --git a/openassessment/templates/openassessmentblock/edit/oa_edit_basic_settings_list.html b/openassessment/templates/openassessmentblock/edit/oa_edit_basic_settings_list.html index f653072587..fe34dd080b 100644 --- a/openassessment/templates/openassessmentblock/edit/oa_edit_basic_settings_list.html +++ b/openassessment/templates/openassessmentblock/edit/oa_edit_basic_settings_list.html @@ -162,4 +162,24 @@ {% trans "Specify whether learners can see the rubric while they are working on their response." %}
+{% trans "Available template variables are: question, student_answer, prompts" %}
+").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)}}])&&To(t.prototype,n),r&&To(t,r),e}();window.OpenAssessmentBlock=function(e,t,n){var a=new r.a(e,t);new zo(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 zo(e,t,a,n).staffAreaView.installHandlers()},window.WaitingStepDetailsBlock=function(e,t,n){var a=new r.a(e,t),i=new zo(e,t,a,n);Ao(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