Fix SQL error when backuping course with empty thematic plan - refs #6827

1.9.x
Yannick Warnier 11 years ago
parent bc15891256
commit 0034acca69
  1. 3
      main/coursecopy/classes/CourseBuilder.class.php

@ -975,7 +975,7 @@ class CourseBuilder
}
}
//$sql = 'SELECT * FROM '.$table_thematic_plan.' WHERE c_id = '.$course_id.' AND thematic_id = '.$row['id'];
if (count($thematic_plan_id_list) > 0) {
$sql = "SELECT tp.*
FROM $table_thematic_plan tp
INNER JOIN $table_thematic t ON (t.id=tp.thematic_id)
@ -989,6 +989,7 @@ class CourseBuilder
while ($sub_row = Database::fetch_array($result,'ASSOC')) {
$thematic->add_thematic_plan($sub_row);
}
}
$this->course->add_resource($thematic);
}
}

Loading…
Cancel
Save