More cleanups for teacher view in particular
This commit is contained in:
+12
-2
@@ -39,11 +39,21 @@ function journal_user_complete($course, $user, $mod, $journal) {
|
||||
}
|
||||
|
||||
function journal_user_complete_index($course, $user, $journal, $journalopen, $heading) {
|
||||
/// Prints a journal, entry and feedback ... used on the journal index page.
|
||||
|
||||
if (isteacher($course->id)) {
|
||||
$entrycount = count_records("journal_entries", "journal", $journal->id);
|
||||
$entryinfo = " (<a href=\"report.php?id=$journal->coursemodule\">".get_string("viewallentries","journal", $entrycount)."</a>)";
|
||||
} else {
|
||||
$entryinfo = "";
|
||||
}
|
||||
|
||||
$journal->name = "<a href=\"view.php?id=$journal->coursemodule\">$journal->name</a>";
|
||||
|
||||
if ($heading) {
|
||||
echo "<h3>$heading - $journal->name</h3>";
|
||||
echo "<h3>$heading - $journal->name$entryinfo</h3>";
|
||||
} else {
|
||||
echo "<h3>$journal->name</h3>";
|
||||
echo "<h3>$journal->name$entryinfo</h3>";
|
||||
}
|
||||
|
||||
print_simple_box_start("left", "90%");
|
||||
|
||||
@@ -37,21 +37,17 @@
|
||||
update_module_button($cm->id, $course->id, $strjournal), navmenu($course, $cm));
|
||||
|
||||
if (isteacher($course->id)) {
|
||||
if ($allentries = get_records("journal_entries", "journal", $journal->id)) {
|
||||
$entrycount = count($allentries);
|
||||
} else {
|
||||
$entrycount = 0;
|
||||
}
|
||||
echo "<P align=right><A HREF=\"report.php?id=$cm->id\">".get_string("viewallentries","journal", $entrycount)."</A></P>";
|
||||
$entrycount = count_records("journal_entries", "journal", $journal->id);
|
||||
echo "<p align=right><a href=\"report.php?id=$cm->id\">".get_string("viewallentries","journal", $entrycount)."</a></p>";
|
||||
} else if (!$cm->visible) {
|
||||
notice(get_string("activityiscurrentlyhidden"));
|
||||
}
|
||||
|
||||
echo "<CENTER>\n";
|
||||
echo "<center>\n";
|
||||
|
||||
print_simple_box( text_to_html($journal->intro) , "center");
|
||||
|
||||
echo "<BR>";
|
||||
echo "<br \>";
|
||||
|
||||
$timenow = time();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user