Merge branch 'MDL-45138-master' of https://github.com/sammarshallou/moodle

Conflicts:
	availability/yui/build/moodle-core_availability-form/moodle-core_availability-form-min.js
This commit is contained in:
Sam Hemelryk 2014-04-22 08:29:38 +12:00
commit 56418292f1
5 changed files with 21 additions and 5 deletions

View File

@ -123,6 +123,22 @@ Feature: edit_availability
When I click on ".availability-item .availability-delete img" "css_element"
Then I should not see "or" in the "Restrict access" "fieldset"
# Add a nested restriction set with two dates so there will be inner connector.
When I click on "Add restriction..." "button"
And I click on "Restriction set" "button" in the "Add restriction..." "dialogue"
And I click on "Add restriction..." "button" in the ".availability-children .availability-list" "css_element"
And I click on "Date" "button" in the "Add restriction..." "dialogue"
And I click on "Add restriction..." "button" in the ".availability-children .availability-list" "css_element"
And I click on "Date" "button" in the "Add restriction..." "dialogue"
Then I should see "and" in the ".availability-children .availability-list .availability-connector" "css_element"
# Check changing the outer one does not affect the inner one.
When I set the field "Required restrictions" to "all"
Then I should not see "or" in the "Restrict access" "fieldset"
When I set the field "Required restrictions" to "any"
Then I should see "or" in the "Restrict access" "fieldset"
And I should not see "or" in the ".availability-children .availability-list .availability-connector" "css_element"
@javascript
Scenario: Edit availability using settings in section form
# Set up.

View File

@ -513,7 +513,7 @@ M.core_availability.List.prototype.updateHtml = function() {
} else {
connectorText = M.str.availability.or;
}
this.inner.all('.availability-connector span.label').each(function(span) {
this.inner.all('> .availability-children > .availability-connector span.label').each(function(span) {
span.set('innerHTML', connectorText);
});
};

File diff suppressed because one or more lines are too long

View File

@ -513,7 +513,7 @@ M.core_availability.List.prototype.updateHtml = function() {
} else {
connectorText = M.str.availability.or;
}
this.inner.all('.availability-connector span.label').each(function(span) {
this.inner.all('> .availability-children > .availability-connector span.label').each(function(span) {
span.set('innerHTML', connectorText);
});
};

View File

@ -511,7 +511,7 @@ M.core_availability.List.prototype.updateHtml = function() {
} else {
connectorText = M.str.availability.or;
}
this.inner.all('.availability-connector span.label').each(function(span) {
this.inner.all('> .availability-children > .availability-connector span.label').each(function(span) {
span.set('innerHTML', connectorText);
});
};