Version 20.39.10: Mar 02, 2021 Code refactoring in timeline.

This commit is contained in:
acanas 2021-03-02 17:48:29 +01:00
parent fbd491b652
commit 60be159d57
5 changed files with 12 additions and 16 deletions

View File

@ -598,10 +598,11 @@ 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
*/
#define Log_PLATFORM_VERSION "SWAD 20.39.9 (2021-03-02)"
#define Log_PLATFORM_VERSION "SWAD 20.39.10 (2021-03-02)"
#define CSS_FILE "swad20.33.9.css"
#define JS_FILE "swad20.6.2.js"
/*
Version 20.39.10: Mar 02, 2021 Code refactoring in timeline. (305576 lines)
Version 20.39.9: Mar 02, 2021 Code refactoring in timeline. (305580 lines)
Version 20.39.8: Mar 02, 2021 Code refactoring in timeline. (305573 lines)
Version 20.39.7: Mar 02, 2021 Code refactoring in fav/share timeline comments. (305566 lines)

View File

@ -244,19 +244,17 @@ void TL_ShowNoteAndTimelineGbl (struct TL_Timeline *Timeline)
/***** If a note should be highlighted ==> show it above the timeline *****/
if (Not.NotCod > 0)
/***** Show the note highlighted above the timeline *****/
TL_Not_ShowHighlightedNote (Timeline,&Not);
/***** Show timeline with possible highlighted note *****/
TL_ShowTimelineGblHighlightingNot (Timeline,Not.NotCod);
TL_ShowTimelineGblHighlighting (Timeline,Not.NotCod);
}
/*****************************************************************************/
/******************* Show global timeline highlighting a note ****************/
/*****************************************************************************/
void TL_ShowTimelineGblHighlightingNot (struct TL_Timeline *Timeline,
long NotCod)
void TL_ShowTimelineGblHighlighting (struct TL_Timeline *Timeline,long NotCod)
{
extern const char *Txt_Timeline;
@ -278,15 +276,14 @@ void TL_ShowTimelineGblHighlightingNot (struct TL_Timeline *Timeline,
void TL_ShowTimelineUsr (struct TL_Timeline *Timeline)
{
TL_ShowTimelineUsrHighlightingNot (Timeline,-1L);
TL_ShowTimelineUsrHighlighting (Timeline,-1L);
}
/*****************************************************************************/
/************ Show timeline of a selected user highlighting a note ***********/
/*****************************************************************************/
void TL_ShowTimelineUsrHighlightingNot (struct TL_Timeline *Timeline,
long NotCod)
void TL_ShowTimelineUsrHighlighting (struct TL_Timeline *Timeline,long NotCod)
{
extern const char *Txt_Timeline_OF_A_USER;

View File

@ -113,12 +113,10 @@ void TL_ResetTimeline (struct TL_Timeline *Timeline);
void TL_ShowTimelineGbl (void);
void TL_ShowNoteAndTimelineGbl (struct TL_Timeline *Timeline);
void TL_ShowTimelineGblHighlightingNot (struct TL_Timeline *Timeline,
long NotCod);
void TL_ShowTimelineGblHighlighting (struct TL_Timeline *Timeline,long NotCod);
void TL_ShowTimelineUsr (struct TL_Timeline *Timeline);
void TL_ShowTimelineUsrHighlightingNot (struct TL_Timeline *Timeline,
long NotCod);
void TL_ShowTimelineUsrHighlighting (struct TL_Timeline *Timeline,long NotCod);
void TL_RefreshNewTimelineGbl (void);

View File

@ -703,7 +703,7 @@ void TL_Com_ReceiveCommUsr (void)
/***** Receive comment in a note
and write updated timeline after commenting (user) *****/
NotCod = TL_Com_ReceiveComm ();
TL_ShowTimelineUsrHighlightingNot (&Timeline,NotCod);
TL_ShowTimelineUsrHighlighting (&Timeline,NotCod);
/***** End section *****/
HTM_SECTION_End ();
@ -721,7 +721,7 @@ void TL_Com_ReceiveCommGbl (void)
NotCod = TL_Com_ReceiveComm ();
/***** Write updated timeline after commenting (global) *****/
TL_ShowTimelineGblHighlightingNot (&Timeline,NotCod);
TL_ShowTimelineGblHighlighting (&Timeline,NotCod);
}
static long TL_Com_ReceiveComm (void)

View File

@ -236,7 +236,7 @@ void TL_Pst_ReceivePostUsr (void)
/***** Receive and store post, and
write updated timeline after publication (user) *****/
NotCod = TL_Pst_ReceivePost ();
TL_ShowTimelineUsrHighlightingNot (&Timeline,NotCod);
TL_ShowTimelineUsrHighlighting (&Timeline,NotCod);
/***** End section *****/
HTM_SECTION_End ();
@ -254,7 +254,7 @@ void TL_Pst_ReceivePostGbl (void)
NotCod = TL_Pst_ReceivePost ();
/***** Write updated timeline after publication (global) *****/
TL_ShowTimelineGblHighlightingNot (&Timeline,NotCod);
TL_ShowTimelineGblHighlighting (&Timeline,NotCod);
}
// Returns the code of the note just created