General developer forum

Advice sought

Picture of peter gee
Advice sought


We have moodle 2.4, with which we run two categories of short courses.

in one of the categories, we already have written two blocks that enable students of this category to use various functions we have written.  Additionally we have also written a student administration system that integrates with moodle, and allows external 'teachers' run required reports on the activities of their students.  students have to complete six courses in this category.  The administration system also runs our help desk.

in this category, we are now required to collect a lot more information from users.  this information has to be entered as a validated form.  this form should only be presented to the students once only.

students enrol into our courses with enrolment keys, these keys are given to them by external 'teachers' who control who has access to which course.

what we have been told to do is find a way to integrate the collection of this new data form, allow students to enrol as before, but make their access to the content conditional upon completing a validated form.

we can integrate the reporting and workflows for how to manage if a user has finished this form in our administration system. when to follow them up etc.

the other category of courses does not need, and should not have this form data entered, or visible.

so my question is, what is a good way of integrating a way so that students don't see course content until they have completed the form? they only see the form once, in the six courses, and students of other courses do not see the form at all.

all we would like is your opinions on how to do it, we can do the coding.

thanks in advance for your time considering this problem.






Average of ratings: -
Re: Advice sought
Core developersParticularly helpful MoodlersPlugin developers

The most obvious way to do this would be to create a custom enrolment method that requires the students to complete the data before they finish enroling in the course (I would probably base this on the self enrolment plugin - inheriting from the enrol_self class and extending it to add the extra form).

This won't help with students who are already enroled on the course.

If the solution needs to cope with students who are already enroled into the course, then it may be difficult to achieve without core modifications - possibly you could add an extra function call into 'course/view.php' which checks to see if the custom enrolment method is enabled for the course and then checks if the user has completed the form, before redirecting them to the form (if needed).

Average of ratings: Useful (1)
Picture of peter gee
Re: Advice sought

hi davo.

thanks for your advice.  that makes sense.

when i showed this to our programmer he responded. "so they are suggesting we do this properly, I'm outraged!"




Average of ratings: -