Block position on the lesson pages editing interface... not sure if bug?

Block position on the lesson pages editing interface... not sure if bug?

by Bec Adamson -
Number of replies: 4

When we're editing pages in lessons if we have a block that is configured to Display on page types: any page it doesn't auto-move to the left column when the lesson page is in editing mode.

When editing in other modules, including the edit settings page of the lesson module the block is auto-moved to the left hand menu to allow the center column expansion room. It is only when editing lesson pages that we see the block remaining in the right-column. 

I've attached an example with just one block on page, but in our lessons there are multiple blocks stuck on the right, which makes accessing the content editing fields a bit of a challenge. 

Although my screenshots are taken using a lightly customised More theme this behavior happens when using the Clean theme too. 

Moodle: 2.72


Attachment block did not move when lesson page edited.JPG
Attachment block expected behavior on an edit or settings page.JPG
Average of ratings: -
In reply to Bec Adamson

Re: Block position on the lesson pages editing interface... not sure if bug?

by Jean-Michel Védrine -

Hello,

I can't reproduce the problem with the themes shipped with Moodle (clean and more) so most probably this is a problem with your theme.

In reply to Jean-Michel Védrine

Re: Block position on the lesson pages editing interface... not sure if bug?

by Bec Adamson -

Hi Jean-Michel

Thanks for the reply. 

How frustrating, this happens in my environment when I use both Clean and an unmodified version of More. This only presents when the block is configured to Display: all pages.

May I ask which version you were testing with? I'd like to run up a duplicate environment and check things out using that. 

Thanks again for your reply.

In reply to Bec Adamson

Re: Block position on the lesson pages editing interface... not sure if bug?

by Jean-Michel Védrine -

Oops, sorry but my test was too fast, I missed the "Display on page types: any page" part smile

Your second message prompted me to test again and I was able to reproduce the problem.

I looked at what other modules do when then want to move all the blocks to the left and it seems it's enough to add a single line in mod/lesson/editpage.php

If you are able to edit the files on your Moodle server, you can try to add

$PAGE->set_pagelayout('admin');

after

$PAGE->set_url('/mod/lesson/editpage.php', array('pageid'=>$pageid, 'id'=>$id, 'qtype'=>$qtype));

If you want,  you can create a tracker issue and I will make a patch and submit it so that this change is part of future Moodle versions.

In reply to Jean-Michel Védrine

Re: Block position on the lesson pages editing interface... not sure if bug?

by Bec Adamson -

Thanks so much for the second look Jean-Michel, that code addition appears to have fixed the issue in our environment. I know my staff are going to be very appreciative.

As you suggested I've opened a tracker issue for this:  Lesson module: the editing interface won't expand to full screen when blocks are configured to "Display on page types: any page" and placed in the right-hand column

Thanks again for the help.