Index: lams_tool_scratchie/src/java/org/lamsfoundation/lams/tool/scratchie/web/action/AuthoringAction.java =================================================================== diff -u -r4428202881c5551dd3973c9011d7a70e0a517060 -r4470fc3acedcc7f384fbe5bbf0c7183b791c93b2 --- lams_tool_scratchie/src/java/org/lamsfoundation/lams/tool/scratchie/web/action/AuthoringAction.java (.../AuthoringAction.java) (revision 4428202881c5551dd3973c9011d7a70e0a517060) +++ lams_tool_scratchie/src/java/org/lamsfoundation/lams/tool/scratchie/web/action/AuthoringAction.java (.../AuthoringAction.java) (revision 4470fc3acedcc7f384fbe5bbf0c7183b791c93b2) @@ -289,16 +289,18 @@ // **********************************Get Scratchie PO********************* Scratchie scratchiePO = service.getScratchieByContentId(scratchieForm.getScratchie().getContentId()); - Set oldItems = (scratchiePO == null) ? new HashSet() : scratchiePO - .getScratchieItems(); - //initialize oldItems' answers - for (ScratchieItem oldItem: oldItems) { - for (ScratchieAnswer answer : (Set)oldItem.getAnswers()) { - } - } + Set oldItems = null; //allow using old and modified questions and references altogether if (mode.isTeacher()) { + oldItems = (scratchiePO == null) ? new HashSet() : scratchiePO.getScratchieItems(); + + // initialize oldItems' answers + for (ScratchieItem oldItem : oldItems) { + for (ScratchieAnswer answer : (Set) oldItem.getAnswers()) { + } + } + service.releaseItemsFromCache(scratchiePO); } @@ -337,7 +339,7 @@ //recalculate results in case content is edited from monitoring List deletedItems = getDeletedItemList(sessionMap); - if (mode.isTeacher()) { + if (mode.isTeacher()) { service.recalculateUserAnswers(scratchiePO, oldItems, newItems, deletedItems); }