Need to display message once course is completed

Need to display message once course is completed

Sushma R - દ્વારા
Number of replies: 3

Hi Team, 

I need to display a message saying "Congratulations" in the form of popup / by any form, when user completes the course. Can anyone help me on this. 


Thanks in advance,

In reply to Sushma R

Re: Need to display message once course is completed

Tim Hunt - દ્વારા
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
One way you could do that is to add a label to the course page, and use availability conditions so that the label is hidden until the course is complete. https://docs.moodle.org/400/en/Restrict_access
In reply to Tim Hunt

Re: Need to display message once course is completed

Sushma R - દ્વારા
In reply to Sushma R

Re: Need to display message once course is completed

tim st.clair - દ્વારા
Picture of Plugin developers
Labels, like any activity, only belong "within" a section/topic.

I think how it will be implemented for you depends on your course layout and possibly your theme - such as if all sections are displayed. If you have all sections visible, just add another section at the bottom and change it so that it isn't displayed until a condition is reached. The popup / whatever would be dependent on whether you were able to put in scripts within your label, but you would probably just add HTML to the label I imagine.

You can set access restrictions on a section. Just edit it and fill in the restricted access like you would with any activity. When setting up the restriction, click on the eyeball next to the restriction condition so that the section is hidden until the restriction condition matches.

Whilst there isn't a 'course completion' restriction built in, if you have the ability to add plugins then you might like to use something like this: https://moodle.org/plugins/availability_coursecompleted (also see https://moodle.org/plugins/?q=course%20type:availability)