mirror of
https://github.com/moodle/moodle.git
synced 2025-04-15 21:45:37 +02:00
MDL-3942 fixed warnings; merged from MOODEL_19_STABLE
This commit is contained in:
parent
f7633b0f2e
commit
df17e1bd93
@ -1228,15 +1228,17 @@ function forum_get_user_grades($forum, $userid=0) {
|
||||
break;
|
||||
}
|
||||
|
||||
$results = get_records_sql($sql);
|
||||
// it could throw off the grading if count and sum returned a rawgrade higher than scale
|
||||
// so to prevent it we review the results and ensure that rawgrade does not exceed the scale, if it does we set rawgrade = scale (i.e. full credit)
|
||||
foreach ($results as $result) {
|
||||
if ($result->rawgrade >$forum->scale) {
|
||||
$result->rawgrade = $forum->scale;
|
||||
if ($results = get_records_sql($sql)) {
|
||||
// it could throw off the grading if count and sum returned a rawgrade higher than scale
|
||||
// so to prevent it we review the results and ensure that rawgrade does not exceed the scale, if it does we set rawgrade = scale (i.e. full credit)
|
||||
foreach ($results as $result) {
|
||||
if ($result->rawgrade > $forum->scale) {
|
||||
$result->rawgrade = $forum->scale;
|
||||
}
|
||||
}
|
||||
}
|
||||
return $results;
|
||||
|
||||
return $results;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user