Browse Source

phpdocs compatibility

MOODLE_20_STABLE
bdaloukas 8 years ago
parent
commit
6ee163b73e
  1. 6
      backup/moodle2/backup_game_activity_task.class.php
  2. 7
      backup/moodle2/backup_game_stepslib.php
  3. 3
      backup/moodle2/restore_game_stepslib.php
  4. 1
      bookquiz/play.php
  5. 8
      classes/event/course_module_instance_list_viewed.php
  6. 53
      cross/cross_class.php
  7. 66
      cross/crossdb_class.php
  8. 15
      cross/play.php
  9. 3
      export/html/snakes/css/modal.css
  10. 2
      export/html/snakes/css/subModal.css
  11. 8
      export/html/snakes/js/snakes-mod.js
  12. 2
      sudoku/class.Sudoku.php
  13. 1
      sudoku/play.php
  14. 4
      version.php

6
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). 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 * @copyright 2007 Vasilis Daloukas
* complete backup of the activity * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/ */
class backup_game_activity_task extends backup_activity_task { class backup_game_activity_task extends backup_activity_task {

7
backup/moodle2/backup_game_stepslib.php

@ -19,8 +19,8 @@
* *
* @package mod_game * @package mod_game
* @subpackage backup-moodle2 * @subpackage backup-moodle2
* @author bdaloukas * @copyright 2007 Vasilis Daloukas
backup_game_settingslib.php * @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(); 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 { class backup_game_activity_structure_step extends backup_activity_structure_step {
/** /**

3
backup/moodle2/restore_game_stepslib.php

@ -19,6 +19,7 @@
* *
* @package mod_game * @package mod_game
* @subpackage backup-moodle2 * @subpackage backup-moodle2
* @copyright 2007 Vasilis Daloukas
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/ */
@ -102,7 +103,7 @@ class restore_game_activity_structure_step extends restore_activity_structure_st
/** /**
* Restores the game_export_javame table. * Restores the game_export_javame table.
* *
* @param stdClass $game * @param stdClass $data
*/ */
protected function process_game_export_javame( $data) { protected function process_game_export_javame( $data) {
global $DB; global $DB;

1
bookquiz/play.php

@ -30,7 +30,6 @@ defined('MOODLE_INTERNAL') || die();
* @param stdClass $game * @param stdClass $game
* @param stdClass $attempt * @param stdClass $attempt
* @param stdClass $bookquiz * @param stdClass $bookquiz
* @param int $bookquizid
* @param int $chapterid * @param int $chapterid
* @param stdClass $context * @param stdClass $context
*/ */

8
classes/event/course_module_instance_list_viewed.php

@ -27,14 +27,6 @@
namespace mod_game\event; namespace mod_game\event;
defined('MOODLE_INTERNAL') || die(); 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. * The mod_game instance list viewed event class.
* *

53
cross/cross_class.php

@ -43,42 +43,61 @@ Author Àngel Fenoy from Arenys de Mar, Barcelona.
*/ */
class Cross class Cross
{ {
public $minputanswers; // Contains the words and the answers. /** @var int Contains the words and the answers. */
public $mwords; // The words that will be used. public $minputanswers; //
/** @var The words that will be used. */
public $mwords;
/** @var Time limit for computing the cross */
public $mtimelimit = 3; public $mtimelimit = 3;
// Computed by computenextcross. // Computed by computenextcross.
public $mbestcrosspos; // The best puzzle. /** @var Best score post */
public $mbestcrossdir; // The best puzzle. public $mbestcrosspos;
public $mbestcrossword; // The best puzzle. /** @var Best score dir */
public $mbestcrossdir;
/** @var Best score crossword */
public $mbestcrossword;
/** @var Best puzzle */
public $mbestpuzzle; public $mbestpuzzle;
public $mbests; // The best score as a phrase. /** @var The best score as a phrase. */
public $mbestscore; // The best score. public $mbests;
/** @var The best score */
public $mbestscore;
/** @var The best connectors */
public $mbestconnectors; public $mbestconnectors;
/** @var The best filleds */
public $mbestfilleds; public $mbestfilleds;
/** @var The best spaces */
public $mbestspaces; public $mbestspaces;
/** @var The best n20 */
public $mbestn20; public $mbestn20;
// Computepuzzleinfo. /** @var Computed by ComputePuzzleInfo. */
public $mmincol; // Computed by ComputePuzzleInfo. public $mmincol;
public $mmaxcol; // Computed by ComputePuzzleInfo. /** @var Computed by ComputePuzzleInfo. */
public $mminrow; // Computed by ComputePuzzleInfo. public $mmaxcol;
public $mmaxrow; // Computed by ComputePuzzleInfo. /** @var Computed by ComputePuzzleInfo. */
public $mcletter; // Computed by ComputePuzzleInfo. public $mminrow;
public $mreps; // Repetition of each word. /** @var Computed by ComputePuzzleInfo. */
public $maveragereps; // Average of repetitions. 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. * Set words for computing.
* *
* @param array $answers * @param array $answers
* @param int $maxcols * @param int $maxcols
* @param array reps * @param array $reps
* *
* @return \moodle_url * @return moodle_url
*/ */
public function setwords( $answers, $maxcols, $reps) { public function setwords( $answers, $maxcols, $reps) {
$this->mreps = array(); $this->mreps = array();

66
cross/crossdb_class.php

@ -16,6 +16,14 @@
// You should have received a copy of the GNU General Public License // You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>. // along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* 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(); defined('MOODLE_INTERNAL') || die();
/* /*
@ -28,6 +36,14 @@ defined('MOODLE_INTERNAL') || die();
defined('MOODLE_INTERNAL') || die(); defined('MOODLE_INTERNAL') || die();
class CrossDB extends Cross { 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) { public function savecross( $game, &$crossm, $crossd, $id) {
global $DB, $USER; global $DB, $USER;
@ -58,6 +74,11 @@ class CrossDB extends Cross {
return true; return true;
} }
/**
* Delete records.
*
* @param int $id
*/
public function delete_records( $id) { public function delete_records( $id) {
global $DB; 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, public function loadcross( $g, &$done, &$html, $game, $attempt, $crossrec, $onlyshow, $showsolution,
&$finishattempt, $showhtmlsolutions, &$language, $showstudentguess, $context) { &$finishattempt, $showhtmlsolutions, &$language, $showstudentguess, $context) {
global $DB; global $DB;
@ -133,6 +171,19 @@ class CrossDB extends Cross {
return $info; 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, public function game_cross_computecheck( $correctletters, $wrongletters, $restletters, $game,
$attempt, &$done, $onlyshow, $showsolution, $finishattempt) { $attempt, &$done, $onlyshow, $showsolution, $finishattempt) {
@ -189,7 +240,20 @@ class CrossDB extends Cross {
return $ret; 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, public function updatecrossquestions( &$rec, &$g, &$pos, &$correctletters, &$wrongletters,
&$restletters, $game, $attempt, $crossrec, $loadfromdb) { &$restletters, $game, $attempt, $crossrec, $loadfromdb) {

15
cross/play.php

@ -1097,6 +1097,11 @@ if ($showsolution == false) {
<?php <?php
} }
/**
* Shows welcome message.
*
* @param stdClass $game
*/
function game_cross_show_welcome( $game) { function game_cross_show_welcome( $game) {
if ($game->param3 <> 2) { if ($game->param3 <> 2) {
game_cross_show_welcome0( $game); 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) { function game_cross_show_welcome0( $game) {
?> ?>
<td valign="top" style="padding-left: 1em;"> <td valign="top" style="padding-left: 1em;">
@ -1147,6 +1157,11 @@ if ($game->param3 == 2) {
<?php <?php
} }
/**
* Shows welcome message 1.
*
* @param stdClass $game
*/
function game_cross_show_welcome1() { function game_cross_show_welcome1() {
?> ?>
<td valign="top" style="padding-left: 1em;"> <td valign="top" style="padding-left: 1em;">

3
export/html/snakes/css/modal.css

@ -19,7 +19,8 @@
float: left; float: left;
font-size: 1.2em; font-size: 1.2em;
position: fixed; position: fixed;
top: 50%; left: 50%; top: 50%;
left: 50%;
z-index: 99999; z-index: 99999;
/*--CSS3 Box Shadows--*/ /*--CSS3 Box Shadows--*/
-webkit-box-shadow: 0 0 20px #000; -webkit-box-shadow: 0 0 20px #000;

2
export/html/snakes/css/subModal.css

@ -40,7 +40,7 @@
} }
#popupFrame { #popupFrame {
margin: 0px; margin: 0;
width: 100%; width: 100%;
height: 100%; height: 100%;
position: relative; position: relative;

8
export/html/snakes/js/snakes-mod.js

@ -49,8 +49,9 @@ for (;;) {
allQuest = z / 4; allQuest = z / 4;
function selectQuest(all) { function selectQuest(all) {
pickOne = Math.floor((Math.random() * all)); var pickone = Math.floor((Math.random() * all));
return pickOne;
return pickone;
} }
// The Below Function will hide all the snakes. // The Below Function will hide all the snakes.
@ -67,9 +68,8 @@ function hideAll() {
} }
// The Below Function will Render The Main Board. // The Below Function will Render The Main Board.
function paintBoard( a) { function paintBoard( a) {
var j; var i, j;
totblocks = (a * a); totblocks = (a * a);
if ((a * a) % 2 == 0) { if ((a * a) % 2 == 0) {

2
sudoku/class.Sudoku.php

@ -234,7 +234,7 @@ class cell extends objects {
* Sudoku::_newSolvedPosition. * Sudoku::_newSolvedPosition.
* *
* @desc Assert pending solution. * @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) { public function flagsolvedposition($value) {
$this->state = array($value => $value); $this->state = array($value => $value);

1
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. /**This is the last function after submiting the answers.
*
* *
* @param $id * @param $id
* @param $game * @param $game

4
version.php

@ -35,10 +35,10 @@ if (!isset( $plugin)) {
} }
$plugin->component = 'mod_game'; // Full name of the plugin (used for diagnostics). $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->requires = 2010112400; // Requires Moodle 2.0.
$plugin->cron = 0; // Period for cron to check this module (secs). $plugin->cron = 0; // Period for cron to check this module (secs).
$plugin->release = '2017-06-12'; $plugin->release = '2017-06-13';
if ($useplugin != 2) { if ($useplugin != 2) {
$module = $plugin; $module = $plugin;

Loading…
Cancel
Save