mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 16:36:37 +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
|
@ -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');
|
||||
}
|
||||
|
||||
|
|
|
@ -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 '<div>';
|
||||
|
||||
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 '<fieldset><legend>'.$strlangmasterenglish;
|
||||
echo $OUTPUT->help_icon(moodle_help_icon::make('langpackages', $strlangmasterenglish));
|
||||
echo $OUTPUT->help_icon('langpackages', $strlangmasterenglish);
|
||||
echo '</legend>';
|
||||
echo "<div class='mdl-align'>\n<textarea rows=\"$fileeditorrows\" cols=\"$fileeditorcols\" name=\"\">";
|
||||
echo htmlspecialchars(file_get_contents($ensrc));
|
||||
|
|
|
@ -32,7 +32,7 @@ if (empty($mnet_peer->public_key)) $mnet_peer->public_key = '';
|
|||
<td align="right" valign="top"><?php
|
||||
print_string('publickey', 'mnet');
|
||||
echo ': <br />';
|
||||
echo $OUTPUT->help_icon(moodle_help_icon::make("publickey", get_string('publickey', 'mnet'), "mnet", true));
|
||||
echo $OUTPUT->help_icon("publickey", get_string('publickey', 'mnet'), "mnet", true);
|
||||
?></td>
|
||||
<?php
|
||||
|
||||
|
@ -105,7 +105,7 @@ if (isset($mnet_peer->ip_address) && '' != $mnet_peer->ip_address){
|
|||
<tr>
|
||||
<td align="right" valign="top"><?php print_string('ipaddress', 'mnet');
|
||||
echo ': <br />';
|
||||
echo $OUTPUT->help_icon(moodle_help_icon::make("ipaddress", get_string('ipaddress', 'mnet'), "mnet", true));
|
||||
echo $OUTPUT->help_icon("ipaddress", get_string('ipaddress', 'mnet'), "mnet", true);
|
||||
?>:</td>
|
||||
<td valign="top"><?php echo $mnet_peer->ip_address; ?></td>
|
||||
</tr>
|
||||
|
|
|
@ -296,10 +296,7 @@
|
|||
}
|
||||
|
||||
/// Print heading.
|
||||
$helpicon = new moodle_help_icon();
|
||||
$helpicon->text = $title;
|
||||
$helpicon->page = 'assignroles';
|
||||
echo $OUTPUT->heading_with_help($helpicon);
|
||||
echo $OUTPUT->heading_with_help($title, 'assignroles');
|
||||
|
||||
if ($roleid) {
|
||||
/// Show UI for assigning a particular role to users.
|
||||
|
@ -330,7 +327,7 @@
|
|||
if ($hidden) { echo 'checked="checked" '; } ?>/>
|
||||
<label for="hidden" title="<?php print_string('createhiddenassign', 'role'); ?>">
|
||||
<?php print_string('hidden', 'role'); ?>
|
||||
<?php echo $OUTPUT->help_icon(moodle_help_icon::make('hiddenassign', get_string('createhiddenassign', 'role'))); ?>
|
||||
<?php echo $OUTPUT->help_icon('hiddenassign', get_string('createhiddenassign', 'role')); ?>
|
||||
</label></p>
|
||||
|
||||
<p><label for="extendperiod"><?php print_string('enrolperiod') ?></label><br />
|
||||
|
|
|
@ -138,10 +138,7 @@
|
|||
}
|
||||
|
||||
/// Print heading.
|
||||
$helpicon = new moodle_help_icon();
|
||||
$helpicon->text = $title;
|
||||
$helpicon->page = 'checkpermissions';
|
||||
echo $OUTPUT->heading_with_help($helpicon);
|
||||
echo $OUTPUT->heading_with_help($title, 'checkpermissions');
|
||||
|
||||
/// If a user has been chosen, show all the permissions for this user.
|
||||
$reportuser = $userselector->get_selected_user();
|
||||
|
|
|
@ -120,10 +120,7 @@
|
|||
} else if ($action == 'edit') {
|
||||
$title = get_string('editingrolex', 'role', $rolenames[$roleid]->localname);
|
||||
}
|
||||
$helpicon = new moodle_help_icon();
|
||||
$helpicon->text = $title;
|
||||
$helpicon->page = 'roles';
|
||||
echo $OUTPUT->heading_with_help($helpicon);
|
||||
echo $OUTPUT->heading_with_help($title, 'roles');
|
||||
|
||||
/// Work out some button labels.
|
||||
if ($action == 'add' || $action == 'duplicate') {
|
||||
|
|
|
@ -380,7 +380,7 @@ abstract class capability_table_with_risks extends capability_table_base {
|
|||
protected function add_header_cells() {
|
||||
global $OUTPUT;
|
||||
echo '<th colspan="' . count($this->displaypermissions) . '" scope="col">' .
|
||||
get_string('permission', 'role') . ' ' . $OUTPUT->help_icon(moodle_help_icon::make('permissions', get_string('permissions', 'role'))) . '</th>';
|
||||
get_string('permission', 'role') . ' ' . $OUTPUT->help_icon('permissions', get_string('permissions', 'role')) . '</th>';
|
||||
echo '<th class="risk" colspan="' . count($this->allrisks) . '" scope="col">' . get_string('risks','role') . '</th>';
|
||||
}
|
||||
|
||||
|
|
|
@ -206,7 +206,7 @@
|
|||
$table->wrap = array('nowrap', '', 'nowrap','nowrap');
|
||||
$table->width = '90%';
|
||||
$table->head = array(
|
||||
get_string('role') . ' ' . $OUTPUT->help_icon(moodle_help_icon::make('roles', get_string('roles'))),
|
||||
get_string('role') . ' ' . $OUTPUT->help_icon('roles', get_string('roles')),
|
||||
get_string('description'),
|
||||
get_string('shortname'),
|
||||
get_string('edit')
|
||||
|
|
|
@ -175,10 +175,7 @@
|
|||
include_once('tabs.php');
|
||||
}
|
||||
|
||||
$helpicon = new moodle_help_icon();
|
||||
$helpicon->text = $title;
|
||||
$helpicon->page = 'overrides';
|
||||
echo $OUTPUT->heading_with_help($helpicon);
|
||||
echo $OUTPUT->heading_with_help($title, 'overrides');
|
||||
|
||||
if ($roleid) {
|
||||
/// Show UI for overriding roles.
|
||||
|
|
|
@ -58,10 +58,7 @@ $overwritepicture = optional_param('overwritepicture', 0, PARAM_BOOL);
|
|||
/// Print the header
|
||||
admin_externalpage_print_header();
|
||||
|
||||
$helpicon = new moodle_help_icon();
|
||||
$helpicon->text = $struploadpictures;
|
||||
$helpicon->page = 'uploadpictures';
|
||||
echo $OUTPUT->heading_with_help($helpicon);
|
||||
echo $OUTPUT->heading_with_help($struploadpictures, 'uploadpictures');
|
||||
|
||||
$mform = new admin_uploadpicture_form(null, $userfields);
|
||||
if ($formdata = $mform->get_data()) {
|
||||
|
|
|
@ -107,10 +107,7 @@ if (empty($iid)) {
|
|||
} else {
|
||||
admin_externalpage_print_header();
|
||||
|
||||
$helpicon = new moodle_help_icon();
|
||||
$helpicon->text = get_string('uploadusers');
|
||||
$helpicon->page = 'uploadusers3';
|
||||
echo $OUTPUT->heading_with_help($helpicon);
|
||||
echo $OUTPUT->heading_with_help(get_string('uploadusers'), 'uploadusers3');
|
||||
|
||||
$mform->display();
|
||||
echo $OUTPUT->footer();
|
||||
|
@ -749,10 +746,7 @@ admin_externalpage_print_header();
|
|||
|
||||
/// Print the form
|
||||
|
||||
$helpicon = new moodle_help_icon();
|
||||
$helpicon->text = get_string('uploaduserspreview', 'admin');
|
||||
$helpicon->page = 'uploadusers2';
|
||||
echo $OUTPUT->heading_with_help($helpicon);
|
||||
echo $OUTPUT->heading_with_help(get_string('uploaduserspreview', 'admin'), 'uploadusers2');
|
||||
|
||||
$ci = 0;
|
||||
$ri = 0;
|
||||
|
|
|
@ -94,7 +94,7 @@ class user_bulk_form extends moodleform {
|
|||
|
||||
|
||||
$grp =& $mform->addElement('group', 'usersgrp', get_string('users'), $objs, ' ', false);
|
||||
$grp->setHelpButton(array('lists', get_string('users'), 'bulkusers'));
|
||||
$mform->setHelpButton('usersgrp', array('lists', get_string('users'), 'bulkusers'));
|
||||
|
||||
$mform->addElement('static', 'comment');
|
||||
|
||||
|
@ -104,7 +104,7 @@ class user_bulk_form extends moodleform {
|
|||
$objs[] =& $mform->createElement('submit', 'addall', get_string('addall', 'bulkusers'));
|
||||
$objs[] =& $mform->createElement('submit', 'removeall', get_string('removeall', 'bulkusers'));
|
||||
$grp =& $mform->addElement('group', 'buttonsgrp', get_string('selectedlist', 'bulkusers'), $objs, array(' ', '<br />'), false);
|
||||
$grp->setHelpButton(array('selectedlist', get_string('selectedlist', 'bulkusers'), 'bulkusers'));
|
||||
$mform->setHelpButton('buttonsgrp', array('selectedlist', get_string('selectedlist', 'bulkusers'), 'bulkusers'));
|
||||
|
||||
$renderer =& $mform->defaultRenderer();
|
||||
$template = '<label class="qflabel" style="vertical-align:top">{label}</label> {element}';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue