| '; - $output .= $OUTPUT->user_picture($user, array('size' => 100)); + $output .= $OUTPUT->user_picture($user, ['size' => 100]); $output .= ' | '; $output .= '';
- $output .= ' '.fullname($user, has_capability('moodle/site:viewfullnames', $context)).' ';
+ $output .= '' . fullname($user, has_capability('moodle/site:viewfullnames', $context)) . ' ';
$output .= '';
if (!empty($user->role) && ($user->role <> $course->teacher)) {
- $output .= $string->role .': '. $user->role .' '; + $output .= $string->role . ': ' . $user->role . ' '; } $extrafields = scheduler_get_user_fields($user, $context); @@ -133,33 +131,41 @@ function scheduler_print_user($user, $course, $messageselect=false, $return=fals if (!isset($hiddenfields['lastaccess'])) { if ($user->lastaccess) { - $output .= $string->lastaccess .': '. userdate($user->lastaccess); - $output .= ' ('. format_time(time() - $user->lastaccess, $datestring) .')'; + $output .= $string->lastaccess . ': ' . userdate($user->lastaccess); + $output .= ' (' . format_time(time() - $user->lastaccess, $datestring) . ')'; } else { - $output .= $string->lastaccess .': '. $string->never; + $output .= $string->lastaccess . ': ' . $string->never; } } + $output .= ' | ';
// Link to blogs.
if ($CFG->bloglevel > 0) {
- $output .= ''.get_string('blogs', 'blog').' '; + $output .= '' . get_string('blogs', 'blog') . + ' '; } + // Link to notes. - if (!empty($CFG->enablenotes) && (has_capability('moodle/notes:manage', $context) - || has_capability('moodle/notes:view', $context))) { - $output .= ''. - get_string('notes', 'notes').' '; + if ( + !empty($CFG->enablenotes) && (has_capability('moodle/notes:manage', $context) + || has_capability('moodle/notes:view', $context)) + ) { + $output .= '' . + get_string('notes', 'notes') . ' '; } - if (has_capability('moodle/site:viewreports', $context) || - has_capability('moodle/user:viewuseractivitiesreport', $usercontext)) { - $output .= ''. - $string->activity .' '; + if ( + has_capability('moodle/site:viewreports', $context) || + has_capability('moodle/user:viewuseractivitiesreport', $usercontext) + ) { + $output .= '' . + $string->activity . ' '; } - $output .= ''. $string->fullprofile .'...'; + + $output .= '' . $string->fullprofile . '...'; if (!empty($messageselect)) { - $output .= ' '; + $output .= ' '; } $output .= ' |
Item in primary menu
"}] }, diff --git a/templates/action_menu_link.mustache b/templates/action_menu_link.mustache index 28039a02..9ed19193 100644 --- a/templates/action_menu_link.mustache +++ b/templates/action_menu_link.mustache @@ -21,6 +21,7 @@ Example context (json): { + "id": "example-action-menu-link", "text": "Example link text", "showtext": true, "url": "http://example.com/link" diff --git a/templates/action_menu_trigger.mustache b/templates/action_menu_trigger.mustache index 5d467d8f..98b6029a 100644 --- a/templates/action_menu_trigger.mustache +++ b/templates/action_menu_trigger.mustache @@ -15,13 +15,14 @@ along with Moodle. If not, see