diff --git a/macao/assets/_custom.scss b/macao/assets/_custom.scss index 2cce685ee97a2e0a8ccabe647134c0d86d737c85..e116ac3144ea900d4687596eeebf702ee86f5d76 100644 --- a/macao/assets/_custom.scss +++ b/macao/assets/_custom.scss @@ -188,8 +188,16 @@ em:not(:has(strong)) { padding: 3px; padding-right: 4px; border-radius: 5px; +} +// *********************************** +// Dropdowns +// *********************************** +// Min width for dropdowns +.sv-dropdown_select-wrapper { + min-width: 150px !important; } + @import "plugins/_scrollbars.scss"; diff --git a/macao/assets/quiz.js b/macao/assets/quiz.js index 14db91f422173e836bc38c7a0a962c2c03669e83..1adac2669c02ab83c44af264679ae40789872749 100644 --- a/macao/assets/quiz.js +++ b/macao/assets/quiz.js @@ -138,6 +138,18 @@ $(function () { helpButton.onclick = () => toggleHelpComment(options.question, options.htmlElement); options.htmlElement.appendChild(helpButton); } + + if( options.question.getType() === "dropdown" ) { + // Very ugly fix to avoid sliding dropdown on focus + $('.book-article').css({ + 'will-change' : 'unset', + 'transition': 'none', + }); + $('.book-page').css({ + 'will-change' : 'unset', + 'transition': 'none', + }); + } }); // Add "Check answers" button diff --git a/macao/content/activities/devActi2/quiz.json b/macao/content/activities/devActi2/quiz.json index b6a6f817f92e0cd54f40f8871466ad1ea4de350c..54be48f21b5538ee49413bce39b99e3a1d6dbc8e 100644 --- a/macao/content/activities/devActi2/quiz.json +++ b/macao/content/activities/devActi2/quiz.json @@ -1,49 +1,22 @@ { - "pages": [ + "correctComment": "C'est cela!\n **OF** est le seul mot commun aux deux énoncés.", + "incorrectComment": "Vous vous trompez.\n **OF** est le seul mot commun aux deux énoncés. Vous pouvez réécouter les énoncés.", + "elements": [ { - "elements": [ - { - "name": "pg310_1", - "type": "radiogroup", - "title": "<div><audio id=\"e29anj_s1lc_remarque_accen1_13_1.mp3\"><source src=\"/macao-hugo/media/e29anj_s1lc_remarque_accen1/e29anj_s1lc_remarque_accen1_13.mp3\" type=\"audio/mpeg\"></audio><button onclick=\"document.getElementById('e29anj_s1lc_remarque_accen1_13_1.mp3').play()\" class=\"notext\">Play</button> AAA</div>", - "choices": [ - { - "value": 0, - "text": "Test 1;" - }, - { - "value": 1, - "text": "Test 1;" - } - ], - "correctAnswer": 0 - } - ] - }, - { - "elements": [ - { - "name": "pg310_2", - "type": "radiogroup", - "title": "<div><audio id=\"e29anj_s1lc_remarque_accen1_13_2.mp3\"><source src=\"/macao-hugo/media/e29anj_s1lc_remarque_accen1/e29anj_s1lc_remarque_accen1_13.mp3\" type=\"audio/mpeg\"></audio><button onclick=\"document.getElementById('e29anj_s1lc_remarque_accen1_13_2.mp3').play()\" class=\"notext\">Play</button> BBB</div>", - "choices": [ - { - "value": 0, - "text": "&Test 1;" - }, - { - "value": 1, - "text": "Test1;" - } - ], - "correctAnswer": 0 - } - ] + "type": "dropdown", + "name": "question1", + "customFormat": "one_line", + "title": "<div><audio id=\"e29_macao1_2b11_01.mp3\" ><source src=\"/macao-hugo\/macao\/static\/media\/e29_macao1_2b11\/e29_macao1_2b11_01.mp3\" type=\"audio\/mpeg\"><\/audio><button onclick=\"document.getElementById('e29_macao1_2b11_01.mp3').play()\">Play<\/button><\/div> <div><audio id=\"e29_macao1_2b21_01.mp3\" ><source src=\"\/macao-hugo\/macao\/static\/media\/e29_macao1_2b21\/e29_macao1_2b21_01.mp3\" type=\"audio\/mpeg\"><\/audio><button onclick=\"document.getElementById('e29_macao1_2b21_01.mp3').play()\">Play<\/button><\/div>", + "choices": [ + { "value": 1, "text": "at" }, + { "value": 2, "text": "for" }, + { "value": 3, "text": "in" }, + { "value": 4, "text": "of" }, + { "value": 5, "text": "on" }, + { "value": 6, "text": "to" } + ], + "enableHtml": true, + "correctAnswer": 4 } - ], - "goNextPageAutomatic": true, - "showQuestionNumbers": "none", - "isSurveySummaryVisible": true, - "processValue": true + ] } -