Merge branch 'MDL-38203' of git://github.com/timhunt/moodle
authorDan Poltawski <dan@moodle.com>
Tue, 20 Aug 2013 03:28:39 +0000 (11:28 +0800)
committerDan Poltawski <dan@moodle.com>
Tue, 20 Aug 2013 03:28:39 +0000 (11:28 +0800)
question/type/multianswer/module.js
question/type/multianswer/styles.css

index 2fbe4e0..80cfde6 100644 (file)
@@ -27,7 +27,7 @@ M.qtype_multianswer = M.qtype_multianswer || {};
 
 
 M.qtype_multianswer.init = function (Y, questiondiv) {
-    Y.one(questiondiv).all('span.subquestion').each(function(subqspan, i) {
+    Y.one(questiondiv).all('span.subquestion').each(function(subqspan) {
         var feedbackspan = subqspan.one('.feedbackspan');
         if (!feedbackspan) {
             return;
@@ -39,7 +39,9 @@ M.qtype_multianswer.init = function (Y, questiondiv) {
             align: {
                 node: subqspan,
                 points: [Y.WidgetPositionAlign.TC, Y.WidgetPositionAlign.BC]
-            }
+            },
+            constrain: subqspan.ancestor('div.que'),
+            preventOverlap: true
         });
         overlay.render();
 
index aeeaccf..3916310 100644 (file)
@@ -1,10 +1,17 @@
 .que.multianswer .feedbackspan {
     display: block;
+    max-width: 70%;
     background: #fff3bf;
     padding: 0.5em;
     margin-top: 1em;
     box-shadow: 0.5em 0.5em 1em #000000;
 }
+body.ie6 .que.multianswer .feedbackspan,
+body.ie7 .que.multianswer .feedbackspan,
+body.ie8 .que.multianswer .feedbackspan,
+body.ie9 .que.multianswer .feedbackspan {
+    width: 70%;
+}
 .que.multianswer .answer .specificfeedback {
     display: inline;
     padding: 0 0.7em;