Browse Source

phpdoc compatibility

MOODLE_20_STABLE
bdaloukas 8 years ago
parent
commit
a2780c58b0
  1. 2
      backup/moodle2/restore_game_activity_task.class.php
  2. 2
      backup/moodle2/restore_game_stepslib.php
  3. 5
      classes/event/course_module_viewed.php
  4. 4
      cross/cross_class.php
  5. 62
      hiddenpicture/play.php
  6. 6
      lib.php
  7. 5
      locallib.php
  8. 2
      mod_form.php
  9. 6
      print.php
  10. 11
      sudoku/class.Sudoku.php
  11. 4
      sudoku/sdd/class.SDD.php

2
backup/moodle2/restore_game_activity_task.class.php

@ -15,6 +15,8 @@
// along with Moodle. If not, see <http://www.gnu.org/licenses/>. // along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/** /**
* Restores a game
*
* @package mod_game * @package mod_game
* @subpackage backup-moodle2 * @subpackage backup-moodle2
* @copyright 2007 Vasilis Daloukas * @copyright 2007 Vasilis Daloukas

2
backup/moodle2/restore_game_stepslib.php

@ -27,6 +27,8 @@ defined('MOODLE_INTERNAL') || die();
/** /**
* Structure step to restore one game activity * Structure step to restore one game activity
* @copyright 2007 Vasilis Daloukas
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/ */
class restore_game_activity_structure_step extends restore_activity_structure_step { class restore_game_activity_structure_step extends restore_activity_structure_step {

5
classes/event/course_module_viewed.php

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

4
cross/cross_class.php

@ -512,8 +512,8 @@ class Cross
/** /**
* Swaps two variables. * Swaps two variables.
* *
* @param $a * @param &$a
* @param $b * @param &$b
*/ */
public function swap( &$a, &$b) { public function swap( &$a, &$b) {
$temp = $a; $temp = $a;

62
hiddenpicture/play.php

@ -24,6 +24,7 @@
*/ */
defined('MOODLE_INTERNAL') || die(); defined('MOODLE_INTERNAL') || die();
/** /**
* Plays the game "Hidden picture" * Plays the game "Hidden picture"
* *
@ -112,7 +113,13 @@ function game_hiddenpicture_continue( $id, $game, $attempt, $hiddenpicture, $con
game_hiddenpicture_play( $id, $game, $attempt, $newrec, false, $context); game_hiddenpicture_play( $id, $game, $attempt, $newrec, false, $context);
} }
// Create the game_hiddenpicture record.
/**
* Create the game_hiddenpicture record.
*
* @param $game
* @param $attempt
*/
function game_hiddenpicture_selectglossaryentry( $game, $attempt) { function game_hiddenpicture_selectglossaryentry( $game, $attempt) {
global $CFG, $DB, $USER; global $CFG, $DB, $USER;
@ -223,6 +230,16 @@ function game_hiddenpicture_selectglossaryentry( $game, $attempt) {
return $newrec; return $newrec;
} }
/**
* Plays the game "Hidden picture"
*
* @param $id
* @param $game
* @param $attempt
* @param $hiddenpicture
* @param $showsolution
* @param $context
*/
function game_hiddenpicture_play( $id, $game, $attempt, $hiddenpicture, $showsolution, $context) { function game_hiddenpicture_play( $id, $game, $attempt, $hiddenpicture, $showsolution, $context) {
if ($game->toptext != '') { if ($game->toptext != '') {
echo $game->toptext.'<br>'; echo $game->toptext.'<br>';
@ -256,6 +273,12 @@ function game_hiddenpicture_play( $id, $game, $attempt, $hiddenpicture, $showsol
} }
} }
/**
* "Hidden picture" compute score
*
* @param $game
* @param $hiddenpicture
*/
function game_hidden_picture_computescore( $game, $hiddenpicture) { function game_hidden_picture_computescore( $game, $hiddenpicture) {
$correct = $hiddenpicture->correct; $correct = $hiddenpicture->correct;
if ($hiddenpicture->found) { if ($hiddenpicture->found) {
@ -272,6 +295,15 @@ function game_hidden_picture_computescore( $game, $hiddenpicture) {
return $percent; return $percent;
} }
/**
* Show hidden picture
*
* @param $id
* @param $game
* @param $attempt
* @param $hiddenpicture
* @param $showsolution
*/
function game_hiddenpicture_showhiddenpicture( $id, $game, $attempt, $hiddenpicture, $showsolution, function game_hiddenpicture_showhiddenpicture( $id, $game, $attempt, $hiddenpicture, $showsolution,
$offsetquestions, $correctquestions) { $offsetquestions, $correctquestions) {
global $DB; global $DB;
@ -300,6 +332,13 @@ function game_hiddenpicture_showhiddenpicture( $id, $game, $attempt, $hiddenpict
game_showpicture( $id, $game, $attempt, $query, $cells, $foundcells, true); game_showpicture( $id, $game, $attempt, $query, $cells, $foundcells, true);
} }
/**
* hidden picture. show question glossary
*
* @param $game
* @param $id
* @param $query
*/
function game_hiddenpicture_showquestion_glossary( $game, $id, $query) { function game_hiddenpicture_showquestion_glossary( $game, $id, $query) {
global $CFG, $DB; global $CFG, $DB;
@ -331,6 +370,16 @@ function game_hiddenpicture_showquestion_glossary( $game, $id, $query) {
echo "</form><br>\n"; echo "</form><br>\n";
} }
/**
* Check main question
*
* @param $id
* @param $game
* @param $attempt
* @param $hiddenpicture
* @param $finishattempt
* @param $context
*/
function game_hiddenpicture_check_mainquestion( $id, $game, &$attempt, &$hiddenpicture, $finishattempt, $context) { function game_hiddenpicture_check_mainquestion( $id, $game, &$attempt, &$hiddenpicture, $finishattempt, $context) {
global $CFG, $DB; global $CFG, $DB;
@ -396,6 +445,17 @@ function game_hiddenpicture_check_mainquestion( $id, $game, &$attempt, &$hiddenp
return false; return false;
} }
/**
* Show picture
*
* @param $id
* @param $game
* @param $attempt
* @param $query
* @param $cells
* @param $foundcells
* @param $usemap
*/
function game_showpicture( $id, $game, $attempt, $query, $cells, $foundcells, $usemap) { function game_showpicture( $id, $game, $attempt, $query, $cells, $foundcells, $usemap) {
global $CFG; global $CFG;

6
lib.php

@ -263,7 +263,7 @@ function game_user_outline($course, $user, $mod, $game) {
} }
/** /**
* Print a detailed representation of what a user has done with a given particular instance of this module, for user activity reports. * Print a detailed representation of what a user has done with a given particular game,(user activity reports).
* @param stdClass $course * @param stdClass $course
* @param stdClass $user * @param stdClass $user
@ -379,7 +379,7 @@ function game_get_user_grades($game, $userid=0) {
} }
/** /**
* Must return an array of user records (all data) who are participants for a given instance of game. Must include every user involved * Must return an array of user records (all data) who are participants for a given instance of game.
* *
* @param int $gameid ID of an instance of this module * @param int $gameid ID of an instance of this module
* @return mixed boolean/array of students * @return mixed boolean/array of students
@ -1208,7 +1208,7 @@ function mod_game_pluginfile($course, $cm, $context, $filearea, $args, $forcedow
} }
/** /**
* Implementation of the function for printing the form elements that control whether the course reset functionality affects the Game. * Add reset buttons to form.
* *
* @param object $mform form passed by reference * @param object $mform form passed by reference
*/ */

5
locallib.php

@ -1071,7 +1071,8 @@ function game_get_user_attempts( $gameid, $userid, $status = 'finished') {
/** /**
* Returns an unfinished attempt (if there is one) for the given user on the given game. This function does not return preview attempts. * Returns an unfinished attempt (if there is one) for the given user on the given game.
* This function does not return preview attempts.
* *
* @param integer $gameid the id of the game. * @param integer $gameid the id of the game.
* @param integer $userid the id of the user. * @param integer $userid the id of the user.
@ -1555,7 +1556,7 @@ function game_filterquestion_answer( $questiontext, $questionid, $contextid, $co
* @param $text * @param $text
* @param $courseid * @param $courseid
*/ */
function game_filtertext( $text, $courseid) { function game_filtertext( $text, $courseid) {
$formatoptions = new stdClass(); $formatoptions = new stdClass();
$formatoptions->noclean = true; $formatoptions->noclean = true;
$formatoptions->filter = 1; $formatoptions->filter = 1;

2
mod_form.php

@ -17,7 +17,7 @@
/** /**
* Form for creating and modifying a game * Form for creating and modifying a game
* *
* @package game * @package mod_game
* @author Alastair Munro <alastair@catalyst.net.nz> * @author Alastair Munro <alastair@catalyst.net.nz>
* @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
*/ */

6
print.php

@ -55,9 +55,9 @@ function game_print( $game, $update, $context) {
/** /**
* Prints a cross. * Prints a cross.
* *
* @param stdClass $game * @param $game
@param boolean $update @param $update
* @param stdClass $context * @param $context
*/ */
function game_print_cross( $game, $update, $context) { function game_print_cross( $game, $update, $context) {
require( "cross/play.php"); require( "cross/play.php");

11
sudoku/class.Sudoku.php

@ -144,10 +144,14 @@ class objects {
* @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
*/ */
class cell extends objects { class cell extends objects {
/** @var $r */
protected $r; protected $r;
/** @var $c */
protected $c; protected $c;
/** @var $state */
protected $state = array(); protected $state = array();
/** @var $applied */
protected $applied = false; protected $applied = false;
/** /**
@ -746,7 +750,10 @@ class r extends rcs {
*/ */
/** /**
* @see RCS::coupling * see RCS::coupling
*
* @param $therow
* @param $thecolumn
*/ */
public function coupling($therow, $thecolumn) { public function coupling($therow, $thecolumn) {
return $thestate = $this->_coupling($thecolumn); return $thestate = $this->_coupling($thecolumn);
@ -755,7 +762,7 @@ class r extends rcs {
/** /**
* Heavy lifting for row/column coupling calculations. * Heavy lifting for row/column coupling calculations.
* *
* @see RCS::coupling * RCS::coupling
* @param integer $theIndex the index of the cell within the row or column. * @param integer $theIndex the index of the cell within the row or column.
* @return integer the "coupling coefficient" for the cell. The sum of the * @return integer the "coupling coefficient" for the cell. The sum of the
* sizes of the intersection between this and all other * sizes of the intersection between this and all other

4
sudoku/sdd/class.SDD.php

@ -71,8 +71,6 @@ class sdd {
/* /*
* Close the log file. * Close the log file.
*
* @abstract
*/ */
public function close() { public function close() {
} }
@ -279,7 +277,6 @@ class sdd {
/* /*
* Write a debugging value to a log file. * Write a debugging value to a log file.
* *
* @abstract
* @param mixed Data to be logged. * @param mixed Data to be logged.
* @param string $theHeader [optional] string to be emitted prior to * @param string $theHeader [optional] string to be emitted prior to
* logging the data. By default it is a date/time * logging the data. By default it is a date/time
@ -348,7 +345,6 @@ class sdd {
/* /*
* Write data to the log file. * Write data to the log file.
* *
* @abstract
* @parameter string $theData [by reference] the data to be written * @parameter string $theData [by reference] the data to be written
* into the log file. * into the log file.
* @return integer the number of bytes written into the log file. * @return integer the number of bytes written into the log file.

Loading…
Cancel
Save