Courses and course formats

Change the layout of course list

 
Picture of Helson C
Change the layout of course list
 

First of all, sorry for my bad english.

I need to change the look of course page without changing codes of moodle.

I need the courses side by side, like a grid. 

Create a theme would be feasible? Or create a plugin would be enough?

Thanks.

 
Average of ratings: -
Gareth J Barnard
Re: Change the layout of course list
Core developersParticularly helpful MoodlersPlugin developers

Hi Helson,

To get you started, you need to override the core course renderer in a theme.  Start with: https://docs.moodle.org/dev/Overriding_a_renderer then look at: https://github.com/DBezemer/moodle-theme_essential/blob/master/renderers/core_course_renderer.php which is loaded by: https://github.com/DBezemer/moodle-theme_essential/blob/master/renderers.php as referenced in the Moodle documentation.

Gareth

 
Average of ratings: -
Picture of Helson C
Re: Change the layout of course list
 

Thanks for your reply.

I will try and come back to answer.

 
Average of ratings: -
Picture of Helson C
Re: Change the layout of course list
 

Hi Gareth, see the result.

Course list side by side


For this, i create a "theme" with a renderer that extends of core_course_renderer and override the method coursecat_coursebox and add a css file who override style of .coursebox.

Is this the best way?

How i can add multiples renderers? Is it possible? 


Thank you so much!

 
Average of ratings: -
Gareth J Barnard
Re: Change the layout of course list
Core developersParticularly helpful MoodlersPlugin developers

Hi Helson,

RE: Is that the best way? I think so, but I've not actually solved your problem in code to determine if it was.  I'm only guessing from experience that its the right place to start.

RE: How i can add multiples renderers? Is it possible?  - Umm, the same renderer or different ones?  What possible solution are you thinking of that requires them?  Please can you explain more.

Gareth

 
Average of ratings: -