mirror of
https://github.com/acanas/swad-core.git
synced 2024-06-17 22:15:43 +02:00
Version20.26.1
This commit is contained in:
parent
eb566d7928
commit
e5b7b3e425
|
@ -553,7 +553,7 @@ enscript -2 --landscape --color --file-align=2 --highlight --line-numbers -o - *
|
|||
En OpenSWAD:
|
||||
ps2pdf source.ps destination.pdf
|
||||
*/
|
||||
#define Log_PLATFORM_VERSION "SWAD 20.26 (2021-02-11)"
|
||||
#define Log_PLATFORM_VERSION "SWAD 20.26.1 (2021-02-11)"
|
||||
#define CSS_FILE "swad20.8.css"
|
||||
#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: Salvador Romero Cortés: @acanas opción para editar posts
|
||||
|
||||
Version 20.26.1: Feb 11, 2021 Code refactoring in timeline. (305504 lines)
|
||||
Version 20.26: Feb 11, 2021 New module swad_timeline_who. (305540 lines)
|
||||
Version 20.25: Feb 11, 2021 New module swad_timeline_publication. (305440 lines)
|
||||
Version 20.24: Feb 11, 2021 Code refactoring in timeline. New linked list to hold publications. (305354 lines)
|
||||
|
|
|
@ -28,22 +28,14 @@
|
|||
#define _GNU_SOURCE // For asprintf
|
||||
#include <linux/limits.h> // For PATH_MAX
|
||||
#include <stdio.h> // For asprintf
|
||||
#include <stdlib.h> // For malloc and free
|
||||
#include <string.h> // For string functions
|
||||
#include <sys/types.h> // For time_t
|
||||
|
||||
#include "swad_database.h"
|
||||
#include "swad_exam_announcement.h"
|
||||
#include "swad_figure.h"
|
||||
#include "swad_follow.h"
|
||||
#include "swad_form.h"
|
||||
#include "swad_forum.h"
|
||||
#include "swad_global.h"
|
||||
#include "swad_message.h"
|
||||
#include "swad_notice.h"
|
||||
#include "swad_notification.h"
|
||||
#include "swad_photo.h"
|
||||
#include "swad_profile.h"
|
||||
#include "swad_setting.h"
|
||||
#include "swad_timeline.h"
|
||||
#include "swad_timeline_favourite.h"
|
||||
#include "swad_timeline_note.h"
|
||||
|
@ -857,33 +849,6 @@ static long TL_ReceivePost (void)
|
|||
return Pub.NotCod;
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/*************** Get code of publication of the original note ****************/
|
||||
/*****************************************************************************/
|
||||
|
||||
long TL_Not_GetPubCodOfOriginalNote (long NotCod)
|
||||
{
|
||||
MYSQL_RES *mysql_res;
|
||||
MYSQL_ROW row;
|
||||
long OriginalPubCod = -1L;
|
||||
|
||||
/***** Get code of publication of the original note *****/
|
||||
if (DB_QuerySELECT (&mysql_res,"can not get code of publication",
|
||||
"SELECT PubCod FROM tl_pubs"
|
||||
" WHERE NotCod=%ld AND PubType=%u",
|
||||
NotCod,(unsigned) TL_PUB_ORIGINAL_NOTE) == 1) // Result should have a unique row
|
||||
{
|
||||
/* Get code of publication (row[0]) */
|
||||
row = mysql_fetch_row (mysql_res);
|
||||
OriginalPubCod = Str_ConvertStrCodToLongCod (row[0]);
|
||||
}
|
||||
|
||||
/***** Free structure that stores the query result *****/
|
||||
DB_FreeMySQLResult (&mysql_res);
|
||||
|
||||
return OriginalPubCod;
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/************* Remove all the content of a user from database ****************/
|
||||
/*****************************************************************************/
|
||||
|
|
|
@ -1239,6 +1239,33 @@ static void TL_Not_ResetNote (struct TL_Not_Note *Not)
|
|||
Not->NumShared = 0;
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/*************** Get code of publication of the original note ****************/
|
||||
/*****************************************************************************/
|
||||
|
||||
long TL_Not_GetPubCodOfOriginalNote (long NotCod)
|
||||
{
|
||||
MYSQL_RES *mysql_res;
|
||||
MYSQL_ROW row;
|
||||
long OriginalPubCod = -1L;
|
||||
|
||||
/***** Get code of publication of the original note *****/
|
||||
if (DB_QuerySELECT (&mysql_res,"can not get code of publication",
|
||||
"SELECT PubCod FROM tl_pubs"
|
||||
" WHERE NotCod=%ld AND PubType=%u",
|
||||
NotCod,(unsigned) TL_PUB_ORIGINAL_NOTE) == 1) // Result should have a unique row
|
||||
{
|
||||
/* Get code of publication (row[0]) */
|
||||
row = mysql_fetch_row (mysql_res);
|
||||
OriginalPubCod = Str_ConvertStrCodToLongCod (row[0]);
|
||||
}
|
||||
|
||||
/***** Free structure that stores the query result *****/
|
||||
DB_FreeMySQLResult (&mysql_res);
|
||||
|
||||
return OriginalPubCod;
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/****** Add just retrieved notes to current timeline for this session ********/
|
||||
/*****************************************************************************/
|
||||
|
|
|
@ -115,10 +115,10 @@ void TL_Not_RequestRemNoteGbl (void);
|
|||
void TL_Not_RemoveNoteUsr (void);
|
||||
void TL_Not_RemoveNoteGbl (void);
|
||||
|
||||
void TL_Not_AddNotesJustRetrievedToTimelineThisSession (void);
|
||||
|
||||
long TL_Not_GetPubCodOfOriginalNote (long NotCod);
|
||||
|
||||
void TL_Not_AddNotesJustRetrievedToTimelineThisSession (void);
|
||||
|
||||
void TL_Not_GetDataOfNoteByCod (struct TL_Not_Note *Not);
|
||||
|
||||
void TL_Not_ClearOldTimelinesNotesFromDB (void);
|
||||
|
|
|
@ -25,25 +25,12 @@
|
|||
/*********************************** Headers *********************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
#define _GNU_SOURCE // For asprintf
|
||||
#include <linux/limits.h> // For PATH_MAX
|
||||
#include <stdio.h> // For asprintf
|
||||
#include <stdlib.h> // For malloc and free
|
||||
#include <string.h> // For string functions
|
||||
#include <sys/types.h> // For time_t
|
||||
|
||||
#include "swad_database.h"
|
||||
#include "swad_exam_announcement.h"
|
||||
#include "swad_figure.h"
|
||||
#include "swad_follow.h"
|
||||
#include "swad_form.h"
|
||||
#include "swad_forum.h"
|
||||
#include "swad_global.h"
|
||||
#include "swad_message.h"
|
||||
#include "swad_notice.h"
|
||||
#include "swad_photo.h"
|
||||
#include "swad_profile.h"
|
||||
#include "swad_setting.h"
|
||||
#include "swad_timeline.h"
|
||||
#include "swad_timeline_favourite.h"
|
||||
#include "swad_timeline_note.h"
|
||||
|
|
|
@ -25,30 +25,13 @@
|
|||
/*********************************** Headers *********************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
#define _GNU_SOURCE // For asprintf
|
||||
#include <linux/limits.h> // For PATH_MAX
|
||||
#include <stdio.h> // For asprintf
|
||||
#include <stdlib.h> // For malloc and free
|
||||
#include <string.h> // For string functions
|
||||
#include <sys/types.h> // For time_t
|
||||
|
||||
#include "swad_database.h"
|
||||
#include "swad_exam_announcement.h"
|
||||
#include "swad_figure.h"
|
||||
#include "swad_follow.h"
|
||||
#include "swad_form.h"
|
||||
#include "swad_forum.h"
|
||||
#include "swad_global.h"
|
||||
#include "swad_message.h"
|
||||
#include "swad_notice.h"
|
||||
#include "swad_photo.h"
|
||||
#include "swad_profile.h"
|
||||
#include "swad_parameter.h"
|
||||
#include "swad_setting.h"
|
||||
#include "swad_timeline.h"
|
||||
#include "swad_timeline_favourite.h"
|
||||
#include "swad_timeline_note.h"
|
||||
#include "swad_timeline_publication.h"
|
||||
#include "swad_timeline_share.h"
|
||||
#include "swad_timeline_who.h"
|
||||
|
||||
/*****************************************************************************/
|
||||
/****************************** Public constants *****************************/
|
||||
|
|
Loading…
Reference in New Issue
Block a user