$string[nameteacher] = "Teacher forum";
$string[nodiscussions] = "There are no discussion topics yet in this forum";
$string[noposts] = "No posts";
-$string[numwords] = "\$a words";
$string[numposts] = "\$a posts";
$string[olderdiscussions] = "Older discussions";
$string[parentofthispost] = "Parent of this post";
#------------------------------------------------------------
+$string[alwaysopen] = "Always open";
+$string[blankentry] = "Blank entry";
+$string[daysavailable] = "Days available";
+$string[editingends] = "Editing period ends";
+$string[editingended] = "Editing period has ended";
+$string[journalname] = "Journal name";
+$string[journalquestion] = "Journal question";
+$string[journalrating1] = "Not satisfactory";
+$string[journalrating2] = "Satisfactory";
+$string[journalrating3] = "Outstanding";
$string[noentry] = "No entry";
+$string[notopenuntil] = "This journal won't be open until";
+$string[notstarted] = "You have not started this journal yet";
+$string[noratinggiven] = "No rating given";
+$string[overallrating] = "Overall rating";
+$string[rate] = "Rate";
+$string[startoredit] = "Start or edit my journal entry";
+$string[viewallentries] = "View all journal entries";
?>
$string[enteremailaddress] = "Enter in your email address to reset your
password and have the new password sent to you via email.";
$string[error] = "Error";
+$string[feedback] = "Feedback";
$string[files] = "Files";
$string[firstname] = "First name";
$string[firsttime] = "Is this your first time here?";
$string[invalidlogin] = "Invalid login, please try again";
$string[invalidemail] = "Invalid email address";
$string[lastaccess] = "Last access";
+$string[lastedited] = "Last edited";
$string[lastmodified] = "Last modified";
$string[lastname] = "Last name";
$string[latestnews] = "Latest news";
$string[nothingnew] = "Nothing new since your last login";
$string[now] = "now";
$string[numberweeks] = "Number of weeks/topics";
+$string[numdays] = "\$a days";
+$string[numweeks] = "\$a weeks";
+$string[numyears] = "\$a years";
+$string[numwords] = "\$a words";
$string[ok] = "OK";
$string[opentoguests] = "Open to guests?";
$string[optional] = "optional";
$numwords = count_words($post->message);
echo "<A HREF=\"$CFG->wwwroot/mod/forum/discuss.php?d=$post->discussion\">";
echo get_string("readtherest", "forum");
- echo "</A> (".get_string("numwords", "forum", $numwords).")...";
+ echo "</A> (".get_string("numwords", "", $numwords).")...";
} else {
// Print whole message
echo text_to_html($post->message);
<TEXTAREA NAME=text COLS=60 ROWS=10 WRAP="virtual"><? p($entry->text) ?></TEXTAREA>
<P>
<INPUT type="hidden" name=id value="<?=$cm->id ?>">
-<INPUT type="submit" value="Save and continue">
-<INPUT type="reset" value="Revert">
+<INPUT type="submit" value="<? print_string("savechanges") ?>">
+<INPUT type="reset" value="<? print_string("revert") ?>">
</P>
</FORM>
</BLOCKQUOTE>
/// Otherwise fill and print the form.
+ $strjournal = get_string("modulename", "journal");
+ $strjournals = get_string("modulenameplural", "journal");
+ $stredit = get_string("edit");
+
if (! $entry ) {
$entry->text = "";
}
print_header("$course->shortname: $journal->name", "$course->fullname",
"<A HREF=/course/view.php?id=$course->id>$course->shortname</A> ->
- <A HREF=/mod/journal/index.php?id=$course->id>Journals</A> ->
- <A HREF=\"view.php?id=$cm->id\">$journal->name</A> -> Edit", "form.text");
+ <A HREF=/mod/journal/index.php?id=$course->id>$strjournals</A> ->
+ <A HREF=\"view.php?id=$cm->id\">$journal->name</A> -> $stredit", "form.text");
echo "<CENTER>\n";
$navigation = "<A HREF=\"../../course/view.php?id=$course->id\">$course->shortname</A> ->";
}
- print_header("$course->shortname: Journals", "$course->fullname", "$navigation Journals", "");
+ $strjournal = get_string("modulename", "journal");
+ $strjournals = get_string("modulenameplural", "journal");
+ $stredit = get_string("edit");
+ $strview = get_string("view");
+ $strweek = get_string("week");
+ $strtopic = get_string("topic");
+ $strquestion = get_string("question");
+ $stranswer = get_string("answer");
+
+ print_header("$course->shortname: $strjournals", "$course->fullname", "$navigation $strjournals", "");
if (! $journals = get_all_instances_in_course("journal", $course->id, "cw.section ASC")) {
$timenow = time();
if ($course->format == "weeks") {
- $table->head = array ("Week", "Question", "Answer");
+ $table->head = array ($strweek, $strquestion, $stranswer);
$table->align = array ("CENTER", "LEFT", "LEFT");
} else if ($course->format == "topics") {
- $table->head = array ("Topic", "Question", "Answer");
+ $table->head = array ($strtopic, $strquestion, $stranswer);
$table->align = array ("CENTER", "LEFT", "LEFT");
} else {
- $table->head = array ("Name", "Answer");
+ $table->head = array ($strquestion, $stranswer);
$table->align = array ("LEFT", "LEFT");
}
}
echo "<BR>";
+
print_table($table);
print_footer($course);
-
?>
<?PHP // $Id$
-$RATING = array ("3" => "Outstanding",
- "2" => "Satisfactory",
- "1" => "Not satisfactory");
+$JOURNAL_RATING = array ("3" => get_string("journalrating3", "journal"),
+ "2" => get_string("journalrating2", "journal"),
+ "1" => get_string("journalrating1", "journal") );
-function journal_user_summary($course, $user, $mod, $journal) {
- global $CFG;
-}
-
function journal_user_outline($course, $user, $mod, $journal) {
if ($entry = get_record_sql("SELECT * FROM journal_entries
$numwords = count(preg_split("/\w\b/", $entry->text)) - 1;
- $result->info = "$numwords words";
+ $result->info = get_string("numwords", "", $numwords);
$result->time = $entry->modified;
return $result;
}
print_simple_box_start();
if ($entry->modified) {
- echo "<P><FONT SIZE=1>Last edited: ".userdate($entry->modified)."</FONT></P>";
+ echo "<P><FONT SIZE=1>".get_string("lastedited").": ".userdate($entry->modified)."</FONT></P>";
}
if ($entry->text) {
echo text_to_html($entry->text);
echo "</TD>";
echo "<TD NOWRAP WIDTH=100% BGCOLOR=\"$THEME->cellheading\">$user->firstname $user->lastname";
if ($entry) {
- echo " <FONT SIZE=1>Last edited: ".userdate($entry->modified)."</FONT>";
+ echo " <FONT SIZE=1>".get_string("lastedited").": ".userdate($entry->modified)."</FONT>";
}
echo "</TR>";
if ($entry) {
echo text_to_html($entry->text);
} else {
- echo "No entry";
+ print_string("noentry", "journal");
}
echo "</TD></TR>";
$entry->teacher = $USER->id;
}
print_user_picture($entry->teacher, $course->id, $teachers[$entry->teacher]->picture);
- echo "<TD BGCOLOR=\"$THEME->cellheading\">Teacher Feedback:";
- choose_from_menu($ratings, "r$entry->id", $entry->rating, "Rate...");
+ echo "<TD BGCOLOR=\"$THEME->cellheading\">".get_string("feedback").":";
+ choose_from_menu($ratings, "r$entry->id", $entry->rating, get_string("rate", "journal")."...");
if ($entry->timemarked) {
echo " <FONT SIZE=1>".userdate($entry->timemarked)."</FONT>";
}
function journal_print_feedback($course, $entry) {
- global $CFG, $THEME, $RATING;
+ global $CFG, $THEME, $JOURNAL_RATING;
if (! $teacher = get_record("user", "id", $entry->teacher)) {
error("Weird journal error");
echo "\n<TR><TD WIDTH=100% BGCOLOR=\"$THEME->cellcontent\">";
echo "<P ALIGN=RIGHT><FONT SIZE=-1><I>";
- if ($RATING[$entry->rating]) {
- echo "Overall rating: ";
- echo $RATING[$entry->rating];
+ if ($JOURNAL_RATING[$entry->rating]) {
+ echo get_string("overallrating", "journal").": ";
+ echo $JOURNAL_RATING[$entry->rating];
} else {
- echo "No rating given";
+ print_string("noratinggiven");
}
echo "</I></FONT></P>";
<form name="form" method="post" action="<?=$ME ?>">
<table cellpadding=5>
<tr valign=top>
- <td align=right><P><B>Journal Name:</B></P></TD>
+ <td align=right><P><B><? print_string("journalname", "journal") ?>:</B></P></TD>
<td>
<input type="text" name="name" size=30 value="<? p($form->name) ?>">
</td>
</tr>
<tr valign=top>
- <td align=right><P><B>Journal Question:</B></P></TD>
+ <td align=right><P><B><? print_string("journalquestion", "journal") ?>:</B></P></TD>
<td>
<textarea name="intro" rows=15 cols=30 wrap="virtual"><? p($form->intro) ?></textarea>
</td>
</tr>
<tr valign=top>
- <TD align=right><P><B>Days available:</B></P></TD>
+ <TD align=right><P><B><? print_string("daysavailable", "journal") ?>:</B></P></TD>
<TD>
<?
$options = array();
- $options[0] = "Always open";
+ $options[0] = get_string("alwaysopen", "journal");
for ($i=1;$i<=13;$i++) {
- $options[$i] = "$i days";
+ $options[$i] = get_string("numdays", "", $i);
}
for ($i=2;$i<=16;$i++) {
$days = $i * 7;
- $options[$days] = "$i weeks";
+ $options[$days] = get_string("numweeks", "", $i);
}
- $options[365] = "1 year";
+ $options[365] = get_string("numweeks", "", 52);
if ($form->days == "") {
$form->days == "14";
}
if ($usersdone = journal_get_users_done($journal)) {
foreach ($usersdone as $user) {
$entry = $entrybyuser[$user->id];
- journal_print_user_entry($course, $user, $entry, $teachers, $RATING);
+ journal_print_user_entry($course, $user, $entry, $teachers, $JOURNAL_RATING);
}
}
foreach ($users as $user) {
if (! $usersdone[$user->id]) {
$entry = NULL;
- journal_print_user_entry($course, $user, $entry, $teachers, $RATING);
+ journal_print_user_entry($course, $user, $entry, $teachers, $JOURNAL_RATING);
}
}
echo "<CENTER>";
if ($course->category) {
$navigation = "<A HREF=\"../../course/view.php?id=$course->id\">$course->shortname</A> ->";
}
+
+ $strjournal = get_string("modulename", "journal");
+ $strjournals = get_string("modulenameplural", "journal");
+
print_header("$course->shortname: $journal->name", "$course->fullname",
- "$navigation <A HREF=index.php?id=$course->id>Journals</A> -> $journal->name", "", "", true,
+ "$navigation <A HREF=index.php?id=$course->id>$strjournals</A> -> $journal->name", "", "", true,
update_module_icon($cm->id, $course->id));
if (isteacher($course->id)) {
- echo "<P align=right><A HREF=\"report.php?id=$cm->id\">View all responses</A></P>";
+ echo "<P align=right><A HREF=\"report.php?id=$cm->id\">".get_string("viewallentries","journal")."</A></P>";
}
echo "<CENTER>\n";
if ($timenow < $timefinish) {
$options = array ("id" => "$cm->id");
echo "<CENTER>";
- print_single_button("edit.php", $options, "Start or edit my journal entry");
+ print_single_button("edit.php", $options, get_string("startoredit","journal"));
echo "</CENTER>";
}
WHERE user='$USER->id' AND journal='$journal->id'")) {
if (empty($entry->text)) {
- echo "<P ALIGN=center><B>Blank entry</B></P>";
+ echo "<P ALIGN=center><B>".get_string("blankentry","journal")."</B></P>";
} else {
echo text_to_html($entry->text);
}
} else {
- echo "<B><I>You have not started this journal yet.</I></B>";
+ echo "<B><I>".get_string("notstarted","journal")."</I></B>";
}
print_simple_box_end();
if ($timenow < $timefinish) {
if ($entry->modified) {
- echo "<P><FONT SIZE=-2><B>Last edited:</B> ";
+ echo "<P><FONT SIZE=-2><B>".get_string("lastedited").":</B> ";
echo userdate($entry->modified);
- echo " (".count_words($entry->text)." words)";
+ echo " (".get_string("numwords", "", count_words($entry->text)).")";
echo "</FONT></P>";
}
if ($journal->days) {
- echo "<P><FONT SIZE=-2><B>Editing period ends:</B> ";
+ echo "<P><FONT SIZE=-2><B>".get_string("editingends", "journal").":</B> ";
echo userdate($timefinish)."</FONT></P>";
}
} else {
- echo "<P><FONT SIZE=-2><B>Editing period has ended:</B> ";
+ echo "<P><FONT SIZE=-2><B>".get_string("editingended", "journal").":</B> ";
echo userdate($timefinish)."</P>";
}
if ($entry->comment || $entry->rating) {
- print_heading("Feedback");
+ print_heading(get_string("feedback"));
journal_print_feedback($course, $entry);
}
} else {
- echo "<P><B>This journal won't be open until: ";
+ echo "<P><B>".get_string("notopenuntil", "journal").": ";
echo userdate($timestart)."</B></P>";
}