How to add an option to a course section menu

How to add an option to a course section menu

by MouSs Ben -
Number of replies: 3

Hi all !

I have a question that I can't solve on my own and my searches have been fruitless so far.
Moodle allows us to set a course section as Highlighted ( but only one section can be highlighted ), what we want to achieve, is the ability to tag a course section as " Updated " or " Edited " for example.
any suggestions ? or how to do that programmatically.

Thanks you all for the help in advance !

Average of ratings: -
In reply to MouSs Ben

Re: How to add an option to a course section menu

by Mark Sharp -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers

Hi MouSs,

except you don't generally update a section, you update activities in a section, and for this the the "Recent activity" block gives you that sort of indication - though probably not as you envisage it.

https://docs.moodle.org/405/en/Recent_activity_block

In reply to Mark Sharp

Re: How to add an option to a course section menu

by MouSs Ben -

image.png

i want to add more options to this menu.
i found this coming from here course/format/classes/output/local/content/section/controlmenu.php.
but i can't find the " Highlight "

In reply to MouSs Ben

Re: How to add an option to a course section menu

by Mark Sharp -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers

Hmm, can't help but feel you're looking for a technical solution for a communication issue. If you tag a section as "New" or "Updated" what does that mean? How long is that in place for. When does "New" become "Old". We have a forest in the UK called the "New Forest". It's been the "New Forest" since 1086.

Besides having a link there you'll need to put in some function to manage storing that value and a place to store it.

Anyhoo, here is where the highlight link is added in M4.5: https://github.com/moodle/moodle/blob/e6c92dc2911ae6a08fa2ccaf54d049a75198908e/course/format/topics/classes/output/courseformat/content/section/controlmenu.php#L66

I am interested to know what "Shred" does though. That's not a standard option.