diff options
Diffstat (limited to 'sqlbox')
-rw-r--r-- | sqlbox/reportall.php | 6 |
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"); |