Index: lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/dao/hibernate/McContentDAO.java
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/dao/hibernate/McContentDAO.java,v
diff -u -r1.16 -r1.17
--- lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/dao/hibernate/McContentDAO.java 3 Apr 2006 13:31:03 -0000 1.16
+++ lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/dao/hibernate/McContentDAO.java 4 Jun 2006 20:00:36 -0000 1.17
@@ -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
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/web/McAction.java,v
diff -u -r1.106 -r1.107
--- lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/web/McAction.java 3 Jun 2006 16:10:10 -0000 1.106
+++ lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/web/McAction.java 4 Jun 2006 20:00:35 -0000 1.107
@@ -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
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_lamc/web/authoring/Attic/AuthoringMaincontent.jsp,v
diff -u -r1.26 -r1.27
--- lams_tool_lamc/web/authoring/AuthoringMaincontent.jsp 3 Jun 2006 16:10:10 -0000 1.26
+++ lams_tool_lamc/web/authoring/AuthoringMaincontent.jsp 4 Jun 2006 20:00:35 -0000 1.27
@@ -54,9 +54,76 @@