mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +02:00
Removed tabs
This commit is contained in:
parent
bee7ee3815
commit
dabfd0ed85
67 changed files with 8204 additions and 8204 deletions
|
@ -17,17 +17,17 @@
|
|||
if (!$cm = get_coursemodule_from_instance('chat', $chat->id, $course->id)) {
|
||||
error('Course Module ID was incorrect');
|
||||
}
|
||||
|
||||
$context = get_context_instance(CONTEXT_MODULE, $cm->id);
|
||||
|
||||
require_login($course->id, false, $cm);
|
||||
$context = get_context_instance(CONTEXT_MODULE, $cm->id);
|
||||
|
||||
require_login($course->id, false, $cm);
|
||||
|
||||
has_capability('mod/chat:chat',$context->id, true);
|
||||
/*
|
||||
has_capability('mod/chat:chat',$context->id, true);
|
||||
/*
|
||||
if (isguest()) {
|
||||
error('Guest does not have access to chat rooms');
|
||||
}
|
||||
*/
|
||||
*/
|
||||
if (!$cm->visible and !isteacher($course->id)) {
|
||||
print_header();
|
||||
notice(get_string("activityiscurrentlyhidden"));
|
||||
|
|
|
@ -200,17 +200,17 @@ function chat_print_recent_activity($course, $isteacher, $timestart) {
|
|||
}
|
||||
if ($chat = get_record('chat', 'id', $chatuser->chatid)) {
|
||||
|
||||
// we find the course module id
|
||||
$chatmod = get_record('modules', 'name', 'chat');
|
||||
$SQL = "select * from {$CFG->prefix}course_modules where
|
||||
course = $course->id
|
||||
and module = $chatmod->id
|
||||
and instance = $chat->id";
|
||||
$cm = get_records_sql($SQL);
|
||||
$context = get_context_instance(CONTEXT_MODULE, $cm->id);
|
||||
// we find the course module id
|
||||
$chatmod = get_record('modules', 'name', 'chat');
|
||||
$SQL = "select * from {$CFG->prefix}course_modules where
|
||||
course = $course->id
|
||||
and module = $chatmod->id
|
||||
and instance = $chat->id";
|
||||
$cm = get_records_sql($SQL);
|
||||
$context = get_context_instance(CONTEXT_MODULE, $cm->id);
|
||||
|
||||
// needs to be fixed
|
||||
if (!(has_capability('mod/chat:readlog', $context->id) or instance_is_visible('chat', $chat))) { // Chat hidden to students
|
||||
// needs to be fixed
|
||||
if (!(has_capability('mod/chat:readlog', $context->id) or instance_is_visible('chat', $chat))) { // Chat hidden to students
|
||||
//if (!($isteacher or instance_is_visible('chat', $chat))) { // Chat hidden to students
|
||||
continue;
|
||||
}
|
||||
|
|
|
@ -21,16 +21,16 @@
|
|||
error('Course is misconfigured');
|
||||
}
|
||||
|
||||
$context = get_context_instance(CONTEXT_MODULE, $cm->id);
|
||||
$context = get_context_instance(CONTEXT_MODULE, $cm->id);
|
||||
require_login($course->id, false, $cm);
|
||||
|
||||
$isteacher = isteacher($course->id);
|
||||
$isteacheredit = isteacheredit($course->id);
|
||||
|
||||
//if (isguest() or (!$isteacher and !$chat->studentlogs)) {
|
||||
//error('You can not view these chat reports');
|
||||
//error('You can not view these chat reports');
|
||||
//}
|
||||
has_capability('mod/chat:readlog', $context->id, true); // if can't even read, kill
|
||||
has_capability('mod/chat:readlog', $context->id, true); // if can't even read, kill
|
||||
|
||||
add_to_log($course->id, 'chat', 'report', "report.php?id=$cm->id", $chat->id, $cm->id);
|
||||
|
||||
|
@ -89,7 +89,7 @@
|
|||
print_simple_box_end('center');
|
||||
}
|
||||
|
||||
if (!$deletesession or !has_capability('mod/chat:deletelog', $context->id)) {
|
||||
if (!$deletesession or !has_capability('mod/chat:deletelog', $context->id)) {
|
||||
//if (!$deletesession or !$isteacheredit) {
|
||||
print_continue("report.php?id=$cm->id");
|
||||
}
|
||||
|
@ -124,7 +124,7 @@
|
|||
|
||||
/// Delete a session if one has been specified
|
||||
|
||||
if ($deletesession and has_capability('mod/chat:deletelog', $context->id) and $confirmdelete and $start and $end and confirm_sesskey()) {
|
||||
if ($deletesession and has_capability('mod/chat:deletelog', $context->id) and $confirmdelete and $start and $end and confirm_sesskey()) {
|
||||
//if ($deletesession and $isteacheredit and $confirmdelete and $start and $end and confirm_sesskey()) {
|
||||
delete_records_select('chat_messages', "chatid = $chat->id AND
|
||||
timestamp >= '$start' AND
|
||||
|
@ -194,7 +194,7 @@
|
|||
echo '<p align="right">';
|
||||
echo "<a href=\"report.php?id=$cm->id&start=$sessionstart&end=$sessionend\">$strseesession</a>";
|
||||
//if ($isteacheredit)
|
||||
if (has_capability('mod/chat:deletelog', $context->id)) {
|
||||
if (has_capability('mod/chat:deletelog', $context->id)) {
|
||||
echo "<br /><a href=\"report.php?id=$cm->id&start=$sessionstart&end=$sessionend&deletesession=1\">$strdeletesession</a>";
|
||||
}
|
||||
echo '</p>';
|
||||
|
|
|
@ -43,9 +43,9 @@
|
|||
|
||||
require_course_login($course, true, $cm);
|
||||
|
||||
$context = get_context_instance(CONTEXT_MODULE, $cm->id);
|
||||
$context = get_context_instance(CONTEXT_MODULE, $cm->id);
|
||||
|
||||
add_to_log($course->id, 'chat', 'view', "view.php?id=$cm->id", $chat->id, $cm->id);
|
||||
add_to_log($course->id, 'chat', 'view', "view.php?id=$cm->id", $chat->id, $cm->id);
|
||||
|
||||
// Initialize $PAGE, compute blocks
|
||||
|
||||
|
@ -76,7 +76,7 @@
|
|||
|
||||
echo '<td id="middle-column">';
|
||||
|
||||
if ($chat->studentlogs or has_capability('mod/chat:readlog',$context->id)) {
|
||||
if ($chat->studentlogs or has_capability('mod/chat:readlog',$context->id)) {
|
||||
//if (($chat->studentlogs or isteacher($course->id)) and !isguest()) {
|
||||
echo '<div class="reportlink">';
|
||||
echo "<a href=\"report.php?id=$cm->id\">".
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue