Ver código fonte

Merge pull request #2405 from nosolored/import_qti

Fix issue by which an exercise imported in QTI2 directly into a session would also be imported in the course. Also applies to copies.
Yannick Warnier 7 anos atrás
pai
commit
74a10674aa
1 arquivos alterados com 2 adições e 0 exclusões
  1. 2 0
      main/exercise/exercise.class.php

+ 2 - 0
main/exercise/exercise.class.php

@@ -124,6 +124,7 @@ class Exercise
         }
         $this->course_id = $course_info['real_id'];
         $this->course = $course_info;
+        $this->sessionId = api_get_session_id();
 
         // ALTER TABLE c_quiz_question ADD COLUMN feedback text;
         $this->questionFeedbackEnabled = api_get_configuration_value('allow_quiz_question_feedback');
@@ -172,6 +173,7 @@ class Exercise
             $this->results_disabled = $object->results_disabled;
             $this->attempts = $object->max_attempt;
             $this->feedback_type = $object->feedback_type;
+            $this->sessionId = $object->session_id;
             $this->propagate_neg = $object->propagate_neg;
             $this->saveCorrectAnswers = $object->save_correct_answers;
             $this->randomByCat = $object->random_by_category;