1) has_capability call used in fullname()
2) initialised array $options
3) $context->level has been renamed to $context->aggregatelevel
This commit is contained in:
vyshane
2006-08-22 05:44:32 +00:00
parent c1a657cc1f
commit 021a7467b5
+3 -2
View File
@@ -40,11 +40,11 @@
$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));
$straction = get_string('overrideroles', 'role');
// we got a few tabs there
if ($context->level == CONTEXT_USERID) {
if ($context->aggregatelevel == CONTEXT_USERID) {
/// course header
if ($courseid!= SITEID) {
@@ -121,6 +121,7 @@
// this needs to check capability too
$role = get_records('role');
$options = array();
foreach ($role as $rolex) {
if (user_can_override($context, $rolex->id)) {
$options[$rolex->id] = $rolex->name;