Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/QaAppConstants.java =================================================================== diff -u -r26ea61eae29934bddf4595c3c1aededeeeaca933 -r54f906e5eac47a11e098a119a9faf34a81c624ff --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/QaAppConstants.java (.../QaAppConstants.java) (revision 26ea61eae29934bddf4595c3c1aededeeeaca933) +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/QaAppConstants.java (.../QaAppConstants.java) (revision 54f906e5eac47a11e098a119a9faf34a81c624ff) @@ -91,7 +91,6 @@ public static final String GENERAL_LEARNER_FLOW_DTO = "generalLearnerFlowDTO"; public static final Long INITIAL_QUESTION_COUNT = new Long(1); - public static final String QA_GENERAL_AUTHORING_DTO = "qaGeneralAuthoringDTO"; /* * Struts level constants Fisheye: Tag 54f906e5eac47a11e098a119a9faf34a81c624ff refers to a dead (removed) revision in file `lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/dto/QaGeneralAuthoringDTO.java'. Fisheye: No comparison available. Pass `N' to diff? Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/util/QaUtils.java =================================================================== diff -u -r26ea61eae29934bddf4595c3c1aededeeeaca933 -r54f906e5eac47a11e098a119a9faf34a81c624ff --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/util/QaUtils.java (.../QaUtils.java) (revision 26ea61eae29934bddf4595c3c1aededeeeaca933) +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/util/QaUtils.java (.../QaUtils.java) (revision 54f906e5eac47a11e098a119a9faf34a81c624ff) @@ -28,7 +28,6 @@ import org.apache.commons.lang.StringUtils; import org.lamsfoundation.lams.tool.ToolAccessMode; import org.lamsfoundation.lams.tool.qa.QaAppConstants; -import org.lamsfoundation.lams.tool.qa.dto.QaGeneralAuthoringDTO; import org.lamsfoundation.lams.tool.qa.web.form.QaAuthoringForm; import org.lamsfoundation.lams.util.WebUtil; import org.lamsfoundation.lams.web.util.AttributeNames; @@ -41,55 +40,45 @@ public abstract class QaUtils implements QaAppConstants { public static void setFormProperties(HttpServletRequest request, QaAuthoringForm qaAuthoringForm, - QaGeneralAuthoringDTO qaGeneralAuthoringDTO, String strToolContentID, String httpSessionID) { + String strToolContentID, String httpSessionID) { qaAuthoringForm.setHttpSessionID(httpSessionID); - qaGeneralAuthoringDTO.setHttpSessionID(httpSessionID); qaAuthoringForm.setToolContentID(strToolContentID); String usernameVisible = request.getParameter(USERNAME_VISIBLE); qaAuthoringForm.setUsernameVisible(usernameVisible); - qaGeneralAuthoringDTO.setUsernameVisible(usernameVisible); String allowRateAnswers = request.getParameter(ALLOW_RATE_ANSWERS); qaAuthoringForm.setAllowRateAnswers(allowRateAnswers); - qaGeneralAuthoringDTO.setAllowRateAnswers(allowRateAnswers); String notifyTeachersOnResponseSubmit = request.getParameter(NOTIFY_TEACHERS_ON_RESPONSE_SUBMIT); qaAuthoringForm.setNotifyTeachersOnResponseSubmit(notifyTeachersOnResponseSubmit); String showOtherAnswers = request.getParameter("showOtherAnswers"); qaAuthoringForm.setShowOtherAnswers(showOtherAnswers); - qaGeneralAuthoringDTO.setShowOtherAnswers(showOtherAnswers); String questionsSequenced = request.getParameter(QUESTIONS_SEQUENCED); qaAuthoringForm.setQuestionsSequenced(questionsSequenced); - qaGeneralAuthoringDTO.setQuestionsSequenced(questionsSequenced); String lockWhenFinished = request.getParameter("lockWhenFinished"); qaAuthoringForm.setLockWhenFinished(lockWhenFinished); - qaGeneralAuthoringDTO.setLockWhenFinished(lockWhenFinished); int minimumRates = WebUtil.readIntParam(request, MINIMUM_RATES, true) == null ? 0 : WebUtil.readIntParam(request, MINIMUM_RATES); qaAuthoringForm.setMinimumRates(minimumRates); - qaGeneralAuthoringDTO.setMinimumRates(minimumRates); int maximumRates = WebUtil.readIntParam(request, MAXIMUM_RATES, true) == null ? 0 : WebUtil.readIntParam(request, MAXIMUM_RATES); qaAuthoringForm.setMaximumRates(maximumRates); - qaGeneralAuthoringDTO.setMaximumRates(maximumRates); String reflect = request.getParameter(REFLECT); qaAuthoringForm.setReflect(reflect); - qaGeneralAuthoringDTO.setReflect(reflect); String reflectionSubject = request.getParameter(REFLECTION_SUBJECT); qaAuthoringForm.setReflectionSubject(reflectionSubject); - qaGeneralAuthoringDTO.setReflectionSubject(reflectionSubject); ToolAccessMode mode; String modeStr = request.getParameter(AttributeNames.ATTR_MODE); Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaAction.java =================================================================== diff -u -r26ea61eae29934bddf4595c3c1aededeeeaca933 -r54f906e5eac47a11e098a119a9faf34a81c624ff --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaAction.java (.../QaAction.java) (revision 26ea61eae29934bddf4595c3c1aededeeeaca933) +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaAction.java (.../QaAction.java) (revision 54f906e5eac47a11e098a119a9faf34a81c624ff) @@ -56,7 +56,6 @@ import org.lamsfoundation.lams.tool.qa.QaConfigItem; import org.lamsfoundation.lams.tool.qa.QaContent; import org.lamsfoundation.lams.tool.qa.QaQueContent; -import org.lamsfoundation.lams.tool.qa.dto.QaGeneralAuthoringDTO; import org.lamsfoundation.lams.tool.qa.dto.QaQuestionDTO; import org.lamsfoundation.lams.tool.qa.service.IQaService; import org.lamsfoundation.lams.tool.qa.service.QaServiceProxy; @@ -117,15 +116,8 @@ String richTextTitle = request.getParameter(QaAppConstants.TITLE); String richTextInstructions = request.getParameter(QaAppConstants.INSTRUCTIONS); - QaGeneralAuthoringDTO qaGeneralAuthoringDTO = new QaGeneralAuthoringDTO(); - qaGeneralAuthoringDTO.setContentFolderID(contentFolderID); - qaGeneralAuthoringDTO.setActivityInstructions(richTextInstructions); - qaGeneralAuthoringDTO.setActivityTitle(richTextTitle); - qaGeneralAuthoringDTO.setToolContentID(strToolContentID); - qaGeneralAuthoringDTO.setHttpSessionID(httpSessionID); - request.setAttribute(QaAppConstants.QA_GENERAL_AUTHORING_DTO, qaGeneralAuthoringDTO); - qaAuthoringForm.setTitle(richTextTitle); + qaAuthoringForm.setInstructions(richTextInstructions); sessionMap.put(QaAppConstants.ACTIVITY_TITLE_KEY, richTextTitle); sessionMap.put(QaAppConstants.ACTIVITY_INSTRUCTIONS_KEY, richTextInstructions); @@ -184,14 +176,13 @@ .get(AttributeNames.ATTR_RATING_CRITERIAS); qaService.saveRatingCriterias(request, oldCriterias, toolContentID); - QaUtils.setFormProperties(request, qaAuthoringForm, qaGeneralAuthoringDTO, strToolContentID, httpSessionID); + QaUtils.setFormProperties(request, qaAuthoringForm, strToolContentID, httpSessionID); request.setAttribute(AuthoringConstants.LAMS_AUTHORING_SUCCESS_FLAG, Boolean.TRUE); } else { if (qaContent != null) { - QaUtils.setFormProperties(request, qaAuthoringForm, qaGeneralAuthoringDTO, strToolContentID, - httpSessionID); + QaUtils.setFormProperties(request, qaAuthoringForm, strToolContentID, httpSessionID); } } @@ -408,10 +399,6 @@ String editQuestionBoxRequest = request.getParameter("editQuestionBoxRequest"); - QaGeneralAuthoringDTO qaGeneralAuthoringDTO = new QaGeneralAuthoringDTO(); - - qaGeneralAuthoringDTO.setContentFolderID(contentFolderID); - List questionDTOs = (List) sessionMap.get(QaAppConstants.LIST_QUESTION_DTOS); String newQuestion = request.getParameter("newQuestion"); @@ -494,28 +481,20 @@ String richTextTitle = request.getParameter(QaAppConstants.TITLE); String richTextInstructions = request.getParameter(QaAppConstants.INSTRUCTIONS); - qaGeneralAuthoringDTO.setActivityTitle(richTextTitle); qaAuthoringForm.setTitle(richTextTitle); + qaAuthoringForm.setInstructions(richTextInstructions); - qaGeneralAuthoringDTO.setActivityInstructions(richTextInstructions); - sessionMap.put(QaAppConstants.ACTIVITY_TITLE_KEY, richTextTitle); sessionMap.put(QaAppConstants.ACTIVITY_INSTRUCTIONS_KEY, richTextInstructions); - qaGeneralAuthoringDTO.setEditActivityEditMode(new Boolean(true).toString()); - request.getSession().setAttribute(httpSessionID, sessionMap); - QaUtils.setFormProperties(request, qaAuthoringForm, qaGeneralAuthoringDTO, strToolContentID, httpSessionID); + QaUtils.setFormProperties(request, qaAuthoringForm, strToolContentID, httpSessionID); - qaGeneralAuthoringDTO.setToolContentID(strToolContentID); - qaGeneralAuthoringDTO.setHttpSessionID(httpSessionID); - qaAuthoringForm.setToolContentID(strToolContentID); qaAuthoringForm.setHttpSessionID(httpSessionID); qaAuthoringForm.setCurrentTab("1"); - request.setAttribute(QaAppConstants.QA_GENERAL_AUTHORING_DTO, qaGeneralAuthoringDTO); request.getSession().setAttribute(httpSessionID, sessionMap); request.setAttribute(QaAppConstants.TOTAL_QUESTION_COUNT, new Integer(questionDTOs.size())); return mapping.findForward(QaAppConstants.LOAD_QUESTIONS); @@ -539,10 +518,6 @@ String strToolContentID = request.getParameter(AttributeNames.PARAM_TOOL_CONTENT_ID); - QaGeneralAuthoringDTO qaGeneralAuthoringDTO = new QaGeneralAuthoringDTO(); - - qaGeneralAuthoringDTO.setContentFolderID(contentFolderID); - List questionDTOs = (List) sessionMap.get(QaAppConstants.LIST_QUESTION_DTOS); String newQuestion = request.getParameter("newQuestion"); @@ -576,27 +551,20 @@ String richTextTitle = request.getParameter(QaAppConstants.TITLE); String richTextInstructions = request.getParameter(QaAppConstants.INSTRUCTIONS); - qaGeneralAuthoringDTO.setActivityTitle(richTextTitle); qaAuthoringForm.setTitle(richTextTitle); + qaAuthoringForm.setInstructions(richTextInstructions); - qaGeneralAuthoringDTO.setActivityInstructions(richTextInstructions); - sessionMap.put(QaAppConstants.ACTIVITY_TITLE_KEY, richTextTitle); sessionMap.put(QaAppConstants.ACTIVITY_INSTRUCTIONS_KEY, richTextInstructions); - qaGeneralAuthoringDTO.setEditActivityEditMode(new Boolean(true).toString()); request.getSession().setAttribute(httpSessionID, sessionMap); - QaUtils.setFormProperties(request, qaAuthoringForm, qaGeneralAuthoringDTO, strToolContentID, httpSessionID); + QaUtils.setFormProperties(request, qaAuthoringForm, strToolContentID, httpSessionID); - qaGeneralAuthoringDTO.setToolContentID(strToolContentID); - qaGeneralAuthoringDTO.setHttpSessionID(httpSessionID); - qaAuthoringForm.setToolContentID(strToolContentID); qaAuthoringForm.setHttpSessionID(httpSessionID); qaAuthoringForm.setCurrentTab("1"); - request.setAttribute(QaAppConstants.QA_GENERAL_AUTHORING_DTO, qaGeneralAuthoringDTO); request.getSession().setAttribute(httpSessionID, sessionMap); request.setAttribute(QaAppConstants.TOTAL_QUESTION_COUNT, new Integer(questionDTOs.size())); return mapping.findForward(QaAppConstants.LOAD_QUESTIONS); @@ -622,24 +590,15 @@ String strToolContentID = request.getParameter(AttributeNames.PARAM_TOOL_CONTENT_ID); - QaGeneralAuthoringDTO qaGeneralAuthoringDTO = new QaGeneralAuthoringDTO(); - - qaGeneralAuthoringDTO.setContentFolderID(contentFolderID); - String richTextTitle = request.getParameter(QaAppConstants.TITLE); String richTextInstructions = request.getParameter(QaAppConstants.INSTRUCTIONS); - qaGeneralAuthoringDTO.setActivityTitle(richTextTitle); - qaAuthoringForm.setTitle(richTextTitle); + qaAuthoringForm.setInstructions(richTextInstructions); - qaGeneralAuthoringDTO.setActivityInstructions(richTextInstructions); + QaUtils.setFormProperties(request, qaAuthoringForm, strToolContentID, httpSessionID); - QaUtils.setFormProperties(request, qaAuthoringForm, qaGeneralAuthoringDTO, strToolContentID, httpSessionID); - - request.setAttribute(QaAppConstants.QA_GENERAL_AUTHORING_DTO, qaGeneralAuthoringDTO); - Collection questionDTOs = (Collection) sessionMap .get(QaAppConstants.LIST_QUESTION_DTOS); @@ -699,27 +658,19 @@ String strToolContentID = request.getParameter(AttributeNames.PARAM_TOOL_CONTENT_ID); - QaGeneralAuthoringDTO qaGeneralAuthoringDTO = new QaGeneralAuthoringDTO(); - - qaGeneralAuthoringDTO.setContentFolderID(contentFolderID); - String richTextTitle = request.getParameter(QaAppConstants.TITLE); String richTextInstructions = request.getParameter(QaAppConstants.INSTRUCTIONS); - qaGeneralAuthoringDTO.setActivityTitle(richTextTitle); qaAuthoringForm.setTitle(richTextTitle); + qaAuthoringForm.setInstructions(richTextInstructions); - qaGeneralAuthoringDTO.setActivityInstructions(richTextInstructions); + QaUtils.setFormProperties(request, qaAuthoringForm, strToolContentID, httpSessionID); - QaUtils.setFormProperties(request, qaAuthoringForm, qaGeneralAuthoringDTO, strToolContentID, httpSessionID); - - qaGeneralAuthoringDTO.setEditableQuestionText(editableQuestion); - qaGeneralAuthoringDTO.setEditableQuestionFeedback(editableFeedback); qaAuthoringForm.setRequired(requiredBoolean); qaAuthoringForm.setMinWordsLimit(minWordsLimit); + qaAuthoringForm.setEditableQuestionText(editableQuestion); + qaAuthoringForm.setFeedback(editableFeedback); - request.setAttribute(QaAppConstants.QA_GENERAL_AUTHORING_DTO, qaGeneralAuthoringDTO); - request.setAttribute(QaAppConstants.TOTAL_QUESTION_COUNT, new Integer(questionDTOs.size())); return mapping.findForward("editQuestionBox"); @@ -788,20 +739,13 @@ sessionMap.put(QaAppConstants.ACTIVITY_TITLE_KEY, richTextTitle); sessionMap.put(QaAppConstants.ACTIVITY_INSTRUCTIONS_KEY, richTextInstructions); String strToolContentID = request.getParameter(AttributeNames.PARAM_TOOL_CONTENT_ID); - QaGeneralAuthoringDTO qaGeneralAuthoringDTO = new QaGeneralAuthoringDTO(); - qaGeneralAuthoringDTO.setContentFolderID(contentFolderID); - qaGeneralAuthoringDTO.setActivityTitle(richTextTitle); qaAuthoringForm.setTitle(richTextTitle); - qaGeneralAuthoringDTO.setActivityInstructions(richTextInstructions); - qaGeneralAuthoringDTO.setEditActivityEditMode(new Boolean(true).toString()); + qaAuthoringForm.setInstructions(richTextInstructions); request.getSession().setAttribute(httpSessionID, sessionMap); - QaUtils.setFormProperties(request, qaAuthoringForm, qaGeneralAuthoringDTO, strToolContentID, httpSessionID); - qaGeneralAuthoringDTO.setToolContentID(strToolContentID); - qaGeneralAuthoringDTO.setHttpSessionID(httpSessionID); + QaUtils.setFormProperties(request, qaAuthoringForm, strToolContentID, httpSessionID); qaAuthoringForm.setToolContentID(strToolContentID); qaAuthoringForm.setHttpSessionID(httpSessionID); qaAuthoringForm.setCurrentTab("1"); - request.setAttribute(QaAppConstants.QA_GENERAL_AUTHORING_DTO, qaGeneralAuthoringDTO); return mapping.findForward(QaAppConstants.LOAD_QUESTIONS); } @@ -842,29 +786,18 @@ String strToolContentID = request.getParameter(AttributeNames.PARAM_TOOL_CONTENT_ID); - QaGeneralAuthoringDTO qaGeneralAuthoringDTO = new QaGeneralAuthoringDTO(); - qaGeneralAuthoringDTO.setContentFolderID(contentFolderID); - - qaGeneralAuthoringDTO.setActivityTitle(richTextTitle); qaAuthoringForm.setTitle(richTextTitle); - - qaGeneralAuthoringDTO.setActivityInstructions(richTextInstructions); - - qaGeneralAuthoringDTO.setEditActivityEditMode(new Boolean(true).toString()); - + qaAuthoringForm.setInstructions(richTextInstructions); request.getSession().setAttribute(httpSessionID, sessionMap); - QaUtils.setFormProperties(request, qaAuthoringForm, qaGeneralAuthoringDTO, strToolContentID, httpSessionID); + QaUtils.setFormProperties(request, qaAuthoringForm, strToolContentID, httpSessionID); - qaGeneralAuthoringDTO.setToolContentID(strToolContentID); - qaGeneralAuthoringDTO.setHttpSessionID(httpSessionID); qaAuthoringForm.setToolContentID(strToolContentID); qaAuthoringForm.setHttpSessionID(httpSessionID); qaAuthoringForm.setCurrentTab("1"); request.setAttribute(QaAppConstants.LIST_QUESTION_DTOS, questionDTOs); - request.setAttribute(QaAppConstants.QA_GENERAL_AUTHORING_DTO, qaGeneralAuthoringDTO); request.setAttribute(QaAppConstants.TOTAL_QUESTION_COUNT, new Integer(questionDTOs.size())); return mapping.findForward(QaAppConstants.LOAD_QUESTIONS); } @@ -906,30 +839,19 @@ String strToolContentID = request.getParameter(AttributeNames.PARAM_TOOL_CONTENT_ID); - QaGeneralAuthoringDTO qaGeneralAuthoringDTO = new QaGeneralAuthoringDTO(); - - qaGeneralAuthoringDTO.setContentFolderID(contentFolderID); - - qaGeneralAuthoringDTO.setActivityTitle(richTextTitle); qaAuthoringForm.setTitle(richTextTitle); + qaAuthoringForm.setInstructions(richTextInstructions); - qaGeneralAuthoringDTO.setActivityInstructions(richTextInstructions); - - qaGeneralAuthoringDTO.setEditActivityEditMode(new Boolean(true).toString()); - request.getSession().setAttribute(httpSessionID, sessionMap); - QaUtils.setFormProperties(request, qaAuthoringForm, qaGeneralAuthoringDTO, strToolContentID, httpSessionID); + QaUtils.setFormProperties(request, qaAuthoringForm, strToolContentID, httpSessionID); - qaGeneralAuthoringDTO.setToolContentID(strToolContentID); - qaGeneralAuthoringDTO.setHttpSessionID(httpSessionID); qaAuthoringForm.setToolContentID(strToolContentID); qaAuthoringForm.setHttpSessionID(httpSessionID); qaAuthoringForm.setCurrentTab("1"); request.setAttribute(QaAppConstants.LIST_QUESTION_DTOS, questionDTOs); - request.setAttribute(QaAppConstants.QA_GENERAL_AUTHORING_DTO, qaGeneralAuthoringDTO); request.setAttribute(QaAppConstants.TOTAL_QUESTION_COUNT, new Integer(questionDTOs.size())); return mapping.findForward(QaAppConstants.LOAD_QUESTIONS); } Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaStarterAction.java =================================================================== diff -u -r26ea61eae29934bddf4595c3c1aededeeeaca933 -r54f906e5eac47a11e098a119a9faf34a81c624ff --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaStarterAction.java (.../QaStarterAction.java) (revision 26ea61eae29934bddf4595c3c1aededeeeaca933) +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaStarterAction.java (.../QaStarterAction.java) (revision 54f906e5eac47a11e098a119a9faf34a81c624ff) @@ -52,7 +52,6 @@ import org.lamsfoundation.lams.tool.qa.QaCondition; import org.lamsfoundation.lams.tool.qa.QaContent; import org.lamsfoundation.lams.tool.qa.QaQueContent; -import org.lamsfoundation.lams.tool.qa.dto.QaGeneralAuthoringDTO; import org.lamsfoundation.lams.tool.qa.dto.QaQuestionDTO; import org.lamsfoundation.lams.tool.qa.service.IQaService; import org.lamsfoundation.lams.tool.qa.service.QaServiceProxy; @@ -81,9 +80,6 @@ String contentFolderID = WebUtil.readStrParam(request, AttributeNames.PARAM_CONTENT_FOLDER_ID); qaAuthoringForm.setContentFolderID(contentFolderID); - QaGeneralAuthoringDTO qaGeneralAuthoringDTO = new QaGeneralAuthoringDTO(); - qaGeneralAuthoringDTO.setContentFolderID(contentFolderID); - qaAuthoringForm.resetRadioBoxes(); IQaService qaService = null; @@ -93,23 +89,19 @@ qaService = QaServiceProxy.getQaService(getServlet().getServletContext()); } - qaGeneralAuthoringDTO.setCurrentTab("1"); + validateDefaultContent(request, mapping, qaService, qaAuthoringForm); - validateDefaultContent(request, mapping, qaService, qaGeneralAuthoringDTO, qaAuthoringForm); - //no problems getting the default content, will render authoring screen String strToolContentID = ""; /* the authoring url must be passed a tool content id */ strToolContentID = request.getParameter(AttributeNames.PARAM_TOOL_CONTENT_ID); - qaGeneralAuthoringDTO.setToolContentID(strToolContentID); qaAuthoringForm.setToolContentID(strToolContentID); SessionMap sessionMap = new SessionMap(); sessionMap.put(QaAppConstants.ACTIVITY_TITLE_KEY, ""); sessionMap.put(QaAppConstants.ACTIVITY_INSTRUCTIONS_KEY, ""); sessionMap.put(AttributeNames.PARAM_CONTENT_FOLDER_ID, contentFolderID); qaAuthoringForm.setHttpSessionID(sessionMap.getSessionID()); - qaGeneralAuthoringDTO.setHttpSessionID(sessionMap.getSessionID()); if (strToolContentID == null || strToolContentID.equals("")) { QaUtils.cleanUpSessionAbsolute(request); @@ -128,7 +120,7 @@ } } - prepareDTOandForm(request, qaAuthoringForm, qaContent, qaService, qaGeneralAuthoringDTO, sessionMap); + prepareDTOandForm(request, qaAuthoringForm, qaContent, qaService, sessionMap); ToolAccessMode mode = getAccessMode(request); // request is from monitoring module @@ -141,10 +133,7 @@ conditionList.clear(); conditionList.addAll(qaContent.getConditions()); - qaGeneralAuthoringDTO.setAllowRichEditor(qaContent.isAllowRichEditor()); qaAuthoringForm.setAllowRichEditor(qaContent.isAllowRichEditor()); - - qaGeneralAuthoringDTO.setUseSelectLeaderToolOuput(qaContent.isUseSelectLeaderToolOuput()); qaAuthoringForm.setUseSelectLeaderToolOuput(qaContent.isUseSelectLeaderToolOuput()); sessionMap.put(QaAppConstants.ATTR_QA_AUTHORING_FORM, qaAuthoringForm); @@ -154,8 +143,6 @@ List ratingCriterias = qaService.getRatingCriterias(qaContent.getQaContentId()); sessionMap.put(AttributeNames.ATTR_RATING_CRITERIAS, ratingCriterias); - request.setAttribute(QaAppConstants.QA_GENERAL_AUTHORING_DTO, qaGeneralAuthoringDTO); - return mapping.findForward(LOAD_QUESTIONS); } @@ -170,8 +157,7 @@ * @return ActionForward */ protected QaContent prepareDTOandForm(HttpServletRequest request, QaAuthoringForm qaAuthoringForm, - QaContent qaContent, IQaService qaService, QaGeneralAuthoringDTO qaGeneralAuthoringDTO, - SessionMap sessionMap) { + QaContent qaContent, IQaService qaService, SessionMap sessionMap) { qaAuthoringForm.setUsernameVisible(qaContent.isUsernameVisible() ? "1" : "0"); qaAuthoringForm.setAllowRateAnswers(qaContent.isAllowRateAnswers() ? "1" : "0"); @@ -182,23 +168,13 @@ qaAuthoringForm.setNoReeditAllowed(qaContent.isNoReeditAllowed() ? "1" : "0"); qaAuthoringForm.setMaximumRates(qaContent.getMaximumRates()); qaAuthoringForm.setMinimumRates(qaContent.getMinimumRates()); - - qaGeneralAuthoringDTO.setReflect(qaContent.isReflect() ? "1" : "0"); - qaAuthoringForm.setReflect(qaContent.isReflect() ? "1" : "0"); - qaAuthoringForm.setReflectionSubject(qaContent.getReflectionSubject()); - qaGeneralAuthoringDTO.setReflectionSubject(qaContent.getReflectionSubject()); - - qaGeneralAuthoringDTO.setActivityTitle(qaContent.getTitle()); qaAuthoringForm.setTitle(qaContent.getTitle()); - - qaGeneralAuthoringDTO.setActivityInstructions(qaContent.getInstructions()); qaAuthoringForm.setInstructions(qaContent.getInstructions()); + sessionMap.put(QaAppConstants.ACTIVITY_TITLE_KEY, qaContent.getTitle()); + sessionMap.put(QaAppConstants.ACTIVITY_INSTRUCTIONS_KEY, qaContent.getInstructions()); - sessionMap.put(QaAppConstants.ACTIVITY_TITLE_KEY, qaGeneralAuthoringDTO.getActivityTitle()); - sessionMap.put(QaAppConstants.ACTIVITY_INSTRUCTIONS_KEY, qaGeneralAuthoringDTO.getActivityInstructions()); - List questionDTOs = new LinkedList(); /* @@ -250,7 +226,7 @@ * @return ActionForward */ public boolean validateDefaultContent(HttpServletRequest request, ActionMapping mapping, IQaService qaService, - QaGeneralAuthoringDTO qaGeneralAuthoringDTO, QaAuthoringForm qaAuthoringForm) { + QaAuthoringForm qaAuthoringForm) { /* * retrieve the default content id based on tool signature Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/form/QaAuthoringForm.java =================================================================== diff -u -r26ea61eae29934bddf4595c3c1aededeeeaca933 -r54f906e5eac47a11e098a119a9faf34a81c624ff --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/form/QaAuthoringForm.java (.../QaAuthoringForm.java) (revision 26ea61eae29934bddf4595c3c1aededeeeaca933) +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/form/QaAuthoringForm.java (.../QaAuthoringForm.java) (revision 54f906e5eac47a11e098a119a9faf34a81c624ff) @@ -77,6 +77,7 @@ private String contentFolderID; private String addSingleQuestion; private String editableQuestionIndex; + protected String editableQuestionText; private String feedback; private boolean required; private int minWordsLimit; @@ -687,6 +688,21 @@ } /** + * @return Returns the editableQuestionText. + */ + public String getEditableQuestionText() { + return editableQuestionText; + } + + /** + * @param editableQuestionText + * The editableQuestionText to set. + */ + public void setEditableQuestionText(String editableQuestionText) { + this.editableQuestionText = editableQuestionText; + } + + /** * @return Returns the feedback. */ public String getFeedback() { Index: lams_tool_laqa/web/authoring/BasicContent.jsp =================================================================== diff -u -r0e1a123434691d9876f2c7a50c0f18fef94647be -r54f906e5eac47a11e098a119a9faf34a81c624ff --- lams_tool_laqa/web/authoring/BasicContent.jsp (.../BasicContent.jsp) (revision 0e1a123434691d9876f2c7a50c0f18fef94647be) +++ lams_tool_laqa/web/authoring/BasicContent.jsp (.../BasicContent.jsp) (revision 54f906e5eac47a11e098a119a9faf34a81c624ff) @@ -1,4 +1,5 @@ <%@ include file="/common/taglibs.jsp"%> +