|
|
|
@ -1563,10 +1563,7 @@ class CourseManager { |
|
|
|
|
$table_course_survey = Database::get_main_table(TABLE_MAIN_SHARED_SURVEY); |
|
|
|
|
$table_course_survey_question = Database::get_main_table(TABLE_MAIN_SHARED_SURVEY_QUESTION); |
|
|
|
|
$table_course_survey_question_option= Database::get_main_table(TABLE_MAIN_SHARED_SURVEY_QUESTION_OPTION); |
|
|
|
|
$stats = false; |
|
|
|
|
|
|
|
|
|
if (Database::get_statistic_database() != '') { |
|
|
|
|
$stats = true; |
|
|
|
|
$table_stats_hotpots = Database::get_statistic_table(TABLE_STATISTIC_TRACK_E_HOTPOTATOES); |
|
|
|
|
$table_stats_attempt = Database::get_statistic_table(TABLE_STATISTIC_TRACK_E_ATTEMPT); |
|
|
|
|
$table_stats_exercises = Database::get_statistic_table(TABLE_STATISTIC_TRACK_E_EXERCICES); |
|
|
|
@ -1578,7 +1575,7 @@ class CourseManager { |
|
|
|
|
$table_stats_downloads = Database::get_statistic_table(TABLE_STATISTIC_TRACK_E_DOWNLOADS); |
|
|
|
|
$table_stats_links = Database::get_statistic_table(TABLE_STATISTIC_TRACK_E_LINKS); |
|
|
|
|
$table_stats_uploads = Database::get_statistic_table(TABLE_STATISTIC_TRACK_E_UPLOADS); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$code = Database::escape_string($code); |
|
|
|
|
$sql = "SELECT * FROM $table_course WHERE code='".$code."'"; |
|
|
|
@ -1613,7 +1610,7 @@ class CourseManager { |
|
|
|
|
Database::query($sql); |
|
|
|
|
|
|
|
|
|
// Delete the course from the stats tables |
|
|
|
|
if ($stats) { |
|
|
|
|
|
|
|
|
|
$sql = "DELETE FROM $table_stats_hotpots WHERE exe_cours_id = '".$virtual_course['code']."'"; |
|
|
|
|
Database::query($sql); |
|
|
|
|
$sql = "DELETE FROM $table_stats_attempt WHERE course_code = '".$virtual_course['code']."'"; |
|
|
|
@ -1636,7 +1633,7 @@ class CourseManager { |
|
|
|
|
Database::query($sql); |
|
|
|
|
$sql = "DELETE FROM $table_stats_uploads WHERE upload_cours_id = '".$virtual_course['code']."'"; |
|
|
|
|
Database::query($sql); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Delete the course from the course table |
|
|
|
|
$sql = "DELETE FROM $table_course WHERE code='".$virtual_course['code']."'"; |
|
|
|
@ -1688,7 +1685,7 @@ class CourseManager { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// Delete the course from the stats tables |
|
|
|
|
if ($stats) { |
|
|
|
|
|
|
|
|
|
$sql = "DELETE FROM $table_stats_hotpots WHERE exe_cours_id = '".$code."'"; |
|
|
|
|
Database::query($sql); |
|
|
|
|
$sql = "DELETE FROM $table_stats_attempt WHERE course_code = '".$code."'"; |
|
|
|
@ -1711,7 +1708,7 @@ class CourseManager { |
|
|
|
|
Database::query($sql); |
|
|
|
|
$sql = "DELETE FROM $table_stats_uploads WHERE upload_cours_id = '".$code."'"; |
|
|
|
|
Database::query($sql); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
global $_configuration; |
|
|
|
|
if ($_configuration['multiple_access_urls']) { |
|
|
|
|