mirror of
https://github.com/acanas/swad-core.git
synced 2024-06-01 06:15:31 +02:00
Version 18.6.1
This commit is contained in:
parent
7c83401c26
commit
489c75e9db
16
swad_ID.c
16
swad_ID.c
|
@ -810,7 +810,7 @@ static void ID_RemoveUsrID (const struct UsrData *UsrDat,bool ItsMe)
|
|||
/***** Show message *****/
|
||||
Gbl.Alert.Type = Ale_SUCCESS;
|
||||
Gbl.Alert.Section = ID_ID_SECTION_ID;
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_ID_X_removed,
|
||||
UsrID);
|
||||
}
|
||||
|
@ -952,7 +952,7 @@ static void ID_NewUsrID (const struct UsrData *UsrDat,bool ItsMe)
|
|||
{
|
||||
Gbl.Alert.Type = Ale_WARNING;
|
||||
Gbl.Alert.Section = ID_ID_SECTION_ID;
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_ID_X_matches_one_of_the_existing,
|
||||
NewID);
|
||||
}
|
||||
|
@ -963,7 +963,7 @@ static void ID_NewUsrID (const struct UsrData *UsrDat,bool ItsMe)
|
|||
|
||||
Gbl.Alert.Type = Ale_SUCCESS;
|
||||
Gbl.Alert.Section = ID_ID_SECTION_ID;
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_ID_X_has_been_confirmed,
|
||||
NewID);
|
||||
}
|
||||
|
@ -972,7 +972,7 @@ static void ID_NewUsrID (const struct UsrData *UsrDat,bool ItsMe)
|
|||
{
|
||||
Gbl.Alert.Type = Ale_WARNING;
|
||||
Gbl.Alert.Section = ID_ID_SECTION_ID;
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_A_user_can_not_have_more_than_X_IDs,
|
||||
ID_MAX_IDS_PER_USER);
|
||||
}
|
||||
|
@ -985,7 +985,7 @@ static void ID_NewUsrID (const struct UsrData *UsrDat,bool ItsMe)
|
|||
|
||||
Gbl.Alert.Type = Ale_SUCCESS;
|
||||
Gbl.Alert.Section = ID_ID_SECTION_ID;
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_ID_X_has_been_registered_successfully,
|
||||
NewID);
|
||||
}
|
||||
|
@ -994,7 +994,7 @@ static void ID_NewUsrID (const struct UsrData *UsrDat,bool ItsMe)
|
|||
{
|
||||
Gbl.Alert.Type = Ale_WARNING;
|
||||
Gbl.Alert.Section = ID_ID_SECTION_ID;
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_ID_X_is_not_valid,
|
||||
NewID);
|
||||
}
|
||||
|
@ -1082,7 +1082,7 @@ void ID_ConfirmOtherUsrID (void)
|
|||
/***** ID found and already confirmed *****/
|
||||
Gbl.Alert.Type = Ale_INFO;
|
||||
Gbl.Alert.Section = ID_ID_SECTION_ID;
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_ID_X_had_already_been_confirmed,
|
||||
Gbl.Usrs.Other.UsrDat.IDs.List[NumIDFound].ID);
|
||||
}
|
||||
|
@ -1096,7 +1096,7 @@ void ID_ConfirmOtherUsrID (void)
|
|||
/***** Write success message *****/
|
||||
Gbl.Alert.Type = Ale_SUCCESS;
|
||||
Gbl.Alert.Section = ID_ID_SECTION_ID;
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_ID_X_has_been_confirmed,
|
||||
Gbl.Usrs.Other.UsrDat.IDs.List[NumIDFound].ID);
|
||||
}
|
||||
|
|
|
@ -247,7 +247,7 @@ void Acc_CheckIfEmptyAccountExists (void)
|
|||
}
|
||||
else
|
||||
{
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_There_is_no_empty_account_associated_with_your_ID_X,
|
||||
ID);
|
||||
Ale_ShowAlert (Ale_INFO,Gbl.Alert.Txt);
|
||||
|
@ -631,7 +631,7 @@ static bool Acc_GetParamsNewAccount (char NewNicknameWithoutArroba[Nck_MAX_BYTES
|
|||
if (DB_QueryCOUNT (Query,"can not check if nickname already existed")) // A nickname of another user is the same that this nickname
|
||||
{
|
||||
Error = true;
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_nickname_X_had_been_registered_by_another_user,
|
||||
NewNicknameWithoutArroba);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
|
@ -640,7 +640,7 @@ static bool Acc_GetParamsNewAccount (char NewNicknameWithoutArroba[Nck_MAX_BYTES
|
|||
else // New nickname is not valid
|
||||
{
|
||||
Error = true;
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_nickname_entered_X_is_not_valid_,
|
||||
NewNicknameWithArroba,
|
||||
Nck_MIN_CHARS_NICKNAME_WITHOUT_ARROBA,
|
||||
|
@ -661,7 +661,7 @@ static bool Acc_GetParamsNewAccount (char NewNicknameWithoutArroba[Nck_MAX_BYTES
|
|||
if (DB_QueryCOUNT (Query,"can not check if email already existed")) // An email of another user is the same that my email
|
||||
{
|
||||
Error = true;
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_email_address_X_had_been_registered_by_another_user,
|
||||
NewEmail);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
|
@ -670,7 +670,7 @@ static bool Acc_GetParamsNewAccount (char NewNicknameWithoutArroba[Nck_MAX_BYTES
|
|||
else // New email is not valid
|
||||
{
|
||||
Error = true;
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_email_address_entered_X_is_not_valid,
|
||||
NewEmail);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
|
@ -841,7 +841,7 @@ void Acc_AfterCreationNewAccount (void)
|
|||
if (Gbl.Usrs.Me.Logged) // If account has been created without problem, I am logged
|
||||
{
|
||||
/***** Show message of success *****/
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_Congratulations_You_have_created_your_account_X_Now_Y_will_request_you_,
|
||||
Gbl.Usrs.Me.UsrDat.Nickname,
|
||||
Cfg_PLATFORM_SHORT_NAME);
|
||||
|
@ -1044,7 +1044,7 @@ void Acc_CompletelyEliminateAccount (struct UsrData *UsrDat,
|
|||
|
||||
if (QuietOrVerbose == Cns_VERBOSE)
|
||||
{
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_THE_USER_X_has_been_removed_from_all_his_her_courses,
|
||||
UsrDat->FullName);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
|
@ -1057,7 +1057,7 @@ void Acc_CompletelyEliminateAccount (struct UsrData *UsrDat,
|
|||
|
||||
if (QuietOrVerbose == Cns_VERBOSE)
|
||||
{
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_THE_USER_X_has_been_removed_as_administrator,
|
||||
UsrDat->FullName);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
|
@ -1073,7 +1073,7 @@ void Acc_CompletelyEliminateAccount (struct UsrData *UsrDat,
|
|||
Acc_RemoveUsrBriefcase (UsrDat);
|
||||
if (QuietOrVerbose == Cns_VERBOSE)
|
||||
{
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_Briefcase_of_THE_USER_X_has_been_removed,
|
||||
UsrDat->FullName);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
|
@ -1090,7 +1090,7 @@ void Acc_CompletelyEliminateAccount (struct UsrData *UsrDat,
|
|||
Msg_DelAllRecAndSntMsgsUsr (UsrDat->UsrCod);
|
||||
if (QuietOrVerbose == Cns_VERBOSE)
|
||||
{
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_Messages_of_THE_USER_X_have_been_deleted,
|
||||
UsrDat->FullName);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
|
@ -1138,7 +1138,7 @@ void Acc_CompletelyEliminateAccount (struct UsrData *UsrDat,
|
|||
PhotoRemoved = Pho_RemovePhoto (UsrDat);
|
||||
if (PhotoRemoved && QuietOrVerbose == Cns_VERBOSE)
|
||||
{
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_Photo_of_THE_USER_X_has_been_removed,
|
||||
UsrDat->FullName);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
|
@ -1148,7 +1148,7 @@ void Acc_CompletelyEliminateAccount (struct UsrData *UsrDat,
|
|||
Acc_RemoveUsr (UsrDat);
|
||||
if (QuietOrVerbose == Cns_VERBOSE)
|
||||
{
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_Record_card_of_THE_USER_X_has_been_removed,
|
||||
UsrDat->FullName);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
|
|
|
@ -1299,7 +1299,7 @@ void Agd_AskRemEvent (void)
|
|||
|
||||
/***** Show question and button to remove event *****/
|
||||
Gbl.Agenda.AgdCodToEdit = AgdEvent.AgdCod;
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_Do_you_really_want_to_remove_the_event_X,
|
||||
AgdEvent.Event);
|
||||
Ale_ShowAlertAndButton (Ale_QUESTION,Gbl.Alert.Txt,
|
||||
|
@ -1336,7 +1336,7 @@ void Agd_RemoveEvent (void)
|
|||
DB_QueryDELETE (Query,"can not remove event");
|
||||
|
||||
/***** Write message to show the change made *****/
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_Event_X_removed,
|
||||
AgdEvent.Event);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
|
@ -1370,7 +1370,7 @@ void Agd_HideEvent (void)
|
|||
DB_QueryUPDATE (Query,"can not hide event");
|
||||
|
||||
/***** Write message to show the change made *****/
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_Event_X_is_now_hidden,
|
||||
AgdEvent.Event);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
|
@ -1404,7 +1404,7 @@ void Agd_UnhideEvent (void)
|
|||
DB_QueryUPDATE (Query,"can not show event");
|
||||
|
||||
/***** Write message to show the change made *****/
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_Event_X_is_now_visible,
|
||||
AgdEvent.Event);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
|
@ -1438,7 +1438,7 @@ void Agd_MakeEventPrivate (void)
|
|||
DB_QueryUPDATE (Query,"can not make event private");
|
||||
|
||||
/***** Write message to show the change made *****/
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_Event_X_is_now_private,
|
||||
AgdEvent.Event);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
|
@ -1472,7 +1472,7 @@ void Agd_MakeEventPublic (void)
|
|||
DB_QueryUPDATE (Query,"can not make event public");
|
||||
|
||||
/***** Write message to show the change made *****/
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_Event_X_is_now_visible_to_users_of_your_courses,
|
||||
AgdEvent.Event);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
|
@ -1673,7 +1673,7 @@ void Agd_RecFormEvent (void)
|
|||
Agd_CreateEvent (&AgdEvent,Txt); // Add new event to database
|
||||
|
||||
/***** Write success message *****/
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_Created_new_event_X,
|
||||
AgdEvent.Event);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
|
|
|
@ -972,7 +972,7 @@ void Asg_ReqRemAssignment (void)
|
|||
|
||||
/***** Show question and button to remove the assignment *****/
|
||||
Gbl.Asgs.AsgCodToEdit = Asg.AsgCod;
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_Do_you_really_want_to_remove_the_assignment_X,
|
||||
Asg.Title);
|
||||
Ale_ShowAlertAndButton (Ale_QUESTION,Gbl.Alert.Txt,
|
||||
|
@ -1017,7 +1017,7 @@ void Asg_RemoveAssignment (void)
|
|||
Ntf_MarkNotifAsRemoved (Ntf_EVENT_ASSIGNMENT,Asg.AsgCod);
|
||||
|
||||
/***** Write message to show the change made *****/
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_Assignment_X_removed,
|
||||
Asg.Title);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
|
@ -1050,7 +1050,7 @@ void Asg_HideAssignment (void)
|
|||
DB_QueryUPDATE (Query,"can not hide assignment");
|
||||
|
||||
/***** Write message to show the change made *****/
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_Assignment_X_is_now_hidden,
|
||||
Asg.Title);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
|
@ -1083,7 +1083,7 @@ void Asg_ShowAssignment (void)
|
|||
DB_QueryUPDATE (Query,"can not show assignment");
|
||||
|
||||
/***** Write message to show the change made *****/
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_Assignment_X_is_now_visible,
|
||||
Asg.Title);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
|
@ -1372,7 +1372,7 @@ void Asg_RecFormAssignment (void)
|
|||
if (Asg_CheckIfSimilarAssignmentExists ("Title",NewAsg.Title,NewAsg.AsgCod))
|
||||
{
|
||||
NewAssignmentIsCorrect = false;
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_Already_existed_an_assignment_with_the_title_X,
|
||||
NewAsg.Title);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
|
@ -1386,7 +1386,7 @@ void Asg_RecFormAssignment (void)
|
|||
if (Asg_CheckIfSimilarAssignmentExists ("Folder",NewAsg.Folder,NewAsg.AsgCod)) // If folder of assignment was in database...
|
||||
{
|
||||
NewAssignmentIsCorrect = false;
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_Already_existed_an_assignment_with_the_folder_X,
|
||||
NewAsg.Folder);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
|
@ -1428,7 +1428,7 @@ void Asg_RecFormAssignment (void)
|
|||
Asg_CreateAssignment (&NewAsg,Txt); // Add new assignment to database
|
||||
|
||||
/***** Write success message *****/
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_Created_new_assignment_X,
|
||||
NewAsg.Title);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
|
|
|
@ -887,7 +887,7 @@ void Att_AskRemAttEvent (void)
|
|||
Pag_PutHiddenParamPagNum (Pag_ATT_EVENTS,Gbl.AttEvents.CurrentPage);
|
||||
|
||||
/***** Ask for confirmation of removing *****/
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_Do_you_really_want_to_remove_the_event_X,
|
||||
Att.Title);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
|
@ -919,7 +919,7 @@ void Att_GetAndRemAttEvent (void)
|
|||
Att_RemoveAttEventFromDB (Att.AttCod);
|
||||
|
||||
/***** Write message to show the change made *****/
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_Event_X_removed,
|
||||
Att.Title);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
|
@ -968,7 +968,7 @@ void Att_HideAttEvent (void)
|
|||
DB_QueryUPDATE (Query,"can not hide attendance event");
|
||||
|
||||
/***** Write message to show the change made *****/
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_Event_X_is_now_hidden,
|
||||
Att.Title);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
|
@ -1001,7 +1001,7 @@ void Att_ShowAttEvent (void)
|
|||
DB_QueryUPDATE (Query,"can not show attendance event");
|
||||
|
||||
/***** Write message to show the change made *****/
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_Event_X_is_now_visible,
|
||||
Att.Title);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
|
@ -1287,7 +1287,7 @@ void Att_RecFormAttEvent (void)
|
|||
if (Att_CheckIfSimilarAttEventExists ("Title",ReceivedAtt.Title,ReceivedAtt.AttCod))
|
||||
{
|
||||
ReceivedAttEventIsCorrect = false;
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_Already_existed_an_event_with_the_title_X,
|
||||
ReceivedAtt.Title);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
|
@ -1311,7 +1311,7 @@ void Att_RecFormAttEvent (void)
|
|||
Att_CreateAttEvent (&ReceivedAtt,Txt); // Add new attendance event to database
|
||||
|
||||
/***** Write success message *****/
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_Created_new_event_X,
|
||||
ReceivedAtt.Title);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
|
@ -2404,7 +2404,7 @@ void Att_RegisterStudentsInAttEvent (void)
|
|||
|
||||
/***** Write final message *****/
|
||||
sprintf (Format,"%s: %%u<br />%s: %%u",Txt_Presents,Txt_Absents);
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Format,
|
||||
NumStdsPresent,NumStdsAbsent);
|
||||
Ale_ShowAlert (Ale_INFO,Gbl.Alert.Txt);
|
||||
|
|
|
@ -521,7 +521,7 @@ void Ban_RemoveBanner (void)
|
|||
DB_QueryDELETE (Query,"can not remove a banner");
|
||||
|
||||
/***** Write message to show the change made *****/
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_Banner_X_removed,
|
||||
Ban.ShrtName);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
|
@ -580,7 +580,7 @@ static void Ban_ShowOrHideBanner (bool Hide)
|
|||
}
|
||||
|
||||
/***** Write message to show the change made *****/
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Hide ? Txt_The_banner_X_is_now_hidden :
|
||||
Txt_The_banner_X_is_now_visible,
|
||||
Ban.ShrtName);
|
||||
|
@ -656,7 +656,7 @@ static void Ban_RenameBanner (Cns_ShrtOrFullName_t ShrtOrFullName)
|
|||
/***** Check if new name is empty *****/
|
||||
if (!NewBanName[0])
|
||||
{
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_You_can_not_leave_the_name_of_the_banner_X_empty,
|
||||
CurrentBanName);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
|
@ -669,7 +669,7 @@ static void Ban_RenameBanner (Cns_ShrtOrFullName_t ShrtOrFullName)
|
|||
/***** If banner was in database... *****/
|
||||
if (Ban_CheckIfBannerNameExists (ParamName,NewBanName,Ban->BanCod))
|
||||
{
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_banner_X_already_exists,
|
||||
NewBanName);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
|
@ -680,7 +680,7 @@ static void Ban_RenameBanner (Cns_ShrtOrFullName_t ShrtOrFullName)
|
|||
Ban_UpdateBanNameDB (Ban->BanCod,FieldName,NewBanName);
|
||||
|
||||
/* Write message to show the change made */
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_banner_X_has_been_renamed_as_Y,
|
||||
CurrentBanName,NewBanName);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
|
@ -688,7 +688,7 @@ static void Ban_RenameBanner (Cns_ShrtOrFullName_t ShrtOrFullName)
|
|||
}
|
||||
else // The same name
|
||||
{
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_name_of_the_banner_X_has_not_changed,
|
||||
CurrentBanName);
|
||||
Ale_ShowAlert (Ale_INFO,Gbl.Alert.Txt);
|
||||
|
@ -761,7 +761,7 @@ void Ban_ChangeBannerImg (void)
|
|||
DB_QueryUPDATE (Query,"can not update the image of a banner");
|
||||
|
||||
/***** Write message to show the change made *****/
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_new_image_is_X,
|
||||
NewImg);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
|
@ -807,7 +807,7 @@ void Ban_ChangeBannerWWW (void)
|
|||
DB_QueryUPDATE (Query,"can not update the web of a banner");
|
||||
|
||||
/***** Write message to show the change made *****/
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_new_web_address_is_X,
|
||||
NewWWW);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
|
@ -954,14 +954,14 @@ void Ban_RecFormNewBanner (void)
|
|||
/***** If name of banner was in database... *****/
|
||||
if (Ban_CheckIfBannerNameExists ("ShortName",Ban->ShrtName,-1L))
|
||||
{
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_banner_X_already_exists,
|
||||
Ban->ShrtName);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
}
|
||||
else if (Ban_CheckIfBannerNameExists ("FullName",Ban->FullName,-1L))
|
||||
{
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_banner_X_already_exists,
|
||||
Ban->FullName);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
|
@ -998,7 +998,7 @@ static void Ban_CreateBanner (struct Banner *Ban)
|
|||
DB_QueryINSERT (Query,"can not create banner");
|
||||
|
||||
/***** Write success message *****/
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_Created_new_banner_X,
|
||||
Ban->ShrtName);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
|
|
|
@ -1775,7 +1775,7 @@ void Ctr_RemoveCentre (void)
|
|||
DB_QueryDELETE (Query,"can not remove a centre");
|
||||
|
||||
/***** Write message to show the change made *****/
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_Centre_X_removed,
|
||||
Ctr.FullName);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
|
@ -1811,7 +1811,7 @@ void Ctr_ChangeCtrInsInConfig (void)
|
|||
NewIns.InsCod))
|
||||
{
|
||||
Gbl.Alert.Type = Ale_WARNING;
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_centre_X_already_exists,
|
||||
Gbl.CurrentCtr.Ctr.ShrtName);
|
||||
}
|
||||
|
@ -1821,7 +1821,7 @@ void Ctr_ChangeCtrInsInConfig (void)
|
|||
NewIns.InsCod))
|
||||
{
|
||||
Gbl.Alert.Type = Ale_WARNING;
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_centre_X_already_exists,
|
||||
Gbl.CurrentCtr.Ctr.FullName);
|
||||
}
|
||||
|
@ -1837,7 +1837,7 @@ void Ctr_ChangeCtrInsInConfig (void)
|
|||
|
||||
/***** Write message to show the change made *****/
|
||||
Gbl.Alert.Type = Ale_SUCCESS;
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_centre_X_has_been_moved_to_the_institution_Y,
|
||||
Gbl.CurrentCtr.Ctr.FullName,NewIns.FullName);
|
||||
}
|
||||
|
@ -2009,7 +2009,7 @@ static void Ctr_RenameCentre (struct Centre *Ctr,Cns_ShrtOrFullName_t ShrtOrFull
|
|||
if (!NewCtrName[0])
|
||||
{
|
||||
Gbl.Alert.Type = Ale_WARNING;
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_You_can_not_leave_the_name_of_the_centre_X_empty,
|
||||
CurrentCtrName);
|
||||
}
|
||||
|
@ -2022,7 +2022,7 @@ static void Ctr_RenameCentre (struct Centre *Ctr,Cns_ShrtOrFullName_t ShrtOrFull
|
|||
if (Ctr_CheckIfCtrNameExistsInIns (ParamName,NewCtrName,Ctr->CtrCod,Gbl.CurrentIns.Ins.InsCod))
|
||||
{
|
||||
Gbl.Alert.Type = Ale_WARNING;
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_centre_X_already_exists,NewCtrName);
|
||||
}
|
||||
else
|
||||
|
@ -2032,7 +2032,7 @@ static void Ctr_RenameCentre (struct Centre *Ctr,Cns_ShrtOrFullName_t ShrtOrFull
|
|||
|
||||
/* Write message to show the change made */
|
||||
Gbl.Alert.Type = Ale_SUCCESS;
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_centre_X_has_been_renamed_as_Y,
|
||||
CurrentCtrName,NewCtrName);
|
||||
|
||||
|
@ -2044,7 +2044,7 @@ static void Ctr_RenameCentre (struct Centre *Ctr,Cns_ShrtOrFullName_t ShrtOrFull
|
|||
else // The same name
|
||||
{
|
||||
Gbl.Alert.Type = Ale_INFO;
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_name_of_the_centre_X_has_not_changed,
|
||||
CurrentCtrName);
|
||||
}
|
||||
|
@ -2110,7 +2110,7 @@ void Ctr_ChangeCtrWWW (void)
|
|||
/***** Write message to show the change made
|
||||
and put button to go to centre changed *****/
|
||||
Gbl.Alert.Type = Ale_SUCCESS;
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_new_web_address_is_X,
|
||||
NewWWW);
|
||||
Ctr_ShowAlertAndButtonToGoToCtr ();
|
||||
|
@ -2141,7 +2141,7 @@ void Ctr_ChangeCtrWWWInConfig (void)
|
|||
Cns_MAX_BYTES_WWW);
|
||||
|
||||
/***** Write message to show the change made *****/
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_new_web_address_is_X,
|
||||
NewWWW);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
|
@ -2205,7 +2205,7 @@ void Ctr_ChangeCtrStatus (void)
|
|||
/***** Write message to show the change made
|
||||
and put button to go to centre changed *****/
|
||||
Gbl.Alert.Type = Ale_SUCCESS;
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_status_of_the_centre_X_has_changed,
|
||||
Gbl.Ctrs.EditingCtr.ShrtName);
|
||||
Ctr_ShowAlertAndButtonToGoToCtr ();
|
||||
|
@ -2306,7 +2306,7 @@ void Ctr_RequestPhoto (void)
|
|||
NULL,Box_NOT_CLOSABLE);
|
||||
|
||||
/***** Write help message *****/
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
"%s: %s<br />"
|
||||
"%s: %u×%u %s",
|
||||
Txt_Recommended_aspect_ratio,
|
||||
|
@ -2442,7 +2442,7 @@ void Ctr_ReceivePhoto (void)
|
|||
ReturnCode = WEXITSTATUS(ReturnCode);
|
||||
if (ReturnCode != 0)
|
||||
{
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
"Image could not be processed successfully.<br />"
|
||||
"Error code returned by the program of processing: %d",
|
||||
ReturnCode);
|
||||
|
@ -2771,14 +2771,14 @@ static void Ctr_RecFormRequestOrCreateCtr (unsigned Status)
|
|||
/***** If name of centre was in database... *****/
|
||||
if (Ctr_CheckIfCtrNameExistsInIns ("ShortName",Gbl.Ctrs.EditingCtr.ShrtName,-1L,Gbl.CurrentIns.Ins.InsCod))
|
||||
{
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_centre_X_already_exists,
|
||||
Gbl.Ctrs.EditingCtr.ShrtName);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
}
|
||||
else if (Ctr_CheckIfCtrNameExistsInIns ("FullName",Gbl.Ctrs.EditingCtr.FullName,-1L,Gbl.CurrentIns.Ins.InsCod))
|
||||
{
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_centre_X_already_exists,
|
||||
Gbl.Ctrs.EditingCtr.FullName);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
|
@ -2828,7 +2828,7 @@ static void Ctr_CreateCentre (unsigned Status)
|
|||
/***** Write message to show the change made
|
||||
and put button to go to centre created *****/
|
||||
Gbl.Alert.Type = Ale_SUCCESS;
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_Created_new_centre_X,
|
||||
Gbl.Ctrs.EditingCtr.FullName);
|
||||
Ctr_ShowAlertAndButtonToGoToCtr ();
|
||||
|
|
|
@ -355,10 +355,11 @@ En OpenSWAD:
|
|||
ps2pdf source.ps destination.pdf
|
||||
*/
|
||||
|
||||
#define Log_PLATFORM_VERSION "SWAD 18.6 (2018-10-16)"
|
||||
#define Log_PLATFORM_VERSION "SWAD 18.6.1 (2018-10-16)"
|
||||
#define CSS_FILE "swad18.4.css"
|
||||
#define JS_FILE "swad17.17.1.js"
|
||||
/*
|
||||
Version 18.6.1: Oct 16, 2018 Some sprintf changed by snprintf. (235755 lines)
|
||||
Version 18.6: Oct 16, 2018 sprintf changed by snprintf in alerts. (235730 lines)
|
||||
Version 18.5.3: Oct 16, 2018 sprintf changed by safe string copy in some alerts. (235198 lines)
|
||||
Version 18.5.2: Oct 16, 2018 Code refactoring related to password change. (235170 lines)
|
||||
|
|
|
@ -80,7 +80,7 @@ void Cht_ShowChatRooms (void)
|
|||
extern const char *Txt_Unfortunately_Firefox_and_Chrome_no_longer_allow_Java_to_run_;
|
||||
|
||||
/***** Help message about software needed to use the whiteboard/chat *****/
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_To_use_chat_you_must_have_installed_the_software_X_and_add_Y_,
|
||||
Cfg_JAVA_URL,Cfg_JAVA_NAME,
|
||||
Cfg_PLATFORM_SERVER);
|
||||
|
|
|
@ -1709,7 +1709,7 @@ void Cty_RemoveCountry (void)
|
|||
Cty_FlushCacheCountryName ();
|
||||
|
||||
/***** Write message to show the change made *****/
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_Country_X_removed,
|
||||
Cty.Name[Gbl.Prefs.Language]);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
|
@ -1752,7 +1752,7 @@ void Cty_RenameCountry (void)
|
|||
/***** Check if new name is empty *****/
|
||||
if (!NewCtyName[0])
|
||||
{
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_You_can_not_leave_the_name_of_the_country_X_empty,
|
||||
Cty->Name[Language]);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
|
@ -1765,7 +1765,7 @@ void Cty_RenameCountry (void)
|
|||
/***** If country was in database... *****/
|
||||
if (Cty_CheckIfCountryNameExists (Language,NewCtyName,Cty->CtyCod))
|
||||
{
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_country_X_already_exists,
|
||||
NewCtyName);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
|
@ -1777,7 +1777,7 @@ void Cty_RenameCountry (void)
|
|||
Cty_UpdateCtyNameDB (Cty->CtyCod,FieldName,NewCtyName);
|
||||
|
||||
/* Write message to show the change made */
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_country_X_has_been_renamed_as_Y,
|
||||
Cty->Name[Language],NewCtyName);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
|
@ -1789,7 +1789,7 @@ void Cty_RenameCountry (void)
|
|||
}
|
||||
else // The same name
|
||||
{
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_name_of_the_country_X_has_not_changed,
|
||||
Cty->Name[Language]);
|
||||
Ale_ShowAlert (Ale_INFO,Gbl.Alert.Txt);
|
||||
|
@ -1897,7 +1897,7 @@ void Cty_ChangeCtyWWW (void)
|
|||
Cns_MAX_BYTES_WWW);
|
||||
|
||||
/***** Write message to show the change made *****/
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_new_web_address_is_X,
|
||||
NewWWW);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
|
@ -2109,7 +2109,7 @@ void Cty_RecFormNewCountry (void)
|
|||
}
|
||||
else if (Cty_CheckIfNumericCountryCodeExists (Cty->CtyCod))
|
||||
{
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_numerical_code_X_already_exists,
|
||||
Cty->CtyCod);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
|
@ -2126,7 +2126,7 @@ void Cty_RecFormNewCountry (void)
|
|||
if (Cty->Alpha2[i] < 'A' ||
|
||||
Cty->Alpha2[i] > 'Z')
|
||||
{
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_alphabetical_code_X_is_not_correct,
|
||||
Cty->Alpha2);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
|
@ -2136,7 +2136,7 @@ void Cty_RecFormNewCountry (void)
|
|||
{
|
||||
if (Cty_CheckIfAlpha2CountryCodeExists (Cty->Alpha2))
|
||||
{
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_alphabetical_code_X_already_exists,
|
||||
Cty->Alpha2);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
|
@ -2157,7 +2157,7 @@ void Cty_RecFormNewCountry (void)
|
|||
/***** If name of country was in database... *****/
|
||||
if (Cty_CheckIfCountryNameExists (Lan,Cty->Name[Lan],-1L))
|
||||
{
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_country_X_already_exists,
|
||||
Cty->Name[Lan]);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
|
@ -2249,7 +2249,7 @@ static void Cty_CreateCountry (struct Country *Cty)
|
|||
DB_QueryINSERT (Query,"can not create country");
|
||||
|
||||
/***** Write success message *****/
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_Created_new_country_X,
|
||||
Cty->Name);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
|
|
|
@ -1336,7 +1336,7 @@ void Crs_EditCourses (void)
|
|||
Deg_GetListDegsOfCurrentCtr ();
|
||||
|
||||
/***** Start box *****/
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_Courses_of_DEGREE_X,
|
||||
Gbl.CurrentDeg.Deg.ShrtName);
|
||||
Box_StartBox (NULL,Gbl.Alert.Txt,Crs_PutIconToViewCourses,
|
||||
|
@ -1866,7 +1866,7 @@ static void Crs_RecFormRequestOrCreateCrs (unsigned Status)
|
|||
Gbl.Degs.EditingCrs.DegCod,Gbl.Degs.EditingCrs.Year))
|
||||
{
|
||||
Gbl.Alert.Type = Ale_WARNING;
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_course_X_already_exists,
|
||||
Gbl.Degs.EditingCrs.ShrtName);
|
||||
}
|
||||
|
@ -1874,7 +1874,7 @@ static void Crs_RecFormRequestOrCreateCrs (unsigned Status)
|
|||
Gbl.Degs.EditingCrs.DegCod,Gbl.Degs.EditingCrs.Year))
|
||||
{
|
||||
Gbl.Alert.Type = Ale_WARNING;
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_course_X_already_exists,
|
||||
Gbl.Degs.EditingCrs.FullName);
|
||||
}
|
||||
|
@ -1891,7 +1891,7 @@ static void Crs_RecFormRequestOrCreateCrs (unsigned Status)
|
|||
else // Year not valid
|
||||
{
|
||||
Gbl.Alert.Type = Ale_WARNING;
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_year_X_is_not_allowed,
|
||||
Gbl.Degs.EditingCrs.Year);
|
||||
}
|
||||
|
@ -1946,7 +1946,7 @@ static void Crs_CreateCourse (unsigned Status)
|
|||
|
||||
/***** Create success message *****/
|
||||
Gbl.Alert.Type = Ale_SUCCESS;
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_Created_new_course_X,
|
||||
Gbl.Degs.EditingCrs.FullName);
|
||||
}
|
||||
|
@ -1979,7 +1979,7 @@ void Crs_RemoveCourse (void)
|
|||
Crs_RemoveCourseCompletely (Crs.CrsCod);
|
||||
|
||||
/***** Write message to show the change made *****/
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_Course_X_removed,
|
||||
Crs.FullName);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
|
@ -2302,12 +2302,12 @@ void Crs_ChangeInsCrsCodInConfig (void)
|
|||
{
|
||||
Crs_UpdateInstitutionalCrsCod (&Gbl.CurrentCrs.Crs,NewInstitutionalCrsCod);
|
||||
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_institutional_code_of_the_course_X_has_changed_to_Y,
|
||||
Gbl.CurrentCrs.Crs.ShrtName,NewInstitutionalCrsCod);
|
||||
}
|
||||
else // The same institutional code
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_institutional_code_of_the_course_X_has_not_changed,
|
||||
Gbl.CurrentCrs.Crs.ShrtName);
|
||||
}
|
||||
|
@ -2340,14 +2340,14 @@ void Crs_ChangeInsCrsCod (void)
|
|||
{
|
||||
Crs_UpdateInstitutionalCrsCod (&Gbl.Degs.EditingCrs,NewInstitutionalCrsCod);
|
||||
Gbl.Alert.Type = Ale_SUCCESS;
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_institutional_code_of_the_course_X_has_changed_to_Y,
|
||||
Gbl.Degs.EditingCrs.ShrtName,NewInstitutionalCrsCod);
|
||||
}
|
||||
else // The same institutional code
|
||||
{
|
||||
Gbl.Alert.Type = Ale_INFO;
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_institutional_code_of_the_course_X_has_not_changed,
|
||||
Gbl.Degs.EditingCrs.ShrtName);
|
||||
}
|
||||
|
@ -2385,7 +2385,7 @@ void Crs_ChangeCrsDegInConfig (void)
|
|||
NewDeg.DegCod,Gbl.CurrentCrs.Crs.Year))
|
||||
{
|
||||
Gbl.Alert.Type = Ale_WARNING;
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_In_the_year_X_of_the_degree_Y_already_existed_a_course_with_the_name_Z,
|
||||
Txt_YEAR_OF_DEGREE[Gbl.CurrentCrs.Crs.Year],NewDeg.FullName,
|
||||
Gbl.CurrentCrs.Crs.ShrtName);
|
||||
|
@ -2394,7 +2394,7 @@ void Crs_ChangeCrsDegInConfig (void)
|
|||
NewDeg.DegCod,Gbl.CurrentCrs.Crs.Year))
|
||||
{
|
||||
Gbl.Alert.Type = Ale_WARNING;
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_In_the_year_X_of_the_degree_Y_already_existed_a_course_with_the_name_Z,
|
||||
Txt_YEAR_OF_DEGREE[Gbl.CurrentCrs.Crs.Year],NewDeg.FullName,
|
||||
Gbl.CurrentCrs.Crs.FullName);
|
||||
|
@ -2411,7 +2411,7 @@ void Crs_ChangeCrsDegInConfig (void)
|
|||
|
||||
/***** Create message to show the change made *****/
|
||||
Gbl.Alert.Type = Ale_SUCCESS;
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_course_X_has_been_moved_to_the_degree_Y,
|
||||
Gbl.CurrentCrs.Crs.FullName,
|
||||
Gbl.CurrentDeg.Deg.FullName);
|
||||
|
@ -2470,7 +2470,7 @@ void Crs_ChangeCrsYearInConfig (void)
|
|||
Gbl.CurrentCrs.Crs.DegCod,NewYear))
|
||||
{
|
||||
Gbl.Alert.Type = Ale_WARNING;
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_course_X_already_exists_in_year_Y,
|
||||
Gbl.CurrentCrs.Crs.ShrtName,Txt_YEAR_OF_DEGREE[NewYear]);
|
||||
}
|
||||
|
@ -2478,7 +2478,7 @@ void Crs_ChangeCrsYearInConfig (void)
|
|||
Gbl.CurrentCrs.Crs.DegCod,NewYear))
|
||||
{
|
||||
Gbl.Alert.Type = Ale_WARNING;
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_course_X_already_exists_in_year_Y,
|
||||
Gbl.CurrentCrs.Crs.FullName,Txt_YEAR_OF_DEGREE[NewYear]);
|
||||
}
|
||||
|
@ -2489,7 +2489,7 @@ void Crs_ChangeCrsYearInConfig (void)
|
|||
|
||||
/***** Create message to show the change made *****/
|
||||
Gbl.Alert.Type = Ale_SUCCESS;
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_year_of_the_course_X_has_changed,
|
||||
Gbl.CurrentCrs.Crs.ShrtName);
|
||||
}
|
||||
|
@ -2497,7 +2497,7 @@ void Crs_ChangeCrsYearInConfig (void)
|
|||
else // Year not valid
|
||||
{
|
||||
Gbl.Alert.Type = Ale_WARNING;
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_year_X_is_not_allowed,
|
||||
NewYear);
|
||||
}
|
||||
|
@ -2540,7 +2540,7 @@ void Crs_ChangeCrsYear (void)
|
|||
Gbl.Degs.EditingCrs.DegCod,NewYear))
|
||||
{
|
||||
Gbl.Alert.Type = Ale_WARNING;
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_course_X_already_exists_in_year_Y,
|
||||
Gbl.Degs.EditingCrs.ShrtName,Txt_YEAR_OF_DEGREE[NewYear]);
|
||||
}
|
||||
|
@ -2548,7 +2548,7 @@ void Crs_ChangeCrsYear (void)
|
|||
Gbl.Degs.EditingCrs.DegCod,NewYear))
|
||||
{
|
||||
Gbl.Alert.Type = Ale_WARNING;
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_course_X_already_exists_in_year_Y,
|
||||
Gbl.Degs.EditingCrs.FullName,Txt_YEAR_OF_DEGREE[NewYear]);
|
||||
}
|
||||
|
@ -2559,7 +2559,7 @@ void Crs_ChangeCrsYear (void)
|
|||
|
||||
/***** Create message to show the change made *****/
|
||||
Gbl.Alert.Type = Ale_SUCCESS;
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_year_of_the_course_X_has_changed,
|
||||
Gbl.Degs.EditingCrs.ShrtName);
|
||||
}
|
||||
|
@ -2567,7 +2567,7 @@ void Crs_ChangeCrsYear (void)
|
|||
else // Year not valid
|
||||
{
|
||||
Gbl.Alert.Type = Ale_WARNING;
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_year_X_is_not_allowed,
|
||||
NewYear);
|
||||
}
|
||||
|
@ -2691,7 +2691,7 @@ static void Crs_RenameCourse (struct Course *Crs,Cns_ShrtOrFullName_t ShrtOrFull
|
|||
if (!NewCrsName[0])
|
||||
{
|
||||
Gbl.Alert.Type = Ale_WARNING;
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_You_can_not_leave_the_name_of_the_course_X_empty,
|
||||
CurrentCrsName);
|
||||
}
|
||||
|
@ -2705,7 +2705,7 @@ static void Crs_RenameCourse (struct Course *Crs,Cns_ShrtOrFullName_t ShrtOrFull
|
|||
Crs->DegCod,Crs->Year))
|
||||
{
|
||||
Gbl.Alert.Type = Ale_WARNING;
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_course_X_already_exists,
|
||||
NewCrsName);
|
||||
}
|
||||
|
@ -2716,7 +2716,7 @@ static void Crs_RenameCourse (struct Course *Crs,Cns_ShrtOrFullName_t ShrtOrFull
|
|||
|
||||
/* Create message to show the change made */
|
||||
Gbl.Alert.Type = Ale_SUCCESS;
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_name_of_the_course_X_has_changed_to_Y,
|
||||
CurrentCrsName,NewCrsName);
|
||||
|
||||
|
@ -2728,7 +2728,7 @@ static void Crs_RenameCourse (struct Course *Crs,Cns_ShrtOrFullName_t ShrtOrFull
|
|||
else // The same name
|
||||
{
|
||||
Gbl.Alert.Type = Ale_INFO;
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_name_of_the_course_X_has_not_changed,
|
||||
CurrentCrsName);
|
||||
}
|
||||
|
@ -2810,7 +2810,7 @@ void Crs_ChangeCrsStatus (void)
|
|||
|
||||
/***** Create message to show the change made *****/
|
||||
Gbl.Alert.Type = Ale_SUCCESS;
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_status_of_the_course_X_has_changed,
|
||||
Gbl.Degs.EditingCrs.ShrtName);
|
||||
}
|
||||
|
@ -3457,7 +3457,7 @@ void Crs_RemoveOldCrss (void)
|
|||
SecondsWithoutAccess);
|
||||
if ((NumCrss = DB_QuerySELECT (Query,&mysql_res,"can not get old users")))
|
||||
{
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_Eliminating_X_courses_whithout_users_and_with_more_than_Y_months_without_access,
|
||||
NumCrss,
|
||||
MonthsWithoutAccess,
|
||||
|
@ -3480,7 +3480,7 @@ void Crs_RemoveOldCrss (void)
|
|||
}
|
||||
|
||||
/***** Write end message *****/
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_X_courses_have_been_eliminated,
|
||||
NumCrssRemoved);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
|
|
|
@ -1153,7 +1153,7 @@ static void Deg_CreateDegree (unsigned Status)
|
|||
/***** Write message to show the change made
|
||||
and put button to go to degree created *****/
|
||||
Gbl.Alert.Type = Ale_SUCCESS;
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_Created_new_degree_X,
|
||||
Gbl.Degs.EditingDeg.FullName);
|
||||
Deg_ShowAlertAndButtonToGoToDeg ();
|
||||
|
@ -1561,14 +1561,14 @@ static void Deg_RecFormRequestOrCreateDeg (unsigned Status)
|
|||
/***** If name of degree was in database... *****/
|
||||
if (Deg_CheckIfDegNameExistsInCtr ("ShortName",Gbl.Degs.EditingDeg.ShrtName,-1L,Gbl.Degs.EditingDeg.CtrCod))
|
||||
{
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_degree_X_already_exists,
|
||||
Gbl.Degs.EditingDeg.ShrtName);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
}
|
||||
else if (Deg_CheckIfDegNameExistsInCtr ("FullName",Gbl.Degs.EditingDeg.FullName,-1L,Gbl.Degs.EditingDeg.CtrCod))
|
||||
{
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_degree_X_already_exists,
|
||||
Gbl.Degs.EditingDeg.FullName);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
|
@ -1611,7 +1611,7 @@ void Deg_RemoveDegree (void)
|
|||
Deg_RemoveDegreeCompletely (Deg.DegCod);
|
||||
|
||||
/***** Write message to show the change made *****/
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_Degree_X_removed,
|
||||
Deg.FullName);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
|
@ -1970,7 +1970,7 @@ static void Deg_RenameDegree (struct Degree *Deg,Cns_ShrtOrFullName_t ShrtOrFull
|
|||
if (!NewDegName[0])
|
||||
{
|
||||
Gbl.Alert.Type = Ale_WARNING;
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_You_can_not_leave_the_name_of_the_degree_X_empty,
|
||||
CurrentDegName);
|
||||
}
|
||||
|
@ -1983,7 +1983,7 @@ static void Deg_RenameDegree (struct Degree *Deg,Cns_ShrtOrFullName_t ShrtOrFull
|
|||
if (Deg_CheckIfDegNameExistsInCtr (ParamName,NewDegName,Deg->DegCod,Deg->CtrCod))
|
||||
{
|
||||
Gbl.Alert.Type = Ale_WARNING;
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_degree_X_already_exists,
|
||||
NewDegName);
|
||||
}
|
||||
|
@ -1994,7 +1994,7 @@ static void Deg_RenameDegree (struct Degree *Deg,Cns_ShrtOrFullName_t ShrtOrFull
|
|||
|
||||
/* Write message to show the change made */
|
||||
Gbl.Alert.Type = Ale_SUCCESS;
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_name_of_the_degree_X_has_changed_to_Y,
|
||||
CurrentDegName,NewDegName);
|
||||
|
||||
|
@ -2006,7 +2006,7 @@ static void Deg_RenameDegree (struct Degree *Deg,Cns_ShrtOrFullName_t ShrtOrFull
|
|||
else // The same name
|
||||
{
|
||||
Gbl.Alert.Type = Ale_INFO;
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_name_of_the_degree_X_has_not_changed,
|
||||
CurrentDegName);
|
||||
}
|
||||
|
@ -2065,14 +2065,14 @@ void Deg_ChangeDegCtrInConfig (void)
|
|||
if (Deg_CheckIfDegNameExistsInCtr ("ShortName",Gbl.CurrentDeg.Deg.ShrtName,Gbl.CurrentDeg.Deg.DegCod,NewCtr.CtrCod))
|
||||
{
|
||||
Gbl.Alert.Type = Ale_WARNING;
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_degree_X_already_exists,
|
||||
Gbl.CurrentDeg.Deg.ShrtName);
|
||||
}
|
||||
else if (Deg_CheckIfDegNameExistsInCtr ("FullName",Gbl.CurrentDeg.Deg.FullName,Gbl.CurrentDeg.Deg.DegCod,NewCtr.CtrCod))
|
||||
{
|
||||
Gbl.Alert.Type = Ale_WARNING;
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_degree_X_already_exists,
|
||||
Gbl.CurrentDeg.Deg.FullName);
|
||||
}
|
||||
|
@ -2088,7 +2088,7 @@ void Deg_ChangeDegCtrInConfig (void)
|
|||
|
||||
/***** Create message to show the change made *****/
|
||||
Gbl.Alert.Type = Ale_SUCCESS;
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_degree_X_has_been_moved_to_the_centre_Y,
|
||||
Gbl.CurrentDeg.Deg.FullName,
|
||||
Gbl.CurrentCtr.Ctr.FullName);
|
||||
|
@ -2154,7 +2154,7 @@ void Deg_ChangeDegWWW (void)
|
|||
/***** Write message to show the change made
|
||||
and put button to go to degree changed *****/
|
||||
Gbl.Alert.Type = Ale_SUCCESS;
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_new_web_address_is_X,
|
||||
NewWWW);
|
||||
Deg_ShowAlertAndButtonToGoToDeg ();
|
||||
|
@ -2185,7 +2185,7 @@ void Deg_ChangeDegWWWInConfig (void)
|
|||
Cns_MAX_BYTES_WWW);
|
||||
|
||||
/***** Write message to show the change made *****/
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_new_web_address_is_X,
|
||||
NewWWW);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
|
@ -2250,7 +2250,7 @@ void Deg_ChangeDegStatus (void)
|
|||
/***** Write message to show the change made
|
||||
and put button to go to degree changed *****/
|
||||
Gbl.Alert.Type = Ale_SUCCESS;
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_status_of_the_degree_X_has_changed,
|
||||
Gbl.Degs.EditingDeg.ShrtName);
|
||||
Deg_ShowAlertAndButtonToGoToDeg ();
|
||||
|
|
|
@ -551,7 +551,7 @@ static void DT_CreateDegreeType (struct DegreeType *DegTyp)
|
|||
DB_QueryINSERT (Query,"can not create a new type of degree");
|
||||
|
||||
/***** Write success message *****/
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_Created_new_type_of_degree_X,
|
||||
DegTyp->DegTypName);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
|
@ -721,7 +721,7 @@ void DT_RecFormNewDegreeType (void)
|
|||
/***** If name of degree type was in database... *****/
|
||||
if (DT_CheckIfDegreeTypeNameExists (DegTyp->DegTypName,-1L))
|
||||
{
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_type_of_degree_X_already_exists,
|
||||
DegTyp->DegTypName);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
|
@ -762,7 +762,7 @@ void DT_RemoveDegreeType (void)
|
|||
DT_RemoveDegreeTypeCompletely (DegTyp.DegTypCod);
|
||||
|
||||
/***** Write message to show the change made *****/
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_Type_of_degree_X_removed,
|
||||
DegTyp.DegTypName);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
|
@ -937,7 +937,7 @@ void DT_RenameDegreeType (void)
|
|||
/***** Check if new name is empty *****/
|
||||
if (!NewNameDegTyp[0])
|
||||
{
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_You_can_not_leave_the_name_of_the_type_of_degree_X_empty,
|
||||
DegTyp->DegTypName);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
|
@ -950,7 +950,7 @@ void DT_RenameDegreeType (void)
|
|||
/***** If degree type was in database... *****/
|
||||
if (DT_CheckIfDegreeTypeNameExists (NewNameDegTyp,DegTyp->DegTypCod))
|
||||
{
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_type_of_degree_X_already_exists,
|
||||
NewNameDegTyp);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
|
@ -964,7 +964,7 @@ void DT_RenameDegreeType (void)
|
|||
DB_QueryUPDATE (Query,"can not update the type of a degree");
|
||||
|
||||
/* Write message to show the change made */
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_type_of_degree_X_has_been_renamed_as_Y,
|
||||
DegTyp->DegTypName,NewNameDegTyp);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
|
@ -972,7 +972,7 @@ void DT_RenameDegreeType (void)
|
|||
}
|
||||
else // The same name
|
||||
{
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_name_of_the_type_of_degree_X_has_not_changed,
|
||||
NewNameDegTyp);
|
||||
Ale_ShowAlert (Ale_INFO,Gbl.Alert.Txt);
|
||||
|
@ -1028,7 +1028,7 @@ void DT_ChangeDegreeType (void)
|
|||
/***** Write message to show the change made
|
||||
and put button to go to degree changed *****/
|
||||
Gbl.Alert.Type = Ale_SUCCESS;
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_type_of_degree_of_the_degree_X_has_changed,
|
||||
Gbl.Degs.EditingDeg.FullName);
|
||||
Deg_ShowAlertAndButtonToGoToDeg ();
|
||||
|
|
|
@ -628,7 +628,7 @@ void Dpt_RemoveDepartment (void)
|
|||
DB_QueryDELETE (Query,"can not remove a department");
|
||||
|
||||
/***** Write message to show the change made *****/
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_Department_X_removed,
|
||||
Dpt.FullName);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
|
@ -734,7 +734,7 @@ static void Dpt_RenameDepartment (Cns_ShrtOrFullName_t ShrtOrFullName)
|
|||
/***** Check if new name is empty *****/
|
||||
if (!NewDptName[0])
|
||||
{
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_You_can_not_leave_the_name_of_the_department_X_empty,
|
||||
CurrentDptName);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
|
@ -747,7 +747,7 @@ static void Dpt_RenameDepartment (Cns_ShrtOrFullName_t ShrtOrFullName)
|
|||
/***** If degree was in database... *****/
|
||||
if (Dpt_CheckIfDepartmentNameExists (ParamName,NewDptName,Dpt->DptCod))
|
||||
{
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_department_X_already_exists,
|
||||
NewDptName);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
|
@ -758,7 +758,7 @@ static void Dpt_RenameDepartment (Cns_ShrtOrFullName_t ShrtOrFullName)
|
|||
Dpt_UpdateDegNameDB (Dpt->DptCod,FieldName,NewDptName);
|
||||
|
||||
/* Write message to show the change made */
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_department_X_has_been_renamed_as_Y,
|
||||
CurrentDptName,NewDptName);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
|
@ -766,7 +766,7 @@ static void Dpt_RenameDepartment (Cns_ShrtOrFullName_t ShrtOrFullName)
|
|||
}
|
||||
else // The same name
|
||||
{
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_name_of_the_department_X_has_not_changed,
|
||||
CurrentDptName);
|
||||
Ale_ShowAlert (Ale_INFO,Gbl.Alert.Txt);
|
||||
|
@ -838,7 +838,7 @@ void Dpt_ChangeDptWWW (void)
|
|||
DB_QueryUPDATE (Query,"can not update the web of a department");
|
||||
|
||||
/***** Write message to show the change made *****/
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_new_web_address_is_X,
|
||||
NewWWW);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
|
@ -1028,14 +1028,14 @@ void Dpt_RecFormNewDpt (void)
|
|||
/***** If name of department was in database... *****/
|
||||
if (Dpt_CheckIfDepartmentNameExists ("ShortName",Dpt->ShrtName,-1L))
|
||||
{
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_department_X_already_exists,
|
||||
Dpt->ShrtName);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
}
|
||||
else if (Dpt_CheckIfDepartmentNameExists ("FullName",Dpt->FullName,-1L))
|
||||
{
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_department_X_already_exists,
|
||||
Dpt->FullName);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
|
@ -1074,7 +1074,7 @@ static void Dpt_CreateDepartment (struct Department *Dpt)
|
|||
DB_QueryINSERT (Query,"can not create a new department");
|
||||
|
||||
/***** Write success message *****/
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_Created_new_department_X,
|
||||
Dpt->FullName);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
|
|
|
@ -395,7 +395,7 @@ void Enr_ReqAcceptRegisterInCrs (void)
|
|||
Hlp_USERS_SignUp_confirm_enrolment,Box_NOT_CLOSABLE);
|
||||
|
||||
/***** Show message *****/
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_A_teacher_or_administrator_has_enroled_you_as_X_into_the_course_Y,
|
||||
Txt_ROLES_SINGUL_abc[Gbl.Usrs.Me.UsrDat.Roles.InCurrentCrs.Role][Gbl.Usrs.Me.UsrDat.Sex],
|
||||
Gbl.CurrentCrs.Crs.FullName);
|
||||
|
@ -774,7 +774,7 @@ static void Enr_ShowFormRegRemSeveralUsrs (Rol_Role_t Role)
|
|||
else
|
||||
{
|
||||
/* Write help message */
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_No_groups_have_been_created_in_the_course_X_Therefore_,
|
||||
Gbl.CurrentCrs.Crs.FullName);
|
||||
Ale_ShowAlert (Ale_INFO,Gbl.Alert.Txt);
|
||||
|
@ -898,7 +898,7 @@ void Enr_RemoveOldUsrs (void)
|
|||
(unsigned long) SecondsWithoutAccess);
|
||||
if ((NumUsrs = DB_QuerySELECT (Query,&mysql_res,"can not get old users")))
|
||||
{
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_Eliminating_X_users_who_were_not_enroled_in_any_course_and_with_more_than_Y_months_without_access_to_Z,
|
||||
NumUsrs,
|
||||
MonthsWithoutAccess,
|
||||
|
@ -933,7 +933,7 @@ void Enr_RemoveOldUsrs (void)
|
|||
}
|
||||
|
||||
/***** Write end message *****/
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_X_users_have_been_eliminated,
|
||||
NumUsrsEliminated);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
|
@ -1779,7 +1779,7 @@ static void Enr_ReceiveFormUsrsCrs (Rol_Role_t Role)
|
|||
Ale_ShowAlert (Ale_SUCCESS,Txt_One_user_has_been_eliminated);
|
||||
break;
|
||||
default:
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_X_users_have_been_eliminated,
|
||||
NumUsrsEliminated);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
|
@ -1795,7 +1795,7 @@ static void Enr_ReceiveFormUsrsCrs (Rol_Role_t Role)
|
|||
Ale_ShowAlert (Ale_SUCCESS,Txt_One_user_has_been_removed);
|
||||
break;
|
||||
default:
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_X_users_have_been_removed,
|
||||
NumUsrsRemoved);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
|
@ -1812,7 +1812,7 @@ static void Enr_ReceiveFormUsrsCrs (Rol_Role_t Role)
|
|||
Ale_ShowAlert (Ale_SUCCESS,Txt_One_user_has_been_enroled);
|
||||
break;
|
||||
default:
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_X_users_have_been_enroled_including_possible_repetitions,
|
||||
NumUsrsRegistered);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
|
@ -1911,7 +1911,7 @@ void Enr_AskRemAllStdsThisCrs (void)
|
|||
{
|
||||
/***** Show question and button to remove students *****/
|
||||
/* Start alert */
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_Do_you_really_want_to_remove_the_X_students_from_the_course_Y_,
|
||||
Gbl.CurrentCrs.Crs.NumUsrs[Rol_STD],
|
||||
Gbl.CurrentCrs.Crs.FullName);
|
||||
|
@ -1948,7 +1948,7 @@ void Enr_RemAllStdsThisCrs (void)
|
|||
{
|
||||
if ((NumStdsInCrs = Enr_RemAllStdsInCrs (&Gbl.CurrentCrs.Crs)))
|
||||
{
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_X_students_who_belonged_to_the_course_Y_have_been_removed_from_it,
|
||||
NumStdsInCrs,Gbl.CurrentCrs.Crs.FullName);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
|
@ -2002,7 +2002,7 @@ void Enr_ReqSignUpInCrs (void)
|
|||
/***** Check if I already belong to course *****/
|
||||
if (Gbl.Usrs.Me.UsrDat.Roles.InCurrentCrs.Role >= Rol_STD)
|
||||
{
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_You_were_already_enroled_as_X_in_the_course_Y,
|
||||
Txt_ROLES_SINGUL_abc[Gbl.Usrs.Me.UsrDat.Roles.InCurrentCrs.Role][Gbl.Usrs.Me.UsrDat.Sex],
|
||||
Gbl.CurrentCrs.Crs.FullName);
|
||||
|
@ -2034,7 +2034,7 @@ void Enr_SignUpInCrs (void)
|
|||
/***** Check if I already belong to course *****/
|
||||
if (Gbl.Usrs.Me.UsrDat.Roles.InCurrentCrs.Role >= Rol_STD)
|
||||
{
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_You_were_already_enroled_as_X_in_the_course_Y,
|
||||
Txt_ROLES_SINGUL_abc[Gbl.Usrs.Me.UsrDat.Roles.InCurrentCrs.Role][Gbl.Usrs.Me.UsrDat.Sex],
|
||||
Gbl.CurrentCrs.Crs.FullName);
|
||||
|
@ -2093,7 +2093,7 @@ void Enr_SignUpInCrs (void)
|
|||
}
|
||||
|
||||
/***** Show confirmation message *****/
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_Your_request_for_enrolment_as_X_in_the_course_Y_has_been_accepted_for_processing,
|
||||
Txt_ROLES_SINGUL_abc[RoleFromForm][Gbl.Usrs.Me.UsrDat.Sex],
|
||||
Gbl.CurrentCrs.Crs.FullName);
|
||||
|
@ -2189,7 +2189,7 @@ void Enr_AskIfRejectSignUp (void)
|
|||
if (Usr_CheckIfUsrBelongsToCurrentCrs (&Gbl.Usrs.Other.UsrDat))
|
||||
{
|
||||
/* User already belongs to this course */
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_THE_USER_X_is_already_enroled_in_the_course_Y,
|
||||
Gbl.Usrs.Other.UsrDat.FullName,Gbl.CurrentCrs.Crs.FullName);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
|
@ -2207,7 +2207,7 @@ void Enr_AskIfRejectSignUp (void)
|
|||
{
|
||||
/***** Show question and button to reject user's enrolment request *****/
|
||||
/* Start alert */
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_Do_you_really_want_to_reject_the_enrolment_request_,
|
||||
Gbl.Usrs.Other.UsrDat.FullName,
|
||||
Txt_ROLES_SINGUL_abc[Role][Gbl.Usrs.Other.UsrDat.Sex],
|
||||
|
@ -2248,7 +2248,7 @@ void Enr_RejectSignUp (void)
|
|||
if (Usr_CheckIfUsrBelongsToCurrentCrs (&Gbl.Usrs.Other.UsrDat))
|
||||
{
|
||||
/* User already belongs to this course */
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_THE_USER_X_is_already_enroled_in_the_course_Y,
|
||||
Gbl.Usrs.Other.UsrDat.FullName,Gbl.CurrentCrs.Crs.FullName);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
|
@ -2259,7 +2259,7 @@ void Enr_RejectSignUp (void)
|
|||
Enr_RemoveEnrolmentRequest (Gbl.CurrentCrs.Crs.CrsCod,Gbl.Usrs.Other.UsrDat.UsrCod);
|
||||
|
||||
/* Confirmation message */
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_Enrolment_of_X_rejected,
|
||||
Gbl.Usrs.Other.UsrDat.FullName);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
|
@ -3288,7 +3288,7 @@ static void Enr_AskIfRegRemUsr (struct ListUsrCods *ListUsrCods,Rol_Role_t Role)
|
|||
/***** Warning if more than one user found *****/
|
||||
if (ListUsrCods->NumUsrs > 1)
|
||||
{
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_There_are_X_users_with_the_ID_Y,
|
||||
ListUsrCods->NumUsrs,Gbl.Usrs.Other.UsrDat.UsrIDNickOrEmail);
|
||||
Ale_ShowAlert (Ale_INFO,Gbl.Alert.Txt);
|
||||
|
@ -3310,11 +3310,11 @@ static void Enr_AskIfRegRemUsr (struct ListUsrCods *ListUsrCods,Rol_Role_t Role)
|
|||
{
|
||||
Gbl.Usrs.Other.UsrDat.Accepted = Usr_CheckIfUsrHasAcceptedInCurrentCrs (&Gbl.Usrs.Other.UsrDat);
|
||||
if (Gbl.Usrs.Other.UsrDat.Accepted)
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_THE_USER_X_is_already_enroled_in_the_course_Y,
|
||||
Gbl.Usrs.Other.UsrDat.FullName,Gbl.CurrentCrs.Crs.FullName);
|
||||
else // Enrolment not yet accepted
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_THE_USER_X_is_already_in_the_course_Y_but_has_not_yet_accepted_the_enrolment,
|
||||
Gbl.Usrs.Other.UsrDat.FullName,Gbl.CurrentCrs.Crs.FullName);
|
||||
Ale_ShowAlert (Ale_INFO,Gbl.Alert.Txt);
|
||||
|
@ -3323,7 +3323,7 @@ static void Enr_AskIfRegRemUsr (struct ListUsrCods *ListUsrCods,Rol_Role_t Role)
|
|||
}
|
||||
else // User does not belong to the current course
|
||||
{
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_THE_USER_X_already_exists_in_Y_but_is_not_yet_enroled_in_the_course_Z,
|
||||
Gbl.Usrs.Other.UsrDat.FullName,
|
||||
Cfg_PLATFORM_SHORT_NAME,Gbl.CurrentCrs.Crs.FullName);
|
||||
|
@ -3334,7 +3334,7 @@ static void Enr_AskIfRegRemUsr (struct ListUsrCods *ListUsrCods,Rol_Role_t Role)
|
|||
}
|
||||
else // No course selected
|
||||
{
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_THE_USER_X_already_exists_in_Y,
|
||||
Gbl.Usrs.Other.UsrDat.FullName,Cfg_PLATFORM_SHORT_NAME);
|
||||
Ale_ShowAlert (Ale_INFO,Gbl.Alert.Txt);
|
||||
|
@ -3358,7 +3358,7 @@ static void Enr_AskIfRegRemUsr (struct ListUsrCods *ListUsrCods,Rol_Role_t Role)
|
|||
if (NewUsrIDValid)
|
||||
{
|
||||
/***** Show form to enter the data of a new user *****/
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_user_is_new_not_yet_in_X,
|
||||
Cfg_PLATFORM_SHORT_NAME);
|
||||
Ale_ShowAlert (Ale_INFO,Gbl.Alert.Txt);
|
||||
|
@ -3367,7 +3367,7 @@ static void Enr_AskIfRegRemUsr (struct ListUsrCods *ListUsrCods,Rol_Role_t Role)
|
|||
else // User's ID is not valid
|
||||
{
|
||||
/* Write message and request a new user's ID */
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_If_this_is_a_new_user_in_X_you_should_indicate_her_his_ID,
|
||||
Cfg_PLATFORM_SHORT_NAME);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
|
@ -3462,7 +3462,7 @@ static void Enr_RegisterAdmin (struct UsrData *UsrDat,Sco_Scope_t Scope,long Cod
|
|||
|
||||
/***** Check if user was and administrator of current institution/centre/degree *****/
|
||||
if (Usr_CheckIfUsrIsAdm (UsrDat->UsrCod,Scope,Cod))
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_THE_USER_X_is_already_an_administrator_of_Y,
|
||||
UsrDat->FullName,InsCtrDegName);
|
||||
else // User was not administrator of current institution/centre/degree
|
||||
|
@ -3475,7 +3475,7 @@ static void Enr_RegisterAdmin (struct UsrData *UsrDat,Sco_Scope_t Scope,long Cod
|
|||
UsrDat->UsrCod,Sco_ScopeDB[Scope],Cod);
|
||||
DB_QueryREPLACE (Query,"can not create administrator");
|
||||
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_THE_USER_X_has_been_enroled_as_administrator_of_Y,
|
||||
UsrDat->FullName,InsCtrDegName);
|
||||
}
|
||||
|
@ -3676,7 +3676,7 @@ static void Enr_ReqRemOrRemAdm (Enr_ReqDelOrDelUsr_t ReqDelOrDelUsr,Sco_Scope_t
|
|||
}
|
||||
else // The other user is not an administrator of current institution
|
||||
{
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_THE_USER_X_is_not_an_administrator_of_Y,
|
||||
Gbl.Usrs.Other.UsrDat.FullName,InsCtrDegName);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
|
@ -3725,7 +3725,7 @@ static void Enr_ReqAddAdm (Sco_Scope_t Scope,long Cod,const char *InsCtrDegName)
|
|||
{
|
||||
if (Usr_CheckIfUsrIsAdm (Gbl.Usrs.Other.UsrDat.UsrCod,Scope,Cod)) // User is already an administrator of current institution/centre/degree
|
||||
{
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_THE_USER_X_is_already_an_administrator_of_Y,
|
||||
Gbl.Usrs.Other.UsrDat.FullName,InsCtrDegName);
|
||||
Ale_ShowAlert (Ale_INFO,Gbl.Alert.Txt);
|
||||
|
@ -3735,7 +3735,7 @@ static void Enr_ReqAddAdm (Sco_Scope_t Scope,long Cod,const char *InsCtrDegName)
|
|||
{
|
||||
/***** Show question and button to register user as administrator *****/
|
||||
/* Start alert */
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_Do_you_really_want_to_register_the_following_user_as_an_administrator_of_X,
|
||||
InsCtrDegName);
|
||||
Ale_ShowAlertAndButton1 (Ale_QUESTION,Gbl.Alert.Txt);
|
||||
|
@ -3776,7 +3776,7 @@ void Enr_AcceptRegisterMeInCrs (void)
|
|||
Gbl.Usrs.Me.UsrDat.UsrCod);
|
||||
|
||||
/***** Confirmation message *****/
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_You_have_confirmed_your_enrolment_in_the_course_X,
|
||||
Gbl.CurrentCrs.Crs.FullName);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
|
@ -3829,7 +3829,7 @@ void Enr_CreateNewUsr1 (void)
|
|||
|
||||
/* Success message */
|
||||
Gbl.Alert.Type = Ale_SUCCESS;
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_role_of_THE_USER_X_in_the_course_Y_has_changed_from_A_to_B,
|
||||
Gbl.Usrs.Other.UsrDat.FullName,
|
||||
Gbl.CurrentCrs.Crs.FullName,
|
||||
|
@ -3845,7 +3845,7 @@ void Enr_CreateNewUsr1 (void)
|
|||
|
||||
/* Success message */
|
||||
Gbl.Alert.Type = Ale_SUCCESS;
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_THE_USER_X_has_been_enroled_in_the_course_Y,
|
||||
Gbl.Usrs.Other.UsrDat.FullName,
|
||||
Gbl.CurrentCrs.Crs.FullName);
|
||||
|
@ -3881,7 +3881,7 @@ void Enr_CreateNewUsr1 (void)
|
|||
{
|
||||
/***** Error message *****/
|
||||
Gbl.Alert.Type = Ale_ERROR;
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_ID_X_is_not_valid,
|
||||
Gbl.Usrs.Other.UsrDat.IDs.List[0].ID);
|
||||
}
|
||||
|
@ -3957,7 +3957,7 @@ void Enr_ModifyUsr1 (void)
|
|||
|
||||
/* Set success message */
|
||||
Gbl.Alert.Type = Ale_SUCCESS;
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_role_of_THE_USER_X_in_the_course_Y_has_changed_from_A_to_B,
|
||||
Gbl.Usrs.Other.UsrDat.FullName,
|
||||
Gbl.CurrentCrs.Crs.FullName,
|
||||
|
@ -3973,7 +3973,7 @@ void Enr_ModifyUsr1 (void)
|
|||
|
||||
/* Set success message */
|
||||
Gbl.Alert.Type = Ale_SUCCESS;
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_THE_USER_X_has_been_enroled_in_the_course_Y,
|
||||
Gbl.Usrs.Other.UsrDat.FullName,Gbl.CurrentCrs.Crs.FullName);
|
||||
}
|
||||
|
@ -4153,7 +4153,7 @@ static void Enr_AskIfRemoveUsrFromCrs (struct UsrData *UsrDat)
|
|||
|
||||
/***** Show question and button to remove user as administrator *****/
|
||||
/* Start alert */
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
ItsMe ? Txt_Do_you_really_want_to_be_removed_from_the_course_X :
|
||||
Txt_Do_you_really_want_to_remove_the_following_user_from_the_course_X,
|
||||
Gbl.CurrentCrs.Crs.FullName);
|
||||
|
@ -4272,7 +4272,7 @@ static void Enr_EffectivelyRemUsrFromCrs (struct UsrData *UsrDat,struct Course *
|
|||
if (QuietOrVerbose == Cns_VERBOSE)
|
||||
{
|
||||
Gbl.Alert.Type = Ale_SUCCESS;
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_THE_USER_X_has_been_removed_from_the_course_Y,
|
||||
UsrDat->FullName,Crs->FullName);
|
||||
}
|
||||
|
@ -4312,7 +4312,7 @@ static void Enr_AskIfRemAdm (bool ItsMe,Sco_Scope_t Scope,
|
|||
{
|
||||
/***** Show question and button to remove user as administrator *****/
|
||||
/* Start alert */
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
ItsMe ? Txt_Do_you_really_want_to_be_removed_as_an_administrator_of_X :
|
||||
Txt_Do_you_really_want_to_remove_the_following_user_as_an_administrator_of_X,
|
||||
InsCtrDegName);
|
||||
|
@ -4352,14 +4352,14 @@ static void Enr_EffectivelyRemAdm (struct UsrData *UsrDat,Sco_Scope_t Scope,
|
|||
UsrDat->UsrCod,Sco_ScopeDB[Scope],Cod);
|
||||
DB_QueryDELETE (Query,"can not remove an administrator");
|
||||
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_THE_USER_X_has_been_removed_as_administrator_of_Y,
|
||||
UsrDat->FullName,InsCtrDegName);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
}
|
||||
else // User is not an administrator of the current institution/centre/degree
|
||||
{
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_THE_USER_X_is_not_an_administrator_of_Y,
|
||||
UsrDat->FullName,InsCtrDegName);
|
||||
Ale_ShowAlert (Ale_ERROR,Gbl.Alert.Txt);
|
||||
|
|
|
@ -658,7 +658,7 @@ static void Exa_ListExamAnnouncements (Exa_TypeViewExamAnnouncement_t TypeViewEx
|
|||
/***** The result of the query may be empty *****/
|
||||
if (!NumExaAnns)
|
||||
{
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_No_announcements_of_exams_of_X,
|
||||
Gbl.CurrentCrs.Crs.FullName);
|
||||
Ale_ShowAlert (Ale_INFO,Gbl.Alert.Txt);
|
||||
|
|
18
swad_file.c
18
swad_file.c
|
@ -141,11 +141,11 @@ bool Fil_ReadStdinIntoTmpFile (void)
|
|||
{
|
||||
Fil_EndOfReadingStdin (); // If stdin were not fully read, there will be problems with buffers
|
||||
if (FileIsTooBig)
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_UPLOAD_FILE_File_too_large_maximum_X_MiB_NO_HTML,
|
||||
(unsigned long) (Fil_MAX_FILE_SIZE / (1024ULL * 1024ULL)));
|
||||
else
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_UPLOAD_FILE_Upload_time_too_long_maximum_X_minutes_NO_HTML,
|
||||
(unsigned long) (Cfg_TIME_TO_ABORT_FILE_UPLOAD / 60UL));
|
||||
|
||||
|
@ -343,7 +343,7 @@ void Fil_CreateUpdateFile (const char CurrentName[PATH_MAX + 1],
|
|||
/* Open the new file */
|
||||
if ((*NewFile = fopen (NewName,"wb")) == NULL)
|
||||
{
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
"Can not create file <strong>%s</strong>.",
|
||||
NewName);
|
||||
Lay_ShowErrorAndExit (Gbl.Alert.Txt);
|
||||
|
@ -362,14 +362,14 @@ void Fil_CloseUpdateFile (const char *CurrentName,const char *OldName,const char
|
|||
/* Rename the old file and the new file */
|
||||
if (rename (CurrentName,OldName)) // mv CurrentName OldName Ej: mv file.html file.old
|
||||
{
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
"Can not rename the file <strong>%s</strong> as <strong>%s</strong>.",
|
||||
CurrentName,OldName);
|
||||
Lay_ShowErrorAndExit (Gbl.Alert.Txt);
|
||||
}
|
||||
if (rename (NewName,CurrentName)) // mv NewName CurrentName Ej: mv file.new file.html
|
||||
{
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
"Can not rename the file <strong>%s</strong> as <strong>%s</strong>.",
|
||||
NewName,CurrentName);
|
||||
Lay_ShowErrorAndExit (Gbl.Alert.Txt);
|
||||
|
@ -392,12 +392,12 @@ bool Fil_RenameFileOrDir (const char *PathOld,const char *PathNew)
|
|||
{
|
||||
case ENOTEMPTY:
|
||||
case EEXIST:
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_There_is_already_a_non_empty_folder_named_X,
|
||||
PathNew);
|
||||
break;
|
||||
case ENOTDIR:
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_There_is_already_a_file_named_X,
|
||||
PathNew);
|
||||
break;
|
||||
|
@ -434,7 +434,7 @@ void Fil_CreateDirIfNotExists (const char *Path)
|
|||
if (!Fil_CheckIfPathExists (Path))
|
||||
if (mkdir (Path,(mode_t) 0xFFF) != 0)
|
||||
{
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
"Can not create folder <strong>%s</strong>.",
|
||||
Path);
|
||||
Lay_ShowErrorAndExit (Gbl.Alert.Txt);
|
||||
|
@ -495,7 +495,7 @@ void Fil_RemoveTree (const char *Path)
|
|||
Error = true;
|
||||
if (Error)
|
||||
{
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
"Can not remove folder %s.",
|
||||
Path);
|
||||
Lay_ShowErrorAndExit (Gbl.Alert.Txt);
|
||||
|
|
|
@ -3124,7 +3124,7 @@ bool Brw_UpdateFoldersAssigmentsIfExistForAllUsrs (const char *OldFolderName,con
|
|||
}
|
||||
|
||||
/***** Summary message *****/
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
"%s: %u<br />"
|
||||
"%s: %u<br />"
|
||||
"%s: %u.",
|
||||
|
@ -3817,7 +3817,7 @@ void Brw_ShowAgainFileBrowserOrWorks (void)
|
|||
}
|
||||
|
||||
/***** Legal notice *****/
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_Disclaimer_the_files_hosted_here_,
|
||||
Cfg_PLATFORM_SHORT_NAME,
|
||||
Cfg_PLATFORM_RESPONSIBLE_EMAIL);
|
||||
|
@ -7029,7 +7029,7 @@ void Brw_AskRemFileFromTree (void)
|
|||
Gbl.FileBrowser.FileType,
|
||||
Gbl.FileBrowser.FilFolLnkName,
|
||||
FileNameToShow);
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_Do_you_really_want_to_remove_FILE_OR_LINK_X,
|
||||
FileNameToShow);
|
||||
Ale_ShowAlertAndButton (Ale_QUESTION,Gbl.Alert.Txt,
|
||||
|
@ -7099,7 +7099,7 @@ void Brw_RemFileFromTree (void)
|
|||
Gbl.Usrs.Other.UsrDat.UsrCod);
|
||||
|
||||
/* Message of confirmation of removing */
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_FILE_X_removed,
|
||||
FileNameToShow);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
|
@ -7157,7 +7157,7 @@ void Brw_RemFolderFromTree (void)
|
|||
Gbl.Usrs.Other.UsrDat.UsrCod);
|
||||
|
||||
/* Message of confirmation of successfull removing */
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_Folder_X_removed,
|
||||
Gbl.FileBrowser.FilFolLnkName);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
|
@ -7182,7 +7182,7 @@ static void Brw_AskConfirmRemoveFolderNotEmpty (void)
|
|||
extern const char *Txt_Remove_folder;
|
||||
|
||||
/***** Show question and button to remove not empty folder *****/
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_Do_you_really_want_to_remove_the_folder_X,
|
||||
Gbl.FileBrowser.FilFolLnkName);
|
||||
Ale_ShowAlertAndButton (Ale_QUESTION,Gbl.Alert.Txt,
|
||||
|
@ -7237,7 +7237,7 @@ void Brw_RemSubtreeInFileBrowser (void)
|
|||
Brw_RemoveAffectedExpandedFolders (Gbl.FileBrowser.Priv.FullPathInTree);
|
||||
|
||||
/***** Write message of confirmation *****/
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_Folder_X_and_all_its_contents_removed,
|
||||
Gbl.FileBrowser.FilFolLnkName);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
|
@ -7531,7 +7531,7 @@ static void Brw_WriteCurrentClipboard (void)
|
|||
Gbl.FileBrowser.Clipboard.FileName,
|
||||
FileNameToShow);
|
||||
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
"%s: %s, %s <strong>%s</strong>.",
|
||||
Txt_Copy_source,TxtClipboardZone,
|
||||
TxtFileType[Gbl.FileBrowser.Clipboard.FileType],
|
||||
|
@ -7539,7 +7539,7 @@ static void Brw_WriteCurrentClipboard (void)
|
|||
}
|
||||
else
|
||||
// The root folder
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
"%s: %s, %s.",
|
||||
Txt_Copy_source,TxtClipboardZone,
|
||||
Txt_all_files_inside_the_root_folder);
|
||||
|
@ -8444,7 +8444,7 @@ static void Brw_PasteClipboard (void)
|
|||
&FirstFilCod))
|
||||
{
|
||||
/***** Write message of success *****/
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
"%s<br />"
|
||||
"%s: %u<br />"
|
||||
"%s: %u<br />"
|
||||
|
@ -8593,17 +8593,17 @@ static bool Brw_PasteTreeIntoFolder (unsigned LevelOrg,
|
|||
switch (FileType)
|
||||
{
|
||||
case Brw_IS_FILE:
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_copy_has_stopped_when_trying_to_paste_the_file_X_because_it_would_exceed_the_maximum_allowed_number_of_levels,
|
||||
FileNameToShow);
|
||||
break;
|
||||
case Brw_IS_FOLDER:
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_copy_has_stopped_when_trying_to_paste_the_folder_X_because_it_would_exceed_the_maximum_allowed_number_of_levels,
|
||||
FileNameToShow);
|
||||
break;
|
||||
case Brw_IS_LINK:
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_copy_has_stopped_when_trying_to_paste_the_link_X_because_it_would_exceed_the_maximum_allowed_number_of_levels,
|
||||
FileNameToShow);
|
||||
break;
|
||||
|
@ -8622,7 +8622,7 @@ static bool Brw_PasteTreeIntoFolder (unsigned LevelOrg,
|
|||
/***** Check if exists the destination file */
|
||||
if (Fil_CheckIfPathExists (PathDstWithFile))
|
||||
{
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
FileType == Brw_IS_FILE ? Txt_The_copy_has_stopped_when_trying_to_paste_the_file_X_because_there_is_already_an_object_with_that_name :
|
||||
Txt_The_copy_has_stopped_when_trying_to_paste_the_link_X_because_there_is_already_an_object_with_that_name,
|
||||
FileNameToShow);
|
||||
|
@ -8641,7 +8641,7 @@ static bool Brw_PasteTreeIntoFolder (unsigned LevelOrg,
|
|||
Mrk_CheckFileOfMarks (PathOrg,&Marks); // Gbl.Alert.Txt contains feedback text
|
||||
else
|
||||
{
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_copy_has_stopped_when_trying_to_paste_the_file_X_because_you_can_not_paste_a_file_here_of_a_type_other_than_HTML,
|
||||
FileNameToShow);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
|
@ -8656,7 +8656,7 @@ static bool Brw_PasteTreeIntoFolder (unsigned LevelOrg,
|
|||
Gbl.FileBrowser.Size.TotalSiz += (unsigned long long) FileStatus.st_size;
|
||||
if (Brw_CheckIfQuotaExceded ())
|
||||
{
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
FileType == Brw_IS_FILE ? Txt_The_copy_has_stopped_when_trying_to_paste_the_file_X_because_it_would_exceed_the_disk_quota :
|
||||
Txt_The_copy_has_stopped_when_trying_to_paste_the_link_X_because_it_would_exceed_the_disk_quota,
|
||||
FileNameToShow);
|
||||
|
@ -8700,7 +8700,7 @@ static bool Brw_PasteTreeIntoFolder (unsigned LevelOrg,
|
|||
Gbl.FileBrowser.Size.TotalSiz += (unsigned long long) FileStatus.st_size;
|
||||
if (Brw_CheckIfQuotaExceded ())
|
||||
{
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_copy_has_stopped_when_trying_to_paste_the_folder_X_because_it_would_exceed_the_disk_quota,
|
||||
FileNameToShow);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
|
@ -8828,7 +8828,7 @@ static void Brw_PutFormToCreateAFolder (const char FileNameToShow[NAME_MAX + 1])
|
|||
/***** Start box *****/
|
||||
Box_StartBox (NULL,Txt_Create_folder,NULL,
|
||||
NULL,Box_NOT_CLOSABLE);
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_You_can_create_a_new_folder_inside_the_folder_X,
|
||||
FileNameToShow);
|
||||
Ale_ShowAlert (Ale_INFO,Gbl.Alert.Txt);
|
||||
|
@ -8868,7 +8868,7 @@ static void Brw_PutFormToUploadFilesUsingDropzone (const char *FileNameToShow)
|
|||
NULL,Box_NOT_CLOSABLE);
|
||||
|
||||
/***** Help message *****/
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_or_you_can_upload_new_files_to_the_folder_X,
|
||||
FileNameToShow);
|
||||
Ale_ShowAlert (Ale_INFO,Gbl.Alert.Txt);
|
||||
|
@ -8931,7 +8931,7 @@ static void Brw_PutFormToUploadOneFileClassic (const char *FileNameToShow)
|
|||
NULL,Box_NOT_CLOSABLE);
|
||||
|
||||
/***** Help message *****/
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_or_you_can_upload_a_new_file_to_the_folder_X,
|
||||
FileNameToShow);
|
||||
Ale_ShowAlert (Ale_INFO,Gbl.Alert.Txt);
|
||||
|
@ -8975,7 +8975,7 @@ static void Brw_PutFormToPasteAFileOrFolder (const char *FileNameToShow)
|
|||
NULL,Box_NOT_CLOSABLE);
|
||||
|
||||
/***** Help message *****/
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_or_you_can_make_a_file_copy_to_the_folder_X,
|
||||
FileNameToShow);
|
||||
Ale_ShowAlert (Ale_INFO,Gbl.Alert.Txt);
|
||||
|
@ -9012,7 +9012,7 @@ static void Brw_PutFormToCreateALink (const char *FileNameToShow)
|
|||
NULL,Box_NOT_CLOSABLE);
|
||||
|
||||
/***** Help message *****/
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_or_you_can_create_a_new_link_inside_the_folder_X,
|
||||
FileNameToShow);
|
||||
Ale_ShowAlert (Ale_INFO,Gbl.Alert.Txt);
|
||||
|
@ -9102,7 +9102,7 @@ void Brw_RecFolderFileBrowser (void)
|
|||
if (Brw_CheckIfQuotaExceded ())
|
||||
{
|
||||
Fil_RemoveTree (Path);
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_Can_not_create_the_folder_X_because_it_would_exceed_the_disk_quota,
|
||||
Gbl.FileBrowser.NewFilFolLnkName);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
|
@ -9130,7 +9130,7 @@ void Brw_RecFolderFileBrowser (void)
|
|||
Brw_IS_FOLDER,
|
||||
Gbl.FileBrowser.FilFolLnkName,
|
||||
FileNameToShow);
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_folder_X_has_been_created_inside_the_folder_Y,
|
||||
Gbl.FileBrowser.NewFilFolLnkName,FileNameToShow);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
|
@ -9141,7 +9141,7 @@ void Brw_RecFolderFileBrowser (void)
|
|||
switch (errno)
|
||||
{
|
||||
case EEXIST:
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_Can_not_create_the_folder_X_because_there_is_already_a_folder_or_a_file_with_that_name,
|
||||
Gbl.FileBrowser.NewFilFolLnkName);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
|
@ -9220,7 +9220,7 @@ void Brw_RenFolderFileBrowser (void)
|
|||
case ENOTEMPTY:
|
||||
case EEXIST:
|
||||
case ENOTDIR:
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_folder_name_X_has_not_changed_because_there_is_already_a_folder_or_a_file_with_the_name_Y,
|
||||
Gbl.FileBrowser.FilFolLnkName,Gbl.FileBrowser.NewFilFolLnkName);
|
||||
break;
|
||||
|
@ -9256,7 +9256,7 @@ void Brw_RenFolderFileBrowser (void)
|
|||
NewPathInTree);
|
||||
|
||||
/* Write message of confirmation */
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_folder_name_X_has_changed_to_Y,
|
||||
Gbl.FileBrowser.FilFolLnkName,
|
||||
Gbl.FileBrowser.NewFilFolLnkName);
|
||||
|
@ -9266,7 +9266,7 @@ void Brw_RenFolderFileBrowser (void)
|
|||
}
|
||||
else // Names are equal. This may happens if we have press INTRO without changing the name
|
||||
{
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_folder_name_X_has_not_changed,
|
||||
Gbl.FileBrowser.FilFolLnkName);
|
||||
Ale_ShowAlert (Ale_INFO,Gbl.Alert.Txt);
|
||||
|
@ -9394,7 +9394,7 @@ static bool Brw_RcvFileInFileBrw (Brw_UploadType_t UploadType)
|
|||
if (Fil_CheckIfPathExists (Path))
|
||||
{
|
||||
Gbl.Alert.Type = Ale_WARNING;
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_UPLOAD_FILE_X_file_already_exists_NO_HTML,
|
||||
Gbl.FileBrowser.NewFilFolLnkName);
|
||||
}
|
||||
|
@ -9417,7 +9417,7 @@ static bool Brw_RcvFileInFileBrw (Brw_UploadType_t UploadType)
|
|||
{
|
||||
Fil_RemoveTree (PathTmp);
|
||||
Gbl.Alert.Type = Ale_WARNING;
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_UPLOAD_FILE_could_not_create_file_NO_HTML,
|
||||
Gbl.FileBrowser.NewFilFolLnkName);
|
||||
}
|
||||
|
@ -9430,7 +9430,7 @@ static bool Brw_RcvFileInFileBrw (Brw_UploadType_t UploadType)
|
|||
{
|
||||
Fil_RemoveTree (Path);
|
||||
Gbl.Alert.Type = Ale_WARNING;
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_UPLOAD_FILE_X_quota_exceeded_NO_HTML,
|
||||
Gbl.FileBrowser.NewFilFolLnkName);
|
||||
}
|
||||
|
@ -9460,7 +9460,7 @@ static bool Brw_RcvFileInFileBrw (Brw_UploadType_t UploadType)
|
|||
Gbl.FileBrowser.FilFolLnkName,
|
||||
FileNameToShow);
|
||||
Gbl.Alert.Type = Ale_SUCCESS;
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_file_X_has_been_placed_inside_the_folder_Y,
|
||||
Gbl.FileBrowser.NewFilFolLnkName,
|
||||
FileNameToShow);
|
||||
|
@ -9604,7 +9604,7 @@ void Brw_RecLinkFileBrowser (void)
|
|||
/* Check if the URL file exists */
|
||||
if (Fil_CheckIfPathExists (Path))
|
||||
{
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_Can_not_create_the_link_X_because_there_is_already_a_folder_or_a_link_with_that_name,
|
||||
FileName);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
|
@ -9626,7 +9626,7 @@ void Brw_RecLinkFileBrowser (void)
|
|||
if (Brw_CheckIfQuotaExceded ())
|
||||
{
|
||||
Fil_RemoveTree (Path);
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_Can_not_create_the_link_X_because_it_would_exceed_the_disk_quota,
|
||||
FileName);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
|
@ -9654,7 +9654,7 @@ void Brw_RecLinkFileBrowser (void)
|
|||
Brw_IS_FOLDER,
|
||||
Gbl.FileBrowser.FilFolLnkName,
|
||||
FileNameToShow);
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_link_X_has_been_placed_inside_the_folder_Y,
|
||||
FileName,FileNameToShow);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
|
@ -9730,7 +9730,7 @@ static bool Brw_CheckIfUploadIsAllowed (const char *MIMEType)
|
|||
if (strcmp (MIMEType,"application/octetstream"))
|
||||
if (strcmp (MIMEType,"application/octet"))
|
||||
{ // MIME type forbidden
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_UPLOAD_FILE_X_MIME_type_Y_not_allowed_NO_HTML,
|
||||
Gbl.FileBrowser.NewFilFolLnkName,MIMEType);
|
||||
return false;
|
||||
|
@ -9738,7 +9738,7 @@ static bool Brw_CheckIfUploadIsAllowed (const char *MIMEType)
|
|||
}
|
||||
else
|
||||
{
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_UPLOAD_FILE_X_not_HTML_NO_HTML,
|
||||
Gbl.FileBrowser.NewFilFolLnkName);
|
||||
return false;
|
||||
|
@ -9767,7 +9767,7 @@ static bool Brw_CheckIfUploadIsAllowed (const char *MIMEType)
|
|||
}
|
||||
if (!MIMETypeIsAllowed)
|
||||
{
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_UPLOAD_FILE_X_MIME_type_Y_not_allowed_NO_HTML,
|
||||
Gbl.FileBrowser.NewFilFolLnkName,MIMEType);
|
||||
return false;
|
||||
|
@ -9775,7 +9775,7 @@ static bool Brw_CheckIfUploadIsAllowed (const char *MIMEType)
|
|||
}
|
||||
else
|
||||
{
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_UPLOAD_FILE_X_extension_not_allowed_NO_HTML,
|
||||
Gbl.FileBrowser.NewFilFolLnkName);
|
||||
return false;
|
||||
|
@ -9814,7 +9814,7 @@ void Brw_SetDocumentAsVisible (void)
|
|||
Gbl.FileBrowser.FileType,
|
||||
Gbl.FileBrowser.FilFolLnkName,
|
||||
FileNameToShow);
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_FILE_FOLDER_OR_LINK_X_is_now_visible,
|
||||
FileNameToShow);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
|
@ -9852,7 +9852,7 @@ void Brw_SetDocumentAsHidden (void)
|
|||
Gbl.FileBrowser.FileType,
|
||||
Gbl.FileBrowser.FilFolLnkName,
|
||||
FileNameToShow);
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_FILE_FOLDER_OR_LINK_X_is_now_hidden,
|
||||
FileNameToShow);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
|
@ -10819,7 +10819,7 @@ void Brw_ChgFileMetadata (void)
|
|||
}
|
||||
|
||||
/***** Write message of confirmation *****/
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_properties_of_file_X_have_been_saved,
|
||||
Gbl.FileBrowser.FilFolLnkName);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
|
@ -10827,7 +10827,7 @@ void Brw_ChgFileMetadata (void)
|
|||
else
|
||||
{
|
||||
/***** Write message of error *****/
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_You_dont_have_permission_to_change_the_properties_of_file_X,
|
||||
Gbl.FileBrowser.FilFolLnkName);
|
||||
Ale_ShowAlert (Ale_ERROR,Gbl.Alert.Txt);
|
||||
|
@ -12837,7 +12837,7 @@ void Brw_RemoveOldFilesBriefcase (void)
|
|||
Brw_RemoveOldFilesInBrowser (Months,&Removed);
|
||||
|
||||
/***** Success message *****/
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
"%s: %u<br />"
|
||||
"%s: %u<br />"
|
||||
"%s: %u",
|
||||
|
|
10
swad_forum.c
10
swad_forum.c
|
@ -4162,7 +4162,7 @@ void For_RequestRemoveThread (void)
|
|||
/***** Show question and button to remove the thread *****/
|
||||
Lay_StartSection (For_REMOVE_THREAD_SECTION_ID);
|
||||
if (Subject[0])
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_Do_you_really_want_to_remove_the_entire_thread_X,
|
||||
Subject);
|
||||
else
|
||||
|
@ -4219,7 +4219,7 @@ void For_RemoveThread (void)
|
|||
/***** Show the threads again *****/
|
||||
if (Subject[0])
|
||||
{
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_Thread_X_removed,Subject);
|
||||
For_ShowForumThreadsHighlightingOneThread (Gbl.Forum.ForumSelected.ThrCod,
|
||||
Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
|
@ -4257,7 +4257,7 @@ void For_CutThread (void)
|
|||
/***** Show the threads again *****/
|
||||
if (Subject[0])
|
||||
{
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_Thread_X_marked_to_be_moved,Subject);
|
||||
For_ShowForumThreadsHighlightingOneThread (Gbl.Forum.ForumSelected.ThrCod,
|
||||
Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
|
@ -4295,7 +4295,7 @@ void For_PasteThread (void)
|
|||
/***** Show the threads again *****/
|
||||
if (Subject[0])
|
||||
{
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_thread_X_is_already_in_this_forum,
|
||||
Subject);
|
||||
For_ShowForumThreadsHighlightingOneThread (Gbl.Forum.ForumSelected.ThrCod,
|
||||
|
@ -4316,7 +4316,7 @@ void For_PasteThread (void)
|
|||
/***** Show the threads again *****/
|
||||
if (Subject[0])
|
||||
{
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_Thread_X_moved_to_this_forum,
|
||||
Subject);
|
||||
For_ShowForumThreadsHighlightingOneThread (Gbl.Forum.ForumSelected.ThrCod,
|
||||
|
|
18
swad_game.c
18
swad_game.c
|
@ -1495,7 +1495,7 @@ void Gam_AskRemGame (void)
|
|||
|
||||
/***** Show question and button to remove game *****/
|
||||
Gbl.Games.CurrentGamCod = Game.GamCod;
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_Do_you_really_want_to_remove_the_game_X,
|
||||
Game.Title);
|
||||
Ale_ShowAlertAndButton (Ale_QUESTION,Gbl.Alert.Txt,
|
||||
|
@ -1545,7 +1545,7 @@ void Gam_RemoveGame (void)
|
|||
DB_QueryDELETE (Query,"can not remove game");
|
||||
|
||||
/***** Write message to show the change made *****/
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_Game_X_removed,
|
||||
Game.Title);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
|
@ -1578,7 +1578,7 @@ void Gam_AskResetGame (void)
|
|||
Lay_ShowErrorAndExit ("You can not reset this game.");
|
||||
|
||||
/***** Ask for confirmation of reset *****/
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_Do_you_really_want_to_reset_the_game_X,
|
||||
Game.Title);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
|
@ -1637,7 +1637,7 @@ void Gam_ResetGame (void)
|
|||
DB_QueryUPDATE (Query,"can not reset answers of a game");
|
||||
|
||||
/***** Write message to show the change made *****/
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_Game_X_reset,
|
||||
Game.Title);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
|
@ -1671,7 +1671,7 @@ void Gam_HideGame (void)
|
|||
DB_QueryUPDATE (Query,"can not hide game");
|
||||
|
||||
/***** Write message to show the change made *****/
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_Game_X_is_now_hidden,
|
||||
Game.Title);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
|
@ -1705,7 +1705,7 @@ void Gam_UnhideGame (void)
|
|||
DB_QueryUPDATE (Query,"can not show game");
|
||||
|
||||
/***** Write message to show the change made *****/
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_Game_X_is_now_visible,
|
||||
Game.Title);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
|
@ -2149,7 +2149,7 @@ void Gam_RecFormGame (void)
|
|||
if (Gam_CheckIfSimilarGameExists (&NewGame))
|
||||
{
|
||||
NewGameIsCorrect = false;
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_Already_existed_a_game_with_the_title_X,
|
||||
NewGame.Title);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
|
@ -2215,7 +2215,7 @@ static void Gam_CreateGame (struct Game *Game,const char *Txt)
|
|||
Gam_CreateGrps (Game->GamCod);
|
||||
|
||||
/***** Write success message *****/
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_Created_new_game_X,
|
||||
Game->Title);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
|
@ -3280,7 +3280,7 @@ void Gam_RequestRemoveQst (void)
|
|||
/***** Show question and button to remove question *****/
|
||||
Gbl.Games.CurrentGamCod = Game.GamCod;
|
||||
Gbl.Games.CurrentQstCod = QstCod;
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_Do_you_really_want_to_remove_the_question_X,
|
||||
(unsigned long) (QstInd + 1));
|
||||
Ale_ShowAlertAndButton (Ale_QUESTION,Gbl.Alert.Txt,
|
||||
|
|
84
swad_group.c
84
swad_group.c
|
@ -281,7 +281,7 @@ static void Grp_EditGroupTypes (void)
|
|||
Grp_ListGroupTypesForEdition ();
|
||||
else // No group types found in this course
|
||||
{
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_There_are_no_types_of_group_in_the_course_X,
|
||||
Gbl.CurrentCrs.Crs.ShrtName);
|
||||
Ale_ShowAlert (Ale_INFO,Gbl.Alert.Txt);
|
||||
|
@ -313,7 +313,7 @@ static void Grp_EditGroups (void)
|
|||
Grp_ListGroupsForEdition ();
|
||||
else // There are group types, but there aren't groups
|
||||
{
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_No_groups_have_been_created_in_the_course_X,
|
||||
Gbl.CurrentCrs.Crs.ShrtName);
|
||||
Ale_ShowAlert (Ale_INFO,Gbl.Alert.Txt);
|
||||
|
@ -1105,7 +1105,7 @@ void Grp_RegisterUsrIntoGroups (struct UsrData *UsrDat,struct ListCodGrps *LstGr
|
|||
/* If the enrolment is single and the group to which the user belongs is different from the selected ==>
|
||||
remove user from the group to which he belongs */
|
||||
Grp_RemoveUsrFromGroup (UsrDat->UsrCod,LstGrpsHeBelongs.GrpCods[NumGrpHeBelongs]);
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_THE_USER_X_has_been_removed_from_the_group_of_type_Y_to_which_it_belonged,
|
||||
UsrDat->FullName,Gbl.CurrentCrs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp].GrpTypName);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
|
@ -1114,7 +1114,7 @@ void Grp_RegisterUsrIntoGroups (struct UsrData *UsrDat,struct ListCodGrps *LstGr
|
|||
if (!AlreadyRegisteredInGrp) // If the user does not belong to the selected group
|
||||
{
|
||||
Grp_AddUsrToGroup (UsrDat,LstGrps->GrpCods[NumGrpSel]);
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_THE_USER_X_has_been_enroled_in_the_group_of_type_Y_Z,
|
||||
UsrDat->FullName,Gbl.CurrentCrs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp].GrpTypName,
|
||||
Gbl.CurrentCrs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp].LstGrps[NumGrpThisType].GrpName);
|
||||
|
@ -1166,15 +1166,15 @@ unsigned Grp_RemoveUsrFromGroups (struct UsrData *UsrDat,struct ListCodGrps *Lst
|
|||
|
||||
/***** Write message to inform about how many groups the student has been removed from *****/
|
||||
if (NumGrpsHeIsRemoved == 0)
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_THE_USER_X_has_not_been_removed_from_any_group,
|
||||
UsrDat->FullName);
|
||||
else if (NumGrpsHeIsRemoved == 1)
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_THE_USER_X_has_been_removed_from_one_group,
|
||||
UsrDat->FullName);
|
||||
else // NumGrpsHeIsRemoved > 1
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_THE_USER_X_has_been_removed_from_Y_groups,
|
||||
UsrDat->FullName,NumGrpsHeIsRemoved);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
|
@ -1807,7 +1807,7 @@ void Grp_ShowLstGrpsToChgMyGrps (void)
|
|||
}
|
||||
else // This course has no groups
|
||||
{
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_No_groups_have_been_created_in_the_course_X,
|
||||
Gbl.CurrentCrs.Crs.FullName);
|
||||
Ale_ShowAlert (Ale_INFO,Gbl.Alert.Txt);
|
||||
|
@ -1862,7 +1862,7 @@ static void Grp_ShowWarningToStdsToChangeGrps (void)
|
|||
{
|
||||
if (GrpTyp->MandatoryEnrolment)
|
||||
{
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
GrpTyp->MultipleEnrolment ? Txt_You_have_to_register_compulsorily_at_least_in_one_group_of_type_X :
|
||||
Txt_You_have_to_register_compulsorily_in_one_group_of_type_X,
|
||||
GrpTyp->GrpTypName);
|
||||
|
@ -1870,7 +1870,7 @@ static void Grp_ShowWarningToStdsToChangeGrps (void)
|
|||
}
|
||||
else
|
||||
{
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
GrpTyp->MultipleEnrolment ? Txt_You_can_register_voluntarily_in_one_or_more_groups_of_type_X :
|
||||
Txt_You_can_register_voluntarily_in_one_group_of_type_X,
|
||||
GrpTyp->GrpTypName);
|
||||
|
@ -3686,7 +3686,7 @@ void Grp_RecFormNewGrpTyp (void)
|
|||
if (Grp_CheckIfGroupTypeNameExists (Gbl.CurrentCrs.Grps.GrpTyp.GrpTypName,-1L))
|
||||
{
|
||||
AlertType = Ale_WARNING;
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_type_of_group_X_already_exists,
|
||||
Gbl.CurrentCrs.Grps.GrpTyp.GrpTypName);
|
||||
}
|
||||
|
@ -3695,7 +3695,7 @@ void Grp_RecFormNewGrpTyp (void)
|
|||
Grp_CreateGroupType ();
|
||||
|
||||
AlertType = Ale_SUCCESS;
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_Created_new_type_of_group_X,
|
||||
Gbl.CurrentCrs.Grps.GrpTyp.GrpTypName);
|
||||
}
|
||||
|
@ -3757,7 +3757,7 @@ void Grp_RecFormNewGrp (void)
|
|||
if (Grp_CheckIfGroupNameExists (Gbl.CurrentCrs.Grps.GrpTyp.GrpTypCod,Gbl.CurrentCrs.Grps.GrpName,-1L))
|
||||
{
|
||||
AlertType = Ale_WARNING;
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_group_X_already_exists,
|
||||
Gbl.CurrentCrs.Grps.GrpName);
|
||||
}
|
||||
|
@ -3767,7 +3767,7 @@ void Grp_RecFormNewGrp (void)
|
|||
|
||||
/* Write success message */
|
||||
AlertType = Ale_SUCCESS;
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_Created_new_group_X,
|
||||
Gbl.CurrentCrs.Grps.GrpName);
|
||||
}
|
||||
|
@ -3916,11 +3916,11 @@ static void Grp_AskConfirmRemGrpTypWithGrps (unsigned NumGrps)
|
|||
|
||||
/***** Show question and button to remove type of group *****/
|
||||
if (NumGrps == 1)
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_Do_you_really_want_to_remove_the_type_of_group_X_1_group_,
|
||||
Gbl.CurrentCrs.Grps.GrpTyp.GrpTypName);
|
||||
else
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_Do_you_really_want_to_remove_the_type_of_group_X_Y_groups_,
|
||||
Gbl.CurrentCrs.Grps.GrpTyp.GrpTypName,NumGrps);
|
||||
Ale_ShowAlertAndButton (Ale_QUESTION,Gbl.Alert.Txt,
|
||||
|
@ -3968,15 +3968,15 @@ static void Grp_AskConfirmRemGrp (void)
|
|||
|
||||
/***** Show question and button to remove group *****/
|
||||
if (NumStds == 0)
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_Do_you_really_want_to_remove_the_group_X,
|
||||
GrpDat.GrpName);
|
||||
else if (NumStds == 1)
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_Do_you_really_want_to_remove_the_group_X_1_student_,
|
||||
GrpDat.GrpName);
|
||||
else
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_Do_you_really_want_to_remove_the_group_X_Y_students_,
|
||||
GrpDat.GrpName,NumStds);
|
||||
Ale_ShowAlertAndButton (Ale_QUESTION,Gbl.Alert.Txt,
|
||||
|
@ -4073,7 +4073,7 @@ static void Grp_RemoveGroupTypeCompletely (void)
|
|||
DB_QueryDELETE (Query,"can not remove a type of group");
|
||||
|
||||
/***** Create message to show the change made *****/
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_Type_of_group_X_removed,
|
||||
Gbl.CurrentCrs.Grps.GrpTyp.GrpTypName);
|
||||
|
||||
|
@ -4124,7 +4124,7 @@ static void Grp_RemoveGroupCompletely (void)
|
|||
DB_QueryDELETE (Query,"can not remove a group");
|
||||
|
||||
/***** Create message to show the change made *****/
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_Group_X_removed,
|
||||
GrpDat.GrpName);
|
||||
|
||||
|
@ -4157,7 +4157,7 @@ void Grp_OpenGroup (void)
|
|||
DB_QueryUPDATE (Query,"can not open a group");
|
||||
|
||||
/***** Create message to show the change made *****/
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_group_X_is_now_open,
|
||||
GrpDat.GrpName);
|
||||
|
||||
|
@ -4191,7 +4191,7 @@ void Grp_CloseGroup (void)
|
|||
DB_QueryUPDATE (Query,"can not close a group");
|
||||
|
||||
/***** Create message to show the change made *****/
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_group_X_is_now_closed,
|
||||
GrpDat.GrpName);
|
||||
|
||||
|
@ -4225,7 +4225,7 @@ void Grp_EnableFileZonesGrp (void)
|
|||
DB_QueryUPDATE (Query,"can not enable file zones of a group");
|
||||
|
||||
/***** Create message to show the change made *****/
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_File_zones_of_the_group_X_are_now_enabled,
|
||||
GrpDat.GrpName);
|
||||
|
||||
|
@ -4259,7 +4259,7 @@ void Grp_DisableFileZonesGrp (void)
|
|||
DB_QueryUPDATE (Query,"can not disable file zones of a group");
|
||||
|
||||
/***** Create message to show the change made *****/
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_File_zones_of_the_group_X_are_now_disabled,
|
||||
GrpDat.GrpName);
|
||||
|
||||
|
@ -4299,7 +4299,7 @@ void Grp_ChangeGroupType (void)
|
|||
{
|
||||
/* Create warning message */
|
||||
AlertType = Ale_WARNING;
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_group_X_already_exists,
|
||||
GrpDat.GrpName);
|
||||
}
|
||||
|
@ -4312,7 +4312,7 @@ void Grp_ChangeGroupType (void)
|
|||
|
||||
/* Create message to show the change made */
|
||||
AlertType = Ale_SUCCESS;
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_type_of_group_of_the_group_X_has_changed,
|
||||
GrpDat.GrpName);
|
||||
}
|
||||
|
@ -4352,7 +4352,7 @@ void Grp_ChangeMandatGrpTyp (void)
|
|||
if (Gbl.CurrentCrs.Grps.GrpTyp.MandatoryEnrolment == NewMandatoryEnrolment)
|
||||
{
|
||||
AlertType = Ale_INFO;
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_type_of_enrolment_of_the_type_of_group_X_has_not_changed,
|
||||
Gbl.CurrentCrs.Grps.GrpTyp.GrpTypName);
|
||||
}
|
||||
|
@ -4367,7 +4367,7 @@ void Grp_ChangeMandatGrpTyp (void)
|
|||
|
||||
/***** Write message to show the change made *****/
|
||||
AlertType = Ale_SUCCESS;
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
NewMandatoryEnrolment ? Txt_The_enrolment_of_students_into_groups_of_type_X_is_now_mandatory :
|
||||
Txt_The_enrolment_of_students_into_groups_of_type_X_is_now_voluntary,
|
||||
Gbl.CurrentCrs.Grps.GrpTyp.GrpTypName);
|
||||
|
@ -4408,7 +4408,7 @@ void Grp_ChangeMultiGrpTyp (void)
|
|||
if (Gbl.CurrentCrs.Grps.GrpTyp.MultipleEnrolment == NewMultipleEnrolment)
|
||||
{
|
||||
AlertType = Ale_INFO;
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_type_of_enrolment_of_the_type_of_group_X_has_not_changed,
|
||||
Gbl.CurrentCrs.Grps.GrpTyp.GrpTypName);
|
||||
}
|
||||
|
@ -4424,7 +4424,7 @@ void Grp_ChangeMultiGrpTyp (void)
|
|||
|
||||
/***** Write message to show the change made *****/
|
||||
AlertType = Ale_SUCCESS;
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
NewMultipleEnrolment ? Txt_Now_each_student_can_belong_to_multiple_groups_of_type_X :
|
||||
Txt_Now_each_student_can_only_belong_to_a_group_of_type_X,
|
||||
Gbl.CurrentCrs.Grps.GrpTyp.GrpTypName);
|
||||
|
@ -4509,7 +4509,7 @@ void Grp_ChangeMaxStdsGrp (void)
|
|||
if (GrpDat.MaxStudents == NewMaxStds)
|
||||
{
|
||||
AlertType = Ale_INFO;
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_maximum_number_of_students_in_the_group_X_has_not_changed,
|
||||
GrpDat.GrpName);
|
||||
}
|
||||
|
@ -4523,11 +4523,11 @@ void Grp_ChangeMaxStdsGrp (void)
|
|||
/***** Write message to show the change made *****/
|
||||
AlertType = Ale_SUCCESS;
|
||||
if (NewMaxStds > Grp_MAX_STUDENTS_IN_A_GROUP)
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_group_X_now_has_no_limit_of_students,
|
||||
GrpDat.GrpName);
|
||||
else
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_maximum_number_of_students_in_the_group_X_is_now_Y,
|
||||
GrpDat.GrpName,NewMaxStds);
|
||||
}
|
||||
|
@ -4592,7 +4592,7 @@ void Grp_RenameGroupType (void)
|
|||
if (!NewNameGrpTyp[0])
|
||||
{
|
||||
AlertType = Ale_WARNING;
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_You_can_not_leave_the_name_of_the_type_of_group_X_empty,
|
||||
Gbl.CurrentCrs.Grps.GrpTyp.GrpTypName);
|
||||
}
|
||||
|
@ -4605,7 +4605,7 @@ void Grp_RenameGroupType (void)
|
|||
if (Grp_CheckIfGroupTypeNameExists (NewNameGrpTyp,Gbl.CurrentCrs.Grps.GrpTyp.GrpTypCod))
|
||||
{
|
||||
AlertType = Ale_WARNING;
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_type_of_group_X_already_exists,
|
||||
NewNameGrpTyp);
|
||||
}
|
||||
|
@ -4620,7 +4620,7 @@ void Grp_RenameGroupType (void)
|
|||
|
||||
/***** Write message to show the change made *****/
|
||||
AlertType = Ale_SUCCESS;
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_type_of_group_X_has_been_renamed_as_Y,
|
||||
Gbl.CurrentCrs.Grps.GrpTyp.GrpTypName,NewNameGrpTyp);
|
||||
}
|
||||
|
@ -4628,7 +4628,7 @@ void Grp_RenameGroupType (void)
|
|||
else // The same name
|
||||
{
|
||||
AlertType = Ale_INFO;
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_name_of_the_type_of_group_X_has_not_changed,
|
||||
NewNameGrpTyp);
|
||||
}
|
||||
|
@ -4672,7 +4672,7 @@ void Grp_RenameGroup (void)
|
|||
if (!NewNameGrp[0])
|
||||
{
|
||||
AlertType = Ale_WARNING;
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_You_can_not_leave_the_name_of_the_group_X_empty,
|
||||
GrpDat.GrpName);
|
||||
}
|
||||
|
@ -4685,7 +4685,7 @@ void Grp_RenameGroup (void)
|
|||
if (Grp_CheckIfGroupNameExists (GrpDat.GrpTypCod,NewNameGrp,Gbl.CurrentCrs.Grps.GrpCod))
|
||||
{
|
||||
AlertType = Ale_WARNING;
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_group_X_already_exists,
|
||||
NewNameGrp);
|
||||
}
|
||||
|
@ -4698,7 +4698,7 @@ void Grp_RenameGroup (void)
|
|||
|
||||
/***** Write message to show the change made *****/
|
||||
AlertType = Ale_SUCCESS;
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_group_X_has_been_renamed_as_Y,
|
||||
GrpDat.GrpName,NewNameGrp);
|
||||
}
|
||||
|
@ -4706,7 +4706,7 @@ void Grp_RenameGroup (void)
|
|||
else // The same name
|
||||
{
|
||||
AlertType = Ale_INFO;
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_name_of_the_group_X_has_not_changed,
|
||||
NewNameGrp);
|
||||
}
|
||||
|
|
|
@ -121,7 +121,7 @@ void Hlp_ShowHelpWhatWouldYouLikeToDo (void)
|
|||
if (Gbl.Usrs.Me.Logged &&
|
||||
!Gbl.Usrs.Me.MyCrss.Num)
|
||||
{
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
"%s<br />%s<br />%s",
|
||||
Txt_You_are_not_enroled_in_any_course[Gbl.Usrs.Me.UsrDat.Sex],
|
||||
Txt_You_can_search_for_courses_select_them_and_request_your_enrolment_in_them,
|
||||
|
|
|
@ -656,7 +656,7 @@ void Hld_RemoveHoliday1 (void)
|
|||
|
||||
/***** Write message to show the change made *****/
|
||||
Gbl.Alert.Type = Ale_SUCCESS;
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_Holiday_X_removed,
|
||||
Hld.Name);
|
||||
|
||||
|
@ -708,7 +708,7 @@ void Hld_ChangeHolidayPlace1 (void)
|
|||
|
||||
/***** Write message to show the change made *****/
|
||||
Gbl.Alert.Type = Ale_SUCCESS;
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_place_of_the_holiday_X_has_changed_to_Y,
|
||||
Hld->Name,NewPlace.FullName);
|
||||
}
|
||||
|
@ -753,7 +753,7 @@ void Hld_ChangeHolidayType1 (void)
|
|||
|
||||
/***** Write message to show the change made *****/
|
||||
Gbl.Alert.Type = Ale_SUCCESS;
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_type_of_the_holiday_X_has_changed,
|
||||
Hld->Name);
|
||||
}
|
||||
|
@ -854,7 +854,7 @@ static void Hld_ChangeDate (Hld_StartOrEndDate_t StartOrEndDate)
|
|||
/***** Write message to show the change made *****/
|
||||
Gbl.Alert.Type = Ale_SUCCESS;
|
||||
Dat_ConvDateToDateStr (&NewDate,StrDate);
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_date_of_the_holiday_X_has_changed_to_Y,
|
||||
Hld->Name,StrDate);
|
||||
}
|
||||
|
@ -902,7 +902,7 @@ void Hld_RenameHoliday1 (void)
|
|||
if (!NewHldName[0])
|
||||
{
|
||||
Gbl.Alert.Type = Ale_WARNING;
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_You_can_not_leave_the_name_of_the_holiday_X_empty,
|
||||
Hld->Name);
|
||||
}
|
||||
|
@ -921,14 +921,14 @@ void Hld_RenameHoliday1 (void)
|
|||
|
||||
/***** Write message to show the change made *****/
|
||||
Gbl.Alert.Type = Ale_SUCCESS;
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_name_of_the_holiday_X_has_changed_to_Y,
|
||||
Hld->Name,NewHldName);
|
||||
}
|
||||
else // The same name
|
||||
{
|
||||
Gbl.Alert.Type = Ale_INFO;
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_name_of_the_holiday_X_has_not_changed,
|
||||
Hld->Name);
|
||||
}
|
||||
|
@ -1160,7 +1160,7 @@ void Hld_RecFormNewHoliday1 (void)
|
|||
|
||||
/* Success message */
|
||||
Gbl.Alert.Type = Ale_SUCCESS;
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_Created_new_holiday_X,
|
||||
Hld->Name);
|
||||
}
|
||||
|
|
|
@ -489,7 +489,7 @@ static void Img_ProcessImage (struct Image *Image,
|
|||
ReturnCode = WEXITSTATUS(ReturnCode);
|
||||
if (ReturnCode != 0)
|
||||
{
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
"Image could not be processed successfully.<br />"
|
||||
"Error code returned by the program of processing: %d",
|
||||
ReturnCode);
|
||||
|
|
|
@ -529,7 +529,7 @@ static void Ind_PutButtonToConfirmIWantToSeeBigList (unsigned NumCrss)
|
|||
extern const char *Txt_Show_anyway;
|
||||
|
||||
/***** Show alert and button to confirm that I want to see the big list *****/
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_list_of_X_courses_is_too_large_to_be_displayed,
|
||||
NumCrss);
|
||||
Ale_ShowAlertAndButton (Ale_WARNING,Gbl.Alert.Txt,
|
||||
|
|
|
@ -2234,7 +2234,7 @@ void Inf_ReceiveURLInfo (void)
|
|||
fclose (FileURL);
|
||||
|
||||
/***** Write message *****/
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_URL_X_has_been_updated,
|
||||
Gbl.CurrentCrs.Info.URL);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
|
@ -2304,7 +2304,7 @@ void Inf_ReceivePagInfo (void)
|
|||
WrongType = true;
|
||||
if (WrongType)
|
||||
{
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_file_type_is_X_and_should_be_HTML_or_ZIP,
|
||||
MIMEType);
|
||||
Ale_ShowAlert (Ale_INFO,Gbl.Alert.Txt);
|
||||
|
|
|
@ -1727,7 +1727,7 @@ void Ins_RemoveInstitution (void)
|
|||
Ins_FlushCacheFullNameAndCtyOfInstitution ();
|
||||
|
||||
/***** Write message to show the change made *****/
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_Institution_X_removed,
|
||||
Ins.FullName);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
|
@ -1809,7 +1809,7 @@ static void Ins_RenameInstitution (struct Instit *Ins,Cns_ShrtOrFullName_t ShrtO
|
|||
if (!NewInsName[0])
|
||||
{
|
||||
Gbl.Alert.Type = Ale_WARNING;
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_You_can_not_leave_the_name_of_the_institution_X_empty,
|
||||
CurrentInsName);
|
||||
}
|
||||
|
@ -1822,7 +1822,7 @@ static void Ins_RenameInstitution (struct Instit *Ins,Cns_ShrtOrFullName_t ShrtO
|
|||
if (Ins_CheckIfInsNameExistsInCty (ParamName,NewInsName,Ins->InsCod,Gbl.CurrentCty.Cty.CtyCod))
|
||||
{
|
||||
Gbl.Alert.Type = Ale_WARNING;
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_institution_X_already_exists,
|
||||
NewInsName);
|
||||
}
|
||||
|
@ -1833,7 +1833,7 @@ static void Ins_RenameInstitution (struct Instit *Ins,Cns_ShrtOrFullName_t ShrtO
|
|||
|
||||
/* Create message to show the change made */
|
||||
Gbl.Alert.Type = Ale_SUCCESS;
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_institution_X_has_been_renamed_as_Y,
|
||||
CurrentInsName,NewInsName);
|
||||
|
||||
|
@ -1845,7 +1845,7 @@ static void Ins_RenameInstitution (struct Instit *Ins,Cns_ShrtOrFullName_t ShrtO
|
|||
else // The same name
|
||||
{
|
||||
Gbl.Alert.Type = Ale_INFO;
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_name_of_the_institution_X_has_not_changed,
|
||||
CurrentInsName);
|
||||
}
|
||||
|
@ -1908,14 +1908,14 @@ void Ins_ChangeInsCtyInConfig (void)
|
|||
if (Ins_CheckIfInsNameExistsInCty ("ShortName",Gbl.CurrentIns.Ins.ShrtName,-1L,NewCty.CtyCod))
|
||||
{
|
||||
Gbl.Alert.Type = Ale_WARNING;
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_institution_X_already_exists,
|
||||
Gbl.CurrentIns.Ins.ShrtName);
|
||||
}
|
||||
else if (Ins_CheckIfInsNameExistsInCty ("FullName",Gbl.CurrentIns.Ins.FullName,-1L,NewCty.CtyCod))
|
||||
{
|
||||
Gbl.Alert.Type = Ale_WARNING;
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_institution_X_already_exists,
|
||||
Gbl.CurrentIns.Ins.FullName);
|
||||
}
|
||||
|
@ -1931,7 +1931,7 @@ void Ins_ChangeInsCtyInConfig (void)
|
|||
|
||||
/***** Write message to show the change made *****/
|
||||
Gbl.Alert.Type = Ale_SUCCESS;
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_country_of_the_institution_X_has_changed_to_Y,
|
||||
Gbl.CurrentIns.Ins.FullName,NewCty.Name[Gbl.Prefs.Language]);
|
||||
}
|
||||
|
@ -1996,7 +1996,7 @@ void Ins_ChangeInsWWW (void)
|
|||
/***** Write message to show the change made
|
||||
and put button to go to institution changed *****/
|
||||
Gbl.Alert.Type = Ale_SUCCESS;
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_new_web_address_is_X,
|
||||
NewWWW);
|
||||
Ins_ShowAlertAndButtonToGoToIns ();
|
||||
|
@ -2027,7 +2027,7 @@ void Ins_ChangeInsWWWInConfig (void)
|
|||
Cns_MAX_BYTES_WWW);
|
||||
|
||||
/***** Write message to show the change made *****/
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_new_web_address_is_X,
|
||||
NewWWW);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
|
@ -2091,7 +2091,7 @@ void Ins_ChangeInsStatus (void)
|
|||
/***** Write message to show the change made
|
||||
and put button to go to institution changed *****/
|
||||
Gbl.Alert.Type = Ale_SUCCESS;
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_status_of_the_institution_X_has_changed,
|
||||
Gbl.Inss.EditingIns.ShrtName);
|
||||
Ins_ShowAlertAndButtonToGoToIns ();
|
||||
|
@ -2371,14 +2371,14 @@ static void Ins_RecFormRequestOrCreateIns (unsigned Status)
|
|||
/***** If name of institution was in database... *****/
|
||||
if (Ins_CheckIfInsNameExistsInCty ("ShortName",Gbl.Inss.EditingIns.ShrtName,-1L,Gbl.CurrentCty.Cty.CtyCod))
|
||||
{
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_institution_X_already_exists,
|
||||
Gbl.Inss.EditingIns.ShrtName);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
}
|
||||
else if (Ins_CheckIfInsNameExistsInCty ("FullName",Gbl.Inss.EditingIns.FullName,-1L,Gbl.CurrentCty.Cty.CtyCod))
|
||||
{
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_institution_X_already_exists,
|
||||
Gbl.Inss.EditingIns.FullName);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
|
@ -2425,7 +2425,7 @@ static void Ins_CreateInstitution (unsigned Status)
|
|||
/***** Write message to show the change made
|
||||
and put button to go to institution created *****/
|
||||
Gbl.Alert.Type = Ale_SUCCESS;
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_Created_new_institution_X,
|
||||
Gbl.Inss.EditingIns.FullName);
|
||||
Ins_ShowAlertAndButtonToGoToIns ();
|
||||
|
|
18
swad_link.c
18
swad_link.c
|
@ -503,7 +503,7 @@ void Lnk_RemoveLink (void)
|
|||
DB_QueryDELETE (Query,"can not remove an institutional link");
|
||||
|
||||
/***** Write message to show the change made *****/
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_Link_X_removed,
|
||||
Lnk.ShrtName);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
|
@ -578,7 +578,7 @@ static void Lnk_RenameLink (Cns_ShrtOrFullName_t ShrtOrFullName)
|
|||
/***** Check if new name is empty *****/
|
||||
if (!NewLnkName[0])
|
||||
{
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_You_can_not_leave_the_name_of_the_link_X_empty,
|
||||
CurrentLnkName);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
|
@ -591,7 +591,7 @@ static void Lnk_RenameLink (Cns_ShrtOrFullName_t ShrtOrFullName)
|
|||
/***** If link was in database... *****/
|
||||
if (Lnk_CheckIfLinkNameExists (ParamName,NewLnkName,Lnk->LnkCod))
|
||||
{
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_link_X_already_exists,
|
||||
NewLnkName);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
|
@ -602,7 +602,7 @@ static void Lnk_RenameLink (Cns_ShrtOrFullName_t ShrtOrFullName)
|
|||
Lnk_UpdateLnkNameDB (Lnk->LnkCod,FieldName,NewLnkName);
|
||||
|
||||
/* Write message to show the change made */
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_link_X_has_been_renamed_as_Y,
|
||||
CurrentLnkName,NewLnkName);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
|
@ -610,7 +610,7 @@ static void Lnk_RenameLink (Cns_ShrtOrFullName_t ShrtOrFullName)
|
|||
}
|
||||
else // The same name
|
||||
{
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_name_of_the_link_X_has_not_changed,
|
||||
CurrentLnkName);
|
||||
Ale_ShowAlert (Ale_INFO,Gbl.Alert.Txt);
|
||||
|
@ -682,7 +682,7 @@ void Lnk_ChangeLinkWWW (void)
|
|||
DB_QueryUPDATE (Query,"can not update the web of an institutional link");
|
||||
|
||||
/***** Write message to show the change made *****/
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_new_web_address_is_X,
|
||||
NewWWW);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
|
@ -819,14 +819,14 @@ void Lnk_RecFormNewLink (void)
|
|||
/***** If name of link was in database... *****/
|
||||
if (Lnk_CheckIfLinkNameExists ("ShortName",Lnk->ShrtName,-1L))
|
||||
{
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_link_X_already_exists,
|
||||
Lnk->ShrtName);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
}
|
||||
else if (Lnk_CheckIfLinkNameExists ("FullName",Lnk->FullName,-1L))
|
||||
{
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_link_X_already_exists,
|
||||
Lnk->FullName);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
|
@ -864,7 +864,7 @@ static void Lnk_CreateLink (struct Link *Lnk)
|
|||
DB_QueryINSERT (Query,"can not create institutional link");
|
||||
|
||||
/***** Write success message *****/
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_Created_new_link_X,
|
||||
Lnk->ShrtName);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
|
|
|
@ -288,7 +288,7 @@ void Log_RequestLogo (Sco_Scope_t Scope)
|
|||
NULL,Box_NOT_CLOSABLE);
|
||||
|
||||
/***** Write help message *****/
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_You_can_send_a_file_with_an_image_in_PNG_format_transparent_background_and_size_X_Y,
|
||||
64,64);
|
||||
Ale_ShowAlert (Ale_INFO,Gbl.Alert.Txt);
|
||||
|
@ -378,7 +378,7 @@ void Log_ReceiveLogo (Sco_Scope_t Scope)
|
|||
WrongType = true;
|
||||
if (WrongType)
|
||||
{
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_file_is_not_X,
|
||||
"png");
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
|
|
36
swad_mail.c
36
swad_mail.c
|
@ -376,7 +376,7 @@ void Mai_WriteWarningEmailNotifications (void)
|
|||
Tab_Tab_t TabMyAccount = Act_GetTab (ActFrmMyAcc );
|
||||
Tab_Tab_t TabMailDomains = Act_GetTab (ActSeeMai);
|
||||
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_You_can_only_receive_email_notifications_if_,
|
||||
Txt_TABS_TXT [TabMyAccount ],
|
||||
Txt_MENU_TITLE[TabMyAccount ][Act_GetIndexInMenu (ActFrmMyAcc)],
|
||||
|
@ -560,7 +560,7 @@ void Mai_RemoveMailDomain (void)
|
|||
DB_QueryDELETE (Query,"can not remove a mail domain");
|
||||
|
||||
/***** Write message to show the change made *****/
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_Email_domain_X_removed,
|
||||
Mai.Domain);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
|
@ -637,7 +637,7 @@ static void Mai_RenameMailDomain (Cns_ShrtOrFullName_t ShrtOrFullName)
|
|||
{
|
||||
Gbl.Alert.Type = Ale_WARNING;
|
||||
Gbl.Alert.Section = Mai_EMAIL_SECTION_ID;
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_You_can_not_leave_the_name_of_the_email_domain_X_empty,
|
||||
CurrentMaiName);
|
||||
}
|
||||
|
@ -651,7 +651,7 @@ static void Mai_RenameMailDomain (Cns_ShrtOrFullName_t ShrtOrFullName)
|
|||
{
|
||||
Gbl.Alert.Type = Ale_WARNING;
|
||||
Gbl.Alert.Section = Mai_EMAIL_SECTION_ID;
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_email_domain_X_already_exists,
|
||||
NewMaiName);
|
||||
}
|
||||
|
@ -663,7 +663,7 @@ static void Mai_RenameMailDomain (Cns_ShrtOrFullName_t ShrtOrFullName)
|
|||
/* Write message to show the change made */
|
||||
Gbl.Alert.Type = Ale_SUCCESS;
|
||||
Gbl.Alert.Section = Mai_EMAIL_SECTION_ID;
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_email_domain_X_has_been_renamed_as_Y,
|
||||
CurrentMaiName,NewMaiName);
|
||||
}
|
||||
|
@ -672,7 +672,7 @@ static void Mai_RenameMailDomain (Cns_ShrtOrFullName_t ShrtOrFullName)
|
|||
{
|
||||
Gbl.Alert.Type = Ale_INFO;
|
||||
Gbl.Alert.Section = Mai_EMAIL_SECTION_ID;
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_email_domain_X_has_not_changed,
|
||||
CurrentMaiName);
|
||||
}
|
||||
|
@ -827,14 +827,14 @@ void Mai_RecFormNewMailDomain (void)
|
|||
/***** If name of mail was in database... *****/
|
||||
if (Mai_CheckIfMailDomainNameExists ("Domain",Mai->Domain,-1L))
|
||||
{
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_email_domain_X_already_exists,
|
||||
Mai->Domain);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
}
|
||||
else if (Mai_CheckIfMailDomainNameExists ("Info",Mai->Info,-1L))
|
||||
{
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_email_domain_X_already_exists,
|
||||
Mai->Info);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
|
@ -869,7 +869,7 @@ static void Mai_CreateMailDomain (struct Mail *Mai)
|
|||
DB_QueryINSERT (Query,"can not create mail domain");
|
||||
|
||||
/***** Write success message *****/
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_Created_new_email_domain_X,
|
||||
Mai->Domain);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
|
@ -1471,7 +1471,7 @@ static void Mai_RemoveEmail (struct UsrData *UsrDat)
|
|||
/***** Show message *****/
|
||||
Gbl.Alert.Type = Ale_SUCCESS;
|
||||
Gbl.Alert.Section = Mai_EMAIL_SECTION_ID;
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_Email_X_removed,
|
||||
Email);
|
||||
|
||||
|
@ -1569,7 +1569,7 @@ static void Mai_NewUsrEmail (struct UsrData *UsrDat,bool ItsMe)
|
|||
{
|
||||
Gbl.Alert.Type = Ale_WARNING;
|
||||
Gbl.Alert.Section = Mai_EMAIL_SECTION_ID;
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_email_address_X_matches_one_previously_registered,
|
||||
NewEmail);
|
||||
}
|
||||
|
@ -1580,7 +1580,7 @@ static void Mai_NewUsrEmail (struct UsrData *UsrDat,bool ItsMe)
|
|||
/***** Email updated sucessfully *****/
|
||||
Gbl.Alert.Type = Ale_SUCCESS;
|
||||
Gbl.Alert.Section = Mai_EMAIL_SECTION_ID;
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_email_address_X_has_been_registered_successfully,
|
||||
NewEmail);
|
||||
|
||||
|
@ -1596,7 +1596,7 @@ static void Mai_NewUsrEmail (struct UsrData *UsrDat,bool ItsMe)
|
|||
{
|
||||
Gbl.Alert.Type = Ale_WARNING;
|
||||
Gbl.Alert.Section = Mai_EMAIL_SECTION_ID;
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_email_address_X_had_been_registered_by_another_user,
|
||||
NewEmail);
|
||||
}
|
||||
|
@ -1606,7 +1606,7 @@ static void Mai_NewUsrEmail (struct UsrData *UsrDat,bool ItsMe)
|
|||
{
|
||||
Gbl.Alert.Type = Ale_WARNING;
|
||||
Gbl.Alert.Section = Mai_EMAIL_SECTION_ID;
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_email_address_entered_X_is_not_valid,
|
||||
NewEmail);
|
||||
}
|
||||
|
@ -1746,7 +1746,7 @@ bool Mai_SendMailMsgToConfirmEmail (void)
|
|||
Gbl.Usrs.Me.ConfirmEmailJustSent = true;
|
||||
Gbl.Alert.Type = Ale_SUCCESS;
|
||||
Gbl.Alert.Section = Mai_EMAIL_SECTION_ID;
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_A_message_has_been_sent_to_email_address_X_to_confirm_that_address,
|
||||
Gbl.Usrs.Me.UsrDat.Email);
|
||||
return true;
|
||||
|
@ -1759,7 +1759,7 @@ bool Mai_SendMailMsgToConfirmEmail (void)
|
|||
default:
|
||||
Gbl.Alert.Type = Ale_ERROR;
|
||||
Gbl.Alert.Section = Mai_EMAIL_SECTION_ID;
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
"Internal error: an email message has not been sent successfully."
|
||||
" Error code returned by the script: %d",
|
||||
ReturnCode);
|
||||
|
@ -1858,7 +1858,7 @@ void Mai_ConfirmEmail (void)
|
|||
|
||||
/***** Confirm email *****/
|
||||
if (Confirmed)
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_Email_X_has_already_been_confirmed_before,
|
||||
Email);
|
||||
else
|
||||
|
@ -1869,7 +1869,7 @@ void Mai_ConfirmEmail (void)
|
|||
UsrCod,Email);
|
||||
DB_QueryUPDATE (Query,"can not confirm email");
|
||||
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_email_X_has_been_confirmed,
|
||||
Email);
|
||||
}
|
||||
|
|
|
@ -281,7 +281,7 @@ static void Mrk_ChangeNumRowsHeaderOrFooter (Brw_HeadOrFoot_t HeaderOrFooter)
|
|||
DB_QueryUPDATE (Query,"can not update properties of marks");
|
||||
|
||||
/***** Write message of success *****/
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_number_of_rows_is_now_X,
|
||||
NumRows);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
|
@ -400,7 +400,7 @@ bool Mrk_CheckFileOfMarks (const char *Path,struct MarksProperties *Marks)
|
|||
}
|
||||
/*
|
||||
if (FileIsCorrect)
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_X_header_rows_Y_student_rows_and_Z_footer_rows_found,
|
||||
Marks->Header,NumRowsStds,Marks->Footer);
|
||||
*/
|
||||
|
@ -601,7 +601,7 @@ static bool Mrk_GetUsrMarks (FILE *FileUsrMarks,struct UsrData *UsrDat,
|
|||
|
||||
/***** User's ID not found in table *****/
|
||||
fclose (FileAllMarks);
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_THE_USER_X_is_not_found_in_the_file_of_marks,
|
||||
UsrDat->FullName);
|
||||
return false;
|
||||
|
|
|
@ -750,7 +750,7 @@ void Msg_RecMsgFromUsr (void)
|
|||
if (RecipientHasBannedMe)
|
||||
{
|
||||
/***** Show an alert indicating that the message has not been sent successfully *****/
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_message_not_sent_to_X,
|
||||
UsrDstData.FullName);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
|
@ -788,7 +788,7 @@ void Msg_RecMsgFromUsr (void)
|
|||
0));
|
||||
|
||||
/***** Show an alert indicating that the message has been sent successfully *****/
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
NotifyByEmail ? Txt_message_sent_to_X_notified_by_email :
|
||||
Txt_message_sent_to_X_not_notified_by_email,
|
||||
UsrDstData.FullName);
|
||||
|
@ -829,7 +829,7 @@ void Msg_RecMsgFromUsr (void)
|
|||
Ale_ShowAlert (Ale_SUCCESS,Txt_The_message_has_been_sent_to_1_recipient);
|
||||
else
|
||||
{
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_message_has_been_sent_to_X_recipients,
|
||||
(unsigned) NumRecipients);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
|
@ -841,7 +841,7 @@ void Msg_RecMsgFromUsr (void)
|
|||
/***** Show alert about errors on sending message *****/
|
||||
if (NumErrors > 1)
|
||||
{
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_There_have_been_X_errors_in_sending_the_message,
|
||||
(unsigned) NumErrors);
|
||||
Ale_ShowAlert (Ale_ERROR,Gbl.Alert.Txt);
|
||||
|
@ -872,13 +872,13 @@ void Msg_ReqDelAllRecMsgs (void)
|
|||
if (Gbl.Msg.FilterContent[0])
|
||||
{
|
||||
if (Gbl.Msg.ShowOnlyUnreadMsgs)
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_Do_you_really_want_to_delete_the_unread_messages_received_from_USER_X_from_COURSE_Y_related_to_CONTENT_Z,
|
||||
Gbl.Msg.FilterFromTo[0] ? Gbl.Msg.FilterFromTo :
|
||||
Txt_any_user,
|
||||
Gbl.Msg.FilterCrsShrtName,Gbl.Msg.FilterContent);
|
||||
else
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_Do_you_really_want_to_delete_all_messages_received_from_USER_X_from_COURSE_Y_related_to_CONTENT_Z,
|
||||
Gbl.Msg.FilterFromTo[0] ? Gbl.Msg.FilterFromTo :
|
||||
Txt_any_user,
|
||||
|
@ -887,13 +887,13 @@ void Msg_ReqDelAllRecMsgs (void)
|
|||
else
|
||||
{
|
||||
if (Gbl.Msg.ShowOnlyUnreadMsgs)
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_Do_you_really_want_to_delete_the_unread_messages_received_from_USER_X_from_COURSE_Y,
|
||||
Gbl.Msg.FilterFromTo[0] ? Gbl.Msg.FilterFromTo :
|
||||
Txt_any_user,
|
||||
Gbl.Msg.FilterCrsShrtName);
|
||||
else
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_Do_you_really_want_to_delete_all_messages_received_from_USER_X_from_COURSE_Y,
|
||||
Gbl.Msg.FilterFromTo[0] ? Gbl.Msg.FilterFromTo :
|
||||
Txt_any_user,
|
||||
|
@ -930,13 +930,13 @@ void Msg_ReqDelAllSntMsgs (void)
|
|||
/***** Show question and button to remove messages received *****/
|
||||
/* Start alert */
|
||||
if (Gbl.Msg.FilterContent[0])
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_Do_you_really_want_to_delete_all_messages_sent_to_USER_X_from_COURSE_Y_related_to_CONTENT_Z,
|
||||
Gbl.Msg.FilterFromTo[0] ? Gbl.Msg.FilterFromTo :
|
||||
Txt_any_user,
|
||||
Gbl.Msg.FilterCrsShrtName,Gbl.Msg.FilterContent);
|
||||
else
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_Do_you_really_want_to_delete_all_messages_sent_to_USER_X_from_COURSE_Y,
|
||||
Gbl.Msg.FilterFromTo[0] ? Gbl.Msg.FilterFromTo :
|
||||
Txt_any_user,
|
||||
|
@ -1009,7 +1009,7 @@ static void Msg_ShowNumMsgsDeleted (unsigned NumMsgs)
|
|||
Ale_ShowAlert (Ale_SUCCESS,Txt_One_message_has_been_deleted);
|
||||
else
|
||||
{
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_X_messages_have_been_deleted,
|
||||
NumMsgs);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
|
@ -3657,7 +3657,7 @@ void Msg_BanSenderWhenShowingMsgs (void)
|
|||
DB_QueryREPLACE (Query,"can not ban sender");
|
||||
|
||||
/***** Show alert with the change made *****/
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_From_this_time_you_will_not_receive_messages_from_X,
|
||||
Gbl.Usrs.Other.UsrDat.FullName);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
|
@ -3715,7 +3715,7 @@ static void Msg_UnbanSender (void)
|
|||
DB_QueryDELETE (Query,"can not ban sender");
|
||||
|
||||
/***** Show alert with the change made *****/
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_From_this_time_you_can_receive_messages_from_X,
|
||||
Gbl.Usrs.Other.UsrDat.FullName);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
|
|
|
@ -441,7 +441,7 @@ void Nck_RemoveMyNick (void)
|
|||
/***** Show message *****/
|
||||
Gbl.Alert.Type = Ale_SUCCESS;
|
||||
Gbl.Alert.Section = Nck_NICKNAME_SECTION_ID;
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_Nickname_X_removed,
|
||||
NicknameWithoutArroba);
|
||||
}
|
||||
|
@ -482,7 +482,7 @@ void Nck_RemoveOtherUsrNick (void)
|
|||
/***** Show message *****/
|
||||
Gbl.Alert.Type = Ale_SUCCESS;
|
||||
Gbl.Alert.Section = Nck_NICKNAME_SECTION_ID;
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_Nickname_X_removed,
|
||||
NicknameWithoutArroba);
|
||||
|
||||
|
@ -579,7 +579,7 @@ static void Nck_UpdateUsrNick (struct UsrData *UsrDat)
|
|||
{
|
||||
Gbl.Alert.Type = Ale_WARNING;
|
||||
Gbl.Alert.Section = Nck_NICKNAME_SECTION_ID;
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_nickname_X_matches_the_one_you_had_previously_registered,
|
||||
NewNicknameWithoutArroba);
|
||||
}
|
||||
|
@ -599,7 +599,7 @@ static void Nck_UpdateUsrNick (struct UsrData *UsrDat)
|
|||
{
|
||||
Gbl.Alert.Type = Ale_WARNING;
|
||||
Gbl.Alert.Section = Nck_NICKNAME_SECTION_ID;
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_nickname_X_had_been_registered_by_another_user,
|
||||
NewNicknameWithoutArroba);
|
||||
}
|
||||
|
@ -615,7 +615,7 @@ static void Nck_UpdateUsrNick (struct UsrData *UsrDat)
|
|||
|
||||
Gbl.Alert.Type = Ale_SUCCESS;
|
||||
Gbl.Alert.Section = Nck_NICKNAME_SECTION_ID;
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_nickname_X_has_been_registered_successfully,
|
||||
NewNicknameWithoutArroba);
|
||||
}
|
||||
|
@ -624,7 +624,7 @@ static void Nck_UpdateUsrNick (struct UsrData *UsrDat)
|
|||
{
|
||||
Gbl.Alert.Type = Ale_WARNING;
|
||||
Gbl.Alert.Section = Nck_NICKNAME_SECTION_ID;
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_nickname_entered_X_is_not_valid_,
|
||||
NewNicknameWithArroba,
|
||||
Nck_MIN_CHARS_NICKNAME_WITHOUT_ARROBA,
|
||||
|
|
|
@ -95,7 +95,7 @@ void Not_ShowFormNotice (void)
|
|||
extern const char *Txt_Create_notice;
|
||||
|
||||
/***** Help message *****/
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_notice_will_appear_as_a_yellow_note_,
|
||||
Gbl.CurrentCrs.Crs.FullName);
|
||||
Ale_ShowAlert (Ale_INFO,Gbl.Alert.Txt);
|
||||
|
|
|
@ -555,7 +555,7 @@ unsigned Par_GetParameter (tParamType ParamType,const char *ParamName,
|
|||
/* Check if there is space to copy separator */
|
||||
if (BytesAlreadyCopied + 1 > MaxBytes)
|
||||
{
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
"Multiple parameter <strong>%s</strong> too large,"
|
||||
" it exceed the maximum allowed size (%lu bytes).",
|
||||
ParamName,(unsigned long) MaxBytes);
|
||||
|
@ -574,7 +574,7 @@ unsigned Par_GetParameter (tParamType ParamType,const char *ParamName,
|
|||
/* Check if there is space to copy the parameter value */
|
||||
if (BytesAlreadyCopied + Param->Value.Length > MaxBytes)
|
||||
{
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
"Parameter <strong>%s</strong> too large,"
|
||||
" it exceed the maximum allowed size (%lu bytes).",
|
||||
ParamName,(unsigned long) MaxBytes);
|
||||
|
|
|
@ -403,7 +403,7 @@ void Pwd_ChkIdLoginAndSendNewPwd (void)
|
|||
Ale_ShowAlert (Ale_WARNING,Txt_There_was_a_problem_sending_an_email_automatically);
|
||||
break;
|
||||
default:
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
"Internal error: an email message has not been sent successfully."
|
||||
" Error code returned by the script: %d",
|
||||
ReturnCode);
|
||||
|
@ -419,7 +419,7 @@ void Pwd_ChkIdLoginAndSendNewPwd (void)
|
|||
/***** Help message *****/
|
||||
// TODO: This message allows to know if a ID exists in database (when no unique).
|
||||
// This should be hidden!
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_There_are_more_than_one_user_with_the_ID_X_Please_type_a_nick_or_email,
|
||||
Gbl.Usrs.Me.UsrIdLogin);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
|
@ -631,7 +631,7 @@ bool Pwd_FastCheckIfPasswordSeemsGood (const char *PlainPassword)
|
|||
{
|
||||
Gbl.Alert.Type = Ale_WARNING;
|
||||
Gbl.Alert.Section = Pwd_PASSWORD_SECTION_ID;
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_password_must_be_at_least_X_characters,
|
||||
Pwd_MIN_CHARS_PLAIN_PASSWORD);
|
||||
return false;
|
||||
|
@ -732,7 +732,7 @@ void Pwd_ShowFormChgMyPwd (void)
|
|||
/***** Help message *****/
|
||||
fprintf (Gbl.F.Out,"<tr>"
|
||||
"<td colspan=\"2\">");
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_Your_password_must_be_at_least_X_characters_and_can_not_contain_spaces_,
|
||||
Pwd_MIN_CHARS_PLAIN_PASSWORD);
|
||||
Ale_ShowAlert (Ale_INFO,Gbl.Alert.Txt);
|
||||
|
@ -764,7 +764,7 @@ void Pwd_PutFormToGetNewPasswordOnce (void)
|
|||
extern const char *Txt_Password;
|
||||
extern const char *Txt_HELP_password;
|
||||
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_HELP_password,
|
||||
Pwd_MIN_CHARS_PLAIN_PASSWORD);
|
||||
fprintf (Gbl.F.Out,"<tr>"
|
||||
|
@ -794,7 +794,7 @@ void Pwd_PutFormToGetNewPasswordTwice (void)
|
|||
extern const char *Txt_HELP_password;
|
||||
extern const char *Txt_Retype_new_password;
|
||||
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_HELP_password,
|
||||
Pwd_MIN_CHARS_PLAIN_PASSWORD);
|
||||
fprintf (Gbl.F.Out,"<tr>"
|
||||
|
|
14
swad_photo.c
14
swad_photo.c
|
@ -501,7 +501,7 @@ void Pho_ReqRemoveUsrPhoto (void)
|
|||
{
|
||||
/***** Show question and button to remove user's photo *****/
|
||||
/* Start alert */
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_Do_you_really_want_to_remove_the_photo_of_X,
|
||||
Gbl.Usrs.Other.UsrDat.FullName);
|
||||
Ale_ShowAlertAndButton1 (Ale_QUESTION,Gbl.Alert.Txt);
|
||||
|
@ -645,7 +645,7 @@ static bool Pho_ReceivePhotoAndDetectFaces (bool ItsMe,const struct UsrData *Usr
|
|||
WrongType = true;
|
||||
if (WrongType)
|
||||
{
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_file_is_not_X,
|
||||
"jpg");
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
|
@ -729,7 +729,7 @@ static bool Pho_ReceivePhotoAndDetectFaces (bool ItsMe,const struct UsrData *Usr
|
|||
NumFacesTotal = NumFacesGreen = NumFacesRed = 0;
|
||||
break;
|
||||
default: // Error
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
"Photo could not be processed successfully.<br />"
|
||||
"Error code returned by the program of processing: %d",
|
||||
ReturnCode);
|
||||
|
@ -764,14 +764,14 @@ static bool Pho_ReceivePhotoAndDetectFaces (bool ItsMe,const struct UsrData *Usr
|
|||
if (NumFacesRed == 0)
|
||||
{
|
||||
Gbl.Alert.Type = Ale_SUCCESS;
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_X_faces_marked_in_green_have_been_detected_,
|
||||
NumFacesGreen);
|
||||
}
|
||||
else if (NumFacesGreen == 0)
|
||||
{
|
||||
Gbl.Alert.Type = Ale_WARNING;
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_X_faces_marked_in_red_have_been_detected_,
|
||||
NumFacesRed);
|
||||
}
|
||||
|
@ -779,11 +779,11 @@ static bool Pho_ReceivePhotoAndDetectFaces (bool ItsMe,const struct UsrData *Usr
|
|||
{
|
||||
Gbl.Alert.Type = Ale_SUCCESS;
|
||||
if (NumFacesGreen == 1)
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_X_faces_have_been_detected_in_front_position_1_Z_,
|
||||
NumFacesTotal,NumFacesRed);
|
||||
else
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_X_faces_have_been_detected_in_front_position_Y_Z_,
|
||||
NumFacesTotal,NumFacesGreen,NumFacesRed);
|
||||
}
|
||||
|
|
16
swad_place.c
16
swad_place.c
|
@ -577,7 +577,7 @@ void Plc_RemovePlace (void)
|
|||
DB_QueryDELETE (Query,"can not remove a place");
|
||||
|
||||
/***** Write message to show the change made *****/
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_Place_X_removed,
|
||||
Plc.FullName);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
|
@ -653,7 +653,7 @@ static void Plc_RenamePlace (Cns_ShrtOrFullName_t ShrtOrFullName)
|
|||
/***** Check if new name is empty *****/
|
||||
if (!NewPlcName[0])
|
||||
{
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_You_can_not_leave_the_name_of_the_place_X_empty,
|
||||
CurrentPlcName);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
|
@ -666,7 +666,7 @@ static void Plc_RenamePlace (Cns_ShrtOrFullName_t ShrtOrFullName)
|
|||
/***** If place was in database... *****/
|
||||
if (Plc_CheckIfPlaceNameExists (ParamName,NewPlcName,Plc->PlcCod))
|
||||
{
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_place_X_already_exists,
|
||||
NewPlcName);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
|
@ -677,7 +677,7 @@ static void Plc_RenamePlace (Cns_ShrtOrFullName_t ShrtOrFullName)
|
|||
Plc_UpdatePlcNameDB (Plc->PlcCod,FieldName,NewPlcName);
|
||||
|
||||
/* Write message to show the change made */
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_place_X_has_been_renamed_as_Y,
|
||||
CurrentPlcName,NewPlcName);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
|
@ -685,7 +685,7 @@ static void Plc_RenamePlace (Cns_ShrtOrFullName_t ShrtOrFullName)
|
|||
}
|
||||
else // The same name
|
||||
{
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_name_of_the_place_X_has_not_changed,
|
||||
CurrentPlcName);
|
||||
Ale_ShowAlert (Ale_INFO,Gbl.Alert.Txt);
|
||||
|
@ -844,14 +844,14 @@ void Plc_RecFormNewPlace (void)
|
|||
/***** If name of place was in database... *****/
|
||||
if (Plc_CheckIfPlaceNameExists ("ShortName",Plc->ShrtName,-1L))
|
||||
{
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_place_X_already_exists,
|
||||
Plc->ShrtName);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
}
|
||||
else if (Plc_CheckIfPlaceNameExists ("FullName",Plc->FullName,-1L))
|
||||
{
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_place_X_already_exists,
|
||||
Plc->FullName);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
|
@ -886,7 +886,7 @@ static void Plc_CreatePlace (struct Place *Plc)
|
|||
DB_QueryINSERT (Query,"can not create place");
|
||||
|
||||
/***** Write success message *****/
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_Created_new_place_X,
|
||||
Plc->FullName);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
|
|
|
@ -501,7 +501,7 @@ void Plg_RemovePlugin (void)
|
|||
DB_QueryDELETE (Query,"can not remove a plugin");
|
||||
|
||||
/***** Write message to show the change made *****/
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_Plugin_X_removed,
|
||||
Plg.Name);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
|
@ -540,7 +540,7 @@ void Plg_RenamePlugin (void)
|
|||
/***** Check if new name is empty *****/
|
||||
if (!NewPlgName[0])
|
||||
{
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_You_can_not_leave_the_name_of_the_plugin_X_empty,
|
||||
Plg->Name);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
|
@ -553,7 +553,7 @@ void Plg_RenamePlugin (void)
|
|||
/***** If plugin was in database... *****/
|
||||
if (Plg_CheckIfPluginNameExists (NewPlgName,Plg->PlgCod))
|
||||
{
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_plugin_X_already_exists,
|
||||
NewPlgName);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
|
@ -566,7 +566,7 @@ void Plg_RenamePlugin (void)
|
|||
DB_QueryUPDATE (Query,"can not update the name of a plugin");
|
||||
|
||||
/***** Write message to show the change made *****/
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_plugin_X_has_been_renamed_as_Y,
|
||||
Plg->Name,NewPlgName);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
|
@ -574,7 +574,7 @@ void Plg_RenamePlugin (void)
|
|||
}
|
||||
else // The same name
|
||||
{
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_name_of_the_plugin_X_has_not_changed,
|
||||
Plg->Name);
|
||||
Ale_ShowAlert (Ale_INFO,Gbl.Alert.Txt);
|
||||
|
@ -633,7 +633,7 @@ void Plg_ChangePlgDescription (void)
|
|||
DB_QueryUPDATE (Query,"can not update the description of a plugin");
|
||||
|
||||
/***** Write message to show the change made *****/
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_new_description_is_X,
|
||||
NewDescription);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
|
@ -678,7 +678,7 @@ void Plg_ChangePlgLogo (void)
|
|||
DB_QueryUPDATE (Query,"can not update the logo of a plugin");
|
||||
|
||||
/***** Write message to show the change made *****/
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_new_logo_is_X,
|
||||
NewLogo);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
|
@ -723,7 +723,7 @@ void Plg_ChangePlgAppKey (void)
|
|||
DB_QueryUPDATE (Query,"can not update the application key of a plugin");
|
||||
|
||||
/***** Write message to show the change made *****/
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_new_logo_is_X, // TODO!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
NewAppKey);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
|
@ -768,7 +768,7 @@ void Plg_ChangePlgURL (void)
|
|||
DB_QueryUPDATE (Query,"can not update the URL of a plugin");
|
||||
|
||||
/***** Write message to show the change made *****/
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_new_URL_is_X,
|
||||
NewURL);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
|
@ -813,7 +813,7 @@ void Plg_ChangePlgIP (void)
|
|||
DB_QueryUPDATE (Query,"can not update the IP address of a plugin");
|
||||
|
||||
/***** Write message to show the change made *****/
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_new_IP_address_is_X,
|
||||
NewIP);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
|
@ -1023,7 +1023,7 @@ void Plg_RecFormNewPlg (void)
|
|||
/***** If name of plugin was in database... *****/
|
||||
if (Plg_CheckIfPluginNameExists (Plg->Name,-1L))
|
||||
{
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_plugin_X_already_exists,
|
||||
Plg->Name);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
|
@ -1064,7 +1064,7 @@ static void Plg_CreatePlugin (struct Plugin *Plg)
|
|||
DB_QueryINSERT (Query,"can not create plugin");
|
||||
|
||||
/***** Write success message *****/
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_Created_new_plugin_X,
|
||||
Plg->Name);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
|
|
|
@ -1981,7 +1981,7 @@ static void Prj_AddUsrToProject (Prj_RoleInProject_t RoleInProject)
|
|||
Prj_FlushCacheMyRoleInProject ();
|
||||
|
||||
/* Show success alert */
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_THE_USER_X_has_been_enroled_as_a_Y_in_the_project,
|
||||
Gbl.Usrs.Other.UsrDat.FullName,
|
||||
Txt_PROJECT_ROLES_SINGUL_abc[RoleInProject]);
|
||||
|
@ -2055,7 +2055,7 @@ static void Prj_ReqRemUsrFromPrj (Prj_RoleInProject_t RoleInProject)
|
|||
|
||||
/***** Show question and button to remove user as administrator *****/
|
||||
/* Start alert */
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
ItsMe ? Txt_Do_you_really_want_to_be_removed_as_a_X_from_the_project_Y :
|
||||
Txt_Do_you_really_want_to_remove_the_following_user_as_a_X_from_the_project_Y,
|
||||
Txt_PROJECT_ROLES_SINGUL_abc[RoleInProject],
|
||||
|
@ -2147,7 +2147,7 @@ static void Prj_RemUsrFromPrj (Prj_RoleInProject_t RoleInProject)
|
|||
Prj_FlushCacheMyRoleInProject ();
|
||||
|
||||
/***** Show success alert *****/
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_THE_USER_X_has_been_removed_as_a_Y_from_the_project_Z,
|
||||
Gbl.Usrs.Other.UsrDat.FullName,
|
||||
Txt_PROJECT_ROLES_SINGUL_abc[RoleInProject],
|
||||
|
@ -2733,7 +2733,7 @@ void Prj_ReqRemProject (void)
|
|||
{
|
||||
/***** Show question and button to remove the project *****/
|
||||
Gbl.Prjs.PrjCod = Prj.PrjCod;
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_Do_you_really_want_to_remove_the_project_X,
|
||||
Prj.Title);
|
||||
Ale_ShowAlertAndButton (Ale_QUESTION,Gbl.Alert.Txt,
|
||||
|
@ -2800,7 +2800,7 @@ void Prj_RemoveProject (void)
|
|||
Fil_RemoveTree (PathRelPrj);
|
||||
|
||||
/***** Write message to show the change made *****/
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_Project_X_removed,
|
||||
Prj.Title);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
|
@ -2845,7 +2845,7 @@ void Prj_HideProject (void)
|
|||
DB_QueryUPDATE (Query,"can not hide project");
|
||||
|
||||
/***** Write message to show the change made *****/
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_Project_X_is_now_hidden,
|
||||
Prj.Title);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
|
@ -2890,7 +2890,7 @@ void Prj_ShowProject (void)
|
|||
DB_QueryUPDATE (Query,"can not show project");
|
||||
|
||||
/***** Write message to show the change made *****/
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_Project_X_is_now_visible,
|
||||
Prj.Title);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
|
@ -3311,7 +3311,7 @@ void Prj_RecFormProject (void)
|
|||
Prj_CreateProject (&Prj); // Add new project to database
|
||||
|
||||
/* Write success message */
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_Created_new_project_X,
|
||||
Prj.Title);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
|
|
|
@ -202,7 +202,7 @@ void Rec_ReqEditRecordFields (void)
|
|||
}
|
||||
else // No fields of records found for current course in the database
|
||||
{
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_There_are_no_record_fields_in_the_course_X,
|
||||
Gbl.CurrentCrs.Crs.FullName);
|
||||
Ale_ShowAlert (Ale_INFO,Gbl.Alert.Txt);
|
||||
|
@ -483,7 +483,7 @@ void Rec_ReceiveFormField (void)
|
|||
/***** If the field already was in the database... *****/
|
||||
if (Rec_CheckIfRecordFieldIsRepeated (Gbl.CurrentCrs.Records.Field.Name))
|
||||
{
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_record_field_X_already_exists,
|
||||
Gbl.CurrentCrs.Records.Field.Name);
|
||||
Ale_ShowAlert (Ale_ERROR,Gbl.Alert.Txt);
|
||||
|
@ -588,7 +588,7 @@ void Rec_CreateRecordField (void)
|
|||
DB_QueryINSERT (Query,"can not create field of record");
|
||||
|
||||
/***** Write message of success *****/
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_Created_new_record_field_X,
|
||||
Gbl.CurrentCrs.Records.Field.Name);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
|
@ -658,7 +658,7 @@ void Rec_AskConfirmRemFieldWithRecords (unsigned NumRecords)
|
|||
&Gbl.CurrentCrs.Records.Field.Visibility);
|
||||
|
||||
/***** Show question and button to remove my photo *****/
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_Do_you_really_want_to_remove_the_field_X_from_the_records_of_X,
|
||||
Gbl.CurrentCrs.Records.Field.Name,Gbl.CurrentCrs.Crs.FullName);
|
||||
if (NumRecords == 1)
|
||||
|
@ -705,7 +705,7 @@ void Rec_RemoveFieldFromDB (void)
|
|||
DB_QueryDELETE (Query,"can not remove field of record");
|
||||
|
||||
/***** Write message to show the change made *****/
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_Record_field_X_removed,
|
||||
Gbl.CurrentCrs.Records.Field.Name);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
|
@ -812,7 +812,7 @@ void Rec_RenameField (void)
|
|||
/***** Check if new name is empty *****/
|
||||
if (!NewFieldName[0])
|
||||
{
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_You_can_not_leave_the_name_of_the_field_X_empty,
|
||||
Gbl.CurrentCrs.Records.Field.Name);
|
||||
Ale_ShowAlert (Ale_ERROR,Gbl.Alert.Txt);
|
||||
|
@ -826,7 +826,7 @@ void Rec_RenameField (void)
|
|||
/***** If the group ya estaba in the database... *****/
|
||||
if (Rec_CheckIfRecordFieldIsRepeated (NewFieldName))
|
||||
{
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_record_field_X_already_exists,
|
||||
NewFieldName);
|
||||
Ale_ShowAlert (Ale_ERROR,Gbl.Alert.Txt);
|
||||
|
@ -840,7 +840,7 @@ void Rec_RenameField (void)
|
|||
DB_QueryUPDATE (Query,"can not update name of field of record");
|
||||
|
||||
/***** Write message to show the change made *****/
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_record_field_X_has_been_renamed_as_Y,
|
||||
Gbl.CurrentCrs.Records.Field.Name,NewFieldName);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
|
@ -848,7 +848,7 @@ void Rec_RenameField (void)
|
|||
}
|
||||
else // The same name
|
||||
{
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_name_of_the_field_X_has_not_changed,
|
||||
NewFieldName);
|
||||
Ale_ShowAlert (Ale_INFO,Gbl.Alert.Txt);
|
||||
|
@ -891,7 +891,7 @@ void Rec_ChangeLinesField (void)
|
|||
(this happens when return is pressed without changes) *****/
|
||||
if (Gbl.CurrentCrs.Records.Field.NumLines == NewNumLines)
|
||||
{
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_number_of_editing_lines_in_the_record_field_X_has_not_changed,
|
||||
Gbl.CurrentCrs.Records.Field.Name);
|
||||
Ale_ShowAlert (Ale_INFO,Gbl.Alert.Txt);
|
||||
|
@ -905,7 +905,7 @@ void Rec_ChangeLinesField (void)
|
|||
DB_QueryUPDATE (Query,"can not update the number of lines of a field of record");
|
||||
|
||||
/***** Write message to show the change made *****/
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_From_now_on_the_number_of_editing_lines_of_the_field_X_is_Y,
|
||||
Gbl.CurrentCrs.Records.Field.Name,NewNumLines);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
|
@ -946,7 +946,7 @@ void Rec_ChangeVisibilityField (void)
|
|||
(this happens whe return is pressed without changes in the form) *****/
|
||||
if (Gbl.CurrentCrs.Records.Field.Visibility == NewVisibility)
|
||||
{
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_visibility_of_the_record_field_X_has_not_changed,
|
||||
Gbl.CurrentCrs.Records.Field.Name);
|
||||
Ale_ShowAlert (Ale_INFO,Gbl.Alert.Txt);
|
||||
|
@ -960,7 +960,7 @@ void Rec_ChangeVisibilityField (void)
|
|||
DB_QueryUPDATE (Query,"can not update the visibility of a field of record");
|
||||
|
||||
/***** Write message to show the change made *****/
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_RECORD_FIELD_VISIBILITY_MSG[NewVisibility],
|
||||
Gbl.CurrentCrs.Records.Field.Name);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
|
|
|
@ -485,7 +485,7 @@ unsigned Ses_GetHiddenParFromDB (Act_Action_t NextAction,
|
|||
|
||||
if (ParameterIsTooBig)
|
||||
{
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
"Hidden parameter <strong>%s</strong> too large,"
|
||||
" it exceed the maximum allowed size (%lu bytes).",
|
||||
ParamName,(unsigned long) MaxBytes);
|
||||
|
|
|
@ -1041,7 +1041,7 @@ static void Sta_ShowHits (Sta_GlobalOrCourseAccesses_t GlobalOrCourse)
|
|||
Gbl.Usrs.Me.Role.Logged == Rol_SYS_ADM;
|
||||
if (!ICanQueryWholeRange && NumDays > Cfg_DAYS_IN_RECENT_LOG)
|
||||
{
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_date_range_must_be_less_than_or_equal_to_X_days,
|
||||
Cfg_DAYS_IN_RECENT_LOG);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt); // ...write warning message and show the form again
|
||||
|
|
|
@ -1038,7 +1038,7 @@ void Str_ChangeFormat (Str_ChangeFrom_t ChangeFrom,Str_ChangeTo_t ChangeTo,
|
|||
/*
|
||||
if (Gbl.Usrs.Me.Roles.LoggedRole == Rol_SYS_ADM)
|
||||
{
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
"Str_ChangeFormat ("%s")",
|
||||
Str);
|
||||
Lay_ShowAlert (Lay_INFO,Gbl.Alert.Txt);
|
||||
|
@ -2789,7 +2789,7 @@ bool Str_ConvertFilFolLnkNameToValid (char *FileName)
|
|||
if (NumAlfanum)
|
||||
FileNameIsOK = true;
|
||||
else
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Gbl.FileBrowser.UploadingWithDropzone ? Txt_UPLOAD_FILE_X_invalid_name_NO_HTML :
|
||||
Txt_UPLOAD_FILE_X_invalid_name,
|
||||
FileName);
|
||||
|
@ -2882,7 +2882,7 @@ void Str_Copy (char *Dst,const char *Src,size_t DstSize)
|
|||
/***** Check if buffer has enough space for source *****/
|
||||
if (LengthSrc > DstSize)
|
||||
{
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
"Trying to copy %lu chars into a %lu-chars buffer.",
|
||||
LengthSrc,DstSize);
|
||||
Lay_ShowErrorAndExit (Gbl.Alert.Txt);
|
||||
|
@ -2906,7 +2906,7 @@ void Str_Concat (char *Dst,const char *Src,size_t DstSize)
|
|||
LengthDst = strlen (Dst);
|
||||
if (LengthDst > DstSize)
|
||||
{
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
"%lu-chars buffer has %lu chars!",
|
||||
DstSize,LengthDst);
|
||||
Lay_ShowErrorAndExit (Gbl.Alert.Txt);
|
||||
|
@ -2918,7 +2918,7 @@ void Str_Concat (char *Dst,const char *Src,size_t DstSize)
|
|||
LengthSrc = strlen (Src);
|
||||
if (FreeSpace < LengthSrc)
|
||||
{
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
"Trying to concatenate %lu chars to a %lu-chars buffer with free space for only %lu chars!",
|
||||
LengthSrc,DstSize,FreeSpace);
|
||||
Lay_ShowErrorAndExit (Gbl.Alert.Txt);
|
||||
|
|
|
@ -1508,7 +1508,7 @@ void Svy_AskRemSurvey (void)
|
|||
|
||||
/***** Show question and button to remove survey *****/
|
||||
Gbl.Svys.SvyCodToEdit = Svy.SvyCod;
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_Do_you_really_want_to_remove_the_survey_X,
|
||||
Svy.Title);
|
||||
Ale_ShowAlertAndButton (Ale_QUESTION,Gbl.Alert.Txt,
|
||||
|
@ -1572,7 +1572,7 @@ void Svy_RemoveSurvey (void)
|
|||
Ntf_MarkNotifAsRemoved (Ntf_EVENT_SURVEY,Svy.SvyCod);
|
||||
|
||||
/***** Write message to show the change made *****/
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_Survey_X_removed,
|
||||
Svy.Title);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
|
@ -1609,7 +1609,7 @@ void Svy_AskResetSurvey (void)
|
|||
Lay_ShowErrorAndExit ("You can not reset this survey.");
|
||||
|
||||
/***** Ask for confirmation of reset *****/
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_Do_you_really_want_to_reset_the_survey_X,
|
||||
Svy.Title);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
|
@ -1672,7 +1672,7 @@ void Svy_ResetSurvey (void)
|
|||
DB_QueryUPDATE (Query,"can not reset answers of a survey");
|
||||
|
||||
/***** Write message to show the change made *****/
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_Survey_X_reset,
|
||||
Svy.Title);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
|
@ -1710,7 +1710,7 @@ void Svy_HideSurvey (void)
|
|||
DB_QueryUPDATE (Query,"can not hide survey");
|
||||
|
||||
/***** Write message to show the change made *****/
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_Survey_X_is_now_hidden,
|
||||
Svy.Title);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
|
@ -1748,7 +1748,7 @@ void Svy_UnhideSurvey (void)
|
|||
DB_QueryUPDATE (Query,"can not show survey");
|
||||
|
||||
/***** Write message to show the change made *****/
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_Survey_X_is_now_visible,
|
||||
Svy.Title);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
|
@ -2201,7 +2201,7 @@ void Svy_RecFormSurvey (void)
|
|||
if (Svy_CheckIfSimilarSurveyExists (&NewSvy))
|
||||
{
|
||||
NewSurveyIsCorrect = false;
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_Already_existed_a_survey_with_the_title_X,
|
||||
NewSvy.Title);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
|
@ -2288,7 +2288,7 @@ static void Svy_CreateSurvey (struct Survey *Svy,const char *Txt)
|
|||
Svy_CreateGrps (Svy->SvyCod);
|
||||
|
||||
/***** Write success message *****/
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_Created_new_survey_X,
|
||||
Svy->Title);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
|
@ -3595,7 +3595,7 @@ void Svy_RequestRemoveQst (void)
|
|||
/***** Show question and button to remove question *****/
|
||||
Gbl.Svys.SvyCodToEdit = SvyCod;
|
||||
Gbl.Svys.SvyQstCodToEdit = SvyQst.QstCod;
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_Do_you_really_want_to_remove_the_question_X,
|
||||
(unsigned long) (SvyQst.QstInd + 1));
|
||||
Ale_ShowAlertAndButton (Ale_QUESTION,Gbl.Alert.Txt,
|
||||
|
|
18
swad_test.c
18
swad_test.c
|
@ -584,13 +584,13 @@ void Tst_AssessTest (void)
|
|||
Tst_SetTstStatus (NumTst,Tst_STATUS_ASSESSED);
|
||||
break;
|
||||
case Tst_STATUS_ASSESSED:
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_test_X_has_already_been_assessed_previously,
|
||||
NumTst);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
break;
|
||||
case Tst_STATUS_ERROR:
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_There_was_an_error_in_assessing_the_test_X,
|
||||
NumTst);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
|
@ -700,7 +700,7 @@ static bool Tst_CheckIfNextTstAllowed (void)
|
|||
if (NumSecondsFromNowToNextAccTst > 0)
|
||||
{
|
||||
/***** Write warning *****/
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
"%s:<br /><span id=\"date_next_test\"></span>."
|
||||
"<script type=\"text/javascript\">"
|
||||
"writeLocalDateHMSFromUTC('date_next_test',%ld,"
|
||||
|
@ -1555,7 +1555,7 @@ void Tst_RenameTag (void)
|
|||
/***** Check that the new tag is not empty *****/
|
||||
if (!NewTagTxt[0]) // New tag empty
|
||||
{
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_You_can_not_leave_the_name_of_the_tag_X_empty,
|
||||
OldTagTxt);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
|
@ -1568,7 +1568,7 @@ void Tst_RenameTag (void)
|
|||
// This happens when user press INTRO
|
||||
// without changing anything in the form.
|
||||
{
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_tag_X_has_not_changed,
|
||||
NewTagTxt);
|
||||
Ale_ShowAlert (Ale_INFO,Gbl.Alert.Txt);
|
||||
|
@ -1653,7 +1653,7 @@ void Tst_RenameTag (void)
|
|||
}
|
||||
|
||||
/***** Write message to show the change made *****/
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_tag_X_has_been_renamed_as_Y,
|
||||
OldTagTxt,NewTagTxt);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
|
@ -4766,7 +4766,7 @@ static bool Tst_GetParamsTst (Tst_ActionToDoWithQuestions_t ActionToDoWithQuesti
|
|||
if (Gbl.Test.NumQsts < Gbl.Test.Config.Min ||
|
||||
Gbl.Test.NumQsts > Gbl.Test.Config.Max)
|
||||
{
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_number_of_questions_must_be_in_the_interval_X,
|
||||
Gbl.Test.Config.Min,Gbl.Test.Config.Max);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
|
@ -6334,7 +6334,7 @@ void Tst_RequestRemoveQst (void)
|
|||
Lay_ShowErrorAndExit ("Wrong test parameters.");
|
||||
|
||||
/***** Show question and button to remove question *****/
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_Do_you_really_want_to_remove_the_question_X,
|
||||
(unsigned long) Gbl.Test.QstCod);
|
||||
if (EditingOnlyThisQst)
|
||||
|
@ -6458,7 +6458,7 @@ void Tst_ChangeShuffleQst (void)
|
|||
DB_QueryUPDATE (Query,"can not update the shuffle type of a question");
|
||||
|
||||
/***** Write message *****/
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Shuffle ? Txt_The_answers_of_the_question_with_code_X_will_appear_shuffled :
|
||||
Txt_The_answers_of_the_question_with_code_X_will_appear_without_shuffling,
|
||||
Gbl.Test.QstCod);
|
||||
|
|
|
@ -426,7 +426,7 @@ void TsI_ImportQstsFromXML (void)
|
|||
|
||||
if (WrongType)
|
||||
{
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_file_is_not_X,
|
||||
"xml");
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
|
|
26
swad_user.c
26
swad_user.c
|
@ -2473,12 +2473,12 @@ void Usr_WelcomeUsr (void)
|
|||
Gbl.Prefs.PathIconSet,Cfg_ICON_128x128,
|
||||
Txt_Happy_birthday,
|
||||
Txt_Happy_birthday);
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_Welcome_X_and_happy_birthday[Gbl.Usrs.Me.UsrDat.Sex],
|
||||
Gbl.Usrs.Me.UsrDat.FirstName);
|
||||
}
|
||||
if (!CongratulateMyBirthday)
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_Welcome_X[Gbl.Usrs.Me.UsrDat.Sex],
|
||||
Gbl.Usrs.Me.UsrDat.FirstName);
|
||||
Ale_ShowAlert (Ale_INFO,Gbl.Alert.Txt);
|
||||
|
@ -2751,7 +2751,7 @@ unsigned Usr_GetParamOtherUsrIDNickOrEMailAndGetUsrCods (struct ListUsrCods *Lis
|
|||
if (Wrong)
|
||||
{
|
||||
/***** String is not a valid user's nickname, email or ID *****/
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_ID_nickname_or_email_X_is_not_valid,
|
||||
Gbl.Usrs.Other.UsrDat.UsrIDNickOrEmail);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
|
@ -3185,7 +3185,7 @@ static void Usr_ShowAlertThereAreMoreThanOneUsr (void)
|
|||
|
||||
Gbl.Action.Act = ActFrmLogIn;
|
||||
Tab_SetCurrentTab ();
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_There_are_more_than_one_user_with_the_ID_X_Please_type_a_nick_or_email,
|
||||
Gbl.Usrs.Me.UsrIdLogin);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
|
@ -3281,7 +3281,7 @@ void Usr_ShowFormsLogoutAndRole (void)
|
|||
/***** Write message with my new logged role *****/
|
||||
if (Gbl.Usrs.Me.Role.HasChanged)
|
||||
{
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_You_are_now_LOGGED_IN_as_X,
|
||||
Txt_logged[Gbl.Usrs.Me.UsrDat.Sex],
|
||||
Txt_ROLES_SINGUL_abc[Gbl.Usrs.Me.Role.Logged][Gbl.Usrs.Me.UsrDat.Sex]);
|
||||
|
@ -5135,7 +5135,7 @@ static void Usr_GetListUsrsFromQuery (const char *Query,Rol_Role_t Role,Sco_Scop
|
|||
{
|
||||
if (Gbl.Usrs.LstUsrs[Role].NumUsrs > Cfg_MAX_USRS_IN_LIST)
|
||||
{
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_list_of_X_users_is_too_large_to_be_displayed,
|
||||
Gbl.Usrs.LstUsrs[Role].NumUsrs);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
|
@ -5325,7 +5325,7 @@ static void Usr_AllocateUsrsList (Rol_Role_t Role)
|
|||
/*
|
||||
if (Gbl.Usrs.Me.Roles.LoggedRole == Rol_SYS_ADM)
|
||||
{
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
"Memory used by list = %lu",
|
||||
(long) sizeof (struct UsrInList) * NumUsrs);
|
||||
Lay_ShowAlert (Lay_INFO,Gbl.Alert.Txt);
|
||||
|
@ -5388,7 +5388,7 @@ static void Usr_PutButtonToConfirmIWantToSeeBigList (unsigned NumUsrs,const char
|
|||
extern const char *Txt_Show_anyway;
|
||||
|
||||
/***** Show alert and button to confirm that I want to see the big list *****/
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_list_of_X_users_is_too_large_to_be_displayed,
|
||||
NumUsrs);
|
||||
Ale_ShowAlertAndButton (Ale_WARNING,Gbl.Alert.Txt,
|
||||
|
@ -5534,7 +5534,7 @@ bool Usr_GetListMsgRecipientsWrittenExplicitelyBySender (bool WriteErrorMsgs)
|
|||
{
|
||||
if (WriteErrorMsgs)
|
||||
{
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_There_is_no_user_with_nickname_X,
|
||||
UsrIDNickOrEmail);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
|
@ -5554,7 +5554,7 @@ bool Usr_GetListMsgRecipientsWrittenExplicitelyBySender (bool WriteErrorMsgs)
|
|||
{
|
||||
if (WriteErrorMsgs)
|
||||
{
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_There_is_no_user_with_email_X,
|
||||
UsrIDNickOrEmail);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
|
@ -5583,7 +5583,7 @@ bool Usr_GetListMsgRecipientsWrittenExplicitelyBySender (bool WriteErrorMsgs)
|
|||
{// TODO: Consider forbid IDs here
|
||||
if (WriteErrorMsgs)
|
||||
{
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_There_are_more_than_one_user_with_the_ID_X_Please_type_a_nick_or_email,
|
||||
UsrIDNickOrEmail);
|
||||
Ale_ShowAlert (Ale_ERROR,Gbl.Alert.Txt);
|
||||
|
@ -5595,7 +5595,7 @@ bool Usr_GetListMsgRecipientsWrittenExplicitelyBySender (bool WriteErrorMsgs)
|
|||
{
|
||||
if (WriteErrorMsgs)
|
||||
{
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_There_is_no_user_with_ID_nick_or_email_X,
|
||||
UsrIDNickOrEmail);
|
||||
Ale_ShowAlert (Ale_ERROR,Gbl.Alert.Txt);
|
||||
|
@ -5607,7 +5607,7 @@ bool Usr_GetListMsgRecipientsWrittenExplicitelyBySender (bool WriteErrorMsgs)
|
|||
{
|
||||
if (WriteErrorMsgs)
|
||||
{
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_ID_nickname_or_email_X_is_not_valid,
|
||||
UsrIDNickOrEmail);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
|
|
|
@ -151,14 +151,14 @@ static void XML_GetElement (struct XMLElement *ParentElem)
|
|||
EndTagNameLength = strcspn (Gbl.XMLPtr,">");
|
||||
if (ParentElem->TagNameLength != EndTagNameLength)
|
||||
{
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
"XML syntax error. Expect end tag </%s>.",
|
||||
ParentElem->TagName);
|
||||
Lay_ShowErrorAndExit (Gbl.Alert.Txt);
|
||||
}
|
||||
if (strncmp (ParentElem->TagName,Gbl.XMLPtr,EndTagNameLength)) // XML tags are case sensitive
|
||||
{
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
"XML syntax error. Expect end tag </%s>.",
|
||||
ParentElem->TagName);
|
||||
Lay_ShowErrorAndExit (Gbl.Alert.Txt);
|
||||
|
@ -364,7 +364,7 @@ static void XML_GetAttributes (struct XMLElement *Elem)
|
|||
}
|
||||
else
|
||||
{
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
"XML syntax error after attribute "%s" inside element "%s".",
|
||||
Attribute->AttributeName,Elem->TagName);
|
||||
Lay_ShowErrorAndExit (Gbl.Alert.Txt);
|
||||
|
|
62
swad_zip.c
62
swad_zip.c
|
@ -201,7 +201,8 @@ void ZIP_CreateZIPAsgWrk (void)
|
|||
Brw_CreateDirDownloadTmp ();
|
||||
|
||||
/***** Relative path of the directory with the works to compress *****/
|
||||
sprintf (Path,"%s/%s/%s",
|
||||
snprintf (Path,sizeof (Path),
|
||||
"%s/%s/%s",
|
||||
Cfg_PATH_SWAD_PRIVATE,
|
||||
Cfg_FOLDER_ZIP,
|
||||
Gbl.FileBrowser.ZIP.TmpDir);
|
||||
|
@ -212,13 +213,17 @@ void ZIP_CreateZIPAsgWrk (void)
|
|||
Lay_ShowErrorAndExit ("Can not change to temporary folder for compression.");
|
||||
|
||||
/***** Create public zip file with the assignment and works *****/
|
||||
sprintf (FileNameZIP,"%s.zip",Txt_works_ZIP_FILE_NAME);
|
||||
sprintf (PathFileZIP,"%s/%s/%s/%s",
|
||||
snprintf (FileNameZIP,sizeof (FileNameZIP),
|
||||
"%s.zip",
|
||||
Txt_works_ZIP_FILE_NAME);
|
||||
snprintf (PathFileZIP,sizeof (PathFileZIP),
|
||||
"%s/%s/%s/%s",
|
||||
Cfg_PATH_SWAD_PUBLIC,
|
||||
Cfg_FOLDER_FILE_BROWSER_TMP,
|
||||
Gbl.FileBrowser.TmpPubDir,
|
||||
FileNameZIP);
|
||||
sprintf (StrZip,"nice -n 19 zip -q -r '%s' *",
|
||||
snprintf (StrZip,sizeof (StrZip),
|
||||
"nice -n 19 zip -q -r '%s' *",
|
||||
PathFileZIP);
|
||||
Result = system (StrZip);
|
||||
|
||||
|
@ -235,7 +240,8 @@ void ZIP_CreateZIPAsgWrk (void)
|
|||
else
|
||||
{
|
||||
/***** Create URL pointing to ZIP file *****/
|
||||
sprintf (URLWithSpaces,"%s/%s/%s/%s",
|
||||
snprintf (URLWithSpaces,sizeof (URLWithSpaces),
|
||||
"%s/%s/%s/%s",
|
||||
Cfg_URL_SWAD_PUBLIC,
|
||||
Cfg_FOLDER_FILE_BROWSER_TMP,
|
||||
Gbl.FileBrowser.TmpPubDir,
|
||||
|
@ -263,7 +269,9 @@ static void ZIP_CreateTmpDirForCompression (void)
|
|||
char PathDirTmp[PATH_MAX + 1];
|
||||
|
||||
/***** If the private directory does not exist, create it *****/
|
||||
sprintf (PathZipPriv,"%s/%s",Cfg_PATH_SWAD_PRIVATE,Cfg_FOLDER_ZIP);
|
||||
snprintf (PathZipPriv,sizeof (PathZipPriv),
|
||||
"%s/%s",
|
||||
Cfg_PATH_SWAD_PRIVATE,Cfg_FOLDER_ZIP);
|
||||
Fil_CreateDirIfNotExists (PathZipPriv);
|
||||
|
||||
/***** First of all, we remove the oldest temporary directories.
|
||||
|
@ -275,7 +283,9 @@ static void ZIP_CreateTmpDirForCompression (void)
|
|||
/***** Create a new temporary directory *****/
|
||||
Str_Copy (Gbl.FileBrowser.ZIP.TmpDir,Gbl.UniqueNameEncrypted,
|
||||
NAME_MAX);
|
||||
sprintf (PathDirTmp,"%s/%s",PathZipPriv,Gbl.FileBrowser.ZIP.TmpDir);
|
||||
snprintf (PathDirTmp,sizeof (PathDirTmp),
|
||||
"%s/%s",
|
||||
PathZipPriv,Gbl.FileBrowser.ZIP.TmpDir);
|
||||
if (mkdir (PathDirTmp,(mode_t) 0xFFF))
|
||||
Lay_ShowErrorAndExit ("Can not create temporary folder for compression.");
|
||||
}
|
||||
|
@ -325,11 +335,13 @@ static void ZIP_CreateDirCompressionUsr (struct UsrData *UsrDat)
|
|||
Str_ConvertToValidFileName (FullNameAndUsrID);
|
||||
|
||||
/* Create path to folder and link */
|
||||
sprintf (PathFolderUsrInsideCrs,"%s/usr/%02u/%ld",
|
||||
snprintf (PathFolderUsrInsideCrs,sizeof (PathFolderUsrInsideCrs),
|
||||
"%s/usr/%02u/%ld",
|
||||
Gbl.CurrentCrs.PathPriv,
|
||||
(unsigned) (UsrDat->UsrCod % 100),
|
||||
UsrDat->UsrCod);
|
||||
sprintf (LinkTmpUsr,"%s/%s/%s/%s",
|
||||
snprintf (LinkTmpUsr,sizeof (LinkTmpUsr),
|
||||
"%s/%s/%s/%s",
|
||||
Cfg_PATH_SWAD_PRIVATE,
|
||||
Cfg_FOLDER_ZIP,
|
||||
Gbl.FileBrowser.ZIP.TmpDir,
|
||||
|
@ -344,7 +356,9 @@ static void ZIP_CreateDirCompressionUsr (struct UsrData *UsrDat)
|
|||
{
|
||||
// Link exists ==> a former user share the same name and ID
|
||||
// (probably a unique user has created two or more accounts)
|
||||
sprintf (Link,"%s-%u",LinkTmpUsr,NumTry);
|
||||
snprintf (Link,sizeof (Link),
|
||||
"%s-%u",
|
||||
LinkTmpUsr,NumTry);
|
||||
if (symlink (PathFolderUsrInsideCrs,Link) == 0)
|
||||
Success = true;
|
||||
}
|
||||
|
@ -427,10 +441,12 @@ static void ZIP_CompressFolderIntoZIP (void)
|
|||
Brw_CreateDirDownloadTmp ();
|
||||
|
||||
/***** Create a copy of the directory to compress *****/
|
||||
sprintf (Path,"%s/%s",
|
||||
snprintf (Path,sizeof (Path),
|
||||
"%s/%s",
|
||||
Gbl.FileBrowser.Priv.PathAboveRootFolder,
|
||||
Gbl.FileBrowser.Priv.FullPathInTree);
|
||||
sprintf (PathCompression,"%s/%s/%s",
|
||||
snprintf (PathCompression,sizeof (PathCompression),
|
||||
"%s/%s/%s",
|
||||
Cfg_PATH_SWAD_PRIVATE,
|
||||
Cfg_FOLDER_ZIP,
|
||||
Gbl.FileBrowser.ZIP.TmpDir); // Example: /var/www/swad/zip/<temporary_dir>
|
||||
|
@ -449,14 +465,18 @@ static void ZIP_CompressFolderIntoZIP (void)
|
|||
Lay_ShowErrorAndExit ("Can not change to temporary folder for compression.");
|
||||
|
||||
/***** Create public zip file with the assignment and works *****/
|
||||
sprintf (FileNameZIP,"%s.zip",strcmp (Gbl.FileBrowser.FilFolLnkName,".") ? Gbl.FileBrowser.FilFolLnkName :
|
||||
snprintf (FileNameZIP,sizeof (FileNameZIP),
|
||||
"%s.zip",
|
||||
strcmp (Gbl.FileBrowser.FilFolLnkName,".") ? Gbl.FileBrowser.FilFolLnkName :
|
||||
Txt_ROOT_FOLDER_EXTERNAL_NAMES[Gbl.FileBrowser.Type]);
|
||||
sprintf (PathFileZIP,"%s/%s/%s/%s",
|
||||
snprintf (PathFileZIP,sizeof (PathFileZIP),
|
||||
"%s/%s/%s/%s",
|
||||
Cfg_PATH_SWAD_PUBLIC,
|
||||
Cfg_FOLDER_FILE_BROWSER_TMP,
|
||||
Gbl.FileBrowser.TmpPubDir,
|
||||
FileNameZIP);
|
||||
sprintf (StrZip,"nice -n 19 zip -q -5 -r '%s' *",
|
||||
snprintf (StrZip,sizeof (StrZip),
|
||||
"nice -n 19 zip -q -5 -r '%s' *",
|
||||
PathFileZIP);
|
||||
Result = system (StrZip);
|
||||
|
||||
|
@ -473,7 +493,8 @@ static void ZIP_CompressFolderIntoZIP (void)
|
|||
else
|
||||
{
|
||||
/***** Create URL pointing to ZIP file *****/
|
||||
sprintf (URLWithSpaces,"%s/%s/%s/%s",
|
||||
snprintf (URLWithSpaces,sizeof (URLWithSpaces),
|
||||
"%s/%s/%s/%s",
|
||||
Cfg_URL_SWAD_PUBLIC,
|
||||
Cfg_FOLDER_FILE_BROWSER_TMP,
|
||||
Gbl.FileBrowser.TmpPubDir,
|
||||
|
@ -541,11 +562,14 @@ static unsigned long long ZIP_CloneDir (const char *Path,const char *PathClone,c
|
|||
if (strcmp (FileList[NumFile]->d_name,".") &&
|
||||
strcmp (FileList[NumFile]->d_name,"..")) // Skip directories "." and ".."
|
||||
{
|
||||
sprintf (PathFileInTree,"%s/%s",
|
||||
snprintf (PathFileInTree,sizeof (PathFileInTree),
|
||||
"%s/%s",
|
||||
PathInTree,FileList[NumFile]->d_name);
|
||||
sprintf (PathFile,"%s/%s",
|
||||
snprintf (PathFile,sizeof (PathFile),
|
||||
"%s/%s",
|
||||
Path,FileList[NumFile]->d_name);
|
||||
sprintf (PathFileClone,"%s/%s",
|
||||
snprintf (PathFileClone,sizeof (PathFileClone),
|
||||
"%s/%s",
|
||||
PathClone,FileList[NumFile]->d_name);
|
||||
|
||||
FileType = Brw_IS_UNKNOWN;
|
||||
|
|
Loading…
Reference in New Issue
Block a user