mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 22:08:20 +01:00
Merge branch 'MDL-79191-401' of https://github.com/paulholden/moodle into MOODLE_401_STABLE
This commit is contained in:
commit
d3bb9121fd
@ -226,11 +226,11 @@ class completion extends base {
|
||||
LEFT JOIN {grade_grades} {$grade}
|
||||
ON ({$user}.id = {$grade}.userid AND {$gradeitem}.id = {$grade}.itemid)
|
||||
")
|
||||
->set_type(column::TYPE_INTEGER)
|
||||
->set_type(column::TYPE_FLOAT)
|
||||
->add_fields("{$grade}.finalgrade")
|
||||
->set_is_sortable(true)
|
||||
->add_callback(function ($value) {
|
||||
if (!$value) {
|
||||
->add_callback(function(?float $value): string {
|
||||
if ($value === null) {
|
||||
return '';
|
||||
}
|
||||
return format_float($value, 2);
|
||||
|
@ -80,7 +80,7 @@ class participants_test extends core_reportbuilder_testcase {
|
||||
|
||||
// Update final grade for the user.
|
||||
$courseitem = grade_item::fetch_course_item($course->id);
|
||||
$courseitem->update_final_grade($user1->id, 80);
|
||||
$courseitem->update_final_grade($user1->id, 42.5);
|
||||
|
||||
// Set some last access value for the user in the course.
|
||||
$DB->insert_record('user_lastaccess',
|
||||
@ -152,7 +152,7 @@ class participants_test extends core_reportbuilder_testcase {
|
||||
'', // Reagreggate.
|
||||
'2', // Days taking course.
|
||||
'2', // Days until completion.
|
||||
'80.00', // Grade.
|
||||
'42.50', // Grade.
|
||||
], array_values($content[0]));
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user