summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Franzke <benjaminfranzke@googlemail.com>2013-01-30 14:46:07 +0100
committerBenjamin Franzke <benjaminfranzke@googlemail.com>2013-01-30 14:46:07 +0100
commit0e577b48ff53065fd337f796ce8a3f7cd4cd59c4 (patch)
treed309cf046315cb000d62aef45df0a34d459c5db6
parent6393bc66cd54c31a962da14ec057a837b41411f2 (diff)
downloadsqltutor-plugin-0e577b48ff53065fd337f796ce8a3f7cd4cd59c4.tar.gz
sqltutor-plugin-0e577b48ff53065fd337f796ce8a3f7cd4cd59c4.tar.bz2
sqltutor-plugin-0e577b48ff53065fd337f796ce8a3f7cd4cd59c4.zip
reportall: Fix query in TODO
-rw-r--r--sqlbox/reportall.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/sqlbox/reportall.php b/sqlbox/reportall.php
index 4b58d52..2e002b4 100644
--- a/sqlbox/reportall.php
+++ b/sqlbox/reportall.php
@@ -31,11 +31,11 @@ echo $OUTPUT->header();
/*
select mdl_sqlbox.name
from (
- select to_number(unnest(string_to_array(tmp.sequence,',')),'99999') as id
+ select to_number(unnest(string_to_array(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;
+) sid, mdl_course_modules, mdl_sqlbox, mdl_modules
+where sid.id = mdl_course_modules.id and mdl_course_modules.instance = mdl_sqlbox.id and mdl_modules.name='sqlbox' and mdl_modules.id=mdl_course_modules.module;
*/
$boxes = $DB->get_records_sql("SELECT * FROM {sqlbox} ORDER BY id");