How can I have a custom message widget tailored to a specific course?

I have added custom widget to a homepage Template so that the course leader can leave a custom welcome/overview message. However, when editing the Content it is then shared/copied to other courses who have used the same template.

Is there a way to create a widget that can be edited after copying from a template, which has "stand-alone" content specific to that copy of the widget?

For clarity, we dont want to create a brand-new widget each time a course is created. Some courses which are repeated can have their own repeatable Overview/Welcome widget but we would like to design a "white-label" style box that can be used for one-off courses.

Answers

  • Hi Chris,

    Steps to achieve this are:

    • Create a html file that will contain the course level message and add it to every course in which you want to use the widget e.g. welcome.html in the root of the course Manage Files tool
    • Create a custom widget at the Org level, e.g. Course welcome message
    • Add some iframe code referencing a course file in the src attribute - use replace strings to do this

    The code will look something like the following:

    <iframe src="/content/enforced/{OrgUnitId}-{OrgUnitCode}/welcome.html"></iframe>
    

    Course leaders can simply edit the welcome.html content from within their course to customise the message etc.

    Hope that helps!