mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 06:18:28 +01:00
Merge branch 'MDL-45059-master' of https://github.com/sammarshallou/moodle
This commit is contained in:
commit
166dfd56b8
@ -79,9 +79,11 @@ class frontend extends \core_availability\frontend {
|
|||||||
\section_info $section = null) {
|
\section_info $section = null) {
|
||||||
global $CFG;
|
global $CFG;
|
||||||
|
|
||||||
// Group option can be used on sections, and on modules but only
|
// If groupmembersonly is turned on, then you can only add group
|
||||||
// if groupmembersonly is turned off. (To avoid confusion.)
|
// restrictions on sections (which don't use groupmembersonly) and
|
||||||
if (!is_null($cm) && $CFG->enablegroupmembersonly) {
|
// not on modules. This is to avoid confusion - otherwise
|
||||||
|
// there would be two ways to add restrictions based on groups.
|
||||||
|
if (is_null($section) && $CFG->enablegroupmembersonly) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -74,9 +74,11 @@ class frontend extends \core_availability\frontend {
|
|||||||
\section_info $section = null) {
|
\section_info $section = null) {
|
||||||
global $CFG, $DB;
|
global $CFG, $DB;
|
||||||
|
|
||||||
// Grouping option can be used on sections, and on modules but only
|
// If groupmembersonly is turned on, then you can only add group
|
||||||
// if groupmembersonly is turned off. (To avoid confusion.)
|
// restrictions on sections (which don't use groupmembersonly) and
|
||||||
if (!is_null($cm) && $CFG->enablegroupmembersonly) {
|
// not on modules. This is to avoid confusion - otherwise
|
||||||
|
// there would be two ways to add restrictions based on groups.
|
||||||
|
if (is_null($section) && $CFG->enablegroupmembersonly) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user