";
- echo "\n";
+// echo "\n";
+ echo '";
- echo "\n| body\" width=\"35\" valign=\"top\">";
+ echo ' | ';
+ echo '| ';
print_user_picture($teacher->id, $course->id, $teacher->picture);
- echo " | ";
- echo "cellheading\">".fullname($teacher);
- echo " ".userdate($entry->timemarked)."";
- echo " | ";
+ echo '';
+ echo 'cellheading\">";
+ echo ''.fullname($teacher).'';
+ echo ' '.userdate($entry->timemarked).'';
+ echo '';
- echo "\n | | cellcontent\">";
+ echo ' | ';
+ echo '| | ';
+ echo '';
- echo " ";
- if ($grades[$entry->rating]) {
- echo get_string("grade").": ";
+ echo '';
+
+ if (!empty($entry->rating) and !empty($grades[$entry->rating])) {
+ echo get_string('grade').': ';
echo $grades[$entry->rating];
} else {
- print_string("nograde");
+ print_string('nograde');
}
- echo "";
+ echo ' ';
echo format_text($entry->comment);
- echo " | ";
- echo " ";
+ echo ' ';
}
?>
diff --git a/mod/journal/mod.html b/mod/journal/mod.html
index 24300fca8bd..270e098b838 100644
--- a/mod/journal/mod.html
+++ b/mod/journal/mod.html
@@ -1,18 +1,18 @@
name)) {
- $form->name = "";
+ $form->name = '';
}
if (!isset($form->intro)) {
- $form->intro = "";
+ $form->intro = '';
}
if (!isset($form->assessed)) {
- $form->assessed = "0";
+ $form->assessed = '0';
}
if (!isset($form->days)) {
- if ($course->format == "weeks") {
- $form->days = "7";
+ if ($course->format == 'weeks') {
+ $form->days = '7';
} else {
- $form->days = "0";
+ $form->days = '0';
}
}
?>
@@ -20,44 +20,43 @@
+
+
+
+
+
+
+
+
diff --git a/mod/journal/view.php b/mod/journal/view.php
index acb932cc896..8a5b80d6c99 100644
--- a/mod/journal/view.php
+++ b/mod/journal/view.php
@@ -43,13 +43,13 @@
$entrycount = journal_count_entries($journal, $currentgroup);
echo "id\">".
- get_string("viewallentries","journal", $entrycount)."$groupname ";
+ get_string('viewallentries','journal', $entrycount)."$groupname";
} else if (!$cm->visible) {
- notice(get_string("activityiscurrentlyhidden"));
+ notice(get_string('activityiscurrentlyhidden'));
}
- echo "\n";
+ echo '';
$journal->intro = trim($journal->intro);
@@ -57,11 +57,11 @@
print_simple_box( format_text($journal->intro, $journal->introformat), 'center', '70%', '', 5, 'generalbox', 'intro');
}
- echo " ";
+ echo ' ';
$timenow = time();
- if ($course->format == "weeks" and $journal->days) {
+ if ($course->format == 'weeks' and $journal->days) {
$timestart = $course->startdate + (($cw->section - 1) * 604800);
if ($journal->days) {
$timefinish = $timestart + (3600 * 24 * $journal->days);
@@ -77,60 +77,62 @@
if ($timenow > $timestart) {
- print_simple_box_start("center");
+ print_simple_box_start('center');
if ($timenow < $timefinish) {
- $options = array ("id" => "$cm->id");
- echo "";
+ $options = array ('id' => "$cm->id");
+ echo '';
if (!isguest()) {
- print_single_button("edit.php", $options, get_string("startoredit","journal"));
+ print_single_button('edit.php', $options, get_string('startoredit','journal'));
}
- echo "";
+ echo '';
}
- if ($entry = get_record("journal_entries", "userid", $USER->id, "journal", $journal->id)) {
+ if ($entry = get_record('journal_entries', 'userid', $USER->id, 'journal', $journal->id)) {
if (empty($entry->text)) {
- echo "".get_string("blankentry","journal")." ";
+ echo ''.get_string('blankentry','journal').' ';
} else {
echo format_text($entry->text, $entry->format);
}
} else {
- echo "".get_string("notstarted","journal")."";
+ echo ''.get_string('notstarted','journal').'';
}
print_simple_box_end();
if ($timenow < $timefinish) {
if ($entry->modified) {
- echo "".get_string("lastedited").": ";
+ echo ''.get_string('lastedited').': ';
echo userdate($entry->modified);
- echo " (".get_string("numwords", "", count_words($entry->text)).")";
- echo "";
+ echo ' ('.get_string('numwords', '', count_words($entry->text)).')';
+ echo " ";
}
if ($journal->days) {
- echo "".get_string("editingends", "journal").": ";
- echo userdate($timefinish)." ";
+ echo ''.get_string('editingends', 'journal').': ';
+ echo userdate($timefinish).' ';
}
} else {
- echo "".get_string("editingended", "journal").": ";
- echo userdate($timefinish)." ";
+ echo ''.get_string('editingended', 'journal').': ';
+ echo userdate($timefinish).' ';
}
if ($entry->comment or $entry->rating) {
$grades = make_grades_menu($journal->assessed);
- print_heading(get_string("feedback"));
+ print_heading(get_string('feedback'));
journal_print_feedback($course, $entry, $grades);
}
} else {
- echo "".get_string("notopenuntil", "journal").": ";
- echo userdate($timestart)." ";
+ echo ''.get_string('notopenuntil', 'journal').': ';
+ echo userdate($timestart).' ';
}
+ echo ' ';
+
print_footer($course);
?>
|