mirror of
https://github.com/moodle/moodle.git
synced 2025-04-20 07:56:06 +02:00
FIxed some problems when getting teacher lists for print_course
This commit is contained in:
parent
73b998684b
commit
0a3e970319
@ -1535,7 +1535,7 @@ function print_course($course, $width="100%") {
|
||||
|
||||
if ($teachers = get_users_by_capability($context, 'moodle/course:update',
|
||||
'u.*, ul.timeaccess as lastaccess, ra.hidden',
|
||||
$sort, '','','',$exceptions, false)) {
|
||||
'r.sortorder ASC', '','','','', false)) {
|
||||
$canseehidden = has_capability('moodle/role:viewhiddenassigns', $context);
|
||||
$namesarray = array();
|
||||
foreach ($teachers as $teacher) {
|
||||
|
@ -2654,6 +2654,7 @@ function get_users_by_capability($context, $capability, $fields='', $sort='',
|
||||
$select = " SELECT $fields";
|
||||
$from = " FROM {$CFG->prefix}user u
|
||||
INNER JOIN {$CFG->prefix}role_assignments ra ON ra.userid = u.id
|
||||
INNER JOIN {$CFG->prefix}role r ON r.id = ra.roleid
|
||||
LEFT OUTER JOIN {$CFG->prefix}user_lastaccess ul ON ul.userid = u.id
|
||||
$groupjoin";
|
||||
$where = " WHERE ra.contextid ".get_related_contexts_string($context)."
|
||||
|
Loading…
x
Reference in New Issue
Block a user