Moodle DevCamp 2019 - Idea exchange and progress tracking

Display block content on main section of the course page

 
Picture of David Bogner
Display block content on main section of the course page
by David Bogner - Tuesday, 13 August 2019, 6:30 PM
 

Dear all,

often blocks provide useful features for users. But with the new ultra mobile themes, these blocks are often not seen by the students. They are hidden most of the time. So if somebody wants to attract attention to a feature of a block, it is quite difficult to make sure everyone sees the block.

To solve that problem, the idea is to create an activity (resource) similar to the "label" resource. When adding the activity, the block of which the content should be displayed on the course page can be selected from a dropdown (Maybe limit choices to blocks available within the course). The block content is then rendered on the course page, similar to a label content.

Another solution of the problem would be to make it possible to place blocks anywhere on a page. But that means changing Moodle core so chances are high, that this won't ever make it into core.

Kind regards,

David

Picture of Katarzyna Potocka
Re: Display block content on main section of the course page
by Katarzyna Potocka - Friday, 16 August 2019, 10:25 AM
 

Dear David, 

thank you for this interesting idea and for describing the problem in such detail. Please feel free to pitch this idea during the pitching session and let's see if you will find others who want to join you for solving this problem. 

Picture of David Mudrák
Re: Display block content on main section of the course page
by David Mudrák - Saturday, 17 August 2019, 11:33 AM
 
> create an activity (resource) similar to the "label" resource

Alternatively, implement it as an extension of the existing Poster module.
Picture of David Bogner
Re: Display block content on main section of the course page
by David Bogner - Saturday, 17 August 2019, 10:26 PM
 

Hi David,

that is a great idea. I will have a look at it.

Kind regards,

David

Picture of Alexander Bias
Re: Display block content on main section of the course page
by Alexander Bias - Thursday, 5 September 2019, 10:16 AM
 
Hi David,

while it's quite impossible and also would not make much sense in my view to let users place blocks "anywhere" on the page, it only requires few lines of code to add a new block region to a theme's layout. So, if you have full control of your theme, for example if you are running your own Boost child theme, you can go directly ahead. As a start, have a look at how block regions are built in Boost on
https://github.com/moodle/moodle/blob/master/theme/boost/config.php#L47 and https://github.com/moodle/moodle/blob/master/theme/boost/layout/columns2.php#L40.

However, given the fact that Moodle HQ has announced long ago that blocks should be discouraged, my more basic question would be:
What do you want to present in this block region, what's the user story which you want to satisfy?

Cheers,
Alex
Picture of stefan weber
Re: Display block content on main section of the course page
by stefan weber - Thursday, 13 February 2020, 11:34 AM
 

Hi David,

if I recall correctly, you ended up implementing this feature in a plugin?

Is this available anywhere? We would like to use it to embed a course search block in a label in the first topic.

Picture of David Bogner
Re: Display block content on main section of the course page
by David Bogner - Monday, 24 February 2020, 11:50 PM
 

Hi Stefan,

sorry for the late answer. Yes, the result is available on github: https://github.com/dasistwas/moodle-mod_poster

I also created a pull request so that David Mudrák can merge the work. I hope it is useful for you. The proper way to do that would be to change blocks in Moodle core, so that information can be displayed in any place in order to have a modern UX, but UX and Moodle were never best friends wink. Meanwhile, this workaround should be quite OK.

Usage: In the settings of the poster module, choose to display the content on the course page from the dropdown. IMPORTANT: Click on "Save and display" not on "Save and return to course". Because you can only edit the blocks on the separate page. This is kind of not yet perfect. Go back to the course page to see the added blocks on the course page. To adjust the blocks you have enable edit mode, then click on the "move block" icon once, and then you are redirected to the block editing page where you can move the blocks in another position.

Kind regards,

David

Picture of stefan weber
Re: Display block content on main section of the course page
by stefan weber - Tuesday, 25 February 2020, 9:34 AM
 

thanks, will try and see if it fits our needs, and you are so right about moodle and UX :/