From ff577e272f722530fdb3ae9d312df74df29f5be2 Mon Sep 17 00:00:00 2001 From: bdaloukas Date: Fri, 30 Jun 2017 20:01:19 +0300 Subject: [PATCH] Fix mod_form, show_answers: show numbers of entries in each glossary and question category --- mod_form.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mod_form.php b/mod_form.php index fa70673..0347f91 100644 --- a/mod_form.php +++ b/mod_form.php @@ -424,7 +424,7 @@ class mod_game_mod_form extends moodleform_mod { $sql2 = "SELECT COUNT(*) FROM {$CFG->prefix}glossary_entries ge WHERE ge.glossaryid=g.id"; $sql = "SELECT id, name, ($sql2) as c FROM {$CFG->prefix}glossary g WHERE $select"; $recs = $DB->get_records_sql( $sql); - foreach ( $recs as $rec) { + foreach ($recs as $rec) { $a[ - $rec->id] = $rec->name.' -> ('.$rec->c.')'; } // Fills with the count of entries in each category.