Index: lams_tool_lamc/db/model/lams_tool_mc.clay =================================================================== diff -u -r6f1188b57dfc1cd53bfbeb95fcdb295f1d2bf2e6 -rb7285ac977222460053f4293718569503f17fe1e --- lams_tool_lamc/db/model/lams_tool_mc.clay (.../lams_tool_mc.clay) (revision 6f1188b57dfc1cd53bfbeb95fcdb295f1d2bf2e6) +++ lams_tool_lamc/db/model/lams_tool_mc.clay (.../lams_tool_mc.clay) (revision b7285ac977222460053f4293718569503f17fe1e) @@ -1,360 +1,358 @@ - + QA Tool for Lams 1.1 - - + + - - - +
+ + - - - - + + + + - - - + + + - - - - + + + + - - - + + + - - - - - + + + + + - - - - - + + + + + - - - - - + + + + + - - - + + + - - - - + + + + - - - + + + - - - - + + + + - - - + + + - - - - + + + + - - - + + + - - - - - + + + + + - - - - - + + + + + - - - - + + + + - - - + + + - - - - + + + + - - - + + + - - - - + + + + - - - + + + - - - - - + + + + - - - - - + + + + - - - - - + + + + + - - - - + + + + - - - + + + - - - - + + + + - - - + + + - - - - + + + + - - - + + + - - - + + + - - - - + + + + - - - - + + + + - - - + + + - - + + - - + +
- - - +
+ + - - - - + + + + - - - + + + - - - - - + + + + + - - - - + + + + - - - + + + - - - - + + + + - - - + + + - - - - - + + + + + - - - - - + + + + + - - - - + + + + - - - + + + - - - - + + + + - - - + + + - - + + - - + + @@ -363,65 +361,65 @@
- - - +
+ + - - - - + + + + - - - + + + - - - - + + + + - - - + + + - - - - + + + + - - - + + + - - - - - + + + + + - - + + - - + + @@ -430,77 +428,77 @@
- - - +
+ + - - - - + + + + - - - + + + - - - - + + + + - - - + + + - - - - + + + + - - - + + + - - - - - + + + + + - - - - - + + + + + - - + + - - + + - - + + @@ -509,82 +507,82 @@
- - - +
+ + - - - - + + + + - - - + + + - - - - + + + + - - - + + + - - - + + + - - - + + + - - - - - + + + + + - - - - + + + + - - - + + + - - + + - - + + - - + + @@ -593,144 +591,144 @@
- - - +
+ + - - - - + + + + - - - + + + - - - - + + + + - - - + + + - - - - + + + + - - - + + + - - - - + + + + - - - + + + - - - + + + - - - - - + + + + + - - - + + + + - - - - + + + - - - - - + + + + + - - - - + + + + - - - + + + - - - + + + - - - - + + + + - - + + - - + + - - + + - - + + @@ -739,72 +737,72 @@
- - - +
+ + - - - - + + + + - - - + + + - - - - - + + + + + - - - - + + + + - - - + + + - - - - + + + + - - - + + + - - - - - + + + + + - - + + - - + + Index: lams_tool_lamc/db/sql/create_lams_tool_mc.sql =================================================================== diff -u -r784a72683b6ab8df50473379b2c92f626498cb21 -rb7285ac977222460053f4293718569503f17fe1e --- lams_tool_lamc/db/sql/create_lams_tool_mc.sql (.../create_lams_tool_mc.sql) (revision 784a72683b6ab8df50473379b2c92f626498cb21) +++ lams_tool_lamc/db/sql/create_lams_tool_mc.sql (.../create_lams_tool_mc.sql) (revision b7285ac977222460053f4293718569503f17fe1e) @@ -1,21 +1,21 @@ CREATE TABLE lams.tl_lamc11_content ( uid BIGINT(20) NOT NULL AUTO_INCREMENT , content_id BIGINT(20) NOT NULL - , title VARCHAR(250) NOT NULL DEFAULT 'Multiple Choice' - , instructions VARCHAR(250) NOT NULL DEFAULT 'Please answer the questions until you reach the passmark.' + , title VARCHAR(250) NOT NULL + , instructions VARCHAR(250) NOT NULL , creation_date VARCHAR(100) , update_date DATETIME , questions_sequenced TINYINT(1) NOT NULL DEFAULT 0 , username_visible TINYINT(1) NOT NULL DEFAULT 0 , created_by BIGINT(20) NOT NULL DEFAULT 0 - , monitoring_report_title VARCHAR(100) NOT NULL DEFAULT 'Combined Learner Results' - , report_title VARCHAR(100) NOT NULL DEFAULT 'Multiple Choice' + , monitoring_report_title VARCHAR(100) NOT NULL + , report_title VARCHAR(100) NOT NULL , run_offline TINYINT(1) NOT NULL DEFAULT 0 , define_later TINYINT(1) NOT NULL DEFAULT 0 , synch_in_monitor TINYINT(1) NOT NULL DEFAULT 0 - , offline_instructions VARCHAR(250) NOT NULL DEFAULT 'offline instructions' - , online_instructions VARCHAR(250) NOT NULL DEFAULT 'online instructions' - , end_learning_message VARCHAR(150) NOT NULL DEFAULT 'Thank you!' + , offline_instructions TEXT + , online_instructions TEXT + , end_learning_message VARCHAR(150) NOT NULL , content_in_use TINYINT(1) NOT NULL DEFAULT 0 , retries TINYINT(1) NOT NULL DEFAULT 0 , show_feedback TINYINT(1) NOT NULL DEFAULT 0 @@ -114,7 +114,7 @@ )TYPE=InnoDB; -INSERT INTO lams.tl_lamc11_content(uid, content_id , title , instructions , creation_date , questions_sequenced , username_visible , created_by , monitoring_report_title , report_title , run_offline , define_later, synch_in_monitor, offline_instructions, online_instructions, end_learning_message, content_in_use, retries, show_feedback, show_report) VALUES (1, ${default_content_id} ,'Mc Title','Mc Instructions', NOW(), 0, 0,1,'Monitoring Report','Report', 0, 0, 0,'offline instructions','instructions','Finished Activity...', 0, 0, 0, 0); +INSERT INTO lams.tl_lamc11_content(uid, content_id , title , instructions , creation_date , questions_sequenced , username_visible , created_by , monitoring_report_title , report_title , run_offline , define_later, synch_in_monitor, offline_instructions, online_instructions, end_learning_message, content_in_use, retries, show_feedback, show_report) VALUES (1, ${default_content_id} ,'Mc Title','Mc Instructions', NOW(), 0, 0,1,'Monitoring Report','Report', 0, 0, 0,'offline instructions','online instructions','Finished Activity...', 0, 0, 0, 0); INSERT INTO lams.tl_lamc11_que_content (uid,question, weight, disabled, display_order, mc_content_id) VALUES (1, 'a sample question', 0, 1, 1, 1); Index: lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/McResources.properties =================================================================== diff -u -rf77956586f0ead728f7a2fec99f25136842a99b9 -rb7285ac977222460053f4293718569503f17fe1e --- lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/McResources.properties (.../McResources.properties) (revision f77956586f0ead728f7a2fec99f25136842a99b9) +++ lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/McResources.properties (.../McResources.properties) (revision b7285ac977222460053f4293718569503f17fe1e) @@ -39,28 +39,22 @@ label.finished =Finished label.attempt =Attempt - -button.basic =Basic -button.uploadFile =Upload Package +button.upload =Upload button.preview =Preview button.advanced =Advanced button.instructions =Instructions -button.done =Done tool.icon.name =MC button.add =Add button.addNewQuestion =Add button.remove =Delete -button.removeQuestion =Delete -button.removeAllContent =Remove Content -button.submitAllContent =Submit button.submit =Submit button.done =Done button.getNextQuestion =Next button.next =Next button.nextQuestion =Next Question button.continue =Continue button.getPreviousQuestion =Previous -button.editQuestion =Edit + label.percent =% label.option =Option label.option1 =Option 1 @@ -69,7 +63,6 @@ label.candidateAnswers =Candidate Answers label.isCorrect =Correct? - label.monitoringReport.title =Monitoring Report Title label.question.only =Question label.question =Question: @@ -91,7 +84,6 @@ label.onlineInstructions =Online Instructions label.offlineFiles =Offline Files: label.onlineFiles =Online Files: -label.upload =Upload label.uploadedOfflineFiles =Uploaded Offline Files: label.uploadedOnlineFiles =Uploaded Online Files: option.on =ON Index: lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/web/AuthoringUtil.java =================================================================== diff -u -r14a0b0dd28920b19fd36438b17173ec102647269 -rb7285ac977222460053f4293718569503f17fe1e --- lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/web/AuthoringUtil.java (.../AuthoringUtil.java) (revision 14a0b0dd28920b19fd36438b17173ec102647269) +++ lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/web/AuthoringUtil.java (.../AuthoringUtil.java) (revision b7285ac977222460053f4293718569503f17fe1e) @@ -37,6 +37,17 @@ static Logger logger = Logger.getLogger(AuthoringUtil.class.getName()); + public static void readData(HttpServletRequest request, McAuthoringForm mcAuthoringForm) + { + /** define the next tab as Basic tab by default*/ + request.getSession().setAttribute(EDIT_OPTIONS_MODE, new Integer(0)); + logger.debug("resetting EDIT_OPTIONS_MODE to 0"); + + McUtils.persistRichText(request); + AuthoringUtil.populateParameters(request, mcAuthoringForm); + } + + /** * populates request parameters * populateParameters(HttpServletRequest request, McAuthoringForm mcAuthoringForm) @@ -54,62 +65,6 @@ request.getSession().setAttribute(SELECTED_QUESTION,selectedQuestion); logger.debug("updated SELECTED_QUESTION"); } - - - mcAuthoringForm.setRemoveQuestion(null); - mcAuthoringForm.setEditOptions(null); - mcAuthoringForm.setMoveUp(null); - mcAuthoringForm.setMoveDown(null); - mcAuthoringForm.setRemoveOption(null); - mcAuthoringForm.setViewFileItem(null); - - String editOptions=request.getParameter("editOptions"); - logger.debug("parameter editOptions" + editOptions); - if ((editOptions != null) && editOptions.equals("1")) - { - logger.debug("parameter editOptions is selected " + editOptions); - mcAuthoringForm.setEditOptions("1"); - } - - String removeQuestion=request.getParameter("removeQuestion"); - logger.debug("parameter removeQuestion" + removeQuestion); - if ((removeQuestion != null) && removeQuestion.equals("1")) - { - logger.debug("parameter removeQuestion is selected " + removeQuestion); - mcAuthoringForm.setRemoveQuestion("1"); - } - - String moveDown=request.getParameter("moveDown"); - logger.debug("parameter moveDown" + moveDown); - if ((moveDown != null) && moveDown.equals("1")) - { - logger.debug("parameter moveDown is selected " + moveDown); - mcAuthoringForm.setMoveDown("1"); - } - - String moveUp=request.getParameter("moveUp"); - logger.debug("parameter moveUp" + moveUp); - if ((moveUp != null) && moveUp.equals("1")) - { - logger.debug("parameter moveUp is selected " + moveUp); - mcAuthoringForm.setMoveUp("1"); - } - - String removeOption=request.getParameter("removeOption"); - logger.debug("parameter removeOption" + removeOption); - if ((removeOption != null) && removeOption.equals("1")) - { - logger.debug("parameter removeOption is selected " + removeOption); - mcAuthoringForm.setRemoveOption("1"); - } - - String viewFileItem=request.getParameter("viewFileItem"); - logger.debug("parameter viewFileItem" + viewFileItem); - if ((viewFileItem != null) && viewFileItem.equals("1")) - { - logger.debug("parameter viewFileItem is selected " + viewFileItem); - mcAuthoringForm.setViewFileItem("1"); - } } Index: lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/web/McAction.java =================================================================== diff -u -r947350765d420ce70874db716e0b8ef38c295abf -rb7285ac977222460053f4293718569503f17fe1e --- lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/web/McAction.java (.../McAction.java) (revision 947350765d420ce70874db716e0b8ef38c295abf) +++ lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/web/McAction.java (.../McAction.java) (revision b7285ac977222460053f4293718569503f17fe1e) @@ -39,7 +39,6 @@ import org.apache.struts.action.ActionMapping; import org.apache.struts.action.ActionMessage; import org.apache.struts.action.ActionMessages; -import org.apache.struts.actions.DispatchAction; import org.lamsfoundation.lams.tool.mc.McAppConstants; import org.lamsfoundation.lams.tool.mc.McApplicationException; import org.lamsfoundation.lams.tool.mc.McComparator; @@ -50,6 +49,7 @@ import org.lamsfoundation.lams.tool.mc.McUsrAttempt; import org.lamsfoundation.lams.tool.mc.McUtils; import org.lamsfoundation.lams.tool.mc.service.IMcService; +import org.lamsfoundation.lams.web.action.LamsDispatchAction; /** * * @author Ozgur Demirtas @@ -104,7 +104,7 @@ /> */ -public class McAction extends DispatchAction implements McAppConstants +public class McAction extends LamsDispatchAction implements McAppConstants { /* * change the logic about completion status @@ -121,8 +121,8 @@ */ static Logger logger = Logger.getLogger(McAction.class.getName()); - /** - *

Struts dispatch method.

+ /** + *

Default struts dispatch method.

* *

It is assuming that progress engine should pass in the tool access * mode and the tool session id as http parameters.

@@ -140,7 +140,7 @@ * @throws ServletException * @throws McApplicationException the known runtime exception * - * loadQ(ActionMapping mapping, + * unspecified(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws IOException, @@ -151,85 +151,21 @@ * if the passed toolContentId exists in the db, we need to get the relevant data into the Map * if not, create the default Map */ - public ActionForward loadQ(ActionMapping mapping, + public ActionForward unspecified(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { McAuthoringForm mcAuthoringForm = (McAuthoringForm) form; IMcService mcService =McUtils.getToolService(request); - - /** define the next tab as Basic tab by default*/ - request.getSession().setAttribute(EDIT_OPTIONS_MODE, new Integer(0)); - logger.debug("resetting EDIT_OPTIONS_MODE to 0"); - - McUtils.persistRichText(request); - AuthoringUtil.populateParameters(request, mcAuthoringForm); - - String userAction=null; - if (mcAuthoringForm.getAddQuestion() != null) - { - return addNewQuestion(mapping, form, request, response); - } - else if (mcAuthoringForm.getRemoveQuestion() != null) - { - return removeQuestion(mapping, form, request, response); - } - else if (mcAuthoringForm.getEditOptions() != null) - { - return editOptions(mapping, form, request, response); - } - else if (mcAuthoringForm.getMoveDown() != null) - { - return moveQuestionDown(mapping, form, request, response); - } - else if (mcAuthoringForm.getMoveUp() != null) - { - return moveQuestionUp(mapping, form, request, response); - } - else if (mcAuthoringForm.getAddOption() != null) - { - return addOption(mapping, form, request, response); - } - else if (mcAuthoringForm.getRemoveOption() != null) - { - return removeOption(mapping, form, request, response); - } - else if (mcAuthoringForm.getDoneOptions() != null) - { - return doneOptions(mapping, form, request, response); - } - else if (mcAuthoringForm.getSubmitQuestions() != null) - { - return submitQuestions(mapping, form, request, response); - } - else if (mcAuthoringForm.getAdvancedTabDone() != null) - { - return doneAdvancedTab(mapping, form, request, response); - } - else if (mcAuthoringForm.getInstructionsTabDone() != null) - { - return doneInstructionsTab(mapping, form, request, response); - } - else if (mcAuthoringForm.getSubmitOfflineFile() != null) - { - return submitOfflineFiles(mapping, form, request, response); - } - else if (mcAuthoringForm.getSubmitOnlineFile() != null) - { - return submitOnlineFiles(mapping, form, request, response); - } - else if (mcAuthoringForm.getViewFileItem() != null) - { - return viewFileItem(mapping, form, request, response); - } - + AuthoringUtil.readData(request, mcAuthoringForm); mcAuthoringForm.resetUserAction(); return null; } + /** * adds a new entry to the questions Map * @@ -252,6 +188,8 @@ McAuthoringForm mcAuthoringForm = (McAuthoringForm) form; IMcService mcService =McUtils.getToolService(request); + AuthoringUtil.readData(request, mcAuthoringForm); + String userAction="addQuestion"; request.setAttribute(USER_ACTION, userAction); logger.debug("userAction:" + userAction); @@ -277,9 +215,7 @@ request.getSession().setAttribute(MAX_QUESTION_INDEX, new Integer(maxQuestionIndex)); logger.debug("MAX_QUESTION_INDEX: " + request.getSession().getAttribute(MAX_QUESTION_INDEX)); - mcAuthoringForm.setAddQuestion(null); - mcAuthoringForm.setSubmitQuestions(null); - return (mapping.findForward(LOAD_QUESTIONS)); + return (mapping.findForward(LOAD_QUESTIONS)); } logger.debug("will validate weights"); @@ -296,9 +232,7 @@ request.getSession().setAttribute(MAX_QUESTION_INDEX, new Integer(maxQuestionIndex)); logger.debug("MAX_QUESTION_INDEX: " + request.getSession().getAttribute(MAX_QUESTION_INDEX)); - mcAuthoringForm.setAddQuestion(null); - mcAuthoringForm.setSubmitQuestions(null); - return (mapping.findForward(LOAD_QUESTIONS)); + return (mapping.findForward(LOAD_QUESTIONS)); } @@ -318,9 +252,7 @@ request.getSession().setAttribute(MAX_QUESTION_INDEX, new Integer(maxQuestionIndex)); logger.debug("MAX_QUESTION_INDEX: " + request.getSession().getAttribute(MAX_QUESTION_INDEX)); - mcAuthoringForm.setAddQuestion(null); - mcAuthoringForm.setSubmitQuestions(null); - return (mapping.findForward(LOAD_QUESTIONS)); + return (mapping.findForward(LOAD_QUESTIONS)); } request.getSession().setAttribute(MAP_WEIGHTS, mapWeights); logger.debug("MAP_WEIGHTS:" + request.getSession().getAttribute(MAP_WEIGHTS)); @@ -336,8 +268,6 @@ request.getSession().setAttribute(MAX_QUESTION_INDEX, new Integer(maxQuestionIndex)); logger.debug("MAX_QUESTION_INDEX: " + request.getSession().getAttribute(MAX_QUESTION_INDEX)); - mcAuthoringForm.setAddQuestion(null); - mcAuthoringForm.setSubmitQuestions(null); return (mapping.findForward(LOAD_QUESTIONS)); } @@ -365,6 +295,8 @@ McAuthoringForm mcAuthoringForm = (McAuthoringForm) form; IMcService mcService =McUtils.getToolService(request); + AuthoringUtil.readData(request, mcAuthoringForm); + String userAction="removeQuestion"; request.setAttribute(USER_ACTION, userAction); logger.debug("userAction:" + userAction); @@ -431,6 +363,8 @@ McAuthoringForm mcAuthoringForm = (McAuthoringForm) form; IMcService mcService =McUtils.getToolService(request); + AuthoringUtil.readData(request, mcAuthoringForm); + String userAction="editOption"; request.setAttribute(USER_ACTION, userAction); logger.debug("userAction:" + userAction); @@ -702,7 +636,6 @@ request.getSession().setAttribute(MAP_OPTIONS_CONTENT, mapOptionsContent); request.getSession().setAttribute(MAP_SELECTED_OPTIONS, mapSelectedOptions); - mapGeneralOptionsContent=(Map)request.getSession().getAttribute(MAP_GENERAL_OPTIONS_CONTENT); logger.debug("current mapGeneralOptionsContent:"+ mapGeneralOptionsContent); mapGeneralOptionsContent.put(questionIndex,mapOptionsContent); @@ -742,6 +675,8 @@ McAuthoringForm mcAuthoringForm = (McAuthoringForm) form; IMcService mcService =McUtils.getToolService(request); + AuthoringUtil.readData(request, mcAuthoringForm); + String userAction="addOption"; request.setAttribute(USER_ACTION, userAction); logger.debug("userAction:" + userAction); @@ -848,6 +783,8 @@ McAuthoringForm mcAuthoringForm = (McAuthoringForm) form; IMcService mcService =McUtils.getToolService(request); + AuthoringUtil.readData(request, mcAuthoringForm); + String userAction="removeOption"; request.setAttribute(USER_ACTION, userAction); logger.debug("userAction:" + userAction); @@ -963,6 +900,8 @@ McAuthoringForm mcAuthoringForm = (McAuthoringForm) form; IMcService mcService =McUtils.getToolService(request); + AuthoringUtil.readData(request, mcAuthoringForm); + String userAction="moveDown"; request.setAttribute(USER_ACTION, userAction); logger.debug("userAction:" + userAction); @@ -1014,6 +953,8 @@ McAuthoringForm mcAuthoringForm = (McAuthoringForm) form; IMcService mcService =McUtils.getToolService(request); + AuthoringUtil.readData(request, mcAuthoringForm); + String userAction="moveUp"; request.setAttribute(USER_ACTION, userAction); logger.debug("userAction:" + userAction); @@ -1064,6 +1005,8 @@ logger.debug("dispatching doneOptions..."); McAuthoringForm mcAuthoringForm = (McAuthoringForm) form; IMcService mcService =McUtils.getToolService(request); + + AuthoringUtil.readData(request, mcAuthoringForm); String userAction="doneOptions"; request.setAttribute(USER_ACTION, userAction); @@ -1180,6 +1123,8 @@ McAuthoringForm mcAuthoringForm = (McAuthoringForm) form; IMcService mcService =McUtils.getToolService(request); + AuthoringUtil.readData(request, mcAuthoringForm); + /* persist the final Questions Map */ String userAction="submitQuestions"; request.setAttribute(USER_ACTION, userAction); @@ -1205,8 +1150,6 @@ mcAuthoringForm.resetUserAction(); persistError(request,"error.questions.submitted.none"); - mcAuthoringForm.setAddQuestion(null); - mcAuthoringForm.setSubmitQuestions(null); return (mapping.findForward(LOAD_QUESTIONS)); } @@ -1222,9 +1165,7 @@ request.getSession().setAttribute(MAX_QUESTION_INDEX, new Integer(maxQuestionIndex)); logger.debug("MAX_QUESTION_INDEX: " + request.getSession().getAttribute(MAX_QUESTION_INDEX)); - mcAuthoringForm.setAddQuestion(null); - mcAuthoringForm.setSubmitQuestions(null); - return (mapping.findForward(LOAD_QUESTIONS)); + return (mapping.findForward(LOAD_QUESTIONS)); } boolean isTotalWeightsValid=AuthoringUtil.validateTotalWeight(request); @@ -1244,9 +1185,7 @@ request.getSession().setAttribute(MAX_QUESTION_INDEX, new Integer(maxQuestionIndex)); logger.debug("MAX_QUESTION_INDEX: " + request.getSession().getAttribute(MAX_QUESTION_INDEX)); - mcAuthoringForm.setAddQuestion(null); - mcAuthoringForm.setSubmitQuestions(null); - return (mapping.findForward(LOAD_QUESTIONS)); + return (mapping.findForward(LOAD_QUESTIONS)); } logger.debug("MAP_WEIGHTS is valid, persist it to session"); request.getSession().setAttribute(MAP_WEIGHTS, mapWeights); @@ -1307,8 +1246,6 @@ request.getSession().setAttribute(MAX_QUESTION_INDEX, new Integer(maxQuestionIndex)); logger.debug("MAX_QUESTION_INDEX: " + request.getSession().getAttribute(MAX_QUESTION_INDEX)); - mcAuthoringForm.setAddQuestion(null); - mcAuthoringForm.setSubmitQuestions(null); return (mapping.findForward(LOAD_QUESTIONS)); } } @@ -1334,9 +1271,7 @@ request.getSession().setAttribute(MAX_QUESTION_INDEX, new Integer(maxQuestionIndex)); logger.debug("MAX_QUESTION_INDEX: " + request.getSession().getAttribute(MAX_QUESTION_INDEX)); - mcAuthoringForm.setAddQuestion(null); - mcAuthoringForm.setSubmitQuestions(null); - return (mapping.findForward(LOAD_QUESTIONS)); + return (mapping.findForward(LOAD_QUESTIONS)); } logger.debug("isShowFeedback: " + mcAuthoringForm.getShowFeedback()); @@ -1390,9 +1325,7 @@ request.getSession().setAttribute(MAX_QUESTION_INDEX, new Integer(maxQuestionIndex)); logger.debug("MAX_QUESTION_INDEX: " + request.getSession().getAttribute(MAX_QUESTION_INDEX)); - mcAuthoringForm.setAddQuestion(null); - mcAuthoringForm.setSubmitQuestions(null); - return (mapping.findForward(LOAD_QUESTIONS)); + return (mapping.findForward(LOAD_QUESTIONS)); } String richTextOfflineInstructions=(String) request.getSession().getAttribute(RICHTEXT_OFFLINEINSTRUCTIONS); @@ -1415,7 +1348,7 @@ request.getSession().setAttribute(MAP_QUESTIONS_CONTENT, mapQuestionsContent); Long toolContentId=(Long)request.getSession().getAttribute(TOOL_CONTENT_ID); - logger.debug("toolContentId:" + toolContentId); + logger.debug("toolContentId:" + toolContentId); McContent mcContent=mcService.retrieveMc(toolContentId); logger.debug("existing mcContent:" + mcContent); @@ -1510,8 +1443,6 @@ request.getSession().setAttribute(MAX_QUESTION_INDEX, new Integer(maxQuestionIndex)); logger.debug("MAX_QUESTION_INDEX: " + request.getSession().getAttribute(MAX_QUESTION_INDEX)); - mcAuthoringForm.setAddQuestion(null); - mcAuthoringForm.setSubmitQuestions(null); return (mapping.findForward(LOAD_QUESTIONS)); } @@ -1539,6 +1470,8 @@ McAuthoringForm mcAuthoringForm = (McAuthoringForm) form; IMcService mcService =McUtils.getToolService(request); + AuthoringUtil.readData(request, mcAuthoringForm); + String userAction="viewFileItem"; request.setAttribute(USER_ACTION, userAction); logger.debug("userAction:" + userAction); @@ -1623,6 +1556,8 @@ logger.debug("dispatching doneAdvancedTab..."); McAuthoringForm mcAuthoringForm = (McAuthoringForm) form; IMcService mcService =McUtils.getToolService(request); + + AuthoringUtil.readData(request, mcAuthoringForm); String userAction="advancedTabDone"; request.setAttribute(USER_ACTION, userAction); @@ -1655,6 +1590,8 @@ McAuthoringForm mcAuthoringForm = (McAuthoringForm) form; IMcService mcService =McUtils.getToolService(request); + AuthoringUtil.readData(request, mcAuthoringForm); + String userAction="dispinstructionsTabDone"; request.setAttribute(USER_ACTION, userAction); logger.debug("userAction:" + userAction); @@ -1685,6 +1622,8 @@ McAuthoringForm mcAuthoringForm = (McAuthoringForm) form; IMcService mcService =McUtils.getToolService(request); + AuthoringUtil.readData(request, mcAuthoringForm); + String userAction="submitOfflineFile"; request.setAttribute(USER_ACTION, userAction); logger.debug("userAction:" + userAction); @@ -1721,6 +1660,8 @@ McAuthoringForm mcAuthoringForm = (McAuthoringForm) form; IMcService mcService =McUtils.getToolService(request); + AuthoringUtil.readData(request, mcAuthoringForm); + String userAction="submitOnlineFile"; request.setAttribute(USER_ACTION, userAction); logger.debug("userAction:" + userAction); @@ -1966,7 +1907,7 @@ /** - * takes care of the assessment + * responses to learner when they answer all the questions on a single page * continueOptionsCombined(ActionMapping mapping, ActionForm form, HttpServletRequest request, @@ -2059,7 +2000,7 @@ /** - * takes care of the assessment + * takes the learner to the next set of questions * continueOptionsCombined(ActionMapping mapping, ActionForm form, HttpServletRequest request, @@ -2143,7 +2084,7 @@ /** - * allows the learner to take the activity again + * allows the learner to view their answer history * viewAnswers(ActionMapping mapping, ActionForm form, HttpServletRequest request, @@ -2313,7 +2254,5 @@ mcLearningForm.resetCommands(); return (mapping.findForward(LOAD_LEARNER)); } - - } \ No newline at end of file Index: lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/web/McAuthoringForm.java =================================================================== diff -u -rfd6328a28e3ebbd9700e73f6120398153b2dacb1 -rb7285ac977222460053f4293718569503f17fe1e --- lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/web/McAuthoringForm.java (.../McAuthoringForm.java) (revision fd6328a28e3ebbd9700e73f6120398153b2dacb1) +++ lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/web/McAuthoringForm.java (.../McAuthoringForm.java) (revision b7285ac977222460053f4293718569503f17fe1e) @@ -13,29 +13,16 @@ public class McAuthoringForm extends ActionForm implements McAppConstants { /* form controllers */ protected String addOptionContent; - protected String addQuestion; - protected String removeQuestion; - protected String submitQuestions; - protected String editOptions; - protected String addOption; - protected String removeOption; - protected String doneOptions; - protected String moveDown; - protected String moveUp; - protected String questionIndex; protected String optionIndex; protected String selectedIndex; protected String deletableOptionIndex; protected String editDefaultQuestion; protected String removeOptionContent; - protected String advancedTabDone; - protected String instructionsTabDone; protected String fileItem; - protected String viewFileItem; protected FormFile receivedFile; protected String addContent; @@ -46,7 +33,9 @@ protected String submitOfflineFile; protected String submitOnlineFile; - + // dispatch controls which method is called by the Lookup map */ + protected String dispatch; + /* tab controller, these may go away once the Flash wraps the jsp */ protected String choice; protected String choiceBasic; @@ -96,20 +85,8 @@ this.editDefaultQuestion=null; this.addOptionContent=null; this.removeOptionContent=null; - this.addQuestion=null; - this.removeQuestion=null; - this.editOptions=null; - this.addOption=null; - this.removeOption=null; - this.doneOptions=null; - this.submitQuestions=null; - this.advancedTabDone=null; - this.instructionsTabDone=null; - this.moveDown=null; - this.moveUp=null; this.fileItem=null; - this.viewFileItem=null; this.addContent=null; this.removeContent=null; @@ -119,6 +96,8 @@ this.submitOfflineFile=null; this.submitOnlineFile=null; + this.dispatch=null; + this.summaryMonitoring=null; this.instructionsMonitoring=null; this.editActivityMonitoring=null; @@ -131,20 +110,8 @@ this.editDefaultQuestion=null; this.addOptionContent=null; this.removeOptionContent=null; - this.addQuestion=null; - this.removeQuestion=null; - this.editOptions=null; - this.addOption=null; - this.removeOption=null; - this.doneOptions=null; - this.submitQuestions=null; - this.advancedTabDone=null; - this.instructionsTabDone=null; - this.moveDown=null; - this.moveUp=null; this.fileItem=null; - this.viewFileItem=null; this.receivedFile=null; this.addContent=null; @@ -155,7 +122,9 @@ this.submitOfflineFile=null; this.submitOnlineFile=null; - this.choice=null; + this.dispatch=null; + + this.choice=null; this.choiceBasic=null; this.choiceAdvanced=null; this.choiceInstructions=null; @@ -642,54 +611,6 @@ this.removeOptionContent = removeOptionContent; } /** - * @return Returns the addQuestion. - */ - public String getAddQuestion() { - return addQuestion; - } - /** - * @param addQuestion The addQuestion to set. - */ - public void setAddQuestion(String addQuestion) { - this.addQuestion = addQuestion; - } - /** - * @return Returns the removeQuestion. - */ - public String getRemoveQuestion() { - return removeQuestion; - } - /** - * @param removeQuestion The removeQuestion to set. - */ - public void setRemoveQuestion(String removeQuestion) { - this.removeQuestion = removeQuestion; - } - /** - * @return Returns the editOptions. - */ - public String getEditOptions() { - return editOptions; - } - /** - * @param editOptions The editOptions to set. - */ - public void setEditOptions(String editOptions) { - this.editOptions = editOptions; - } - /** - * @return Returns the addOption. - */ - public String getAddOption() { - return addOption; - } - /** - * @param addOption The addOption to set. - */ - public void setAddOption(String addOption) { - this.addOption = addOption; - } - /** * @return Returns the optionIndex. */ public String getOptionIndex() { @@ -738,42 +659,6 @@ this.passmark = passmark; } /** - * @return Returns the removeOption. - */ - public String getRemoveOption() { - return removeOption; - } - /** - * @param removeOption The removeOption to set. - */ - public void setRemoveOption(String removeOption) { - this.removeOption = removeOption; - } - /** - * @return Returns the doneOptions. - */ - public String getDoneOptions() { - return doneOptions; - } - /** - * @param doneOptions The doneOptions to set. - */ - public void setDoneOptions(String doneOptions) { - this.doneOptions = doneOptions; - } - /** - * @return Returns the submitQuestions. - */ - public String getSubmitQuestions() { - return submitQuestions; - } - /** - * @param submitQuestions The submitQuestions to set. - */ - public void setSubmitQuestions(String submitQuestions) { - this.submitQuestions = submitQuestions; - } - /** * @return Returns the selectedIndex. */ public String getSelectedIndex() { @@ -786,30 +671,6 @@ this.selectedIndex = selectedIndex; } /** - * @return Returns the advancedTabDone. - */ - public String getAdvancedTabDone() { - return advancedTabDone; - } - /** - * @param advancedTabDone The advancedTabDone to set. - */ - public void setAdvancedTabDone(String advancedTabDone) { - this.advancedTabDone = advancedTabDone; - } - /** - * @return Returns the instructionsTabDone. - */ - public String getInstructionsTabDone() { - return instructionsTabDone; - } - /** - * @param instructionsTabDone The instructionsTabDone to set. - */ - public void setInstructionsTabDone(String instructionsTabDone) { - this.instructionsTabDone = instructionsTabDone; - } - /** * @return Returns the deletableOptionIndex. */ public String getDeletableOptionIndex() { @@ -834,30 +695,6 @@ this.sln = sln; } /** - * @return Returns the moveDown. - */ - public String getMoveDown() { - return moveDown; - } - /** - * @param moveDown The moveDown to set. - */ - public void setMoveDown(String moveDown) { - this.moveDown = moveDown; - } - /** - * @return Returns the moveUp. - */ - public String getMoveUp() { - return moveUp; - } - /** - * @param moveUp The moveUp to set. - */ - public void setMoveUp(String moveUp) { - this.moveUp = moveUp; - } - /** * @return Returns the fileItem. */ public String getFileItem() { @@ -870,18 +707,6 @@ this.fileItem = fileItem; } /** - * @return Returns the viewFileItem. - */ - public String getViewFileItem() { - return viewFileItem; - } - /** - * @param viewFileItem The viewFileItem to set. - */ - public void setViewFileItem(String viewFileItem) { - this.viewFileItem = viewFileItem; - } - /** * @return Returns the receivedFile. */ public FormFile getReceivedFile() { @@ -893,4 +718,12 @@ public void setReceivedFile(FormFile receivedFile) { this.receivedFile = receivedFile; } + + public String getDispatch() { + return dispatch; + } + + public void setDispatch(String buttonValue) { + this.dispatch = buttonValue; + } } Index: lams_tool_lamc/web/AdvancedContent.jsp =================================================================== diff -u -rf37e902802cd59114b62435f47e9106df830496d -rb7285ac977222460053f4293718569503f17fe1e --- lams_tool_lamc/web/AdvancedContent.jsp (.../AdvancedContent.jsp) (revision f37e902802cd59114b62435f47e9106df830496d) +++ lams_tool_lamc/web/AdvancedContent.jsp (.../AdvancedContent.jsp) (revision b7285ac977222460053f4293718569503f17fe1e) @@ -84,7 +84,7 @@   
Index: lams_tool_lamc/web/BasicContent.jsp =================================================================== diff -u -r25a3cd766f44f20c25042ad630f87b5b79a53671 -rb7285ac977222460053f4293718569503f17fe1e --- lams_tool_lamc/web/BasicContent.jsp (.../BasicContent.jsp) (revision 25a3cd766f44f20c25042ad630f87b5b79a53671) +++ lams_tool_lamc/web/BasicContent.jsp (.../BasicContent.jsp) (revision b7285ac977222460053f4293718569503f17fe1e) @@ -5,6 +5,17 @@ <%@ taglib uri="/WEB-INF/fmt.tld" prefix="fmt" %> <%@ taglib uri="fck-editor" prefix="FCK" %> +
- +
@@ -59,7 +70,7 @@ @@ -79,16 +90,16 @@ @@ -103,18 +114,14 @@
- + - ; document.forms[0].submit();"> + ','moveQuestionDown');"> - ; document.forms[0].submit();"> + ','moveQuestionUp');"> - ; document.forms[0].submit();"> - ; document.forms[0].submit();"> + ','moveQuestionDown');"> + ','moveQuestionUp');"> - ; document.forms[0].editOptions.value=1; document.forms[0].submit();"> - ; document.forms[0].removeQuestion.value=1; document.forms[0].submit();"> + ','editOptions');"> + ','removeQuestion');">
- - - - @@ -145,7 +152,7 @@ - + Index: lams_tool_lamc/web/IndividualLearnerResults.jsp =================================================================== diff -u -ra5ed179d80f07ee8130b5e3364700180ddc3c6f2 -rb7285ac977222460053f4293718569503f17fe1e --- lams_tool_lamc/web/IndividualLearnerResults.jsp (.../IndividualLearnerResults.jsp) (revision a5ed179d80f07ee8130b5e3364700180ddc3c6f2) +++ lams_tool_lamc/web/IndividualLearnerResults.jsp (.../IndividualLearnerResults.jsp) (revision b7285ac977222460053f4293718569503f17fe1e) @@ -121,15 +121,15 @@ - + - + Index: lams_tool_lamc/web/InstructionsContent.jsp =================================================================== diff -u -re69d075821d086db03316c2f15e6e1d74aba165f -rb7285ac977222460053f4293718569503f17fe1e --- lams_tool_lamc/web/InstructionsContent.jsp (.../InstructionsContent.jsp) (revision e69d075821d086db03316c2f15e6e1d74aba165f) +++ lams_tool_lamc/web/InstructionsContent.jsp (.../InstructionsContent.jsp) (revision b7285ac977222460053f4293718569503f17fe1e) @@ -5,6 +5,20 @@ <%@ taglib uri="/WEB-INF/fmt.tld" prefix="fmt" %> <%@ taglib uri="fck-editor" prefix="FCK" %> + + @@ -39,7 +53,7 @@ @@ -63,8 +77,8 @@ @@ -80,7 +94,7 @@ @@ -89,9 +103,7 @@ - - Index: lams_tool_lamc/web/OptionsContent.jsp =================================================================== diff -u -r25a3cd766f44f20c25042ad630f87b5b79a53671 -rb7285ac977222460053f4293718569503f17fe1e --- lams_tool_lamc/web/OptionsContent.jsp (.../OptionsContent.jsp) (revision 25a3cd766f44f20c25042ad630f87b5b79a53671) +++ lams_tool_lamc/web/OptionsContent.jsp (.../OptionsContent.jsp) (revision b7285ac977222460053f4293718569503f17fe1e) @@ -5,6 +5,17 @@ <%@ taglib uri="/WEB-INF/fmt.tld" prefix="fmt" %> <%@ taglib uri="fck-editor" prefix="FCK" %> + +
@@ -23,8 +37,8 @@ - - + +
- + ','viewFileItem');">
- - + +
- + ','viewFileItem');">
  @@ -102,7 +114,7 @@ - +
