Internal: use Event::get_attempt_count() instead of Event::get_attempt_count_not_finished(), as these are essentially the same method. Fix lang var.

pull/5206/head
Yannick Warnier 2 years ago
parent 601151c1da
commit 4ad977dc94
  1. 4
      public/main/exercise/exercise.class.php

@ -6723,7 +6723,7 @@ class Exercise
$exerciseAttempts = $this->selectAttempts();
if ($exerciseAttempts > 0) {
$attemptCount = Event::get_attempt_count_not_finished(
$attemptCount = Event::get_attempt_count(
api_get_user_id(),
$this->getId(),
$lpId,
@ -6733,7 +6733,7 @@ class Exercise
if ($attemptCount >= $exerciseAttempts) {
$message = sprintf(
get_lang('Reachedmax. 20 characters, e.g. <i>INNOV21</i>Attempts'),
get_lang('You cannot take test <b>%s</b> because you have already reached the maximum of %s attempts.'),
$this->name,
$exerciseAttempts
);

Loading…
Cancel
Save