Skip to content

Commit

Permalink
Merge branch 'MDL-76466-master' of https://github.com/davewoloszyn/mo…
Browse files Browse the repository at this point in the history
  • Loading branch information
vmdef committed Nov 24, 2022
2 parents b54f76f + 177b1f5 commit 1b92fac
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion grade/report/user/classes/report/user.php
Original file line number Diff line number Diff line change
Expand Up @@ -863,6 +863,8 @@ private function fill_table_recursive(array &$element) {

// Category.
if ($type == 'category') {
// Determine directionality so that icons can be modified to suit language.
$arrow = right_to_left() ? 'left' : 'right';
// Alter style based on whether aggregation is first or last.
if ($this->switch) {
$data['itemname']['class'] = $class . ' ' . "d$depth b1b b1t category";
Expand All @@ -871,7 +873,7 @@ private function fill_table_recursive(array &$element) {
}
$data['itemname']['colspan'] = ($this->maxdepth - $depth + count($this->tablecolumns));
$data['itemname']['content'] = $OUTPUT->render_from_template('gradereport_user/user_report_category_content',
['categoryid' => $gradeobject->id, 'categoryname' => $fullname]);
['categoryid' => $gradeobject->id, 'categoryname' => $fullname, 'arrow' => $arrow]);
$data['itemname']['id'] = "cat_{$gradeobject->id}_{$this->user->id}";
// Get the IDs of all parent categories of this grade category.
$data['parentcategories'] = array_diff(array_filter(explode('/', $gradeobject->path)), [$gradeobject->id]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
<i class="icon fa fa-chevron-down fa-fw" title="{{#str}} collapse, core {{/str}}" role="img" aria-label="{{#str}} collapse, core {{/str}}"></i>
</span>
<span class="expanded text-nowrap" title="{{#str}} expand, core {{/str}}">
<i class="icon fa fa-chevron-right fa-fw" title="{{#str}} expand, core {{/str}}" role="img" aria-label="{{#str}} expand, core {{/str}}"></i>
<i class="icon fa fa-chevron-{{arrow}} fa-fw" title="{{#str}} expand, core {{/str}}" role="img" aria-label="{{#str}} expand, core {{/str}}"></i>
</span>
</a>
<span>{{categoryname}}</span>
Expand Down

0 comments on commit 1b92fac

Please sign in to comment.