Minor - fix php code

pull/3064/head
Julio 5 years ago
parent 25c512807a
commit 4ff1aed266
  1. 2
      public/main/admin/user_update_import.php
  2. 8
      public/main/exercise/answer.class.php
  3. 2
      public/main/exercise/unique_answer.class.php

@ -207,7 +207,7 @@ function updateUsers($users)
foreach ($user['Courses'] as $course) {
if (CourseManager::course_exists($course)) {
CourseManager::subscribeUser($user_id, $course, $user['Status']);
$course_info = CourseManager::get_course_information($course);
$course_info = api_get_course_info($course);
$inserted_in_course[$course] = $course_info['title'];
}
}

@ -655,7 +655,7 @@ class Answer
->setHotspotCoordinates($hotSpotCoordinates)
->setHotspotType($hotSpotType);
$em->merge($quizAnswer);
$em->persist($quizAnswer);
$em->flush();
return $quizAnswer;
@ -734,7 +734,7 @@ class Answer
$quizAnswer->setCorrect($correctAnswerAutoId ? $correctAnswerAutoId : 0);
}
$em->merge($quizAnswer);
$em->persist($quizAnswer);
$em->flush();
}
} else {
@ -937,7 +937,7 @@ class Answer
->setId($answerId)
->setIdAuto($answerId);
$em->merge($quizAnswer);
$em->persist($quizAnswer);
$em->flush();
$correctAnswers[$answerId] = $answer['correct'];
@ -987,7 +987,7 @@ class Answer
->setId($answerId)
->setIdAuto($answerId);
$em->merge($quizAnswer);
$em->persist($quizAnswer);
$em->flush();
$correctAnswers[$answerId] = $correct;

@ -500,7 +500,7 @@ class UniqueAnswer extends Question
$quizAnswer
->setId($id);
$em->merge($quizAnswer);
$em->persist($quizAnswer);
$em->flush();
}

Loading…
Cancel
Save