diff --git a/enrol/authorize/index.php b/enrol/authorize/index.php
index 0ce5f0ae7d2..53f9f5d0719 100644
--- a/enrol/authorize/index.php
+++ b/enrol/authorize/index.php
@@ -1,17 +1,17 @@
shortname: $authstrs->paymentmanagement",
- "$site->fullname",
- "$authstrs->paymentmanagement", "");
+ if (!$course = get_record('course', 'id', $courseid)) {
+ error('Could not find that course');
+ }
+ print_header_simple("$course->shortname: $authstrs->paymentmanagement", $course->fullname,
+ "$authstrs->paymentmanagement", "");
-/// Get order id
- $orderid = optional_param('order', 0, PARAM_INT);
/// If orderid is empty, user wants to see all orders
if (empty($orderid)) {
authorize_print_orders();
- }
- else {
+ } else {
authorize_print_order_details($orderid);
}
diff --git a/enrol/authorize/locallib.php b/enrol/authorize/locallib.php
index 163850042e2..c71e8a4045a 100644
--- a/enrol/authorize/locallib.php
+++ b/enrol/authorize/locallib.php
@@ -1,10 +1,11 @@
dirroot.'/enrol/authorize/const.php';
-require_once $CFG->dirroot.'/enrol/authorize/action.php';
+require_once('const.php');
+require_once('action.php');
define('ORDER_CAPTURE', 'capture');
define('ORDER_DELETE', 'delete');