Index: lams_tool_lamc/conf/language/lams/ApplicationResources_en_AU.properties =================================================================== RCS file: /usr/local/cvsroot/lams_tool_lamc/conf/language/lams/ApplicationResources_en_AU.properties,v diff -u -r1.36 -r1.37 --- lams_tool_lamc/conf/language/lams/ApplicationResources_en_AU.properties 26 Jul 2013 12:36:07 -0000 1.36 +++ lams_tool_lamc/conf/language/lams/ApplicationResources_en_AU.properties 26 Jul 2013 16:10:44 -0000 1.37 @@ -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 =================================================================== RCS file: /usr/local/cvsroot/lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/web/McAction.java,v diff -u -r1.137 -r1.138 --- lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/web/McAction.java 24 Jul 2013 18:29:13 -0000 1.137 +++ lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/web/McAction.java 26 Jul 2013 16:10:44 -0000 1.138 @@ -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 =================================================================== RCS file: /usr/local/cvsroot/lams_tool_lamc/web/authoring/AuthoringTabsHolder.jsp,v diff -u -r1.11 -r1.12 --- lams_tool_lamc/web/authoring/AuthoringTabsHolder.jsp 24 Jul 2013 18:29:14 -0000 1.11 +++ lams_tool_lamc/web/authoring/AuthoringTabsHolder.jsp 26 Jul 2013 16:10:44 -0000 1.12 @@ -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 =================================================================== RCS file: /usr/local/cvsroot/lams_tool_lamc/web/authoring/editQuestionBox.jsp,v diff -u -r1.16 -r1.17 --- lams_tool_lamc/web/authoring/editQuestionBox.jsp 24 Jul 2013 18:29:14 -0000 1.16 +++ lams_tool_lamc/web/authoring/editQuestionBox.jsp 26 Jul 2013 16:10:44 -0000 1.17 @@ -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 =================================================================== RCS file: /usr/local/cvsroot/lams_tool_lamc/web/authoring/newQuestionBox.jsp,v diff -u -r1.16 -r1.17 --- lams_tool_lamc/web/authoring/newQuestionBox.jsp 24 Jul 2013 18:29:14 -0000 1.16 +++ lams_tool_lamc/web/authoring/newQuestionBox.jsp 26 Jul 2013 16:10:44 -0000 1.17 @@ -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; }