Index: lams_tool_assessment/src/java/org/lamsfoundation/lams/tool/assessment/web/controller/AuthoringController.java =================================================================== diff -u -r8eefd9a2f57ce5b05eb75908e36bb042c5fe7fce -re7f6df71275535cf4af43f3ff4479a8c58e0be50 --- lams_tool_assessment/src/java/org/lamsfoundation/lams/tool/assessment/web/controller/AuthoringController.java (.../AuthoringController.java) (revision 8eefd9a2f57ce5b05eb75908e36bb042c5fe7fce) +++ lams_tool_assessment/src/java/org/lamsfoundation/lams/tool/assessment/web/controller/AuthoringController.java (.../AuthoringController.java) (revision e7f6df71275535cf4af43f3ff4479a8c58e0be50) @@ -545,10 +545,10 @@ */ @SuppressWarnings("unchecked") @RequestMapping(value = "/importQbQuestion", method = RequestMethod.POST) - private String importQbQuestion(HttpServletRequest request, @RequestParam Long qbQuestionUid) { + private String importQbQuestion(HttpServletRequest request, @RequestParam String sessionMapID, + @RequestParam Long qbQuestionUid) { //TODO perform updateQuestionReferencesMaxMarks prior to runnning this method - String sessionMapID = WebUtil.readStrParam(request, AssessmentConstants.ATTR_SESSION_MAP_ID); SessionMap sessionMap = (SessionMap) request.getSession() .getAttribute(sessionMapID); QbQuestion qbQuestion = qbService.getQuestionByUid(qbQuestionUid); Index: lams_tool_assessment/web/pages/authoring/basic.jsp =================================================================== diff -u -r6cbd849584c40532c6be292f9f009c88cde9439c -re7f6df71275535cf4af43f3ff4479a8c58e0be50 --- lams_tool_assessment/web/pages/authoring/basic.jsp (.../basic.jsp) (revision 6cbd849584c40532c6be292f9f009c88cde9439c) +++ lams_tool_assessment/web/pages/authoring/basic.jsp (.../basic.jsp) (revision e7f6df71275535cf4af43f3ff4479a8c58e0be50) @@ -27,13 +27,6 @@ //load question bank div $('#question-bank-collapse').on('show.bs.collapse', function () { - - - ?sessionMapID=${sessionMapID} - - - - $('#question-bank-collapse.contains-nothing').load( "/searchQB/start.do", { Index: lams_tool_scratchie/conf/language/lams/ApplicationResources_en_AU.properties =================================================================== diff -u -r394f403c289f0fd7808c228840bead5c4e7d5d32 -re7f6df71275535cf4af43f3ff4479a8c58e0be50 --- lams_tool_scratchie/conf/language/lams/ApplicationResources_en_AU.properties (.../ApplicationResources_en_AU.properties) (revision 394f403c289f0fd7808c228840bead5c4e7d5d32) +++ lams_tool_scratchie/conf/language/lams/ApplicationResources_en_AU.properties (.../ApplicationResources_en_AU.properties) (revision e7f6df71275535cf4af43f3ff4479a8c58e0be50) @@ -229,6 +229,6 @@ outcome.authoring.existing =Added outcomes outcome.authoring.existing.none =none outcome.authoring.remove.confirm =Are you sure you want to remove this learning outcome? +label.question.bank =Question bank - #======= End labels: Exported 224 labels for en AU ===== Index: lams_tool_scratchie/src/java/org/lamsfoundation/lams/tool/scratchie/web/controller/AuthoringController.java =================================================================== diff -u -rd709559abc2186520af2f18c3fc7417a5a598e9e -re7f6df71275535cf4af43f3ff4479a8c58e0be50 --- lams_tool_scratchie/src/java/org/lamsfoundation/lams/tool/scratchie/web/controller/AuthoringController.java (.../AuthoringController.java) (revision d709559abc2186520af2f18c3fc7417a5a598e9e) +++ lams_tool_scratchie/src/java/org/lamsfoundation/lams/tool/scratchie/web/controller/AuthoringController.java (.../AuthoringController.java) (revision e7f6df71275535cf4af43f3ff4479a8c58e0be50) @@ -72,6 +72,7 @@ import org.springframework.web.bind.annotation.ModelAttribute; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.RequestParam; /** * @author Andrey Balan @@ -102,28 +103,23 @@ } @RequestMapping("/definelater") - private String definelater(@ModelAttribute("authoringForm") ScratchieForm authoringForm, HttpServletRequest request) - throws ServletException { + private String definelater(@ModelAttribute("authoringForm") ScratchieForm authoringForm, HttpServletRequest request, + @RequestParam Long toolContentID) throws ServletException { // update define later flag to true - Long contentId = new Long(WebUtil.readLongParam(request, AttributeNames.PARAM_TOOL_CONTENT_ID)); - Scratchie scratchie = scratchieService.getScratchieByContentId(contentId); + Scratchie scratchie = scratchieService.getScratchieByContentId(toolContentID); scratchie.setDefineLater(true); scratchieService.saveOrUpdateScratchie(scratchie); //audit log the teacher has started editing activity in monitor - scratchieService.auditLogStartEditingActivityInMonitor(contentId); + scratchieService.auditLogStartEditingActivityInMonitor(toolContentID); request.setAttribute(AttributeNames.ATTR_MODE, ToolAccessMode.TEACHER.toString()); return starting(authoringForm, request); - } private String starting(@ModelAttribute("authoringForm") ScratchieForm authoringForm, HttpServletRequest request) throws ServletException { - List items = null; - Scratchie scratchie = null; - // initial Session Map SessionMap sessionMap = new SessionMap<>(); request.getSession().setAttribute(sessionMap.getSessionID(), sessionMap); @@ -138,6 +134,8 @@ Long contentId = new Long(WebUtil.readLongParam(request, ScratchieConstants.PARAM_TOOL_CONTENT_ID)); sessionMap.put(ScratchieConstants.PARAM_TOOL_CONTENT_ID, contentId); + List items = null; + Scratchie scratchie = null; try { scratchie = scratchieService.getScratchieByContentId(contentId); // if scratchie does not exist, try to use default content instead. @@ -399,14 +397,14 @@ /** * QB callback handler which adds selected QbQuestion into question list. */ + @SuppressWarnings("unchecked") @RequestMapping(value = "/importQbQuestion", method = RequestMethod.POST) - private String importQbQuestion(HttpServletRequest request) { - String sessionMapID = WebUtil.readStrParam(request, ScratchieConstants.ATTR_SESSION_MAP_ID); + private String importQbQuestion(HttpServletRequest request, @RequestParam String sessionMapID, + @RequestParam Long qbQuestionUid) { SessionMap sessionMap = (SessionMap) request.getSession() .getAttribute(sessionMapID); SortedSet itemList = getItemList(sessionMap); - Long qbQuestionUid = WebUtil.readLongParam(request, "qbQuestionUid"); QbQuestion qbQuestion = qbService.getQuestionByUid(qbQuestionUid); //create new ScratchieItem and assign imported qbQuestion to it @@ -421,7 +419,6 @@ item.setQbQuestionModified(IQbService.QUESTION_MODIFIED_NONE); itemList.add(item); - // evict everything manually as we do not use DTOs, just real entities // without eviction changes would be saved immediately into DB // scratchieService.releaseFromCache(item); Index: lams_tool_scratchie/web/pages/authoring/authoring.jsp =================================================================== diff -u -raced7ba6c1e7c5a9a50d3f64d8cdd96dd7e76194 -re7f6df71275535cf4af43f3ff4479a8c58e0be50 --- lams_tool_scratchie/web/pages/authoring/authoring.jsp (.../authoring.jsp) (revision aced7ba6c1e7c5a9a50d3f64d8cdd96dd7e76194) +++ lams_tool_scratchie/web/pages/authoring/authoring.jsp (.../authoring.jsp) (revision e7f6df71275535cf4af43f3ff4479a8c58e0be50) @@ -16,24 +16,27 @@ #display-confidence-levels-activities { margin-top: 8px; } + #question-bank-div { + margin-top: 75px; + } Index: lams_tool_scratchie/web/pages/authoring/basic.jsp =================================================================== diff -u -r14f09ab0c0d6351201073b5f1ffe6aec576508ee -re7f6df71275535cf4af43f3ff4479a8c58e0be50 --- lams_tool_scratchie/web/pages/authoring/basic.jsp (.../basic.jsp) (revision 14f09ab0c0d6351201073b5f1ffe6aec576508ee) +++ lams_tool_scratchie/web/pages/authoring/basic.jsp (.../basic.jsp) (revision e7f6df71275535cf4af43f3ff4479a8c58e0be50) @@ -7,8 +7,24 @@