Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

MDL-35089 conditionals: detected one place missing sectioncache

Thanks to MDL-34936 and unit tests this was discovered like 2 new
places calling to get_fast_modinfo() without the sectioncache
column contents. Potential performance problem, leading to
reseting and recalculation of caches all the time.
  • Loading branch information...
commit 2b64e24ebe637b49188103671b5f043918eb1057 1 parent d71c486
@stronk7 stronk7 authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/conditionlib.php
View
4 lib/conditionlib.php
@@ -767,7 +767,7 @@ public function get_full_information($modinfo=null) {
$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 @@ public function is_available(&$information, $grabthelot=false, $userid=0, $modin
$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);
Please sign in to comment.
Something went wrong with that request. Please try again.