65 Commits

Author SHA1 Message Date
tjhunt
9101efd312 cleanup: MDL-17083 Remove the old teacher, teachers, student and students columns from the course table.
For something that has been deprecated for over two years, they were still used in a lot of places!
2008-11-13 08:40:57 +00:00
jerome
535f6e60e1 MDL-16043: manage case when administrator set enrol_remotecoursefield or enrol_remoteuserfield in UPPERCASE, merged from 19 2008-08-27 07:27:13 +00:00
jerome
599e379d16 MDL-16043: ensures cross-db: add lowercase conversion for every database fieldname, merged from 19 2008-08-14 12:01:34 +00:00
skodak
0cbe81112a MDL-14580 rewritten course sorting algorithms 2008-06-16 14:25:53 +00:00
skodak
245ac55791 MDL-14679 last forgotten bits of dml conversion 2008-06-09 19:48:24 +00:00
skodak
96d1387809 MDL-14679 towards adodb separation 2008-06-09 18:48:28 +00:00
skodak
5183f0cc5b MDL-15094 fixed stats regression and prefix cleanup 2008-06-05 20:35:28 +00:00
skodak
50c5bef452 MDL-14679 towards enrol conversion 2008-06-02 21:02:52 +00:00
skodak
fd0e6640cc MDL-14679 fixed some more $db's 2008-05-31 22:18:41 +00:00
stronk7
5777b048a6 Prevent excess of unenolments by enrol_database_sync.php. MDL-8550 ; merged from 19_STABLE 2008-05-11 23:55:50 +00:00
dongsheng
957f6fc9d2 "MDL-14460, fix all the other get_context_instance, merged from MOODLE_19_STABLE" 2008-05-02 04:37:02 +00:00
skodak
a117919527 MDL-10975 enrol_database_sync.php will run even if the plugin is disabled - patch by Braden MacDonald; merged from MOODLE_19_STABLE 2008-01-02 22:36:31 +00:00
thepurpleblob
220f149cfc MDL-12296:
Unenrol disable option now works in synchronisation script.

Merged from STABLE_19
2007-11-23 15:49:00 +00:00
thepurpleblob
3d49005f20 MDL-12296:
Added option to prevent database enrolment plugin unenrolling users.

Merged from STABLE_19
2007-11-21 11:06:46 +00:00
iarenaza
41079ed4bb MDL-11099 and MDL-11655 Don't show external db password in clear 2007-11-18 12:45:21 +00:00
skodak
03cedd6283 MDL-11432 eliminated majority of RecordCount uses, added several missing rs_close() - this should help improve perf on some platforms - Eloy says ;-) 2007-10-10 12:19:27 +00:00
nicolasconnault
0d43714b98 MDL-11328 Added the missing variable 2007-09-21 11:02:30 +00:00
stronk7
5ba3928959 Fixed two places where course->shortname was harcoded to 15. MDL-10026 2007-08-08 19:39:56 +00:00
thepurpleblob
61fbd0fb52 MDL-10396:
Add an option and a check to (optionally) prevent users being enrolled
in hidden courses.

Merged from STABLE_18
2007-07-20 13:03:19 +00:00
thepurpleblob
830ba6ea46 MDL-10157:
Turn the diagnostic prints into error_logs. The more normal "course skipped"
message now requires DEBUG_ALL or greater before it is generated at all.

Merged from STABLE_18
2007-07-20 08:57:05 +00:00
thepurpleblob
bf98228ade Missing cvs id tag 2007-06-18 10:35:02 +00:00
skodak
13569fd43b MDL-9418 use proper addslashes before each insert; merged from MOODLE_18_STABLE 2007-05-16 20:08:26 +00:00
nicolasconnault
a2ff2e0992 MDL-9207 Changed $extcourse to $coursefield in lines 92 to 111 2007-04-05 01:54:44 +00:00
toyomoyo
96c50eddd7 applying inaki's patch for MDL-9012, course autocreation doesn't work in enrol/database 2007-03-26 06:51:17 +00:00
nicolasconnault
20576b84af MDL-8693 Fixed the double-equal typos (2) 2007-03-01 07:34:51 +00:00
moodler
6ba65fa08d Merged Nicolas' changes from MDL-8582 into HEAD. 2007-02-28 06:25:22 +00:00
moodler
19a9bf1b8f Merged some fixes for MDL-8285 from stable 2007-02-23 06:47:19 +00:00
toyomoyo
537ea84763 MDL-8290, fix for broken plugins 2007-02-09 07:47:14 +00:00
stronk7
7cd5208507 Applying new rs_xxx() functions everywhere. MDL-8134
Merged from MOODLE_17_STABLE
2007-01-29 23:56:55 +00:00
stronk7
2c08b2514c Applying new rs_xxx() functions everywhere. MDL-8134
Merged from MOODLE_17_STABLE
2007-01-29 12:10:19 +00:00
martinlanghoff
d256515fba enrol/database: fix fields not read from external database MDL-7712 2007-01-15 19:57:12 +00:00
stronk7
93901eb42f Change some connections to non-persistent and force new connections
to avoid mysql (and oracle, I think) reuse of the main one. MDL-8152
2007-01-11 20:08:00 +00:00
toyomoyo
3f5abcb20a accessibility fixes 2006-12-14 07:48:40 +00:00
skodak
eb7ac7fc00 MDL-7806 Login results in fatal PHP error on enrol/database connect failure (patch by Clinton Graham) 2006-12-06 09:49:05 +00:00
stronk7
db15d4375e Fetchmode needs to be explicity set to ASSOC. Plus 1 missing library
added. MDL-7443

