From bcb329f113f69239a0ac2c493b830a08f6b2667f Mon Sep 17 00:00:00 2001 From: Benjamin Franzke Date: Wed, 30 Jan 2013 14:57:12 +0100 Subject: reportall: Remove php based indexing/ordering in output It is already done by the database. --- sqlbox/reportall.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sqlbox') diff --git a/sqlbox/reportall.php b/sqlbox/reportall.php index c3a2813..612a093 100644 --- a/sqlbox/reportall.php +++ b/sqlbox/reportall.php @@ -41,7 +41,7 @@ where sid.id = mdl_course_modules.id and mdl_course_modules.instance = mdl_sqlbo $boxes = $DB->get_records_sql("SELECT * FROM {sqlbox} ORDER BY id"); $b = array(); foreach ($boxes as $box) - $b[$box->id] = $box->name; + $b[] = $box->name; $table = new html_table; $table->head = array_merge(array("Nutzer", "Fortschritt"), $b); @@ -62,7 +62,7 @@ foreach ($users as $user) { $s = array(); $progress = 0; foreach ($solutions as $solution) { - $s[$solution->id] = ($solution->correct == '1') ? '☑' : ($solution->correct == '0' ? '☒' : '☐'); + $s[] = ($solution->correct == '1') ? '☑' : ($solution->correct == '0' ? '☒' : '☐'); if ($solution->correct == '1') $progress++; } -- cgit