Index: lams_tool_assessment/conf/language/lams/ApplicationResources.properties
===================================================================
diff -u -r29bc39cd5828fbffdc6a414fd18b91e6a89f66c4 -re321be7f93ea35c8418b5de59bc1806d985fd80f
--- lams_tool_assessment/conf/language/lams/ApplicationResources.properties (.../ApplicationResources.properties) (revision 29bc39cd5828fbffdc6a414fd18b91e6a89f66c4)
+++ lams_tool_assessment/conf/language/lams/ApplicationResources.properties (.../ApplicationResources.properties) (revision e321be7f93ea35c8418b5de59bc1806d985fd80f)
@@ -400,13 +400,16 @@
label.monitoring.summary.time.limit.seconds = seconds
label.monitoring.summary.time.limit.enabled = Enabled
label.monitoring.summary.time.limit.disabled = Disabled
-label.monitoring.summary.time.limit.running = Running
label.monitoring.summary.time.limit.start = Start
label.monitoring.summary.time.limit.cancel = Cancel
label.monitoring.summary.time.limit.plus.minute.1 = Plus 1 minute
label.monitoring.summary.time.limit.plus.minute.5 = Plus 5 minutes
label.monitoring.summary.time.limit.minus.minute.1 = Minus 1 minute
label.monitoring.summary.time.limit.minus.minute.5 = Minus 5 minutes
+label.monitoring.summary.time.limit.finish.now = Finish now
+label.monitoring.summary.time.limit.finish.now.confirm = Are you sure you want to make all learners finish their work right now?
+
+
#======= End labels: Exported 372 labels for en AU =====
Index: lams_tool_assessment/web/pages/monitoring/parts/timeLimit.jsp
===================================================================
diff -u -r29bc39cd5828fbffdc6a414fd18b91e6a89f66c4 -re321be7f93ea35c8418b5de59bc1806d985fd80f
--- lams_tool_assessment/web/pages/monitoring/parts/timeLimit.jsp (.../timeLimit.jsp) (revision 29bc39cd5828fbffdc6a414fd18b91e6a89f66c4)
+++ lams_tool_assessment/web/pages/monitoring/parts/timeLimit.jsp (.../timeLimit.jsp) (revision e321be7f93ea35c8418b5de59bc1806d985fd80f)
@@ -31,8 +31,8 @@
- |
+
+ |
+
@@ -80,8 +83,8 @@
|
-
+
|
+
+
+
+ |
+
Index: lams_tool_assessment/web/pages/monitoring/summary.jsp
===================================================================
diff -u -r29bc39cd5828fbffdc6a414fd18b91e6a89f66c4 -re321be7f93ea35c8418b5de59bc1806d985fd80f
--- lams_tool_assessment/web/pages/monitoring/summary.jsp (.../summary.jsp) (revision 29bc39cd5828fbffdc6a414fd18b91e6a89f66c4)
+++ lams_tool_assessment/web/pages/monitoring/summary.jsp (.../summary.jsp) (revision e321be7f93ea35c8418b5de59bc1806d985fd80f)
@@ -342,7 +342,7 @@
}
// no negative time limit is allowed
- if (displayedRelativeTimeLimit == 0 && adjust < 0){
+ if (displayedRelativeTimeLimit == 0 && adjust < 0) {
return;
}
@@ -363,7 +363,7 @@
// if time limit is not enforced yet, just update the screen
displayedRelativeTimeLimit = adjustedRelativeTimeLimit;
$('#relative-time-limit-value').text(displayedRelativeTimeLimit);
- $('#relative-time-limit-start').removeClass('disabled');
+ $('#relative-time-limit-start').prop('disabled', false);
return;
}
@@ -388,12 +388,18 @@
// turn on the time limit, if there is any value on counter set already
if (toggle === true && secondsLeft) {
updateAbsoluteTimeLimitCounter(secondsLeft, true);
+ return;
}
+
+ if (toggle === 'stop') {
+ absoluteTimeLimit = Math.round(new Date().getTime() / 1000);
+ updateAbsoluteTimeLimitCounter();
+ }
return;
}
// counter is not set yet and user clicked negative value
- if (!secondsLeft && adjust < 0){
+ if (!secondsLeft && adjust < 0) {
return;
}
@@ -406,7 +412,7 @@
// is time limit already enforced, update the server
// if time limit is not enforced yet, just update the screen
updateAbsoluteTimeLimitCounter(secondsLeft);
- $('#absolute-time-limit-start').removeClass('disabled');
+ $('#absolute-time-limit-start').prop('disabled', false);
return;
}
}
@@ -436,12 +442,12 @@
$('#relative-time-limit-disabled').addClass('hidden');
$('#relative-time-limit-cancel').removeClass('hidden');
$('#relative-time-limit-enabled').removeClass('hidden');
- $('#relative-time-limit-start').addClass('hidden').removeClass('disabled');
+ $('#relative-time-limit-start').addClass('hidden');
} else {
$('#relative-time-limit-disabled').removeClass('hidden');
$('#relative-time-limit-cancel').addClass('hidden');
$('#relative-time-limit-enabled').addClass('hidden');
- $('#relative-time-limit-start').removeClass('hidden').addClass('disabled');
+ $('#relative-time-limit-start').removeClass('hidden').prop('disabled', true);
}
if (absoluteTimeLimit === null) {
@@ -452,12 +458,14 @@
$('#absolute-time-limit-disabled').removeClass('hidden');
$('#absolute-time-limit-cancel').addClass('hidden');
$('#absolute-time-limit-enabled').addClass('hidden');
- $('#absolute-time-limit-start').removeClass('hidden').addClass('disabled');
+ $('#absolute-time-limit-start').removeClass('hidden').prop('disabled', true);
+ $('#absolute-time-limit-finish-now').prop('disabled', false);
} else {
$('#absolute-time-limit-disabled').addClass('hidden');
$('#absolute-time-limit-cancel').removeClass('hidden');
$('#absolute-time-limit-enabled').removeClass('hidden');
- $('#absolute-time-limit-start').addClass('hidden').removeClass('disabled');
+ $('#absolute-time-limit-start').addClass('hidden');
+ $('#absolute-time-limit-finish-now').prop('disabled', absoluteTimeLimit <= Math.round(new Date().getTime() / 1000));
}
}
});
@@ -480,8 +488,12 @@
updateTimeLimitOnServer();
return;
}
- // counter initialisation on page load
+ // counter initialisation on page load or "finish now"
secondsLeft = absoluteTimeLimit - now;
+ if (secondsLeft <= 0) {
+ // finish now
+ updateTimeLimitOnServer();
+ }
}
var counter = $('#absolute-time-limit-counter');
@@ -518,6 +530,12 @@
}
}
+ function timeLimitFinishNow(){
+ if (confirm('')) {
+ updateTimeLimit('absolute', 'stop');
+ }
+ }
+
|