Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-50839

Allow themes to set User menu avatar size

XMLWordPrintable

    • MOODLE_29_STABLE
    • MOODLE_30_STABLE
    • MDL-50839-master
    • Hide
      1. Modify a theme to override user_menu() from core_renderer; add an avatarsize option in the user_get_user_navigation_info call, e.g.
        $opts = user_get_user_navigation_info($user, $this->page, array('avatarsize' => 100));
      2. Verify that the user menu avatar picture is 100px wide and high on the page.
      3. Go to a user's profile and click "log in as". Check that your avatar is still 100px wide and high

      NB: The size on the web page is set by CSS, and may be different to the image's intrinsic size - ref MDL-50420.

      Show
      Modify a theme to override user_menu() from core_renderer; add an avatarsize option in the user_get_user_navigation_info call, e.g. $opts = user_get_user_navigation_info($user, $this->page, array('avatarsize' => 100)); Verify that the user menu avatar picture is 100px wide and high on the page. Go to a user's profile and click "log in as". Check that your avatar is still 100px wide and high NB: The size on the web page is set by CSS, and may be different to the image's intrinsic size - ref MDL-50420 .

      Currently the User menu's avatar is created via user_get_user_navigation_info() in user/lib.php (via $OUTPUT->user_picture()) - but this doesn't provide any way to set the avatar size.

      We should allow themes to pass options to user_get_user_navigation_info() - e.g. by overriding theme_{themename}_core_renderer::user_menu()

            balchd Dave Balch
            balchd Dave Balch
            Jetha Chan Jetha Chan
            David Monllaó David Monllaó
            John Okely John Okely
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.