Version 20.36.43: Mar 01, 2021 Query moved to module swad_timeline_database.

This commit is contained in:
acanas 2021-03-01 14:12:18 +01:00
parent 840c414a84
commit a32ed57305
4 changed files with 26 additions and 11 deletions

View File

@ -553,7 +553,7 @@ enscript -2 --landscape --color --file-align=2 --highlight --line-numbers -o - *
En OpenSWAD: En OpenSWAD:
ps2pdf source.ps destination.pdf ps2pdf source.ps destination.pdf
*/ */
#define Log_PLATFORM_VERSION "SWAD 20.36.42 (2021-03-01)" #define Log_PLATFORM_VERSION "SWAD 20.36.43 (2021-03-01)"
#define CSS_FILE "swad20.33.9.css" #define CSS_FILE "swad20.33.9.css"
#define JS_FILE "swad20.6.2.js" #define JS_FILE "swad20.6.2.js"
/* /*
@ -601,6 +601,7 @@ TODO: DNI de un estudiante sale err
TODO: BUG: Cuando un tipo de grupo sólo tiene un grupo, inscribirse es voluntario, el estudiante sólo puede pertenecer a un grupo, y se inscribe en él, debería poder desapuntarse. Ahora no puede. TODO: BUG: Cuando un tipo de grupo sólo tiene un grupo, inscribirse es voluntario, el estudiante sólo puede pertenecer a un grupo, y se inscribe en él, debería poder desapuntarse. Ahora no puede.
TODO: Salvador Romero Cortés: @acanas opción para editar posts TODO: Salvador Romero Cortés: @acanas opción para editar posts
Version 20.36.43: Mar 01, 2021 Query moved to module swad_timeline_database. (305489 lines)
Version 20.36.42: Mar 01, 2021 Query moved to module swad_timeline_database. (305476 lines) Version 20.36.42: Mar 01, 2021 Query moved to module swad_timeline_database. (305476 lines)
Version 20.36.41: Mar 01, 2021 Query moved to module swad_timeline_database. (305466 lines) Version 20.36.41: Mar 01, 2021 Query moved to module swad_timeline_database. (305466 lines)
Version 20.36.40: Mar 01, 2021 Query moved to module swad_timeline_database. (305457 lines) Version 20.36.40: Mar 01, 2021 Query moved to module swad_timeline_database. (305457 lines)

View File

@ -913,6 +913,21 @@ void TL_DB_UpdateFirstLastPubCodsInSession (long FirstPubCod)
Gbl.Session.Id); Gbl.Session.Id);
} }
/*****************************************************************************/
/********** Remove all publications of any user authored by a user ***********/
/*****************************************************************************/
void TL_DB_RemoveAllPubsOfAnyUsrAuthoredBy (long UsrCod)
{
/***** Remove all publications of any user authored by the user *****/
DB_QueryDELETE ("can not remove publications",
"DELETE FROM tl_pubs"
" USING tl_notes,tl_pubs"
" WHERE tl_notes.UsrCod=%ld"
" AND tl_notes.NotCod=tl_pubs.NotCod",
UsrCod);
}
/*****************************************************************************/ /*****************************************************************************/
/********************* Remove all publications of a user *********************/ /********************* Remove all publications of a user *********************/
/*****************************************************************************/ /*****************************************************************************/

View File

@ -114,6 +114,7 @@ long TL_DB_CreateNewPub (const struct TL_Pub_Publication *Pub);
void TL_DB_UpdateFirstPubCodInSession (long FirstPubCod); void TL_DB_UpdateFirstPubCodInSession (long FirstPubCod);
void TL_DB_UpdateLastPubCodInSession (void); void TL_DB_UpdateLastPubCodInSession (void);
void TL_DB_UpdateFirstLastPubCodsInSession (long FirstPubCod); void TL_DB_UpdateFirstLastPubCodsInSession (long FirstPubCod);
void TL_DB_RemoveAllPubsOfAnyUsrAuthoredBy (long UsrCod);
void TL_DB_RemoveAllPubsUsr (long UsrCod); void TL_DB_RemoveAllPubsUsr (long UsrCod);
/****************************** Favourites ***********************************/ /****************************** Favourites ***********************************/

View File

@ -132,21 +132,19 @@ void TL_Usr_RemoveUsrContent (long UsrCod)
" AND tl_pubs.PubCod=tl_comments.PubCod", " AND tl_pubs.PubCod=tl_comments.PubCod",
UsrCod,(unsigned) TL_Pub_COMMENT_TO_NOTE); UsrCod,(unsigned) TL_Pub_COMMENT_TO_NOTE);
/***** Remove all posts of the user *****/ /***** Remove posts *****/
/* Remove all posts of the user */
TL_DB_RemoveAllPostsUsr (UsrCod); TL_DB_RemoveAllPostsUsr (UsrCod);
/***** Remove all publications of any user authored by the user *****/ /***** Remove publications *****/
DB_QueryDELETE ("can not remove publications", /* Remove all publications of any user authored by the user */
"DELETE FROM tl_pubs" TL_DB_RemoveAllPubsOfAnyUsrAuthoredBy (UsrCod);
" USING tl_notes,tl_pubs"
" WHERE tl_notes.UsrCod=%ld"
" AND tl_notes.NotCod=tl_pubs.NotCod",
UsrCod);
/***** Remove all the publications of the user *****/ /* Remove all the publications of the user */
TL_DB_RemoveAllPubsUsr (UsrCod); TL_DB_RemoveAllPubsUsr (UsrCod);
/***** Remove all notes of the user *****/ /***** Remove notes *****/
/* Remove all notes of the user */
TL_DB_RemoveAllNotesUsr (UsrCod); TL_DB_RemoveAllNotesUsr (UsrCod);
} }