//If the category doesn't exist
if (!$exist) {
//Build a new category
+ $db_cat = new stdClass;
$db_cat->course = $course;
$db_cat->name = get_string('recreatedcategory','',$key);
$db_cat->info = get_string('recreatedcategory','',$key);
WHERE g.quiz = $instanceid");
}
-?>
+?>
\ No newline at end of file
<td align="right"><b><?php print_string("decimaldigits", "quiz") ?>:</b></td>
<td align="left">
<?php
- unset($options);
- $options[0] = '0';
- $options[1] = '1';
- $options[2] = '2';
- $options[3] = '3';
+ $options = array(
+ 0 => '0',
+ 1 => '1',
+ 2 => '2',
+ 3 => '3'
+ );
choose_from_menu($options, "decimalpoints", "$form->decimalpoints", "");
helpbutton("decimalpoints", get_string("decimaldigits","quiz"), "quiz");
?>
//$GLOBALS['traverse_array']=""; //Debug
//Now, build the QUIZ record structure
+ $quiz = new stdClass;
$quiz->course = $restore->course_id;
$quiz->name = backup_todb($info['MOD']['#']['NAME']['0']['#']);
$quiz->intro = backup_todb($info['MOD']['#']['INTRO']['0']['#']);
$oldid = backup_todb($gra_info['#']['ID']['0']['#']);
//Now, build the QUESTION_INSTANCES record structure
+ $instance = new stdClass;
$instance->quiz = $quiz_id;
$instance->question = backup_todb($gra_info['#']['QUESTION']['0']['#']);
$instance->grade = backup_todb($gra_info['#']['GRADE']['0']['#']);
$oldid = backup_todb($ver_info['#']['ID']['0']['#']);
//Now, build the QUESTION_VERSIONS record structure
+ $version = new stdClass;
$version->quiz = $quiz_id;
$version->oldquestion = backup_todb($ver_info['#']['OLDQUESTION']['0']['#']);
$version->newquestion = backup_todb($ver_info['#']['NEWQUESTION']['0']['#']);
$olduserid = backup_todb($att_info['#']['USERID']['0']['#']);
//Now, build the ATTEMPTS record structure
+ $attempt = new stdClass;
$attempt->quiz = $quiz_id;
$attempt->userid = backup_todb($att_info['#']['USERID']['0']['#']);
$attempt->attempt = backup_todb($att_info['#']['ATTEMPTNUM']['0']['#']);
$olduserid = backup_todb($gra_info['#']['USERID']['0']['#']);
//Now, build the GRADES record structure
+ $grade = new stdClass;
$grade->quiz = $quiz_id;
$grade->userid = backup_todb($gra_info['#']['USERID']['0']['#']);
$grade->grade = backup_todb($gra_info['#']['GRADEVAL']['0']['#']);
b.table_name = 'question' AND
q.id = b.new_id AND
q.questiontextformat = ".FORMAT_WIKI)) {
+ $i = 0;
foreach ($records as $record) {
//Rebuild wiki links
$record->questiontext = restore_decode_wiki_content($record->questiontext, $restore);
return implode(',', $questionids);
}
-?>
+?>
\ No newline at end of file