Différences
Ci-dessous, les différences entre deux révisions de la page.
| Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédente | ||
| cours:jpc:stic:trx:lescaphandreetlepapillon [22/01/2012 19:23] – lilym | cours:jpc:stic:trx:lescaphandreetlepapillon [01/06/2026 14:20] (Version actuelle) – changement de plugin de fontcolor vers color jpc | ||
|---|---|---|---|
| Ligne 1: | Ligne 1: | ||
| <WRAP classes info> | <WRAP classes info> | ||
| - | //** Page créée par : <fc # | + | //** Page créée par : <color # |
| **// | **// | ||
| </ | </ | ||
| Ligne 15: | Ligne 15: | ||
| ===== EXTRAIT DU LIVRE ===== | ===== EXTRAIT DU LIVRE ===== | ||
| - | (début de l' | + | <color #808080>(début de l' |
| - | | + | "A day in the life" |
| - | <fc # | + | <color # |
| // | // | ||
| - | </fc> | + | </color> |
| ==== La chasse aux intrus et aux synonymes ==== | ==== La chasse aux intrus et aux synonymes ==== | ||
| Ligne 29: | Ligne 29: | ||
| ==== Vocabulaire ==== | ==== Vocabulaire ==== | ||
| - | Complétez | + | <color # |
| ==== Comparaisons ==== | ==== Comparaisons ==== | ||
| Ligne 37: | Ligne 37: | ||
| ===== CIVILISATION ===== | ===== CIVILISATION ===== | ||
| - | Pour mieux comprendre les expressions idiomatiques en français (regardez le contexte qui est une explication) | + | <color # |
| - | Puis, faites l' | + | {{http:// |
| + | |||
| + | <color # | ||
| ===== BANDE ANNONCE DU FILM ===== | ===== BANDE ANNONCE DU FILM ===== | ||
| - | < | + | {{youtube> |
| - | <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" | + | |
| - | </ | + | < |
| + | < | ||
| + | | ||
| + | | ||
| + | |||
| + | <link rel=" | ||
| + | <meta name="DC:Creator" | ||
| + | <meta name=" | ||
| + | |||
| + | |||
| + | <meta http-equiv=" | ||
| + | |||
| + | < | ||
| + | Recomposer les phrases. Un exemple vous est donné. | ||
| + | </ | ||
| + | |||
| + | <!-- Made with executable version 6.3 Release 0 Build 4 --> | ||
| + | |||
| + | <!-- The following insertion allows you to add your own code directly to this head tag from the configuration screen --> | ||
| + | |||
| + | |||
| + | |||
| + | <style type=" | ||
| + | |||
| + | |||
| + | /* This is the CSS stylesheet used in the exercise. */ | ||
| + | /* Elements in square brackets are replaced by data based on configuration settings when the exercise is built. */ | ||
| + | |||
| + | /* BeginCorePageCSS */ | ||
| + | |||
| + | /* Made with executable version 6.3 Release 0 Build 4 */ | ||
| + | |||
| + | |||
| + | /* Hack to hide a nested Quicktime player from IE, which can't handle it. */ | ||
| + | * html object.MediaPlayerNotForIE { | ||
| + | display: none; | ||
| + | } | ||
| + | |||
| + | body{ | ||
| + | font-family: | ||
| + | background-color: | ||
| + | color: #004080; | ||
| + | |||
| + | margin-right: | ||
| + | margin-left: | ||
| + | font-size: small; | ||
| + | } | ||
| + | |||
| + | p{ | ||
| + | text-align: | ||
| + | margin: 0px; | ||
| + | font-size: 100%; | ||
| + | } | ||
| + | |||
| + | table, | ||
| + | font-size: 100%; | ||
| + | color: #004080; | ||
| + | } | ||
| + | |||
| + | div.Titles{ | ||
| + | padding: 0.5em;; | ||
| + | text-align: | ||
| + | color: #ff0080; | ||
| + | } | ||
| + | |||
| + | button{ | ||
| + | font-family: | ||
| + | font-size: 100%; | ||
| + | display: inline; | ||
| + | } | ||
| + | |||
| + | .ExerciseTitle{ | ||
| + | font-size: 140%; | ||
| + | color: #ff0080; | ||
| + | } | ||
| + | |||
| + | .ExerciseSubtitle{ | ||
| + | font-size: 120%; | ||
| + | color: #ff0080; | ||
| + | } | ||
| + | |||
| + | div.StdDiv{ | ||
| + | background-color: | ||
| + | text-align: | ||
| + | font-size: 100%; | ||
| + | color: #004080; | ||
| + | padding: 0.5em; | ||
| + | border-style: | ||
| + | border-width: | ||
| + | border-color: | ||
| + | margin-bottom: | ||
| + | } | ||
| + | |||
| + | /* EndCorePageCSS */ | ||
| + | |||
| + | .RTLText{ | ||
| + | text-align: | ||
| + | font-size: 150%; | ||
| + | direction: rtl; | ||
| + | font-family: | ||
| + | } | ||
| + | |||
| + | .CentredRTLText{ | ||
| + | text-align: | ||
| + | font-size: 150%; | ||
| + | direction: rtl; | ||
| + | font-family: | ||
| + | } | ||
| + | |||
| + | button p.RTLText{ | ||
| + | text-align: | ||
| + | } | ||
| + | |||
| + | .RTLGapBox{ | ||
| + | text-align: | ||
| + | font-size: 150%; | ||
| + | direction: rtl; | ||
| + | font-family: | ||
| + | } | ||
| + | |||
| + | .Guess{ | ||
| + | font-weight: | ||
| + | } | ||
| + | |||
| + | .CorrectAnswer{ | ||
| + | font-weight: | ||
| + | } | ||
| + | |||
| + | div# | ||
| + | padding: 0.25em; | ||
| + | margin-left: | ||
| + | margin-right: | ||
| + | text-align: | ||
| + | color: #ff0080; | ||
| + | } | ||
| + | |||
| + | span# | ||
| + | padding: 0.25em; | ||
| + | border-width: | ||
| + | border-style: | ||
| + | font-weight: | ||
| + | display: none; | ||
| + | color: #ff0080; | ||
| + | } | ||
| + | |||
| + | span.Instructions{ | ||
| + | |||
| + | } | ||
| + | |||
| + | div.ExerciseText{ | ||
| + | |||
| + | } | ||
| + | |||
| + | .FeedbackText, | ||
| + | color: #ff0080; | ||
| + | } | ||
| + | |||
| + | .LeftItem{ | ||
| + | font-size: 100%; | ||
| + | color: #004080; | ||
| + | text-align: | ||
| + | } | ||
| + | |||
| + | .RightItem{ | ||
| + | font-weight: | ||
| + | font-size: 100%; | ||
| + | color: #004080; | ||
| + | } | ||
| + | |||
| + | span.CorrectMark{ | ||
| + | |||
| + | } | ||
| + | |||
| + | input, textarea{ | ||
| + | font-family: | ||
| + | font-size: 120%; | ||
| + | } | ||
| + | |||
| + | select{ | ||
| + | font-size: 100%; | ||
| + | } | ||
| + | |||
| + | div.Feedback { | ||
| + | background-color: | ||
| + | left: 33%; | ||
| + | width: 34%; | ||
| + | top: 33%; | ||
| + | z-index: 1; | ||
| + | border-style: | ||
| + | border-width: | ||
| + | padding: 5px; | ||
| + | text-align: | ||
| + | color: #ff0080; | ||
| + | position: absolute; | ||
| + | display: none; | ||
| + | font-size: 100%; | ||
| + | } | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | div.ExerciseDiv{ | ||
| + | color: #004080; | ||
| + | } | ||
| + | |||
| + | /* JMatch flashcard styles */ | ||
| + | table.FlashcardTable{ | ||
| + | background-color: | ||
| + | color: #004080; | ||
| + | border-color: | ||
| + | margin-left: | ||
| + | margin-right: | ||
| + | margin-top: | ||
| + | margin-bottom: | ||
| + | width: 90%; | ||
| + | position: relative; | ||
| + | text-align: | ||
| + | padding: 0px; | ||
| + | } | ||
| + | |||
| + | table.FlashcardTable tr{ | ||
| + | border-style: | ||
| + | margin: 0px; | ||
| + | padding: 0px; | ||
| + | background-color: | ||
| + | } | ||
| + | |||
| + | table.FlashcardTable td.Showing{ | ||
| + | font-size: 140%; | ||
| + | text-align: | ||
| + | width: 50%; | ||
| + | display: table-cell; | ||
| + | padding: 2em; | ||
| + | margin: 0px; | ||
| + | border-style: | ||
| + | border-width: | ||
| + | color: #004080; | ||
| + | background-color: | ||
| + | } | ||
| + | |||
| + | table.FlashcardTable td.Hidden{ | ||
| + | display: none; | ||
| + | } | ||
| + | |||
| + | /* JMix styles */ | ||
| + | div# | ||
| + | margin-top: | ||
| + | margin-bottom: | ||
| + | text-align: | ||
| + | } | ||
| + | |||
| + | a.ExSegment{ | ||
| + | font-size: 120%; | ||
| + | font-weight: | ||
| + | text-decoration: | ||
| + | color: #004080; | ||
| + | } | ||
| + | |||
| + | span.RemainingWordList{ | ||
| + | font-style: | ||
| + | } | ||
| + | |||
| + | div.DropLine { | ||
| + | position: absolute; | ||
| + | text-align: | ||
| + | border-bottom-style: | ||
| + | border-bottom-width: | ||
| + | border-bottom-color: | ||
| + | width: 80%; | ||
| + | } | ||
| + | |||
| + | /* JCloze styles */ | ||
| + | |||
| + | .ClozeWordList{ | ||
| + | text-align: | ||
| + | font-weight: | ||
| + | } | ||
| + | |||
| + | div.ClozeBody{ | ||
| + | text-align: | ||
| + | margin-top: | ||
| + | margin-bottom: | ||
| + | line-height: | ||
| + | } | ||
| + | |||
| + | span.GapSpan{ | ||
| + | font-weight: | ||
| + | } | ||
| + | |||
| + | /* JCross styles */ | ||
| + | |||
| + | table.CrosswordGrid{ | ||
| + | margin: auto auto 1em auto; | ||
| + | border-collapse: | ||
| + | padding: 0px; | ||
| + | background-color: | ||
| + | } | ||
| + | |||
| + | table.CrosswordGrid tbody tr td{ | ||
| + | width: 1.5em; | ||
| + | height: 1.5em; | ||
| + | text-align: | ||
| + | vertical-align: | ||
| + | font-size: 140%; | ||
| + | padding: 1px; | ||
| + | margin: 0px; | ||
| + | border-style: | ||
| + | border-width: | ||
| + | border-color: | ||
| + | color: #000000; | ||
| + | } | ||
| + | |||
| + | table.CrosswordGrid span{ | ||
| + | color: #000000; | ||
| + | } | ||
| + | |||
| + | table.CrosswordGrid td.BlankCell{ | ||
| + | background-color: | ||
| + | color: #000000; | ||
| + | } | ||
| + | |||
| + | table.CrosswordGrid td.LetterOnlyCell{ | ||
| + | text-align: | ||
| + | vertical-align: | ||
| + | background-color: | ||
| + | color: #000000; | ||
| + | font-weight: | ||
| + | } | ||
| + | |||
| + | table.CrosswordGrid td.NumLetterCell{ | ||
| + | text-align: | ||
| + | vertical-align: | ||
| + | background-color: | ||
| + | color: #000000; | ||
| + | padding: 1px; | ||
| + | font-weight: | ||
| + | } | ||
| + | |||
| + | .NumLetterCellText{ | ||
| + | cursor: pointer; | ||
| + | color: #000000; | ||
| + | } | ||
| + | |||
| + | .GridNum{ | ||
| + | vertical-align: | ||
| + | font-size: 66%; | ||
| + | font-weight: bold; | ||
| + | text-decoration: | ||
| + | color: #000000; | ||
| + | } | ||
| + | |||
| + | .GridNum: | ||
| + | color: #000000; | ||
| + | } | ||
| + | |||
| + | table# | ||
| + | margin: auto; | ||
| + | vertical-align: | ||
| + | } | ||
| + | |||
| + | table#Clues td{ | ||
| + | vertical-align: | ||
| + | } | ||
| + | |||
| + | table.ClueList{ | ||
| + | margin: auto; | ||
| + | } | ||
| + | |||
| + | td.ClueNum{ | ||
| + | text-align: | ||
| + | font-weight: | ||
| + | vertical-align: | ||
| + | } | ||
| + | |||
| + | td.Clue{ | ||
| + | text-align: | ||
| + | } | ||
| + | |||
| + | div# | ||
| + | text-align: | ||
| + | margin-bottom: | ||
| + | } | ||
| + | |||
| + | /* Keypad styles */ | ||
| + | |||
| + | div.Keypad{ | ||
| + | text-align: | ||
| + | display: none; /* initially hidden, shown if needed */ | ||
| + | margin-bottom: | ||
| + | } | ||
| + | |||
| + | div.Keypad button{ | ||
| + | font-family: | ||
| + | font-size: 120%; | ||
| + | background-color: | ||
| + | color: #000000; | ||
| + | width: 2em; | ||
| + | } | ||
| + | |||
| + | /* JQuiz styles */ | ||
| + | |||
| + | div.QuestionNavigation{ | ||
| + | text-align: | ||
| + | } | ||
| + | |||
| + | .QNum{ | ||
| + | margin: 0em 1em 0.5em 1em; | ||
| + | font-weight: | ||
| + | vertical-align: | ||
| + | } | ||
| + | |||
| + | textarea{ | ||
| + | font-family: | ||
| + | } | ||
| + | |||
| + | .QuestionText{ | ||
| + | text-align: | ||
| + | margin: 0px; | ||
| + | font-size: 100%; | ||
| + | } | ||
| + | |||
| + | .Answer{ | ||
| + | font-size: 120%; | ||
| + | letter-spacing: 0.1em; | ||
| + | } | ||
| + | |||
| + | .PartialAnswer{ | ||
| + | font-size: 120%; | ||
| + | letter-spacing: 0.1em; | ||
| + | color: #ff0080; | ||
| + | } | ||
| + | |||
| + | .Highlight{ | ||
| + | color: #000000; | ||
| + | background-color: | ||
| + | font-weight: | ||
| + | font-size: 120%; | ||
| + | } | ||
| + | |||
| + | ol.QuizQuestions{ | ||
| + | text-align: | ||
| + | list-style-type: | ||
| + | } | ||
| + | |||
| + | li.QuizQuestion{ | ||
| + | padding: 1em; | ||
| + | border-style: | ||
| + | border-width: | ||
| + | } | ||
| + | |||
| + | ol.MCAnswers{ | ||
| + | text-align: | ||
| + | list-style-type: | ||
| + | padding: 1em; | ||
| + | } | ||
| + | |||
| + | ol.MCAnswers li{ | ||
| + | margin-bottom: | ||
| + | } | ||
| + | |||
| + | ol.MSelAnswers{ | ||
| + | text-align: | ||
| + | list-style-type: | ||
| + | padding: 1em; | ||
| + | } | ||
| + | |||
| + | div.ShortAnswer{ | ||
| + | padding: 1em; | ||
| + | } | ||
| + | |||
| + | .FuncButton { | ||
| + | text-align: | ||
| + | border-style: | ||
| + | |||
| + | border-left-color: | ||
| + | border-top-color: | ||
| + | border-right-color: | ||
| + | border-bottom-color: | ||
| + | color: #004080; | ||
| + | background-color: | ||
| + | |||
| + | border-width: | ||
| + | padding: 3px 6px 3px 6px; | ||
| + | cursor: pointer; | ||
| + | } | ||
| + | |||
| + | .FuncButtonUp { | ||
| + | color: #ff8040; | ||
| + | text-align: | ||
| + | border-style: | ||
| + | |||
| + | border-left-color: | ||
| + | border-top-color: | ||
| + | border-right-color: | ||
| + | border-bottom-color: | ||
| + | |||
| + | background-color: | ||
| + | color: #ff8040; | ||
| + | border-width: | ||
| + | padding: 3px 6px 3px 6px; | ||
| + | cursor: pointer; | ||
| + | } | ||
| + | |||
| + | .FuncButtonDown { | ||
| + | color: #ff8040; | ||
| + | text-align: | ||
| + | border-style: | ||
| + | |||
| + | border-left-color: | ||
| + | border-top-color: | ||
| + | border-right-color: | ||
| + | border-bottom-color: | ||
| + | background-color: | ||
| + | color: #ff8040; | ||
| + | |||
| + | border-width: | ||
| + | padding: 3px 6px 3px 6px; | ||
| + | cursor: pointer; | ||
| + | } | ||
| + | |||
| + | / | ||
| + | |||
| + | div.NavButtonBar{ | ||
| + | background-color: | ||
| + | text-align: | ||
| + | margin: 2px 0px 2px 0px; | ||
| + | clear: both; | ||
| + | font-size: 100%; | ||
| + | } | ||
| + | |||
| + | .NavButton { | ||
| + | border-style: solid; | ||
| + | |||
| + | border-left-color: | ||
| + | border-top-color: | ||
| + | border-right-color: | ||
| + | border-bottom-color: | ||
| + | background-color: | ||
| + | color: #000000; | ||
| + | |||
| + | border-width: | ||
| + | cursor: pointer; | ||
| + | } | ||
| + | |||
| + | .NavButtonUp { | ||
| + | border-style: | ||
| + | |||
| + | border-left-color: | ||
| + | border-top-color: | ||
| + | border-right-color: | ||
| + | border-bottom-color: | ||
| + | color: #ffff00; | ||
| + | background-color: | ||
| + | |||
| + | border-width: | ||
| + | cursor: pointer; | ||
| + | } | ||
| + | |||
| + | .NavButtonDown { | ||
| + | border-style: | ||
| + | |||
| + | border-left-color: | ||
| + | border-top-color: | ||
| + | border-right-color: | ||
| + | border-bottom-color: | ||
| + | color: #ffff00; | ||
| + | background-color: | ||
| + | |||
| + | border-width: | ||
| + | cursor: pointer; | ||
| + | } | ||
| + | |||
| + | / | ||
| + | |||
| + | a{ | ||
| + | color: #0000FF; | ||
| + | } | ||
| + | |||
| + | a: | ||
| + | color: #0000CC; | ||
| + | } | ||
| + | |||
| + | a:hover{ | ||
| + | color: #0000FF; | ||
| + | } | ||
| + | |||
| + | div.CardStyle { | ||
| + | position: absolute; | ||
| + | font-family: | ||
| + | font-size: 100%; | ||
| + | padding: 5px; | ||
| + | border-style: solid; | ||
| + | border-width: | ||
| + | color: #004080; | ||
| + | background-color: | ||
| + | left: -50px; | ||
| + | top: -50px; | ||
| + | overflow: visible; | ||
| + | } | ||
| + | |||
| + | .rtl{ | ||
| + | text-align: | ||
| + | font-size: 140%; | ||
| + | } | ||
| + | |||
| + | |||
| + | </ | ||
| + | |||
| + | <script type=" | ||
| + | |||
| + | //< | ||
| + | |||
| + | <!-- | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | function Client(){ | ||
| + | //if not a DOM browser, hopeless | ||
| + | this.min = false; if (document.getElementById){this.min | ||
| + | |||
| + | this.ua | ||
| + | this.name | ||
| + | this.ver | ||
| + | |||
| + | //Get data about the browser | ||
| + | this.mac | ||
| + | this.win = (this.ver.indexOf(' | ||
| + | |||
| + | //Look for Gecko | ||
| + | this.gecko = (this.ua.indexOf(' | ||
| + | if (this.gecko){ | ||
| + | this.geckoVer = parseInt(this.ua.substring(this.ua.indexOf(' | ||
| + | if (this.geckoVer < 20020000){this.min = false;} | ||
| + | } | ||
| + | |||
| + | //Look for Firebird | ||
| + | this.firebird = (this.ua.indexOf(' | ||
| + | |||
| + | //Look for Safari | ||
| + | this.safari = (this.ua.indexOf(' | ||
| + | if (this.safari){ | ||
| + | this.gecko = false; | ||
| + | } | ||
| + | |||
| + | //Look for IE | ||
| + | this.ie = (this.ua.indexOf(' | ||
| + | if (this.ie){ | ||
| + | this.ieVer = parseFloat(this.ua.substring(this.ua.indexOf(' | ||
| + | if (this.ieVer < 5.5){this.min = false;} | ||
| + | } | ||
| + | |||
| + | //Look for Opera | ||
| + | this.opera = (this.ua.indexOf(' | ||
| + | if (this.opera){ | ||
| + | this.operaVer = parseFloat(this.ua.substring(this.ua.indexOf(' | ||
| + | if (this.operaVer < 7.04){this.min = false;} | ||
| + | } | ||
| + | if (this.min == false){ | ||
| + | alert(' | ||
| + | } | ||
| + | |||
| + | //Special case for the horrible ie5mac | ||
| + | this.ie5mac = (this.ie&& | ||
| + | } | ||
| + | |||
| + | var C = new Client(); | ||
| + | |||
| + | //for (prop in C){ | ||
| + | // | ||
| + | //} | ||
| + | |||
| + | |||
| + | |||
| + | //CODE FOR HANDLING NAV BUTTONS AND FUNCTION BUTTONS | ||
| + | |||
| + | // | ||
| + | function NavBtnOver(Btn){ | ||
| + | if (Btn.className != ' | ||
| + | } | ||
| + | |||
| + | function NavBtnOut(Btn){ | ||
| + | Btn.className = ' | ||
| + | } | ||
| + | |||
| + | function NavBtnDown(Btn){ | ||
| + | Btn.className = ' | ||
| + | } | ||
| + | // | ||
| + | |||
| + | function FuncBtnOver(Btn){ | ||
| + | if (Btn.className != ' | ||
| + | } | ||
| + | |||
| + | function FuncBtnOut(Btn){ | ||
| + | Btn.className = ' | ||
| + | } | ||
| + | |||
| + | function FuncBtnDown(Btn){ | ||
| + | Btn.className = ' | ||
| + | } | ||
| + | |||
| + | function FocusAButton(){ | ||
| + | if (document.getElementById(' | ||
| + | document.getElementById(' | ||
| + | } | ||
| + | else{ | ||
| + | if (document.getElementById(' | ||
| + | document.getElementById(' | ||
| + | } | ||
| + | else{ | ||
| + | document.getElementsByTagName(' | ||
| + | } | ||
| + | } | ||
| + | } | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | //CODE FOR HANDLING DISPLAY OF POPUP FEEDBACK BOX | ||
| + | |||
| + | var topZ = 1000; | ||
| + | |||
| + | function ShowMessage(Feedback){ | ||
| + | var Output = Feedback + '< | ||
| + | document.getElementById(' | ||
| + | var FDiv = document.getElementById(' | ||
| + | topZ++; | ||
| + | FDiv.style.zIndex = topZ; | ||
| + | FDiv.style.top = TopSettingWithScrollOffset(30) + ' | ||
| + | |||
| + | FDiv.style.display = ' | ||
| + | |||
| + | ShowElements(false, | ||
| + | ShowElements(false, | ||
| + | ShowElements(false, | ||
| + | ShowElements(true, | ||
| + | |||
| + | //Focus the OK button | ||
| + | setTimeout(" | ||
| + | |||
| + | // | ||
| + | } | ||
| + | |||
| + | function ShowElements(Show, | ||
| + | // added third argument to allow objects in the feedback box to appear | ||
| + | //IE bug -- hide all the form elements that will show through the popup | ||
| + | //FF on Mac bug : doesn' | ||
| + | //unless the object' | ||
| + | |||
| + | //get container object (by Id passed in, or use document otherwise) | ||
| + | TopNode = document.getElementById(ContainerToReverse); | ||
| + | var Els; | ||
| + | if (TopNode != null) { | ||
| + | Els = TopNode.getElementsByTagName(TagName); | ||
| + | } else { | ||
| + | Els = document.getElementsByTagName(TagName); | ||
| + | } | ||
| + | |||
| + | for (var i=0; i< | ||
| + | if (TagName == " | ||
| + | // | ||
| + | if (Show == true){ | ||
| + | Els[i].style.visibility = ' | ||
| + | //get Mac FireFox to manipulate display, to force screen redraw | ||
| + | if (C.mac | ||
| + | } | ||
| + | else{ | ||
| + | Els[i].style.visibility | ||
| + | if (C.mac | ||
| + | } | ||
| + | } | ||
| + | else { | ||
| + | // tagName is either input or select (that is, Form Elements) | ||
| + | // ie6 has a problem with Form elements, so manipulate those | ||
| + | if (C.ie) { | ||
| + | if (C.ieVer < 7) { | ||
| + | if (Show == true){ | ||
| + | Els[i].style.visibility = ' | ||
| + | } | ||
| + | else{ | ||
| + | Els[i].style.visibility = ' | ||
| + | } | ||
| + | } | ||
| + | } | ||
| + | } | ||
| + | } | ||
| + | } | ||
| + | |||
| + | |||
| + | |||
| + | function HideFeedback(){ | ||
| + | document.getElementById(' | ||
| + | ShowElements(true, | ||
| + | ShowElements(true, | ||
| + | ShowElements(true, | ||
| + | if (Finished == true){ | ||
| + | Finish(); | ||
| + | } | ||
| + | } | ||
| + | |||
| + | |||
| + | //GENERAL UTILITY FUNCTIONS AND VARIABLES | ||
| + | |||
| + | //PAGE DIMENSION FUNCTIONS | ||
| + | function PageDim(){ | ||
| + | //Get the page width and height | ||
| + | this.W = 600; | ||
| + | this.H = 400; | ||
| + | this.W = document.getElementsByTagName(' | ||
| + | this.H = document.getElementsByTagName(' | ||
| + | } | ||
| + | |||
| + | var pg = null; | ||
| + | |||
| + | function GetPageXY(El) { | ||
| + | var XY = {x: 0, y: 0}; | ||
| + | while(El){ | ||
| + | XY.x += El.offsetLeft; | ||
| + | XY.y += El.offsetTop; | ||
| + | El = El.offsetParent; | ||
| + | } | ||
| + | return XY; | ||
| + | } | ||
| + | |||
| + | function GetScrollTop(){ | ||
| + | if (typeof(window.pageYOffset) == ' | ||
| + | return window.pageYOffset; | ||
| + | } | ||
| + | else{ | ||
| + | if ((document.body)&& | ||
| + | return document.body.scrollTop; | ||
| + | } | ||
| + | else{ | ||
| + | if ((document.documentElement)&& | ||
| + | return document.documentElement.scrollTop; | ||
| + | } | ||
| + | else{ | ||
| + | return 0; | ||
| + | } | ||
| + | } | ||
| + | } | ||
| + | } | ||
| + | |||
| + | function GetViewportHeight(){ | ||
| + | if (typeof window.innerHeight != ' | ||
| + | return window.innerHeight; | ||
| + | } | ||
| + | else{ | ||
| + | if (((typeof document.documentElement != ' | ||
| + | ' | ||
| + | return document.documentElement.clientHeight; | ||
| + | } | ||
| + | else{ | ||
| + | return document.getElementsByTagName(' | ||
| + | } | ||
| + | } | ||
| + | } | ||
| + | |||
| + | function TopSettingWithScrollOffset(TopPercent){ | ||
| + | var T = Math.floor(GetViewportHeight() * (TopPercent/ | ||
| + | return GetScrollTop() + T; | ||
| + | } | ||
| + | |||
| + | //CODE FOR AVOIDING LOSS OF DATA WHEN BACKSPACE KEY INVOKES history.back() | ||
| + | var InTextBox = false; | ||
| + | |||
| + | function SuppressBackspace(e){ | ||
| + | if (InTextBox == true){return; | ||
| + | if (C.ie) { | ||
| + | thisKey = window.event.keyCode; | ||
| + | } | ||
| + | else { | ||
| + | thisKey = e.keyCode; | ||
| + | } | ||
| + | |||
| + | var Suppress = false; | ||
| + | |||
| + | if (thisKey == 8) { | ||
| + | Suppress = true; | ||
| + | } | ||
| + | |||
| + | if (Suppress == true){ | ||
| + | if (C.ie){ | ||
| + | window.event.returnValue = false; | ||
| + | window.event.cancelBubble = true; | ||
| + | } | ||
| + | else{ | ||
| + | e.preventDefault(); | ||
| + | } | ||
| + | } | ||
| + | } | ||
| + | |||
| + | if (C.ie){ | ||
| + | document.attachEvent(' | ||
| + | window.attachEvent(' | ||
| + | } | ||
| + | else{ | ||
| + | if (window.addEventListener){ | ||
| + | window.addEventListener(' | ||
| + | } | ||
| + | } | ||
| + | |||
| + | function ReduceItems(InArray, | ||
| + | var ItemToDump=0; | ||
| + | var j=0; | ||
| + | while (InArray.length > ReduceToSize){ | ||
| + | ItemToDump = Math.floor(InArray.length*Math.random()); | ||
| + | InArray.splice(ItemToDump, | ||
| + | } | ||
| + | } | ||
| + | |||
| + | function Shuffle(InArray){ | ||
| + | var Num; | ||
| + | var Temp = new Array(); | ||
| + | var Len = InArray.length; | ||
| + | |||
| + | var j = Len; | ||
| + | |||
| + | for (var i=0; i<Len; i++){ | ||
| + | Temp[i] = InArray[i]; | ||
| + | } | ||
| + | |||
| + | for (i=0; i<Len; i++){ | ||
| + | Num = Math.floor(j | ||
| + | InArray[i] = Temp[Num]; | ||
| + | |||
| + | for (var k=Num; k < (j-1); k++) { | ||
| + | Temp[k] = Temp[k+1]; | ||
| + | } | ||
| + | j--; | ||
| + | } | ||
| + | return InArray; | ||
| + | } | ||
| + | |||
| + | function WriteToInstructions(Feedback) { | ||
| + | document.getElementById(' | ||
| + | |||
| + | } | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | function EscapeDoubleQuotes(InString){ | ||
| + | return InString.replace(/"/ | ||
| + | } | ||
| + | |||
| + | function TrimString(InString){ | ||
| + | var x = 0; | ||
| + | |||
| + | if (InString.length != 0) { | ||
| + | while ((InString.charAt(InString.length | ||
| + | InString = InString.substring(0, | ||
| + | } | ||
| + | |||
| + | while ((InString.charAt(0) == ' | ||
| + | InString = InString.substring(1, | ||
| + | } | ||
| + | |||
| + | while (InString.indexOf(' | ||
| + | x = InString.indexOf(' | ||
| + | InString = InString.substring(0, x) + InString.substring(x+1, | ||
| + | } | ||
| + | |||
| + | return InString; | ||
| + | } | ||
| + | |||
| + | else { | ||
| + | return ''; | ||
| + | } | ||
| + | } | ||
| + | |||
| + | function FindLongest(InArray){ | ||
| + | if (InArray.length < 1){return -1;} | ||
| + | |||
| + | var Longest = 0; | ||
| + | for (var i=1; i< | ||
| + | if (InArray[i].length > InArray[Longest].length){ | ||
| + | Longest = i; | ||
| + | } | ||
| + | } | ||
| + | return Longest; | ||
| + | } | ||
| + | |||
| + | //UNICODE CHARACTER FUNCTIONS | ||
| + | function IsCombiningDiacritic(CharNum){ | ||
| + | var Result = (((CharNum >= 0x0300)&& | ||
| + | Result = Result || (((CharNum >= 0x3099)&& | ||
| + | return Result; | ||
| + | } | ||
| + | |||
| + | function IsCJK(CharNum){ | ||
| + | return ((CharNum >= 0x3000)&& | ||
| + | } | ||
| + | |||
| + | //SETUP FUNCTIONS | ||
| + | //BROWSER WILL REFILL TEXT BOXES FROM CACHE IF NOT PREVENTED | ||
| + | function ClearTextBoxes(){ | ||
| + | var NList = document.getElementsByTagName(' | ||
| + | for (var i=0; i< | ||
| + | if ((NList[i].id.indexOf(' | ||
| + | NList[i].value = ''; | ||
| + | } | ||
| + | if (NList[i].id.indexOf(' | ||
| + | NList[i].checked = ''; | ||
| + | } | ||
| + | } | ||
| + | } | ||
| + | |||
| + | //EXTENSION TO ARRAY OBJECT | ||
| + | function Array_IndexOf(Input){ | ||
| + | var Result = -1; | ||
| + | for (var i=0; i<this.length; i++){ | ||
| + | if (this[i] == Input){ | ||
| + | Result = i; | ||
| + | } | ||
| + | } | ||
| + | return Result; | ||
| + | } | ||
| + | Array.prototype.indexOf = Array_IndexOf; | ||
| + | |||
| + | //IE HAS RENDERING BUG WITH BOTTOM NAVBAR | ||
| + | function RemoveBottomNavBarForIE(){ | ||
| + | if ((C.ie)&& | ||
| + | if (document.getElementById(' | ||
| + | document.getElementById(' | ||
| + | } | ||
| + | } | ||
| + | } | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | //HOTPOTNET-RELATED CODE | ||
| + | |||
| + | var HPNStartTime = (new Date()).getTime(); | ||
| + | var SubmissionTimeout = 30000; | ||
| + | var Detail = ''; | ||
| + | |||
| + | function Finish(){ | ||
| + | //If there' | ||
| + | if (document.store != null){ | ||
| + | Frm = document.store; | ||
| + | Frm.starttime.value = HPNStartTime; | ||
| + | Frm.endtime.value = (new Date()).getTime(); | ||
| + | Frm.mark.value = Score; | ||
| + | Frm.detail.value = Detail; | ||
| + | Frm.submit(); | ||
| + | } | ||
| + | } | ||
| + | |||
| + | |||
| + | |||
| + | function Card(ID, OverlapTolerance){ | ||
| + | this.elm=document.getElementById(ID); | ||
| + | this.name=ID; | ||
| + | this.css=this.elm.style; | ||
| + | this.elm.style.left = 0 +' | ||
| + | this.elm.style.top = 0 +' | ||
| + | this.HomeL = 0; | ||
| + | this.HomeT = 0; | ||
| + | this.tag=-1; | ||
| + | this.index=-1; | ||
| + | this.OverlapTolerance = OverlapTolerance; | ||
| + | } | ||
| + | |||
| + | function CardGetL(){return parseInt(this.css.left)} | ||
| + | Card.prototype.GetL=CardGetL; | ||
| + | |||
| + | function CardGetT(){return parseInt(this.css.top)} | ||
| + | Card.prototype.GetT=CardGetT; | ||
| + | |||
| + | function CardGetW(){return parseInt(this.elm.offsetWidth)} | ||
| + | Card.prototype.GetW=CardGetW; | ||
| + | |||
| + | function CardGetH(){return parseInt(this.elm.offsetHeight)} | ||
| + | Card.prototype.GetH=CardGetH; | ||
| + | |||
| + | function CardGetB(){return this.GetT()+this.GetH()} | ||
| + | Card.prototype.GetB=CardGetB; | ||
| + | |||
| + | function CardGetR(){return this.GetL()+this.GetW()} | ||
| + | Card.prototype.GetR=CardGetR; | ||
| + | |||
| + | function CardSetL(NewL){this.css.left = NewL+' | ||
| + | Card.prototype.SetL=CardSetL; | ||
| + | |||
| + | function CardSetT(NewT){this.css.top = NewT+' | ||
| + | Card.prototype.SetT=CardSetT; | ||
| + | |||
| + | function CardSetW(NewW){this.css.width = NewW+' | ||
| + | Card.prototype.SetW=CardSetW; | ||
| + | |||
| + | function CardSetH(NewH){this.css.height = NewH+' | ||
| + | Card.prototype.SetH=CardSetH; | ||
| + | |||
| + | function CardInside(X, | ||
| + | var Result=false; | ||
| + | if(X> | ||
| + | return Result; | ||
| + | } | ||
| + | Card.prototype.Inside=CardInside; | ||
| + | |||
| + | function CardSwapColours(){ | ||
| + | var c=this.css.backgroundColor; | ||
| + | this.css.backgroundColor=this.css.color; | ||
| + | this.css.color=c; | ||
| + | } | ||
| + | Card.prototype.SwapColours=CardSwapColours; | ||
| + | |||
| + | function CardHighlight(){ | ||
| + | this.css.backgroundColor='# | ||
| + | this.css.color='# | ||
| + | } | ||
| + | Card.prototype.Highlight=CardHighlight; | ||
| + | |||
| + | function CardUnhighlight(){ | ||
| + | this.css.backgroundColor='# | ||
| + | this.css.color='# | ||
| + | } | ||
| + | Card.prototype.Unhighlight=CardUnhighlight; | ||
| + | |||
| + | function CardOverlap(OtherCard){ | ||
| + | var smR=(this.GetR()< | ||
| + | var lgL=(this.GetL()> | ||
| + | var HDim=smR-lgL; | ||
| + | if (HDim< | ||
| + | var smB=(this.GetB()< | ||
| + | var lgT=(this.GetT()> | ||
| + | var VDim=smB-lgT; | ||
| + | if (VDim< | ||
| + | return (HDim*VDim); | ||
| + | } | ||
| + | Card.prototype.Overlap=CardOverlap; | ||
| + | |||
| + | function CardDockToR(OtherCard){ | ||
| + | this.SetL(OtherCard.GetR() + 5); | ||
| + | this.SetT(OtherCard.GetT()); | ||
| + | } | ||
| + | |||
| + | Card.prototype.DockToR=CardDockToR; | ||
| + | |||
| + | function CardSetHome(){ | ||
| + | this.HomeL=this.GetL(); | ||
| + | this.HomeT=this.GetT(); | ||
| + | } | ||
| + | Card.prototype.SetHome=CardSetHome; | ||
| + | |||
| + | function CardGoHome(){ | ||
| + | this.SetL(this.HomeL); | ||
| + | this.SetT(this.HomeT); | ||
| + | } | ||
| + | |||
| + | Card.prototype.GoHome=CardGoHome; | ||
| + | |||
| + | //Fix for 6.2.5.2: avoid image dragging problem in draggable cards | ||
| + | function CardSetHTML(HTML){ | ||
| + | this.elm.innerHTML = HTML; | ||
| + | var DragImgs = this.elm.getElementsByTagName(' | ||
| + | if (DragImgs.length > 0){ | ||
| + | for (var i=0; i< | ||
| + | DragImgs[i]. onmousedown = function(){return false;} | ||
| + | } | ||
| + | } | ||
| + | } | ||
| + | |||
| + | Card.prototype.SetHTML = CardSetHTML; | ||
| + | |||
| + | function doDrag(e) { | ||
| + | if (CurrDrag == -1) {return}; | ||
| + | if (C.ie){var Ev = window.event}else{var Ev = e} | ||
| + | var difX = Ev.clientX-window.lastX; | ||
| + | var difY = Ev.clientY-window.lastY; | ||
| + | var newX = DC[CurrDrag].GetL()+difX; | ||
| + | var newY = DC[CurrDrag].GetT()+difY; | ||
| + | DC[CurrDrag].SetL(newX); | ||
| + | DC[CurrDrag].SetT(newY); | ||
| + | window.lastX = Ev.clientX; | ||
| + | window.lastY = Ev.clientY; | ||
| + | return false; | ||
| + | } | ||
| + | |||
| + | function beginDrag(e, | ||
| + | CurrDrag = DragNum; | ||
| + | if (C.ie){ | ||
| + | var Ev = window.event; | ||
| + | document.onmousemove=doDrag; | ||
| + | document.onmouseup=endDrag; | ||
| + | } | ||
| + | else{ | ||
| + | var Ev = e; | ||
| + | window.onmousemove=doDrag; | ||
| + | window.onmouseup=endDrag; | ||
| + | } | ||
| + | DC[CurrDrag].Highlight(); | ||
| + | topZ++; | ||
| + | DC[CurrDrag].css.zIndex = topZ; | ||
| + | window.lastX=Ev.clientX; | ||
| + | window.lastY=Ev.clientY; | ||
| + | return false; | ||
| + | } | ||
| + | |||
| + | function endDrag(e) { | ||
| + | if (CurrDrag == -1) {return}; | ||
| + | DC[CurrDrag].Unhighlight(); | ||
| + | if (C.ie){document.onmousemove=null}else{window.onmousemove=null; | ||
| + | onEndDrag(); | ||
| + | CurrDrag = -1; | ||
| + | //Need a bugfix for Opera focus problem here | ||
| + | if (C.opera){FocusAButton(); | ||
| + | return true; | ||
| + | } | ||
| + | |||
| + | var CurrDrag = -1; | ||
| + | var topZ = 100; | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | // | ||
| + | |||
| + | var CorrectResponse = ' | ||
| + | var IncorrectResponse = ' | ||
| + | var YourScoreIs = 'Votre score est de'; | ||
| + | var DivWidth = 600; //default value | ||
| + | var FeedbackWidth = 200; //default | ||
| + | var ExBGColor = '# | ||
| + | var PageBGColor = '# | ||
| + | var TextColor = '# | ||
| + | var TitleColor = '# | ||
| + | var Penalties = 0; | ||
| + | var Score = 0; | ||
| + | var TimeOver = false; | ||
| + | var Locked = false; | ||
| + | var ShuffleQs = false; | ||
| + | var QsToShow = 8; | ||
| + | |||
| + | var DragWidth = 200; | ||
| + | var LeftColPos = 100; | ||
| + | var RightColPos = 500; | ||
| + | var DragTop = 120; | ||
| + | var Finished = false; | ||
| + | var AnswersTried = ''; | ||
| + | |||
| + | //Fixed and draggable card arrays | ||
| + | FC = new Array(); | ||
| + | DC = new Array(); | ||
| + | |||
| + | function onEndDrag(){ | ||
| + | //Is it dropped on any of the fixed cards? | ||
| + | var Docked = false; | ||
| + | var DropTarget = DroppedOnFixed(CurrDrag); | ||
| + | if (DropTarget > -1){ | ||
| + | //If so, send home any card that is currently docked there | ||
| + | for (var i=0; i< | ||
| + | if (DC[i].tag == DropTarget+1){ | ||
| + | DC[i].GoHome(); | ||
| + | DC[i].tag = 0; | ||
| + | D[i][2] = 0; | ||
| + | } | ||
| + | } | ||
| + | //Dock the dropped card | ||
| + | DC[CurrDrag].DockToR(FC[DropTarget]); | ||
| + | D[CurrDrag][2] = F[DropTarget][1]; | ||
| + | DC[CurrDrag].tag = DropTarget+1; | ||
| + | Docked = true; | ||
| + | } | ||
| + | |||
| + | if (Docked == false){ | ||
| + | DC[CurrDrag].GoHome(); | ||
| + | DC[CurrDrag].tag = 0; | ||
| + | D[CurrDrag][2] = 0; | ||
| + | } | ||
| + | } | ||
| + | |||
| + | function DroppedOnFixed(DNum){ | ||
| + | var Result = -1; | ||
| + | var OverlapArea = 0; | ||
| + | var Temp = 0; | ||
| + | for (var i=0; i<FC.length; i++){ | ||
| + | Temp = DC[DNum].Overlap(FC[i]); | ||
| + | if (Temp > OverlapArea){ | ||
| + | OverlapArea = Temp; | ||
| + | Result = i; | ||
| + | } | ||
| + | } | ||
| + | return Result; | ||
| + | } | ||
| + | |||
| + | |||
| + | function StartUp(){ | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | //Calculate page dimensions and positions | ||
| + | pg = new PageDim(); | ||
| + | DivWidth = Math.floor((pg.W*4)/ | ||
| + | DragWidth = Math.floor((DivWidth*3)/ | ||
| + | LeftColPos = Math.floor(pg.W/ | ||
| + | RightColPos = pg.W - (DragWidth + LeftColPos); | ||
| + | DragTop = parseInt(document.getElementById(' | ||
| + | |||
| + | if (C.ie){ | ||
| + | DragTop += 15; | ||
| + | } | ||
| + | |||
| + | //Reduce array if required | ||
| + | if (QsToShow < F.length){ | ||
| + | ReduceItems2(); | ||
| + | } | ||
| + | |||
| + | //Shuffle the left items if required | ||
| + | if (ShuffleQs == true){ | ||
| + | F = Shuffle(F); | ||
| + | } | ||
| + | |||
| + | //Shuffle the items on the right | ||
| + | D = Shuffle(D); | ||
| + | |||
| + | var CurrTop = DragTop; | ||
| + | var TempInt = 0; | ||
| + | var DropHome = 0; | ||
| + | var Widest = 0; | ||
| + | var CardContent = ''; | ||
| + | for (var i=0; i< | ||
| + | CardContent = F[i][0]; | ||
| + | FC[i] = new Card(' | ||
| + | FC[i].elm.innerHTML = CardContent; | ||
| + | if (FC[i].GetW() > Widest){ | ||
| + | Widest = FC[i].GetW(); | ||
| + | } | ||
| + | } | ||
| + | if (Widest > DragWidth){Widest = DragWidth; | ||
| + | |||
| + | CurrTop = DragTop; | ||
| + | |||
| + | DragWidth = Math.floor((DivWidth-Widest)/2) - 24; | ||
| + | RightColPos = DivWidth + LeftColPos - (DragWidth + 14); | ||
| + | var Highest = 0; | ||
| + | var WidestRight = 0; | ||
| + | |||
| + | for (i=0; i<D.length; i++){ | ||
| + | DC[i] = new Card(' | ||
| + | CardContent = D[i][0]; | ||
| + | |||
| + | //Fix for 6.2.5.2 problem with dragging images. | ||
| + | DC[i].SetHTML(CardContent); | ||
| + | // | ||
| + | if (DC[i].GetW() > DragWidth){DC[i].SetW(DragWidth); | ||
| + | DC[i].css.cursor = ' | ||
| + | DC[i].css.backgroundColor = '# | ||
| + | DC[i].css.color = '# | ||
| + | TempInt = DC[i].GetH(); | ||
| + | if (TempInt > Highest){Highest = TempInt;} | ||
| + | TempInt = DC[i].GetW(); | ||
| + | if (TempInt > WidestRight){WidestRight = TempInt;} | ||
| + | } | ||
| + | |||
| + | //Fix for 6.2: the reduction by 12 seems to be required -- no idea why! | ||
| + | var HeightToSet = Highest-12; | ||
| + | var WidthToSet = WidestRight-12; | ||
| + | |||
| + | for (i=0; i<D.length; i++){ | ||
| + | DC[i].SetT(CurrTop); | ||
| + | DC[i].SetL(RightColPos); | ||
| + | if (DC[i].GetH() < Highest){ | ||
| + | DC[i].SetH(HeightToSet); | ||
| + | } | ||
| + | if (DC[i].GetW() < WidestRight){ | ||
| + | DC[i].SetW(WidthToSet); | ||
| + | } | ||
| + | DC[i].SetHome(); | ||
| + | DC[i].tag = -1; | ||
| + | CurrTop = CurrTop + DC[i].GetH() + 5; | ||
| + | } | ||
| + | |||
| + | CurrTop = DragTop; | ||
| + | |||
| + | for (var i=0; i<F.length; i++){ | ||
| + | FC[i].SetW(Widest); | ||
| + | if (FC[i].GetH() < Highest){ | ||
| + | FC[i].SetH(HeightToSet); | ||
| + | } | ||
| + | FC[i].SetT(CurrTop); | ||
| + | FC[i].SetL(LeftColPos); | ||
| + | FC[i].SetHome(); | ||
| + | TempInt = FC[i].GetH(); | ||
| + | CurrTop = CurrTop + TempInt + 5; | ||
| + | } | ||
| + | |||
| + | |||
| + | //Slide any elements that should be in position over | ||
| + | for (i=0; i< | ||
| + | if (D[i][2] > 0){ | ||
| + | DC[i].tag = D[i][1]; | ||
| + | D[i][2] = D[i][1]; | ||
| + | var TopChange = 0; | ||
| + | //Find the right target element | ||
| + | var TargItem = -1; | ||
| + | for (var j=0; j<F.length; j++){ | ||
| + | if (F[j][1] == D[i][1]){ | ||
| + | TargItem = j; | ||
| + | } | ||
| + | } | ||
| + | var TargetLeft = FC[TargItem].GetR() + 5; | ||
| + | var TargetTop = FC[TargItem].GetT(); | ||
| + | |||
| + | if (TargetTop < DC[i].GetT()){ | ||
| + | TopChange = -1; | ||
| + | } | ||
| + | else { | ||
| + | if (TargetTop > DC[i].GetT()){ | ||
| + | TopChange = 1; | ||
| + | } | ||
| + | } | ||
| + | Slide(i, TargetLeft, TargetTop, TopChange); | ||
| + | D[i][2] = F[TargItem][1]; | ||
| + | DC[i].tag = TargItem+1; | ||
| + | } | ||
| + | } | ||
| + | |||
| + | |||
| + | } | ||
| + | |||
| + | |||
| + | function Slide(MoverNum, | ||
| + | var TempInt = DC[MoverNum].GetL(); | ||
| + | if (TempInt > TargL){ | ||
| + | DC[MoverNum].SetL(TempInt | ||
| + | } | ||
| + | TempInt = DC[MoverNum].GetT(); | ||
| + | if (TempInt != TargT){ | ||
| + | DC[MoverNum].SetT(TempInt + TopChange); | ||
| + | } | ||
| + | if ((DC[MoverNum].GetL() > TargL)||(DC[MoverNum].GetT() != TargT)){ | ||
| + | setTimeout(' | ||
| + | } | ||
| + | else{ | ||
| + | DC[MoverNum].SetL(TargL); | ||
| + | } | ||
| + | } | ||
| + | |||
| + | |||
| + | F = new Array(); | ||
| + | F[0] = new Array(); | ||
| + | F[0][0]=' | ||
| + | F[0][1] = 1; | ||
| + | F[1] = new Array(); | ||
| + | F[1][0]=' | ||
| + | F[1][1] | ||
| + | F[2] = new Array(); | ||
| + | F[2][0]=' | ||
| + | F[2][1] = 3; | ||
| + | F[3] = new Array(); | ||
| + | F[3][0]=' | ||
| + | F[3][1] = 4; | ||
| + | F[4] = new Array(); | ||
| + | F[4][0]=' | ||
| + | F[4][1] | ||
| + | F[5] = new Array(); | ||
| + | F[5][0]=' | ||
| + | F[5][1] | ||
| + | F[6] = new Array(); | ||
| + | F[6][0]=' | ||
| + | F[6][1] | ||
| + | F[7] = new Array(); | ||
| + | F[7][0]=' | ||
| + | F[7][1] = 8; | ||
| + | |||
| + | |||
| + | D = new Array(); | ||
| + | D[0] = new Array(); | ||
| + | D[0][0]=' | ||
| + | D[0][1] | ||
| + | D[0][2] = 1; | ||
| + | D[1] = new Array(); | ||
| + | D[1][0]=' | ||
| + | D[1][1] | ||
| + | D[1][2] = 0; | ||
| + | D[2] = new Array(); | ||
| + | D[2][0]=' | ||
| + | D[2][1] = 3; | ||
| + | D[2][2] = 0; | ||
| + | D[3] = new Array(); | ||
| + | D[3][0]=' | ||
| + | D[3][1] | ||
| + | D[3][2] = 0; | ||
| + | D[4] = new Array(); | ||
| + | D[4][0]=' | ||
| + | D[4][1] = 5; | ||
| + | D[4][2] = 0; | ||
| + | D[5] = new Array(); | ||
| + | D[5][0]=' | ||
| + | D[5][1] = 6; | ||
| + | D[5][2] = 0; | ||
| + | D[6] = new Array(); | ||
| + | D[6][0]=' | ||
| + | D[6][1] = 7; | ||
| + | D[6][2] = 0; | ||
| + | D[7] = new Array(); | ||
| + | D[7][0]=' | ||
| + | D[7][1] | ||
| + | D[7][2] = 0; | ||
| + | |||
| + | |||
| + | function ReduceItems2(){ | ||
| + | var ItemToDump=0; | ||
| + | var j=0; | ||
| + | while (F.length > QsToShow){ | ||
| + | ItemToDump = Math.floor(F.length*Math.random()); | ||
| + | for (j=ItemToDump; | ||
| + | F[j] = F[j+1]; | ||
| + | } | ||
| + | for (j=ItemToDump; | ||
| + | D[j] | ||
| + | } | ||
| + | F.length | ||
| + | D.length | ||
| + | } | ||
| + | } | ||
| + | |||
| + | function TimerStartUp(){ | ||
| + | setTimeout(' | ||
| + | } | ||
| + | |||
| + | function CheckAnswers(){ | ||
| + | if (Locked == true){return; | ||
| + | //Set the default score and response | ||
| + | var TotalCorrect = 0; | ||
| + | Score = 0; | ||
| + | var Feedback = ''; | ||
| + | |||
| + | //for each fixed, check to see if the tag value for the draggable is the same as the fixed | ||
| + | if (AnswersTried.length > 0){AnswersTried | ||
| + | var i, j; | ||
| + | for (i=0; i< | ||
| + | if (i> | ||
| + | AnswersTried | ||
| + | if ((D[i][2] == D[i][1])&& | ||
| + | TotalCorrect++; | ||
| + | } | ||
| + | else{ | ||
| + | //Change made for version 6.0.3.41: don't send wrong items home, | ||
| + | //show them in a more conspicuous way. | ||
| + | // | ||
| + | DC[i].SetL(DC[i].GetL() + 10); | ||
| + | DC[i].Highlight(); | ||
| + | } | ||
| + | } | ||
| + | |||
| + | Score | ||
| + | |||
| + | var AllDone = false; | ||
| + | |||
| + | if (TotalCorrect == F.length) { | ||
| + | AllDone = true; | ||
| + | } | ||
| + | |||
| + | if (AllDone == true){ | ||
| + | Feedback = YourScoreIs + ' ' + Score + '%.'; | ||
| + | ShowMessage(Feedback + '< | ||
| + | } | ||
| + | else { | ||
| + | Feedback = YourScoreIs + ' ' + Score + ' | ||
| + | ShowMessage(Feedback); | ||
| + | Penalties++; | ||
| + | } | ||
| + | //If the exercise is over, deal with that | ||
| + | if ((AllDone == true)||(TimeOver == true)){ | ||
| + | |||
| + | |||
| + | TimeOver = true; | ||
| + | Locked = true; | ||
| + | Finished = true; | ||
| + | setTimeout(' | ||
| + | WriteToInstructions(Feedback); | ||
| + | } | ||
| + | |||
| + | } | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | //--> | ||
| + | |||
| + | //]]> | ||
| + | |||
| + | </ | ||
| + | |||
| + | </ | ||
| + | |||
| + | <body onload="TimerStartUp()" | ||
| + | <!-- BeginTopNavButtons --> | ||
| + | |||
| + | |||
| + | <div class="NavButtonBar" | ||
| + | |||
| + | |||
| + | |||
| + | <button class="NavButton" | ||
| + | |||
| + | |||
| + | |||
| + | < | ||
| + | |||
| + | |||
| + | </ | ||
| + | |||
| + | |||
| + | |||
| + | <!-- EndTopNavButtons | ||
| + | |||
| + | <div class=" | ||
| + | <h2 class="ExerciseTitle"> | ||
| + | |||
| + | |||
| + | |||
| + | </div> | ||
| + | |||
| + | <div id=" | ||
| + | <div id="Instructions"></ | ||
| + | </ | ||
| + | |||
| + | <div class=" | ||
| + | <button id=" | ||
| + | </ | ||
| + | |||
| + | <script type="text/javascript"> | ||
| + | |||
| + | //< | ||
| + | |||
| + | <!-- | ||
| + | |||
| + | |||
| + | for (var i=0; i<F.length; i++){ | ||
| + | document.write('< | ||
| + | } | ||
| + | |||
| + | for (var i=0; i< | ||
| + | document.write('< | ||
| + | } | ||
| + | |||
| + | //--> | ||
| + | |||
| + | //]]> | ||
| + | </script> | ||
| + | |||
| + | <div class=" | ||
| + | <div class=" | ||
| + | <button id=" | ||
| + | </div> | ||
| + | |||
| + | <!-- BeginBottomNavButtons --> | ||
| + | |||
| + | <!-- EndBottomNavButtons --> | ||
| + | |||
| + | <!-- BeginSubmissionForm --> | ||
| + | |||
| + | <!-- EndSubmissionForm --> | ||
| - | ==== Compréhension Orale ==== | + | </ |
| + | </ | ||