Fordson | Course Display Options

Fordson | Course Display Options

by Narit B -
Number of replies: 10

Hi 

I'm using Moodle 3.3.4 and Fordson V 1.6.6

It is possible to have a difference course display in each category?

Sample as picture below

Under English Category >>> display by Moodle default 



Under IT Category >>> display by courses as tiles in a grid (Enable Enhanced Course Display) 


  

Thank you in advance

Average of ratings: -
In reply to Narit B

Re: Fordson | Course Display Options

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

I don't think this is possible.  

In reply to Chris Kenniburg

Re: Fordson | Course Display Options

by Narit B -
HI chirs

Thank you for responded.
In reply to Narit B

Re: Fordson | Course Display Options

by Chris Kenniburg -
Picture of Particularly helpful Moodlers Picture of Plugin developers
When I say, "I don't think this is possible" it is because I either don't think we'd invest the time or need that feature in our theme or that to explain it or make it happen would be too much.

But, someone like Gareth would be ideal to hire and make it happen for you!

Talk to a few Moodle partners. They can host and code things for you. Some have more staff on hand to build things than others. Ask around and make a few phone calls. You can always find plenty of developers looking to help by posting a job on Moodle.org. We did that with a project and got plenty of responses.
In reply to Chris Kenniburg

Re: Fordson | Course Display Options

by Narit B -
Hi Chris
Totally understood that, now i'm trying to learn more about moodle and also explore more with the fordson theme. Like you recommend, if i have a question i will ask some other around and yes this forum very useful for me to learn and posting the question.

Thank you
In reply to Narit B

Re: Fordson | Course Display Options

by Gareth J Barnard -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers

Given the code in classes/output/core/course_renderer.php is:

        protected function coursecat_category(coursecat_helper $chelper, $coursecat, $depth) {
            if (!theme_fordson_get_setting('enablecategoryicon')) {
                return parent::coursecat_category($chelper, $coursecat, $depth);
            }

then you could use the $coursecat parameter and to alter the decision to either show the default or the enhanced or return a custom method with different markup of your own choosing.

In reply to Gareth J Barnard

Re: Fordson | Course Display Options

by Narit B -
Hi Gareth

Thank you for your responded but i'm not familiar much about coding.
If not much disturb you can you give me a few step or the guideline so i can follow that?

Thank you in advance
In reply to Narit B

Re: Fordson | Course Display Options

by Gareth J Barnard -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers
Hi Narit,

Ok, with respect if you're not familiar with coding then you will have no chance following any steps that I were to write. The level of detail and explanation would take ages! You will need to learn PHP, then the concepts of Object Orientation, then Object Orientated PHP at a general level first.

Kind regards,

Gareth
In reply to Gareth J Barnard

Re: Fordson | Course Display Options

by Narit B -
Hi Gareth ,

Totally respect your recommended, so about OOP concept i already know that but only based on Visual Basic Programming and understood PHP structor it's difference with that. so i tried to learned more about PHP concept.

Refer to your coding, my challenge now i don't know which parameter aside from $coursecat to recheck that if i go to IT category changing to enhanced then other category changing to default something like that.

Like what i understand the If syntax..

If condition = True then
   do A
else
   do B
end if

Thank you
In reply to Narit B

Re: Fordson | Course Display Options

by Gareth J Barnard -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers
See whats inside $coursecat with 'error_log(print_r($coursecat, true));', reload the page then look in the PHP log file. Then you could select a variable within the stdClass object (I think that variable is an instance of it) to then make a decision to show the enhanced format (if it has been enabled) for that category or not.
In reply to Gareth J Barnard

Re: Fordson | Course Display Options

by Narit B -
Hi Gareth

Thank you very much, i will try to catch up with the logic that your explanation.