From 235a90f9b6303899e7d0cd440fddfe502cb21fca Mon Sep 17 00:00:00 2001 From: ethem Date: Fri, 10 Mar 2006 20:05:24 +0000 Subject: [PATCH] Course filter is added to payment management page. Show the enrolment method of course is 'authorize. --- enrol/authorize/index.php | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/enrol/authorize/index.php b/enrol/authorize/index.php index cbb46dc617..cc7fe7dd2f 100644 --- a/enrol/authorize/index.php +++ b/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'); -- 2.39.5