mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 00:16:46 +02:00
MDL-21217, MDL-21198 simplified/improved outputlib help icon related apis + several fixed regresions
This commit is contained in:
parent
48a67d9f01
commit
4bcc51185c
113 changed files with 442 additions and 970 deletions
|
@ -100,8 +100,8 @@ echo '<input type="hidden" name="sesskey" value="'.sesskey().'" />';
|
|||
echo '</fieldset>';
|
||||
$table = new html_table();
|
||||
$table->head = array (get_string('fullname'),
|
||||
get_string('content', 'notes') . $OUTPUT->help_icon(moodle_help_icon::make('writing', get_string('helpwriting'))),
|
||||
get_string('publishstate', 'notes') . $OUTPUT->help_icon(moodle_help_icon::make('status', get_string('publishstate', 'notes'), 'notes')),
|
||||
get_string('content', 'notes') . $OUTPUT->help_icon('writing', get_string('helpwriting')),
|
||||
get_string('publishstate', 'notes') . $OUTPUT->help_icon('status', get_string('publishstate', 'notes'), 'notes'),
|
||||
);
|
||||
$table->align = array ('left', 'center', 'center');
|
||||
$state_names = note_get_state_names();
|
||||
|
|
|
@ -138,7 +138,7 @@ if($course->enrollable == 2) {
|
|||
}
|
||||
|
||||
$title = get_string('extendenrol');
|
||||
echo $OUTPUT->heading($title . $OUTPUT->help_icon(moodle_help_icon::make('extendenrol', $title)));
|
||||
echo $OUTPUT->heading($title . $OUTPUT->help_icon('extendenrol', $title));
|
||||
echo "<form method=\"post\" action=\"extendenrol.php\">\n";
|
||||
echo '<input type="hidden" name="id" value="'.$course->id.'" />';
|
||||
echo '<input type="hidden" name="sesskey" value="'.sesskey().'" />';
|
||||
|
|
|
@ -47,7 +47,7 @@ class user_filter_courserole extends user_filter_type {
|
|||
$objs[] =& $mform->createElement('select', $this->_name .'_ct', null, $this->get_course_categories());
|
||||
$objs[] =& $mform->createElement('text', $this->_name, null);
|
||||
$grp =& $mform->addElement('group', $this->_name.'_grp', $this->_label, $objs, '', false);
|
||||
$grp->setHelpButton(array('courserole', $this->_label, 'filters'));
|
||||
$mform->setHelpButton($this->_name.'_grp', array('courserole', $this->_label, 'filters'));
|
||||
if ($this->_advanced) {
|
||||
$mform->setAdvanced($this->_name.'_grp');
|
||||
}
|
||||
|
|
|
@ -38,7 +38,7 @@ class user_filter_date extends user_filter_type {
|
|||
$objs[] = & $mform->createElement('checkbox', $this->_name.'_never', null, get_string('includenever', 'filters'));
|
||||
|
||||
$grp =& $mform->addElement('group', $this->_name.'_grp', $this->_label, $objs, '', false);
|
||||
$grp->setHelpButton(array('date',$this->_label,'filters'));
|
||||
$mform->setHelpButton($this->_name.'_grp', array('date',$this->_label,'filters'));
|
||||
|
||||
if ($this->_advanced) {
|
||||
$mform->setAdvanced($this->_name.'_grp');
|
||||
|
|
|
@ -33,7 +33,7 @@ class user_filter_globalrole extends user_filter_type {
|
|||
*/
|
||||
function setupForm(&$mform) {
|
||||
$obj =& $mform->addElement('select', $this->_name, $this->_label, $this->get_roles());
|
||||
$obj->setHelpButton(array('globalrole', $this->_label, 'filters'));
|
||||
$mform->setHelpButton($this->_name, array('globalrole', $this->_label, 'filters'));
|
||||
$mform->setDefault($this->_name, 0);
|
||||
if ($this->_advanced) {
|
||||
$mform->setAdvanced($this->_name);
|
||||
|
|
|
@ -62,7 +62,7 @@ class user_filter_profilefield extends user_filter_type {
|
|||
$objs[] =& $mform->createElement('select', $this->_name.'_op', null, $this->get_operators());
|
||||
$objs[] =& $mform->createElement('text', $this->_name, null);
|
||||
$grp =& $mform->addElement('group', $this->_name.'_grp', $this->_label, $objs, '', false);
|
||||
$grp->setHelpButton(array('profilefield',$this->_label,'filters'));
|
||||
$mform->setHelpButton($this->_name.'_grp', array('profilefield',$this->_label,'filters'));
|
||||
if ($this->_advanced) {
|
||||
$mform->setAdvanced($this->_name.'_grp');
|
||||
}
|
||||
|
|
|
@ -50,7 +50,7 @@ class user_filter_select extends user_filter_type {
|
|||
$objs[] =& $mform->createElement('select', $this->_name.'_op', null, $this->get_operators());
|
||||
$objs[] =& $mform->createElement('select', $this->_name, null, $this->_options);
|
||||
$grp =& $mform->addElement('group', $this->_name.'_grp', $this->_label, $objs, '', false);
|
||||
$grp->setHelpButton(array('select', $this->_label, 'filters'));
|
||||
$mform->setHelpButton($this->_name.'_grp', array('select', $this->_label, 'filters'));
|
||||
$mform->disabledIf($this->_name, $this->_name.'_op', 'eq', 0);
|
||||
if (!is_null($this->_default)) {
|
||||
$mform->setDefault($this->_name, $this->_default);
|
||||
|
|
|
@ -42,7 +42,7 @@ class user_filter_text extends user_filter_type {
|
|||
$objs[] =& $mform->createElement('select', $this->_name.'_op', null, $this->getOperators());
|
||||
$objs[] =& $mform->createElement('text', $this->_name, null);
|
||||
$grp =& $mform->addElement('group', $this->_name.'_grp', $this->_label, $objs, '', false);
|
||||
$grp->setHelpButton(array('text2',$this->_label,'filters'));
|
||||
$mform->setHelpButton($this->_name.'_grp', array('text2',$this->_label,'filters'));
|
||||
$mform->disabledIf($this->_name, $this->_name.'_op', 'eq', 5);
|
||||
if ($this->_advanced) {
|
||||
$mform->setAdvanced($this->_name.'_grp');
|
||||
|
|
|
@ -116,11 +116,11 @@ echo get_string('users'). ': ' . implode(', ', $userlist) . '.';
|
|||
echo '</p>';
|
||||
|
||||
echo '<p>' . get_string('content', 'notes');
|
||||
echo $OUTPUT->help_icon(moodle_help_icon::make('writing', get_string('helpwriting')));
|
||||
echo $OUTPUT->help_icon('writing', get_string('helpwriting'));
|
||||
echo '<br /><textarea name="content" rows="5" cols="50">' . strip_tags(@$content) . '</textarea></p>';
|
||||
|
||||
echo '<p>' . $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 '</p>';
|
||||
|
||||
|
|
|
@ -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 '<form method="post" action="groupextendenrol.php">';
|
||||
echo '<input type="hidden" name="id" value="'.$course->id.'" />';
|
||||
echo '<input type="hidden" name="sesskey" value="'.sesskey().'" />';
|
||||
|
|
|
@ -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";
|
||||
|
|
|
@ -15,16 +15,17 @@
|
|||
<tr valign="top">
|
||||
<td align="right" valign="middle" nowrap="nowrap">
|
||||
<?php
|
||||
echo $OUTPUT->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 "<br />";
|
||||
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 "<br />";
|
||||
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 "<br />";
|
||||
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
|
||||
}
|
||||
?>
|
||||
<br />
|
||||
|
@ -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"));
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue