560 Commits

Author SHA1 Message Date
toyomoyo
1b19e8107e fix for MDL-6859, MDL-6860 2006-10-06 06:04:32 +00:00
moodler
3a4c750bcc FIxed up some more references to user tables 2006-10-04 07:36:58 +00:00
ethem
dc754f4f56 Put back last commit. Some functions check $extra->id. 2006-10-03 19:39:21 +00:00
ethem
c008cd2fcf If an error occures, id returns 0.
The user, who will be sent email, may be confused for $record->id=0.
Merged from 16stable.
2006-10-03 18:21:14 +00:00
ethem
9c59948e63 * enrol_into_course() doesn't send welcome message unless $course->welcomemessage is set.
This is actually good thing, because we can send our welcome message.

* enrol_into_course() added in Moodle(2006091700), so authorize plugin requires this version.
2006-10-03 18:00:48 +00:00
ethem
b99cb7fd23 No need extra $order->status check. These functions expired() and settled() do it for us. Merged from 16stable. 2006-10-03 09:05:38 +00:00
danstowell
15add7bd29 Fixed PHP 4 compatibility re MDL-6753 2006-09-30 17:46:15 +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
skodak
6859360cd4 coverted /admin/ to proper /$CFG->admin/ in paths 2006-09-26 21:10:14 +00:00
moodler
74b345880d Changing error to notify so that it's not fatal (and doesn't leak server data) 2006-09-26 04:38:00 +00:00
mjollnir_
87c75906ed update enrol/ldap to work with roles.
Credit: Alastair Pharo <alastair@catalyst.net.nz>

1) Some config settings have changed (ones that related specifically to
teachers and students).  There is a check in place however to migrate
old configurations to new ones.

2) Perviously two syncs happened - one for students, one for teachers.
Now sync gets called the same number of times as there are roles.
Those roles that have config settings associated with them then run
through all the records.  This means syncing takes longer the more
roles you configure (which is expected anyway I suppose).
2006-09-26 01:31:33 +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
danstowell
26ba09125b Updated IMS Enterprise enrolment to Moodle 1.7 role infrastructure 2006-09-25 16:58:06 +00:00
skodak
7eb0b60a1f debugging and error reporting level fixes and improvements MDL-6671 2006-09-23 09:38:39 +00:00
ethem
37f9ca4e8f Some cleanup for cron. 2006-09-22 16:19:53 +00:00
moodler
bc492d185c Fixes to user new Roles 2006-09-22 16:19:24 +00:00
moodler
22003adac5 SOme changes for Roles 2006-09-22 16:11:52 +00:00
ethem
f0f8e34c5d isguest() to has_capability('moodle/legacy:guest', get_context_instance(CONTEXT_SYSTEM, SITEID), $USER->id, false) 2006-09-22 15:31:04 +00:00
ethem
778326bef8 Some cleanup. 2006-09-22 14:04:11 +00:00
ethem
33f9bffe90 Last commit for enrol_student().
enrol_student($order->userid, $order->courseid, $timestart, $timeend, 'manual')
to
role_assign($role->id, $user->id, 0, $context->id, $timestart, $timeend, 0, 'manual'))
2006-09-22 13:50:10 +00:00
ethem
fddf3cfb56 + Changed deprecated enrol_student() function to enrol_into_course().
+ No need extra check: if (!empty($CFG->enrol_mailstudents)):  enrol_into_course calls email_welcome_message_to_user() internally.
2006-09-22 13:33:37 +00:00
ethem
b001dec454 No need get_student_courses() and get_teacher_courses() anymore. 2006-09-22 13:11:49 +00:00
ethem
16dbf42695 Changed deprecated enrol_student() function to enrol_into_course(). 2006-09-22 12:18:58 +00:00
moodler
9f73cdabf7 renamed field in context table 2006-09-22 06:21:48 +00:00
mjollnir_
a3081bfdba Flatfile enrolment plugin upgraded to new use roles. Credit: Alastair Pharo, new Catalyst ninja ;) <alastair@catalyst.net.nz> 2006-09-21 00:04:43 +00:00
skodak
6124048972 major whitespace cleanup - fixed tabs 2006-09-20 20:31:09 +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
toyomoyo
9ce384ba1e relacing deprecated functions with capability checks 2006-09-19 14:16:40 +00:00
ethem
7dbc351e11 unenrol_student() -> role_unassign() 2006-09-18 17:32:43 +00:00
moodler
0e1cc9070b Fixed a some debugging statements 2006-09-18 13:24:45 +00:00
moodler
1cd85caf3f Fixed a typo 2006-09-17 16:10:00 +00:00
moodler
9d05e659cc Rewritten manual enrolment module using new core functions.
(except for the last part of cron function, which is still ugly)
2006-09-17 16:08:34 +00:00
moodler
27e1437616 Removing unneeded functions, still needs some modernising 2006-09-16 14:02:51 +00:00
ethem
0fbf82ea78 Tidy up 2006-09-15 12:35:08 +00:00
ethem
dbe35d21bc Tidy up 2006-09-15 12:05:27 +00:00
ethem
a2610c215d Tidy up 2006-09-15 11:40:37 +00:00
ethem
4044e868eb Goodbye old config 2006-09-15 09:57:10 +00:00
moodler
9e7f597e49 Updated some docs 2006-09-11 08:25:49 +00:00
ethem
6cf30eae96 all static functions in enrolment_plugin_authorize moved to localfuncs.php. So, no need enrol.php. 2006-09-06 15:39:32 +00:00
ethem
9456e4b7be *** empty log message *** 2006-09-04 12:31:54 +00:00
ethem
131a7ca81b New config: Echeck bank account types enabled. 2006-09-04 12:09:30 +00:00
ethem
460635599a Autoconfigure accepted echeck bank account types. CHECKING, BUSINESSCHECKING, SAVINGS 2006-09-04 09:44:00 +00:00
ethem
039edfab07 This merchant accepts eCheck (ACH) transactions only; no credit card transactions are accepted. 2006-09-04 07:51:15 +00:00
ethem
f1b31fb517 Allow all payment methods as default: AN_METHOD_CC, AN_METHOD_ECHECK
authorizenetlib.php autoconfigures payment method as AN_METHOD_CC if the merchant doesn't accept AN_METHOD_ECHECK. First real echeck transaction is enough for this.
2006-09-04 07:33:11 +00:00
ethem
07c48fcff6 Error message isn't shown when user clicked button without key if course key is set. 2006-09-04 07:09:44 +00:00
stronk7
afc36fdf2e Patch submitted by Ethem:
Error message isn't shown when user clicked without key.
Multienrol is enabled (course enrol key with authorize)

This patch allows showing error message when user clicked button without key.
2006-09-03 20:16:24 +00:00
ethem
be59e14b9e Remove +}
I like this format:
{
}

not {
}
2006-09-02 15:05:10 +00:00
ethem
134c20fb14 Link to CVV help 2006-09-02 14:28:55 +00:00
ethem
d019150d5b Link to ABA help 2006-09-02 14:11:54 +00:00