Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

print_timer_selector function added for QuizTimer

  • Loading branch information...
commit 2d9b4f4bf5e3a0d23c5c5481bb7ebbf832c01d4b 1 parent 9cc93eb
julmis authored
Showing with 15 additions and 0 deletions.
  1. +15 −0 lib/weblib.php
View
15 lib/weblib.php
@@ -1929,6 +1929,21 @@ function print_time_selector($hour, $minute, $currenttime=0, $step=5) {
choose_from_menu($minutes, $minute, $currentdate['minutes'], "");
}
+function print_timer_selector($timelimit = 0) {
+/// Prints time limit value selector
+/// to add or edit quiz's time limit
+
+ global $CFG;
+
+ // Max timelimit is sessiontimeout - 10 minutes.
+ $maxvalue = ($CFG->sessiontimeout / 60) - 10;
+
+ for ($i=0; $i<=$maxvalue; $i++) {
+ $minutes[$i] = sprintf("%02d",$i);
+ }
+ choose_from_menu($minutes, "timelimit", $timelimit,"");
+}
+
function print_grade_menu($courseid, $name, $current, $includenograde=true) {
/// Prints a grade menu (as part of an existing form) with help
/// Showing all possible numerical grades and scales
Please sign in to comment.
Something went wrong with that request. Please try again.