Code Duplication    Length = 3-5 lines in 2 locations

main/survey/survey_list.php 1 location

@@ 104-108 (lines=5) @@
101
        exit;
102
    }
103
    // If the survey is shared => also delete the shared content
104
    if (isset($survey_data['survey_share']) &&
105
        is_numeric($survey_data['survey_share'])
106
    ) {
107
        SurveyManager::delete_survey($survey_data['survey_share'], true);
108
    }
109
110
    $return = SurveyManager::delete_survey($_GET['survey_id']);
111

main/coursecopy/classes/CourseRestorer.class.php 1 location

@@ 2313-2315 (lines=3) @@
2310
							$survey_data = Database::fetch_array($result,'ASSOC');
2311
2312
							// if the survey is shared => also delete the shared content
2313
							if (isset($survey_data['survey_share']) && is_numeric($survey_data['survey_share'])) {
2314
                                SurveyManager::delete_survey($survey_data['survey_share'], true,$this->destination_course_id);
2315
							}
2316
							SurveyManager :: delete_survey($survey_data['survey_id'],false,$this->destination_course_id);
2317
2318
							// Insert the new source survey