Use template on course creation

Maintained by Charles Fulton, Andrew Zito
This local plugin allows site administrators to create "template" courses which will be restored into new courses on course creation.
Price option: Free

Supports Moodle 3.1-5.2 See all versions
Latest release: 3 years ago
Installations: 337
Downloads (last 90 days): 160

Frankenstyle name: local_course_template
Local plugins

Comments

Product ratings and reviews are coming to Moodle Marketplace. Until then, existing comments remain available to read, but new posts have been disabled.

This plug in looks great. We are just wondering if we can use it without a term ID. For example we use a template course short name template-csw201a will it extract the alphanumeric csw201a if our regular expression is set to /[A-Za-z0-9\]
@Josue what are your settings for "Restore defaults when merging into another course"? We have "Overwrite course full name" (restore | restore_merge_course_fullname) and "Overwrite course short name" (restore | restore_merge_course_shortname) both unchecked. I suspect that is enough to make sure the names aren't overwritten, but you could also "lock" those settings to be extra careful.
Hi Eric I do something like you do inside plugin code but I had an issue, the plugin overwrite the name and the course short name, for example the coursname change to something like "Base Course test copy 1" how do you solve that? Any idea?
So by reading the plugin's code I figured out you can have template's overwrite course configuration if you 1) select "Overwrite course configuration" (restore_replace_overwrite_conf) under "Restore defaults when restoring into another course deleting contents" and 2) lock that setting, forcing the plugin to respect it. Otherwise, it defaults to not overwriting anything in a course's settings.
We loaded courses for our summer term recently and while they received their templates, it seems like changes to course settings (course format, start date, etc.) weren't applied though template content (section names, activities) was. Any idea what might cause this? From my previous comment here I thought that the "restore_replace_overwrite_conf" setting had to be on but it is and the problem persists. When I manually backup and restore a template into a course I am able to overwrite course settings like start date & course format, it seems like only this plugin is unable to do so.
Hi!!
Do you know why the plugin is not working on moodle 3.10:
I got the following configurations:
Plugin
https://ibb.co/bv9q84L
Template Course
https://ibb.co/1qNqBmm
New course based on Template
https://ibb.co/0DKRYGT
Clarification: the General restore defaults are fairly important to this plugin's functioning, correct? We had a suite of departmental templates we expected to be applied to new courses and it seemed like only content, and not course settings, were applied. It seems that we need "Restore defaults when restoring into another course deleting contents" > "Overwrite course configuration" (restore_replace_overwrite_conf) to be selected to have features like start date or course format carry over from templates.
We use external database enrollment and the plugin worked for new courses, though that was a couple versions ago now and I haven't tried with the latest. The external database template is much more limited—it gets applied to all new courses, whereas with this plugin you can use pattern matching on the idnumber to apply different templates to different courses.
I haven't tested it explicitly but it should work with external database course creation; that plugin calls create_course so the necessary events are triggered. IIRC external database has its own, separate course template functionality.
Hi!!!
The plugin does not work with the external database course creation right??
I actually try it, and seems only work with individual course creation and bulk csv course creation.
is it possible when a change is been made in main course, to be automatically to be added to the other courses?
Thanks
Glad to hear it! Thanks for your work on this plugin!
Hi Eric, we've identified the cause of that failure and released a new version (v3.6.3) that addreses it. Thanks again for the report.
Hi Eric, thanks for the report. That's unexpected; the task should run once at 3 AM server time. The caching behavior change shouldn't have affected that part of the plugin; we'll look into it right away.
I believe there's a bug in the most recent version (3.6.2) of this plugin. We're on 3.8.2. I upgraded and it started running a "\local_course_template\task\cleanup_task" every second, filling up the task queue and maxing out our task runners so no other tasks could complete. I tried turning off the new caching option but the behavior persisted. The plugin would not allow me to downgrade to 3.4.1 so I had to uninstall it.