Version 20.94.10: Jun 29, 2021 Code refactoring related to HTML output.

This commit is contained in:
acanas 2021-06-29 15:25:42 +02:00
parent 06f41515fd
commit 36170e5cb0
52 changed files with 1433 additions and 1422 deletions

View File

@ -637,7 +637,7 @@ static bool API_GetSomeUsrDataFromUsrCod (struct UsrData *UsrDat,long CrsCod)
ID_GetListIDsFromUsrCod (UsrDat);
/***** Get user's nickname *****/
Nck_GetNicknameFromUsrCod (UsrDat->UsrCod,UsrDat->Nickname);
Nck_DB_GetNicknameFromUsrCod (UsrDat->UsrCod,UsrDat->Nickname);
/***** Get user's role *****/
if (CrsCod > 0)
@ -722,7 +722,7 @@ int swad__createAccount (struct soap *soap,
true); // I am creating my own account
/***** Save nickname *****/
Nck_UpdateNickInDB (Gbl.Usrs.Me.UsrDat.UsrCod,NewNickWithoutArr);
Nck_DB_UpdateNick (Gbl.Usrs.Me.UsrDat.UsrCod,NewNickWithoutArr);
Str_Copy (Gbl.Usrs.Me.UsrDat.Nickname,NewNickWithoutArr,
sizeof (Gbl.Usrs.Me.UsrDat.Nickname) - 1);
@ -1919,7 +1919,7 @@ static void API_CopyListUsers (struct soap *soap,
ICanSeeUsrID = ID_ICanSeeOtherUsrIDs (&UsrDat);
/* Get nickname */
Nck_GetNicknameFromUsrCod (UsrDat.UsrCod,UsrDat.Nickname);
Nck_DB_GetNicknameFromUsrCod (UsrDat.UsrCod,UsrDat.Nickname);
/* Copy user's data into output structure */
API_CopyUsrData (soap,

View File

@ -497,7 +497,7 @@ static void ID_PutLinkToConfirmID (struct UsrData *UsrDat,unsigned NumID,
NextAction = ActCnfID_Oth;
break;
}
Frm_StartFormAnchor (NextAction,Anchor);
Frm_BeginFormAnchor (NextAction,Anchor);
if (Gbl.Action.Original != ActUnk)
{
Par_PutHiddenParamLong (NULL,"OriginalActCod",
@ -705,7 +705,7 @@ static void ID_ShowFormChangeUsrID (bool ItsMe,bool IShouldFillInID)
/* Data */
HTM_TD_Begin ("class=\"REC_C2_BOT LT DAT\"");
if (ItsMe)
Frm_StartFormAnchor (ActChgMyID,ID_ID_SECTION_ID);
Frm_BeginFormAnchor (ActChgMyID,ID_ID_SECTION_ID);
else
{
switch (UsrDat->Roles.InCurrentCrs)
@ -721,7 +721,7 @@ static void ID_ShowFormChangeUsrID (bool ItsMe,bool IShouldFillInID)
NextAction = ActNewID_Oth;
break;
}
Frm_StartFormAnchor (NextAction,ID_ID_SECTION_ID);
Frm_BeginFormAnchor (NextAction,ID_ID_SECTION_ID);
Usr_PutParamUsrCodEncrypted (UsrDat->EnUsrCod);
}
HTM_INPUT_TEXT ("NewID",ID_MAX_BYTES_USR_ID,

View File

@ -86,7 +86,7 @@ static void MAC_PutFormToEditMACAddress (Act_Action_t NextAction,const char *Anc
void (*FuncParams) (void *Args),void *Args)
{
/* Form to enter a new MAC address */
Frm_StartFormAnchor (NextAction,Anchor);
Frm_BeginFormAnchor (NextAction,Anchor);
FuncParams (Args);
HTM_INPUT_TEXT ("NewMAC",MAC_LENGTH_MAC_ADDRESS,((struct MAC_Params *) Args)->MACstr,
HTM_SUBMIT_ON_CHANGE,

View File

@ -223,10 +223,13 @@ void MFU_WriteBigMFUActions (struct MFU_ListMFUActions *ListMFUActions)
Box_BoxBegin (NULL,Txt_My_frequent_actions,
NULL,NULL,
Hlp_ANALYTICS_Frequent,Box_NOT_CLOSABLE);
/***** Begin container *****/
HTM_DIV_Begin ("id=\"MFU_actions_big\"");
/***** Write list of frequently used actions *****/
/***** Begin list of frequently used actions *****/
HTM_UL_Begin ("class=\"LIST_LEFT\"");
for (NumAct = 0;
NumAct < ListMFUActions->NumActions;
NumAct++)
@ -254,8 +257,13 @@ void MFU_WriteBigMFUActions (struct MFU_ListMFUActions *ListMFUActions)
}
}
/***** End box *****/
/***** End list of frequently used actions *****/
HTM_UL_End ();
/***** End container *****/
HTM_DIV_End ();
/***** End box *****/
Box_BoxEnd ();
}
@ -277,14 +285,16 @@ void MFU_WriteSmallMFUActions (struct MFU_ListMFUActions *ListMFUActions)
/***** Start div and link *****/
HTM_DIV_Begin ("id=\"MFU_actions\"");
Frm_BeginForm (ActMFUAct);
HTM_BUTTON_SUBMIT_Begin (Txt_My_frequent_actions,"BT_LINK MFU_TITLE",NULL);
HTM_TxtF ("%s",Txt_Frequent_ACTIONS);
HTM_BUTTON_End ();
Frm_EndForm ();
/***** Write list of frequently used actions *****/
/***** Begin list of frequently used actions *****/
HTM_UL_Begin (NULL);
for (NumAct = 0;
NumAct < ListMFUActions->NumActions;
NumAct++)
@ -311,6 +321,8 @@ void MFU_WriteSmallMFUActions (struct MFU_ListMFUActions *ListMFUActions)
HTM_LI_End ();
}
}
/***** End list of frequently used actions *****/
HTM_UL_End ();
/***** End div *****/

View File

@ -471,7 +471,7 @@ void Acc_ShowFormChgMyAccount (void)
/***** Get current user's nickname and email address
It's necessary because current nickname or email could be just updated *****/
Nck_GetNicknameFromUsrCod (Gbl.Usrs.Me.UsrDat.UsrCod,Gbl.Usrs.Me.UsrDat.Nickname);
Nck_DB_GetNicknameFromUsrCod (Gbl.Usrs.Me.UsrDat.UsrCod,Gbl.Usrs.Me.UsrDat.Nickname);
Mai_GetEmailFromUsrCod (&Gbl.Usrs.Me.UsrDat);
/***** Check nickname, email and ID *****/
@ -529,7 +529,7 @@ void Acc_ShowFormChgOtherUsrAccount (void)
{
/***** Get user's nickname and email address
It's necessary because nickname or email could be just updated *****/
Nck_GetNicknameFromUsrCod (Gbl.Usrs.Other.UsrDat.UsrCod,Gbl.Usrs.Other.UsrDat.Nickname);
Nck_DB_GetNicknameFromUsrCod (Gbl.Usrs.Other.UsrDat.UsrCod,Gbl.Usrs.Other.UsrDat.Nickname);
Mai_GetEmailFromUsrCod (&Gbl.Usrs.Other.UsrDat);
/***** Show user's record *****/
@ -610,7 +610,7 @@ bool Acc_CreateMyNewAccountAndLogIn (void)
true); // I am creating my own account
/***** Save nickname *****/
Nck_UpdateNickInDB (Gbl.Usrs.Me.UsrDat.UsrCod,NewNickWithoutArr);
Nck_DB_UpdateNick (Gbl.Usrs.Me.UsrDat.UsrCod,NewNickWithoutArr);
Str_Copy (Gbl.Usrs.Me.UsrDat.Nickname,NewNickWithoutArr,
sizeof (Gbl.Usrs.Me.UsrDat.Nickname) - 1);

View File

@ -993,7 +993,7 @@ void Asg_RemoveAssignment (void)
Asg_DB_RemoveAssignment (Asg.AsgCod);
/***** Mark possible notifications as removed *****/
Ntf_MarkNotifAsRemoved (Ntf_EVENT_ASSIGNMENT,Asg.AsgCod);
Ntf_DB_MarkNotifAsRemoved (Ntf_EVENT_ASSIGNMENT,Asg.AsgCod);
/***** Write message to show the change made *****/
Ale_ShowAlert (Ale_SUCCESS,Txt_Assignment_X_removed,

View File

@ -2626,7 +2626,7 @@ static void Att_PutButtonToShowDetails (const struct Att_Events *Events)
/***** Button to show more details *****/
/* Begin form */
Frm_StartFormAnchor (Gbl.Action.Act,Att_ATTENDANCE_DETAILS_ID);
Frm_BeginFormAnchor (Gbl.Action.Act,Att_ATTENDANCE_DETAILS_ID);
Par_PutHiddenParamChar ("ShowDetails",'Y');
Grp_PutParamsCodGrps ();
Usr_PutHiddenParSelectedUsrsCods (&Gbl.Usrs.Selected);
@ -2684,7 +2684,7 @@ static void Att_ListEventsToSelect (const struct Att_Events *Events,
depending on the events selected *****/
if (NormalView)
{
Frm_StartFormAnchor (Gbl.Action.Act,Att_ATTENDANCE_TABLE_ID);
Frm_BeginFormAnchor (Gbl.Action.Act,Att_ATTENDANCE_TABLE_ID);
Grp_PutParamsCodGrps ();
Usr_PutHiddenParSelectedUsrsCods (&Gbl.Usrs.Selected);
}

View File

@ -448,7 +448,7 @@ static void Bld_ListBuildingsForEdition (const struct Bld_Buildings *Buildings)
/* Building short name */
HTM_TD_Begin ("class=\"LM\"");
Frm_StartFormAnchor (ActRenBldSho,Anchor);
Frm_BeginFormAnchor (ActRenBldSho,Anchor);
Bld_PutParamBldCod (&Building->BldCod);
HTM_INPUT_TEXT ("ShortName",Bld_MAX_CHARS_SHRT_NAME,Building->ShrtName,
HTM_SUBMIT_ON_CHANGE,
@ -458,7 +458,7 @@ static void Bld_ListBuildingsForEdition (const struct Bld_Buildings *Buildings)
/* Building full name */
HTM_TD_Begin ("class=\"LM\"");
Frm_StartFormAnchor (ActRenBldFul,Anchor);
Frm_BeginFormAnchor (ActRenBldFul,Anchor);
Bld_PutParamBldCod (&Building->BldCod);
HTM_INPUT_TEXT ("FullName",Bld_MAX_CHARS_FULL_NAME,Building->FullName,
HTM_SUBMIT_ON_CHANGE,
@ -468,7 +468,7 @@ static void Bld_ListBuildingsForEdition (const struct Bld_Buildings *Buildings)
/* Building location */
HTM_TD_Begin ("class=\"LM\"");
Frm_StartFormAnchor (ActRenBldLoc,Anchor);
Frm_BeginFormAnchor (ActRenBldLoc,Anchor);
Bld_PutParamBldCod (&Building->BldCod);
HTM_INPUT_TEXT ("Location",Bld_MAX_CHARS_LOCATION,Building->Location,
HTM_SUBMIT_ON_CHANGE,

View File

@ -465,7 +465,7 @@ void Cfe_RemoveCallForExam1 (void)
Cfe_DB_MarkACallForExamAsDeleted (ExaCod);
/***** Mark possible notifications as removed *****/
Ntf_MarkNotifAsRemoved (Ntf_EVENT_CALL_FOR_EXAM,ExaCod);
Ntf_DB_MarkNotifAsRemoved (Ntf_EVENT_CALL_FOR_EXAM,ExaCod);
/***** Mark possible social note as unavailable *****/
Tml_DB_MarkNoteAsUnavailable (TL_NOTE_CALL_FOR_EXAM,ExaCod);
@ -983,7 +983,7 @@ static void Cfe_ShowCallForExam (struct Cfe_CallsForExams *CallsForExams,
if (TypeViewCallForExam == Cfe_FORM_VIEW)
{
/***** Begin form *****/
Frm_StartFormAnchor (ActRcvCfe,Anchor);
Frm_BeginFormAnchor (ActRcvCfe,Anchor);
if (ExaCod > 0) // Existing call for exam
Cfe_PutHiddenParamExaCod (ExaCod);
}

View File

@ -602,13 +602,14 @@ TODO: FIX BUG, URGENT! En las fechas como par
TODO: En las encuestas, que los estudiantes no puedan ver los resultados hasta que no finalice el plazo.
*/
#define Log_PLATFORM_VERSION "SWAD 20.94.9 (2021-06-28)"
#define Log_PLATFORM_VERSION "SWAD 20.94.10 (2021-06-29)"
#define CSS_FILE "swad20.45.css"
#define JS_FILE "swad20.69.1.js"
/*
TODO: Rename CENTRE to CENTER in help wiki.
TODO: Rename ASSESSMENT.Announcements to ASSESSMENT.Calls_for_exams
Version 20.94.10: Jun 29, 2021 Code refactoring related to HTML output. (313860 lines)
Version 20.94.9: Jun 29, 2021 Query moved from module swad_menu to module swad_setting. (313848 lines)
Version 20.94.8: Jun 29, 2021 Queries moved to module swad_group_database. (313834 lines)
Version 20.94.7: Jun 28, 2021 Queries moved to module swad_group_database. (313782 lines)

View File

@ -76,7 +76,7 @@ void Coo_EditMyPrefsOnCookies (void)
/***** Edit my preference about cookies *****/
/* Begin form */
Frm_StartFormAnchor (ActChgCooPrf,Coo_COOKIES_ID);
Frm_BeginFormAnchor (ActChgCooPrf,Coo_COOKIES_ID);
/* Begin container */
HTM_DIV_Begin ("class=\"%s\"",

View File

@ -321,7 +321,7 @@ static void Enr_NotifyAfterEnrolment (struct UsrData *UsrDat,Rol_Role_t NewRole)
NotifyByEmail = CreateNotif && !ItsMe &&
(UsrDat->NtfEvents.SendEmail & (1 << NotifyEvent));
if (CreateNotif)
Ntf_StoreNotifyEventToOneUser (NotifyEvent,UsrDat,-1L,
Ntf_DB_StoreNotifyEventToOneUser (NotifyEvent,UsrDat,-1L,
(Ntf_Status_t) (NotifyByEmail ? Ntf_STATUS_BIT_EMAIL :
0),
Gbl.Hierarchy.Ins.InsCod,
@ -2371,7 +2371,7 @@ static void Enr_RemUsrEnrolmentRequestInCrs (long UsrCod,long CrsCod)
{
/***** Mark possible notifications as removed
Important: do this before removing the request *****/
Ntf_MarkNotifAsRemoved (Ntf_EVENT_ENROLMENT_REQUEST,ReqCod);
Ntf_DB_MarkNotifAsRemoved (Ntf_EVENT_ENROLMENT_REQUEST,ReqCod);
/***** Remove enrolment request *****/
Enr_DB_RemRequest (ReqCod);

View File

@ -634,7 +634,7 @@ static void ExaRes_ListExamsToSelect (struct Exa_Exams *Exams)
/***** Begin form to update the results
depending on the exams selected *****/
Frm_StartFormAnchor (Gbl.Action.Act,ExaRes_RESULTS_TABLE_ID);
Frm_BeginFormAnchor (Gbl.Action.Act,ExaRes_RESULTS_TABLE_ID);
Grp_PutParamsCodGrps ();
Usr_PutHiddenParSelectedUsrsCods (&Gbl.Usrs.Selected);

View File

@ -1424,7 +1424,7 @@ void ExaSes_PutButtonNewSession (struct Exa_Exams *Exams,long ExaCod)
extern const char *Txt_New_session;
Exams->ExaCod = ExaCod;
Frm_StartFormAnchor (ActReqNewExaSes,ExaSes_NEW_SESSION_SECTION_ID);
Frm_BeginFormAnchor (ActReqNewExaSes,ExaSes_NEW_SESSION_SECTION_ID);
Exa_PutParams (Exams);
Btn_PutConfirmButton (Txt_New_session);
Frm_EndForm ();

View File

@ -1102,7 +1102,7 @@ static void ExaSet_ListOneOrMoreSetsForEdition (struct Exa_Exams *Exams,
HTM_ARTICLE_Begin (Anchor);
if (ICanEditSets)
{
Frm_StartFormAnchor (ActChgTitExaSet,Anchor);
Frm_BeginFormAnchor (ActChgTitExaSet,Anchor);
ExaSet_PutParamsOneSet (Exams);
HTM_INPUT_TEXT ("Title",ExaSet_MAX_CHARS_TITLE,Set.Title,
HTM_SUBMIT_ON_CHANGE,
@ -1130,7 +1130,7 @@ static void ExaSet_ListOneOrMoreSetsForEdition (struct Exa_Exams *Exams,
HTM_TD_Begin ("class=\"RT COLOR%u\"",Gbl.RowEvenOdd);
if (ICanEditSets)
{
Frm_StartFormAnchor (ActChgNumQstExaSet,Anchor);
Frm_BeginFormAnchor (ActChgNumQstExaSet,Anchor);
ExaSet_PutParamsOneSet (Exams);
HTM_INPUT_LONG ("NumQstsToPrint",0,UINT_MAX,(long) Set.NumQstsToPrint,
HTM_SUBMIT_ON_CHANGE,false,

View File

@ -9829,24 +9829,24 @@ void Brw_ShowFileMetadata (void)
case Brw_SHOW_DOC_GRP:
case Brw_ADMI_DOC_CRS:
case Brw_ADMI_DOC_GRP:
Ntf_MarkNotifAsRemoved (Ntf_EVENT_DOCUMENT_FILE,
Ntf_DB_MarkNotifAsRemoved (Ntf_EVENT_DOCUMENT_FILE,
FileMetadata.FilCod);
break;
case Brw_ADMI_TCH_CRS:
case Brw_ADMI_TCH_GRP:
Ntf_MarkNotifAsRemoved (Ntf_EVENT_TEACHERS_FILE,
Ntf_DB_MarkNotifAsRemoved (Ntf_EVENT_TEACHERS_FILE,
FileMetadata.FilCod);
break;
case Brw_ADMI_SHR_CRS:
case Brw_ADMI_SHR_GRP:
Ntf_MarkNotifAsRemoved (Ntf_EVENT_SHARED_FILE,
Ntf_DB_MarkNotifAsRemoved (Ntf_EVENT_SHARED_FILE,
FileMetadata.FilCod);
break;
case Brw_SHOW_MRK_CRS:
case Brw_SHOW_MRK_GRP:
case Brw_ADMI_MRK_CRS:
case Brw_ADMI_MRK_GRP:
Ntf_MarkNotifAsRemoved (Ntf_EVENT_MARKS_FILE,
Ntf_DB_MarkNotifAsRemoved (Ntf_EVENT_MARKS_FILE,
FileMetadata.FilCod);
break;
default:
@ -9988,24 +9988,24 @@ void Brw_DownloadFile (void)
case Brw_SHOW_DOC_GRP:
case Brw_ADMI_DOC_CRS:
case Brw_ADMI_DOC_GRP:
Ntf_MarkNotifAsRemoved (Ntf_EVENT_DOCUMENT_FILE,
Ntf_DB_MarkNotifAsRemoved (Ntf_EVENT_DOCUMENT_FILE,
FileMetadata.FilCod);
break;
case Brw_ADMI_TCH_CRS:
case Brw_ADMI_TCH_GRP:
Ntf_MarkNotifAsRemoved (Ntf_EVENT_TEACHERS_FILE,
Ntf_DB_MarkNotifAsRemoved (Ntf_EVENT_TEACHERS_FILE,
FileMetadata.FilCod);
break;
case Brw_ADMI_SHR_CRS:
case Brw_ADMI_SHR_GRP:
Ntf_MarkNotifAsRemoved (Ntf_EVENT_SHARED_FILE,
Ntf_DB_MarkNotifAsRemoved (Ntf_EVENT_SHARED_FILE,
FileMetadata.FilCod);
break;
case Brw_SHOW_MRK_CRS:
case Brw_SHOW_MRK_GRP:
case Brw_ADMI_MRK_CRS:
case Brw_ADMI_MRK_GRP:
Ntf_MarkNotifAsRemoved (Ntf_EVENT_MARKS_FILE,
Ntf_DB_MarkNotifAsRemoved (Ntf_EVENT_MARKS_FILE,
FileMetadata.FilCod);
break;
default:
@ -11750,7 +11750,7 @@ void Brw_RemoveGrpZones (long CrsCod,long GrpCod)
char PathGrpFileZones[PATH_MAX + 1];
/***** Set notifications about files in this group zone as removed *****/
Ntf_MarkNotifFilesInGroupAsRemoved (GrpCod);
Ntf_DB_MarkNotifFilesInGroupAsRemoved (GrpCod);
/***** Remove files in the group from database *****/
Brw_RemoveGrpFilesFromDB (GrpCod);

View File

@ -410,7 +410,7 @@ static void Fol_ShowNumberOfFollowingOrFollowers (const struct UsrData *UsrDat,
if (NumUsrs)
{
/* Form to list users */
Frm_StartFormAnchor (Action,Fol_FOLLOW_SECTION_ID);
Frm_BeginFormAnchor (Action,Fol_FOLLOW_SECTION_ID);
Usr_PutParamUsrCodEncrypted (UsrDat->EnUsrCod);
HTM_BUTTON_SUBMIT_Begin (Title,
(Gbl.Action.Act == Action) ? "BT_LINK FOLLOW_NUM_B" :
@ -436,7 +436,7 @@ static void Fol_ShowNumberOfFollowingOrFollowers (const struct UsrData *UsrDat,
if (NumUsrs)
{
/* Form to list users */
Frm_StartFormAnchor (Action,Fol_FOLLOW_SECTION_ID);
Frm_BeginFormAnchor (Action,Fol_FOLLOW_SECTION_ID);
Usr_PutParamUsrCodEncrypted (UsrDat->EnUsrCod);
HTM_BUTTON_SUBMIT_Begin (Title,
(Gbl.Action.Act == Action) ? The_ClassFormLinkOutBoxBold[Gbl.Prefs.Theme] :
@ -1123,7 +1123,7 @@ static void Fol_FollowUsr (struct UsrData *UsrDat)
If this followed wants to receive notifications by email,
activate the sending of a notification *****/
if (CreateNotif)
Ntf_StoreNotifyEventToOneUser (Ntf_EVENT_FOLLOWER,UsrDat,Gbl.Usrs.Me.UsrDat.UsrCod,
Ntf_DB_StoreNotifyEventToOneUser (Ntf_EVENT_FOLLOWER,UsrDat,Gbl.Usrs.Me.UsrDat.UsrCod,
(Ntf_Status_t) (NotifyByEmail ? Ntf_STATUS_BIT_EMAIL :
0),
Gbl.Hierarchy.Ins.InsCod,

View File

@ -68,7 +68,7 @@ void Frm_BeginForm (Act_Action_t NextAction)
Frm_BeginFormAnchorOnSubmit (NextAction,NULL,NULL);
}
void Frm_StartFormAnchor (Act_Action_t NextAction,const char *Anchor)
void Frm_BeginFormAnchor (Act_Action_t NextAction,const char *Anchor)
{
Frm_BeginFormAnchorOnSubmit (NextAction,Anchor,NULL);
}

View File

@ -55,7 +55,7 @@ void Frm_BeginForm (Act_Action_t NextAction);
void Frm_BeginFormOnSubmit (Act_Action_t NextAction,const char *OnSubmit);
void Frm_BeginFormAnchorOnSubmit (Act_Action_t NextAction,const char *Anchor,const char *OnSubmit);
void Frm_BeginFormUnique (Act_Action_t NextAction);
void Frm_StartFormAnchor (Act_Action_t NextAction,const char *Anchor);
void Frm_BeginFormAnchor (Act_Action_t NextAction,const char *Anchor);
void Frm_BeginFormUniqueAnchor (Act_Action_t NextAction,const char *Anchor);
void Frm_BeginFormUniqueAnchorOnSubmit (Act_Action_t NextAction,const char *Anchor,const char *OnSubmit);
void Frm_BeginFormId (Act_Action_t NextAction,const char *Id);

View File

@ -1299,7 +1299,7 @@ static void For_ShowAForumPost (struct For_Forums *Forums,
if (ICanModerateForum)
{
Frm_StartFormAnchor (Enabled ? For_ActionsDisPstFor[Forums->Forum.Type] :
Frm_BeginFormAnchor (Enabled ? For_ActionsDisPstFor[Forums->Forum.Type] :
For_ActionsEnbPstFor[Forums->Forum.Type],
For_FORUM_POSTS_SECTION_ID);
For_PutParamsForum (Forums);
@ -2104,7 +2104,7 @@ static void For_WriteLinkToForum (const struct For_Forums *Forums,
Ico_PutIcon ("paste.svg",Txt_Copy_not_allowed,"CONTEXT_OPT ICO_HIDDEN ICO16x16");
else
{
Frm_StartFormAnchor (For_ActionsPasThrFor[Forum->Type],
Frm_BeginFormAnchor (For_ActionsPasThrFor[Forum->Type],
For_FORUM_THREADS_SECTION_ID);
For_PutAllHiddenParamsForum (1, // Page of threads = first
1, // Page of posts = first
@ -2119,7 +2119,7 @@ static void For_WriteLinkToForum (const struct For_Forums *Forums,
}
/***** Write link to forum *****/
Frm_StartFormAnchor (For_ActionsSeeFor[Forum->Type],
Frm_BeginFormAnchor (For_ActionsSeeFor[Forum->Type],
For_FORUM_THREADS_SECTION_ID);
For_PutAllHiddenParamsForum (1, // Page of threads = first
1, // Page of posts = first
@ -2557,7 +2557,7 @@ static void For_ShowForumThreadsHighlightingOneThread (struct For_Forums *Forums
{
HTM_TH_Begin (1,2,"CM");
Frm_StartFormAnchor (For_ActionsSeeFor[Forums->Forum.Type],
Frm_BeginFormAnchor (For_ActionsSeeFor[Forums->Forum.Type],
For_FORUM_THREADS_SECTION_ID);
For_PutAllHiddenParamsForum (Forums->CurrentPageThrs, // Page of threads = current
1, // Page of posts = first
@ -3574,7 +3574,7 @@ static void For_ListForumThrs (struct For_Forums *Forums,
if (ICanMoveThreads)
{
HTM_BR ();
Frm_StartFormAnchor (For_ActionsCutThrFor[Forums->Forum.Type],
Frm_BeginFormAnchor (For_ActionsCutThrFor[Forums->Forum.Type],
For_FORUM_THREADS_SECTION_ID);
For_PutAllHiddenParamsForum (Forums->CurrentPageThrs, // Page of threads = current
1, // Page of posts = first
@ -4057,13 +4057,13 @@ static void For_WriteFormForumPst (struct For_Forums *Forums,
/***** Begin form *****/
if (IsReply) // Form to write a reply to a post of an existing thread
{
Frm_StartFormAnchor (For_ActionsRecRepFor[Forums->Forum.Type],
Frm_BeginFormAnchor (For_ActionsRecRepFor[Forums->Forum.Type],
For_FORUM_POSTS_SECTION_ID);
For_PutAllHiddenParamsNewPost (Forums);
}
else // Form to write the first post of a new thread
{
Frm_StartFormAnchor (For_ActionsRecThrFor[Forums->Forum.Type],
Frm_BeginFormAnchor (For_ActionsRecThrFor[Forums->Forum.Type],
For_FORUM_POSTS_SECTION_ID);
For_PutAllHiddenParamsNewThread (Forums);
}
@ -4304,8 +4304,8 @@ void For_RemovePost (void)
Med_MediaDestructor (&Media);
/***** Mark possible notifications as removed *****/
Ntf_MarkNotifAsRemoved (Ntf_EVENT_FORUM_POST_COURSE,Forums.PstCod);
Ntf_MarkNotifAsRemoved (Ntf_EVENT_FORUM_REPLY ,Forums.PstCod);
Ntf_DB_MarkNotifAsRemoved (Ntf_EVENT_FORUM_POST_COURSE,Forums.PstCod);
Ntf_DB_MarkNotifAsRemoved (Ntf_EVENT_FORUM_REPLY ,Forums.PstCod);
/***** Mark possible social note as unavailable *****/
switch (Forums.Forum.Type) // Only if forum is public for any logged user

View File

@ -2581,7 +2581,7 @@ void Gam_PutButtonNewMatch (struct Gam_Games *Games,long GamCod)
{
extern const char *Txt_New_match;
Frm_StartFormAnchor (ActReqNewMch,Mch_NEW_MATCH_SECTION_ID);
Frm_BeginFormAnchor (ActReqNewMch,Mch_NEW_MATCH_SECTION_ID);
Games->GamCod = GamCod;
Gam_PutParams (Games);

View File

@ -388,7 +388,7 @@ void Grp_ShowFormToSelectSeveralGroups (void (*FuncParams) (void *Args),void *Ar
/***** Begin form to update the students listed
depending on the groups selected *****/
Frm_StartFormAnchor (Gbl.Action.Act, // Repeat current action
Frm_BeginFormAnchor (Gbl.Action.Act, // Repeat current action
Usr_USER_LIST_SECTION_ID);
Usr_PutParamsPrefsAboutUsrList ();
if (FuncParams)
@ -1265,7 +1265,7 @@ static void Grp_ListGroupTypesForEdition (void)
/* Name of group type */
HTM_TD_Begin ("class=\"LM\"");
Frm_StartFormAnchor (ActRenGrpTyp,Grp_GROUP_TYPES_SECTION_ID);
Frm_BeginFormAnchor (ActRenGrpTyp,Grp_GROUP_TYPES_SECTION_ID);
Grp_PutParamGrpTypCod (&Gbl.Crs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp].GrpTypCod);
HTM_INPUT_TEXT ("GrpTypName",Grp_MAX_CHARS_GROUP_TYPE_NAME,
Gbl.Crs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp].GrpTypName,
@ -1276,7 +1276,7 @@ static void Grp_ListGroupTypesForEdition (void)
/* Is it mandatory to register in any group? */
HTM_TD_Begin ("class=\"CM\"");
Frm_StartFormAnchor (ActChgMdtGrpTyp,Grp_GROUP_TYPES_SECTION_ID);
Frm_BeginFormAnchor (ActChgMdtGrpTyp,Grp_GROUP_TYPES_SECTION_ID);
Grp_PutParamGrpTypCod (&Gbl.Crs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp].GrpTypCod);
HTM_SELECT_Begin (HTM_SUBMIT_ON_CHANGE,
"name=\"MandatoryEnrolment\""
@ -1293,7 +1293,7 @@ static void Grp_ListGroupTypesForEdition (void)
/* Is it possible to register in multiple groups? */
HTM_TD_Begin ("class=\"CM\"");
Frm_StartFormAnchor (ActChgMulGrpTyp,Grp_GROUP_TYPES_SECTION_ID);
Frm_BeginFormAnchor (ActChgMulGrpTyp,Grp_GROUP_TYPES_SECTION_ID);
Grp_PutParamGrpTypCod (&Gbl.Crs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp].GrpTypCod);
HTM_SELECT_Begin (HTM_SUBMIT_ON_CHANGE,
"name=\"MultipleEnrolment\""
@ -1310,7 +1310,7 @@ static void Grp_ListGroupTypesForEdition (void)
/* Open time */
HTM_TD_Begin ("class=\"LM\"");
Frm_StartFormAnchor (ActChgTimGrpTyp,Grp_GROUP_TYPES_SECTION_ID);
Frm_BeginFormAnchor (ActChgTimGrpTyp,Grp_GROUP_TYPES_SECTION_ID);
Grp_PutParamGrpTypCod (&Gbl.Crs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp].GrpTypCod);
HTM_TABLE_BeginCenterPadding (2);
HTM_TR_Begin (NULL);
@ -1460,7 +1460,7 @@ static void Grp_ListGroupsForEdition (const struct Roo_Rooms *Rooms)
/***** Icon to open/close group *****/
HTM_TD_Begin ("class=\"BM\"");
Frm_StartFormAnchor (Grp->Open ? ActCloGrp :
Frm_BeginFormAnchor (Grp->Open ? ActCloGrp :
ActOpeGrp,
Grp_GROUPS_SECTION_ID);
Grp_PutParamGrpCod (&Grp->GrpCod);
@ -1475,7 +1475,7 @@ static void Grp_ListGroupsForEdition (const struct Roo_Rooms *Rooms)
/***** Icon to activate file zones for this group *****/
HTM_TD_Begin ("class=\"BM\"");
Frm_StartFormAnchor (Grp->FileZones ? ActDisFilZonGrp :
Frm_BeginFormAnchor (Grp->FileZones ? ActDisFilZonGrp :
ActEnaFilZonGrp,
Grp_GROUPS_SECTION_ID);
Grp_PutParamGrpCod (&Grp->GrpCod);
@ -1491,7 +1491,7 @@ static void Grp_ListGroupsForEdition (const struct Roo_Rooms *Rooms)
/***** Group type *****/
/* Start selector */
HTM_TD_Begin ("class=\"CM\"");
Frm_StartFormAnchor (ActChgGrpTyp,Grp_GROUPS_SECTION_ID);
Frm_BeginFormAnchor (ActChgGrpTyp,Grp_GROUPS_SECTION_ID);
Grp_PutParamGrpCod (&Grp->GrpCod);
HTM_SELECT_Begin (HTM_SUBMIT_ON_CHANGE,
"name=\"GrpTypCod\" style=\"width:100px;\"");
@ -1514,7 +1514,7 @@ static void Grp_ListGroupsForEdition (const struct Roo_Rooms *Rooms)
/***** Group name *****/
HTM_TD_Begin ("class=\"CM\"");
Frm_StartFormAnchor (ActRenGrp,Grp_GROUPS_SECTION_ID);
Frm_BeginFormAnchor (ActRenGrp,Grp_GROUPS_SECTION_ID);
Grp_PutParamGrpCod (&Grp->GrpCod);
HTM_INPUT_TEXT ("GrpName",Grp_MAX_CHARS_GROUP_NAME,Grp->GrpName,
HTM_SUBMIT_ON_CHANGE,
@ -1525,7 +1525,7 @@ static void Grp_ListGroupsForEdition (const struct Roo_Rooms *Rooms)
/***** Room *****/
/* Start selector */
HTM_TD_Begin ("class=\"CM\"");
Frm_StartFormAnchor (ActChgGrpRoo,Grp_GROUPS_SECTION_ID);
Frm_BeginFormAnchor (ActChgGrpRoo,Grp_GROUPS_SECTION_ID);
Grp_PutParamGrpCod (&Grp->GrpCod);
HTM_SELECT_Begin (HTM_SUBMIT_ON_CHANGE,
"name=\"RooCod\" style=\"width:100px;\"");
@ -1565,7 +1565,7 @@ static void Grp_ListGroupsForEdition (const struct Roo_Rooms *Rooms)
/***** Maximum number of students of the group (row[3]) *****/
HTM_TD_Begin ("class=\"CM\"");
Frm_StartFormAnchor (ActChgMaxStdGrp,Grp_GROUPS_SECTION_ID);
Frm_BeginFormAnchor (ActChgMaxStdGrp,Grp_GROUPS_SECTION_ID);
Grp_PutParamGrpCod (&Grp->GrpCod);
Grp_WriteMaxStds (StrMaxStudents,Grp->MaxStudents);
HTM_INPUT_TEXT ("MaxStudents",Cns_MAX_DECIMAL_DIGITS_UINT,StrMaxStudents,
@ -2415,7 +2415,7 @@ static void Grp_PutFormToCreateGroupType (void)
HTM_SECTION_Begin (Grp_NEW_GROUP_TYPE_SECTION_ID);
/***** Begin form *****/
Frm_StartFormAnchor (ActNewGrpTyp,Grp_GROUP_TYPES_SECTION_ID);
Frm_BeginFormAnchor (ActNewGrpTyp,Grp_GROUP_TYPES_SECTION_ID);
/***** Begin box *****/
Box_BoxTableBegin (NULL,Txt_New_type_of_group,
@ -2530,7 +2530,7 @@ static void Grp_PutFormToCreateGroup (const struct Roo_Rooms *Rooms)
HTM_SECTION_Begin (Grp_NEW_GROUP_SECTION_ID);
/***** Begin form *****/
Frm_StartFormAnchor (ActNewGrp,Grp_GROUPS_SECTION_ID);
Frm_BeginFormAnchor (ActNewGrp,Grp_GROUPS_SECTION_ID);
/***** Begin box and table *****/
Box_BoxTableBegin (NULL,Txt_New_group,

View File

@ -1453,7 +1453,7 @@ void Ind_ComputeAndStoreIndicatorsCrs (long CrsCod,int NumIndicatorsFromDB,
/***** Indicator #3: information about online tutoring *****/
IndicatorsCrs->NumThreads = For_DB_GetNumTotalThrsInForumsOfType (For_FORUM_COURSE_USRS,-1L,-1L,-1L,-1L,CrsCod);
IndicatorsCrs->NumPosts = For_GetNumTotalPstsInForumsOfType (For_FORUM_COURSE_USRS,-1L,-1L,-1L,-1L,CrsCod,&(IndicatorsCrs->NumUsrsToBeNotifiedByEMail));
IndicatorsCrs->NumMsgsSentByTchs = Msg_GetNumMsgsSentByTchsCrs (CrsCod);
IndicatorsCrs->NumMsgsSentByTchs = Msg_DB_GetNumMsgsSentByTchsCrs (CrsCod);
IndicatorsCrs->ThereIsOnlineTutoring = (IndicatorsCrs->NumThreads != 0) ||
(IndicatorsCrs->NumPosts != 0) ||
(IndicatorsCrs->NumMsgsSentByTchs != 0);

View File

@ -1233,7 +1233,7 @@ void Lay_PutContextualLinkOnlyIcon (Act_Action_t NextAction,const char *Anchor,
const char *Title)
{
/***** Begin form *****/
Frm_StartFormAnchor (NextAction,Anchor);
Frm_BeginFormAnchor (NextAction,Anchor);
if (FuncParams)
FuncParams (Args);
@ -1260,7 +1260,7 @@ void Lay_PutContextualLinkIconText (Act_Action_t NextAction,const char *Anchor,
// jumping to the next line on narrow screens
/***** Begin form *****/
Frm_StartFormAnchor (NextAction,Anchor);
Frm_BeginFormAnchor (NextAction,Anchor);
if (FuncParams)
FuncParams (Args);
@ -1294,7 +1294,7 @@ void Lay_PutContextualLinkIconTextOnSubmit (Act_Action_t NextAction,const char *
// jumping to the next line on narrow screens
/***** Begin form *****/
Frm_StartFormAnchor (NextAction,Anchor);
Frm_BeginFormAnchor (NextAction,Anchor);
if (FuncParams)
FuncParams (Args);

View File

@ -1323,7 +1323,7 @@ static void Mai_ShowFormChangeUsrEmail (bool ItsMe,
{
HTM_BR ();
if (ItsMe)
Frm_StartFormAnchor (ActChgMyMai,Mai_EMAIL_SECTION_ID);
Frm_BeginFormAnchor (ActChgMyMai,Mai_EMAIL_SECTION_ID);
else
{
switch (UsrDat->Roles.InCurrentCrs)
@ -1339,7 +1339,7 @@ static void Mai_ShowFormChangeUsrEmail (bool ItsMe,
NextAction = ActNewMaiOth;
break;
}
Frm_StartFormAnchor (NextAction,Mai_EMAIL_SECTION_ID);
Frm_BeginFormAnchor (NextAction,Mai_EMAIL_SECTION_ID);
Usr_PutParamUsrCodEncrypted (UsrDat->EnUsrCod);
}
Par_PutHiddenParamString (NULL,"NewEmail",row[0]);
@ -1369,7 +1369,7 @@ static void Mai_ShowFormChangeUsrEmail (bool ItsMe,
/* Data */
HTM_TD_Begin ("class=\"REC_C2_BOT LT DAT\"");
if (ItsMe)
Frm_StartFormAnchor (ActChgMyMai,Mai_EMAIL_SECTION_ID);
Frm_BeginFormAnchor (ActChgMyMai,Mai_EMAIL_SECTION_ID);
else
{
switch (UsrDat->Roles.InCurrentCrs)
@ -1385,7 +1385,7 @@ static void Mai_ShowFormChangeUsrEmail (bool ItsMe,
NextAction = ActNewMaiOth;
break;
}
Frm_StartFormAnchor (NextAction,Mai_EMAIL_SECTION_ID);
Frm_BeginFormAnchor (NextAction,Mai_EMAIL_SECTION_ID);
Usr_PutParamUsrCodEncrypted (UsrDat->EnUsrCod);
}
HTM_INPUT_EMAIL ("NewEmail",Cns_MAX_CHARS_EMAIL_ADDRESS,Gbl.Usrs.Me.UsrDat.Email,

View File

@ -1460,7 +1460,7 @@ static void Mch_PutFormExistingMatch (struct Gam_Games *Games,
extern const char *Txt_Save_changes;
/***** Begin form *****/
Frm_StartFormAnchor (ActChgMch,Anchor);
Frm_BeginFormAnchor (ActChgMch,Anchor);
Mch_PutParamsEdit (Games);
/***** Begin box and table *****/

View File

@ -594,7 +594,7 @@ static void MchRes_ListGamesToSelect (struct Gam_Games *Games)
/***** Begin form to update the results
depending on the games selected *****/
Frm_StartFormAnchor (Gbl.Action.Act,MchRes_RESULTS_TABLE_ID);
Frm_BeginFormAnchor (Gbl.Action.Act,MchRes_RESULTS_TABLE_ID);
Grp_PutParamsCodGrps ();
Usr_PutHiddenParSelectedUsrsCods (&Gbl.Usrs.Selected);

View File

@ -97,7 +97,7 @@ static void Msg_PutFormMsgUsrs (struct Msg_Messages *Messages,
char Content[Cns_MAX_BYTES_LONG_TEXT + 1]);
static void Msg_ShowSentOrReceivedMessages (struct Msg_Messages *Messages);
static unsigned Msg_GetNumUsrsBannedByMe (void);
static unsigned Msg_DB_GetNumUsrsBannedByMe (void);
static void Msg_PutLinkToViewBannedUsers(void);
static unsigned Msg_GetSentOrReceivedMsgs (const struct Msg_Messages *Messages,
long UsrCod,
@ -118,7 +118,7 @@ static void Msg_ShowFormToShowOnlyUnreadMessages (const struct Msg_Messages *Mes
static bool Msg_GetParamOnlyUnreadMsgs (void);
static void Msg_ShowASentOrReceivedMessage (struct Msg_Messages *Messages,
long MsgNum,long MsgCod);
static bool Msg_GetStatusOfSentMsg (long MsgCod);
static bool Msg_DB_GetStatusOfSentMsg (long MsgCod);
static void Msg_GetStatusOfReceivedMsg (long MsgCod,bool *Open,bool *Replied,bool *Expanded);
static long Msg_GetParamMsgCod (void);
static void Msg_PutLinkToShowMorePotentialRecipients (const struct Msg_Messages *Messages);
@ -144,8 +144,8 @@ static void Msg_MakeFilterFromToSubquery (const struct Msg_Messages *Messages,
static void Msg_ExpandSentMsg (long MsgCod);
static void Msg_ExpandReceivedMsg (long MsgCod);
static void Msg_ContractSentMsg (long MsgCod);
static void Msg_ContractReceivedMsg (long MsgCod);
static void Msg_DB_ContractSentMsg (long MsgCod);
static void Msg_DB_ContractReceivedMsg (long MsgCod);
static long Msg_InsertNewMsg (const char *Subject,const char *Content,
struct Med_Media *Media);
@ -153,14 +153,13 @@ static long Msg_InsertNewMsg (const char *Subject,const char *Content,
static unsigned long Msg_DelSomeRecOrSntMsgsUsr (const struct Msg_Messages *Messages,
long UsrCod,
const char *FilterFromToSubquery);
static void Msg_InsertReceivedMsgIntoDB (long MsgCod,long UsrCod,
bool NotifyByEmail);
static void Msg_SetReceivedMsgAsReplied (long MsgCod);
static void Msg_DB_InsertReceivedMsg (long MsgCod,long UsrCod,bool NotifyByEmail);
static void Msg_DB_SetReceivedMsgAsReplied (long MsgCod);
static void Msg_MoveReceivedMsgToDeleted (long MsgCod,long UsrCod);
static void Msg_MoveSentMsgToDeleted (long MsgCod);
static void Msg_MoveMsgContentToDeleted (long MsgCod);
static bool Msg_CheckIfSentMsgIsDeleted (long MsgCod);
static bool Msg_CheckIfReceivedMsgIsDeletedForAllItsRecipients (long MsgCod);
static bool Msg_DB_CheckIfSentMsgIsDeleted (long MsgCod);
static bool Msg_DB_CheckIfReceivedMsgIsDeletedForAllItsRecipients (long MsgCod);
static unsigned Msg_GetNumUnreadMsgs (const struct Msg_Messages *Messages,
const char *FilterFromToSubquery);
@ -168,7 +167,7 @@ static void Msg_GetMsgSntData (long MsgCod,long *CrsCod,long *UsrCod,
time_t *CreatTimeUTC,
char Subject[Cns_MAX_BYTES_SUBJECT + 1],
bool *Deleted);
static void Msg_GetMsgSubject (long MsgCod,char Subject[Cns_MAX_BYTES_SUBJECT + 1]);
static void Msg_DB_GetMsgSubject (long MsgCod,char Subject[Cns_MAX_BYTES_SUBJECT + 1]);
static void Msg_GetMsgContent (long MsgCod,char Content[Cns_MAX_BYTES_LONG_TEXT + 1],
struct Med_Media *Media);
@ -547,19 +546,16 @@ static void Msg_WriteFormUsrsIDsOrNicksOtherRecipients (void)
/***** Title *****/
HTM_TR_Begin (NULL);
HTM_TH_Begin (1,ColSpan,"LM LIGHT_BLUE");
HTM_LABEL_Begin ("for=\"OtherRecipients\"");
HTM_TxtColon (StdsAndTchsWritten ? Txt_Other_recipients :
Txt_Recipients);
HTM_LABEL_End ();
HTM_TH_End ();
HTM_TR_End ();
/***** Textarea with users' @nicknames, emails or IDs *****/
HTM_TR_Begin (NULL);
HTM_TD_Begin ("colspan=\"%u\" class=\"LM\"",ColSpan);
HTM_TEXTAREA_Begin ("id=\"OtherRecipients\" name=\"OtherRecipients\""
" class=\"MSG_RECIPIENTS\" rows=\"2\" placeholder=\"%s\"",
@ -570,13 +566,12 @@ static void Msg_WriteFormUsrsIDsOrNicksOtherRecipients (void)
// and there's no list of explicit recipients,
// write @nickname of original sender
{
Nck_GetNicknameFromUsrCod (Gbl.Usrs.Other.UsrDat.UsrCod,Nickname);
Nck_DB_GetNicknameFromUsrCod (Gbl.Usrs.Other.UsrDat.UsrCod,Nickname);
if (Nickname[0])
HTM_TxtF ("@%s",Nickname);
}
HTM_TEXTAREA_End ();
HTM_TD_End ();
HTM_TR_End ();
}
@ -641,7 +636,6 @@ static void Msg_WriteFormSubjectAndContentMsgToUsrs (struct Msg_Messages *Messag
HTM_TEXTAREA_End ();
HTM_TD_End ();
HTM_TR_End ();
/***** Message content *****/
@ -655,7 +649,7 @@ static void Msg_WriteFormSubjectAndContentMsgToUsrs (struct Msg_Messages *Messag
HTM_TEXTAREA_Begin ("id=\"MsgContent\" name=\"Content\""
" class=\"MSG_CONTENT\" rows=\"20\"");
/* Start textarea with a '\n', that will be not visible in textarea.
/* Begin textarea with a '\n', that will be not visible in textarea.
When Content is "\nLorem ipsum" (a white line before "Lorem ipsum"),
if we don't put the initial '\n' ==> the form will be sent starting
by "Lorem", without the white line */
@ -665,6 +659,8 @@ static void Msg_WriteFormSubjectAndContentMsgToUsrs (struct Msg_Messages *Messag
HTM_TxtF ("\n\n----- %s -----\n",Txt_Original_message);
Msg_WriteMsgContent (Content,Cns_MAX_BYTES_LONG_TEXT,false,true);
HTM_TEXTAREA_End ();
HTM_TD_End ();
}
else // It's not a reply
{
@ -687,15 +683,14 @@ static void Msg_WriteFormSubjectAndContentMsgToUsrs (struct Msg_Messages *Messag
HTM_TEXTAREA_Begin ("id=\"MsgContent\" name=\"Content\""
" class=\"MSG_CONTENT\" rows=\"20\"");
/* Start textarea with a '\n', that will be not visible in textarea.
/* Begin textarea with a '\n', that will be not visible in textarea.
When Content is "\nLorem ipsum" (a white line before "Lorem ipsum"),
if we don't put the initial '\n' ==> the form will be sent starting
by "Lorem", without the white line */
HTM_TxtF ("\n%s",Content);
}
HTM_TEXTAREA_End ();
HTM_TD_End ();
}
HTM_TR_End ();
}
@ -840,7 +835,7 @@ void Msg_RecMsgFromUsr (void)
Usr_DONT_GET_ROLE_IN_CURRENT_CRS))
{
/***** Check if recipient has banned me *****/
RecipientHasBannedMe = Msg_CheckIfUsrIsBanned (Gbl.Usrs.Me.UsrDat.UsrCod,UsrDstData.UsrCod);
RecipientHasBannedMe = Msg_DB_CheckIfUsrIsBanned (Gbl.Usrs.Me.UsrDat.UsrCod,UsrDstData.UsrCod);
if (RecipientHasBannedMe)
/***** Show an alert indicating that the message has not been sent successfully *****/
@ -868,13 +863,13 @@ void Msg_RecMsgFromUsr (void)
/***** Create the received message for this recipient
and increment number of new messages received by this recipient *****/
Msg_InsertReceivedMsgIntoDB (NewMsgCod,UsrDstData.UsrCod,NotifyByEmail);
Msg_DB_InsertReceivedMsg (NewMsgCod,UsrDstData.UsrCod,NotifyByEmail);
/***** Create notification for this recipient.
If this recipient wants to receive notifications by -mail,
activate the sending of a notification *****/
if (CreateNotif)
Ntf_StoreNotifyEventToOneUser (Ntf_EVENT_MESSAGE,&UsrDstData,NewMsgCod,
Ntf_DB_StoreNotifyEventToOneUser (Ntf_EVENT_MESSAGE,&UsrDstData,NewMsgCod,
(Ntf_Status_t) (NotifyByEmail ? Ntf_STATUS_BIT_EMAIL :
0),
Gbl.Hierarchy.Ins.InsCod,
@ -913,7 +908,7 @@ void Msg_RecMsgFromUsr (void)
/***** Update received message setting Replied field to true *****/
if (Replied)
Msg_SetReceivedMsgAsReplied (OriginalMsgCod);
Msg_DB_SetReceivedMsgAsReplied (OriginalMsgCod);
/***** Write final message *****/
if (NumRecipients)
@ -1294,7 +1289,7 @@ void Msg_ConSntMsg (void)
Err_WrongMessageExit ();
/***** Contract the message *****/
Msg_ContractSentMsg (MsgCod);
Msg_DB_ContractSentMsg (MsgCod);
/***** Show again the messages *****/
Msg_ShowSntMsgs ();
@ -1313,7 +1308,7 @@ void Msg_ConRecMsg (void)
Err_WrongMessageExit ();
/***** Contract the message *****/
Msg_ContractReceivedMsg (MsgCod);
Msg_DB_ContractReceivedMsg (MsgCod);
/***** Show again the messages *****/
Msg_ShowRecMsgs ();
@ -1374,7 +1369,7 @@ static void Msg_ExpandReceivedMsg (long MsgCod)
/************************** Contract a sent message **************************/
/*****************************************************************************/
static void Msg_ContractSentMsg (long MsgCod)
static void Msg_DB_ContractSentMsg (long MsgCod)
{
/***** Contract message in sent message table *****/
DB_QueryUPDATE ("can not contract a sent message",
@ -1390,7 +1385,7 @@ static void Msg_ContractSentMsg (long MsgCod)
/************************ Contract a received message ************************/
/*****************************************************************************/
static void Msg_ContractReceivedMsg (long MsgCod)
static void Msg_DB_ContractReceivedMsg (long MsgCod)
{
/***** Contract message in received message table *****/
DB_QueryUPDATE ("can not contract a received message",
@ -1406,7 +1401,7 @@ static void Msg_ContractReceivedMsg (long MsgCod)
/********************** Mark a received message as open **********************/
/*****************************************************************************/
void Msg_SetReceivedMsgAsOpen (long MsgCod,long UsrCod)
void Msg_DB_SetReceivedMsgAsOpen (long MsgCod,long UsrCod)
{
/***** Mark message as read by user *****/
DB_QueryUPDATE ("can not mark a received message as open",
@ -1554,8 +1549,7 @@ void Msg_DelAllRecAndSntMsgsUsr (long UsrCod)
/**** Insert a message y su destinatario in the table of messages received ***/
/*****************************************************************************/
static void Msg_InsertReceivedMsgIntoDB (long MsgCod,long UsrCod,
bool NotifyByEmail)
static void Msg_DB_InsertReceivedMsg (long MsgCod,long UsrCod,bool NotifyByEmail)
{
/***** Insert message received in the database *****/
DB_QueryINSERT ("can not create received message",
@ -1573,7 +1567,7 @@ static void Msg_InsertReceivedMsgIntoDB (long MsgCod,long UsrCod,
/******** Update received message by setting Replied field to true ***********/
/*****************************************************************************/
static void Msg_SetReceivedMsgAsReplied (long MsgCod)
static void Msg_DB_SetReceivedMsgAsReplied (long MsgCod)
{
/***** Update received message by setting Replied field to true *****/
DB_QueryUPDATE ("can not update a received message",
@ -1616,8 +1610,8 @@ static void Msg_MoveReceivedMsgToDeleted (long MsgCod,long UsrCod)
UsrCod);
/***** If message content is not longer necessary, move it to msg_content_deleted *****/
if (Msg_CheckIfSentMsgIsDeleted (MsgCod))
if (Msg_CheckIfReceivedMsgIsDeletedForAllItsRecipients (MsgCod))
if (Msg_DB_CheckIfSentMsgIsDeleted (MsgCod))
if (Msg_DB_CheckIfReceivedMsgIsDeletedForAllItsRecipients (MsgCod))
Msg_MoveMsgContentToDeleted (MsgCod);
/***** Mark possible notifications as removed *****/
@ -1650,7 +1644,7 @@ static void Msg_MoveSentMsgToDeleted (long MsgCod)
MsgCod);
/***** If message content is not longer necessary, move it to msg_content_deleted *****/
if (Msg_CheckIfReceivedMsgIsDeletedForAllItsRecipients (MsgCod))
if (Msg_DB_CheckIfReceivedMsgIsDeletedForAllItsRecipients (MsgCod))
Msg_MoveMsgContentToDeleted (MsgCod);
}
@ -1723,7 +1717,7 @@ void Msg_MoveUnusedMsgsContentToDeleted (void)
/******************** Check if a sent message is deleted *********************/
/*****************************************************************************/
static bool Msg_CheckIfSentMsgIsDeleted (long MsgCod)
static bool Msg_DB_CheckIfSentMsgIsDeleted (long MsgCod)
{
/***** Get if the message code is in table of sent messages not deleted *****/
return (DB_QueryCOUNT ("can not check if a sent message is deleted",
@ -1739,7 +1733,7 @@ static bool Msg_CheckIfSentMsgIsDeleted (long MsgCod)
/***** Check if a received message has been deleted by all its recipients ****/
/*****************************************************************************/
static bool Msg_CheckIfReceivedMsgIsDeletedForAllItsRecipients (long MsgCod)
static bool Msg_DB_CheckIfReceivedMsgIsDeletedForAllItsRecipients (long MsgCod)
{
/***** Get if the message code is in table of received messages not deleted *****/
return (DB_QueryCOUNT ("can not check if a received message"
@ -1868,7 +1862,7 @@ void Msg_ShowRecMsgs (void)
/***** Reset messages context *****/
Msg_ResetMessages (&Messages);
if (Msg_GetNumUsrsBannedByMe ())
if (Msg_DB_GetNumUsrsBannedByMe ())
{
/***** Contextual menu *****/
Mnu_ContextMenuBegin ();
@ -1983,6 +1977,7 @@ static void Msg_ShowSentOrReceivedMessages (struct Msg_Messages *Messages)
if (Messages->TypeOfMessages == Msg_RECEIVED)
Msg_ShowFormToShowOnlyUnreadMessages (Messages);
HTM_DIV_End ();
Msg_ShowFormToFilterMsgs (Messages);
/***** Contextual menu *****/
@ -1999,7 +1994,6 @@ static void Msg_ShowSentOrReceivedMessages (struct Msg_Messages *Messages)
/* End box */
Box_BoxEnd ();
if (Messages->NumMsgs) // If there are messages...
{
if (Gbl.Action.Act == ActExpRcvMsg) // Expanding a message, perhaps it is the result of following a link
@ -2070,7 +2064,7 @@ static void Msg_ShowSentOrReceivedMessages (struct Msg_Messages *Messages)
/********************* Get number of user I have banned **********************/
/*****************************************************************************/
static unsigned Msg_GetNumUsrsBannedByMe (void)
static unsigned Msg_DB_GetNumUsrsBannedByMe (void)
{
/***** Get number of users I have banned *****/
return (unsigned)
@ -2306,7 +2300,7 @@ static unsigned Msg_GetSentOrReceivedMsgs (const struct Msg_Messages *Messages,
/**** Get the number of unique messages sent by any teacher from a course ****/
/*****************************************************************************/
unsigned Msg_GetNumMsgsSentByTchsCrs (long CrsCod)
unsigned Msg_DB_GetNumMsgsSentByTchsCrs (long CrsCod)
{
/***** Get the number of unique messages sent by any teacher from this course *****/
return (unsigned)
@ -2327,7 +2321,7 @@ unsigned Msg_GetNumMsgsSentByTchsCrs (long CrsCod)
/************** Get the number of unique messages sent by a user *************/
/*****************************************************************************/
unsigned Msg_GetNumMsgsSentByUsr (long UsrCod)
unsigned Msg_DB_GetNumMsgsSentByUsr (long UsrCod)
{
/***** Get the number of unique messages sent by any teacher from this course *****/
return (unsigned)
@ -3125,14 +3119,14 @@ static void Msg_GetMsgSntData (long MsgCod,long *CrsCod,long *UsrCod,
DB_FreeMySQLResult (&mysql_res);
/***** Get subject of message from database *****/
Msg_GetMsgSubject (MsgCod,Subject);
Msg_DB_GetMsgSubject (MsgCod,Subject);
}
/*****************************************************************************/
/************************ Get the subject of a message ***********************/
/*****************************************************************************/
static void Msg_GetMsgSubject (long MsgCod,char Subject[Cns_MAX_BYTES_SUBJECT + 1])
static void Msg_DB_GetMsgSubject (long MsgCod,char Subject[Cns_MAX_BYTES_SUBJECT + 1])
{
/***** Get subject of message from database *****/
DB_QuerySELECTString (Subject,Cns_MAX_BYTES_SUBJECT,
@ -3180,7 +3174,7 @@ static void Msg_GetMsgContent (long MsgCod,char Content[Cns_MAX_BYTES_LONG_TEXT
/********************** Get if a sent message is expanded ********************/
/*****************************************************************************/
static bool Msg_GetStatusOfSentMsg (long MsgCod)
static bool Msg_DB_GetStatusOfSentMsg (long MsgCod)
{
char StrExpanded[1 + 1];
@ -3223,13 +3217,11 @@ static void Msg_GetStatusOfReceivedMsg (long MsgCod,bool *Open,bool *Replied,boo
/***** Get number of rows *****/
row = mysql_fetch_row (mysql_res);
/***** Get if message has been read by me *****/
/***** Get if message has been read by me (row[0]),
if message has been replied (row[1]), and
if message is expanded (row[2]) *****/
*Open = (row[0][0] == 'Y');
/***** Get if message has been replied *****/
*Replied = (row[1][0] == 'Y');
/***** Get if message is expanded *****/
*Expanded = (row[2][0] == 'Y');
/***** Free structure that stores the query result *****/
@ -3280,7 +3272,7 @@ static void Msg_ShowASentOrReceivedMessage (struct Msg_Messages *Messages,
Msg_GetStatusOfReceivedMsg (MsgCod,&Open,&Replied,&Expanded);
break;
case Msg_SENT:
Expanded = Msg_GetStatusOfSentMsg (MsgCod);
Expanded = Msg_DB_GetStatusOfSentMsg (MsgCod);
break;
default:
break;
@ -3508,6 +3500,7 @@ static void Msg_WriteSentOrReceivedMsgSubject (struct Msg_Messages *Messages,
ActExpSntMsg));
Messages->MsgCod = MsgCod; // Message to be contracted/expanded
Msg_PutHiddenParamsOneMsg (Messages);
HTM_BUTTON_SUBMIT_Begin (Expanded ? Txt_Hide_message :
Txt_See_message,
Open ? "BT_LINK LT MSG_TIT" :
@ -3522,6 +3515,7 @@ static void Msg_WriteSentOrReceivedMsgSubject (struct Msg_Messages *Messages,
/***** End form to expand the message *****/
HTM_BUTTON_End ();
Frm_EndForm ();
/***** End cell *****/
@ -3659,7 +3653,7 @@ static void Msg_WriteFormToReply (long MsgCod,long CrsCod,
extern const char *Txt_Go_to_course_and_reply;
extern const char *Txt_Go_to_course_and_reply_again;
/***** Form start and parameters *****/
/***** Begin form and parameters *****/
if (FromThisCrs)
Frm_BeginForm (ActReqMsgUsr);
else // Not the current course ==> go to another course
@ -3673,12 +3667,14 @@ static void Msg_WriteFormToReply (long MsgCod,long CrsCod,
Usr_PutParamUsrCodEncrypted (UsrDat->EnUsrCod);
Par_PutHiddenParamChar ("ShowOnlyOneRecipient",'Y');
/****** Link and form end *****/
/****** Link *****/
Ico_PutIconLink ("reply.svg",
FromThisCrs ? (Replied ? Txt_Reply_again :
Txt_Reply) :
(Replied ? Txt_Go_to_course_and_reply_again :
Txt_Go_to_course_and_reply));
/****** End form *****/
Frm_EndForm ();
}
@ -3718,7 +3714,7 @@ static void Msg_WriteMsgFrom (struct Msg_Messages *Messages,
if (Act_GetSuperAction (Gbl.Action.Act) == ActSeeRcvMsg)
{
HTM_NBSP ();
if (Msg_CheckIfUsrIsBanned (UsrDat->UsrCod,Gbl.Usrs.Me.UsrDat.UsrCod))
if (Msg_DB_CheckIfUsrIsBanned (UsrDat->UsrCod,Gbl.Usrs.Me.UsrDat.UsrCod))
// Sender is banned
Msg_PutFormToUnbanSender (Messages,UsrDat);
else
@ -3953,7 +3949,7 @@ void Msg_WriteMsgDate (time_t TimeUTC,const char *ClassBackground)
if (asprintf (&Id,"msg_date_%u",UniqueId) < 0)
Err_NotEnoughMemoryExit ();
/***** Start cell *****/
/***** Begin cell *****/
HTM_TD_Begin ("id=\"%s\" class=\"%s RT\" style=\"width:106px;\"",
Id,ClassBackground);
@ -4134,7 +4130,7 @@ static void Msg_UnbanSender (void)
/**************** Chech if a user is banned by another user ******************/
/*****************************************************************************/
bool Msg_CheckIfUsrIsBanned (long FromUsrCod,long ToUsrCod)
bool Msg_DB_CheckIfUsrIsBanned (long FromUsrCod,long ToUsrCod)
{
/***** Get if FromUsrCod is banned by ToUsrCod *****/
return (DB_QueryCOUNT ("can not check if a user is banned",

View File

@ -101,7 +101,7 @@ void Msg_ExpSntMsg (void);
void Msg_ExpRecMsg (void);
void Msg_ConSntMsg (void);
void Msg_ConRecMsg (void);
void Msg_SetReceivedMsgAsOpen (long MsgCod,long UsrCod);
void Msg_DB_SetReceivedMsgAsOpen (long MsgCod,long UsrCod);
void Msg_DelAllRecAndSntMsgsUsr (long UsrCod);
void Msg_MoveUnusedMsgsContentToDeleted (void);
@ -109,8 +109,8 @@ void Msg_MoveUnusedMsgsContentToDeleted (void);
void Msg_ShowSntMsgs (void);
void Msg_ShowRecMsgs (void);
unsigned Msg_GetNumMsgsSentByTchsCrs (long CrsCod);
unsigned Msg_GetNumMsgsSentByUsr (long UsrCod);
unsigned Msg_DB_GetNumMsgsSentByTchsCrs (long CrsCod);
unsigned Msg_DB_GetNumMsgsSentByUsr (long UsrCod);
unsigned Msg_GetNumMsgsSent (HieLvl_Level_t Scope,Msg_Status_t MsgStatus);
unsigned Msg_GetNumMsgsReceived (HieLvl_Level_t Scope,Msg_Status_t MsgStatus);
@ -128,7 +128,7 @@ void Msg_PutHiddenParamMsgCod (long MsgCod);
void Msg_BanSenderWhenShowingMsgs (void);
void Msg_UnbanSenderWhenShowingMsgs (void);
void Msg_UnbanSenderWhenListingUsrs (void);
bool Msg_CheckIfUsrIsBanned (long FromUsrCod,long ToUsrCod);
bool Msg_DB_CheckIfUsrIsBanned (long FromUsrCod,long ToUsrCod);
void Msg_DB_RemoveUsrFromBanned (long UsrCod);
void Msg_ListBannedUsrs (void);

View File

@ -282,12 +282,12 @@ void Net_ShowFormMyWebsAndSocialNets (void)
Net_PutIconsWebsSocialNetworks,NULL,
Hlp_PROFILE_Webs,Box_NOT_CLOSABLE);
/***** Begin form *****/
Frm_BeginFormAnchor (ActChgMyNet,Net_MY_WEBS_ID);
/***** Begin table *****/
HTM_TABLE_BeginPadding (2);
/***** Begin form *****/
Frm_StartFormAnchor (ActChgMyNet,Net_MY_WEBS_ID);
/***** List webs and social networks *****/
for (NumURL = (Net_WebsAndSocialNetworks_t) 0;
NumURL <= (Net_WebsAndSocialNetworks_t) (Net_NUM_WEBS_AND_SOCIAL_NETWORKS - 1);
@ -547,11 +547,9 @@ void Net_ShowWebAndSocialNetworksStats (void)
/***** Write heading *****/
HTM_TR_Begin (NULL);
HTM_TH (1,1,"LM",Txt_Web_social_network);
HTM_TH (1,1,"RM",Txt_Number_of_users);
HTM_TH (1,1,"RM",Txt_PERCENT_of_users);
HTM_TR_End ();
/***** For each web / social network... *****/

View File

@ -66,7 +66,7 @@ static void Nck_ShowFormChangeUsrNickname (bool ItsMe,
static void Nck_PutParamsRemoveMyNick (void *Nick);
static void Nck_PutParamsRemoveOtherNick (void *Nick);
static void Nck_RemoveNicknameFromDB (long UsrCod,const char *Nickname);
static void Nck_DB_RemoveNickname (long UsrCod,const char *Nickname);
static void Nck_UpdateUsrNick (struct UsrData *UsrDat);
@ -112,7 +112,7 @@ bool Nck_CheckIfNickWithArrIsValid (const char *NickWithArr)
/************* Get nickname of a user from his/her user's code ***************/
/*****************************************************************************/
void Nck_GetNicknameFromUsrCod (long UsrCod,
void Nck_DB_GetNicknameFromUsrCod (long UsrCod,
char Nickname[Nck_MAX_BYTES_NICK_WITHOUT_ARROBA + 1])
{
/***** Get current (last updated) user's nickname from database *****/
@ -301,7 +301,7 @@ static void Nck_ShowFormChangeUsrNickname (bool ItsMe,
{
HTM_BR ();
if (ItsMe)
Frm_StartFormAnchor (ActChgMyNck,Nck_NICKNAME_SECTION_ID);
Frm_BeginFormAnchor (ActChgMyNck,Nck_NICKNAME_SECTION_ID);
else
{
switch (UsrDat->Roles.InCurrentCrs)
@ -317,7 +317,7 @@ static void Nck_ShowFormChangeUsrNickname (bool ItsMe,
NextAction = ActChgNicOth;
break;
}
Frm_StartFormAnchor (NextAction,Nck_NICKNAME_SECTION_ID);
Frm_BeginFormAnchor (NextAction,Nck_NICKNAME_SECTION_ID);
Usr_PutParamUsrCodEncrypted (UsrDat->EnUsrCod);
}
@ -348,7 +348,7 @@ static void Nck_ShowFormChangeUsrNickname (bool ItsMe,
/* Data */
HTM_TD_Begin ("class=\"REC_C2_BOT LT DAT\"");
if (ItsMe)
Frm_StartFormAnchor (ActChgMyNck,Nck_NICKNAME_SECTION_ID);
Frm_BeginFormAnchor (ActChgMyNck,Nck_NICKNAME_SECTION_ID);
else
{
switch (UsrDat->Roles.InCurrentCrs)
@ -364,7 +364,7 @@ static void Nck_ShowFormChangeUsrNickname (bool ItsMe,
NextAction = ActChgNicOth;
break;
}
Frm_StartFormAnchor (NextAction,Nck_NICKNAME_SECTION_ID);
Frm_BeginFormAnchor (NextAction,Nck_NICKNAME_SECTION_ID);
Usr_PutParamUsrCodEncrypted (UsrDat->EnUsrCod);
}
snprintf (NickWithArr,sizeof (NickWithArr),"@%s",
@ -419,7 +419,7 @@ void Nck_RemoveMyNick (void)
if (strcasecmp (NickWithoutArr,Gbl.Usrs.Me.UsrDat.Nickname)) // Only if not my current nickname
{
/***** Remove one of my old nicknames *****/
Nck_RemoveNicknameFromDB (Gbl.Usrs.Me.UsrDat.UsrCod,NickWithoutArr);
Nck_DB_RemoveNickname (Gbl.Usrs.Me.UsrDat.UsrCod,NickWithoutArr);
/***** Show message *****/
Ale_CreateAlert (Ale_SUCCESS,Nck_NICKNAME_SECTION_ID,
@ -453,7 +453,7 @@ void Nck_RemoveOtherUsrNick (void)
Nck_MAX_BYTES_NICK_WITHOUT_ARROBA);
/***** Remove one of the old nicknames *****/
Nck_RemoveNicknameFromDB (Gbl.Usrs.Other.UsrDat.UsrCod,NickWithoutArr);
Nck_DB_RemoveNickname (Gbl.Usrs.Other.UsrDat.UsrCod,NickWithoutArr);
/***** Show message *****/
Ale_CreateAlert (Ale_SUCCESS,Nck_NICKNAME_SECTION_ID,
@ -474,7 +474,7 @@ void Nck_RemoveOtherUsrNick (void)
/********************** Remove a nickname from database **********************/
/*****************************************************************************/
static void Nck_RemoveNicknameFromDB (long UsrCod,const char *Nickname)
static void Nck_DB_RemoveNickname (long UsrCod,const char *Nickname)
{
/***** Remove a nickname *****/
DB_QueryREPLACE ("can not remove a nickname",
@ -587,7 +587,7 @@ static void Nck_UpdateUsrNick (struct UsrData *UsrDat)
{
// Now we know the new nickname is not already in database
// and is diffent to the current one
Nck_UpdateNickInDB (UsrDat->UsrCod,NewNickWithoutArr);
Nck_DB_UpdateNick (UsrDat->UsrCod,NewNickWithoutArr);
Str_Copy (UsrDat->Nickname,NewNickWithoutArr,sizeof (UsrDat->Nickname) - 1);
Ale_CreateAlert (Ale_SUCCESS,Nck_NICKNAME_SECTION_ID,
@ -607,7 +607,7 @@ static void Nck_UpdateUsrNick (struct UsrData *UsrDat)
/******************* Update user's nickname in database **********************/
/*****************************************************************************/
void Nck_UpdateNickInDB (long UsrCod,const char *NewNickname)
void Nck_DB_UpdateNick (long UsrCod,const char *NewNickname)
{
/***** Update user's nickname in database *****/
DB_QueryREPLACE ("can not update nickname",

View File

@ -48,7 +48,7 @@
bool Nck_CheckIfNickWithArrIsValid (const char *NickWithArr);
void Nck_GetNicknameFromUsrCod (long UsrCod,
void Nck_DB_GetNicknameFromUsrCod (long UsrCod,
char Nickname[Nck_MAX_BYTES_NICK_WITHOUT_ARROBA + 1]);
long Nck_GetUsrCodFromNickname (const char *Nickname);
@ -62,6 +62,6 @@ void Nck_DB_RemoveUsrNicknames (long UsrCod);
void Nck_UpdateMyNick (void);
void Nck_UpdateOtherUsrNick (void);
void Nck_UpdateNickInDB (long UsrCod,const char *NewNickname);
void Nck_DB_UpdateNick (long UsrCod,const char *NewNickname);
#endif

View File

@ -86,8 +86,9 @@ static void Not_DrawANotice (Not_Listing_t TypeNoticesListing,
const char *Content,
long UsrCod,
Not_Status_t Status);
static long Not_InsertNoticeInDB (const char *Content);
static void Not_UpdateNumUsrsNotifiedByEMailAboutNotice (long NotCod,unsigned NumUsrsToBeNotifiedByEMail);
static long Not_DB_InsertNotice (const char *Content);
static void Not_DB_UpdateNumUsrsNotifiedByEMailAboutNotice (long NotCod,
unsigned NumUsrsToBeNotifiedByEMail);
static void Not_PutParams (void *NotCod);
static long Not_GetParamNotCod (void);
@ -146,7 +147,7 @@ void Not_ReceiveNotice (void)
Str_TO_RIGOROUS_HTML,true);
/***** Create a new notice in database *****/
NotCod = Not_InsertNoticeInDB (Content);
NotCod = Not_DB_InsertNotice (Content);
/***** Update RSS of current course *****/
RSS_UpdateRSSFileForACrs (&Gbl.Hierarchy.Crs);
@ -156,7 +157,7 @@ void Not_ReceiveNotice (void)
/***** Notify by email about the new notice *****/
if ((NumUsrsToBeNotifiedByEMail = Ntf_StoreNotifyEventsToAllUsrs (Ntf_EVENT_NOTICE,NotCod)))
Not_UpdateNumUsrsNotifiedByEMailAboutNotice (NotCod,NumUsrsToBeNotifiedByEMail);
Not_DB_UpdateNumUsrsNotifiedByEMailAboutNotice (NotCod,NumUsrsToBeNotifiedByEMail);
/***** Create a new social note about the new notice *****/
Tml_Not_StoreAndPublishNote (TL_NOTE_NOTICE,NotCod);
@ -170,7 +171,7 @@ void Not_ReceiveNotice (void)
/*****************************************************************************/
// Return the code of the new inserted notice
static long Not_InsertNoticeInDB (const char *Content)
static long Not_DB_InsertNotice (const char *Content)
{
/***** Insert notice in the database *****/
return
@ -189,7 +190,8 @@ static long Not_InsertNoticeInDB (const char *Content)
/*********** Update number of users notified in table of notices *************/
/*****************************************************************************/
static void Not_UpdateNumUsrsNotifiedByEMailAboutNotice (long NotCod,unsigned NumUsrsToBeNotifiedByEMail)
static void Not_DB_UpdateNumUsrsNotifiedByEMailAboutNotice (long NotCod,
unsigned NumUsrsToBeNotifiedByEMail)
{
/***** Update number of users notified *****/
DB_QueryUPDATE ("can not update the number of notifications of a notice",
@ -359,7 +361,7 @@ void Not_RemoveNotice (void)
Gbl.Hierarchy.Crs.CrsCod);
/***** Mark possible notifications as removed *****/
Ntf_MarkNotifAsRemoved (Ntf_EVENT_NOTICE,NotCod);
Ntf_DB_MarkNotifAsRemoved (Ntf_EVENT_NOTICE,NotCod);
/***** Mark possible social note as unavailable *****/
Tml_DB_MarkNoteAsUnavailable (TL_NOTE_NOTICE,NotCod);
@ -717,7 +719,7 @@ static void Not_DrawANotice (Not_Listing_t TypeNoticesListing,
if (TypeNoticesListing == Not_LIST_BRIEF_NOTICES)
{
/* Form to view full notice */
Frm_StartFormAnchor (ActSeeOneNot,Anchor);
Frm_BeginFormAnchor (ActSeeOneNot,Anchor);
Not_PutHiddenParamNotCod (NotCod);
HTM_BUTTON_SUBMIT_Begin (Txt_See_full_notice,"BT_LINK RT",NULL);
}

View File

@ -280,7 +280,7 @@ static bool Ntf_StartFormGoToAction (Ntf_NotifyEvent_t NotifyEvent,
const struct For_Forums *Forums);
static void Ntf_PutHiddenParamNotifyEvent (Ntf_NotifyEvent_t NotifyEvent);
static void Ntf_UpdateMyLastAccessToNotifications (void);
static void Ntf_DB_UpdateMyLastAccessToNotifications (void);
static void Ntf_SendPendingNotifByEMailToOneUsr (struct UsrData *ToUsrDat,unsigned *NumNotif,unsigned *NumMails);
static void Ntf_GetNumNotifSent (long DegCod,long CrsCod,
Ntf_NotifyEvent_t NotifyEvent,
@ -396,14 +396,14 @@ void Ntf_ShowMyNotifications (void)
/***** Begin table *****/
HTM_TABLE_BeginWideMarginPadding (2);
HTM_TR_Begin (NULL);
/***** Heading *****/
HTM_TR_Begin (NULL);
HTM_TH (1,2,"LM",Txt_Event);
HTM_TH (1,1,"LM",Txt_MSG_From);
HTM_TH (1,1,"LM",Txt_Location);
HTM_TH (1,1,"CM",Txt_Date);
HTM_TH (1,1,"LM",Txt_Email);
HTM_TR_End ();
/***** List notifications one by one *****/
@ -627,7 +627,7 @@ void Ntf_ShowMyNotifications (void)
DB_FreeMySQLResult (&mysql_res);
/***** Reset to 0 the number of new notifications *****/
Ntf_UpdateMyLastAccessToNotifications ();
Ntf_DB_UpdateMyLastAccessToNotifications ();
}
/*****************************************************************************/
@ -905,7 +905,7 @@ void Ntf_GetNotifSummaryAndContent (char SummaryStr[Ntf_MAX_BYTES_SUMMARY + 1],
Msg_GetNotifMessage (SummaryStr,ContentStr,Cod,GetContent);
if (Gbl.WebService.IsWebService)
/* Set the message as open by me, because I can read it in an extern application */
Msg_SetReceivedMsgAsOpen (Cod,UsrCod);
Msg_DB_SetReceivedMsgAsOpen (Cod,UsrCod);
break;
case Ntf_EVENT_SURVEY:
Svy_GetNotifSurvey (SummaryStr,ContentStr,Cod,GetContent);
@ -963,7 +963,7 @@ void Ntf_MarkNotifAsSeen (Ntf_NotifyEvent_t NotifyEvent,long Cod,long CrsCod,lon
/******************* Set possible notifications as removed *******************/
/*****************************************************************************/
void Ntf_MarkNotifAsRemoved (Ntf_NotifyEvent_t NotifyEvent,long Cod)
void Ntf_DB_MarkNotifAsRemoved (Ntf_NotifyEvent_t NotifyEvent,long Cod)
{
/***** Set notification as removed *****/
DB_QueryUPDATE ("can not set notification(s) as removed",
@ -1089,7 +1089,7 @@ void Ntf_MarkNotifOneFileAsRemoved (const char *Path)
default:
return;
}
Ntf_MarkNotifAsRemoved (NotifyEvent,FilCod);
Ntf_DB_MarkNotifAsRemoved (NotifyEvent,FilCod);
}
break;
default:
@ -1164,7 +1164,7 @@ void Ntf_MarkNotifChildrenOfFolderAsRemoved (const char *Path)
/******* Set all possible notifications of files in a group as removed *******/
/*****************************************************************************/
void Ntf_MarkNotifFilesInGroupAsRemoved (long GrpCod)
void Ntf_DB_MarkNotifFilesInGroupAsRemoved (long GrpCod)
{
/***** Set notifications as removed *****/
DB_QueryUPDATE ("can not set notification(s) as removed",
@ -1513,13 +1513,13 @@ unsigned Ntf_StoreNotifyEventsToAllUsrs (Ntf_NotifyEvent_t NotifyEvent,long Cod)
{
if ((UsrDat.NtfEvents.SendEmail & NotifyEventMask)) // Send notification by email
{
Ntf_StoreNotifyEventToOneUser (NotifyEvent,&UsrDat,Cod,
Ntf_DB_StoreNotifyEventToOneUser (NotifyEvent,&UsrDat,Cod,
(Ntf_Status_t) Ntf_STATUS_BIT_EMAIL,
InsCod,CtrCod,DegCod,CrsCod);
NumUsrsToBeNotifiedByEMail++;
}
else // Don't send notification by email
Ntf_StoreNotifyEventToOneUser (NotifyEvent,&UsrDat,Cod,(Ntf_Status_t) 0,
Ntf_DB_StoreNotifyEventToOneUser (NotifyEvent,&UsrDat,Cod,(Ntf_Status_t) 0,
InsCod,CtrCod,DegCod,CrsCod);
}
}
@ -1538,7 +1538,7 @@ unsigned Ntf_StoreNotifyEventsToAllUsrs (Ntf_NotifyEvent_t NotifyEvent,long Cod)
/************** Store a notify event to one user into database ***************/
/*****************************************************************************/
void Ntf_StoreNotifyEventToOneUser (Ntf_NotifyEvent_t NotifyEvent,
void Ntf_DB_StoreNotifyEventToOneUser (Ntf_NotifyEvent_t NotifyEvent,
struct UsrData *UsrDat,
long Cod,Ntf_Status_t Status,
long InsCod,long CtrCod,long DegCod,long CrsCod)
@ -1566,7 +1566,7 @@ void Ntf_StoreNotifyEventToOneUser (Ntf_NotifyEvent_t NotifyEvent,
/*************** Reset my number of new notifications to 0 *******************/
/*****************************************************************************/
static void Ntf_UpdateMyLastAccessToNotifications (void)
static void Ntf_DB_UpdateMyLastAccessToNotifications (void)
{
/***** Reset to 0 my number of new notifications *****/
DB_QueryUPDATE ("can not update last access to notifications",
@ -2018,13 +2018,11 @@ void Ntf_PutFormChangeNotifSentByEMail (void)
/***** List of notifications *****/
HTM_TABLE_BeginCenterPadding (2);
HTM_TR_Begin (NULL);
HTM_TH_Empty (1);
HTM_TH (1,1,"CM",Txt_Create_BR_notification);
HTM_TH (1,1,"CM",Txt_Notify_me_BR_by_email);
HTM_TR_End ();
/***** Checkbox to activate internal notifications and email notifications
@ -2147,6 +2145,8 @@ void Ntf_WriteNumberOfNewNtfs (void)
/***** Begin form *****/
Frm_BeginFormId (ActSeeNewNtf,"form_ntf");
/***** Begin link *****/
HTM_BUTTON_SUBMIT_Begin (Txt_See_notifications,The_ClassNotif[Gbl.Prefs.Theme],NULL);
/***** Number of unseen notifications *****/
@ -2169,8 +2169,10 @@ void Ntf_WriteNumberOfNewNtfs (void)
HTM_SPAN_End ();
}
/***** End form *****/
/***** End link *****/
HTM_BUTTON_End ();
/***** End form *****/
Frm_EndForm ();
}

View File

@ -122,14 +122,14 @@ void Ntf_GetNotifSummaryAndContent (char SummaryStr[Ntf_MAX_BYTES_SUMMARY + 1],
long Cod,long CrsCod,long UsrCod,
bool GetContent);
void Ntf_MarkNotifAsSeen (Ntf_NotifyEvent_t NotifyEvent,long Cod,long CrsCod,long ToUsrCod);
void Ntf_MarkNotifAsRemoved (Ntf_NotifyEvent_t NotifyEvent,long Cod);
void Ntf_DB_MarkNotifAsRemoved (Ntf_NotifyEvent_t NotifyEvent,long Cod);
void Ntf_MarkNotifToOneUsrAsRemoved (Ntf_NotifyEvent_t NotifyEvent,long Cod,long ToUsrCod);
void Ntf_MarkNotifInCrsAsRemoved (long ToUsrCod,long CrsCod);
void Ntf_MarkNotifOneFileAsRemoved (const char *Path);
void Ntf_MarkNotifChildrenOfFolderAsRemoved (const char *Path);
void Ntf_MarkNotifFilesInGroupAsRemoved (long GrpCod);
void Ntf_DB_MarkNotifFilesInGroupAsRemoved (long GrpCod);
unsigned Ntf_StoreNotifyEventsToAllUsrs (Ntf_NotifyEvent_t NotifyEvent,long Cod);
void Ntf_StoreNotifyEventToOneUser (Ntf_NotifyEvent_t NotifyEvent,
void Ntf_DB_StoreNotifyEventToOneUser (Ntf_NotifyEvent_t NotifyEvent,
struct UsrData *UsrDat,
long Cod,Ntf_Status_t Status,
long InsCod,long CtrCod,long DegCod,long CrsCod);

View File

@ -178,49 +178,49 @@ void Pag_WriteLinksToPages (Pag_WhatPaginate_t WhatPaginate,
switch (WhatPaginate)
{
case Pag_ASSIGNMENTS:
Frm_StartFormAnchor (ActSeeAsg,Pagination->Anchor);
Frm_BeginFormAnchor (ActSeeAsg,Pagination->Anchor);
Pag_PutHiddenParamPagNum (WhatPaginate,1);
Dat_PutHiddenParamOrder (((struct Asg_Assignments *) Context)->SelectedOrder);
WhichGroups = Grp_GetParamWhichGroups ();
Grp_PutParamWhichGroups (&WhichGroups);
break;
case Pag_PROJECTS:
Frm_StartFormAnchor (ActSeePrj,Pagination->Anchor);
Frm_BeginFormAnchor (ActSeePrj,Pagination->Anchor);
Prj_PutParams (&((struct Prj_Projects *) Context)->Filter,
((struct Prj_Projects *) Context)->SelectedOrder,
1,
Cod);
break;
case Pag_EXAMS:
Frm_StartFormAnchor (ActSeeAllExa,Pagination->Anchor);
Frm_BeginFormAnchor (ActSeeAllExa,Pagination->Anchor);
Pag_PutHiddenParamPagNum (WhatPaginate,1);
Dat_PutHiddenParamOrder (((struct Exa_Exams *) Context)->SelectedOrder);
WhichGroups = Grp_GetParamWhichGroups ();
Grp_PutParamWhichGroups (&WhichGroups);
break;
case Pag_GAMES:
Frm_StartFormAnchor (ActSeeAllGam,Pagination->Anchor);
Frm_BeginFormAnchor (ActSeeAllGam,Pagination->Anchor);
Pag_PutHiddenParamPagNum (WhatPaginate,1);
Dat_PutHiddenParamOrder (((struct Gam_Games *) Context)->SelectedOrder);
WhichGroups = Grp_GetParamWhichGroups ();
Grp_PutParamWhichGroups (&WhichGroups);
break;
case Pag_SURVEYS:
Frm_StartFormAnchor (ActSeeAllSvy,Pagination->Anchor);
Frm_BeginFormAnchor (ActSeeAllSvy,Pagination->Anchor);
Pag_PutHiddenParamPagNum (WhatPaginate,1);
Dat_PutHiddenParamOrder (((struct Svy_Surveys *) Context)->SelectedOrder);
WhichGroups = Grp_GetParamWhichGroups ();
Grp_PutParamWhichGroups (&WhichGroups);
break;
case Pag_ATT_EVENTS:
Frm_StartFormAnchor (ActSeeAtt,Pagination->Anchor);
Frm_BeginFormAnchor (ActSeeAtt,Pagination->Anchor);
Pag_PutHiddenParamPagNum (WhatPaginate,1);
Dat_PutHiddenParamOrder (((struct Att_Events *) Context)->SelectedOrder);
WhichGroups = Grp_GetParamWhichGroups ();
Grp_PutParamWhichGroups (&WhichGroups);
break;
case Pag_THREADS_FORUM:
Frm_StartFormAnchor (For_ActionsSeeFor[((struct For_Forums *) Context)->Forum.Type],
Frm_BeginFormAnchor (For_ActionsSeeFor[((struct For_Forums *) Context)->Forum.Type],
Pagination->Anchor);
For_PutAllHiddenParamsForum (1, // Page of threads = first
1, // Page of posts = first
@ -231,7 +231,7 @@ void Pag_WriteLinksToPages (Pag_WhatPaginate_t WhatPaginate,
-1L);
break;
case Pag_POSTS_FORUM:
Frm_StartFormAnchor (For_ActionsSeePstFor[((struct For_Forums *) Context)->Forum.Type],
Frm_BeginFormAnchor (For_ActionsSeePstFor[((struct For_Forums *) Context)->Forum.Type],
Pagination->Anchor);
For_PutAllHiddenParamsForum (((struct For_Forums *) Context)->CurrentPageThrs, // Page of threads = current
1, // Page of posts = first
@ -242,17 +242,17 @@ void Pag_WriteLinksToPages (Pag_WhatPaginate_t WhatPaginate,
-1L);
break;
case Pag_MESSAGES_RECEIVED:
Frm_StartFormAnchor (ActSeeRcvMsg,Pagination->Anchor);
Frm_BeginFormAnchor (ActSeeRcvMsg,Pagination->Anchor);
Pag_PutHiddenParamPagNum (WhatPaginate,1);
Msg_PutHiddenParamsMsgsFilters ((struct Msg_Messages *) Context);
break;
case Pag_MESSAGES_SENT:
Frm_StartFormAnchor (ActSeeSntMsg,Pagination->Anchor);
Frm_BeginFormAnchor (ActSeeSntMsg,Pagination->Anchor);
Pag_PutHiddenParamPagNum (WhatPaginate,1);
Msg_PutHiddenParamsMsgsFilters ((struct Msg_Messages *) Context);
break;
case Pag_MY_AGENDA:
Frm_StartFormAnchor (ActSeeMyAgd,Pagination->Anchor);
Frm_BeginFormAnchor (ActSeeMyAgd,Pagination->Anchor);
Agd_PutParamsMyAgenda (((struct Agd_Agenda *) Context)->Past__FutureEvents,
((struct Agd_Agenda *) Context)->PrivatPublicEvents,
((struct Agd_Agenda *) Context)->HiddenVisiblEvents,
@ -261,7 +261,7 @@ void Pag_WriteLinksToPages (Pag_WhatPaginate_t WhatPaginate,
Cod);
break;
case Pag_ANOTHER_AGENDA:
Frm_StartFormAnchor (ActSeeUsrAgd,Pagination->Anchor);
Frm_BeginFormAnchor (ActSeeUsrAgd,Pagination->Anchor);
Agd_PutHiddenParamEventsOrder (((struct Agd_Agenda *) Context)->SelectedOrder);
Pag_PutHiddenParamPagNum (WhatPaginate,1);
Usr_PutParamOtherUsrCodEncrypted (Gbl.Usrs.Other.UsrDat.EnUsrCod);
@ -305,49 +305,49 @@ void Pag_WriteLinksToPages (Pag_WhatPaginate_t WhatPaginate,
switch (WhatPaginate)
{
case Pag_ASSIGNMENTS:
Frm_StartFormAnchor (ActSeeAsg,Pagination->Anchor);
Frm_BeginFormAnchor (ActSeeAsg,Pagination->Anchor);
Pag_PutHiddenParamPagNum (WhatPaginate,1);
Dat_PutHiddenParamOrder (((struct Asg_Assignments *) Context)->SelectedOrder);
WhichGroups = Grp_GetParamWhichGroups ();
Grp_PutParamWhichGroups (&WhichGroups);
break;
case Pag_PROJECTS:
Frm_StartFormAnchor (ActSeePrj,Pagination->Anchor);
Frm_BeginFormAnchor (ActSeePrj,Pagination->Anchor);
Prj_PutParams (&((struct Prj_Projects *) Context)->Filter,
((struct Prj_Projects *) Context)->SelectedOrder,
1,
Cod);
break;
case Pag_EXAMS:
Frm_StartFormAnchor (ActSeeAllExa,Pagination->Anchor);
Frm_BeginFormAnchor (ActSeeAllExa,Pagination->Anchor);
Pag_PutHiddenParamPagNum (WhatPaginate,1);
Dat_PutHiddenParamOrder (((struct Exa_Exams *) Context)->SelectedOrder);
WhichGroups = Grp_GetParamWhichGroups ();
Grp_PutParamWhichGroups (&WhichGroups);
break;
case Pag_GAMES:
Frm_StartFormAnchor (ActSeeAllGam,Pagination->Anchor);
Frm_BeginFormAnchor (ActSeeAllGam,Pagination->Anchor);
Pag_PutHiddenParamPagNum (WhatPaginate,1);
Dat_PutHiddenParamOrder (((struct Gam_Games *) Context)->SelectedOrder);
WhichGroups = Grp_GetParamWhichGroups ();
Grp_PutParamWhichGroups (&WhichGroups);
break;
case Pag_SURVEYS:
Frm_StartFormAnchor (ActSeeAllSvy,Pagination->Anchor);
Frm_BeginFormAnchor (ActSeeAllSvy,Pagination->Anchor);
Pag_PutHiddenParamPagNum (WhatPaginate,1);
Dat_PutHiddenParamOrder (((struct Svy_Surveys *) Context)->SelectedOrder);
WhichGroups = Grp_GetParamWhichGroups ();
Grp_PutParamWhichGroups (&WhichGroups);
break;
case Pag_ATT_EVENTS:
Frm_StartFormAnchor (ActSeeAtt,Pagination->Anchor);
Frm_BeginFormAnchor (ActSeeAtt,Pagination->Anchor);
Pag_PutHiddenParamPagNum (WhatPaginate,1);
Dat_PutHiddenParamOrder (((struct Att_Events *) Context)->SelectedOrder);
WhichGroups = Grp_GetParamWhichGroups ();
Grp_PutParamWhichGroups (&WhichGroups);
break;
case Pag_THREADS_FORUM:
Frm_StartFormAnchor (For_ActionsSeeFor[((struct For_Forums *) Context)->Forum.Type],
Frm_BeginFormAnchor (For_ActionsSeeFor[((struct For_Forums *) Context)->Forum.Type],
Pagination->Anchor);
For_PutAllHiddenParamsForum (1, // Page of threads = first
1, // Page of posts = first
@ -358,7 +358,7 @@ void Pag_WriteLinksToPages (Pag_WhatPaginate_t WhatPaginate,
-1L);
break;
case Pag_POSTS_FORUM:
Frm_StartFormAnchor (For_ActionsSeePstFor[((struct For_Forums *) Context)->Forum.Type],
Frm_BeginFormAnchor (For_ActionsSeePstFor[((struct For_Forums *) Context)->Forum.Type],
Pagination->Anchor);
For_PutAllHiddenParamsForum (((struct For_Forums *) Context)->CurrentPageThrs, // Page of threads = current
1, // Page of posts = first
@ -369,17 +369,17 @@ void Pag_WriteLinksToPages (Pag_WhatPaginate_t WhatPaginate,
-1L);
break;
case Pag_MESSAGES_RECEIVED:
Frm_StartFormAnchor (ActSeeRcvMsg,Pagination->Anchor);
Frm_BeginFormAnchor (ActSeeRcvMsg,Pagination->Anchor);
Pag_PutHiddenParamPagNum (WhatPaginate,1);
Msg_PutHiddenParamsMsgsFilters ((struct Msg_Messages *) Context);
break;
case Pag_MESSAGES_SENT:
Frm_StartFormAnchor (ActSeeSntMsg,Pagination->Anchor);
Frm_BeginFormAnchor (ActSeeSntMsg,Pagination->Anchor);
Pag_PutHiddenParamPagNum (WhatPaginate,1);
Msg_PutHiddenParamsMsgsFilters ((struct Msg_Messages *) Context);
break;
case Pag_MY_AGENDA:
Frm_StartFormAnchor (ActSeeMyAgd,Pagination->Anchor);
Frm_BeginFormAnchor (ActSeeMyAgd,Pagination->Anchor);
Agd_PutParamsMyAgenda (((struct Agd_Agenda *) Context)->Past__FutureEvents,
((struct Agd_Agenda *) Context)->PrivatPublicEvents,
((struct Agd_Agenda *) Context)->HiddenVisiblEvents,
@ -388,7 +388,7 @@ void Pag_WriteLinksToPages (Pag_WhatPaginate_t WhatPaginate,
Cod);
break;
case Pag_ANOTHER_AGENDA:
Frm_StartFormAnchor (ActSeeUsrAgd,Pagination->Anchor);
Frm_BeginFormAnchor (ActSeeUsrAgd,Pagination->Anchor);
Agd_PutHiddenParamEventsOrder (((struct Agd_Agenda *) Context)->SelectedOrder);
Pag_PutHiddenParamPagNum (WhatPaginate,1);
Usr_PutParamOtherUsrCodEncrypted (Gbl.Usrs.Other.UsrDat.EnUsrCod);
@ -418,49 +418,49 @@ void Pag_WriteLinksToPages (Pag_WhatPaginate_t WhatPaginate,
switch (WhatPaginate)
{
case Pag_ASSIGNMENTS:
Frm_StartFormAnchor (ActSeeAsg,Pagination->Anchor);
Frm_BeginFormAnchor (ActSeeAsg,Pagination->Anchor);
Pag_PutHiddenParamPagNum (WhatPaginate,Pagination->LeftPage);
Dat_PutHiddenParamOrder (((struct Asg_Assignments *) Context)->SelectedOrder);
WhichGroups = Grp_GetParamWhichGroups ();
Grp_PutParamWhichGroups (&WhichGroups);
break;
case Pag_PROJECTS:
Frm_StartFormAnchor (ActSeePrj,Pagination->Anchor);
Frm_BeginFormAnchor (ActSeePrj,Pagination->Anchor);
Prj_PutParams (&((struct Prj_Projects *) Context)->Filter,
((struct Prj_Projects *) Context)->SelectedOrder,
Pagination->LeftPage,
Cod);
break;
case Pag_EXAMS:
Frm_StartFormAnchor (ActSeeAllExa,Pagination->Anchor);
Frm_BeginFormAnchor (ActSeeAllExa,Pagination->Anchor);
Pag_PutHiddenParamPagNum (WhatPaginate,Pagination->LeftPage);
Dat_PutHiddenParamOrder (((struct Exa_Exams *) Context)->SelectedOrder);
WhichGroups = Grp_GetParamWhichGroups ();
Grp_PutParamWhichGroups (&WhichGroups);
break;
case Pag_GAMES:
Frm_StartFormAnchor (ActSeeAllGam,Pagination->Anchor);
Frm_BeginFormAnchor (ActSeeAllGam,Pagination->Anchor);
Pag_PutHiddenParamPagNum (WhatPaginate,Pagination->LeftPage);
Dat_PutHiddenParamOrder (((struct Gam_Games *) Context)->SelectedOrder);
WhichGroups = Grp_GetParamWhichGroups ();
Grp_PutParamWhichGroups (&WhichGroups);
break;
case Pag_SURVEYS:
Frm_StartFormAnchor (ActSeeAllSvy,Pagination->Anchor);
Frm_BeginFormAnchor (ActSeeAllSvy,Pagination->Anchor);
Pag_PutHiddenParamPagNum (WhatPaginate,Pagination->LeftPage);
Dat_PutHiddenParamOrder (((struct Svy_Surveys *) Context)->SelectedOrder);
WhichGroups = Grp_GetParamWhichGroups ();
Grp_PutParamWhichGroups (&WhichGroups);
break;
case Pag_ATT_EVENTS:
Frm_StartFormAnchor (ActSeeAtt,Pagination->Anchor);
Frm_BeginFormAnchor (ActSeeAtt,Pagination->Anchor);
Pag_PutHiddenParamPagNum (WhatPaginate,Pagination->LeftPage);
Dat_PutHiddenParamOrder (((struct Att_Events *) Context)->SelectedOrder);
WhichGroups = Grp_GetParamWhichGroups ();
Grp_PutParamWhichGroups (&WhichGroups);
break;
case Pag_THREADS_FORUM:
Frm_StartFormAnchor (For_ActionsSeeFor[((struct For_Forums *) Context)->Forum.Type],
Frm_BeginFormAnchor (For_ActionsSeeFor[((struct For_Forums *) Context)->Forum.Type],
Pagination->Anchor);
For_PutAllHiddenParamsForum (Pagination->LeftPage, // Page of threads = left
1, // Page of posts = first
@ -471,7 +471,7 @@ void Pag_WriteLinksToPages (Pag_WhatPaginate_t WhatPaginate,
-1L);
break;
case Pag_POSTS_FORUM:
Frm_StartFormAnchor (For_ActionsSeePstFor[((struct For_Forums *) Context)->Forum.Type],
Frm_BeginFormAnchor (For_ActionsSeePstFor[((struct For_Forums *) Context)->Forum.Type],
Pagination->Anchor);
For_PutAllHiddenParamsForum (((struct For_Forums *) Context)->CurrentPageThrs, // Page of threads = current
Pagination->LeftPage, // Page of posts = left
@ -482,17 +482,17 @@ void Pag_WriteLinksToPages (Pag_WhatPaginate_t WhatPaginate,
-1L);
break;
case Pag_MESSAGES_RECEIVED:
Frm_StartFormAnchor (ActSeeRcvMsg,Pagination->Anchor);
Frm_BeginFormAnchor (ActSeeRcvMsg,Pagination->Anchor);
Pag_PutHiddenParamPagNum (WhatPaginate,Pagination->LeftPage);
Msg_PutHiddenParamsMsgsFilters ((struct Msg_Messages *) Context);
break;
case Pag_MESSAGES_SENT:
Frm_StartFormAnchor (ActSeeSntMsg,Pagination->Anchor);
Frm_BeginFormAnchor (ActSeeSntMsg,Pagination->Anchor);
Pag_PutHiddenParamPagNum (WhatPaginate,Pagination->LeftPage);
Msg_PutHiddenParamsMsgsFilters ((struct Msg_Messages *) Context);
break;
case Pag_MY_AGENDA:
Frm_StartFormAnchor (ActSeeMyAgd,Pagination->Anchor);
Frm_BeginFormAnchor (ActSeeMyAgd,Pagination->Anchor);
Agd_PutParamsMyAgenda (((struct Agd_Agenda *) Context)->Past__FutureEvents,
((struct Agd_Agenda *) Context)->PrivatPublicEvents,
((struct Agd_Agenda *) Context)->HiddenVisiblEvents,
@ -501,7 +501,7 @@ void Pag_WriteLinksToPages (Pag_WhatPaginate_t WhatPaginate,
Cod);
break;
case Pag_ANOTHER_AGENDA:
Frm_StartFormAnchor (ActSeeUsrAgd,Pagination->Anchor);
Frm_BeginFormAnchor (ActSeeUsrAgd,Pagination->Anchor);
Agd_PutHiddenParamEventsOrder (((struct Agd_Agenda *) Context)->SelectedOrder);
Pag_PutHiddenParamPagNum (WhatPaginate,Pagination->LeftPage);
Usr_PutParamOtherUsrCodEncrypted (Gbl.Usrs.Other.UsrDat.EnUsrCod);
@ -543,49 +543,49 @@ void Pag_WriteLinksToPages (Pag_WhatPaginate_t WhatPaginate,
switch (WhatPaginate)
{
case Pag_ASSIGNMENTS:
Frm_StartFormAnchor (ActSeeAsg,Pagination->Anchor);
Frm_BeginFormAnchor (ActSeeAsg,Pagination->Anchor);
Pag_PutHiddenParamPagNum (WhatPaginate,NumPage);
Dat_PutHiddenParamOrder (((struct Asg_Assignments *) Context)->SelectedOrder);
WhichGroups = Grp_GetParamWhichGroups ();
Grp_PutParamWhichGroups (&WhichGroups);
break;
case Pag_PROJECTS:
Frm_StartFormAnchor (ActSeePrj,Pagination->Anchor);
Frm_BeginFormAnchor (ActSeePrj,Pagination->Anchor);
Prj_PutParams (&((struct Prj_Projects *) Context)->Filter,
((struct Prj_Projects *) Context)->SelectedOrder,
NumPage,
Cod);
break;
case Pag_EXAMS:
Frm_StartFormAnchor (ActSeeAllExa,Pagination->Anchor);
Frm_BeginFormAnchor (ActSeeAllExa,Pagination->Anchor);
Pag_PutHiddenParamPagNum (WhatPaginate,NumPage);
Dat_PutHiddenParamOrder (((struct Exa_Exams *) Context)->SelectedOrder);
WhichGroups = Grp_GetParamWhichGroups ();
Grp_PutParamWhichGroups (&WhichGroups);
break;
case Pag_GAMES:
Frm_StartFormAnchor (ActSeeAllGam,Pagination->Anchor);
Frm_BeginFormAnchor (ActSeeAllGam,Pagination->Anchor);
Pag_PutHiddenParamPagNum (WhatPaginate,NumPage);
Dat_PutHiddenParamOrder (((struct Gam_Games *) Context)->SelectedOrder);
WhichGroups = Grp_GetParamWhichGroups ();
Grp_PutParamWhichGroups (&WhichGroups);
break;
case Pag_SURVEYS:
Frm_StartFormAnchor (ActSeeAllSvy,Pagination->Anchor);
Frm_BeginFormAnchor (ActSeeAllSvy,Pagination->Anchor);
Pag_PutHiddenParamPagNum (WhatPaginate,NumPage);
Dat_PutHiddenParamOrder (((struct Svy_Surveys *) Context)->SelectedOrder);
WhichGroups = Grp_GetParamWhichGroups ();
Grp_PutParamWhichGroups (&WhichGroups);
break;
case Pag_ATT_EVENTS:
Frm_StartFormAnchor (ActSeeAtt,Pagination->Anchor);
Frm_BeginFormAnchor (ActSeeAtt,Pagination->Anchor);
Pag_PutHiddenParamPagNum (WhatPaginate,NumPage);
Dat_PutHiddenParamOrder (((struct Att_Events *) Context)->SelectedOrder);
WhichGroups = Grp_GetParamWhichGroups ();
Grp_PutParamWhichGroups (&WhichGroups);
break;
case Pag_THREADS_FORUM:
Frm_StartFormAnchor (For_ActionsSeeFor[((struct For_Forums *) Context)->Forum.Type],
Frm_BeginFormAnchor (For_ActionsSeeFor[((struct For_Forums *) Context)->Forum.Type],
Pagination->Anchor);
For_PutAllHiddenParamsForum (NumPage, // Page of threads = number of page
1, // Page of posts = first
@ -596,7 +596,7 @@ void Pag_WriteLinksToPages (Pag_WhatPaginate_t WhatPaginate,
-1L);
break;
case Pag_POSTS_FORUM:
Frm_StartFormAnchor (For_ActionsSeePstFor[((struct For_Forums *) Context)->Forum.Type],
Frm_BeginFormAnchor (For_ActionsSeePstFor[((struct For_Forums *) Context)->Forum.Type],
Pagination->Anchor);
For_PutAllHiddenParamsForum (((struct For_Forums *) Context)->CurrentPageThrs, // Page of threads = current
NumPage, // Page of posts = number of page
@ -607,17 +607,17 @@ void Pag_WriteLinksToPages (Pag_WhatPaginate_t WhatPaginate,
-1L);
break;
case Pag_MESSAGES_RECEIVED:
Frm_StartFormAnchor (ActSeeRcvMsg,Pagination->Anchor);
Frm_BeginFormAnchor (ActSeeRcvMsg,Pagination->Anchor);
Pag_PutHiddenParamPagNum (WhatPaginate,NumPage);
Msg_PutHiddenParamsMsgsFilters ((struct Msg_Messages *) Context);
break;
case Pag_MESSAGES_SENT:
Frm_StartFormAnchor (ActSeeSntMsg,Pagination->Anchor);
Frm_BeginFormAnchor (ActSeeSntMsg,Pagination->Anchor);
Pag_PutHiddenParamPagNum (WhatPaginate,NumPage);
Msg_PutHiddenParamsMsgsFilters ((struct Msg_Messages *) Context);
break;
case Pag_MY_AGENDA:
Frm_StartFormAnchor (ActSeeMyAgd,Pagination->Anchor);
Frm_BeginFormAnchor (ActSeeMyAgd,Pagination->Anchor);
Agd_PutParamsMyAgenda (((struct Agd_Agenda *) Context)->Past__FutureEvents,
((struct Agd_Agenda *) Context)->PrivatPublicEvents,
((struct Agd_Agenda *) Context)->HiddenVisiblEvents,
@ -626,7 +626,7 @@ void Pag_WriteLinksToPages (Pag_WhatPaginate_t WhatPaginate,
Cod);
break;
case Pag_ANOTHER_AGENDA:
Frm_StartFormAnchor (ActSeeUsrAgd,Pagination->Anchor);
Frm_BeginFormAnchor (ActSeeUsrAgd,Pagination->Anchor);
Agd_PutHiddenParamEventsOrder (((struct Agd_Agenda *) Context)->SelectedOrder);
Pag_PutHiddenParamPagNum (WhatPaginate,NumPage);
Usr_PutParamOtherUsrCodEncrypted (Gbl.Usrs.Other.UsrDat.EnUsrCod);
@ -655,49 +655,49 @@ void Pag_WriteLinksToPages (Pag_WhatPaginate_t WhatPaginate,
switch (WhatPaginate)
{
case Pag_ASSIGNMENTS:
Frm_StartFormAnchor (ActSeeAsg,Pagination->Anchor);
Frm_BeginFormAnchor (ActSeeAsg,Pagination->Anchor);
Pag_PutHiddenParamPagNum (WhatPaginate,Pagination->RightPage);
Dat_PutHiddenParamOrder (((struct Asg_Assignments *) Context)->SelectedOrder);
WhichGroups = Grp_GetParamWhichGroups ();
Grp_PutParamWhichGroups (&WhichGroups);
break;
case Pag_PROJECTS:
Frm_StartFormAnchor (ActSeePrj,Pagination->Anchor);
Frm_BeginFormAnchor (ActSeePrj,Pagination->Anchor);
Prj_PutParams (&((struct Prj_Projects *) Context)->Filter,
((struct Prj_Projects *) Context)->SelectedOrder,
Pagination->RightPage,
Cod);
break;
case Pag_EXAMS:
Frm_StartFormAnchor (ActSeeAllExa,Pagination->Anchor);
Frm_BeginFormAnchor (ActSeeAllExa,Pagination->Anchor);
Pag_PutHiddenParamPagNum (WhatPaginate,Pagination->RightPage);
Dat_PutHiddenParamOrder (((struct Exa_Exams *) Context)->SelectedOrder);
WhichGroups = Grp_GetParamWhichGroups ();
Grp_PutParamWhichGroups (&WhichGroups);
break;
case Pag_GAMES:
Frm_StartFormAnchor (ActSeeAllGam,Pagination->Anchor);
Frm_BeginFormAnchor (ActSeeAllGam,Pagination->Anchor);
Pag_PutHiddenParamPagNum (WhatPaginate,Pagination->RightPage);
Dat_PutHiddenParamOrder (((struct Gam_Games *) Context)->SelectedOrder);
WhichGroups = Grp_GetParamWhichGroups ();
Grp_PutParamWhichGroups (&WhichGroups);
break;
case Pag_SURVEYS:
Frm_StartFormAnchor (ActSeeAllSvy,Pagination->Anchor);
Frm_BeginFormAnchor (ActSeeAllSvy,Pagination->Anchor);
Pag_PutHiddenParamPagNum (WhatPaginate,Pagination->RightPage);
Dat_PutHiddenParamOrder (((struct Svy_Surveys *) Context)->SelectedOrder);
WhichGroups = Grp_GetParamWhichGroups ();
Grp_PutParamWhichGroups (&WhichGroups);
break;
case Pag_ATT_EVENTS:
Frm_StartFormAnchor (ActSeeAtt,Pagination->Anchor);
Frm_BeginFormAnchor (ActSeeAtt,Pagination->Anchor);
Pag_PutHiddenParamPagNum (WhatPaginate,Pagination->RightPage);
Dat_PutHiddenParamOrder (((struct Att_Events *) Context)->SelectedOrder);
WhichGroups = Grp_GetParamWhichGroups ();
Grp_PutParamWhichGroups (&WhichGroups);
break;
case Pag_THREADS_FORUM:
Frm_StartFormAnchor (For_ActionsSeeFor[((struct For_Forums *) Context)->Forum.Type],
Frm_BeginFormAnchor (For_ActionsSeeFor[((struct For_Forums *) Context)->Forum.Type],
Pagination->Anchor);
For_PutAllHiddenParamsForum (Pagination->RightPage, // Page of threads = right
1, // Page of posts = first
@ -708,7 +708,7 @@ void Pag_WriteLinksToPages (Pag_WhatPaginate_t WhatPaginate,
-1L);
break;
case Pag_POSTS_FORUM:
Frm_StartFormAnchor (For_ActionsSeePstFor[((struct For_Forums *) Context)->Forum.Type],
Frm_BeginFormAnchor (For_ActionsSeePstFor[((struct For_Forums *) Context)->Forum.Type],
Pagination->Anchor);
For_PutAllHiddenParamsForum (((struct For_Forums *) Context)->CurrentPageThrs, // Page of threads = current
Pagination->RightPage, // Page of posts = right
@ -719,17 +719,17 @@ void Pag_WriteLinksToPages (Pag_WhatPaginate_t WhatPaginate,
-1L);
break;
case Pag_MESSAGES_RECEIVED:
Frm_StartFormAnchor (ActSeeRcvMsg,Pagination->Anchor);
Frm_BeginFormAnchor (ActSeeRcvMsg,Pagination->Anchor);
Pag_PutHiddenParamPagNum (WhatPaginate,Pagination->RightPage);
Msg_PutHiddenParamsMsgsFilters ((struct Msg_Messages *) Context);
break;
case Pag_MESSAGES_SENT:
Frm_StartFormAnchor (ActSeeSntMsg,Pagination->Anchor);
Frm_BeginFormAnchor (ActSeeSntMsg,Pagination->Anchor);
Pag_PutHiddenParamPagNum (WhatPaginate,Pagination->RightPage);
Msg_PutHiddenParamsMsgsFilters ((struct Msg_Messages *) Context);
break;
case Pag_MY_AGENDA:
Frm_StartFormAnchor (ActSeeMyAgd,Pagination->Anchor);
Frm_BeginFormAnchor (ActSeeMyAgd,Pagination->Anchor);
Agd_PutParamsMyAgenda (((struct Agd_Agenda *) Context)->Past__FutureEvents,
((struct Agd_Agenda *) Context)->PrivatPublicEvents,
((struct Agd_Agenda *) Context)->HiddenVisiblEvents,
@ -738,7 +738,7 @@ void Pag_WriteLinksToPages (Pag_WhatPaginate_t WhatPaginate,
Cod);
break;
case Pag_ANOTHER_AGENDA:
Frm_StartFormAnchor (ActSeeUsrAgd,Pagination->Anchor);
Frm_BeginFormAnchor (ActSeeUsrAgd,Pagination->Anchor);
Agd_PutHiddenParamEventsOrder (((struct Agd_Agenda *) Context)->SelectedOrder);
Pag_PutHiddenParamPagNum (WhatPaginate,Pagination->RightPage);
Usr_PutParamOtherUsrCodEncrypted (Gbl.Usrs.Other.UsrDat.EnUsrCod);
@ -768,49 +768,49 @@ void Pag_WriteLinksToPages (Pag_WhatPaginate_t WhatPaginate,
switch (WhatPaginate)
{
case Pag_ASSIGNMENTS:
Frm_StartFormAnchor (ActSeeAsg,Pagination->Anchor);
Frm_BeginFormAnchor (ActSeeAsg,Pagination->Anchor);
Pag_PutHiddenParamPagNum (WhatPaginate,Pagination->NumPags);
Dat_PutHiddenParamOrder (((struct Asg_Assignments *) Context)->SelectedOrder);
WhichGroups = Grp_GetParamWhichGroups ();
Grp_PutParamWhichGroups (&WhichGroups);
break;
case Pag_PROJECTS:
Frm_StartFormAnchor (ActSeePrj,Pagination->Anchor);
Frm_BeginFormAnchor (ActSeePrj,Pagination->Anchor);
Prj_PutParams (&((struct Prj_Projects *) Context)->Filter,
((struct Prj_Projects *) Context)->SelectedOrder,
Pagination->NumPags,
Cod);
break;
case Pag_EXAMS:
Frm_StartFormAnchor (ActSeeAllExa,Pagination->Anchor);
Frm_BeginFormAnchor (ActSeeAllExa,Pagination->Anchor);
Pag_PutHiddenParamPagNum (WhatPaginate,Pagination->NumPags);
Dat_PutHiddenParamOrder (((struct Exa_Exams *) Context)->SelectedOrder);
WhichGroups = Grp_GetParamWhichGroups ();
Grp_PutParamWhichGroups (&WhichGroups);
break;
case Pag_GAMES:
Frm_StartFormAnchor (ActSeeAllGam,Pagination->Anchor);
Frm_BeginFormAnchor (ActSeeAllGam,Pagination->Anchor);
Pag_PutHiddenParamPagNum (WhatPaginate,Pagination->NumPags);
Dat_PutHiddenParamOrder (((struct Gam_Games *) Context)->SelectedOrder);
WhichGroups = Grp_GetParamWhichGroups ();
Grp_PutParamWhichGroups (&WhichGroups);
break;
case Pag_SURVEYS:
Frm_StartFormAnchor (ActSeeAllSvy,Pagination->Anchor);
Frm_BeginFormAnchor (ActSeeAllSvy,Pagination->Anchor);
Pag_PutHiddenParamPagNum (WhatPaginate,Pagination->NumPags);
Dat_PutHiddenParamOrder (((struct Svy_Surveys *) Context)->SelectedOrder);
WhichGroups = Grp_GetParamWhichGroups ();
Grp_PutParamWhichGroups (&WhichGroups);
break;
case Pag_ATT_EVENTS:
Frm_StartFormAnchor (ActSeeAtt,Pagination->Anchor);
Frm_BeginFormAnchor (ActSeeAtt,Pagination->Anchor);
Pag_PutHiddenParamPagNum (WhatPaginate,Pagination->NumPags);
Dat_PutHiddenParamOrder (((struct Att_Events *) Context)->SelectedOrder);
WhichGroups = Grp_GetParamWhichGroups ();
Grp_PutParamWhichGroups (&WhichGroups);
break;
case Pag_THREADS_FORUM:
Frm_StartFormAnchor (For_ActionsSeeFor[((struct For_Forums *) Context)->Forum.Type],
Frm_BeginFormAnchor (For_ActionsSeeFor[((struct For_Forums *) Context)->Forum.Type],
Pagination->Anchor);
For_PutAllHiddenParamsForum (Pagination->NumPags, // Page of threads = last
1, // Page of posts = first
@ -821,7 +821,7 @@ void Pag_WriteLinksToPages (Pag_WhatPaginate_t WhatPaginate,
-1L);
break;
case Pag_POSTS_FORUM:
Frm_StartFormAnchor (For_ActionsSeePstFor[((struct For_Forums *) Context)->Forum.Type],
Frm_BeginFormAnchor (For_ActionsSeePstFor[((struct For_Forums *) Context)->Forum.Type],
Pagination->Anchor);
For_PutAllHiddenParamsForum (((struct For_Forums *) Context)->CurrentPageThrs, // Page of threads = current
Pagination->NumPags, // Page of posts = last
@ -832,17 +832,17 @@ void Pag_WriteLinksToPages (Pag_WhatPaginate_t WhatPaginate,
-1L);
break;
case Pag_MESSAGES_RECEIVED:
Frm_StartFormAnchor (ActSeeRcvMsg,Pagination->Anchor);
Frm_BeginFormAnchor (ActSeeRcvMsg,Pagination->Anchor);
Pag_PutHiddenParamPagNum (WhatPaginate,Pagination->NumPags);
Msg_PutHiddenParamsMsgsFilters ((struct Msg_Messages *) Context);
break;
case Pag_MESSAGES_SENT:
Frm_StartFormAnchor (ActSeeSntMsg,Pagination->Anchor);
Frm_BeginFormAnchor (ActSeeSntMsg,Pagination->Anchor);
Pag_PutHiddenParamPagNum (WhatPaginate,Pagination->NumPags);
Msg_PutHiddenParamsMsgsFilters ((struct Msg_Messages *) Context);
break;
case Pag_MY_AGENDA:
Frm_StartFormAnchor (ActSeeMyAgd,Pagination->Anchor);
Frm_BeginFormAnchor (ActSeeMyAgd,Pagination->Anchor);
Agd_PutParamsMyAgenda (((struct Agd_Agenda *) Context)->Past__FutureEvents,
((struct Agd_Agenda *) Context)->PrivatPublicEvents,
((struct Agd_Agenda *) Context)->HiddenVisiblEvents,
@ -851,7 +851,7 @@ void Pag_WriteLinksToPages (Pag_WhatPaginate_t WhatPaginate,
Cod);
break;
case Pag_ANOTHER_AGENDA:
Frm_StartFormAnchor (ActSeeUsrAgd,Pagination->Anchor);
Frm_BeginFormAnchor (ActSeeUsrAgd,Pagination->Anchor);
Agd_PutHiddenParamEventsOrder (((struct Agd_Agenda *) Context)->SelectedOrder);
Pag_PutHiddenParamPagNum (WhatPaginate,Pagination->NumPags);
Usr_PutParamOtherUsrCodEncrypted (Gbl.Usrs.Other.UsrDat.EnUsrCod);

View File

@ -669,7 +669,7 @@ void Pwd_ShowFormChgMyPwd (void)
HTM_SECTION_Begin (Pwd_PASSWORD_SECTION_ID);
/***** Begin form *****/
Frm_StartFormAnchor (ActChgMyPwd,Pwd_PASSWORD_SECTION_ID);
Frm_BeginFormAnchor (ActChgMyPwd,Pwd_PASSWORD_SECTION_ID);
/***** Begin box *****/
snprintf (StrRecordWidth,sizeof (StrRecordWidth),"%upx",Rec_RECORD_WIDTH);
@ -833,7 +833,7 @@ void Pwd_ShowFormChgOtherUsrPwd (void)
NextAction = ActChgPwdOth;
break;
}
Frm_StartFormAnchor (NextAction,Pwd_PASSWORD_SECTION_ID);
Frm_BeginFormAnchor (NextAction,Pwd_PASSWORD_SECTION_ID);
Usr_PutParamOtherUsrCodEncrypted (Gbl.Usrs.Other.UsrDat.EnUsrCod);
/* New password */

View File

@ -166,7 +166,7 @@ static void Pri_PutFormVisibility (const char *TxtLabel,
/***** Form with list of options *****/
HTM_TD_Begin ("class=\"LT\"");
if (Action != ActUnk)
Frm_StartFormAnchor (Action,Pri_PRIVACY_ID);
Frm_BeginFormAnchor (Action,Pri_PRIVACY_ID);
HTM_UL_Begin ("class=\"PRI_LIST LIST_LEFT\"");
for (Visibility = Pri_VISIBILITY_USER;
Visibility <= Pri_VISIBILITY_WORLD;

View File

@ -1235,7 +1235,7 @@ static void Prf_GetNumMessagesSentAndStoreAsUsrFigure (long UsrCod)
Prf_ResetUsrFigures (&UsrFigures);
/***** Get number of messages sent from database *****/
UsrFigures.NumMsgSnt = (int) Msg_GetNumMsgsSentByUsr (UsrCod);
UsrFigures.NumMsgSnt = (int) Msg_DB_GetNumMsgsSentByUsr (UsrCod);
/***** Update number of messages sent in user's figures *****/
if (Prf_CheckIfUsrFiguresExists (UsrCod))

View File

@ -399,7 +399,7 @@ static void Prg_PutButtonToCreateNewItem (void)
extern const char *Txt_New_item;
long ItmCod = -1L;
Frm_StartFormAnchor (ActFrmNewPrgItm,"item_form");
Frm_BeginFormAnchor (ActFrmNewPrgItm,"item_form");
Prg_PutParams (&ItmCod);
Btn_PutConfirmButton (Txt_New_item);
Frm_EndForm ();
@ -1828,7 +1828,7 @@ static void Prg_ShowFormToCreateItem (long ParentItmCod)
Ale_ShowAlerts (NULL);
/***** Begin form *****/
Frm_StartFormAnchor (ActNewPrgItm,"prg_highlighted");
Frm_BeginFormAnchor (ActNewPrgItm,"prg_highlighted");
Prg_PutParamItmCod (ParentItem.Hierarchy.ItmCod);
/***** Begin box and table *****/
@ -1872,7 +1872,7 @@ static void Prg_ShowFormToChangeItem (long ItmCod)
Ale_ShowAlerts (NULL);
/***** Begin form *****/
Frm_StartFormAnchor (ActChgPrgItm,"prg_highlighted");
Frm_BeginFormAnchor (ActChgPrgItm,"prg_highlighted");
Prg_PutParamItmCod (Item.Hierarchy.ItmCod);
/***** Begin box and table *****/

View File

@ -1721,7 +1721,7 @@ static void Rec_ShowCrsRecord (Rec_CourseRecordViewType_t TypeOfView,
TypeOfView == Rec_CRS_LIST_SEVERAL_RECORDS)
{
ICanEdit = true;
Frm_StartFormAnchor (ActRcvRecOthUsr,Anchor);
Frm_BeginFormAnchor (ActRcvRecOthUsr,Anchor);
Par_PutHiddenParamLong (NULL,"OriginalActCod",
Act_GetActCod (ActSeeRecSevStd)); // Original action, used to know where we came from
Usr_PutParamUsrCodEncrypted (UsrDat->EnUsrCod);
@ -2620,7 +2620,7 @@ static void Rec_PutIconsCommands (__attribute__((unused)) void *Args)
Rec_PutParamUsrCodEncrypted,NULL);
/***** Button to send a message *****/
RecipientHasBannedMe = Msg_CheckIfUsrIsBanned (Gbl.Usrs.Me.UsrDat.UsrCod, // From:
RecipientHasBannedMe = Msg_DB_CheckIfUsrIsBanned (Gbl.Usrs.Me.UsrDat.UsrCod, // From:
Gbl.Record.UsrDat->UsrCod); // To:
if (!RecipientHasBannedMe)
Lay_PutContextualLinkOnlyIcon (ActReqMsgUsr,NULL,
@ -3896,7 +3896,7 @@ static void Rec_ShowFormMyInsCtrDpt (bool IAmATeacher)
HTM_TD_Begin ("class=\"REC_C2_BOT LM\"");
/* Begin form to select the country of my institution */
Frm_StartFormAnchor (ActChgCtyMyIns,Rec_MY_INS_CTR_DPT_ID);
Frm_BeginFormAnchor (ActChgCtyMyIns,Rec_MY_INS_CTR_DPT_ID);
HTM_SELECT_Begin (HTM_SUBMIT_ON_CHANGE,
"id=\"InsCtyCod\" name=\"OthCtyCod\""
" class=\"REC_C2_BOT_INPUT\"");
@ -3933,7 +3933,7 @@ static void Rec_ShowFormMyInsCtrDpt (bool IAmATeacher)
Ins_GetBasicListOfInstitutions (Gbl.Usrs.Me.UsrDat.InsCtyCod);
/* Begin form to select institution */
Frm_StartFormAnchor (ActChgMyIns,Rec_MY_INS_CTR_DPT_ID);
Frm_BeginFormAnchor (ActChgMyIns,Rec_MY_INS_CTR_DPT_ID);
HTM_SELECT_Begin (HTM_SUBMIT_ON_CHANGE,
"id=\"OthInsCod\" name=\"OthInsCod\""
" class=\"REC_C2_BOT_INPUT\"");
@ -3974,7 +3974,7 @@ static void Rec_ShowFormMyInsCtrDpt (bool IAmATeacher)
Ctr_GetBasicListOfCenters (Gbl.Usrs.Me.UsrDat.InsCod);
/* Begin form to select center */
Frm_StartFormAnchor (ActChgMyCtr,Rec_MY_INS_CTR_DPT_ID);
Frm_BeginFormAnchor (ActChgMyCtr,Rec_MY_INS_CTR_DPT_ID);
HTM_SELECT_Begin (HTM_SUBMIT_ON_CHANGE,
"id=\"OthCtrCod\" name=\"OthCtrCod\""
" class=\"REC_C2_BOT_INPUT\"");
@ -4006,7 +4006,7 @@ static void Rec_ShowFormMyInsCtrDpt (bool IAmATeacher)
/* Data */
HTM_TD_Begin ("class=\"REC_C2_BOT LM\"");
Frm_StartFormAnchor (ActChgMyDpt,Rec_MY_INS_CTR_DPT_ID);
Frm_BeginFormAnchor (ActChgMyDpt,Rec_MY_INS_CTR_DPT_ID);
Dpt_WriteSelectorDepartment (Gbl.Usrs.Me.UsrDat.InsCod, // Departments in my institution
Gbl.Usrs.Me.UsrDat.Tch.DptCod, // Selected department
"REC_C2_BOT_INPUT", // Selector class
@ -4026,7 +4026,7 @@ static void Rec_ShowFormMyInsCtrDpt (bool IAmATeacher)
/* Data */
HTM_TD_Begin ("class=\"REC_C2_BOT LM\"");
Frm_StartFormAnchor (ActChgMyOff,Rec_MY_INS_CTR_DPT_ID);
Frm_BeginFormAnchor (ActChgMyOff,Rec_MY_INS_CTR_DPT_ID);
HTM_INPUT_TEXT ("Office",Usr_MAX_CHARS_ADDRESS,Gbl.Usrs.Me.UsrDat.Tch.Office,
HTM_SUBMIT_ON_CHANGE,
"id=\"Office\" class=\"REC_C2_BOT_INPUT\"");
@ -4043,7 +4043,7 @@ static void Rec_ShowFormMyInsCtrDpt (bool IAmATeacher)
/* Data */
HTM_TD_Begin ("class=\"REC_C2_BOT LM\"");
Frm_StartFormAnchor (ActChgMyOffPho,Rec_MY_INS_CTR_DPT_ID);
Frm_BeginFormAnchor (ActChgMyOffPho,Rec_MY_INS_CTR_DPT_ID);
HTM_INPUT_TEL ("OfficePhone",Gbl.Usrs.Me.UsrDat.Tch.OfficePhone,
HTM_SUBMIT_ON_CHANGE,
"id=\"OfficePhone\" class=\"REC_C2_BOT_INPUT\"");

View File

@ -814,7 +814,7 @@ static void Roo_ListRoomsForEdition (const struct Bld_Buildings *Buildings,
/* Building */
HTM_TD_Begin ("class=\"CT\"");
Frm_StartFormAnchor (ActChgRooBld,Anchor);
Frm_BeginFormAnchor (ActChgRooBld,Anchor);
Roo_PutParamRooCod (&Room->RooCod);
Roo_PutSelectorBuilding (Room->BldCod,Buildings,
HTM_SUBMIT_ON_CHANGE);
@ -823,7 +823,7 @@ static void Roo_ListRoomsForEdition (const struct Bld_Buildings *Buildings,
/* Floor */
HTM_TD_Begin ("class=\"LT\"");
Frm_StartFormAnchor (ActChgRooFlo,Anchor);
Frm_BeginFormAnchor (ActChgRooFlo,Anchor);
Roo_PutParamRooCod (&Room->RooCod);
HTM_INPUT_LONG ("Floor",(long) INT_MIN,(long) INT_MAX,(long) Room->Floor,
HTM_SUBMIT_ON_CHANGE,false,
@ -833,7 +833,7 @@ static void Roo_ListRoomsForEdition (const struct Bld_Buildings *Buildings,
/* Room type */
HTM_TD_Begin ("class=\"CT\"");
Frm_StartFormAnchor (ActChgRooTyp,Anchor);
Frm_BeginFormAnchor (ActChgRooTyp,Anchor);
Roo_PutParamRooCod (&Room->RooCod);
Roo_PutSelectorType (Room->Type,
HTM_SUBMIT_ON_CHANGE);
@ -842,7 +842,7 @@ static void Roo_ListRoomsForEdition (const struct Bld_Buildings *Buildings,
/* Room short name */
HTM_TD_Begin ("class=\"LT\"");
Frm_StartFormAnchor (ActRenRooSho,Anchor);
Frm_BeginFormAnchor (ActRenRooSho,Anchor);
Roo_PutParamRooCod (&Room->RooCod);
HTM_INPUT_TEXT ("ShortName",Roo_MAX_CHARS_SHRT_NAME,Room->ShrtName,
HTM_SUBMIT_ON_CHANGE,
@ -852,7 +852,7 @@ static void Roo_ListRoomsForEdition (const struct Bld_Buildings *Buildings,
/* Room full name */
HTM_TD_Begin ("class=\"LT\"");
Frm_StartFormAnchor (ActRenRooFul,Anchor);
Frm_BeginFormAnchor (ActRenRooFul,Anchor);
Roo_PutParamRooCod (&Room->RooCod);
HTM_INPUT_TEXT ("FullName",Roo_MAX_CHARS_FULL_NAME,Room->FullName,
HTM_SUBMIT_ON_CHANGE,
@ -862,7 +862,7 @@ static void Roo_ListRoomsForEdition (const struct Bld_Buildings *Buildings,
/* Seating capacity */
HTM_TD_Begin ("class=\"LT\"");
Frm_StartFormAnchor (ActChgRooMaxUsr,Anchor);
Frm_BeginFormAnchor (ActChgRooMaxUsr,Anchor);
Roo_PutParamRooCod (&Room->RooCod);
Roo_WriteCapacity (StrCapacity,Room->Capacity);
HTM_INPUT_TEXT ("Capacity",Cns_MAX_DECIMAL_DIGITS_UINT,StrCapacity,

View File

@ -309,7 +309,7 @@ static void Sta_PutFormCrsHits (struct Sta_Stats *Stats)
Enr_CheckStdsAndPutButtonToRegisterStdsInCurrentCrs ();
/***** Begin form *****/
Frm_StartFormAnchor (ActSeeAccCrs,Sta_STAT_RESULTS_SECTION_ID);
Frm_BeginFormAnchor (ActSeeAccCrs,Sta_STAT_RESULTS_SECTION_ID);
Grp_PutParamsCodGrps ();
Par_PutHiddenParamLong (NULL,"FirstRow",0);
@ -499,7 +499,7 @@ static void Sta_PutFormGblHits (struct Sta_Stats *Stats)
Mnu_ContextMenuEnd ();
/***** Begin form *****/
Frm_StartFormAnchor (ActSeeAccGbl,Sta_STAT_RESULTS_SECTION_ID);
Frm_BeginFormAnchor (ActSeeAccGbl,Sta_STAT_RESULTS_SECTION_ID);
/***** Begin box and table *****/
Box_BoxTableBegin (NULL,Txt_Statistics_of_all_visits,
@ -1628,7 +1628,7 @@ static void Sta_ShowDetailedAccessesList (const struct Sta_Stats *Stats,
/* Put link to jump to previous page (older clicks) */
if (FirstRow > 1)
{
Frm_StartFormAnchor (ActSeeAccCrs,Sta_STAT_RESULTS_SECTION_ID);
Frm_BeginFormAnchor (ActSeeAccCrs,Sta_STAT_RESULTS_SECTION_ID);
Dat_WriteParamsIniEndDates ();
Par_PutHiddenParamUnsigned (NULL,"GroupedBy",(unsigned) Sta_CLICKS_CRS_DETAILED_LIST);
Par_PutHiddenParamUnsigned (NULL,"StatAct" ,(unsigned) Stats->NumAction);
@ -1666,7 +1666,7 @@ static void Sta_ShowDetailedAccessesList (const struct Sta_Stats *Stats,
/* Put link to jump to next page (more recent clicks) */
if (LastRow < NumHits)
{
Frm_StartFormAnchor (ActSeeAccCrs,Sta_STAT_RESULTS_SECTION_ID);
Frm_BeginFormAnchor (ActSeeAccCrs,Sta_STAT_RESULTS_SECTION_ID);
Dat_WriteParamsIniEndDates ();
Par_PutHiddenParamUnsigned (NULL,"GroupedBy",(unsigned) Sta_CLICKS_CRS_DETAILED_LIST);
Par_PutHiddenParamUnsigned (NULL,"StatAct" ,(unsigned) Stats->NumAction);
@ -2092,7 +2092,7 @@ static void Sta_ShowDistrAccessesPerDayAndHour (const struct Sta_Stats *Stats,
HTM_TD_Begin ("colspan=\"26\" class=\"CM\"");
Frm_StartFormAnchor (Gbl.Action.Act,Sta_STAT_RESULTS_SECTION_ID);
Frm_BeginFormAnchor (Gbl.Action.Act,Sta_STAT_RESULTS_SECTION_ID);
Dat_WriteParamsIniEndDates ();
Par_PutHiddenParamUnsigned (NULL,"GroupedBy",(unsigned) Stats->ClicksGroupedBy);
Par_PutHiddenParamUnsigned (NULL,"CountType",(unsigned) Stats->CountType);

View File

@ -756,7 +756,7 @@ void Str_AnalyzeTxtAndStoreNotifyEventToMentionedUsrs (long PubCod,const char *T
if (CreateNotif)
{
NotifyByEmail = (UsrDat.NtfEvents.SendEmail & (1 << Ntf_EVENT_TL_MENTION));
Ntf_StoreNotifyEventToOneUser (Ntf_EVENT_TL_MENTION,&UsrDat,PubCod,
Ntf_DB_StoreNotifyEventToOneUser (Ntf_EVENT_TL_MENTION,&UsrDat,PubCod,
(Ntf_Status_t) (NotifyByEmail ? Ntf_STATUS_BIT_EMAIL :
0),
Gbl.Hierarchy.Ins.InsCod,

View File

@ -1653,7 +1653,7 @@ void Svy_RemoveSurvey (void)
Svy.SvyCod);
/***** Mark possible notifications as removed *****/
Ntf_MarkNotifAsRemoved (Ntf_EVENT_SURVEY,Svy.SvyCod);
Ntf_DB_MarkNotifAsRemoved (Ntf_EVENT_SURVEY,Svy.SvyCod);
/***** Write message to show the change made *****/
Ale_ShowAlert (Ale_SUCCESS,Txt_Survey_X_removed,

View File

@ -1007,9 +1007,9 @@ void Tml_Com_RemoveCommMediaAndDBEntries (long PubCod)
Med_RemoveMedia (Tml_DB_GetMedCodFromComm (PubCod));
/***** Mark possible notifications on this comment as removed *****/
Ntf_MarkNotifAsRemoved (Ntf_EVENT_TL_COMMENT,PubCod);
Ntf_MarkNotifAsRemoved (Ntf_EVENT_TL_FAV ,PubCod);
Ntf_MarkNotifAsRemoved (Ntf_EVENT_TL_MENTION,PubCod);
Ntf_DB_MarkNotifAsRemoved (Ntf_EVENT_TL_COMMENT,PubCod);
Ntf_DB_MarkNotifAsRemoved (Ntf_EVENT_TL_FAV ,PubCod);
Ntf_DB_MarkNotifAsRemoved (Ntf_EVENT_TL_MENTION,PubCod);
/***** Remove favs for this comment *****/
Tml_DB_RemoveCommFavs (PubCod);

View File

@ -194,7 +194,7 @@ static void Tml_Fav_UnfNote (struct Tml_Not_Note *Not)
/***** Mark possible notifications on this note as removed *****/
OriginalPubCod = Tml_DB_GetPubCodOfOriginalNote (Not->NotCod);
if (OriginalPubCod > 0)
Ntf_MarkNotifAsRemoved (Ntf_EVENT_TL_FAV,OriginalPubCod);
Ntf_DB_MarkNotifAsRemoved (Ntf_EVENT_TL_FAV,OriginalPubCod);
}
/*****************************************************************************/
@ -345,7 +345,7 @@ static void Tml_Fav_UnfComm (struct Tml_Com_Comment *Com)
Com->PubCod,Com->UsrCod);
/***** Mark possible notifications on this comment as removed *****/
Ntf_MarkNotifAsRemoved (Ntf_EVENT_TL_FAV,Com->PubCod);
Ntf_DB_MarkNotifAsRemoved (Ntf_EVENT_TL_FAV,Com->PubCod);
/***** Free image *****/
Med_MediaDestructor (&Com->Content.Media);

View File

@ -188,7 +188,7 @@ void Tml_Frm_BeginForm (const struct Tml_Timeline *Timeline,
if (Gbl.Usrs.Other.UsrDat.UsrCod > 0)
{
/***** Begin form in user timeline *****/
Frm_StartFormAnchor (Tml_Frm_ActionUsr[Action],"timeline");
Frm_BeginFormAnchor (Tml_Frm_ActionUsr[Action],"timeline");
Usr_PutParamOtherUsrCodEncrypted (Gbl.Usrs.Other.UsrDat.EnUsrCod);
}
else

View File

@ -1287,9 +1287,9 @@ static void Tml_Not_RemoveNoteMediaAndDBEntries (struct Tml_Not_Note *Not)
PubCod = Tml_DB_GetPubCodOfOriginalNote (Not->NotCod);
if (PubCod > 0)
{
Ntf_MarkNotifAsRemoved (Ntf_EVENT_TL_FAV ,PubCod);
Ntf_MarkNotifAsRemoved (Ntf_EVENT_TL_SHARE ,PubCod);
Ntf_MarkNotifAsRemoved (Ntf_EVENT_TL_MENTION,PubCod);
Ntf_DB_MarkNotifAsRemoved (Ntf_EVENT_TL_FAV ,PubCod);
Ntf_DB_MarkNotifAsRemoved (Ntf_EVENT_TL_SHARE ,PubCod);
Ntf_DB_MarkNotifAsRemoved (Ntf_EVENT_TL_MENTION,PubCod);
}
/***** Remove favs for this note *****/

View File

@ -86,7 +86,7 @@ void Tml_Ntf_CreateNotifToAuthor (long AuthorCod,long PubCod,
If this author wants to receive notifications by email,
activate the sending of a notification *****/
if (CreateNotif)
Ntf_StoreNotifyEventToOneUser (NotifyEvent,&UsrDat,PubCod,
Ntf_DB_StoreNotifyEventToOneUser (NotifyEvent,&UsrDat,PubCod,
(Ntf_Status_t) (NotifyByEmail ? Ntf_STATUS_BIT_EMAIL :
0),
Gbl.Hierarchy.Ins.InsCod,

View File

@ -192,5 +192,5 @@ static void Tml_Sha_UnsNote (struct Tml_Not_Note *Not)
/***** Mark possible notifications on this note as removed *****/
OriginalPubCod = Tml_DB_GetPubCodOfOriginalNote (Not->NotCod);
if (OriginalPubCod > 0)
Ntf_MarkNotifAsRemoved (Ntf_EVENT_TL_SHARE,OriginalPubCod);
Ntf_DB_MarkNotifAsRemoved (Ntf_EVENT_TL_SHARE,OriginalPubCod);
}

View File

@ -731,7 +731,7 @@ void Usr_GetUsrDataFromUsrCod (struct UsrData *UsrDat,
DB_FreeMySQLResult (&mysql_res);
/***** Get nickname and email *****/
Nck_GetNicknameFromUsrCod (UsrDat->UsrCod,UsrDat->Nickname);
Nck_DB_GetNicknameFromUsrCod (UsrDat->UsrCod,UsrDat->Nickname);
Mai_GetEmailFromUsrCod (UsrDat);
}
@ -6388,7 +6388,7 @@ void Usr_ShowFormsToSelectUsrListType (void (*FuncParams) (void *Args),void *Arg
Usr_LIST_AS_CLASS_PHOTO);
/* Number of columns in the class photo */
Frm_StartFormAnchor (Gbl.Action.Act, // Repeat current action
Frm_BeginFormAnchor (Gbl.Action.Act, // Repeat current action
Usr_USER_LIST_SECTION_ID);
Grp_PutParamsCodGrps ();
Usr_PutParamUsrListType (Usr_LIST_AS_CLASS_PHOTO);
@ -6407,7 +6407,7 @@ void Usr_ShowFormsToSelectUsrListType (void (*FuncParams) (void *Args),void *Arg
Usr_LIST_AS_LISTING);
/* See the photos in list? */
Frm_StartFormAnchor (Gbl.Action.Act, // Repeat current action
Frm_BeginFormAnchor (Gbl.Action.Act, // Repeat current action
Usr_USER_LIST_SECTION_ID);
Grp_PutParamsCodGrps ();
Usr_PutParamUsrListType (Usr_LIST_AS_LISTING);
@ -6432,7 +6432,7 @@ static void Usr_FormToSelectUsrListType (void (*FuncParams) (void *Args),void *A
extern const char *Txt_USR_LIST_TYPES[Usr_NUM_USR_LIST_TYPES];
/***** Begin form *****/
Frm_StartFormAnchor (Gbl.Action.Act, // Repeat current action
Frm_BeginFormAnchor (Gbl.Action.Act, // Repeat current action
Usr_USER_LIST_SECTION_ID);
Grp_PutParamsCodGrps ();
Usr_PutParamUsrListType (ListType);