$string['timedelay'] = 'You are not allowed to do the quiz since you have not passed the time delay before attempting another quiz';
$string['timeleft'] = 'Time Remaining';
$string['timelimit'] = 'Time limit';
+$string['timelimitmin'] = 'Time limit (minutes)';
$string['timelimitexeeded'] = 'Sorry! Quiz time limit exceeded!';
$string['timestr'] = '%%H:%%M:%%S on %%d/%%m/%%y';
$string['timesup'] = 'Time is up!';
<FIELD NAME="grade" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="false" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="sumgrades" NEXT="timecreated"/>
<FIELD NAME="timecreated" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="grade" NEXT="timemodified"/>
<FIELD NAME="timemodified" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="timecreated" NEXT="timelimit"/>
- <FIELD NAME="timelimit" TYPE="int" LENGTH="2" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="timemodified" NEXT="password"/>
+ <FIELD NAME="timelimit" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="timemodified" NEXT="password"/>
<FIELD NAME="password" TYPE="char" LENGTH="255" NOTNULL="true" SEQUENCE="false" ENUM="false" PREVIOUS="timelimit" NEXT="subnet"/>
<FIELD NAME="subnet" TYPE="char" LENGTH="255" NOTNULL="true" SEQUENCE="false" ENUM="false" PREVIOUS="password" NEXT="popup"/>
<FIELD NAME="popup" TYPE="int" LENGTH="4" NOTNULL="true" UNSIGNED="false" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="subnet" NEXT="delay1"/>
$db->debug = true;
}
+ if ($result && $oldversion < 2007070200) {
+
+ /// Changing precision of field timelimit on table quiz to (10)
+ $table = new XMLDBTable('quiz');
+ $field = new XMLDBField('timelimit');
+ $field->setAttributes(XMLDB_TYPE_INTEGER, '10', XMLDB_UNSIGNED, XMLDB_NOTNULL, null, null, null, '0', 'timemodified');
+
+ /// Launch change of precision for field timelimit
+ $result = $result && change_field_precision($table, $field);
+ }
+
return $result;
}
$timelimitgrp=array();
$timelimitgrp[] = &$mform->createElement('text', 'timelimit');
$timelimitgrp[] = &$mform->createElement('checkbox', 'timelimitenable', '', get_string('enable'));
- $mform->addGroup($timelimitgrp, 'timelimitgrp', get_string("timelimit", "quiz"), array(' '), false);
+ $mform->addGroup($timelimitgrp, 'timelimitgrp', get_string('timelimitmin', 'quiz'), array(' '), false);
$mform->setType('timelimit', PARAM_TEXT);
$timelimitgrprules = array();
$timelimitgrprules['timelimit'][] = array(null, 'numeric', null, 'client');
// This fragment is called by moodle_needs_upgrading() and /admin/index.php
////////////////////////////////////////////////////////////////////////////////
-$module->version = 2007062600; // The (date) version of this module
+$module->version = 2007070200; // The (date) version of this module
$module->requires = 2007062401; // Requires this Moodle version
$module->cron = 0; // How often should cron check this module (seconds)?