485 Commits

Author SHA1 Message Date
ethem
726bf1ead2 get_teacher() to get_users_by_capability(). 2006-11-03 11:20:13 +00:00
ethem
e40106c7db Fix for enrolurl(admin/users.php). Merged from 17stable. 2006-11-02 13:34:52 +00:00
ethem
af3e0ed2ea Make authorize.net config page secure.
See: http://moodle.org/mod/forum/discuss.php?d=56728
2006-11-01 12:36:19 +00:00
ethem
7bb8485d6e Show notice at bottom. 2006-10-31 19:24:10 +00:00
ethem
325d15409b If an user's credit card cannot be captured on the internet directly, obtain authorization code over phone from customer's bank.
Some users may not wish to use their credit cards on the internet directly for security reasons.
   In this case, you need to obtain an authorization code from user's bank.
   Initially, ask for credit card information from the customer
   like bank name, name on card, card number, expiry date and card validation code
   by means of phone, face-to-face or a billing application.
   Then, call the customer services of user's bank giving this information and demand an authorization code.
   Finally, after obtaining it, login as user to get the user enrolled.
   Alternatively, you can give it to the user saying enrol using this code.
2006-10-30 13:07:20 +00:00
ethem
c9befcd1be If an user's credit card cannot be captured on the internet directly, obtain authorization code over phone from customer's bank.
Some users may not wish to use their credit cards on the internet directly for security reasons.
   In this case, you need to obtain an authorization code from user's bank.
   Initially, ask for credit card information from the customer
   like bank name, name on card, card number, expiry date and card validation code
   by means of phone, face-to-face or a billing application.
   Then, call the customer services of user's bank giving this information and demand an authorization code.
   Finally, after obtaining it, login as user to get the user enrolled.
   Alternatively, you can give it to the user saying enrol using this code.
2006-10-30 12:53:15 +00:00
ethem
2c46669ba1 New string: All Pending Orders 2006-10-30 11:16:09 +00:00
ethem
2760b4f4cc Show a link for echeck payments if an user has_capability('enrol/authorize:uploadcsv'). 2006-10-30 10:12:20 +00:00
ethem
bf228101fd Get only courses made transactions. This lessens the course list; Merged from 17stable. 2006-10-30 08:33:00 +00:00
stronk7
5d0fc5c33d Deprecating old "upgrade" files. MDL-7214
Merged from MOODLE_17_STABLE
2006-10-26 22:46:02 +00:00
stronk7
3aac1dc9a0 Deprecating old "upgrade" files. MDL-7214
Merged from MOODLE_17_STABLE
2006-10-26 22:39:10 +00:00
stronk7
19606d8bd5 New upgrade.php file added for this module. MDL-7214 2006-10-26 17:02:31 +00:00
ethem
63693fd835 I found a new function: user_has_role_assignment(). Merged from MOODLE_17_STABLE. 2006-10-26 14:44:53 +00:00
ethem
009a965863 get_courses() is only getting visible courses. This is a problem when an user wants to view old payments. 2006-10-26 08:41:02 +00:00
stronk7
422770d8cb Moving deprecated uses of sql_paging_limit() to the new $limitfrom,
$limitnum parameters in all the get_recordXXX() functions. MDL-7167

Merged from MOODLE_17_STABLE
2006-10-23 23:00:18 +00:00
moodler
2f1a42481d This new function called load_all_capabilities() should be used whenever
you want to completely reload the capabilities for the current user.

Basically it will deal nicely with the default site-wide permissions
depending on the current user.

More background in the comments on MDL-6963

Merged from stable
2006-10-23 15:17:31 +00:00
moodler
b1f318a67f Merged guest key enrolment fix from stable MDL-6881 2006-10-23 06:38:15 +00:00
moodler
bd4128e91f Merged enrolment-related fixes from stable 2006-10-20 17:53:50 +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
ethem
821267bccf Fixed merge chars: ======= 2006-10-18 12:45:28 +00:00
ethem
23741665cd Show results and send email to admin. Merged from 17stable. 2006-10-18 12:43:00 +00:00
ethem
c7003d87b9 + New consts for authorize_action() function:
* AN_RETURNZERO: No connection was made on authorize.net.
  * AN_APPROVED: The transaction was accepted.
  * AN_DECLINED: The transaction was declined.
  * AN_REVIEW: The transaction was held for review.

+ Fix: Speacial handling for echecks: REVIEW; 'Under Review', 'Approved Review', 'Review Failed'
+ New feature: Upload a CSV file for echecks (capability: enrol/authorize:uploadcsv level: user)
+ New feature: Search payments by orderid and transid
+ New function: send_welcome_messages()

merged from 17stable.
2006-10-16 09:53:03 +00:00
ethem
9c746ce766 + New consts for authorize_action() function:
* AN_RETURNZERO: No connection was made on authorize.net.
  * AN_APPROVED: The transaction was accepted.
  * AN_DECLINED: The transaction was declined.
  * AN_REVIEW: The transaction was held for review.

+ Fix: Speacial handling for echecks: REVIEW; 'Under Review', 'Approved Review', 'Review Failed'
+ New feature: Upload a CSV file for echecks (capability: enrol/authorize:uploadcsv level: user)
+ New feature: Search payments by orderid and transid
+ New function: send_welcome_messages()

merged from 17stable.
2006-10-16 09:39:08 +00:00
moodler
2d5a4f255b Merged fixes for MDL-6907 from stable 2006-10-11 06:21:58 +00:00
skodak
57f1b91497 fixed some incorrect strtolower() calls that were breaking non ascii languages MDL-6135 2006-10-07 20:47:54 +00:00
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