MDL-73074 reportbuilder: consistent lang strings in course filter.

This commit is contained in:
Paul Holden
2021-11-22 09:20:04 +00:00
parent 7013bda35b
commit faeecd79ea
3 changed files with 5 additions and 3 deletions
+1 -1
View File
@@ -72,6 +72,7 @@ $string['conditionsreset'] = 'Conditions reset';
$string['coursefullnamewithlink'] = 'Course full name with link';
$string['courseidnumberewithlink'] = 'Course ID number with link';
$string['courseshortnamewithlink'] = 'Course short name with link';
$string['courseselect'] = 'Select course';
$string['customfieldcolumn'] = '{$a}';
$string['customreports'] = 'Custom reports';
$string['deleteaudience'] = 'Delete audience \'{$a}\'';
@@ -180,7 +181,6 @@ $string['resetconditionsconfirm'] = 'Are you sure you want to reset all conditio
$string['selectacondition'] = 'Select a condition';
$string['selectafilter'] = 'Select a filter';
$string['selectareportsource'] = 'Select a report source';
$string['selectcourses'] = 'Select courses';
$string['showhide'] = 'Show/hide \'{$a}\'';
$string['sorting'] = 'Sorting';
$string['sorting_help'] = 'Sorting defines the initial sort order of columns in the report. The order can be reversed by toggling the Up/down icon. Users can then define their own sort order by clicking on a column name.';
@@ -327,7 +327,7 @@ class course extends base {
$filters[] = (new filter(
course_selector::class,
'courseselector',
new lang_string('courses'),
new lang_string('courseselect', 'core_reportbuilder'),
$this->get_entity_name(),
"{$tablealias}.id"
))
@@ -36,10 +36,12 @@ class course_selector extends base {
* @param MoodleQuickForm $mform
*/
public function setup_form(MoodleQuickForm $mform): void {
$operatorlabel = get_string('filterfieldvalue', 'core_reportbuilder', $this->get_header());
$options = [
'multiple' => true,
];
$mform->addElement('course', $this->name . '_values', get_string('selectcourses', 'core_reportbuilder'), $options)
$mform->addElement('course', $this->name . '_values', $operatorlabel, $options)
->setHiddenLabel(true);
}