"MDL-11371, The View past chat sessions should not appear if there haven't been any, merged from 1.9"

This commit is contained in:
dongsheng 2008-10-08 07:55:42 +00:00
parent 7f46236fcd
commit c260ac7db6

View File

@ -119,10 +119,12 @@
}
if ($chat->studentlogs or has_capability('mod/chat:readlog',$context)) {
echo '<div class="reportlink">';
echo "<a href=\"report.php?id=$cm->id\">".
get_string('viewreport', 'chat').'</a>';
echo '</div>';
if ($msg = get_records_select('chat_messages', "chatid = '$chat->id' $groupselect", '', 'id', '', 1)) {
echo '<div class="reportlink">';
echo "<a href=\"report.php?id=$cm->id\">".
get_string('viewreport', 'chat').'</a>';
echo '</div>';
}
}