mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +02:00
Tidy up
This commit is contained in:
parent
dbe35d21bc
commit
0fbf82ea78
2 changed files with 7 additions and 8 deletions
|
@ -16,6 +16,10 @@
|
||||||
error("Guests cannot use this page.");
|
error("Guests cannot use this page.");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!$course = get_record('course', 'id', $courseid)) {
|
||||||
|
error('Could not find that course');
|
||||||
|
}
|
||||||
|
|
||||||
/// Load strings. All strings should be defined here. locallib.php uses these strings.
|
/// Load strings. All strings should be defined here. locallib.php uses these strings.
|
||||||
$strs = get_strings(array('status','action','time','course','confirm','no','all','none','error'));
|
$strs = get_strings(array('status','action','time','course','confirm','no','all','none','error'));
|
||||||
$authstrs = get_strings(array('orderid','nameoncard','echeckfirslasttname','void','capture','refund','delete',
|
$authstrs = get_strings(array('orderid','nameoncard','echeckfirslasttname','void','capture','refund','delete',
|
||||||
|
@ -25,15 +29,11 @@
|
||||||
|
|
||||||
/// Print header
|
/// Print header
|
||||||
$strpaymentmanagement = get_string('paymentmanagement', 'enrol_authorize');
|
$strpaymentmanagement = get_string('paymentmanagement', 'enrol_authorize');
|
||||||
if (!$course = get_record('course', 'id', $courseid)) {
|
|
||||||
error('Could not find that course');
|
|
||||||
}
|
|
||||||
print_header_simple("$strpaymentmanagement", "", "<a href=\"index.php\">$strpaymentmanagement</a>");
|
print_header_simple("$strpaymentmanagement", "", "<a href=\"index.php\">$strpaymentmanagement</a>");
|
||||||
|
|
||||||
|
/// If orderid is empty, print orders
|
||||||
/// If orderid is empty, user wants to see all orders
|
|
||||||
if (empty($orderid)) {
|
if (empty($orderid)) {
|
||||||
authorize_print_orders();
|
authorize_print_orders($courseid, $userid);
|
||||||
} else {
|
} else {
|
||||||
authorize_print_order_details($orderid);
|
authorize_print_order_details($orderid);
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,11 +16,10 @@ define('ORDER_VOID', 'void');
|
||||||
* authorize_print_orders
|
* authorize_print_orders
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
function authorize_print_orders()
|
function authorize_print_orders($courseid, $userid)
|
||||||
{
|
{
|
||||||
global $CFG, $USER;
|
global $CFG, $USER;
|
||||||
global $strs, $authstrs;
|
global $strs, $authstrs;
|
||||||
global $courseid, $userid;
|
|
||||||
require_once($CFG->libdir.'/tablelib.php');
|
require_once($CFG->libdir.'/tablelib.php');
|
||||||
|
|
||||||
$perpage = 10;
|
$perpage = 10;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue