Index: lams_central/src/java/org/lamsfoundation/lams/web/qb/SearchQBController.java =================================================================== diff -u -r6ab5362f57823898853d4c3c61450504a1bc857c -rbcb806e82cb1d2f15b11791aeb5e8ff7335e0163 --- lams_central/src/java/org/lamsfoundation/lams/web/qb/SearchQBController.java (.../SearchQBController.java) (revision 6ab5362f57823898853d4c3c61450504a1bc857c) +++ lams_central/src/java/org/lamsfoundation/lams/web/qb/SearchQBController.java (.../SearchQBController.java) (revision bcb806e82cb1d2f15b11791aeb5e8ff7335e0163) @@ -105,8 +105,9 @@ questionTypesAvailable.append(QbQuestion.TYPE_MULTIPLE_CHOICE); questionTypesAvailable.append(","); questionTypesAvailable.append(QbQuestion.TYPE_VERY_SHORT_ANSWERS); + questionTypesAvailable.append(","); + questionTypesAvailable.append(QbQuestion.TYPE_MARK_HEDGING); - //CommonConstants.TOOL_SIGNATURE_SURVEY } else if ("lasurv11".equals(toolSignature)) { questionTypesAvailable.append(QbQuestion.TYPE_MULTIPLE_CHOICE); questionTypesAvailable.append(","); Index: lams_tool_scratchie/src/java/org/lamsfoundation/lams/tool/scratchie/model/ScratchieItem.java =================================================================== diff -u -rff37a5fb4bf9a24adde51ee67eb408f0790e128f -rbcb806e82cb1d2f15b11791aeb5e8ff7335e0163 --- lams_tool_scratchie/src/java/org/lamsfoundation/lams/tool/scratchie/model/ScratchieItem.java (.../ScratchieItem.java) (revision ff37a5fb4bf9a24adde51ee67eb408f0790e128f) +++ lams_tool_scratchie/src/java/org/lamsfoundation/lams/tool/scratchie/model/ScratchieItem.java (.../ScratchieItem.java) (revision bcb806e82cb1d2f15b11791aeb5e8ff7335e0163) @@ -85,7 +85,8 @@ if (optionDtos == null) { optionDtos = new LinkedList<>(); - if (QbQuestion.TYPE_MULTIPLE_CHOICE == this.qbQuestion.getType()) { + if (QbQuestion.TYPE_MULTIPLE_CHOICE == this.qbQuestion.getType() + || QbQuestion.TYPE_MARK_HEDGING == this.qbQuestion.getType()) { for (QbOption qbOption : qbQuestion.getQbOptions()) { OptionDTO optionDTO = new OptionDTO(qbOption); optionDtos.add(optionDTO); Index: lams_tool_scratchie/src/java/org/lamsfoundation/lams/tool/scratchie/service/ScratchieServiceImpl.java =================================================================== diff -u -r3eb8dcbf308a6b082c30d57f51e7000ebbe1c184 -rbcb806e82cb1d2f15b11791aeb5e8ff7335e0163 --- lams_tool_scratchie/src/java/org/lamsfoundation/lams/tool/scratchie/service/ScratchieServiceImpl.java (.../ScratchieServiceImpl.java) (revision 3eb8dcbf308a6b082c30d57f51e7000ebbe1c184) +++ lams_tool_scratchie/src/java/org/lamsfoundation/lams/tool/scratchie/service/ScratchieServiceImpl.java (.../ScratchieServiceImpl.java) (revision bcb806e82cb1d2f15b11791aeb5e8ff7335e0163) @@ -768,7 +768,8 @@ item.getUid()); for (OptionDTO optionDto : item.getOptionDtos()) { - if (QbQuestion.TYPE_MULTIPLE_CHOICE == qbQuestion.getType()) { + if (QbQuestion.TYPE_MULTIPLE_CHOICE == qbQuestion.getType() + || QbQuestion.TYPE_MARK_HEDGING == qbQuestion.getType()) { int attemptNumber; ScratchieAnswerVisitLog log = scratchieAnswerVisitDao.getLog(optionDto.getQbOptionUid(), item.getUid(), sessionId); @@ -824,7 +825,8 @@ // find according log if it exists boolean isScratched = false; - if (QbQuestion.TYPE_MULTIPLE_CHOICE == item.getQbQuestion().getType()) { + if (QbQuestion.TYPE_MULTIPLE_CHOICE == item.getQbQuestion().getType() + || QbQuestion.TYPE_MARK_HEDGING == item.getQbQuestion().getType()) { for (ScratchieAnswerVisitLog userLog : userLogs) { if (userLog.getQbToolQuestion().getUid().equals(item.getUid()) && userLog.getQbOption().getUid().equals(optionDto.getQbOptionUid())) { @@ -967,7 +969,8 @@ private static boolean isItemUnraveled(ScratchieItem item, List userLogs) { boolean isItemUnraveled = false; - if (QbQuestion.TYPE_MULTIPLE_CHOICE == item.getQbQuestion().getType()) { + if (QbQuestion.TYPE_MULTIPLE_CHOICE == item.getQbQuestion().getType() + || QbQuestion.TYPE_MARK_HEDGING == item.getQbQuestion().getType()) { for (QbOption option : item.getQbQuestion().getQbOptions()) { ScratchieAnswerVisitLog log = null; @@ -1065,7 +1068,8 @@ public List getGroupSummariesByItem(Long contentId, Long itemUid) { List groupSummaryList = new ArrayList<>(); ScratchieItem item = scratchieItemDao.getByUid(itemUid); - boolean isMcqItem = item.getQbQuestion().getType() == QbQuestion.TYPE_MULTIPLE_CHOICE; + boolean isMcqItem = item.getQbQuestion().getType() == QbQuestion.TYPE_MULTIPLE_CHOICE + || item.getQbQuestion().getType() == QbQuestion.TYPE_MARK_HEDGING; List options = item.getQbQuestion().getQbOptions(); List sessionList = scratchieSessionDao.getByContentId(contentId); @@ -1305,7 +1309,8 @@ */ public static void fillCorrectAnswerLetters(Collection items) { for (ScratchieItem item : items) { - boolean isMcqItem = item.getQbQuestion().getType() == QbQuestion.TYPE_MULTIPLE_CHOICE; + boolean isMcqItem = item.getQbQuestion().getType() == QbQuestion.TYPE_MULTIPLE_CHOICE + || item.getQbQuestion().getType() == QbQuestion.TYPE_MARK_HEDGING; // find out the correct answer's sequential letter - A,B,C... String correctAnswerLetter = ""; @@ -1583,7 +1588,8 @@ for (ScratchieItem item : items) { List itemSummary = getGroupSummariesByItem(contentId, item.getUid()); - boolean isMcqItem = item.getQbQuestion().getType() == QbQuestion.TYPE_MULTIPLE_CHOICE; + boolean isMcqItem = item.getQbQuestion().getType() == QbQuestion.TYPE_MULTIPLE_CHOICE + || item.getQbQuestion().getType() == QbQuestion.TYPE_MARK_HEDGING; row = researchAndAnalysisSheet.initRow(); row.addCell(getMessage("label.question.semicolon", new Object[] { item.getQbQuestion().getName() }), true); @@ -1698,7 +1704,8 @@ row.addCell(getMessage("label.team.leader") + session.getSessionName()); for (ScratchieItem item : items) { - boolean isMcqItem = item.getQbQuestion().getType() == QbQuestion.TYPE_MULTIPLE_CHOICE; + boolean isMcqItem = item.getQbQuestion().getType() == QbQuestion.TYPE_MULTIPLE_CHOICE + || item.getQbQuestion().getType() == QbQuestion.TYPE_MARK_HEDGING; //build list of all logs left for this item and this session List logsBySessionAndItem = new ArrayList<>(); @@ -1787,7 +1794,7 @@ for (ScratchieUser user : users) { int questionCount = 1; for (ScratchieItemDTO itemDto : summary.getItemDtos()) { - boolean isMcqItem = itemDto.getType() == QbQuestion.TYPE_MULTIPLE_CHOICE; + boolean isMcqItem = itemDto.getType() == QbQuestion.TYPE_MULTIPLE_CHOICE || itemDto.getType() == QbQuestion.TYPE_MARK_HEDGING; row = spssAnalysisSheet.initRow(); // learner name @@ -2043,7 +2050,8 @@ boolean isUnraveledOnFirstAttempt = false; String optionsSequence = ""; QbQuestion qbQuestion = item.getQbQuestion(); - boolean isMcqItem = qbQuestion.getType() == QbQuestion.TYPE_MULTIPLE_CHOICE; + boolean isMcqItem = qbQuestion.getType() == QbQuestion.TYPE_MULTIPLE_CHOICE + || qbQuestion.getType() == QbQuestion.TYPE_MARK_HEDGING; // if there is no group leader don't calculate numbers - there aren't any if (groupLeader != null) { Index: lams_tool_scratchie/src/java/org/lamsfoundation/lams/tool/scratchie/web/controller/AuthoringController.java =================================================================== diff -u -r24940cc694b5cab706055244b91904017b74ad54 -rbcb806e82cb1d2f15b11791aeb5e8ff7335e0163 --- lams_tool_scratchie/src/java/org/lamsfoundation/lams/tool/scratchie/web/controller/AuthoringController.java (.../AuthoringController.java) (revision 24940cc694b5cab706055244b91904017b74ad54) +++ lams_tool_scratchie/src/java/org/lamsfoundation/lams/tool/scratchie/web/controller/AuthoringController.java (.../AuthoringController.java) (revision bcb806e82cb1d2f15b11791aeb5e8ff7335e0163) @@ -370,7 +370,8 @@ form.setItemIndex(String.valueOf(itemIdx)); } form.setQuestionType(qbQuestion.getType()); - boolean isMcqQuestionType = qbQuestion.getType() == QbQuestion.TYPE_MULTIPLE_CHOICE; + boolean isMcqQuestionType = qbQuestion.getType() == QbQuestion.TYPE_MULTIPLE_CHOICE + || qbQuestion.getType() == QbQuestion.TYPE_MARK_HEDGING; if (!isMcqQuestionType) { form.setFeedback(qbQuestion.getFeedback()); form.setCaseSensitive(qbQuestion.isCaseSensitive()); @@ -519,7 +520,8 @@ qbQuestion.setDescription(form.getDescription().strip()); qbQuestion.setContentFolderId(form.getContentFolderID()); - boolean isMcqQuestionType = qbQuestion.getType() == QbQuestion.TYPE_MULTIPLE_CHOICE; + boolean isMcqQuestionType = qbQuestion.getType() == QbQuestion.TYPE_MULTIPLE_CHOICE + || qbQuestion.getType() == QbQuestion.TYPE_MARK_HEDGING; //handle VSA question type if (!isMcqQuestionType) { qbQuestion.setFeedback(form.getFeedback()); Index: lams_tool_scratchie/src/java/org/lamsfoundation/lams/tool/scratchie/web/controller/LearningWebsocketServer.java =================================================================== diff -u -ra34930f8fa7bcceb2f7849fb2f0f38966a674ec0 -rbcb806e82cb1d2f15b11791aeb5e8ff7335e0163 --- lams_tool_scratchie/src/java/org/lamsfoundation/lams/tool/scratchie/web/controller/LearningWebsocketServer.java (.../LearningWebsocketServer.java) (revision a34930f8fa7bcceb2f7849fb2f0f38966a674ec0) +++ lams_tool_scratchie/src/java/org/lamsfoundation/lams/tool/scratchie/web/controller/LearningWebsocketServer.java (.../LearningWebsocketServer.java) (revision bcb806e82cb1d2f15b11791aeb5e8ff7335e0163) @@ -170,9 +170,9 @@ } } - boolean isMCQItem = QbQuestion.TYPE_MULTIPLE_CHOICE == item.getQbQuestion().getType(); - String optionUidOrAnswer = isMCQItem - ? optionDto.getQbOptionUid().toString() + boolean isMCQItem = QbQuestion.TYPE_MULTIPLE_CHOICE == item.getQbQuestion().getType() + || QbQuestion.TYPE_MARK_HEDGING == item.getQbQuestion().getType(); + String optionUidOrAnswer = isMCQItem ? optionDto.getQbOptionUid().toString() : optionDto.getAnswer(); Boolean isCorrectStoredAnswer = optionDto.isCorrect(); Index: lams_tool_scratchie/web/pages/authoring/basic.jsp =================================================================== diff -u -r24940cc694b5cab706055244b91904017b74ad54 -rbcb806e82cb1d2f15b11791aeb5e8ff7335e0163 --- lams_tool_scratchie/web/pages/authoring/basic.jsp (.../basic.jsp) (revision 24940cc694b5cab706055244b91904017b74ad54) +++ lams_tool_scratchie/web/pages/authoring/basic.jsp (.../basic.jsp) (revision bcb806e82cb1d2f15b11791aeb5e8ff7335e0163) @@ -114,7 +114,7 @@ } function importQTI(type){ - window.open('questions/questionFile.jsp?limitType=mc&collectionChoice=true&importType='+type, + window.open('questions/questionFile.jsp?limitType=mc,mh,fb&collectionChoice=true&importType='+type, 'QuestionFile','width=500,height=370,scrollbars=yes'); } Index: lams_tool_scratchie/web/pages/authoring/parts/itemlist.jsp =================================================================== diff -u -rf7d36ce7691d8f97327c84e2b2a2eeaab203fa1d -rbcb806e82cb1d2f15b11791aeb5e8ff7335e0163 --- lams_tool_scratchie/web/pages/authoring/parts/itemlist.jsp (.../itemlist.jsp) (revision f7d36ce7691d8f97327c84e2b2a2eeaab203fa1d) +++ lams_tool_scratchie/web/pages/authoring/parts/itemlist.jsp (.../itemlist.jsp) (revision bcb806e82cb1d2f15b11791aeb5e8ff7335e0163) @@ -64,7 +64,7 @@ - + Index: lams_tool_scratchie/web/pages/learning/scratchies.jsp =================================================================== diff -u -rff2a65f961b0f2da0af4e9ed9a90abb284f165d8 -rbcb806e82cb1d2f15b11791aeb5e8ff7335e0163 --- lams_tool_scratchie/web/pages/learning/scratchies.jsp (.../scratchies.jsp) (revision ff2a65f961b0f2da0af4e9ed9a90abb284f165d8) +++ lams_tool_scratchie/web/pages/learning/scratchies.jsp (.../scratchies.jsp) (revision bcb806e82cb1d2f15b11791aeb5e8ff7335e0163) @@ -29,7 +29,7 @@ - + Index: lams_tool_scratchie/web/pages/monitoring/studentChoices.jsp =================================================================== diff -u -r67020b99c61ca2358e5e35753409866d2b700a1e -rbcb806e82cb1d2f15b11791aeb5e8ff7335e0163 --- lams_tool_scratchie/web/pages/monitoring/studentChoices.jsp (.../studentChoices.jsp) (revision 67020b99c61ca2358e5e35753409866d2b700a1e) +++ lams_tool_scratchie/web/pages/monitoring/studentChoices.jsp (.../studentChoices.jsp) (revision bcb806e82cb1d2f15b11791aeb5e8ff7335e0163) @@ -134,7 +134,7 @@ @@ -187,7 +187,7 @@ successful-responsewrong-response"> - + @@ -245,7 +245,7 @@ bg-success - + Index: lams_tool_scratchie/web/pages/tblmonitoring/tra.jsp =================================================================== diff -u -rff37a5fb4bf9a24adde51ee67eb408f0790e128f -rbcb806e82cb1d2f15b11791aeb5e8ff7335e0163 --- lams_tool_scratchie/web/pages/tblmonitoring/tra.jsp (.../tra.jsp) (revision ff37a5fb4bf9a24adde51ee67eb408f0790e128f) +++ lams_tool_scratchie/web/pages/tblmonitoring/tra.jsp (.../tra.jsp) (revision bcb806e82cb1d2f15b11791aeb5e8ff7335e0163) @@ -97,7 +97,7 @@ bg-success - +
- + ${item.correctAnswerLetter}
${ALPHABET[j.index]}.
${ALPHABET[j.index]}.