summaryrefslogtreecommitdiff
path: root/sqlbox
diff options
context:
space:
mode:
Diffstat (limited to 'sqlbox')
-rw-r--r--sqlbox/reportall.php11
1 files changed, 11 insertions, 0 deletions
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)