MDL-46414 Conditional availability: Dropdowns not set correctly when editing in IE
authorsam marshall <s.marshall@open.ac.uk>
Tue, 29 Jul 2014 17:32:22 +0000 (18:32 +0100)
committersam marshall <s.marshall@open.ac.uk>
Tue, 29 Jul 2014 17:33:03 +0000 (18:33 +0100)
In IE, you cannot set the value of a dropdown to an integer; it has to be a string.
This caused a bug in several parts of the conditional availability editing
interface.

20 files changed:
availability/condition/completion/yui/build/moodle-availability_completion-form/moodle-availability_completion-form-debug.js
availability/condition/completion/yui/build/moodle-availability_completion-form/moodle-availability_completion-form-min.js
availability/condition/completion/yui/build/moodle-availability_completion-form/moodle-availability_completion-form.js
availability/condition/completion/yui/src/form/js/form.js
availability/condition/date/yui/build/moodle-availability_date-form/moodle-availability_date-form-debug.js
availability/condition/date/yui/build/moodle-availability_date-form/moodle-availability_date-form-min.js
availability/condition/date/yui/build/moodle-availability_date-form/moodle-availability_date-form.js
availability/condition/date/yui/src/form/js/form.js
availability/condition/grade/yui/build/moodle-availability_grade-form/moodle-availability_grade-form-debug.js
availability/condition/grade/yui/build/moodle-availability_grade-form/moodle-availability_grade-form-min.js
availability/condition/grade/yui/build/moodle-availability_grade-form/moodle-availability_grade-form.js
availability/condition/grade/yui/src/form/js/form.js
availability/condition/group/yui/build/moodle-availability_group-form/moodle-availability_group-form-debug.js
availability/condition/group/yui/build/moodle-availability_group-form/moodle-availability_group-form-min.js
availability/condition/group/yui/build/moodle-availability_group-form/moodle-availability_group-form.js
availability/condition/group/yui/src/form/js/form.js
availability/condition/grouping/yui/build/moodle-availability_grouping-form/moodle-availability_grouping-form-debug.js
availability/condition/grouping/yui/build/moodle-availability_grouping-form/moodle-availability_grouping-form-min.js
availability/condition/grouping/yui/build/moodle-availability_grouping-form/moodle-availability_grouping-form.js
availability/condition/grouping/yui/src/form/js/form.js

