Browse Source

phpdocs compatibility

MOODLE_20_STABLE
bdaloukas 8 years ago
parent
commit
249309e65d
  1. 3
      backup/moodle2/backup_game_stepslib.php
  2. 7
      backup/moodle2/restore_game_activity_task.class.php
  3. 3
      classes/event/course_module_viewed.php
  4. 39
      cross/cross_class.php
  5. 6
      cross/crossdb_class.php
  6. 10
      cross/play.php
  7. 10
      cryptex/cryptexdb_class.php
  8. 5
      db/access.php
  9. 14
      export.php
  10. 2
      export/html/snakes/css/subModal.css
  11. 29
      export/html/snakes/js/snakes-mod.js
  12. 4
      version.php

3
backup/moodle2/backup_game_stepslib.php

@ -25,6 +25,9 @@
/**
* Define the complete game structure for backup, with file and id annotations
*
* @copyright 2007 Vasilis Daloukas
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();

7
backup/moodle2/restore_game_activity_task.class.php

@ -17,7 +17,8 @@
/**
* @package mod_game
* @subpackage backup-moodle2
* @author bdaloukas
* @copyright 2007 Vasilis Daloukas
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
@ -107,8 +108,10 @@ class restore_game_activity_task extends restore_activity_task {
return $rules;
}
/**
* Do something at end of restore.
*/
public function after_restore() {
// Do something at end of restore.
global $DB;
// Get the blockid.

3
classes/event/course_module_viewed.php

@ -55,6 +55,9 @@ class course_module_viewed extends \core\event\course_module_viewed {
return $event;
}
/**
* Create instance of event.
*/
public static function played(\stdClass $game, \context_module $context) {
$data = array(
'context' => $context,

39
cross/cross_class.php

@ -171,7 +171,7 @@ class Cross
* Compute one crossword.
*
* @param stdClass crossm
* @param stdClass crossm
* @param stdClass crossd
* @param string $letters
* @param int minwords
* @param int maxwords
@ -223,7 +223,7 @@ class Cross
* @param int $ctries
* @param int $minwords
* @param int $maxwords
* @param int &$nochange
* @param int $nochange
*
* @return \moodle_url
*/
@ -322,11 +322,10 @@ class Cross
* @param int $n22
* @param int $n2222
* @param int $nwords
* @param int @$nconnectors
* @param int @$nfilleds
* @param int @$cspaces
* @param int $nconnectors
* @param int $nfilleds
* @param int $cspaces
* @param stdClass $crossword
* @param array reps
*
* @return \moodle_url
*/
@ -439,10 +438,10 @@ class Cross
/**
* Save the crossword to database.
*
* @param array &$crossm
* @param array &$crossd
* @param int ctries
* @param int time
* @param array $crossm
* @param array $crossd
* @param int $ctries
* @param int $time
*/
public function savepuzzle( &$crossm, &$crossd, $ctries, $time) {
$n22 = $this->mbestn20 + 2;
@ -571,13 +570,13 @@ class Cross
* @param int $pos
* @param int $dir
* @param int $valblanc
* @param string &$puzzle
* @param array &$words
* @param &$magics
* @param poss
* @param #ccrosspos
* @param crossdir
* @param crosssword
* @param string $puzzle
* @param array $words
* @param $magics
* @param $poss
* @param $ccrosspos
* @param $crossdir
* @param $crosssword
* @param int $n20
*
* @return true if it is ok.
@ -711,8 +710,8 @@ class Cross
* my_preg_match (backward compatibility).
*
* @param $w
* @param @words
* @param &$word
* @param $words
* @param $word
*
* @return true if it is ok.
*/
@ -745,7 +744,7 @@ class Cross
/**
* Set a char to the specified position.
*
* @param @$s
* @param $s
* @param int $pos
* @param char $char
*/

6
cross/crossdb_class.php

@ -102,8 +102,8 @@ class CrossDB extends Cross {
* @param stdClass $crossrec
* @param boolean $onlyshow
* @param boolean $showsolution
* @param finishattempt
* @param boolean $htmlsolutions
* @param $finishattempt
* @param boolean $showhtmlsolutions
* @param string $language
* @param boolean $showstudentguess
* @param stdClass $context
@ -252,7 +252,7 @@ class CrossDB extends Cross {
* @param stdClass $game
* @param stdClass $attempt
* @param stdClass $crossrec
* @param boolean loadfromdb
* @param boolean $loadfromdb
*/
public function updatecrossquestions( &$rec, &$g, &$pos, &$correctletters, &$wrongletters,
&$restletters, $game, $attempt, $crossrec, $loadfromdb) {

10
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) {
@ -1159,8 +1159,6 @@ if ($game->param3 == 2) {
/**
* Shows welcome message 1.
*
* @param stdClass $game
*/
function game_cross_show_welcome1() {
?>
@ -1200,13 +1198,7 @@ function game_cross_show_welcome1() {
/**
* Show the legend (horizontal and vertical)
*
* @param int $id
* @param stdClass $game
* @param stdClass $attempt
* @param stdClass $cross
* @param string $g
* @param boolean $endofgame
* param stdClass $context
*/
function game_cross_show_legends( $cross) {
ShowLegend( $cross->mlegendh, get_string( 'cross_across', 'game'));

10
cryptex/cryptexdb_class.php

@ -38,7 +38,7 @@ class CryptexDB extends CrossDB {
* @param stdClass $game
* @param array $crossm
* @param array $crossd
* @param int id
* @param int $id
* @param $letters
*
* @return the saved record
@ -170,7 +170,7 @@ class CryptexDB extends CrossDB {
* @param $cols
* @param $rows
* @param $char
* @param int &$spaces
* @param int $spaces
*/
public function insertchar( &$letters, $cols, $rows, $char, &$spaces) {
$len = game_strlen( $letters);
@ -190,7 +190,7 @@ class CryptexDB extends CrossDB {
* @param $cols
* @param $rows
* @param $char
* @param int &$spaces
* @param int $spaces
*/
public function insertchars( &$letters, $cols, $rows, $char, &$spaces) {
$len = game_strlen( $letters);
@ -286,7 +286,7 @@ class CryptexDB extends CrossDB {
}
/**
* Calss the setwords of class Cross.
* Calls the setwords of class Cross.
*
* @param $answers
* @param $maxcols
@ -299,7 +299,7 @@ class CryptexDB extends CrossDB {
}
/**
* Calss the computedata of class Cross.
* Calls the computedata of class Cross.
*
* @param $crossm
* @param $crossd

5
db/access.php

@ -14,8 +14,6 @@
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
defined('MOODLE_INTERNAL') || die();
/*
* Plugin capabilities
*
@ -23,6 +21,9 @@ defined('MOODLE_INTERNAL') || die();
* @copyright 2007 Vasilis Daloukas
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
$capabilities = array(
// Ability to see that the game exists, and the basic information about it, for example the start date and time limit.

14
export.php

@ -39,6 +39,13 @@ if (!has_capability('mod/game:viewreports', $context)) {
$target = optional_param('target', "", PARAM_ALPHANUM); // The target is HTML or JavaMe.
/**
* The mod_game_exporthtml_form show the export form.
*
* @package mod_game
* @copyright 2007 Vasilis Daloukas
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class mod_game_exporthtml_form extends moodleform {
/**
@ -152,6 +159,13 @@ class mod_game_exporthtml_form extends moodleform {
}
}
/**
* The mod_game_exportjavame_form show the export form.
*
* @package mod_game
* @copyright 2007 Vasilis Daloukas
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class mod_game_exportjavame_form extends moodleform {
/**

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

@ -14,7 +14,6 @@
* I find setting the color in the css gives me more flexibility
* than the PNG solution.
*/
background-color: transparent !important;
background-color: #333;
/* this hack is for opera support
* you can uncomment the background-image if you don't care about opera.
@ -68,6 +67,5 @@
#popupControls {
float: right;
cursor: pointer;
cursor: hand;
}

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

@ -108,7 +108,7 @@ function paintBoard( a) {
currentblock -= (a + 1);
}
}
document.getElementById("cont").style.width = (a * 52 + 52) + "px"
document.getElementById("cont").style.width = (a * 52 + 52) + "px";
document.getElementById("cont").innerHTML = data;
$("#cont").slideDown("slow");
@ -210,31 +210,6 @@ function registerLadder(tp, lft, dv, src, dest, i) {
laddest[i] = dest;
}
// The below function checks the change in the boardtype selection combobox.
function selectBoard() {
totblocks = 0;
data = "";
currentblock = 0;
hideAll();
if (document.getElementById("boardtype").value != null) {
paintBoard(parseInt(document.getElementById("boardtype").value));
}
}
// The below function checks the change in the player selection combobox.
function selectPlayer() {
if (document.getElementById("players").value != null) {
user[document.getElementById("players").value - 1] = 0;
tots[document.getElementById("players").value - 1] = 0;
lastposition[document.getElementById("players").value - 1] = 0;
for(var j = 0; j < lastposition.length; j++) {
lastposition[j] = 0;
tots[j] = 0;
}
}
}
// The below function starts the play.
function play() {
if (tots[l] != null) {
@ -298,7 +273,7 @@ function question() {
coranswered.concat(quest.splice(picked * 4, 4));
} else {
alert("Η απάντηση δεν ήταν σωστή. Χάνεις τη σειρά σου για αυτό το γύρο!")
alert("Η απάντηση δεν ήταν σωστή. Χάνεις τη σειρά σου για αυτό το γύρο!");
wroanswered.concat(quest.splice(picked * 4, 4));
}

4
version.php

@ -35,10 +35,10 @@ if (!isset( $plugin)) {
}
$plugin->component = 'mod_game'; // Full name of the plugin (used for diagnostics).
$plugin->version = 2017061604; // The current module version (Date: YYYYMMDDXX).
$plugin->version = 2017061701; // 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-13';
$plugin->release = '2017-06-17';
if ($useplugin != 2) {
$module = $plugin;

Loading…
Cancel
Save