From: moodler Date: Mon, 11 Sep 2006 08:25:49 +0000 (+0000) Subject: Updated some docs X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=9e7f597e490c1e6ec479b23d097e6d849cc1c9c7;p=moodle.git Updated some docs --- diff --git a/enrol/README.txt b/enrol/README.txt index 706379db9d..83609d322d 100644 --- a/enrol/README.txt +++ b/enrol/README.txt @@ -16,40 +16,56 @@ the functionality they are after. Mandatory methods ------------------ +================= - config_form - process_config + config_form() + process_config() Login-time methods ------------------- - - 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. You probably will want to offer at -least get_student_courses(). - -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 ); - +================== + + 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() @@ -68,7 +84,7 @@ 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