Skip to content

Commit

Permalink
MDL-30995 completion: updating PHPdocs as suggested by little smurfs
Browse files Browse the repository at this point in the history
  • Loading branch information
ankitagarwal committed Mar 14, 2012
1 parent 95dd54e commit f55ff38
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 13 deletions.
6 changes: 3 additions & 3 deletions lib/completion/completion_completion.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,16 +57,16 @@ class completion_completion extends data_object {
/* @var int Timestamp the interested parties were notified of this user's completion. */
public $timenotified;

/* @var int Time of course enrolment {@see completion_completion::mark_enrolled()} */
/* @var int Time of course enrolment {@link completion_completion::mark_enrolled()} */
public $timeenrolled;

/**
* Time the user started their course completion {@see completion_completion::mark_inprogress()}
* Time the user started their course completion {@link completion_completion::mark_inprogress()}
* @var int
*/
public $timestarted;

/* @var int Timestamp of course completion {@see completion_completion::mark_complete()} */
/* @var int Timestamp of course completion {@link completion_completion::mark_complete()} */
public $timecompleted;

/* @var int Flag to trigger cron aggregation (timestamp) */
Expand Down
7 changes: 3 additions & 4 deletions lib/completion/completion_criteria_completion.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ class completion_criteria_completion extends data_object {
/* @var int Timestamp of user unenrolment (if completing a unenrol criteria) */
public $unenroled;

/* @var int Timestamp of course criteria completion {@see completion_criteria_completion::mark_complete()} */
/* @var int Timestamp of course criteria completion {@link completion_criteria_completion::mark_complete()} */
public $timecompleted;

/* @var completion_criterria Associated criteria object */
Expand Down Expand Up @@ -141,8 +141,7 @@ public function attach_criteria(completion_criteria $criteria) {
*/
public function get_criteria() {

if (!$this->_criteria)
{
if (!$this->_criteria) {
global $DB;

$params = array(
Expand All @@ -158,7 +157,7 @@ public function get_criteria() {
}

/**
* Return criteria status text for display in reports {@see completion_criteria::get_status()}
* Return criteria status text for display in reports {@link completion_criteria::get_status()}
*
* @return string
*/
Expand Down
3 changes: 1 addition & 2 deletions lib/completion/completion_criteria_role.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,7 @@ public function complete($completion) {
*/
public function review($completion, $mark = true, $is_complete = false) {
// If we are marking this as complete
if ($is_complete && $mark)
{
if ($is_complete && $mark) {
$completion->completedself = 1;
$completion->mark_complete();

Expand Down
2 changes: 1 addition & 1 deletion lib/completion/cron.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
*/

defined('MOODLE_INTERNAL') || die();
require_once $CFG->libdir.'/completionlib.php';
require_once($CFG->libdir.'/completionlib.php');

/**
* Update user's course completion statuses
Expand Down
5 changes: 3 additions & 2 deletions lib/completion/data_object.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ abstract class data_object {
* @param bool $fetch Whether to fetch corresponding row from DB or not,
* optional fields might not be defined if false used
*/
public function __construct($params = NULL, $fetch = true) {
public function __construct($params = null, $fetch = true) {
if (!empty($params) and (is_array($params) or is_object($params))) {
if ($fetch) {
if ($data = $this->fetch($params)) {
Expand Down Expand Up @@ -337,5 +337,6 @@ public static function set_properties(&$instance, $params) {
*
* @param bool $deleted Set this to true if it has been deleted.
*/
public function notify_changed($deleted) {}
public function notify_changed($deleted) {
}
}
2 changes: 1 addition & 1 deletion lib/completionlib.php
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ class completion_info {
/* @var int Course id */
public $course_id;

/* @var array Completion criteria {@see completion_info::get_criteria()} */
/* @var array Completion criteria {@link completion_info::get_criteria()} */
private $criteria;

/**
Expand Down

0 comments on commit f55ff38

Please sign in to comment.