moodle/enrol
Aaron Barnes fa36ca3db7 MDL-22783 upgrade enrol/flatfile plugin to use enrolments
Adding/removing files missed in last patch
2010-07-22 03:33:28 +00:00
..
authorize MDL-19380 uploadlib cleanup before readding of antivirus integration 2010-07-14 08:40:48 +00:00
category MDL-23237 new timecreated field in user_emrolments and adding timestart to enrol plugins that know it 2010-07-13 20:58:17 +00:00
cohort removing unused adv cohort role option from settings 2010-07-19 12:55:19 +00:00
database MDL-22780 sync ext db enrol when user logs in - except admins in case something goes really wrong in plugins 2010-07-10 18:53:52 +00:00
flatfile MDL-22781 upgrade enrol/flatfile plugin to use enrolments 2010-07-22 03:11:27 +00:00
guest MDL-22997 Enrol plugins help - credit goes to Helen for wording the texts 2010-07-19 16:42:09 +00:00
imsenterprise MDL-22783 upgrade enrol/flatfile plugin to use enrolments 2010-07-22 03:33:28 +00:00
ldap enrol/ldap MDL-23442 Give a bit more of detail about what's missing and why it's needed 2010-07-21 07:32:17 +00:00
manual MDL-22997 Enrol plugins help - credit goes to Helen for wording the texts 2010-07-19 16:42:09 +00:00
meta MDL-21782 removing confusing and unused capability from meta enrol, we use general enrolconfig cap instead 2010-07-18 13:20:44 +00:00
mnet MDL-22787 Fixed regression causing upgrade process halt without error 2010-07-18 09:53:29 +00:00
paypal MDL-22788 upgrade enrol/paypal plugin to use enrolments 2010-07-22 02:08:15 +00:00
self MDL-22997 Enrol plugins help - credit goes to Helen for wording the texts 2010-07-19 16:42:09 +00:00
yui enrol MDL-23384 fixed issue with cohort sync JavaScript not redirecting after successfully enrolling a cohort 2010-07-20 03:56:22 +00:00
ajax.php enrol MDL-23117 Implements the other users UI for users with roles in a course but not enrolled. 2010-07-16 08:30:06 +00:00
externallib.php enrolment MDL-21524 fix get_enrolled_users() web service parameter function 2010-06-24 13:18:34 +00:00
index.php MDL-21782 reworked enrolment framework, the core infrastructure is in place, the basic plugins are all implemented; see the tracker issue for list of unfinished bits, expect more changes and improvements during the next week 2010-06-21 15:30:49 +00:00
instances.php MDL-21782 reworked enrolment framework, the core infrastructure is in place, the basic plugins are all implemented; see the tracker issue for list of unfinished bits, expect more changes and improvements during the next week 2010-06-21 15:30:49 +00:00
locallib.php enrol MDL-23117 Implements the other users UI for users with roles in a course but not enrolled. 2010-07-16 08:30:06 +00:00
otherusers.php enrol MDL-23117 Implements the other users UI for users with roles in a course but not enrolled. 2010-07-16 08:30:06 +00:00
README.txt MDL-20700 coding style cleanup - cvs keywords removed, closign php tag removed, trailing whitespace cleanup 2009-11-01 12:51:40 +00:00
renderer.php enrol MDL-23117 Implements the other users UI for users with roles in a course but not enrolled. 2010-07-16 08:30:06 +00:00
users.php enrol MDL-23117 Implements the other users UI for users with roles in a course but not enrolled. 2010-07-16 08:30:06 +00:00
users_forms.php enrol MDL-22854 New ajaxified enrolment interface 2010-07-07 02:46:34 +00: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 5 minutes. 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