index 4a070ab..27350c4 100644 (file)
Binary files a/availability/condition/completion/yui/build/moodle-availability_completion-form/moodle-availability_completion-form-debug.js and b/availability/condition/completion/yui/build/moodle-availability_completion-form/moodle-availability_completion-form-debug.js differ
index 6b0de32..eb98c96 100644 (file)
Binary files a/availability/condition/completion/yui/build/moodle-availability_completion-form/moodle-availability_completion-form-min.js and b/availability/condition/completion/yui/build/moodle-availability_completion-form/moodle-availability_completion-form-min.js differ
index 4a070ab..27350c4 100644 (file)
Binary files a/availability/condition/completion/yui/build/moodle-availability_completion-form/moodle-availability_completion-form.js and b/availability/condition/completion/yui/build/moodle-availability_completion-form/moodle-availability_completion-form.js differ
index b37ec5e..926a9e4 100644 (file)
@@ -45,10 +45,10 @@ M.availability_completion.form.getNode = function(json) {
     // Set initial values.
     if (json.cm !== undefined &&
             node.one('select[name=cm] > option[value=' + json.cm + ']')) {
-        node.one('select[name=cm]').set('value', json.cm);
+        node.one('select[name=cm]').set('value', '' + json.cm);
     }
     if (json.e !== undefined) {
-        node.one('select[name=e]').set('value', json.e);
+        node.one('select[name=e]').set('value', '' + json.e);
     }
 
     // Add event handlers (first time only).
index f0d42e1..d84da8c 100644 (file)
Binary files a/availability/condition/date/yui/build/moodle-availability_date-form/moodle-availability_date-form-debug.js and b/availability/condition/date/yui/build/moodle-availability_date-form/moodle-availability_date-form-debug.js differ
index 9b0f7c0..7447c99 100644 (file)
Binary files a/availability/condition/date/yui/build/moodle-availability_date-form/moodle-availability_date-form-min.js and b/availability/condition/date/yui/build/moodle-availability_date-form/moodle-availability_date-form-min.js differ
index f0d42e1..d84da8c 100644 (file)
Binary files a/availability/condition/date/yui/build/moodle-availability_date-form/moodle-availability_date-form.js and b/availability/condition/date/yui/build/moodle-availability_date-form/moodle-availability_date-form.js differ
index 9eff4e7..580c6eb 100644 (file)
@@ -51,7 +51,7 @@ M.availability_date.form.getNode = function(json) {
                 var fields = Y.JSON.parse(response.responseText);
                 for (var field in fields) {
                     var select = node.one('select[name=x\\[' + field + '\\]]');
-                    select.set('value', fields[field]);
+                    select.set('value', '' + fields[field]);
                     select.set('disabled', false);
                 }
             },
index 8db6d61..28f5f81 100644 (file)
Binary files a/availability/condition/grade/yui/build/moodle-availability_grade-form/moodle-availability_grade-form-debug.js and b/availability/condition/grade/yui/build/moodle-availability_grade-form/moodle-availability_grade-form-debug.js differ
index cb727ca..83c5e5a 100644 (file)
Binary files a/availability/condition/grade/yui/build/moodle-availability_grade-form/moodle-availability_grade-form-min.js and b/availability/condition/grade/yui/build/moodle-availability_grade-form/moodle-availability_grade-form-min.js differ
index 8db6d61..28f5f81 100644 (file)
Binary files a/availability/condition/grade/yui/build/moodle-availability_grade-form/moodle-availability_grade-form.js and b/availability/condition/grade/yui/build/moodle-availability_grade-form/moodle-availability_grade-form.js differ
index 669e296..e0b0fe9 100644 (file)
@@ -58,7 +58,7 @@ M.availability_grade.form.getNode = function(json) {
     // Set initial values.
     if (json.id !== undefined &&
             node.one('select[name=id] > option[value=' + json.id + ']')) {
-        node.one('select[name=id]').set('value', json.id);
+        node.one('select[name=id]').set('value', '' + json.id);
     }
     if (json.min !== undefined) {
         node.one('input[name=min]').set('checked', true);
index 3bfb261..a968d4e 100644 (file)
Binary files a/availability/condition/group/yui/build/moodle-availability_group-form/moodle-availability_group-form-debug.js and b/availability/condition/group/yui/build/moodle-availability_group-form/moodle-availability_group-form-debug.js differ
index d26f447..a5fe42f 100644 (file)
Binary files a/availability/condition/group/yui/build/moodle-availability_group-form/moodle-availability_group-form-min.js and b/availability/condition/group/yui/build/moodle-availability_group-form/moodle-availability_group-form-min.js differ
index 3bfb261..a968d4e 100644 (file)
Binary files a/availability/condition/group/yui/build/moodle-availability_group-form/moodle-availability_group-form.js and b/availability/condition/group/yui/build/moodle-availability_group-form/moodle-availability_group-form.js differ
index 9d06aed..e68a703 100644 (file)
@@ -48,7 +48,7 @@ M.availability_group.form.getNode = function(json) {
     if (json.creating === undefined) {
         if (json.id !== undefined &&
                 node.one('select[name=id] > option[value=' + json.id + ']')) {
-            node.one('select[name=id]').set('value', json.id);
+            node.one('select[name=id]').set('value', '' + json.id);
         } else if (json.id === undefined) {
             node.one('select[name=id]').set('value', 'any');
         }
index fa4f9ec..4c0a4ab 100644 (file)
Binary files a/availability/condition/grouping/yui/build/moodle-availability_grouping-form/moodle-availability_grouping-form-debug.js and b/availability/condition/grouping/yui/build/moodle-availability_grouping-form/moodle-availability_grouping-form-debug.js differ
index 068646f..305d8d5 100644 (file)
Binary files a/availability/condition/grouping/yui/build/moodle-availability_grouping-form/moodle-availability_grouping-form-min.js and b/availability/condition/grouping/yui/build/moodle-availability_grouping-form/moodle-availability_grouping-form-min.js differ
index fa4f9ec..4c0a4ab 100644 (file)
Binary files a/availability/condition/grouping/yui/build/moodle-availability_grouping-form/moodle-availability_grouping-form.js and b/availability/condition/grouping/yui/build/moodle-availability_grouping-form/moodle-availability_grouping-form.js differ
index 397000e..dc09e83 100644 (file)
@@ -46,7 +46,7 @@ M.availability_grouping.form.getNode = function(json) {
     // Set initial value if specified.
     if (json.id !== undefined &&
             node.one('select[name=id] > option[value=' + json.id + ']')) {
-        node.one('select[name=id]').set('value', json.id);
+        node.one('select[name=id]').set('value', '' + json.id);
     }
 
     // Add event handlers (first time only).