summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Franzke <benjaminfranzke@googlemail.com>2013-01-30 14:57:12 +0100
committerBenjamin Franzke <benjaminfranzke@googlemail.com>2013-01-30 15:09:03 +0100
commitbcb329f113f69239a0ac2c493b830a08f6b2667f (patch)
tree7a14c8b6ac291217d511623c20c137f044a1041e
parenta3eb8b3f0be1154b1f59ce67648abe74228c56f2 (diff)
downloadsqltutor-plugin-bcb329f113f69239a0ac2c493b830a08f6b2667f.tar.gz
sqltutor-plugin-bcb329f113f69239a0ac2c493b830a08f6b2667f.tar.bz2
sqltutor-plugin-bcb329f113f69239a0ac2c493b830a08f6b2667f.zip
reportall: Remove php based indexing/ordering in output
It is already done by the database.
-rw-r--r--sqlbox/reportall.php4
1 files changed, 2 insertions, 2 deletions
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++;
}