Merged from MOODLE_17_STABLE
2006-11-13 22:49:30 +00:00
stronk7
f9ec4d3722 Adding support for the new mssql_n driver
Merged from MOODLE_17_STABLE
2006-10-19 18:29:47 +00:00
martinlanghoff
f5896f0fb6 enrol/db/enrol.php ignore delt'd usrs when enroling
Previously the import process would throw a non-fatal error when it found a
non-one number of users with the remote key.  This meant that
when there was a deleted user with the same remote key as an existing user, it
would throw an error, and report that there were no users for that remote key.
Fixed it so that it now ignores deleted users, and provides more accurate
and more precise error messages in the event that there are further
problems.

Author: Peter Bulmer
2006-09-28 01:20:42 +00:00
mjollnir_
7ccf89f50a update enrol/database to use roles.
Credit: Alastair Pharo <alastair@catalyst.net.nz>

Database
--------

1) This plugin previously only worked for students.  I have made it so
that you can _optionally_ specify a third column in your external
database that contains some kind of role information (similar to the
other two fields, you can choose any column in the mdl_role table
to map to).  If you do this, then the code loops over for each different
kind of role and queries the external database.

2) There is a *slight* problem to be aware of, if a moodle
configuration was upgraded to use the new role columns, then downgraded
again, some roles might get left behind in the database when the
large-scale sync thing goes through (that is, record pruning doesn't
scale back quite properly). These would be cleaned away by
setup_enrolments at login time, however, and the scenario was unlikely
enough for me to decide to leave it for now.

3) If you don't have role columns there is a 'default role' setting
that you can set (made by Martin D).  This will only be obeyed when no
role columns are specified.  If this is set to 'default', then the
course default role is used, on a per-course basis (which usually
means student apparently).

4) From (3), my understanding is that if no config settings are
changed, and the default role for all upgraded courses is student, that
a smooth upgrade to 1.7 will occur for users of the database enrolment
plugin.
2006-09-26 01:30:32 +00:00
moodler
946cbe7029 Added some docs 2006-09-19 16:38:53 +00:00
moodler
6051c68d4b Deleted the old students-based function and created the
new-style setup_enrolments() function that uses roles
to do the tasks required when a user logs in.

Other enrolment plugins should use this as an example/guide

The sync parts of this plugin are not yet fixed.
2006-09-19 16:29:43 +00:00
moodler
0e1cc9070b Fixed a some debugging statements 2006-09-18 13:24:45 +00:00
martinlanghoff
74da3c2c89 [multienrol]Improved get_student/teacher_courses() functions to cache enrolment type that saves lots of recursive database query 2006-03-09 03:15:42 +00:00
martinlanghoff
f9667a5aea [multienrol]Initial commit for multi enrolment plugin feature 2006-03-09 02:48:29 +00:00
martinlanghoff
5f8ca5dfb6 enrol/db: Better warning when the user record is missing. 2006-01-16 03:12:55 +00:00
martinlanghoff
6ee745f7ec enrol/database: Fix for stupid SQL escaping error. 2006-01-16 03:12:10 +00:00
martinlanghoff
2642328505 enrol/database -- course autocreation now follows new configuration variables 2006-01-16 03:11:46 +00:00
martinlanghoff
32d9287f89 enrol/database -- added options to control course autocreation 2006-01-16 03:10:39 +00:00
martinlanghoff
e1c1a4a88f enrol/database - added some headers to the config page 2006-01-16 03:09:32 +00:00
martinlanghoff
491651f448 enrol/database - now with added sync and course autocreation
Added an external script to invoke automatic enrol-unenrol. It also
will autocreate courses based on a template.
2006-01-16 03:08:50 +00:00
martinlanghoff
92ab8e50d4 enrol/database tidyup: cleanup mysql hack if connect errors out 2006-01-16 03:04:31 +00:00