Index: lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/web/McAction.java =================================================================== diff -u -r57412c3df9867b1ccef773efe817994848c58870 -rd8a8cb5c4f4b35beed27a2a54a34ba6113f4f551 --- lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/web/McAction.java (.../McAction.java) (revision 57412c3df9867b1ccef773efe817994848c58870) +++ lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/web/McAction.java (.../McAction.java) (revision d8a8cb5c4f4b35beed27a2a54a34ba6113f4f551) @@ -453,21 +453,23 @@ Map mapQuestionsContent=repopulateMap(request, "questionContent"); logger.debug("mapQuestionsContent before move down: " + mapQuestionsContent); - + String questionIndex =mcAuthoringForm.getQuestionIndex(); logger.debug("questionIndex:" + questionIndex); String movableQuestionEntry=(String)mapQuestionsContent.get(questionIndex); logger.debug("movableQuestionEntry:" + movableQuestionEntry); mapQuestionsContent= shiftMap(mapQuestionsContent, questionIndex,movableQuestionEntry, "up"); - logger.debug("mapQuestionsContent after move up: " + mapQuestionsContent); + logger.debug("mapQuestionsContent after move down: " + mapQuestionsContent); + + request.getSession().setAttribute(MAP_QUESTIONS_CONTENT, mapQuestionsContent); + logger.debug("updated Questions Map: " + request.getSession().getAttribute(MAP_QUESTIONS_CONTENT)); mcAuthoringForm.resetUserAction(); request.getSession().setAttribute(EDIT_OPTIONS_MODE, new Integer(0)); logger.debug("resetting EDIT_OPTIONS_MODE to 0"); request.getSession().setAttribute(CURRENT_TAB, new Long(1)); - int maxQuestionIndex=mapQuestionsContent.size(); request.getSession().setAttribute(MAX_QUESTION_INDEX, new Integer(maxQuestionIndex)); logger.debug("MAX_QUESTION_INDEX: " + request.getSession().getAttribute(MAX_QUESTION_INDEX)); @@ -1653,13 +1655,21 @@ int shiftableIndex=0; if (direction.equals("down")) { + logger.debug("moving map down"); shiftableIndex=new Integer(questionIndex).intValue() + 1; + } + else + { + logger.debug("moving map up"); + shiftableIndex=new Integer(questionIndex).intValue() - 1; + + } logger.debug("shiftableIndex: " + shiftableIndex); shiftableEntry=(String)mapQuestionsContent.get(new Integer(shiftableIndex).toString()); logger.debug("shiftable entry: " + shiftableEntry); - if (shiftableEntry != null) + if (shiftableEntry != null) { Iterator itQuestionsMap = mapQuestionsContent.entrySet().iterator(); long mapCounter=0; @@ -1692,14 +1702,7 @@ mapTempQuestionsContent=mapQuestionsContent; } return mapTempQuestionsContent; - } - else - { - shiftableIndex=new Integer(questionIndex).intValue() - 1; - } - - return null; - + } Index: lams_tool_lamc/web/BasicContent.jsp =================================================================== diff -u -r57412c3df9867b1ccef773efe817994848c58870 -rd8a8cb5c4f4b35beed27a2a54a34ba6113f4f551 --- lams_tool_lamc/web/BasicContent.jsp (.../BasicContent.jsp) (revision 57412c3df9867b1ccef773efe817994848c58870) +++ lams_tool_lamc/web/BasicContent.jsp (.../BasicContent.jsp) (revision d8a8cb5c4f4b35beed27a2a54a34ba6113f4f551) @@ -5,8 +5,6 @@ <%@ taglib uri="/WEB-INF/fmt.tld" prefix="fmt" %> <%@ taglib uri="fck-editor" prefix="FCK" %> -sessionScope.maxQuestionIndex - @@ -88,8 +86,6 @@ - queIndex aaa -
: