Show Description on Course Page

Show Description on Course Page

by Rasha Yehya -
Number of replies: 1

Greetings,

I am building an activity plugin. I want the description of the activity to show on course page.

How can I set the show description on course page to be equal always to true regardless if the checkbox is ticked or not

I have tried something like $object ->showdescription  = 1 in the update and add functions inside lib.php and it didn't work . 

Your help is highly appreciated. Thank you in advance

Regards,

Rasha

Average of ratings: -
In reply to Rasha Yehya

Re: Show Description on Course Page

by Robin Stark -
Hey Rasha, 


I did some traces with a debugger (while adding the module) and attempting to change: showdescription and alwaysshowdescription without much success. However, I did notice that from there it returned to modedit.php which had a section where it was dealing with the Moodle form.  Have you tried putting a field showdescription / alwaysshowdescription in the moodle form, making it a hidden element and setting a default value of "1" (when looking at that variable it always shows as a string instead of int.

I haven't tested this myself, and it is very much a kludge (assuming it works) but, might fit in nicely.


Cheers, 


Robin