From a30f997e4cf9cb3518855b057f0ab186e2487c03 Mon Sep 17 00:00:00 2001 From: moodler Date: Sat, 13 Mar 2004 13:33:20 +0000 Subject: [PATCH] Some fixes for display of survey reports --- mod/survey/lib.php | 9 ++++----- mod/survey/report.php | 3 ++- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/mod/survey/lib.php b/mod/survey/lib.php index 5f35efee79..64ad234cd6 100644 --- a/mod/survey/lib.php +++ b/mod/survey/lib.php @@ -195,7 +195,6 @@ function survey_get_responses($surveyid, $groupid) { } return get_records_sql("SELECT MAX(a.time) as time, - count(*) as numanswers, u.id, u.firstname, u.lastname, u.picture FROM {$CFG->prefix}survey_answers AS a, {$CFG->prefix}user AS u, @@ -282,14 +281,14 @@ function survey_count_responses($surveyid, $groupid) { function survey_print_all_responses($cmid, $results, $courseid) { global $THEME; - $table->head = array ("", get_string("name"), get_string("time"), get_string("answers", "survey")); - $table->align = array ("", "left", "left", "right"); - $table->size = array (35, "", "", ""); + $table->head = array ("", get_string("name"), get_string("time")); + $table->align = array ("", "left", "left"); + $table->size = array (35, "", "" ); foreach ($results as $a) { $table->data[] = array(print_user_picture($a->id, $courseid, $a->picture, false, true, false), "id&id=$cmid\">".fullname($a)."", - userdate($a->time), $a->numanswers); + userdate($a->time)); } print_table($table); diff --git a/mod/survey/report.php b/mod/survey/report.php index 4da44c863b..0420f6e23d 100644 --- a/mod/survey/report.php +++ b/mod/survey/report.php @@ -65,8 +65,9 @@ /// Check to see if groups are being used in this survey if ($groupmode = groupmode($course, $cm)) { // Groups are being used + $menuaction = $action == "student" ? "students" : $action; $currentgroup = setup_and_print_groups($course, $groupmode, - "report.php?id=$cm->id&action=$action&qid=$qid"); + "report.php?id=$cm->id&action=$menuaction&qid=$qid"); } else { $currentgroup = 0; } -- 2.39.5