Index: lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/dao/hibernate/McContentDAO.java =================================================================== diff -u -rc9531327d15636b54f293077ee1cd9f60195381b -r391557c1cca07365383bedeb438f9306c74938c9 --- lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/dao/hibernate/McContentDAO.java (.../McContentDAO.java) (revision c9531327d15636b54f293077ee1cd9f60195381b) +++ lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/dao/hibernate/McContentDAO.java (.../McContentDAO.java) (revision 391557c1cca07365383bedeb438f9306c74938c9) @@ -55,12 +55,17 @@ public McContent findMcContentById(Long mcContentId) { + logger.debug("doing findMcContentById" + mcContentId); String query = "from McContent as mc where mc.mcContentId = ?"; + logger.debug("query: " + query); HibernateTemplate templ = this.getHibernateTemplate(); - List list = getSession().createQuery(query) - .setLong(0,mcContentId.longValue()) - .list(); + + List list = getSession().createQuery(FIND_MC_CONTENT) + .setLong(0,mcContentId.longValue()) + .list(); + logger.debug("list: " + list); + if(list != null && list.size() > 0){ McContent mc = (McContent) list.get(0); return mc; Index: lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/web/McAction.java =================================================================== diff -u -r2e1913a4770c9bc154693d8c35f6e7a6b6e0e3fd -r391557c1cca07365383bedeb438f9306c74938c9 --- lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/web/McAction.java (.../McAction.java) (revision 2e1913a4770c9bc154693d8c35f6e7a6b6e0e3fd) +++ lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/web/McAction.java (.../McAction.java) (revision 391557c1cca07365383bedeb438f9306c74938c9) @@ -326,6 +326,7 @@ request.getSession().setAttribute(MAP_GENERAL_SELECTED_OPTIONS_CONTENT, mapGeneralSelectedOptionsContent); McUtils.debugMaps(request); + logger.debug("final EDIT_OPTIONS_MODE: " + request.getSession().getAttribute(EDIT_OPTIONS_MODE)); return (mapping.findForward(destination)); } @@ -449,6 +450,7 @@ request.getSession().setAttribute(MAP_GENERAL_SELECTED_OPTIONS_CONTENT, mapGeneralSelectedOptionsContent); McUtils.debugMaps(request); + logger.debug("final EDIT_OPTIONS_MODE: " + request.getSession().getAttribute(EDIT_OPTIONS_MODE)); return (mapping.findForward(destination)); } @@ -820,6 +822,7 @@ request.getSession().setAttribute(MAP_GENERAL_SELECTED_OPTIONS_CONTENT, mapGeneralSelectedOptionsContent); McUtils.debugMaps(request); + logger.debug("final EDIT_OPTIONS_MODE: " + request.getSession().getAttribute(EDIT_OPTIONS_MODE)); return (mapping.findForward(destination)); } @@ -958,6 +961,7 @@ request.getSession().setAttribute(MAP_GENERAL_SELECTED_OPTIONS_CONTENT, mapGeneralSelectedOptionsContent); McUtils.debugMaps(request); + logger.debug("final EDIT_OPTIONS_MODE: " + request.getSession().getAttribute(EDIT_OPTIONS_MODE)); return (mapping.findForward(destination)); } @@ -1085,6 +1089,7 @@ request.getSession().setAttribute(MAP_GENERAL_SELECTED_OPTIONS_CONTENT, mapGeneralSelectedOptionsContent); McUtils.debugMaps(request); + logger.debug("final EDIT_OPTIONS_MODE: " + request.getSession().getAttribute(EDIT_OPTIONS_MODE)); return (mapping.findForward(destination)); } @@ -1215,6 +1220,7 @@ request.getSession().setAttribute(MAP_GENERAL_SELECTED_OPTIONS_CONTENT, mapGeneralSelectedOptionsContent); McUtils.debugMaps(request); + logger.debug("final EDIT_OPTIONS_MODE: " + request.getSession().getAttribute(EDIT_OPTIONS_MODE)); return (mapping.findForward(destination)); } @@ -1347,6 +1353,7 @@ request.getSession().setAttribute(MAP_GENERAL_SELECTED_OPTIONS_CONTENT, mapGeneralSelectedOptionsContent); McUtils.debugMaps(request); + logger.debug("final EDIT_OPTIONS_MODE: " + request.getSession().getAttribute(EDIT_OPTIONS_MODE)); return (mapping.findForward(destination)); } @@ -1518,6 +1525,7 @@ request.getSession().setAttribute(MAP_GENERAL_SELECTED_OPTIONS_CONTENT, mapGeneralSelectedOptionsContent); McUtils.debugMaps(request); + logger.debug("final EDIT_OPTIONS_MODE: " + request.getSession().getAttribute(EDIT_OPTIONS_MODE)); return (mapping.findForward(destination)); } @@ -1572,6 +1580,7 @@ logger.debug("setting EDIT_OPTIONS_MODE to 0"); McUtils.debugMaps(request); + logger.debug("final EDIT_OPTIONS_MODE: " + request.getSession().getAttribute(EDIT_OPTIONS_MODE)); return (mapping.findForward(destination)); } @@ -2070,6 +2079,7 @@ if (destination.equals(LOAD_MONITORING_CONTENT)) { request.getSession().setAttribute(ACTIVE_MODULE, DEFINE_LATER); + mcAuthoringForm.setActiveModule(DEFINE_LATER); request.getSession().setAttribute(DEFINE_LATER_IN_EDIT_MODE, new Boolean(false)); } @@ -2078,6 +2088,8 @@ //because button (and javascript) will display in LamsTag tab, so put it into session instead of request //it will be remove immediately in clearSessionAction. request.getSession().setAttribute(AuthoringConstants.LAMS_AUTHORING_SUCCESS_FLAG,Boolean.TRUE); + + logger.debug("final EDIT_OPTIONS_MODE: " + request.getSession().getAttribute(EDIT_OPTIONS_MODE)); return (mapping.findForward(destination)); } @@ -2129,6 +2141,7 @@ mcAuthoringForm.resetUserAction(); McUtils.debugMaps(request); + logger.debug("final EDIT_OPTIONS_MODE: " + request.getSession().getAttribute(EDIT_OPTIONS_MODE)); return (mapping.findForward(destination)); } @@ -2181,6 +2194,7 @@ mcAuthoringForm.resetUserAction(); McUtils.debugMaps(request); + logger.debug("final EDIT_OPTIONS_MODE: " + request.getSession().getAttribute(EDIT_OPTIONS_MODE)); return (mapping.findForward(destination)); } @@ -2255,6 +2269,7 @@ logger.debug("setting EDIT_OPTIONS_MODE :" + 0); McUtils.debugMaps(request); + logger.debug("final EDIT_OPTIONS_MODE: " + request.getSession().getAttribute(EDIT_OPTIONS_MODE)); return (mapping.findForward(destination)); } @@ -2327,6 +2342,7 @@ logger.debug("setting ` :" + 0); McUtils.debugMaps(request); + logger.debug("final EDIT_OPTIONS_MODE: " + request.getSession().getAttribute(EDIT_OPTIONS_MODE)); return (mapping.findForward(destination)); } @@ -2368,6 +2384,7 @@ mcAuthoringForm.resetUserAction(); McUtils.debugMaps(request); + logger.debug("final EDIT_OPTIONS_MODE: " + request.getSession().getAttribute(EDIT_OPTIONS_MODE)); return (mapping.findForward(destination)); } @@ -2409,6 +2426,7 @@ mcAuthoringForm.resetUserAction(); McUtils.debugMaps(request); + logger.debug("final EDIT_OPTIONS_MODE: " + request.getSession().getAttribute(EDIT_OPTIONS_MODE)); return (mapping.findForward(destination)); } @@ -2456,6 +2474,7 @@ /* Check this: find out where to forward to*/ McUtils.debugMaps(request); + logger.debug("final EDIT_OPTIONS_MODE: " + request.getSession().getAttribute(EDIT_OPTIONS_MODE)); return (mapping.findForward(AUTHORING_STARTER)); } Index: lams_tool_lamc/web/authoring/AuthoringMaincontent.jsp =================================================================== diff -u -r2e1913a4770c9bc154693d8c35f6e7a6b6e0e3fd -r391557c1cca07365383bedeb438f9306c74938c9 --- lams_tool_lamc/web/authoring/AuthoringMaincontent.jsp (.../AuthoringMaincontent.jsp) (revision 2e1913a4770c9bc154693d8c35f6e7a6b6e0e3fd) +++ lams_tool_lamc/web/authoring/AuthoringMaincontent.jsp (.../AuthoringMaincontent.jsp) (revision 391557c1cca07365383bedeb438f9306c74938c9) @@ -54,9 +54,76 @@ <fmt:message key="activity.title" /> - + + + + + + + + + + + + +