- - - - Index: lams_tool_lamc/web/WEB-INF/struts-config.xml =================================================================== diff -u -r129fb6ef682b1663fd382e81c5d2835a4a38f707 -rb7285ac977222460053f4293718569503f17fe1e --- lams_tool_lamc/web/WEB-INF/struts-config.xml (.../struts-config.xml) (revision 129fb6ef682b1663fd382e81c5d2835a4a38f707) +++ lams_tool_lamc/web/WEB-INF/struts-config.xml (.../struts-config.xml) (revision b7285ac977222460053f4293718569503f17fe1e) @@ -71,7 +71,7 @@ name="McAuthoringForm" scope="session" input=".questions" - parameter="method" + parameter="dispatch" unknown="false" validate="true" > @@ -166,12 +166,6 @@ /> - - + @@ -37,6 +38,25 @@ MM_reloadPage(true); //--> + + + @@ -85,8 +105,10 @@ - + + +
Index: lams_tool_lamc/web/authoringMaincontent.jsp =================================================================== diff -u -r7d4312121d0ac51529464536ca8203c445f5d433 -rb7285ac977222460053f4293718569503f17fe1e --- lams_tool_lamc/web/authoringMaincontent.jsp (.../authoringMaincontent.jsp) (revision 7d4312121d0ac51529464536ca8203c445f5d433) +++ lams_tool_lamc/web/authoringMaincontent.jsp (.../authoringMaincontent.jsp) (revision b7285ac977222460053f4293718569503f17fe1e) @@ -37,12 +37,31 @@ MM_reloadPage(true); //--> + +

+
@@ -23,26 +34,6 @@
@@ -53,7 +44,7 @@ @@ -93,7 +84,7 @@ @@ -128,7 +119,7 @@ @@ -138,7 +129,6 @@
- + - +
- ; document.forms[0].submit();"> + ,'removeOption');">
@@ -177,7 +167,7 @@
- +
@@ -85,10 +104,12 @@ - + + +

Index: lams_tool_lamc/web/images/cross.gif =================================================================== diff -u Binary files differ Index: lams_tool_lamc/web/images/tick.gif =================================================================== diff -u Binary files differ