From: moodler Date: Fri, 13 Dec 2002 09:06:30 +0000 (+0000) Subject: New consistent help buttons for textarea fields throughout all modules X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=7be475f601b4b9eb3a21ec106238d553dbcb0be5;p=moodle.git New consistent help buttons for textarea fields throughout all modules --- diff --git a/lang/en/forum.php b/lang/en/forum.php index fedd7cc378..b138b6e12d 100644 --- a/lang/en/forum.php +++ b/lang/en/forum.php @@ -40,6 +40,8 @@ $string['forums'] = "Forums"; $string['forumtype'] = "Forum type"; $string['generalforum'] = "Standard forum for general use"; $string['generalforums'] = "General forums"; +$string['helpreading'] = "Read carefully"; +$string['generalforums'] = "General forums"; $string['inforum'] = "in \$a"; $string['intronews'] = "General news and announcements"; $string['introsocial'] = "An open forum for chatting about anything you want to"; @@ -74,19 +76,19 @@ $string['postincontext'] = "See this post in context"; $string['postmailinfo'] = "This is a copy of a message posted on the \$a website. To add your reply via the website, click on this link:"; -$string['postingtip'] = "Posting tips: +$string['postingtip'] = "Posting tips:
When replying: - + While writing: -"; +"; $string['postrating1'] = "Shows mostly SEPARATE knowing"; $string['postrating2'] = "Equally separate and connected"; diff --git a/lang/en/moodle.php b/lang/en/moodle.php index 76d06a9f90..fc901203ea 100644 --- a/lang/en/moodle.php +++ b/lang/en/moodle.php @@ -213,9 +213,11 @@ $string['guestuserinfo'] = "This user is a special user that allows read-only ac $string['help'] = "Help"; $string['helphtml'] = "How to write html"; $string['helppicture'] = "How to upload a picture"; +$string['helpreading'] = "Read carefully"; $string['helptext'] = "How to write text"; $string['helprichtext'] = "About the Richtext HTML editor"; -$string['helpquestions'] = "How to ask questions"; +$string['helpquestions'] = "Ask good questions"; +$string['helpwriting'] = "Write carefully"; $string['hide'] = "Hide"; $string['hits'] = "Hits"; $string['hitsoncourse'] = "Hits on \$a->coursename by \$a->username"; diff --git a/lib/moodlelib.php b/lib/moodlelib.php index bc923bb5a5..3404ae4b59 100644 --- a/lib/moodlelib.php +++ b/lib/moodlelib.php @@ -674,11 +674,11 @@ function error ($message, $link="") { die; } -function helpbutton ($page, $title="", $module="moodle", $image=true, $text="") { +function helpbutton ($page, $title="", $module="moodle", $image=true, $linktext=false, $text="") { // $page = the keyword that defines a help page // $title = the title of links, rollover tips, alt tags etc // $module = which module is the page defined in - // $image = use a help image for the link? (otherwise uses text) + // $image = use a help image for the link? (true/false/"both") // $text = if defined then this text is used in the page, and // the $page variable is ignored. global $CFG; @@ -686,13 +686,18 @@ function helpbutton ($page, $title="", $module="moodle", $image=true, $text="") if ($module == "") { $module = "moodle"; } + if ($image) { - $linkobject = "\"$title\"wwwroot/pix/help.gif\">"; + if ($linktext) { + $linkobject = "$title\"\"wwwroot/pix/help.gif\">"; + } else { + $linkobject = "\"$title\"wwwroot/pix/help.gif\">"; + } } else { $linkobject = $title; } if ($text) { - $url = "/help.php?module=$module&text=$text"; + $url = "/help.php?module=$module&text=".htmlentities(urlencode($text)); } else { $url = "/help.php?module=$module&file=$page.html"; } diff --git a/mod/assignment/mod.html b/mod/assignment/mod.html index 5837c09238..630784b306 100644 --- a/mod/assignment/mod.html +++ b/mod/assignment/mod.html @@ -17,16 +17,21 @@ -

:

+

:

+ +
+
+ + + + +
+
+ description); - if ($usehtmleditor) { - helpbutton("richtext", get_string("helprichtext")); - } else { - helpbutton("text", get_string("helptext")); - } echo "

"; print_string("formattexttype"); echo ": "; diff --git a/mod/choice/mod.html b/mod/choice/mod.html index fb6db2a84f..240ff53759 100644 --- a/mod/choice/mod.html +++ b/mod/choice/mod.html @@ -10,10 +10,15 @@ -

:

+

:

+ +
+
+
+
+ - diff --git a/mod/forum/mod.html b/mod/forum/mod.html index 68472fe154..1d6009df84 100644 --- a/mod/forum/mod.html +++ b/mod/forum/mod.html @@ -30,10 +30,15 @@ -

:

+

:

+ +
+
+
+
+ - diff --git a/mod/forum/post.html b/mod/forum/post.html index dd34237240..49c40d549d 100644 --- a/mod/forum/post.html +++ b/mod/forum/post.html @@ -1,63 +1,68 @@
enctype="multipart/form-data"> - - - +

:

+ + - + + + - - + - - - + - - - + + + + + + + -

:

-   +

+ : +

+ message); ?>

: +

+ + +
+
+
-

+ -

- -
- message); ?> - - - -
-
+ +
+ +

:

:

format, ""); ?> - -   +

:
()

- +


():

+ - -

- - - - - - +
+ + + + + + "> -
-
+ action="edit.php"> - text); ?> + + +
+ +
+
+ + + + +
+
+
- +text); ?>

shortname: $journal->name", "$course->fullname", - "id>$course->shortname -> - id>$strjournals -> + "wwwroot/course/view.php?id=$course->id\">$course->shortname -> + id\">$strjournals -> id\">$journal->name -> $stredit", "form.text", "", true, "", navmenu($course, $cm)); diff --git a/mod/journal/mod.html b/mod/journal/mod.html index c624401cd5..5e5f9c5594 100644 --- a/mod/journal/mod.html +++ b/mod/journal/mod.html @@ -7,7 +7,13 @@ -

:

+

:

+ +
+
+
+ + diff --git a/mod/resource/details.php b/mod/resource/details.php index 5d7bd9256c..d63dda078f 100644 --- a/mod/resource/details.php +++ b/mod/resource/details.php @@ -129,8 +129,11 @@ ?> -

:

-
+

:


+ +
+
+
@@ -144,12 +147,15 @@ ?> -

:

- -
- -
- +

:


+ +
+
+
alltext); ?> diff --git a/mod/resource/mod.html b/mod/resource/mod.html index d0c1b0dba0..10608f196c 100644 --- a/mod/resource/mod.html +++ b/mod/resource/mod.html @@ -22,10 +22,15 @@ -

:

+

:

+ +
+
+
+
+ -