Merge branch 'MDL-77685-404' of https://github.com/paulholden/moodle into MOODLE_404_STABLE

This commit is contained in:
Ilya Tregubov 2024-05-31 09:04:44 +08:00
commit 1e480e2851
2 changed files with 5 additions and 16 deletions

View File

@ -198,14 +198,9 @@ class user extends tablelike implements selectable_items {
$itemicon = html_writer::div($this->format_icon($item), 'mr-1');
$itemtype = \html_writer::span(\grade_helper::get_element_type_string($gradetreeitem),
'd-block text-uppercase small dimmed_text');
// If a behat test site is running avoid outputting the information about the type of the grade item.
// This additional information currently causes issues in behat particularly with the existing xpath used to
// interact with table elements.
if (!defined('BEHAT_SITE_RUNNING')) {
$itemcontent = html_writer::div($itemtype . $itemname);
} else {
$itemcontent = html_writer::div($itemname);
}
$itemtitle = html_writer::div($itemname, 'rowtitle');
$itemcontent = html_writer::div($itemtype . $itemtitle);
$line = [
html_writer::div($itemicon . $itemcontent, "{$type} d-flex align-items-center"),

View File

@ -598,14 +598,8 @@ class user extends grade_report {
}
// Generate the content for a cell that represents a grade item.
// If a behat test site is running avoid outputting the information about the type of the grade item.
// This additional information causes issues in behat particularly with the existing xpath used to
// interact with table elements.
if (!defined('BEHAT_SITE_RUNNING')) {
$content = \html_writer::div($itemtype . $fullname);
} else {
$content = \html_writer::div($fullname);
}
$itemtitle = \html_writer::div($fullname, 'rowtitle');
$content = \html_writer::div($itemtype . $itemtitle);
// Name.
$data['itemname']['content'] = \html_writer::div($itemicon . $content, "{$type} d-flex align-items-center");