From b46792fe1e827cf823a7bb45928eae0c9d1a81c7 Mon Sep 17 00:00:00 2001 From: moodler Date: Tue, 24 Feb 2004 07:21:52 +0000 Subject: [PATCH] Some fixes for delete groups sessions --- mod/chat/report.php | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/mod/chat/report.php b/mod/chat/report.php index a86b65aa09..d6991e7178 100644 --- a/mod/chat/report.php +++ b/mod/chat/report.php @@ -6,7 +6,7 @@ require_once("lib.php"); require_variable($id); // Course module ID - optional_variable($group, ""); // Start of period + optional_variable($groupid, ""); // Group optional_variable($start, ""); // Start of period optional_variable($end, ""); // End of period optional_variable($deletesession, ""); // Delete a session @@ -50,6 +50,14 @@ if ($start and $end and !$confirmdelete) { // Show a full transcript + if ($groupid) { + $groupselect = " AND groupid = '$currentgroup'"; + $groupparam = "&groupid=$currentgroup"; + } else { + $groupselect = ""; + $groupparam = ""; + } + print_header("$course->shortname: $chat->name: $strchatreport", "$course->fullname", "$navigation id\">$strchats -> id\">$chat->name -> @@ -58,13 +66,13 @@ if ($deletesession and $isteacheredit) { notice_yesno(get_string("deletesessionsure", "chat"), - "report.php?id=$cm->id&deletesession=1&confirmdelete=1&start=$start&end=$end", + "report.php?id=$cm->id&deletesession=1&confirmdelete=1&start=$start&end=$end$groupparam", "report.php?id=$cm->id"); } if (!$messages = get_records_select("chat_messages", "chatid = $chat->id AND timestamp >= '$start' AND - timestamp <= '$end'", "timestamp ASC")) { + timestamp <= '$end' $groupselect", "timestamp ASC")) { print_heading(get_string("nomessages", "chat")); } else { @@ -106,7 +114,7 @@ if ($currentgroup) { $groupselect = " AND groupid = '$currentgroup'"; - $groupparam = "&group=$currentgroup"; + $groupparam = "&groupid=$currentgroup"; } else { $groupselect = ""; $groupparam = ""; -- 2.39.5