mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 16:36:37 +02:00
Merge branch 'MDL-76467-master' of https://github.com/davewoloszyn/moodle
This commit is contained in:
commit
4e95640030
4 changed files with 20 additions and 8 deletions
|
@ -121,13 +121,18 @@ class gradereport_singleview_renderer extends plugin_renderer_base {
|
||||||
$i = array_search($itemid, $reloptionssorting);
|
$i = array_search($itemid, $reloptionssorting);
|
||||||
$navparams = ['item' => $itemtype, 'id' => $courseid, 'group' => $groupid];
|
$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) {
|
if ($i > 0) {
|
||||||
$navparams['itemid'] = $reloptionssorting[$i - 1];
|
$navparams['itemid'] = $reloptionssorting[$i - 1];
|
||||||
$link = (new moodle_url('/grade/report/singleview/index.php', $navparams))
|
$link = (new moodle_url('/grade/report/singleview/index.php', $navparams))
|
||||||
->out(false);
|
->out(false);
|
||||||
$navigationdata['previoususer'] = [
|
$navigationdata['previoususer'] = [
|
||||||
'name' => $reloptions[$navparams['itemid']],
|
'name' => $reloptions[$navparams['itemid']],
|
||||||
'url' => $link
|
'url' => $link,
|
||||||
|
'previousarrow' => $previousarrow
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
if ($i < count($reloptionssorting) - 1) {
|
if ($i < count($reloptionssorting) - 1) {
|
||||||
|
@ -136,7 +141,8 @@ class gradereport_singleview_renderer extends plugin_renderer_base {
|
||||||
->out(false);
|
->out(false);
|
||||||
$navigationdata['nextuser'] = [
|
$navigationdata['nextuser'] = [
|
||||||
'name' => $reloptions[$navparams['itemid']],
|
'name' => $reloptions[$navparams['itemid']],
|
||||||
'url' => $link
|
'url' => $link,
|
||||||
|
'nextarrow' => $nextarrow
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -45,7 +45,7 @@
|
||||||
{{#previoususer}}
|
{{#previoususer}}
|
||||||
<div class="previous d-flex">
|
<div class="previous d-flex">
|
||||||
<a href="{{url}}" aria-label="{{#str}} gotopreviousreport, gradereport_singleview {{/str}}">
|
<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}}
|
{{name}}
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
@ -56,7 +56,7 @@
|
||||||
<div class="next d-flex ml-auto">
|
<div class="next d-flex ml-auto">
|
||||||
<a href="{{url}}" aria-label="{{#str}} gotonextreport, gradereport_singleview {{/str}}">
|
<a href="{{url}}" aria-label="{{#str}} gotonextreport, gradereport_singleview {{/str}}">
|
||||||
{{name}}
|
{{name}}
|
||||||
<i class="fa fa-caret-right fa-lg pl-1"></i>
|
<i class="fa fa-caret-{{nextarrow}} fa-lg pl-1"></i>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
{{/nextuser}}
|
{{/nextuser}}
|
||||||
|
|
|
@ -150,13 +150,18 @@ class gradereport_user_renderer extends plugin_renderer_base {
|
||||||
$arraykeys = array_keys($users);
|
$arraykeys = array_keys($users);
|
||||||
$keynumber = array_search($userid, $arraykeys);
|
$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 the current user is not the first one in the list, find and render the previous user.
|
||||||
if ($keynumber !== 0) {
|
if ($keynumber !== 0) {
|
||||||
$previoususer = $users[$arraykeys[$keynumber - 1]];
|
$previoususer = $users[$arraykeys[$keynumber - 1]];
|
||||||
$navigationdata['previoususer'] = [
|
$navigationdata['previoususer'] = [
|
||||||
'name' => fullname($previoususer),
|
'name' => fullname($previoususer),
|
||||||
'url' => (new moodle_url('/grade/report/user/index.php', ['id' => $courseid, 'userid' => $previoususer->id]))
|
'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.
|
// 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'] = [
|
$navigationdata['nextuser'] = [
|
||||||
'name' => fullname($nextuser),
|
'name' => fullname($nextuser),
|
||||||
'url' => (new moodle_url('/grade/report/user/index.php', ['id' => $courseid, 'userid' => $nextuser->id]))
|
'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}}
|
{{#previoususer}}
|
||||||
<div class="previous d-flex">
|
<div class="previous d-flex">
|
||||||
<a href="{{url}}" aria-label="{{#str}} gotopreviousreport, gradereport_user {{/str}}">
|
<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}}
|
{{name}}
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
@ -53,7 +53,7 @@
|
||||||
<div class="next d-flex ml-auto">
|
<div class="next d-flex ml-auto">
|
||||||
<a href="{{url}}" aria-label="{{#str}} gotonextreport, gradereport_user {{/str}}">
|
<a href="{{url}}" aria-label="{{#str}} gotonextreport, gradereport_user {{/str}}">
|
||||||
{{name}}
|
{{name}}
|
||||||
<i class="fa fa-caret-right fa-lg pl-1"></i>
|
<i class="fa fa-caret-{{nextarrow}} fa-lg pl-1"></i>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
{{/nextuser}}
|
{{/nextuser}}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue