mirror of https://github.com/acanas/swad-core.git
Version 16.45.3
This commit is contained in:
parent
db4c7737b0
commit
79de994a4b
|
@ -154,13 +154,14 @@
|
||||||
/****************************** Public constants *****************************/
|
/****************************** Public constants *****************************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
#define Log_PLATFORM_VERSION "SWAD 16.45.2 (2016-10-27)"
|
#define Log_PLATFORM_VERSION "SWAD 16.45.3 (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.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)
|
||||||
Version 16.45: Oct 27, 2016 Changes in database table for surveys. Not finished. (205927 lines)
|
Version 16.45: Oct 27, 2016 Changes in database table for surveys. Not finished. (205927 lines)
|
||||||
|
|
|
@ -2244,39 +2244,8 @@ 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 course forums *****/
|
/***** Remove all the threads and posts in forums of a course *****/
|
||||||
/* Remove disabled posts */
|
For_RemoveCrsForums (CrsCod);
|
||||||
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_COURSE_USRS,For_FORUM_COURSE_TCHS,CrsCod);
|
|
||||||
DB_QueryDELETE (Query,"can not remove disabled posts in forums of a course");
|
|
||||||
|
|
||||||
/* 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_COURSE_USRS,For_FORUM_COURSE_TCHS,CrsCod);
|
|
||||||
DB_QueryDELETE (Query,"can not remove posts in forums of a course");
|
|
||||||
|
|
||||||
/* 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_COURSE_USRS,For_FORUM_COURSE_TCHS,CrsCod);
|
|
||||||
DB_QueryDELETE (Query,"can not remove read threads in forums of a course");
|
|
||||||
|
|
||||||
/* Remove threads */
|
|
||||||
sprintf (Query,"DELETE FROM forum_thread"
|
|
||||||
" WHERE (forum_thread.ForumType='%u' OR forum_thread.ForumType='%u')"
|
|
||||||
" AND Location='%ld'",
|
|
||||||
For_FORUM_COURSE_USRS,For_FORUM_COURSE_TCHS,CrsCod);
|
|
||||||
DB_QueryDELETE (Query,"can not remove threads in forums of a course");
|
|
||||||
|
|
||||||
/***** Remove all test exams made in the course *****/
|
/***** Remove all test exams made in the course *****/
|
||||||
Tst_RemoveCrsExams (CrsCod);
|
Tst_RemoveCrsExams (CrsCod);
|
||||||
|
|
42
swad_forum.c
42
swad_forum.c
|
@ -4412,3 +4412,45 @@ void For_RemoveUsrFromThrClipboard (long UsrCod)
|
||||||
sprintf (Query,"DELETE FROM forum_thr_clip WHERE UsrCod='%ld'",UsrCod);
|
sprintf (Query,"DELETE FROM forum_thr_clip WHERE UsrCod='%ld'",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 course ***********/
|
||||||
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
void For_RemoveCrsForums (long CrsCod)
|
||||||
|
{
|
||||||
|
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_COURSE_USRS,For_FORUM_COURSE_TCHS,CrsCod);
|
||||||
|
DB_QueryDELETE (Query,"can not remove disabled posts in forums of a course");
|
||||||
|
|
||||||
|
/***** 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_COURSE_USRS,For_FORUM_COURSE_TCHS,CrsCod);
|
||||||
|
DB_QueryDELETE (Query,"can not remove posts in forums of a course");
|
||||||
|
|
||||||
|
/***** 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_COURSE_USRS,For_FORUM_COURSE_TCHS,CrsCod);
|
||||||
|
DB_QueryDELETE (Query,"can not remove read threads in forums of a course");
|
||||||
|
|
||||||
|
/***** Remove threads *****/
|
||||||
|
sprintf (Query,"DELETE FROM forum_thread"
|
||||||
|
" WHERE (forum_thread.ForumType='%u' OR forum_thread.ForumType='%u')"
|
||||||
|
" AND Location='%ld'",
|
||||||
|
For_FORUM_COURSE_USRS,For_FORUM_COURSE_TCHS,CrsCod);
|
||||||
|
DB_QueryDELETE (Query,"can not remove threads in forums of a course");
|
||||||
|
}
|
||||||
|
|
|
@ -140,4 +140,6 @@ 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_RemoveCrsForums (long CrsCod);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -98,7 +98,7 @@ void Svy_RecFormSurvey (void);
|
||||||
bool Svy_CheckIfSvyIsAssociatedToGrp (long SvyCod,long GrpCod);
|
bool Svy_CheckIfSvyIsAssociatedToGrp (long SvyCod,long GrpCod);
|
||||||
void Svy_RemoveGroup (long GrpCod);
|
void Svy_RemoveGroup (long GrpCod);
|
||||||
void Svy_RemoveGroupsOfType (long GrpTypCod);
|
void Svy_RemoveGroupsOfType (long GrpTypCod);
|
||||||
void Svy_RemoveSurveys (long CrsCod);
|
void Svy_RemoveSurveys (Sco_Scope_t Scope,long Cod);
|
||||||
|
|
||||||
void Svy_RequestEditQuestion (void);
|
void Svy_RequestEditQuestion (void);
|
||||||
void Svy_ReceiveQst (void);
|
void Svy_ReceiveQst (void);
|
||||||
|
|
Loading…
Reference in New Issue