Index: lams_tool_lamc/build.properties
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_lamc/build.properties,v
diff -u -r1.15 -r1.16
--- lams_tool_lamc/build.properties 9 Dec 2008 05:38:09 -0000 1.15
+++ lams_tool_lamc/build.properties 16 May 2011 05:11:30 -0000 1.16
@@ -4,7 +4,7 @@
signature=lamc11
#version of this project
-tool.version=20081127
+tool.version=20110416
# hide tool option
hideTool=false
Index: lams_tool_lamc/conf/hibernate/mappings/org/lamsfoundation/lams/tool/mc/McContent.hbm.xml
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_lamc/conf/hibernate/mappings/org/lamsfoundation/lams/tool/mc/Attic/McContent.hbm.xml,v
diff -u -r1.21 -r1.22
--- lams_tool_lamc/conf/hibernate/mappings/org/lamsfoundation/lams/tool/mc/McContent.hbm.xml 11 Oct 2007 06:27:31 -0000 1.21
+++ lams_tool_lamc/conf/hibernate/mappings/org/lamsfoundation/lams/tool/mc/McContent.hbm.xml 16 May 2011 05:11:30 -0000 1.22
@@ -86,6 +86,13 @@
length="20"
/>
+
The modification of the content is not allowed.
+error.content.inUse =modification of the content is not allowed since one or more learners has attempted the activity.
error.noLearnerActivity =Summary report is not available since no users attempted the activity yet.
-label.question =Question
label.answers =Answers:
+button.endLearning =Next Activity
label.learning.user =User
label.learning.attemptTime =Attempt Date/Time
label.learning.response =Response
label.user =User
label.attemptTime =Attempt Date/Time
label.response =Response
+label.learning.forceOfflineMessage =This activity is not being done on the computer. Please see your instructor for details.
+error.defineLater =Please wait for the teacher to complete the contents of this activity.
+error.noStudentActivity =Sorry, the report can not be generated.
No learner has attempted the activity yet.
group.label =Group
button.summary =Summary
button.editActivity =Edit Activity
@@ -155,112 +175,101 @@
label.stats.allGroups =All Groups:
label.stats.totalAllGroups =Total count of all learners:
error.system.mc =A system exception has occured. Please contact your system administrator. The error to report is\:
{0}
-label.attempt.count =Attempt Count:
-label.final.attempt =Final Attempt:
-label.total =Total
-label.report.title.col =Report Title:
-label.report.endLearningMessage.col =End of Activity Message:
-label.studentMarks =Learner Marks
-label.export.learner =Portfolio Export for Learner
-label.export.teacher =Portfolio Export for Teacher
-label.yourAnswers =Learner's Answers:
-label.candidateAnswer =Candidate Answer
-label.studentMark =Learner Mark
-label.authoring.title.col =Title:
-label.monitoring.downloadMarks.button =Download Marks
-message.no.reflection.available =No notebook available
-label.mcqSummary =MCQ Summary
+authoring.msg.cancel.save =Do you want to close this window without saving?
label.learning.forceFinishMessage =Responses are no more allowed. Please finish.
label.correct =Correct
label.passingMark =Passing Mark
+label.mcqSummary =MCQ Summary
+label.yourAnswers =Learner's Answers:
label.learner =Learner
-error.defineLater =Please wait for the teacher to complete the contents of this activity.
button.try.again =Try again
-label.view.reflection =View Notebook Entries
-answers.submitted.none =Submission is not allowed. Please select at least one answer for each of the questions.
-label.notebook.entries =Notebook Entries
-label.reflection =Notebook Entry
-label.learning.forceOfflineMessage =This activity is not being done on the computer. Please see your instructor for details.
-label.randomize =Present answers in randomized order
-candidates.groupSize.warning =Please fix this: There must be at least 2 candidate answers.
-candidates.unremovable.groupSize =The candidate answer can not be removed since there must be at least 2 candidate answers.
-candidates.setFirst =Please be informed that the first candidate answer has been selected for you.
-candidates.blank =Please fix this: Candidate answer text can not be blank.
-candidates.none.correct =Please fix this: There must be 1 correct candidate answer out of at least 2 candidate answers.
-candidates.duplicate.correct =Please fix this: There must be one and only one correct candidate answer.
-label.monitoring.yesDisplayAnswers =Learners are able to see the answers for all questions.
-label.monitoring.noDisplayAnswers1 =Learners are not able to see the answers for the questions
-authoring.msg.cancel.save =Do you want to close this window without saving?
label.feedback =Question Feedback:
-label.save.question =Create Question
label.notEnoughMarks =You don't have enough marks to finish. Please redo.
-radiobox.onepq =One question per page
-label.feedback.simple =Feedback:
-error.questions.submitted.none =Please correct this: No questions have been submitted.
-label.edit.question =Edit Question
-label.tip.editQuestion =Enables editing of question
+label.tip.moveQuestionDown =Moves question down
+label.tip.moveQuestionUp =Moves question up
+label.tip.editOptions =Enables editing of candidate answers
+label.tip.removeQuestion =Removes question
+label.tip.removeCandidate =Removes candidate answer
+label.studentMarks =Learner Marks
+label.export.learner =Portfolio Export for Learner
+label.export.teacher =Portfolio Export for Teacher
+label.studentMark =Learner Mark
+label.authoring.title.col =Title:
+label.authoring.instructions.col =Instructions:
+label.candidateAnswer =Candidate Answer
+label.total =Total
+label.report.title.col =Report Title:
+label.report.endLearningMessage.col =End of Activity Message:
+label.continue =Continue
+label.reflect =Add Notebook at end of MCQ with the following instructions:
+label.notebook.entries =Notebook Entries
+label.reflection =Notebook Entry
+label.view.reflection =View Notebook Entries
+label.close =Close
label.question.marks =Marks
label.update.list =Update List
+label.tip.editQuestion =Enables editing of question
+candidates.none.correct =Please fix this: There must be 1 correct candidate answer out of at least 2 candidate answers.
+count.finished.session =Finished Session Count:
+label.add.candidates =Answers
+label.add.new.question =Add
+label.marks =mark(s)
label.new.question =New Question
label.questions =Questions
label.questions.worth =This question is worth
-label.upload =Upload
-question.blank =Please fix this: Question text can not be blank.
-question.duplicate =Please fix this: There are duplicate question entries.
-questions.none.submitted =No questions submitted. Please add at least one question.
-count.finished.session =Finished Session Count:
-label.marks =mark(s)
+label.save.question =Create Question
label.tip.deleteQuestion =Deletes question
label.tip.editCandidate =Enables editing of candidate answers
label.tip.moveCandidateDown =Moves candidate answer down
label.tip.moveCandidateUp =Moves candidate answer up
-label.monitoring.downloadMarks.username =Username
-label.showMarks =Show top and average mark
+label.upload =Upload
+question.blank =Please fix this: Question text can not be blank.
+question.duplicate =Please fix this: There are duplicate question entries.
+questions.none.submitted =No questions submitted. Please add at least one question.
+label.edit.question =Edit Question
+label.feedback.simple =Feedback:
+candidates.duplicate.correct =Please fix this: There must be one and only one correct candidate answer.
label.group.results =Group's top and average marks
-label.tip.moveQuestionDown =Moves question down
-label.tip.moveQuestionUp =Moves question up
-label.tip.editOptions =Enables editing of candidate answers
-label.tip.removeQuestion =Removes question
-label.tip.removeCandidate =Removes candidate answer
-label.monitoring.downloadMarks.question.mark =Question {0} (Mark: {1})
-label.continue =Continue
-label.close =Close
+candidates.groupSize.warning =Please fix this: There must be at least 2 candidate answers.
+candidates.unremovable.groupSize =The candidate answer can not be removed since there must be at least 2 candidate answers.
+candidates.setFirst =Please be informed that the first candidate answer has been selected for you.
+candidates.blank =Please fix this: Candidate answer text can not be blank.
+label.showMarks =Show top and average mark
+label.randomize =Present answers in randomized order
+answers.submitted.none =Submission is not allowed. Please select at least one answer for each of the questions.
+message.no.reflection.available =No notebook available
+label.attempt.count =Attempt Count:
+label.final.attempt =Final Attempt:
errors.maxfilesize =The uploaded file has exceeded the maximum file size limit of {0} bytes
-radiobox.defineLater =Define in Monitor
output.desc.learner.mark =Learner's total mark
+output.desc.learner.all.correct =Are learner's answers all correct?
+label.displayAnswers =Display correct answers and score after last question
+label.monitoring.yesDisplayAnswers =Learners are able to see the answers for all questions.
+label.monitoring.noDisplayAnswers1 =Learners are not able to see the answers for the questions
label.monitoring.noDisplayAnswers2 =Do you want to allow learners to see the answers now?
button.monitoring.noDisplayAnswers =Yes
-label.finished =Next Activity
-button.endLearning =Next Activity
-output.desc.learner.all.correct =Are learner's answers all correct?
output.desc.learner.all.correct.true =All Correct
output.desc.learner.all.correct.false =Not All Correct
-error.fileName.empty =Please correct this: Under "Instructions", the file(name) to upload can not be empty.
-label.reflect =Add Notebook at end of MCQ with the following instructions:
-label.onlineInstructions =Online Instructions
-label.offlineInstructions.col =Offline Instructions:
-label.offlineInstructions =Offline Instructions
-button.instructions =Instructions
-label.onlineInstructions.col =Online Instructions:
-label.authoring.instructions.col =Instructions:
-label.instructions =Instructions
-label.add.new.question =Add
-label.add.candidates =Answers
-label.displayAnswers =Display correct answers and score after last question
-label.individual.results.withRetries =Summary of Multiple Choice Responses with Retries
-label.individual.results.withoutRetries =Summary of Multiple Choice Responses
label.attachments =Attachments
-error.content.locked =The content has been locked since it is being used by one mor more learners.
The modification of the content is not allowed.
+label.monitoring.downloadMarks.button =Download Marks
+label.monitoring.downloadMarks.question.mark =Question {0} (Mark: {1})
+label.monitoring.downloadMarks.username =Username
error.monitoring.spreadsheet.download =An error occurred while preparing the marks spreadsheet for download.
-label.authoring.instructions =Instructions
-monitor.summary.td.notebookInstructions =Notebook Instructions
label.on =On
label.off =Off
monitor.summary.th.advancedSettings =Advanced Settings
monitor.summary.td.addNotebook =Add Notebook at the end of MCQ
-error.content.inUse =modification of the content is not allowed since one or more learners has attempted the activity.
-error.noStudentActivity =Sorry, the report can not be generated.
No learner has attempted the activity yet.
+monitor.summary.td.notebookInstructions =Notebook Instructions
error.pedagogical.planner.empty.answer.selected =In question {0} correct answer cannot be blank.
+monitor.summary.date.restriction =Date restriction
+monitor.summary.when.date.restriction.is.set =Learners will not be able to answer questions after the set date and time.
+monitor.summary.after.date =Date/time:
+monitor.summary.set.restriction =Set restriction
+monitor.summary.unset.restriction =Remove restriction
+authoring.info.teacher.set.restriction =The instructor has set a restriction to this activity from {0} onwards.
+monitor.summary.notification =Notification
+monitor.summary.date.restriction.set =Date restriction has been set
+monitor.summary.date.restriction.removed =Date restriction has been removed
-#======= End labels: Exported 255 labels for en AU =====
+#======= End labels: Exported 264 labels for en AU =====
Index: lams_tool_lamc/db/sql/create_lams_tool_mc.sql
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_lamc/db/sql/create_lams_tool_mc.sql,v
diff -u -r1.25 -r1.26
--- lams_tool_lamc/db/sql/create_lams_tool_mc.sql 13 Feb 2008 06:13:15 -0000 1.25
+++ lams_tool_lamc/db/sql/create_lams_tool_mc.sql 16 May 2011 05:11:31 -0000 1.26
@@ -20,6 +20,7 @@
, showMarks TINYINT(1) NOT NULL DEFAULT 0
, randomize TINYINT(1) NOT NULL DEFAULT 0
, displayAnswers TINYINT(1) NOT NULL DEFAULT 1
+ , submission_deadline datetime DEFAULT NULL
, UNIQUE UQ_tl_lamc11_content_1 (content_id)
, PRIMARY KEY (uid)
)TYPE=InnoDB;
Index: lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/McAppConstants.java
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/McAppConstants.java,v
diff -u -r1.103 -r1.104
--- lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/McAppConstants.java 9 Dec 2008 05:38:09 -0000 1.103
+++ lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/McAppConstants.java 16 May 2011 05:11:30 -0000 1.104
@@ -224,6 +224,10 @@
public static final String TOP_MARK = "topMark";
public static final String LOWEST_MARK = "lowestMark";
public static final String AVERAGE_MARK = "averageMark";
+
+ /* Date time restriction LDEV-2657 */
+ public static final String ATTR_SUBMISSION_DEADLINE = "submissionDeadline";
+ public static final String ATTR_IS_SUBMISSION_DEADLINE_PASSED = "isSubmissionDeadlinePassed";
/*
* the learner or monitoring environment provides toolSessionId
Index: lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/McGeneralMonitoringDTO.java
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/McGeneralMonitoringDTO.java,v
diff -u -r1.3 -r1.4
--- lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/McGeneralMonitoringDTO.java 15 Oct 2007 05:01:48 -0000 1.3
+++ lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/McGeneralMonitoringDTO.java 16 May 2011 05:11:30 -0000 1.4
@@ -23,6 +23,7 @@
package org.lamsfoundation.lams.tool.mc;
+import java.util.Date;
import java.util.List;
import java.util.Map;
@@ -100,6 +101,7 @@
protected List deletedAttachmentList;
protected String contentFolderID;
+ protected Long submissionDeadline;
@@ -655,6 +657,15 @@
this.sessionUserCount = sessionUserCount;
}
+
+ public Long getSubmissionDeadline() {
+ return submissionDeadline;
+ }
+ public void setSubmissionDeadline(Long submissionDeadline) {
+ this.submissionDeadline = submissionDeadline;
+ }
+
+
public String toString() {
return new ToStringBuilder(this)
.append("toolContentID: ", toolContentID)
@@ -700,6 +711,7 @@
.append("sessionUserCount: ", sessionUserCount)
.append("completedSessionUserCount: ", completedSessionUserCount)
.append("completedSessionUserPercent: ", completedSessionUserPercent)
+ .append("submissionDeadline", submissionDeadline)
.toString();
}
Index: lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/McLearnerStarterDTO.java
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/Attic/McLearnerStarterDTO.java,v
diff -u -r1.2 -r1.3
--- lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/McLearnerStarterDTO.java 17 Sep 2006 06:23:44 -0000 1.2
+++ lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/McLearnerStarterDTO.java 16 May 2011 05:11:30 -0000 1.3
@@ -22,6 +22,7 @@
/* $$Id$$ */
package org.lamsfoundation.lams.tool.mc;
+import java.util.Date;
/**
@@ -39,6 +40,8 @@
protected String toolActivityOffline;
+ protected Date submissionDeadline;
+
/**
* @return Returns the toolActivityOffline.
*/
@@ -75,6 +78,19 @@
public void setQuestionListingMode(String questionListingMode) {
this.questionListingMode = questionListingMode;
}
+ /**
+ * @return the submissionDeadline
+ */
+ public Date getSubmissionDeadline() {
+ return submissionDeadline;
+ }
+
+ /**
+ * @param submissionDeadline the submissionDeadline to set
+ */
+ public void setSubmissionDeadline(Date submissionDeadline) {
+ this.submissionDeadline = submissionDeadline;
+ }
public int compareTo(Object o)
{
McLearnerStarterDTO mcLearnerStarterDTO = (McLearnerStarterDTO) o;
Index: lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/dbupdates/patch20110416_updateFrom235.sql
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/dbupdates/patch20110416_updateFrom235.sql,v
diff -u -r1.1 -r1.2
Binary files differ
Index: lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/pojos/McContent.java
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/pojos/McContent.java,v
diff -u -r1.17 -r1.18
--- lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/pojos/McContent.java 11 Oct 2007 06:27:31 -0000 1.17
+++ lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/pojos/McContent.java 16 May 2011 05:11:31 -0000 1.18
@@ -103,6 +103,9 @@
private boolean showMarks;
+ /* LDEV-2657 */
+ private Date submissionDeadline;
+
/** nullable persistent field */
private Integer passMark;
@@ -522,6 +525,19 @@
this.displayAnswers = displayAnswers;
}
+
+ /**
+ * @return date submissionDeadline
+ */
+ public Date getSubmissionDeadline() {
+ return submissionDeadline;
+ }
+
+ public void setSubmissionDeadline(Date submissionDeadline) {
+ this.submissionDeadline = submissionDeadline;
+ }
+
+
/**
* Get total possible marks for this content. Iterates over the McQueContents set
*/
Index: lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/web/McLearningStarterAction.java
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/web/McLearningStarterAction.java,v
diff -u -r1.76 -r1.77
--- lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/web/McLearningStarterAction.java 12 Oct 2007 09:23:19 -0000 1.76
+++ lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/web/McLearningStarterAction.java 16 May 2011 05:11:30 -0000 1.77
@@ -23,9 +23,11 @@
package org.lamsfoundation.lams.tool.mc.web;
import java.io.IOException;
+import java.util.Date;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
+import java.util.TimeZone;
import java.util.TreeMap;
import javax.servlet.ServletException;
@@ -56,6 +58,7 @@
import org.lamsfoundation.lams.tool.mc.service.IMcService;
import org.lamsfoundation.lams.tool.mc.service.McServiceProxy;
import org.lamsfoundation.lams.usermanagement.dto.UserDTO;
+import org.lamsfoundation.lams.util.DateUtil;
import org.lamsfoundation.lams.web.session.SessionManager;
import org.lamsfoundation.lams.web.util.AttributeNames;
import org.lamsfoundation.lams.web.util.SessionMap;
@@ -258,7 +261,28 @@
mcLearningForm.setQuestionListingMode(QUESTION_LISTING_MODE_COMBINED);
}
+ /*
+ * Is there a deadline set?
+ */
+ Date submissionDeadline = mcContent.getSubmissionDeadline();
+
+ if (submissionDeadline != null) {
+
+ HttpSession ss = SessionManager.getSession();
+ UserDTO learnerDto = (UserDTO) ss.getAttribute(AttributeNames.USER);
+ TimeZone learnerTimeZone = learnerDto.getTimeZone();
+ Date tzSubmissionDeadline = DateUtil.convertToTimeZoneFromDefault(learnerTimeZone, submissionDeadline);
+ Date currentLearnerDate = DateUtil.convertToTimeZoneFromDefault(learnerTimeZone, new Date());
+ mcLearnerStarterDTO.setSubmissionDeadline(submissionDeadline);
+
+ //calculate whether submission deadline has passed, and if so forward to "runOffline"
+ if (currentLearnerDate.after(tzSubmissionDeadline)) {
+ request.setAttribute(MC_LEARNER_STARTER_DTO, mcLearnerStarterDTO);
+ return mapping.findForward(RUN_OFFLINE);
+ }
+ }
+
/*
* Is the tool activity been checked as Run Offline in the property inspector?
*/
Index: lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/web/McMonitoringAction.java
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/web/McMonitoringAction.java,v
diff -u -r1.45 -r1.46
--- lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/web/McMonitoringAction.java 15 Feb 2011 17:17:48 -0000 1.45
+++ lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/web/McMonitoringAction.java 16 May 2011 05:11:30 -0000 1.46
@@ -26,15 +26,18 @@
import java.io.IOException;
import java.io.OutputStream;
import java.util.ArrayList;
+import java.util.Date;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
+import java.util.TimeZone;
import java.util.TreeMap;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
+import javax.servlet.http.HttpSession;
import org.apache.log4j.Logger;
import org.apache.poi.hssf.usermodel.HSSFCell;
@@ -71,9 +74,11 @@
import org.lamsfoundation.lams.tool.mc.pojos.McUploadedFile;
import org.lamsfoundation.lams.tool.mc.service.IMcService;
import org.lamsfoundation.lams.tool.mc.service.McServiceProxy;
+import org.lamsfoundation.lams.util.DateUtil;
import org.lamsfoundation.lams.util.MessageService;
import org.lamsfoundation.lams.util.WebUtil;
import org.lamsfoundation.lams.web.action.LamsDispatchAction;
+import org.lamsfoundation.lams.web.session.SessionManager;
import org.lamsfoundation.lams.web.util.AttributeNames;
import org.lamsfoundation.lams.web.util.SessionMap;
@@ -4832,7 +4837,39 @@
return data;
}
+
+ /**
+ * Set Submission Deadline
+ *
+ * @param mapping
+ * @param form
+ * @param request
+ * @param response
+ * @return
+ */
+ public ActionForward setSubmissionDeadline(ActionMapping mapping, ActionForm form, HttpServletRequest request,
+ HttpServletResponse response) {
+
+ IMcService mcService = McServiceProxy.getMcService(getServlet().getServletContext());
+
+ Long contentID = WebUtil.readLongParam(request, AttributeNames.PARAM_TOOL_CONTENT_ID);
+ McContent mcContent = mcService.retrieveMc(contentID);
+
+ Long dateParameter = WebUtil.readLongParam(request, McAppConstants.ATTR_SUBMISSION_DEADLINE, true);
+ Date tzSubmissionDeadline = null;
+ if (dateParameter != null) {
+ Date submissionDeadline = new Date(dateParameter);
+ HttpSession ss = SessionManager.getSession();
+ org.lamsfoundation.lams.usermanagement.dto.UserDTO teacher = (org.lamsfoundation.lams.usermanagement.dto.UserDTO) ss.getAttribute(AttributeNames.USER);
+ TimeZone teacherTimeZone = teacher.getTimeZone();
+ tzSubmissionDeadline = DateUtil.convertFromTimeZoneToDefault(teacherTimeZone, submissionDeadline);
+ }
+ mcContent.setSubmissionDeadline(tzSubmissionDeadline);
+ mcService.updateMc(mcContent);
+ return null;
+ }
+
/**
* Return ResourceService bean.
*/
Index: lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/web/McMonitoringStarterAction.java
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/web/McMonitoringStarterAction.java,v
diff -u -r1.44 -r1.45
--- lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/web/McMonitoringStarterAction.java 15 Feb 2011 17:17:48 -0000 1.44
+++ lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/web/McMonitoringStarterAction.java 16 May 2011 05:11:30 -0000 1.45
@@ -23,13 +23,17 @@
package org.lamsfoundation.lams.tool.mc.web;
import java.io.IOException;
+import java.util.ArrayList;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.TreeMap;
+import java.util.Date;
+import java.util.TimeZone;
import javax.servlet.ServletException;
+import javax.servlet.http.HttpSession;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
@@ -52,9 +56,12 @@
import org.lamsfoundation.lams.tool.mc.pojos.McQueContent;
import org.lamsfoundation.lams.tool.mc.service.IMcService;
import org.lamsfoundation.lams.tool.mc.service.McServiceProxy;
+import org.lamsfoundation.lams.usermanagement.dto.UserDTO;
import org.lamsfoundation.lams.util.WebUtil;
+import org.lamsfoundation.lams.util.DateUtil;
import org.lamsfoundation.lams.web.util.AttributeNames;
import org.lamsfoundation.lams.web.util.SessionMap;
+import org.lamsfoundation.lams.web.session.SessionManager;
/**
@@ -186,6 +193,20 @@
McContent mcContent=mcService.retrieveMc(new Long(toolContentID));
mcGeneralMonitoringDTO.setActivityTitle(mcContent.getTitle());
mcGeneralMonitoringDTO.setActivityInstructions(mcContent.getInstructions());
+
+ // get session from shared session.
+ HttpSession ss = SessionManager.getSession();
+
+ Date submissionDeadline = mcContent.getSubmissionDeadline();
+
+ if (submissionDeadline != null) {
+
+ UserDTO learnerDto = (UserDTO) ss.getAttribute(AttributeNames.USER);
+ TimeZone learnerTimeZone = learnerDto.getTimeZone();
+ Date tzSubmissionDeadline = DateUtil.convertToTimeZoneFromDefault(learnerTimeZone, submissionDeadline);
+ mcGeneralMonitoringDTO.setSubmissionDeadline(tzSubmissionDeadline.getTime());
+
+ }
mcGeneralMonitoringDTO.setCurrentMonitoringTab("summary");
mcGeneralMonitoringDTO.setSbmtSuccess(new Boolean(false).toString());
Index: lams_tool_lamc/web/common/header.jsp
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_lamc/web/common/header.jsp,v
diff -u -r1.7 -r1.8
--- lams_tool_lamc/web/common/header.jsp 28 Jul 2009 14:20:06 -0000 1.7
+++ lams_tool_lamc/web/common/header.jsp 16 May 2011 05:11:30 -0000 1.8
@@ -19,7 +19,6 @@
-
Index: lams_tool_lamc/web/learning/CombinedAnswersContent.jsp
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_lamc/web/learning/CombinedAnswersContent.jsp,v
diff -u -r1.29 -r1.30
--- lams_tool_lamc/web/learning/CombinedAnswersContent.jsp 15 Aug 2007 03:56:16 -0000 1.29
+++ lams_tool_lamc/web/learning/CombinedAnswersContent.jsp 16 May 2011 05:11:30 -0000 1.30
@@ -33,7 +33,15 @@
-
+