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:trx13:prononciation [09/02/2013 14:36] – gmonini | cours:jpc:stic:trx13:prononciation [24/11/2022 05:34] (Version actuelle) – modification externe 127.0.0.1 | ||
|---|---|---|---|
| Ligne 1823: | Ligne 1823: | ||
| </ | </ | ||
| + | **2. Les sons [u] - [y]** | ||
| - | <fc #FF0000>**3. Les voyelles nasales | + | **Ecoutez et répétez:** |
| - | **</fc> | + | |
| - | Ecoutez et choisissez la voyelle nasale correspondante. | + | {{youtube> |
| - | {{: | ||
| - | {{: | + | **3. Les voyelles nasales |
| + | ** | ||
| - | {{:cours: | + | **Ecoutez et essayez de repérer la voyelle nasale correspondante, |
| - | {{: | + | {{: |
| - | {{: | + | {{: |
| - | {{: | + | {{: |
| - | {{: | + | {{: |
| - | {{: | + | {{: |
| - | {{: | + | {{: |
| - | {{: | + | {{: |
| + | {{: | ||
| - | < | + | {{:cours: |
| - | < | + | |
| - | < | + | |
| - | xml:lang=" | + | |
| - | <link rel=" | + | {{:cours:jpc:stic: |
| - | <meta name=" | + | |
| - | <meta name=" | + | |
| + | <fc # | ||
| - | <meta http-equiv=" | + | [[cours: |
| - | < | ||
| - | Les voyelles nasales [ &# | ||
| - | </ | ||
| - | <!-- Made with executable version 6.3 Release 0 Build 3 --> | ||
| - | <!-- 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 3 */ | ||
| - | |||
| - | |||
| - | /* 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: #000000; | ||
| - | |||
| - | margin-right: | ||
| - | margin-left: | ||
| - | font-size: small; | ||
| - | } | ||
| - | |||
| - | p{ | ||
| - | text-align: | ||
| - | margin: 0px; | ||
| - | font-size: 100%; | ||
| - | } | ||
| - | |||
| - | table, | ||
| - | font-size: 100%; | ||
| - | color: #000000; | ||
| - | } | ||
| - | |||
| - | div.Titles{ | ||
| - | padding: 0.5em;; | ||
| - | text-align: | ||
| - | color: #000000; | ||
| - | } | ||
| - | |||
| - | button{ | ||
| - | font-family: | ||
| - | font-size: 100%; | ||
| - | display: inline; | ||
| - | } | ||
| - | |||
| - | .ExerciseTitle{ | ||
| - | font-size: 140%; | ||
| - | color: #000000; | ||
| - | } | ||
| - | |||
| - | .ExerciseSubtitle{ | ||
| - | font-size: 120%; | ||
| - | color: #000000; | ||
| - | } | ||
| - | |||
| - | div.StdDiv{ | ||
| - | background-color: | ||
| - | text-align: | ||
| - | font-size: 100%; | ||
| - | color: #000000; | ||
| - | 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#Timer{ | ||
| - | padding: 0.25em; | ||
| - | margin-left: | ||
| - | margin-right: | ||
| - | text-align: | ||
| - | color: #000000; | ||
| - | } | ||
| - | |||
| - | span# | ||
| - | padding: 0.25em; | ||
| - | border-width: | ||
| - | border-style: | ||
| - | font-weight: | ||
| - | display: none; | ||
| - | color: #000000; | ||
| - | } | ||
| - | |||
| - | span.Instructions{ | ||
| - | |||
| - | } | ||
| - | |||
| - | div.ExerciseText{ | ||
| - | |||
| - | } | ||
| - | |||
| - | .FeedbackText, | ||
| - | color: #000000; | ||
| - | } | ||
| - | |||
| - | .LeftItem{ | ||
| - | font-size: 100%; | ||
| - | color: #000000; | ||
| - | text-align: | ||
| - | } | ||
| - | |||
| - | .RightItem{ | ||
| - | font-weight: | ||
| - | font-size: 100%; | ||
| - | color: #000000; | ||
| - | } | ||
| - | |||
| - | 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: #000000; | ||
| - | position: absolute; | ||
| - | display: none; | ||
| - | font-size: 100%; | ||
| - | } | ||
| - | |||
| - | |||
| - | |||
| - | |||
| - | div.ExerciseDiv{ | ||
| - | color: #000000; | ||
| - | } | ||
| - | |||
| - | /* JMatch flashcard styles */ | ||
| - | table.FlashcardTable{ | ||
| - | background-color: | ||
| - | color: #000000; | ||
| - | 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: #000000; | ||
| - | 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: #000000; | ||
| - | } | ||
| - | |||
| - | 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: | ||
| - | 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: | ||
| - | } | ||
| - | |||
| - | .PartialAnswer{ | ||
| - | font-size: 120%; | ||
| - | letter-spacing: | ||
| - | color: #000000; | ||
| - | } | ||
| - | |||
| - | .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: #000000; | ||
| - | background-color: | ||
| - | |||
| - | border-width: | ||
| - | padding: 3px 6px 3px 6px; | ||
| - | cursor: pointer; | ||
| - | } | ||
| - | |||
| - | .FuncButtonUp { | ||
| - | color: #FFFFFF; | ||
| - | text-align: | ||
| - | border-style: | ||
| - | |||
| - | border-left-color: | ||
| - | border-top-color: | ||
| - | border-right-color: | ||
| - | border-bottom-color: | ||
| - | |||
| - | background-color: | ||
| - | color: #FFFFFF; | ||
| - | border-width: | ||
| - | padding: 3px 6px 3px 6px; | ||
| - | cursor: pointer; | ||
| - | } | ||
| - | |||
| - | .FuncButtonDown { | ||
| - | color: #FFFFFF; | ||
| - | text-align: | ||
| - | border-style: | ||
| - | |||
| - | border-left-color: | ||
| - | border-top-color: | ||
| - | border-right-color: | ||
| - | border-bottom-color: | ||
| - | background-color: | ||
| - | color: #FFFFFF; | ||
| - | |||
| - | 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: | ||
| - | |||
| - | border-left-color: | ||
| - | border-top-color: | ||
| - | border-right-color: | ||
| - | border-bottom-color: | ||
| - | background-color: | ||
| - | color: #ffffff; | ||
| - | |||
| - | border-width: | ||
| - | cursor: pointer; | ||
| - | } | ||
| - | |||
| - | .NavButtonUp { | ||
| - | border-style: | ||
| - | |||
| - | border-left-color: | ||
| - | border-top-color: | ||
| - | border-right-color: | ||
| - | border-bottom-color: | ||
| - | color: #000000; | ||
| - | background-color: | ||
| - | |||
| - | border-width: | ||
| - | cursor: pointer; | ||
| - | } | ||
| - | |||
| - | .NavButtonDown { | ||
| - | border-style: | ||
| - | |||
| - | border-left-color: | ||
| - | border-top-color: | ||
| - | border-right-color: | ||
| - | border-bottom-color: | ||
| - | color: #000000; | ||
| - | background-color: | ||
| - | |||
| - | border-width: | ||
| - | cursor: pointer; | ||
| - | } | ||
| - | |||
| - | / | ||
| - | |||
| - | a{ | ||
| - | color: #0000FF; | ||
| - | } | ||
| - | |||
| - | a:visited{ | ||
| - | color: #0000CC; | ||
| - | } | ||
| - | |||
| - | a:hover{ | ||
| - | color: #0000FF; | ||
| - | } | ||
| - | |||
| - | div.CardStyle { | ||
| - | position: absolute; | ||
| - | font-family: | ||
| - | font-size: 100%; | ||
| - | padding: 5px; | ||
| - | border-style: | ||
| - | border-width: | ||
| - | color: #000000; | ||
| - | 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 = true;}; | ||
| - | |||
| - | this.ua = navigator.userAgent; | ||
| - | this.name = navigator.appName; | ||
| - | this.ver = navigator.appVersion; | ||
| - | |||
| - | //Get data about the browser | ||
| - | this.mac = (this.ver.indexOf(' | ||
| - | 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 && C.gecko) {Els[i].style.display = ''; | ||
| - | } | ||
| - | else{ | ||
| - | Els[i].style.visibility = ' | ||
| - | if (C.mac && C.gecko) {Els[i].style.display = ' | ||
| - | } | ||
| - | } | ||
| - | 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 - 1) == ' | ||
| - | InString = InString.substring(0, | ||
| - | } | ||
| - | |||
| - | while ((InString.charAt(0) == ' | ||
| - | InString = InString.substring(1, | ||
| - | } | ||
| - | |||
| - | while (InString.indexOf(' | ||
| - | x = InString.indexOf(' | ||
| - | InString = InString.substring(0, | ||
| - | } | ||
| - | |||
| - | 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< | ||
| - | 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(' | ||
| - | } | ||
| - | } | ||
| - | } | ||
| - | |||
| - | |||
| - | |||
| - | |||
| - | // | ||
| - | |||
| - | 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(); | ||
| - | } | ||
| - | } | ||
| - | |||
| - | |||
| - | |||
| - | |||
| - | |||
| - | //JQUIZ CORE JAVASCRIPT CODE | ||
| - | |||
| - | var CurrQNum = 0; | ||
| - | var CorrectIndicator = ': | ||
| - | var IncorrectIndicator = ' | ||
| - | var YourScoreIs = 'Your score is '; | ||
| - | |||
| - | //New for 6.2.2.0 | ||
| - | var CompletedSoFar = ' | ||
| - | var ExerciseCompleted = 'You have completed the exercise.'; | ||
| - | var ShowCompletedSoFar = true; | ||
| - | |||
| - | var ContinuousScoring = true; | ||
| - | var CorrectFirstTime = ' | ||
| - | var ShowCorrectFirstTime = true; | ||
| - | var ShuffleQs = false; | ||
| - | var ShuffleAs = false; | ||
| - | var DefaultRight = ' | ||
| - | var DefaultWrong = ' | ||
| - | var QsToShow = 10; | ||
| - | var Score = 0; | ||
| - | var Finished = false; | ||
| - | var Qs = null; | ||
| - | var QArray = new Array(); | ||
| - | var ShowingAllQuestions = false; | ||
| - | var ShowAllQuestionsCaption = 'Show all questions'; | ||
| - | var ShowOneByOneCaption = 'Show questions one by one'; | ||
| - | var State = new Array(); | ||
| - | var Feedback = ''; | ||
| - | var TimeOver = false; | ||
| - | var strInstructions = ''; | ||
| - | var Locked = false; | ||
| - | |||
| - | //The following variable can be used to add a message explaining that | ||
| - | //the question is finished, so no further marking will take place. | ||
| - | var strQuestionFinished = ''; | ||
| - | |||
| - | function CompleteEmptyFeedback(){ | ||
| - | var QNum, ANum; | ||
| - | for (QNum=0; QNum< | ||
| - | //Only do this if not multi-select | ||
| - | if (I[QNum][2] != ' | ||
| - | for (ANum = 0; ANum< | ||
| - | if (I[QNum][3][ANum][1].length < 1){ | ||
| - | if (I[QNum][3][ANum][2] > 0){ | ||
| - | I[QNum][3][ANum][1] = DefaultRight; | ||
| - | } | ||
| - | else{ | ||
| - | I[QNum][3][ANum][1] = DefaultWrong; | ||
| - | } | ||
| - | } | ||
| - | } | ||
| - | } | ||
| - | } | ||
| - | } | ||
| - | |||
| - | function SetUpQuestions(){ | ||
| - | var AList = new Array(); | ||
| - | var QList = new Array(); | ||
| - | var i, j; | ||
| - | Qs = document.getElementById(' | ||
| - | while (Qs.getElementsByTagName(' | ||
| - | QList.push(Qs.removeChild(Qs.getElementsByTagName(' | ||
| - | } | ||
| - | var DumpItem = 0; | ||
| - | if (QsToShow > QList.length){ | ||
| - | QsToShow = QList.length; | ||
| - | } | ||
| - | while (QsToShow < QList.length){ | ||
| - | DumpItem = Math.floor(QList.length*Math.random()); | ||
| - | for (j=DumpItem; | ||
| - | QList[j] = QList[j+1]; | ||
| - | } | ||
| - | QList.length = QList.length-1; | ||
| - | } | ||
| - | if (ShuffleQs == true){ | ||
| - | QList = Shuffle(QList); | ||
| - | } | ||
| - | if (ShuffleAs == true){ | ||
| - | var As; | ||
| - | for (var i=0; i< | ||
| - | As = QList[i].getElementsByTagName(' | ||
| - | if (As != null){ | ||
| - | AList.length = 0; | ||
| - | while (As.getElementsByTagName(' | ||
| - | AList.push(As.removeChild(As.getElementsByTagName(' | ||
| - | } | ||
| - | AList = Shuffle(AList); | ||
| - | for (j=0; j< | ||
| - | As.appendChild(AList[j]); | ||
| - | } | ||
| - | } | ||
| - | } | ||
| - | } | ||
| - | |||
| - | for (i=0; i< | ||
| - | Qs.appendChild(QList[i]); | ||
| - | QArray[QArray.length] = QList[i]; | ||
| - | } | ||
| - | |||
| - | //Show the first item | ||
| - | QArray[0].style.display = ''; | ||
| - | |||
| - | //Now hide all except the first item | ||
| - | for (i=1; i< | ||
| - | QArray[i].style.display = ' | ||
| - | } | ||
| - | SetQNumReadout(); | ||
| - | |||
| - | SetFocusToTextbox(); | ||
| - | } | ||
| - | |||
| - | function SetFocusToTextbox(){ | ||
| - | //if there' | ||
| - | if (QArray[CurrQNum].getElementsByTagName(' | ||
| - | QArray[CurrQNum].getElementsByTagName(' | ||
| - | //and show a keypad if there is one | ||
| - | if (document.getElementById(' | ||
| - | document.getElementById(' | ||
| - | } | ||
| - | } | ||
| - | else{ | ||
| - | if (QArray[CurrQNum].getElementsByTagName(' | ||
| - | QArray[CurrQNum].getElementsByTagName(' | ||
| - | //and show a keypad if there is one | ||
| - | if (document.getElementById(' | ||
| - | document.getElementById(' | ||
| - | } | ||
| - | } | ||
| - | //This added for 6.0.4.11: hide accented character buttons if no textbox | ||
| - | else{ | ||
| - | if (document.getElementById(' | ||
| - | document.getElementById(' | ||
| - | } | ||
| - | } | ||
| - | } | ||
| - | } | ||
| - | |||
| - | function ChangeQ(ChangeBy){ | ||
| - | //The following line prevents moving to another question until the current | ||
| - | //question is answered correctly. Uncomment it to enable this behaviour. | ||
| - | // if (State[CurrQNum][0] == -1){return; | ||
| - | if (((CurrQNum + ChangeBy) < 0)||((CurrQNum + ChangeBy) >= QArray.length)){return; | ||
| - | QArray[CurrQNum].style.display = ' | ||
| - | CurrQNum += ChangeBy; | ||
| - | QArray[CurrQNum].style.display = ''; | ||
| - | // | ||
| - | ShowSpecialReadingForQuestion(); | ||
| - | SetQNumReadout(); | ||
| - | SetFocusToTextbox(); | ||
| - | } | ||
| - | |||
| - | var HiddenReadingShown = false; | ||
| - | function ShowSpecialReadingForQuestion(){ | ||
| - | // | ||
| - | //Added on 10/12/2004 | ||
| - | if (document.getElementById(' | ||
| - | if (HiddenReadingShown == true){ | ||
| - | document.getElementById(' | ||
| - | } | ||
| - | if (QArray[CurrQNum] != null){ | ||
| - | //Fix for 6.0.4.25 | ||
| - | var Children = QArray[CurrQNum].getElementsByTagName(' | ||
| - | for (var i=0; i< | ||
| - | if (Children[i].className==" | ||
| - | document.getElementById(' | ||
| - | HiddenReadingShown = true; | ||
| - | //Hide the ShowAllQuestions button to avoid confusion | ||
| - | if (document.getElementById(' | ||
| - | document.getElementById(' | ||
| - | } | ||
| - | } | ||
| - | } | ||
| - | } | ||
| - | } | ||
| - | } | ||
| - | |||
| - | function SetQNumReadout(){ | ||
| - | document.getElementById(' | ||
| - | if ((CurrQNum+1) >= QArray.length){ | ||
| - | if (document.getElementById(' | ||
| - | document.getElementById(' | ||
| - | } | ||
| - | } | ||
| - | else{ | ||
| - | if (document.getElementById(' | ||
| - | document.getElementById(' | ||
| - | } | ||
| - | } | ||
| - | if (CurrQNum <= 0){ | ||
| - | if (document.getElementById(' | ||
| - | document.getElementById(' | ||
| - | } | ||
| - | } | ||
| - | else{ | ||
| - | if (document.getElementById(' | ||
| - | document.getElementById(' | ||
| - | } | ||
| - | } | ||
| - | } | ||
| - | |||
| - | var I=new Array(); | ||
| - | I[0]=new Array(); | ||
| - | I[0][1]=''; | ||
| - | I[0][2]=' | ||
| - | I[0][3]=new Array(); | ||
| - | I[0][3][0]=new Array(' | ||
| - | I[0][3][1]=new Array(' | ||
| - | I[0][3][2]=new Array(' | ||
| - | I[1]=new Array(); | ||
| - | I[1][1]=''; | ||
| - | I[1][2]=' | ||
| - | I[1][3]=new Array(); | ||
| - | I[1][3][0]=new Array(' | ||
| - | I[1][3][1]=new Array(' | ||
| - | I[1][3][2]=new Array(' | ||
| - | I[2]=new Array(); | ||
| - | I[2][1]=''; | ||
| - | I[2][2]=' | ||
| - | I[2][3]=new Array(); | ||
| - | I[2][3][0]=new Array(' | ||
| - | I[2][3][1]=new Array(' | ||
| - | I[2][3][2]=new Array(' | ||
| - | I[3]=new Array(); | ||
| - | I[3][1]=''; | ||
| - | I[3][2]=' | ||
| - | I[3][3]=new Array(); | ||
| - | I[3][3][0]=new Array(' | ||
| - | I[3][3][1]=new Array(' | ||
| - | I[3][3][2]=new Array(' | ||
| - | I[4]=new Array(); | ||
| - | I[4][1]=''; | ||
| - | I[4][2]=' | ||
| - | I[4][3]=new Array(); | ||
| - | I[4][3][0]=new Array(' | ||
| - | I[4][3][1]=new Array(' | ||
| - | I[4][3][2]=new Array(' | ||
| - | I[5]=new Array(); | ||
| - | I[5][1]=''; | ||
| - | I[5][2]=' | ||
| - | I[5][3]=new Array(); | ||
| - | I[5][3][0]=new Array(' | ||
| - | I[5][3][1]=new Array(' | ||
| - | I[5][3][2]=new Array(' | ||
| - | I[6]=new Array(); | ||
| - | I[6][1]=''; | ||
| - | I[6][2]=' | ||
| - | I[6][3]=new Array(); | ||
| - | I[6][3][0]=new Array(' | ||
| - | I[6][3][1]=new Array(' | ||
| - | I[6][3][2]=new Array(' | ||
| - | I[7]=new Array(); | ||
| - | I[7][1]=''; | ||
| - | I[7][2]=' | ||
| - | I[7][3]=new Array(); | ||
| - | I[7][3][0]=new Array(' | ||
| - | I[7][3][1]=new Array(' | ||
| - | I[7][3][2]=new Array(' | ||
| - | I[8]=new Array(); | ||
| - | I[8][1]=''; | ||
| - | I[8][2]=' | ||
| - | I[8][3]=new Array(); | ||
| - | I[8][3][0]=new Array(' | ||
| - | I[8][3][1]=new Array(' | ||
| - | I[8][3][2]=new Array(' | ||
| - | I[9]=new Array(); | ||
| - | I[9][1]=''; | ||
| - | I[9][2]=' | ||
| - | I[9][3]=new Array(); | ||
| - | I[9][3][0]=new Array(' | ||
| - | I[9][3][1]=new Array(' | ||
| - | I[9][3][2]=new Array(' | ||
| - | |||
| - | |||
| - | function StartUp(){ | ||
| - | RemoveBottomNavBarForIE(); | ||
| - | |||
| - | //If there' | ||
| - | if (QsToShow < 2){ | ||
| - | document.getElementById(' | ||
| - | } | ||
| - | |||
| - | //Stash the instructions so they can be redisplayed | ||
| - | strInstructions = document.getElementById(' | ||
| - | |||
| - | |||
| - | |||
| - | |||
| - | |||
| - | |||
| - | |||
| - | CompleteEmptyFeedback(); | ||
| - | |||
| - | SetUpQuestions(); | ||
| - | ClearTextBoxes(); | ||
| - | CreateStatusArray(); | ||
| - | |||
| - | |||
| - | |||
| - | //Check search string for q parameter | ||
| - | if (document.location.search.length > 0){ | ||
| - | if (ShuffleQs == false){ | ||
| - | var JumpTo = parseInt(document.location.search.substring(1, | ||
| - | if (JumpTo <= QsToShow){ | ||
| - | ChangeQ(JumpTo); | ||
| - | } | ||
| - | } | ||
| - | } | ||
| - | // | ||
| - | ShowSpecialReadingForQuestion(); | ||
| - | } | ||
| - | |||
| - | function ShowHideQuestions(){ | ||
| - | FuncBtnOut(document.getElementById(' | ||
| - | document.getElementById(' | ||
| - | if (ShowingAllQuestions == false){ | ||
| - | for (var i=0; i< | ||
| - | QArray[i].style.display = ''; | ||
| - | } | ||
| - | document.getElementById(' | ||
| - | document.getElementById(' | ||
| - | document.getElementById(' | ||
| - | ShowingAllQuestions = true; | ||
| - | } | ||
| - | else{ | ||
| - | for (var i=0; i< | ||
| - | if (i != CurrQNum){ | ||
| - | QArray[i].style.display = ' | ||
| - | } | ||
| - | } | ||
| - | document.getElementById(' | ||
| - | document.getElementById(' | ||
| - | document.getElementById(' | ||
| - | ShowingAllQuestions = false; | ||
| - | } | ||
| - | document.getElementById(' | ||
| - | } | ||
| - | |||
| - | function CreateStatusArray(){ | ||
| - | var QNum, ANum; | ||
| - | //For each item in the item array | ||
| - | for (QNum=0; QNum< | ||
| - | //Check if the question still exists (hasn' | ||
| - | if (document.getElementById(' | ||
| - | State[QNum] = new Array(); | ||
| - | State[QNum][0] = -1; //Score for this q; -1 shows question not done yet | ||
| - | State[QNum][1] = new Array(); //answers | ||
| - | for (ANum = 0; ANum< | ||
| - | State[QNum][1][ANum] = 0; //answer not chosen yet; when chosen, will store its position in the series of choices | ||
| - | } | ||
| - | State[QNum][2] = 0; //tries at this q so far | ||
| - | State[QNum][3] = 0; // | ||
| - | State[QNum][4] = 0; //penalties incurred for hints | ||
| - | State[QNum][5] = ''; | ||
| - | } | ||
| - | else{ | ||
| - | State[QNum] = null; | ||
| - | } | ||
| - | } | ||
| - | } | ||
| - | |||
| - | |||
| - | |||
| - | |||
| - | |||
| - | function CheckMultiSelAnswer(QNum){ | ||
| - | //bail if question doesn' | ||
| - | if ((State[QNum].length < 1)||(Finished == true)){return; | ||
| - | |||
| - | //Increment the tries for this question | ||
| - | State[QNum][2]++; | ||
| - | |||
| - | var ShouldBeChecked; | ||
| - | var Matches = 0; | ||
| - | if (State[QNum][5].length > 0){State[QNum][5] += ' | ';} | ||
| - | |||
| - | //Check if there are any mismatches | ||
| - | Feedback = ''; | ||
| - | var CheckBox = null; | ||
| - | for (var ANum=0; ANum< | ||
| - | CheckBox = document.getElementById(' | ||
| - | if (CheckBox.checked == true){ | ||
| - | State[QNum][5] += ' | ||
| - | } | ||
| - | else{ | ||
| - | State[QNum][5] += ' | ||
| - | } | ||
| - | ShouldBeChecked = (I[QNum][3][ANum][2] == 1); | ||
| - | if (ShouldBeChecked == CheckBox.checked){ | ||
| - | Matches++; | ||
| - | } | ||
| - | else{ | ||
| - | Feedback = I[QNum][3][ANum][1]; | ||
| - | } | ||
| - | } | ||
| - | //Add the hit readout | ||
| - | Feedback = Matches + ' / ' + I[QNum][3].length + '< | ||
| - | if (Matches == I[QNum][3].length){ | ||
| - | //It's right | ||
| - | CalculateMultiSelQuestionScore(QNum); | ||
| - | |||
| - | //New for 6.2.2.0 | ||
| - | var QsDone = CheckQuestionsCompleted(); | ||
| - | |||
| - | if (ContinuousScoring == true){ | ||
| - | CalculateOverallScore(); | ||
| - | if ((ContinuousScoring == true)||(Finished == true)){ | ||
| - | Feedback += '< | ||
| - | WriteToInstructions(YourScoreIs + ' ' + Score + ' | ||
| - | } | ||
| - | else{ | ||
| - | WriteToInstructions(QsDone); | ||
| - | } | ||
| - | } | ||
| - | } | ||
| - | else{ | ||
| - | //It's wrong -- Remove any previous score unless exercise is finished (6.0.3.8+) | ||
| - | if (Finished == false){ | ||
| - | WriteToInstructions(strInstructions); | ||
| - | } | ||
| - | } | ||
| - | |||
| - | //Show the feedback | ||
| - | ShowMessage(Feedback); | ||
| - | |||
| - | //Check whether all questions are now done | ||
| - | CheckFinished(); | ||
| - | } | ||
| - | |||
| - | function CalculateMultiSelQuestionScore(QNum){ | ||
| - | var Tries = State[QNum][2]; | ||
| - | var TotAns = State[QNum][1].length; | ||
| - | |||
| - | //Make sure it's not already complete | ||
| - | if (State[QNum][0] < 0){ | ||
| - | State[QNum][0] = (TotAns - (Tries-1)) / TotAns; | ||
| - | if (State[QNum][0] < 0){ | ||
| - | State[QNum][0] = 0; | ||
| - | } | ||
| - | } | ||
| - | } | ||
| - | |||
| - | |||
| - | |||
| - | function CalculateOverallScore(){ | ||
| - | var TotalWeighting = 0; | ||
| - | var TotalScore = 0; | ||
| - | |||
| - | for (var QNum=0; QNum< | ||
| - | if (State[QNum] != null){ | ||
| - | if (State[QNum][0] > -1){ | ||
| - | TotalWeighting += I[QNum][0]; | ||
| - | TotalScore += (I[QNum][0] * State[QNum][0]); | ||
| - | } | ||
| - | } | ||
| - | } | ||
| - | if (TotalWeighting > 0){ | ||
| - | Score = Math.floor((TotalScore/ | ||
| - | } | ||
| - | else{ | ||
| - | //if TotalWeighting is 0, no questions so far have any value, so | ||
| - | //no penalty should be shown. | ||
| - | Score = 100; | ||
| - | } | ||
| - | } | ||
| - | |||
| - | //New for 6.2.2.0 | ||
| - | function CheckQuestionsCompleted(){ | ||
| - | if (ShowCompletedSoFar == false){return ''; | ||
| - | var QsCompleted = 0; | ||
| - | for (var QNum=0; QNum< | ||
| - | if (State[QNum] != null){ | ||
| - | if (State[QNum][0] >= 0){ | ||
| - | QsCompleted++; | ||
| - | } | ||
| - | } | ||
| - | } | ||
| - | //Fixes for 6.2.2.2 | ||
| - | if (QsCompleted >= QArray.length){ | ||
| - | return ExerciseCompleted; | ||
| - | } | ||
| - | else{ | ||
| - | return CompletedSoFar + ' ' + QsCompleted + '/' | ||
| - | } | ||
| - | } | ||
| - | |||
| - | function CheckFinished(){ | ||
| - | var FB = ''; | ||
| - | var AllDone = true; | ||
| - | for (var QNum=0; QNum< | ||
| - | if (State[QNum] != null){ | ||
| - | if (State[QNum][0] < 0){ | ||
| - | AllDone = false; | ||
| - | } | ||
| - | } | ||
| - | } | ||
| - | if (AllDone == true){ | ||
| - | |||
| - | //Report final score and submit if necessary | ||
| - | CalculateOverallScore(); | ||
| - | FB = YourScoreIs + ' ' + Score + ' | ||
| - | if (ShowCorrectFirstTime == true){ | ||
| - | var CFT = 0; | ||
| - | for (QNum=0; QNum< | ||
| - | if (State[QNum] != null){ | ||
| - | if (State[QNum][0] >= 1){ | ||
| - | CFT++; | ||
| - | } | ||
| - | } | ||
| - | } | ||
| - | FB += '< | ||
| - | } | ||
| - | |||
| - | //New for 6.2.2.0 | ||
| - | FB += '< | ||
| - | |||
| - | WriteToInstructions(FB); | ||
| - | |||
| - | Finished == true; | ||
| - | |||
| - | |||
| - | |||
| - | |||
| - | TimeOver = true; | ||
| - | Locked = true; | ||
| - | |||
| - | |||
| - | |||
| - | Finished = true; | ||
| - | Detail = '<? | ||
| - | for (QNum=0; QNum< | ||
| - | if (State[QNum] != null){ | ||
| - | if (State[QNum][5].length > 0){ | ||
| - | Detail += '< | ||
| - | } | ||
| - | } | ||
| - | } | ||
| - | Detail += '</ | ||
| - | setTimeout(' | ||
| - | } | ||
| - | |||
| - | } | ||
| - | |||
| - | |||
| - | |||
| - | |||
| - | |||
| - | |||
| - | |||
| - | |||
| - | |||
| - | |||
| - | //--> | ||
| - | |||
| - | //]]> | ||
| - | |||
| - | </ | ||
| - | |||
| - | |||
| - | </ | ||
| - | |||
| - | <body onload=" | ||
| - | |||
| - | <!-- BeginTopNavButtons --> | ||
| - | |||
| - | |||
| - | <div class=" | ||
| - | |||
| - | |||
| - | |||
| - | |||
| - | <button class=" | ||
| - | |||
| - | |||
| - | |||
| - | <button class=" | ||
| - | |||
| - | |||
| - | </ | ||
| - | |||
| - | |||
| - | |||
| - | <!-- EndTopNavButtons --> | ||
| - | |||
| - | <div class=" | ||
| - | <h2 class=" | ||
| - | |||
| - | <h3 class=" | ||
| - | |||
| - | |||
| - | |||
| - | </ | ||
| - | |||
| - | <div id=" | ||
| - | <div id=" | ||
| - | </ | ||
| - | |||
| - | |||
| - | |||
| - | |||
| - | <div id=" | ||
| - | |||
| - | <div id=" | ||
| - | |||
| - | <p style=" | ||
| - | <button id=" | ||
| - | </p> | ||
| - | |||
| - | <div id=" | ||
| - | <button id=" | ||
| - | |||
| - | <span id=" | ||
| - | |||
| - | <button id=" | ||
| - | <br /> | ||
| - | </ | ||
| - | |||
| - | </ | ||
| - | |||
| - | <ol class=" | ||
| - | <li class=" | ||
| - | <li class=" | ||
| - | <li class=" | ||
| - | <li class=" | ||
| - | <li class=" | ||
| - | <li class=" | ||
| - | <li class=" | ||
| - | <li class=" | ||
| - | <li class=" | ||
| - | <li class=" | ||
| - | |||
| - | |||
| - | |||
| - | </ | ||
| - | |||
| - | |||
| - | |||
| - | <div class=" | ||
| - | <div class=" | ||
| - | <button id=" | ||
| - | </ | ||
| - | |||
| - | <!-- BeginBottomNavButtons --> | ||
| - | |||
| - | |||
| - | <div class=" | ||
| - | |||
| - | |||
| - | |||
| - | |||
| - | <button class=" | ||
| - | |||
| - | |||
| - | |||
| - | <button class=" | ||
| - | |||
| - | |||
| - | </ | ||
| - | |||
| - | |||
| - | |||
| - | <!-- EndBottomNavButtons --> | ||
| - | |||
| - | <!-- BeginSubmissionForm --> | ||
| - | |||
| - | <!-- EndSubmissionForm --> | ||
| - | |||
| - | </ | ||
| - | |||
| - | </ | ||
| - | |||
| - | |||
| - | |||
| - | |||
| - | |||