$participants = get_string("participants");
$user = get_record('user', 'id', $userid);
- $fullname = fullname($user, isteacher($course->id));
+ $fullname = fullname($user, has_capability('moodle/site:viewfullnames', $context));
// we got a few tabs there
if ($context->aggregatelevel == CONTEXT_USERID) {
// this needs to check capability too
$role = get_records('role');
+ $options = array();
foreach ($role as $rolex) {
if (user_can_assign($context, $rolex->id)) {
$options[$rolex->id] = $rolex->name;