mirror of
https://github.com/moodle/moodle.git
synced 2025-02-12 11:32:04 +01:00
MDL-76466 gradereport_user: Accordion icon uses language direction
This commit is contained in:
parent
422da2ed45
commit
177b1f5066
@ -863,6 +863,8 @@ class user extends grade_report {
|
||||
|
||||
// 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";
|
||||
@ -871,7 +873,7 @@ class user extends grade_report {
|
||||
}
|
||||
$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]);
|
||||
|
@ -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>
|
||||
|
Loading…
x
Reference in New Issue
Block a user