From: Petr Skoda Date: Wed, 30 Dec 2009 15:19:55 +0000 (+0000) Subject: MDL-21217, MDL-21198 simplified/improved outputlib help icon related apis + several... X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=4bcc51185cf554a5beef08298b116d42fb5a5783;p=moodle.git MDL-21217, MDL-21198 simplified/improved outputlib help icon related apis + several fixed regresions --- diff --git a/admin/index.php b/admin/index.php index 46c4bd4ab7..1fe7be1d1c 100644 --- a/admin/index.php +++ b/admin/index.php @@ -380,7 +380,7 @@ if (defined('WARN_DISPLAY_ERRORS_ENABLED')) { $lastcron = $DB->get_field_sql('SELECT MAX(lastcron) FROM {modules}'); if (time() - $lastcron > 3600 * 24) { $strinstallation = get_string('installation', 'install'); - $helpbutton = $OUTPUT->help_icon(moodle_help_icon::make('install', $strinstallation)); + $helpbutton = $OUTPUT->help_icon('install', $strinstallation); echo $OUTPUT->box(get_string('cronwarning', 'admin').' '.$helpbutton, 'generalbox adminwarning'); } diff --git a/admin/lang.php b/admin/lang.php index b80df3dd60..f1d04684c1 100644 --- a/admin/lang.php +++ b/admin/lang.php @@ -496,7 +496,7 @@ $select->nothinglabel = $strchoosefiletoedit; $select->set_label($selectionlabel); echo $OUTPUT->select($select); - echo $OUTPUT->help_icon(moodle_help_icon::make('langswitchstorage', $strfilestoredinhelp)); + echo $OUTPUT->help_icon('langswitchstorage', $strfilestoredinhelp); echo $OUTPUT->box_end(); if ($currentfile <> '') { @@ -763,7 +763,7 @@ $select->nothinglabel = $strchoosefiletoedit; $select->set_label($selectionlabel); echo $OUTPUT->select($select); - echo $OUTPUT->help_icon(moodle_help_icon::make('langswitchstorage', $strfilestoredinhelp)); + echo $OUTPUT->help_icon('langswitchstorage', $strfilestoredinhelp); echo $OUTPUT->box_end(); if (!empty($currentfile)) { @@ -812,11 +812,11 @@ echo '
'; if ($uselocal) { - $strsavetotitle = $strlanglocalpackage . $OUTPUT->help_icon(moodle_help_icon::make('langpackages', $strlanglocalpackage)); - $straltdirtitle = $strlangmasterpackage . $OUTPUT->help_icon(moodle_help_icon::make('langpackages', $strlangmasterpackage)); + $strsavetotitle = $strlanglocalpackage . $OUTPUT->help_icon('langpackages', $strlanglocalpackage); + $straltdirtitle = $strlangmasterpackage . $OUTPUT->help_icon('langpackages', $strlangmasterpackage); } else { - $straltdirtitle = $strlanglocalpackage . $OUTPUT->help_icon(moodle_help_icon::make('langpackages', $strlanglocalpackage)); - $strsavetotitle = $strlangmasterpackage . $OUTPUT->help_icon(moodle_help_icon::make('langpackages', $strlangmasterpackage)); + $straltdirtitle = $strlanglocalpackage . $OUTPUT->help_icon('langpackages', $strlanglocalpackage); + $strsavetotitle = $strlangmasterpackage . $OUTPUT->help_icon('langpackages', $strlangmasterpackage); } @@ -876,7 +876,7 @@ } if (is_readable($ensrc)) { echo '
'.$strlangmasterenglish; - echo $OUTPUT->help_icon(moodle_help_icon::make('langpackages', $strlangmasterenglish)); + echo $OUTPUT->help_icon('langpackages', $strlangmasterenglish); echo ''; echo "
\n

'; echo '

' . $strpublishstate; -echo $OUTPUT->help_icon(moodle_help_icon::make('status', $strpublishstate, 'notes')); +echo $OUTPUT->help_icon('status', $strpublishstate, 'notes'); echo $OUTPUT->select(html_select::make($state_names, 'state', empty($state) ? NOTES_STATE_PUBLIC : $state, false)); echo '

'; diff --git a/user/groupextendenrol.php b/user/groupextendenrol.php index dd11fe4a23..360526b7b4 100755 --- a/user/groupextendenrol.php +++ b/user/groupextendenrol.php @@ -134,7 +134,7 @@ if($course->enrollable == 2) { } $title = get_string('groupextendenrol'); -echo $OUTPUT->heading($title . $OUTPUT->help_icon(moodle_help_icon::make('groupextendenrol', $title))); +echo $OUTPUT->heading($title . $OUTPUT->help_icon('groupextendenrol', $title)); echo '
'; echo ''; echo ''; diff --git a/user/index.php b/user/index.php index e9f5a5557a..f4f5bd8993 100644 --- a/user/index.php +++ b/user/index.php @@ -988,7 +988,7 @@ $displaylist['groupextendenrol.php'] = get_string('groupextendenrol'); } - echo $OUTPUT->help_icon(moodle_help_icon::make("participantswithselectedusers", get_string("withselectedusers"))); + echo $OUTPUT->help_icon("participantswithselectedusers", get_string("withselectedusers")); $select = new html_select(); $select->options = $displaylist; $select->name = "formaction"; diff --git a/user/message.html b/user/message.html index 05ac9e5ed6..849a3b4edf 100644 --- a/user/message.html +++ b/user/message.html @@ -15,16 +15,17 @@ help_icon(moodle_help_icon::make("reading", get_string("helpreading"), "moodle", true)); + //TODO: replace by new editor stuff! + echo $OUTPUT->help_icon("reading", get_string("helpreading"), "moodle", true); echo "
"; - echo $OUTPUT->help_icon(moodle_help_icon::make("writing", get_string("helpwriting"), "moodle", true)); + echo $OUTPUT->help_icon("writing", get_string("helpwriting"), "moodle", true); echo "
"; - echo $OUTPUT->help_icon(moodle_help_icon::make("questions", get_string("helpquestions"), "moodle", true)); + echo $OUTPUT->help_icon("questions", get_string("helpquestions"), "moodle", true); echo "
"; if ($usehtmleditor) { - echo $OUTPUT->help_icon(moodle_help_icon::make("richtext2", get_string("helprichtext"), "moodle", true)); + echo $OUTPUT->help_icon("richtext2", get_string("helprichtext"), "moodle", true); } else { - emoticonhelpbutton("theform", "message"); + //emoticonhelpbutton("theform", "message"); to be replaced by new editor stuff } ?>
@@ -41,7 +42,7 @@ } else { choose_from_menu(format_text_menu(), "format", $format, ""); } - echo $OUTPUT->help_icon(moodle_help_icon::make("textformat", get_string("helpformatting"))); + echo $OUTPUT->help_icon("textformat", get_string("helpformatting")); ?>