Moodle
  1. Moodle
  2. MDL-36379

No blocks on course profile pages

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.3.2
    • Fix Version/s: 2.2.6, 2.3.3
    • Component/s: Navigation
    • Labels:
    • Rank:
      44011

      Description

      Just noting a problem which seems to only affect admins on moodle.org.

        Issue Links

          Activity

          Hide
          Martin Dougiamas added a comment -

          Works for me though at the moment ...

          Show
          Martin Dougiamas added a comment - Works for me though at the moment ...
          Hide
          Dan Poltawski added a comment -

          Curiously admin users profiles have blocks, but not non-admins but not tim: https://moodle.org/user/view.php?id=93821&course=5

          Show
          Dan Poltawski added a comment - Curiously admin users profiles have blocks, but not non-admins but not tim: https://moodle.org/user/view.php?id=93821&course=5
          Hide
          Dan Poltawski added a comment -

          it affects admins looking at non-admins profiles I think

          Show
          Dan Poltawski added a comment - it affects admins looking at non-admins profiles I think
          Hide
          Sam Hemelryk added a comment -

          To reproduce:

          1. Log in as an admin.
          2. Browse to your own or someone elses course profile.
          3. Turn on editing.
          4. Observe you no longer see blocks.

          This is happening because changes a couple months back to separate out the functionality to check if a the course supports AJAX editing.
          We need to ensure that any check to see whether the user is currently editing occurs after the page layout has been selected.
          This is caused because as part of those changes we also now check whether the theme wishes to support it AJAX editing.
          This requires the theme to be initialised, causing page and output to initialise.
          As soon as you enquire as to whether the user is editing we initialise everything and the page layout is locked.

          Its worth noting that it will be very rare that we check editing before the page has been set up however I don't doubt there will be other affected pages. We should keep an eye out for them.

          The solution is very simple, shift the offending call down in the script, or shift the page setup code up.

          Show
          Sam Hemelryk added a comment - To reproduce: Log in as an admin. Browse to your own or someone elses course profile. Turn on editing. Observe you no longer see blocks. This is happening because changes a couple months back to separate out the functionality to check if a the course supports AJAX editing. We need to ensure that any check to see whether the user is currently editing occurs after the page layout has been selected. This is caused because as part of those changes we also now check whether the theme wishes to support it AJAX editing. This requires the theme to be initialised, causing page and output to initialise. As soon as you enquire as to whether the user is editing we initialise everything and the page layout is locked. Its worth noting that it will be very rare that we check editing before the page has been set up however I don't doubt there will be other affected pages. We should keep an eye out for them. The solution is very simple, shift the offending call down in the script, or shift the page setup code up.
          Hide
          Sam Hemelryk added a comment -

          Up for peer-review now. Very simple change.

          Show
          Sam Hemelryk added a comment - Up for peer-review now. Very simple change.
          Hide
          Dan Poltawski added a comment -

          (Taking this straight into integration, since its simple enough)

          Show
          Dan Poltawski added a comment - (Taking this straight into integration, since its simple enough)
          Hide
          Dan Poltawski added a comment -

          Thanks Sam, i've reviewed and tested it on master and it looks great.

          Integrated to 22, 23 and master.

          Show
          Dan Poltawski added a comment - Thanks Sam, i've reviewed and tested it on master and it looks great. Integrated to 22, 23 and master.
          Hide
          Rajesh Taneja added a comment -

          Works Great, all blocks are visible.

          Thanks for fixing this, Sam.

          Show
          Rajesh Taneja added a comment - Works Great, all blocks are visible. Thanks for fixing this, Sam.
          Hide
          Eloy Lafuente (stronk7) added a comment -

          Amazed. Inspired. Grateful. That’s how your generosity makes me feel.

          (not really)

          Closing, thanks!

          Show
          Eloy Lafuente (stronk7) added a comment - Amazed. Inspired. Grateful. That’s how your generosity makes me feel. (not really) Closing, thanks!

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: