MDL-66378 gradereport_singleview: Add missing label for dropdown

This commit is contained in:
Andrew Nicols 2019-08-15 08:29:59 +08:00
parent 3d18e5cfd6
commit db89a31d2e
3 changed files with 4 additions and 2 deletions

View File

@ -93,7 +93,8 @@ class dropdown_attribute extends element {
'value' => $option,
'selected' => $selected == $option
];
}, array_keys($options))
}, array_keys($options)),
'label' => get_string('gradefor', 'gradereport_singleview', $this->label),
);
return $OUTPUT->render_from_template('gradereport_singleview/dropdown_attribute', $context);

View File

@ -28,6 +28,7 @@
"selected": "true"
}
}}
<label for="{{name}}" class="accesshide">{{label}}</label>
<select id="{{name}}" name="{{name}}" class="custom-select" tabindex="1" {{#disabled}}disabled{{/disabled}}>
{{#options}}
<option value="{{value}}" {{#selected}}selected{{/selected}}>{{name}}</option>

View File

@ -87,7 +87,7 @@ Feature: We can use Single view
And the field "Grade for james (Student) 1" matches value "12.05"
And the field "Exclude for holly (Student) 2" matches value "1"
And I select "new grade item 1" from the "Select grade item..." singleselect
And I click on "Very good" "option"
And I set the field "Grade for james (Student) 1" to "Very good"
And I press "Save"
Then I should see "Grades were set for 1 items"
And I press "Continue"