diff --git a/reference/library/src/morpheus-master/sass/modules/tool/samigo/_samigo.scss b/reference/library/src/morpheus-master/sass/modules/tool/samigo/_samigo.scss index 9393882820dd..6f3abc1fa1aa 100644 --- a/reference/library/src/morpheus-master/sass/modules/tool/samigo/_samigo.scss +++ b/reference/library/src/morpheus-master/sass/modules/tool/samigo/_samigo.scss @@ -202,48 +202,26 @@ .extendedTimeDataTable { margin-bottom: .5em; - } - - .extendedTimeDataTable thead tr th { - padding-left: .5em; - border-bottom: 1px solid black; - } - .extendedTime-user { - min-width: 130px; - } + select { + max-width: 150px; + } - .extendedTime-group { - min-width: 130px; - } + thead tr th { + border-bottom: 1px solid black; + } - .extendedTime-start { - min-width: 250px; - } - .extendedTime-due { - min-width: 250px; - } - .extendedTime-retract { - min-width: 250px; - } - .extendedTime-hours { - min-width: 70px; - } - .extendedTime-mins { - min-width: 70px; - } + tr { + border-bottom: 1px solid lightgrey; + } - .extendedTimeDataTable tr { - border-bottom: 1px solid lightgrey; - } + .extendedTime-user, .extendedTime-group { + max-width: 160px; + } - .extendedTimeDataTable tr td { - padding-left: .25em; - padding-right: .25em; + .extendedTime-mins { + min-width: 70px; + } } - .extendedTimeEntryTable tr td { - padding-left: .25em; - padding-right: .25em; - } } diff --git a/samigo/samigo-app/src/java/org/sakaiproject/tool/assessment/bundle/AssessmentSettingsMessages.properties b/samigo/samigo-app/src/java/org/sakaiproject/tool/assessment/bundle/AssessmentSettingsMessages.properties index 9a8357ce7df3..019f95949681 100755 --- a/samigo/samigo-app/src/java/org/sakaiproject/tool/assessment/bundle/AssessmentSettingsMessages.properties +++ b/samigo/samigo-app/src/java/org/sakaiproject/tool/assessment/bundle/AssessmentSettingsMessages.properties @@ -18,6 +18,7 @@ heading_metadata=Metadata heading_about=About this Assessment heading_availability=Availability and Submissions heading_grading_feedback=Grading and Feedback +heading_extended_time=Exceptions to Time Limit and Delivery Date heading_layout=Layout and Appearance heading_background=Change background? clear_calendar_alt=Clear Date @@ -36,6 +37,7 @@ assessment_available=It is available assessment_due=It is due has_time_limit=and has a time limit of late_accept=Late submissions accepted? +late_accept_until=Late submissions accepted until? late_accept_help=Students get one chance to submit after due date if they haven't already submitted. no_late=No, not after due date yes_late=Yes, until @@ -305,9 +307,11 @@ less_than_two_columns=columns field need to have at least two inputs, separated selectFromFavorites=Select from Favorites # Extended time -extendedTimeHeading=Exceptions to Time Limit and Delivery Date -extendedTimeAdd=Add a Time Limit/Delivery Date Exception -extendedTimeEdit=Update a Time Limit / Delivery Date Exception +extendedTimeNew=Add New Exception +extendedTimeExisting=Existing Exceptions +extendedTimeInstruction=You must click the 'Add an Exception' button to add individual exception(s) before saving settings +extendedTimeAdd=Add an Exception +extendedTimeEdit=Update an Exception extendedTimeCancel=Cancel header_extendedTime_user=User header_extendedTime_group=Group @@ -318,6 +322,9 @@ header_extendedTime_hours=Hours header_extendedTime_minutes=Minutes header_extendedTime_delete=Delete header_extendedTime_edit=Edit +extendedTimeUser=Exception for User +extendedTimeGroup=Exception for Group +extendedTime_select_User=Select User extendedTime_select_group=Select Group extendedTime_select_User=Select User extendedTime_data_table_title=Extended time entry data table. diff --git a/samigo/samigo-app/src/java/org/sakaiproject/tool/assessment/ui/bean/author/AssessmentSettingsBean.java b/samigo/samigo-app/src/java/org/sakaiproject/tool/assessment/ui/bean/author/AssessmentSettingsBean.java index 275bca5bba64..bc9f4dd8ede2 100644 --- a/samigo/samigo-app/src/java/org/sakaiproject/tool/assessment/ui/bean/author/AssessmentSettingsBean.java +++ b/samigo/samigo-app/src/java/org/sakaiproject/tool/assessment/ui/bean/author/AssessmentSettingsBean.java @@ -1717,7 +1717,7 @@ public ExtendedTime getExtendedTime() { } public String getExtendedTimeStartString() { - return getDisplayFormatFromDate(this.extendedTime.getStartDate()); + return tu.getDateTimeWithTimezoneConversion(this.extendedTime.getStartDate()); } public void setExtendedTimeStartString(String exTimeStartString) { @@ -1728,7 +1728,7 @@ public void setExtendedTimeStartString(String exTimeStartString) { } public String getExtendedTimeDueString() { - return getDisplayFormatFromDate(this.extendedTime.getDueDate()); + return tu.getDateTimeWithTimezoneConversion(this.extendedTime.getDueDate()); } public void setExtendedTimeDueString(String exTimeDueString) { @@ -1739,7 +1739,7 @@ public void setExtendedTimeDueString(String exTimeDueString) { } public String getExtendedTimeRetractString() { - return getDisplayFormatFromDate(this.extendedTime.getRetractDate()); + return tu.getDateTimeWithTimezoneConversion(this.extendedTime.getRetractDate()); } public void setExtendedTimeRetractString(String exTimeRetractString) { diff --git a/samigo/samigo-app/src/java/org/sakaiproject/tool/assessment/ui/bean/author/PublishedAssessmentSettingsBean.java b/samigo/samigo-app/src/java/org/sakaiproject/tool/assessment/ui/bean/author/PublishedAssessmentSettingsBean.java index 0025cf527b2c..a8152ab442dd 100644 --- a/samigo/samigo-app/src/java/org/sakaiproject/tool/assessment/ui/bean/author/PublishedAssessmentSettingsBean.java +++ b/samigo/samigo-app/src/java/org/sakaiproject/tool/assessment/ui/bean/author/PublishedAssessmentSettingsBean.java @@ -1608,7 +1608,7 @@ public ExtendedTime getExtendedTime() { } public String getExtendedTimeStartString() { - return getDisplayFormatFromDate(this.extendedTime.getStartDate()); + return tu.getDateTimeWithTimezoneConversion(this.extendedTime.getStartDate()); } public void setExtendedTimeStartString(String exTimeStartString) { @@ -1619,7 +1619,7 @@ public void setExtendedTimeStartString(String exTimeStartString) { } public String getExtendedTimeDueString() { - return getDisplayFormatFromDate(this.extendedTime.getDueDate()); + return tu.getDateTimeWithTimezoneConversion(this.extendedTime.getDueDate()); } public void setExtendedTimeDueString(String exTimeDueString) { @@ -1630,7 +1630,7 @@ public void setExtendedTimeDueString(String exTimeDueString) { } public String getExtendedTimeRetractString() { - return getDisplayFormatFromDate(this.extendedTime.getRetractDate()); + return tu.getDateTimeWithTimezoneConversion(this.extendedTime.getRetractDate()); } public void setExtendedTimeRetractString(String exTimeRetractString) { diff --git a/samigo/samigo-app/src/java/org/sakaiproject/tool/assessment/ui/listener/util/TimeUtil.java b/samigo/samigo-app/src/java/org/sakaiproject/tool/assessment/ui/listener/util/TimeUtil.java index 5225862a4d34..5a1b4b92df83 100755 --- a/samigo/samigo-app/src/java/org/sakaiproject/tool/assessment/ui/listener/util/TimeUtil.java +++ b/samigo/samigo-app/src/java/org/sakaiproject/tool/assessment/ui/listener/util/TimeUtil.java @@ -32,6 +32,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.joda.time.DateTime; +import org.joda.time.DateTimeZone; import org.joda.time.format.DateTimeFormat; import org.joda.time.format.DateTimeFormatter; import org.joda.time.format.ISODateTimeFormat; @@ -166,6 +167,20 @@ public String getIsoDateWithLocalTime(Date dateToConvert) { DateTimeFormatter localFmtTime = fmtTime.withLocale(new ResourceLoader().getLocale()); return dt.toString(localFmt) + " " + dt.toString(localFmtTime); } + + public String getDateTimeWithTimezoneConversion(Date dateToConvert) { + DateTime dt = new DateTime(dateToConvert); + DateTimeFormatter fmt = ISODateTimeFormat.yearMonthDay(); + DateTimeFormatter fmtTime = ISODateTimeFormat.hourMinuteSecond(); + + // If the client browser is in a different timezone than server, need to modify date + if (m_client_timezone !=null && m_server_timezone!=null && !m_client_timezone.hasSameRules(m_server_timezone)) { + DateTimeZone dateTimeZone = DateTimeZone.forTimeZone(m_client_timezone); + fmt = fmt.withZone(dateTimeZone); + fmtTime = fmtTime.withZone(dateTimeZone); + } + return dt.toString(fmt) + " " + dt.toString(fmtTime); + } /* * SAM-2323: the jquery-ui datepicker provides a hidden field with ISO-8601 date/time diff --git a/samigo/samigo-app/src/webapp/jsf/author/authorSettings.jsp b/samigo/samigo-app/src/webapp/jsf/author/authorSettings.jsp index 787af14d4df1..23e256640c43 100755 --- a/samigo/samigo-app/src/webapp/jsf/author/authorSettings.jsp +++ b/samigo/samigo-app/src/webapp/jsf/author/authorSettings.jsp @@ -50,7 +50,20 @@