Need to display message once course is completed

Need to display message once course is completed

Sushma R -
回帖数: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,

回复Sushma R

Re: Need to display message once course is completed

Tim Hunt -
Core developers的头像 Documentation writers的头像 Particularly helpful Moodlers的头像 Peer reviewers的头像 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
回复Tim Hunt

Re: Need to display message once course is completed

Sushma R -
Can it be label enabled end of all the sections?
回复Sushma R

Re: Need to display message once course is completed

tim st.clair -
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)