mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 16:36:37 +02:00
MDL-11718 course settings for reports - for now only user report (rank and showing of hidden items)
This commit is contained in:
parent
57068674c6
commit
26ed030543
5 changed files with 105 additions and 33 deletions
|
@ -459,6 +459,24 @@ function grade_get_setting($courseid, $name, $default=null, $resetcache=false) {
|
|||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns all course gradebook settings as object properties
|
||||
* @param int $courseid
|
||||
* @return object
|
||||
*/
|
||||
function grade_get_settings($courseid) {
|
||||
$settings = new object();
|
||||
$settings->id = $courseid;
|
||||
|
||||
if ($records = get_records('grade_settings', 'courseid', $courseid)) {
|
||||
foreach ($records as $record) {
|
||||
$settings->{$record->name} = $record->value;
|
||||
}
|
||||
}
|
||||
|
||||
return $settings;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add/update course gradebook setting
|
||||
* @param int $courseid
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue