Index: lams_tool_laqa/conf/language/ApplicationResources.properties =================================================================== diff -u -r60efd16d14d8c09a297cbc379cabc6cf55890466 -r407ec95b4825be357d61eefa7799b8fbd6a3c1bd --- lams_tool_laqa/conf/language/ApplicationResources.properties (.../ApplicationResources.properties) (revision 60efd16d14d8c09a297cbc379cabc6cf55890466) +++ lams_tool_laqa/conf/language/ApplicationResources.properties (.../ApplicationResources.properties) (revision 407ec95b4825be357d61eefa7799b8fbd6a3c1bd) @@ -103,7 +103,7 @@ label.stats.totalLearners =Total count of learners: label.stats.allGroups =All Groups: label.stats.totalAllGroups =Total count of all learners: -label.learning.forceOfflineMessage =This is setup to be carried out offline. Plase see your instructor for details. +label.learning.forceOfflineMessage =This is setup to be carried out offline. Please see your instructor for details. error.defineLater =Please wait for the teacher to complete the contents of this activity. error.noLearnerActivity =Summary report is not available since no users attempted the activity yet. error.questions.duplicate =Please correct this: The questions must be unique. @@ -139,6 +139,9 @@ label.reflect =Reflect on Q&A label.responses.locked =Note: Once you click on "View All Responses", you can not edit your responses. error.system.qa =A system exception has occured. Please contact technical support. The error to report is\:
{0}
+label.notebook.entries = Notebook Entries +label.reflection = Reflection +label.learner =Learner #======= End labels: Exported 181 labels for en AU ===== Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/GeneralLearnerFlowDTO.java =================================================================== diff -u -r0e84a4a3deefd2678f28e3e466179827de10ea01 -r407ec95b4825be357d61eefa7799b8fbd6a3c1bd --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/GeneralLearnerFlowDTO.java (.../GeneralLearnerFlowDTO.java) (revision 0e84a4a3deefd2678f28e3e466179827de10ea01) +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/GeneralLearnerFlowDTO.java (.../GeneralLearnerFlowDTO.java) (revision 407ec95b4825be357d61eefa7799b8fbd6a3c1bd) @@ -60,6 +60,14 @@ protected String currentAnswer; + protected String notebookEntriesVisible; + + protected String reflection; + + protected String reflectionSubject; + + protected String notebookEntry; + protected String reportTitleLearner; protected String endLearningMessage; @@ -422,4 +430,53 @@ public void setMapAnswersPresentable(Map mapAnswersPresentable) { this.mapAnswersPresentable = mapAnswersPresentable; } + /** + * @return Returns the reflection. + */ + public String getReflection() { + return reflection; + } + /** + * @param reflection The reflection to set. + */ + public void setReflection(String reflection) { + this.reflection = reflection; + } + /** + * @return Returns the reflectionSubject. + */ + public String getReflectionSubject() { + return reflectionSubject; + } + /** + * @param reflectionSubject The reflectionSubject to set. + */ + public void setReflectionSubject(String reflectionSubject) { + this.reflectionSubject = reflectionSubject; + } + /** + * @return Returns the notebookEntry. + */ + public String getNotebookEntry() { + return notebookEntry; + } + /** + * @param notebookEntry The notebookEntry to set. + */ + public void setNotebookEntry(String notebookEntry) { + this.notebookEntry = notebookEntry; + } + + /** + * @return Returns the notebookEntriesVisible. + */ + public String getNotebookEntriesVisible() { + return notebookEntriesVisible; + } + /** + * @param notebookEntriesVisible The notebookEntriesVisible to set. + */ + public void setNotebookEntriesVisible(String notebookEntriesVisible) { + this.notebookEntriesVisible = notebookEntriesVisible; + } } Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/QaAppConstants.java =================================================================== diff -u -rdb35a7570ddebdb6d078ffee52c09234941f5f9a -r407ec95b4825be357d61eefa7799b8fbd6a3c1bd --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/QaAppConstants.java (.../QaAppConstants.java) (revision db35a7570ddebdb6d078ffee52c09234941f5f9a) +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/QaAppConstants.java (.../QaAppConstants.java) (revision 407ec95b4825be357d61eefa7799b8fbd6a3c1bd) @@ -72,6 +72,8 @@ public static final String EXPORT_USER_ID ="exportUserId"; public static final String DEFAULT_QA_TITLE ="Q&A Title"; public static final String DEFAULT_QA_INSTRUCTIONS ="Q&A Instructions"; + public static final String NOTEBOOK ="notebook"; + public static final String ENTRY_TEXT ="entryText"; public static final String ACTIVE_MODULE ="activeModule"; public static final String AUTHORING ="authoring"; Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/QaContent.java =================================================================== diff -u -rdb35a7570ddebdb6d078ffee52c09234941f5f9a -r407ec95b4825be357d61eefa7799b8fbd6a3c1bd --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/QaContent.java (.../QaContent.java) (revision db35a7570ddebdb6d078ffee52c09234941f5f9a) +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/QaContent.java (.../QaContent.java) (revision 407ec95b4825be357d61eefa7799b8fbd6a3c1bd) @@ -142,6 +142,7 @@ boolean synchInMonitor, boolean contentLocked, boolean reflect, + String reflectionSubject, Date creationDate, Date updateDate, Set qaQueContents, @@ -163,7 +164,8 @@ this.usernameVisible = usernameVisible; this.synchInMonitor = synchInMonitor; this.contentLocked = contentLocked; - this.reflect = reflect; + this.reflect = reflect; + this.reflectionSubject =reflectionSubject; this.creationDate = creationDate; this.updateDate = updateDate; this.qaQueContents = qaQueContents; @@ -200,6 +202,7 @@ qa.isSynchInMonitor(), qa.isContentLocked(), qa.isReflect(), + qa.getReflectionSubject(), qa.getCreationDate(), qa.getUpdateDate(), new TreeSet(), @@ -320,6 +323,7 @@ .append("offline_instructions:", getOfflineInstructions()) .append("online_instructions:", getOnlineInstructions()) .append("report_title: ", getReportTitle()) + .append("reflection subject: ", getReflectionSubject()) .append("synch_in_monitor: ", isSynchInMonitor()) .toString(); } Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/qaApplicationContext.xml =================================================================== diff -u -r24ca84b9e61b98c068eaa369cb194a35e5511162 -r407ec95b4825be357d61eefa7799b8fbd6a3c1bd --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/qaApplicationContext.xml (.../qaApplicationContext.xml) (revision 24ca84b9e61b98c068eaa369cb194a35e5511162) +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/qaApplicationContext.xml (.../qaApplicationContext.xml) (revision 407ec95b4825be357d61eefa7799b8fbd6a3c1bd) @@ -82,6 +82,7 @@ + Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/service/IQaService.java =================================================================== diff -u -rf5f65dc49c173cb6bef72ba8281762814c12b315 -r407ec95b4825be357d61eefa7799b8fbd6a3c1bd --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/service/IQaService.java (.../IQaService.java) (revision f5f65dc49c173cb6bef72ba8281762814c12b315) +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/service/IQaService.java (.../IQaService.java) (revision 407ec95b4825be357d61eefa7799b8fbd6a3c1bd) @@ -26,6 +26,7 @@ import java.util.List; import org.lamsfoundation.lams.contentrepository.ITicket; +import org.lamsfoundation.lams.notebook.model.NotebookEntry; import org.lamsfoundation.lams.tool.IToolVO; import org.lamsfoundation.lams.tool.exception.DataMissingException; import org.lamsfoundation.lams.tool.exception.ToolException; @@ -258,6 +259,15 @@ public List retrieveQaQueContentsByToolContentId(long toolContentId); + public Long createNotebookEntry(Long id, Integer idType, String signature, + Integer userID, String entry); + + + public NotebookEntry getEntry(Long id, Integer idType, String signature, + Integer userID); + + + /** Get the LAMS audit service. Needed as the web layer controls the staff updating of an answer, * so the log entry must be made by the web layer. */ public IAuditService getAuditService(); Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/service/QaServicePOJO.java =================================================================== diff -u -r1e2a836adc83be3b0b4235d0ecddd4afaa95da2e -r407ec95b4825be357d61eefa7799b8fbd6a3c1bd --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/service/QaServicePOJO.java (.../QaServicePOJO.java) (revision 1e2a836adc83be3b0b4235d0ecddd4afaa95da2e) +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/service/QaServicePOJO.java (.../QaServicePOJO.java) (revision 407ec95b4825be357d61eefa7799b8fbd6a3c1bd) @@ -49,6 +49,8 @@ import org.lamsfoundation.lams.learningdesign.service.ExportToolContentException; import org.lamsfoundation.lams.learningdesign.service.IExportToolContentService; import org.lamsfoundation.lams.learningdesign.service.ImportToolContentException; +import org.lamsfoundation.lams.notebook.model.NotebookEntry; +import org.lamsfoundation.lams.notebook.service.ICoreNotebookService; import org.lamsfoundation.lams.tool.IToolVO; import org.lamsfoundation.lams.tool.ToolContentImport102Manager; import org.lamsfoundation.lams.tool.ToolContentManager; @@ -129,6 +131,8 @@ private IAuditService auditService; private IExportToolContentService exportContentService; + private ICoreNotebookService coreNotebookService; + public void configureContentRepository() throws QaApplicationException { logger.debug("retrieved repService: " + repositoryService); cred = new SimpleCredentials(repositoryUser, repositoryId); @@ -1857,6 +1861,28 @@ } + public Long createNotebookEntry(Long id, Integer idType, String signature, + Integer userID, String entry) { + logger.debug("coreNotebookService: " + coreNotebookService); + return coreNotebookService.createNotebookEntry(id, idType, signature, userID, "", entry); + } + + + + + public NotebookEntry getEntry(Long id, Integer idType, String signature, + Integer userID) { + + List list = coreNotebookService.getEntry(id, idType, signature, userID); + if (list == null || list.isEmpty()) { + return null; + } else { + return list.get(0); + } + } + + + /** * @return Returns the logger. */ @@ -2123,4 +2149,16 @@ } //========================================================================================= + /** + * @return Returns the coreNotebookService. + */ + public ICoreNotebookService getCoreNotebookService() { + return coreNotebookService; + } + /** + * @param coreNotebookService The coreNotebookService to set. + */ + public void setCoreNotebookService(ICoreNotebookService coreNotebookService) { + this.coreNotebookService = coreNotebookService; + } } Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/AuthoringUtil.java =================================================================== diff -u -r823871bf3fd2d695c40bc974a24e66b4100d731b -r407ec95b4825be357d61eefa7799b8fbd6a3c1bd --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/AuthoringUtil.java (.../AuthoringUtil.java) (revision 823871bf3fd2d695c40bc974a24e66b4100d731b) +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/AuthoringUtil.java (.../AuthoringUtil.java) (revision 407ec95b4825be357d61eefa7799b8fbd6a3c1bd) @@ -197,6 +197,12 @@ String monitoringReportTitle=request.getParameter(MONITORING_REPORT_TITLE); String richTextOfflineInstructions=request.getParameter(OFFLINE_INSTRUCTIONS); String richTextOnlineInstructions=request.getParameter(ONLINE_INSTRUCTIONS); + String reflect=request.getParameter(REFLECT); + logger.debug("reflect: " + reflect); + + String reflectionSubject=request.getParameter(REFLECTION_SUBJECT); + logger.debug("reflectionSubject: " + reflectionSubject); + String activeModule=request.getParameter(ACTIVE_MODULE); logger.debug("activeModule: " + activeModule); @@ -211,6 +217,7 @@ boolean questionsSequencedBoolean=false; boolean synchInMonitorBoolean=false; boolean usernameVisibleBoolean=false; + boolean reflectBoolean=false; if (setCommonContent) { if (questionsSequenced.equalsIgnoreCase(ON)) @@ -222,6 +229,9 @@ if (usernameVisible.equalsIgnoreCase(ON)) usernameVisibleBoolean=true; + + if (reflect.equalsIgnoreCase(ON)) + reflectBoolean=true; } @@ -279,9 +289,10 @@ qaContent.setUsernameVisible(usernameVisibleBoolean); qaContent.setQuestionsSequenced(questionsSequencedBoolean); qaContent.setSynchInMonitor(synchInMonitorBoolean); + qaContent.setReflect(reflectBoolean); + qaContent.setReflectionSubject(reflectionSubject); } - - + if (newContent) { Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaLearningAction.java =================================================================== diff -u -r0e84a4a3deefd2678f28e3e466179827de10ea01 -r407ec95b4825be357d61eefa7799b8fbd6a3c1bd --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaLearningAction.java (.../QaLearningAction.java) (revision 0e84a4a3deefd2678f28e3e466179827de10ea01) +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaLearningAction.java (.../QaLearningAction.java) (revision 407ec95b4825be357d61eefa7799b8fbd6a3c1bd) @@ -91,6 +91,7 @@ import java.util.Iterator; import java.util.Map; import java.util.TreeMap; +import java.util.TreeSet; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; @@ -101,6 +102,8 @@ import org.apache.struts.action.ActionForm; import org.apache.struts.action.ActionForward; import org.apache.struts.action.ActionMapping; +import org.lamsfoundation.lams.notebook.model.NotebookEntry; +import org.lamsfoundation.lams.notebook.service.CoreNotebookConstants; import org.lamsfoundation.lams.tool.exception.ToolException; import org.lamsfoundation.lams.tool.qa.GeneralLearnerFlowDTO; import org.lamsfoundation.lams.tool.qa.QaAppConstants; @@ -176,8 +179,6 @@ GeneralLearnerFlowDTO generalLearnerFlowDTO= LearningUtil.buildGeneralLearnerFlowDTO(qaContent); logger.debug("generalLearnerFlowDTO: " + generalLearnerFlowDTO); - - String totalQuestionCount=generalLearnerFlowDTO.getTotalQuestionCount().toString(); logger.debug("totalQuestionCount: " + totalQuestionCount); int intTotalQuestionCount= new Integer(totalQuestionCount).intValue(); @@ -424,6 +425,10 @@ String toolSessionID=request.getParameter(AttributeNames.PARAM_TOOL_SESSION_ID); logger.debug("toolSessionID: " + toolSessionID); qaLearningForm.setToolSessionID(toolSessionID); + + String userID=request.getParameter("userID"); + logger.debug("userID: " + userID); + QaSession qaSession=qaService.retrieveQaSessionOrNullById(new Long(toolSessionID).longValue()); logger.debug("retrieving qaSession: " + qaSession); @@ -469,6 +474,8 @@ generalLearnerFlowDTO.setRequestLearningReport(new Boolean(true).toString()); generalLearnerFlowDTO.setRequestLearningReportProgress(new Boolean(false).toString()); + generalLearnerFlowDTO.setReflection(new Boolean(qaContent.isReflect()).toString()); + generalLearnerFlowDTO.setNotebookEntriesVisible(new Boolean(false).toString()); request.setAttribute(GENERAL_LEARNER_FLOW_DTO, generalLearnerFlowDTO); logger.debug("final generalLearnerFlowDTO: " + generalLearnerFlowDTO); @@ -524,8 +531,6 @@ populateAnswersMap(qaLearningForm, request, generalLearnerFlowDTO, true, false); - - return (mapping.findForward(LOAD_LEARNER)); } @@ -709,6 +714,39 @@ QaQueUsr qaQueUsr=qaService.getQaUserBySession(new Long(userID), qaSession.getUid()); logger.debug("QaQueUsr:" + qaQueUsr); + /* it is possible that qaQueUsr can be null if the content is set as runoffline and reflection is on*/ + if (qaQueUsr == null) + { + logger.debug("attempt creating user record since it must exist for the runOffline + reflection screens"); + HttpSession ss = SessionManager.getSession(); + + UserDTO toolUser = (UserDTO) ss.getAttribute(AttributeNames.USER); + logger.debug("retrieving toolUser: " + toolUser); + logger.debug("retrieving toolUser userId: " + toolUser.getUserID()); + logger.debug("retrieving toolUser username: " + toolUser.getLogin()); + + String userName=toolUser.getLogin(); + String fullName= toolUser.getFirstName() + " " + toolUser.getLastName(); + logger.debug("retrieving toolUser fullname: " + fullName); + + Long userId=new Long(toolUser.getUserID().longValue()); + logger.debug("retrieving toolUser fullname: " + fullName); + + qaQueUsr= new QaQueUsr(userId, + userName, + fullName, + null, + qaSession, + new TreeSet()); + + logger.debug("createQaQueUsr - qaQueUsr: " + qaQueUsr); + + logger.debug("session uid: " + qaSession.getUid()); + logger.debug("qaQueUsr: " + qaQueUsr); + qaService.createQaQueUsr(qaQueUsr); + logger.debug("created qaQueUsr in the db: " + qaQueUsr); + } + qaQueUsr.setLearnerFinished(true); logger.debug("learner is finished:" + qaQueUsr); qaService.updateQaQueUsr(qaQueUsr); @@ -746,4 +784,112 @@ return null; } + + + public ActionForward submitReflection(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) + throws IOException, ServletException, ToolException + { + logger.debug("dispatching submitReflection..."); + QaLearningForm qaLearningForm = (QaLearningForm) form; + + LearningUtil.saveFormRequestData(request, qaLearningForm); + + IQaService qaService = QaServiceProxy.getQaService(getServlet().getServletContext()); + logger.debug("qaService: " + qaService); + + String toolSessionID=request.getParameter(AttributeNames.PARAM_TOOL_SESSION_ID); + logger.debug("toolSessionID: " + toolSessionID); + qaLearningForm.setToolSessionID(toolSessionID); + + String userID=request.getParameter("userID"); + logger.debug("userID: " + userID); + qaLearningForm.setUserID(userID); + + String reflectionEntry=request.getParameter(ENTRY_TEXT); + logger.debug("reflectionEntry: " + reflectionEntry); + + QaSession qaSession=qaService.retrieveQaSessionOrNullById(new Long(toolSessionID).longValue()); + logger.debug("retrieving qaSession: " + qaSession); + + QaQueUsr qaQueUsr=qaService.getQaUserBySession(new Long(userID), qaSession.getUid()); + logger.debug("QaQueUsr:" + qaQueUsr); + + /* it is possible that qaQueUsr can be null if the content is set as runoffline and reflection is on*/ + if (qaQueUsr == null) + { + logger.debug("attempt creating user record since it must exist for the runOffline + reflection screens"); + HttpSession ss = SessionManager.getSession(); + + UserDTO toolUser = (UserDTO) ss.getAttribute(AttributeNames.USER); + logger.debug("retrieving toolUser: " + toolUser); + logger.debug("retrieving toolUser userId: " + toolUser.getUserID()); + logger.debug("retrieving toolUser username: " + toolUser.getLogin()); + + String userName=toolUser.getLogin(); + String fullName= toolUser.getFirstName() + " " + toolUser.getLastName(); + logger.debug("retrieving toolUser fullname: " + fullName); + + Long userId=new Long(toolUser.getUserID().longValue()); + logger.debug("retrieving toolUser fullname: " + fullName); + + qaQueUsr= new QaQueUsr(userId, + userName, + fullName, + null, + qaSession, + new TreeSet()); + + logger.debug("createQaQueUsr - qaQueUsr: " + qaQueUsr); + + logger.debug("session uid: " + qaSession.getUid()); + logger.debug("qaQueUsr: " + qaQueUsr); + qaService.createQaQueUsr(qaQueUsr); + logger.debug("created qaQueUsr in the db: " + qaQueUsr); + } + + logger.debug("QaQueUsr:" + qaQueUsr); + logger.debug("toolSessionID:" + toolSessionID); + logger.debug("CoreNotebookConstants.NOTEBOOK_TOOL:" + CoreNotebookConstants.NOTEBOOK_TOOL); + logger.debug("MY_SIGNATURE:" + MY_SIGNATURE); + logger.debug("userID:" + userID); + logger.debug("reflectionEntry:" + reflectionEntry); + + qaService.createNotebookEntry(new Long(toolSessionID), CoreNotebookConstants.NOTEBOOK_TOOL, + MY_SIGNATURE, new Integer(userID), reflectionEntry); + + qaLearningForm.resetUserActions(); /*resets all except submitAnswersContent */ + return endLearning(mapping, form, request, response); + } + + public ActionForward forwardtoReflection(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) + throws IOException, ServletException, ToolException + { + logger.debug("dispatching forwardtoReflection..."); + QaLearningForm qaLearningForm = (QaLearningForm) form; + IQaService qaService = QaServiceProxy.getQaService(getServlet().getServletContext()); + logger.debug("qaService: " + qaService); + + String toolSessionID=request.getParameter(AttributeNames.PARAM_TOOL_SESSION_ID); + logger.debug("toolSessionID: " + toolSessionID); + + QaSession qaSession=qaService.retrieveQaSessionOrNullById(new Long(toolSessionID).longValue()); + logger.debug("retrieving qaSession: " + qaSession); + + QaContent qaContent=qaSession.getQaContent(); + logger.debug("using qaContent: " + qaContent); + + + GeneralLearnerFlowDTO generalLearnerFlowDTO= new GeneralLearnerFlowDTO(); + generalLearnerFlowDTO.setActivityTitle(qaContent.getTitle()); + generalLearnerFlowDTO.setReflectionSubject(qaContent.getReflectionSubject()); + + request.setAttribute(GENERAL_LEARNER_FLOW_DTO, generalLearnerFlowDTO); + logger.debug("final generalLearnerFlowDTO: " + generalLearnerFlowDTO); + qaLearningForm.resetUserActions(); /*resets all except submitAnswersContent */ + + logger.debug("fwd'ing to: " + NOTEBOOK); + return (mapping.findForward(NOTEBOOK)); + } + + } \ No newline at end of file Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaLearningForm.java =================================================================== diff -u -r6d44838f7322b78a572a8b91344fea2e6ef8b360 -r407ec95b4825be357d61eefa7799b8fbd6a3c1bd --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaLearningForm.java (.../QaLearningForm.java) (revision 6d44838f7322b78a572a8b91344fea2e6ef8b360) +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaLearningForm.java (.../QaLearningForm.java) (revision 407ec95b4825be357d61eefa7799b8fbd6a3c1bd) @@ -41,12 +41,15 @@ protected String getPreviousQuestion; protected String endLearning; protected String refreshAnswers; + protected String submitReflection; + protected String forwardtoReflection; protected String totalQuestionCount; protected String httpSessionID; protected String toolSessionID; protected String questionIndex; protected String userID; + protected String entryText; protected String viewAllResults; protected String redoQuestions; protected String responseId; @@ -67,7 +70,10 @@ this.getNextQuestion=null; this.getPreviousQuestion=null; this.endLearning=null; + this.submitReflection=null; + this.forwardtoReflection=null; } + /** @@ -320,4 +326,40 @@ public void setRefreshAnswers(String refreshAnswers) { this.refreshAnswers = refreshAnswers; } + /** + * @return Returns the entryText. + */ + public String getEntryText() { + return entryText; + } + /** + * @param entryText The entryText to set. + */ + public void setEntryText(String entryText) { + this.entryText = entryText; + } + /** + * @return Returns the forwardtoReflection. + */ + public String getForwardtoReflection() { + return forwardtoReflection; + } + /** + * @param forwardtoReflection The forwardtoReflection to set. + */ + public void setForwardtoReflection(String forwardtoReflection) { + this.forwardtoReflection = forwardtoReflection; + } + /** + * @return Returns the submitReflection. + */ + public String getSubmitReflection() { + return submitReflection; + } + /** + * @param submitReflection The submitReflection to set. + */ + public void setSubmitReflection(String submitReflection) { + this.submitReflection = submitReflection; + } } Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaLearningStarterAction.java =================================================================== diff -u -r9fafcbed90cf58e092709bbeb5462bb75e3261ef -r407ec95b4825be357d61eefa7799b8fbd6a3c1bd --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaLearningStarterAction.java (.../QaLearningStarterAction.java) (revision 9fafcbed90cf58e092709bbeb5462bb75e3261ef) +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaLearningStarterAction.java (.../QaLearningStarterAction.java) (revision 407ec95b4825be357d61eefa7799b8fbd6a3c1bd) @@ -40,6 +40,8 @@ import org.apache.struts.action.ActionMapping; import org.apache.struts.action.ActionMessage; import org.apache.struts.action.ActionMessages; +import org.lamsfoundation.lams.notebook.model.NotebookEntry; +import org.lamsfoundation.lams.notebook.service.CoreNotebookConstants; import org.lamsfoundation.lams.tool.qa.GeneralLearnerFlowDTO; import org.lamsfoundation.lams.tool.qa.QaAppConstants; import org.lamsfoundation.lams.tool.qa.QaApplicationException; @@ -250,6 +252,24 @@ generalLearnerFlowDTO.setActivityTitle(qaContent.getTitle()); generalLearnerFlowDTO.setActivityInstructions(qaContent.getInstructions()); + + logger.debug("is tool reflective: " + qaContent.isReflect()); + generalLearnerFlowDTO.setReflection(new Boolean(qaContent.isReflect()).toString()); + logger.debug("reflection subject: " + qaContent.getReflectionSubject()); + generalLearnerFlowDTO.setReflectionSubject(qaContent.getReflectionSubject()); + + + logger.debug("attempt getting notebookEntry: "); + NotebookEntry notebookEntry = qaService.getEntry(new Long(toolSessionID), + CoreNotebookConstants.NOTEBOOK_TOOL, + MY_SIGNATURE, new Integer(userID)); + + logger.debug("notebookEntry: " + notebookEntry); + + if (notebookEntry != null) { + generalLearnerFlowDTO.setNotebookEntry(notebookEntry.getEntry()); + } + logger.debug("using TOOL_CONTENT_ID: " + qaContent.getQaContentId()); Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaStarterAction.java =================================================================== diff -u -r9fafcbed90cf58e092709bbeb5462bb75e3261ef -r407ec95b4825be357d61eefa7799b8fbd6a3c1bd --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaStarterAction.java (.../QaStarterAction.java) (revision 9fafcbed90cf58e092709bbeb5462bb75e3261ef) +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaStarterAction.java (.../QaStarterAction.java) (revision 407ec95b4825be357d61eefa7799b8fbd6a3c1bd) @@ -376,7 +376,7 @@ request.getSession().setAttribute(sessionMap.getSessionID(), sessionMap); logger.debug("before fwding to jsp, qaAuthoringForm : " + qaAuthoringForm); - logger.debug("before saving final qaGeneralAuthoringDTO: " + qaGeneralAuthoringDTO); + logger.debug("final qaGeneralAuthoringDTO: " + qaGeneralAuthoringDTO); request.setAttribute(QA_GENERAL_AUTHORING_DTO, qaGeneralAuthoringDTO); return (mapping.findForward(destination)); @@ -412,7 +412,10 @@ qaAuthoringForm.setUsernameVisible(qaContent.isUsernameVisible()?ON:OFF); qaAuthoringForm.setSynchInMonitor(qaContent.isSynchInMonitor()?ON:OFF); qaAuthoringForm.setQuestionsSequenced(qaContent.isQuestionsSequenced()?ON:OFF); - + qaAuthoringForm.setReflect(qaContent.isReflect()?ON:OFF); + + qaAuthoringForm.setReflectionSubject(qaContent.getReflectionSubject()); + List attachmentList = qaService.retrieveQaUploadedFiles(qaContent); qaGeneralAuthoringDTO.setAttachmentList(attachmentList); qaGeneralAuthoringDTO.setDeletedAttachmentList(new ArrayList()); Index: lams_tool_laqa/web/WEB-INF/struts-config.xml =================================================================== diff -u -rdb35a7570ddebdb6d078ffee52c09234941f5f9a -r407ec95b4825be357d61eefa7799b8fbd6a3c1bd --- lams_tool_laqa/web/WEB-INF/struts-config.xml (.../struts-config.xml) (revision db35a7570ddebdb6d078ffee52c09234941f5f9a) +++ lams_tool_laqa/web/WEB-INF/struts-config.xml (.../struts-config.xml) (revision 407ec95b4825be357d61eefa7799b8fbd6a3c1bd) @@ -184,7 +184,14 @@ name="errorListLearner" path="/QaErrorBox.jsp" redirect="false" - /> + /> + + + + + + Index: lams_tool_laqa/web/authoring/AdvancedContent.jsp =================================================================== diff -u -rdb35a7570ddebdb6d078ffee52c09234941f5f9a -r407ec95b4825be357d61eefa7799b8fbd6a3c1bd --- lams_tool_laqa/web/authoring/AdvancedContent.jsp (.../AdvancedContent.jsp) (revision db35a7570ddebdb6d078ffee52c09234941f5f9a) +++ lams_tool_laqa/web/authoring/AdvancedContent.jsp (.../AdvancedContent.jsp) (revision 407ec95b4825be357d61eefa7799b8fbd6a3c1bd) @@ -79,7 +79,7 @@   - + Index: lams_tool_laqa/web/learning/LearnerRep.jsp =================================================================== diff -u -r0e84a4a3deefd2678f28e3e466179827de10ea01 -r407ec95b4825be357d61eefa7799b8fbd6a3c1bd --- lams_tool_laqa/web/learning/LearnerRep.jsp (.../LearnerRep.jsp) (revision 0e84a4a3deefd2678f28e3e466179827de10ea01) +++ lams_tool_laqa/web/learning/LearnerRep.jsp (.../LearnerRep.jsp) (revision 407ec95b4825be357d61eefa7799b8fbd6a3c1bd) @@ -129,8 +129,28 @@ - + + + + + + + + + + + +
+ +
+ +
+ + + +
+ @@ -142,15 +162,22 @@ - +
+ + + + + + + + + + + +
+ +
-
- - - - -
-
@@ -209,8 +236,31 @@ + + + + + + + + + + + + +
+ +
+ +
+ + + +
+ + @@ -224,10 +274,17 @@ Index: lams_tool_laqa/web/learning/Notebook.jsp =================================================================== diff -u --- lams_tool_laqa/web/learning/Notebook.jsp (revision 0) +++ lams_tool_laqa/web/learning/Notebook.jsp (revision 407ec95b4825be357d61eefa7799b8fbd6a3c1bd) @@ -0,0 +1,115 @@ +<%-- +Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) +License Information: http://lamsfoundation.org/licensing/lams/2.0/ + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License version 2 as + published by the Free Software Foundation. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 + USA + + http://www.gnu.org/licenses/gpl.txt +--%> + + + +<%@ include file="/common/taglibs.jsp"%> + + + + + + + + + + + + + <bean:message key="activity.title" /> + + + + + + + +
+ +

+ +

+ + +
+ + + + + + + + +
+ +
- - - - + + + + + + + + + + +
+ + + + + + + + + + + +
+ +
+ +
+ + + +
+ + + + + + + + + + + + + + + + + + + Index: lams_tool_laqa/web/learning/RunOffline.jsp =================================================================== diff -u -r557890e1a61a8da4451a31d8a8f58a24bbed8ece -r407ec95b4825be357d61eefa7799b8fbd6a3c1bd --- lams_tool_laqa/web/learning/RunOffline.jsp (.../RunOffline.jsp) (revision 557890e1a61a8da4451a31d8a8f58a24bbed8ece) +++ lams_tool_laqa/web/learning/RunOffline.jsp (.../RunOffline.jsp) (revision 407ec95b4825be357d61eefa7799b8fbd6a3c1bd) @@ -36,6 +36,22 @@ <bean:message key="activity.title" /> + + + + @@ -45,10 +61,40 @@
-
-       -
+ + + + + + +
+       + + + + + +
+
+ + + + + + + + + + + + + +
+
+
+
+