Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: 1.9
-
Fix Version/s: 2.0
-
Component/s: Roles / Access
-
Labels:None
-
Affected Branches:MOODLE_19_STABLE
-
Fixed Branches:MOODLE_20_STABLE
Description
I wasn't getting anything returned with get_course_users, with a default front page role of student (it works fine if no role is assigned).
Looking at get_course_users in /lib/deprecatedlib.php, I see the following:
/// If the course id is the SITEID, we need to return all the users if the "defaultuserroleid"
/// has the capbility of accessing the site course. $CFG->nodefaultuserrolelists set to true can
/// over-rule using this.
if (($courseid == SITEID) && !empty($CFG->defaultuserroleid) && empty($CFG->nodefaultuserrolelists)) {
Should this last line be:
if (($courseid == SITEID) && empty($CFG->nodefaultuserrolelists)) {
Thanks.
Assigning to Petr. He has been working on SITE participans recently.
Petr, that function, although deprecated... is in use in a bunch of sites. Perhaps we should clean all those usages in a separate bug?