* - alttext=true (add image alt attribute)
* - class = image class attribute (default 'userpicture')
* - visibletoscreenreaders=true (whether to be visible to screen readers)
+ * - includefullname=false (whether to include the user's full name together with the user picture)
* @return string HTML fragment
*/
public function user_picture(stdClass $user, array $options = null) {
// get the image html output fisrt
$output = html_writer::empty_tag('img', $attributes);
+ // Show fullname together with the picture when desired.
+ if ($userpicture->includefullname) {
+ $output .= fullname($userpicture->user);
+ }
+
// then wrap it in link if needed
if (!$userpicture->link) {
return $output;
array('role' => 'button', 'tabindex' => 0));
$formattrs = array('class' => 'search-input-form', 'action' => $CFG->wwwroot . '/search/index.php');
$inputattrs = array('type' => 'text', 'name' => 'q', 'placeholder' => get_string('search', 'search'),
- 'size' => 13, 'tabindex' => -1, 'id' => 'id_q_' . $id);
+ 'size' => 13, 'tabindex' => -1, 'id' => 'id_q_' . $id, 'class' => 'form-control');
$contents = html_writer::tag('label', get_string('enteryoursearchquery', 'search'),
array('for' => 'id_q_' . $id, 'class' => 'accesshide')) . html_writer::tag('input', '', $inputattrs);