Enrolment key sticky block or code?

Enrolment key sticky block or code?

by Chloe Knight -
Number of replies: 0
Ok, I’ve been persevering with this. I’ve since read a few posts on groups and mass enrolments however, so I may be going about this entirely the wrong way (I’ve only had Moodle installed for a few days – so it’s still an extremely steep learning curve!).

Anyway, the sticky block HTML code I’ve used to display the enrolment box on a students MyMoodle front page is:

<form method="post" action="../course/enrol.php">
Course ID:<input type="text" name="id" size="20" value="" /><br />
Enrolment Key:<input type="text" name="password" size="20" value="" />
<input type="hidden" name="enrol" size="0" value="manual" /><br />
<input type="submit" value="Enrol me in course" /><br /><br />
</form>

I changed the enrolment key type from ‘password’ to ‘text’ to make it visible, and teachers will also have to provide the course ID to students.

Questions:

  • Any feedback on a more efficient approach to handle automatic enrolment would be appreciated as I’m still learning Moodle.
  • If I click ‘<>’ on the sticky block editor without clicking ‘Save Changes’, I notice it strips out some of the form HTML (the ‘hidden’ field and the submit button ‘value’ both mysteriously disappear). I have to click ‘Save Changes’ for the HTML to save correctly, and every time I return to edit it I need to re-enter the HTML all over again to remove the errors. Is this a bug? Or is HTML not really supported in the sticky blocks?

Thanks.