Merge branch 'MDL-42663_master' of git://github.com/dmonllao/moodle

This commit is contained in:
Damyon Wiese 2013-11-04 10:49:06 +08:00
commit 0d0b93ce2f

View File

@ -31,21 +31,6 @@
var javatime = javatimeDate.getTime();
javatime = Math.floor(javatime/1000);
if (typeof(clocksettings)!='undefined') {
if (clocksettings.starttime) {
starttime = parseInt(clocksettings.starttime);
}
if (clocksettings.servertime) {
servertime = parseInt(clocksettings.servertime);
}
if (clocksettings.testlength) {
testlength = parseInt(clocksettings.testlength);
}
}
difference = javatime - servertime;
starttime = starttime + difference;
var dn = "";
var old = "";
@ -64,6 +49,21 @@
function show_clock() {
if (typeof(clocksettings) != 'undefined') {
if (clocksettings.starttime) {
starttime = parseInt(clocksettings.starttime);
}
if (clocksettings.servertime) {
servertime = parseInt(clocksettings.servertime);
}
if (clocksettings.testlength) {
testlength = parseInt(clocksettings.testlength);
}
}
difference = javatime - servertime;
starttime = starttime + difference;
//show clock in NS 4
if (document.layers)
document.ClockPosNS.visibility="show";