You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
list ($select, $from, $where, $params) = user_get_participants_sql($courseid, 0, 0, 5);
Role "5" is hardcoded. This role is usually 'student' but you can not be sure that's always true.
A cleaner way would be to fetch the id from database using the role shortname "student". $DB->get_record('role', array('shortname' => 'student'));
Enhancement (non blocking for approval) :
IMO the best way would be to add a setting to select the students role(s) (some institutions can have several roles for students) :-)
The text was updated successfully, but these errors were encountered:
In
moodle-block_mystudents/view.php
Line 52 in c780831
Role "5" is hardcoded. This role is usually 'student' but you can not be sure that's always true.
A cleaner way would be to fetch the id from database using the role shortname "student".
$DB->get_record('role', array('shortname' => 'student'));
Enhancement (non blocking for approval) :
IMO the best way would be to add a setting to select the students role(s) (some institutions can have several roles for students) :-)
The text was updated successfully, but these errors were encountered: