Permalink
Browse files

remove trailing whitespace on everyline and standardize line endings

  • Loading branch information...
1 parent f01e8f7 commit eb84b02febf5398f6f42321e433256bf4e306e01 gbateson committed Mar 6, 2008
Showing with 483 additions and 483 deletions.
  1. +7 −7 mod/hotpot/README.TXT
  2. +2 −2 mod/hotpot/attempt.php
  3. +1 −1 mod/hotpot/db/mysql.php
  4. +1 −1 mod/hotpot/db/postgres7.php
  5. +31 −31 mod/hotpot/db/update_to_v2.php
  6. +3 −3 mod/hotpot/db/upgrade.php
  7. +78 −78 mod/hotpot/hotpot-full.js
  8. +16 −16 mod/hotpot/index.php
  9. +13 −13 mod/hotpot/lib.php
  10. +11 −11 mod/hotpot/mediaplayers/moodle/filter.php
  11. +1 −1 mod/hotpot/mod_form.php
  12. +8 −8 mod/hotpot/report.php
  13. +2 −2 mod/hotpot/report/click/report.php
  14. +17 −17 mod/hotpot/report/default.php
  15. +5 −5 mod/hotpot/report/fullstat/report.php
  16. +7 −7 mod/hotpot/report/overview/report.php
  17. +4 −4 mod/hotpot/report/simplestat/report.php
  18. +12 −12 mod/hotpot/restorelib.php
  19. +3 −3 mod/hotpot/review.php
  20. +1 −1 mod/hotpot/settings.php
  21. +1 −1 mod/hotpot/template/default.php
  22. +11 −11 mod/hotpot/template/v6.php
  23. +3 −3 mod/hotpot/template/v6/djmatch6.ht_
  24. +13 −13 mod/hotpot/template/v6/djmatch6.js_
  25. +3 −3 mod/hotpot/template/v6/djmix6.ht_
  26. +33 −33 mod/hotpot/template/v6/djmix6.js_
  27. +1 −1 mod/hotpot/template/v6/fjmatch6.ht_
  28. +10 −10 mod/hotpot/template/v6/fjmatch6.js_
  29. +7 −7 mod/hotpot/template/v6/hp6.cs_
  30. +6 −6 mod/hotpot/template/v6/hp6browsercheck.js_
  31. +18 −18 mod/hotpot/template/v6/hp6card.js_
  32. +26 −26 mod/hotpot/template/v6/hp6checkshortanswer.js_
  33. +1 −1 mod/hotpot/template/v6/hp6objecttags.ht_
  34. +2 −2 mod/hotpot/template/v6/hp6plainpage.ht_
  35. +2 −2 mod/hotpot/template/v6/hp6showmessage.js_
  36. +3 −3 mod/hotpot/template/v6/hp6utilities.js_
  37. +2 −2 mod/hotpot/template/v6/jcloze6.ht_
  38. +16 −16 mod/hotpot/template/v6/jcloze6.js_
  39. +2 −2 mod/hotpot/template/v6/jcross6.ht_
  40. +13 −13 mod/hotpot/template/v6/jcross6.js_
  41. +1 −1 mod/hotpot/template/v6/jcross6print.ht_
  42. +1 −1 mod/hotpot/template/v6/jmatch6.ht_
  43. +18 −18 mod/hotpot/template/v6/jmatch6.js_
  44. +1 −1 mod/hotpot/template/v6/jmix6.ht_
  45. +13 −13 mod/hotpot/template/v6/jmix6.js_
  46. +3 −3 mod/hotpot/template/v6/jquiz6.ht_
  47. +47 −47 mod/hotpot/template/v6/jquiz6.js_
  48. +2 −2 mod/hotpot/template/v6/masher.ht_
  49. +1 −1 mod/hotpot/view.php
View
@@ -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:
View
@@ -165,7 +165,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'));
}
@@ -470,7 +470,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
);
View
@@ -2,7 +2,7 @@
// THIS FILE IS DEPRECATED! PLEASE DO NOT MAKE CHANGES TO IT!
//
-// IT IS USED ONLY FOR UPGRADES FROM BEFORE MOODLE 1.7, ALL
+// IT IS USED ONLY FOR UPGRADES FROM BEFORE MOODLE 1.7, ALL
// LATER CHANGES SHOULD USE upgrade.php IN THIS DIRECTORY.
function hotpot_upgrade($oldversion) {
@@ -2,7 +2,7 @@
// THIS FILE IS DEPRECATED! PLEASE DO NOT MAKE CHANGES TO IT!
//
-// IT IS USED ONLY FOR UPGRADES FROM BEFORE MOODLE 1.7, ALL
+// IT IS USED ONLY FOR UPGRADES FROM BEFORE MOODLE 1.7, ALL
// LATER CHANGES SHOULD USE upgrade.php IN THIS DIRECTORY.
function hotpot_upgrade($oldversion) {
@@ -17,7 +17,7 @@ function hotpot_update_to_v2_2() {
$index = "{$table}_{$field}_idx";
}
hotpot_db_delete_index("{$CFG->prefix}$table", $index);
-
+
// add new hotpot_questions.md5key field (and index)
$table = 'hotpot_questions';
$field = 'md5key';
@@ -31,7 +31,7 @@ function hotpot_update_to_v2_2() {
$ok = $ok && set_field($table, 'md5key', md5($record->name), 'id', $record->id);
}
}
-
+
// remove the index on hotpot_strings.string
$table = 'hotpot_strings';
$field = 'string';
@@ -55,7 +55,7 @@ function hotpot_update_to_v2_2() {
$ok = $ok && set_field($table, 'md5key', md5($record->string), 'id', $record->id);
}
}
-
+
return $ok;
}
function hotpot_update_to_v2_1_21() {
@@ -124,12 +124,12 @@ function hotpot_remove_orphans($secondarytable, $secondarykeyfield, $primarytabl
$db->debug = false;
$records = get_records_sql("
- SELECT
+ SELECT
t2.$secondarykeyfield, t2.$secondarykeyfield
- FROM
- {$CFG->prefix}$secondarytable t2 LEFT JOIN {$CFG->prefix}$primarytable t1
+ FROM
+ {$CFG->prefix}$secondarytable t2 LEFT JOIN {$CFG->prefix}$primarytable t1
ON (t2.$secondarykeyfield = t1.id)
- WHERE
+ WHERE
t1.$primarykeyfield IS NULL
");
@@ -270,7 +270,7 @@ function hotpot_update_to_v2_1_2() {
$debug = $db->debug;
$db->debug = false;
- // extract info about attempts by each user on each hotpot (cases where
+ // extract info about attempts by each user on each hotpot (cases where
// the user has only one attempt, or no "in progess" attempt are ignored)
$rs = $db->Execute("
SELECT userid, hotpot, COUNT(*), MIN(status)
@@ -289,16 +289,16 @@ function hotpot_update_to_v2_1_2() {
// get all attempts by this user at this hotpot
$attempts = get_records_sql("
- SELECT id, userid, hotpot, score, timestart, timefinish, status
- FROM {$CFG->prefix}hotpot_attempts
+ SELECT id, userid, hotpot, score, timestart, timefinish, status
+ FROM {$CFG->prefix}hotpot_attempts
WHERE userid = ".$record['userid']." AND hotpot=".$record['hotpot']."
ORDER BY timestart DESC, id DESC
");
unset($previous_timestart);
foreach ($attempts as $attempt) {
- // if this attempt has a status of "in progress" and is not
+ // if this attempt has a status of "in progress" and is not
// the most recent one in the group, set the status to "abandoned"
if ($attempt->status==1 && isset($previous_timestart)) {
$values = 'status=3';
@@ -335,7 +335,7 @@ function hotpot_update_to_v2_1() {
$ok = $ok && hotpot_db_update_field_type('hotpot_questions', 'name', 'name', 'TEXT', '', '', 'NOT NULL', '');
// hotpot_questions: nullify empty and non-numeric (shouldn't be any) values in "text" field
switch (strtolower($CFG->dbfamily)) {
- case 'mysql' :
+ case 'mysql' :
$NOT_REGEXP = 'NOT REGEXP';
break;
case 'postgres' :
@@ -358,13 +358,13 @@ function hotpot_update_to_v2_1() {
} else {
$ok = $ok && hotpot_create_table($table);
switch (strtolower($CFG->dbfamily)) {
- case 'mysql' :
+ case 'mysql' :
case 'postgres' :
$sql = "
- INSERT INTO {$CFG->prefix}$table (attempt, details)
+ INSERT INTO {$CFG->prefix}$table (attempt, details)
SELECT a.id AS attempt, a.details AS details
FROM {$CFG->prefix}hotpot_attempts a
- WHERE
+ WHERE
a.details IS NOT NULL AND a.details <> ''
AND a.details LIKE '<?xml%' AND a.details LIKE '%</hpjsresult>'
";
@@ -400,9 +400,9 @@ function hotpot_update_to_v2_1() {
$ok = $ok && hotpot_db_add_index('hotpot_responses', 'question');
// hotpot_string: correct double-encoded HTML entities
$ok = $ok && execute_sql("
- UPDATE {$CFG->prefix}hotpot_strings
- SET string = REPLACE(string, '&amp;','&')
- WHERE string LIKE '%&amp;#%'
+ UPDATE {$CFG->prefix}hotpot_strings
+ SET string = REPLACE(string, '&amp;','&')
+ WHERE string LIKE '%&amp;#%'
AND (string LIKE '<' OR string LIKE '>')
");
// hotpot_question: remove questions which refer to deleted hotpots
@@ -468,7 +468,7 @@ function hotpot_update_to_v2_from_hotpotatoes() {
global $CFG;
$ok = true; // hope for the best!
// check we have the minimum required hotpot module
- $minimum = 2005031400;
+ $minimum = 2005031400;
$module = get_record("modules", "name", "hotpot");
if (empty($module) || $module->version<$minimum) {
if ($module) {
@@ -558,7 +558,7 @@ function hotpot_create_table($table) {
}
}
return $ok;
- }
+ }
// Moodle 1.7 (and earlier)
@@ -731,9 +731,9 @@ function hotpot_update_logs($oldmodulename, $modulename, $moduleid, &$new) {
break;
case "attempt":
case "submit":
- case "review":
+ case "review":
$id = substr(strrchr($record->url,"="),1);
- if (isset($new->attempt[$id])) {
+ if (isset($new->attempt[$id])) {
$id = $new->attempt[$id];
}
$record->url = "review.php?id=".$record->cmid."&attempt=$id";
@@ -961,7 +961,7 @@ function hotpot_db_index_exists($table, $index, $feedback=false) {
$debug = $db->debug;
$db->debug = $feedback;
switch (strtolower($CFG->dbfamily)) {
- case 'mysql' :
+ case 'mysql' :
$rs = $db->Execute("SHOW INDEX FROM `$table`");
if ($rs && $rs->RecordCount()>0) {
$records = $rs->GetArray();
@@ -990,7 +990,7 @@ function hotpot_db_delete_index($table, $index, $feedback=false) {
// check index exists
if (hotpot_db_index_exists($table, $index)) {
switch (strtolower($CFG->dbfamily)) {
- case 'mysql' :
+ case 'mysql' :
$sql = "ALTER TABLE `$table` DROP INDEX `$index`";
break;
case 'postgres' :
@@ -1044,7 +1044,7 @@ function hotpot_db_table_exists($table, $feedback=false) {
return hotpot_db_object_exists($table, '', $feedback);
}
function hotpot_db_field_exists($table, $field, $feedback=false) {
- return
+ return
hotpot_db_object_exists($table, '', $feedback) &&
hotpot_db_object_exists($table, $field, $feedback)
;
@@ -1055,7 +1055,7 @@ function hotpot_db_object_exists($table, $field='', $feedback=false) {
$table = "{$CFG->prefix}$table";
// set $sql
switch (strtolower($CFG->dbfamily)) {
- case 'mysql' :
+ case 'mysql' :
if (empty($field)) {
$sql = "SHOW TABLES LIKE '$table'";
} else {
@@ -1067,7 +1067,7 @@ function hotpot_db_object_exists($table, $field='', $feedback=false) {
$sql = "SELECT relname FROM pg_class WHERE relname = '$table' AND relkind='r'";
} else {
$sql = "
- SELECT attname FROM pg_attribute WHERE attname = '$field'
+ SELECT attname FROM pg_attribute WHERE attname = '$field'
AND attrelid = (SELECT oid FROM pg_class WHERE relname = '$table')
";
}
@@ -1177,7 +1177,7 @@ function hotpot_db_update_field_type($table, $oldfield, $field, $type, $size, $u
}
if (empty($oldfield) && hotpot_db_field_exists($table, $field)) {
$oldfield = $field;
- }
+ }
if (is_string($unsigned)) {
$unsigned = (strtoupper($unsigned)=='UNSIGNED');
}
@@ -1245,8 +1245,8 @@ function hotpot_db_update_field_type($table, $oldfield, $field, $type, $size, $u
$ok = $ok && execute_sql("ALTER TABLE `$table` $action `$field` $fieldtype");
break;
case 'postgres':
- // get db version
- // N.B. $db->ServerInfo() usually returns blank
+ // get db version
+ // N.B. $db->ServerInfo() usually returns blank
// (except lib/adodb/drivers/adodb-postgre64-inc.php)
$dbversion = '';
$rs = $db->Execute("SELECT version()");
@@ -1292,7 +1292,7 @@ function hotpot_db_update_field_type($table, $oldfield, $field, $type, $size, $u
execute_sql('ALTER TABLE '.$table.' ALTER COLUMN "'.$tmpfield.'" '.$notnull);
} else {
execute_sql("
- UPDATE pg_attribute SET attnotnull=".($notnull ? 'TRUE' : 'FALSE')."
+ UPDATE pg_attribute SET attnotnull=".($notnull ? 'TRUE' : 'FALSE')."
WHERE attname = '$tmpfield'
AND attrelid = (SELECT oid FROM pg_class WHERE relname = '$table')
");
@@ -1,6 +1,6 @@
<?php //$Id$
-// This file keeps track of upgrades to
+// This file keeps track of upgrades to
// the hotpot module
//
// Sometimes, changes between versions involve
@@ -23,8 +23,8 @@ function xmldb_hotpot_upgrade($oldversion=0) {
$result = true;
-/// And upgrade begins here. For each one, you'll need one
-/// block of code similar to the next one. Please, delete
+/// And upgrade begins here. For each one, you'll need one
+/// block of code similar to the next one. Please, delete
/// this comment lines once this file start handling proper
/// upgrade code.
Oops, something went wrong.

0 comments on commit eb84b02

Please sign in to comment.