Warning: No message defined for "+b.name+""),e=/\$?\{(\d+)\}/g;return"function"==typeof d?d=d.call(this,c.parameters,b):e.test(d)&&(d=a.validator.format(d.replace(e,"{$1}"),c.parameters)),d},formatAndAdd:function(a,b){var c=this.defaultMessage(a,b);this.errorList.push({message:c,element:a,method:b.method}),this.errorMap[a.name]=c,this.submitted[a.name]=c},addWrapper:function(a){return this.settings.wrapper&&(a=a.add(a.parent(this.settings.wrapper))),a},defaultShowErrors:function(){var a,b,c;for(a=0;this.errorList[a];a++)c=this.errorList[a],this.settings.highlight&&this.settings.highlight.call(this,c.element,this.settings.errorClass,this.settings.validClass),this.showLabel(c.element,c.message);if(this.errorList.length&&(this.toShow=this.toShow.add(this.containers)),this.settings.success)for(a=0;this.successList[a];a++)this.showLabel(this.successList[a]);if(this.settings.unhighlight)for(a=0,b=this.validElements();b[a];a++)this.settings.unhighlight.call(this,b[a],this.settings.errorClass,this.settings.validClass);this.toHide=this.toHide.not(this.toShow),this.hideErrors(),this.addWrapper(this.toShow).show()},validElements:function(){return this.currentElements.not(this.invalidElements())},invalidElements:function(){return a(this.errorList).map(function(){return this.element})},showLabel:function(b,c){var d,e,f,g,h=this.errorsFor(b),i=this.idOrName(b),j=a(b).attr("aria-describedby");h.length?(h.removeClass(this.settings.validClass).addClass(this.settings.errorClass),h.html(c)):(h=a("<"+this.settings.errorElement+">").attr("id",i+"-error").addClass(this.settings.errorClass).html(c||""),d=h,this.settings.wrapper&&(d=h.hide().show().wrap("<"+this.settings.wrapper+"/>").parent()),this.labelContainer.length?this.labelContainer.append(d):this.settings.errorPlacement?this.settings.errorPlacement.call(this,d,a(b)):d.insertAfter(b),h.is("label")?h.attr("for",i):0===h.parents("label[for='"+this.escapeCssMeta(i)+"']").length&&(f=h.attr("id"),j?j.match(new RegExp("\\b"+this.escapeCssMeta(f)+"\\b"))||(j+=" "+f):j=f,a(b).attr("aria-describedby",j),e=this.groups[b.name],e&&(g=this,a.each(g.groups,function(b,c){c===e&&a("[name='"+g.escapeCssMeta(b)+"']",g.currentForm).attr("aria-describedby",h.attr("id"))})))),!c&&this.settings.success&&(h.text(""),"string"==typeof this.settings.success?h.addClass(this.settings.success):this.settings.success(h,b)),this.toShow=this.toShow.add(h)},errorsFor:function(b){var c=this.escapeCssMeta(this.idOrName(b)),d=a(b).attr("aria-describedby"),e="label[for='"+c+"'], label[for='"+c+"'] *";return d&&(e=e+", #"+this.escapeCssMeta(d).replace(/\s+/g,", #")),this.errors().filter(e)},escapeCssMeta:function(a){return a.replace(/([\\!"#$%&'()*+,.\/:;<=>?@\[\]^`{|}~])/g,"\\$1")},idOrName:function(a){return this.groups[a.name]||(this.checkable(a)?a.name:a.id||a.name)},validationTargetFor:function(b){return this.checkable(b)&&(b=this.findByName(b.name)),a(b).not(this.settings.ignore)[0]},checkable:function(a){return/radio|checkbox/i.test(a.type)},findByName:function(b){return a(this.currentForm).find("[name='"+this.escapeCssMeta(b)+"']")},getLength:function(b,c){switch(c.nodeName.toLowerCase()){case"select":return a("option:selected",c).length;case"input":if(this.checkable(c))return this.findByName(c.name).filter(":checked").length}return b.length},depend:function(a,b){return!this.dependTypes[typeof a]||this.dependTypes[typeof a](a,b)},dependTypes:{"boolean":function(a){return a},string:function(b,c){return!!a(b,c.form).length},"function":function(a,b){return a(b)}},optional:function(b){var c=this.elementValue(b);return!a.validator.methods.required.call(this,c,b)&&"dependency-mismatch"},startRequest:function(b){this.pending[b.name]||(this.pendingRequest++,a(b).addClass(this.settings.pendingClass),this.pending[b.name]=!0)},stopRequest:function(b,c){this.pendingRequest--,this.pendingRequest<0&&(this.pendingRequest=0),delete this.pending[b.name],a(b).removeClass(this.settings.pendingClass),c&&0===this.pendingRequest&&this.formSubmitted&&this.form()?(a(this.currentForm).submit(),this.submitButton&&a("input:hidden[name='"+this.submitButton.name+"']",this.currentForm).remove(),this.formSubmitted=!1):!c&&0===this.pendingRequest&&this.formSubmitted&&(a(this.currentForm).triggerHandler("invalid-form",[this]),this.formSubmitted=!1)},previousValue:function(b,c){return c="string"==typeof c&&c||"remote",a.data(b,"previousValue")||a.data(b,"previousValue",{old:null,valid:!0,message:this.defaultMessage(b,{method:c})})},destroy:function(){this.resetForm(),a(this.currentForm).off(".validate").removeData("validator").find(".validate-equalTo-blur").off(".validate-equalTo").removeClass("validate-equalTo-blur").find(".validate-lessThan-blur").off(".validate-lessThan").removeClass("validate-lessThan-blur").find(".validate-lessThanEqual-blur").off(".validate-lessThanEqual").removeClass("validate-lessThanEqual-blur").find(".validate-greaterThanEqual-blur").off(".validate-greaterThanEqual").removeClass("validate-greaterThanEqual-blur").find(".validate-greaterThan-blur").off(".validate-greaterThan").removeClass("validate-greaterThan-blur")}},classRuleSettings:{required:{required:!0},email:{email:!0},url:{url:!0},date:{date:!0},dateISO:{dateISO:!0},number:{number:!0},digits:{digits:!0},creditcard:{creditcard:!0}},addClassRules:function(b,c){b.constructor===String?this.classRuleSettings[b]=c:a.extend(this.classRuleSettings,b)},classRules:function(b){var c={},d=a(b).attr("class");return d&&a.each(d.split(" "),function(){this in a.validator.classRuleSettings&&a.extend(c,a.validator.classRuleSettings[this])}),c},normalizeAttributeRule:function(a,b,c,d){/min|max|step/.test(c)&&(null===b||/number|range|text/.test(b))&&(d=Number(d),isNaN(d)&&(d=void 0)),d||0===d?a[c]=d:b===c&&"range"!==b&&(a[c]=!0)},attributeRules:function(b){var c,d,e={},f=a(b),g=b.getAttribute("type");for(c in a.validator.methods)"required"===c?(d=b.getAttribute(c),""===d&&(d=!0),d=!!d):d=f.attr(c),this.normalizeAttributeRule(e,g,c,d);return e.maxlength&&/-1|2147483647|524288/.test(e.maxlength)&&delete e.maxlength,e},dataRules:function(b){var c,d,e={},f=a(b),g=b.getAttribute("type");for(c in a.validator.methods)d=f.data("rule"+c.charAt(0).toUpperCase()+c.substring(1).toLowerCase()),""===d&&(d=!0),this.normalizeAttributeRule(e,g,c,d);return e},staticRules:function(b){var c={},d=a.data(b.form,"validator");return d.settings.rules&&(c=a.validator.normalizeRule(d.settings.rules[b.name])||{}),c},normalizeRules:function(b,c){return a.each(b,function(d,e){if(e===!1)return void delete b[d];if(e.param||e.depends){var f=!0;switch(typeof e.depends){case"string":f=!!a(e.depends,c.form).length;break;case"function":f=e.depends.call(c,c)}f?b[d]=void 0===e.param||e.param:(a.data(c.form,"validator").resetElements(a(c)),delete b[d])}}),a.each(b,function(d,e){b[d]=a.isFunction(e)&&"normalizer"!==d?e(c):e}),a.each(["minlength","maxlength"],function(){b[this]&&(b[this]=Number(b[this]))}),a.each(["rangelength","range"],function(){var c;b[this]&&(a.isArray(b[this])?b[this]=[Number(b[this][0]),Number(b[this][1])]:"string"==typeof b[this]&&(c=b[this].replace(/[\[\]]/g,"").split(/[\s,]+/),b[this]=[Number(c[0]),Number(c[1])]))}),a.validator.autoCreateRanges&&(null!=b.min&&null!=b.max&&(b.range=[b.min,b.max],delete b.min,delete b.max),null!=b.minlength&&null!=b.maxlength&&(b.rangelength=[b.minlength,b.maxlength],delete b.minlength,delete b.maxlength)),b},normalizeRule:function(b){if("string"==typeof b){var c={};a.each(b.split(/\s/),function(){c[this]=!0}),b=c}return b},addMethod:function(b,c,d){a.validator.methods[b]=c,a.validator.messages[b]=void 0!==d?d:a.validator.messages[b],c.length<3&&a.validator.addClassRules(b,a.validator.normalizeRule(b))},methods:{required:function(b,c,d){if(!this.depend(d,c))return"dependency-mismatch";if("select"===c.nodeName.toLowerCase()){var e=a(c).val();return e&&e.length>0}return this.checkable(c)?this.getLength(b,c)>0:void 0!==b&&null!==b&&b.length>0},email:function(a,b){return this.optional(b)||/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/.test(a)},url:function(a,b){return this.optional(b)||/^(?:(?:(?:https?|ftp):)?\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)(?:\.(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)*(?:\.(?:[a-z\u00a1-\uffff]{2,})).?)(?::\d{2,5})?(?:[\/?#]\S*)?$/i.test(a)},date:function(){var a=!1;return function(b,c){return a||(a=!0,this.settings.debug&&window.console&&console.warn("The `date` method is deprecated and will be removed in version '2.0.0'.\nPlease don't use it, since it relies on the Date constructor, which\nbehaves very differently across browsers and locales. Use `dateISO`\ninstead or one of the locale specific methods in `localizations/`\nand `additional-methods.js`.")),this.optional(c)||!/Invalid|NaN/.test(new Date(b).toString())}}(),dateISO:function(a,b){return this.optional(b)||/^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/.test(a)},number:function(a,b){return this.optional(b)||/^(?:-?\d+|-?\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test(a)},digits:function(a,b){return this.optional(b)||/^\d+$/.test(a)},minlength:function(b,c,d){var e=a.isArray(b)?b.length:this.getLength(b,c);return this.optional(c)||e>=d},maxlength:function(b,c,d){var e=a.isArray(b)?b.length:this.getLength(b,c);return this.optional(c)||e<=d},rangelength:function(b,c,d){var e=a.isArray(b)?b.length:this.getLength(b,c);return this.optional(c)||e>=d[0]&&e<=d[1]},min:function(a,b,c){return this.optional(b)||a>=c},max:function(a,b,c){return this.optional(b)||a<=c},range:function(a,b,c){return this.optional(b)||a>=c[0]&&a<=c[1]},step:function(b,c,d){var e,f=a(c).attr("type"),g="Step attribute on input type "+f+" is not supported.",h=["text","number","range"],i=new RegExp("\\b"+f+"\\b"),j=f&&!i.test(h.join()),k=function(a){var b=(""+a).match(/(?:\.(\d+))?$/);return b&&b[1]?b[1].length:0},l=function(a){return Math.round(a*Math.pow(10,e))},m=!0;if(j)throw new Error(g);return e=k(d),(k(b)>e||l(b)%l(d)!==0)&&(m=!1),this.optional(c)||m},equalTo:function(b,c,d){var e=a(d);return this.settings.onfocusout&&e.not(".validate-equalTo-blur").length&&e.addClass("validate-equalTo-blur").on("blur.validate-equalTo",function(){a(c).valid()}),b===e.val()},remote:function(b,c,d,e){if(this.optional(c))return"dependency-mismatch";e="string"==typeof e&&e||"remote";var f,g,h,i=this.previousValue(c,e);return this.settings.messages[c.name]||(this.settings.messages[c.name]={}),i.originalMessage=i.originalMessage||this.settings.messages[c.name][e],this.settings.messages[c.name][e]=i.message,d="string"==typeof d&&{url:d}||d,h=a.param(a.extend({data:b},d.data)),i.old===h?i.valid:(i.old=h,f=this,this.startRequest(c),g={},g[c.name]=b,a.ajax(a.extend(!0,{mode:"abort",port:"validate"+c.name,dataType:"json",data:g,context:f.currentForm,success:function(a){var d,g,h,j=a===!0||"true"===a;f.settings.messages[c.name][e]=i.originalMessage,j?(h=f.formSubmitted,f.resetInternals(),f.toHide=f.errorsFor(c),f.formSubmitted=h,f.successList.push(c),f.invalid[c.name]=!1,f.showErrors()):(d={},g=a||f.defaultMessage(c,{method:e,parameters:b}),d[c.name]=i.message=g,f.invalid[c.name]=!0,f.showErrors(d)),i.valid=j,f.stopRequest(c,j)}},d)),"pending")}}});var b,c={};return a.ajaxPrefilter?a.ajaxPrefilter(function(a,b,d){var e=a.port;"abort"===a.mode&&(c[e]&&c[e].abort(),c[e]=d)}):(b=a.ajax,a.ajax=function(d){var e=("mode"in d?d:a.ajaxSettings).mode,f=("port"in d?d:a.ajaxSettings).port;return"abort"===e?(c[f]&&c[f].abort(),c[f]=b.apply(this,arguments),c[f]):b.apply(this,arguments)}),a});
\ No newline at end of file
Index: lams_tool_assessment/web/common/authoringQuestionHeader.jsp
===================================================================
diff -u -r8a65083cf102509e0ca486f636746f56a600c514 -r629116ce2b6bac35146c7b90b668dbc5f887eb69
--- lams_tool_assessment/web/common/authoringQuestionHeader.jsp (.../authoringQuestionHeader.jsp) (revision 8a65083cf102509e0ca486f636746f56a600c514)
+++ lams_tool_assessment/web/common/authoringQuestionHeader.jsp (.../authoringQuestionHeader.jsp) (revision 629116ce2b6bac35146c7b90b668dbc5f887eb69)
@@ -1,18 +1,18 @@
- <%@ include file="/common/header.jsp"%>
-
+<%@ include file="/common/header.jsp"%>
+
-
-
-
-
-
-
-
-
\ No newline at end of file
+
+
+
+
+
+
+
+
\ No newline at end of file
Index: lams_tool_assessment/web/includes/css/addQuestion.scss
===================================================================
diff -u -ra0aa698e675b0a2eb89e51cf645156ade0f93d64 -r629116ce2b6bac35146c7b90b668dbc5f887eb69
--- lams_tool_assessment/web/includes/css/addQuestion.scss (.../addQuestion.scss) (revision a0aa698e675b0a2eb89e51cf645156ade0f93d64)
+++ lams_tool_assessment/web/includes/css/addQuestion.scss (.../addQuestion.scss) (revision 629116ce2b6bac35146c7b90b668dbc5f887eb69)
@@ -4,11 +4,6 @@
display:none;
}
-em {
- font-weight: bold;
- padding-right: 1em;
- vertical-align: top;
-}
#content {
width: 91%;
margin-bottom: 10px;
@@ -92,33 +87,34 @@
}
#title {
- width: 100%;
height: 34px;
font-weight: bold;
}
#title-container, div.error {
padding-right: 80px;
}
-/*Style for text input fields*/
-.borderless-text-input {
+/*Style for text input fields. Rule does not apply in case this input has an error*/
+:not(.has-error) > input.borderless-text-input{
border: 0;
+ box-shadow: none;
+ padding: 0;
}
/* Remove bold style from title field */
-.borderless-text-input::-webkit-input-placeholder {
+input.borderless-text-input::-webkit-input-placeholder {
font-weight: normal;
color:#999;
}
-.borderless-text-input::-moz-placeholder {
+input.borderless-text-input::-moz-placeholder {
font-weight: normal;
color:#999;
}
-.borderless-text-input:-ms-input-placeholder {
+input.borderless-text-input:-ms-input-placeholder {
font-weight: normal;
color:#999;
}
-.borderless-text-input:-o-input-placeholder {
+input.borderless-text-input:-o-input-placeholder {
font-weight: normal;
color:#999;
}
@@ -382,4 +378,17 @@
.switch-slider.round:before {
border-radius: 50%;
-}
\ No newline at end of file
+}
+
+/*----------Modifications to bootstrap-toggle----------------*/
+.toggle.btn-xs {
+ min-width: 59px;
+}
+
+/*----------Validation rules----------------*/
+#title-container .form-control-feedback {
+ right: 80px;
+}
+.col-sm-9.has-feedback .form-control-feedback {
+ left: 80px;
+}
Index: lams_tool_assessment/web/includes/javascript/authoring-question.js
===================================================================
diff -u -r8a65083cf102509e0ca486f636746f56a600c514 -r629116ce2b6bac35146c7b90b668dbc5f887eb69
--- lams_tool_assessment/web/includes/javascript/authoring-question.js (.../authoring-question.js) (revision 8a65083cf102509e0ca486f636746f56a600c514)
+++ lams_tool_assessment/web/includes/javascript/authoring-question.js (.../authoring-question.js) (revision 629116ce2b6bac35146c7b90b668dbc5f887eb69)
@@ -21,7 +21,7 @@
}
//form validation handler. It's called when the form contains an error.
-function formInvalidHandler(form, validator) {
+function formValidationInvalidHandler(form, validator) {
var errors = validator.numberOfInvalids();
if (errors) {
var message = errors == 1
@@ -45,4 +45,36 @@
} else {
$("div.error").hide();
}
-}
\ No newline at end of file
+}
+function formValidationErrorPlacement( error, element ) {
+ // Add the `help-block` class to the error element
+ error.addClass( "help-block" );
+
+ // Add `has-feedback` class to the parent div.form-group in order to add icons to inputs
+ element.parent().addClass( "has-feedback" );
+
+ if ( element.prop( "type" ) === "checkbox" ) {
+ error.insertAfter( element.parent( "label" ) );
+ } else {
+ error.insertAfter( element );
+ }
+
+ // Add the span element, if doesn't exists, and apply the icon classes to it.
+ if ( !element.next( "span" )[ 0 ] ) {
+ $( "" ).insertAfter( element );
+ }
+}
+function formValidationSuccess ( label, element ) {
+ // Add the span element, if doesn't exists, and apply the icon classes to it.
+ if ( !$( element ).next( "span" )[ 0 ] ) {
+ //$( "" ).insertAfter( $( element ) );
+ }
+}
+function formValidationHighlight ( element, errorClass, validClass ) {
+ $( element ).parent().addClass( "has-error" ).removeClass( "has-success" );
+ $( element ).next( "span" ).addClass( "fa-remove" ).removeClass( "fa-check" );
+}
+function formValidationUnhighlight ( element, errorClass, validClass ) {
+ $( element ).parent().addClass( "has-success" ).removeClass( "has-error" );
+ $( element ).not(".fake-validation-input").next( "span" ).addClass( "fa-check" ).removeClass( "fa-remove" );
+}
Index: lams_tool_assessment/web/pages/authoring/parts/addessay.jsp
===================================================================
diff -u -ra0aa698e675b0a2eb89e51cf645156ade0f93d64 -r629116ce2b6bac35146c7b90b668dbc5f887eb69
--- lams_tool_assessment/web/pages/authoring/parts/addessay.jsp (.../addessay.jsp) (revision a0aa698e675b0a2eb89e51cf645156ade0f93d64)
+++ lams_tool_assessment/web/pages/authoring/parts/addessay.jsp (.../addessay.jsp) (revision 629116ce2b6bac35146c7b90b668dbc5f887eb69)
@@ -39,9 +39,6 @@
digits: ""
}
},
- invalidHandler: formInvalidHandler,
- debug: true,
- errorClass: "alert alert-danger",
submitHandler: function(form) {
$("#question").val(CKEDITOR.instances.question.getData());
$("#generalFeedback").val(CKEDITOR.instances.generalFeedback.getData());
@@ -52,7 +49,13 @@
};
$('#assessmentQuestionForm').ajaxSubmit(options);
- }
+ },
+ invalidHandler: formValidationInvalidHandler,
+ errorElement: "em",
+ errorPlacement: formValidationErrorPlacement,
+ success: formValidationSuccess,
+ highlight: formValidationHighlight,
+ unhighlight: formValidationUnhighlight
});
//spinner
@@ -106,7 +109,8 @@
-
+
@@ -127,7 +131,7 @@
-
Index: lams_tool_assessment/web/pages/authoring/parts/addmarkhedging.jsp
===================================================================
diff -u -ra0aa698e675b0a2eb89e51cf645156ade0f93d64 -r629116ce2b6bac35146c7b90b668dbc5f887eb69
--- lams_tool_assessment/web/pages/authoring/parts/addmarkhedging.jsp (.../addmarkhedging.jsp) (revision a0aa698e675b0a2eb89e51cf645156ade0f93d64)
+++ lams_tool_assessment/web/pages/authoring/parts/addmarkhedging.jsp (.../addmarkhedging.jsp) (revision 629116ce2b6bac35146c7b90b668dbc5f887eb69)
@@ -4,14 +4,9 @@
- <%@ include file="/common/authoringQuestionHeader.jsp"%>
+ <%@ include file="/common/authoringQuestionHeader.jsp"%>
-
@@ -65,7 +68,8 @@
-
+
@@ -91,7 +95,7 @@
-
@@ -101,8 +105,10 @@
placeholder="${QUESTION_DESCRIPTION_LABEL}" />
-
-
+
+
+
+
Index: lams_tool_assessment/web/pages/authoring/parts/addmultiplechoice.jsp
===================================================================
diff -u -ra0aa698e675b0a2eb89e51cf645156ade0f93d64 -r629116ce2b6bac35146c7b90b668dbc5f887eb69
--- lams_tool_assessment/web/pages/authoring/parts/addmultiplechoice.jsp (.../addmultiplechoice.jsp) (revision a0aa698e675b0a2eb89e51cf645156ade0f93d64)
+++ lams_tool_assessment/web/pages/authoring/parts/addmultiplechoice.jsp (.../addmultiplechoice.jsp) (revision 629116ce2b6bac35146c7b90b668dbc5f887eb69)
@@ -52,9 +52,6 @@
required: "
"
}
},
- invalidHandler: formInvalidHandler,
- debug: true,
- errorClass: "alert alert-danger",
submitHandler: function(form) {
prepareOptionEditorsForAjaxSubmit();
$("#optionList").val($("#optionForm").serialize(true));
@@ -70,7 +67,13 @@
};
$('#assessmentQuestionForm').ajaxSubmit(options);
- }
+ },
+ invalidHandler: formValidationInvalidHandler,
+ errorElement: "em",
+ errorPlacement: formValidationErrorPlacement,
+ success: formValidationSuccess,
+ highlight: formValidationHighlight,
+ unhighlight: formValidationUnhighlight
});
$("#multipleAnswersAllowed").on('change', function() {
@@ -114,7 +117,8 @@
-
+
@@ -137,7 +141,7 @@
-
@@ -147,8 +151,12 @@
placeholder="${QUESTION_DESCRIPTION_LABEL}" />
-
-
+
+
+
+
+
+
Index: lams_tool_assessment/web/pages/authoring/parts/addnumerical.jsp
===================================================================
diff -u -ra0aa698e675b0a2eb89e51cf645156ade0f93d64 -r629116ce2b6bac35146c7b90b668dbc5f887eb69
--- lams_tool_assessment/web/pages/authoring/parts/addnumerical.jsp (.../addnumerical.jsp) (revision a0aa698e675b0a2eb89e51cf645156ade0f93d64)
+++ lams_tool_assessment/web/pages/authoring/parts/addnumerical.jsp (.../addnumerical.jsp) (revision 629116ce2b6bac35146c7b90b668dbc5f887eb69)
@@ -84,9 +84,6 @@
required: ""
}
},
- invalidHandler: formInvalidHandler,
- debug: true,
- errorClass: "alert alert-danger",
submitHandler: function(form) {
prepareOptionEditorsForAjaxSubmit();
$("#optionList").val($("#optionForm").serialize(true));
@@ -100,7 +97,13 @@
};
$('#assessmentQuestionForm').ajaxSubmit(options);
- }
+ },
+ invalidHandler: formValidationInvalidHandler,
+ errorElement: "em",
+ errorPlacement: formValidationErrorPlacement,
+ success: formValidationSuccess,
+ highlight: formValidationHighlight,
+ unhighlight: formValidationUnhighlight
});
});
@@ -125,7 +128,8 @@
-
+
@@ -149,7 +153,7 @@
-
@@ -159,9 +163,15 @@
placeholder="${QUESTION_DESCRIPTION_LABEL}" />
-
-
-
+
+
+
+
+
+
+
+
+
Index: lams_tool_assessment/web/pages/authoring/parts/addordering.jsp
===================================================================
diff -u -ra0aa698e675b0a2eb89e51cf645156ade0f93d64 -r629116ce2b6bac35146c7b90b668dbc5f887eb69
--- lams_tool_assessment/web/pages/authoring/parts/addordering.jsp (.../addordering.jsp) (revision a0aa698e675b0a2eb89e51cf645156ade0f93d64)
+++ lams_tool_assessment/web/pages/authoring/parts/addordering.jsp (.../addordering.jsp) (revision 629116ce2b6bac35146c7b90b668dbc5f887eb69)
@@ -38,9 +38,6 @@
},
hasOptionFilled: "
"
},
- invalidHandler: formInvalidHandler,
- debug: true,
- errorClass: "alert alert-danger",
submitHandler: function(form) {
prepareOptionEditorsForAjaxSubmit();
$("#optionList").val($("#optionForm").serialize(true));
@@ -55,7 +52,13 @@
};
$('#assessmentQuestionForm').ajaxSubmit(options);
- }
+ },
+ invalidHandler: formValidationInvalidHandler,
+ errorElement: "em",
+ errorPlacement: formValidationErrorPlacement,
+ success: formValidationSuccess,
+ highlight: formValidationHighlight,
+ unhighlight: formValidationUnhighlight
});
});
@@ -68,7 +71,8 @@
-
+
@@ -91,7 +95,7 @@
-
@@ -101,7 +105,9 @@
placeholder="${QUESTION_DESCRIPTION_LABEL}" />
-
+
+
+
Index: lams_tool_assessment/web/pages/authoring/parts/addshortanswer.jsp
===================================================================
diff -u -ra0aa698e675b0a2eb89e51cf645156ade0f93d64 -r629116ce2b6bac35146c7b90b668dbc5f887eb69
--- lams_tool_assessment/web/pages/authoring/parts/addshortanswer.jsp (.../addshortanswer.jsp) (revision a0aa698e675b0a2eb89e51cf645156ade0f93d64)
+++ lams_tool_assessment/web/pages/authoring/parts/addshortanswer.jsp (.../addshortanswer.jsp) (revision 629116ce2b6bac35146c7b90b668dbc5f887eb69)
@@ -47,9 +47,6 @@
hasOptionFilled: "
",
hasOneHundredGrade: "
"
},
- invalidHandler: formInvalidHandler,
- debug: true,
- errorClass: "alert alert-danger",
submitHandler: function(form) {
prepareOptionEditorsForAjaxSubmit();
$("#optionList").val($("#optionForm").serialize(true));
@@ -62,7 +59,13 @@
};
$('#assessmentQuestionForm').ajaxSubmit(options);
- }
+ },
+ invalidHandler: formValidationInvalidHandler,
+ errorElement: "em",
+ errorPlacement: formValidationErrorPlacement,
+ success: formValidationSuccess,
+ highlight: formValidationHighlight,
+ unhighlight: formValidationUnhighlight
});
});
@@ -75,7 +78,8 @@
-
+
@@ -98,7 +102,7 @@
-
@@ -108,8 +112,12 @@
placeholder="${QUESTION_DESCRIPTION_LABEL}" />
-
-
+
+
+
+
+
+
Index: lams_tool_assessment/web/pages/authoring/parts/addtruefalse.jsp
===================================================================
diff -u -ra0aa698e675b0a2eb89e51cf645156ade0f93d64 -r629116ce2b6bac35146c7b90b668dbc5f887eb69
--- lams_tool_assessment/web/pages/authoring/parts/addtruefalse.jsp (.../addtruefalse.jsp) (revision a0aa698e675b0a2eb89e51cf645156ade0f93d64)
+++ lams_tool_assessment/web/pages/authoring/parts/addtruefalse.jsp (.../addtruefalse.jsp) (revision 629116ce2b6bac35146c7b90b668dbc5f887eb69)
@@ -5,6 +5,7 @@
<%@ include file="/common/header.jsp"%>
+
+
@@ -67,7 +72,8 @@
-
+
@@ -88,7 +94,7 @@
-
@@ -97,15 +103,16 @@
-
-
Index: lams_tool_assessment/web/pages/authoring/parts/optionlist.jsp
===================================================================
diff -u -ra0aa698e675b0a2eb89e51cf645156ade0f93d64 -r629116ce2b6bac35146c7b90b668dbc5f887eb69
--- lams_tool_assessment/web/pages/authoring/parts/optionlist.jsp (.../optionlist.jsp) (revision a0aa698e675b0a2eb89e51cf645156ade0f93d64)
+++ lams_tool_assessment/web/pages/authoring/parts/optionlist.jsp (.../optionlist.jsp) (revision 629116ce2b6bac35146c7b90b668dbc5f887eb69)
@@ -64,7 +64,9 @@
});
//init all toogles (required in case of adding/removing options)
- $("input[type='checkbox'][name='optionCorrect']").bootstrapToggle();
+ if (${questionType == 8}) {
+ $("input[type='checkbox'][name='optionCorrect']").bootstrapToggle();
+ }
});
//store which table is expanded