From 1614bd0142f0325e6e2d2e9e36ad9ca97f42803b Mon Sep 17 00:00:00 2001 From: Benjamin Franzke Date: Wed, 30 Jan 2013 11:27:39 +0100 Subject: reportall: Add todo --- sqlbox/reportall.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/sqlbox/reportall.php b/sqlbox/reportall.php index 8bd4a12..4b58d52 100644 --- a/sqlbox/reportall.php +++ b/sqlbox/reportall.php @@ -27,6 +27,17 @@ $PAGE->set_context($context); echo $OUTPUT->header(); +// TODO: Order Results using the frontend ordering. sth like this would get the ordering right for a given course_id: +/* +select mdl_sqlbox.name +from ( + select to_number(unnest(string_to_array(tmp.sequence,',')),'99999') as id + from (select sequence from mdl_course_sections + where course=:course_id order by section) as tmp +) sid, mdl_course_modules, mdl_sqlbox +where sid.id = mdl_course_modules.id and mdl_course_modules.instance = mdl_sqlbox.id; + */ + $boxes = $DB->get_records_sql("SELECT * FROM {sqlbox} ORDER BY id"); $b = array(); foreach ($boxes as $box) -- cgit