From 0d22649b99ba20eb9cb5f25dc711fa38cfd000f2 Mon Sep 17 00:00:00 2001 From: jmontoya Date: Wed, 23 Oct 2013 12:15:06 +0200 Subject: [PATCH] Should fix error when copying questions see BT#6917 --- main/exercice/question.class.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/main/exercice/question.class.php b/main/exercice/question.class.php index 1f7ab70122..585e60fee2 100644 --- a/main/exercice/question.class.php +++ b/main/exercice/question.class.php @@ -1270,7 +1270,7 @@ abstract class Question */ public function get_categories_from_question() { - return Testcategory::getCategoryForQuestion($this->id); + return Testcategory::getCategoryForQuestion($this->id, $this->c_id); } /** @@ -1281,6 +1281,7 @@ abstract class Question { $question = Question::read($questionId, $courseId); $categories = $this->get_categories_from_question(); + if (!empty($categories)) { $question->saveCategories($categories); }