Multianswer restore now works.

Timelimit is rounded to integer before saving in the database
Some more diagnostic error messages
Towards more plugable question types: $QUIZ_MENU is now populated by the question types themselves.
This commit is contained in:
gustav_delius 2006-03-18 14:14:55 +00:00
parent a4b3fc9220
commit ccccf04f70
16 changed files with 132 additions and 105 deletions

View file

@ -43,6 +43,8 @@ function quiz_add_instance($quiz) {
$quiz->availableminute);
}
$quiz->timelimit = round($quiz->timelimit);
if (empty($quiz->name)) {
if (empty($quiz->intro)) {
$quiz->name = get_string('modulename', 'quiz');
@ -134,6 +136,8 @@ function quiz_update_instance($quiz) {
$quiz->availableminute);
}
$quiz->timelimit = round($quiz->timelimit);
$quiz->id = $quiz->instance;
if (!update_record("quiz", $quiz)) {
@ -268,7 +272,7 @@ function quiz_delete_instance($id) {
*/
function quiz_delete_course($course, $feedback=true) {
global $CFG;
global $CFG, $QTYPES;
//To detect if we have created the "container category"
$concatid = 0;