From ff01d5d37c8db9a81fbae61ede95a147893e9d23 Mon Sep 17 00:00:00 2001 From: Julio Montoya Date: Thu, 17 Apr 2014 11:12:40 +0200 Subject: [PATCH] Fixing delete course course_rel_class is no longer use see #6183 --- main/inc/lib/course.lib.php | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/main/inc/lib/course.lib.php b/main/inc/lib/course.lib.php index 3bd38b05ff..13198714ed 100644 --- a/main/inc/lib/course.lib.php +++ b/main/inc/lib/course.lib.php @@ -1970,7 +1970,7 @@ class CourseManager { $table_course = Database::get_main_table(TABLE_MAIN_COURSE); $table_course_user = Database::get_main_table(TABLE_MAIN_COURSE_USER); - $table_course_class = Database::get_main_table(TABLE_MAIN_COURSE_CLASS); + //$table_course_class = Database::get_main_table(TABLE_MAIN_COURSE_CLASS); $table_session_course = Database::get_main_table(TABLE_MAIN_SESSION_COURSE); $table_session_course_user = Database::get_main_table(TABLE_MAIN_SESSION_COURSE_USER); @@ -2015,8 +2015,8 @@ class CourseManager $virtual_courses = self::get_virtual_courses_linked_to_real_course($code); foreach ($virtual_courses as $index => $virtual_course) { // Unsubscribe all classes from the virtual course - $sql = "DELETE FROM $table_course_class WHERE course_code='".$virtual_course['code']."'"; - Database::query($sql); + /*$sql = "DELETE FROM $table_course_class WHERE course_code='".$virtual_course['code']."'"; + Database::query($sql);*/ // Unsubscribe all users from the virtual course $sql = "DELETE FROM $table_course_user WHERE course_code='".$virtual_course['code']."'"; Database::query($sql); @@ -2028,10 +2028,10 @@ class CourseManager // Delete the course from the survey tables $sql = "DELETE FROM $table_course_survey WHERE course_code='".$virtual_course['code']."'"; Database::query($sql); - $sql = "DELETE FROM $table_course_survey_user WHERE db_name='".$virtual_course['db_name']."'"; + /*$sql = "DELETE FROM $table_course_survey_user WHERE db_name='".$virtual_course['db_name']."'"; Database::query($sql); $sql = "DELETE FROM $table_course_survey_reminder WHERE db_name='".$virtual_course['db_name']."'"; - Database::query($sql); + Database::query($sql);*/ // Delete the course from the stats tables @@ -2084,8 +2084,8 @@ class CourseManager } // Unsubscribe all classes from the course - $sql = "DELETE FROM $table_course_class WHERE course_code='".$code."'"; - Database::query($sql); + /*$sql = "DELETE FROM $table_course_class WHERE course_code='".$code."'"; + Database::query($sql);*/ // Unsubscribe all users from the course $sql = "DELETE FROM $table_course_user WHERE course_code='".$code."'"; Database::query($sql); @@ -2111,7 +2111,6 @@ class CourseManager Database::query($sql); } - // Delete the course from the stats tables $sql = "DELETE FROM $table_stats_hotpots WHERE exe_cours_id = '".$code."'";