Version 21.97.1: May 30, 2022 Fixing design of dark theme.

This commit is contained in:
acanas 2022-05-30 19:03:56 +02:00
parent 5ea4e44b4e
commit 9a559522ce
17 changed files with 172 additions and 162 deletions

View File

@ -2788,21 +2788,25 @@ table.CELLS_PAD_10 > tbody > tr > td {padding:10px;}
{ {
border-top-style:solid; border-top-style:solid;
border-width:1px; border-width:1px;
border-color:#808080;
} }
.LINE_BOTTOM .LINE_BOTTOM
{ {
border-bottom-style:solid; border-bottom-style:solid;
border-width:1px; border-width:1px;
border-color:#808080;
} }
.LINE_LEFT .LINE_LEFT
{ {
border-left-style:solid; border-left-style:solid;
border-width:1px; border-width:1px;
border-color:#808080;
} }
.LINE_RIGHT .LINE_RIGHT
{ {
border-right-style:solid; border-right-style:solid;
border-width:1px; border-width:1px;
border-color:#808080;
} }
.DAT_SMALL_LIGHT_WHITE, .DAT_SMALL_LIGHT_WHITE,
@ -4167,7 +4171,7 @@ table.CELLS_PAD_10 > tbody > tr > td {padding:10px;}
.Tml_COM_WIDTH {width:220px;} /* 460-240 */ .Tml_COM_WIDTH {width:220px;} /* 460-240 */
.Tml_COM_AUTHOR_WIDTH {width: 60px;} /* 300-240 */ .Tml_COM_AUTHOR_WIDTH {width: 60px;} /* 300-240 */
.Tml_MED_INPUT_WIDTH {width:160px;} /* 400-240 */ .Tml_MED_INPUT_WIDTH {width:160px;} /* 400-240 */
.Tml_NOTE_FOOT_WIDTH {width:260px;} /* 500-240 */ .TmlNot_FOOT_WIDTH {width:260px;} /* 500-240 */
.Tml_COMM_FOOT_WIDTH {width:220px;} /* 460-240 */ .Tml_COMM_FOOT_WIDTH {width:220px;} /* 460-240 */
.Tml_FAV_NOT_WIDTH {width:120px;} /* (480-240)/2 */ .Tml_FAV_NOT_WIDTH {width:120px;} /* (480-240)/2 */
.Tml_SHA_NOT_WIDTH {width:120px;} /* (480-240)/2 */ .Tml_SHA_NOT_WIDTH {width:120px;} /* (480-240)/2 */

View File

