Skip to content

Commit

Permalink
print_timer_selector function added for QuizTimer
Browse files Browse the repository at this point in the history
  • Loading branch information
julmis committed Jun 2, 2004
1 parent 9cc93eb commit 2d9b4f4
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions lib/weblib.php
Expand Up @@ -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
Expand Down

0 comments on commit 2d9b4f4

Please sign in to comment.