Index: lams_tool_laqa/conf/hibernate/mappings/org/lamsfoundation/lams/tool/qa/QaContent.hbm.xml
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_laqa/conf/hibernate/mappings/org/lamsfoundation/lams/tool/qa/QaContent.hbm.xml,v
diff -u -r1.10 -r1.10.6.1
--- lams_tool_laqa/conf/hibernate/mappings/org/lamsfoundation/lams/tool/qa/QaContent.hbm.xml 21 Oct 2008 02:25:35 -0000 1.10
+++ lams_tool_laqa/conf/hibernate/mappings/org/lamsfoundation/lams/tool/qa/QaContent.hbm.xml 11 May 2009 04:36:36 -0000 1.10.6.1
@@ -138,7 +138,13 @@
length="1"
/>
-
+
conditions) {
+ Set qaSessions, Set qaUploadedFiles, Set conditions, boolean allowRichEditor) {
this.qaContentId = qaContentId;
this.content = content;
this.title = title;
@@ -164,6 +166,7 @@
this.qaSessions = qaSessions;
this.qaUploadedFiles = qaUploadedFiles;
this.conditions = conditions;
+ this.allowRichEditor = allowRichEditor;
QaContent.logger.debug(QaContent.logger + " " + this.getClass().getName() + "in full constructor: QaContent()");
}
@@ -186,7 +189,7 @@
.isQuestionsSequenced(), qa.isUsernameVisible(), qa.isSynchInMonitor(), qa.isLockWhenFinished(), qa
.isContentLocked(), qa.isShowOtherAnswers(), qa.isReflect(), qa.getReflectionSubject(), qa
.getCreationDate(), qa.getUpdateDate(), new TreeSet(), new TreeSet(), new TreeSet(),
- new TreeSet(new TextSearchConditionComparator()));
+ new TreeSet(new TextSearchConditionComparator()), qa.isAllowRichEditor());
newContent.setQaQueContents(qa.deepCopyQaQueContent(newContent));
@@ -628,7 +631,16 @@
public void setLockWhenFinished(boolean lockWhenFinished) {
this.lockWhenFinished = lockWhenFinished;
}
+
+
+ public boolean isAllowRichEditor() {
+ return allowRichEditor;
+ }
+ public void setAllowRichEditor(boolean allowRichEditor) {
+ this.allowRichEditor = allowRichEditor;
+ }
+
/**
* @return Returns the showOtherAnswers.
*/
Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/QaGeneralAuthoringDTO.java
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/Attic/QaGeneralAuthoringDTO.java,v
diff -u -r1.6 -r1.6.4.1
--- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/QaGeneralAuthoringDTO.java 19 Feb 2009 04:25:01 -0000 1.6
+++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/QaGeneralAuthoringDTO.java 11 May 2009 04:36:36 -0000 1.6.4.1
@@ -59,6 +59,7 @@
protected String lockWhenFinished;
protected String editActivityEditMode;
protected String reflectionSubject;
+ protected Boolean allowRichEditor;
protected String monitoredContentInUse;
@@ -600,4 +601,14 @@
public void setShowOtherAnswers(String showOtherAnswers) {
this.showOtherAnswers = showOtherAnswers;
}
+
+ public Boolean getAllowRichEditor() {
+ return allowRichEditor;
+ }
+
+ public void setAllowRichEditor(Boolean allowRichEditor) {
+ this.allowRichEditor = allowRichEditor;
+ }
+
+
}
Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/dbupdates/patch20081126_updateFrom22.sql
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/dbupdates/patch20081126_updateFrom22.sql,v
diff -u -r1.1 -r1.1.4.1
--- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/dbupdates/patch20081126_updateFrom22.sql 9 Dec 2008 05:38:15 -0000 1.1
+++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/dbupdates/patch20081126_updateFrom22.sql 11 May 2009 04:36:36 -0000 1.1.4.1
@@ -7,6 +7,8 @@
UPDATE lams_tool SET pedagogical_planner_url='tool/laqa11/pedagogicalPlanner.do' WHERE tool_signature='laqa11';
+alter table tl_laqa11_content add column allow_rich_editor TINYINT(1) NOT NULL DEFAULT 0;
+
----------------------Put all sql statements above here-------------------------
-- If there were no errors, commit and restore autocommit to on
Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/AuthoringUtil.java
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/AuthoringUtil.java,v
diff -u -r1.49 -r1.49.4.1
--- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/AuthoringUtil.java 19 Feb 2009 23:59:14 -0000 1.49
+++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/AuthoringUtil.java 11 May 2009 04:36:36 -0000 1.49.4.1
@@ -49,6 +49,7 @@
import org.lamsfoundation.lams.tool.qa.util.QaQueContentComparator;
import org.lamsfoundation.lams.tool.qa.util.QaQuestionContentDTOComparator;
import org.lamsfoundation.lams.usermanagement.dto.UserDTO;
+import org.lamsfoundation.lams.util.WebUtil;
import org.lamsfoundation.lams.web.session.SessionManager;
import org.lamsfoundation.lams.web.util.AttributeNames;
@@ -349,6 +350,9 @@
String questionsSequenced = request.getParameter(QaAppConstants.QUESTIONS_SEQUENCED);
String lockWhenFinished = request.getParameter("lockWhenFinished");
+
+ String allowRichEditor = request.getParameter("allowRichEditor");
+
String richTextOfflineInstructions = request.getParameter(QaAppConstants.OFFLINE_INSTRUCTIONS);
String richTextOnlineInstructions = request.getParameter(QaAppConstants.ONLINE_INSTRUCTIONS);
@@ -370,6 +374,7 @@
boolean usernameVisibleBoolean = false;
boolean showOtherAnswersBoolean = false;
boolean reflectBoolean = false;
+ boolean allowRichEditorBoolean = false;
if (questionsSequenced != null && questionsSequenced.equalsIgnoreCase("1")) {
questionsSequencedBoolean = true;
@@ -390,6 +395,10 @@
if (showOtherAnswers != null && showOtherAnswers.equalsIgnoreCase("1")) {
showOtherAnswersBoolean = true;
}
+
+ if (allowRichEditor != null && allowRichEditor.equalsIgnoreCase("1")) {
+ allowRichEditorBoolean = true;
+ }
if (reflect != null && reflect.equalsIgnoreCase("1")) {
reflectBoolean = true;
@@ -431,6 +440,7 @@
qaContent.setSynchInMonitor(synchInMonitorBoolean);
qaContent.setReflect(reflectBoolean);
qaContent.setReflectionSubject(reflectionSubject);
+ qaContent.setAllowRichEditor(allowRichEditorBoolean);
}
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.25 -r1.25.4.1
--- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaAuthoringForm.java 19 Feb 2009 04:25:02 -0000 1.25
+++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaAuthoringForm.java 11 May 2009 04:36:35 -0000 1.25.4.1
@@ -97,6 +97,8 @@
protected String defaultContentIdStr;
protected Map mapQuestionContent;
protected IQaService qaService;
+
+ protected boolean allowRichEditor;
public void resetUserAction() {
this.addContent = null;
@@ -112,6 +114,7 @@
this.editActivityMonitoring = null;
this.statsMonitoring = null;
this.edit = null;
+ this.allowRichEditor = false;
}
public void reset() {
@@ -143,6 +146,7 @@
this.questionsSequenced = null;
this.lockWhenFinished = null;
this.reflect = null;
+ this.allowRichEditor = false;
this.summaryMonitoring = null;
this.instructionsMonitoring = null;
@@ -159,6 +163,7 @@
this.questionsSequenced = OPTION_OFF;
this.lockWhenFinished = OPTION_OFF;
this.reflect = OPTION_OFF;
+ this.allowRichEditor = false;
}
public String toString() {
@@ -878,4 +883,12 @@
public void setShowOtherAnswers(String showOtherAnswers) {
this.showOtherAnswers = showOtherAnswers;
}
+
+ public boolean isAllowRichEditor() {
+ return allowRichEditor;
+ }
+
+ public void setAllowRichEditor(boolean allowRichEditor) {
+ this.allowRichEditor = allowRichEditor;
+ }
}
Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaLearningAction.java
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaLearningAction.java,v
diff -u -r1.37 -r1.37.4.1
--- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaLearningAction.java 19 Feb 2009 23:59:14 -0000 1.37
+++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaLearningAction.java 11 May 2009 04:36:35 -0000 1.37.4.1
@@ -230,6 +230,9 @@
boolean lockWhenFinished = qaContent.isLockWhenFinished();
generalLearnerFlowDTO.setLockWhenFinished(new Boolean(lockWhenFinished).toString());
+
+ boolean allowRichEditor = qaContent.isAllowRichEditor();
+ generalLearnerFlowDTO.setAllowRichEditor(new Boolean(allowRichEditor).toString());
boolean showOtherAnswers = qaContent.isShowOtherAnswers();
generalLearnerFlowDTO.setShowOtherAnswers(new Boolean(showOtherAnswers).toString());
@@ -311,6 +314,9 @@
generalLearnerFlowDTO.setUserNameVisible(new Boolean(qaContent.isUsernameVisible()).toString());
generalLearnerFlowDTO.setShowOtherAnswers(new Boolean(qaContent.isShowOtherAnswers()).toString());
+
+ boolean allowRichEditor = qaContent.isAllowRichEditor();
+ generalLearnerFlowDTO.setAllowRichEditor(new Boolean(allowRichEditor).toString());
/*
* Learning mode requires this setting for jsp to generate the user's report
@@ -526,6 +532,9 @@
boolean lockWhenFinished = qaContent.isLockWhenFinished();
generalLearnerFlowDTO.setLockWhenFinished(new Boolean(lockWhenFinished).toString());
+
+ boolean allowRichEditor = qaContent.isAllowRichEditor();
+ generalLearnerFlowDTO.setAllowRichEditor(new Boolean(allowRichEditor).toString());
HttpSession ss = SessionManager.getSession();
/* get back login user DTO */
@@ -642,6 +651,9 @@
boolean lockWhenFinished = qaContent.isLockWhenFinished();
generalLearnerFlowDTO.setLockWhenFinished(new Boolean(lockWhenFinished).toString());
+
+ boolean allowRichEditor = qaContent.isAllowRichEditor();
+ generalLearnerFlowDTO.setAllowRichEditor(new Boolean(allowRichEditor).toString());
HttpSession ss = SessionManager.getSession();
/* get back login user DTO */
@@ -995,6 +1007,9 @@
boolean lockWhenFinished = qaContent.isLockWhenFinished();
generalLearnerFlowDTO.setLockWhenFinished(new Boolean(lockWhenFinished).toString());
+
+ boolean allowRichEditor = qaContent.isAllowRichEditor();
+ generalLearnerFlowDTO.setAllowRichEditor(new Boolean(allowRichEditor).toString());
NotebookEntry notebookEntry = qaService.getEntry(new Long(toolSessionID), CoreNotebookConstants.NOTEBOOK_TOOL,
MY_SIGNATURE, new Integer(userID));
Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaLearningStarterAction.java
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaLearningStarterAction.java,v
diff -u -r1.70 -r1.70.4.1
--- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaLearningStarterAction.java 19 Feb 2009 23:59:13 -0000 1.70
+++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaLearningStarterAction.java 11 May 2009 04:36:35 -0000 1.70.4.1
@@ -435,9 +435,13 @@
boolean lockWhenFinished = qaContent.isLockWhenFinished();
logger.debug("lockWhenFinished: " + lockWhenFinished);
+ boolean allowRichEditor = qaContent.isAllowRichEditor();
+ generalLearnerFlowDTO.setAllowRichEditor(new Boolean(allowRichEditor).toString());
+
String sessionStatus = qaSession.getSession_status();
logger.debug("sessionStatus: " + sessionStatus);
+
if (userID != null) {
QaQueUsr qaQueUsr = qaService.getQaUserBySession(new Long(userID), qaSession.getUid());
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.71 -r1.71.4.1
--- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaStarterAction.java 19 Feb 2009 23:59:13 -0000 1.71
+++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaStarterAction.java 11 May 2009 04:36:35 -0000 1.71.4.1
@@ -359,7 +359,9 @@
SortedSet conditionList = getQaConditionList(sessionMap);
conditionList.clear();
conditionList.addAll(qaContent.getConditions());
-
+
+ qaGeneralAuthoringDTO.setAllowRichEditor(qaContent.isAllowRichEditor());
+ qaAuthoringForm.setAllowRichEditor(qaContent.isAllowRichEditor());
sessionMap.put(QaAppConstants.ATTR_QA_AUTHORING_FORM, qaAuthoringForm);
Index: lams_tool_laqa/web/authoring/AdvancedContent.jsp
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_laqa/web/authoring/AdvancedContent.jsp,v
diff -u -r1.29 -r1.29.6.1
--- lams_tool_laqa/web/authoring/AdvancedContent.jsp 16 Jan 2008 22:15:17 -0000 1.29
+++ lams_tool_laqa/web/authoring/AdvancedContent.jsp 11 May 2009 04:36:36 -0000 1.29.6.1
@@ -86,11 +86,18 @@
+
+
+
+
+
-
Index: lams_tool_laqa/web/learning/CombinedAnswersContent.jsp
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_laqa/web/learning/CombinedAnswersContent.jsp,v
diff -u -r1.24 -r1.24.8.1
--- lams_tool_laqa/web/learning/CombinedAnswersContent.jsp 2 Jan 2007 00:42:27 -0000 1.24
+++ lams_tool_laqa/web/learning/CombinedAnswersContent.jsp 11 May 2009 04:36:36 -0000 1.24.8.1
@@ -51,8 +51,17 @@
-
-
+
+
+
+
+
+
+
+
+
+
Index: lams_tool_laqa/web/learning/SequentialAnswersContent.jsp
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_laqa/web/learning/SequentialAnswersContent.jsp,v
diff -u -r1.22 -r1.22.8.1
--- lams_tool_laqa/web/learning/SequentialAnswersContent.jsp 2 Jan 2007 00:42:27 -0000 1.22
+++ lams_tool_laqa/web/learning/SequentialAnswersContent.jsp 11 May 2009 04:36:36 -0000 1.22.8.1
@@ -53,12 +53,21 @@
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-