X7ROOT File Manager
Current Path:
/home/cbholdings/pasukulu/mod/lesson
home
/
cbholdings
/
pasukulu
/
mod
/
lesson
/
📁
..
📁
backup
📁
classes
📄
continue.php
(5.31 KB)
📁
db
📄
deprecatedlib.php
(2.77 KB)
📄
edit.php
(3.11 KB)
📄
editpage.php
(7.37 KB)
📄
editpage_form.php
(1.95 KB)
📄
essay.php
(21.67 KB)
📄
essay_form.php
(2.36 KB)
📄
format.php
(32.28 KB)
📄
grade.php
(1.6 KB)
📄
import.php
(3.92 KB)
📄
import_form.php
(3.14 KB)
📄
index.php
(4.18 KB)
📁
lang
📄
lesson.php
(5.83 KB)
📄
lib.php
(61.78 KB)
📄
locallib.php
(209.21 KB)
📄
mediafile.php
(3.78 KB)
📄
mod_form.php
(21.62 KB)
📄
override_form.php
(11.74 KB)
📄
overridedelete.php
(3.78 KB)
📄
overrideedit.php
(8.22 KB)
📄
overrides.php
(12.01 KB)
📁
pagetypes
📁
pix
📄
renderer.php
(27.99 KB)
📄
report.php
(16.8 KB)
📄
settings.php
(8.72 KB)
📄
tabs.php
(3.58 KB)
📁
templates
📁
tests
📄
timer.js
(2.82 KB)
📄
upgrade.txt
(2.4 KB)
📄
version.php
(1.17 KB)
📄
view.php
(11.2 KB)
📄
view_form.php
(1.95 KB)
Editing: timer.js
/*///////////////////////////////////////////////////////// // This code is based off of // "Live Clock Lite" script - Version 1.0 // By Mark Plachetta (astroboy@zip.com.au) // // The original script displayed a clock. // Mark Nielsen modified it to be a countdown timer // for the lesson module in moodle. // // Below is the code that is used to call this page. // echo "<script type=\"text/javascript\">\n"; // echo "var starttime = ". $timer->starttime . ";\n"; // echo "var servertime = ". time() . ";\n"; // echo "var testlength = ". $lesson->timelimit .";\n"; // echo "document.write('<script type=\"text/javascript\" src=\"liveclock_lite.js\"><\/script>');\n"; // echo "window.onload = function () { show_clock(); }"; // echo "</script>\n"; // //////////////////////////////////////////////////////////*/ var stopclock = 0; var myclock = ''; var timeleft, hours, minutes, secs; var javatimeDate = new Date(); 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; /*function leave() { // feable attempt to run a script when someone leaves a timed test early, failed so far window.onunload = window.open('http://www.google.com','','toolbar=no,menubar=no,location=no,height=500,width=500'); } leave();*/ function show_clock() { currentDate = new Date(); current = currentDate.getTime(); current = Math.floor(current / 1000); var mytime = '', myclock = document.getElementById("lesson-timer"); if (current > starttime + testlength) { mytime += M.util.get_string('timeisup', 'lesson'); stopclock = 1; } else { timeleft = starttime + testlength - current; if (timeleft < 60) { myclock.className = "timeleft1"; } hours = Math.floor(timeleft / 3600); timeleft = timeleft - (hours * 3600); minutes = Math.floor(timeleft / 60); secs = timeleft - (minutes * 60); if (secs < 10) { secs = "0" + secs; } if (minutes < 10) { minutes = "0" + minutes; } mytime += hours + ":" + minutes + ":" + secs; } myclock.innerHTML = mytime; if (stopclock == 0) { setTimeout("show_clock()", 1000); } }
Upload File
Create Folder