Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaAction.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaAction.java,v diff -u -r1.9 -r1.10 --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaAction.java 16 May 2006 01:20:20 -0000 1.9 +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaAction.java 24 May 2006 22:17:13 -0000 1.10 @@ -240,6 +240,8 @@ authoringUtil.removeRedundantQuestions(mapQuestionContent, qaService, qaAuthoringForm, request); logger.debug("end of removing unused entries... "); + + QaContent qaContent=authoringUtil.saveOrUpdateQaContent(mapQuestionContent, qaService, qaAuthoringForm, request); logger.debug("qaContent: " + qaContent); @@ -258,11 +260,15 @@ request.getSession().setAttribute(ACTIVITY_INSTRUCTIONS, richTextInstructions); } - authoringUtil.reOrganizeDisplayOrder(mapQuestionContent, qaService, qaAuthoringForm, qaContent); - List attacments=saveAttachments(qaContent, attachmentList, deletedAttachmentList, mapping, request); - logger.debug("attacments: " + attacments); + String activeModule=qaAuthoringForm.getActiveModule(); + logger.debug("activeModule: " + activeModule); + if (activeModule.equals(AUTHORING)) + { + List attacments=saveAttachments(qaContent, attachmentList, deletedAttachmentList, mapping, request); + logger.debug("attacments: " + attacments); + } errors.clear(); @@ -424,7 +430,7 @@ String sourceMcStarter = (String) request.getAttribute(SOURCE_MC_STARTER); logger.debug("sourceMcStarter: " + sourceMcStarter); - request.getSession().setAttribute(DEFINE_LATER_IN_EDIT_MODE, new Boolean(true)); + request.getSession().setAttribute(DEFINE_LATER_IN_EDIT_MODE, new Boolean(true).toString()); request.getSession().setAttribute(SHOW_AUTHORING_TABS,new Boolean(false).toString()); String toolContentId=qaAuthoringForm.getToolContentId(); Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaAuthoringForm.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/Attic/QaAuthoringForm.java,v diff -u -r1.15 -r1.16 --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaAuthoringForm.java 7 Apr 2006 00:44:22 -0000 1.15 +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaAuthoringForm.java 24 May 2006 22:17:13 -0000 1.16 @@ -47,6 +47,8 @@ protected String choiceBasic; protected String choiceAdvanced; protected String choiceInstructions; + + protected String activeModule; /* basic content */ protected String title; @@ -558,4 +560,17 @@ public void setCurrentTab(String currentTab) { this.currentTab = currentTab; } + + /** + * @return Returns the activeModule. + */ + public String getActiveModule() { + return activeModule; + } + /** + * @param activeModule The activeModule to set. + */ + public void setActiveModule(String activeModule) { + this.activeModule = activeModule; + } } Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaMonitoringAction.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaMonitoringAction.java,v diff -u -r1.34 -r1.35 --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaMonitoringAction.java 18 May 2006 01:56:59 -0000 1.34 +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaMonitoringAction.java 24 May 2006 22:17:13 -0000 1.35 @@ -425,7 +425,7 @@ logger.debug("dispatching editActivityQuestions..."); request.getSession().setAttribute(IS_MONITORED_CONTENT_IN_USE, new Boolean(false).toString()); - request.getSession().setAttribute(DEFINE_LATER_IN_EDIT_MODE, new Boolean(true)); + request.getSession().setAttribute(DEFINE_LATER_IN_EDIT_MODE, new Boolean(true).toString()); QaUtils.setDefineLater(request, true); return (mapping.findForward(LOAD_MONITORING)); } @@ -456,6 +456,7 @@ throws IOException, ServletException { logger.debug("dispatching proxy submitAllContent..."); request.getSession().setAttribute(ACTIVE_MODULE, DEFINE_LATER); + request.getSession().setAttribute(DEFINE_LATER_IN_EDIT_MODE, new Boolean(false).toString()); QaAction qaAction= new QaAction(); return qaAction.submitAllContent(mapping, form, request, response); Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaMonitoringStarterAction.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaMonitoringStarterAction.java,v diff -u -r1.34 -r1.35 --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaMonitoringStarterAction.java 7 Apr 2006 00:44:22 -0000 1.34 +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaMonitoringStarterAction.java 24 May 2006 22:17:13 -0000 1.35 @@ -190,6 +190,7 @@ request.getSession().setAttribute(ACTIVE_MODULE, MONITORING); + qaMonitoringForm.setActiveModule(MONITORING); return (mapping.findForward(LOAD_MONITORING)); } @@ -235,19 +236,7 @@ } - boolean isContentInUse=QaUtils.isContentInUse(qaContent); - logger.debug("isContentInUse:" + isContentInUse); - - request.getSession().setAttribute(IS_MONITORED_CONTENT_IN_USE, new Boolean(false).toString()); - if (isContentInUse == true) - { - logger.debug("monitoring url does not allow editActivity since the content is in use."); - persistError(request,"error.content.inUse"); - request.getSession().setAttribute(IS_MONITORED_CONTENT_IN_USE, new Boolean(true).toString()); - } - - if (qaContent.getTitle() == null) { request.getSession().setAttribute(ACTIVITY_TITLE, "Questions and Answers"); @@ -277,9 +266,22 @@ logger.debug("refreshing instructions data..."); qaMonitoringAction.refreshInstructionsData(request, qaContent); - /* this section is related to instructions tab. Starts here. */ - /* ends here. */ - + logger.debug("populating online and ofline files data for intructions tab"); + QaUtils.populateUploadedFilesData(request, qaContent, qaService); + + + boolean isContentInUse=QaUtils.isContentInUse(qaContent); + logger.debug("isContentInUse:" + isContentInUse); + + request.getSession().setAttribute(IS_MONITORED_CONTENT_IN_USE, new Boolean(false).toString()); + if (isContentInUse == true) + { + logger.debug("monitoring url does not allow editActivity since the content is in use."); + persistError(request,"error.content.inUse"); + request.getSession().setAttribute(IS_MONITORED_CONTENT_IN_USE, new Boolean(true).toString()); + } + + logger.debug("final IS_MONITORED_CONTENT_IN_USE: " + request.getSession().getAttribute(IS_MONITORED_CONTENT_IN_USE)); logger.debug("end initializing monitoring data..."); return true; } Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaStarterAction.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaStarterAction.java,v diff -u -r1.45 -r1.46 --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaStarterAction.java 7 Apr 2006 00:44:22 -0000 1.45 +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaStarterAction.java 24 May 2006 22:17:13 -0000 1.46 @@ -214,16 +214,18 @@ { logger.debug("request is for authoring module"); request.getSession().setAttribute(ACTIVE_MODULE, AUTHORING); - request.getSession().setAttribute(DEFINE_LATER_IN_EDIT_MODE, new Boolean(true)); + request.getSession().setAttribute(DEFINE_LATER_IN_EDIT_MODE, new Boolean(true).toString()); request.getSession().setAttribute(SHOW_AUTHORING_TABS,new Boolean(true).toString()); + qaAuthoringForm.setActiveModule(AUTHORING); requestedModule=AUTHORING; } else { logger.debug("request is for define later module either direcly from define later url or monitoring url"); request.getSession().setAttribute(ACTIVE_MODULE, DEFINE_LATER); - request.getSession().setAttribute(DEFINE_LATER_IN_EDIT_MODE, new Boolean(false)); + request.getSession().setAttribute(DEFINE_LATER_IN_EDIT_MODE, new Boolean(false).toString()); request.getSession().setAttribute(SHOW_AUTHORING_TABS,new Boolean(false).toString()); + qaAuthoringForm.setActiveModule(DEFINE_LATER); requestedModule=DEFINE_LATER; if (servletPath.indexOf("monitoring") > 0) Index: lams_tool_laqa/web/authoring/AuthoringTabsHolder.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_laqa/web/authoring/AuthoringTabsHolder.jsp,v diff -u -r1.11 -r1.12 --- lams_tool_laqa/web/authoring/AuthoringTabsHolder.jsp 24 May 2006 17:15:45 -0000 1.11 +++ lams_tool_laqa/web/authoring/AuthoringTabsHolder.jsp 24 May 2006 22:17:13 -0000 1.12 @@ -65,27 +65,42 @@ var themeName="aqua"; function init(){ - - initTabSize(3); - - var tag = document.getElementById("currentTab"); - if(tag.value != "") - selectTab(tag.value); - else - selectTab(1); //select the default tab; - - initEditor("title"); - initEditor("instructions"); - initEditor("questionContent0"); - - - - - initEditor(""); - - + if (document.QaAuthoringForm.activeModule.value != 'defineLater') + { + initTabSize(3); + + var tag = document.getElementById("currentTab"); + if(tag.value != "") + selectTab(tag.value); + else + selectTab(1); //select the default tab; + + initEditor("onlineInstructions"); + initEditor("offlineInstructions"); + } + else + { + initTabSize(1); + + var tag = document.getElementById("currentTab"); + if(tag.value != "") + selectTab(tag.value); + else + selectTab(1); //select the default tab; + } + + initEditor("title"); + initEditor("instructions"); + + initEditor("questionContent0"); + + + + initEditor(""); + } + function doSelectTab(tabId) { // start optional tab controller stuff var tag = document.getElementById("currentTab"); @@ -110,6 +125,7 @@ + @@ -130,6 +146,7 @@ + Index: lams_tool_laqa/web/monitoring/Instructions.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_laqa/web/monitoring/Attic/Instructions.jsp,v diff -u -r1.4 -r1.5 --- lams_tool_laqa/web/monitoring/Instructions.jsp 7 Apr 2006 00:44:22 -0000 1.4 +++ lams_tool_laqa/web/monitoring/Instructions.jsp 24 May 2006 22:17:14 -0000 1.5 @@ -35,28 +35,104 @@ + - + - + + +
- + - +
   
- + - +
+ + + + + + +
+ + + +

+ + + + +
+ + + + + + + + /download/?uuid=&preferDownload=false + /download/?uuid=&preferDownload=true + + + + + + + + + +
 
+ + + + + + + + + + + + + + + + +
+ '/>")' class="button"> + + + + + + + + +
+
+
+
+
+
+ + + + + + \ No newline at end of file