Hide grading fields for unanswered questions
This commit is contained in:
@@ -202,7 +202,7 @@ class ResultModel extends BaseDatabaseModel
|
||||
$questionIds = [];
|
||||
foreach ($item->answers as $questionId => $answer) {
|
||||
$question = $item->questions[(int) $questionId] ?? null;
|
||||
if ($question && $question->question_type === 'open' && empty($answer['correct'])) {
|
||||
if ($question && $question->question_type === 'open' && empty($answer['correct']) && trim((string) ($answer['selected'] ?? '')) !== '') {
|
||||
$questionIds[] = (int) $questionId;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user