diff --git a/backup/moodle2/restore_game_stepslib.php b/backup/moodle2/restore_game_stepslib.php
index 46e8903..b3480ed 100644
--- a/backup/moodle2/restore_game_stepslib.php
+++ b/backup/moodle2/restore_game_stepslib.php
@@ -20,6 +20,8 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
+defined('MOODLE_INTERNAL') || die();
+
/**
* Define all the restore steps that will be used by the restore_game_activity_task
*/
diff --git a/bookquiz/play.php b/bookquiz/play.php
index 665f725..0196da5 100644
--- a/bookquiz/play.php
+++ b/bookquiz/play.php
@@ -172,33 +172,33 @@ function game_bookquiz_play( $id, $game, $attempt, $bookquiz, $chapterid, $conte
}
}
-?>
-
-param3 != 0) {
game_bookquiz_showquestions( $id, $questionid, $chapter->id, $nextid, $scoreattempt, $game, $context);
diff --git a/cross/cross_class.php b/cross/cross_class.php
index 8d3ea6e..557ce01 100644
--- a/cross/cross_class.php
+++ b/cross/cross_class.php
@@ -16,6 +16,8 @@
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see .
+defined('MOODLE_INTERNAL') || die();
+
/*
Crossing Words for
Codewalkers PHP Coding Contest of July 2002
diff --git a/cross/crossdb_class.php b/cross/crossdb_class.php
index 614f3cd..86932ad 100644
--- a/cross/crossdb_class.php
+++ b/cross/crossdb_class.php
@@ -16,6 +16,8 @@
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see .
+defined('MOODLE_INTERNAL') || die();
+
/**
* This class is a cross that can load and save to a table
*
diff --git a/cross/play.php b/cross/play.php
index 9fd1e5a..61e4591 100644
--- a/cross/play.php
+++ b/cross/play.php
@@ -280,34 +280,34 @@ margin-top: 1em;
';
- } else {
- echo '';
- }
+if ($print) {
+ echo '';
+} else {
+ echo '';
+}
- if ($game->toptext != '') {
- echo $game->toptext.' ';
- }
+if ($game->toptext != '') {
+ echo $game->toptext.' ';
+}
?>
- This interactive crossword puzzle requires JavaScript and a reasonably recent web browser, such as Internet Explorer 5.5
- or later, Netscape 7, Mozilla, Firefox, or Safari. If you have disabled web page scripting, please re-enable it and refresh
- the page.
+ This interactive crossword puzzle requires JavaScript and a reasonably recent web browser, such as Internet Explorer 5.5
+ or later, Netscape 7, Mozilla, Firefox, or Safari. If you have disabled web page scripting, please re-enable it and refresh
+ the page.
@@ -333,138 +333,125 @@ var CrosswordFinished, Initialized;
// Check the user's browser and then initialize the puzzle.
if (document.getElementById("waitmessage") != null)
{
- document.getElementById("waitmessage").innerHTML = "";
-
- // Current game variables
- CurrentWord = -1;
- PrevWordHorizontal = false;
-
+ document.getElementById("waitmessage").innerHTML = "";
+
+ // Current game variables
+ CurrentWord = -1;
+ PrevWordHorizontal = false;
+
+ OnlyCheckOnce = false;
- OnlyCheckOnce = false;
-
- // Create the cell-to-word arrays.
- TableAcrossWord = new Array(CrosswordWidth);
- for (var x = 0; x < CrosswordWidth; x++)
+ // Create the cell-to-word arrays.
+ TableAcrossWord = new Array(CrosswordWidth);
+ for (var x = 0; x < CrosswordWidth; x++)
TableAcrossWord[x] = new Array(CrosswordHeight);
- TableDownWord = new Array(CrosswordWidth);
- for (var x = 0; x < CrosswordWidth; x++){
- TableDownWord[x] = new Array(CrosswordHeight);
- }
+ TableDownWord = new Array(CrosswordWidth);
+ for (var x = 0; x < CrosswordWidth; x++){
+ TableDownWord[x] = new Array(CrosswordHeight);
+ }
- GuessLeter = new Array(CrosswordWidth);
- for (var x = 0; x < CrosswordWidth; x++)
- {
- GuessLeter[x] = new Array(CrosswordHeight);
- for (var y = 0; y < CrosswordHeight; y++)
- {
- GuessLeter[ x][ y] = "_";
- }
- }
+ GuessLeter = new Array(CrosswordWidth);
+ for (var x = 0; x < CrosswordWidth; x++) {
+ GuessLeter[x] = new Array(CrosswordHeight);
+ for (var y = 0; y < CrosswordHeight; y++) {
+ GuessLeter[ x][ y] = "_";
+ }
+ }
- solu = new Array(CrosswordWidth);
- for (var x = 0; x < CrosswordWidth; x++)
- {
- solu[x] = new Array(CrosswordHeight);
- for (var y = 0; y < CrosswordHeight; y++)
- {
- solu[ x][ y] = "";
- }
- }
+ solu = new Array(CrosswordWidth);
+ for (var x = 0; x < CrosswordWidth; x++) {
+ solu[x] = new Array(CrosswordHeight);
+ for (var y = 0; y < CrosswordHeight; y++) {
+ solu[ x][ y] = "";
+ }
+ }
- for (var y = 0; y < CrosswordHeight; y++)
- for (var x = 0; x < CrosswordWidth; x++)
- {
- TableAcrossWord[x][y] = -1;
- TableDownWord[x][y] = -1;
- }
-
- // First, add the horizontal words to the puzzle.
- for (var i = 0; i <= LastHorizontalWord; i++)
- {
- x = WordX[i];
- y = WordY[i];
- s = Guess[ i];
- so = Solutions[ i];
- for (var j = 0; j < WordLength[i]; j++)
- {
- TableAcrossWord[x + j][y] = i;
- if( j < s.length)
- c = s.substr( j, 1);
- else
- c = '';
- GuessLeter[ x+ j][ y] = c;
- if( j < so.length)
- c = so.substr( j, 1);
- else
- c = '';
- solu[ x+j][ y] = c;
- }
+ for (var y = 0; y < CrosswordHeight; y++) {
+ for (var x = 0; x < CrosswordWidth; x++) {
+ TableAcrossWord[x][y] = -1;
+ TableDownWord[x][y] = -1;
+ }
}
+ // First, add the horizontal words to the puzzle.
+ for (var i = 0; i <= LastHorizontalWord; i++) {
+ x = WordX[i];
+ y = WordY[i];
+ s = Guess[ i];
+ so = Solutions[ i];
+ for (var j = 0; j < WordLength[i]; j++) {
+ TableAcrossWord[x + j][y] = i;
+ if( j < s.length)
+ c = s.substr( j, 1);
+ else
+ c = '';
+ GuessLeter[ x+ j][ y] = c;
+ if( j < so.length)
+ c = so.substr( j, 1);
+ else
+ c = '';
+ solu[ x+j][ y] = c;
+ }
+ }
- // Second, add the vertical words to the puzzle.
- for (var i = LastHorizontalWord + 1; i < Words; i++)
- {
- x = WordX[i];
- y = WordY[i];
- s = Guess[ i];
- so = Solutions[ i];
- for (var j = 0; j < WordLength[i]; j++)
- {
- TableDownWord[x][y + j] = i;
- if( j < s.length)
- c = s.substr( j, 1);
- else
- c = '';
- GuessLeter[ x][ y+j] = c;
- if( j < so.length)
- c = so.substr( j, 1);
- else
- c = '';
- solu[ x][ y+j] = c;
- }
- }
+ // Second, add the vertical words to the puzzle.
+ for (var i = LastHorizontalWord + 1; i < Words; i++) {
+ x = WordX[i];
+ y = WordY[i];
+ s = Guess[ i];
+ so = Solutions[ i];
+ for (var j = 0; j < WordLength[i]; j++) {
+ TableDownWord[x][y + j] = i;
+ if( j < s.length)
+ c = s.substr( j, 1);
+ else
+ c = '';
+ GuessLeter[ x][ y+j] = c;
+ if( j < so.length)
+ c = so.substr( j, 1);
+ else
+ c = '';
+ solu[ x][ y+j] = c;
+ }
+ }
- document.writeln("
");
- for (var x = 0; x < CrosswordWidth; x++)
- {
- document.write("
" + (x+1) + "
"); //col numbers
- }
+ document.writeln("
");
+ for (var x = 0; x < CrosswordWidth; x++) {
+ document.write("
" + (x+1) + "
"); //col numbers
+ }
- // Now, insert the row HTML into the table.
- for (var y = 0; y < CrosswordHeight; y++)
- {
- document.writeln("
");
- document.write("
" + (y+1)+"
"); //line numbers
- for (var x = 0; x < CrosswordWidth; x++)
- {
- if (TableAcrossWord[x][y] >= 0 || TableDownWord[x][y] >= 0)
- {
+ // Now, insert the row HTML into the table.
+ for (var y = 0; y < CrosswordHeight; y++) {
+ document.writeln("
");
+ document.write("
" + (y+1)+"
"); //line numbers
+ for (var x = 0; x < CrosswordWidth; x++) {
+ if (TableAcrossWord[x][y] >= 0 || TableDownWord[x][y] >= 0) {
var s;
s = "
@@ -1146,18 +1128,14 @@ function game_cross_show_welcome1() {
 
-
-
-
-
.
+defined('MOODLE_INTERNAL') || die();
+
class CryptexDB extends CrossDB {
public function savecryptex( $game, &$crossm, $crossd, $id, $letters) {
global $USER;
diff --git a/db/access.php b/db/access.php
index 97e5eec..76fe84a 100644
--- a/db/access.php
+++ b/db/access.php
@@ -14,6 +14,8 @@
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see .
+defined('MOODLE_INTERNAL') || die();
+
/**
* Capability definitions for the game module.
*
diff --git a/exporthtml_hangman.php b/exporthtml_hangman.php
index 977ae14..58cea1d 100644
--- a/exporthtml_hangman.php
+++ b/exporthtml_hangman.php
@@ -21,6 +21,8 @@
* @package game
**/
+defined('MOODLE_INTERNAL') || die();
+
?>
-