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:seance1 [04/02/2013 20:46] – m-crapaud | cours:jpc:stic:trx13:seance1 [10/02/2013 02:22] (Version actuelle) – m-crapaud | ||
|---|---|---|---|
| Ligne 1: | Ligne 1: | ||
| < | < | ||
| + | <div style=" | ||
| <div style align=" | <div style align=" | ||
| - | <a href=" | + | <a href=" |
| </ | </ | ||
| <WRAP box> | <WRAP box> | ||
| - | <h1 align= " | + | <h1 align= " |
| </ | </ | ||
| - | <p align=" | + | <p align=" |
| - | <img src=" | + | <img src=" |
| - | </ | + | </ |
| Quand un étudiant étranger arrive en France, il fait face à de différentes démarches | Quand un étudiant étranger arrive en France, il fait face à de différentes démarches | ||
| qui lui permettent de bien s’intégrer à la vie universitaire et en France. Il donc est | qui lui permettent de bien s’intégrer à la vie universitaire et en France. Il donc est | ||
| Ligne 14: | Ligne 15: | ||
| confronter ultérieurement.< | confronter ultérieurement.< | ||
| les principaux besoins des étudiants ainsi que quelques recommandations proposées par | les principaux besoins des étudiants ainsi que quelques recommandations proposées par | ||
| - | l’un des organismes qui est au service des étudiants étrangers à Lyon 2.</ | + | l’un des organismes qui est au service des étudiants étrangers à Lyon 2.</ |
| + | <p> | ||
| + | Les activités proposées à continuation vous permettront de connaître les principaux besoins des étudiants étrangers venant suivre des études à Lyon 2 | ||
| + | </p> | ||
| </ | </ | ||
| - | <?xml version=" | + | === Activités d' |
| - | < | + | {{:cours:jpc:stic:trx13:s1a1.htm|Activité |
| - | < | + | {{:cours:jpc:stic:trx13:s1a2.htm|Activité |
| - | | + | ====== ====== |
| - | + | <html> | |
| - | <link rel=" | + | Pour les activités suivantes, écoutez d'abord l'extrait audio proposé et prenez des notes. Puis cliquez sur les liens pour faire l'activité correspondante à chaque extrait. |
| - | <meta name=" | + | |
| - | <meta name=" | + | |
| - | + | ||
| - | + | ||
| - | <meta http-equiv=" | + | |
| - | + | ||
| - | < | + | |
| - | Activit&# | + | |
| - | </ | + | |
| - | + | ||
| - | <!-- Made with executable version 6.3 Release 0 Build 5 --> | + | |
| - | + | ||
| - | <!-- 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 5 */ | + | |
| - | + | ||
| - | + | ||
| - | /* Hack to hide a nested Quicktime player from IE, which can't handle it. */ | + | |
| - | * html object.MediaPlayerNotForIE | + | |
| - | display: none; | + | |
| - | } | + | |
| - | + | ||
| - | body{ | + | |
| - | font-family: "Times New Roman", | + | |
| - | background-color: #ffffff; | + | |
| - | color: #000000; | + | |
| - | + | ||
| - | margin-right: 5%; | + | |
| - | margin-left: 5%; | + | |
| - | 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# | + | |
| - | 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: | + | |
| - | 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: #eaffd5; | + | |
| - | text-align: | + | |
| - | border-style: | + | |
| - | + | ||
| - | border-left-color: | + | |
| - | border-top-color: | + | |
| - | border-right-color: | + | |
| - | border-bottom-color: | + | |
| - | + | ||
| - | background-color: | + | |
| - | color: #eaffd5; | + | |
| - | border-width: | + | |
| - | padding: 3px 6px 3px 6px; | + | |
| - | cursor: pointer; | + | |
| - | } | + | |
| - | + | ||
| - | .FuncButtonDown { | + | |
| - | color: #eaffd5; | + | |
| - | text-align: | + | |
| - | border-style: | + | |
| - | + | ||
| - | border-left-color: | + | |
| - | border-top-color: | + | |
| - | border-right-color: | + | |
| - | border-bottom-color: | + | |
| - | background-color: | + | |
| - | color: #eaffd5; | + | |
| - | + | ||
| - | 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: #000000; | + | |
| - | + | ||
| - | border-width: | + | |
| - | cursor: pointer; | + | |
| - | } | + | |
| - | + | ||
| - | .NavButtonUp { | + | |
| - | border-style: | + | |
| - | + | ||
| - | border-left-color: | + | |
| - | border-top-color: | + | |
| - | border-right-color: | + | |
| - | border-bottom-color: | + | |
| - | color: #4fffa7; | + | |
| - | background-color: | + | |
| - | + | ||
| - | border-width: | + | |
| - | cursor: pointer; | + | |
| - | } | + | |
| - | + | ||
| - | .NavButtonDown { | + | |
| - | border-style: | + | |
| - | + | ||
| - | border-left-color: | + | |
| - | border-top-color: | + | |
| - | border-right-color: | + | |
| - | border-bottom-color: | + | |
| - | color: #4fffa7; | + | |
| - | background-color: | + | |
| - | + | ||
| - | border-width: | + | |
| - | cursor: pointer; | + | |
| - | } | + | |
| - | + | ||
| - | / | + | |
| - | + | ||
| - | a{ | + | |
| - | color: #0000FF; | + | |
| - | } | + | |
| - | + | ||
| - | a: | + | |
| - | color: #000080; | + | |
| - | } | + | |
| - | + | ||
| - | 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){ | + | |
| - | // | + | |
| - | } | + | |
| - | + | ||
| - | //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) == '\u0020' | + | |
| - | | + | |
| - | } | + | |
| - | + | ||
| - | 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(); | + | |
| - | } | + | |
| - | } | + | |
| - | + | ||
| - | + | ||
| - | + | ||
| - | 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 = 'Bien jou&# | + | |
| - | var IncorrectResponse = ' | + | |
| - | var YourScoreIs = 'Tu as eu '; | + | |
| - | 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 = 7; | + | |
| - | + | ||
| - | 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< | + | |
| - | 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)/ | + | |
| - | RightColPos = DivWidth + LeftColPos - (DragWidth + 14); | + | |
| - | var Highest = 0; | + | |
| - | var WidestRight = 0; | + | |
| - | + | ||
| - | for (i=0; 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< | + | |
| - | 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< | + | |
| - | 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; | + | |
| - | } | + | |
| - | + | ||
| - | + | ||
| - | + | ||
| - | StartTimer(); | + | |
| - | + | ||
| - | } | + | |
| - | + | ||
| - | + | ||
| - | + | ||
| - | F = new Array(); | + | |
| - | F[0] = new Array(); | + | |
| - | F[0][0]=' | + | |
| - | F[0][1] = 1; | + | |
| - | F[1] = new Array(); | + | |
| - | F[1][0]=' | + | |
| - | F[1][1] = 2; | + | |
| - | 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] = 5; | + | |
| - | F[5] = new Array(); | + | |
| - | F[5][0]=' | + | |
| - | F[5][1] = 6; | + | |
| - | F[6] = new Array(); | + | |
| - | F[6][0]=' | + | |
| - | F[6][1] = 7; | + | |
| - | + | ||
| - | + | ||
| - | D = new Array(); | + | |
| - | D[0] = new Array(); | + | |
| - | D[0][0]=' | + | |
| - | D[0][1] = 1; | + | |
| - | D[0][2] = 0; | + | |
| - | D[1] = new Array(); | + | |
| - | D[1][0]=' | + | |
| - | D[1][1] | + | |
| - | D[1][2] | + | |
| - | D[2] = new Array(); | + | |
| - | D[2][0]='Train &# | + | |
| - | D[2][1] | + | |
| - | D[2][2] | + | |
| - | D[3] = new Array(); | + | |
| - | D[3][0]=' | + | |
| - | D[3][1] | + | |
| - | D[3][2] | + | |
| - | 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; | + | |
| - | + | ||
| - | + | ||
| - | 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] = D[j+1]; | + | |
| - | } | + | |
| - | F.length = F.length-1; | + | |
| - | D.length = D.length-1; | + | |
| - | } | + | |
| - | } | + | |
| - | + | ||
| - | 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 | + | |
| - | var i, j; | + | |
| - | for (i=0; i< | + | |
| - | if (i> | + | |
| - | AnswersTried += D[i][1] + '.' + D[i][2] + ''; | + | |
| - | 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 = Math.floor((100*(TotalCorrect-Penalties))/ | + | |
| - | + | ||
| - | 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)){ | + | |
| - | + | ||
| - | + | ||
| - | window.clearInterval(Interval); | + | |
| - | + | ||
| - | TimeOver = true; | + | |
| - | Locked = true; | + | |
| - | Finished = true; | + | |
| - | setTimeout(' | + | |
| - | WriteToInstructions(Feedback); | + | |
| - | } | + | |
| - | + | ||
| - | } | + | |
| - | + | ||
| - | + | ||
| - | function TimesUp() { | + | |
| - | document.getElementById(' | + | |
| - | + | ||
| - | TimeOver = true; | + | |
| - | CheckAnswers(); | + | |
| - | Locked = true; | + | |
| - | + | ||
| - | } | + | |
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | //CODE FOR HANDLING TIMER | + | |
| - | //Timer code | + | |
| - | var Seconds = 40; | + | |
| - | var Interval = null; | + | |
| - | + | ||
| - | function StartTimer(){ | + | |
| - | Interval = window.setInterval(' | + | |
| - | document.getElementById(' | + | |
| - | } | + | |
| - | + | ||
| - | function DownTime(){ | + | |
| - | var ss = Seconds % 60; | + | |
| - | if (ss< | + | |
| - | ss=' | + | |
| - | } | + | |
| - | + | ||
| - | var mm = Math.floor(Seconds / 60); | + | |
| - | + | ||
| - | if (document.getElementById(' | + | |
| - | return; | + | |
| - | } | + | |
| - | + | ||
| - | document.getElementById(' | + | |
| - | if (Seconds < 1){ | + | |
| - | window.clearInterval(Interval); | + | |
| - | TimeOver = true; | + | |
| - | TimesUp(); | + | |
| - | } | + | |
| - | Seconds--; | + | |
| - | } | + | |
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | //--> | + | |
| - | + | ||
| - | //]]> | + | |
| - | + | ||
| - | </ | + | |
| - | + | ||
| - | </ | + | |
| - | + | ||
| - | <body onload=" | + | |
| - | <!-- BeginTopNavButtons --> | + | |
| - | + | ||
| - | + | ||
| - | <div class=" | + | |
| - | + | ||
| - | + | ||
| - | <button class=" | + | |
| - | + | ||
| - | + | ||
| - | + | ||
| - | <button class=" | + | |
| - | + | ||
| - | + | ||
| - | + | ||
| - | <button class=" | + | |
| - | + | ||
| - | + | ||
| - | </ | + | |
| - | + | ||
| - | + | ||
| - | + | ||
| - | <!-- EndTopNavButtons --> | + | |
| - | + | ||
| - | <div class=" | + | |
| - | <h2 class=" | + | |
| - | + | ||
| - | <h3 class=" | + | |
| - | + | ||
| - | + | ||
| - | <div id=" | + | |
| - | + | ||
| - | + | ||
| - | </ | + | |
| - | + | ||
| - | <div id=" | + | |
| - | <div id=" | + | |
| - | </ | + | |
| - | + | ||
| - | <div class=" | + | |
| - | <button id=" | + | |
| - | </ | + | |
| - | + | ||
| - | <script type=" | + | |
| - | + | ||
| - | //< | + | |
| - | + | ||
| - | <!-- | + | |
| - | + | ||
| - | + | ||
| - | for (var i=0; i< | + | |
| - | document.write('< | + | |
| - | } | + | |
| - | + | ||
| - | for (var i=0; i< | + | |
| - | document.write('< | + | |
| - | } | + | |
| - | + | ||
| - | //--> | + | |
| - | + | ||
| - | //]]> | + | |
| - | </ | + | |
| - | + | ||
| - | <div class=" | + | |
| - | <div class=" | + | |
| - | <button id=" | + | |
| - | </ | + | |
| - | + | ||
| - | <!-- BeginBottomNavButtons --> | + | |
| - | + | ||
| - | <!-- EndBottomNavButtons --> | + | |
| - | + | ||
| - | <!-- BeginSubmissionForm --> | + | |
| - | + | ||
| - | <!-- EndSubmissionForm --> | + | |
| - | + | ||
| - | </ | + | |
| - | </ | + | |
| - | + | ||
| </ | </ | ||
| + | ====== ====== | ||
| + | === Activités de développement du sujet === | ||
| + | {{: | ||
| + | {{: | ||
| + | {{: | ||
| + | {{: | ||
| + | \\ | ||