]> git.mjollnir.org Git - moodle.git/commitdiff
Cleaned up some buttons ...
authormoodler <moodler>
Wed, 16 Oct 2002 04:51:55 +0000 (04:51 +0000)
committermoodler <moodler>
Wed, 16 Oct 2002 04:51:55 +0000 (04:51 +0000)
13 files changed:
mod/assignment/mod.html
mod/assignment/submissions.php
mod/assignment/view.php
mod/choice/mod.html
mod/choice/view.php
mod/forum/discuss.php
mod/forum/mod.html
mod/forum/view.php
mod/journal/mod.html
mod/journal/view.php
mod/quiz/view.php
mod/survey/mod.html
mod/survey/view.php

index 2bc1ff30b9bb0a0b72d17aeedd784f2531e4aaf7..fcab3f18d395a3365da311591293293d031b6403 100644 (file)
@@ -66,5 +66,6 @@
 <input type="hidden" name=instance   value="<? p($form->instance) ?>">
 <input type="hidden" name=mode       value="<? p($form->mode) ?>">
 <input type="submit" value="<? print_string("savechanges") ?>">
+<input type="submit" name=cancel value="<? print_string("cancel") ?>">
 </CENTER>
 </FORM>
index cb780c151fdefc768acfb60ae55dcb2b2f995f9f..7da71fa52d3d02eb772c85f5328540d032339877 100644 (file)
@@ -33,7 +33,7 @@
     print_header("$course->shortname: $assignment->name", "$course->fullname",
                  "$navigation <A HREF=index.php?id=$course->id>$strassignments</A> -> 
                   <A HREF=\"view.php?a=$assignment->id\">$assignment->name</A> -> $strsubmissions", 
-                  "", "", true, update_module_icon($cm->id, $course->id));
+                  "", "", true);
 
     // Some easy ways to reference submissions
     if ($submissions = assignment_get_all_submissions($assignment)) {
index f2431d92abc2a297225b573f85c3f281c03400c8..32b22cbc539c8998e380b3708148424b3b195860 100644 (file)
@@ -44,7 +44,7 @@
 
     print_header("$course->shortname: $assignment->name", "$course->fullname",
                  "$navigation <A HREF=index.php?id=$course->id>$strassignments</A> -> $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)) {
index bf8a1b4d2018e64b6fb6bdcacb78bb5d68cbc101..fb6db2a84ff3fe900de9238603813bcd25be3a2b 100644 (file)
@@ -73,5 +73,6 @@
 <input type="hidden" name=instance   value="<? p($form->instance) ?>">
 <input type="hidden" name=mode       value="<? p($form->mode) ?>">
 <input type="submit" value="<? print_string("savechanges") ?>">
+<input type="submit" name=cancel value="<? print_string("cancel") ?>">
 </CENTER>
 </FORM>
index db0e96043c9c401c39d05027bfa535af037c9124..e1d842e408cedc3425b759e499bc937284257b99 100644 (file)
@@ -59,7 +59,7 @@
     }
     print_header("$course->shortname: $choice->name", "$course->fullname",
                  "$navigation <A HREF=index.php?id=$course->id>$strchoices</A> -> $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)) {
index 2aa2a876abe259cce3c30dcb88d95802f5428484..109000a7da9c0856158bbb4d32eb54e5c74a10e8 100644 (file)
 
     $navmiddle = "<A HREF=\"../forum/index.php?id=$course->id\">".get_string("forums", "forum")."</A> -> <A HREF=\"../forum/view.php?f=$forum->id\">$forum->name</A>";
 
-    if ($cm->id) {
-        $updatebutton = update_module_icon($cm->id, $course->id);
-    } else {
-        $updatebutton = "";
-    }
-
     if ($course->category) {
         print_header("$course->shortname: $discussion->name", "$course->fullname",
                  "<A HREF=../../course/view.php?id=$course->id>$course->shortname</A> ->
-                  $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);
index d206ee08b0bf178aa4b4e4321eab05965986046d..0016350d50db444b6cca03b9963ea71c128e15fd 100644 (file)
@@ -64,5 +64,6 @@
 <input type="hidden" name=instance   value="<? p($form->instance) ?>">
 <input type="hidden" name=mode       value="<? p($form->mode) ?>">
 <input type="submit" value="<? print_string("savechanges") ?>">
+<input type="submit" name=cancel value="<? print_string("cancel") ?>">
 </CENTER>
 </FORM>
index 587169fec85e40b12e3fd52f8abe7c6bf6d5701c..befd2d4be379fa1eed41c997c85d1822e907c18e 100644 (file)
@@ -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);
index 72f0688ef7a832ea359b577c4ee880a784784ebe..c624401cd55221b81fbea5067d1b5addb176ecb5 100644 (file)
@@ -44,5 +44,6 @@
 <input type="hidden" name=instance   value="<? p($form->instance) ?>">
 <input type="hidden" name=mode       value="<? p($form->mode) ?>">
 <input type="submit" value="<? print_string("savechanges") ?>">
-</CENTER>
+<input type="submit" name=cancel value="<? print_string("cancel") ?>">
 </FORM>
+</CENTER>
index 6f2eb229309983e1f61e08b434d1834334451fb9..b4839eb9179789ac0ed572ef304a0052e2c04d21 100644 (file)
@@ -34,7 +34,7 @@
 
     print_header("$course->shortname: $journal->name", "$course->fullname",
                  "$navigation <A HREF=index.php?id=$course->id>$strjournals</A> -> $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)) {
index 191895545453e06c0a154e49565df38794c938d7..eca66b1692aa556e46f9070834f57782eb2b0840 100644 (file)
@@ -51,7 +51,7 @@
 
     print_header("$course->shortname: $quiz->name", "$course->fullname",
                  "$navigation <A HREF=index.php?id=$course->id>$strquizzes</A> -> $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)) {
index 78dd2856d27f6d990748729d3937f1de5c4cfd2d..c5b6a301533d881c2ca31a641d1e5fed89e007ad 100644 (file)
@@ -32,5 +32,6 @@
 <input type="hidden" name=instance   value="<? p($form->instance) ?>">
 <input type="hidden" name=mode       value="<? p($form->mode) ?>">
 <input type="submit" value="<? print_string("savechanges") ?>">
+<input type="submit" name=cancel value="<? print_string("cancel") ?>">
 </CENTER>
 </FORM>
index 6e2f79e78063dba2fc83cbc0a4608ffd8e74afba..16a9aed5add83473280021b37c9a7f596d01bb34 100644 (file)
     }
 
     $strsurveys = get_string("modulenameplural", "survey");
+    $strsurvey = get_string("modulename", "survey");
 
     print_header("$course->shortname: $survey->name", "$course->fullname",
                  "$navigation <A HREF=index.php?id=$course->id>$strsurveys</A> -> $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);