mirror of
https://github.com/moodle/moodle.git
synced 2025-04-21 00:12:56 +02:00
MDL-80043 gradereport_singleview: Improve heading wordings
* Make the headings for the single view easier to read and understand * When on editing mode, update the heading for the grade and user screens to convey to the user that the page is currently on editing mode. This is helpful for screen reader users as they can immediately know the current display mode of the single view report page when this gets read via the page title.
This commit is contained in:
parent
816fadfcd7
commit
fe3ff7dd69
@ -301,7 +301,9 @@ class grade extends tablelike implements selectable_items, filterable_items {
|
||||
* @return string
|
||||
*/
|
||||
public function heading(): string {
|
||||
return get_string('gradeitem', 'gradereport_singleview', $this->item->get_name());
|
||||
global $PAGE;
|
||||
$headinglangstring = $PAGE->user_is_editing() ? 'gradeitemedit' : 'gradeitem';
|
||||
return get_string($headinglangstring, 'gradereport_singleview', $this->item->get_name());
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -302,7 +302,9 @@ class user extends tablelike implements selectable_items {
|
||||
* @return string
|
||||
*/
|
||||
public function heading(): string {
|
||||
return get_string('gradeuser', 'gradereport_singleview', fullname($this->item));
|
||||
global $PAGE;
|
||||
$headinglangstring = $PAGE->user_is_editing() ? 'gradeuseredit' : 'gradeuser';
|
||||
return get_string($headinglangstring, 'gradereport_singleview', fullname($this->item));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -44,8 +44,10 @@ $string['excludenonegrades'] = 'Exclude none';
|
||||
$string['eventgradereportviewed'] = 'Grade single view report viewed.';
|
||||
$string['feedbackfor'] = 'Feedback for {$a}';
|
||||
$string['gradefor'] = 'Grade for {$a}';
|
||||
$string['gradeitem'] = 'Grade item: {$a}';
|
||||
$string['gradeuser'] = 'Grade user: {$a}';
|
||||
$string['gradeitem'] = 'Viewing grades for {$a}';
|
||||
$string['gradeitemedit'] = 'Editing grades for {$a}';
|
||||
$string['gradeuser'] = 'Viewing {$a}\'s grades';
|
||||
$string['gradeuseredit'] = 'Editing {$a}\'s grades';
|
||||
$string['gotonextreport'] = 'Go to next user report';
|
||||
$string['gotopreviousreport'] = 'Go to previous user report';
|
||||
$string['noscreens'] = 'Could not find a suitable single view screen.';
|
||||
|
Loading…
x
Reference in New Issue
Block a user