diff --git a/mod/hotpot/README.TXT b/mod/hotpot/README.TXT index 24c4fded0a3..8c8d2abf4a8 100644 --- a/mod/hotpot/README.TXT +++ b/mod/hotpot/README.TXT @@ -16,7 +16,7 @@ This is v2.4.2 of the HotPot module for Moodle 1.9 This software is provided "AS IS" without a warranty of any kind. Sponsors who have generously contributed to the development of this software: - - Agencia de Gestio d'Ajuts Universitaris i de Recerca (AGAUR), + - Agencia de Gestio d'Ajuts Universitaris i de Recerca (AGAUR), Autonomous Government of Catalonia, Spain (via Josep M. Fontana, Universitat Pompeu Fabra) - Rikkyo Univeristy, Japan (via Paul Allum) @@ -33,9 +33,9 @@ IMPORTANT NOTICE TO INSTALL OR UPDATE THE HOTPOT MODULE ====================================== - You should install only this module by installing a complete Moodle 1.9 package. + You should install only this module by installing a complete Moodle 1.9 package. - Similarly, the recommended way to upgrade this module is to upgrade to a complete Moodle 1.8 package. + Similarly, the recommended way to upgrade this module is to upgrade to a complete Moodle 1.8 package. However, it is possible to download and unzip a complete Moodle 1.9 package and extract the "mod/hotpot" folder for use on your live Moodle 1.8 site. @@ -53,7 +53,7 @@ TO USE THE HOTPOT MODULE 5. On the main page for the Moodle course, confirm editing is turned on (click the "Turn editing on" button), then, in the section where you want to add the HotPot activity, select "Hot Potatoes Quiz" on the "Add an activity" drop-down menu . - If "Hot Potatoes Quiz" does not appear on the "Add an activity" menu, you may need to enable the HotPot module as follows: + If "Hot Potatoes Quiz" does not appear on the "Add an activity" menu, you may need to enable the HotPot module as follows: a) from the site's front page select "Admin" then "Modules" b) click the "closed eye" icon for the "Hot Potatoes Quiz" module @@ -75,9 +75,9 @@ HOT POTATOES CONDITIONS OF USE ** Reproduced from the Hot Potatoes site ** Hot Potatoes is offered free to the educational community by the University of Victoria Humanities Computing and Media Centre (formerly the Language Centre), under certain conditions. Hot Potatoes is free for use by state educational institutions which are non-profit making, on the condition that the material produced using the program is freely available to anyone via the WWW. However, you need to purchase a licence under any of the following conditions: -* You do not work for a public sector educational establishment. -* You charge money for access to the material you make with Hot Potatoes. -* You restrict access to the material in some way. (The only exception here is if you have an account on www.hotpot.net, where you ARE allowed to use password restrictions.) +* You do not work for a public sector educational establishment. +* You charge money for access to the material you make with Hot Potatoes. +* You restrict access to the material in some way. (The only exception here is if you have an account on www.hotpot.net, where you ARE allowed to use password restrictions.) * You want to use the Masher program included with the Hot Potatoes suite. For more information on licences, and details on how to purchase one, check out our Website at: diff --git a/mod/hotpot/db/install.php b/mod/hotpot/db/install.php deleted file mode 100644 index 17742a47161..00000000000 --- a/mod/hotpot/db/install.php +++ /dev/null @@ -1,17 +0,0 @@ -set_field('modules', 'visible', 0, array('name'=>'hotpot')); - -/// Install logging support here - - -} diff --git a/mod/hotpot/db/upgrade.php b/mod/hotpot/db/upgrade.php index 1b92ac59f2e..857c60c9de0 100644 --- a/mod/hotpot/db/upgrade.php +++ b/mod/hotpot/db/upgrade.php @@ -29,5 +29,3 @@ function xmldb_hotpot_upgrade($oldversion) { return $result; } - - diff --git a/mod/hotpot/hotpot-full.js b/mod/hotpot/hotpot-full.js index ba88dc2f2be..61879e2a7dd 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 143b650aafa..65a148a9472 100644 --- a/mod/hotpot/template/v6/djmatch6.js_ +++ b/mod/hotpot/template/v6/djmatch6.js_ @@ -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; @@ -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]'; @@ -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 c8bbc6b91f5..1fb8c7c9fc2 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/fjmatch6.ht_ b/mod/hotpot/template/v6/fjmatch6.ht_ index 37576157a0b..2a22c60e528 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 f88eedbde2f..988ac5435a5 100644 --- a/mod/hotpot/template/v6/fjmatch6.js_ +++ b/mod/hotpot/template/v6/fjmatch6.js_ @@ -51,7 +51,7 @@ function StartUp(){ [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(''); diff --git a/mod/hotpot/template/v6/hp6.cs_ b/mod/hotpot/template/v6/hp6.cs_ index b23d66cee08..05c9b3e700e 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{ diff --git a/mod/hotpot/template/v6/hp6browsercheck.js_ b/mod/hotpot/template/v6/hp6browsercheck.js_ index e9b9c56e535..b15bf7d2f64 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); diff --git a/mod/hotpot/template/v6/hp6card.js_ b/mod/hotpot/template/v6/hp6card.js_ index 7e5177c82b5..e9eb06e49f0 100644 --- a/mod/hotpot/template/v6/hp6card.js_ +++ b/mod/hotpot/template/v6/hp6card.js_ @@ -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,18 +125,18 @@ 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;} @@ -145,7 +145,7 @@ function endDrag(e) { //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/hp6objecttags.ht_ b/mod/hotpot/template/v6/hp6objecttags.ht_ index b26a448037d..ad0e1577642 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 ced728ad20f..9abc49af4b0 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 983b8e045d4..58dde4675f1 100644 --- a/mod/hotpot/template/v6/hp6showmessage.js_ +++ b/mod/hotpot/template/v6/hp6showmessage.js_ @@ -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 697ce366c7f..2f12775229c 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; diff --git a/mod/hotpot/template/v6/jcloze6.ht_ b/mod/hotpot/template/v6/jcloze6.ht_ index 9590260d9e9..ac0c84fddcd 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 52d8a5264b6..3a22cce217c 100644 --- a/mod/hotpot/template/v6/jcloze6.js_ +++ b/mod/hotpot/template/v6/jcloze6.js_ @@ -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]'; diff --git a/mod/hotpot/template/v6/jcross6.ht_ b/mod/hotpot/template/v6/jcross6.ht_ index 27dc7d0b906..bcaeea97680 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 6a95bf2f195..26c911ff05b 100644 --- a/mod/hotpot/template/v6/jcross6.js_ +++ b/mod/hotpot/template/v6/jcross6.js_ @@ -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>'; @@ -88,7 +88,7 @@ function GetAnswerLength(Across,x,y){ while ((x<L.length)&&(L[x][y].length > 0)){ Result += L[x][y].length; x++; - } + } return Result; } else{ @@ -269,7 +269,7 @@ function CheckAnswers(){ var AllCorrect = true; var TotLetters = 0; var CorrectLetters = 0; - var LetterFromKey = ''; + var LetterFromKey = ''; var LetterFromGuess = ''; //Check each letter @@ -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,''); diff --git a/mod/hotpot/template/v6/jmatch6.ht_ b/mod/hotpot/template/v6/jmatch6.ht_ index eb301f45871..988170eb7b6 100644 --- a/mod/hotpot/template/v6/jmatch6.ht_ +++ b/mod/hotpot/template/v6/jmatch6.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/jmatch6.js_ b/mod/hotpot/template/v6/jmatch6.js_ index 57ea886273a..1922189d8e2 100644 --- a/mod/hotpot/template/v6/jmatch6.js_ +++ b/mod/hotpot/template/v6/jmatch6.js_ @@ -233,7 +233,7 @@ function CheckAnswers(){ Parent.removeChild(Select); Parent.innerHTML = AnsText; Parent.nextSibling.innerHTML = CorrectIndicator; - } + } else{ AllDone = false; Parent = Select.parentNode; diff --git a/mod/hotpot/template/v6/jmix6.ht_ b/mod/hotpot/template/v6/jmix6.ht_ index 7f9e2997e57..54c92d46dd2 100644 --- a/mod/hotpot/template/v6/jmix6.ht_ +++ b/mod/hotpot/template/v6/jmix6.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/jquiz6.ht_ b/mod/hotpot/template/v6/jquiz6.ht_ index 2cb0868c6b1..3cedaefe1f3 100644 --- a/mod/hotpot/template/v6/jquiz6.ht_ +++ b/mod/hotpot/template/v6/jquiz6.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] @@ -109,7 +109,7 @@ <div id="MainDiv" class="StdDiv"> - + <div id="QNav" class="QuestionNavigation"> <p style="text-align: right;"> @@ -126,7 +126,7 @@ </div> </div> - + [strQuestionOutput] [inclKeypad] diff --git a/mod/hotpot/template/v6/jquiz6.js_ b/mod/hotpot/template/v6/jquiz6.js_ index 4da31907eeb..cf1a4f73cfa 100644 --- a/mod/hotpot/template/v6/jquiz6.js_ +++ b/mod/hotpot/template/v6/jquiz6.js_ @@ -89,7 +89,7 @@ function CompleteEmptyFeedback(){ } function SetUpQuestions(){ - var AList = new Array(); + var AList = new Array(); var QList = new Array(); var i, j; Qs = document.getElementById('Questions'); @@ -172,7 +172,7 @@ function SetFocusToTextbox(){ function ChangeQ(ChangeBy){ //The following line prevents moving to another question until the current -//question is answered correctly. Uncomment it to enable this behaviour. +//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 = 'none'; @@ -571,9 +571,9 @@ function CalculateOverallScore(){ Score = Math.floor((TotalScore/TotalWeighting)*100); } else{ -//if TotalWeighting is 0, no questions so far have any value, so +//if TotalWeighting is 0, no questions so far have any value, so //no penalty should be shown. - Score = 100; + Score = 100; } } diff --git a/mod/hotpot/template/v6/masher.ht_ b/mod/hotpot/template/v6/masher.ht_ index 6ab4550e914..fa795d8f30f 100644 --- a/mod/hotpot/template/v6/masher.ht_ +++ b/mod/hotpot/template/v6/masher.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> [strPlainIndexTitle] @@ -21,7 +21,7 @@ body{ font-family: [strFontFace]; [inclPageBGColor] background-color: [strPageBGColor];[/inclPageBGColor] color: [strTextColor]; -[inclGraphicURL] background-image: url([strGraphicURL]);[/inclGraphicURL] +[inclGraphicURL] background-image: url([strGraphicURL]);[/inclGraphicURL] padding-left: 5%; padding-right: 5%; font-size: [strFontSize]; diff --git a/mod/hotpot/view.php b/mod/hotpot/view.php index 64af295e8c3..2480a42f4c3 100644 --- a/mod/hotpot/view.php +++ b/mod/hotpot/view.php @@ -47,6 +47,7 @@ $title = format_string($course->shortname.': '.$hotpot->name, true); $heading = $course->fullname; + $button = update_module_button($cm->id, $course->id, get_string("modulename", "hotpot")); $button = '<div style="font-size:0.75em;">'.$button.'</div>'; $PAGE->set_title($title); @@ -374,7 +375,6 @@ $PAGE->set_title($title); $PAGE->set_heading($heading); $PAGE->set_button($button); - $PAGE->set_headingmenu($loggedinas); echo $OUTPUT->header(); if (!empty($available_msg)) { echo $OUTPUT->notification($available_msg); @@ -424,17 +424,32 @@ print $hp->html; break; default: - $iframe_id = 'hotpot_iframe'; + // set iframe attributes + $iframe_id = 'hotpot_embed_object'; + $iframe_src = 'view.php?id='.$cm->id.'&framename=main'; + $PAGE->requires->js('/mod/hotpot/iframe.js'); - $PAGE->requires->js_function_call('set_iframe_height', array($iframe_id), true); + $PAGE->requires->js_function_call('set_embed_object_height', array($iframe_id), true); + echo $OUTPUT->header(); if (!empty($available_msg)) { echo $OUTPUT->notification($available_msg); } - print "<iframe id=\"$iframe_id\" src=\"view.php?id=$cm->id&framename=main\" height=\"100%\" width=\"100%\">"; - print "<ilayer name=\"$iframe_id\" src=\"view.php?id=$cm->id&framename=main\" height=\"100%\" width=\"100%\">"; - print "</ilayer>\n"; - print "</iframe>\n"; + + // for XHTML 1.0 Strict compatability, the embedded page should be implemented + // using an <object> not an <iframe>. However, IE <object>'s are problematic + // (links and forms cannot escape), so we use conditional comments to display + // an <iframe> in IE and an <object> in other browsers + + // print the html element to hold the embedded html page + // Note: the iframe in IE needs a "name" attribute for the resizing to work + print '<!--[if IE]>'."\n"; + print '<iframe id="'.$iframe_id.'" name="'.$iframe_id.'_name" src="'.$iframe_src.'" width="100%" height="100%"></iframe>'."\n"; + print '<![endif]-->'."\n"; + print '<!--[if !IE]> <-->'."\n"; + print '<object id="'.$iframe_id.'" type="text/html" data="'.$iframe_src.'" width="100%" height="100%"></object>'."\n"; + print '<!--> <![endif]-->'."\n"; + print $footer; break; } // end switch $framename @@ -477,4 +492,3 @@ function hotpot_feedback_teachers(&$course, &$hotpot) { } return $teacherdetails; } -