Index: lams_build/lib/lams/lams-central.jar =================================================================== diff -u -raa9051146a2c7e16c12ccb68a00595bc79fb2e78 -r5949a49ec6308dfce3ac7c88808da019f8260c76 Binary files differ Index: lams_central/conf/language/lams/ApplicationResources.properties =================================================================== diff -u -r745a83e98c2aca53c53d7481711467a3dbe1ec53 -r5949a49ec6308dfce3ac7c88808da019f8260c76 --- lams_central/conf/language/lams/ApplicationResources.properties (.../ApplicationResources.properties) (revision 745a83e98c2aca53c53d7481711467a3dbe1ec53) +++ lams_central/conf/language/lams/ApplicationResources.properties (.../ApplicationResources.properties) (revision 5949a49ec6308dfce3ac7c88808da019f8260c76) @@ -840,11 +840,11 @@ authoring.error.application.exercise.not.blank.and.grade=Application Exercise {0} may not be blank and must have a grade. authoring.label.grade=Grade authoring.label.none=None - +authoring.enable.confidence.levels=Enable confidence levels #=================== Specific to Team Based Learning (TBL) =========================# authoring.tbl.template.title=Team Based Learning authoring.tbl.template.description=Individual and Team Readiness Assessments followed by Application Exercises. -authoring.tbl.desc.question=These questions are for iRA and tRA. Click "Create Question" to add more questions. +authoring.tbl.desc.question=These questions are for iRA and tRA. Click "Create Question" to add more questions. Turn on "Enable confidence levels" to have the learners' confidence levels from the iRA shown on the tRA screen. authoring.tbl.desc.ae=State the questions for AE. Click "Create Question" to add more questions. Index: lams_central/conf/language/lams/ApplicationResources_en_AU.properties =================================================================== diff -u -r745a83e98c2aca53c53d7481711467a3dbe1ec53 -r5949a49ec6308dfce3ac7c88808da019f8260c76 --- lams_central/conf/language/lams/ApplicationResources_en_AU.properties (.../ApplicationResources_en_AU.properties) (revision 745a83e98c2aca53c53d7481711467a3dbe1ec53) +++ lams_central/conf/language/lams/ApplicationResources_en_AU.properties (.../ApplicationResources_en_AU.properties) (revision 5949a49ec6308dfce3ac7c88808da019f8260c76) @@ -844,7 +844,7 @@ #=================== Specific to Team Based Learning (TBL) =========================# authoring.tbl.template.title=Team Based Learning authoring.tbl.template.description=Individual and Team Readiness Assessments followed by Application Exercises. -authoring.tbl.desc.question=These questions are for iRA and tRA. Click "Create Question" to add more questions. +authoring.tbl.desc.question=These questions are for iRA and tRA. Click "Create Question" to add more questions. Turn on "Enable confidence levels" to have the learners' confidence levels from the iRA shown on the tRA screen. authoring.tbl.desc.ae=State the questions for AE. Click "Create Question" to add more questions. Index: lams_central/src/java/org/lamsfoundation/lams/authoring/template/web/LdTemplateAction.java =================================================================== diff -u -rba6d2394558dc6e82f56561d0913c9e75d000e89 -r5949a49ec6308dfce3ac7c88808da019f8260c76 --- lams_central/src/java/org/lamsfoundation/lams/authoring/template/web/LdTemplateAction.java (.../LdTemplateAction.java) (revision ba6d2394558dc6e82f56561d0913c9e75d000e89) +++ lams_central/src/java/org/lamsfoundation/lams/authoring/template/web/LdTemplateAction.java (.../LdTemplateAction.java) (revision 5949a49ec6308dfce3ac7c88808da019f8260c76) @@ -938,11 +938,12 @@ * details of questions). Other fields are optional. */ protected Long createMCQToolContent(UserDTO user, String title, String instructions, - boolean useSelectLeaderToolOuput, JSONArray questions) throws JSONException, HttpException, IOException { + boolean useSelectLeaderToolOuput, boolean enableConfidenceLevel, JSONArray questions) throws JSONException, HttpException, IOException { JSONObject toolContentJSON = createStandardToolContent(title, instructions, null, null, null, null); toolContentJSON.put(RestTags.USE_SELECT_LEADER_TOOL_OUTPUT, useSelectLeaderToolOuput); toolContentJSON.put(RestTags.QUESTIONS, questions); + toolContentJSON.put(RestTags.ENABLE_CONFIDENCE_LEVELS, enableConfidenceLevel); return createToolContent(user, LdTemplateAction.MCQ_TOOL_SIGNATURE, toolContentJSON); } @@ -1087,10 +1088,13 @@ * full details of questions). Other fields are optional. */ protected Long createScratchieToolContent(UserDTO user, String title, String instructions, - boolean useSelectLeaderToolOuput, JSONArray questions) throws JSONException, HttpException, IOException { + boolean useSelectLeaderToolOuput, Integer confidenceLevelsActivityUiid, JSONArray questions) throws JSONException, HttpException, IOException { JSONObject toolContentJSON = createStandardToolContent(title, instructions, null, null, null, null); toolContentJSON.put(RestTags.QUESTIONS, questions); + if ( confidenceLevelsActivityUiid != null ) { + toolContentJSON.put(RestTags.CONFIDENCE_LEVELS_ACTIVITY_UIID, confidenceLevelsActivityUiid); + } return createToolContent(user, LdTemplateAction.SCRATCHIE_TOOL_SIGNATURE, toolContentJSON); } Index: lams_central/src/java/org/lamsfoundation/lams/authoring/template/web/TBLTemplateAction.java =================================================================== diff -u -rc148af7949c12a848970a306c7571398f074803f -r5949a49ec6308dfce3ac7c88808da019f8260c76 --- lams_central/src/java/org/lamsfoundation/lams/authoring/template/web/TBLTemplateAction.java (.../TBLTemplateAction.java) (revision c148af7949c12a848970a306c7571398f074803f) +++ lams_central/src/java/org/lamsfoundation/lams/authoring/template/web/TBLTemplateAction.java (.../TBLTemplateAction.java) (revision 5949a49ec6308dfce3ac7c88808da019f8260c76) @@ -47,6 +47,7 @@ import org.lamsfoundation.lams.authoring.template.TemplateData; import org.lamsfoundation.lams.rest.RestTags; import org.lamsfoundation.lams.usermanagement.dto.UserDTO; +import org.lamsfoundation.lams.util.AuthoringJsonTags; import org.lamsfoundation.lams.util.WebUtil; import org.lamsfoundation.lams.web.session.SessionManager; import org.lamsfoundation.lams.web.util.AttributeNames; @@ -116,9 +117,11 @@ currentActivityPosition = calcPositionNextRight(currentActivityPosition); activityTitle = data.getText("boilerplate.ira.title"); Long iRAToolContentId = createMCQToolContent(userDTO, activityTitle, - data.getText("boilerplate.ira.instructions"), false, new JSONArray(data.testQuestions.values())); - activities.put(createMCQActivity(maxUIID, order++, currentActivityPosition, iRAToolContentId, - data.contentFolderID, groupingUIID, null, null, activityTitle)); + data.getText("boilerplate.ira.instructions"), false, data.confidenceLevelEnable, + new JSONArray(data.testQuestions.values())); + JSONObject iraActivityJSON = createMCQActivity(maxUIID, order++, currentActivityPosition, iRAToolContentId, + data.contentFolderID, groupingUIID, null, null, activityTitle); + activities.put(iraActivityJSON); // Stop! currentActivityPosition = calcPositionNextRight(currentActivityPosition); @@ -135,8 +138,11 @@ // tRA Test currentActivityPosition = calcPositionNextRight(firstActivityInRowPosition); activityTitle = data.getText("boilerplate.tra.title"); + Integer confidenceLevelsActivityUIID = data.confidenceLevelEnable + ? iraActivityJSON.getInt(AuthoringJsonTags.ACTIVITY_UIID) : null; Long tRAToolContentId = createScratchieToolContent(userDTO, activityTitle, - data.getText("boilerplate.tra.instructions"), false, new JSONArray(data.testQuestions.values())); + data.getText("boilerplate.tra.instructions"), false, confidenceLevelsActivityUIID, + new JSONArray(data.testQuestions.values())); activities.put(createScratchieActivity(maxUIID, order++, currentActivityPosition, tRAToolContentId, data.contentFolderID, groupingUIID, null, null, activityTitle)); @@ -220,6 +226,7 @@ Integer numLearners; Integer numGroups; SortedMap testQuestions; + boolean confidenceLevelEnable; SortedMap applicationExercises; SortedMap peerReviewCriteria; @@ -269,6 +276,7 @@ processInputPeerReviewRequestField(name, request); } } + confidenceLevelEnable = WebUtil.readBooleanParam(request, "confidenceLevelEnable", false); updateCorrectAnswers(correctAnswers); Index: lams_central/src/java/org/lamsfoundation/lams/rest/RestTags.java =================================================================== diff -u -r51fb2a37254f24bb2a805d4ffd54482c779f43fa -r5949a49ec6308dfce3ac7c88808da019f8260c76 --- lams_central/src/java/org/lamsfoundation/lams/rest/RestTags.java (.../RestTags.java) (revision 51fb2a37254f24bb2a805d4ffd54482c779f43fa) +++ lams_central/src/java/org/lamsfoundation/lams/rest/RestTags.java (.../RestTags.java) (revision 5949a49ec6308dfce3ac7c88808da019f8260c76) @@ -53,6 +53,8 @@ public static String USE_SELECT_LEADER_TOOL_OUTPUT = "useSelectLeaderToolOuput"; public static String MINIMUM_RATES = "minimumRates"; public static String MAXIMUM_RATES = "maximumRates"; + public static String ENABLE_CONFIDENCE_LEVELS = "enableConfidenceLevels"; + public static String CONFIDENCE_LEVELS_ACTIVITY_UIID = "confidenceLevelsActivityUiid"; public static String QUESTIONS = "questions"; public static String QUESTION_TEXT = "questionText"; Index: lams_central/web/authoring/template/tbl/tbl.jsp =================================================================== diff -u -rba6d2394558dc6e82f56561d0913c9e75d000e89 -r5949a49ec6308dfce3ac7c88808da019f8260c76 --- lams_central/web/authoring/template/tbl/tbl.jsp (.../tbl.jsp) (revision ba6d2394558dc6e82f56561d0913c9e75d000e89) +++ lams_central/web/authoring/template/tbl/tbl.jsp (.../tbl.jsp) (revision 5949a49ec6308dfce3ac7c88808da019f8260c76) @@ -109,7 +109,14 @@
- + +
+ +
+
Index: lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/service/McService.java =================================================================== diff -u -re385399d7e2c968aa2df352218c7d64b876c52d7 -r5949a49ec6308dfce3ac7c88808da019f8260c76 --- lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/service/McService.java (.../McService.java) (revision e385399d7e2c968aa2df352218c7d64b876c52d7) +++ lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/service/McService.java (.../McService.java) (revision 5949a49ec6308dfce3ac7c88808da019f8260c76) @@ -1941,7 +1941,7 @@ mcq.setShowMarks(JsonUtil.opt(toolContentJSON, "showMarks", Boolean.FALSE)); mcq.setPrefixAnswersWithLetters(JsonUtil.opt(toolContentJSON, "prefixAnswersWithLetters", Boolean.TRUE)); mcq.setPassMark(JsonUtil.opt(toolContentJSON, "passMark", 0)); - mcq.setEnableConfidenceLevels(JsonUtil.opt(toolContentJSON, "enableConfidenceLevels", Boolean.FALSE)); + mcq.setEnableConfidenceLevels(JsonUtil.opt(toolContentJSON, RestTags.ENABLE_CONFIDENCE_LEVELS, Boolean.FALSE)); // submissionDeadline is set in monitoring createMc(mcq); Index: lams_tool_scratchie/src/java/org/lamsfoundation/lams/tool/scratchie/service/ScratchieServiceImpl.java =================================================================== diff -u -reef0b919074e388a593fb6d3e97ec35b60ffdcb5 -r5949a49ec6308dfce3ac7c88808da019f8260c76 --- lams_tool_scratchie/src/java/org/lamsfoundation/lams/tool/scratchie/service/ScratchieServiceImpl.java (.../ScratchieServiceImpl.java) (revision eef0b919074e388a593fb6d3e97ec35b60ffdcb5) +++ lams_tool_scratchie/src/java/org/lamsfoundation/lams/tool/scratchie/service/ScratchieServiceImpl.java (.../ScratchieServiceImpl.java) (revision 5949a49ec6308dfce3ac7c88808da019f8260c76) @@ -2275,6 +2275,7 @@ scratchie.setReflectOnActivity(JsonUtil.opt(toolContentJSON, RestTags.REFLECT_ON_ACTIVITY, Boolean.FALSE)); scratchie.setReflectInstructions(JsonUtil.opt(toolContentJSON, RestTags.REFLECT_INSTRUCTIONS, (String) null)); scratchie.setShowScrachiesInResults(JsonUtil.opt(toolContentJSON, "showScrachiesInResults", Boolean.TRUE)); + scratchie.setConfidenceLevelsActivityUiid(JsonUtil.opt(toolContentJSON, RestTags.CONFIDENCE_LEVELS_ACTIVITY_UIID, (Integer) null)); // Scratchie Items Set newItems = new LinkedHashSet<>();