Skip to content

Commit

Permalink
Ad-hoc DB reports: list reports in a consistent order #540234
Browse files Browse the repository at this point in the history
  • Loading branch information
timhunt committed Mar 18, 2022
1 parent ee3e49d commit 92e53ef
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion category.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@

$categoryid = required_param('id', PARAM_INT);
$record = $DB->get_record('report_customsql_categories', ['id' => $categoryid], '*', MUST_EXIST);
$queries = $DB->get_records('report_customsql_queries', ['categoryid' => $categoryid]);
$queries = $DB->get_records('report_customsql_queries', ['categoryid' => $categoryid], 'displayname, id');

$category = new \report_customsql\local\category($record);
$category->load_queries_data($queries);
Expand Down
4 changes: 2 additions & 2 deletions index.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@
$context = context_system::instance();
require_capability('report/customsql:view', $context);

$categories = $DB->get_records('report_customsql_categories', null, 'name ASC');
$queries = $DB->get_records('report_customsql_queries');
$categories = $DB->get_records('report_customsql_categories', null, 'name, id');
$queries = $DB->get_records('report_customsql_queries', null, 'displayname, id');
$showcat = optional_param('showcat', 0, PARAM_INT);
$hidecat = optional_param('hidecat', 0, PARAM_INT);
$returnurl = report_customsql_url('index.php');
Expand Down

0 comments on commit 92e53ef

Please sign in to comment.