Skip to content

Commit

Permalink
FIxed some problems when getting teacher lists for print_course
Browse files Browse the repository at this point in the history
  • Loading branch information
moodler committed Sep 25, 2006
1 parent 73b9986 commit 0a3e970
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion course/lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
1 change: 1 addition & 0 deletions lib/accesslib.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)."
Expand Down

0 comments on commit 0a3e970

Please sign in to comment.