Browse Source

Allow generate build with surveys selected only - refs BT#13496

Angel Fernando Quiroz Campos 7 years ago
parent
commit
2fc53f891d
1 changed files with 3 additions and 0 deletions
  1. 3 0
      src/Chamilo/CourseBundle/Component/CourseCopy/CourseBuilder.php

+ 3 - 0
src/Chamilo/CourseBundle/Component/CourseCopy/CourseBuilder.php

@@ -913,6 +913,9 @@ class CourseBuilder
 
         $sql = 'SELECT * FROM '.$table_survey.'
                 WHERE c_id = '.$courseId.' '.$sessionCondition;
+        if ($id_list) {
+            $sql .= " AND iid IN (".implode(', ', $id_list).")";
+        }
         $db_result = Database::query($sql);
         while ($obj = Database::fetch_object($db_result)) {
             $survey = new Survey(