Skip to content

Commit

Permalink
Merge branch 'wip-mdl-56210' of https://github.com/rajeshtaneja/moodle
Browse files Browse the repository at this point in the history
  • Loading branch information
David Monllao committed Oct 3, 2016
2 parents 6a9dc6b + 24c2dca commit 2e5a8fd
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
12 changes: 12 additions & 0 deletions lib/form/form.js
Expand Up @@ -23,6 +23,9 @@ if (typeof M.form.dependencyManager === 'undefined') {
this._hides = {};
this._dirty = {};

// Let behat know that JS is pending.
M.util.js_pending('mform-dependency-manager-' + this.get('form').get('id'));

// Setup event handlers.
Y.Object.each(this.get('dependencies'), function(value, i) {
var elements = this.elementsByName(i);
Expand Down Expand Up @@ -56,6 +59,9 @@ if (typeof M.form.dependencyManager === 'undefined') {
}, this);

this.updateAllDependencies();

// Let behat know that JS is complete.
M.util.js_complete('mform-dependency-manager-' + this.get('form').get('id'));
},

/**
Expand Down Expand Up @@ -589,6 +595,12 @@ M.form.initFormDependencies = function(Y, formid, dependencies) {
*/
M.form.updateFormState = function(formid) {
if (formid in M.form.dependencyManagers) {
// Let behat know that JS is pending.
M.util.js_pending('mform-dependency-manager-' + formid);

M.form.dependencyManagers[formid].updateAllDependencies();

// Let behat know that JS is complete.
M.util.js_complete('mform-dependency-manager-' + formid);
}
};
1 change: 1 addition & 0 deletions mod/lti/tests/behat/addtool.feature
Expand Up @@ -32,6 +32,7 @@ Feature: Add tools
And I turn editing mode on
And I add a "Teaching Tool 1" to section "1"
# For tool that does not support Content-Item message type, the Select content button must be disabled.
And I wait until the page is ready
And the "Select content" "button" should be disabled
And I set the field "Activity name" to "Test tool activity 1"
And I click on "Show more..." "link"
Expand Down

0 comments on commit 2e5a8fd

Please sign in to comment.