Skip to content
Browse files

Cleaned up some buttons ...

  • Loading branch information...
1 parent 92a3c88 commit 09aebc94689798bc0f790cc31c8c2e2d9835a05f moodler committed Oct 16, 2002
View
1 mod/assignment/mod.html
@@ -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>
View
2 mod/assignment/submissions.php
@@ -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)) {
View
2 mod/assignment/view.php
@@ -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)) {
View
1 mod/choice/mod.html
@@ -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>
View
2 mod/choice/view.php
@@ -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)) {
View
10 mod/forum/discuss.php
@@ -54,19 +54,13 @@
$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);
View
1 mod/forum/mod.html
@@ -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>
View
8 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);
View
3 mod/journal/mod.html
@@ -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>
View
2 mod/journal/view.php
@@ -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)) {
View
2 mod/quiz/view.php
@@ -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)) {
View
1 mod/survey/mod.html
@@ -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>
View
3 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 <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);

0 comments on commit 09aebc9

Please sign in to comment.
Something went wrong with that request. Please try again.