Skip to content
Browse files

Course filter is added to payment management page.

Show the enrolment method of course is 'authorize.
  • Loading branch information...
1 parent 9e55885 commit 235a90f9b6303899e7d0cd440fddfe502cb21fca ethem committed Mar 10, 2006
Showing with 17 additions and 2 deletions.
  1. +17 −2 enrol/authorize/index.php
View
19 enrol/authorize/index.php
@@ -51,7 +51,11 @@ function authorize_orders()
$userid = optional_param('user', 0, PARAM_INT);
$courseid = optional_param('course', 0, PARAM_INT);
$status = optional_param('status', AN_STATUS_NONE, PARAM_INT);
- $baseurl = $CFG->wwwroot."/enrol/authorize/index.php?course=$courseid&user=$userid";
+ if ($courseid == SITEID) {
+ $courseid = 0; // no filter
+ }
+
+ $baseurl = $CFG->wwwroot."/enrol/authorize/index.php?user=$userid";
$statusmenu = array(AN_STATUS_NONE => get_string('all'),
AN_STATUS_AUTH => $authstrs->authorizedpendingcapture,
AN_STATUS_AUTHCAPTURE => $authstrs->authcaptured,
@@ -61,7 +65,18 @@ function authorize_orders()
);
print_simple_box_start('center');
- echo $strs->status . ': ' . popup_form($baseurl.'&status=', $statusmenu, 'statusmenu', $status, '', '', '', true);
+ echo "$strs->status: ";
+ echo popup_form($baseurl.'&course='.$courseid.'&status=', $statusmenu, 'statusmenu', $status, '', '', '', true);
+ if ($courses = get_courses('all', 'c.sortorder ASC', 'c.id,c.fullname,c.enrol')) {
+ $popupcrs = array();
+ foreach ($courses as $crs) {
+ if ($crs->enrol == 'authorize' || (empty($crs->enrol) && $CFG->enrol == 'authorize')) {
+ $popupcrs[(int)$crs->id] = $crs->fullname;
+ }
+ }
+ echo "   $strs->course: ";
+ echo popup_form($baseurl.'&status='.$status.'&course=', $popupcrs, 'coursesmenu', $courseid, '', '', '', true);
+ }
print_simple_box_end();
$table = new flexible_table('enrol-authorize');

0 comments on commit 235a90f

Please sign in to comment.
Something went wrong with that request. Please try again.