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

User myprofile renderer additional classes bug

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • 3.9 regressions, 4.5.4, 5.0
    • User management
    • MOODLE_405_STABLE, MOODLE_500_STABLE
    • MDL-85554-405
    • MDL-85554-500
    • Hide
      1. Manually apply the following change:

        diff --git a/lib/myprofilelib.php b/lib/myprofilelib.php
        index 8b197430cea..4d6155b239c 100644
        --- a/lib/myprofilelib.php
        +++ b/lib/myprofilelib.php
        @@ -45,7 +45,7 @@ function core_myprofile_navigation(core_user\output\myprofile\tree $tree, $user,
             // No after property specified intentionally. It is a hack to make administration block appear towards the end. Refer MDL-49928.
             $coursedetailscategory = new core_user\output\myprofile\category('coursedetails', get_string('coursedetails'));
             $miscategory = new core_user\output\myprofile\category('miscellaneous', get_string('miscellaneous'), 'coursedetails');
        -    $reportcategory = new core_user\output\myprofile\category('reports', get_string('reports'), 'miscellaneous');
        +    $reportcategory = new core_user\output\myprofile\category('reports', get_string('reports'), 'miscellaneous', 'fw-bold');
             $admincategory = new core_user\output\myprofile\category('administration', get_string('administration'), 'reports');
             $loginactivitycategory = new core_user\output\myprofile\category('loginactivity', get_string('loginactivity'), 'administration');
         
        

      2. Log in as admin
      3. Navigate to your profile
      4. Confirm the Reports section has consistent bottom margin, and the links are in bold text
      Show
      Manually apply the following change: diff --git a/lib/myprofilelib.php b/lib/myprofilelib.php index 8b197430cea..4d6155b239c 100644 --- a/lib/myprofilelib.php +++ b/lib/myprofilelib.php @@ -45,7 +45,7 @@ function core_myprofile_navigation(core_user\output\myprofile\tree $tree, $user, // No after property specified intentionally. It is a hack to make administration block appear towards the end. Refer MDL-49928. $coursedetailscategory = new core_user\output\myprofile\category('coursedetails', get_string('coursedetails')); $miscategory = new core_user\output\myprofile\category('miscellaneous', get_string('miscellaneous'), 'coursedetails'); - $reportcategory = new core_user\output\myprofile\category('reports', get_string('reports'), 'miscellaneous'); + $reportcategory = new core_user\output\myprofile\category('reports', get_string('reports'), 'miscellaneous', 'fw-bold'); $admincategory = new core_user\output\myprofile\category('administration', get_string('administration'), 'reports'); $loginactivitycategory = new core_user\output\myprofile\category('loginactivity', get_string('loginactivity'), 'administration'); Log in as admin Navigate to your profile Confirm the Reports section has consistent bottom margin, and the links are in bold text
    • Hide

      Code verified against automated checks.

      Checked MDL-85554 using repository: https://github.com/paulholden/moodle.git

      More information about this report

      Built on: Wed Jun 4 13:44:51 UTC 2025

      Show
      Code verified against automated checks. Checked MDL-85554 using repository: https://github.com/paulholden/moodle.git MOODLE_405_STABLE (0 errors / 0 warnings) [branch: MDL-85554-405 | CI Job ] MOODLE_500_STABLE (0 errors / 0 warnings) [branch: MDL-85554-500 | CI Job ] main (0 errors / 0 warnings) [branch: MDL-85554 | CI Job ] More information about this report Built on: Wed Jun 4 13:44:51 UTC 2025

      Hi,
      I think there should be a space before $classes and after mb-3. Currently, the additional classes from $classes will be concatenated with mb-3 and won't work correctly.

      array('class' => 'node_category card d-inline-block w-100 mb-3' . $classes));

      This is on line 68 of the core_user\output\myprofile\renderer class (method render_category).

      https://github.com/moodle/moodle/blob/b4a8c83ea35a4a6d0e6657570f9d2d51afc55629/user/classes/output/myprofile/renderer.php#L68

       

            pholden Paul Holden
            szymonkarolczuk Szymon Karolczuk
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:

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