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

Course user profile has a different pagelayout to other profile pages

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 3.8.6, 3.9.3, 3.10, 3.11, 4.0
    • 3.9.4, 3.10.1
    • Themes, UX
    • MOODLE_310_STABLE, MOODLE_311_STABLE, MOODLE_38_STABLE, MOODLE_39_STABLE, MOODLE_400_STABLE
    • MOODLE_310_STABLE, MOODLE_39_STABLE
    • wip_MDL-70267_m39
    • wip_MDL-70267_m311
    • wip_MDL-70267_master
    • Hide

      None.

      Show
      None.
    • 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'.

    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

            gb2048 Gareth J Barnard
            stuartlamour Stuart Lamour
            Farhan Karmali Farhan Karmali
            Adrian Greeve Adrian Greeve
            Anna Carissa Sadia Anna Carissa Sadia
            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:
              18/Jan/21

              Time Tracking

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