diff --git a/mod/hotpot/hotpot-full.js b/mod/hotpot/hotpot-full.js index 61879e2a7dd..a68e92b33ca 100644 --- a/mod/hotpot/hotpot-full.js +++ b/mod/hotpot/hotpot-full.js @@ -1,27 +1,27 @@ [inclNavButtons] diff --git a/mod/hotpot/template/v6/djmatch6.js_ b/mod/hotpot/template/v6/djmatch6.js_ index 65a148a9472..b0294a0454e 100644 --- a/mod/hotpot/template/v6/djmatch6.js_ +++ b/mod/hotpot/template/v6/djmatch6.js_ @@ -6,20 +6,20 @@ function SetScormScore(){ //Reports the current score and any other information back to the LMS if (API != null){ API.LMSSetValue('cmi.core.score.raw', Score); - - + + //Now send a detailed reports on the item var ItemLabel = 'Matching'; API.LMSSetValue('cmi.objectives.0.id', 'obj'+ItemLabel); - API.LMSSetValue('cmi.interactions.0.id', 'int'+ItemLabel); - API.LMSSetValue('cmi.objectives.0.status', API.LMSGetValue('cmi.core.lesson_status')); + API.LMSSetValue('cmi.interactions.0.id', 'int'+ItemLabel); + API.LMSSetValue('cmi.objectives.0.status', API.LMSGetValue('cmi.core.lesson_status')); API.LMSSetValue('cmi.objectives.0.score.min', '0'); API.LMSSetValue('cmi.objectives.0.score.max', '100'); API.LMSSetValue('cmi.objectives.0.score.raw', Score); //We can only use the performance type, because we're storing multiple responses of various types. API.LMSSetValue('cmi.interactions.0.type', 'performance'); API.LMSSetValue('cmi.interactions.0.student_response', AnswersTried); - + API.LMSCommit(''); } } @@ -54,7 +54,7 @@ var AnswersTried = ''; FC = new Array(); DC = new Array(); -function onEndDrag(){ +function onEndDrag(){ //Is it dropped on any of the fixed cards? var Docked = false; var DropTarget = DroppedOnFixed(CurrDrag); @@ -79,7 +79,7 @@ function onEndDrag(){ DC[CurrDrag].tag = 0; D[CurrDrag][2] = 0; } -} +} function DroppedOnFixed(DNum){ var Result = -1; @@ -121,12 +121,12 @@ function StartUp(){ 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); @@ -143,7 +143,7 @@ function StartUp(){ for (var i=0; i Widest){ Widest = FC[i].GetW(); } @@ -162,7 +162,7 @@ function StartUp(){ DC[i] = new Card('D' + i, 10); CardContent = D[i][0]; // if (CardContent.indexOf(' -1){CardContent += '
';} //used to be required for Navigator rendering bug with images - DC[i].elm.innerHTML = CardContent; + DC[i].elm.innerHTML = CardContent; if (DC[i].GetW() > DragWidth){DC[i].SetW(DragWidth);} DC[i].css.cursor = 'move'; DC[i].css.backgroundColor = '[strExBGColor]'; @@ -276,7 +276,7 @@ function ReduceItems2(){ } for (j=ItemToDump; j<(D.length-1); j++){ D[j] = D[j+1]; - } + } F.length = F.length-1; D.length = D.length-1; } @@ -303,7 +303,7 @@ function CheckAnswers(){ TotalCorrect++; } else{ -//Change made for version 6.0.3.41: don't send wrong items home, +//Change made for version 6.0.3.41: don't send wrong items home, //show them in a more conspicuous way. // DC[i].GoHome(); DC[i].SetL(DC[i].GetL() + 10); diff --git a/mod/hotpot/template/v6/djmix6.ht_ b/mod/hotpot/template/v6/djmix6.ht_ index 1fb8c7c9fc2..c8bbc6b91f5 100644 --- a/mod/hotpot/template/v6/djmix6.ht_ +++ b/mod/hotpot/template/v6/djmix6.ht_ @@ -5,7 +5,7 @@ [strDublinCoreMetadata] - + [strPlainTitle] @@ -61,9 +61,9 @@ </script> -</head> +</head> -<body onload="TimerStartUp()" id="TheBody" [inclScorm1.2]onunload="CheckLMSFinish()"[/inclScorm1.2]> +<body onload="TimerStartUp()" id="TheBody" [inclScorm1.2]onunload="CheckLMSFinish()"[/inclScorm1.2]> <!-- BeginTopNavButtons --> [inclNavButtons] diff --git a/mod/hotpot/template/v6/djmix6.js_ b/mod/hotpot/template/v6/djmix6.js_ index 42e22d6b0b9..53610d3009b 100644 --- a/mod/hotpot/template/v6/djmix6.js_ +++ b/mod/hotpot/template/v6/djmix6.js_ @@ -5,7 +5,7 @@ function SetScormScore(){ //Reports the current score and any other information back to the LMS if (API != null){ API.LMSSetValue('cmi.core.score.raw', Score); - + //Now send a detailed reports on the item var ItemLabel = 'Item_1'; API.LMSSetValue('cmi.objectives.0.id', 'obj'+ItemLabel); @@ -16,15 +16,15 @@ function SetScormScore(){ else{ API.LMSSetValue('cmi.objectives.0.status', 'incomplete'); } - + API.LMSSetValue('cmi.objectives.0.score.min', '0'); API.LMSSetValue('cmi.objectives.0.score.max', '100'); API.LMSSetValue('cmi.objectives.0.score.raw', Score); //We can only use the performance type, because we're storing multiple responses of various types. API.LMSSetValue('cmi.interactions.0.type', 'performance'); API.LMSSetValue('cmi.interactions.0.student_response', AnswersTried); - - + + API.LMSCommit(''); } } @@ -106,7 +106,7 @@ function GetGuessSequence(){ } var CardPos = 0; - + for (i=0; i<Cds.length; i++){ for (var j=0; j<L.length; j++){ //Slight modification for 6.0.4: allow some leeway for 1px inaccuracy in card placing by browser. @@ -178,7 +178,7 @@ function CompileString(InArray){ if ((Openers.indexOf(OutString.charAt(OutString.length-1)) > -1)||(Punctuation.indexOf(OutArray[i].charAt(0)) > -1)){ Spacer = ''; } - OutString = OutString + Spacer + OutArray[i]; + OutString = OutString + Spacer + OutArray[i]; } //Capitalize the first letter if necessary @@ -234,7 +234,7 @@ function CheckAnswer(CheckType){ } HintToReturn = TempHint; } - } + } } if (WhichCorrect > -1){ AllDone = true; @@ -244,7 +244,7 @@ function CheckAnswer(CheckType){ } } WellDone = '<span class="CorrectAnswer">' + CompiledOutput + '</span><br /><br />' + CorrectResponse + '<br />'; - + if (AnswersTried.length > 0){AnswersTried += ' | ';} AnswersTried += CompiledOutput; @@ -280,7 +280,7 @@ function CheckAnswer(CheckType){ if (CheckType == 1){ TryAgain += '<br />' + NextCorrect + '<br />' + FindSegment(HintToReturn); } - + [inclTimer] if (TimeOver == true){ Score = Math.floor(((LongestCorrect.length-Penalties) * 100)/Segments.length); @@ -291,7 +291,7 @@ function CheckAnswer(CheckType){ Penalties++; //Penalty for inaccurate check ShowMessage(TryAgain); } - + //If the exercise is over, deal with that if ((AllDone == true)||(TimeOver == true)){ [inclSendResults] @@ -306,7 +306,7 @@ function CheckAnswer(CheckType){ setTimeout('Finish()', SubmissionTimeout); WriteToInstructions(YourScoreIs + ' ' + Score + '%.'); } - + [inclScorm1.2] if (AllDone == true){ SetScormComplete(); @@ -364,7 +364,7 @@ function endDrag(e) { if (CurrDrag == -1) {return}; Cds[CurrDrag].SwapColours(); if (C.ie){document.onmousemove=null}else{window.onmousemove=null;} - onEndDrag(); + onEndDrag(); CurrDrag = -1; return true; } @@ -430,10 +430,10 @@ function CheckOver(NoMove){ Cds[i].SetL(LeftColPos); Cds[i].SetT(Cds[i].GetT() + DropHeight); } - CheckOver(i); + CheckOver(i); } } - } + } } } } diff --git a/mod/hotpot/template/v6/fjmatch6.ht_ b/mod/hotpot/template/v6/fjmatch6.ht_ index 2a22c60e528..37576157a0b 100644 --- a/mod/hotpot/template/v6/fjmatch6.ht_ +++ b/mod/hotpot/template/v6/fjmatch6.ht_ @@ -5,7 +5,7 @@ [strDublinCoreMetadata] -<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> +<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title> [strPlainTitle] diff --git a/mod/hotpot/template/v6/fjmatch6.js_ b/mod/hotpot/template/v6/fjmatch6.js_ index 988ac5435a5..c2aedfa99fa 100644 --- a/mod/hotpot/template/v6/fjmatch6.js_ +++ b/mod/hotpot/template/v6/fjmatch6.js_ @@ -16,7 +16,7 @@ var CurrItem = null; var Stage = 2; var QList = new Array(); var ShuffleQs = [boolShuffleQs]; - + function SetUpItems(){ var i; @@ -32,7 +32,7 @@ function SetUpItems(){ Row.getElementsByTagName('td')[1].className = 'Hidden'; QList.push(Qs.removeChild(Row)); } - + //Shuffle the rows if (ShuffleQs == true){ QList = Shuffle(QList); @@ -47,11 +47,11 @@ function SetUpItems(){ function StartUp(){ SetUpItems(); - + [inclScorm1.2] initAPI(window); if (API != null){ - API.LMSInitialize(''); + API.LMSInitialize(''); API.LMSSetValue('cmi.core.lesson_status', 'browsed'); API.LMSSetValue('cmi.comments', 'This exercise has no checking or scoring features.'); API.LMSCommit(''); @@ -72,7 +72,7 @@ var Started = false; function DeleteItem(){ if ((CurrItem == null)||(document.getElementById('Questions').getElementsByTagName('tr').length < 1)){return;} - + //Delete the current item var DelItem = CurrItem; Stage = 2; @@ -89,7 +89,7 @@ function ShowItem(){ if (Len < 1){ return; } - + //if no current item, get the last item so we roll forward if (CurrItem == null){ CurrItem = Qs.getElementsByTagName('tr')[Len-1]; @@ -97,7 +97,7 @@ function ShowItem(){ return; } } - + //if CurrItem has been fully shown, move to the next one if (Stage == 2){ CurrItem.getElementsByTagName('td')[0].className = 'Hidden'; @@ -109,7 +109,7 @@ function ShowItem(){ CurrItem = Qs.getElementsByTagName('tr')[0]; } } - + //Show the appropriate bits if (Stage == 2){ //Show the first item and hide the second @@ -121,9 +121,9 @@ function ShowItem(){ //Show both items CurrItem.getElementsByTagName('td')[0].className = 'Showing'; CurrItem.getElementsByTagName('td')[1].className = 'Showing'; - Stage = 2; + Stage = 2; } - + [inclPreloadImages] RefreshImages(); [/inclPreloadImages] diff --git a/mod/hotpot/template/v6/hp6.cs_ b/mod/hotpot/template/v6/hp6.cs_ index 05c9b3e700e..f69f10615c4 100644 --- a/mod/hotpot/template/v6/hp6.cs_ +++ b/mod/hotpot/template/v6/hp6.cs_ @@ -16,7 +16,7 @@ body{ font-family: [strFontFace]; [inclPageBGColor] background-color: [strPageBGColor];[/inclPageBGColor] color: [strTextColor]; -[inclGraphicURL] background-image: url([strGraphicURL]);[/inclGraphicURL] +[inclGraphicURL] background-image: url([strGraphicURL]);[/inclGraphicURL] margin-right: 5%; margin-left: 5%; font-size: [strFontSize]; @@ -73,14 +73,14 @@ div.StdDiv{ text-align: right; font-size: 150%; direction: rtl; - font-family: "Simplified Arabic", "Traditional Arabic", "Times New Roman", [strFontFace]; + font-family: "Simplified Arabic", "Traditional Arabic", "Times New Roman", [strFontFace]; } .CentredRTLText{ text-align: center; font-size: 150%; direction: rtl; - font-family: "Simplified Arabic", "Traditional Arabic", "Times New Roman", [strFontFace]; + font-family: "Simplified Arabic", "Traditional Arabic", "Times New Roman", [strFontFace]; } button p.RTLText{ @@ -531,7 +531,7 @@ div.NavButtonBar{ .NavButton { border-style: solid; -[inclNavBarColor] +[inclNavBarColor] border-left-color: [strNavLightColor]; border-top-color: [strNavLightColor]; border-right-color: [strNavShadeColor]; @@ -540,7 +540,7 @@ div.NavButtonBar{ color: [strNavTextColor]; [/inclNavBarColor] border-width: 2px; - cursor: pointer; + cursor: pointer; } .NavButtonUp { @@ -554,7 +554,7 @@ div.NavButtonBar{ background-color: [strNavTextColor]; [/inclNavBarColor] border-width: 2px; - cursor: pointer; + cursor: pointer; } .NavButtonDown { @@ -568,7 +568,7 @@ div.NavButtonBar{ background-color: [strNavTextColor]; [/inclNavBarColor] border-width: 2px; - cursor: pointer; + cursor: pointer; } /*EndNavBarStyle*/ diff --git a/mod/hotpot/template/v6/hp6browsercheck.js_ b/mod/hotpot/template/v6/hp6browsercheck.js_ index b15bf7d2f64..406eb509378 100644 --- a/mod/hotpot/template/v6/hp6browsercheck.js_ +++ b/mod/hotpot/template/v6/hp6browsercheck.js_ @@ -5,7 +5,7 @@ function Client(){ this.ua = navigator.userAgent; this.name = navigator.appName; - this.ver = navigator.appVersion; + this.ver = navigator.appVersion; //Get data about the browser this.mac = (this.ver.indexOf('Mac') != -1); @@ -17,23 +17,23 @@ function Client(){ this.geckoVer = parseInt(this.ua.substring(this.ua.indexOf('Gecko')+6, this.ua.length)); if (this.geckoVer < 20020000){this.min = false;} } - + //Look for Firebird this.firebird = (this.ua.indexOf('Firebird') > 1); - + //Look for Safari this.safari = (this.ua.indexOf('Safari') > 1); if (this.safari){ this.gecko = false; } - + //Look for IE this.ie = (this.ua.indexOf('MSIE') > 0); if (this.ie){ this.ieVer = parseFloat(this.ua.substring(this.ua.indexOf('MSIE')+5, this.ua.length)); if (this.ieVer < 5.5){this.min = false;} } - + //Look for Opera this.opera = (this.ua.indexOf('Opera') > 0); if (this.opera){ @@ -43,7 +43,7 @@ function Client(){ if (this.min == false){ alert('Your browser may not be able to handle this page.'); } - + //Special case for the horrible ie5mac this.ie5mac = (this.ie&&this.mac&&(this.ieVer<6)); } diff --git a/mod/hotpot/template/v6/hp6card.js_ b/mod/hotpot/template/v6/hp6card.js_ index e9eb06e49f0..6fc15b86170 100644 --- a/mod/hotpot/template/v6/hp6card.js_ +++ b/mod/hotpot/template/v6/hp6card.js_ @@ -77,7 +77,7 @@ function CardOverlap(OtherCard){ var lgT=(this.GetT()>OtherCard.GetT())? this.GetT(): OtherCard.GetT(); var VDim=smB-lgT; if (VDim<1){return 0;} - return (HDim*VDim); + return (HDim*VDim); } Card.prototype.Overlap=CardOverlap; @@ -105,18 +105,18 @@ Card.prototype.GoHome=CardGoHome; 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); + 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; + window.lastX = Ev.clientX; + window.lastY = Ev.clientY; return false; -} +} -function beginDrag(e, DragNum) { +function beginDrag(e, DragNum) { CurrDrag = DragNum; if (C.ie){ var Ev = window.event; @@ -125,27 +125,27 @@ function beginDrag(e, DragNum) { } else{ var Ev = e; - window.onmousemove=doDrag; + window.onmousemove=doDrag; window.onmouseup=endDrag; - } + } DC[CurrDrag].Highlight(); topZ++; DC[CurrDrag].css.zIndex = topZ; - window.lastX=Ev.clientX; + window.lastX=Ev.clientX; window.lastY=Ev.clientY; - return false; -} + return false; +} -function endDrag(e) { +function endDrag(e) { if (CurrDrag == -1) {return}; DC[CurrDrag].Unhighlight(); if (C.ie){document.onmousemove=null}else{window.onmousemove=null;} - onEndDrag(); + onEndDrag(); CurrDrag = -1; //Need a bugfix for Opera focus problem here if (C.opera){FocusAButton();} return true; -} +} var CurrDrag = -1; var topZ = 100; diff --git a/mod/hotpot/template/v6/hp6checkshortanswer.js_ b/mod/hotpot/template/v6/hp6checkshortanswer.js_ index 54596b1404a..6792ef19810 100644 --- a/mod/hotpot/template/v6/hp6checkshortanswer.js_ +++ b/mod/hotpot/template/v6/hp6checkshortanswer.js_ @@ -39,7 +39,7 @@ function CheckGuess(Guess, Answer, CaseSensitive, PercentCorrect, Feedback){ } else{ this.WorkingGuess = Guess; - this.WorkingAnswer = Answer; + this.WorkingAnswer = Answer; } this.Hint = ''; this.HintPenalty = 1/Answer.length; @@ -66,12 +66,12 @@ function CheckGuess_DoCheck(){ } //Stash the hint this.Hint = this.Answer.charAt(i); - + this.CorrectStart = this.Guess.substring(0, i); - + //If there's more to the answer, look at the rest of it if (i<this.Guess.length){ - + //Figure out how much of the end is correct var j = this.WorkingGuess.length-1; var k = this.WorkingAnswer.length-1; @@ -90,7 +90,7 @@ function CheckGuess_DoCheck(){ } else{ this.PercentMatch = Math.floor((100 * CorrectChars)/this.Guess.length); - } + } } CheckGuess.prototype.DoCheck = CheckGuess_DoCheck; @@ -160,13 +160,13 @@ CheckAnswerArray.prototype.GetBestMatch = CheckAnswerArray_GetBestMatch; function CheckShortAnswer(QNum){ //bail if question doesn't exist or exercise finished if ((State[QNum].length < 1)||(Finished == true)){return;} - + //bail if question already complete if (State[QNum][0] > -1){return;} //Get the guess (TrimString added to fix bug for 6.0.4.3) var G = TrimString(document.getElementById('Q_' + QNum + '_Guess').value); - + //If no guess, bail with message; no penalty if (G.length < 1){ ShowMessage(PleaseEnter); @@ -175,7 +175,7 @@ function CheckShortAnswer(QNum){ //Increment tries State[QNum][2]++; - + //Create a check object var CA = new CheckAnswerArray(CaseSensitive); @@ -184,7 +184,7 @@ function CheckShortAnswer(QNum){ CA.AddAnswer(G, I[QNum][3][ANum][0], I[QNum][3][ANum][3], I[QNum][3][ANum][1]); } CA.GetBestMatch(); - + //Store any match in the state tracking field if (State[QNum][5].length > 0){State[QNum][5] += ' | ';} if (CA.MatchNum > -1){ @@ -198,11 +198,11 @@ function CheckShortAnswer(QNum){ //Add the percent correct value for this answer to the Q State (works for all //situations, wrong or right) State[QNum][3] += CA.Score; - + //Now branch, based on the nature of the match //Is it a complete match? if (CA.CompleteMatch == true){ - + //Is it with a wrong answer, or a right answer? if (CA.Score == 100){ //It's right @@ -213,8 +213,8 @@ function CheckShortAnswer(QNum){ if (AlsoCorrectList.length > 0){ CA.Feedback += '<br />' + CorrectList + '<br />' + AlsoCorrectList; } - } - + } + //Get the overall score and add it to the feedback if (ContinuousScoring == true){ CalculateOverallScore(); @@ -228,14 +228,14 @@ function CheckShortAnswer(QNum){ return; } } - + //Otherwise, it's a match to a predicted wrong/partially correct, or a partial //match to a right answer if (CA.Feedback.length < 1){CA.Feedback = DefaultWrong;} //Remove any previous score unless exercise is finished (6.0.3.8+) if (Finished == false){ WriteToInstructions(strInstructions); - } + } ShowMessage(CA.Feedback); //If necessary, switch a hybrid question to m/c @@ -278,7 +278,7 @@ function GetCorrectArray(QNum){ if (I[QNum][3][ANum][2] == 1){ //This is an acceptable correct answer Result.push(I[QNum][3][ANum][0]); } - } + } return Result; } @@ -322,14 +322,14 @@ function ReplaceGuessBox(QNum, Ans){ function ShowAnswers(QNum){ //bail if question doesn't exist or exercise finished if ((State[QNum].length < 1)||(Finished == true)){return;} - + //Get the answer list to display var Ans = GetCorrectList(QNum, '', false); Ans = CorrectList + '<br />' + Ans; - + //Display feedback ShowMessage(Ans); - + //Set the score for this question to 0 if no if (State[QNum][0] < 1){ State[QNum][0] = 0; @@ -337,13 +337,13 @@ function ShowAnswers(QNum){ //Get the first correct answer var FirstAns = GetFirstCorrectAnswer(QNum); - + //Replace the textbox ReplaceGuessBox(QNum, FirstAns); - + //Remove any current score WriteToInstructions(strInstructions); - + //This may be the last, so check finished status CheckFinished(); } @@ -355,13 +355,13 @@ function ShowAnswers(QNum){ function ShowHint(QNum){ //bail if question doesn't exist or exercise finished if ((State[QNum].length < 1)||(Finished == true)){return;} - + //bail if question already complete if (State[QNum][0] > -1){return;} //Get the guess var G = document.getElementById('Q_' + QNum + '_Guess').value; - + //If no guess, give the first correct bit if (G.length < 1){ var Ans = GetFirstCorrectAnswer(QNum); @@ -374,7 +374,7 @@ function ShowHint(QNum){ //Increment tries State[QNum][2]++; - + //Create a check object var CA = new CheckAnswerArray(CaseSensitive); diff --git a/mod/hotpot/template/v6/hp6objecttags.ht_ b/mod/hotpot/template/v6/hp6objecttags.ht_ index ad0e1577642..b26a448037d 100644 --- a/mod/hotpot/template/v6/hp6objecttags.ht_ +++ b/mod/hotpot/template/v6/hp6objecttags.ht_ @@ -12,7 +12,7 @@ <param name="type" value="audio/x-pn-realaudio-plugin" /> <param name="src" value="[strFilePath]" /> <param name="autostart" value="false" /> -<param name="controls" value="[inclVideo]ImageWindow,[/inclVideo]ControlPanel" /> +<param name="controls" value="[inclVideo]ImageWindow,[/inclVideo]ControlPanel" /> [strContent]</object>[/Real Player] [Flash Player]<object codebase="[strFilePath]" type="application/x-shockwave-flash" width="[strWidth]" height="[strHeight]" data="[strFilePath]"> <param name="movie" value="[strFilePath]" />[strContent]</object>[/Flash Player] diff --git a/mod/hotpot/template/v6/hp6plainpage.ht_ b/mod/hotpot/template/v6/hp6plainpage.ht_ index 9abc49af4b0..ced728ad20f 100644 --- a/mod/hotpot/template/v6/hp6plainpage.ht_ +++ b/mod/hotpot/template/v6/hp6plainpage.ht_ @@ -3,7 +3,7 @@ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"><head> -<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> +<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title> Page Title @@ -31,7 +31,7 @@ Page Title </div> <div id="MainDiv" class="StdDiv"> - + <p>Page content...</p> </div> diff --git a/mod/hotpot/template/v6/hp6showmessage.js_ b/mod/hotpot/template/v6/hp6showmessage.js_ index 58dde4675f1..d013a29904e 100644 --- a/mod/hotpot/template/v6/hp6showmessage.js_ +++ b/mod/hotpot/template/v6/hp6showmessage.js_ @@ -21,7 +21,7 @@ function ShowMessage(Feedback){ //Focus the OK button setTimeout("document.getElementById('FeedbackOKButton').focus()", 50); - + //[inclPreloadImages] // RefreshImages(); //[/inclPreloadImages] @@ -54,7 +54,7 @@ function ShowElements(Show, TagName, ContainerToReverse){ Els[i].style.visibility = 'hidden'; if (C.mac && C.gecko) {Els[i].style.display = 'none';} } - } + } else { // tagName is either input or select (that is, Form Elements) // ie6 has a problem with Form elements, so manipulate those diff --git a/mod/hotpot/template/v6/hp6utilities.js_ b/mod/hotpot/template/v6/hp6utilities.js_ index 2f12775229c..d616e3b57f4 100644 --- a/mod/hotpot/template/v6/hp6utilities.js_ +++ b/mod/hotpot/template/v6/hp6utilities.js_ @@ -57,13 +57,13 @@ function GetViewportHeight(){ function TopSettingWithScrollOffset(TopPercent){ var T = Math.floor(GetViewportHeight() * (TopPercent/100)); - return GetScrollTop() + T; + return GetScrollTop() + T; } //CODE FOR AVOIDING LOSS OF DATA WHEN BACKSPACE KEY INVOKES history.back() var InTextBox = false; -function SuppressBackspace(e){ +function SuppressBackspace(e){ if (InTextBox == true){return;} if (C.ie) { thisKey = window.event.keyCode; @@ -80,7 +80,7 @@ function SuppressBackspace(e){ if (Suppress == true){ if (C.ie){ - window.event.returnValue = false; + window.event.returnValue = false; window.event.cancelBubble = true; } else{ diff --git a/mod/hotpot/template/v6/jcloze6.ht_ b/mod/hotpot/template/v6/jcloze6.ht_ index ac0c84fddcd..9590260d9e9 100644 --- a/mod/hotpot/template/v6/jcloze6.ht_ +++ b/mod/hotpot/template/v6/jcloze6.ht_ @@ -5,7 +5,7 @@ [strDublinCoreMetadata] -<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> +<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title> [strPlainTitle] @@ -120,7 +120,7 @@ [/inclHint] --> - + <div id="ClozeDiv"> <form id="Cloze" method="post" action="" onsubmit="return false;"> <div class="ClozeBody"> diff --git a/mod/hotpot/template/v6/jcloze6.js_ b/mod/hotpot/template/v6/jcloze6.js_ index 3a22cce217c..1dca255e67f 100644 --- a/mod/hotpot/template/v6/jcloze6.js_ +++ b/mod/hotpot/template/v6/jcloze6.js_ @@ -9,7 +9,7 @@ function SetScormScore(){ //Now send detailed reports about each item for (var i=0; i<State.length; i++){ var ThisItemGuesses = ''; - var GapLabel = 'Gap_' + (i+1).toString(); + var GapLabel = 'Gap_' + (i+1).toString(); var ThisItemScore = Math.floor(State[i].ItemScore * 100) + ''; API.LMSSetValue('cmi.objectives.' + i + '.id', 'obj'+GapLabel); API.LMSSetValue('cmi.interactions.' + i + '.id', 'int'+GapLabel); @@ -24,11 +24,11 @@ function SetScormScore(){ } for (var j=0; j<State[i].Guesses.length; j++){ if (j>0){ThisItemGuesses += ' | ';} - ThisItemGuesses += State[i].Guesses[j]; - } + ThisItemGuesses += State[i].Guesses[j]; + } API.LMSSetValue('cmi.interactions.' + i + '.type', 'fill-in'); API.LMSSetValue('cmi.interactions.' + i + '.student_response', ThisItemGuesses); - } + } API.LMSCommit(''); } } @@ -48,7 +48,7 @@ function ItemState(){ var Feedback = ''; var Correct = '[strCorrect]'; -var Incorrect = '[strIncorrect]'; +var Incorrect = '[strIncorrect]'; var GiveHint = '[strGiveHint]'; var CaseSensitive = [boolCaseSensitive]; var YourScoreIs = '[strYourScoreIs]'; @@ -70,7 +70,7 @@ function StartUp(){ if (document.getElementById('CharacterKeypad') != null){ document.getElementById('CharacterKeypad').style.display = 'block'; } - + [inclScorm1.2] ScormStartUp(); [/inclScorm1.2] @@ -89,9 +89,9 @@ function StartUp(){ for (i=0; i<I.length; i++){ State[i] = new ItemState(); } - + ClearTextBoxes(); - + [inclTimer] StartTimer(); [/inclTimer] @@ -126,8 +126,8 @@ function CompileGuesses(){ Temp += '<fieldlabelid>JClozeStudentResponses</fieldlabelid><fielddata>'; for (var j=0; j<State[i].Guesses.length; j++){ if (j>0){Temp += '| ';} - Temp += State[i].Guesses[j] + ' '; - } + Temp += State[i].Guesses[j] + ' '; + } Temp += '</fielddata></field>'; } Temp += '</fields></hpnetresult>'; @@ -184,12 +184,12 @@ function CheckAnswers(){ } ShowMessage(Output); setTimeout('WriteToInstructions(Output)', 50); - + Score = TotalScore; CompileGuesses(); - + if ((AllCorrect == true)||(Finished == true)){ - + [inclSendResults] setTimeout('SendResults(' + TotalScore + ')', 50); [/inclSendResults] @@ -282,7 +282,7 @@ function FindCurrent() { return CurrentWord; } } - + x=CurrentWord + 1; while (x<I.length){ if (State[x].AnsweredCorrectly == false){ @@ -290,7 +290,7 @@ function FindCurrent() { return x; } } - x++; + x++; } x = 0; @@ -300,7 +300,7 @@ function FindCurrent() { return x; } } - x++; + x++; } return FoundCurrent; } diff --git a/mod/hotpot/template/v6/jcross6.ht_ b/mod/hotpot/template/v6/jcross6.ht_ index bcaeea97680..27dc7d0b906 100644 --- a/mod/hotpot/template/v6/jcross6.ht_ +++ b/mod/hotpot/template/v6/jcross6.ht_ @@ -5,7 +5,7 @@ [strDublinCoreMetadata] -<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> +<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title> [strPlainTitle] @@ -120,7 +120,7 @@ <button id="CheckButton1" class="FuncButton" onmouseover="FuncBtnOver(this)" onfocus="FuncBtnOver(this)" onmouseout="FuncBtnOut(this)" onblur="FuncBtnOut(this)" onmousedown="FuncBtnDown(this)" onmouseup="FuncBtnOut(this)" onclick="CheckAnswers()"> [strCheckCaption] </button> --> - + <table class="CrosswordGrid"> <tbody> diff --git a/mod/hotpot/template/v6/jcross6.js_ b/mod/hotpot/template/v6/jcross6.js_ index 26c911ff05b..1a0dc9642d5 100644 --- a/mod/hotpot/template/v6/jcross6.js_ +++ b/mod/hotpot/template/v6/jcross6.js_ @@ -5,7 +5,7 @@ function SetScormScore(){ //Reports the current score and any other information back to the LMS if (API != null){ API.LMSSetValue('cmi.core.score.raw', Score); - + //Now send a detailed reports on the item var ItemLabel = 'Crossword'; API.LMSSetValue('cmi.objectives.0.id', 'obj'+ItemLabel); @@ -15,13 +15,13 @@ function SetScormScore(){ } else{ API.LMSSetValue('cmi.objectives.0.status', 'incomplete'); - } + } API.LMSSetValue('cmi.objectives.0.score.min', '0'); API.LMSSetValue('cmi.objectives.0.score.max', '100'); API.LMSSetValue('cmi.objectives.0.score.raw', Score); //We're not sending any student response data, so we can set this to a non-standard value API.LMSSetValue('cmi.interactions.0.type', 'crossword'); - + API.LMSCommit(''); } } @@ -35,7 +35,7 @@ var Feedback = ''; var AcrossCaption = ''; var DownCaption = ''; var Correct = '[strCorrect]'; -var Incorrect = '[strIncorrect]'; +var Incorrect = '[strIncorrect]'; var GiveHint = '[strGiveHint]'; var YourScoreIs = '[strYourScoreIs]'; var BuiltGrid = ''; @@ -45,7 +45,7 @@ var Score = 0; var InTextBox = false; var Locked = false; var TimeOver = false; -var CaseSensitive = [boolCaseSensitive]; +var CaseSensitive = [boolCaseSensitive]; var InputStuff = '<form method="post" action="" onsubmit="return false;"><span class="ClueNum">[strClueNum]: </span>'; InputStuff += '[strClue] <input onfocus="CurrentBox=this;InTextBox=true;" onblur="InTextBox=false;" id="[strBoxId]" type="edit" size="[strEditSize]" maxlength="[strMaxLength]"></input>'; @@ -65,7 +65,7 @@ function StartUp(){ [inclScorm1.2] ScormStartUp(); [/inclScorm1.2] - + AcrossCaption = document.getElementById('CluesAcrossLabel').innerHTML; DownCaption = document.getElementById('CluesDownLabel').innerHTML; [inclSendResults] @@ -88,14 +88,14 @@ function GetAnswerLength(Across,x,y){ while ((x<L.length)&&(L[x][y].length > 0)){ Result += L[x][y].length; x++; - } + } return Result; } else{ while ((y<L[x].length)&&(L[x][y].length > 0)){ Result += L[x][y].length; y++; - } + } return Result; } } @@ -165,7 +165,7 @@ function SplitStringToPerceivedChars(InString, PC){ function EnterAnswer(Guess,Across,AnsLength,x,y){ var PC = new Array(); SplitStringToPerceivedChars(Guess, PC); - + var i=x; var j=y; var Letter = 0; @@ -269,9 +269,9 @@ function CheckAnswers(){ var AllCorrect = true; var TotLetters = 0; var CorrectLetters = 0; - var LetterFromKey = ''; + var LetterFromKey = ''; var LetterFromGuess = ''; - + //Check each letter for (var i=0; i<L.length; i++){ for (var j=0; j<L[i].length; j++){ @@ -285,7 +285,7 @@ function CheckAnswers(){ LetterFromKey = L[i][j].toUpperCase(); LetterFromGuess = G[i][j].toUpperCase(); } - if (LetterFromGuess != LetterFromKey){ + if (LetterFromGuess != LetterFromKey){ G[i][j] = ''; //Blank that square in the grid SetGridSquareValue(i,j,''); @@ -316,7 +316,7 @@ function CheckAnswers(){ ShowMessage(Output); WriteToInstructions(Output); - + if ((AllCorrect == true)||(TimeOver == true)){ [inclSendResults] setTimeout('SendResults(' + Score + ')', 50); diff --git a/mod/hotpot/template/v6/jcross6print.ht_ b/mod/hotpot/template/v6/jcross6print.ht_ index 4697a97a5fc..37d100e747f 100644 --- a/mod/hotpot/template/v6/jcross6print.ht_ +++ b/mod/hotpot/template/v6/jcross6print.ht_ @@ -3,7 +3,7 @@ xml:lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> - + <title>