SitePoint Sponsor

User Tag List

Results 1 to 1 of 1
  1. #1
    SitePoint Member
    Join Date
    Jul 2013
    0 Post(s)
    0 Thread(s)

    Moodle2.5/Issues with a element 'Enrolment key' added the "Create new Account" form

    I'm completely new to this forum and do not know if this the right place to add this thread, anyways I'm currently working in Moodle 2.5 customizing the 'Create new account' form. I have managed to add the Enrolment key in the General field but once I try to create a user account for some reason it keeps telling me "missingenrolment key" and it won't let me continue. Wonder what am I doing wrong or what is it that i need to add or change?

    This is the code I used in the login/signup_form.php
    $mform->addElement('text', 'Enrolment key', get_string('Enrolment key','form'), 'required','maxlength="100" size = "25"');
    $mform->setType('Enrolment key', PARAM_TEXT);
    $mform->addRule('Enrolment key',get_string('missingenrolment key'), 'required', null, 'server');

    We need the Enrolment key set in the 'add a new user' form because with the people we work we teach them how to use emails and well we do not want them to just create an account and access courses automatically.
    Any ideas??? I'm almost pulling my hair do not know where to go to fix it.....Any help will definitely be appreciated
    Last edited by luz_2013; Jul 23, 2013 at 08:01. Reason: add


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts