mirror of
https://github.com/moodle/moodle.git
synced 2025-04-15 21:45:37 +02:00
MDL-80233 completion: Use default for empty values
This commit is contained in:
parent
a891866cbd
commit
3f3dc5a035
@ -528,7 +528,7 @@ class manager {
|
||||
$data['customrules'] = $customdata ? json_encode($customdata) : null;
|
||||
$defaults['customrules'] = null;
|
||||
}
|
||||
$data = array_intersect_key($data, $defaults);
|
||||
$data = array_merge($defaults, $data);
|
||||
|
||||
// Get names of the affected modules.
|
||||
list($modidssql, $params) = $DB->get_in_or_equal($modids);
|
||||
|
@ -29,13 +29,19 @@ Feature: Allow teachers to edit the default activity completion rules in a cours
|
||||
And I set the field "Course completion tertiary navigation" to "Default activity completion"
|
||||
And I click on "Expand Assignment" "button"
|
||||
And I set the following fields to these values:
|
||||
| Add requirements | 1 |
|
||||
| completionview_assign | 0 |
|
||||
| completionusegrade_assign | 1 |
|
||||
| completionsubmit_assign | 1 |
|
||||
| Add requirements | 1 |
|
||||
| completionview_assign | 1 |
|
||||
| completionusegrade_assign | 1 |
|
||||
| completionsubmit_assign | 1 |
|
||||
And I should not see "Cancel" in the "[data-region='activitycompletion-forum']" "css_element"
|
||||
And I click on "Save changes" "button" in the "[data-region='activitycompletion-assign']" "css_element"
|
||||
Then I should see "Changes saved"
|
||||
And I navigate to "Course completion" in current page administration
|
||||
And I set the field "Course completion tertiary navigation" to "Default activity completion"
|
||||
And I click on "Expand Assignment" "button"
|
||||
And I set the following fields to these values:
|
||||
| completionview_assign | 0 |
|
||||
And I click on "Save changes" "button" in the "[data-region='activitycompletion-assign']" "css_element"
|
||||
And I am on "Course 1" course homepage with editing mode on
|
||||
And I press "Add an activity or resource"
|
||||
And I click on "Add a new Assignment" "link" in the "Add an activity or resource" "dialogue"
|
||||
|
Loading…
x
Reference in New Issue
Block a user