Skip to content

Commit

Permalink
Merge branch 'wip-MDL-45038-master' of git://github.com/marinaglancy/…
Browse files Browse the repository at this point in the history
…moodle
  • Loading branch information
danpoltawski committed Apr 11, 2014
2 parents af8a432 + 58d1139 commit 8a69b04
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion availability/classes/info_section.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class info_section extends info {
* @param \section_info $section Section object
*/
public function __construct(\section_info $section) {
parent::__construct(\get_course($section->course), $section->visible,
parent::__construct($section->modinfo->get_course(), $section->visible,
$section->availability);
$this->section = $section;
}
Expand Down
10 changes: 10 additions & 0 deletions lib/modinfolib.php
Original file line number Diff line number Diff line change
Expand Up @@ -2234,6 +2234,7 @@ class cached_cm_info {
* visible or not available, so this would be true in that case) - obtained dynamically
* @property-read string $sequence Comma-separated list of all modules in the section. Note, this field may not exactly
* match course_sections.sequence if later has references to non-existing modules or not modules of not available module types.
* @property-read course_modinfo $modinfo
*/
class section_info implements IteratorAggregate {
/**
Expand Down Expand Up @@ -2649,6 +2650,15 @@ private function get_course() {
return $this->modinfo->get_course_id();
}

/**
* Modinfo object
*
* @return course_modinfo
*/
private function get_modinfo() {
return $this->modinfo;
}

/**
* Prepares section data for inclusion in sectioncache cache, removing items
* that are set to defaults, and adding availability data if required.
Expand Down

0 comments on commit 8a69b04

Please sign in to comment.