Skip to content

Commit

Permalink
* Lessen the course list.
Browse files Browse the repository at this point in the history
* Fixed pagination problem for orders when selected a course.
  • Loading branch information
ethem committed Nov 13, 2006
1 parent da70138 commit 8ef0bbf
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions enrol/authorize/locallib.php
Expand Up @@ -41,11 +41,8 @@ function authorize_print_orders()
);

$sql = "SELECT c.id, c.fullname FROM {$CFG->prefix}course c INNER JOIN {$CFG->prefix}enrol_authorize e ON c.id = e.courseid ";
if ($CFG->enrol == 'authorize') { // default enrolment plugin
$sql .= "WHERE (c.enrol IS NULL) OR (c.enrol='') OR (c.enrol = 'authorize') ";
}
else {
$sql .= "WHERE (c.enrol = 'authorize') ";
if ($userid > 0) {
$sql .= "WHERE (e.userid='$userid') ";
}
$sql .= "ORDER BY c.sortorder, c.fullname";
if ($popupcrs = get_records_sql_menu($sql)) {
Expand All @@ -67,7 +64,7 @@ function authorize_print_orders()

$table->define_columns(array('id', 'timecreated', 'userid', 'status', ''));
$table->define_headers(array($authstrs->orderid, $strs->time, $authstrs->nameoncard, $strs->status, $strs->action));
$table->define_baseurl($baseurl."&status=$status");
$table->define_baseurl($baseurl."&status=$status&course=$courseid");

$table->sortable(true, 'id', SORT_DESC);
$table->pageable(true);
Expand Down

0 comments on commit 8ef0bbf

Please sign in to comment.