fwrite ($bf,full_tag("TIMELIMIT",4,false,$quiz->timelimit));
fwrite ($bf,full_tag("PASSWORD",4,false,$quiz->password));
fwrite ($bf,full_tag("SUBNET",4,false,$quiz->subnet));
+ fwrite ($bf,full_tag("POPUP",4,false,$quiz->popup));
//Now we print to xml question_grades (Course Level)
$status = backup_quiz_question_grades($bf,$preferences,$quiz->id);
//if we've selected to backup users info, then execute:
if ($oldversion < 2004120501) {
table_column("quiz_calculated", "", "correctanswerformat", "integer", "10", "", "2", "not null", "correctanswerlength");
}
+
+ if ($oldversion < 2004121400) { // New field to determine popup window behaviour
+ table_column("quiz", "", "popup", "integer", "4", "", "0", "not null", "subnet");
+ }
return true;
}
`timelimit` int(2) unsigned NOT NULL default '0',
`password` varchar(255) NOT NULL default '',
`subnet` varchar(255) NOT NULL default '',
+ `popup` tinyint(4) NOT NULL default '0',
PRIMARY KEY (`id`),
KEY `course` (`course`)
) TYPE=MyISAM COMMENT='Main information about each quiz';
table_column("quiz_calculated", "", "correctanswerformat", "integer", "10", "", "2", "not null", "correctanswerlength");
}
+ if ($oldversion < 2004121400) { // New field to determine popup window behaviour
+ table_column("quiz", "", "popup", "integer", "4", "", "0", "not null", "subnet");
+ }
+
return true;
}
timemodified integer NOT NULL default '0',
timelimit integer NOT NULL default '0',
password varchar(255) NOT NULL default '',
- subnet varchar(255) NOT NULL default ''
+ subnet varchar(255) NOT NULL default '',
+ popup integer NOT NULL default '0'
);
CREATE INDEX prefix_quiz_course_idx ON prefix_quiz (course);
$quiz->timelimit = backup_todb($info['MOD']['#']['TIMELIMIT']['0']['#']);
$quiz->password = backup_todb($info['MOD']['#']['PASSWORD']['0']['#']);
$quiz->subnet = backup_todb($info['MOD']['#']['SUBNET']['0']['#']);
+ $quiz->popup = backup_todb($info['MOD']['#']['POPUP']['0']['#']);
//We have to recode the questions field (a list of questions id)
//Extracts question id from sequence
// This fragment is called by moodle_needs_upgrading() and /admin/index.php
////////////////////////////////////////////////////////////////////////////////
-$module->version = 2004120501; // The (date) version of this module
+$module->version = 2004121400; // The (date) version of this module
$module->requires = 2004112300; // Requires this Moodle version
$module->cron = 0; // How often should cron check this module (seconds)?