After an unsuccessful search on the internet for a self-enrolment block, I decided to create one.
We have low literacy clients (both language and technology), and desperate need for enrolment in a few easy steps:
- login > dashboard
- block self-enrolment (on dashboard)>enroled course
Simple as that, without additional confirmations, links or anything else.
Being myself low literacy in coding I will need all your help to achieve something like that. The whole process should work as simply as easy-enrol from Fordson team, which is a great idea but not working for us without additional code changes, and additional steps for every group created in our Moodle administration.
The self-enrol method has all the settings that we need as "unenrol inactive after" (just to mention one important), and the idea is to create a block plugin that will not need frequent changes and outsourcing (paying for every version change) as Moodle HQ is doing development of self-enrolment (core plugin).
First of all, I need explanation of whether this is doable:
- read group enrolment key from form within a block
- return message (wrong key if key doesn't exists in database or field is empty)
- find course id in database where that group key belongs
- redirect page to that course self-enrolment method
- pass the value (group enrolment key) to the enrolment method
- execute enrole-self function (guessing)
- redirect page to course (without additional entries, clicking, etc.)
Next, I need help with “how” to achieve
that.