mirror of
https://github.com/moodle/moodle.git
synced 2025-04-24 18:04:43 +02:00
fixed phpdocs and marked methods as static
This commit is contained in:
parent
d306751695
commit
22a9b6d873
@ -168,7 +168,7 @@ class grade_category extends grade_object {
|
||||
* @return int The depth of this category (2 means there is one parent)
|
||||
* @static
|
||||
*/
|
||||
public function build_path($grade_category) {
|
||||
public static function build_path($grade_category) {
|
||||
global $DB;
|
||||
|
||||
if (empty($grade_category->parent)) {
|
||||
@ -520,7 +520,7 @@ class grade_category extends grade_object {
|
||||
* @param array $items Grade items
|
||||
* @param array $grade_values Array of grade values
|
||||
* @param object $oldgrade Old grade
|
||||
* @param bool $excluded Excluded
|
||||
* @param array $excluded Excluded
|
||||
*
|
||||
* @return boolean (just plain return;)
|
||||
* @todo Document correctly
|
||||
@ -819,11 +819,11 @@ class grade_category extends grade_object {
|
||||
/**
|
||||
* internal function for category grades summing
|
||||
*
|
||||
* @param grade_item &$grade The grade item
|
||||
* @param grade_grade &$grade The grade item
|
||||
* @param float $oldfinalgrade Old Final grade?
|
||||
* @param array $items Grade items
|
||||
* @param array $grade_values Grade values
|
||||
* @param bool $excluded Excluded
|
||||
* @param array $excluded Excluded
|
||||
*
|
||||
* @return boolean (just plain return;)
|
||||
*/
|
||||
@ -1196,7 +1196,7 @@ class grade_category extends grade_object {
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
private function _get_children_recursion($category) {
|
||||
private static function _get_children_recursion($category) {
|
||||
|
||||
$children_array = array();
|
||||
foreach ($category->children as $sortorder=>$child) {
|
||||
@ -1437,7 +1437,7 @@ class grade_category extends grade_object {
|
||||
* @return object grade_category instance for course grade
|
||||
* @static
|
||||
*/
|
||||
public function fetch_course_category($courseid) {
|
||||
public static function fetch_course_category($courseid) {
|
||||
if (empty($courseid)) {
|
||||
debugging('Missing course id!');
|
||||
return false;
|
||||
|
@ -159,7 +159,7 @@ class grade_grade extends grade_object {
|
||||
* @param bool $include_missing include grades that do not exist yet
|
||||
* @return array userid=>grade_grade array
|
||||
*/
|
||||
public function fetch_users_grades($grade_item, $userids, $include_missing=true) {
|
||||
public static function fetch_users_grades($grade_item, $userids, $include_missing=true) {
|
||||
global $DB;
|
||||
|
||||
// hmm, there might be a problem with length of sql query
|
||||
|
@ -438,7 +438,6 @@ class grade_item extends grade_object {
|
||||
$this->idnumber = $idnumber;
|
||||
return $this->update();
|
||||
}
|
||||
return false;
|
||||
|
||||
} else {
|
||||
$this->idnumber = $idnumber;
|
||||
@ -944,7 +943,7 @@ class grade_item extends grade_object {
|
||||
* @param int $courseid
|
||||
* @return course item object
|
||||
*/
|
||||
public function fetch_course_item($courseid) {
|
||||
public static function fetch_course_item($courseid) {
|
||||
if ($course_item = grade_item::fetch(array('courseid'=>$courseid, 'itemtype'=>'course'))) {
|
||||
return $course_item;
|
||||
}
|
||||
|
@ -101,7 +101,7 @@ abstract class grade_object {
|
||||
public function load_optional_fields() {
|
||||
global $DB;
|
||||
foreach ($this->optional_fields as $field=>$default) {
|
||||
if (array_key_exists($field, $this)) {
|
||||
if (property_exists($this, $field)) {
|
||||
continue;
|
||||
}
|
||||
if (empty($this->id)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user