pull/3142/head
Jonathan Novecio 6 years ago
parent 74fa47199a
commit b2a416eeeb
  1. 7
      main/exercise/exercise.class.php
  2. 11
      tests/behat/features/toolExercise.feature

@ -748,9 +748,6 @@ class Exercise
*/
public function getQuestionCount()
{
if ($this->isRandom()) {
return count($this->getRandomList());
}
$TBL_EXERCICE_QUESTION = Database::get_course_table(TABLE_QUIZ_TEST_QUESTION);
$TBL_QUESTIONS = Database::get_course_table(TABLE_QUIZ_QUESTION);
$sql = "SELECT count(q.id) as count
@ -3207,9 +3204,7 @@ class Exercise
$endReminderValue = true;
}
}
if ($this->type == ALL_ON_ONE_PAGE ||
$nbrQuestions == $questionNum ||
$endReminderValue ) {
if ($this->type == ALL_ON_ONE_PAGE || $nbrQuestions == $questionNum || $endReminderValue ) {
if ($this->review_answers) {
$label = get_lang('ReviewQuestions');
$class = 'btn btn-success';

@ -436,13 +436,4 @@ Feature: Exercise tool
And wait for the page to be loaded
And I follow "Delete"
And I confirm the popup
Then I should see "Deleted"
Scenario: The button at random question should be next
Given I am on "/main/exercise/exercise.php?cidReq=TEST"
And I press "test"
And I press "Start test"
And I press "Next question"
And I press "Next question"
And I press "End test"
Then I should see "Score for the test: 0 / 0"
Then I should see "Deleted"
Loading…
Cancel
Save