Fordson - Search Courses Broken

Fordson - Search Courses Broken

by Chris Kenniburg -
Number of replies: 7
Picture of Particularly helpful Moodlers Picture of Plugin developers

If you install the latest version of Fordson where we display the courses as tiles in a grid (V1.2.6) there is an issue with displaying the course search results.  


The new code we added to the theme is here:  

https://github.com/kennibc/moodle-theme_fordson/blob/master/classes/output/core/course_renderer.php

I believe this might be related to the code found here:

https://github.com/kennibc/moodle-theme_fordson/blob/master/classes/output/core/course_renderer.php#L429-L436


Anyone want to take a try at helping me fix this?

Average of ratings: -
In reply to Chris Kenniburg

Re: Fordson - Search Courses Broken

by Mary Evans -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

Hi Chris,

Is this the normal way you would do this in a Boost theme as I am way behind if it is. It's not the kind of theme renderer I am used to seeing so cannot really comment other than to say I would not have done it like that.

somewhat bewildered...

Mary

In reply to Mary Evans

Re: Fordson - Search Courses Broken

by Chris Kenniburg -
Picture of Particularly helpful Moodlers Picture of Plugin developers

The override was causing a problem in the way it was processing and displaying the courses.  I am pleased to say a co-worker helped me out and we were able to get it working.  

Now when you do a search it will return the results and they will also be displayed as course tiles.  If you uncheck the enhanced course display option it will show things the way Moodle normally does.


Download Fordson v127 to get the fix for course search.

We did a lot of rewrite over this function:  

https://github.com/kennibc/moodle-theme_fordson/blob/master/classes/output/core/course_renderer.php#L208-L327


Mary, it's over my head too.  Stuff is getting much more complicated.  I'm glad a co-worker could help me make heads and tails of this.  If anyone else has a better solution then by all means send it my way!

In reply to Chris Kenniburg

Re: Fordson - Search Courses Broken

by Mary Evans -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

My query was with the way the renderer was written, I am used to adding the theme name where the theme_mytheme_course_renderer extends core_course_renderer

whereas yours is different!

Mary

In reply to Mary Evans

Re: Fordson - Search Courses Broken

by Chris Kenniburg -
Picture of Particularly helpful Moodlers Picture of Plugin developers

This was given to me from a fellow Moodler wanting to help with the project.  It worked marvelously for displaying courses in course categories but broke when using search.  

I believe we got it fixed and Jose was out on vacation the past couple of days.  He's going to take a look and see if there is a more efficient way to accomplish this.  I asked Richard as well to take a look but in the meantime we think we have a fix.

In reply to Mary Evans

Re: Fordson - Search Courses Broken

by Richard Oelmann -
Picture of Core developers Picture of Plugin developers Picture of Testers
In reply to Richard Oelmann

Re: Fordson - Search Courses Broken

by Mary Evans -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

Does that mean the older method of writing renderers will not work in Boost?

In reply to Mary Evans

Re: Fordson - Search Courses Broken

by Richard Oelmann -
Picture of Core developers Picture of Plugin developers Picture of Testers

I think they still will Mary - although I haven't checked. But I believe the core code that goes hunting for the renderers and overrides would still need to support the Clean/More themes and even the Base/Standard ones for now at least. I did read a comment from Tim in another thread that mentioned new and legacy name-spacing, so I would take that to mean that the other ways of naming renderers would still work.