mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 06:18:28 +01:00
fixed phpdocs and using property_exists() which is required by PHP 5.3
This commit is contained in:
parent
913d9dc3aa
commit
4d27bc7929
@ -155,7 +155,7 @@ if ($mform->is_cancelled()) {
|
|||||||
|
|
||||||
$convert = array('grademax', 'grademin', 'gradepass', 'multfactor', 'plusfactor', 'aggregationcoef');
|
$convert = array('grademax', 'grademin', 'gradepass', 'multfactor', 'plusfactor', 'aggregationcoef');
|
||||||
foreach ($convert as $param) {
|
foreach ($convert as $param) {
|
||||||
if (array_key_exists($param, $itemdata)) {
|
if (property_exists($param, $itemdata)) {
|
||||||
$itemdata->$param = unformat_float($itemdata->$param);
|
$itemdata->$param = unformat_float($itemdata->$param);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -184,7 +184,7 @@ if ($mform->is_cancelled()) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Handle null decimals value - must be done before update!
|
// Handle null decimals value - must be done before update!
|
||||||
if (!array_key_exists('decimals', $itemdata) or $itemdata->decimals < 0) {
|
if (!property_exists('decimals', $itemdata) or $itemdata->decimals < 0) {
|
||||||
$grade_item->decimals = null;
|
$grade_item->decimals = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -186,7 +186,7 @@ if ($mform->is_cancelled()) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// the overriding of feedback is tricky - we have to care about external items only
|
// the overriding of feedback is tricky - we have to care about external items only
|
||||||
if (!array_key_exists('feedback', $data) or $data->feedback == $data->oldfeedback) {
|
if (!property_exists('feedback', $data) or $data->feedback == $data->oldfeedback) {
|
||||||
$data->feedback = $old_grade_grade->feedback;
|
$data->feedback = $old_grade_grade->feedback;
|
||||||
$data->feedbackformat = $old_grade_grade->feedbackformat;
|
$data->feedbackformat = $old_grade_grade->feedbackformat;
|
||||||
}
|
}
|
||||||
|
@ -125,7 +125,7 @@ if ($mform->is_cancelled()) {
|
|||||||
|
|
||||||
$convert = array('grademax', 'grademin', 'gradepass', 'multfactor', 'plusfactor', 'aggregationcoef');
|
$convert = array('grademax', 'grademin', 'gradepass', 'multfactor', 'plusfactor', 'aggregationcoef');
|
||||||
foreach ($convert as $param) {
|
foreach ($convert as $param) {
|
||||||
if (array_key_exists($param, $data)) {
|
if (property_exists($param, $data)) {
|
||||||
$data->$param = unformat_float($data->$param);
|
$data->$param = unformat_float($data->$param);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -135,7 +135,7 @@ if ($mform->is_cancelled()) {
|
|||||||
$grade_item->outcomeid = null;
|
$grade_item->outcomeid = null;
|
||||||
|
|
||||||
// Handle null decimals value
|
// Handle null decimals value
|
||||||
if (!array_key_exists('decimals', $data) or $data->decimals < 0) {
|
if (!property_exists('decimals', $data) or $data->decimals < 0) {
|
||||||
$grade_item->decimals = null;
|
$grade_item->decimals = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -107,7 +107,7 @@ if ($data = $mform->get_data()) {
|
|||||||
$data->aggregationcoef = 0;
|
$data->aggregationcoef = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (array_key_exists('calculation', $data)) {
|
if (property_exists('calculation', $data)) {
|
||||||
$data->calculation = grade_item::normalize_formula($data->calculation, $course->id);
|
$data->calculation = grade_item::normalize_formula($data->calculation, $course->id);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -123,7 +123,7 @@ if ($data = $mform->get_data()) {
|
|||||||
|
|
||||||
$convert = array('gradepass', 'aggregationcoef');
|
$convert = array('gradepass', 'aggregationcoef');
|
||||||
foreach ($convert as $param) {
|
foreach ($convert as $param) {
|
||||||
if (array_key_exists($param, $data)) {
|
if (property_exists($param, $data)) {
|
||||||
$data->$param = unformat_float($data->$param);
|
$data->$param = unformat_float($data->$param);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -689,7 +689,7 @@ class grade_plugin_return {
|
|||||||
|
|
||||||
} else {
|
} else {
|
||||||
foreach ($params as $key=>$value) {
|
foreach ($params as $key=>$value) {
|
||||||
if (array_key_exists($key, $this)) {
|
if (property_exists($key, $this)) {
|
||||||
$this->$key = $value;
|
$this->$key = $value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1988,7 +1988,7 @@ class grade_tree extends grade_structure {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Local shortcut function for creating an edit/delete button for a grade_* object.
|
* Local shortcut function for creating an edit/delete button for a grade_* object.
|
||||||
* @param strong $type 'edit' or 'delete'
|
* @param string $type 'edit' or 'delete'
|
||||||
* @param int $courseid The Course ID
|
* @param int $courseid The Course ID
|
||||||
* @param grade_* $object The grade_* object
|
* @param grade_* $object The grade_* object
|
||||||
* @return string html
|
* @return string html
|
||||||
@ -2332,7 +2332,7 @@ abstract class grade_helper {
|
|||||||
/**
|
/**
|
||||||
* Get information on letters
|
* Get information on letters
|
||||||
* @param int $courseid
|
* @param int $courseid
|
||||||
* @return grade_plugin_info
|
* @return array
|
||||||
*/
|
*/
|
||||||
public static function get_info_letters($courseid) {
|
public static function get_info_letters($courseid) {
|
||||||
if (self::$letterinfo !== null) {
|
if (self::$letterinfo !== null) {
|
||||||
|
@ -106,7 +106,7 @@ class grade_report_user extends grade_report {
|
|||||||
$this->switch = grade_get_setting($this->courseid, 'aggregationposition', $CFG->grade_aggregationposition);
|
$this->switch = grade_get_setting($this->courseid, 'aggregationposition', $CFG->grade_aggregationposition);
|
||||||
|
|
||||||
// Grab the grade_tree for this course
|
// Grab the grade_tree for this course
|
||||||
$this->gtree = new grade_tree($this->courseid, false, $this->switch, false, !$CFG->enableoutcomes);
|
$this->gtree = new grade_tree($this->courseid, false, $this->switch, null, !$CFG->enableoutcomes);
|
||||||
|
|
||||||
// Determine the number of rows and indentation
|
// Determine the number of rows and indentation
|
||||||
$this->maxdepth = 1;
|
$this->maxdepth = 1;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user