From 300477801f1b39b65b0766b72fdb9fe2a3a1e16b Mon Sep 17 00:00:00 2001 From: Julio Montoya Date: Wed, 30 Dec 2015 08:51:38 +0100 Subject: [PATCH] Fix category import see BT#10052 --- main/exercice/testcategory.class.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/main/exercice/testcategory.class.php b/main/exercice/testcategory.class.php index 600fda0c10..432dda2943 100755 --- a/main/exercice/testcategory.class.php +++ b/main/exercice/testcategory.class.php @@ -500,8 +500,6 @@ class Testcategory $categories[$data['category_id']][] = $data['question_id']; } - - if (!empty($categoriesAddedInExercise)) { $newCategoryList = array(); foreach ($categoriesAddedInExercise as $category) { @@ -538,9 +536,13 @@ class Testcategory return $categories; } - /** - * return a tab of $in_number random elements of $in_tab - */ + /** + * return a tab of $in_number random elements of $in_tab + * + * @param $in_tab + * @param $in_number + * @return array + */ public static function getNElementsFromArray($in_tab, $in_number) { $tabres = $in_tab;