diff --git a/grade/report/singleview/classes/local/screen/user.php b/grade/report/singleview/classes/local/screen/user.php index c49ddd9e58e..5a228cdf83c 100644 --- a/grade/report/singleview/classes/local/screen/user.php +++ b/grade/report/singleview/classes/local/screen/user.php @@ -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"), diff --git a/grade/report/user/classes/report/user.php b/grade/report/user/classes/report/user.php index c9cfc11682f..3b45568efe8 100644 --- a/grade/report/user/classes/report/user.php +++ b/grade/report/user/classes/report/user.php @@ -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");