Hi Philippe Siwinski, dear all,
I'd like to add my two cents to this ticket here:
we have an upcoming project which will integrate Moodle with our SAP SLcM campus management solution. One aspect of this integration is to provide a interface for course metadata:
There are many course metadata in SAP SLcM like time and venue information for the "real life course", consultation hours of the teacher, direct URL of the course information in SAP SLcM and so on. Moodle does not provide metadata fields to save this data within courses.
It would be possible to combine all these metadata fields into one string and save it into the summary field of the course. This approach would be feasible, but does not seem optimal. So we were thinking about better methods to provide these metadata fields which come from SAP SLcM to students in a Moodle course.
We had a look at Totara and its custom course fields and it seems to be the tool we need in Moodle. So we had a discussion with our Moodle partner how to bring custom course fields to Moodle and we came to this conclusion:
- Create a local plugin for Moodle with the libs for custom course fields.
- This local plugin adds a new page to the "Course administration" tree within a course where the custom course fields of the course can be seen / set. This diverges from the place where custom course fields are placed in Totara, but it comes with the upside that there is no need to hack the edit course form in Moodle.
- The possibility to globally manage custom course fields will be created as a dedicated admin page just like it is done in Totara (https://demo.totaralms.com/totara/customfield/index.php?prefix=course). The local plugin can provide this admin page, no need to hack Moodle core again.
- If this local plugin will work without any core hacks then, we would release it in the Moodle plugin repository.
This local plugin would bring the possibility to manage custom course fields to Moodle. Yet, it does not do anything with this data.
Therefore, in addition to this local plugin, we would create two more things:
- Webservices for creating and updating courses which will be able to fill and manipulate the custom profile fields. We would create new webservices in the aforementioned local plugin to provide this functionality.
- Additionally, we would create a block which can be placed in a course, gets the course's custom fields and displays them in a nice way. The block can then be released in the Moodle plugin repository, too.
With this implementation strategy for custom course fields, we knowingly decided against a new course format with support for custom course fields and against a simple block with the ability to save and display the metadata in its own.
It has to be made clear that our project will not do anything more with the custom course fields in terms of course search, reporting or whatever. Our purpose is just to display the metadata in course, but it would be possible to build additional local plugins on top of our libraries for other purposes.
The project will be running in late summer and we will be happy to release our results to the community. However, we are still asking ourselves if our way is really the right one, especially as we would have to maintain the plugins for each new Moodle version and as our solution won't be a 1:1 transfer of Totara code and functionality to Moodle.
Therefore, I'd like to ask Marina Glancy for a quick appraisal if there is any chance to bring custom course fields to Moodle core so that we can invest our time and budget into a core patch instead of a local plugin.