mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 16:36:37 +02:00
MDL-49160 quiz: Make sure to not select an outcome grade item
When we are computing completion, make sure we select only the true grade_item, not outcome grade items.
This commit is contained in:
parent
95751e81ac
commit
1245bfd5f0
2 changed files with 97 additions and 1 deletions
|
@ -1841,7 +1841,7 @@ function quiz_get_completion_state($course, $cm, $userid, $type) {
|
|||
if ($quiz->completionpass) {
|
||||
require_once($CFG->libdir . '/gradelib.php');
|
||||
$item = grade_item::fetch(array('courseid' => $course->id, 'itemtype' => 'mod',
|
||||
'itemmodule' => 'quiz', 'iteminstance' => $cm->instance));
|
||||
'itemmodule' => 'quiz', 'iteminstance' => $cm->instance, 'outcomeid' => null));
|
||||
if ($item) {
|
||||
$grades = grade_grade::fetch_users_grades($item, array($userid), false);
|
||||
if (!empty($grades[$userid])) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue