Version 20.68.7: Apr 29, 2021 Code refactoring in timeline.

This commit is contained in:
acanas 2021-04-29 23:35:21 +02:00
parent 7dfcd428eb
commit 573bcd95b3
6 changed files with 101 additions and 89 deletions

View File

@ -600,13 +600,14 @@ TODO: Salvador Romero Cort
TODO: FIX BUG, URGENT! En las fechas como parámetro Dat_WriteParamsIniEndDates(), por ejemplo al cambiar el color de la gráfica de accesos por día y hora, no se respeta la zona horaria. TODO: FIX BUG, URGENT! En las fechas como parámetro Dat_WriteParamsIniEndDates(), por ejemplo al cambiar el color de la gráfica de accesos por día y hora, no se respeta la zona horaria.
*/ */
#define Log_PLATFORM_VERSION "SWAD 20.68.6 (2021-04-29)" #define Log_PLATFORM_VERSION "SWAD 20.68.7 (2021-04-29)"
#define CSS_FILE "swad20.45.css" #define CSS_FILE "swad20.45.css"
#define JS_FILE "swad20.6.2.js" #define JS_FILE "swad20.6.2.js"
/* /*
TODO: Rename CENTRE to CENTER in help wiki. TODO: Rename CENTRE to CENTER in help wiki.
TODO: Rename ASSESSMENT.Announcements to ASSESSMENT.Calls_for_exams TODO: Rename ASSESSMENT.Announcements to ASSESSMENT.Calls_for_exams
Version 20.68.7: Apr 29, 2021 Code refactoring in timeline. (309749 lines)
Version 20.68.6: Apr 29, 2021 Code refactoring in timeline. (309738 lines) Version 20.68.6: Apr 29, 2021 Code refactoring in timeline. (309738 lines)
Version 20.68.5: Apr 29, 2021 Fixed bug in matches. Reported by Jesús Garrido Alcázar. (309746 lines) Version 20.68.5: Apr 29, 2021 Fixed bug in matches. Reported by Jesús Garrido Alcázar. (309746 lines)
Version 20.68.4: Apr 27, 2021 Fixed bug in question tags. Reported by Julio Ortega Lopera. (309802 lines) Version 20.68.4: Apr 27, 2021 Fixed bug in question tags. Reported by Julio Ortega Lopera. (309802 lines)

View File

@ -661,7 +661,6 @@ static void Tml_Com_WriteButtons (const struct Tml_Timeline *Timeline,
Tml_Usr_PutIconFavSha (Tml_Usr_FAV_UNF_COMM, Tml_Usr_PutIconFavSha (Tml_Usr_FAV_UNF_COMM,
Com->PubCod,Com->UsrCod,Com->NumFavs, Com->PubCod,Com->UsrCod,Com->NumFavs,
Tml_Usr_SHOW_FEW_USRS); Tml_Usr_SHOW_FEW_USRS);
HTM_DIV_End (); HTM_DIV_End ();
/***** Foot column 2: icon to remove this comment *****/ /***** Foot column 2: icon to remove this comment *****/
@ -957,6 +956,7 @@ void Tml_Com_RemoveComGbl (void)
static void Tml_Com_RemoveComm (void) static void Tml_Com_RemoveComm (void)
{ {
extern const char *Txt_The_post_no_longer_exists; extern const char *Txt_The_post_no_longer_exists;
extern const char *Txt_You_dont_have_permission_to_perform_this_action;
extern const char *Txt_Comment_removed; extern const char *Txt_Comment_removed;
struct Tml_Com_Comment Com; struct Tml_Com_Comment Com;
@ -979,7 +979,7 @@ static void Tml_Com_RemoveComm (void)
if (!Usr_ItsMe (Com.UsrCod)) if (!Usr_ItsMe (Com.UsrCod))
{ {
Med_MediaDestructor (&Com.Content.Media); Med_MediaDestructor (&Com.Content.Media);
Ale_ShowAlert (Ale_ERROR,"You are not the author."); Ale_ShowAlert (Ale_ERROR,Txt_You_dont_have_permission_to_perform_this_action);
return; return;
} }

View File

@ -182,7 +182,8 @@ void Tml_Frm_PutFormToFavUnfShaUns (Tml_Usr_FavSha_t FavSha,long Cod)
/***************** Begin a form in global or user timeline *******************/ /***************** Begin a form in global or user timeline *******************/
/*****************************************************************************/ /*****************************************************************************/
void Tml_Frm_BeginForm (const struct Tml_Timeline *Timeline,Tml_Frm_Action_t Action) void Tml_Frm_BeginForm (const struct Tml_Timeline *Timeline,
Tml_Frm_Action_t Action)
{ {
if (Gbl.Usrs.Other.UsrDat.UsrCod > 0) if (Gbl.Usrs.Other.UsrDat.UsrCod > 0)
{ {
@ -376,7 +377,8 @@ void Tml_Frm_BeginAlertRemove (const char *QuestionTxt)
Ale_ShowAlertAndButton1 (Ale_QUESTION,QuestionTxt); Ale_ShowAlertAndButton1 (Ale_QUESTION,QuestionTxt);
} }
void Tml_Frm_EndAlertRemove (struct Tml_Timeline *Timeline,Tml_Frm_Action_t Action, void Tml_Frm_EndAlertRemove (struct Tml_Timeline *Timeline,
Tml_Frm_Action_t Action,
void (*FuncParams) (void *Args)) void (*FuncParams) (void *Args))
{ {
extern const char *Txt_Remove; extern const char *Txt_Remove;

View File

@ -79,7 +79,8 @@ struct TL_Form
void Tml_Frm_PutFormToFavUnfShaUns (Tml_Usr_FavSha_t FavSha,long Cod); void Tml_Frm_PutFormToFavUnfShaUns (Tml_Usr_FavSha_t FavSha,long Cod);
void Tml_Frm_BeginForm (const struct Tml_Timeline *Timeline,Tml_Frm_Action_t Action); void Tml_Frm_BeginForm (const struct Tml_Timeline *Timeline,
Tml_Frm_Action_t Action);
void Tml_Frm_EndForm (void); void Tml_Frm_EndForm (void);
void Tml_Frm_PutFormToSeeAllFaversSharers (Tml_Frm_Action_t Action, void Tml_Frm_PutFormToSeeAllFaversSharers (Tml_Frm_Action_t Action,
@ -92,7 +93,8 @@ void Tml_Frm_FormToShowHiddenComms (long NotCod,
unsigned NumInitialComms); unsigned NumInitialComms);
void Tml_Frm_BeginAlertRemove (const char *QuestionTxt); void Tml_Frm_BeginAlertRemove (const char *QuestionTxt);
void Tml_Frm_EndAlertRemove (struct Tml_Timeline *Timeline,Tml_Frm_Action_t Action, void Tml_Frm_EndAlertRemove (struct Tml_Timeline *Timeline,
Tml_Frm_Action_t Action,
void (*FuncParams) (void *Args)); void (*FuncParams) (void *Args));
#endif #endif

View File

@ -485,53 +485,60 @@ static void Tml_Not_WriteLocationInHierarchy (const struct Tml_Not_Note *Not,
const struct Hie_Hierarchy *Hie, const struct Hie_Hierarchy *Hie,
const char ForumName[For_MAX_BYTES_FORUM_NAME + 1]) const char ForumName[For_MAX_BYTES_FORUM_NAME + 1])
{ {
extern const char *Txt_Forum;
extern const char *Txt_Course;
extern const char *Txt_Degree;
extern const char *Txt_Center;
extern const char *Txt_Institution; extern const char *Txt_Institution;
extern const char *Txt_Center;
extern const char *Txt_Degree;
extern const char *Txt_Course;
extern const char *Txt_Forum;
/***** Begin container *****/
HTM_DIV_Begin ("class=\"TL_LOC\"");
/***** Write location *****/
switch (Not->NoteType) switch (Not->NoteType)
{ {
case TL_NOTE_INS_DOC_PUB_FILE: case TL_NOTE_INS_DOC_PUB_FILE:
case TL_NOTE_INS_SHA_PUB_FILE: case TL_NOTE_INS_SHA_PUB_FILE:
/* Write location (institution) in hierarchy */ /* Write location (institution) in hierarchy */
HTM_DIV_Begin ("class=\"TL_LOC\""); HTM_TxtF ("%s: %s",
HTM_TxtF ("%s: %s",Txt_Institution,Hie->Ins.ShrtName); Txt_Institution,
HTM_DIV_End (); Hie->Ins.ShrtName);
break; break;
case TL_NOTE_CTR_DOC_PUB_FILE: case TL_NOTE_CTR_DOC_PUB_FILE:
case TL_NOTE_CTR_SHA_PUB_FILE: case TL_NOTE_CTR_SHA_PUB_FILE:
/* Write location (center) in hierarchy */ /* Write location (center) in hierarchy */
HTM_DIV_Begin ("class=\"TL_LOC\""); HTM_TxtF ("%s: %s",
HTM_TxtF ("%s: %s",Txt_Center,Hie->Ctr.ShrtName); Txt_Center,
HTM_DIV_End (); Hie->Ctr.ShrtName);
break; break;
case TL_NOTE_DEG_DOC_PUB_FILE: case TL_NOTE_DEG_DOC_PUB_FILE:
case TL_NOTE_DEG_SHA_PUB_FILE: case TL_NOTE_DEG_SHA_PUB_FILE:
/* Write location (degree) in hierarchy */ /* Write location (degree) in hierarchy */
HTM_DIV_Begin ("class=\"TL_LOC\""); HTM_TxtF ("%s: %s",
HTM_TxtF ("%s: %s",Txt_Degree,Hie->Deg.ShrtName); Txt_Degree,
HTM_DIV_End (); Hie->Deg.ShrtName);
break; break;
case TL_NOTE_CRS_DOC_PUB_FILE: case TL_NOTE_CRS_DOC_PUB_FILE:
case TL_NOTE_CRS_SHA_PUB_FILE: case TL_NOTE_CRS_SHA_PUB_FILE:
case TL_NOTE_CALL_FOR_EXAM: case TL_NOTE_CALL_FOR_EXAM:
case TL_NOTE_NOTICE: case TL_NOTE_NOTICE:
/* Write location (course) in hierarchy */ /* Write location (course) in hierarchy */
HTM_DIV_Begin ("class=\"TL_LOC\""); HTM_TxtF ("%s: %s",
HTM_TxtF ("%s: %s",Txt_Course,Hie->Crs.ShrtName); Txt_Course,
HTM_DIV_End (); Hie->Crs.ShrtName);
break; break;
case TL_NOTE_FORUM_POST: case TL_NOTE_FORUM_POST:
/* Write forum name */ /* Write forum name */
HTM_DIV_Begin ("class=\"TL_LOC\""); HTM_TxtF ("%s: %s",
HTM_TxtF ("%s: %s",Txt_Forum,ForumName); Txt_Forum,
HTM_DIV_End (); ForumName);
break; break;
default: default:
break; break;
} }
/***** End container *****/
HTM_DIV_End ();
} }
/*****************************************************************************/ /*****************************************************************************/