mirror of
https://github.com/moodle/moodle.git
synced 2025-04-13 20:42:22 +02:00
Merge branch 'wip-MDL-46338-master' of git://github.com/marinaglancy/moodle
This commit is contained in:
commit
be5a27f2f5
@ -48,8 +48,11 @@ class enrol_self_plugin extends enrol_plugin {
|
||||
$key = false;
|
||||
$nokey = false;
|
||||
foreach ($instances as $instance) {
|
||||
if (!$instance->customint6) {
|
||||
// New enrols not allowed.
|
||||
if ($this->can_self_enrol($instance, false) !== true) {
|
||||
// User can not enrol himself.
|
||||
// Note that we do not check here if user is already enrolled for performance reasons -
|
||||
// such check would execute extra queries for each course in the list of courses and
|
||||
// would hide self-enrolment icons from guests.
|
||||
continue;
|
||||
}
|
||||
if ($instance->password or $instance->customint1) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user