MDL-39740 grade: Fix grade_item::add_idnumber strict type checking
authorAshley Holman <ashley@netspot.com.au>
Mon, 20 May 2013 02:45:29 +0000 (12:15 +0930)
committerAshley Holman <ashley@netspot.com.au>
Mon, 20 May 2013 02:45:29 +0000 (12:15 +0930)
lib/grade/grade_item.php

index 8d66765..d57d061 100644 (file)
@@ -437,7 +437,7 @@ class grade_item extends grade_object {
         }
 
         if ($this->itemtype == 'mod' and !$this->is_outcome_item()) {
-            if ($this->itemnumber === 0) {
+            if ($this->itemnumber == 0) {
                 // for activity modules, itemnumber 0 is synced with the course_modules
                 if (!$cm = get_coursemodule_from_instance($this->itemmodule, $this->iteminstance, $this->courseid)) {
                     return false;