Index: lams_tool_scratchie/web/pages/learning/learning.jsp
===================================================================
diff -u -r226f631124c7fc7f6a239b4d6ff85c07e7ebc002 -r162eacaf8ad9bd55ca16c8d5613c61640e343ed1
--- lams_tool_scratchie/web/pages/learning/learning.jsp (.../learning.jsp) (revision 226f631124c7fc7f6a239b4d6ff85c07e7ebc002)
+++ lams_tool_scratchie/web/pages/learning/learning.jsp (.../learning.jsp) (revision 162eacaf8ad9bd55ca16c8d5613c61640e343ed1)
@@ -21,7 +21,7 @@
<%@ include file="/common/header.jsp"%>
-
+
@@ -66,20 +66,35 @@
}
//time limit feature
-
+
$(document).ready(function(){
- //show confirmation dialog
- $.blockUI({
- message: $('#timelimit-start-dialog'),
- css: { width: '325px', height: '120px'},
- overlayCSS: { opacity: '.98'}
- });
+
+ //show timelimit-start-dialog in order to start countdown
+ if (${isTimeLimitNotLaunched}) {
+
+ $.blockUI({
+ message: $('#timelimit-start-dialog'),
+ css: { width: '325px', height: '120px'},
+ overlayCSS: { opacity: '.98'}
+ });
- //once OK button pressed start countdown
- $('#timelimit-start-ok').click(function() {
- $.unblockUI();
- displayCountdown();
- });
+ //once OK button pressed start countdown
+ $('#timelimit-start-ok').click(function() {
+
+ //store date when user has started activity with time limit
+ $.ajax({
+ async: true,
+ url: '',
+ data: 'sessionMapID=${sessionMapID}',
+ type: 'post'
+ });
+
+ $.unblockUI();
+ displayCountdown();
+ });
+ } else {
+ displayCountdown();
+ }
});
function displayCountdown(){
@@ -100,7 +115,7 @@
});
$('#countdown').countdown({
- until: '+${scratchie.timeLimit * 60}S',
+ until: '+${secondsLeft}S',
format: 'hMS',
compact: true,
onTick: function(periods) {
@@ -147,6 +162,7 @@
function refreshQuestionList() {
var url = "",
scrollTop = document.documentElement.scrollTop || document.body.scrollTop;
+
$("#questionListArea").load(
url,
{