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. 3
      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/>.
/**
* Restores a game
*
* @package mod_game
* @subpackage backup-moodle2
* @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
* @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 {

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.
* @param stdClass $game
* @param stdClass $context
*
* @param $game
* @param $context
*
* @return event
*/

4
cross/cross_class.php

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

62
hiddenpicture/play.php

@ -24,6 +24,7 @@
*/
defined('MOODLE_INTERNAL') || die();
/**
* 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);
}
// Create the game_hiddenpicture record.
/**
* Create the game_hiddenpicture record.
*
* @param $game
* @param $attempt
*/
function game_hiddenpicture_selectglossaryentry( $game, $attempt) {
global $CFG, $DB, $USER;
@ -223,6 +230,16 @@ function game_hiddenpicture_selectglossaryentry( $game, $attempt) {
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) {
if ($game->toptext != '') {
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) {
$correct = $hiddenpicture->correct;
if ($hiddenpicture->found) {
@ -272,6 +295,15 @@ function game_hidden_picture_computescore( $game, $hiddenpicture) {
return $percent;
}
/**
* Show hidden picture
*
* @param $id
* @param $game
* @param $attempt
* @param $hiddenpicture
* @param $showsolution
*/
function game_hiddenpicture_showhiddenpicture( $id, $game, $attempt, $hiddenpicture, $showsolution,
$offsetquestions, $correctquestions) {
global $DB;
@ -300,6 +332,13 @@ function game_hiddenpicture_showhiddenpicture( $id, $game, $attempt, $hiddenpict
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) {
global $CFG, $DB;
@ -331,6 +370,16 @@ function game_hiddenpicture_showquestion_glossary( $game, $id, $query) {
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) {
global $CFG, $DB;
@ -396,6 +445,17 @@ function game_hiddenpicture_check_mainquestion( $id, $game, &$attempt, &$hiddenp
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) {
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 $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
* @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
*/

3
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 $userid the id of the user.

2
mod_form.php

@ -17,7 +17,7 @@
/**
* Form for creating and modifying a game
*
* @package game
* @package mod_game
* @author Alastair Munro <alastair@catalyst.net.nz>
* @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.
*
* @param stdClass $game
@param boolean $update
* @param stdClass $context
* @param $game
@param $update
* @param $context
*/
function game_print_cross( $game, $update, $context) {
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
*/
class cell extends objects {
/** @var $r */
protected $r;
/** @var $c */
protected $c;
/** @var $state */
protected $state = array();
/** @var $applied */
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) {
return $thestate = $this->_coupling($thecolumn);
@ -755,7 +762,7 @@ class r extends rcs {
/**
* 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.
* @return integer the "coupling coefficient" for the cell. The sum of the
* 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.
*
* @abstract
*/
public function close() {
}
@ -279,7 +277,6 @@ class sdd {
/*
* Write a debugging value to a log file.
*
* @abstract
* @param mixed Data to be logged.
* @param string $theHeader [optional] string to be emitted prior to
* logging the data. By default it is a date/time
@ -348,7 +345,6 @@ class sdd {
/*
* Write data to the log file.
*
* @abstract
* @parameter string $theData [by reference] the data to be written
* into the log file.
* @return integer the number of bytes written into the log file.

Loading…
Cancel
Save