mirror of
https://github.com/acanas/swad-core.git
synced 2024-06-01 06:15:31 +02:00
Version 16.45.4
This commit is contained in:
parent
79de994a4b
commit
e081f1fc4d
|
@ -154,13 +154,14 @@
|
||||||
/****************************** Public constants *****************************/
|
/****************************** Public constants *****************************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
#define Log_PLATFORM_VERSION "SWAD 16.45.3 (2016-10-27)"
|
#define Log_PLATFORM_VERSION "SWAD 16.45.4 (2016-10-27)"
|
||||||
#define CSS_FILE "swad16.32.1.css"
|
#define CSS_FILE "swad16.32.1.css"
|
||||||
#define JS_FILE "swad15.238.1.js"
|
#define JS_FILE "swad15.238.1.js"
|
||||||
|
|
||||||
// Number of lines (includes comments but not blank lines) has been got with the following command:
|
// 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
|
// 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.4: Oct 27, 2016 Code refactoring in degree forums. (205916 lines)
|
||||||
Version 16.45.3: Oct 27, 2016 Code refactoring in course forums. (205906 lines)
|
Version 16.45.3: Oct 27, 2016 Code refactoring in course forums. (205906 lines)
|
||||||
Version 16.45.2: Oct 27, 2016 Code refactoring related with scopes. (205896 lines)
|
Version 16.45.2: Oct 27, 2016 Code refactoring related with scopes. (205896 lines)
|
||||||
Version 16.45.1: Oct 27, 2016 Fixed bugs in surveys. (? lines)
|
Version 16.45.1: Oct 27, 2016 Fixed bugs in surveys. (? lines)
|
||||||
|
|
|
@ -2244,7 +2244,7 @@ static void Crs_EmptyCourseCompletely (long CrsCod)
|
||||||
sprintf (Query,"DELETE FROM notices WHERE CrsCod='%ld'",CrsCod);
|
sprintf (Query,"DELETE FROM notices WHERE CrsCod='%ld'",CrsCod);
|
||||||
DB_QueryDELETE (Query,"can not remove notices in a course");
|
DB_QueryDELETE (Query,"can not remove notices in a course");
|
||||||
|
|
||||||
/***** Remove all the threads and posts in forums of a course *****/
|
/***** Remove all the threads and posts in forums of the course *****/
|
||||||
For_RemoveCrsForums (CrsCod);
|
For_RemoveCrsForums (CrsCod);
|
||||||
|
|
||||||
/***** Remove all test exams made in the course *****/
|
/***** Remove all test exams made in the course *****/
|
||||||
|
|
|
@ -2289,37 +2289,8 @@ void Deg_RemoveDegreeCompletely (long DegCod)
|
||||||
already removed) *****/
|
already removed) *****/
|
||||||
Svy_RemoveSurveys (Sco_SCOPE_DEG,DegCod);
|
Svy_RemoveSurveys (Sco_SCOPE_DEG,DegCod);
|
||||||
|
|
||||||
/***** Remove all the threads and posts in degree forums *****/
|
/***** Remove all the threads and posts in forums of the degree *****/
|
||||||
/* Remove disabled posts */
|
For_RemoveDegForums (DegCod);
|
||||||
sprintf (Query,"DELETE FROM forum_disabled_post"
|
|
||||||
" USING forum_thread,forum_post,forum_disabled_post"
|
|
||||||
" WHERE (forum_thread.ForumType='%u' OR forum_thread.ForumType='%u')"
|
|
||||||
" AND forum_thread.Location='%ld' AND forum_thread.ThrCod=forum_post.ThrCod AND forum_post.PstCod=forum_disabled_post.PstCod",
|
|
||||||
For_FORUM_DEGREE_USRS,For_FORUM_DEGREE_TCHS,DegCod);
|
|
||||||
DB_QueryDELETE (Query,"can not remove the disabled posts in forums of a degree");
|
|
||||||
|
|
||||||
/* Remove posts */
|
|
||||||
sprintf (Query,"DELETE FROM forum_post"
|
|
||||||
" USING forum_thread,forum_post"
|
|
||||||
" WHERE (forum_thread.ForumType='%u' OR forum_thread.ForumType='%u')"
|
|
||||||
" AND forum_thread.Location='%ld' AND forum_thread.ThrCod=forum_post.ThrCod",
|
|
||||||
For_FORUM_DEGREE_USRS,For_FORUM_DEGREE_TCHS,DegCod);
|
|
||||||
DB_QueryDELETE (Query,"can not remove posts in forums of a degree");
|
|
||||||
|
|
||||||
/* Remove threads read */
|
|
||||||
sprintf (Query,"DELETE FROM forum_thr_read"
|
|
||||||
" USING forum_thread,forum_thr_read"
|
|
||||||
" WHERE (forum_thread.ForumType='%u' OR forum_thread.ForumType='%u')"
|
|
||||||
" AND forum_thread.Location='%ld' AND forum_thread.ThrCod=forum_thr_read.ThrCod",
|
|
||||||
For_FORUM_DEGREE_USRS,For_FORUM_DEGREE_TCHS,DegCod);
|
|
||||||
DB_QueryDELETE (Query,"can not remove read threads in forums of a degree");
|
|
||||||
|
|
||||||
/* Remove threads */
|
|
||||||
sprintf (Query,"DELETE FROM forum_thread"
|
|
||||||
" WHERE (forum_thread.ForumType='%u' OR forum_thread.ForumType='%u')"
|
|
||||||
" AND Location='%ld'",
|
|
||||||
For_FORUM_DEGREE_USRS,For_FORUM_DEGREE_TCHS,DegCod);
|
|
||||||
DB_QueryDELETE (Query,"can not remove threads in forums of a degree");
|
|
||||||
|
|
||||||
/***** Remove information related to files in degree *****/
|
/***** Remove information related to files in degree *****/
|
||||||
Brw_RemoveDegFilesFromDB (DegCod);
|
Brw_RemoveDegFilesFromDB (DegCod);
|
||||||
|
|
40
swad_forum.c
40
swad_forum.c
|
@ -4413,6 +4413,46 @@ void For_RemoveUsrFromThrClipboard (long UsrCod)
|
||||||
DB_QueryDELETE (Query,"can not remove a thread from the clipboard of a user");
|
DB_QueryDELETE (Query,"can not remove a thread from the clipboard of a user");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
/********** Remove all the threads and posts in forums of a degree ***********/
|
||||||
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
void For_RemoveDegForums (long DegCod)
|
||||||
|
{
|
||||||
|
char Query[512];
|
||||||
|
|
||||||
|
/***** Remove disabled posts *****/
|
||||||
|
sprintf (Query,"DELETE FROM forum_disabled_post"
|
||||||
|
" USING forum_thread,forum_post,forum_disabled_post"
|
||||||
|
" WHERE (forum_thread.ForumType='%u' OR forum_thread.ForumType='%u')"
|
||||||
|
" AND forum_thread.Location='%ld' AND forum_thread.ThrCod=forum_post.ThrCod AND forum_post.PstCod=forum_disabled_post.PstCod",
|
||||||
|
For_FORUM_DEGREE_USRS,For_FORUM_DEGREE_TCHS,DegCod);
|
||||||
|
DB_QueryDELETE (Query,"can not remove the disabled posts in forums of a degree");
|
||||||
|
|
||||||
|
/***** Remove posts *****/
|
||||||
|
sprintf (Query,"DELETE FROM forum_post"
|
||||||
|
" USING forum_thread,forum_post"
|
||||||
|
" WHERE (forum_thread.ForumType='%u' OR forum_thread.ForumType='%u')"
|
||||||
|
" AND forum_thread.Location='%ld' AND forum_thread.ThrCod=forum_post.ThrCod",
|
||||||
|
For_FORUM_DEGREE_USRS,For_FORUM_DEGREE_TCHS,DegCod);
|
||||||
|
DB_QueryDELETE (Query,"can not remove posts in forums of a degree");
|
||||||
|
|
||||||
|
/***** Remove threads read *****/
|
||||||
|
sprintf (Query,"DELETE FROM forum_thr_read"
|
||||||
|
" USING forum_thread,forum_thr_read"
|
||||||
|
" WHERE (forum_thread.ForumType='%u' OR forum_thread.ForumType='%u')"
|
||||||
|
" AND forum_thread.Location='%ld' AND forum_thread.ThrCod=forum_thr_read.ThrCod",
|
||||||
|
For_FORUM_DEGREE_USRS,For_FORUM_DEGREE_TCHS,DegCod);
|
||||||
|
DB_QueryDELETE (Query,"can not remove read threads in forums of a degree");
|
||||||
|
|
||||||
|
/***** Remove threads *****/
|
||||||
|
sprintf (Query,"DELETE FROM forum_thread"
|
||||||
|
" WHERE (forum_thread.ForumType='%u' OR forum_thread.ForumType='%u')"
|
||||||
|
" AND Location='%ld'",
|
||||||
|
For_FORUM_DEGREE_USRS,For_FORUM_DEGREE_TCHS,DegCod);
|
||||||
|
DB_QueryDELETE (Query,"can not remove threads in forums of a degree");
|
||||||
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/********** Remove all the threads and posts in forums of a course ***********/
|
/********** Remove all the threads and posts in forums of a course ***********/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
|
@ -140,6 +140,7 @@ void For_RemoveExpiredThrsClipboards (void);
|
||||||
void For_RemoveThrCodFromThrClipboard (long ThrCod);
|
void For_RemoveThrCodFromThrClipboard (long ThrCod);
|
||||||
void For_RemoveUsrFromThrClipboard (long UsrCod);
|
void For_RemoveUsrFromThrClipboard (long UsrCod);
|
||||||
|
|
||||||
|
void For_RemoveDegForums (long DegCod);
|
||||||
void For_RemoveCrsForums (long CrsCod);
|
void For_RemoveCrsForums (long CrsCod);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue
Block a user