RemedialCourse: Enroll the user when they try to make an attempt #18165 - refs BT#18165

pull/3729/head
Carlos Alvarado 5 years ago
parent b38fcb8590
commit d553201d57
No known key found for this signature in database
GPG Key ID: B612DB1EE6658FBB
  1. 3
      main/exercise/exercise.class.php

@ -6841,6 +6841,8 @@ class Exercise
$blockPercentage $blockPercentage
); );
$isVisible = false; $isVisible = false;
// See BT#18165
$message .= $this->remedialCourseList(api_get_user_id(), false, api_get_session_id());
} }
} }
} }
@ -10968,7 +10970,6 @@ class Exercise
foreach ($attemp['question_list'] as $questionId => $answer) { foreach ($attemp['question_list'] as $questionId => $answer) {
$question = Question::read($questionId, api_get_course_info_by_id($attemp['c_id'])); $question = Question::read($questionId, api_get_course_info_by_id($attemp['c_id']));
$questionOpen = 0; $questionOpen = 0;
// in_array($question->type, $questionExcluded, true) dont work here
for ($i = 0; $i < count($questionExcluded); $i++) { for ($i = 0; $i < count($questionExcluded); $i++) {
if ($question->type == (int) $questionExcluded[$i]) { if ($question->type == (int) $questionExcluded[$i]) {
$questionOpen = 1; $questionOpen = 1;

Loading…
Cancel
Save