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

Course user profile has a different pagelayout to other profile pages

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.8.6, 3.9.3, 3.10, 3.11, 4.0
    • Fix Version/s: 3.9.4, 3.10.1
    • Component/s: Themes, UX
    • Labels:
    • Testing Instructions:
      Hide
      1. Using the Boost theme.
      2. Login and under your username on the navbar, select 'Profile'.
        1. Instead of yourself you can log in as an administrator and observe the profile of a student.
      3. Inspect the page with the browser development tools (F12) and confirm that there is a body class of 'pagelayout-mypublic'.
      4. Create a course and enrol yourself on it. (if you are an administrator, just go to a course and click on the participants page, then click on a student to view their profile.)
      5. Under the course administration, then users tab, then enrolled users, click on your user name to go to the profile page.
      6. Inspect the page with the browser development tools (F12) and confirm that there is a body class of 'pagelayout-mypublic'.
      Show
      Using the Boost theme. Login and under your username on the navbar, select 'Profile'. Instead of yourself you can log in as an administrator and observe the profile of a student. Inspect the page with the browser development tools (F12) and confirm that there is a body class of 'pagelayout-mypublic'. Create a course and enrol yourself on it. (if you are an administrator, just go to a course and click on the participants page, then click on a student to view their profile.) Under the course administration, then users tab, then enrolled users, click on your user name to go to the profile page. Inspect the page with the browser development tools (F12) and confirm that there is a body class of 'pagelayout-mypublic'.
    • Workaround:
      Hide

      None.

      Show
      None.
    • Affected Branches:
      MOODLE_310_STABLE, MOODLE_311_STABLE, MOODLE_38_STABLE, MOODLE_39_STABLE, MOODLE_400_STABLE
    • Fixed Branches:
      MOODLE_310_STABLE, MOODLE_39_STABLE
    • Pull from Repository:
    • Pull 3.9 Branch:
      wip_MDL-70267_m39
    • Pull 3.10 Branch:
      wip_MDL-70267_m310
    • Pull 3.11 Branch:
      wip_MDL-70267_m311
    • Pull Master Branch:
      wip_MDL-70267_master

      Description

      Issue:

      When customising the user profile page through a theme we can set the mypublic pagelayout to use a custom layout file and associated mustache template.

       

      // Profile page.
          'mypublic' => [
              'file' => 'profile.php',
              'regions' => array('side-pre'),
              'defaultregion' => 'side-pre',
          ],
      

       

      Unfortunately these customisations do no work for a users profile when viewed from a course page on a course (e.g. /user/view.php?id=3&course=4) , as that page sets the pagelayout to standard which creates inconsistencies.

      Steps to reproduce:

      In a course view a users profile.

      Note the pagelaout is set to standard.

      Acceptance criteria:

      In user/view.php the pagelayout is the profile page layout (as it is in /user/profile.php):

      $PAGE->set_pagelayout('mypublic');

       

        Attachments

          Activity

            People

            Assignee:
            gb2048 Gareth J Barnard
            Reporter:
            stuartlamour Stuart Lamour
            Peer reviewer:
            Farhan Karmali Farhan Karmali
            Integrator:
            Adrian Greeve Adrian Greeve
            Tester:
            Anna Carissa Sadia Anna Carissa Sadia
            Participants:
            Component watchers:
            Huong Nguyen, Bas Brands, Mathew May, Huong Nguyen, Barbara Ramiro, Bas Brands, Mathew May
            Votes:
            19 Vote for this issue
            Watchers:
            7 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Fix Release Date:
              18/Jan/21

                Time Tracking

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 47 minutes
                47m