Index: lams_central/conf/language/lams/ApplicationResources_en_AU.properties =================================================================== diff -u -rcf258bae4dd72eab7a6f5bc895b96966caafaf06 -r0f85998fe3695d15ad685d2564e0b12f331f5b7d --- lams_central/conf/language/lams/ApplicationResources_en_AU.properties (.../ApplicationResources_en_AU.properties) (revision cf258bae4dd72eab7a6f5bc895b96966caafaf06) +++ lams_central/conf/language/lams/ApplicationResources_en_AU.properties (.../ApplicationResources_en_AU.properties) (revision 0f85998fe3695d15ad685d2564e0b12f331f5b7d) @@ -1073,6 +1073,7 @@ label.authoring.feeback.correct = Feedback on any correct response label.authoring.feeback.partially.correct = Feedback on any partially correct response label.authoring.feeback.incorrect = Feedback on any incorrect response +error.ld.zip.file = Only zip files allowed label.choose.word.document =Choose Word file label.import.word =Import questions from Word document Index: lams_central/web/includes/javascript/authoring/authoringActivity.js =================================================================== diff -u -rad1ff0d36bbc9744c0e0e61aec07c9360faee906 -r0f85998fe3695d15ad685d2564e0b12f331f5b7d --- lams_central/web/includes/javascript/authoring/authoringActivity.js (.../authoringActivity.js) (revision ad1ff0d36bbc9744c0e0e61aec07c9360faee906) +++ lams_central/web/includes/javascript/authoring/authoringActivity.js (.../authoringActivity.js) (revision 0f85998fe3695d15ad685d2564e0b12f331f5b7d) @@ -1500,38 +1500,16 @@ }); }, - + /** * Open separate window with activity authoring on double click. */ openActivityAuthoring : function(activity){ - // fetch authoring URL for a Tool Activity - if (!activity.authorURL && activity.toolID) { - $.ajax({ - async : true, - cache : false, - url : LAMS_URL + "authoring/createToolContent.do", - dataType : 'json', - data : { - 'toolID' : activity.toolID, - // if toolContentID exists, a new content will not be created, only authorURL will be fetched - 'toolContentID' : activity.toolContentID, - 'contentFolderID' : layout.ld.contentFolderID - }, - success : function(response) { - activity.authorURL = response.authorURL; - if (!activity.toolContentID) { - activity.toolContentID = response.toolContentID; - } - if (!layout.ld.contentFolderID) { - // if LD did not have contentFolderID, it was just generated - // so remember it - layout.ld.contentFolderID = response.contentFolderID; - } - } - }); + if (activity.isAuthoringOpening) { + return; } + activity.isAuthoringOpening = true; if (activity.authorURL) { var dialogID = "dialogActivity" + activity.toolContentID; showDialog(dialogID, { @@ -1568,12 +1546,51 @@ }, true); GeneralLib.setModified(true); + activity.isAuthoringOpening = false; + return; } + + // if there is no authoring URL, fetch it for a Tool Activity + if (activity.toolID) { + $.ajax({ + async : true, + cache : false, + url : LAMS_URL + "authoring/createToolContent.do", + dataType : 'json', + data : { + 'toolID' : activity.toolID, + // if toolContentID exists, a new content will not be created, only authorURL will be fetched + 'toolContentID' : activity.toolContentID, + 'contentFolderID' : layout.ld.contentFolderID + }, + success : function(response) { + // make sure that response contains valid data + if (response.authorURL) { + activity.authorURL = response.authorURL; + activity.toolContentID = response.toolContentID; + // the response should always return a correct content folder ID, + // but just to make sure use it only when it is needed + if (!layout.ld.contentFolderID) { + layout.ld.contentFolderID = response.contentFolderID; + } + + activity.isAuthoringOpening = false; + // this time open it properly + ActivityLib.openActivityAuthoring(activity); + } + }, + complete : function(){ + activity.isAuthoringOpening = false; + } + }); + } else { + activity.isAuthoringOpening = false; + } }, /** - * Draw each of activity's inboud and outbound transitions again. + * Draw each of activity's inbound and outbound transitions again. */ redrawTransitions : function(activity) { if (activity.transitions) { Index: lams_monitoring/web/tblmonitor/tblmonitor.jsp =================================================================== diff -u -rcf258bae4dd72eab7a6f5bc895b96966caafaf06 -r0f85998fe3695d15ad685d2564e0b12f331f5b7d --- lams_monitoring/web/tblmonitor/tblmonitor.jsp (.../tblmonitor.jsp) (revision cf258bae4dd72eab7a6f5bc895b96966caafaf06) +++ lams_monitoring/web/tblmonitor/tblmonitor.jsp (.../tblmonitor.jsp) (revision 0f85998fe3695d15ad685d2564e0b12f331f5b7d) @@ -54,16 +54,18 @@ // refresh automatically every X seconds window.setInterval(function(){ - loadTab(null, null, true); + refresh(true); }, TAB_REFRESH_INTERVAL); }); function loadTab(method, toolContentID, autoRefresh) { if (!method && !toolContentID) { // tab was refreshed, get stored parameters method = lastTabMethod; - if (autoRefresh && (method == 'burningQuestions' || method == 'aes' || method == 'aesStudentChoices')) { + + if (autoRefresh && (method == 'burningQuestions' || method == 'aes' || method == 'aesStudentChoices' || method == 'sequence' || $('.modal').hasClass('in'))){ // do not auto refresh Burning Questions nor AES tabs + // or if a modal dialog is open return; } @@ -154,8 +156,8 @@ }, 100); } - function refresh() { - loadTab(); + function refresh(autoRefresh) { + loadTab(null, null, autoRefresh); } function switchToRegularMonitor() { Index: lams_tool_assessment/conf/language/lams/ApplicationResources_en_AU.properties =================================================================== diff -u -rcf258bae4dd72eab7a6f5bc895b96966caafaf06 -r0f85998fe3695d15ad685d2564e0b12f331f5b7d --- lams_tool_assessment/conf/language/lams/ApplicationResources_en_AU.properties (.../ApplicationResources_en_AU.properties) (revision cf258bae4dd72eab7a6f5bc895b96966caafaf06) +++ lams_tool_assessment/conf/language/lams/ApplicationResources_en_AU.properties (.../ApplicationResources_en_AU.properties) (revision 0f85998fe3695d15ad685d2564e0b12f331f5b7d) @@ -311,7 +311,7 @@ label.no.question.references = No questions have been added to the question list. Do you still want to proceed with no questions? label.hide.name.column = Hide name column label.ae.questions.marks = AE Questions & Marks -label.ira.questions.marks = iRA Questions & Marks +label.ira.questions.marks = iRAT Questions & Marks label.attendance = Attendance label.show.students.choices = Show students' choices label.hide.students.choices = Hide students' choices @@ -405,6 +405,10 @@ label.comment.textarea.tip = Type your comment here then click on the green tick error.resource.image.comment.blank = Comment can not be blank. label.student.choices = Student's choices +message.disclose.correct.answers = Please confirm that you want to disclose the correct answer for this question. Note that after you confirm this, this action cannot be reversed. Are you sure you want to do this? +message.disclose.groups.answers = Please confirm that you want to disclose the groups' answers for this question. Note that after you confirm this, this action cannot be reversed. Are you sure you want to do this? +message.disclose.all.correct.answers = Please confirm that you want to disclose ALL the correct answers for ALL questions. Note that after you confirm this, this action cannot be reversed. Are you sure you want to do this? +message.disclose.all.groups.answers = Please confirm that you want to disclose the answers of ALL groups for ALL the questions. Note that after you confirm this, this action cannot be reversed. Are you sure you want to do this? label.export.marks.mcq =Export marks for MCQ questions label.not.available =N/A Index: lams_tool_assessment/src/java/org/lamsfoundation/lams/tool/assessment/service/AssessmentServiceImpl.java =================================================================== diff -u -rcf258bae4dd72eab7a6f5bc895b96966caafaf06 -r0f85998fe3695d15ad685d2564e0b12f331f5b7d --- lams_tool_assessment/src/java/org/lamsfoundation/lams/tool/assessment/service/AssessmentServiceImpl.java (.../AssessmentServiceImpl.java) (revision cf258bae4dd72eab7a6f5bc895b96966caafaf06) +++ lams_tool_assessment/src/java/org/lamsfoundation/lams/tool/assessment/service/AssessmentServiceImpl.java (.../AssessmentServiceImpl.java) (revision 0f85998fe3695d15ad685d2564e0b12f331f5b7d) @@ -3090,7 +3090,8 @@ } @Override - public void replaceQuestions(long toolContentId, String newActivityName, List newQuestions) { + public List replaceQuestions(long toolContentId, String newActivityName, + List newQuestions) { Assessment assessment = getAssessmentByContentId(toolContentId); if (newActivityName != null) { assessment.setTitle(newActivityName); @@ -3110,15 +3111,17 @@ // this is needed, otherwise Hibernate wants to re-save the deleted Assessment questions assessment.getQuestions().clear(); + List result = new ArrayList<>(newQuestions.size()); // populate Assessment with new questions and references int displayOrder = 1; for (QbQuestion qbQuestion : newQuestions) { AssessmentQuestion assessmentQuestion = new AssessmentQuestion(); - assessmentQuestion.setDisplayOrder(displayOrder++); + assessmentQuestion.setDisplayOrder(displayOrder); assessmentQuestion.setQbQuestion(qbQuestion); assessmentQuestion.setToolContentId(toolContentId); assessmentQuestionDao.insert(assessmentQuestion); assessment.getQuestions().add(assessmentQuestion); + result.add(assessmentQuestion); QuestionReference questionReference = new QuestionReference(); questionReference.setQuestion(assessmentQuestion); @@ -3129,6 +3132,8 @@ displayOrder++; } assessmentDao.update(assessment); + + return result; } // ***************************************************************************** // private methods Index: lams_tool_assessment/web/pages/monitoring/summary.jsp =================================================================== diff -u -rcf258bae4dd72eab7a6f5bc895b96966caafaf06 -r0f85998fe3695d15ad685d2564e0b12f331f5b7d --- lams_tool_assessment/web/pages/monitoring/summary.jsp (.../summary.jsp) (revision cf258bae4dd72eab7a6f5bc895b96966caafaf06) +++ lams_tool_assessment/web/pages/monitoring/summary.jsp (.../summary.jsp) (revision 0f85998fe3695d15ad685d2564e0b12f331f5b7d) @@ -212,6 +212,10 @@ // ajax calls to disclose correct/groups answers correctButton.click(function(){ + if (!confirm("")) { + return; + }; + $.ajax({ type: 'POST', 'url' : 'monitoring/discloseCorrectAnswers.do?', @@ -226,6 +230,10 @@ }); groupsButton.click(function(){ + if (!confirm("")) { + return; + }; + $.ajax({ type: 'POST', 'url' : 'monitoring/discloseGroupsAnswers.do?', @@ -240,6 +248,10 @@ }); correctAllButton.click(function(){ + if (!confirm("")) { + return; + }; + $('option[correctDisclosed="false"]', questionUidSelect).each(function(){ var option = $(this), questionUid = option.val(); @@ -261,6 +273,10 @@ }); groupsAllButton.click(function(){ + if (!confirm("")) { + return; + }; + $('option[groupsDisclosed="false"]', questionUidSelect).each(function(){ var option = $(this), questionUid = option.val(); @@ -761,9 +777,11 @@ - - - + + + + + @@ -775,12 +793,14 @@ - - -   - - - + + + +   + + + + Index: lams_tool_scratchie/src/java/org/lamsfoundation/lams/tool/scratchie/web/controller/AuthoringController.java =================================================================== diff -u -rcf258bae4dd72eab7a6f5bc895b96966caafaf06 -r0f85998fe3695d15ad685d2564e0b12f331f5b7d --- lams_tool_scratchie/src/java/org/lamsfoundation/lams/tool/scratchie/web/controller/AuthoringController.java (.../AuthoringController.java) (revision cf258bae4dd72eab7a6f5bc895b96966caafaf06) +++ lams_tool_scratchie/src/java/org/lamsfoundation/lams/tool/scratchie/web/controller/AuthoringController.java (.../AuthoringController.java) (revision 0f85998fe3695d15ad685d2564e0b12f331f5b7d) @@ -65,6 +65,8 @@ import org.lamsfoundation.lams.tool.scratchie.web.form.ScratchiePedagogicalPlannerForm; import org.lamsfoundation.lams.usermanagement.service.IUserManagementService; import org.lamsfoundation.lams.util.CommonConstants; +import org.lamsfoundation.lams.util.Configuration; +import org.lamsfoundation.lams.util.ConfigurationKeys; import org.lamsfoundation.lams.util.FileUtil; import org.lamsfoundation.lams.util.MessageService; import org.lamsfoundation.lams.util.WebUtil; @@ -206,6 +208,10 @@ } sessionMap.put(AttributeNames.ATTR_MODE, mode); sessionMap.put(ScratchieConstants.ATTR_RESOURCE_FORM, authoringForm); + + boolean questionEtherpadEnabled = StringUtils.isNotBlank(Configuration.get(ConfigurationKeys.ETHERPAD_API_KEY)); + sessionMap.put(ScratchieConstants.ATTR_IS_QUESTION_ETHERPAD_ENABLED, questionEtherpadEnabled); + return "pages/authoring/start"; } Index: lams_tool_scratchie/web/pages/authoring/parts/itemlist.jsp =================================================================== diff -u -rcf258bae4dd72eab7a6f5bc895b96966caafaf06 -r0f85998fe3695d15ad685d2564e0b12f331f5b7d --- lams_tool_scratchie/web/pages/authoring/parts/itemlist.jsp (.../itemlist.jsp) (revision cf258bae4dd72eab7a6f5bc895b96966caafaf06) +++ lams_tool_scratchie/web/pages/authoring/parts/itemlist.jsp (.../itemlist.jsp) (revision 0f85998fe3695d15ad685d2564e0b12f331f5b7d) @@ -108,7 +108,7 @@ - + ?sessionMapID=${sessionMapID}&itemIndex=${status.index}&KeepThis=true&TB_iframe=true&modal=true