moodle/enrol
2012-11-27 14:57:07 +08:00
..
authorize MDL-34778 enrol: add a space 2012-09-17 12:14:22 +08:00
category MDL-34864 fix role names regression 2012-08-22 08:08:24 +02:00
cohort MDL-30899 moodle-enrol-notification Adding focus to non modal windows 2012-11-27 14:57:07 +08:00
database Merge branch 'm23_MDL-35557' of git://github.com/danmarsden/moodle into MOODLE_23_STABLE 2012-10-02 20:28:13 +02:00
flatfile MDL-30871 enrol: Flat file does not fail when notifications are enabled 2012-10-30 11:03:44 +08:00
guest MDL-34096 Installation : Added 2.3 upgrade line to db upgrade scripts. 2012-06-29 11:37:01 +08:00
imsenterprise MDL-25983 enrol_imsenterprise Importing the course summary when adding new courses 2012-08-02 15:34:42 +08:00
ldap MDL-34778 accessibility compliance for enrol: add label tag for input text 2012-09-17 12:14:20 +08:00
manual MDL-30899 moodle-enrol-notification Adding focus to non modal windows 2012-11-27 14:57:07 +08:00
meta MDL-34156 Remove subselect from slow query 2012-07-10 10:53:40 +08:00
mnet MDL-34096 Installation : Added 2.3 upgrade line to db upgrade scripts. 2012-06-29 11:37:01 +08:00
paypal MDL-35349 paypal: Fixing return page so that it now declares page context 2012-11-02 15:33:59 +08:00
self MDL-34635 support multilang in self enrol course welcome message 2012-08-02 09:39:20 +02:00
yui MDL-30899 moodle-enrol-notification Adding focus to non modal windows 2012-11-27 14:57:07 +08:00
ajax.php MDL-35776 user ajax: fix sort order in chrome. 2012-10-03 19:14:47 +01:00
bulkchange.php MDL-30945 add support for unenrolling of individual users + code cleanup 2011-12-28 16:56:46 +01:00
bulkchange_forms.php MDL-26770 enrol - Added support for bulk operations by enrol plugins 2011-04-21 10:13:13 +08:00
externallib.php MDL-35198 replace key_exists by array_key_exists 2012-09-27 15:34:48 +08:00
index.php MDL-34129 show course info on enrolment page 2012-07-21 21:34:07 +02:00
instances.php MDL-30789 add new update_status() method to enrol plugins and improve enrol cache invalidation 2011-12-18 17:30:17 +01:00
locallib.php MDL-35619 fix invalid avatars on other users page 2012-10-01 09:51:12 +02:00
otherusers.php MDL-31923 Correctly respect hiddenfields and capabilities 2012-03-08 10:05:14 +00:00
README.txt MDL-25147 tidy up readme wording related to cron 2010-11-11 00:24:43 +00:00
renderer.php MDL-36169 fix enrolled users sorting by alphanumerical column 2012-11-09 19:49:57 +01:00
unenroluser.php MDL-30945 add support for unenrolling of individual users + code cleanup 2011-12-28 16:56:46 +01:00
upgrade.txt MDL-29897 Update upgrade.txt files 2011-11-03 08:11:55 +01:00
users.php MDL-31923 Correctly respect hiddenfields and capabilities 2012-03-08 10:05:14 +00:00
users_forms.php MDL-23532 enrol - removed general handling of user enrolment editing/unenrolment plugins are now responsible for this 2011-04-21 10:02:55 +08:00

ENROLMENT MODULES
-----------------

(Yes, that's the correct English spelling  ;-) )

enrol.class.php contains a simple 'factory' method that
will instantiate your class when called. For an example
of a complete class, take a look at the 'manual' class.

Each plugin is in a subfolder here.

Except for the configuration methods, most methods
defined in the API are optional -- callers will use
method_exists() to determine whether your plugin offers
the functionality they are after.


Mandatory methods
=================

  config_form()
  process_config()


Login-time methods
==================

  Before Moodle 1.7
  -----------------

      get_student_courses()
      get_teacher_courses()

  You probably will want to offer at least get_student_courses().

  These methods are triggered when a user logs in successfully,
  and they are expected to populate $USER->student and
  $USER->teacher arrays and maintain (add/delete) entries from
  user_students and user_teachers.

  These methods are relevant for most plugins, and are the main
  interest for plugins that work with a read-only backend such
  as LDAP or a database.

  Note that with the multi-enrol infrastructure two things have
  changed. We now have an 'enrol' field in those tables, and
  each plugin must maintain only its own enrolment records.
  Conversely, the $USER->student and ->teacher arrays have the
  enrolment type as value, like

     $USER->student = array ( $courseid => $plugintype );


  Moodle 1.7 and later
  --------------------

      setup_enrolments()

  With the advent of roles, there could well not be students and
  teachers any more, so enrolment plugins have to be more flexible
  about how they map outside data to the internal roles.

  This one method should do everything, calling functions from
  lib/accesslib.php as necessary to set up relationships.


Interactive enrolment methods
=============================

  print_entry()
  check_entry()
  check_group_entry()
  get_access_icons()

These methods are for enrolment plugins that allow for user
driven enrolment. These methods are relevant for plugins
that implement payment gateways (credit card, paypal),
as well as "magic password" schemes.

Only one interactive enrolment method can be active for
a given course. The site default can be set from
Admin->Enrolment, and then individual courses can be
set to specific interactive enrolment methods.


Cron
====

If your class offers a cron() method, it will be invoked by
the standard Moodle cron every time it is called. Note that if the
tasks are not lightweight you must control how frequently they
execute, perhaps offering a config option.

For really heavy cron processing, an alternative is to have
a separate script to be called separately. Currently the LDAP
and DB plugins have external scripts.


Guilty Parties
--------------

Martin Dougiamas and Shane Elliott, Moodle.com
Martin Langhoff and Patrick Li, Catalyst IT