Permalink
Browse files

Get payment managers at COURSE level. Merged from 17stable.

  • Loading branch information...
1 parent 726bf1e commit 3baecd1d7e552aa81eb976ad4536195358d625e6 ethem committed Nov 3, 2006
Showing with 5 additions and 5 deletions.
  1. +4 −4 enrol/authorize/enrol.php
  2. +1 −1 enrol/authorize/index.php
@@ -231,10 +231,10 @@ function cc_submit($form, $course)
$a->course = $course->shortname;
$a->orderid = $order->id;
$emailsubject = get_string('adminnewordersubject', 'enrol_authorize', $a);
- $context = get_context_instance(CONTEXT_SYSTEM);
- if ($sitepaymentmanagers = get_users_by_capability($context, 'enrol/authorize:managepayments')) {
- foreach ($sitepaymentmanagers as $sitepaymentmanager) {
- email_to_user($sitepaymentmanager, $USER, $emailsubject, $emailmessage);
+ $context = get_context_instance(CONTEXT_COURSE, $course->id);
+ if ($paymentmanagers = get_users_by_capability($context, 'enrol/authorize:managepayments')) {
+ foreach ($paymentmanagers as $paymentmanager) {
+ email_to_user($paymentmanager, $USER, $emailsubject, $emailmessage);
}
}
redirect($CFG->wwwroot, get_string("reviewnotify", "enrol_authorize"), '30');
@@ -12,7 +12,7 @@
/// Only site users can access to this page
require_login(); // Don't use $courseid! User may want to see old orders.
- if (has_capability('moodle/legacy:guest', get_context_instance(CONTEXT_SYSTEM, SITEID), $USER->id, false)) {
+ if (has_capability('moodle/legacy:guest', get_context_instance(CONTEXT_SYSTEM), $USER->id, false)) {
error("Guests cannot use this page.");
}

0 comments on commit 3baecd1

Please sign in to comment.