From 0e577b48ff53065fd337f796ce8a3f7cd4cd59c4 Mon Sep 17 00:00:00 2001 From: Benjamin Franzke Date: Wed, 30 Jan 2013 14:46:07 +0100 Subject: reportall: Fix query in TODO --- sqlbox/reportall.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sqlbox') 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"); -- cgit