mirror of
https://github.com/moodle/moodle.git
synced 2025-01-17 13:38:32 +01:00
Merge branch 'MDL-76467-master' of https://github.com/davewoloszyn/moodle
This commit is contained in:
commit
4e95640030
@ -121,13 +121,18 @@ class gradereport_singleview_renderer extends plugin_renderer_base {
|
||||
$i = array_search($itemid, $reloptionssorting);
|
||||
$navparams = ['item' => $itemtype, 'id' => $courseid, 'group' => $groupid];
|
||||
|
||||
// Determine directionality so that icons can be modified to suit language.
|
||||
$previousarrow = right_to_left() ? 'right' : 'left';
|
||||
$nextarrow = right_to_left() ? 'left' : 'right';
|
||||
|
||||
if ($i > 0) {
|
||||
$navparams['itemid'] = $reloptionssorting[$i - 1];
|
||||
$link = (new moodle_url('/grade/report/singleview/index.php', $navparams))
|
||||
->out(false);
|
||||
$navigationdata['previoususer'] = [
|
||||
'name' => $reloptions[$navparams['itemid']],
|
||||
'url' => $link
|
||||
'url' => $link,
|
||||
'previousarrow' => $previousarrow
|
||||
];
|
||||
}
|
||||
if ($i < count($reloptionssorting) - 1) {
|
||||
@ -136,7 +141,8 @@ class gradereport_singleview_renderer extends plugin_renderer_base {
|
||||
->out(false);
|
||||
$navigationdata['nextuser'] = [
|
||||
'name' => $reloptions[$navparams['itemid']],
|
||||
'url' => $link
|
||||
'url' => $link,
|
||||
'nextarrow' => $nextarrow
|
||||
];
|
||||
}
|
||||
|
||||
|
@ -45,7 +45,7 @@
|
||||
{{#previoususer}}
|
||||
<div class="previous d-flex">
|
||||
<a href="{{url}}" aria-label="{{#str}} gotopreviousreport, gradereport_singleview {{/str}}">
|
||||
<i class="fa fa-caret-left fa-lg pr-1"></i>
|
||||
<i class="fa fa-caret-{{previousarrow}} fa-lg pr-1"></i>
|
||||
{{name}}
|
||||
</a>
|
||||
</div>
|
||||
@ -56,7 +56,7 @@
|
||||
<div class="next d-flex ml-auto">
|
||||
<a href="{{url}}" aria-label="{{#str}} gotonextreport, gradereport_singleview {{/str}}">
|
||||
{{name}}
|
||||
<i class="fa fa-caret-right fa-lg pl-1"></i>
|
||||
<i class="fa fa-caret-{{nextarrow}} fa-lg pl-1"></i>
|
||||
</a>
|
||||
</div>
|
||||
{{/nextuser}}
|
||||
|
@ -150,13 +150,18 @@ class gradereport_user_renderer extends plugin_renderer_base {
|
||||
$arraykeys = array_keys($users);
|
||||
$keynumber = array_search($userid, $arraykeys);
|
||||
|
||||
// Determine directionality so that icons can be modified to suit language.
|
||||
$previousarrow = right_to_left() ? 'right' : 'left';
|
||||
$nextarrow = right_to_left() ? 'left' : 'right';
|
||||
|
||||
// If the current user is not the first one in the list, find and render the previous user.
|
||||
if ($keynumber !== 0) {
|
||||
$previoususer = $users[$arraykeys[$keynumber - 1]];
|
||||
$navigationdata['previoususer'] = [
|
||||
'name' => fullname($previoususer),
|
||||
'url' => (new moodle_url('/grade/report/user/index.php', ['id' => $courseid, 'userid' => $previoususer->id]))
|
||||
->out(false)
|
||||
->out(false),
|
||||
'previousarrow' => $previousarrow
|
||||
];
|
||||
}
|
||||
// If the current user is not the last one in the list, find and render the last user.
|
||||
@ -165,7 +170,8 @@ class gradereport_user_renderer extends plugin_renderer_base {
|
||||
$navigationdata['nextuser'] = [
|
||||
'name' => fullname($nextuser),
|
||||
'url' => (new moodle_url('/grade/report/user/index.php', ['id' => $courseid, 'userid' => $nextuser->id]))
|
||||
->out(false)
|
||||
->out(false),
|
||||
'nextarrow' => $nextarrow
|
||||
];
|
||||
}
|
||||
|
||||
|
@ -44,7 +44,7 @@
|
||||
{{#previoususer}}
|
||||
<div class="previous d-flex">
|
||||
<a href="{{url}}" aria-label="{{#str}} gotopreviousreport, gradereport_user {{/str}}">
|
||||
<i class="fa fa-caret-left fa-lg pr-1"></i>
|
||||
<i class="fa fa-caret-{{previousarrow}} fa-lg pr-1"></i>
|
||||
{{name}}
|
||||
</a>
|
||||
</div>
|
||||
@ -53,7 +53,7 @@
|
||||
<div class="next d-flex ml-auto">
|
||||
<a href="{{url}}" aria-label="{{#str}} gotonextreport, gradereport_user {{/str}}">
|
||||
{{name}}
|
||||
<i class="fa fa-caret-right fa-lg pl-1"></i>
|
||||
<i class="fa fa-caret-{{nextarrow}} fa-lg pl-1"></i>
|
||||
</a>
|
||||
</div>
|
||||
{{/nextuser}}
|
||||
|
Loading…
x
Reference in New Issue
Block a user