-
Bug
-
Resolution: Fixed
-
Minor
-
3.10.3, 3.11
-
MOODLE_310_STABLE, MOODLE_311_STABLE
-
MOODLE_310_STABLE, MOODLE_311_STABLE
-
MDL-71375-master -
FULL STEPS:
- Open a moodle course
- Go to Participants
- Enrol at least one participant
- Hover over the "-" button right Firstname / Surname column title in the main users table
EXPECTED:
The tooltip should say "Hide Full name"
ACTUAL RESULT:
The tooltip says "Hide" without specifying which column
If hovered in the bottom-right corner of the "-" sign, the correct tooltip is displayed.
BUG:
The problem seems to be that both the <a> and the <i> inside have a title attribute. It is applicable to all tables produced with lib/tablelib.php. The problematic function is flexible_table::show_hide_link in lib/tablelib.php:
...
protected function show_hide_link($column, $index) {
...
return html_writer::link($this->baseurl->out(false, array($this->request[TABLE_VAR_SHOW] => $column)),
{{ $OUTPUT->pix_icon('t/switch_plus', get_string('show')), $linkattributes);}}
...
return html_writer::link($this->baseurl->out(false, array($this->request[TABLE_VAR_HIDE] => $column)),
{{ $OUTPUT->pix_icon('t/switch_minus', get_string('hide')), $linkattributes);}}
...
$linkattributes already contains the correct title, so all that needs to be done is to replace get_string('show') and get_string('hide') with null, so that the icon doesn't have a title attribute.