For a few years I've maintained a plugin to manager version history of Moodle courses and activities for a few of my clients. It uses the Moodle backup sub-system and git repositories to track changes to course content and allow you to compare to current/previous versions to each other, identify individual responsible, download snapshots of the activity/course.
If this proposal gets accepted I will release this plugin publicly on GitHub and in the Moodle plugins database. I've provisionally uploaded it here:
https://github.com/andrewhancox/local_versioncontrol
The relatively simple behat test shows the basics of using the plugin:
https://github.com/andrewhancox/local_versioncontrol/blob/main/tests/behat/book.feature
The pieces of work that would really make this plugin shine would be:
- Behat tests covering more plugins and use at a course level, including interactions with the question bank - all working but currently not covered.
- Documentation
- Activities/courses being locked for editing in some way (automatically applied capabilities?) while changes are yet to be committed to stop overlapping change sets.
- Backup and restore functionality - my vision for this would be that restored instance would be a new clone and branch of the original repository.
- Ability to specify upstream Git repositories so that a canonical version of content can be held with branches being merged into each other.
- Plugin specific roll back functionality (although I remain unconvinced that this is technically possible).
- An improved diff viewer
- Tidying up the events (stop hard-coding events, capture all and then filter).