diff --git a/main/inc/lib/course.lib.php b/main/inc/lib/course.lib.php index 430feaa554..685f3fbf59 100755 --- a/main/inc/lib/course.lib.php +++ b/main/inc/lib/course.lib.php @@ -2333,7 +2333,9 @@ class CourseManager // Skills $table = Database::get_main_table(TABLE_MAIN_SKILL_REL_USER); - $sql = "DELETE FROM $table WHERE course_id = $courseId"; + $argumentation = Database::escape_string(sprintf(get_lang('SkillFromCourseXDeletedSinceThen'), $course['code'])); + error_log($argumentation); + $sql = "UPDATE $table SET course_id = NULL, session_id = NULL, argumentation = '$argumentation' WHERE course_id = $courseId"; Database::query($sql); // Delete the course from the database