Use template on course creation

General plugins (Local) ::: local_course_template
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.

Use template on course creation v0.1.0

Moodle 3.1
Released: Saturday, 4 March 2017, 12:25 AM

Moodle Course Template

Build Status

This local plugin allows site administrators to create "template" courses which will be restored into new courses on course creation. The intended use case is defining common blocks and activities for a given academic term.

This is considered BETA code; please report any issues to GitHub.

Requirements

  • Moodle 3.1 (build 2016052300 or later)

Installation

Copy the course_template folder into your /local directory and visit your Admin Notification page to complete the installation.

Usage

The administrator will need to define a regular expression for extracting the term code from the course idnumber. This will be used to identify which course template (if any) should be used on creation. For example, if your courses have idnumbers in the format XXXXXX.YYYYYY, where YYYYYY is the termcode, then the regular expression /[0-9]+\.([0-9]+)/ will return YYYYYY.

By default the plugin will search for a course with the short name Template-[TERMCODE], where [TERMCODE] is the matching value for YYYYYY. For example, if a course had the termcode 201610, the module would search for a course with the short name Template-201610.

The plugin listens on the \core\event\course_created event and fires immediately on course creation. Once you've given a course the necessary short name you don't need to do anything further. The plugin will create a backup of the template course and import it into the new course.

You should consider overriding Moodle's default block settings in config.php: $CFG->defaultblocks_override = '';. Otherwise you will get two sets of blocks on course creation. Manually configure the blocks in the template course instead.

Acknowledgements

This plugin was inspired by the course enrollment/templating plugin in use at Wesleyan University. The restoration controller settings are derived from LSU's Simplified Restore block.

Author

Charles Fulton (fultonc@lafayette.edu)

Version information

Version build number
2017030300
Version release name
v0.1.0
Can be updated to
v0.2.0 (2017050900), v0.3.0 (2017082400), v3.4.0 (2018051300), v3.3.0 (2017082401)
Maturity
Beta
MD5 Sum
03e422d19a0729ea99d53a228a62801e
Supported software
Moodle 3.1

Version control information

Version control system (VCS)
GIT
VCS repository URL
VCS branch
master
VCS tag
v0.1.0

Default installation instructions for plugins of the type General plugins (Local)

  1. Make sure you have all the required versions.
  2. Download and unpack the module.
  3. Place the folder in the "local" subdirectory.
  4. Visit http://yoursite.com/admin to finish the installation.