Should fix error when copying questions see BT#6917

skala
jmontoya 12 years ago
parent 0946315f20
commit 0d22649b99
  1. 3
      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);
}

Loading…
Cancel
Save