Merge branch 'MDL-35089' of git://github.com/stronk7/moodle
authorAparup Banerjee <aparup@moodle.com>
Wed, 5 Sep 2012 07:02:17 +0000 (15:02 +0800)
committerAparup Banerjee <aparup@moodle.com>
Wed, 5 Sep 2012 07:02:17 +0000 (15:02 +0800)
lib/conditionlib.php

index 7557190..96b9580 100644 (file)
@@ -767,7 +767,7 @@ abstract class condition_info_base {
                 $course = $COURSE;
             } else {
                 $course = $DB->get_record('course', array('id' => $this->item->course),
-                        'id, enablecompletion, modinfo', MUST_EXIST);
+                        'id, enablecompletion, modinfo, sectioncache', MUST_EXIST);
             }
             foreach ($this->item->conditionscompletion as $cmid => $expectedcompletion) {
                 if (!$modinfo) {
@@ -929,7 +929,7 @@ abstract class condition_info_base {
                 $course = $COURSE;
             } else {
                 $course = $DB->get_record('course', array('id' => $this->item->course),
-                        'id, enablecompletion, modinfo', MUST_EXIST);
+                        'id, enablecompletion, modinfo, sectioncache', MUST_EXIST);
             }
 
             $completion = new completion_info($course);