Skip to content

Commit

Permalink
MDL-49477 availability_grade-form: checkbox disable problem fixed
Browse files Browse the repository at this point in the history
Signed-off-by: Viduranga Wijesooriya <[email protected]>
  • Loading branch information
vidurangaw authored and Frederic Massart committed Apr 22, 2015
1 parent e28767f commit 21e6aab
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,22 @@ Feature: availability_grade
And I set the field "Grade" to "A1"
And I click on "min" "checkbox" in the ".availability-item" "css_element"
And I set the field "Minimum grade percentage (inclusive)" to "50"
And I click on "max" "checkbox" in the ".availability-item" "css_element"
And I set the field "Maximum grade percentage (exclusive)" to "80"
And I press "Save and return to course"

# Check if disabling a part of the restriction is get saved.
And I open "P3" actions menu
And I click on "Edit settings" "link" in the "P3" activity
And I expand all fieldsets
And I click on "max" "checkbox" in the ".availability-item" "css_element"
And I press "Save and return to course"
And I open "P3" actions menu
And I click on "Edit settings" "link" in the "P3" activity
And I expand all fieldsets
And the field "Maximum grade percentage (exclusive)" matches value ""
And I follow "Course 1"

# Add a Page with a grade condition for 10%.
And I add a "Page" to section "4"
And I set the following fields to these values:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ M.availability_grade.form.getNode = function(json) {

root.delegate('click', function() {
updateCheckbox(this, true);
M.core_availability.form.update();
}, '.availability_grade input[type=checkbox]');

root.delegate('valuechange', function() {
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ M.availability_grade.form.getNode = function(json) {

root.delegate('click', function() {
updateCheckbox(this, true);
M.core_availability.form.update();
}, '.availability_grade input[type=checkbox]');

root.delegate('valuechange', function() {
Expand Down
1 change: 1 addition & 0 deletions availability/condition/grade/yui/src/form/js/form.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ M.availability_grade.form.getNode = function(json) {

root.delegate('click', function() {
updateCheckbox(this, true);
M.core_availability.form.update();
}, '.availability_grade input[type=checkbox]');

root.delegate('valuechange', function() {
Expand Down

0 comments on commit 21e6aab

Please sign in to comment.