MDL-8268 cleanup in get_user_capability_course()

This commit is contained in:
skodak 2007-02-14 22:53:17 +00:00
parent 4fd3348637
commit e2b84345ea

View File

@ -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');