mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 06:18:28 +01:00
Merge branch 'wip-MDL-45038-master' of git://github.com/marinaglancy/moodle
This commit is contained in:
commit
8a69b046e5
@ -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;
|
||||
}
|
||||
|
@ -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 {
|
||||
/**
|
||||
@ -2649,6 +2650,15 @@ class section_info implements IteratorAggregate {
|
||||
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.
|
||||
|
Loading…
x
Reference in New Issue
Block a user