MDL-47959 mod_quiz: fixed 0 questions bug
authorSam Hemelryk <sam@moodle.com>
Thu, 30 Oct 2014 22:58:49 +0000 (11:58 +1300)
committerSam Hemelryk <sam@moodle.com>
Fri, 31 Oct 2014 00:35:25 +0000 (13:35 +1300)
mod/quiz/yui/build/moodle-mod_quiz-toolboxes/moodle-mod_quiz-toolboxes-debug.js
mod/quiz/yui/build/moodle-mod_quiz-toolboxes/moodle-mod_quiz-toolboxes-min.js
mod/quiz/yui/build/moodle-mod_quiz-toolboxes/moodle-mod_quiz-toolboxes.js
mod/quiz/yui/src/toolboxes/js/toolbox.js

index 46637e9..7f20f5f 100644 (file)
Binary files a/mod/quiz/yui/build/moodle-mod_quiz-toolboxes/moodle-mod_quiz-toolboxes-debug.js and b/mod/quiz/yui/build/moodle-mod_quiz-toolboxes/moodle-mod_quiz-toolboxes-debug.js differ
index ce8eba7..c8e6785 100644 (file)
Binary files a/mod/quiz/yui/build/moodle-mod_quiz-toolboxes/moodle-mod_quiz-toolboxes-min.js and b/mod/quiz/yui/build/moodle-mod_quiz-toolboxes/moodle-mod_quiz-toolboxes-min.js differ
index 46637e9..7f20f5f 100644 (file)
Binary files a/mod/quiz/yui/build/moodle-mod_quiz-toolboxes/moodle-mod_quiz-toolboxes.js and b/mod/quiz/yui/build/moodle-mod_quiz-toolboxes/moodle-mod_quiz-toolboxes.js differ
index d87f4f7..9cf03a4 100644 (file)
@@ -122,10 +122,10 @@ Y.extend(TOOLBOX, Y.Base, {
                     } catch (e) {}
 
                     // Run the callback if we have one.
-                    if (responsetext.newsummarks) {
+                    if (responsetext.hasOwnProperty('newsummarks')) {
                         Y.one(SELECTOR.SUMMARKS).setHTML(responsetext.newsummarks);
                     }
-                    if (responsetext.newnumquestions) {
+                    if (responsetext.hasOwnProperty('newnumquestions')) {
                         Y.one(SELECTOR.NUMQUESTIONS).setHTML(M.util.get_string('numquestionsx', 'quiz', responsetext.newnumquestions));
                     }
                     if (success_callback) {