Browse Source

phpdoc compatibility

MOODLE_20_STABLE
bdaloukas 8 years ago
parent
commit
1422796e64
  1. 4
      classes/event/course_module_viewed.php
  2. 30
      cross/cross_class.php
  3. 3
      cross/crossdb_class.php
  4. 14
      cryptex/cryptexdb_class.php
  5. 2
      db/importsnakes.php
  6. 10
      export/exporthtml_millionaire.php
  7. 90
      hangman/play.php
  8. 14
      hiddenpicture/play.php
  9. 13
      lib.php
  10. 7
      locallib.php
  11. 6
      print.php
  12. 16
      report/default.php
  13. 10
      translate.php

4
classes/event/course_module_viewed.php

@ -58,8 +58,8 @@ class course_module_viewed extends \core\event\course_module_viewed {
/**
* Create instance of event.
*
* @param $game
* @param $context
* @param stdClass $game
* @param context_module $context
*
* @return event
*/

30
cross/cross_class.php

@ -512,8 +512,8 @@ class Cross
/**
* Swaps two variables.
*
* @param &$a
* @param &$b
* @param object $a
* @param object $b
*/
public function swap( &$a, &$b) {
$temp = $a;
@ -572,11 +572,11 @@ class Cross
* @param int $valblanc
* @param string $puzzle
* @param array $words
* @param $magics
* @param $poss
* @param $ccrosspos
* @param $crossdir
* @param $crosssword
* @param object $magics
* @param object $poss
* @param int $ccrosspos
* @param int $crossdir
* @param object $crosssword
* @param int $n20
*
* @return true if it is ok.
@ -709,9 +709,9 @@ class Cross
/**
* my_preg_match (backward compatibility).
*
* @param $w
* @param $words
* @param $word
* @param string $w
* @param string $words
* @param string $word
*
* @return true if it is ok.
*/
@ -744,9 +744,9 @@ class Cross
/**
* Set a char to the specified position.
*
* @param $s
* @param $pos
* @param $char
* @param string $s
* @param int $pos
* @param string $char
*/
public function setchar( &$s, $pos, $char) {
$ret = "";
@ -761,8 +761,8 @@ class Cross
/**
* Show html base.
*
* @param $crossm
* @param $crossd
* @param object $crossm
* @param object $crossd
* @param boolean $showsolution
* @param boolean $showhtmlsolutions
* @param boolean $showstudentguess

3
cross/crossdb_class.php

@ -32,9 +32,6 @@ defined('MOODLE_INTERNAL') || die();
* @author bdaloukas
* @package game
**/
defined('MOODLE_INTERNAL') || die();
class CrossDB extends Cross {
/**
* Save cross.

14
cryptex/cryptexdb_class.php

@ -39,7 +39,7 @@ class CryptexDB extends CrossDB {
* @param array $crossm
* @param array $crossd
* @param int $id
* @param $letters
* @param string $letters
*
* @return the saved record
*/
@ -134,12 +134,12 @@ class CryptexDB extends CrossDB {
/**
* Displays the cryptex.
*
* @param $cols
* @param $rows
* @param $letters
* @param $mask
* @param $showsolution
* @param $textdir
* @param int $cols
* @param int $rows
* @param string $letters
* @param string $mask
* @param boolean $showsolution
* @param boolean $textdir
*/
public function displaycryptex( $cols, $rows, $letters, $mask, $showsolution, $textdir) {
echo "<table border=1 $textdir>";

2
db/importsnakes.php

@ -70,6 +70,8 @@ function game_importsnakes() {
/**
* Insert one board to database
*
* @param $newrec
*/
function game_importsnakes_do( $newrec) {
global $DB;

10
export/exporthtml_millionaire.php

@ -29,11 +29,11 @@ defined('MOODLE_INTERNAL') || die();
*
* @param stdClass $game
* @param stdClass $context
* @param $maxanswers
* @param $countofquestions
* @param $retfeedback
* @param $destdir
* @param $files
* @param int $maxanswers
* @param int $countofquestions
* @param string $retfeedback
* @param string $destdir
* @param array $files
*/
function game_millionaire_html_getquestions( $game, $context, &$maxanswers, &$countofquestions, &$retfeedback, $destdir, &$files) {
global $CFG, $DB, $USER;

90
hangman/play.php

@ -27,13 +27,13 @@ defined('MOODLE_INTERNAL') || die();
/**
* Plays the game hangman
*
* @param $id
* @param $game
* @param $attempt
* @param $hangman
* @param $newletter
* @param $action
* @param $context
* @param int $id
* @param stdClass $game
* @param stdClass $attempt
* @param stdClass $hangman
* @param string $newletter
* @param string $action
* @param stdClass $context
*/
function game_hangman_continue( $id, $game, $attempt, $hangman, $newletter, $action, $context) {
global $DB, $USER;
@ -233,13 +233,13 @@ function game_hangman_onfinishgame( $game, $attempt, $hangman) {
/**
* Plays the hangman game.
*
* @param $id
* @param $game
* @param $attempt
* @param $hangman
* @param $onlyshow
* @param $showsolution
* @param $context
* @param int $id
* @param stdClass $game
* @param stdClass $attempt
* @param stdClass $hangman
* @param boolean $onlyshow
* @param boolean $showsolution
* @param stdClass $context
*/
function game_hangman_play( $id, $game, $attempt, $hangman, $onlyshow, $showsolution, $context) {
global $CFG, $DB, $OUTPUT;
@ -321,20 +321,20 @@ function game_hangman_play( $id, $game, $attempt, $hangman, $onlyshow, $showsolu
/**
* Shows page.
*
* @param $done
* @param $correct
* @param $wrong
* @param $max
* @param wordline
* @param $wordline2
* @param $links
* @param boolean $done
* @param boolean $correct
* @param boolean $wrong
* @param int $max
* @param string wordline
* @param string $wordline2
* @param array $links
* @param stdClass $game
* @param $attempt
* @param $hangman
* @param $query
* @param $onlyshow
* @param $showsolution
* @param $context
* @param stdClass $attempt
* @param stdClass $hangman
* @param stdClass $query
* @param boolean $onlyshow
* @param boolean $showsolution
* @param stdClass $context
*/
function hangman_showpage(&$done, &$correct, &$wrong, $max, &$wordline, &$wordline2, &$links,
$game, &$attempt, &$hangman, &$query, $onlyshow, $showsolution, $context) {
@ -484,12 +484,12 @@ function hangman_showpage(&$done, &$correct, &$wrong, $max, &$wordline, &$wordli
/**
* This word is correct. If reach the max number of words I have to finish else continue with next word.
*
* @param $id
* @param $wordline
* @param $game
* @param $attempt
* @param $hangman
* @param $query
* @param int $id
* @param string $wordline
* @param stdClass $game
* @param stdClass $attempt
* @param stdClass $hangman
* @param stdClass $query
*/
function hangman_oncorrect( $id, $wordline, $game, $attempt, $hangman, $query) {
global $DB;
@ -510,14 +510,14 @@ function hangman_oncorrect( $id, $wordline, $game, $attempt, $hangman, $query) {
/**
* On incorrect.
*
* @param $id
* @param $wordline
* @param $word
* @param $game
* @param $attempt
* @param $hangman
* @param $onlyshow
* @param $showsolution
* @param int $id
* @param string $wordline
* @param string $word
* @param stdClass $game
* @param stdClass $attempt
* @param stdClass $hangman
* @param boolean $onlyshow
* @param boolean $showsolution
*/
function hangman_onincorrect( $id, $wordline, $word, $game, $attempt, $hangman, $onlyshow, $showsolution) {
echo "\r\n<br/><br/><font size=\"5\">\n$wordline</font>\r\n";
@ -544,10 +544,10 @@ function hangman_onincorrect( $id, $wordline, $word, $game, $attempt, $hangman,
/**
* Shows the next word.
*
* @param $id
* @param $game
* @param $attempt
* @param $hangman
* @param int $id
* @param stdClass $game
* @param stdClass $attempt
* @param stdClass $hangman
*/
function game_hangman_show_nextword( $id, $game, $attempt, $hangman) {
global $CFG, $DB;

14
hiddenpicture/play.php

@ -28,11 +28,11 @@ defined('MOODLE_INTERNAL') || die();
/**
* Plays the game "Hidden picture"
*
* @param $id
* @param $game
* @param $attempt
* @param $hiddenpicture
* @param $context
* @param int $id
* @param stdClass $game
* @param stdClass $attempt
* @param stdClass $hiddenpicture
* @param stdClass $context
*/
function game_hiddenpicture_continue( $id, $game, $attempt, $hiddenpicture, $context) {
global $DB, $USER;
@ -117,8 +117,8 @@ function game_hiddenpicture_continue( $id, $game, $attempt, $hiddenpicture, $con
/**
* Create the game_hiddenpicture record.
*
* @param $game
* @param $attempt
* @param stdClass $game
* @param stdClass $attempt
*/
function game_hiddenpicture_selectglossaryentry( $game, $attempt) {
global $CFG, $DB, $USER;

13
lib.php

@ -55,7 +55,8 @@ define('GAME_REVIEW_GENERALFEEDBACK', 32 * 0x1041); // Show general feedback.
/**
* Given an object containing all the necessary data, will create a new instance and return the id number of the new instance.
*
* @param object $instance An object from the form in mod.html
* @param object $game An object from the form in mod.html
*
* @return int The id of the newly inserted game record
**/
function game_add_instance($game) {
@ -79,7 +80,7 @@ function game_add_instance($game) {
/**
* Given an object containing all the necessary data, this function will update an existing instance with new data.
*
* @param object $instance An object from the form in mod.html
* @param object $game An object from the form in mod.html
* @return boolean Success/Fail
**/
function game_update_instance($game) {
@ -237,10 +238,10 @@ function game_delete_instance($gameid) {
/**
* Return a small object with summary information about what a user has done
*
* @param $course
* @param $user
* @param $mod
* @param $game
* @param stdClass $course
* @param stdClass $user
* @param string $mod
* @param stdClass $game
*
* $return->time = the time they did it
* $return->info = a short text description

7
locallib.php

@ -1992,6 +1992,13 @@ foreach ($anss as $answer) {
<?php
}
/**
* Print question show answer
*
* @param stdClass $game
* @param stdClass $question
* @param $context
*/
function game_print_question_shortanswer( $game, $question, $context) {
$questiontext = $question->questiontext;

6
print.php

@ -40,9 +40,9 @@ game_print( $game, $id, $context);
/**
* Print
*
* @param $game
* @param $update
* @param $context
* @param stdClass $game
* @param boolean $update
* @param stdClass $context
*/
function game_print( $game, $update, $context) {
if ( $game->gamekind == 'cross') {

16
report/default.php

@ -51,9 +51,9 @@ class game_default_report {
/**
* Display
*
* @param $cm
* @param $course
* @param $game
* @param stdClass $cm
* @param stdClass $course
* @param stdClass $game
*/
public function display($cm, $course, $game) {
// This function just displays the report.
@ -63,11 +63,11 @@ class game_default_report {
/**
* print header and tabs
*
* @param $cm
* @param $course
* @param $game
* @param $reportmode
* @param $meta
* @param stdClass $cm
* @param stdClass $course
* @param stdClass $game
* @param string $reportmode
* @param string $meta
*/
public function print_header_and_tabs($cm, $course, $game, $reportmode = "overview", $meta = "") {
global $CFG;

10
translate.php

@ -255,7 +255,7 @@ if ($ret != '') {
/**
* Returns the language file for lang
*
* @param $lang
* @param string $lang
* @param string module
* @return the path of language file
*/
@ -272,8 +272,8 @@ function getlangfile( $lang) {
/**
* Reads the language file
*
* @param $lang
* @param $header
* @param string $lang
* @param string $header
*/
function readlangfile( $lang, &$header) {
@ -341,7 +341,7 @@ function splitlangdefinition($line, &$name, &$trans) {
* Read source code
*
* @param string $file
* @param $strings
* @param string $strings
*/
function readsourcecode( $file, &$strings) {
global $CFG;
@ -357,7 +357,7 @@ function readsourcecode( $file, &$strings) {
/**
* Parse line
*
* @param $strings
* @param string $strings
* @param string $line
* @param string $filename
*/

Loading…
Cancel
Save