|
|
|
@ -8792,6 +8792,13 @@ class Exercise |
|
|
|
|
|
|
|
|
|
$repo = Container::getQuizRepository(); |
|
|
|
|
|
|
|
|
|
$trackEExerciseRepo = Container::getTrackEExerciseRepository(); |
|
|
|
|
$pendingCorrections = $trackEExerciseRepo->getPendingCorrectionsByExercise($courseId); |
|
|
|
|
$pendingAttempts = []; |
|
|
|
|
foreach ($pendingCorrections as $correction) { |
|
|
|
|
$pendingAttempts[$correction['exerciseId']] = $correction['pendingCount']; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// 2. Get query builder from repo. |
|
|
|
|
$qb = $repo->getResourcesByCourse($course, $session); |
|
|
|
|
|
|
|
|
@ -9027,6 +9034,18 @@ class Exercise |
|
|
|
|
$url .= Display::div($embeddableIcon, ['class' => 'pull-right']); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
$pendingCount = $pendingAttempts[$exerciseId] ?? 0; |
|
|
|
|
if ($pendingCount > 0) { |
|
|
|
|
$pendingIcon = Display::getMdiIcon( |
|
|
|
|
ActionIcon::ALERT->value, |
|
|
|
|
'ch-tool-icon', |
|
|
|
|
null, |
|
|
|
|
ICON_SIZE_SMALL, |
|
|
|
|
get_lang('Pending Attempts') . ": $pendingCount" |
|
|
|
|
); |
|
|
|
|
$url .= " $pendingIcon"; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
$currentRow['title'] = $url.$lp_blocked; |
|
|
|
|
$rowi = $exerciseEntity->getQuestions()->count(); |
|
|
|
|
if ($allowToEditBaseCourse || $allowToEditSession) { |
|
|
|
|