diff --git a/backup/moodle2/backup_game_activity_task.class.php b/backup/moodle2/backup_game_activity_task.class.php
index b4fda95..1c07c80 100644
--- a/backup/moodle2/backup_game_activity_task.class.php
+++ b/backup/moodle2/backup_game_activity_task.class.php
@@ -28,10 +28,10 @@ defined('MOODLE_INTERNAL') || die();
require_once($CFG->dirroot . '/mod/game/backup/moodle2/backup_game_stepslib.php'); // Because it exists (must).
/**
- * Defines backup_game_activity_task class
+ * Fame backup task that provides all the settings and steps to perform one complete backup of the activity
*
- * game backup task that provides all the settings and steps to perform one
- * complete backup of the activity
+ * @copyright 2007 Vasilis Daloukas
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class backup_game_activity_task extends backup_activity_task {
diff --git a/backup/moodle2/backup_game_stepslib.php b/backup/moodle2/backup_game_stepslib.php
index f83f359..d08ed5f 100644
--- a/backup/moodle2/backup_game_stepslib.php
+++ b/backup/moodle2/backup_game_stepslib.php
@@ -19,8 +19,8 @@
*
* @package mod_game
* @subpackage backup-moodle2
- * @author bdaloukas
-backup_game_settingslib.php
+ * @copyright 2007 Vasilis Daloukas
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
/**
@@ -29,6 +29,9 @@ backup_game_settingslib.php
defined('MOODLE_INTERNAL') || die();
+/**
+ * Define the complete game structure for backup, with file and id annotations
+ */
class backup_game_activity_structure_step extends backup_activity_structure_step {
/**
diff --git a/backup/moodle2/restore_game_stepslib.php b/backup/moodle2/restore_game_stepslib.php
index 70d14a8..316306a 100644
--- a/backup/moodle2/restore_game_stepslib.php
+++ b/backup/moodle2/restore_game_stepslib.php
@@ -19,7 +19,8 @@
*
* @package mod_game
* @subpackage backup-moodle2
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @copyright 2007 Vasilis Daloukas
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
@@ -102,7 +103,7 @@ class restore_game_activity_structure_step extends restore_activity_structure_st
/**
* Restores the game_export_javame table.
*
- * @param stdClass $game
+ * @param stdClass $data
*/
protected function process_game_export_javame( $data) {
global $DB;
diff --git a/bookquiz/play.php b/bookquiz/play.php
index 6d20c7e..7b767c6 100644
--- a/bookquiz/play.php
+++ b/bookquiz/play.php
@@ -30,7 +30,6 @@ defined('MOODLE_INTERNAL') || die();
* @param stdClass $game
* @param stdClass $attempt
* @param stdClass $bookquiz
- * @param int $bookquizid
* @param int $chapterid
* @param stdClass $context
*/
diff --git a/classes/event/course_module_instance_list_viewed.php b/classes/event/course_module_instance_list_viewed.php
index 36f4b44..a08ab4c 100644
--- a/classes/event/course_module_instance_list_viewed.php
+++ b/classes/event/course_module_instance_list_viewed.php
@@ -27,14 +27,6 @@
namespace mod_game\event;
defined('MOODLE_INTERNAL') || die();
-/*
- * The mod_game instance list viewed event class.
- *
- * @package mod_game
- * @copyright 2007 Vasilis Daloukas
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
- */
-
/**
* The mod_game instance list viewed event class.
*
diff --git a/cross/cross_class.php b/cross/cross_class.php
index 196e2a9..7511f27 100644
--- a/cross/cross_class.php
+++ b/cross/cross_class.php
@@ -43,42 +43,61 @@ Author Àngel Fenoy from Arenys de Mar, Barcelona.
*/
class Cross
{
- public $minputanswers; // Contains the words and the answers.
- public $mwords; // The words that will be used.
+ /** @var int Contains the words and the answers. */
+ public $minputanswers; //
+ /** @var The words that will be used. */
+ public $mwords;
+ /** @var Time limit for computing the cross */
public $mtimelimit = 3;
// Computed by computenextcross.
- public $mbestcrosspos; // The best puzzle.
- public $mbestcrossdir; // The best puzzle.
- public $mbestcrossword; // The best puzzle.
+ /** @var Best score post */
+ public $mbestcrosspos;
+ /** @var Best score dir */
+ public $mbestcrossdir;
+ /** @var Best score crossword */
+ public $mbestcrossword;
+ /** @var Best puzzle */
public $mbestpuzzle;
- public $mbests; // The best score as a phrase.
- public $mbestscore; // The best score.
+ /** @var The best score as a phrase. */
+ public $mbests;
+ /** @var The best score */
+ public $mbestscore;
+ /** @var The best connectors */
public $mbestconnectors;
+ /** @var The best filleds */
public $mbestfilleds;
+ /** @var The best spaces */
public $mbestspaces;
+ /** @var The best n20 */
public $mbestn20;
- // Computepuzzleinfo.
- public $mmincol; // Computed by ComputePuzzleInfo.
- public $mmaxcol; // Computed by ComputePuzzleInfo.
- public $mminrow; // Computed by ComputePuzzleInfo.
- public $mmaxrow; // Computed by ComputePuzzleInfo.
- public $mcletter; // Computed by ComputePuzzleInfo.
- public $mreps; // Repetition of each word.
- public $maveragereps; // Average of repetitions.
+ /** @var Computed by ComputePuzzleInfo. */
+ public $mmincol;
+ /** @var Computed by ComputePuzzleInfo. */
+ public $mmaxcol;
+ /** @var Computed by ComputePuzzleInfo. */
+ public $mminrow;
+ /** @var Computed by ComputePuzzleInfo. */
+ public $mmaxrow;
+ /** @var Computed by ComputePuzzleInfo. */
+ public $mcletter;
+ /** @var Repetition of each word. */
+ public $mreps;
+ /** @var Average of repetitions. */
+ public $maveragereps;
/**
* Set words for computing.
*
* @param array $answers
* @param int $maxcols
- * @param array reps
+ * @param array $reps
*
- * @return \moodle_url
+ * @return moodle_url
*/
public function setwords( $answers, $maxcols, $reps) {
$this->mreps = array();
diff --git a/cross/crossdb_class.php b/cross/crossdb_class.php
index edf9fe3..fc338ef 100644
--- a/cross/crossdb_class.php
+++ b/cross/crossdb_class.php
@@ -16,6 +16,14 @@
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see .
+/**
+ * CrossDB class
+ *
+ * @package mod_game
+ * @copyright 2007 Vasilis Daloukas
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
+
defined('MOODLE_INTERNAL') || die();
/*
@@ -28,6 +36,14 @@ defined('MOODLE_INTERNAL') || die();
defined('MOODLE_INTERNAL') || die();
class CrossDB extends Cross {
+ /**
+ * Save cross.
+ *
+ * @param stdClass $game
+ * @param array $crossm
+ * @param array $crossd
+ * @param int $id
+ */
public function savecross( $game, &$crossm, $crossd, $id) {
global $DB, $USER;
@@ -58,6 +74,11 @@ class CrossDB extends Cross {
return true;
}
+ /**
+ * Delete records.
+ *
+ * @param int $id
+ */
public function delete_records( $id) {
global $DB;
@@ -70,6 +91,23 @@ class CrossDB extends Cross {
}
+ /**
+ * Load cross.
+ *
+ * @param $g
+ * @param boolean $done
+ * @param string $html
+ * @param stdClass $game
+ * @param stdClass $attempt
+ * @param stdClass $crossrec
+ * @param boolean $onlyshow
+ * @param boolean $showsolution
+ * @param finishattempt
+ * @param boolean $htmlsolutions
+ * @param string $language
+ * @param boolean $showstudentguess
+ * @param stdClass $context
+ */
public function loadcross( $g, &$done, &$html, $game, $attempt, $crossrec, $onlyshow, $showsolution,
&$finishattempt, $showhtmlsolutions, &$language, $showstudentguess, $context) {
global $DB;
@@ -133,6 +171,19 @@ class CrossDB extends Cross {
return $info;
}
+ /**
+ * Compute check.
+ *
+ * @param int $correctletters
+ * @param int $wrongletters
+ * @param $restletters
+ * @param stdClass $game
+ * @param stdClass $attempt
+ * @param boolean $done
+ * @param boolean $onlyshow
+ * @param boolean $showsolution
+ * @param boolean $finishattempt
+ */
public function game_cross_computecheck( $correctletters, $wrongletters, $restletters, $game,
$attempt, &$done, $onlyshow, $showsolution, $finishattempt) {
@@ -189,7 +240,20 @@ class CrossDB extends Cross {
return $ret;
}
- // Rec is a record of cross_questions.
+ /**
+ * Update cross questions.
+ *
+ * @param stdClass $rec (is a record of cross_questions).
+ * @param $g
+ * @param $pos
+ * @param int $correctletters
+ * @param int $wrongletters
+ * @param int $restletters
+ * @param stdClass $game
+ * @param stdClass $attempt
+ * @param stdClass $crossrec
+ * @param boolean loadfromdb
+ */
public function updatecrossquestions( &$rec, &$g, &$pos, &$correctletters, &$wrongletters,
&$restletters, $game, $attempt, $crossrec, $loadfromdb) {
diff --git a/cross/play.php b/cross/play.php
index 664335d..0c980a9 100644
--- a/cross/play.php
+++ b/cross/play.php
@@ -37,7 +37,7 @@ require( "crossdb_class.php");
* @param stdClass $cross
* @param string $g
* @param boolean $endofgame
- * param stdClass $context
+ * param stdClass $context
*/
function game_cross_continue( $id, $game, $attempt, $cross, $g, $endofgame, $context) {
if ($endofgame) {
@@ -1097,6 +1097,11 @@ if ($showsolution == false) {
param3 <> 2) {
game_cross_show_welcome0( $game);
@@ -1105,6 +1110,11 @@ function game_cross_show_welcome( $game) {
}
}
+/**
+ * Shows welcome message0.
+ *
+ * @param stdClass $game
+ */
function game_cross_show_welcome0( $game) {
?>
@@ -1147,6 +1157,11 @@ if ($game->param3 == 2) {
|
@@ -1191,7 +1206,7 @@ function game_cross_show_welcome1() {
* @param stdClass $cross
* @param string $g
* @param boolean $endofgame
- * param stdClass $context
+ * param stdClass $context
*/
function game_cross_show_legends( $cross) {
ShowLegend( $cross->mlegendh, get_string( 'cross_across', 'game'));
diff --git a/export/html/snakes/css/modal.css b/export/html/snakes/css/modal.css
index 4382a23..1c7d56d 100644
--- a/export/html/snakes/css/modal.css
+++ b/export/html/snakes/css/modal.css
@@ -19,7 +19,8 @@
float: left;
font-size: 1.2em;
position: fixed;
- top: 50%; left: 50%;
+ top: 50%;
+ left: 50%;
z-index: 99999;
/*--CSS3 Box Shadows--*/
-webkit-box-shadow: 0 0 20px #000;
diff --git a/export/html/snakes/css/subModal.css b/export/html/snakes/css/subModal.css
index 3fda06e..4a43469 100644
--- a/export/html/snakes/css/subModal.css
+++ b/export/html/snakes/css/subModal.css
@@ -31,7 +31,7 @@
z-index: 201;
top: 0;
left: 0;
- display:none;
+ display: none;
padding: 0;
}
#popupInner {
@@ -40,7 +40,7 @@
}
#popupFrame {
- margin: 0px;
+ margin: 0;
width: 100%;
height: 100%;
position: relative;
@@ -62,7 +62,7 @@
}
#popupTitle {
- float:left;
+ float: left;
font-size: 1.1em;
}
diff --git a/export/html/snakes/js/snakes-mod.js b/export/html/snakes/js/snakes-mod.js
index 78ac7fd..207eec7 100644
--- a/export/html/snakes/js/snakes-mod.js
+++ b/export/html/snakes/js/snakes-mod.js
@@ -49,8 +49,9 @@ for (;;) {
allQuest = z / 4;
function selectQuest(all) {
- pickOne = Math.floor((Math.random() * all));
- return pickOne;
+ var pickone = Math.floor((Math.random() * all));
+
+ return pickone;
}
// The Below Function will hide all the snakes.
@@ -67,9 +68,8 @@ function hideAll() {
}
// The Below Function will Render The Main Board.
-
-function paintBoard(a) {
- var j;
+function paintBoard( a) {
+ var i, j;
totblocks = (a * a);
if ((a * a) % 2 == 0) {
@@ -111,28 +111,28 @@ function paintBoard(a) {
document.getElementById("cont").style.width = (a * 52 + 52) + "px"
document.getElementById("cont").innerHTML = data;
- $("#cont").slideDown( "slow");
- $("#cont").effect( "shake",3000);
- $("img:hidden").fadeIn( 5000);
+ $( "#cont").slideDown( "slow");
+ $( "#cont").effect( "shake", 3000);
+ $( "img:hidden").fadeIn( 5000);
if (a == 6) {
- registerSnake(158, 196, "img1", 14, 3, 0);
- registerSnake(62, 183, "img2", 27, 24, 1);
- registerSnake(175, 18, "img3", 18, 4, 2);
- registerSnake(10, 45, "img4", 32, 23, 3);
-
- registerLadder(27, 132, "lad1", 28, 34, 0);
- registerLadder(90, 22, "lad2", 19, 30, 1);
- registerLadder(179, 137, "lad3", 2, 16, 2);
+ registerSnake( 158, 196, "img1", 14, 3, 0);
+ registerSnake( 62, 183, "img2", 27, 24, 1);
+ registerSnake( 175, 18, "img3", 18, 4, 2);
+ registerSnake( 10, 45, "img4", 32, 23, 3);
+
+ registerLadder( 27, 132, "lad1", 28, 34, 0);
+ registerLadder( 90, 22, "lad2", 19, 30, 1);
+ registerLadder( 179, 137, "lad3", 2, 16, 2);
} else if (a == 8) {
- registerSnake(300, 380, "img1", 44, 29, 0);
- registerSnake(180, 550, "img2", 51, 46, 1);
- registerSnake(290, 50, "img3", 41, 40, 2);
- registerSnake(500, 280, "img4", 27, 22, 3);
-
- registerLadder(350, 515, "lad1", 19, 35, 0);
- registerLadder(180, 230, "lad2", 43, 54, 1);
- registerLadder(80, 350, "lad3", 53, 60, 2);
+ registerSnake( 300, 380, "img1", 44, 29, 0);
+ registerSnake( 180, 550, "img2", 51, 46, 1);
+ registerSnake( 290, 50, "img3", 41, 40, 2);
+ registerSnake( 500, 280, "img4", 27, 22, 3);
+
+ registerLadder( 350, 515, "lad1", 19, 35, 0);
+ registerLadder( 180, 230, "lad2", 43, 54, 1);
+ registerLadder( 80, 350, "lad3", 53, 60, 2);
}
}
diff --git a/snakes/play.php b/snakes/play.php
index 2ff7d01..bba3bc3 100644
--- a/snakes/play.php
+++ b/snakes/play.php
@@ -30,7 +30,7 @@ defined('MOODLE_INTERNAL') || die();
* @param stdClass $game
* @param stdClass $attempt
* @param stdClass $snakes
- * @param stdClass $context
+ * @param stdClass $context
*/
function game_snakes_continue( $id, $game, $attempt, $snakes, $context) {
if ($attempt != false and $snakes != false) {
@@ -66,7 +66,7 @@ function game_snakes_continue( $id, $game, $attempt, $snakes, $context) {
* @param stdClass $game
* @param stdClass $attempt
* @param stdClass $snakes
- * @param stdClass $context
+ * @param stdClass $context
*/
function game_snakes_play( $id, $game, $attempt, $snakes, $context) {
global $CFG, $DB, $OUTPUT;
@@ -171,7 +171,7 @@ top:height / 3));?>px; ">
* Computes player's position.
*
* @param stdClass $snakes
- * @param stdClass $board
+ * @param stdClass $board
*/
function game_snakes_computeplayerposition( $snakes, $board) {
$x = ($snakes->position - 1) % $board->cols;
@@ -273,7 +273,7 @@ function game_snakes_computenextquestion( $game, &$snakes, &$query) {
* @param stdClass $game
* @param stdClass $snakes
* @param stdClass $query
- * @param stdClass $context
+ * @param stdClass $context
*/
function game_snakes_showquestion( $id, $game, $snakes, $query, $context) {
if ($query->sourcemodule == 'glossary') {
@@ -290,7 +290,7 @@ function game_snakes_showquestion( $id, $game, $snakes, $query, $context) {
* @param $id
* @param stdClass $snakes
* @param stdClass $query
- * @param stdClass $context
+ * @param stdClass $context
*/
function game_snakes_showquestion_question( $game, $id, $snakes, $query, $context) {
global $CFG;
@@ -365,7 +365,7 @@ function game_snakes_showquestion_glossary( $id, $snakes, $query, $game) {
* @param stdClass $game
* @param stdClass $attempt
* @param stdClass $snakes
- * @param stdClass $context
+ * @param stdClass $context
*/
function game_snakes_check_questions( $id, $game, $attempt, $snakes, $context) {
global $CFG, $DB;
@@ -410,7 +410,7 @@ function game_snakes_check_questions( $id, $game, $attempt, $snakes, $context) {
* @param stdClass $game
* @param stdClass $attempt
* @param stdClass $snakes
- * @param stdClass $context
+ * @param stdClass $context
*/
function game_snakes_check_glossary( $id, $game, $attempt, $snakes, $context) {
global $CFG, $DB;
diff --git a/sudoku/class.Sudoku.php b/sudoku/class.Sudoku.php
index 91a48cf..e7dcc6f 100644
--- a/sudoku/class.Sudoku.php
+++ b/sudoku/class.Sudoku.php
@@ -234,7 +234,7 @@ class cell extends objects {
* Sudoku::_newSolvedPosition.
*
* @desc Assert pending solution.
-] * @param integer $value The value for the solved position.
+ * @param integer $value The value for the solved position.
*/
public function flagsolvedposition($value) {
$this->state = array($value => $value);
diff --git a/sudoku/play.php b/sudoku/play.php
index 89316a9..8bddbc8 100644
--- a/sudoku/play.php
+++ b/sudoku/play.php
@@ -708,7 +708,6 @@ function game_sudoku_check_glossaryentries( $id, $game, $attempt, $sudoku, $fini
}
/**This is the last function after submiting the answers.
- *
*
* @param $id
* @param $game
diff --git a/version.php b/version.php
index cab0fe0..97a64cb 100644
--- a/version.php
+++ b/version.php
@@ -35,10 +35,10 @@ if (!isset( $plugin)) {
}
$plugin->component = 'mod_game'; // Full name of the plugin (used for diagnostics).
-$plugin->version = 2017061201; // The current module version (Date: YYYYMMDDXX).
+$plugin->version = 2017061301; // The current module version (Date: YYYYMMDDXX).
$plugin->requires = 2010112400; // Requires Moodle 2.0.
$plugin->cron = 0; // Period for cron to check this module (secs).
-$plugin->release = '2017-06-12';
+$plugin->release = '2017-06-13';
if ($useplugin != 2) {
$module = $plugin;
|