mirror of
https://github.com/moodle/moodle.git
synced 2025-03-14 04:30:15 +01:00
Merge branch 'MDL-78905-master' of https://github.com/mihailges/moodle
This commit is contained in:
commit
3c7b5c983e
@ -133,7 +133,8 @@ if ($id) {
|
||||
$mform = new edit_category_form(null, array('current'=>$category, 'gpr'=>$gpr));
|
||||
|
||||
$simpleform = new add_category(null, ['category' => $grade_category->id, 'courseid' => $courseid, 'gpr' => $gpr]);
|
||||
if ($simpledata = $simpleform->get_data()) {
|
||||
// Data has been carried over from the dynamic form.
|
||||
if ($simpledata = $simpleform->get_submitted_data()) {
|
||||
$mform->set_data($simpledata);
|
||||
}
|
||||
|
||||
|
@ -109,7 +109,8 @@ $item->cancontrolvisibility = $grade_item->can_control_visibility();
|
||||
$mform = new edit_item_form(null, array('current'=>$item, 'gpr'=>$gpr));
|
||||
|
||||
$simpleform = new add_item(null, ['itemid' => $grade_item->id, 'courseid' => $courseid, 'gpr' => $gpr]);
|
||||
if ($simpledata = $simpleform->get_data()) {
|
||||
// Data has been carried over from the dynamic form.
|
||||
if ($simpledata = $simpleform->get_submitted_data()) {
|
||||
$mform->set_data($simpledata);
|
||||
}
|
||||
|
||||
|
@ -114,7 +114,8 @@ if (empty($parent_category)) {
|
||||
$mform->set_data($item);
|
||||
|
||||
$simpleform = new add_outcome(null, ['itemid' => $grade_item->id, 'courseid' => $courseid, 'gpr' => $gpr]);
|
||||
if ($simpledata = $simpleform->get_data()) {
|
||||
// Data has been carried over from the dynamic form.
|
||||
if ($simpledata = $simpleform->get_submitted_data()) {
|
||||
$mform->set_data($simpledata);
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
@core @core_grades @javascript
|
||||
@core @core_grades @javascript @testtt
|
||||
Feature: We carry over data from modal to advanced grade item settings
|
||||
In order to setup grade items quickly
|
||||
As an teacher
|
||||
@ -103,6 +103,25 @@ Feature: We carry over data from modal to advanced grade item settings
|
||||
| grade_item_aggregationcoef2 | 100 |
|
||||
| Parent category | Some cool grade category |
|
||||
And I press "Cancel"
|
||||
And I choose the "Add category" item in the "Add" action menu
|
||||
# Confirm that the form values are carried over even if some mandatory fields are missing (e.g. Category name).
|
||||
And I set the following fields to these values:
|
||||
| Aggregation | Mean of grades |
|
||||
| Minimum grade | 1 |
|
||||
| Maximum grade | 99 |
|
||||
| Weight adjusted | 1 |
|
||||
| grade_item_aggregationcoef2 | 100 |
|
||||
| Parent category | Some cool grade category |
|
||||
And I click on "Show more..." "link" in the ".modal-dialog" "css_element"
|
||||
And the following fields match these values:
|
||||
| Category name | |
|
||||
| Aggregation | Mean of grades |
|
||||
| Minimum grade | 1 |
|
||||
| Maximum grade | 99 |
|
||||
| Weight adjusted | 1 |
|
||||
| grade_item_aggregationcoef2 | 100 |
|
||||
| Parent category | Some cool grade category |
|
||||
And I press "Cancel"
|
||||
And I wait until the page is ready
|
||||
And I choose the "Add outcome item" item in the "Add" action menu
|
||||
And I set the following fields to these values:
|
||||
|
Loading…
x
Reference in New Issue
Block a user