backup MDL-22139 fixed incorrect backup param
authorAndrew Davis <andrew@affinitysoftware.net>
Wed, 14 Jul 2010 09:08:10 +0000 (09:08 +0000)
committerAndrew Davis <andrew@affinitysoftware.net>
Wed, 14 Jul 2010 09:08:10 +0000 (09:08 +0000)
backup/moodle2/backup_stepslib.php

index 2eb9d1c..82a0296 100644 (file)
@@ -690,7 +690,7 @@ class backup_gradebook_structure_step extends backup_structure_step {
         $grade_items_sql ="SELECT * FROM {grade_items} 
                            WHERE courseid = :courseid
                            AND (itemtype='manual' OR itemtype='course' OR itemtype='category')";
         $grade_items_sql ="SELECT * FROM {grade_items} 
                            WHERE courseid = :courseid
                            AND (itemtype='manual' OR itemtype='course' OR itemtype='category')";
-        $grade_items_params = array('courseid'=>$this->get_courseid());
+        $grade_items_params = array('courseid'=>backup::VAR_COURSEID);
         $grade_item->set_source_sql($grade_items_sql, $grade_items_params);
 
         if ($userinfo) {
         $grade_item->set_source_sql($grade_items_sql, $grade_items_params);
 
         if ($userinfo) {