mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +02:00
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:
parent
a4b3fc9220
commit
ccccf04f70
16 changed files with 132 additions and 105 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue