diff --git a/swad_changelog.h b/swad_changelog.h index 0a70fbd1f..77732d665 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -154,13 +154,14 @@ /****************************** Public constants *****************************/ /*****************************************************************************/ -#define Log_PLATFORM_VERSION "SWAD 16.45.6 (2016-10-28)" +#define Log_PLATFORM_VERSION "SWAD 16.45.7 (2016-10-28)" #define CSS_FILE "swad16.32.1.css" #define JS_FILE "swad15.238.1.js" // Number of lines (includes comments but not blank lines) has been got with the following command: // nl swad*.c swad*.h css/swad*.css py/swad*.py js/swad*.js soap/swad*.h sql/swad*.sql | tail -1 /* + Version 16.45.7: Oct 28, 2016 Remove forums and surveys of an institution when removing it. (205927 lines) Version 16.45.6: Oct 28, 2016 Remove forums and surveys of a centre when removing it. (205922 lines) Version 16.45.5: Oct 28, 2016 Code refactoring in forums. (205919 lines) Version 16.45.4: Oct 27, 2016 Code refactoring in degree forums. (205916 lines) diff --git a/swad_institution.c b/swad_institution.c index cee82cca7..50b6e6b36 100644 --- a/swad_institution.c +++ b/swad_institution.c @@ -1551,6 +1551,12 @@ void Ins_RemoveInstitution (void) Lay_ShowAlert (Lay_WARNING,Txt_To_remove_an_institution_you_must_first_remove_all_centres_and_users_in_the_institution); else // Institution has no users ==> remove it { + /***** Remove all the threads and posts in forums of the institution *****/ + For_RemoveForums (Sco_SCOPE_INS,Ins.InsCod); + + /***** Remove surveys of the institution *****/ + Svy_RemoveSurveys (Sco_SCOPE_INS,Ins.InsCod); + /***** Remove information related to files in institution *****/ Brw_RemoveInsFilesFromDB (Ins.InsCod);