summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Franzke <benjaminfranzke@googlemail.com>2013-01-30 11:27:39 +0100
committerBenjamin Franzke <benjaminfranzke@googlemail.com>2013-01-30 11:27:58 +0100
commit1614bd0142f0325e6e2d2e9e36ad9ca97f42803b (patch)
tree41a4e67e3cd5454a5358c9376caad78ee9ecd1db
parentb9a59b015d25f8d456a1c160f8b77b9b061a08f2 (diff)
downloadsqltutor-plugin-1614bd0142f0325e6e2d2e9e36ad9ca97f42803b.tar.gz
sqltutor-plugin-1614bd0142f0325e6e2d2e9e36ad9ca97f42803b.tar.bz2
sqltutor-plugin-1614bd0142f0325e6e2d2e9e36ad9ca97f42803b.zip
reportall: Add todo
-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)