From 86342d631f07e26fb654cb51f3908101dc67a4e6 Mon Sep 17 00:00:00 2001 From: Petr Skoda Date: Sun, 1 Nov 2009 15:03:10 +0000 Subject: [PATCH] MDL-20700 coding style cleanup - cvs keywords removed, closign php tag removed, trailing whitespace cleanup --- mod/glossary/db/access.php | 2 +- mod/glossary/db/install.php | 2 +- mod/glossary/db/upgrade.php | 4 +- mod/glossary/formats/README.txt | 12 +- .../formats/TEMPLATE/TEMPLATE_format.php | 18 +- .../formats/continuous/continuous_format.php | 8 +- .../formats/dictionary/dictionary_format.php | 4 +- .../encyclopedia/encyclopedia_format.php | 20 +- .../formats/entrylist/entrylist_format.php | 4 +- mod/glossary/formats/faq/faq_format.php | 4 +- .../fullwithauthor/fullwithauthor_format.php | 10 +- .../fullwithoutauthor_format.php | 6 +- .../test_glossary_portfolio_callers.php | 4 +- mod/glossary/sql.php | 1 + mod/glossary/tabs.php | 24 +- mod/glossary/version.php | 4 +- mod/glossary/view.php | 3 +- mod/hotpot/README.TXT | 14 +- mod/hotpot/attempt.php | 6 +- mod/hotpot/backuplib.php | 4 +- mod/hotpot/db/access.php | 2 +- mod/hotpot/db/install.php | 4 +- mod/hotpot/db/upgrade.php | 4 +- mod/hotpot/grade.php | 2 +- mod/hotpot/hotpot-full.js | 146 ++++++------ mod/hotpot/index.php | 28 +-- mod/hotpot/lib.php | 16 +- mod/hotpot/mediaplayers/moodle/filter.php | 25 +- mod/hotpot/mod_form.php | 1 - mod/hotpot/report.php | 24 +- mod/hotpot/report/click/report.php | 8 +- mod/hotpot/report/default.php | 36 +-- mod/hotpot/report/fullstat/report.php | 14 +- mod/hotpot/report/overview/report.php | 18 +- mod/hotpot/report/simplestat/report.php | 12 +- mod/hotpot/restorelib.php | 28 +-- mod/hotpot/review.php | 8 +- mod/hotpot/settings.php | 6 +- mod/hotpot/template/default.php | 4 +- mod/hotpot/template/v6.php | 24 +- mod/hotpot/template/v6/djmatch6.ht_ | 6 +- mod/hotpot/template/v6/djmatch6.js_ | 10 +- mod/hotpot/template/v6/djmix6.ht_ | 6 +- mod/hotpot/template/v6/djmix6.js_ | 38 +-- mod/hotpot/template/v6/fjmatch6.ht_ | 2 +- mod/hotpot/template/v6/fjmatch6.js_ | 2 +- mod/hotpot/template/v6/hp6.cs_ | 6 +- mod/hotpot/template/v6/hp6browsercheck.js_ | 2 +- mod/hotpot/template/v6/hp6card.js_ | 32 +-- .../template/v6/hp6checkshortanswer.js_ | 2 +- mod/hotpot/template/v6/hp6objecttags.ht_ | 2 +- mod/hotpot/template/v6/hp6plainpage.ht_ | 4 +- mod/hotpot/template/v6/hp6showmessage.js_ | 2 +- mod/hotpot/template/v6/hp6utilities.js_ | 4 +- mod/hotpot/template/v6/jcloze6.ht_ | 4 +- mod/hotpot/template/v6/jcloze6.js_ | 2 +- mod/hotpot/template/v6/jcross6.ht_ | 4 +- mod/hotpot/template/v6/jcross6.js_ | 10 +- mod/hotpot/template/v6/jcross6print.ht_ | 2 +- mod/hotpot/template/v6/jmatch6.ht_ | 2 +- mod/hotpot/template/v6/jmatch6.js_ | 2 +- mod/hotpot/template/v6/jmix6.ht_ | 2 +- mod/hotpot/template/v6/jmix6.js_ | 4 +- mod/hotpot/template/v6/jquiz6.ht_ | 6 +- mod/hotpot/template/v6/jquiz6.js_ | 8 +- mod/hotpot/template/v6/masher.ht_ | 4 +- mod/hotpot/version.php | 4 +- mod/hotpot/view.php | 4 +- mod/label/backuplib.php | 16 +- mod/label/db/install.php | 2 +- mod/label/db/upgrade.php | 6 +- mod/label/index.php | 2 +- mod/label/lib.php | 2 +- mod/label/mod_form.php | 2 +- mod/label/restorelib.php | 20 +- mod/label/version.php | 4 +- mod/label/view.php | 2 +- mod/lesson/action/addbranchtable.php | 4 +- mod/lesson/action/addcluster.php | 12 +- mod/lesson/action/addendofbranch.php | 10 +- mod/lesson/action/addendofcluster.php | 10 +- mod/lesson/action/addpage.php | 12 +- mod/lesson/action/confirmdelete.php | 6 +- mod/lesson/action/continue.html | 18 +- mod/lesson/action/continue.php | 4 +- mod/lesson/action/delete.php | 4 +- mod/lesson/action/editpage.php | 32 +-- mod/lesson/action/insertpage.php | 12 +- mod/lesson/action/move.php | 8 +- mod/lesson/action/moveit.php | 14 +- mod/lesson/action/updatepage.php | 18 +- mod/lesson/backuplib.php | 40 ++-- mod/lesson/db/access.php | 2 +- mod/lesson/db/install.php | 2 +- mod/lesson/db/upgrade.php | 6 +- mod/lesson/edit.php | 52 ++-- mod/lesson/essay.php | 62 ++--- mod/lesson/format.php | 32 +-- mod/lesson/grade.php | 2 +- mod/lesson/highscores.php | 56 ++--- mod/lesson/import.php | 2 +- mod/lesson/importppt.php | 142 +++++------ mod/lesson/index.php | 2 +- mod/lesson/lesson.php | 14 +- mod/lesson/locallib.php | 224 +++++++++--------- mod/lesson/mediafile.php | 24 +- mod/lesson/mod_form.php | 4 +- mod/lesson/reformat.php | 48 ++-- mod/lesson/report.php | 72 +++--- mod/lesson/restorelib.php | 42 ++-- mod/lesson/styles.php | 10 +- mod/lesson/tabs.php | 8 +- mod/lesson/timer.js | 26 +- mod/lesson/version.php | 4 +- mod/lesson/view.php | 4 +- 115 files changed, 918 insertions(+), 922 deletions(-) diff --git a/mod/glossary/db/access.php b/mod/glossary/db/access.php index f800926d80..51b72925d9 100644 --- a/mod/glossary/db/access.php +++ b/mod/glossary/db/access.php @@ -186,4 +186,4 @@ $mod_glossary_capabilities = array( ); -?> + diff --git a/mod/glossary/db/install.php b/mod/glossary/db/install.php index bdedf3e4ea..33ad579511 100644 --- a/mod/glossary/db/install.php +++ b/mod/glossary/db/install.php @@ -1,4 +1,4 @@ - + diff --git a/mod/glossary/formats/README.txt b/mod/glossary/formats/README.txt index 7c313e3400..5c7633ecfa 100644 --- a/mod/glossary/formats/README.txt +++ b/mod/glossary/formats/README.txt @@ -1,13 +1,11 @@ -$Id$ - GLOSSARY FORMAT PLUGINS ----------------------- Starting with Moodle 1.4, the glossary module supports a plugin -architecture to create your own formats. This plugin system allows +architecture to create your own formats. This plugin system allows you to "invent" your own presentations for your glossary data. :-) -To facilitate the creation process a TEMPLATE format has been created. +To facilitate the creation process a TEMPLATE format has been created. You should use it as the base for your own modifications (this requires some basic PHP skills). The template includes all the available data. @@ -17,7 +15,7 @@ Please, follow these STEPS: For further reference in this document, we call it "THENAME". 2.-Duplicate the TEMPLATE directory (under mod/glossary/formats/TEMPLATE). 3.-Rename it to THENAME -4.-Go into the THENAME directory and rename the TEMPLATE_format.php file +4.-Go into the THENAME directory and rename the TEMPLATE_format.php file to THENAME_format.php 5.-Edit the THENAME_format.php file. Change every ocurrence of TEMPLATE to THENAME. @@ -25,8 +23,8 @@ Please, follow these STEPS: 7.-Edit (configure) your glossary. In the Format popup you'll see a new entry. It will be showed as "displayformatTHENAME". Select it and view your glossary. -8.-Edit the THENAME_format.php. Make your format modifications and reload your - web page to see them in your glossary. This file has been commented to make +8.-Edit the THENAME_format.php. Make your format modifications and reload your + web page to see them in your glossary. This file has been commented to make things easier to understand (further suggestions welcome!) 9.-If you want to translate your THENAME format name to some nice name to be showed in the Format popup, simply, edit your lang/XX/glossary.php diff --git a/mod/glossary/formats/TEMPLATE/TEMPLATE_format.php b/mod/glossary/formats/TEMPLATE/TEMPLATE_format.php index 683f482e06..b223ed32ab 100755 --- a/mod/glossary/formats/TEMPLATE/TEMPLATE_format.php +++ b/mod/glossary/formats/TEMPLATE/TEMPLATE_format.php @@ -1,14 +1,14 @@ -get_record('user', array('id'=>$entry->userid)); $strby = get_string('writtenby', 'glossary'); if ($entry) { - + echo ''; echo ''; echo ''; echo ''; echo "
'; @@ -32,7 +32,7 @@ function glossary_show_entry_TEMPLATE($course, $cm, $glossary, $entry, $mode='', //Comments: Configuration not supported echo get_string('lastedited').': '. userdate($entry->timemodified) . '
'; - //Use this function to show the approval button. It'll be shown if necessary + //Use this function to show the approval button. It'll be shown if necessary //Comments: You can configure this parameters: //----Define where to show the approval button $approvalalign = 'right'; //Values: left, center and right (default right) @@ -50,7 +50,7 @@ function glossary_show_entry_TEMPLATE($course, $cm, $glossary, $entry, $mode='', //Use this function to show the attachment. It'll be showed if necessary //Comments: You can configure this parameters: - //----Define how to show the attachment + //----Define how to show the attachment $attachmentformat = 'html'; //Values: html (link) and NULL (inline image if possible) (default NULL) //----Define where to show the attachment $attachmentalign = 'right'; //Values: left, center and right (default right) @@ -74,7 +74,7 @@ function glossary_show_entry_TEMPLATE($course, $cm, $glossary, $entry, $mode='', //Line separator not normally needed now. //echo "
\n"; - //Use this function to show the definition + //Use this function to show the definition //Comments: Configuration not supported glossary_print_entry_definition($entry, $glossary, $cm); @@ -93,11 +93,11 @@ function glossary_show_entry_TEMPLATE($course, $cm, $glossary, $entry, $mode='', // use it only if you are really sure! //$printicons = false; $return = glossary_print_entry_lower_section($course, $cm, $glossary, $entry, $mode, $hook, $printicons, $ratings, $aliases); - + echo '
\n"; - } else { + } else { echo '
'; print_string('noentry', 'glossary'); echo '
'; @@ -119,4 +119,4 @@ function glossary_print_entry_TEMPLATE($course, $cm, $glossary, $entry, $mode='' } -?> + diff --git a/mod/glossary/formats/continuous/continuous_format.php b/mod/glossary/formats/continuous/continuous_format.php index c2f13dc2ba..8c50003ec2 100644 --- a/mod/glossary/formats/continuous/continuous_format.php +++ b/mod/glossary/formats/continuous/continuous_format.php @@ -1,4 +1,4 @@ -alias = ''; echo ''; - + echo ''; $return = glossary_print_entry_lower_section($course, $cm, $glossary, $entry, $mode, $hook, $printicons, $ratings, $aliases); echo ''; @@ -34,7 +34,7 @@ function glossary_print_entry_continuous($course, $cm, $glossary, $entry, $mode= //Call to view function (without icons, ratings and aliases) and return its result return glossary_show_entry_continuous($course, $cm, $glossary, $entry, $mode, $hook, false, false, false); - + } -?> + diff --git a/mod/glossary/formats/dictionary/dictionary_format.php b/mod/glossary/formats/dictionary/dictionary_format.php index 2454ed5dcc..0224eaade2 100644 --- a/mod/glossary/formats/dictionary/dictionary_format.php +++ b/mod/glossary/formats/dictionary/dictionary_format.php @@ -1,4 +1,4 @@ - + diff --git a/mod/glossary/formats/encyclopedia/encyclopedia_format.php b/mod/glossary/formats/encyclopedia/encyclopedia_format.php index 0fa3533120..cdf626fc2d 100644 --- a/mod/glossary/formats/encyclopedia/encyclopedia_format.php +++ b/mod/glossary/formats/encyclopedia/encyclopedia_format.php @@ -1,4 +1,4 @@ -'; echo ''; echo ''; - + echo $OUTPUT->user_picture(moodle_user_picture::make($user, $course->id)); - + echo ''; echo ''; echo '
'; @@ -28,11 +28,11 @@ function glossary_show_entry_encyclopedia($course, $cm, $glossary, $entry, $mode echo ''.get_string('bynameondate', 'forum', $by).''; echo ''; - + echo ''; glossary_print_entry_approval($cm, $entry, $mode); echo ''; - + echo ''; echo ''; @@ -57,16 +57,16 @@ function glossary_show_entry_encyclopedia($course, $cm, $glossary, $entry, $mode $return = glossary_print_entry_lower_section($course, $cm, $glossary, $entry,$mode,$hook,$printicons,$ratings, $aliases); echo ' '; } - + echo ''; echo "\n"; - + } else { echo '
'; print_string('noentry', 'glossary'); echo '
'; } - + return $return; } @@ -78,9 +78,9 @@ function glossary_print_entry_encyclopedia($course, $cm, $glossary, $entry, $mod $entry->definition = ''.$entry->definition.''; //Call to view function (without icons, ratings and aliases) and return its result - + return glossary_show_entry_encyclopedia($course, $cm, $glossary, $entry, $mode, $hook, false, false, false); } -?> + diff --git a/mod/glossary/formats/entrylist/entrylist_format.php b/mod/glossary/formats/entrylist/entrylist_format.php index 66e285a169..a937bd202f 100644 --- a/mod/glossary/formats/entrylist/entrylist_format.php +++ b/mod/glossary/formats/entrylist/entrylist_format.php @@ -1,4 +1,4 @@ - + diff --git a/mod/glossary/formats/faq/faq_format.php b/mod/glossary/formats/faq/faq_format.php index 03fc0001aa..8c3b3559dd 100644 --- a/mod/glossary/formats/faq/faq_format.php +++ b/mod/glossary/formats/faq/faq_format.php @@ -1,4 +1,4 @@ - + diff --git a/mod/glossary/formats/fullwithauthor/fullwithauthor_format.php b/mod/glossary/formats/fullwithauthor/fullwithauthor_format.php index 33a8c09eff..b8c249b905 100644 --- a/mod/glossary/formats/fullwithauthor/fullwithauthor_format.php +++ b/mod/glossary/formats/fullwithauthor/fullwithauthor_format.php @@ -1,4 +1,4 @@ -'; echo ''; - + echo ''; echo $OUTPUT->user_picture(moodle_user_picture::make($user, $course->id)); echo ''; - + echo ''; echo '
'; @@ -47,7 +47,7 @@ function glossary_show_entry_fullwithauthor($course, $cm, $glossary, $entry, $mo echo ''; echo ' '; echo ''; - + $return = glossary_print_entry_lower_section($course, $cm, $glossary, $entry, $mode, $hook, $printicons, $ratings, $aliases); echo ' '; echo ''; @@ -72,4 +72,4 @@ function glossary_print_entry_fullwithauthor($course, $cm, $glossary, $entry, $m } -?> + diff --git a/mod/glossary/formats/fullwithoutauthor/fullwithoutauthor_format.php b/mod/glossary/formats/fullwithoutauthor/fullwithoutauthor_format.php index 258d4e5935..66866f8cbf 100644 --- a/mod/glossary/formats/fullwithoutauthor/fullwithoutauthor_format.php +++ b/mod/glossary/formats/fullwithoutauthor/fullwithoutauthor_format.php @@ -1,4 +1,4 @@ -'; echo ''; $return = glossary_print_entry_lower_section($course, $cm, $glossary, $entry, $mode, $hook, $printicons, $ratings, $aliases); - + echo ' '; echo ''; echo "\n"; @@ -58,4 +58,4 @@ function glossary_print_entry_fullwithoutauthor($course, $cm, $glossary, $entry, } -?> + diff --git a/mod/glossary/simpletest/test_glossary_portfolio_callers.php b/mod/glossary/simpletest/test_glossary_portfolio_callers.php index 5f03ffc497..b3c55d0d51 100644 --- a/mod/glossary/simpletest/test_glossary_portfolio_callers.php +++ b/mod/glossary/simpletest/test_glossary_portfolio_callers.php @@ -1,4 +1,4 @@ -libdir/simpletest/portfolio_testclass.php"); require_once("$CFG->dirroot/mod/glossary/lib.php"); require_once("$CFG->dirroot/$CFG->admin/generator.php"); @@ -58,4 +58,4 @@ class testGlossaryPortfolioCallers extends portfoliolib_test { parent::test_caller_with_plugins(); } } -?> + diff --git a/mod/glossary/sql.php b/mod/glossary/sql.php index ce30c9013a..b26994ad83 100644 --- a/mod/glossary/sql.php +++ b/mod/glossary/sql.php @@ -3,6 +3,7 @@ /** * SQL.PHP * This file is include from view.php and print.php + * @version $Id$ * @copyright 2003 **/ diff --git a/mod/glossary/tabs.php b/mod/glossary/tabs.php index fc07aeee45..f4c8ea86bb 100644 --- a/mod/glossary/tabs.php +++ b/mod/glossary/tabs.php @@ -1,11 +1,11 @@ -wwwroot.'/mod/glossary/view.php?id='.$id.'&mode=letter', get_string('standardview', 'glossary')); - $browserow[] = new tabobject(GLOSSARY_CATEGORY_VIEW, - $CFG->wwwroot.'/mod/glossary/view.php?id='.$id.'&mode=cat', + $browserow[] = new tabobject(GLOSSARY_CATEGORY_VIEW, + $CFG->wwwroot.'/mod/glossary/view.php?id='.$id.'&mode=cat', get_string('categoryview', 'glossary')); - $browserow[] = new tabobject(GLOSSARY_DATE_VIEW, + $browserow[] = new tabobject(GLOSSARY_DATE_VIEW, $CFG->wwwroot.'/mod/glossary/view.php?id='.$id.'&mode=date', get_string('dateview', 'glossary')); - $browserow[] = new tabobject(GLOSSARY_AUTHOR_VIEW, + $browserow[] = new tabobject(GLOSSARY_AUTHOR_VIEW, $CFG->wwwroot.'/mod/glossary/view.php?id='.$id.'&mode=author', get_string('authorview', 'glossary')); @@ -62,12 +62,12 @@
$strsearch: $hook"; - } + } break; - } + } echo '
'; ?> diff --git a/mod/glossary/version.php b/mod/glossary/version.php index 4a05179972..7643837617 100644 --- a/mod/glossary/version.php +++ b/mod/glossary/version.php @@ -1,4 +1,4 @@ -version = 2009042006; $module->requires = 2009041700; // Requires this Moodle version $module->cron = 0; // Period for cron to check this module (secs) -?> + diff --git a/mod/glossary/view.php b/mod/glossary/view.php index 6c33f455f7..5f4a6f03e1 100644 --- a/mod/glossary/view.php +++ b/mod/glossary/view.php @@ -239,7 +239,7 @@ if ($tab == GLOSSARY_APPROVAL_VIEW) { $PAGE->navbar->add($strwaitingapproval); echo $OUTPUT->header(); echo $OUTPUT->heading($strwaitingapproval); -} else { /// Print standard header +} else { /// Print standard header echo $OUTPUT->header(); } @@ -526,4 +526,3 @@ echo $OUTPUT->footer(); $completion=new completion_info($course); $completion->set_module_viewed($cm); -?> \ No newline at end of file diff --git a/mod/hotpot/README.TXT b/mod/hotpot/README.TXT index 8c8d2abf4a..24c4fded0a 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/attempt.php b/mod/hotpot/attempt.php index 589f1fd5ba..2dbfdacc3e 100644 --- a/mod/hotpot/attempt.php +++ b/mod/hotpot/attempt.php @@ -153,7 +153,7 @@ } } - // redirect to the next quiz or the course page + // redirect to the next quiz or the course page redirect($next_url, get_string('resultssaved', 'hotpot')); } @@ -459,7 +459,7 @@ function hotpot_set_attempt_details(&$attempt) { } // remove "correct" and "wrong" values from "ignored" values - $response->ignored = array_diff($response->ignored, + $response->ignored = array_diff($response->ignored, $response->correct, $response->wrong, $oldresponse->correct, $oldresponse->wrong ); @@ -577,4 +577,4 @@ function hotpot_set_attempt_details(&$attempt) { // $attempt->status = HOTPOT_STATUS_INPROGRESS; } -?> + diff --git a/mod/hotpot/backuplib.php b/mod/hotpot/backuplib.php index d3d9a8af8b..9cb54ebb4a 100644 --- a/mod/hotpot/backuplib.php +++ b/mod/hotpot/backuplib.php @@ -1,4 +1,4 @@ - + diff --git a/mod/hotpot/db/access.php b/mod/hotpot/db/access.php index a3983164d2..5807d58736 100644 --- a/mod/hotpot/db/access.php +++ b/mod/hotpot/db/access.php @@ -79,4 +79,4 @@ $mod_hotpot_capabilities = array( ); -?> + diff --git a/mod/hotpot/db/install.php b/mod/hotpot/db/install.php index 71ecc02da8..17742a4716 100644 --- a/mod/hotpot/db/install.php +++ b/mod/hotpot/db/install.php @@ -1,4 +1,4 @@ -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 1fdd36f5cd..1b92ac59f2 100644 --- a/mod/hotpot/db/upgrade.php +++ b/mod/hotpot/db/upgrade.php @@ -1,4 +1,4 @@ - + diff --git a/mod/hotpot/grade.php b/mod/hotpot/grade.php index 5863989b4e..0517955c9a 100644 --- a/mod/hotpot/grade.php +++ b/mod/hotpot/grade.php @@ -26,4 +26,4 @@ redirect('view.php?id='.$cm->id); } -?> + diff --git a/mod/hotpot/hotpot-full.js b/mod/hotpot/hotpot-full.js index bb66e65fd5..ba88dc2f2b 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 65a148a947..143b650aaf 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 1fb8c7c9fc..c8bbc6b91f 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 e568c04660..42e22d6b0b 100644 --- a/mod/hotpot/template/v6/djmix6.js_ +++ b/mod/hotpot/template/v6/djmix6.js_ @@ -142,7 +142,7 @@ function GetGuessSequence(){ } function CompDrags(a,b){ - return a.GetL() - b.GetL(); + return a.GetL() - b.GetL(); } function FindSegment(SegID){ @@ -233,7 +233,7 @@ function CheckAnswer(CheckType){ LongestCorrect[k] = TempCorrect[k]; } HintToReturn = TempHint; - } + } } } if (WhichCorrect > -1){ @@ -304,7 +304,7 @@ function CheckAnswer(CheckType){ Locked = true; Finished = true; setTimeout('Finish()', SubmissionTimeout); - WriteToInstructions(YourScoreIs + ' ' + Score + '%.'); + WriteToInstructions(YourScoreIs + ' ' + Score + '%.'); } [inclScorm1.2] @@ -329,18 +329,18 @@ var Answers = new Array(); 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 = Cds[CurrDrag].GetL()+difX; - var newY = Cds[CurrDrag].GetT()+difY; - Cds[CurrDrag].SetL(newX); + var difX = Ev.clientX-window.lastX; + var difY = Ev.clientY-window.lastY; + var newX = Cds[CurrDrag].GetL()+difX; + var newY = Cds[CurrDrag].GetT()+difY; + Cds[CurrDrag].SetL(newX); Cds[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; @@ -349,25 +349,25 @@ function beginDrag(e, DragNum) { } else{ var Ev = e; - window.onmousemove=doDrag; + window.onmousemove=doDrag; window.onmouseup=endDrag; - } + } Cds[CurrDrag].SwapColours(); topZ++; Cds[CurrDrag].css.zIndex = topZ; - window.lastX=Ev.clientX; + window.lastX=Ev.clientX; window.lastY=Ev.clientY; - return true; -} + return true; +} -function endDrag(e) { +function endDrag(e) { if (CurrDrag == -1) {return}; Cds[CurrDrag].SwapColours(); if (C.ie){document.onmousemove=null}else{window.onmousemove=null;} onEndDrag(); CurrDrag = -1; return true; -} +} function onEndDrag(){ //Snap to lines diff --git a/mod/hotpot/template/v6/fjmatch6.ht_ b/mod/hotpot/template/v6/fjmatch6.ht_ index 2a22c60e52..37576157a0 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 988ac5435a..f88eedbde2 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 05c9b3e700..b23d66cee0 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 b15bf7d2f6..e9b9c56e53 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 e9eb06e49f..7e5177c82b 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/hp6checkshortanswer.js_ b/mod/hotpot/template/v6/hp6checkshortanswer.js_ index f3570d4d3a..54596b1404 100644 --- a/mod/hotpot/template/v6/hp6checkshortanswer.js_ +++ b/mod/hotpot/template/v6/hp6checkshortanswer.js_ @@ -330,7 +330,7 @@ function ShowAnswers(QNum){ //Display feedback ShowMessage(Ans); -//Set the score for this question to 0 if no +//Set the score for this question to 0 if no if (State[QNum][0] < 1){ State[QNum][0] = 0; } diff --git a/mod/hotpot/template/v6/hp6objecttags.ht_ b/mod/hotpot/template/v6/hp6objecttags.ht_ index ad0e157764..b26a448037 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 9abc49af4b..ced728ad20 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 58dde4675f..983b8e045d 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 2f12775229..697ce366c7 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 ac0c84fddc..9590260d9e 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 3a22cce217..52d8a5264b 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 bcaeea9768..27dc7d0b90 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 26c911ff05..6a95bf2f19 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/jcross6print.ht_ b/mod/hotpot/template/v6/jcross6print.ht_ index 6e74246717..4697a97a5f 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>