Fix references to CQuizCategory repo

pull/3240/head
Angel Fernando Quiroz Campos 6 years ago
parent 296c11143e
commit a4bfbe9e67
  1. 4
      main/exercise/exercise.class.php

@ -971,7 +971,7 @@ class Exercise
if (!empty($questions_by_category)) {
$newCategoryList = [];
$em = Database::getManager();
$repo = $em->getRepository('ChamiloCoreBundle:CQuizCategory');
$repo = $em->getRepository('ChamiloCourseBundle:CQuizCategory');
foreach ($questions_by_category as $categoryId => $questionList) {
$cat = new TestCategory();
@ -986,7 +986,7 @@ class Exercise
if (isset($cat['parent_id']) && !empty($cat['parent_id'])) {
/** @var \Chamilo\CourseBundle\Entity\CQuizCategory $categoryEntity */
if (!isset($parentsLoaded[$cat['parent_id']])) {
$categoryEntity = $em->find('ChamiloCoreBundle:CQuizCategory', $cat['parent_id']);
$categoryEntity = $em->find('ChamiloCourseBundle:CQuizCategory', $cat['parent_id']);
$parentsLoaded[$cat['parent_id']] = $categoryEntity;
} else {
$categoryEntity = $parentsLoaded[$cat['parent_id']];

Loading…
Cancel
Save