From: moodler Date: Wed, 16 Oct 2002 04:51:55 +0000 (+0000) Subject: Cleaned up some buttons ... X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=09aebc94689798bc0f790cc31c8c2e2d9835a05f;p=moodle.git Cleaned up some buttons ... --- diff --git a/mod/assignment/mod.html b/mod/assignment/mod.html index 2bc1ff30b9..fcab3f18d3 100644 --- a/mod/assignment/mod.html +++ b/mod/assignment/mod.html @@ -66,5 +66,6 @@ "> +"> diff --git a/mod/assignment/submissions.php b/mod/assignment/submissions.php index cb780c151f..7da71fa52d 100644 --- a/mod/assignment/submissions.php +++ b/mod/assignment/submissions.php @@ -33,7 +33,7 @@ print_header("$course->shortname: $assignment->name", "$course->fullname", "$navigation id>$strassignments -> id\">$assignment->name -> $strsubmissions", - "", "", true, update_module_icon($cm->id, $course->id)); + "", "", true); // Some easy ways to reference submissions if ($submissions = assignment_get_all_submissions($assignment)) { diff --git a/mod/assignment/view.php b/mod/assignment/view.php index f2431d92ab..32b22cbc53 100644 --- a/mod/assignment/view.php +++ b/mod/assignment/view.php @@ -44,7 +44,7 @@ print_header("$course->shortname: $assignment->name", "$course->fullname", "$navigation id>$strassignments -> $assignment->name", - "", "", true, update_module_icon($cm->id, $course->id)); + "", "", true, update_module_button($cm->id, $course->id, $strassignment)); if (isteacher($course->id)) { if ($submissions = assignment_get_all_submissions($assignment)) { diff --git a/mod/choice/mod.html b/mod/choice/mod.html index bf8a1b4d20..fb6db2a84f 100644 --- a/mod/choice/mod.html +++ b/mod/choice/mod.html @@ -73,5 +73,6 @@ "> +"> diff --git a/mod/choice/view.php b/mod/choice/view.php index db0e96043c..e1d842e408 100644 --- a/mod/choice/view.php +++ b/mod/choice/view.php @@ -59,7 +59,7 @@ } print_header("$course->shortname: $choice->name", "$course->fullname", "$navigation id>$strchoices -> $choice->name", "", "", true, - update_module_icon($cm->id, $course->id)); + update_module_button($cm->id, $course->id, $strchoice)); if (isteacher($course->id)) { if ( $allanswers = get_records("choice_answers", "choice", $choice->id)) { diff --git a/mod/forum/discuss.php b/mod/forum/discuss.php index 2aa2a876ab..109000a7da 100644 --- a/mod/forum/discuss.php +++ b/mod/forum/discuss.php @@ -54,19 +54,13 @@ $navmiddle = "id\">".get_string("forums", "forum")." -> id\">$forum->name"; - if ($cm->id) { - $updatebutton = update_module_icon($cm->id, $course->id); - } else { - $updatebutton = ""; - } - if ($course->category) { print_header("$course->shortname: $discussion->name", "$course->fullname", "id>$course->shortname -> - $navmiddle -> $navtail", "", "", true, $updatebutton); + $navmiddle -> $navtail", "", "", true); } else { print_header("$course->shortname: $discussion->name", "$course->fullname", - "$navmiddle -> $navtail", "", "", true, $updatebutton); + "$navmiddle -> $navtail", "", "", true); } forum_print_discussion($course, $forum, $discussion, $post, $displaymode); diff --git a/mod/forum/mod.html b/mod/forum/mod.html index d206ee08b0..0016350d50 100644 --- a/mod/forum/mod.html +++ b/mod/forum/mod.html @@ -64,5 +64,6 @@ "> +"> diff --git a/mod/forum/view.php b/mod/forum/view.php index 587169fec8..befd2d4be3 100644 --- a/mod/forum/view.php +++ b/mod/forum/view.php @@ -8,6 +8,9 @@ optional_variable($mode); // Display mode (for single forum) + $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"); @@ -18,7 +21,7 @@ if (! $forum = get_record("forum", "id", $cm->instance)) { error("Forum ID was incorrect"); } - $buttontext = update_module_icon($cm->id, $course->id); + $buttontext = update_module_button($cm->id, $course->id, $strforum); } else if ($f) { if (! $forum = get_record("forum", "id", $f)) { @@ -28,7 +31,7 @@ error("Forum is misconfigured - don't know what course it's from"); } if ($cm = get_coursemodule_from_instance("forum", $forum->id, $course->id)) { - $buttontext = update_module_icon($cm->id, $course->id); + $buttontext = update_module_button($cm->id, $course->id, $strforum); } else { $buttontext = ""; } @@ -37,7 +40,6 @@ error("Must specify a course module or a forum ID"); } - $strforums = get_string("modulenameplural", "forum"); if ($course->category) { require_login($course->id); diff --git a/mod/journal/mod.html b/mod/journal/mod.html index 72f0688ef7..c624401cd5 100644 --- a/mod/journal/mod.html +++ b/mod/journal/mod.html @@ -44,5 +44,6 @@ "> - +"> + diff --git a/mod/journal/view.php b/mod/journal/view.php index 6f2eb22930..b4839eb917 100644 --- a/mod/journal/view.php +++ b/mod/journal/view.php @@ -34,7 +34,7 @@ print_header("$course->shortname: $journal->name", "$course->fullname", "$navigation id>$strjournals -> $journal->name", "", "", true, - update_module_icon($cm->id, $course->id)); + update_module_button($cm->id, $course->id, $strjournal)); if (isteacher($course->id)) { if ($allentries = get_records("journal_entries", "journal", $journal->id)) { diff --git a/mod/quiz/view.php b/mod/quiz/view.php index 1918955454..eca66b1692 100644 --- a/mod/quiz/view.php +++ b/mod/quiz/view.php @@ -51,7 +51,7 @@ print_header("$course->shortname: $quiz->name", "$course->fullname", "$navigation id>$strquizzes -> $quiz->name", - "", "", true, update_module_icon($cm->id, $course->id)); + "", "", true, update_module_button($cm->id, $course->id, $strquiz)); if (isteacher($course->id)) { if ($allanswers = get_records("quiz_grades", "quiz", $quiz->id)) { diff --git a/mod/survey/mod.html b/mod/survey/mod.html index 78dd2856d2..c5b6a30153 100644 --- a/mod/survey/mod.html +++ b/mod/survey/mod.html @@ -32,5 +32,6 @@ "> +"> diff --git a/mod/survey/view.php b/mod/survey/view.php index 6e2f79e780..16a9aed5ad 100644 --- a/mod/survey/view.php +++ b/mod/survey/view.php @@ -24,10 +24,11 @@ } $strsurveys = get_string("modulenameplural", "survey"); + $strsurvey = get_string("modulename", "survey"); print_header("$course->shortname: $survey->name", "$course->fullname", "$navigation id>$strsurveys -> $survey->name", "", "", true, - update_module_icon($cm->id, $course->id)); + update_module_button($cm->id, $course->id, $strsurvey)); if (isteacher($course->id)) { $numusers = survey_count_responses($survey->id);