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 b884cf2a745abccc1f300b58e0ee324a5a547956 1 parent bac15e5
@stronk7 stronk7 authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/conditionlib.php
View
4 lib/conditionlib.php
@@ -596,7 +596,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) {
@@ -747,7 +747,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.