Dashboard block for Self-enrolment

Dashboard block for Self-enrolment

by Vladimir Miranovic -
Number of replies: 2

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. smile


Average of ratings: -
In reply to Vladimir Miranovic

Re: Dashboard block for Self-enrolment

by Benjamin Ellis -
Picture of Particularly helpful Moodlers
Hi,

Not getting why you cannot just use the standard self-enrolment (/admin/settings.php?section=enrolsettingsself) plugin. The user is directed to the course and is invited to self enrol of they are not already.
In reply to Benjamin Ellis

Re: Dashboard block for Self-enrolment

by Vladimir Miranovic -
Hi Benjamin,
we want to use standard self-enrolment (as I mentioned in my post already, and adding now “desperately want”), and the problem is in the suggestion you made in your post with "The user is directed to the course". Again, the problem is in the user being “directed” to the course, instead of "please enter group enrolment key here" on the dashboard, and jump into the course. It will take too much time to explain why being "directed" is not doable in our case.
I am aware that we have special requests regarding our clients as we are not a school, college or university, but I think all moodle users will benefit from a block like that - using the standard self-enrolment method.
I know that the team behind the Fordson theme created their own enrolment method and block incorporated in their theme from same reasons, to have easy transition from login to dashboard to enroled course, without being "directed" to the course.
We are using now the "Adaptable" theme with the "Easy enrolment" block (outsourced/payed for) and "Easy enrolment" method, but would like to use self-enrolment method with "Self-enrolment" block.
Please, let me know if I am clear enough about my needs.
Also, can you or any other member of developer community (or Moodle HQ) help me with code examples for my "First of all" list?