From 59c711517766bcbd4c5efad40175f18b43ba35e7 Mon Sep 17 00:00:00 2001 From: moodler Date: Fri, 20 Feb 2004 02:29:30 +0000 Subject: [PATCH] FIxed bug with forced languages by moving string definitions --- mod/forum/view.php | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/mod/forum/view.php b/mod/forum/view.php index 82a3fd12a4d..605feb77e98 100644 --- a/mod/forum/view.php +++ b/mod/forum/view.php @@ -10,9 +10,6 @@ optional_variable($showall, ""); // show all discussions on one page optional_variable($group, -1); // choose the current group - $strforums = get_string("modulenameplural", "forum"); - $strforum = get_string("modulename", "forum"); - if ($id) { if (! $cm = get_record("course_modules", "id", $id)) { error("Course Module ID was incorrect"); @@ -23,6 +20,10 @@ if (! $forum = get_record("forum", "id", $cm->instance)) { error("Forum ID was incorrect"); } + + $strforums = get_string("modulenameplural", "forum"); + $strforum = get_string("modulename", "forum"); + $buttontext = update_module_button($cm->id, $course->id, $strforum); } else if ($f) { @@ -32,6 +33,10 @@ if (! $course = get_record("course", "id", $forum->course)) { error("Forum is misconfigured - don't know what course it's from"); } + + $strforums = get_string("modulenameplural", "forum"); + $strforum = get_string("modulename", "forum"); + if ($cm = get_coursemodule_from_instance("forum", $forum->id, $course->id)) { $buttontext = update_module_button($cm->id, $course->id, $strforum); } else {