]> git.mjollnir.org Git - moodle.git/commitdiff
Fix Eclipse warnings.
authortjhunt <tjhunt>
Tue, 22 Aug 2006 19:00:18 +0000 (19:00 +0000)
committertjhunt <tjhunt>
Tue, 22 Aug 2006 19:00:18 +0000 (19:00 +0000)
mod/quiz/backuplib.php
mod/quiz/mod.html
mod/quiz/restorelib.php

index 19b91502ac7c531d9e66f68b7f93b473d84b911c..9acde063d554fd2a601d8162af33aeb5bcafad73 100644 (file)
                 //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
index 7544616c6902416f4196a6c66637c3e5668da5d9..2c8052208604ce57c40802e2cf7b7b8257be0f06 100644 (file)
@@ -489,11 +489,12 @@ function output_quiz_options_fields($form, $showfixed) {
         <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");
          ?>
index 179f5c1bf5285f5be2d9ffa502a393a116ee6b94..f1b666d55326873ee4dc35bb495722b3b6a9dd3e 100644 (file)
@@ -59,6 +59,7 @@
             //$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