@ -8741,28 +8741,28 @@ void Brw_ChgFileMetadata (void)
switch (Gbl.FileBrowser.Type) switch (Gbl.FileBrowser.Type)
{ {
case Brw_ADMI_DOC_INS: case Brw_ADMI_DOC_INS:
TmlNot_StoreAndPublishNote (Tml_NOTE_INS_DOC_PUB_FILE,FileMetadata.FilCod); TmlNot_StoreAndPublishNote (TmlNot_INS_DOC_PUB_FILE,FileMetadata.FilCod);
break; break;
case Brw_ADMI_SHR_INS: case Brw_ADMI_SHR_INS:
TmlNot_StoreAndPublishNote (Tml_NOTE_INS_SHA_PUB_FILE,FileMetadata.FilCod); TmlNot_StoreAndPublishNote (TmlNot_INS_SHA_PUB_FILE,FileMetadata.FilCod);
break; break;
case Brw_ADMI_DOC_CTR: case Brw_ADMI_DOC_CTR:
TmlNot_StoreAndPublishNote (Tml_NOTE_CTR_DOC_PUB_FILE,FileMetadata.FilCod); TmlNot_StoreAndPublishNote (TmlNot_CTR_DOC_PUB_FILE,FileMetadata.FilCod);
break; break;
case Brw_ADMI_SHR_CTR: case Brw_ADMI_SHR_CTR:
TmlNot_StoreAndPublishNote (Tml_NOTE_CTR_SHA_PUB_FILE,FileMetadata.FilCod); TmlNot_StoreAndPublishNote (TmlNot_CTR_SHA_PUB_FILE,FileMetadata.FilCod);
break; break;
case Brw_ADMI_DOC_DEG: case Brw_ADMI_DOC_DEG:
TmlNot_StoreAndPublishNote (Tml_NOTE_DEG_DOC_PUB_FILE,FileMetadata.FilCod); TmlNot_StoreAndPublishNote (TmlNot_DEG_DOC_PUB_FILE,FileMetadata.FilCod);
break; break;
case Brw_ADMI_SHR_DEG: case Brw_ADMI_SHR_DEG:
TmlNot_StoreAndPublishNote (Tml_NOTE_DEG_SHA_PUB_FILE,FileMetadata.FilCod); TmlNot_StoreAndPublishNote (TmlNot_DEG_SHA_PUB_FILE,FileMetadata.FilCod);
break; break;
case Brw_ADMI_DOC_CRS: case Brw_ADMI_DOC_CRS:
TmlNot_StoreAndPublishNote (Tml_NOTE_CRS_DOC_PUB_FILE,FileMetadata.FilCod); TmlNot_StoreAndPublishNote (TmlNot_CRS_DOC_PUB_FILE,FileMetadata.FilCod);
break; break;
case Brw_ADMI_SHR_CRS: case Brw_ADMI_SHR_CRS:
TmlNot_StoreAndPublishNote (Tml_NOTE_CRS_SHA_PUB_FILE,FileMetadata.FilCod); TmlNot_StoreAndPublishNote (TmlNot_CRS_SHA_PUB_FILE,FileMetadata.FilCod);
break; break;
default: default:
break; break;

View File

@ -358,7 +358,7 @@ void Cfe_ReceiveCallForExam2 (void)
Cfe_DB_UpdateNumUsrsNotifiedByEMailAboutCallForExam (CallsForExams->HighlightExaCod,NumUsrsToBeNotifiedByEMail); Cfe_DB_UpdateNumUsrsNotifiedByEMailAboutCallForExam (CallsForExams->HighlightExaCod,NumUsrsToBeNotifiedByEMail);
/***** Create a new social note about the new call for exam *****/ /***** Create a new social note about the new call for exam *****/
TmlNot_StoreAndPublishNote (Tml_NOTE_CALL_FOR_EXAM,CallsForExams->HighlightExaCod); TmlNot_StoreAndPublishNote (TmlNot_CALL_FOR_EXAM,CallsForExams->HighlightExaCod);
/***** Update RSS of current course *****/ /***** Update RSS of current course *****/
RSS_UpdateRSSFileForACrs (&Gbl.Hierarchy.Crs); RSS_UpdateRSSFileForACrs (&Gbl.Hierarchy.Crs);
@ -457,7 +457,7 @@ void Cfe_RemoveCallForExam1 (void)
Ntf_DB_MarkNotifAsRemoved (Ntf_EVENT_CALL_FOR_EXAM,ExaCod); Ntf_DB_MarkNotifAsRemoved (Ntf_EVENT_CALL_FOR_EXAM,ExaCod);
/***** Mark possible social note as unavailable *****/ /***** Mark possible social note as unavailable *****/
Tml_DB_MarkNoteAsUnavailable (Tml_NOTE_CALL_FOR_EXAM,ExaCod); Tml_DB_MarkNoteAsUnavailable (TmlNot_CALL_FOR_EXAM,ExaCod);
/***** Update RSS of current course *****/ /***** Update RSS of current course *****/
RSS_UpdateRSSFileForACrs (&Gbl.Hierarchy.Crs); RSS_UpdateRSSFileForACrs (&Gbl.Hierarchy.Crs);

View File

@ -606,10 +606,13 @@ TODO: Fix bug: error al enviar un mensaje a dos recipientes, error on duplicate
TODO: Attach pdf files in multimedia. TODO: Attach pdf files in multimedia.
*/ */
#define Log_PLATFORM_VERSION "SWAD 21.96.6 (2022-05-18)" #define Log_PLATFORM_VERSION "SWAD 21.97.1 (2022-05-30)"
#define CSS_FILE "swad21.95.5.css" #define CSS_FILE "swad21.97.1.css"
#define JS_FILE "swad21.92.js" #define JS_FILE "swad21.92.js"
/* /*
Version 21.97.1: May 30, 2022 Fixing design of dark theme. (323166 lines)
Version 21.97: May 25, 2022 Code refactoring in timeline. (? lines)
Version 21.96.7: May 19, 2022 Fixed bug in places. (323157 lines)
Version 21.96.6: May 18, 2022 Some messages translated. (323156 lines) Version 21.96.6: May 18, 2022 Some messages translated. (323156 lines)
Version 21.96.5: May 17, 2022 Some messages translated. (323160 lines) Version 21.96.5: May 17, 2022 Some messages translated. (323160 lines)
Version 21.96.4: May 16, 2022 Some messages translated. (323159 lines) Version 21.96.4: May 16, 2022 Some messages translated. (323159 lines)

View File

@ -2887,7 +2887,7 @@ void For_ReceiveForumPost (void)
{ {
case For_FORUM_GLOBAL_USRS: case For_FORUM_GLOBAL_USRS:
case For_FORUM__SWAD__USRS: case For_FORUM__SWAD__USRS:
TmlNot_StoreAndPublishNote (Tml_NOTE_FORUM_POST,PstCod); TmlNot_StoreAndPublishNote (TmlNot_FORUM_POST,PstCod);
break; break;
default: default:
break; break;
@ -2960,7 +2960,7 @@ void For_RemovePost (void)
{ {
case For_FORUM_GLOBAL_USRS: case For_FORUM_GLOBAL_USRS:
case For_FORUM__SWAD__USRS: case For_FORUM__SWAD__USRS:
Tml_DB_MarkNoteAsUnavailable (Tml_NOTE_FORUM_POST,Forums.PstCod); Tml_DB_MarkNoteAsUnavailable (TmlNot_FORUM_POST,Forums.PstCod);
break; break;
default: default:
break; break;

View File

@ -1270,7 +1270,7 @@ static void Hie_ShowHierarchyRow (const char *Text1,const char *Text2,
static void Hie_ShowHierarchyCell (const char *ClassTxt,int Num) static void Hie_ShowHierarchyCell (const char *ClassTxt,int Num)
{ {
/***** Write number *****/ /***** Write number *****/
HTM_TD_Begin ("class=\"%s RM\"",ClassTxt); HTM_TD_Begin ("class=\"RM %s_%s\"",ClassTxt,The_GetSuffix ());
if (Num >= 0) if (Num >= 0)
HTM_Unsigned ((unsigned) Num); HTM_Unsigned ((unsigned) Num);
else // < 0 ==> do not show number else // < 0 ==> do not show number

View File

@ -154,7 +154,10 @@ void Lay_WriteStartOfPage (void)
/***** Write start of HTML code *****/ /***** Write start of HTML code *****/
// WARNING: It is necessary to comment the line 'AddDefaultCharset UTF8' // WARNING: It is necessary to comment the line 'AddDefaultCharset UTF8'
// in httpd.conf to enable meta tag // in httpd.conf to enable meta tag
HTM_TxtF ("<html lang=\"%s\">\n",Lan_STR_LANG_ID[Gbl.Prefs.Language]); HTM_TxtF ("<html lang=\"%s\" style=\"color-scheme:%s\">\n",
Lan_STR_LANG_ID[Gbl.Prefs.Language],
Gbl.Prefs.Theme == The_THEME_DARK ? "dark" :
"light");
HTM_Txt ("<head>\n" HTM_Txt ("<head>\n"
"<meta http-equiv=\"Content-Type\" content=\"text/html;charset=windows-1252\" />\n" "<meta http-equiv=\"Content-Type\" content=\"text/html;charset=windows-1252\" />\n"
"<meta name=\"description\" content=\"A free-software, educational, online tool for managing courses and students.\" />\n" "<meta name=\"description\" content=\"A free-software, educational, online tool for managing courses and students.\" />\n"
@ -1561,8 +1564,8 @@ void Lay_AdvertisementMobile (void)
HTM_Txt (Txt_Stay_connected_with_SWADroid); HTM_Txt (Txt_Stay_connected_with_SWADroid);
HTM_BR (); HTM_BR ();
HTM_BR (); HTM_BR ();
HTM_IMG (Cfg_URL_ICON_PUBLIC,"SWADroid200x300.png",Txt_Stay_connected_with_SWADroid, HTM_IMG (Cfg_URL_ICON_PUBLIC,Cfg_SWADROID_ICO,Txt_Stay_connected_with_SWADroid,
"style=\"width:250px; height:375px;\""); "class=\"SWADROID\"");
HTM_A_End (); HTM_A_End ();
HTM_TD_End (); HTM_TD_End ();
HTM_TR_End (); HTM_TR_End ();

View File

@ -163,7 +163,7 @@ void Not_ReceiveNotice (void)
Not_DB_UpdateNumUsrsNotifiedByEMailAboutNotice (NotCod,NumUsrsToBeNotifiedByEMail); Not_DB_UpdateNumUsrsNotifiedByEMailAboutNotice (NotCod,NumUsrsToBeNotifiedByEMail);
/***** Create a new social note about the new notice *****/ /***** Create a new social note about the new notice *****/
TmlNot_StoreAndPublishNote (Tml_NOTE_NOTICE,NotCod); TmlNot_StoreAndPublishNote (TmlNot_NOTICE,NotCod);
/***** Set notice to be highlighted *****/ /***** Set notice to be highlighted *****/
Gbl.Crs.Notices.HighlightNotCod = NotCod; Gbl.Crs.Notices.HighlightNotCod = NotCod;
@ -299,7 +299,7 @@ void Not_RemoveNotice (void)
Ntf_DB_MarkNotifAsRemoved (Ntf_EVENT_NOTICE,NotCod); Ntf_DB_MarkNotifAsRemoved (Ntf_EVENT_NOTICE,NotCod);
/***** Mark possible social note as unavailable *****/ /***** Mark possible social note as unavailable *****/
Tml_DB_MarkNoteAsUnavailable (Tml_NOTE_NOTICE,NotCod); Tml_DB_MarkNoteAsUnavailable (TmlNot_NOTICE,NotCod);
/***** Update RSS of current course *****/ /***** Update RSS of current course *****/
RSS_UpdateRSSFileForACrs (&Gbl.Hierarchy.Crs); RSS_UpdateRSSFileForACrs (&Gbl.Hierarchy.Crs);

View File

@ -42,7 +42,7 @@ extern struct Globals Gbl;
void Plc_DB_CreatePlace (const struct Plc_Place *Plc) void Plc_DB_CreatePlace (const struct Plc_Place *Plc)
{ {
DB_QueryINSERT ("can not create place", DB_QueryINSERT ("can not create place",
"INSERT INTO places" "INSERT INTO plc_places"
" (InsCod,ShortName,FullName)" " (InsCod,ShortName,FullName)"
" VALUES" " VALUES"
" (%ld,'%s','%s')", " (%ld,'%s','%s')",

View File

@ -52342,7 +52342,7 @@ const char *Txt_TIMELINE_Not_shared_by_anyone = // No shared
const char *Txt_TIMELINE_NOTE[Tml_NOT_NUM_NOTE_TYPES] = const char *Txt_TIMELINE_NOTE[Tml_NOT_NUM_NOTE_TYPES] =
{ {
[Tml_NOTE_UNKNOWN] = [TmlNot_UNKNOWN] =
#if L==1 // ca #if L==1 // ca
"Esdeveniment desconegut" "Esdeveniment desconegut"
#elif L==2 // de #elif L==2 // de
@ -52363,7 +52363,7 @@ const char *Txt_TIMELINE_NOTE[Tml_NOT_NUM_NOTE_TYPES] =
"Evento desconhecido" "Evento desconhecido"
#endif #endif
, ,
[Tml_NOTE_INS_DOC_PUB_FILE] = [TmlNot_INS_DOC_PUB_FILE] =
#if L==1 // ca #if L==1 // ca
"Document p&uacute;blic (instituci&oacute;)" "Document p&uacute;blic (instituci&oacute;)"
#elif L==2 // de #elif L==2 // de
@ -52384,7 +52384,7 @@ const char *Txt_TIMELINE_NOTE[Tml_NOT_NUM_NOTE_TYPES] =
"Arquivo de documento p&uacute;blico (institu&ccedil;&atilde;o)" "Arquivo de documento p&uacute;blico (institu&ccedil;&atilde;o)"
#endif #endif
, ,
[Tml_NOTE_INS_SHA_PUB_FILE] = [TmlNot_INS_SHA_PUB_FILE] =
#if L==1 // ca #if L==1 // ca
"Arxiu compartit p&uacute;blic (instituci&oacute;)" "Arxiu compartit p&uacute;blic (instituci&oacute;)"
#elif L==2 // de #elif L==2 // de
@ -52405,7 +52405,7 @@ const char *Txt_TIMELINE_NOTE[Tml_NOT_NUM_NOTE_TYPES] =
"Arquivo compartilhado p&uacute;blico (institu&ccedil;&atilde;o)" "Arquivo compartilhado p&uacute;blico (institu&ccedil;&atilde;o)"
#endif #endif
, ,
[Tml_NOTE_CTR_DOC_PUB_FILE] = [TmlNot_CTR_DOC_PUB_FILE] =
#if L==1 // ca #if L==1 // ca
"Document p&uacute;blic (center)" "Document p&uacute;blic (center)"
#elif L==2 // de #elif L==2 // de
@ -52426,7 +52426,7 @@ const char *Txt_TIMELINE_NOTE[Tml_NOT_NUM_NOTE_TYPES] =
"Arquivo de documento p&uacute;blico (centro)" "Arquivo de documento p&uacute;blico (centro)"
#endif #endif
, ,
[Tml_NOTE_CTR_SHA_PUB_FILE] = [TmlNot_CTR_SHA_PUB_FILE] =
#if L==1 // ca #if L==1 // ca
"Arxiu compartit p&uacute;blic (center)" "Arxiu compartit p&uacute;blic (center)"
#elif L==2 // de #elif L==2 // de
@ -52447,7 +52447,7 @@ const char *Txt_TIMELINE_NOTE[Tml_NOT_NUM_NOTE_TYPES] =
"Arquivo compartilhado p&uacute;blico (centro)" "Arquivo compartilhado p&uacute;blico (centro)"
#endif #endif
, ,
[Tml_NOTE_DEG_DOC_PUB_FILE] = [TmlNot_DEG_DOC_PUB_FILE] =
#if L==1 // ca #if L==1 // ca
"Document p&uacute;blic (titulaci&oacute;)" "Document p&uacute;blic (titulaci&oacute;)"
#elif L==2 // de #elif L==2 // de
@ -52468,7 +52468,7 @@ const char *Txt_TIMELINE_NOTE[Tml_NOT_NUM_NOTE_TYPES] =
"Arquivo de documento p&uacute;blico (grau)" "Arquivo de documento p&uacute;blico (grau)"
#endif #endif
, ,
[Tml_NOTE_DEG_SHA_PUB_FILE] = [TmlNot_DEG_SHA_PUB_FILE] =
#if L==1 // ca #if L==1 // ca
"Arxiu compartit p&uacute;blic (titulaci&oacute;)" "Arxiu compartit p&uacute;blic (titulaci&oacute;)"
#elif L==2 // de #elif L==2 // de
@ -52489,7 +52489,7 @@ const char *Txt_TIMELINE_NOTE[Tml_NOT_NUM_NOTE_TYPES] =
"Arquivo compartilhado p&uacute;blico (grau)" "Arquivo compartilhado p&uacute;blico (grau)"
#endif #endif
, ,
[Tml_NOTE_CRS_DOC_PUB_FILE] = [TmlNot_CRS_DOC_PUB_FILE] =
#if L==1 // ca #if L==1 // ca
"Document p&uacute;blic (assignatura)" "Document p&uacute;blic (assignatura)"
#elif L==2 // de #elif L==2 // de
@ -52510,7 +52510,7 @@ const char *Txt_TIMELINE_NOTE[Tml_NOT_NUM_NOTE_TYPES] =
"Arquivo de documento p&uacute;blico (disciplina)" "Arquivo de documento p&uacute;blico (disciplina)"
#endif #endif
, ,
[Tml_NOTE_CRS_SHA_PUB_FILE] = [TmlNot_CRS_SHA_PUB_FILE] =
#if L==1 // ca #if L==1 // ca
"Arxiu compartit p&uacute;blic (assignatura)" "Arxiu compartit p&uacute;blic (assignatura)"
#elif L==2 // de #elif L==2 // de
@ -52531,7 +52531,7 @@ const char *Txt_TIMELINE_NOTE[Tml_NOT_NUM_NOTE_TYPES] =
"Arquivo compartilhado p&uacute;blico (disciplina)" "Arquivo compartilhado p&uacute;blico (disciplina)"
#endif #endif
, ,
[Tml_NOTE_CALL_FOR_EXAM] = [TmlNot_CALL_FOR_EXAM] =
#if L==1 // ca #if L==1 // ca
"Convocat&ograve;ria d'examen" "Convocat&ograve;ria d'examen"
#elif L==2 // de #elif L==2 // de
@ -52552,7 +52552,7 @@ const char *Txt_TIMELINE_NOTE[Tml_NOT_NUM_NOTE_TYPES] =
"Chamada para exame" "Chamada para exame"
#endif #endif
, ,
[Tml_NOTE_POST] = [TmlNot_POST] =
#if L==1 // ca #if L==1 // ca
"Missatge social" "Missatge social"
#elif L==2 // de #elif L==2 // de
@ -52573,7 +52573,7 @@ const char *Txt_TIMELINE_NOTE[Tml_NOT_NUM_NOTE_TYPES] =
"Post sociais" "Post sociais"
#endif #endif
, ,
[Tml_NOTE_FORUM_POST] = [TmlNot_FORUM_POST] =
#if L==1 // ca #if L==1 // ca
"Comentari en un f&ograve;rum" "Comentari en un f&ograve;rum"
#elif L==2 // de #elif L==2 // de
@ -52594,7 +52594,7 @@ const char *Txt_TIMELINE_NOTE[Tml_NOT_NUM_NOTE_TYPES] =
"Post em um f&oacute;rum" "Post em um f&oacute;rum"
#endif #endif
, ,
[Tml_NOTE_NOTICE] = [TmlNot_NOTICE] =
#if L==1 // ca #if L==1 // ca
"Av&iacute;s" "Av&iacute;s"
#elif L==2 // de #elif L==2 // de

View File

@ -84,7 +84,7 @@ struct Tml_Timeline
Tml_WhatToGet_t WhatToGet; Tml_WhatToGet_t WhatToGet;
struct struct
{ {
struct TmlPub_Publication *Top; // Points to first element in list of publications struct TmlPub_Publication *Top; // Points to first element in list of publications
struct TmlPub_Publication *Bottom; // Points to last element in list of publications struct TmlPub_Publication *Bottom; // Points to last element in list of publications
} Pubs; } Pubs;
long NotCod; // Used as parameter about social note to be edited, removed... long NotCod; // Used as parameter about social note to be edited, removed...

View File

@ -617,7 +617,7 @@ void Tml_DB_RemoveAllPostsUsr (long UsrCod)
" FROM tml_notes" " FROM tml_notes"
" WHERE UsrCod=%ld" " WHERE UsrCod=%ld"
" AND NoteType=%u)", " AND NoteType=%u)",
UsrCod,(unsigned) Tml_NOTE_POST); UsrCod,(unsigned) TmlNot_POST);
} }
/*****************************************************************************/ /*****************************************************************************/

View File

@ -60,14 +60,14 @@ extern struct Globals Gbl;
static const TmlNot_Type_t TmlNot_NoteType[Brw_NUM_TYPES_FILE_BROWSER] = static const TmlNot_Type_t TmlNot_NoteType[Brw_NUM_TYPES_FILE_BROWSER] =
{ {
[Brw_ADMI_DOC_INS] = Tml_NOTE_INS_DOC_PUB_FILE, [Brw_ADMI_DOC_INS] = TmlNot_INS_DOC_PUB_FILE,
[Brw_ADMI_SHR_INS] = Tml_NOTE_INS_SHA_PUB_FILE, [Brw_ADMI_SHR_INS] = TmlNot_INS_SHA_PUB_FILE,
[Brw_ADMI_DOC_CTR] = Tml_NOTE_CTR_DOC_PUB_FILE, [Brw_ADMI_DOC_CTR] = TmlNot_CTR_DOC_PUB_FILE,
[Brw_ADMI_SHR_CTR] = Tml_NOTE_CTR_SHA_PUB_FILE, [Brw_ADMI_SHR_CTR] = TmlNot_CTR_SHA_PUB_FILE,
[Brw_ADMI_DOC_DEG] = Tml_NOTE_DEG_DOC_PUB_FILE, [Brw_ADMI_DOC_DEG] = TmlNot_DEG_DOC_PUB_FILE,
[Brw_ADMI_SHR_DEG] = Tml_NOTE_DEG_SHA_PUB_FILE, [Brw_ADMI_SHR_DEG] = TmlNot_DEG_SHA_PUB_FILE,
[Brw_ADMI_DOC_CRS] = Tml_NOTE_CRS_DOC_PUB_FILE, [Brw_ADMI_DOC_CRS] = TmlNot_CRS_DOC_PUB_FILE,
[Brw_ADMI_SHR_CRS] = Tml_NOTE_CRS_SHA_PUB_FILE, [Brw_ADMI_SHR_CRS] = TmlNot_CRS_SHA_PUB_FILE,
}; };
/*****************************************************************************/ /*****************************************************************************/
@ -173,9 +173,9 @@ void TmlNot_ShowHighlightedNote (struct Tml_Timeline *Timeline,
/*****************************************************************************/ /*****************************************************************************/
void TmlNot_CheckAndWriteNoteWithTopMsg (const struct Tml_Timeline *Timeline, void TmlNot_CheckAndWriteNoteWithTopMsg (const struct Tml_Timeline *Timeline,
const struct TmlNot_Note *Not, const struct TmlNot_Note *Not,
Tml_TopMessage_t TopMessage, Tml_TopMessage_t TopMessage,
long PublisherCod) // Who did the action (publication, commenting, faving, sharing, mentioning) long PublisherCod) // Who did the action (publication, commenting, faving, sharing, mentioning)
{ {
/* /*
___________________________________________ ___________________________________________
@ -206,7 +206,7 @@ void TmlNot_CheckAndWriteNoteWithTopMsg (const struct Tml_Timeline *Timeline,
/***** Trivial check: codes *****/ /***** Trivial check: codes *****/
if (Not->NotCod <= 0 || if (Not->NotCod <= 0 ||
Not->UsrCod <= 0 || Not->UsrCod <= 0 ||
Not->Type == Tml_NOTE_UNKNOWN) Not->Type == TmlNot_UNKNOWN)
{ {
Ale_ShowAlert (Ale_ERROR,"Error in note."); Ale_ShowAlert (Ale_ERROR,"Error in note.");
return; return;
@ -371,7 +371,7 @@ void TmlNot_WriteAuthorName (const struct UsrData *UsrDat,
static void TmlNot_WriteContent (const struct TmlNot_Note *Not) static void TmlNot_WriteContent (const struct TmlNot_Note *Not)
{ {
if (Not->Type == Tml_NOTE_POST) // It's a post if (Not->Type == TmlNot_POST) // It's a post
TmlPst_GetAndWritePost (Not->Cod); TmlPst_GetAndWritePost (Not->Cod);
else // Not a post else // Not a post
TmlNot_GetAndWriteNoPost (Not); TmlNot_GetAndWriteNoPost (Not);
@ -431,33 +431,33 @@ static void TmlNot_GetLocationInHierarchy (const struct TmlNot_Note *Not,
/***** Get location in hierarchy *****/ /***** Get location in hierarchy *****/
switch (Not->Type) switch (Not->Type)
{ {
case Tml_NOTE_INS_DOC_PUB_FILE: case TmlNot_INS_DOC_PUB_FILE:
case Tml_NOTE_INS_SHA_PUB_FILE: case TmlNot_INS_SHA_PUB_FILE:
/* Get institution data */ /* Get institution data */
Hie->Ins.InsCod = Not->HieCod; Hie->Ins.InsCod = Not->HieCod;
Ins_GetDataOfInstitByCod (&Hie->Ins); Ins_GetDataOfInstitByCod (&Hie->Ins);
break; break;
case Tml_NOTE_CTR_DOC_PUB_FILE: case TmlNot_CTR_DOC_PUB_FILE:
case Tml_NOTE_CTR_SHA_PUB_FILE: case TmlNot_CTR_SHA_PUB_FILE:
/* Get center data */ /* Get center data */
Hie->Ctr.CtrCod = Not->HieCod; Hie->Ctr.CtrCod = Not->HieCod;
Ctr_GetDataOfCenterByCod (&Hie->Ctr); Ctr_GetDataOfCenterByCod (&Hie->Ctr);
break; break;
case Tml_NOTE_DEG_DOC_PUB_FILE: case TmlNot_DEG_DOC_PUB_FILE:
case Tml_NOTE_DEG_SHA_PUB_FILE: case TmlNot_DEG_SHA_PUB_FILE:
/* Get degree data */ /* Get degree data */
Hie->Deg.DegCod = Not->HieCod; Hie->Deg.DegCod = Not->HieCod;
Deg_GetDataOfDegreeByCod (&Hie->Deg); Deg_GetDataOfDegreeByCod (&Hie->Deg);
break; break;
case Tml_NOTE_CRS_DOC_PUB_FILE: case TmlNot_CRS_DOC_PUB_FILE:
case Tml_NOTE_CRS_SHA_PUB_FILE: case TmlNot_CRS_SHA_PUB_FILE:
case Tml_NOTE_CALL_FOR_EXAM: case TmlNot_CALL_FOR_EXAM:
case Tml_NOTE_NOTICE: case TmlNot_NOTICE:
/* Get course data */ /* Get course data */
Hie->Crs.CrsCod = Not->HieCod; Hie->Crs.CrsCod = Not->HieCod;
Crs_GetDataOfCourseByCod (&Hie->Crs); Crs_GetDataOfCourseByCod (&Hie->Crs);
break; break;
case Tml_NOTE_FORUM_POST: case TmlNot_FORUM_POST:
/* Get forum type of the post */ /* Get forum type of the post */
For_GetForumTypeAndLocationOfAPost (Not->Cod,Forum); For_GetForumTypeAndLocationOfAPost (Not->Cod,Forum);
@ -489,37 +489,37 @@ static void TmlNot_WriteLocationInHierarchy (const struct TmlNot_Note *Not,
/***** Write location *****/ /***** Write location *****/
switch (Not->Type) switch (Not->Type)
{ {
case Tml_NOTE_INS_DOC_PUB_FILE: case TmlNot_INS_DOC_PUB_FILE:
case Tml_NOTE_INS_SHA_PUB_FILE: case TmlNot_INS_SHA_PUB_FILE:
/* Write location (institution) in hierarchy */ /* Write location (institution) in hierarchy */
HTM_TxtF ("%s:&nbsp;%s", HTM_TxtF ("%s:&nbsp;%s",
Txt_Institution, Txt_Institution,
Hie->Ins.ShrtName); Hie->Ins.ShrtName);
break; break;
case Tml_NOTE_CTR_DOC_PUB_FILE: case TmlNot_CTR_DOC_PUB_FILE:
case Tml_NOTE_CTR_SHA_PUB_FILE: case TmlNot_CTR_SHA_PUB_FILE:
/* Write location (center) in hierarchy */ /* Write location (center) in hierarchy */
HTM_TxtF ("%s:&nbsp;%s", HTM_TxtF ("%s:&nbsp;%s",
Txt_Center, Txt_Center,
Hie->Ctr.ShrtName); Hie->Ctr.ShrtName);
break; break;
case Tml_NOTE_DEG_DOC_PUB_FILE: case TmlNot_DEG_DOC_PUB_FILE:
case Tml_NOTE_DEG_SHA_PUB_FILE: case TmlNot_DEG_SHA_PUB_FILE:
/* Write location (degree) in hierarchy */ /* Write location (degree) in hierarchy */
HTM_TxtF ("%s:&nbsp;%s", HTM_TxtF ("%s:&nbsp;%s",
Txt_Degree, Txt_Degree,
Hie->Deg.ShrtName); Hie->Deg.ShrtName);
break; break;
case Tml_NOTE_CRS_DOC_PUB_FILE: case TmlNot_CRS_DOC_PUB_FILE:
case Tml_NOTE_CRS_SHA_PUB_FILE: case TmlNot_CRS_SHA_PUB_FILE:
case Tml_NOTE_CALL_FOR_EXAM: case TmlNot_CALL_FOR_EXAM:
case Tml_NOTE_NOTICE: case TmlNot_NOTICE:
/* Write location (course) in hierarchy */ /* Write location (course) in hierarchy */
HTM_TxtF ("%s:&nbsp;%s", HTM_TxtF ("%s:&nbsp;%s",
Txt_Course, Txt_Course,
Hie->Crs.ShrtName); Hie->Crs.ShrtName);
break; break;
case Tml_NOTE_FORUM_POST: case TmlNot_FORUM_POST:
/* Write forum name */ /* Write forum name */
HTM_TxtF ("%s:&nbsp;%s", HTM_TxtF ("%s:&nbsp;%s",
Txt_Forum, Txt_Forum,
@ -546,53 +546,53 @@ static void TmlNot_PutFormGoToAction (const struct TmlNot_Note *Not,
char *Anchor = NULL; char *Anchor = NULL;
static const Act_Action_t Tml_DefaultActions[Tml_NOT_NUM_NOTE_TYPES] = static const Act_Action_t Tml_DefaultActions[Tml_NOT_NUM_NOTE_TYPES] =
{ {
[Tml_NOTE_UNKNOWN ] = ActUnk, [TmlNot_UNKNOWN ] = ActUnk,
/* Start tab */ /* Start tab */
[Tml_NOTE_POST ] = ActUnk, // action not used [TmlNot_POST ] = ActUnk, // action not used
/* Institution tab */ /* Institution tab */
[Tml_NOTE_INS_DOC_PUB_FILE ] = ActReqDatSeeDocIns, [TmlNot_INS_DOC_PUB_FILE ] = ActReqDatSeeDocIns,
[Tml_NOTE_INS_SHA_PUB_FILE ] = ActReqDatShaIns, [TmlNot_INS_SHA_PUB_FILE ] = ActReqDatShaIns,
/* Center tab */ /* Center tab */
[Tml_NOTE_CTR_DOC_PUB_FILE ] = ActReqDatSeeDocCtr, [TmlNot_CTR_DOC_PUB_FILE ] = ActReqDatSeeDocCtr,
[Tml_NOTE_CTR_SHA_PUB_FILE ] = ActReqDatShaCtr, [TmlNot_CTR_SHA_PUB_FILE ] = ActReqDatShaCtr,
/* Degree tab */ /* Degree tab */
[Tml_NOTE_DEG_DOC_PUB_FILE ] = ActReqDatSeeDocDeg, [TmlNot_DEG_DOC_PUB_FILE ] = ActReqDatSeeDocDeg,
[Tml_NOTE_DEG_SHA_PUB_FILE ] = ActReqDatShaDeg, [TmlNot_DEG_SHA_PUB_FILE ] = ActReqDatShaDeg,
/* Course tab */ /* Course tab */
[Tml_NOTE_CRS_DOC_PUB_FILE ] = ActReqDatSeeDocCrs, [TmlNot_CRS_DOC_PUB_FILE ] = ActReqDatSeeDocCrs,
[Tml_NOTE_CRS_SHA_PUB_FILE ] = ActReqDatShaCrs, [TmlNot_CRS_SHA_PUB_FILE ] = ActReqDatShaCrs,
/* Assessment tab */ /* Assessment tab */
[Tml_NOTE_CALL_FOR_EXAM ] = ActSeeOneCfe, [TmlNot_CALL_FOR_EXAM ] = ActSeeOneCfe,
/* Users tab */ /* Users tab */
/* Messages tab */ /* Messages tab */
[Tml_NOTE_NOTICE ] = ActSeeOneNot, [TmlNot_NOTICE ] = ActSeeOneNot,
[Tml_NOTE_FORUM_POST ] = ActSeeFor, [TmlNot_FORUM_POST ] = ActSeeFor,
/* Analytics tab */ /* Analytics tab */
/* Profile tab */ /* Profile tab */
}; };
static const char *Tml_Icons[Tml_NOT_NUM_NOTE_TYPES] = static const char *Tml_Icons[Tml_NOT_NUM_NOTE_TYPES] =
{ {
[Tml_NOTE_UNKNOWN ] = NULL, [TmlNot_UNKNOWN ] = NULL,
/* Start tab */ /* Start tab */
[Tml_NOTE_POST ] = NULL, // icon not used [TmlNot_POST ] = NULL, // icon not used
/* Institution tab */ /* Institution tab */
[Tml_NOTE_INS_DOC_PUB_FILE ] = "file.svg", [TmlNot_INS_DOC_PUB_FILE ] = "file.svg",
[Tml_NOTE_INS_SHA_PUB_FILE ] = "file.svg", [TmlNot_INS_SHA_PUB_FILE ] = "file.svg",
/* Center tab */ /* Center tab */
[Tml_NOTE_CTR_DOC_PUB_FILE ] = "file.svg", [TmlNot_CTR_DOC_PUB_FILE ] = "file.svg",
[Tml_NOTE_CTR_SHA_PUB_FILE ] = "file.svg", [TmlNot_CTR_SHA_PUB_FILE ] = "file.svg",
/* Degree tab */ /* Degree tab */
[Tml_NOTE_DEG_DOC_PUB_FILE ] = "file.svg", [TmlNot_DEG_DOC_PUB_FILE ] = "file.svg",
[Tml_NOTE_DEG_SHA_PUB_FILE ] = "file.svg", [TmlNot_DEG_SHA_PUB_FILE ] = "file.svg",
/* Course tab */ /* Course tab */
[Tml_NOTE_CRS_DOC_PUB_FILE ] = "file.svg", [TmlNot_CRS_DOC_PUB_FILE ] = "file.svg",
[Tml_NOTE_CRS_SHA_PUB_FILE ] = "file.svg", [TmlNot_CRS_SHA_PUB_FILE ] = "file.svg",
/* Assessment tab */ /* Assessment tab */
[Tml_NOTE_CALL_FOR_EXAM ] = "bullhorn.svg", [TmlNot_CALL_FOR_EXAM ] = "bullhorn.svg",
/* Users tab */ /* Users tab */
/* Messages tab */ /* Messages tab */
[Tml_NOTE_NOTICE ] = "sticky-note.svg", [TmlNot_NOTICE ] = "sticky-note.svg",
[Tml_NOTE_FORUM_POST ] = "comments.svg", [TmlNot_FORUM_POST ] = "comments.svg",
/* Analytics tab */ /* Analytics tab */
/* Profile tab */ /* Profile tab */
}; };
@ -620,35 +620,35 @@ static void TmlNot_PutFormGoToAction (const struct TmlNot_Note *Not,
/***** Begin form with parameters depending on the type of note *****/ /***** Begin form with parameters depending on the type of note *****/
switch (Not->Type) switch (Not->Type)
{ {
case Tml_NOTE_INS_DOC_PUB_FILE: case TmlNot_INS_DOC_PUB_FILE:
case Tml_NOTE_INS_SHA_PUB_FILE: case TmlNot_INS_SHA_PUB_FILE:
Frm_BeginFormUnique (Tml_DefaultActions[Not->Type]); Frm_BeginFormUnique (Tml_DefaultActions[Not->Type]);
Brw_PutHiddenParamFilCod (Not->Cod); Brw_PutHiddenParamFilCod (Not->Cod);
if (Not->HieCod != Gbl.Hierarchy.Ins.InsCod) // Not the current institution if (Not->HieCod != Gbl.Hierarchy.Ins.InsCod) // Not the current institution
Ins_PutParamInsCod (Not->HieCod); // Go to another institution Ins_PutParamInsCod (Not->HieCod); // Go to another institution
break; break;
case Tml_NOTE_CTR_DOC_PUB_FILE: case TmlNot_CTR_DOC_PUB_FILE:
case Tml_NOTE_CTR_SHA_PUB_FILE: case TmlNot_CTR_SHA_PUB_FILE:
Frm_BeginFormUnique (Tml_DefaultActions[Not->Type]); Frm_BeginFormUnique (Tml_DefaultActions[Not->Type]);
Brw_PutHiddenParamFilCod (Not->Cod); Brw_PutHiddenParamFilCod (Not->Cod);
if (Not->HieCod != Gbl.Hierarchy.Ctr.CtrCod) // Not the current center if (Not->HieCod != Gbl.Hierarchy.Ctr.CtrCod) // Not the current center
Ctr_PutParamCtrCod (Not->HieCod); // Go to another center Ctr_PutParamCtrCod (Not->HieCod); // Go to another center
break; break;
case Tml_NOTE_DEG_DOC_PUB_FILE: case TmlNot_DEG_DOC_PUB_FILE:
case Tml_NOTE_DEG_SHA_PUB_FILE: case TmlNot_DEG_SHA_PUB_FILE:
Frm_BeginFormUnique (Tml_DefaultActions[Not->Type]); Frm_BeginFormUnique (Tml_DefaultActions[Not->Type]);
Brw_PutHiddenParamFilCod (Not->Cod); Brw_PutHiddenParamFilCod (Not->Cod);
if (Not->HieCod != Gbl.Hierarchy.Deg.DegCod) // Not the current degree if (Not->HieCod != Gbl.Hierarchy.Deg.DegCod) // Not the current degree
Deg_PutParamDegCod (Not->HieCod); // Go to another degree Deg_PutParamDegCod (Not->HieCod); // Go to another degree
break; break;
case Tml_NOTE_CRS_DOC_PUB_FILE: case TmlNot_CRS_DOC_PUB_FILE:
case Tml_NOTE_CRS_SHA_PUB_FILE: case TmlNot_CRS_SHA_PUB_FILE:
Frm_BeginFormUnique (Tml_DefaultActions[Not->Type]); Frm_BeginFormUnique (Tml_DefaultActions[Not->Type]);
Brw_PutHiddenParamFilCod (Not->Cod); Brw_PutHiddenParamFilCod (Not->Cod);
if (Not->HieCod != Gbl.Hierarchy.Crs.CrsCod) // Not the current course if (Not->HieCod != Gbl.Hierarchy.Crs.CrsCod) // Not the current course
Crs_PutParamCrsCod (Not->HieCod); // Go to another course Crs_PutParamCrsCod (Not->HieCod); // Go to another course
break; break;
case Tml_NOTE_CALL_FOR_EXAM: case TmlNot_CALL_FOR_EXAM:
Frm_SetAnchorStr (Not->Cod,&Anchor); Frm_SetAnchorStr (Not->Cod,&Anchor);
Frm_BeginFormUniqueAnchor (Tml_DefaultActions[Not->Type], Frm_BeginFormUniqueAnchor (Tml_DefaultActions[Not->Type],
Anchor); // Locate on this specific exam Anchor); // Locate on this specific exam
@ -657,9 +657,9 @@ static void TmlNot_PutFormGoToAction (const struct TmlNot_Note *Not,
if (Not->HieCod != Gbl.Hierarchy.Crs.CrsCod) // Not the current course if (Not->HieCod != Gbl.Hierarchy.Crs.CrsCod) // Not the current course
Crs_PutParamCrsCod (Not->HieCod); // Go to another course Crs_PutParamCrsCod (Not->HieCod); // Go to another course
break; break;
case Tml_NOTE_POST: // Not applicable case TmlNot_POST: // Not applicable
return; return;
case Tml_NOTE_FORUM_POST: case TmlNot_FORUM_POST:
Frm_BeginFormUnique (For_ActionsSeeFor[Forums->Forum.Type]); Frm_BeginFormUnique (For_ActionsSeeFor[Forums->Forum.Type]);
For_PutAllHiddenParamsForum (1, // Page of threads = first For_PutAllHiddenParamsForum (1, // Page of threads = first
1, // Page of posts = first 1, // Page of posts = first
@ -671,7 +671,7 @@ static void TmlNot_PutFormGoToAction (const struct TmlNot_Note *Not,
if (Not->HieCod != Gbl.Hierarchy.Crs.CrsCod) // Not the current course if (Not->HieCod != Gbl.Hierarchy.Crs.CrsCod) // Not the current course
Crs_PutParamCrsCod (Not->HieCod); // Go to another course Crs_PutParamCrsCod (Not->HieCod); // Go to another course
break; break;
case Tml_NOTE_NOTICE: case TmlNot_NOTICE:
Frm_SetAnchorStr (Not->Cod,&Anchor); Frm_SetAnchorStr (Not->Cod,&Anchor);
Frm_BeginFormUniqueAnchor (Tml_DefaultActions[Not->Type], Frm_BeginFormUniqueAnchor (Tml_DefaultActions[Not->Type],
Anchor); Anchor);
@ -717,28 +717,28 @@ void TmlNot_GetNoteSummary (const struct TmlNot_Note *Not,
switch (Not->Type) switch (Not->Type)
{ {
case Tml_NOTE_UNKNOWN: case TmlNot_UNKNOWN:
break; break;
case Tml_NOTE_INS_DOC_PUB_FILE: case TmlNot_INS_DOC_PUB_FILE:
case Tml_NOTE_INS_SHA_PUB_FILE: case TmlNot_INS_SHA_PUB_FILE:
case Tml_NOTE_CTR_DOC_PUB_FILE: case TmlNot_CTR_DOC_PUB_FILE:
case Tml_NOTE_CTR_SHA_PUB_FILE: case TmlNot_CTR_SHA_PUB_FILE:
case Tml_NOTE_DEG_DOC_PUB_FILE: case TmlNot_DEG_DOC_PUB_FILE:
case Tml_NOTE_DEG_SHA_PUB_FILE: case TmlNot_DEG_SHA_PUB_FILE:
case Tml_NOTE_CRS_DOC_PUB_FILE: case TmlNot_CRS_DOC_PUB_FILE:
case Tml_NOTE_CRS_SHA_PUB_FILE: case TmlNot_CRS_SHA_PUB_FILE:
Brw_GetSummaryAndContentOfFile (SummaryStr,NULL,Not->Cod,false); Brw_GetSummaryAndContentOfFile (SummaryStr,NULL,Not->Cod,false);
break; break;
case Tml_NOTE_CALL_FOR_EXAM: case TmlNot_CALL_FOR_EXAM:
Cfe_GetSummaryAndContentCallForExam (SummaryStr,NULL,Not->Cod,false); Cfe_GetSummaryAndContentCallForExam (SummaryStr,NULL,Not->Cod,false);
break; break;
case Tml_NOTE_POST: case TmlNot_POST:
// Not applicable // Not applicable
break; break;
case Tml_NOTE_FORUM_POST: case TmlNot_FORUM_POST:
For_GetSummaryAndContentForumPst (SummaryStr,NULL,Not->Cod,false); For_GetSummaryAndContentForumPst (SummaryStr,NULL,Not->Cod,false);
break; break;
case Tml_NOTE_NOTICE: case TmlNot_NOTICE:
Not_GetSummaryAndContentNotice (SummaryStr,NULL,Not->Cod,false); Not_GetSummaryAndContentNotice (SummaryStr,NULL,Not->Cod,false);
break; break;
} }
@ -890,22 +890,22 @@ void TmlNot_StoreAndPublishNoteInternal (TmlNot_Type_t NoteType,long Cod,
switch (NoteType) switch (NoteType)
{ {
case Tml_NOTE_INS_DOC_PUB_FILE: case TmlNot_INS_DOC_PUB_FILE:
case Tml_NOTE_INS_SHA_PUB_FILE: case TmlNot_INS_SHA_PUB_FILE:
HieCod = Gbl.Hierarchy.Ins.InsCod; HieCod = Gbl.Hierarchy.Ins.InsCod;
break; break;
case Tml_NOTE_CTR_DOC_PUB_FILE: case TmlNot_CTR_DOC_PUB_FILE:
case Tml_NOTE_CTR_SHA_PUB_FILE: case TmlNot_CTR_SHA_PUB_FILE:
HieCod = Gbl.Hierarchy.Ctr.CtrCod; HieCod = Gbl.Hierarchy.Ctr.CtrCod;
break; break;
case Tml_NOTE_DEG_DOC_PUB_FILE: case TmlNot_DEG_DOC_PUB_FILE:
case Tml_NOTE_DEG_SHA_PUB_FILE: case TmlNot_DEG_SHA_PUB_FILE:
HieCod = Gbl.Hierarchy.Deg.DegCod; HieCod = Gbl.Hierarchy.Deg.DegCod;
break; break;
case Tml_NOTE_CRS_DOC_PUB_FILE: case TmlNot_CRS_DOC_PUB_FILE:
case Tml_NOTE_CRS_SHA_PUB_FILE: case TmlNot_CRS_SHA_PUB_FILE:
case Tml_NOTE_CALL_FOR_EXAM: case TmlNot_CALL_FOR_EXAM:
case Tml_NOTE_NOTICE: case TmlNot_NOTICE:
HieCod = Gbl.Hierarchy.Crs.CrsCod; HieCod = Gbl.Hierarchy.Crs.CrsCod;
break; break;
default: default:
@ -1177,7 +1177,7 @@ static void TmlNot_RemoveNoteMediaAndDBEntries (struct TmlNot_Note *Not)
DB_FreeMySQLResult (&mysql_res); DB_FreeMySQLResult (&mysql_res);
/***** Remove media associated to post *****/ /***** Remove media associated to post *****/
if (Not->Type == Tml_NOTE_POST) if (Not->Type == TmlNot_POST)
if ((MedCod = Tml_DB_GetMedCodFromPost (Not->Cod)) > 0) if ((MedCod = Tml_DB_GetMedCodFromPost (Not->Cod)) > 0)
Med_RemoveMedia (MedCod); Med_RemoveMedia (MedCod);
@ -1199,7 +1199,7 @@ static void TmlNot_RemoveNoteMediaAndDBEntries (struct TmlNot_Note *Not)
/***** Remove note *****/ /***** Remove note *****/
Tml_DB_RemoveNote (Not->NotCod); Tml_DB_RemoveNote (Not->NotCod);
if (Not->Type == Tml_NOTE_POST) if (Not->Type == TmlNot_POST)
/***** Remove post *****/ /***** Remove post *****/
Tml_DB_RemovePost (Not->Cod); Tml_DB_RemovePost (Not->Cod);
} }
@ -1256,7 +1256,7 @@ static TmlNot_Type_t TmlNot_GetNoteTypeFromStr (const char *Str)
if (UnsignedNum < Tml_NOT_NUM_NOTE_TYPES) if (UnsignedNum < Tml_NOT_NUM_NOTE_TYPES)
return (TmlNot_Type_t) UnsignedNum; return (TmlNot_Type_t) UnsignedNum;
return Tml_NOTE_UNKNOWN; return TmlNot_UNKNOWN;
} }
/*****************************************************************************/ /*****************************************************************************/
@ -1266,7 +1266,7 @@ static TmlNot_Type_t TmlNot_GetNoteTypeFromStr (const char *Str)
static void TmlNot_ResetNote (struct TmlNot_Note *Not) static void TmlNot_ResetNote (struct TmlNot_Note *Not)
{ {
Not->NotCod = -1L; Not->NotCod = -1L;
Not->Type = Tml_NOTE_UNKNOWN; Not->Type = TmlNot_UNKNOWN;
Not->UsrCod = -1L; Not->UsrCod = -1L;
Not->HieCod = -1L; Not->HieCod = -1L;
Not->Cod = -1L; Not->Cod = -1L;

View File

@ -38,27 +38,27 @@
// it is necessary to change old numbers to new ones in database table tml_notes // it is necessary to change old numbers to new ones in database table tml_notes
typedef enum typedef enum
{ {
Tml_NOTE_UNKNOWN = 0, TmlNot_UNKNOWN = 0,
/* Start tab */ /* Start tab */
Tml_NOTE_POST = 10, // Post written directly in timeline TmlNot_POST = 10, // Post written directly in timeline
/* Institution tab */ /* Institution tab */
Tml_NOTE_INS_DOC_PUB_FILE = 1, // Public file in documents of institution TmlNot_INS_DOC_PUB_FILE = 1, // Public file in documents of institution
Tml_NOTE_INS_SHA_PUB_FILE = 2, // Public file in shared files of institution TmlNot_INS_SHA_PUB_FILE = 2, // Public file in shared files of institution
/* Center tab */ /* Center tab */
Tml_NOTE_CTR_DOC_PUB_FILE = 3, // Public file in documents of center TmlNot_CTR_DOC_PUB_FILE = 3, // Public file in documents of center
Tml_NOTE_CTR_SHA_PUB_FILE = 4, // Public file in shared files of center TmlNot_CTR_SHA_PUB_FILE = 4, // Public file in shared files of center
/* Degree tab */ /* Degree tab */
Tml_NOTE_DEG_DOC_PUB_FILE = 5, // Public file in documents of degree TmlNot_DEG_DOC_PUB_FILE = 5, // Public file in documents of degree
Tml_NOTE_DEG_SHA_PUB_FILE = 6, // Public file in shared files of degree TmlNot_DEG_SHA_PUB_FILE = 6, // Public file in shared files of degree
/* Course tab */ /* Course tab */
Tml_NOTE_CRS_DOC_PUB_FILE = 7, // Public file in documents of course TmlNot_CRS_DOC_PUB_FILE = 7, // Public file in documents of course
Tml_NOTE_CRS_SHA_PUB_FILE = 8, // Public file in shared files of course TmlNot_CRS_SHA_PUB_FILE = 8, // Public file in shared files of course
/* Assessment tab */ /* Assessment tab */
Tml_NOTE_CALL_FOR_EXAM = 9, // Call for exam in a course TmlNot_CALL_FOR_EXAM = 9, // Call for exam in a course
/* Users tab */ /* Users tab */
/* Messages tab */ /* Messages tab */
Tml_NOTE_NOTICE = 12, // A public notice in a course TmlNot_NOTICE = 12, // A public notice in a course
Tml_NOTE_FORUM_POST = 11, // Post in global/swad forums TmlNot_FORUM_POST = 11, // Post in global/swad forums
/* Analytics tab */ /* Analytics tab */
/* Profile tab */ /* Profile tab */
} TmlNot_Type_t; } TmlNot_Type_t;
@ -73,7 +73,7 @@ struct TmlNot_Note
// (institution/center/degree/course) // (institution/center/degree/course)
long Cod; // Code of file, forum post, long Cod; // Code of file, forum post,
// notice, timeline post... // notice, timeline post...
bool Unavailable; // File, forum post, notice,... bool Unavailable; // File, forum post, notice...
// unavailable (removed) // unavailable (removed)
time_t DateTimeUTC; // Date-time of publication in UTC time time_t DateTimeUTC; // Date-time of publication in UTC time
unsigned NumShared; // Number of times (users) unsigned NumShared; // Number of times (users)
@ -87,22 +87,22 @@ struct TmlNot_Note
/*****************************************************************************/ /*****************************************************************************/
void TmlNot_ShowHighlightedNote (struct Tml_Timeline *Timeline, void TmlNot_ShowHighlightedNote (struct Tml_Timeline *Timeline,
struct TmlNot_Note *Not); struct TmlNot_Note *Not);
void TmlNot_CheckAndWriteNoteWithTopMsg (const struct Tml_Timeline *Timeline, void TmlNot_CheckAndWriteNoteWithTopMsg (const struct Tml_Timeline *Timeline,
const struct TmlNot_Note *Not, const struct TmlNot_Note *Not,
Tml_TopMessage_t TopMessage, Tml_TopMessage_t TopMessage,
long PublisherCod); long PublisherCod);
void TmlNot_ShowAuthorPhoto (struct UsrData *UsrDat,bool FormUnique); void TmlNot_ShowAuthorPhoto (struct UsrData *UsrDat,bool FormUnique);
void TmlNot_WriteAuthorName (const struct UsrData *UsrDat, void TmlNot_WriteAuthorName (const struct UsrData *UsrDat,
const char *Class); const char *Class);
void TmlNot_GetNoteSummary (const struct TmlNot_Note *Not, void TmlNot_GetNoteSummary (const struct TmlNot_Note *Not,
char SummaryStr[Ntf_MAX_BYTES_SUMMARY + 1]); char SummaryStr[Ntf_MAX_BYTES_SUMMARY + 1]);
void TmlNot_StoreAndPublishNote (TmlNot_Type_t NoteType,long Cod); void TmlNot_StoreAndPublishNote (TmlNot_Type_t NoteType,long Cod);
void TmlNot_StoreAndPublishNoteInternal (TmlNot_Type_t NoteType,long Cod, void TmlNot_StoreAndPublishNoteInternal (TmlNot_Type_t NoteType,long Cod,
struct TmlPub_Publication *Pub); struct TmlPub_Publication *Pub);
void TmlNot_MarkNoteOneFileAsUnavailable (const char *Path); void TmlNot_MarkNoteOneFileAsUnavailable (const char *Path);
void TmlNot_MarkNotesChildrenOfFolderAsUnavailable (const char *Path); void TmlNot_MarkNotesChildrenOfFolderAsUnavailable (const char *Path);

View File

@ -124,7 +124,7 @@ void TmlNtf_GetNotifPublication (char SummaryStr[Ntf_MAX_BYTES_SUMMARY + 1],
Not.NotCod = Pub.NotCod; Not.NotCod = Pub.NotCod;
TmlNot_GetDataOfNoteByCod (&Not); TmlNot_GetDataOfNoteByCod (&Not);
if (Not.Type == Tml_NOTE_POST) if (Not.Type == TmlNot_POST)
{ {
/***** Get post from database *****/ /***** Get post from database *****/
if (Tml_DB_GetPostByCod (Not.Cod,&mysql_res) == 1) // Result should have a unique row if (Tml_DB_GetPostByCod (Not.Cod,&mysql_res) == 1) // Result should have a unique row

View File

@ -331,7 +331,7 @@ static long TmlPst_ReceivePost (void)
PstCod = Tml_DB_CreateNewPost (&Content); PstCod = Tml_DB_CreateNewPost (&Content);
/* Insert post in notes */ /* Insert post in notes */
TmlNot_StoreAndPublishNoteInternal (Tml_NOTE_POST,PstCod,&Pub); TmlNot_StoreAndPublishNoteInternal (TmlNot_POST,PstCod,&Pub);
/***** Analyze content and store notifications about mentions *****/ /***** Analyze content and store notifications about mentions *****/
Str_AnalyzeTxtAndStoreNotifyEventToMentionedUsrs (Pub.PubCod,Content.Txt); Str_AnalyzeTxtAndStoreNotifyEventToMentionedUsrs (Pub.PubCod,Content.Txt);

View File

@ -44,7 +44,7 @@
/*****************************************************************************/ /*****************************************************************************/
static void TmlPub_InitializeRangeOfPubs (Tml_WhatToGet_t WhatToGet, static void TmlPub_InitializeRangeOfPubs (Tml_WhatToGet_t WhatToGet,
struct TmlPub_RangePubsToGet *RangePubsToGet); struct TmlPub_RangePubsToGet *RangePubsToGet);
static unsigned TmlPub_GetMaxPubsToGet (const struct Tml_Timeline *Timeline); static unsigned TmlPub_GetMaxPubsToGet (const struct Tml_Timeline *Timeline);
@ -195,7 +195,7 @@ void TmlPub_GetListPubsToShowInTimeline (struct Tml_Timeline *Timeline)
/*****************************************************************************/ /*****************************************************************************/
static void TmlPub_InitializeRangeOfPubs (Tml_WhatToGet_t WhatToGet, static void TmlPub_InitializeRangeOfPubs (Tml_WhatToGet_t WhatToGet,
struct TmlPub_RangePubsToGet *RangePubsToGet) struct TmlPub_RangePubsToGet *RangePubsToGet)
{ {
/* tml_pubs /* tml_pubs
_____ 0 _____ 0