Index: lams_tool_lamc/conf/language/lams/ApplicationResources_en_AU.properties
===================================================================
diff -u -r494a9dd71dac07608a07f40aad1d6879b98a421b -r48edd349b40197dff421fa4b6f49f206ee6c91ff
--- lams_tool_lamc/conf/language/lams/ApplicationResources_en_AU.properties (.../ApplicationResources_en_AU.properties) (revision 494a9dd71dac07608a07f40aad1d6879b98a421b)
+++ lams_tool_lamc/conf/language/lams/ApplicationResources_en_AU.properties (.../ApplicationResources_en_AU.properties) (revision 48edd349b40197dff421fa4b6f49f206ee6c91ff)
@@ -130,6 +130,7 @@
feedback =Please address the following issues before submit.
error.questions.submitted.none =Please correct this: No questions have been submitted.
error.question.empty =Please correct this: The question text can not be empty.
+error.correct.answer.blank =Please correct this: Correct answer cannot be blank.
error.weights.empty =Please correct this: The question weights can not be empty.
error.checkBoxes.empty =Please correct this: No candidate answer has been selected.
error.weights.zero =Please correct this: The question weights can not be 0.
Index: lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/web/McAction.java
===================================================================
diff -u -r87ff0b33fa2d006a084b2ae9b7ff14d4c4be0f6d -r48edd349b40197dff421fa4b6f49f206ee6c91ff
--- lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/web/McAction.java (.../McAction.java) (revision 87ff0b33fa2d006a084b2ae9b7ff14d4c4be0f6d)
+++ lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/web/McAction.java (.../McAction.java) (revision 48edd349b40197dff421fa4b6f49f206ee6c91ff)
@@ -237,6 +237,8 @@
List attachmentList = (List) sessionMap.get(McAppConstants.ATTACHMENT_LIST_KEY);
List deletedAttachmentList = (List) sessionMap.get(McAppConstants.DELETED_ATTACHMENT_LIST_KEY);
+
+ saveAttachments(mcContent, attachmentList, deletedAttachmentList, mapping, request);
}
McUtils.setDefineLater(request, false, strToolContentID, mcService);
Index: lams_tool_lamc/web/authoring/AuthoringTabsHolder.jsp
===================================================================
diff -u -r87ff0b33fa2d006a084b2ae9b7ff14d4c4be0f6d -r48edd349b40197dff421fa4b6f49f206ee6c91ff
--- lams_tool_lamc/web/authoring/AuthoringTabsHolder.jsp (.../AuthoringTabsHolder.jsp) (revision 87ff0b33fa2d006a084b2ae9b7ff14d4c4be0f6d)
+++ lams_tool_lamc/web/authoring/AuthoringTabsHolder.jsp (.../AuthoringTabsHolder.jsp) (revision 48edd349b40197dff421fa4b6f49f206ee6c91ff)
@@ -40,9 +40,7 @@
function submitModifyAuthoringQuestion(questionIndexValue, actionMethod) {
document.McAuthoringForm.questionIndex.value=questionIndexValue;
- document.McAuthoringForm.dispatch.value=actionMethod;
- document.McAuthoringForm.theOfflineFile=null;
- document.McAuthoringForm.theOnlineFile=null;
+ document.McAuthoringForm.dispatch.value=actionMethod;
$('#authoringForm').ajaxSubmit({
target: $('#resourceListArea'),
Index: lams_tool_lamc/web/authoring/editQuestionBox.jsp
===================================================================
diff -u -r87ff0b33fa2d006a084b2ae9b7ff14d4c4be0f6d -r48edd349b40197dff421fa4b6f49f206ee6c91ff
--- lams_tool_lamc/web/authoring/editQuestionBox.jsp (.../editQuestionBox.jsp) (revision 87ff0b33fa2d006a084b2ae9b7ff14d4c4be0f6d)
+++ lams_tool_lamc/web/authoring/editQuestionBox.jsp (.../editQuestionBox.jsp) (revision 48edd349b40197dff421fa4b6f49f206ee6c91ff)
@@ -72,39 +72,32 @@
var singleCorrectEntry = 0;
var radioCorrect=document.McAuthoringForm.correct;
- if ((radioCorrect == 'null') || (radioCorrect == 'undefined'))
- {
+ if ((radioCorrect == 'null') || (radioCorrect == 'undefined')) {
var msg = "";
alert(msg);
return false;
}
var radioGroupSize=radioCorrect.length;
- if ((radioGroupSize == 'undefined') || (radioGroupSize < 2))
- {
+ if ((radioGroupSize == 'undefined') || (radioGroupSize < 2)) {
var msg = "";
alert(msg);
return false;
}
- for(i = 0; i < 51; i++)
- {
- if (radioCorrect[i] != null)
- {
- if ((typeof(radioCorrect[i]) != 'undefined') && (typeof(radioCorrect[i]) != null))
- {
- if (radioCorrect[i].checked)
- {
+ for(i = 0; i < 51; i++) {
+ if (radioCorrect[i] != null) {
+ if ((typeof(radioCorrect[i]) != 'undefined') && (typeof(radioCorrect[i]) != null)) {
+ if (radioCorrect[i].checked) {
singleCorrectEntry =1;
}
}
}
}
- if (singleCorrectEntry == 0)
- {
+ if (singleCorrectEntry == 0) {
var msg = "";
var msgSetFirst = "";
@@ -118,6 +111,15 @@
return false;
}
+
+ //verify selected radiobutton should not be blank
+ var selectedAnswerIndex = $('input[name=correct]:checked').val();
+ if (!$("textarea[name=ca" + selectedAnswerIndex + "]").val()) {
+ var msg = "";
+ alert(msg);
+ return false;
+ }
+
return true;
}
Index: lams_tool_lamc/web/authoring/newQuestionBox.jsp
===================================================================
diff -u -r87ff0b33fa2d006a084b2ae9b7ff14d4c4be0f6d -r48edd349b40197dff421fa4b6f49f206ee6c91ff
--- lams_tool_lamc/web/authoring/newQuestionBox.jsp (.../newQuestionBox.jsp) (revision 87ff0b33fa2d006a084b2ae9b7ff14d4c4be0f6d)
+++ lams_tool_lamc/web/authoring/newQuestionBox.jsp (.../newQuestionBox.jsp) (revision 48edd349b40197dff421fa4b6f49f206ee6c91ff)
@@ -69,23 +69,20 @@
var singleCorrectEntry = 0;
var radioCorrect=document.McAuthoringForm.correct;
- if ((radioCorrect == 'null') || (radioCorrect == 'undefined'))
- {
+ if ((radioCorrect == 'null') || (radioCorrect == 'undefined')) {
var msg = "";
alert(msg);
return false;
}
var radioGroupSize=radioCorrect.length;
- if ((radioGroupSize == 'undefined') || (radioGroupSize < 2))
- {
+ if ((radioGroupSize == 'undefined') || (radioGroupSize < 2)) {
var msg = "";
alert(msg);
return false;
}
- for(i = 0; i < 51; i++)
- {
+ for(i = 0; i < 51; i++) {
if (radioCorrect[i] != null)
{
if ((typeof(radioCorrect[i]) != 'undefined') && (typeof(radioCorrect[i]) != null))
@@ -98,8 +95,7 @@
}
}
- if (singleCorrectEntry == 0)
- {
+ if (singleCorrectEntry == 0) {
var msg = "";
var msgSetFirst = "";
alert(msg);
@@ -112,6 +108,15 @@
return false;
}
+
+ //verify selected radiobutton should not be blank
+ var selectedAnswerIndex = $('input[name=correct]:checked').val();
+ if (!$("textarea[name=ca" + selectedAnswerIndex + "]").val()) {
+ var msg = "";
+ alert(msg);
+ return false;
+ }
+
return true;
}