mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 14:27:22 +01:00
MDL-8268 cleanup in get_user_capability_course()
This commit is contained in:
parent
4fd3348637
commit
e2b84345ea
@ -3550,12 +3550,7 @@ function count_role_users($roleid, $context, $parent=false) {
|
|||||||
* @param int $userid
|
* @param int $userid
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
function get_user_capability_course($capability, $userid='') {
|
function get_user_capability_course($capability, $userid=NULL) {
|
||||||
|
|
||||||
global $USER;
|
|
||||||
if (!$userid) {
|
|
||||||
$userid = $USER->id;
|
|
||||||
}
|
|
||||||
|
|
||||||
$usercourses = array();
|
$usercourses = array();
|
||||||
$courses = get_records_select('course', '', '', 'id, id');
|
$courses = get_records_select('course', '', '', 'id, id');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user