mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 08:56:36 +02:00
Some fixes for delete groups sessions
This commit is contained in:
parent
4b6d8dd545
commit
b46792fe1e
1 changed files with 12 additions and 4 deletions
|
@ -6,7 +6,7 @@
|
||||||
require_once("lib.php");
|
require_once("lib.php");
|
||||||
|
|
||||||
require_variable($id); // Course module ID
|
require_variable($id); // Course module ID
|
||||||
optional_variable($group, ""); // Start of period
|
optional_variable($groupid, ""); // Group
|
||||||
optional_variable($start, ""); // Start of period
|
optional_variable($start, ""); // Start of period
|
||||||
optional_variable($end, ""); // End of period
|
optional_variable($end, ""); // End of period
|
||||||
optional_variable($deletesession, ""); // Delete a session
|
optional_variable($deletesession, ""); // Delete a session
|
||||||
|
@ -50,6 +50,14 @@
|
||||||
|
|
||||||
if ($start and $end and !$confirmdelete) { // Show a full transcript
|
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",
|
print_header("$course->shortname: $chat->name: $strchatreport", "$course->fullname",
|
||||||
"$navigation <a href=\"index.php?id=$course->id\">$strchats</a> ->
|
"$navigation <a href=\"index.php?id=$course->id\">$strchats</a> ->
|
||||||
<a href=\"view.php?id=$cm->id\">$chat->name</a> ->
|
<a href=\"view.php?id=$cm->id\">$chat->name</a> ->
|
||||||
|
@ -58,13 +66,13 @@
|
||||||
|
|
||||||
if ($deletesession and $isteacheredit) {
|
if ($deletesession and $isteacheredit) {
|
||||||
notice_yesno(get_string("deletesessionsure", "chat"),
|
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");
|
"report.php?id=$cm->id");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$messages = get_records_select("chat_messages", "chatid = $chat->id AND
|
if (!$messages = get_records_select("chat_messages", "chatid = $chat->id AND
|
||||||
timestamp >= '$start' AND
|
timestamp >= '$start' AND
|
||||||
timestamp <= '$end'", "timestamp ASC")) {
|
timestamp <= '$end' $groupselect", "timestamp ASC")) {
|
||||||
print_heading(get_string("nomessages", "chat"));
|
print_heading(get_string("nomessages", "chat"));
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
@ -106,7 +114,7 @@
|
||||||
|
|
||||||
if ($currentgroup) {
|
if ($currentgroup) {
|
||||||
$groupselect = " AND groupid = '$currentgroup'";
|
$groupselect = " AND groupid = '$currentgroup'";
|
||||||
$groupparam = "&group=$currentgroup";
|
$groupparam = "&groupid=$currentgroup";
|
||||||
} else {
|
} else {
|
||||||
$groupselect = "";
|
$groupselect = "";
|
||||||
$groupparam = "";
|
$groupparam = "";
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue