Merge branch 'MDL-59632_master' of git://github.com/dmonllao/moodle
authorDan Poltawski <dan@moodle.com>
Mon, 31 Jul 2017 10:33:05 +0000 (11:33 +0100)
committerDan Poltawski <dan@moodle.com>
Mon, 31 Jul 2017 10:33:05 +0000 (11:33 +0100)
1  2 
lib/outputrenderers.php

diff --combined lib/outputrenderers.php
@@@ -2368,7 -2368,6 +2368,7 @@@ class core_renderer extends renderer_ba
       *     - 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;
@@@ -3176,7 -3170,7 +3176,7 @@@ EOD
              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);