Version 18.46.1

This commit is contained in:
Antonio Cañas Vargas 2019-02-15 23:38:44 +01:00
parent 3d83ba9d8e
commit 2dc4c6df2f
59 changed files with 733 additions and 835 deletions

View File

@ -592,11 +592,11 @@ static void ID_ShowFormChangeUsrID (const struct UsrData *UsrDat,
/***** Show possible alert *****/ /***** Show possible alert *****/
if (Gbl.Alert.Section == (const char *) ID_ID_SECTION_ID) if (Gbl.Alert.Section == (const char *) ID_ID_SECTION_ID)
Ale_ShowAlert (Gbl.Alert.Type,Gbl.Alert.Txt); Ale_ShowA_old (Gbl.Alert.Type,Gbl.Alert.Txt);
/***** Help message *****/ /***** Help message *****/
if (IShouldFillInID) if (IShouldFillInID)
Ale_ShowAlert (Ale_WARNING,Txt_Please_fill_in_your_ID); Ale_ShowA_old (Ale_WARNING,Txt_Please_fill_in_your_ID);
/***** Start table *****/ /***** Start table *****/
Tbl_StartTableWide (2); Tbl_StartTableWide (2);
@ -676,7 +676,7 @@ static void ID_ShowFormChangeUsrID (const struct UsrData *UsrDat,
/***** Write help text *****/ /***** Write help text *****/
fprintf (Gbl.F.Out,"<tr>" fprintf (Gbl.F.Out,"<tr>"
"<td colspan=\"2\" class=\"DAT CENTER_MIDDLE\">"); "<td colspan=\"2\" class=\"DAT CENTER_MIDDLE\">");
Ale_ShowAlert (Ale_INFO,Txt_The_ID_is_used_in_order_to_facilitate_); Ale_ShowA_old (Ale_INFO,Txt_The_ID_is_used_in_order_to_facilitate_);
fprintf (Gbl.F.Out,"</td>" fprintf (Gbl.F.Out,"</td>"
"</tr>"); "</tr>");
@ -767,10 +767,10 @@ void ID_RemoveOtherUsrID (void)
Acc_ShowFormChgOtherUsrAccount (); Acc_ShowFormChgOtherUsrAccount ();
} }
else else
Ale_ShowAlert (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_); Ale_ShowA_old (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
} }
else // User not found else // User not found
Ale_ShowAlert (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_); Ale_ShowA_old (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
} }
/*****************************************************************************/ /*****************************************************************************/
@ -898,10 +898,10 @@ void ID_NewOtherUsrID (void)
Acc_ShowFormChgOtherUsrAccount (); Acc_ShowFormChgOtherUsrAccount ();
} }
else else
Ale_ShowAlert (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_); Ale_ShowA_old (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
} }
else // User not found else // User not found
Ale_ShowAlert (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_); Ale_ShowA_old (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
} }
/*****************************************************************************/ /*****************************************************************************/

View File

@ -25,8 +25,6 @@
/*********************************** Headers *********************************/ /*********************************** Headers *********************************/
/*****************************************************************************/ /*****************************************************************************/
#define _GNU_SOURCE // For asprintf
#include <stdio.h> // For asprintf
#include <string.h> // For string functions #include <string.h> // For string functions
#include "swad_account.h" #include "swad_account.h"
@ -147,7 +145,7 @@ static void Acc_ShowFormCheckIfIHaveAccount (const char *Title)
Hlp_PROFILE_SignUp,Box_CLOSABLE); Hlp_PROFILE_SignUp,Box_CLOSABLE);
/***** Help alert *****/ /***** Help alert *****/
Ale_ShowAlert (Ale_INFO,Txt_If_you_think_you_may_have_been_registered_); Ale_ShowA_fmt (Ale_INFO,Txt_If_you_think_you_may_have_been_registered_);
/***** Form to request user's ID for possible account already created *****/ /***** Form to request user's ID for possible account already created *****/
Frm_StartForm (ActChkUsrAcc); Frm_StartForm (ActChkUsrAcc);
@ -184,7 +182,6 @@ void Acc_CheckIfEmptyAccountExists (void)
struct UsrData UsrDat; struct UsrData UsrDat;
MYSQL_RES *mysql_res; MYSQL_RES *mysql_res;
MYSQL_ROW row; MYSQL_ROW row;
char *Txt;
/***** Links to other actions *****/ /***** Links to other actions *****/
fprintf (Gbl.F.Out,"<div class=\"CONTEXT_MENU\">"); fprintf (Gbl.F.Out,"<div class=\"CONTEXT_MENU\">");
@ -246,13 +243,8 @@ void Acc_CheckIfEmptyAccountExists (void)
Box_EndBoxTable (); Box_EndBoxTable ();
} }
else else
{ Ale_ShowA_fmt (Ale_INFO,Txt_There_is_no_empty_account_associated_with_your_ID_X,
if (asprintf (&Txt,Txt_There_is_no_empty_account_associated_with_your_ID_X, ID);
ID) < 0)
Lay_NotEnoughMemoryExit ();
Ale_ShowAlert (Ale_INFO,Txt);
free ((void *) Txt);
}
/***** Free structure that stores the query result *****/ /***** Free structure that stores the query result *****/
DB_FreeMySQLResult (&mysql_res); DB_FreeMySQLResult (&mysql_res);
@ -263,7 +255,7 @@ void Acc_CheckIfEmptyAccountExists (void)
else // ID not valid else // ID not valid
{ {
/**** Show again form to check if I have an account *****/ /**** Show again form to check if I have an account *****/
Ale_ShowAlert (Ale_WARNING,Txt_Please_enter_your_ID); Ale_ShowA_fmt (Ale_WARNING,Txt_Please_enter_your_ID);
Acc_ShowFormCheckIfIHaveAccount (Txt_Before_creating_a_new_account_check_if_you_have_been_already_registered); Acc_ShowFormCheckIfIHaveAccount (Txt_Before_creating_a_new_account_check_if_you_have_been_already_registered);
} }
@ -450,19 +442,19 @@ void Acc_ShowFormChgMyAccount (void)
/***** Check nickname, email and ID *****/ /***** Check nickname, email and ID *****/
IMustCreateMyPasswordNow = (Gbl.Usrs.Me.UsrDat.Password[0] == '\0'); IMustCreateMyPasswordNow = (Gbl.Usrs.Me.UsrDat.Password[0] == '\0');
if (IMustCreateMyPasswordNow) if (IMustCreateMyPasswordNow)
Ale_ShowAlert (Ale_WARNING, Ale_ShowA_fmt (Ale_WARNING,
Txt_Before_going_to_any_other_option_you_must_create_your_password); Txt_Before_going_to_any_other_option_you_must_create_your_password);
else else
{ {
IMustCreateMyNicknameNow = (Gbl.Usrs.Me.UsrDat.Nickname[0] == '\0'); IMustCreateMyNicknameNow = (Gbl.Usrs.Me.UsrDat.Nickname[0] == '\0');
if (IMustCreateMyNicknameNow) if (IMustCreateMyNicknameNow)
Ale_ShowAlert (Ale_WARNING, Ale_ShowA_fmt (Ale_WARNING,
Txt_Before_going_to_any_other_option_you_must_fill_your_nickname); Txt_Before_going_to_any_other_option_you_must_fill_your_nickname);
else else
{ {
IMustFillInMyEmailNow = (Gbl.Usrs.Me.UsrDat.Email[0] == '\0'); IMustFillInMyEmailNow = (Gbl.Usrs.Me.UsrDat.Email[0] == '\0');
if (IMustFillInMyEmailNow) if (IMustFillInMyEmailNow)
Ale_ShowAlert (Ale_WARNING, Ale_ShowA_fmt (Ale_WARNING,
Txt_Before_going_to_any_other_option_you_must_fill_in_your_email_address); Txt_Before_going_to_any_other_option_you_must_fill_in_your_email_address);
else else
{ {
@ -533,10 +525,10 @@ void Acc_ShowFormChgOtherUsrAccount (void)
fprintf (Gbl.F.Out,"</div>"); fprintf (Gbl.F.Out,"</div>");
} }
else else
Ale_ShowAlert (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_); Ale_ShowA_fmt (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
} }
else // User not found else // User not found
Ale_ShowAlert (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_); Ale_ShowA_fmt (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
} }
/*****************************************************************************/ /*****************************************************************************/
@ -627,7 +619,6 @@ static bool Acc_GetParamsNewAccount (char NewNicknameWithoutArroba[Nck_MAX_BYTES
extern const char *Txt_The_email_address_entered_X_is_not_valid; extern const char *Txt_The_email_address_entered_X_is_not_valid;
char NewNicknameWithArroba[Nck_MAX_BYTES_NICKNAME_FROM_FORM + 1]; char NewNicknameWithArroba[Nck_MAX_BYTES_NICKNAME_FROM_FORM + 1];
char NewPlainPassword[Pwd_MAX_BYTES_PLAIN_PASSWORD + 1]; char NewPlainPassword[Pwd_MAX_BYTES_PLAIN_PASSWORD + 1];
char *Txt;
bool Error = false; bool Error = false;
/***** Step 1/3: Get new nickname from form *****/ /***** Step 1/3: Get new nickname from form *****/
@ -655,23 +646,17 @@ static bool Acc_GetParamsNewAccount (char NewNicknameWithoutArroba[Nck_MAX_BYTES
Gbl.Usrs.Me.UsrDat.UsrCod)) // A nickname of another user is the same that this nickname Gbl.Usrs.Me.UsrDat.UsrCod)) // A nickname of another user is the same that this nickname
{ {
Error = true; Error = true;
if (asprintf (&Txt,Txt_The_nickname_X_had_been_registered_by_another_user, Ale_ShowA_fmt (Ale_WARNING,Txt_The_nickname_X_had_been_registered_by_another_user,
NewNicknameWithoutArroba) < 0) NewNicknameWithoutArroba);
Lay_NotEnoughMemoryExit ();
Ale_ShowAlert (Ale_WARNING,Txt);
free ((void *) Txt);
} }
} }
else // New nickname is not valid else // New nickname is not valid
{ {
Error = true; Error = true;
if (asprintf (&Txt,Txt_The_nickname_entered_X_is_not_valid_, Ale_ShowA_fmt (Ale_WARNING,Txt_The_nickname_entered_X_is_not_valid_,
NewNicknameWithArroba, NewNicknameWithArroba,
Nck_MIN_CHARS_NICKNAME_WITHOUT_ARROBA, Nck_MIN_CHARS_NICKNAME_WITHOUT_ARROBA,
Nck_MAX_CHARS_NICKNAME_WITHOUT_ARROBA) < 0) Nck_MAX_CHARS_NICKNAME_WITHOUT_ARROBA);
Lay_NotEnoughMemoryExit ();
Ale_ShowAlert (Ale_WARNING,Txt);
free ((void *) Txt);
} }
/***** Step 2/3: Get new email from form *****/ /***** Step 2/3: Get new email from form *****/
@ -687,21 +672,15 @@ static bool Acc_GetParamsNewAccount (char NewNicknameWithoutArroba[Nck_MAX_BYTES
NewEmail)) // An email of another user is the same that my email NewEmail)) // An email of another user is the same that my email
{ {
Error = true; Error = true;
if (asprintf (&Txt,Txt_The_email_address_X_had_been_registered_by_another_user, Ale_ShowA_fmt (Ale_WARNING,Txt_The_email_address_X_had_been_registered_by_another_user,
NewEmail) < 0) NewEmail);
Lay_NotEnoughMemoryExit ();
Ale_ShowAlert (Ale_WARNING,Txt);
free ((void *) Txt);
} }
} }
else // New email is not valid else // New email is not valid
{ {
Error = true; Error = true;
if (asprintf (&Txt,Txt_The_email_address_entered_X_is_not_valid, Ale_ShowA_fmt (Ale_WARNING,Txt_The_email_address_entered_X_is_not_valid,
NewEmail) < 0) NewEmail);
Lay_NotEnoughMemoryExit ();
Ale_ShowAlert (Ale_WARNING,Txt);
free ((void *) Txt);
} }
/***** Step 3/3: Get new password from form *****/ /***** Step 3/3: Get new password from form *****/
@ -710,7 +689,7 @@ static bool Acc_GetParamsNewAccount (char NewNicknameWithoutArroba[Nck_MAX_BYTES
if (!Pwd_SlowCheckIfPasswordIsGood (NewPlainPassword,NewEncryptedPassword,-1L)) // New password is good? if (!Pwd_SlowCheckIfPasswordIsGood (NewPlainPassword,NewEncryptedPassword,-1L)) // New password is good?
{ {
Error = true; Error = true;
Ale_ShowAlert (Ale_WARNING,Gbl.AlertToShowLater.Txt); // Error message is set in Pwd_SlowCheckIfPasswordIsGood Ale_ShowA_new (Ale_WARNING,Gbl.AlertToShowLater.Txt); // Error message is set in Pwd_SlowCheckIfPasswordIsGood
} }
return !Error; return !Error;
@ -851,17 +830,13 @@ static void Acc_CreateNewEncryptedUsrCod (struct UsrData *UsrDat)
void Acc_AfterCreationNewAccount (void) void Acc_AfterCreationNewAccount (void)
{ {
extern const char *Txt_Congratulations_You_have_created_your_account_X_Now_Y_will_request_you_; extern const char *Txt_Congratulations_You_have_created_your_account_X_Now_Y_will_request_you_;
char *Txt;
if (Gbl.Usrs.Me.Logged) // If account has been created without problem, I am logged if (Gbl.Usrs.Me.Logged) // If account has been created without problem, I am logged
{ {
/***** Show message of success *****/ /***** Show message of success *****/
if (asprintf (&Txt,Txt_Congratulations_You_have_created_your_account_X_Now_Y_will_request_you_, Ale_ShowA_fmt (Ale_SUCCESS,Txt_Congratulations_You_have_created_your_account_X_Now_Y_will_request_you_,
Gbl.Usrs.Me.UsrDat.Nickname, Gbl.Usrs.Me.UsrDat.Nickname,
Cfg_PLATFORM_SHORT_NAME) < 0) Cfg_PLATFORM_SHORT_NAME);
Lay_NotEnoughMemoryExit ();
Ale_ShowAlert (Ale_SUCCESS,Txt);
free ((void *) Txt);
/***** Show form with account data *****/ /***** Show form with account data *****/
Acc_ShowFormChgMyAccount (); Acc_ShowFormChgMyAccount ();
@ -888,7 +863,7 @@ void Acc_GetUsrCodAndRemUsrGbl (void)
Error = true; Error = true;
if (Error) if (Error)
Ale_ShowAlert (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_); Ale_ShowA_fmt (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
} }
/*****************************************************************************/ /*****************************************************************************/
@ -998,7 +973,7 @@ static void Acc_AskIfRemoveOtherUsrAccount (void)
Ale_ShowAlertAndButton2 (ActUnk,NULL,NULL,NULL,Btn_NO_BUTTON,NULL); Ale_ShowAlertAndButton2 (ActUnk,NULL,NULL,NULL,Btn_NO_BUTTON,NULL);
} }
else else
Ale_ShowAlert (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_); Ale_ShowA_fmt (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
} }
/*****************************************************************************/ /*****************************************************************************/
@ -1027,7 +1002,6 @@ void Acc_CompletelyEliminateAccount (struct UsrData *UsrDat,
extern const char *Txt_Briefcase_of_THE_USER_X_has_been_removed; extern const char *Txt_Briefcase_of_THE_USER_X_has_been_removed;
extern const char *Txt_Photo_of_THE_USER_X_has_been_removed; extern const char *Txt_Photo_of_THE_USER_X_has_been_removed;
extern const char *Txt_Record_card_of_THE_USER_X_has_been_removed; extern const char *Txt_Record_card_of_THE_USER_X_has_been_removed;
char *Txt;
bool PhotoRemoved = false; bool PhotoRemoved = false;
/***** Remove the works zones of the user in all courses *****/ /***** Remove the works zones of the user in all courses *****/
@ -1059,13 +1033,8 @@ void Acc_CompletelyEliminateAccount (struct UsrData *UsrDat,
UsrDat->UsrCod); UsrDat->UsrCod);
if (QuietOrVerbose == Cns_VERBOSE) if (QuietOrVerbose == Cns_VERBOSE)
{ Ale_ShowA_fmt (Ale_SUCCESS,Txt_THE_USER_X_has_been_removed_from_all_his_her_courses,
if (asprintf (&Txt,Txt_THE_USER_X_has_been_removed_from_all_his_her_courses, UsrDat->FullName);
UsrDat->FullName) < 0)
Lay_NotEnoughMemoryExit ();
Ale_ShowAlert (Ale_SUCCESS,Txt);
free ((void *) Txt);
}
/***** Remove user as administrator of any degree *****/ /***** Remove user as administrator of any degree *****/
DB_QueryDELETE ("can not remove a user as administrator", DB_QueryDELETE ("can not remove a user as administrator",
@ -1073,13 +1042,8 @@ void Acc_CompletelyEliminateAccount (struct UsrData *UsrDat,
UsrDat->UsrCod); UsrDat->UsrCod);
if (QuietOrVerbose == Cns_VERBOSE) if (QuietOrVerbose == Cns_VERBOSE)
{ Ale_ShowA_fmt (Ale_SUCCESS,Txt_THE_USER_X_has_been_removed_as_administrator,
if (asprintf (&Txt,Txt_THE_USER_X_has_been_removed_as_administrator, UsrDat->FullName);
UsrDat->FullName) < 0)
Lay_NotEnoughMemoryExit ();
Ale_ShowAlert (Ale_SUCCESS,Txt);
free ((void *) Txt);
}
/***** Remove user's clipboard in forums *****/ /***** Remove user's clipboard in forums *****/
For_RemoveUsrFromThrClipboard (UsrDat->UsrCod); For_RemoveUsrFromThrClipboard (UsrDat->UsrCod);
@ -1090,13 +1054,8 @@ void Acc_CompletelyEliminateAccount (struct UsrData *UsrDat,
/***** Remove the file tree of a user *****/ /***** Remove the file tree of a user *****/
Acc_RemoveUsrBriefcase (UsrDat); Acc_RemoveUsrBriefcase (UsrDat);
if (QuietOrVerbose == Cns_VERBOSE) if (QuietOrVerbose == Cns_VERBOSE)
{ Ale_ShowA_fmt (Ale_SUCCESS,Txt_Briefcase_of_THE_USER_X_has_been_removed,
if (asprintf (&Txt,Txt_Briefcase_of_THE_USER_X_has_been_removed, UsrDat->FullName);
UsrDat->FullName) < 0)
Lay_NotEnoughMemoryExit ();
Ale_ShowAlert (Ale_SUCCESS,Txt);
free ((void *) Txt);
}
/***** Remove test results made by user in all courses *****/ /***** Remove test results made by user in all courses *****/
Tst_RemoveTestResultsMadeByUsrInAllCrss (UsrDat->UsrCod); Tst_RemoveTestResultsMadeByUsrInAllCrss (UsrDat->UsrCod);
@ -1108,13 +1067,8 @@ void Acc_CompletelyEliminateAccount (struct UsrData *UsrDat,
Gbl.Msg.FilterContent[0] = '\0'; Gbl.Msg.FilterContent[0] = '\0';
Msg_DelAllRecAndSntMsgsUsr (UsrDat->UsrCod); Msg_DelAllRecAndSntMsgsUsr (UsrDat->UsrCod);
if (QuietOrVerbose == Cns_VERBOSE) if (QuietOrVerbose == Cns_VERBOSE)
{ Ale_ShowA_fmt (Ale_SUCCESS,Txt_Messages_of_THE_USER_X_have_been_deleted,
if (asprintf (&Txt,Txt_Messages_of_THE_USER_X_have_been_deleted, UsrDat->FullName);
UsrDat->FullName) < 0)
Lay_NotEnoughMemoryExit ();
Ale_ShowAlert (Ale_SUCCESS,Txt);
free ((void *) Txt);
}
/***** Remove user from tables of banned users *****/ /***** Remove user from tables of banned users *****/
Usr_RemoveUsrFromUsrBanned (UsrDat->UsrCod); Usr_RemoveUsrFromUsrBanned (UsrDat->UsrCod);
@ -1157,24 +1111,14 @@ void Acc_CompletelyEliminateAccount (struct UsrData *UsrDat,
/***** Remove user's photo *****/ /***** Remove user's photo *****/
PhotoRemoved = Pho_RemovePhoto (UsrDat); PhotoRemoved = Pho_RemovePhoto (UsrDat);
if (PhotoRemoved && QuietOrVerbose == Cns_VERBOSE) if (PhotoRemoved && QuietOrVerbose == Cns_VERBOSE)
{ Ale_ShowA_fmt (Ale_SUCCESS,Txt_Photo_of_THE_USER_X_has_been_removed,
if (asprintf (&Txt,Txt_Photo_of_THE_USER_X_has_been_removed, UsrDat->FullName);
UsrDat->FullName) < 0)
Lay_NotEnoughMemoryExit ();
Ale_ShowAlert (Ale_SUCCESS,Txt);
free ((void *) Txt);
}
/***** Remove user *****/ /***** Remove user *****/
Acc_RemoveUsr (UsrDat); Acc_RemoveUsr (UsrDat);
if (QuietOrVerbose == Cns_VERBOSE) if (QuietOrVerbose == Cns_VERBOSE)
{ Ale_ShowA_fmt (Ale_SUCCESS,Txt_Record_card_of_THE_USER_X_has_been_removed,
if (asprintf (&Txt,Txt_Record_card_of_THE_USER_X_has_been_removed, UsrDat->FullName);
UsrDat->FullName) < 0)
Lay_NotEnoughMemoryExit ();
Ale_ShowAlert (Ale_SUCCESS,Txt);
free ((void *) Txt);
}
} }
/*****************************************************************************/ /*****************************************************************************/

View File

@ -371,7 +371,7 @@ void Agd_ShowUsrAgenda (void)
} }
if (Error) if (Error)
Ale_ShowAlert (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_); Ale_ShowA_fmt (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
} }
/*****************************************************************************/ /*****************************************************************************/
@ -415,12 +415,12 @@ void Agd_ShowOtherAgendaAfterLogIn (void)
Box_EndBox (); Box_EndBox ();
} }
else else
Ale_ShowAlert (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_); Ale_ShowA_fmt (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
} }
else else
/* The current language is not my preferred language /* The current language is not my preferred language
==> change automatically to my language */ ==> change automatically to my language */
Ale_ShowAlert (Ale_INFO,Txt_Switching_to_LANGUAGE[Gbl.Usrs.Me.UsrDat.Prefs.Language]); Ale_ShowA_fmt (Ale_INFO,Txt_Switching_to_LANGUAGE[Gbl.Usrs.Me.UsrDat.Prefs.Language]);
} }
} }
@ -480,7 +480,7 @@ static void Agd_ShowEvents (Agd_AgendaType_t AgendaType)
Tbl_EndTable (); Tbl_EndTable ();
} }
else else
Ale_ShowAlert (Ale_INFO,Txt_No_events); Ale_ShowA_fmt (Ale_INFO,Txt_No_events);
/***** Write again links to pages *****/ /***** Write again links to pages *****/
if (Pagination.MoreThanOnePage) if (Pagination.MoreThanOnePage)
@ -1296,7 +1296,6 @@ void Agd_RemoveEvent (void)
{ {
extern const char *Txt_Event_X_removed; extern const char *Txt_Event_X_removed;
struct AgendaEvent AgdEvent; struct AgendaEvent AgdEvent;
char *Txt;
/***** Get event code *****/ /***** Get event code *****/
if ((AgdEvent.AgdCod = Agd_GetParamAgdCod ()) == -1L) if ((AgdEvent.AgdCod = Agd_GetParamAgdCod ()) == -1L)
@ -1312,11 +1311,8 @@ void Agd_RemoveEvent (void)
AgdEvent.AgdCod,AgdEvent.UsrCod); AgdEvent.AgdCod,AgdEvent.UsrCod);
/***** Write message to show the change made *****/ /***** Write message to show the change made *****/
if (asprintf (&Txt,Txt_Event_X_removed, Ale_ShowA_fmt (Ale_SUCCESS,Txt_Event_X_removed,
AgdEvent.Event) < 0) AgdEvent.Event);
Lay_NotEnoughMemoryExit ();
Ale_ShowAlert (Ale_SUCCESS,Txt);
free ((void *) Txt);
/***** Show events again *****/ /***** Show events again *****/
Agd_ShowMyAgenda (); Agd_ShowMyAgenda ();
@ -1330,7 +1326,6 @@ void Agd_HideEvent (void)
{ {
extern const char *Txt_Event_X_is_now_hidden; extern const char *Txt_Event_X_is_now_hidden;
struct AgendaEvent AgdEvent; struct AgendaEvent AgdEvent;
char *Txt;
/***** Get event code *****/ /***** Get event code *****/
if ((AgdEvent.AgdCod = Agd_GetParamAgdCod ()) == -1L) if ((AgdEvent.AgdCod = Agd_GetParamAgdCod ()) == -1L)
@ -1347,11 +1342,8 @@ void Agd_HideEvent (void)
AgdEvent.AgdCod,AgdEvent.UsrCod); AgdEvent.AgdCod,AgdEvent.UsrCod);
/***** Write message to show the change made *****/ /***** Write message to show the change made *****/
if (asprintf (&Txt,Txt_Event_X_is_now_hidden, Ale_ShowA_fmt (Ale_SUCCESS,Txt_Event_X_is_now_hidden,
AgdEvent.Event) < 0) AgdEvent.Event);
Lay_NotEnoughMemoryExit ();
Ale_ShowAlert (Ale_SUCCESS,Txt);
free ((void *) Txt);
/***** Show events again *****/ /***** Show events again *****/
Agd_ShowMyAgenda (); Agd_ShowMyAgenda ();
@ -1365,7 +1357,6 @@ void Agd_UnhideEvent (void)
{ {
extern const char *Txt_Event_X_is_now_visible; extern const char *Txt_Event_X_is_now_visible;
struct AgendaEvent AgdEvent; struct AgendaEvent AgdEvent;
char *Txt;
/***** Get event code *****/ /***** Get event code *****/
if ((AgdEvent.AgdCod = Agd_GetParamAgdCod ()) == -1L) if ((AgdEvent.AgdCod = Agd_GetParamAgdCod ()) == -1L)
@ -1382,11 +1373,8 @@ void Agd_UnhideEvent (void)
AgdEvent.AgdCod,AgdEvent.UsrCod); AgdEvent.AgdCod,AgdEvent.UsrCod);
/***** Write message to show the change made *****/ /***** Write message to show the change made *****/
if (asprintf (&Txt,Txt_Event_X_is_now_visible, Ale_ShowA_fmt (Ale_SUCCESS,Txt_Event_X_is_now_visible,
AgdEvent.Event) < 0) AgdEvent.Event);
Lay_NotEnoughMemoryExit ();
Ale_ShowAlert (Ale_SUCCESS,Txt);
free ((void *) Txt);
/***** Show events again *****/ /***** Show events again *****/
Agd_ShowMyAgenda (); Agd_ShowMyAgenda ();
@ -1400,7 +1388,6 @@ void Agd_MakeEventPrivate (void)
{ {
extern const char *Txt_Event_X_is_now_private; extern const char *Txt_Event_X_is_now_private;
struct AgendaEvent AgdEvent; struct AgendaEvent AgdEvent;
char *Txt;
/***** Get event code *****/ /***** Get event code *****/
if ((AgdEvent.AgdCod = Agd_GetParamAgdCod ()) == -1L) if ((AgdEvent.AgdCod = Agd_GetParamAgdCod ()) == -1L)
@ -1417,11 +1404,8 @@ void Agd_MakeEventPrivate (void)
AgdEvent.AgdCod,AgdEvent.UsrCod); AgdEvent.AgdCod,AgdEvent.UsrCod);
/***** Write message to show the change made *****/ /***** Write message to show the change made *****/
if (asprintf (&Txt,Txt_Event_X_is_now_private, Ale_ShowA_fmt (Ale_SUCCESS,Txt_Event_X_is_now_private,
AgdEvent.Event) < 0) AgdEvent.Event);
Lay_NotEnoughMemoryExit ();
Ale_ShowAlert (Ale_SUCCESS,Txt);
free ((void *) Txt);
/***** Show events again *****/ /***** Show events again *****/
Agd_ShowMyAgenda (); Agd_ShowMyAgenda ();
@ -1435,7 +1419,6 @@ void Agd_MakeEventPublic (void)
{ {
extern const char *Txt_Event_X_is_now_visible_to_users_of_your_courses; extern const char *Txt_Event_X_is_now_visible_to_users_of_your_courses;
struct AgendaEvent AgdEvent; struct AgendaEvent AgdEvent;
char *Txt;
/***** Get event code *****/ /***** Get event code *****/
if ((AgdEvent.AgdCod = Agd_GetParamAgdCod ()) == -1L) if ((AgdEvent.AgdCod = Agd_GetParamAgdCod ()) == -1L)
@ -1452,11 +1435,8 @@ void Agd_MakeEventPublic (void)
AgdEvent.AgdCod,AgdEvent.UsrCod); AgdEvent.AgdCod,AgdEvent.UsrCod);
/***** Write message to show the change made *****/ /***** Write message to show the change made *****/
if (asprintf (&Txt,Txt_Event_X_is_now_visible_to_users_of_your_courses, Ale_ShowA_fmt (Ale_SUCCESS,Txt_Event_X_is_now_visible_to_users_of_your_courses,
AgdEvent.Event) < 0) AgdEvent.Event);
Lay_NotEnoughMemoryExit ();
Ale_ShowAlert (Ale_SUCCESS,Txt);
free ((void *) Txt);
/***** Show events again *****/ /***** Show events again *****/
Agd_ShowMyAgenda (); Agd_ShowMyAgenda ();
@ -1606,7 +1586,6 @@ void Agd_RecFormEvent (void)
bool ItsANewEvent; bool ItsANewEvent;
bool NewEventIsCorrect = true; bool NewEventIsCorrect = true;
char EventTxt[Cns_MAX_BYTES_TEXT + 1]; char EventTxt[Cns_MAX_BYTES_TEXT + 1];
char *Txt;
/***** Set author of the event *****/ /***** Set author of the event *****/
AgdEvent.UsrCod = Gbl.Usrs.Me.UsrDat.UsrCod; AgdEvent.UsrCod = Gbl.Usrs.Me.UsrDat.UsrCod;
@ -1637,14 +1616,14 @@ void Agd_RecFormEvent (void)
if (!AgdEvent.Location[0]) // If there is no event if (!AgdEvent.Location[0]) // If there is no event
{ {
NewEventIsCorrect = false; NewEventIsCorrect = false;
Ale_ShowAlert (Ale_WARNING,Txt_You_must_specify_the_title_of_the_event); Ale_ShowA_fmt (Ale_WARNING,Txt_You_must_specify_the_title_of_the_event);
} }
/***** Check if event is correct *****/ /***** Check if event is correct *****/
if (!AgdEvent.Event[0]) // If there is no event if (!AgdEvent.Event[0]) // If there is no event
{ {
NewEventIsCorrect = false; NewEventIsCorrect = false;
Ale_ShowAlert (Ale_WARNING,Txt_You_must_specify_the_title_of_the_event); Ale_ShowA_fmt (Ale_WARNING,Txt_You_must_specify_the_title_of_the_event);
} }
/***** Create a new event or update an existing one *****/ /***** Create a new event or update an existing one *****/
@ -1655,18 +1634,15 @@ void Agd_RecFormEvent (void)
Agd_CreateEvent (&AgdEvent,EventTxt); // Add new event to database Agd_CreateEvent (&AgdEvent,EventTxt); // Add new event to database
/***** Write success message *****/ /***** Write success message *****/
if (asprintf (&Txt,Txt_Created_new_event_X, Ale_ShowA_fmt (Ale_SUCCESS,Txt_Created_new_event_X,
AgdEvent.Event) < 0) AgdEvent.Event);
Lay_NotEnoughMemoryExit ();
Ale_ShowAlert (Ale_SUCCESS,Txt);
free ((void *) Txt);
} }
else else
{ {
Agd_UpdateEvent (&AgdEvent,EventTxt); Agd_UpdateEvent (&AgdEvent,EventTxt);
/***** Write success message *****/ /***** Write success message *****/
Ale_ShowAlert (Ale_SUCCESS,Txt_The_event_has_been_modified); Ale_ShowA_fmt (Ale_SUCCESS,Txt_The_event_has_been_modified);
} }
/* Free memory for list of selected groups */ /* Free memory for list of selected groups */

View File

@ -25,7 +25,11 @@
/********************************* Headers ***********************************/ /********************************* Headers ***********************************/
/*****************************************************************************/ /*****************************************************************************/
#define _GNU_SOURCE // For vasprintf
#include <linux/stddef.h> // For NULL #include <linux/stddef.h> // For NULL
#include <stdarg.h> // For va_start, va_end
#include <stdio.h> // For FILE, fprintf, vasprintf
#include <stdlib.h> // For free
#include "swad_alert.h" #include "swad_alert.h"
#include "swad_form.h" #include "swad_form.h"
@ -86,7 +90,7 @@ void Ale_ShowPendingAlert (void)
/***** Anything to show? *****/ /***** Anything to show? *****/
if (Gbl.Alert.Type != Ale_NONE) if (Gbl.Alert.Type != Ale_NONE)
/***** Show alert *****/ /***** Show alert *****/
Ale_ShowAlert (Gbl.Alert.Type,Gbl.Alert.Txt); Ale_ShowA_old (Gbl.Alert.Type,Gbl.Alert.Txt);
Ale_ResetAlert (); Ale_ResetAlert ();
} }
@ -95,7 +99,39 @@ void Ale_ShowPendingAlert (void)
/******************** Show an alert message to the user **********************/ /******************** Show an alert message to the user **********************/
/*****************************************************************************/ /*****************************************************************************/
void Ale_ShowAlert (Ale_AlertType_t AlertType,const char *Txt) void Ale_ShowA_fmt (Ale_AlertType_t AlertType,
const char *fmt,...)
{
va_list ap;
int NumBytesPrinted;
char *Txt;
if (AlertType != Ale_NONE)
{
va_start (ap,fmt);
NumBytesPrinted = vasprintf (&Txt,fmt,ap);
va_end (ap);
if (NumBytesPrinted < 0) // If memory allocation wasn't possible,
// or some other error occurs,
// vasprintf will return -1
Lay_NotEnoughMemoryExit ();
Ale_ShowAlertAndButton (AlertType,Txt,
ActUnk,NULL,NULL,NULL,Btn_NO_BUTTON,NULL);
free ((void *) Txt);
}
}
void Ale_ShowA_new (Ale_AlertType_t AlertType,const char *Txt)
{
if (AlertType != Ale_NONE)
Ale_ShowAlertAndButton (AlertType,Txt,
ActUnk,NULL,NULL,NULL,Btn_NO_BUTTON,NULL);
}
void Ale_ShowA_old (Ale_AlertType_t AlertType,const char *Txt)
{ {
if (AlertType != Ale_NONE) if (AlertType != Ale_NONE)
Ale_ShowAlertAndButton (AlertType,Txt, Ale_ShowAlertAndButton (AlertType,Txt,

View File

@ -61,7 +61,10 @@ typedef enum
void Ale_ResetAlert (void); void Ale_ResetAlert (void);
void Ale_ShowPendingAlert (void); void Ale_ShowPendingAlert (void);
void Ale_ShowAlert (Ale_AlertType_t AlertType,const char *Txt); void Ale_ShowA_fmt (Ale_AlertType_t AlertType,
const char *fmt,...);
void Ale_ShowA_new (Ale_AlertType_t AlertType,const char *Txt);
void Ale_ShowA_old (Ale_AlertType_t AlertType,const char *Txt);
void Ale_ShowAlertAndButton (Ale_AlertType_t AlertType,const char *Txt, void Ale_ShowAlertAndButton (Ale_AlertType_t AlertType,const char *Txt,
Act_Action_t NextAction,const char *Anchor,const char *OnSubmit, Act_Action_t NextAction,const char *Anchor,const char *OnSubmit,
void (*FuncParams) (), void (*FuncParams) (),

View File

@ -131,7 +131,7 @@ void Ann_ShowAllAnnouncements (void)
NULL, NULL,
Hlp_MESSAGES_Announcements,Box_NOT_CLOSABLE); Hlp_MESSAGES_Announcements,Box_NOT_CLOSABLE);
if (!NumAnnouncements) if (!NumAnnouncements)
Ale_ShowAlert (Ale_INFO,Txt_No_announcements); Ale_ShowA_fmt (Ale_INFO,Txt_No_announcements);
/***** Show the announcements *****/ /***** Show the announcements *****/
for (NumAnn = 0; for (NumAnn = 0;
@ -495,7 +495,7 @@ void Ann_ReceiveAnnouncement (void)
Ann_CreateAnnouncement (Roles,Subject,Content); Ann_CreateAnnouncement (Roles,Subject,Content);
/***** Write message of success *****/ /***** Write message of success *****/
Ale_ShowAlert (Ale_SUCCESS,Txt_Announcement_created); Ale_ShowA_fmt (Ale_SUCCESS,Txt_Announcement_created);
/***** Refresh list of announcements *****/ /***** Refresh list of announcements *****/
Ann_ShowAllAnnouncements (); Ann_ShowAllAnnouncements ();
@ -575,7 +575,7 @@ void Ann_RemoveAnnouncement (void)
AnnCod); AnnCod);
/***** Write message of success *****/ /***** Write message of success *****/
Ale_ShowAlert (Ale_SUCCESS,Txt_Announcement_removed); Ale_ShowA_fmt (Ale_SUCCESS,Txt_Announcement_removed);
/***** Refresh list of announcements *****/ /***** Refresh list of announcements *****/
Ann_ShowAllAnnouncements (); Ann_ShowAllAnnouncements ();

View File

@ -167,7 +167,7 @@ static void Asg_ShowAllAssignments (void)
Tbl_EndTable (); Tbl_EndTable ();
} }
else // No assignments created else // No assignments created
Ale_ShowAlert (Ale_INFO,Txt_No_assignments); Ale_ShowA_fmt (Ale_INFO,Txt_No_assignments);
/***** Button to create a new assignment *****/ /***** Button to create a new assignment *****/
if (Asg_CheckIfICanCreateAssignments ()) if (Asg_CheckIfICanCreateAssignments ())
@ -965,7 +965,6 @@ void Asg_RemoveAssignment (void)
{ {
extern const char *Txt_Assignment_X_removed; extern const char *Txt_Assignment_X_removed;
struct Assignment Asg; struct Assignment Asg;
char *Txt;
/***** Get assignment code *****/ /***** Get assignment code *****/
if ((Asg.AsgCod = Asg_GetParamAsgCod ()) == -1L) if ((Asg.AsgCod = Asg_GetParamAsgCod ()) == -1L)
@ -990,11 +989,8 @@ void Asg_RemoveAssignment (void)
Ntf_MarkNotifAsRemoved (Ntf_EVENT_ASSIGNMENT,Asg.AsgCod); Ntf_MarkNotifAsRemoved (Ntf_EVENT_ASSIGNMENT,Asg.AsgCod);
/***** Write message to show the change made *****/ /***** Write message to show the change made *****/
if (asprintf (&Txt,Txt_Assignment_X_removed, Ale_ShowA_fmt (Ale_SUCCESS,Txt_Assignment_X_removed,
Asg.Title) < 0) Asg.Title);
Lay_NotEnoughMemoryExit ();
Ale_ShowAlert (Ale_SUCCESS,Txt);
free ((void *) Txt);
/***** Show assignments again *****/ /***** Show assignments again *****/
Asg_SeeAssignments (); Asg_SeeAssignments ();
@ -1008,7 +1004,6 @@ void Asg_HideAssignment (void)
{ {
extern const char *Txt_Assignment_X_is_now_hidden; extern const char *Txt_Assignment_X_is_now_hidden;
struct Assignment Asg; struct Assignment Asg;
char *Txt;
/***** Get assignment code *****/ /***** Get assignment code *****/
if ((Asg.AsgCod = Asg_GetParamAsgCod ()) == -1L) if ((Asg.AsgCod = Asg_GetParamAsgCod ()) == -1L)
@ -1024,11 +1019,8 @@ void Asg_HideAssignment (void)
Asg.AsgCod,Gbl.CurrentCrs.Crs.CrsCod); Asg.AsgCod,Gbl.CurrentCrs.Crs.CrsCod);
/***** Write message to show the change made *****/ /***** Write message to show the change made *****/
if (asprintf (&Txt,Txt_Assignment_X_is_now_hidden, Ale_ShowA_fmt (Ale_SUCCESS,Txt_Assignment_X_is_now_hidden,
Asg.Title) < 0) Asg.Title);
Lay_NotEnoughMemoryExit ();
Ale_ShowAlert (Ale_SUCCESS,Txt);
free ((void *) Txt);
/***** Show assignments again *****/ /***** Show assignments again *****/
Asg_SeeAssignments (); Asg_SeeAssignments ();
@ -1042,7 +1034,6 @@ void Asg_ShowAssignment (void)
{ {
extern const char *Txt_Assignment_X_is_now_visible; extern const char *Txt_Assignment_X_is_now_visible;
struct Assignment Asg; struct Assignment Asg;
char *Txt;
/***** Get assignment code *****/ /***** Get assignment code *****/
if ((Asg.AsgCod = Asg_GetParamAsgCod ()) == -1L) if ((Asg.AsgCod = Asg_GetParamAsgCod ()) == -1L)
@ -1058,11 +1049,8 @@ void Asg_ShowAssignment (void)
Asg.AsgCod,Gbl.CurrentCrs.Crs.CrsCod); Asg.AsgCod,Gbl.CurrentCrs.Crs.CrsCod);
/***** Write message to show the change made *****/ /***** Write message to show the change made *****/
if (asprintf (&Txt,Txt_Assignment_X_is_now_visible, Ale_ShowA_fmt (Ale_SUCCESS,Txt_Assignment_X_is_now_visible,
Asg.Title) < 0) Asg.Title);
Lay_NotEnoughMemoryExit ();
Ale_ShowAlert (Ale_SUCCESS,Txt);
free ((void *) Txt);
/***** Show assignments again *****/ /***** Show assignments again *****/
Asg_SeeAssignments (); Asg_SeeAssignments ();
@ -1302,7 +1290,6 @@ void Asg_RecFormAssignment (void)
bool NewAssignmentIsCorrect = true; bool NewAssignmentIsCorrect = true;
unsigned NumUsrsToBeNotifiedByEMail; unsigned NumUsrsToBeNotifiedByEMail;
char Description[Cns_MAX_BYTES_TEXT + 1]; char Description[Cns_MAX_BYTES_TEXT + 1];
char *Txt;
/***** Get the code of the assignment *****/ /***** Get the code of the assignment *****/
NewAsg.AsgCod = Asg_GetParamAsgCod (); NewAsg.AsgCod = Asg_GetParamAsgCod ();
@ -1350,11 +1337,8 @@ void Asg_RecFormAssignment (void)
{ {
NewAssignmentIsCorrect = false; NewAssignmentIsCorrect = false;
if (asprintf (&Txt,Txt_Already_existed_an_assignment_with_the_title_X, Ale_ShowA_fmt (Ale_WARNING,Txt_Already_existed_an_assignment_with_the_title_X,
NewAsg.Title) < 0) NewAsg.Title);
Lay_NotEnoughMemoryExit ();
Ale_ShowAlert (Ale_WARNING,Txt);
free ((void *) Txt);
} }
else // Title is correct else // Title is correct
{ {
@ -1365,16 +1349,15 @@ void Asg_RecFormAssignment (void)
if (Asg_CheckIfSimilarAssignmentExists ("Folder",NewAsg.Folder,NewAsg.AsgCod)) // If folder of assignment was in database... if (Asg_CheckIfSimilarAssignmentExists ("Folder",NewAsg.Folder,NewAsg.AsgCod)) // If folder of assignment was in database...
{ {
NewAssignmentIsCorrect = false; NewAssignmentIsCorrect = false;
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
Txt_Already_existed_an_assignment_with_the_folder_X, Ale_ShowA_fmt (Ale_WARNING,Txt_Already_existed_an_assignment_with_the_folder_X,
NewAsg.Folder); NewAsg.Folder);
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
} }
} }
else // Folder name not valid else // Folder name not valid
{ {
NewAssignmentIsCorrect = false; NewAssignmentIsCorrect = false;
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt); Ale_ShowA_new (Ale_WARNING,Gbl.AlertToShowLater.Txt);
} }
} }
else // NewAsg.SendWork == Asg_DO_NOT_SEND_WORK else // NewAsg.SendWork == Asg_DO_NOT_SEND_WORK
@ -1384,7 +1367,7 @@ void Asg_RecFormAssignment (void)
if (Brw_CheckIfExistsFolderAssigmentForAnyUsr (OldAsg.Folder)) if (Brw_CheckIfExistsFolderAssigmentForAnyUsr (OldAsg.Folder))
{ {
NewAssignmentIsCorrect = false; NewAssignmentIsCorrect = false;
Ale_ShowAlert (Ale_WARNING,Txt_You_can_not_disable_file_uploading_once_folders_have_been_created); Ale_ShowA_fmt (Ale_WARNING,Txt_You_can_not_disable_file_uploading_once_folders_have_been_created);
} }
} }
} }
@ -1393,7 +1376,7 @@ void Asg_RecFormAssignment (void)
else // If there is not an assignment title else // If there is not an assignment title
{ {
NewAssignmentIsCorrect = false; NewAssignmentIsCorrect = false;
Ale_ShowAlert (Ale_WARNING,Txt_You_must_specify_the_title_of_the_assignment); Ale_ShowA_fmt (Ale_WARNING,Txt_You_must_specify_the_title_of_the_assignment);
} }
/***** Create a new assignment or update an existing one *****/ /***** Create a new assignment or update an existing one *****/
@ -1407,10 +1390,8 @@ void Asg_RecFormAssignment (void)
Asg_CreateAssignment (&NewAsg,Description); // Add new assignment to database Asg_CreateAssignment (&NewAsg,Description); // Add new assignment to database
/***** Write success message *****/ /***** Write success message *****/
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), Ale_ShowA_fmt (Ale_SUCCESS,Txt_Created_new_assignment_X,
Txt_Created_new_assignment_X, NewAsg.Title);
NewAsg.Title);
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
} }
else else
{ {
@ -1422,7 +1403,7 @@ void Asg_RecFormAssignment (void)
Asg_UpdateAssignment (&NewAsg,Description); Asg_UpdateAssignment (&NewAsg,Description);
/***** Write success message *****/ /***** Write success message *****/
Ale_ShowAlert (Ale_SUCCESS,Txt_The_assignment_has_been_modified); Ale_ShowA_fmt (Ale_SUCCESS,Txt_The_assignment_has_been_modified);
} }
} }

View File

@ -276,7 +276,7 @@ static void Att_ShowAllAttEvents (void)
Tbl_EndTable (); Tbl_EndTable ();
} }
else // No events created else // No events created
Ale_ShowAlert (Ale_INFO,Txt_No_events); Ale_ShowA_fmt (Ale_INFO,Txt_No_events);
/***** Button to create a new attendance event *****/ /***** Button to create a new attendance event *****/
if (ICanEdit) if (ICanEdit)
@ -896,11 +896,10 @@ void Att_AskRemAttEvent (void)
Grp_PutParamWhichGrps (); Grp_PutParamWhichGrps ();
Pag_PutHiddenParamPagNum (Pag_ATT_EVENTS,Gbl.AttEvents.CurrentPage); Pag_PutHiddenParamPagNum (Pag_ATT_EVENTS,Gbl.AttEvents.CurrentPage);
/***** Ask for confirmation of removing *****/ /* Ask for confirmation of removing */
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), Ale_ShowA_fmt (Ale_WARNING,Txt_Do_you_really_want_to_remove_the_event_X,
Txt_Do_you_really_want_to_remove_the_event_X, Att.Title);
Att.Title);
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
Btn_PutRemoveButton (Txt_Remove_event); Btn_PutRemoveButton (Txt_Remove_event);
Frm_EndForm (); Frm_EndForm ();
@ -929,10 +928,8 @@ void Att_GetAndRemAttEvent (void)
Att_RemoveAttEventFromDB (Att.AttCod); Att_RemoveAttEventFromDB (Att.AttCod);
/***** Write message to show the change made *****/ /***** Write message to show the change made *****/
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), Ale_ShowA_fmt (Ale_SUCCESS,Txt_Event_X_removed,
Txt_Event_X_removed, Att.Title);
Att.Title);
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
/***** Show attendance events again *****/ /***** Show attendance events again *****/
Att_SeeAttEvents (); Att_SeeAttEvents ();
@ -977,10 +974,8 @@ void Att_HideAttEvent (void)
Att.AttCod,Gbl.CurrentCrs.Crs.CrsCod); Att.AttCod,Gbl.CurrentCrs.Crs.CrsCod);
/***** Write message to show the change made *****/ /***** Write message to show the change made *****/
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), Ale_ShowA_fmt (Ale_SUCCESS,Txt_Event_X_is_now_hidden,
Txt_Event_X_is_now_hidden, Att.Title);
Att.Title);
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
/***** Show attendance events again *****/ /***** Show attendance events again *****/
Att_SeeAttEvents (); Att_SeeAttEvents ();
@ -1009,10 +1004,8 @@ void Att_ShowAttEvent (void)
Att.AttCod,Gbl.CurrentCrs.Crs.CrsCod); Att.AttCod,Gbl.CurrentCrs.Crs.CrsCod);
/***** Write message to show the change made *****/ /***** Write message to show the change made *****/
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), Ale_ShowA_fmt (Ale_SUCCESS,Txt_Event_X_is_now_visible,
Txt_Event_X_is_now_visible, Att.Title);
Att.Title);
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
/***** Show attendance events again *****/ /***** Show attendance events again *****/
Att_SeeAttEvents (); Att_SeeAttEvents ();
@ -1296,16 +1289,15 @@ void Att_RecFormAttEvent (void)
if (Att_CheckIfSimilarAttEventExists ("Title",ReceivedAtt.Title,ReceivedAtt.AttCod)) if (Att_CheckIfSimilarAttEventExists ("Title",ReceivedAtt.Title,ReceivedAtt.AttCod))
{ {
ReceivedAttEventIsCorrect = false; ReceivedAttEventIsCorrect = false;
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
Txt_Already_existed_an_event_with_the_title_X, Ale_ShowA_fmt (Ale_WARNING,Txt_Already_existed_an_event_with_the_title_X,
ReceivedAtt.Title); ReceivedAtt.Title);
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
} }
} }
else // If there is not an attendance event title else // If there is not an attendance event title
{ {
ReceivedAttEventIsCorrect = false; ReceivedAttEventIsCorrect = false;
Ale_ShowAlert (Ale_WARNING,Txt_You_must_specify_the_title_of_the_event); Ale_ShowA_fmt (Ale_WARNING,Txt_You_must_specify_the_title_of_the_event);
} }
/***** Create a new attendance event or update an existing one *****/ /***** Create a new attendance event or update an existing one *****/
@ -1320,17 +1312,15 @@ void Att_RecFormAttEvent (void)
Att_CreateAttEvent (&ReceivedAtt,Description); // Add new attendance event to database Att_CreateAttEvent (&ReceivedAtt,Description); // Add new attendance event to database
/***** Write success message *****/ /***** Write success message *****/
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), Ale_ShowA_fmt (Ale_SUCCESS,Txt_Created_new_event_X,
Txt_Created_new_event_X, ReceivedAtt.Title);
ReceivedAtt.Title);
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
} }
else else
{ {
Att_UpdateAttEvent (&ReceivedAtt,Description); Att_UpdateAttEvent (&ReceivedAtt,Description);
/***** Write success message *****/ /***** Write success message *****/
Ale_ShowAlert (Ale_SUCCESS,Txt_The_event_has_been_modified); Ale_ShowA_fmt (Ale_SUCCESS,Txt_The_event_has_been_modified);
} }
/* Free memory for list of selected groups */ /* Free memory for list of selected groups */
@ -2292,7 +2282,7 @@ void Att_RegisterMeAsStdInAttEvent (void)
Att_RemoveUsrFromAttEvent (Att.AttCod,Gbl.Usrs.Me.UsrDat.UsrCod); Att_RemoveUsrFromAttEvent (Att.AttCod,Gbl.Usrs.Me.UsrDat.UsrCod);
/***** Write final message *****/ /***** Write final message *****/
Ale_ShowAlert (Ale_SUCCESS,Txt_Your_comment_has_been_updated); Ale_ShowA_fmt (Ale_SUCCESS,Txt_Your_comment_has_been_updated);
} }
/***** Show the attendance event again *****/ /***** Show the attendance event again *****/
@ -2417,12 +2407,10 @@ void Att_RegisterStudentsInAttEvent (void)
Usr_FreeUsrsList (Rol_STD); Usr_FreeUsrsList (Rol_STD);
/***** Write final message *****/ /***** Write final message *****/
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), Ale_ShowA_fmt (Ale_INFO,"%s: %u<br />"
"%s: %u<br />" "%s: %u",
"%s: %u", Txt_Presents,NumStdsPresent,
Txt_Presents,NumStdsPresent, Txt_Absents ,NumStdsAbsent );
Txt_Absents ,NumStdsAbsent );
Ale_ShowAlert (Ale_INFO,Gbl.Alert.Txt);
} }
else // Gbl.Usrs.LstUsrs[Rol_STD].NumUsrs == 0 else // Gbl.Usrs.LstUsrs[Rol_STD].NumUsrs == 0
/***** Show warning indicating no students found *****/ /***** Show warning indicating no students found *****/
@ -2928,7 +2916,7 @@ static void Usr_ListOrPrintStdsAttendanceCrs (Att_TypeOfView_t TypeOfView)
} }
else // No students selected else // No students selected
{ {
Ale_ShowAlert (Ale_WARNING,Txt_You_must_select_one_ore_more_students); Ale_ShowA_fmt (Ale_WARNING,Txt_You_must_select_one_ore_more_students);
Usr_ReqListStdsAttendanceCrs (); // ...show again the form Usr_ReqListStdsAttendanceCrs (); // ...show again the form
} }

View File

@ -25,9 +25,7 @@
/********************************* Headers ***********************************/ /********************************* Headers ***********************************/
/*****************************************************************************/ /*****************************************************************************/
#define _GNU_SOURCE // For asprintf
#include <linux/stddef.h> // For NULL #include <linux/stddef.h> // For NULL
#include <stdio.h> // For asprintf
#include <stdlib.h> // For calloc #include <stdlib.h> // For calloc
#include <string.h> // For string functions #include <string.h> // For string functions
@ -113,7 +111,7 @@ void Ban_SeeBanners (void)
if (Gbl.Banners.Num) // There are banners if (Gbl.Banners.Num) // There are banners
Ban_WriteListOfBanners (); Ban_WriteListOfBanners ();
else // No banners created else // No banners created
Ale_ShowAlert (Ale_INFO,Txt_No_banners); Ale_ShowA_fmt (Ale_INFO,Txt_No_banners);
/***** Button to create banner *****/ /***** Button to create banner *****/
if (Gbl.Usrs.Me.Role.Logged == Rol_SYS_ADM) if (Gbl.Usrs.Me.Role.Logged == Rol_SYS_ADM)
@ -523,10 +521,8 @@ void Ban_RemoveBanner (void)
Ban.BanCod); Ban.BanCod);
/***** Write message to show the change made *****/ /***** Write message to show the change made *****/
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), Ale_ShowA_fmt (Ale_SUCCESS,Txt_Banner_X_removed,
Txt_Banner_X_removed, Ban.ShrtName);
Ban.ShrtName);
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
/***** Show the form again *****/ /***** Show the form again *****/
Ban_EditBanners (); Ban_EditBanners ();
@ -579,11 +575,9 @@ static void Ban_ShowOrHideBanner (bool Hide)
Ban.BanCod); Ban.BanCod);
/***** Write message to show the change made *****/ /***** Write message to show the change made *****/
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), Ale_ShowA_fmt (Ale_SUCCESS,Hide ? Txt_The_banner_X_is_now_hidden :
Hide ? Txt_The_banner_X_is_now_hidden : Txt_The_banner_X_is_now_visible,
Txt_The_banner_X_is_now_visible, Ban.ShrtName);
Ban.ShrtName);
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
/***** Show the form again *****/ /***** Show the form again *****/
Ban_EditBanners (); Ban_EditBanners ();
@ -654,12 +648,8 @@ static void Ban_RenameBanner (Cns_ShrtOrFullName_t ShrtOrFullName)
/***** Check if new name is empty *****/ /***** Check if new name is empty *****/
if (!NewBanName[0]) if (!NewBanName[0])
{ Ale_ShowA_fmt (Ale_WARNING,Txt_You_can_not_leave_the_name_of_the_banner_X_empty,
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), CurrentBanName);
Txt_You_can_not_leave_the_name_of_the_banner_X_empty,
CurrentBanName);
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
}
else else
{ {
/***** Check if old and new names are the same /***** Check if old and new names are the same
@ -668,31 +658,21 @@ static void Ban_RenameBanner (Cns_ShrtOrFullName_t ShrtOrFullName)
{ {
/***** If banner was in database... *****/ /***** If banner was in database... *****/
if (Ban_CheckIfBannerNameExists (ParamName,NewBanName,Ban->BanCod)) if (Ban_CheckIfBannerNameExists (ParamName,NewBanName,Ban->BanCod))
{ Ale_ShowA_fmt (Ale_WARNING,Txt_The_banner_X_already_exists,
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), NewBanName);
Txt_The_banner_X_already_exists,
NewBanName);
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
}
else else
{ {
/* Update the table changing old name by new name */ /* Update the table changing old name by new name */
Ban_UpdateBanNameDB (Ban->BanCod,FieldName,NewBanName); Ban_UpdateBanNameDB (Ban->BanCod,FieldName,NewBanName);
/* Write message to show the change made */ /* Write message to show the change made */
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), Ale_ShowA_fmt (Ale_SUCCESS,Txt_The_banner_X_has_been_renamed_as_Y,
Txt_The_banner_X_has_been_renamed_as_Y, CurrentBanName,NewBanName);
CurrentBanName,NewBanName);
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
} }
} }
else // The same name else // The same name
{ Ale_ShowA_fmt (Ale_INFO,Txt_The_name_of_the_banner_X_has_not_changed,
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), CurrentBanName);
Txt_The_name_of_the_banner_X_has_not_changed,
CurrentBanName);
Ale_ShowAlert (Ale_INFO,Gbl.Alert.Txt);
}
} }
/***** Show the form again *****/ /***** Show the form again *****/
@ -759,13 +739,11 @@ void Ban_ChangeBannerImg (void)
NewImg,Ban->BanCod); NewImg,Ban->BanCod);
/***** Write message to show the change made *****/ /***** Write message to show the change made *****/
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), Ale_ShowA_fmt (Ale_SUCCESS,Txt_The_new_image_is_X,
Txt_The_new_image_is_X, NewImg);
NewImg);
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
} }
else else
Ale_ShowAlert (Ale_WARNING,Txt_You_can_not_leave_the_image_empty); Ale_ShowA_fmt (Ale_WARNING,Txt_You_can_not_leave_the_image_empty);
/***** Show the form again *****/ /***** Show the form again *****/
Str_Copy (Ban->Img,NewImg, Str_Copy (Ban->Img,NewImg,
@ -804,13 +782,11 @@ void Ban_ChangeBannerWWW (void)
NewWWW,Ban->BanCod); NewWWW,Ban->BanCod);
/***** Write message to show the change made *****/ /***** Write message to show the change made *****/
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), Ale_ShowA_fmt (Ale_SUCCESS,Txt_The_new_web_address_is_X,
Txt_The_new_web_address_is_X, NewWWW);
NewWWW);
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
} }
else else
Ale_ShowAlert (Ale_WARNING,Txt_You_can_not_leave_the_web_address_empty); Ale_ShowA_fmt (Ale_WARNING,Txt_You_can_not_leave_the_web_address_empty);
/***** Show the form again *****/ /***** Show the form again *****/
Str_Copy (Ban->WWW,NewWWW, Str_Copy (Ban->WWW,NewWWW,
@ -950,28 +926,20 @@ void Ban_RecFormNewBanner (void)
{ {
/***** If name of banner was in database... *****/ /***** If name of banner was in database... *****/
if (Ban_CheckIfBannerNameExists ("ShortName",Ban->ShrtName,-1L)) if (Ban_CheckIfBannerNameExists ("ShortName",Ban->ShrtName,-1L))
{ Ale_ShowA_fmt (Ale_WARNING,Txt_The_banner_X_already_exists,
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), Ban->ShrtName);
Txt_The_banner_X_already_exists,
Ban->ShrtName);
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
}
else if (Ban_CheckIfBannerNameExists ("FullName",Ban->FullName,-1L)) else if (Ban_CheckIfBannerNameExists ("FullName",Ban->FullName,-1L))
{ Ale_ShowA_fmt (Ale_WARNING,Txt_The_banner_X_already_exists,
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), Ban->FullName);
Txt_The_banner_X_already_exists,
Ban->FullName);
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
}
else if (!Ban->Img[0]) else if (!Ban->Img[0])
Ale_ShowAlert (Ale_WARNING,Txt_You_must_specify_the_image_of_the_new_banner); Ale_ShowA_fmt (Ale_WARNING,Txt_You_must_specify_the_image_of_the_new_banner);
else if (!Ban->WWW[0]) else if (!Ban->WWW[0])
Ale_ShowAlert (Ale_WARNING,Txt_You_must_specify_the_URL_of_the_new_banner); Ale_ShowA_fmt (Ale_WARNING,Txt_You_must_specify_the_URL_of_the_new_banner);
else // Add new banner to database else // Add new banner to database
Ban_CreateBanner (Ban); Ban_CreateBanner (Ban);
} }
else // If there is not a banner name else // If there is not a banner name
Ale_ShowAlert (Ale_WARNING,Txt_You_must_specify_the_short_name_and_the_full_name_of_the_new_banner); Ale_ShowA_fmt (Ale_WARNING,Txt_You_must_specify_the_short_name_and_the_full_name_of_the_new_banner);
/***** Show the form again *****/ /***** Show the form again *****/
Ban_EditBanners (); Ban_EditBanners ();
@ -994,10 +962,8 @@ static void Ban_CreateBanner (struct Banner *Ban)
Ban->ShrtName,Ban->FullName,Ban->Img,Ban->WWW); Ban->ShrtName,Ban->FullName,Ban->Img,Ban->WWW);
/***** Write success message *****/ /***** Write success message *****/
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), Ale_ShowA_fmt (Ale_SUCCESS,Txt_Created_new_banner_X,
Txt_Created_new_banner_X, Ban->ShrtName);
Ban->ShrtName);
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
} }
/*****************************************************************************/ /*****************************************************************************/

View File

@ -225,7 +225,7 @@ void Ctr_SeeCtrWithPendingDegs (void)
Box_EndBoxTable (); Box_EndBoxTable ();
} }
else else
Ale_ShowAlert (Ale_INFO,Txt_There_are_no_centres_with_requests_for_degrees_to_be_confirmed); Ale_ShowA_old (Ale_INFO,Txt_There_are_no_centres_with_requests_for_degrees_to_be_confirmed);
/***** Free structure that stores the query result *****/ /***** Free structure that stores the query result *****/
DB_FreeMySQLResult (&mysql_res); DB_FreeMySQLResult (&mysql_res);
@ -816,7 +816,7 @@ static void Ctr_ListCentres (void)
Tbl_EndTable (); Tbl_EndTable ();
} }
else // No centres created in the current institution else // No centres created in the current institution
Ale_ShowAlert (Ale_INFO,Txt_No_centres); Ale_ShowA_old (Ale_INFO,Txt_No_centres);
/***** Button to create centre *****/ /***** Button to create centre *****/
if (Ctr_CheckIfICanCreateCentres ()) if (Ctr_CheckIfICanCreateCentres ())
@ -1766,7 +1766,7 @@ void Ctr_RemoveCentre (void)
if (Ctr.Degs.Num || if (Ctr.Degs.Num ||
Ctr.NumUsrsWhoClaimToBelongToCtr || Ctr.NumUsrsWhoClaimToBelongToCtr ||
Ctr.NumUsrs) // Centre has degrees or users ==> don't remove Ctr.NumUsrs) // Centre has degrees or users ==> don't remove
Ale_ShowAlert (Ale_WARNING,Txt_To_remove_a_centre_you_must_first_remove_all_degrees_and_teachers_in_the_centre); Ale_ShowA_old (Ale_WARNING,Txt_To_remove_a_centre_you_must_first_remove_all_degrees_and_teachers_in_the_centre);
else // Centre has no teachers ==> remove it else // Centre has no teachers ==> remove it
{ {
/***** Remove all the threads and posts in forums of the centre *****/ /***** Remove all the threads and posts in forums of the centre *****/
@ -1798,7 +1798,7 @@ void Ctr_RemoveCentre (void)
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
Txt_Centre_X_removed, Txt_Centre_X_removed,
Ctr.FullName); Ctr.FullName);
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt); Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
} }
/***** Show the form again *****/ /***** Show the form again *****/
@ -1935,7 +1935,7 @@ void Ctr_ChangeCtrPlcInConfig (void)
Gbl.CurrentCtr.Ctr.PlcCod = NewPlcCod; Gbl.CurrentCtr.Ctr.PlcCod = NewPlcCod;
/***** Write message to show the change made *****/ /***** Write message to show the change made *****/
Ale_ShowAlert (Ale_SUCCESS,Txt_The_place_of_the_centre_has_changed); Ale_ShowA_old (Ale_SUCCESS,Txt_The_place_of_the_centre_has_changed);
/***** Show the form again *****/ /***** Show the form again *****/
Ctr_ShowConfiguration (); Ctr_ShowConfiguration ();
@ -2130,7 +2130,7 @@ void Ctr_ChangeCtrWWW (void)
Ctr_ShowAlertAndButtonToGoToCtr (); Ctr_ShowAlertAndButtonToGoToCtr ();
} }
else else
Ale_ShowAlert (Ale_WARNING,Txt_You_can_not_leave_the_web_address_empty); Ale_ShowA_old (Ale_WARNING,Txt_You_can_not_leave_the_web_address_empty);
/***** Show the form again *****/ /***** Show the form again *****/
Ctr_EditCentres (); Ctr_EditCentres ();
@ -2158,10 +2158,10 @@ void Ctr_ChangeCtrWWWInConfig (void)
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
Txt_The_new_web_address_is_X, Txt_The_new_web_address_is_X,
NewWWW); NewWWW);
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt); Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
} }
else else
Ale_ShowAlert (Ale_WARNING,Txt_You_can_not_leave_the_web_address_empty); Ale_ShowA_old (Ale_WARNING,Txt_You_can_not_leave_the_web_address_empty);
/***** Show the form again *****/ /***** Show the form again *****/
Ctr_ShowConfiguration (); Ctr_ShowConfiguration ();
@ -2263,7 +2263,7 @@ static void Ctr_ShowAlertAndButtonToGoToCtr (void)
} }
else else
/***** Alert *****/ /***** Alert *****/
Ale_ShowAlert (Gbl.Alert.Type,Gbl.Alert.Txt); Ale_ShowA_old (Gbl.Alert.Type,Gbl.Alert.Txt);
} }
static void Ctr_PutParamGoToCtr (void) static void Ctr_PutParamGoToCtr (void)
@ -2328,7 +2328,7 @@ void Ctr_RequestPhoto (void)
Ctr_PHOTO_SAVED_MAX_WIDTH, Ctr_PHOTO_SAVED_MAX_WIDTH,
Ctr_PHOTO_SAVED_MAX_HEIGHT, Ctr_PHOTO_SAVED_MAX_HEIGHT,
Txt_XxY_pixels_or_higher); Txt_XxY_pixels_or_higher);
Ale_ShowAlert (Ale_INFO,Gbl.Alert.Txt); Ale_ShowA_old (Ale_INFO,Gbl.Alert.Txt);
/***** Upload photo *****/ /***** Upload photo *****/
fprintf (Gbl.F.Out,"<label class=\"%s\">" fprintf (Gbl.F.Out,"<label class=\"%s\">"
@ -2380,7 +2380,7 @@ void Ctr_ReceivePhoto (void)
WrongType = true; WrongType = true;
if (WrongType) if (WrongType)
{ {
Ale_ShowAlert (Ale_WARNING,Txt_Wrong_file_type); Ale_ShowA_old (Ale_WARNING,Txt_Wrong_file_type);
return; return;
} }
@ -2400,14 +2400,14 @@ void Ctr_ReceivePhoto (void)
/* Get filename extension */ /* Get filename extension */
if ((PtrExtension = strrchr (FileNameImgSrc,(int) '.')) == NULL) if ((PtrExtension = strrchr (FileNameImgSrc,(int) '.')) == NULL)
{ {
Ale_ShowAlert (Ale_WARNING,Txt_Wrong_file_type); Ale_ShowA_old (Ale_WARNING,Txt_Wrong_file_type);
return; return;
} }
LengthExtension = strlen (PtrExtension); LengthExtension = strlen (PtrExtension);
if (LengthExtension < Fil_MIN_BYTES_FILE_EXTENSION || if (LengthExtension < Fil_MIN_BYTES_FILE_EXTENSION ||
LengthExtension > Fil_MAX_BYTES_FILE_EXTENSION) LengthExtension > Fil_MAX_BYTES_FILE_EXTENSION)
{ {
Ale_ShowAlert (Ale_WARNING,Txt_Wrong_file_type); Ale_ShowA_old (Ale_WARNING,Txt_Wrong_file_type);
return; return;
} }
@ -2418,7 +2418,7 @@ void Ctr_ReceivePhoto (void)
Gbl.UniqueNameEncrypted,PtrExtension); Gbl.UniqueNameEncrypted,PtrExtension);
if (!Fil_EndReceptionOfFile (FileNameImgTmp,Param)) if (!Fil_EndReceptionOfFile (FileNameImgTmp,Param))
{ {
Ale_ShowAlert (Ale_WARNING,"Error copying file."); Ale_ShowA_old (Ale_WARNING,"Error copying file.");
return; return;
} }
@ -2773,7 +2773,7 @@ static void Ctr_RecFormRequestOrCreateCtr (unsigned Status)
/* Get place */ /* Get place */
if ((Gbl.Ctrs.EditingCtr.PlcCod = Plc_GetParamPlcCod ()) < 0) // 0 is reserved for "other place" if ((Gbl.Ctrs.EditingCtr.PlcCod = Plc_GetParamPlcCod ()) < 0) // 0 is reserved for "other place"
Ale_ShowAlert (Ale_ERROR,"Wrong place."); Ale_ShowA_old (Ale_ERROR,"Wrong place.");
/* Get centre short name */ /* Get centre short name */
Par_GetParToText ("ShortName",Gbl.Ctrs.EditingCtr.ShrtName,Hie_MAX_BYTES_SHRT_NAME); Par_GetParToText ("ShortName",Gbl.Ctrs.EditingCtr.ShrtName,Hie_MAX_BYTES_SHRT_NAME);
@ -2795,23 +2795,23 @@ static void Ctr_RecFormRequestOrCreateCtr (unsigned Status)
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
Txt_The_centre_X_already_exists, Txt_The_centre_X_already_exists,
Gbl.Ctrs.EditingCtr.ShrtName); Gbl.Ctrs.EditingCtr.ShrtName);
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt); Ale_ShowA_old (Ale_WARNING,Gbl.Alert.Txt);
} }
else if (Ctr_CheckIfCtrNameExistsInIns ("FullName",Gbl.Ctrs.EditingCtr.FullName,-1L,Gbl.CurrentIns.Ins.InsCod)) else if (Ctr_CheckIfCtrNameExistsInIns ("FullName",Gbl.Ctrs.EditingCtr.FullName,-1L,Gbl.CurrentIns.Ins.InsCod))
{ {
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
Txt_The_centre_X_already_exists, Txt_The_centre_X_already_exists,
Gbl.Ctrs.EditingCtr.FullName); Gbl.Ctrs.EditingCtr.FullName);
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt); Ale_ShowA_old (Ale_WARNING,Gbl.Alert.Txt);
} }
else // Add new centre to database else // Add new centre to database
Ctr_CreateCentre (Status); Ctr_CreateCentre (Status);
} }
else // If there is not a web else // If there is not a web
Ale_ShowAlert (Ale_WARNING,Txt_You_must_specify_the_web_address_of_the_new_centre); Ale_ShowA_old (Ale_WARNING,Txt_You_must_specify_the_web_address_of_the_new_centre);
} }
else // If there is not a centre name else // If there is not a centre name
Ale_ShowAlert (Ale_WARNING,Txt_You_must_specify_the_short_name_and_the_full_name_of_the_new_centre); Ale_ShowA_old (Ale_WARNING,Txt_You_must_specify_the_short_name_and_the_full_name_of_the_new_centre);
/***** Show the form again *****/ /***** Show the form again *****/
Ctr_EditCentres (); Ctr_EditCentres ();

View File

@ -380,6 +380,9 @@ SHOW TABLE STATUS WHERE Name = 'debug';
ALTER TABLE debug ENGINE=MyISAM; ALTER TABLE debug ENGINE=MyISAM;
OPTIMIZE TABLE debug; OPTIMIZE TABLE debug;
*/ */
// TODO: Revisar todos los Ale_ShowAlertAndButton
/*****************************************************************************/ /*****************************************************************************/
/****************************** Public constants *****************************/ /****************************** Public constants *****************************/
/*****************************************************************************/ /*****************************************************************************/
@ -399,10 +402,11 @@ En OpenSWAD:
ps2pdf source.ps destination.pdf ps2pdf source.ps destination.pdf
*/ */
#define Log_PLATFORM_VERSION "SWAD 18.46 (2019-02-15)" #define Log_PLATFORM_VERSION "SWAD 18.46.1 (2019-02-15)"
#define CSS_FILE "swad18.41.1.css" #define CSS_FILE "swad18.41.1.css"
#define JS_FILE "swad18.32.1.js" #define JS_FILE "swad18.32.1.js"
/* /*
Version 18.46.1: Feb 15, 2019 Refactoring code related to alerts. (238355 lines)
Version 18.46: Feb 15, 2019 Removed unused code related to tabs. Version 18.46: Feb 15, 2019 Removed unused code related to tabs.
Fixed bug in actions related to login. Fixed bug in actions related to login.
Refactoring code related to alerts. (238468 lines) Refactoring code related to alerts. (238468 lines)

View File

@ -86,12 +86,12 @@ void Cht_ShowChatRooms (void)
Txt_To_use_chat_you_must_have_installed_the_software_X_and_add_Y_, Txt_To_use_chat_you_must_have_installed_the_software_X_and_add_Y_,
Cfg_JAVA_URL,Cfg_JAVA_NAME, Cfg_JAVA_URL,Cfg_JAVA_NAME,
Cfg_PLATFORM_SERVER); Cfg_PLATFORM_SERVER);
Ale_ShowAlert (Ale_INFO,Gbl.Alert.Txt); Ale_ShowA_old (Ale_INFO,Gbl.Alert.Txt);
/***** List available chat rooms *****/ /***** List available chat rooms *****/
Cht_ShowListOfAvailableChatRooms (); Cht_ShowListOfAvailableChatRooms ();
Ale_ShowAlert (Ale_WARNING,Txt_Unfortunately_Firefox_and_Chrome_no_longer_allow_Java_to_run_); Ale_ShowA_old (Ale_WARNING,Txt_Unfortunately_Firefox_and_Chrome_no_longer_allow_Java_to_run_);
if (Gbl.Usrs.Me.Role.Logged == Rol_SYS_ADM) if (Gbl.Usrs.Me.Role.Logged == Rol_SYS_ADM)
Cht_ShowListOfChatRoomsWithUsrs (); Cht_ShowListOfChatRoomsWithUsrs ();

View File

@ -586,7 +586,7 @@ void Cla_RemoveClassroom (void)
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
Txt_Classroom_X_removed, Txt_Classroom_X_removed,
Cla->FullName); Cla->FullName);
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt); Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
/***** Show the form again *****/ /***** Show the form again *****/
Cla_EditClassrooms (); Cla_EditClassrooms ();
@ -674,7 +674,7 @@ static void Cla_RenameClassroom (Cns_ShrtOrFullName_t ShrtOrFullName)
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
Txt_You_can_not_leave_the_name_of_the_classroom_X_empty, Txt_You_can_not_leave_the_name_of_the_classroom_X_empty,
CurrentClaName); CurrentClaName);
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt); Ale_ShowA_old (Ale_WARNING,Gbl.Alert.Txt);
} }
else else
{ {
@ -688,7 +688,7 @@ static void Cla_RenameClassroom (Cns_ShrtOrFullName_t ShrtOrFullName)
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
Txt_The_classroom_X_already_exists, Txt_The_classroom_X_already_exists,
NewClaName); NewClaName);
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt); Ale_ShowA_old (Ale_WARNING,Gbl.Alert.Txt);
} }
else else
{ {
@ -699,7 +699,7 @@ static void Cla_RenameClassroom (Cns_ShrtOrFullName_t ShrtOrFullName)
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
Txt_The_classroom_X_has_been_renamed_as_Y, Txt_The_classroom_X_has_been_renamed_as_Y,
CurrentClaName,NewClaName); CurrentClaName,NewClaName);
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt); Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
} }
} }
else // The same name else // The same name
@ -707,7 +707,7 @@ static void Cla_RenameClassroom (Cns_ShrtOrFullName_t ShrtOrFullName)
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
Txt_The_name_of_the_classroom_X_has_not_changed, Txt_The_name_of_the_classroom_X_has_not_changed,
CurrentClaName); CurrentClaName);
Ale_ShowAlert (Ale_INFO,Gbl.Alert.Txt); Ale_ShowA_old (Ale_INFO,Gbl.Alert.Txt);
} }
} }
@ -804,7 +804,7 @@ void Cla_ChangeCapacity (void)
Txt_The_capacity_of_classroom_X_is_now_Y, Txt_The_capacity_of_classroom_X_is_now_Y,
Cla->FullName,NewCapacity); Cla->FullName,NewCapacity);
} }
Ale_ShowAlert (Gbl.Alert.Type,Gbl.Alert.Txt); Ale_ShowA_old (Gbl.Alert.Type,Gbl.Alert.Txt);
/***** Show the form again *****/ /***** Show the form again *****/
Cla_EditClassrooms (); Cla_EditClassrooms ();
@ -868,7 +868,7 @@ void Cla_ChangeClassroomLocation (void)
} }
/***** Write message to show the change made *****/ /***** Write message to show the change made *****/
Ale_ShowAlert (Gbl.Alert.Type,Gbl.Alert.Txt); Ale_ShowA_old (Gbl.Alert.Type,Gbl.Alert.Txt);
/***** Show the form again *****/ /***** Show the form again *****/
Cla_EditClassrooms (); Cla_EditClassrooms ();
@ -1020,20 +1020,20 @@ void Cla_RecFormNewClassroom (void)
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
Txt_The_classroom_X_already_exists, Txt_The_classroom_X_already_exists,
Cla->ShrtName); Cla->ShrtName);
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt); Ale_ShowA_old (Ale_WARNING,Gbl.Alert.Txt);
} }
else if (Cla_CheckIfClassroomNameExists ("FullName",Cla->FullName,-1L)) else if (Cla_CheckIfClassroomNameExists ("FullName",Cla->FullName,-1L))
{ {
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
Txt_The_classroom_X_already_exists, Txt_The_classroom_X_already_exists,
Cla->FullName); Cla->FullName);
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt); Ale_ShowA_old (Ale_WARNING,Gbl.Alert.Txt);
} }
else // Add new classroom to database else // Add new classroom to database
Cla_CreateClassroom (Cla); Cla_CreateClassroom (Cla);
} }
else // If there is not a classroom name else // If there is not a classroom name
Ale_ShowAlert (Ale_WARNING,Txt_You_must_specify_the_short_name_and_the_full_name_of_the_new_classroom); Ale_ShowA_old (Ale_WARNING,Txt_You_must_specify_the_short_name_and_the_full_name_of_the_new_classroom);
/***** Show the form again *****/ /***** Show the form again *****/
Cla_EditClassrooms (); Cla_EditClassrooms ();
@ -1060,5 +1060,5 @@ static void Cla_CreateClassroom (struct Classroom *Cla)
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
Txt_Created_new_classroom_X, Txt_Created_new_classroom_X,
Cla->FullName); Cla->FullName);
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt); Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
} }

View File

@ -197,7 +197,7 @@ void Cty_SeeCtyWithPendingInss (void)
Box_EndBoxTable (); Box_EndBoxTable ();
} }
else else
Ale_ShowAlert (Ale_INFO,Txt_There_are_no_countries_with_requests_for_institutions_to_be_confirmed); Ale_ShowA_old (Ale_INFO,Txt_There_are_no_countries_with_requests_for_institutions_to_be_confirmed);
/***** Free structure that stores the query result *****/ /***** Free structure that stores the query result *****/
DB_FreeMySQLResult (&mysql_res); DB_FreeMySQLResult (&mysql_res);
@ -1740,7 +1740,7 @@ void Cty_RemoveCountry (void)
if (Cty.NumInss || if (Cty.NumInss ||
Cty.NumUsrsWhoClaimToBelongToCty || Cty.NumUsrsWhoClaimToBelongToCty ||
Cty.NumUsrs) // Country has institutions or users ==> don't remove Cty.NumUsrs) // Country has institutions or users ==> don't remove
Ale_ShowAlert (Ale_WARNING,Txt_You_can_not_remove_a_country_with_institutions_or_users); Ale_ShowA_old (Ale_WARNING,Txt_You_can_not_remove_a_country_with_institutions_or_users);
else // Country has no users ==> remove it else // Country has no users ==> remove it
{ {
/***** Remove surveys of the country *****/ /***** Remove surveys of the country *****/
@ -1758,7 +1758,7 @@ void Cty_RemoveCountry (void)
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
Txt_Country_X_removed, Txt_Country_X_removed,
Cty.Name[Gbl.Prefs.Language]); Cty.Name[Gbl.Prefs.Language]);
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt); Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
} }
/***** Show the form again *****/ /***** Show the form again *****/
@ -1801,7 +1801,7 @@ void Cty_RenameCountry (void)
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
Txt_You_can_not_leave_the_name_of_the_country_X_empty, Txt_You_can_not_leave_the_name_of_the_country_X_empty,
Cty->Name[Language]); Cty->Name[Language]);
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt); Ale_ShowA_old (Ale_WARNING,Gbl.Alert.Txt);
} }
else else
{ {
@ -1815,7 +1815,7 @@ void Cty_RenameCountry (void)
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
Txt_The_country_X_already_exists, Txt_The_country_X_already_exists,
NewCtyName); NewCtyName);
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt); Ale_ShowA_old (Ale_WARNING,Gbl.Alert.Txt);
} }
else else
{ {
@ -1829,7 +1829,7 @@ void Cty_RenameCountry (void)
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
Txt_The_country_X_has_been_renamed_as_Y, Txt_The_country_X_has_been_renamed_as_Y,
Cty->Name[Language],NewCtyName); Cty->Name[Language],NewCtyName);
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt); Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
/* Update country name */ /* Update country name */
Str_Copy (Cty->Name[Language],NewCtyName, Str_Copy (Cty->Name[Language],NewCtyName,
@ -1841,7 +1841,7 @@ void Cty_RenameCountry (void)
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
Txt_The_name_of_the_country_X_has_not_changed, Txt_The_name_of_the_country_X_has_not_changed,
Cty->Name[Language]); Cty->Name[Language]);
Ale_ShowAlert (Ale_INFO,Gbl.Alert.Txt); Ale_ShowA_old (Ale_INFO,Gbl.Alert.Txt);
} }
} }
@ -1946,7 +1946,7 @@ void Cty_ChangeCtyWWW (void)
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
Txt_The_new_web_address_is_X, Txt_The_new_web_address_is_X,
NewWWW); NewWWW);
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt); Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
/***** Show the form again *****/ /***** Show the form again *****/
Cty_EditCountries (); Cty_EditCountries ();
@ -2149,7 +2149,7 @@ void Cty_RecFormNewCountry (void)
/* Get numeric country code */ /* Get numeric country code */
if ((Cty->CtyCod = Cty_GetParamOtherCtyCod ()) < 0) if ((Cty->CtyCod = Cty_GetParamOtherCtyCod ()) < 0)
{ {
Ale_ShowAlert (Ale_WARNING,Txt_You_must_specify_the_numerical_code_of_the_new_country); Ale_ShowA_old (Ale_WARNING,Txt_You_must_specify_the_numerical_code_of_the_new_country);
CreateCountry = false; CreateCountry = false;
} }
else if (Cty_CheckIfNumericCountryCodeExists (Cty->CtyCod)) else if (Cty_CheckIfNumericCountryCodeExists (Cty->CtyCod))
@ -2157,7 +2157,7 @@ void Cty_RecFormNewCountry (void)
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
Txt_The_numerical_code_X_already_exists, Txt_The_numerical_code_X_already_exists,
Cty->CtyCod); Cty->CtyCod);
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt); Ale_ShowA_old (Ale_WARNING,Gbl.Alert.Txt);
CreateCountry = false; CreateCountry = false;
} }
else // Numeric code correct else // Numeric code correct
@ -2174,7 +2174,7 @@ void Cty_RecFormNewCountry (void)
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
Txt_The_alphabetical_code_X_is_not_correct, Txt_The_alphabetical_code_X_is_not_correct,
Cty->Alpha2); Cty->Alpha2);
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt); Ale_ShowA_old (Ale_WARNING,Gbl.Alert.Txt);
CreateCountry = false; CreateCountry = false;
} }
if (CreateCountry) if (CreateCountry)
@ -2184,7 +2184,7 @@ void Cty_RecFormNewCountry (void)
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
Txt_The_alphabetical_code_X_already_exists, Txt_The_alphabetical_code_X_already_exists,
Cty->Alpha2); Cty->Alpha2);
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt); Ale_ShowA_old (Ale_WARNING,Gbl.Alert.Txt);
CreateCountry = false; CreateCountry = false;
} }
else // Alphabetic code correct else // Alphabetic code correct
@ -2207,14 +2207,14 @@ void Cty_RecFormNewCountry (void)
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
Txt_The_country_X_already_exists, Txt_The_country_X_already_exists,
Cty->Name[Lan]); Cty->Name[Lan]);
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt); Ale_ShowA_old (Ale_WARNING,Gbl.Alert.Txt);
CreateCountry = false; CreateCountry = false;
break; break;
} }
} }
else // If there is not a country name else // If there is not a country name
{ {
Ale_ShowAlert (Ale_WARNING,Txt_You_must_specify_the_name_of_the_new_country_in_all_languages); Ale_ShowA_old (Ale_WARNING,Txt_You_must_specify_the_name_of_the_new_country_in_all_languages);
CreateCountry = false; CreateCountry = false;
break; break;
} }
@ -2300,7 +2300,7 @@ static void Cty_CreateCountry (struct Country *Cty)
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
Txt_Created_new_country_X, Txt_Created_new_country_X,
Cty->Name); Cty->Name);
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt); Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
} }
/*****************************************************************************/ /*****************************************************************************/

View File

@ -1164,7 +1164,7 @@ static void Crs_ListCourses (void)
Tbl_EndTable (); Tbl_EndTable ();
} }
else // No courses created in the current degree else // No courses created in the current degree
Ale_ShowAlert (Ale_INFO,Txt_No_courses); Ale_ShowA_old (Ale_INFO,Txt_No_courses);
/***** Button to create course *****/ /***** Button to create course *****/
if (Crs_CheckIfICanCreateCourses ()) if (Crs_CheckIfICanCreateCourses ())
@ -1998,7 +1998,7 @@ void Crs_RemoveCourse (void)
{ {
/***** Check if this course has users *****/ /***** Check if this course has users *****/
if (Crs.NumUsrs[Rol_UNK]) // Course has users ==> don't remove if (Crs.NumUsrs[Rol_UNK]) // Course has users ==> don't remove
Ale_ShowAlert (Ale_WARNING,Txt_To_remove_a_course_you_must_first_remove_all_users_in_the_course); Ale_ShowA_old (Ale_WARNING,Txt_To_remove_a_course_you_must_first_remove_all_users_in_the_course);
else // Course has no users ==> remove it else // Course has no users ==> remove it
{ {
/***** Remove course *****/ /***** Remove course *****/
@ -2008,11 +2008,11 @@ void Crs_RemoveCourse (void)
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
Txt_Course_X_removed, Txt_Course_X_removed,
Crs.FullName); Crs.FullName);
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt); Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
} }
} }
else else
Ale_ShowAlert (Ale_WARNING,Txt_You_dont_have_permission_to_edit_this_course); Ale_ShowA_old (Ale_WARNING,Txt_You_dont_have_permission_to_edit_this_course);
/***** Show the form again *****/ /***** Show the form again *****/
Crs_EditCourses (); Crs_EditCourses ();
@ -3475,7 +3475,7 @@ void Crs_RemoveOldCrss (void)
NumCrss, NumCrss,
MonthsWithoutAccess, MonthsWithoutAccess,
Cfg_PLATFORM_SHORT_NAME); Cfg_PLATFORM_SHORT_NAME);
Ale_ShowAlert (Ale_INFO,Gbl.Alert.Txt); Ale_ShowA_old (Ale_INFO,Gbl.Alert.Txt);
/***** Remove courses *****/ /***** Remove courses *****/
for (NumCrs = 0; for (NumCrs = 0;
@ -3496,5 +3496,5 @@ void Crs_RemoveOldCrss (void)
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
Txt_X_courses_have_been_eliminated, Txt_X_courses_have_been_eliminated,
NumCrssRemoved); NumCrssRemoved);
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt); Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
} }

View File

@ -88,7 +88,7 @@ void DB_CreateTablesIfNotExist (void)
extern const char *Txt_Created_tables_in_the_database_that_did_not_exist; extern const char *Txt_Created_tables_in_the_database_that_did_not_exist;
/***** Information message *****/ /***** Information message *****/
Ale_ShowAlert (Ale_INFO,Txt_Creating_database_tables_if_they_do_not_exist); Ale_ShowA_old (Ale_INFO,Txt_Creating_database_tables_if_they_do_not_exist);
fprintf (Gbl.F.Out,"<ol>"); fprintf (Gbl.F.Out,"<ol>");
/***** Table IP_prefs *****/ /***** Table IP_prefs *****/
@ -3086,7 +3086,7 @@ mysql> DESCRIBE ws_keys;
/***** Show success message *****/ /***** Show success message *****/
fprintf (Gbl.F.Out,"</ol>"); fprintf (Gbl.F.Out,"</ol>");
Ale_ShowAlert (Ale_SUCCESS,Txt_Created_tables_in_the_database_that_did_not_exist); Ale_ShowA_old (Ale_SUCCESS,Txt_Created_tables_in_the_database_that_did_not_exist);
} }
/*****************************************************************************/ /*****************************************************************************/

View File

@ -228,7 +228,7 @@ void Deg_SeeDegWithPendingCrss (void)
Box_EndBoxTable (); Box_EndBoxTable ();
} }
else else
Ale_ShowAlert (Ale_INFO,Txt_There_are_no_degrees_with_requests_for_courses_to_be_confirmed); Ale_ShowA_old (Ale_INFO,Txt_There_are_no_degrees_with_requests_for_courses_to_be_confirmed);
/***** Free structure that stores the query result *****/ /***** Free structure that stores the query result *****/
DB_FreeMySQLResult (&mysql_res); DB_FreeMySQLResult (&mysql_res);
@ -1202,7 +1202,7 @@ static void Deg_ListDegrees (void)
Tbl_EndTable (); Tbl_EndTable ();
} }
else // No degrees created in the current centre else // No degrees created in the current centre
Ale_ShowAlert (Ale_INFO,Txt_No_degrees); Ale_ShowA_old (Ale_INFO,Txt_No_degrees);
/***** Button to create degree *****/ /***** Button to create degree *****/
if (Deg_CheckIfICanCreateDegrees ()) if (Deg_CheckIfICanCreateDegrees ())
@ -1376,7 +1376,7 @@ void Deg_EditDegrees (void)
else // No degree types else // No degree types
{ {
/***** Warning message *****/ /***** Warning message *****/
Ale_ShowAlert (Ale_WARNING,Txt_No_types_of_degree); Ale_ShowA_old (Ale_WARNING,Txt_No_types_of_degree);
/***** Form to create the first degree type *****/ /***** Form to create the first degree type *****/
if (DT_CheckIfICanCreateDegreeTypes ()) if (DT_CheckIfICanCreateDegreeTypes ())
@ -1583,23 +1583,23 @@ static void Deg_RecFormRequestOrCreateDeg (unsigned Status)
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
Txt_The_degree_X_already_exists, Txt_The_degree_X_already_exists,
Gbl.Degs.EditingDeg.ShrtName); Gbl.Degs.EditingDeg.ShrtName);
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt); Ale_ShowA_old (Ale_WARNING,Gbl.Alert.Txt);
} }
else if (Deg_CheckIfDegNameExistsInCtr ("FullName",Gbl.Degs.EditingDeg.FullName,-1L,Gbl.Degs.EditingDeg.CtrCod)) else if (Deg_CheckIfDegNameExistsInCtr ("FullName",Gbl.Degs.EditingDeg.FullName,-1L,Gbl.Degs.EditingDeg.CtrCod))
{ {
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
Txt_The_degree_X_already_exists, Txt_The_degree_X_already_exists,
Gbl.Degs.EditingDeg.FullName); Gbl.Degs.EditingDeg.FullName);
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt); Ale_ShowA_old (Ale_WARNING,Gbl.Alert.Txt);
} }
else // Add new degree to database else // Add new degree to database
Deg_CreateDegree (Status); Deg_CreateDegree (Status);
} }
else // If there is not a degree logo or web else // If there is not a degree logo or web
Ale_ShowAlert (Ale_WARNING,Txt_You_must_specify_the_web_address_of_the_new_degree); Ale_ShowA_old (Ale_WARNING,Txt_You_must_specify_the_web_address_of_the_new_degree);
} }
else // If there is not a degree name else // If there is not a degree name
Ale_ShowAlert (Ale_WARNING,Txt_You_must_specify_the_short_name_and_the_full_name_of_the_new_degree); Ale_ShowA_old (Ale_WARNING,Txt_You_must_specify_the_short_name_and_the_full_name_of_the_new_degree);
/***** Show the form again *****/ /***** Show the form again *****/
Deg_EditDegrees (); Deg_EditDegrees ();
@ -1623,7 +1623,7 @@ void Deg_RemoveDegree (void)
/***** Check if this degree has courses *****/ /***** Check if this degree has courses *****/
if (Crs_GetNumCrssInDeg (Deg.DegCod)) // Degree has courses ==> don't remove if (Crs_GetNumCrssInDeg (Deg.DegCod)) // Degree has courses ==> don't remove
Ale_ShowAlert (Ale_WARNING,Txt_To_remove_a_degree_you_must_first_remove_all_courses_in_the_degree); Ale_ShowA_old (Ale_WARNING,Txt_To_remove_a_degree_you_must_first_remove_all_courses_in_the_degree);
else // Degree has no courses ==> remove it else // Degree has no courses ==> remove it
{ {
/***** Remove degree *****/ /***** Remove degree *****/
@ -1633,7 +1633,7 @@ void Deg_RemoveDegree (void)
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
Txt_Degree_X_removed, Txt_Degree_X_removed,
Deg.FullName); Deg.FullName);
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt); Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
} }
/***** Show the form again *****/ /***** Show the form again *****/
@ -2173,7 +2173,7 @@ void Deg_ChangeDegWWW (void)
Deg_ShowAlertAndButtonToGoToDeg (); Deg_ShowAlertAndButtonToGoToDeg ();
} }
else else
Ale_ShowAlert (Ale_WARNING,Txt_You_can_not_leave_the_web_address_empty); Ale_ShowA_old (Ale_WARNING,Txt_You_can_not_leave_the_web_address_empty);
/***** Show the form again *****/ /***** Show the form again *****/
Deg_EditDegrees (); Deg_EditDegrees ();
@ -2201,10 +2201,10 @@ void Deg_ChangeDegWWWInConfig (void)
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
Txt_The_new_web_address_is_X, Txt_The_new_web_address_is_X,
NewWWW); NewWWW);
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt); Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
} }
else else
Ale_ShowAlert (Ale_WARNING,Txt_You_can_not_leave_the_web_address_empty); Ale_ShowA_old (Ale_WARNING,Txt_You_can_not_leave_the_web_address_empty);
/***** Show the form again *****/ /***** Show the form again *****/
Deg_ShowConfiguration (); Deg_ShowConfiguration ();
@ -2307,7 +2307,7 @@ void Deg_ShowAlertAndButtonToGoToDeg (void)
} }
else else
/***** Alert *****/ /***** Alert *****/
Ale_ShowAlert (Gbl.Alert.Type,Gbl.Alert.Txt); Ale_ShowA_old (Gbl.Alert.Type,Gbl.Alert.Txt);
} }
static void Deg_PutParamGoToDeg (void) static void Deg_PutParamGoToDeg (void)

View File

@ -218,7 +218,7 @@ static void DT_ListDegreeTypes (Act_Action_t NextAction,DT_Order_t SelectedOrder
Tbl_EndTable (); Tbl_EndTable ();
} }
else // No degree types created else // No degree types created
Ale_ShowAlert (Ale_INFO,Txt_No_types_of_degree); Ale_ShowA_old (Ale_INFO,Txt_No_types_of_degree);
/***** Button to create degree type *****/ /***** Button to create degree type *****/
if (DT_CheckIfICanCreateDegreeTypes ()) if (DT_CheckIfICanCreateDegreeTypes ())
@ -570,7 +570,7 @@ static void DT_CreateDegreeType (struct DegreeType *DegTyp)
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
Txt_Created_new_type_of_degree_X, Txt_Created_new_type_of_degree_X,
DegTyp->DegTypName); DegTyp->DegTypName);
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt); Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
} }
/*****************************************************************************/ /*****************************************************************************/
@ -745,13 +745,13 @@ void DT_RecFormNewDegreeType (void)
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
Txt_The_type_of_degree_X_already_exists, Txt_The_type_of_degree_X_already_exists,
DegTyp->DegTypName); DegTyp->DegTypName);
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt); Ale_ShowA_old (Ale_WARNING,Gbl.Alert.Txt);
} }
else // Add new degree type to database else // Add new degree type to database
DT_CreateDegreeType (DegTyp); DT_CreateDegreeType (DegTyp);
} }
else // If there is not a degree type name else // If there is not a degree type name
Ale_ShowAlert (Ale_WARNING,Txt_You_must_specify_the_name_of_the_new_type_of_degree); Ale_ShowA_old (Ale_WARNING,Txt_You_must_specify_the_name_of_the_new_type_of_degree);
/***** Show the form again *****/ /***** Show the form again *****/
DT_EditDegreeTypes (); DT_EditDegreeTypes ();
@ -776,7 +776,7 @@ void DT_RemoveDegreeType (void)
/***** Check if this degree type has degrees *****/ /***** Check if this degree type has degrees *****/
if (DegTyp.NumDegs) // Degree type has degrees => don't remove if (DegTyp.NumDegs) // Degree type has degrees => don't remove
Ale_ShowAlert (Ale_WARNING,Txt_To_remove_a_type_of_degree_you_must_first_remove_all_degrees_of_that_type); Ale_ShowA_old (Ale_WARNING,Txt_To_remove_a_type_of_degree_you_must_first_remove_all_degrees_of_that_type);
else // Degree type has no degrees => remove it else // Degree type has no degrees => remove it
{ {
/***** Remove degree type *****/ /***** Remove degree type *****/
@ -786,7 +786,7 @@ void DT_RemoveDegreeType (void)
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
Txt_Type_of_degree_X_removed, Txt_Type_of_degree_X_removed,
DegTyp.DegTypName); DegTyp.DegTypName);
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt); Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
} }
/***** Show the form again *****/ /***** Show the form again *****/
@ -958,7 +958,7 @@ void DT_RenameDegreeType (void)
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
Txt_You_can_not_leave_the_name_of_the_type_of_degree_X_empty, Txt_You_can_not_leave_the_name_of_the_type_of_degree_X_empty,
DegTyp->DegTypName); DegTyp->DegTypName);
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt); Ale_ShowA_old (Ale_WARNING,Gbl.Alert.Txt);
} }
else else
{ {
@ -972,7 +972,7 @@ void DT_RenameDegreeType (void)
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
Txt_The_type_of_degree_X_already_exists, Txt_The_type_of_degree_X_already_exists,
NewNameDegTyp); NewNameDegTyp);
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt); Ale_ShowA_old (Ale_WARNING,Gbl.Alert.Txt);
} }
else else
{ {
@ -986,7 +986,7 @@ void DT_RenameDegreeType (void)
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
Txt_The_type_of_degree_X_has_been_renamed_as_Y, Txt_The_type_of_degree_X_has_been_renamed_as_Y,
DegTyp->DegTypName,NewNameDegTyp); DegTyp->DegTypName,NewNameDegTyp);
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt); Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
} }
} }
else // The same name else // The same name
@ -994,7 +994,7 @@ void DT_RenameDegreeType (void)
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
Txt_The_name_of_the_type_of_degree_X_has_not_changed, Txt_The_name_of_the_type_of_degree_X_has_not_changed,
NewNameDegTyp); NewNameDegTyp);
Ale_ShowAlert (Ale_INFO,Gbl.Alert.Txt); Ale_ShowA_old (Ale_INFO,Gbl.Alert.Txt);
} }
} }

View File

@ -613,7 +613,7 @@ void Dpt_RemoveDepartment (void)
/***** Check if this department has teachers *****/ /***** Check if this department has teachers *****/
if (Dpt.NumTchs) // Department has teachers ==> don't remove if (Dpt.NumTchs) // Department has teachers ==> don't remove
Ale_ShowAlert (Ale_WARNING,Txt_To_remove_a_department_you_must_first_remove_all_teachers_in_the_department); Ale_ShowA_old (Ale_WARNING,Txt_To_remove_a_department_you_must_first_remove_all_teachers_in_the_department);
else // Department has no teachers ==> remove it else // Department has no teachers ==> remove it
{ {
/***** Remove department *****/ /***** Remove department *****/
@ -625,7 +625,7 @@ void Dpt_RemoveDepartment (void)
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
Txt_Department_X_removed, Txt_Department_X_removed,
Dpt.FullName); Dpt.FullName);
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt); Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
} }
/***** Show the form again *****/ /***** Show the form again *****/
@ -656,7 +656,7 @@ void Dpt_ChangeDepartIns (void)
Dpt->InsCod,Dpt->DptCod); Dpt->InsCod,Dpt->DptCod);
/***** Write message to show the change made *****/ /***** Write message to show the change made *****/
Ale_ShowAlert (Ale_SUCCESS,Txt_The_institution_of_the_department_has_changed); Ale_ShowA_old (Ale_SUCCESS,Txt_The_institution_of_the_department_has_changed);
/***** Show the form again *****/ /***** Show the form again *****/
Dpt_EditDepartments (); Dpt_EditDepartments ();
@ -730,7 +730,7 @@ static void Dpt_RenameDepartment (Cns_ShrtOrFullName_t ShrtOrFullName)
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
Txt_You_can_not_leave_the_name_of_the_department_X_empty, Txt_You_can_not_leave_the_name_of_the_department_X_empty,
CurrentDptName); CurrentDptName);
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt); Ale_ShowA_old (Ale_WARNING,Gbl.Alert.Txt);
} }
else else
{ {
@ -744,7 +744,7 @@ static void Dpt_RenameDepartment (Cns_ShrtOrFullName_t ShrtOrFullName)
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
Txt_The_department_X_already_exists, Txt_The_department_X_already_exists,
NewDptName); NewDptName);
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt); Ale_ShowA_old (Ale_WARNING,Gbl.Alert.Txt);
} }
else else
{ {
@ -755,7 +755,7 @@ static void Dpt_RenameDepartment (Cns_ShrtOrFullName_t ShrtOrFullName)
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
Txt_The_department_X_has_been_renamed_as_Y, Txt_The_department_X_has_been_renamed_as_Y,
CurrentDptName,NewDptName); CurrentDptName,NewDptName);
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt); Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
} }
} }
else // The same name else // The same name
@ -763,7 +763,7 @@ static void Dpt_RenameDepartment (Cns_ShrtOrFullName_t ShrtOrFullName)
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
Txt_The_name_of_the_department_X_has_not_changed, Txt_The_name_of_the_department_X_has_not_changed,
CurrentDptName); CurrentDptName);
Ale_ShowAlert (Ale_INFO,Gbl.Alert.Txt); Ale_ShowA_old (Ale_INFO,Gbl.Alert.Txt);
} }
} }
@ -831,10 +831,10 @@ void Dpt_ChangeDptWWW (void)
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
Txt_The_new_web_address_is_X, Txt_The_new_web_address_is_X,
NewWWW); NewWWW);
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt); Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
} }
else else
Ale_ShowAlert (Ale_WARNING,Txt_You_can_not_leave_the_web_address_empty); Ale_ShowA_old (Ale_WARNING,Txt_You_can_not_leave_the_web_address_empty);
/***** Show the form again *****/ /***** Show the form again *****/
Str_Copy (Dpt->WWW,NewWWW, Str_Copy (Dpt->WWW,NewWWW,
@ -1021,23 +1021,23 @@ void Dpt_RecFormNewDpt (void)
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
Txt_The_department_X_already_exists, Txt_The_department_X_already_exists,
Dpt->ShrtName); Dpt->ShrtName);
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt); Ale_ShowA_old (Ale_WARNING,Gbl.Alert.Txt);
} }
else if (Dpt_CheckIfDepartmentNameExists ("FullName",Dpt->FullName,-1L)) else if (Dpt_CheckIfDepartmentNameExists ("FullName",Dpt->FullName,-1L))
{ {
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
Txt_The_department_X_already_exists, Txt_The_department_X_already_exists,
Dpt->FullName); Dpt->FullName);
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt); Ale_ShowA_old (Ale_WARNING,Gbl.Alert.Txt);
} }
else // Add new department to database else // Add new department to database
Dpt_CreateDepartment (Dpt); Dpt_CreateDepartment (Dpt);
} }
else // If there is not a web else // If there is not a web
Ale_ShowAlert (Ale_WARNING,Txt_You_must_specify_the_web_address_of_the_new_department); Ale_ShowA_old (Ale_WARNING,Txt_You_must_specify_the_web_address_of_the_new_department);
} }
else // If there is not a department name else // If there is not a department name
Ale_ShowAlert (Ale_WARNING,Txt_You_must_specify_the_short_name_and_the_full_name_of_the_new_department); Ale_ShowA_old (Ale_WARNING,Txt_You_must_specify_the_short_name_and_the_full_name_of_the_new_department);
/***** Show the form again *****/ /***** Show the form again *****/
Dpt_EditDepartments (); Dpt_EditDepartments ();
@ -1063,7 +1063,7 @@ static void Dpt_CreateDepartment (struct Department *Dpt)
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
Txt_Created_new_department_X, Txt_Created_new_department_X,
Dpt->FullName); Dpt->FullName);
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt); Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
} }
/*****************************************************************************/ /*****************************************************************************/

View File

@ -102,13 +102,13 @@ void Dup_ReportUsrAsPossibleDuplicate (void)
Gbl.Usrs.Me.UsrDat.UsrCod); Gbl.Usrs.Me.UsrDat.UsrCod);
/***** Show feedback message *****/ /***** Show feedback message *****/
Ale_ShowAlert (Ale_SUCCESS,Txt_Thank_you_for_reporting_a_possible_duplicate_user); Ale_ShowA_old (Ale_SUCCESS,Txt_Thank_you_for_reporting_a_possible_duplicate_user);
} }
else else
Ale_ShowAlert (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_); Ale_ShowA_old (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
} }
else else
Ale_ShowAlert (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_); Ale_ShowA_old (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
} }
/*****************************************************************************/ /*****************************************************************************/
@ -250,7 +250,7 @@ void Dup_GetUsrCodAndListSimilarUsrs (void)
if (Usr_GetParamOtherUsrCodEncryptedAndGetUsrData ()) if (Usr_GetParamOtherUsrCodEncryptedAndGetUsrData ())
Dup_ListSimilarUsrs (); Dup_ListSimilarUsrs ();
else else
Ale_ShowAlert (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_); Ale_ShowA_old (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
} }
static void Dup_ListSimilarUsrs (void) static void Dup_ListSimilarUsrs (void)
@ -459,7 +459,7 @@ void Dup_RemoveUsrFromListDupUsrs (void)
Dup_ListDuplicateUsrs (); Dup_ListDuplicateUsrs ();
} }
else else
Ale_ShowAlert (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_); Ale_ShowA_old (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
} }
/*****************************************************************************/ /*****************************************************************************/

View File

@ -398,7 +398,7 @@ void Enr_ReqAcceptRegisterInCrs (void)
Txt_A_teacher_or_administrator_has_enroled_you_as_X_into_the_course_Y, 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], Txt_ROLES_SINGUL_abc[Gbl.Usrs.Me.UsrDat.Roles.InCurrentCrs.Role][Gbl.Usrs.Me.UsrDat.Sex],
Gbl.CurrentCrs.Crs.FullName); Gbl.CurrentCrs.Crs.FullName);
Ale_ShowAlert (Ale_INFO,Gbl.Alert.Txt); Ale_ShowA_old (Ale_INFO,Gbl.Alert.Txt);
/***** Send button to accept register in the current course *****/ /***** Send button to accept register in the current course *****/
switch (Gbl.Usrs.Me.UsrDat.Roles.InCurrentCrs.Role) switch (Gbl.Usrs.Me.UsrDat.Roles.InCurrentCrs.Role)
@ -627,7 +627,7 @@ static void Enr_ReqAdminUsrs (Rol_Role_t Role)
Enr_ReqAnotherUsrIDToRegisterRemove (Role); Enr_ReqAnotherUsrIDToRegisterRemove (Role);
break; break;
default: default:
Ale_ShowAlert (Ale_ERROR,Txt_You_dont_have_permission_to_perform_this_action); Ale_ShowA_old (Ale_ERROR,Txt_You_dont_have_permission_to_perform_this_action);
break; break;
} }
} }
@ -721,7 +721,7 @@ static void Enr_ShowFormRegRemSeveralUsrs (Rol_Role_t Role)
The_ClassTitle[Gbl.Prefs.Theme], The_ClassTitle[Gbl.Prefs.Theme],
Txt_Step_1_Provide_a_list_of_users); Txt_Step_1_Provide_a_list_of_users);
Ale_ShowAlert (Ale_INFO,Txt_Type_or_paste_a_list_of_IDs_nicks_or_emails_); Ale_ShowA_old (Ale_INFO,Txt_Type_or_paste_a_list_of_IDs_nicks_or_emails_);
Enr_PutAreaToEnterUsrsIDs (); Enr_PutAreaToEnterUsrsIDs ();
/***** Step 2: Put different actions to register/remove users to/from current course *****/ /***** Step 2: Put different actions to register/remove users to/from current course *****/
@ -742,7 +742,7 @@ static void Enr_ShowFormRegRemSeveralUsrs (Rol_Role_t Role)
{ {
if (Gbl.CurrentCrs.Grps.NumGrps) // This course has groups? if (Gbl.CurrentCrs.Grps.NumGrps) // This course has groups?
{ {
Ale_ShowAlert (Ale_INFO,Txt_Select_the_groups_in_from_which_you_want_to_register_remove_users_); Ale_ShowA_old (Ale_INFO,Txt_Select_the_groups_in_from_which_you_want_to_register_remove_users_);
Grp_ShowLstGrpsToChgOtherUsrsGrps (-1L); Grp_ShowLstGrpsToChgOtherUsrsGrps (-1L);
} }
else else
@ -751,7 +751,7 @@ static void Enr_ShowFormRegRemSeveralUsrs (Rol_Role_t Role)
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
Txt_No_groups_have_been_created_in_the_course_X_Therefore_, Txt_No_groups_have_been_created_in_the_course_X_Therefore_,
Gbl.CurrentCrs.Crs.FullName); Gbl.CurrentCrs.Crs.FullName);
Ale_ShowAlert (Ale_INFO,Gbl.Alert.Txt); Ale_ShowA_old (Ale_INFO,Gbl.Alert.Txt);
} }
} }
@ -876,7 +876,7 @@ void Enr_RemoveOldUsrs (void)
NumUsrs, NumUsrs,
MonthsWithoutAccess, MonthsWithoutAccess,
Cfg_PLATFORM_SHORT_NAME); Cfg_PLATFORM_SHORT_NAME);
Ale_ShowAlert (Ale_INFO,Gbl.Alert.Txt); Ale_ShowA_old (Ale_INFO,Gbl.Alert.Txt);
/***** Initialize structure with user's data *****/ /***** Initialize structure with user's data *****/
Usr_UsrDataConstructor (&UsrDat); Usr_UsrDataConstructor (&UsrDat);
@ -909,7 +909,7 @@ void Enr_RemoveOldUsrs (void)
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
Txt_X_users_have_been_eliminated, Txt_X_users_have_been_eliminated,
NumUsrsEliminated); NumUsrsEliminated);
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt); Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
} }
/*****************************************************************************/ /*****************************************************************************/
@ -1509,7 +1509,7 @@ static void Enr_ReceiveFormUsrsCrs (Rol_Role_t Role)
if (!Grp_CheckIfSelectionGrpsSingleEnrolmentIsValid (Role,&LstGrps)) if (!Grp_CheckIfSelectionGrpsSingleEnrolmentIsValid (Role,&LstGrps))
{ {
/* Show warning message and exit */ /* Show warning message and exit */
Ale_ShowAlert (Ale_WARNING,Txt_In_a_type_of_group_with_single_enrolment_students_can_not_be_registered_in_more_than_one_group); Ale_ShowA_old (Ale_WARNING,Txt_In_a_type_of_group_with_single_enrolment_students_can_not_be_registered_in_more_than_one_group);
/* Free memory used by lists of groups and abort */ /* Free memory used by lists of groups and abort */
Grp_FreeListCodGrp (&LstGrps); Grp_FreeListCodGrp (&LstGrps);
@ -1746,32 +1746,32 @@ static void Enr_ReceiveFormUsrsCrs (Rol_Role_t Role)
switch (NumUsrsEliminated) switch (NumUsrsEliminated)
{ {
case 0: case 0:
Ale_ShowAlert (Ale_INFO,Txt_No_user_has_been_eliminated); Ale_ShowA_old (Ale_INFO,Txt_No_user_has_been_eliminated);
break; break;
case 1: case 1:
Ale_ShowAlert (Ale_SUCCESS,Txt_One_user_has_been_eliminated); Ale_ShowA_old (Ale_SUCCESS,Txt_One_user_has_been_eliminated);
break; break;
default: default:
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
Txt_X_users_have_been_eliminated, Txt_X_users_have_been_eliminated,
NumUsrsEliminated); NumUsrsEliminated);
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt); Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
break; break;
} }
else // Only remove from course / groups else // Only remove from course / groups
switch (NumUsrsRemoved) switch (NumUsrsRemoved)
{ {
case 0: case 0:
Ale_ShowAlert (Ale_INFO,Txt_No_user_has_been_removed); Ale_ShowA_old (Ale_INFO,Txt_No_user_has_been_removed);
break; break;
case 1: case 1:
Ale_ShowAlert (Ale_SUCCESS,Txt_One_user_has_been_removed); Ale_ShowA_old (Ale_SUCCESS,Txt_One_user_has_been_removed);
break; break;
default: default:
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
Txt_X_users_have_been_removed, Txt_X_users_have_been_removed,
NumUsrsRemoved); NumUsrsRemoved);
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt); Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
break; break;
} }
} }
@ -1779,16 +1779,16 @@ static void Enr_ReceiveFormUsrsCrs (Rol_Role_t Role)
switch (NumUsrsRegistered) switch (NumUsrsRegistered)
{ {
case 0: case 0:
Ale_ShowAlert (Ale_INFO,Txt_No_user_has_been_enroled); Ale_ShowA_old (Ale_INFO,Txt_No_user_has_been_enroled);
break; break;
case 1: case 1:
Ale_ShowAlert (Ale_SUCCESS,Txt_One_user_has_been_enroled); Ale_ShowA_old (Ale_SUCCESS,Txt_One_user_has_been_enroled);
break; break;
default: default:
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
Txt_X_users_have_been_enroled_including_possible_repetitions, Txt_X_users_have_been_enroled_including_possible_repetitions,
NumUsrsRegistered); NumUsrsRegistered);
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt); Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
break; break;
} }
@ -1923,7 +1923,7 @@ void Enr_RemAllStdsThisCrs (void)
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
Txt_The_X_students_who_belonged_to_the_course_Y_have_been_removed_from_it, Txt_The_X_students_who_belonged_to_the_course_Y_have_been_removed_from_it,
NumStdsInCrs,Gbl.CurrentCrs.Crs.FullName); NumStdsInCrs,Gbl.CurrentCrs.Crs.FullName);
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt); Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
} }
else // NumStdsInCrs == 0 else // NumStdsInCrs == 0
/***** Show warning indicating no students found *****/ /***** Show warning indicating no students found *****/
@ -1978,7 +1978,7 @@ void Enr_ReqSignUpInCrs (void)
Txt_You_were_already_enroled_as_X_in_the_course_Y, 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], Txt_ROLES_SINGUL_abc[Gbl.Usrs.Me.UsrDat.Roles.InCurrentCrs.Role][Gbl.Usrs.Me.UsrDat.Sex],
Gbl.CurrentCrs.Crs.FullName); Gbl.CurrentCrs.Crs.FullName);
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt); Ale_ShowA_old (Ale_WARNING,Gbl.Alert.Txt);
} }
else if (Gbl.Usrs.Me.Role.Logged == Rol_GST || else if (Gbl.Usrs.Me.Role.Logged == Rol_GST ||
Gbl.Usrs.Me.Role.Logged == Rol_USR) Gbl.Usrs.Me.Role.Logged == Rol_USR)
@ -2009,7 +2009,7 @@ void Enr_SignUpInCrs (void)
Txt_You_were_already_enroled_as_X_in_the_course_Y, 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], Txt_ROLES_SINGUL_abc[Gbl.Usrs.Me.UsrDat.Roles.InCurrentCrs.Role][Gbl.Usrs.Me.UsrDat.Sex],
Gbl.CurrentCrs.Crs.FullName); Gbl.CurrentCrs.Crs.FullName);
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt); Ale_ShowA_old (Ale_WARNING,Gbl.Alert.Txt);
} }
else else
{ {
@ -2065,7 +2065,7 @@ void Enr_SignUpInCrs (void)
Txt_Your_request_for_enrolment_as_X_in_the_course_Y_has_been_accepted_for_processing, 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], Txt_ROLES_SINGUL_abc[RoleFromForm][Gbl.Usrs.Me.UsrDat.Sex],
Gbl.CurrentCrs.Crs.FullName); Gbl.CurrentCrs.Crs.FullName);
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt); Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
/***** Notify teachers or admins by email about the new enrolment request *****/ /***** Notify teachers or admins by email about the new enrolment request *****/
// If this course has teachers ==> send notification to teachers // If this course has teachers ==> send notification to teachers
@ -2155,7 +2155,7 @@ void Enr_AskIfRejectSignUp (void)
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
Txt_THE_USER_X_is_already_enroled_in_the_course_Y, Txt_THE_USER_X_is_already_enroled_in_the_course_Y,
Gbl.Usrs.Other.UsrDat.FullName,Gbl.CurrentCrs.Crs.FullName); Gbl.Usrs.Other.UsrDat.FullName,Gbl.CurrentCrs.Crs.FullName);
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt); Ale_ShowA_old (Ale_WARNING,Gbl.Alert.Txt);
Rec_ShowSharedRecordUnmodifiable (&Gbl.Usrs.Other.UsrDat); Rec_ShowSharedRecordUnmodifiable (&Gbl.Usrs.Other.UsrDat);
/* Remove inscription request because it has not sense */ /* Remove inscription request because it has not sense */
@ -2190,7 +2190,7 @@ void Enr_AskIfRejectSignUp (void)
} }
} }
else else
Ale_ShowAlert (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_); Ale_ShowA_old (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
} }
/*****************************************************************************/ /*****************************************************************************/
@ -2214,7 +2214,7 @@ void Enr_RejectSignUp (void)
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
Txt_THE_USER_X_is_already_enroled_in_the_course_Y, Txt_THE_USER_X_is_already_enroled_in_the_course_Y,
Gbl.Usrs.Other.UsrDat.FullName,Gbl.CurrentCrs.Crs.FullName); Gbl.Usrs.Other.UsrDat.FullName,Gbl.CurrentCrs.Crs.FullName);
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt); Ale_ShowA_old (Ale_WARNING,Gbl.Alert.Txt);
Rec_ShowSharedRecordUnmodifiable (&Gbl.Usrs.Other.UsrDat); Rec_ShowSharedRecordUnmodifiable (&Gbl.Usrs.Other.UsrDat);
} }
@ -2225,10 +2225,10 @@ void Enr_RejectSignUp (void)
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
Txt_Enrolment_of_X_rejected, Txt_Enrolment_of_X_rejected,
Gbl.Usrs.Other.UsrDat.FullName); Gbl.Usrs.Other.UsrDat.FullName);
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt); Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
} }
else else
Ale_ShowAlert (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_); Ale_ShowA_old (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
/* Show again the rest of registrarion requests */ /* Show again the rest of registrarion requests */
Enr_ShowEnrolmentRequests (); Enr_ShowEnrolmentRequests ();
@ -3008,7 +3008,7 @@ static void Enr_ShowEnrolmentRequestsGivenRoles (unsigned RolesSelected)
Usr_UsrDataDestructor (&UsrDat); Usr_UsrDataDestructor (&UsrDat);
} }
else // There are no requests else // There are no requests
Ale_ShowAlert (Ale_INFO,Txt_No_enrolment_requests); Ale_ShowA_old (Ale_INFO,Txt_No_enrolment_requests);
/***** End box *****/ /***** End box *****/
Box_EndBox (); Box_EndBox ();
@ -3291,7 +3291,7 @@ static void Enr_AskIfRegRemUsr (struct ListUsrCods *ListUsrCods,Rol_Role_t Role)
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
Txt_There_are_X_users_with_the_ID_Y, Txt_There_are_X_users_with_the_ID_Y,
ListUsrCods->NumUsrs,Gbl.Usrs.Other.UsrDat.UsrIDNickOrEmail); ListUsrCods->NumUsrs,Gbl.Usrs.Other.UsrDat.UsrIDNickOrEmail);
Ale_ShowAlert (Ale_INFO,Gbl.Alert.Txt); Ale_ShowA_old (Ale_INFO,Gbl.Alert.Txt);
} }
/***** For each user found... *****/ /***** For each user found... *****/
@ -3317,7 +3317,7 @@ static void Enr_AskIfRegRemUsr (struct ListUsrCods *ListUsrCods,Rol_Role_t Role)
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), 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, 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); Gbl.Usrs.Other.UsrDat.FullName,Gbl.CurrentCrs.Crs.FullName);
Ale_ShowAlert (Ale_INFO,Gbl.Alert.Txt); Ale_ShowA_old (Ale_INFO,Gbl.Alert.Txt);
Enr_ShowFormToEditOtherUsr (); Enr_ShowFormToEditOtherUsr ();
} }
@ -3327,7 +3327,7 @@ static void Enr_AskIfRegRemUsr (struct ListUsrCods *ListUsrCods,Rol_Role_t Role)
Txt_THE_USER_X_already_exists_in_Y_but_is_not_yet_enroled_in_the_course_Z, Txt_THE_USER_X_already_exists_in_Y_but_is_not_yet_enroled_in_the_course_Z,
Gbl.Usrs.Other.UsrDat.FullName, Gbl.Usrs.Other.UsrDat.FullName,
Cfg_PLATFORM_SHORT_NAME,Gbl.CurrentCrs.Crs.FullName); Cfg_PLATFORM_SHORT_NAME,Gbl.CurrentCrs.Crs.FullName);
Ale_ShowAlert (Ale_INFO,Gbl.Alert.Txt); Ale_ShowA_old (Ale_INFO,Gbl.Alert.Txt);
Enr_ShowFormToEditOtherUsr (); Enr_ShowFormToEditOtherUsr ();
} }
@ -3337,7 +3337,7 @@ static void Enr_AskIfRegRemUsr (struct ListUsrCods *ListUsrCods,Rol_Role_t Role)
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
Txt_THE_USER_X_already_exists_in_Y, Txt_THE_USER_X_already_exists_in_Y,
Gbl.Usrs.Other.UsrDat.FullName,Cfg_PLATFORM_SHORT_NAME); Gbl.Usrs.Other.UsrDat.FullName,Cfg_PLATFORM_SHORT_NAME);
Ale_ShowAlert (Ale_INFO,Gbl.Alert.Txt); Ale_ShowA_old (Ale_INFO,Gbl.Alert.Txt);
Enr_ShowFormToEditOtherUsr (); Enr_ShowFormToEditOtherUsr ();
} }
@ -3361,7 +3361,7 @@ static void Enr_AskIfRegRemUsr (struct ListUsrCods *ListUsrCods,Rol_Role_t Role)
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
Txt_The_user_is_new_not_yet_in_X, Txt_The_user_is_new_not_yet_in_X,
Cfg_PLATFORM_SHORT_NAME); Cfg_PLATFORM_SHORT_NAME);
Ale_ShowAlert (Ale_INFO,Gbl.Alert.Txt); Ale_ShowA_old (Ale_INFO,Gbl.Alert.Txt);
Rec_ShowFormOtherNewSharedRecord (&Gbl.Usrs.Other.UsrDat,Role); Rec_ShowFormOtherNewSharedRecord (&Gbl.Usrs.Other.UsrDat,Role);
} }
else // User's ID is not valid else // User's ID is not valid
@ -3370,7 +3370,7 @@ static void Enr_AskIfRegRemUsr (struct ListUsrCods *ListUsrCods,Rol_Role_t Role)
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
Txt_If_this_is_a_new_user_in_X_you_should_indicate_her_his_ID, Txt_If_this_is_a_new_user_in_X_you_should_indicate_her_his_ID,
Cfg_PLATFORM_SHORT_NAME); Cfg_PLATFORM_SHORT_NAME);
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt); Ale_ShowA_old (Ale_WARNING,Gbl.Alert.Txt);
Enr_ReqRegRemUsr (Role); Enr_ReqRegRemUsr (Role);
} }
} }
@ -3442,10 +3442,10 @@ static void Enr_AddAdm (Sco_Scope_t Scope,long Cod,const char *InsCtrDegName)
Rec_ShowSharedRecordUnmodifiable (&Gbl.Usrs.Other.UsrDat); Rec_ShowSharedRecordUnmodifiable (&Gbl.Usrs.Other.UsrDat);
} }
else else
Ale_ShowAlert (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_); Ale_ShowA_old (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
} }
else else
Ale_ShowAlert (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_); Ale_ShowA_old (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
} }
} }
@ -3478,7 +3478,7 @@ static void Enr_RegisterAdmin (struct UsrData *UsrDat,Sco_Scope_t Scope,long Cod
Txt_THE_USER_X_has_been_enroled_as_administrator_of_Y, Txt_THE_USER_X_has_been_enroled_as_administrator_of_Y,
UsrDat->FullName,InsCtrDegName); UsrDat->FullName,InsCtrDegName);
} }
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt); Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
} }
/*****************************************************************************/ /*****************************************************************************/
@ -3504,10 +3504,10 @@ void Enr_ReqRemUsrFromCrs (void)
if (Enr_CheckIfICanRemUsrFromCrs ()) if (Enr_CheckIfICanRemUsrFromCrs ())
Enr_AskIfRemoveUsrFromCrs (&Gbl.Usrs.Other.UsrDat); Enr_AskIfRemoveUsrFromCrs (&Gbl.Usrs.Other.UsrDat);
else else
Ale_ShowAlert (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_); Ale_ShowA_old (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
} }
else else
Ale_ShowAlert (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_); Ale_ShowA_old (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
} }
/*****************************************************************************/ /*****************************************************************************/
@ -3544,7 +3544,7 @@ void Enr_RemUsrFromCrs1 (void)
void Enr_RemUsrFromCrs2 (void) void Enr_RemUsrFromCrs2 (void)
{ {
Ale_ShowAlert (Gbl.Alert.Type,Gbl.Alert.Txt); Ale_ShowA_old (Gbl.Alert.Type,Gbl.Alert.Txt);
} }
/*****************************************************************************/ /*****************************************************************************/
@ -3678,14 +3678,14 @@ static void Enr_ReqRemOrRemAdm (Enr_ReqDelOrDelUsr_t ReqDelOrDelUsr,Sco_Scope_t
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
Txt_THE_USER_X_is_not_an_administrator_of_Y, Txt_THE_USER_X_is_not_an_administrator_of_Y,
Gbl.Usrs.Other.UsrDat.FullName,InsCtrDegName); Gbl.Usrs.Other.UsrDat.FullName,InsCtrDegName);
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt); Ale_ShowA_old (Ale_WARNING,Gbl.Alert.Txt);
} }
} }
else else
Ale_ShowAlert (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_); Ale_ShowA_old (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
} }
else else
Ale_ShowAlert (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_); Ale_ShowA_old (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
} }
} }
@ -3727,7 +3727,7 @@ static void Enr_ReqAddAdm (Sco_Scope_t Scope,long Cod,const char *InsCtrDegName)
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
Txt_THE_USER_X_is_already_an_administrator_of_Y, Txt_THE_USER_X_is_already_an_administrator_of_Y,
Gbl.Usrs.Other.UsrDat.FullName,InsCtrDegName); Gbl.Usrs.Other.UsrDat.FullName,InsCtrDegName);
Ale_ShowAlert (Ale_INFO,Gbl.Alert.Txt); Ale_ShowA_old (Ale_INFO,Gbl.Alert.Txt);
Rec_ShowSharedRecordUnmodifiable (&Gbl.Usrs.Other.UsrDat); Rec_ShowSharedRecordUnmodifiable (&Gbl.Usrs.Other.UsrDat);
} }
else else
@ -3749,10 +3749,10 @@ static void Enr_ReqAddAdm (Sco_Scope_t Scope,long Cod,const char *InsCtrDegName)
} }
} }
else else
Ale_ShowAlert (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_); Ale_ShowA_old (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
} }
else else
Ale_ShowAlert (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_); Ale_ShowA_old (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
} }
} }
@ -3778,7 +3778,7 @@ void Enr_AcceptRegisterMeInCrs (void)
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
Txt_You_have_confirmed_your_enrolment_in_the_course_X, Txt_You_have_confirmed_your_enrolment_in_the_course_X,
Gbl.CurrentCrs.Crs.FullName); Gbl.CurrentCrs.Crs.FullName);
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt); Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
} }
/*****************************************************************************/ /*****************************************************************************/
@ -4070,7 +4070,7 @@ void Enr_ModifyUsr2 (void)
extern const char *Txt_User_not_found_or_you_do_not_have_permission_; extern const char *Txt_User_not_found_or_you_do_not_have_permission_;
if (Gbl.Alert.Type == Ale_WARNING) if (Gbl.Alert.Type == Ale_WARNING)
Ale_ShowAlert (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_); Ale_ShowA_old (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
else // No error else // No error
switch (Gbl.Usrs.RegRemAction) switch (Gbl.Usrs.RegRemAction)
{ {
@ -4187,7 +4187,7 @@ static void Enr_AskIfRemoveUsrFromCrs (struct UsrData *UsrDat)
Ale_ShowAlertAndButton2 (ActUnk,NULL,NULL,NULL,Btn_NO_BUTTON,NULL); Ale_ShowAlertAndButton2 (ActUnk,NULL,NULL,NULL,Btn_NO_BUTTON,NULL);
} }
else // User does not belong to current course else // User does not belong to current course
Ale_ShowAlert (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_); Ale_ShowA_old (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
} }
/*****************************************************************************/ /*****************************************************************************/
@ -4350,13 +4350,13 @@ static void Enr_EffectivelyRemAdm (struct UsrData *UsrDat,Sco_Scope_t Scope,
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
Txt_THE_USER_X_has_been_removed_as_administrator_of_Y, Txt_THE_USER_X_has_been_removed_as_administrator_of_Y,
UsrDat->FullName,InsCtrDegName); UsrDat->FullName,InsCtrDegName);
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt); Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
} }
else // User is not an administrator of the current institution/centre/degree else // User is not an administrator of the current institution/centre/degree
{ {
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
Txt_THE_USER_X_is_not_an_administrator_of_Y, Txt_THE_USER_X_is_not_an_administrator_of_Y,
UsrDat->FullName,InsCtrDegName); UsrDat->FullName,InsCtrDegName);
Ale_ShowAlert (Ale_ERROR,Gbl.Alert.Txt); Ale_ShowA_old (Ale_ERROR,Gbl.Alert.Txt);
} }
} }

View File

@ -295,7 +295,7 @@ void Exa_ReceiveExamAnnouncement2 (void)
struct SocialPublishing SocPub; struct SocialPublishing SocPub;
/***** Show message *****/ /***** Show message *****/
Ale_ShowAlert (Ale_SUCCESS, Ale_ShowA_old (Ale_SUCCESS,
Gbl.ExamAnns.NewExamAnnouncement ? Txt_Created_new_announcement_of_exam : Gbl.ExamAnns.NewExamAnnouncement ? Txt_Created_new_announcement_of_exam :
Txt_The_announcement_of_exam_has_been_successfully_updated); Txt_The_announcement_of_exam_has_been_successfully_updated);
@ -414,7 +414,7 @@ void Exa_RemoveExamAnnouncement2 (void)
extern const char *Txt_Announcement_of_exam_removed; extern const char *Txt_Announcement_of_exam_removed;
/***** Write message *****/ /***** Write message *****/
Ale_ShowAlert (Ale_SUCCESS,Txt_Announcement_of_exam_removed); Ale_ShowA_old (Ale_SUCCESS,Txt_Announcement_of_exam_removed);
/***** List again all the remaining exam announcements *****/ /***** List again all the remaining exam announcements *****/
Exa_ListExamAnnouncementsEdit (); Exa_ListExamAnnouncementsEdit ();
@ -447,7 +447,7 @@ void Exa_HideExamAnnouncement2 (void)
extern const char *Txt_The_announcement_of_exam_is_now_hidden; extern const char *Txt_The_announcement_of_exam_is_now_hidden;
/***** Write message to show the change made *****/ /***** Write message to show the change made *****/
Ale_ShowAlert (Ale_SUCCESS,Txt_The_announcement_of_exam_is_now_hidden); Ale_ShowA_old (Ale_SUCCESS,Txt_The_announcement_of_exam_is_now_hidden);
/***** Show exam announcements again *****/ /***** Show exam announcements again *****/
Exa_ListExamAnnouncementsEdit (); Exa_ListExamAnnouncementsEdit ();
@ -480,7 +480,7 @@ void Exa_UnhideExamAnnouncement2 (void)
extern const char *Txt_The_announcement_of_exam_is_now_visible; extern const char *Txt_The_announcement_of_exam_is_now_visible;
/***** Write message to show the change made *****/ /***** Write message to show the change made *****/
Ale_ShowAlert (Ale_SUCCESS,Txt_The_announcement_of_exam_is_now_visible); Ale_ShowA_old (Ale_SUCCESS,Txt_The_announcement_of_exam_is_now_visible);
/***** Show exam announcements again *****/ /***** Show exam announcements again *****/
Exa_ListExamAnnouncementsEdit (); Exa_ListExamAnnouncementsEdit ();
@ -661,7 +661,7 @@ static void Exa_ListExamAnnouncements (Exa_TypeViewExamAnnouncement_t TypeViewEx
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
Txt_No_announcements_of_exams_of_X, Txt_No_announcements_of_exams_of_X,
Gbl.CurrentCrs.Crs.FullName); Gbl.CurrentCrs.Crs.FullName);
Ale_ShowAlert (Ale_INFO,Gbl.Alert.Txt); Ale_ShowA_old (Ale_INFO,Gbl.Alert.Txt);
} }
/***** List the existing exam announcements *****/ /***** List the existing exam announcements *****/

View File

@ -2820,7 +2820,7 @@ bool Brw_UpdateFoldersAssigmentsIfExistForAllUsrs (const char *OldFolderName,con
NewFolderName); NewFolderName);
if (rename (PathOldFolder,PathNewFolder)) // Fail if (rename (PathOldFolder,PathNewFolder)) // Fail
{ {
Ale_ShowAlert (Ale_ERROR,Txt_Can_not_rename_a_folder_of_assignment); Ale_ShowA_old (Ale_ERROR,Txt_Can_not_rename_a_folder_of_assignment);
NumUsrsError++; NumUsrsError++;
} }
else // Success else // Success
@ -2854,11 +2854,11 @@ bool Brw_UpdateFoldersAssigmentsIfExistForAllUsrs (const char *OldFolderName,con
Txt_Users,NumUsrs, Txt_Users,NumUsrs,
Txt_Folders_renamed,NumUsrsSuccess, Txt_Folders_renamed,NumUsrsSuccess,
Txt_Folders_not_renamed,NumUsrsError); Txt_Folders_not_renamed,NumUsrsError);
Ale_ShowAlert (Ale_INFO,Gbl.Alert.Txt); Ale_ShowA_old (Ale_INFO,Gbl.Alert.Txt);
} }
else else
/***** Warning message *****/ /***** Warning message *****/
Ale_ShowAlert (Ale_WARNING,Txt_Can_not_rename_a_folder_of_assignment); Ale_ShowA_old (Ale_WARNING,Txt_Can_not_rename_a_folder_of_assignment);
/***** Free structure that stores the query result *****/ /***** Free structure that stores the query result *****/
DB_FreeMySQLResult (&mysql_res); DB_FreeMySQLResult (&mysql_res);
@ -2923,7 +2923,7 @@ static void Brw_SetAndCheckQuota (void)
Brw_SetMaxQuota (); Brw_SetMaxQuota ();
Brw_CalcSizeOfDir (Gbl.FileBrowser.Priv.PathRootFolder); Brw_CalcSizeOfDir (Gbl.FileBrowser.Priv.PathRootFolder);
if (Brw_CheckIfQuotaExceded ()) if (Brw_CheckIfQuotaExceded ())
Ale_ShowAlert (Ale_WARNING,Txt_Quota_exceeded); Ale_ShowA_old (Ale_WARNING,Txt_Quota_exceeded);
} }
/*****************************************************************************/ /*****************************************************************************/
@ -3208,7 +3208,7 @@ static void Brw_ShowFileBrowserProject (void)
} }
} }
else else
Ale_ShowAlert (Ale_WARNING,"You have no access to project files."); Ale_ShowA_old (Ale_WARNING,"You have no access to project files.");
/***** End box *****/ /***** End box *****/
Box_EndBox (); Box_EndBox ();
@ -3280,7 +3280,7 @@ static void Brw_ShowFileBrowsersAsgWrkCrs (void)
else // If no users are selected... else // If no users are selected...
{ {
// ...write warning alert // ...write warning alert
Ale_ShowAlert (Ale_WARNING,Txt_You_must_select_one_ore_more_users); Ale_ShowA_old (Ale_WARNING,Txt_You_must_select_one_ore_more_users);
// ...and show again the form // ...and show again the form
Brw_AskEditWorksCrs (); Brw_AskEditWorksCrs ();
} }
@ -3535,7 +3535,7 @@ void Brw_ShowAgainFileBrowserOrWorks (void)
{ {
case Brw_ADMI_MRK_CRS: case Brw_ADMI_MRK_CRS:
case Brw_ADMI_MRK_GRP: case Brw_ADMI_MRK_GRP:
Ale_ShowAlert (Ale_INFO,Txt_Files_of_marks_must_contain_a_table_in_HTML_format_); Ale_ShowA_old (Ale_INFO,Txt_Files_of_marks_must_contain_a_table_in_HTML_format_);
break; break;
default: default:
break; break;
@ -3546,7 +3546,7 @@ void Brw_ShowAgainFileBrowserOrWorks (void)
Txt_Disclaimer_the_files_hosted_here_, Txt_Disclaimer_the_files_hosted_here_,
Cfg_PLATFORM_SHORT_NAME, Cfg_PLATFORM_SHORT_NAME,
Cfg_PLATFORM_RESPONSIBLE_EMAIL); Cfg_PLATFORM_RESPONSIBLE_EMAIL);
Ale_ShowAlert (Ale_INFO,Gbl.Alert.Txt); Ale_ShowA_old (Ale_INFO,Gbl.Alert.Txt);
} }
/*****************************************************************************/ /*****************************************************************************/
@ -6791,7 +6791,7 @@ void Brw_RemFileFromTree (void)
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
Txt_FILE_X_removed, Txt_FILE_X_removed,
FileNameToShow); FileNameToShow);
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt); Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
} }
else // File / link not found else // File / link not found
Lay_ShowErrorAndExit ("File / link not found."); Lay_ShowErrorAndExit ("File / link not found.");
@ -6850,7 +6850,7 @@ void Brw_RemFolderFromTree (void)
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
Txt_Folder_X_removed, Txt_Folder_X_removed,
Gbl.FileBrowser.FilFolLnkName); Gbl.FileBrowser.FilFolLnkName);
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt); Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
} }
else // Folder not found else // Folder not found
Lay_ShowErrorAndExit ("Folder not found."); Lay_ShowErrorAndExit ("Folder not found.");
@ -6931,7 +6931,7 @@ void Brw_RemSubtreeInFileBrowser (void)
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
Txt_Folder_X_and_all_its_contents_removed, Txt_Folder_X_and_all_its_contents_removed,
Gbl.FileBrowser.FilFolLnkName); Gbl.FileBrowser.FilFolLnkName);
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt); Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
} }
/***** Show again file browser *****/ /***** Show again file browser *****/
@ -7255,7 +7255,7 @@ static void Brw_WriteCurrentClipboard (void)
Txt_Copy_source,TxtClipboardZone, Txt_Copy_source,TxtClipboardZone,
Txt_all_files_inside_the_root_folder); Txt_all_files_inside_the_root_folder);
Ale_ShowAlert (Ale_CLIPBOARD,Gbl.Alert.Txt); Ale_ShowA_old (Ale_CLIPBOARD,Gbl.Alert.Txt);
} }
/*****************************************************************************/ /*****************************************************************************/
@ -8003,7 +8003,7 @@ void Brw_PasteIntoFileBrowser (void)
} }
else else
/***** Write message ******/ /***** Write message ******/
Ale_ShowAlert (Ale_WARNING,Txt_Nothing_has_been_pasted_because_the_clipboard_is_empty_); Ale_ShowA_old (Ale_WARNING,Txt_Nothing_has_been_pasted_because_the_clipboard_is_empty_);
/***** Show again file browser *****/ /***** Show again file browser *****/
Brw_ShowAgainFileBrowserOrWorks (); Brw_ShowAgainFileBrowserOrWorks ();
@ -8203,7 +8203,7 @@ static void Brw_PasteClipboard (void)
Txt_Files_copied ,Pasted.NumFiles, Txt_Files_copied ,Pasted.NumFiles,
Txt_Links_copied ,Pasted.NumLinks, Txt_Links_copied ,Pasted.NumLinks,
Txt_Folders_copied,Pasted.NumFolds); Txt_Folders_copied,Pasted.NumFolds);
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt); Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
/***** Notify new files *****/ /***** Notify new files *****/
if (Pasted.NumFiles || if (Pasted.NumFiles ||
@ -8363,7 +8363,7 @@ static bool Brw_PasteTreeIntoFolder (unsigned LevelOrg,
default: default:
Lay_ShowErrorAndExit ("Can not paste unknown file type."); Lay_ShowErrorAndExit ("Can not paste unknown file type.");
} }
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt); Ale_ShowA_old (Ale_WARNING,Gbl.Alert.Txt);
CopyIsGoingSuccessful = false; CopyIsGoingSuccessful = false;
} }
else // Quota not exceeded else // Quota not exceeded
@ -8379,7 +8379,7 @@ static bool Brw_PasteTreeIntoFolder (unsigned LevelOrg,
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 : 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, Txt_The_copy_has_stopped_when_trying_to_paste_the_link_X_because_there_is_already_an_object_with_that_name,
FileNameToShow); FileNameToShow);
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt); Ale_ShowA_old (Ale_WARNING,Gbl.Alert.Txt);
CopyIsGoingSuccessful = false; CopyIsGoingSuccessful = false;
} }
else // Destination file does not exist else // Destination file does not exist
@ -8397,7 +8397,7 @@ static bool Brw_PasteTreeIntoFolder (unsigned LevelOrg,
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), 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, 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); FileNameToShow);
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt); Ale_ShowA_old (Ale_WARNING,Gbl.Alert.Txt);
CopyIsGoingSuccessful = false; CopyIsGoingSuccessful = false;
} }
} }
@ -8413,7 +8413,7 @@ static bool Brw_PasteTreeIntoFolder (unsigned LevelOrg,
FileType == Brw_IS_FILE ? Txt_The_copy_has_stopped_when_trying_to_paste_the_file_X_because_it_would_exceed_the_disk_quota : 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, Txt_The_copy_has_stopped_when_trying_to_paste_the_link_X_because_it_would_exceed_the_disk_quota,
FileNameToShow); FileNameToShow);
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt); Ale_ShowA_old (Ale_WARNING,Gbl.Alert.Txt);
CopyIsGoingSuccessful = false; CopyIsGoingSuccessful = false;
} }
else // Quota not exceeded else // Quota not exceeded
@ -8456,7 +8456,7 @@ static bool Brw_PasteTreeIntoFolder (unsigned LevelOrg,
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), 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, Txt_The_copy_has_stopped_when_trying_to_paste_the_folder_X_because_it_would_exceed_the_disk_quota,
FileNameToShow); FileNameToShow);
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt); Ale_ShowA_old (Ale_WARNING,Gbl.Alert.Txt);
CopyIsGoingSuccessful = false; CopyIsGoingSuccessful = false;
} }
else // Quota not exceded else // Quota not exceded
@ -8586,7 +8586,7 @@ static void Brw_PutFormToCreateAFolder (const char FileNameToShow[NAME_MAX + 1])
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
Txt_You_can_create_a_new_folder_inside_the_folder_X, Txt_You_can_create_a_new_folder_inside_the_folder_X,
FileNameToShow); FileNameToShow);
Ale_ShowAlert (Ale_INFO,Gbl.Alert.Txt); Ale_ShowA_old (Ale_INFO,Gbl.Alert.Txt);
/***** Folder *****/ /***** Folder *****/
fprintf (Gbl.F.Out,"<label class=\"%s\">" fprintf (Gbl.F.Out,"<label class=\"%s\">"
@ -8626,7 +8626,7 @@ static void Brw_PutFormToUploadFilesUsingDropzone (const char *FileNameToShow)
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
Txt_or_you_can_upload_new_files_to_the_folder_X, Txt_or_you_can_upload_new_files_to_the_folder_X,
FileNameToShow); FileNameToShow);
Ale_ShowAlert (Ale_INFO,Gbl.Alert.Txt); Ale_ShowA_old (Ale_INFO,Gbl.Alert.Txt);
/***** Form to upload files using the library Dropzone.js *****/ /***** Form to upload files using the library Dropzone.js *****/
// Use min-height:125px; or other number to stablish the height? // Use min-height:125px; or other number to stablish the height?
@ -8689,7 +8689,7 @@ static void Brw_PutFormToUploadOneFileClassic (const char *FileNameToShow)
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
Txt_or_you_can_upload_a_new_file_to_the_folder_X, Txt_or_you_can_upload_a_new_file_to_the_folder_X,
FileNameToShow); FileNameToShow);
Ale_ShowAlert (Ale_INFO,Gbl.Alert.Txt); Ale_ShowA_old (Ale_INFO,Gbl.Alert.Txt);
/***** Form to upload one files using the classic way *****/ /***** Form to upload one files using the classic way *****/
Frm_StartForm (Brw_ActUploadFileClassic[Gbl.FileBrowser.Type]); Frm_StartForm (Brw_ActUploadFileClassic[Gbl.FileBrowser.Type]);
@ -8733,7 +8733,7 @@ static void Brw_PutFormToPasteAFileOrFolder (const char *FileNameToShow)
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
Txt_or_you_can_make_a_file_copy_to_the_folder_X, Txt_or_you_can_make_a_file_copy_to_the_folder_X,
FileNameToShow); FileNameToShow);
Ale_ShowAlert (Ale_INFO,Gbl.Alert.Txt); Ale_ShowA_old (Ale_INFO,Gbl.Alert.Txt);
/***** Send button and end box *****/ /***** Send button and end box *****/
Box_EndBoxWithButton (Btn_CREATE_BUTTON,Txt_Paste); Box_EndBoxWithButton (Btn_CREATE_BUTTON,Txt_Paste);
@ -8770,7 +8770,7 @@ static void Brw_PutFormToCreateALink (const char *FileNameToShow)
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
Txt_or_you_can_create_a_new_link_inside_the_folder_X, Txt_or_you_can_create_a_new_link_inside_the_folder_X,
FileNameToShow); FileNameToShow);
Ale_ShowAlert (Ale_INFO,Gbl.Alert.Txt); Ale_ShowA_old (Ale_INFO,Gbl.Alert.Txt);
/***** URL *****/ /***** URL *****/
fprintf (Gbl.F.Out,"<table>" fprintf (Gbl.F.Out,"<table>"
@ -8861,7 +8861,7 @@ void Brw_RecFolderFileBrowser (void)
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
Txt_Can_not_create_the_folder_X_because_it_would_exceed_the_disk_quota, Txt_Can_not_create_the_folder_X_because_it_would_exceed_the_disk_quota,
Gbl.FileBrowser.NewFilFolLnkName); Gbl.FileBrowser.NewFilFolLnkName);
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt); Ale_ShowA_old (Ale_WARNING,Gbl.Alert.Txt);
} }
else else
{ {
@ -8890,7 +8890,7 @@ void Brw_RecFolderFileBrowser (void)
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
Txt_The_folder_X_has_been_created_inside_the_folder_Y, Txt_The_folder_X_has_been_created_inside_the_folder_Y,
Gbl.FileBrowser.NewFilFolLnkName,FileNameToShow); Gbl.FileBrowser.NewFilFolLnkName,FileNameToShow);
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt); Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
} }
} }
else else
@ -8901,7 +8901,7 @@ void Brw_RecFolderFileBrowser (void)
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), 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, Txt_Can_not_create_the_folder_X_because_there_is_already_a_folder_or_a_file_with_that_name,
Gbl.FileBrowser.NewFilFolLnkName); Gbl.FileBrowser.NewFilFolLnkName);
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt); Ale_ShowA_old (Ale_WARNING,Gbl.Alert.Txt);
break; break;
case EACCES: case EACCES:
Lay_ShowErrorAndExit ("Write forbidden."); Lay_ShowErrorAndExit ("Write forbidden.");
@ -8913,7 +8913,7 @@ void Brw_RecFolderFileBrowser (void)
} }
} }
else // Folder name not valid else // Folder name not valid
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt); Ale_ShowA_old (Ale_WARNING,Gbl.AlertToShowLater.Txt);
} }
else else
Lay_ShowErrorAndExit (Txt_You_can_not_create_folders_here); // It's difficult, but not impossible that a user sees this message Lay_ShowErrorAndExit (Txt_You_can_not_create_folders_here); // It's difficult, but not impossible that a user sees this message
@ -8992,7 +8992,7 @@ void Brw_RenFolderFileBrowser (void)
Lay_ShowErrorAndExit ("Can not rename folder."); Lay_ShowErrorAndExit ("Can not rename folder.");
break; break;
} }
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt); Ale_ShowA_old (Ale_WARNING,Gbl.Alert.Txt);
} }
else // Success else // Success
{ {
@ -9021,7 +9021,7 @@ void Brw_RenFolderFileBrowser (void)
Txt_The_folder_name_X_has_changed_to_Y, Txt_The_folder_name_X_has_changed_to_Y,
Gbl.FileBrowser.FilFolLnkName, Gbl.FileBrowser.FilFolLnkName,
Gbl.FileBrowser.NewFilFolLnkName); Gbl.FileBrowser.NewFilFolLnkName);
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt); Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
} }
} }
@ -9030,11 +9030,11 @@ void Brw_RenFolderFileBrowser (void)
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
Txt_The_folder_name_X_has_not_changed, Txt_The_folder_name_X_has_not_changed,
Gbl.FileBrowser.FilFolLnkName); Gbl.FileBrowser.FilFolLnkName);
Ale_ShowAlert (Ale_INFO,Gbl.Alert.Txt); Ale_ShowA_old (Ale_INFO,Gbl.Alert.Txt);
} }
} }
else // Folder name not valid else // Folder name not valid
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt); Ale_ShowA_old (Ale_WARNING,Gbl.AlertToShowLater.Txt);
} }
else else
Lay_ShowErrorAndExit (Txt_You_can_not_rename_this_folder); Lay_ShowErrorAndExit (Txt_You_can_not_rename_this_folder);
@ -9138,7 +9138,7 @@ static bool Brw_RcvFileInFileBrw (Brw_UploadType_t UploadType)
/***** Check if uploading this kind of file is allowed *****/ /***** Check if uploading this kind of file is allowed *****/
if (Brw_CheckIfUploadIsAllowed (MIMEType)) // Gbl.Alert.Txt contains feedback text if (Brw_CheckIfUploadIsAllowed (MIMEType)) // Gbl.Alert.Txt contains feedback text
{ {
if (Str_ConvertFilFolLnkNameToValid (Gbl.FileBrowser.NewFilFolLnkName)) // Gbl.Alert.Txt contains feedback text if (Str_ConvertFilFolLnkNameToValid (Gbl.FileBrowser.NewFilFolLnkName)) // Gbl.AlertToShowLater.Txt contains feedback text
{ {
/* Gbl.FileBrowser.NewFilFolLnkName holds the name of the new file */ /* Gbl.FileBrowser.NewFilFolLnkName holds the name of the new file */
snprintf (Path,sizeof (Path), snprintf (Path,sizeof (Path),
@ -9376,7 +9376,7 @@ void Brw_RecLinkFileBrowser (void)
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), 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, Txt_Can_not_create_the_link_X_because_there_is_already_a_folder_or_a_link_with_that_name,
FileName); FileName);
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt); Ale_ShowA_old (Ale_WARNING,Gbl.Alert.Txt);
} }
else // URL file does not exist else // URL file does not exist
{ {
@ -9398,7 +9398,7 @@ void Brw_RecLinkFileBrowser (void)
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
Txt_Can_not_create_the_link_X_because_it_would_exceed_the_disk_quota, Txt_Can_not_create_the_link_X_because_it_would_exceed_the_disk_quota,
FileName); FileName);
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt); Ale_ShowA_old (Ale_WARNING,Gbl.Alert.Txt);
} }
else else
{ {
@ -9428,7 +9428,7 @@ void Brw_RecLinkFileBrowser (void)
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
Txt_The_link_X_has_been_placed_inside_the_folder_Y, Txt_The_link_X_has_been_placed_inside_the_folder_Y,
FileName,FileNameToShow); FileName,FileNameToShow);
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt); Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
FileMetadata.FilCod = FilCod; FileMetadata.FilCod = FilCod;
Brw_GetFileMetadataByCod (&FileMetadata); Brw_GetFileMetadataByCod (&FileMetadata);
@ -9461,10 +9461,10 @@ void Brw_RecLinkFileBrowser (void)
} }
} }
else // Link URL not valid else // Link URL not valid
Ale_ShowAlert (Ale_WARNING,Txt_UPLOAD_FILE_Invalid_link); Ale_ShowA_old (Ale_WARNING,Txt_UPLOAD_FILE_Invalid_link);
} }
else // Link URL not valid else // Link URL not valid
Ale_ShowAlert (Ale_WARNING,Txt_UPLOAD_FILE_Invalid_link); Ale_ShowA_old (Ale_WARNING,Txt_UPLOAD_FILE_Invalid_link);
} }
else else
Lay_ShowErrorAndExit (Txt_You_can_not_create_links_here); // It's difficult, but not impossible that a user sees this message Lay_ShowErrorAndExit (Txt_You_can_not_create_links_here); // It's difficult, but not impossible that a user sees this message
@ -9567,7 +9567,7 @@ void Brw_SetDocumentAsVisible (void)
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
Txt_FILE_FOLDER_OR_LINK_X_is_now_visible, Txt_FILE_FOLDER_OR_LINK_X_is_now_visible,
FileNameToShow); FileNameToShow);
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt); Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
/***** Show again the file browser *****/ /***** Show again the file browser *****/
Brw_ShowAgainFileBrowserOrWorks (); Brw_ShowAgainFileBrowserOrWorks ();
@ -9605,7 +9605,7 @@ void Brw_SetDocumentAsHidden (void)
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
Txt_FILE_FOLDER_OR_LINK_X_is_now_hidden, Txt_FILE_FOLDER_OR_LINK_X_is_now_hidden,
FileNameToShow); FileNameToShow);
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt); Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
/***** Show again the file browser *****/ /***** Show again the file browser *****/
Brw_ShowAgainFileBrowserOrWorks (); Brw_ShowAgainFileBrowserOrWorks ();
@ -10088,7 +10088,7 @@ void Brw_ShowFileMetadata (void)
break; break;
} }
Ale_ShowAlert (Ale_WARNING,Txt_The_file_of_folder_no_longer_exists_or_is_now_hidden); Ale_ShowA_old (Ale_WARNING,Txt_The_file_of_folder_no_longer_exists_or_is_now_hidden);
} }
/***** Show again the file browser *****/ /***** Show again the file browser *****/
@ -10247,7 +10247,7 @@ void Brw_DownloadFile (void)
break; break;
} }
Ale_ShowAlert (Ale_WARNING,Txt_The_file_of_folder_no_longer_exists_or_is_now_hidden); Ale_ShowA_old (Ale_WARNING,Txt_The_file_of_folder_no_longer_exists_or_is_now_hidden);
/***** Show again the file browser *****/ /***** Show again the file browser *****/
Brw_ShowAgainFileBrowserOrWorks (); Brw_ShowAgainFileBrowserOrWorks ();
@ -10574,7 +10574,7 @@ void Brw_ChgFileMetadata (void)
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
Txt_The_properties_of_file_X_have_been_saved, Txt_The_properties_of_file_X_have_been_saved,
Gbl.FileBrowser.FilFolLnkName); Gbl.FileBrowser.FilFolLnkName);
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt); Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
} }
else else
{ {
@ -10582,7 +10582,7 @@ void Brw_ChgFileMetadata (void)
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
Txt_You_dont_have_permission_to_change_the_properties_of_file_X, Txt_You_dont_have_permission_to_change_the_properties_of_file_X,
Gbl.FileBrowser.FilFolLnkName); Gbl.FileBrowser.FilFolLnkName);
Ale_ShowAlert (Ale_ERROR,Gbl.Alert.Txt); Ale_ShowA_old (Ale_ERROR,Gbl.Alert.Txt);
} }
/***** Show again the file browser *****/ /***** Show again the file browser *****/
@ -12577,7 +12577,7 @@ void Brw_RemoveOldFilesBriefcase (void)
Txt_Files_removed ,Removed.NumFiles, Txt_Files_removed ,Removed.NumFiles,
Txt_Links_removed ,Removed.NumLinks, Txt_Links_removed ,Removed.NumLinks,
Txt_Folders_removed,Removed.NumFolds); Txt_Folders_removed,Removed.NumFolds);
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt); Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
} }
/***** Show again the file browser *****/ /***** Show again the file browser *****/

View File

@ -167,7 +167,7 @@ void Fol_SuggestUsrsToFollowMainZone (void)
Box_EndBoxTable (); Box_EndBoxTable ();
} }
else else
Ale_ShowAlert (Ale_INFO,Txt_No_user_to_whom_you_can_follow_Try_again_later); Ale_ShowA_old (Ale_INFO,Txt_No_user_to_whom_you_can_follow_Try_again_later);
/***** Free structure that stores the query result *****/ /***** Free structure that stores the query result *****/
DB_FreeMySQLResult (&mysql_res); DB_FreeMySQLResult (&mysql_res);
@ -653,7 +653,7 @@ void Fol_ListFollowing (void)
if (Usr_ChkUsrCodAndGetAllUsrDataFromUsrCod (&Gbl.Usrs.Other.UsrDat)) if (Usr_ChkUsrCodAndGetAllUsrDataFromUsrCod (&Gbl.Usrs.Other.UsrDat))
Fol_ListFollowingUsr (&Gbl.Usrs.Other.UsrDat); Fol_ListFollowingUsr (&Gbl.Usrs.Other.UsrDat);
else else
Ale_ShowAlert (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_); Ale_ShowA_old (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
} }
else // If user not specified, view my profile else // If user not specified, view my profile
Fol_ListFollowingUsr (&Gbl.Usrs.Me.UsrDat); Fol_ListFollowingUsr (&Gbl.Usrs.Me.UsrDat);
@ -719,7 +719,7 @@ static void Fol_ListFollowingUsr (struct UsrData *UsrDat)
DB_FreeMySQLResult (&mysql_res); DB_FreeMySQLResult (&mysql_res);
} }
else else
Ale_ShowAlert (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_); Ale_ShowA_old (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
} }
/*****************************************************************************/ /*****************************************************************************/
@ -738,7 +738,7 @@ void Fol_ListFollowers (void)
if (Usr_ChkUsrCodAndGetAllUsrDataFromUsrCod (&Gbl.Usrs.Other.UsrDat)) if (Usr_ChkUsrCodAndGetAllUsrDataFromUsrCod (&Gbl.Usrs.Other.UsrDat))
Fol_ListFollowersUsr (&Gbl.Usrs.Other.UsrDat); Fol_ListFollowersUsr (&Gbl.Usrs.Other.UsrDat);
else else
Ale_ShowAlert (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_); Ale_ShowA_old (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
} }
else // If user not specified, view my profile else // If user not specified, view my profile
Fol_ListFollowersUsr (&Gbl.Usrs.Me.UsrDat); Fol_ListFollowersUsr (&Gbl.Usrs.Me.UsrDat);
@ -812,7 +812,7 @@ static void Fol_ListFollowersUsr (struct UsrData *UsrDat)
Gbl.Usrs.Me.UsrDat.UsrCod); Gbl.Usrs.Me.UsrDat.UsrCod);
} }
else else
Ale_ShowAlert (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_); Ale_ShowA_old (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
} }
/*****************************************************************************/ /*****************************************************************************/

View File

@ -972,7 +972,7 @@ static void For_ShowPostsOfAThread (Ale_AlertType_t AlertType,const char *Messag
Lay_StartSection (For_FORUM_POSTS_SECTION_ID); Lay_StartSection (For_FORUM_POSTS_SECTION_ID);
if (Message) if (Message)
if (Message[0]) if (Message[0])
Ale_ShowAlert (AlertType,Message); Ale_ShowA_old (AlertType,Message);
/***** Start box *****/ /***** Start box *****/
snprintf (FrameTitle,sizeof (FrameTitle), snprintf (FrameTitle,sizeof (FrameTitle),
@ -2541,7 +2541,7 @@ static void For_ShowForumThreadsHighlightingOneThread (long ThrCodHighlighted,
Lay_StartSection (For_FORUM_THREADS_SECTION_ID); Lay_StartSection (For_FORUM_THREADS_SECTION_ID);
if (Message) if (Message)
if (Message[0]) if (Message[0])
Ale_ShowAlert (AlertType,Message); Ale_ShowA_old (AlertType,Message);
/***** Start box for threads of this forum *****/ /***** Start box for threads of this forum *****/
snprintf (FrameTitle,sizeof (FrameTitle), snprintf (FrameTitle,sizeof (FrameTitle),

View File

@ -277,7 +277,7 @@ static void Gam_ListAllGames (void)
Tbl_EndTable (); Tbl_EndTable ();
} }
else // No games created else // No games created
Ale_ShowAlert (Ale_INFO,Txt_No_games); Ale_ShowA_old (Ale_INFO,Txt_No_games);
/***** Button to create a new game *****/ /***** Button to create a new game *****/
if (Gam_CheckIfICanCreateGame ()) if (Gam_CheckIfICanCreateGame ())
@ -1552,7 +1552,7 @@ void Gam_RemoveGame (void)
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
Txt_Game_X_removed, Txt_Game_X_removed,
Game.Title); Game.Title);
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt); Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
/***** Show games again *****/ /***** Show games again *****/
Gam_ListAllGames (); Gam_ListAllGames ();
@ -1585,7 +1585,7 @@ void Gam_AskResetGame (void)
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
Txt_Do_you_really_want_to_reset_the_game_X, Txt_Do_you_really_want_to_reset_the_game_X,
Game.Title); Game.Title);
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt); Ale_ShowA_old (Ale_WARNING,Gbl.Alert.Txt);
/***** Button of confirmation of reset *****/ /***** Button of confirmation of reset *****/
Gbl.Games.CurrentGamCod = Game.GamCod; Gbl.Games.CurrentGamCod = Game.GamCod;
@ -1644,7 +1644,7 @@ void Gam_ResetGame (void)
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
Txt_Game_X_reset, Txt_Game_X_reset,
Game.Title); Game.Title);
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt); Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
/***** Show games again *****/ /***** Show games again *****/
Gam_ListAllGames (); Gam_ListAllGames ();
@ -1677,7 +1677,7 @@ void Gam_HideGame (void)
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
Txt_Game_X_is_now_hidden, Txt_Game_X_is_now_hidden,
Game.Title); Game.Title);
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt); Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
/***** Show games again *****/ /***** Show games again *****/
Gam_ListAllGames (); Gam_ListAllGames ();
@ -1710,7 +1710,7 @@ void Gam_UnhideGame (void)
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
Txt_Game_X_is_now_visible, Txt_Game_X_is_now_visible,
Game.Title); Game.Title);
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt); Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
/***** Show games again *****/ /***** Show games again *****/
Gam_ListAllGames (); Gam_ListAllGames ();
@ -2153,13 +2153,13 @@ void Gam_RecFormGame (void)
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
Txt_Already_existed_a_game_with_the_title_X, Txt_Already_existed_a_game_with_the_title_X,
NewGame.Title); NewGame.Title);
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt); Ale_ShowA_old (Ale_WARNING,Gbl.Alert.Txt);
} }
} }
else // If there is not a game title else // If there is not a game title
{ {
NewGameIsCorrect = false; NewGameIsCorrect = false;
Ale_ShowAlert (Ale_WARNING,Txt_You_must_specify_the_title_of_the_game); Ale_ShowA_old (Ale_WARNING,Txt_You_must_specify_the_title_of_the_game);
} }
/***** Create a new game or update an existing one *****/ /***** Create a new game or update an existing one *****/
@ -2217,7 +2217,7 @@ static void Gam_CreateGame (struct Game *Game,const char *Txt)
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
Txt_Created_new_game_X, Txt_Created_new_game_X,
Game->Title); Game->Title);
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt); Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
} }
/*****************************************************************************/ /*****************************************************************************/
@ -2254,7 +2254,7 @@ static void Gam_UpdateGame (struct Game *Game,const char *Txt)
Gam_CreateGrps (Game->GamCod); Gam_CreateGrps (Game->GamCod);
/***** Write success message *****/ /***** Write success message *****/
Ale_ShowAlert (Ale_SUCCESS,Txt_The_game_has_been_modified); Ale_ShowA_old (Ale_SUCCESS,Txt_The_game_has_been_modified);
} }
/*****************************************************************************/ /*****************************************************************************/
@ -2792,7 +2792,7 @@ static void Gam_ListGameQuestions (struct Game *Game)
} }
} }
else // This game has no questions else // This game has no questions
Ale_ShowAlert (Ale_INFO,Txt_This_game_has_no_questions); Ale_ShowA_old (Ale_INFO,Txt_This_game_has_no_questions);
if (Game->Status.ICanEdit && // I can edit if (Game->Status.ICanEdit && // I can edit
(!NumQsts || // This game has no questions (!NumQsts || // This game has no questions
@ -3034,7 +3034,7 @@ void Gam_AddTstQuestionsToGame (void)
/* Check number of questions */ /* Check number of questions */
if (Gam_CountNumQuestionsInList () == 0) // If no questions selected... if (Gam_CountNumQuestionsInList () == 0) // If no questions selected...
{ // ...write warning alert { // ...write warning alert
Ale_ShowAlert (Ale_WARNING,Txt_You_must_select_one_ore_more_questions); Ale_ShowA_old (Ale_WARNING,Txt_You_must_select_one_ore_more_questions);
// TODO: Show form again!!! // TODO: Show form again!!!
} }
@ -3307,7 +3307,7 @@ void Gam_RemoveQst (void)
Game.GamCod,QstInd); Game.GamCod,QstInd);
/***** Write message *****/ /***** Write message *****/
Ale_ShowAlert (Ale_SUCCESS,Txt_Question_removed); Ale_ShowA_old (Ale_SUCCESS,Txt_Question_removed);
/***** Show current game *****/ /***** Show current game *****/
Gam_ShowOneGame (Game.GamCod, Gam_ShowOneGame (Game.GamCod,
@ -3353,7 +3353,7 @@ void Gam_MoveUpQst (void)
(unsigned) QstIndTop,(unsigned) QstIndBottom); (unsigned) QstIndTop,(unsigned) QstIndBottom);
/* Success alert */ /* Success alert */
Ale_ShowAlert (Ale_SUCCESS,Txt_The_question_has_been_moved_up); Ale_ShowA_old (Ale_SUCCESS,Txt_The_question_has_been_moved_up);
} }
/***** Show current game *****/ /***** Show current game *****/
@ -3405,7 +3405,7 @@ void Gam_MoveDownQst (void)
(unsigned) QstIndTop,(unsigned) QstIndBottom); (unsigned) QstIndTop,(unsigned) QstIndBottom);
/* Success alert */ /* Success alert */
Ale_ShowAlert (Ale_SUCCESS,Txt_The_question_has_been_moved_down); Ale_ShowA_old (Ale_SUCCESS,Txt_The_question_has_been_moved_down);
} }
/***** Show current game *****/ /***** Show current game *****/
@ -3576,7 +3576,7 @@ static void Gam_PlayGameShowQuestionAndAnswers (bool ShowAnswers)
" AND gam_questions.QstInd=%u" " AND gam_questions.QstInd=%u"
" AND gam_questions.QstCod=tst_questions.QstCod", " AND gam_questions.QstCod=tst_questions.QstCod",
Game.GamCod,QstInd)) Game.GamCod,QstInd))
Ale_ShowAlert (Ale_WARNING,"Questions doesn't exist."); Ale_ShowA_old (Ale_WARNING,"Questions doesn't exist.");
row = mysql_fetch_row (mysql_res); row = mysql_fetch_row (mysql_res);
/***** Show question *****/ /***** Show question *****/
@ -3687,12 +3687,12 @@ void Gam_ReceiveGameAnswers (void)
/***** Check if I have no answered this game formerly *****/ /***** Check if I have no answered this game formerly *****/
if (Game.Status.IHaveAnswered) if (Game.Status.IHaveAnswered)
Ale_ShowAlert (Ale_WARNING,Txt_You_already_played_this_game_before); Ale_ShowA_old (Ale_WARNING,Txt_You_already_played_this_game_before);
else else
{ {
/***** Receive and store user's answers *****/ /***** Receive and store user's answers *****/
Gam_ReceiveAndStoreUserAnswersToAGame (Game.GamCod); Gam_ReceiveAndStoreUserAnswersToAGame (Game.GamCod);
Ale_ShowAlert (Ale_INFO,Txt_Thanks_for_playing_the_game); Ale_ShowA_old (Ale_INFO,Txt_Thanks_for_playing_the_game);
} }
/***** Show current game *****/ /***** Show current game *****/

View File

@ -238,7 +238,7 @@ static void Grp_ReqEditGroupsInternal1 (Ale_AlertType_t AlertTypeGroupTypes,cons
/***** Show optional alert *****/ /***** Show optional alert *****/
if (MessageGroupTypes) if (MessageGroupTypes)
if (MessageGroupTypes[0]) if (MessageGroupTypes[0])
Ale_ShowAlert (AlertTypeGroupTypes,MessageGroupTypes); Ale_ShowA_old (AlertTypeGroupTypes,MessageGroupTypes);
/***** Put form to edit group types *****/ /***** Put form to edit group types *****/
Grp_EditGroupTypes (); Grp_EditGroupTypes ();
@ -255,7 +255,7 @@ static void Grp_ReqEditGroupsInternal2 (Ale_AlertType_t AlertTypeGroups,const ch
/***** Show optional alert *****/ /***** Show optional alert *****/
if (MessageGroups) if (MessageGroups)
if (MessageGroups[0]) if (MessageGroups[0])
Ale_ShowAlert (AlertTypeGroups,MessageGroups); Ale_ShowA_old (AlertTypeGroups,MessageGroups);
/***** Put form to edit groups *****/ /***** Put form to edit groups *****/
if (Gbl.CurrentCrs.Grps.GrpTypes.Num) // If there are group types... if (Gbl.CurrentCrs.Grps.GrpTypes.Num) // If there are group types...
@ -296,7 +296,7 @@ static void Grp_EditGroupTypes (void)
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
Txt_There_are_no_types_of_group_in_the_course_X, Txt_There_are_no_types_of_group_in_the_course_X,
Gbl.CurrentCrs.Crs.ShrtName); Gbl.CurrentCrs.Crs.ShrtName);
Ale_ShowAlert (Ale_INFO,Gbl.Alert.Txt); Ale_ShowA_old (Ale_INFO,Gbl.Alert.Txt);
} }
/***** End box *****/ /***** End box *****/
@ -328,7 +328,7 @@ static void Grp_EditGroups (void)
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
Txt_No_groups_have_been_created_in_the_course_X, Txt_No_groups_have_been_created_in_the_course_X,
Gbl.CurrentCrs.Crs.ShrtName); Gbl.CurrentCrs.Crs.ShrtName);
Ale_ShowAlert (Ale_INFO,Gbl.Alert.Txt); Ale_ShowA_old (Ale_INFO,Gbl.Alert.Txt);
} }
/***** End box *****/ /***** End box *****/
@ -1128,7 +1128,7 @@ void Grp_RegisterUsrIntoGroups (struct UsrData *UsrDat,struct ListCodGrps *LstGr
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), 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, 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); UsrDat->FullName,Gbl.CurrentCrs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp].GrpTypName);
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt); Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
} }
if (!AlreadyRegisteredInGrp) // If the user does not belong to the selected group if (!AlreadyRegisteredInGrp) // If the user does not belong to the selected group
@ -1138,7 +1138,7 @@ void Grp_RegisterUsrIntoGroups (struct UsrData *UsrDat,struct ListCodGrps *LstGr
Txt_THE_USER_X_has_been_enroled_in_the_group_of_type_Y_Z, Txt_THE_USER_X_has_been_enroled_in_the_group_of_type_Y_Z,
UsrDat->FullName,Gbl.CurrentCrs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp].GrpTypName, UsrDat->FullName,Gbl.CurrentCrs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp].GrpTypName,
Gbl.CurrentCrs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp].LstGrps[NumGrpThisType].GrpName); Gbl.CurrentCrs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp].LstGrps[NumGrpThisType].GrpName);
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt); Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
} }
break; // Once we know the type of a selected group, it's not necessary to check the rest of types break; // Once we know the type of a selected group, it's not necessary to check the rest of types
@ -1197,7 +1197,7 @@ unsigned Grp_RemoveUsrFromGroups (struct UsrData *UsrDat,struct ListCodGrps *Lst
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
Txt_THE_USER_X_has_been_removed_from_Y_groups, Txt_THE_USER_X_has_been_removed_from_Y_groups,
UsrDat->FullName,NumGrpsHeIsRemoved); UsrDat->FullName,NumGrpsHeIsRemoved);
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt); Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
/***** Free the list of groups of this type to which the user belonged *****/ /***** Free the list of groups of this type to which the user belonged *****/
Grp_FreeListCodGrp (&LstGrpsHeBelongs); Grp_FreeListCodGrp (&LstGrpsHeBelongs);
@ -1869,7 +1869,7 @@ void Grp_ShowLstGrpsToChgMyGrps (void)
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
Txt_No_groups_have_been_created_in_the_course_X, Txt_No_groups_have_been_created_in_the_course_X,
Gbl.CurrentCrs.Crs.FullName); Gbl.CurrentCrs.Crs.FullName);
Ale_ShowAlert (Ale_INFO,Gbl.Alert.Txt); Ale_ShowA_old (Ale_INFO,Gbl.Alert.Txt);
/***** Button to create group *****/ /***** Button to create group *****/
if (ICanEdit) if (ICanEdit)
@ -1925,7 +1925,7 @@ static void Grp_ShowWarningToStdsToChangeGrps (void)
GrpTyp->MultipleEnrolment ? Txt_You_have_to_register_compulsorily_at_least_in_one_group_of_type_X : 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, Txt_You_have_to_register_compulsorily_in_one_group_of_type_X,
GrpTyp->GrpTypName); GrpTyp->GrpTypName);
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt); Ale_ShowA_old (Ale_WARNING,Gbl.Alert.Txt);
} }
else else
{ {
@ -1933,7 +1933,7 @@ static void Grp_ShowWarningToStdsToChangeGrps (void)
GrpTyp->MultipleEnrolment ? Txt_You_can_register_voluntarily_in_one_or_more_groups_of_type_X : 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, Txt_You_can_register_voluntarily_in_one_group_of_type_X,
GrpTyp->GrpTypName); GrpTyp->GrpTypName);
Ale_ShowAlert (Ale_INFO,Gbl.Alert.Txt); Ale_ShowA_old (Ale_INFO,Gbl.Alert.Txt);
} }
} }
} }
@ -4644,7 +4644,7 @@ void Grp_ChangeOpenTimeGrpTyp (void)
Gbl.CurrentCrs.Grps.GrpTyp.GrpTypCod); Gbl.CurrentCrs.Grps.GrpTyp.GrpTypCod);
/***** Write message to show the change made *****/ /***** Write message to show the change made *****/
Ale_ShowAlert (Ale_SUCCESS,Txt_The_date_time_of_opening_of_groups_has_changed); Ale_ShowA_old (Ale_SUCCESS,Txt_The_date_time_of_opening_of_groups_has_changed);
/***** Show the form again *****/ /***** Show the form again *****/
Grp_ReqEditGroupsInternal (Ale_SUCCESS,Gbl.Alert.Txt, Grp_ReqEditGroupsInternal (Ale_SUCCESS,Gbl.Alert.Txt,

View File

@ -127,7 +127,7 @@ void Hlp_ShowHelpWhatWouldYouLikeToDo (void)
Txt_You_are_not_enroled_in_any_course[Gbl.Usrs.Me.UsrDat.Sex], 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, Txt_You_can_search_for_courses_select_them_and_request_your_enrolment_in_them,
Txt_If_you_can_not_find_your_institution_your_centre_your_degree_or_your_courses_you_can_create_them); Txt_If_you_can_not_find_your_institution_your_centre_your_degree_or_your_courses_you_can_create_them);
Ale_ShowAlert (Ale_INFO,Gbl.Alert.Txt); Ale_ShowA_old (Ale_INFO,Gbl.Alert.Txt);
} }
/***** Start box and table *****/ /***** Start box and table *****/

View File

@ -176,7 +176,7 @@ void Hld_SeeHolidays (void)
Tbl_EndTable (); Tbl_EndTable ();
} }
else // No holidays created in the current institution else // No holidays created in the current institution
Ale_ShowAlert (Ale_INFO,Txt_No_holidays); Ale_ShowA_old (Ale_INFO,Txt_No_holidays);
/***** Button to create centre *****/ /***** Button to create centre *****/
if (Gbl.Usrs.Me.Role.Logged >= Rol_INS_ADM) // Institution admin or system admin if (Gbl.Usrs.Me.Role.Logged >= Rol_INS_ADM) // Institution admin or system admin

View File

@ -545,7 +545,7 @@ void Img_MoveImageToDefinitiveDirectory (struct Image *Image)
/***** Move file *****/ /***** Move file *****/
if (rename (FileNameImgTmp,FileNameImg)) // Fail if (rename (FileNameImgTmp,FileNameImg)) // Fail
Ale_ShowAlert (Ale_ERROR,"Can not move file."); Ale_ShowA_old (Ale_ERROR,"Can not move file.");
else // Success else // Success
Image->Status = Img_FILE_MOVED; Image->Status = Img_FILE_MOVED;
} }
@ -628,7 +628,7 @@ void Img_ShowImage (struct Image *Image,
fprintf (Gbl.F.Out,"</div>"); fprintf (Gbl.F.Out,"</div>");
} }
else else
Ale_ShowAlert (Ale_WARNING,Txt_Image_not_found); Ale_ShowA_old (Ale_WARNING,Txt_Image_not_found);
} }
/*****************************************************************************/ /*****************************************************************************/

View File

@ -450,7 +450,7 @@ void Inf_ShowInfo (void)
ICanEdit ? Inf_PutIconToEditInfo : ICanEdit ? Inf_PutIconToEditInfo :
NULL, NULL,
Help[Gbl.CurrentCrs.Info.Type],Box_NOT_CLOSABLE); Help[Gbl.CurrentCrs.Info.Type],Box_NOT_CLOSABLE);
Ale_ShowAlert (Ale_INFO,Txt_No_information); Ale_ShowA_old (Ale_INFO,Txt_No_information);
if (ICanEdit) if (ICanEdit)
Inf_PutButtonToEditInfo (); Inf_PutButtonToEditInfo ();
Box_EndBox (); Box_EndBox ();
@ -597,7 +597,7 @@ void Inf_WriteMsgYouMustReadInfo (void)
NULL,Box_NOT_CLOSABLE); NULL,Box_NOT_CLOSABLE);
/***** Write message *****/ /***** Write message *****/
Ale_ShowAlert (Ale_WARNING,Txt_You_should_read_the_following_information); Ale_ShowA_old (Ale_WARNING,Txt_You_should_read_the_following_information);
/***** Write every information I must read *****/ /***** Write every information I must read *****/
fprintf (Gbl.F.Out,"<div class=\"CENTER_MIDDLE\">" fprintf (Gbl.F.Out,"<div class=\"CENTER_MIDDLE\">"
@ -642,7 +642,7 @@ void Inf_ChangeForceReadInfo (void)
Inf_SetForceReadIntoDB (MustBeRead); Inf_SetForceReadIntoDB (MustBeRead);
/***** Write message of success *****/ /***** Write message of success *****/
Ale_ShowAlert (Ale_SUCCESS, Ale_ShowA_old (Ale_SUCCESS,
MustBeRead ? Txt_Students_now_are_required_to_read_this_information : MustBeRead ? Txt_Students_now_are_required_to_read_this_information :
Txt_Students_are_no_longer_obliged_to_read_this_information); Txt_Students_are_no_longer_obliged_to_read_this_information);
@ -667,7 +667,7 @@ void Inf_ChangeIHaveReadInfo (void)
Inf_SetIHaveReadIntoDB (IHaveRead); Inf_SetIHaveReadIntoDB (IHaveRead);
/***** Write message of success *****/ /***** Write message of success *****/
Ale_ShowAlert (Ale_SUCCESS, Ale_ShowA_old (Ale_SUCCESS,
IHaveRead ? Txt_You_have_confirmed_that_you_have_read_this_information : IHaveRead ? Txt_You_have_confirmed_that_you_have_read_this_information :
Txt_You_have_eliminated_the_confirmation_that_you_have_read_this_information); Txt_You_have_eliminated_the_confirmation_that_you_have_read_this_information);
@ -2246,11 +2246,11 @@ void Inf_ReceiveURLInfo (void)
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
Txt_The_URL_X_has_been_updated, Txt_The_URL_X_has_been_updated,
Gbl.CurrentCrs.Info.URL); Gbl.CurrentCrs.Info.URL);
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt); Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
URLIsOK = true; URLIsOK = true;
} }
else else
Ale_ShowAlert (Ale_ERROR,"Error when saving URL to file."); Ale_ShowA_old (Ale_ERROR,"Error when saving URL to file.");
if (URLIsOK) if (URLIsOK)
{ {
@ -2316,7 +2316,7 @@ void Inf_ReceivePagInfo (void)
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
Txt_The_file_type_is_X_and_should_be_HTML_or_ZIP, Txt_The_file_type_is_X_and_should_be_HTML_or_ZIP,
MIMEType); MIMEType);
Ale_ShowAlert (Ale_INFO,Gbl.Alert.Txt); Ale_ShowA_old (Ale_INFO,Gbl.Alert.Txt);
} }
else else
{ {
@ -2334,11 +2334,11 @@ void Inf_ReceivePagInfo (void)
PathRelDirHTML); PathRelDirHTML);
if (Fil_EndReceptionOfFile (PathRelFileHTML,Param)) if (Fil_EndReceptionOfFile (PathRelFileHTML,Param))
{ {
Ale_ShowAlert (Ale_SUCCESS,Txt_The_HTML_file_has_been_received_successfully); Ale_ShowA_old (Ale_SUCCESS,Txt_The_HTML_file_has_been_received_successfully);
FileIsOK = true; FileIsOK = true;
} }
else else
Ale_ShowAlert (Ale_WARNING,"Error uploading file."); Ale_ShowA_old (Ale_WARNING,"Error uploading file.");
} }
else if (Str_FileIs (SourceFileName,"zip")) // .zip file else if (Str_FileIs (SourceFileName,"zip")) // .zip file
{ {
@ -2351,7 +2351,7 @@ void Inf_ReceivePagInfo (void)
if (Fil_EndReceptionOfFile (PathRelFileZIP,Param)) if (Fil_EndReceptionOfFile (PathRelFileZIP,Param))
{ {
Ale_ShowAlert (Ale_SUCCESS,Txt_The_ZIP_file_has_been_received_successfully); Ale_ShowA_old (Ale_SUCCESS,Txt_The_ZIP_file_has_been_received_successfully);
/* Uncompress ZIP */ /* Uncompress ZIP */
snprintf (StrUnzip,sizeof (StrUnzip), snprintf (StrUnzip,sizeof (StrUnzip),
@ -2365,8 +2365,8 @@ void Inf_ReceivePagInfo (void)
PathRelDirHTML); PathRelDirHTML);
if (Fil_CheckIfPathExists (PathRelFileHTML)) if (Fil_CheckIfPathExists (PathRelFileHTML))
{ {
Ale_ShowAlert (Ale_SUCCESS,Txt_The_ZIP_file_has_been_unzipped_successfully); Ale_ShowA_old (Ale_SUCCESS,Txt_The_ZIP_file_has_been_unzipped_successfully);
Ale_ShowAlert (Ale_SUCCESS,Txt_Found_an_index_html_file); Ale_ShowA_old (Ale_SUCCESS,Txt_Found_an_index_html_file);
FileIsOK = true; FileIsOK = true;
} }
else else
@ -2376,22 +2376,22 @@ void Inf_ReceivePagInfo (void)
PathRelDirHTML); PathRelDirHTML);
if (Fil_CheckIfPathExists (PathRelFileHTML)) if (Fil_CheckIfPathExists (PathRelFileHTML))
{ {
Ale_ShowAlert (Ale_SUCCESS,Txt_The_ZIP_file_has_been_unzipped_successfully); Ale_ShowA_old (Ale_SUCCESS,Txt_The_ZIP_file_has_been_unzipped_successfully);
Ale_ShowAlert (Ale_SUCCESS,Txt_Found_an_index_htm_file); Ale_ShowA_old (Ale_SUCCESS,Txt_Found_an_index_htm_file);
FileIsOK = true; FileIsOK = true;
} }
else else
Ale_ShowAlert (Ale_WARNING,Txt_No_file_index_html_index_htm_found_within_the_ZIP_file); Ale_ShowA_old (Ale_WARNING,Txt_No_file_index_html_index_htm_found_within_the_ZIP_file);
} }
} }
else else
Lay_ShowErrorAndExit ("Can not unzip file."); Lay_ShowErrorAndExit ("Can not unzip file.");
} }
else else
Ale_ShowAlert (Ale_WARNING,"Error uploading file."); Ale_ShowA_old (Ale_WARNING,"Error uploading file.");
} }
else else
Ale_ShowAlert (Ale_WARNING,Txt_The_file_type_should_be_HTML_or_ZIP); Ale_ShowA_old (Ale_WARNING,Txt_The_file_type_should_be_HTML_or_ZIP);
} }
if (FileIsOK) if (FileIsOK)
@ -2420,7 +2420,7 @@ void Inf_EditorCourseInfo (void)
{ {
extern const char *Txt_The_integrated_editor_is_not_yet_available; extern const char *Txt_The_integrated_editor_is_not_yet_available;
Ale_ShowAlert (Ale_WARNING,Txt_The_integrated_editor_is_not_yet_available); Ale_ShowA_old (Ale_WARNING,Txt_The_integrated_editor_is_not_yet_available);
/***** Show again the form to select and send course info *****/ /***** Show again the form to select and send course info *****/
Inf_FormsToSelSendInfo (); Inf_FormsToSelSendInfo ();
@ -2434,7 +2434,7 @@ void Inf_EditorTeachingGuide (void)
{ {
extern const char *Txt_The_integrated_editor_is_not_yet_available; extern const char *Txt_The_integrated_editor_is_not_yet_available;
Ale_ShowAlert (Ale_WARNING,Txt_The_integrated_editor_is_not_yet_available); Ale_ShowA_old (Ale_WARNING,Txt_The_integrated_editor_is_not_yet_available);
/***** Show again the form to select and send course info *****/ /***** Show again the form to select and send course info *****/
Inf_FormsToSelSendInfo (); Inf_FormsToSelSendInfo ();
@ -2448,7 +2448,7 @@ void Inf_EditorBibliography (void)
{ {
extern const char *Txt_The_integrated_editor_is_not_yet_available; extern const char *Txt_The_integrated_editor_is_not_yet_available;
Ale_ShowAlert (Ale_WARNING,Txt_The_integrated_editor_is_not_yet_available); Ale_ShowA_old (Ale_WARNING,Txt_The_integrated_editor_is_not_yet_available);
/***** Show again the form to select and send course info *****/ /***** Show again the form to select and send course info *****/
Inf_FormsToSelSendInfo (); Inf_FormsToSelSendInfo ();
@ -2462,7 +2462,7 @@ void Inf_EditorFAQ (void)
{ {
extern const char *Txt_The_integrated_editor_is_not_yet_available; extern const char *Txt_The_integrated_editor_is_not_yet_available;
Ale_ShowAlert (Ale_WARNING,Txt_The_integrated_editor_is_not_yet_available); Ale_ShowA_old (Ale_WARNING,Txt_The_integrated_editor_is_not_yet_available);
/***** Show again the form to select and send course info *****/ /***** Show again the form to select and send course info *****/
Inf_FormsToSelSendInfo (); Inf_FormsToSelSendInfo ();
@ -2476,7 +2476,7 @@ void Inf_EditorLinks (void)
{ {
extern const char *Txt_The_integrated_editor_is_not_yet_available; extern const char *Txt_The_integrated_editor_is_not_yet_available;
Ale_ShowAlert (Ale_WARNING,Txt_The_integrated_editor_is_not_yet_available); Ale_ShowA_old (Ale_WARNING,Txt_The_integrated_editor_is_not_yet_available);
/***** Show again the form to select and send course info *****/ /***** Show again the form to select and send course info *****/
Inf_FormsToSelSendInfo (); Inf_FormsToSelSendInfo ();
@ -2490,7 +2490,7 @@ void Inf_EditorAssessment (void)
{ {
extern const char *Txt_The_integrated_editor_is_not_yet_available; extern const char *Txt_The_integrated_editor_is_not_yet_available;
Ale_ShowAlert (Ale_WARNING,Txt_The_integrated_editor_is_not_yet_available); Ale_ShowA_old (Ale_WARNING,Txt_The_integrated_editor_is_not_yet_available);
/***** Show again the form to select and send course info *****/ /***** Show again the form to select and send course info *****/
Inf_FormsToSelSendInfo (); Inf_FormsToSelSendInfo ();

View File

@ -215,7 +215,7 @@ void Ins_SeeInsWithPendingCtrs (void)
Box_EndBoxTable (); Box_EndBoxTable ();
} }
else else
Ale_ShowAlert (Ale_INFO,Txt_There_are_no_institutions_with_requests_for_centres_to_be_confirmed); Ale_ShowA_old (Ale_INFO,Txt_There_are_no_institutions_with_requests_for_centres_to_be_confirmed);
/***** Free structure that stores the query result *****/ /***** Free structure that stores the query result *****/
DB_FreeMySQLResult (&mysql_res); DB_FreeMySQLResult (&mysql_res);
@ -708,7 +708,7 @@ static void Ins_ListInstitutions (void)
Tbl_EndTable (); Tbl_EndTable ();
} }
else // No insrtitutions created in the current country else // No insrtitutions created in the current country
Ale_ShowAlert (Ale_INFO,Txt_No_institutions); Ale_ShowA_old (Ale_INFO,Txt_No_institutions);
/***** Button to create institution *****/ /***** Button to create institution *****/
if (Ins_CheckIfICanCreateInstitutions ()) if (Ins_CheckIfICanCreateInstitutions ())
@ -1731,7 +1731,7 @@ void Ins_RemoveInstitution (void)
else if (Ins.NumCtrs || else if (Ins.NumCtrs ||
Ins.NumUsrsWhoClaimToBelongToIns || Ins.NumUsrsWhoClaimToBelongToIns ||
Ins.NumUsrs) // Institution has centres or users ==> don't remove Ins.NumUsrs) // Institution has centres or users ==> don't remove
Ale_ShowAlert (Ale_WARNING,Txt_To_remove_an_institution_you_must_first_remove_all_centres_and_users_in_the_institution); Ale_ShowA_old (Ale_WARNING,Txt_To_remove_an_institution_you_must_first_remove_all_centres_and_users_in_the_institution);
else // Institution has no users ==> remove it else // Institution has no users ==> remove it
{ {
/***** Remove all the threads and posts in forums of the institution *****/ /***** Remove all the threads and posts in forums of the institution *****/
@ -1764,7 +1764,7 @@ void Ins_RemoveInstitution (void)
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
Txt_Institution_X_removed, Txt_Institution_X_removed,
Ins.FullName); Ins.FullName);
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt); Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
} }
/***** Show the form again *****/ /***** Show the form again *****/
@ -2032,7 +2032,7 @@ void Ins_ChangeInsWWW (void)
Ins_ShowAlertAndButtonToGoToIns (); Ins_ShowAlertAndButtonToGoToIns ();
} }
else else
Ale_ShowAlert (Ale_WARNING,Txt_You_can_not_leave_the_web_address_empty); Ale_ShowA_old (Ale_WARNING,Txt_You_can_not_leave_the_web_address_empty);
/***** Show the form again *****/ /***** Show the form again *****/
Ins_EditInstitutions (); Ins_EditInstitutions ();
@ -2060,10 +2060,10 @@ void Ins_ChangeInsWWWInConfig (void)
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
Txt_The_new_web_address_is_X, Txt_The_new_web_address_is_X,
NewWWW); NewWWW);
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt); Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
} }
else else
Ale_ShowAlert (Ale_WARNING,Txt_You_can_not_leave_the_web_address_empty); Ale_ShowA_old (Ale_WARNING,Txt_You_can_not_leave_the_web_address_empty);
/***** Show the form again *****/ /***** Show the form again *****/
Ins_ShowConfiguration (); Ins_ShowConfiguration ();
@ -2165,7 +2165,7 @@ static void Ins_ShowAlertAndButtonToGoToIns (void)
} }
else else
/***** Alert *****/ /***** Alert *****/
Ale_ShowAlert (Gbl.Alert.Type,Gbl.Alert.Txt); Ale_ShowA_old (Gbl.Alert.Type,Gbl.Alert.Txt);
} }
static void Ins_PutParamGoToIns (void) static void Ins_PutParamGoToIns (void)
@ -2403,23 +2403,23 @@ static void Ins_RecFormRequestOrCreateIns (unsigned Status)
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
Txt_The_institution_X_already_exists, Txt_The_institution_X_already_exists,
Gbl.Inss.EditingIns.ShrtName); Gbl.Inss.EditingIns.ShrtName);
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt); Ale_ShowA_old (Ale_WARNING,Gbl.Alert.Txt);
} }
else if (Ins_CheckIfInsNameExistsInCty ("FullName",Gbl.Inss.EditingIns.FullName,-1L,Gbl.CurrentCty.Cty.CtyCod)) else if (Ins_CheckIfInsNameExistsInCty ("FullName",Gbl.Inss.EditingIns.FullName,-1L,Gbl.CurrentCty.Cty.CtyCod))
{ {
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
Txt_The_institution_X_already_exists, Txt_The_institution_X_already_exists,
Gbl.Inss.EditingIns.FullName); Gbl.Inss.EditingIns.FullName);
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt); Ale_ShowA_old (Ale_WARNING,Gbl.Alert.Txt);
} }
else // Add new institution to database else // Add new institution to database
Ins_CreateInstitution (Status); Ins_CreateInstitution (Status);
} }
else // If there is not a web else // If there is not a web
Ale_ShowAlert (Ale_WARNING,Txt_You_must_specify_the_web_address_of_the_new_institution); Ale_ShowA_old (Ale_WARNING,Txt_You_must_specify_the_web_address_of_the_new_institution);
} }
else // If there is not a institution name else // If there is not a institution name
Ale_ShowAlert (Ale_WARNING,Txt_You_must_specify_the_short_name_and_the_full_name_of_the_new_institution); Ale_ShowA_old (Ale_WARNING,Txt_You_must_specify_the_short_name_and_the_full_name_of_the_new_institution);
/***** Show the form again *****/ /***** Show the form again *****/
Ins_EditInstitutions (); Ins_EditInstitutions ();

View File

@ -1269,7 +1269,7 @@ void Lay_ShowErrorAndExit (const char *Txt)
/***** Write possible error message *****/ /***** Write possible error message *****/
if (Txt) if (Txt)
Ale_ShowAlert (Ale_ERROR,Txt); Ale_ShowA_old (Ale_ERROR,Txt);
/***** Finish the page, except </body> and </html> *****/ /***** Finish the page, except </body> and </html> *****/
Lay_WriteEndOfPage (); Lay_WriteEndOfPage ();

View File

@ -104,7 +104,7 @@ void Lnk_SeeLinks (void)
if (Gbl.Links.Num) // There are links if (Gbl.Links.Num) // There are links
Lnk_WriteListOfLinks (); Lnk_WriteListOfLinks ();
else // No links created else // No links created
Ale_ShowAlert (Ale_INFO,Txt_No_links); Ale_ShowA_old (Ale_INFO,Txt_No_links);
/***** Button to create link *****/ /***** Button to create link *****/
if (Gbl.Usrs.Me.Role.Logged == Rol_SYS_ADM) if (Gbl.Usrs.Me.Role.Logged == Rol_SYS_ADM)
@ -510,7 +510,7 @@ void Lnk_RemoveLink (void)
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
Txt_Link_X_removed, Txt_Link_X_removed,
Lnk.ShrtName); Lnk.ShrtName);
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt); Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
/***** Show the form again *****/ /***** Show the form again *****/
Lnk_EditLinks (); Lnk_EditLinks ();
@ -585,7 +585,7 @@ static void Lnk_RenameLink (Cns_ShrtOrFullName_t ShrtOrFullName)
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
Txt_You_can_not_leave_the_name_of_the_link_X_empty, Txt_You_can_not_leave_the_name_of_the_link_X_empty,
CurrentLnkName); CurrentLnkName);
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt); Ale_ShowA_old (Ale_WARNING,Gbl.Alert.Txt);
} }
else else
{ {
@ -599,7 +599,7 @@ static void Lnk_RenameLink (Cns_ShrtOrFullName_t ShrtOrFullName)
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
Txt_The_link_X_already_exists, Txt_The_link_X_already_exists,
NewLnkName); NewLnkName);
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt); Ale_ShowA_old (Ale_WARNING,Gbl.Alert.Txt);
} }
else else
{ {
@ -610,7 +610,7 @@ static void Lnk_RenameLink (Cns_ShrtOrFullName_t ShrtOrFullName)
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
Txt_The_link_X_has_been_renamed_as_Y, Txt_The_link_X_has_been_renamed_as_Y,
CurrentLnkName,NewLnkName); CurrentLnkName,NewLnkName);
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt); Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
} }
} }
else // The same name else // The same name
@ -618,7 +618,7 @@ static void Lnk_RenameLink (Cns_ShrtOrFullName_t ShrtOrFullName)
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
Txt_The_name_of_the_link_X_has_not_changed, Txt_The_name_of_the_link_X_has_not_changed,
CurrentLnkName); CurrentLnkName);
Ale_ShowAlert (Ale_INFO,Gbl.Alert.Txt); Ale_ShowA_old (Ale_INFO,Gbl.Alert.Txt);
} }
} }
@ -687,10 +687,10 @@ void Lnk_ChangeLinkWWW (void)
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
Txt_The_new_web_address_is_X, Txt_The_new_web_address_is_X,
NewWWW); NewWWW);
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt); Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
} }
else else
Ale_ShowAlert (Ale_WARNING,Txt_You_can_not_leave_the_web_address_empty); Ale_ShowA_old (Ale_WARNING,Txt_You_can_not_leave_the_web_address_empty);
/***** Show the form again *****/ /***** Show the form again *****/
Str_Copy (Lnk->WWW,NewWWW, Str_Copy (Lnk->WWW,NewWWW,
@ -824,22 +824,22 @@ void Lnk_RecFormNewLink (void)
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
Txt_The_link_X_already_exists, Txt_The_link_X_already_exists,
Lnk->ShrtName); Lnk->ShrtName);
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt); Ale_ShowA_old (Ale_WARNING,Gbl.Alert.Txt);
} }
else if (Lnk_CheckIfLinkNameExists ("FullName",Lnk->FullName,-1L)) else if (Lnk_CheckIfLinkNameExists ("FullName",Lnk->FullName,-1L))
{ {
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
Txt_The_link_X_already_exists, Txt_The_link_X_already_exists,
Lnk->FullName); Lnk->FullName);
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt); Ale_ShowA_old (Ale_WARNING,Gbl.Alert.Txt);
} }
else if (!Lnk->WWW[0]) else if (!Lnk->WWW[0])
Ale_ShowAlert (Ale_WARNING,Txt_You_must_specify_the_URL_of_the_new_link); Ale_ShowA_old (Ale_WARNING,Txt_You_must_specify_the_URL_of_the_new_link);
else // Add new link to database else // Add new link to database
Lnk_CreateLink (Lnk); Lnk_CreateLink (Lnk);
} }
else // If there is not a link name else // If there is not a link name
Ale_ShowAlert (Ale_WARNING,Txt_You_must_specify_the_short_name_and_the_full_name_of_the_new_link); Ale_ShowA_old (Ale_WARNING,Txt_You_must_specify_the_short_name_and_the_full_name_of_the_new_link);
/***** Show the form again *****/ /***** Show the form again *****/
Lnk_EditLinks (); Lnk_EditLinks ();
@ -865,5 +865,5 @@ static void Lnk_CreateLink (struct Link *Lnk)
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
Txt_Created_new_link_X, Txt_Created_new_link_X,
Lnk->ShrtName); Lnk->ShrtName);
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt); Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
} }

View File

@ -295,7 +295,7 @@ void Log_RequestLogo (Sco_Scope_t Scope)
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), 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, Txt_You_can_send_a_file_with_an_image_in_PNG_format_transparent_background_and_size_X_Y,
64,64); 64,64);
Ale_ShowAlert (Ale_INFO,Gbl.Alert.Txt); Ale_ShowA_old (Ale_INFO,Gbl.Alert.Txt);
/***** Upload logo *****/ /***** Upload logo *****/
fprintf (Gbl.F.Out,"<label class=\"%s\">" fprintf (Gbl.F.Out,"<label class=\"%s\">"
@ -389,7 +389,7 @@ void Log_ReceiveLogo (Sco_Scope_t Scope)
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
Txt_The_file_is_not_X, Txt_The_file_is_not_X,
"png"); "png");
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt); Ale_ShowA_old (Ale_WARNING,Gbl.Alert.Txt);
} }
else else
{ {
@ -401,7 +401,7 @@ void Log_ReceiveLogo (Sco_Scope_t Scope)
(unsigned) Cod, (unsigned) Cod,
(unsigned) Cod); (unsigned) Cod);
if (!Fil_EndReceptionOfFile (FileNameLogo,Param)) if (!Fil_EndReceptionOfFile (FileNameLogo,Param))
Ale_ShowAlert (Ale_WARNING,"Error copying file."); Ale_ShowA_old (Ale_WARNING,"Error copying file.");
} }
} }

View File

@ -382,7 +382,7 @@ void Mai_WriteWarningEmailNotifications (void)
Txt_TABS_TXT [TabMailDomains], Txt_TABS_TXT [TabMailDomains],
Txt_MENU_TITLE[TabMailDomains][Act_GetIndexInMenu (ActSeeMai )], Txt_MENU_TITLE[TabMailDomains][Act_GetIndexInMenu (ActSeeMai )],
Txt_Domains); Txt_Domains);
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt); Ale_ShowA_old (Ale_WARNING,Gbl.Alert.Txt);
} }
/*****************************************************************************/ /*****************************************************************************/
@ -562,7 +562,7 @@ void Mai_RemoveMailDomain (void)
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
Txt_Email_domain_X_removed, Txt_Email_domain_X_removed,
Mai.Domain); Mai.Domain);
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt); Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
/***** Show the form again *****/ /***** Show the form again *****/
Mai_EditMailDomains (); Mai_EditMailDomains ();
@ -827,20 +827,20 @@ void Mai_RecFormNewMailDomain (void)
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
Txt_The_email_domain_X_already_exists, Txt_The_email_domain_X_already_exists,
Mai->Domain); Mai->Domain);
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt); Ale_ShowA_old (Ale_WARNING,Gbl.Alert.Txt);
} }
else if (Mai_CheckIfMailDomainNameExists ("Info",Mai->Info,-1L)) else if (Mai_CheckIfMailDomainNameExists ("Info",Mai->Info,-1L))
{ {
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
Txt_The_email_domain_X_already_exists, Txt_The_email_domain_X_already_exists,
Mai->Info); Mai->Info);
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt); Ale_ShowA_old (Ale_WARNING,Gbl.Alert.Txt);
} }
else // Add new mail to database else // Add new mail to database
Mai_CreateMailDomain (Mai); Mai_CreateMailDomain (Mai);
} }
else // If there is not a mail name else // If there is not a mail name
Ale_ShowAlert (Ale_WARNING,Txt_You_must_specify_the_short_name_and_the_full_name_of_the_new_email_domain); Ale_ShowA_old (Ale_WARNING,Txt_You_must_specify_the_short_name_and_the_full_name_of_the_new_email_domain);
/***** Show the form again *****/ /***** Show the form again *****/
Mai_EditMailDomains (); Mai_EditMailDomains ();
@ -866,7 +866,7 @@ static void Mai_CreateMailDomain (struct Mail *Mai)
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
Txt_Created_new_email_domain_X, Txt_Created_new_email_domain_X,
Mai->Domain); Mai->Domain);
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt); Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
} }
/*****************************************************************************/ /*****************************************************************************/
@ -1233,13 +1233,13 @@ static void Mai_ShowFormChangeUsrEmail (const struct UsrData *UsrDat,bool ItsMe,
/***** Show possible alert *****/ /***** Show possible alert *****/
if (Gbl.Alert.Section == (const char *) Mai_EMAIL_SECTION_ID) if (Gbl.Alert.Section == (const char *) Mai_EMAIL_SECTION_ID)
Ale_ShowAlert (Gbl.Alert.Type,Gbl.Alert.Txt); Ale_ShowA_old (Gbl.Alert.Type,Gbl.Alert.Txt);
/***** Help message *****/ /***** Help message *****/
if (IMustFillInEmail) if (IMustFillInEmail)
Ale_ShowAlert (Ale_WARNING,Txt_Before_going_to_any_other_option_you_must_fill_in_your_email_address); Ale_ShowA_old (Ale_WARNING,Txt_Before_going_to_any_other_option_you_must_fill_in_your_email_address);
else if (IShouldConfirmEmail) else if (IShouldConfirmEmail)
Ale_ShowAlert (Ale_WARNING,Txt_Please_confirm_your_email_address); Ale_ShowA_old (Ale_WARNING,Txt_Please_confirm_your_email_address);
/***** Get my emails *****/ /***** Get my emails *****/
NumEmails = (unsigned) DB_QuerySELECT (&mysql_res,"can not get" NumEmails = (unsigned) DB_QuerySELECT (&mysql_res,"can not get"
@ -1445,10 +1445,10 @@ void Mai_RemoveOtherUsrEmail (void)
Acc_ShowFormChgOtherUsrAccount (); Acc_ShowFormChgOtherUsrAccount ();
} }
else else
Ale_ShowAlert (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_); Ale_ShowA_old (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
} }
else // User not found else // User not found
Ale_ShowAlert (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_); Ale_ShowA_old (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
} }
/*****************************************************************************/ /*****************************************************************************/
@ -1483,7 +1483,7 @@ static void Mai_RemoveEmail (struct UsrData *UsrDat)
{ {
Gbl.Alert.Type = Ale_WARNING; Gbl.Alert.Type = Ale_WARNING;
Gbl.Alert.Section = Mai_EMAIL_SECTION_ID; Gbl.Alert.Section = Mai_EMAIL_SECTION_ID;
Ale_ShowAlert (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_); Ale_ShowA_old (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
} }
} }
@ -1536,10 +1536,10 @@ void Mai_NewOtherUsrEmail (void)
Acc_ShowFormChgOtherUsrAccount (); Acc_ShowFormChgOtherUsrAccount ();
} }
else else
Ale_ShowAlert (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_); Ale_ShowA_old (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
} }
else // User not found else // User not found
Ale_ShowAlert (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_); Ale_ShowA_old (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
} }
/*****************************************************************************/ /*****************************************************************************/
@ -1853,16 +1853,16 @@ void Mai_ConfirmEmail (void)
Txt_The_email_X_has_been_confirmed, Txt_The_email_X_has_been_confirmed,
Email); Email);
} }
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt); Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
} }
else else
Ale_ShowAlert (Ale_WARNING,Txt_The_email_address_has_not_been_confirmed); Ale_ShowA_old (Ale_WARNING,Txt_The_email_address_has_not_been_confirmed);
/***** Free structure that stores the query result *****/ /***** Free structure that stores the query result *****/
DB_FreeMySQLResult (&mysql_res); DB_FreeMySQLResult (&mysql_res);
} }
else else
Ale_ShowAlert (Ale_WARNING,Txt_Failed_email_confirmation_key); Ale_ShowA_old (Ale_WARNING,Txt_Failed_email_confirmation_key);
/***** Form to log in *****/ /***** Form to log in *****/
Usr_WriteFormLogin (ActLogIn,NULL); Usr_WriteFormLogin (ActLogIn,NULL);

View File

@ -286,7 +286,7 @@ static void Mrk_ChangeNumRowsHeaderOrFooter (Brw_HeadOrFoot_t HeaderOrFooter)
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
Txt_The_number_of_rows_is_now_X, Txt_The_number_of_rows_is_now_X,
NumRows); NumRows);
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt); Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
} }
else else
Lay_ShowErrorAndExit ("Wrong number of rows."); Lay_ShowErrorAndExit ("Wrong number of rows.");
@ -715,7 +715,7 @@ void Mrk_ShowMyMarks (void)
else // Problems in table of marks or user's ID not found else // Problems in table of marks or user's ID not found
{ {
fclose (FileUsrMarks); fclose (FileUsrMarks);
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt); Ale_ShowA_old (Ale_WARNING,Gbl.Alert.Txt);
} }
unlink (FileNameUsrMarks); // File with marks is no longer necessary unlink (FileNameUsrMarks); // File with marks is no longer necessary

View File

@ -702,14 +702,14 @@ void Msg_RecMsgFromUsr (void)
NumRecipients > Cfg_MAX_RECIPIENTS) NumRecipients > Cfg_MAX_RECIPIENTS)
{ {
/* Write warning message */ /* Write warning message */
Ale_ShowAlert (Ale_WARNING,Txt_You_can_not_send_a_message_to_so_many_recipients_); Ale_ShowA_old (Ale_WARNING,Txt_You_can_not_send_a_message_to_so_many_recipients_);
Error = true; Error = true;
} }
} }
else // No recipients selected else // No recipients selected
{ {
/* Write warning message */ /* Write warning message */
Ale_ShowAlert (Ale_WARNING,Txt_You_must_select_one_ore_more_recipients); Ale_ShowA_old (Ale_WARNING,Txt_You_must_select_one_ore_more_recipients);
Error = true; Error = true;
} }
@ -757,7 +757,7 @@ void Msg_RecMsgFromUsr (void)
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
Txt_message_not_sent_to_X, Txt_message_not_sent_to_X,
UsrDstData.FullName); UsrDstData.FullName);
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt); Ale_ShowA_old (Ale_WARNING,Gbl.Alert.Txt);
} }
else else
{ {
@ -796,7 +796,7 @@ void Msg_RecMsgFromUsr (void)
NotifyByEmail ? Txt_message_sent_to_X_notified_by_email : NotifyByEmail ? Txt_message_sent_to_X_notified_by_email :
Txt_message_sent_to_X_not_notified_by_email, Txt_message_sent_to_X_not_notified_by_email,
UsrDstData.FullName); UsrDstData.FullName);
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt); Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
/***** Increment number of recipients *****/ /***** Increment number of recipients *****/
if (NotifyByEmail) if (NotifyByEmail)
@ -806,7 +806,7 @@ void Msg_RecMsgFromUsr (void)
} }
else else
{ {
Ale_ShowAlert (Ale_ERROR,Txt_Error_getting_data_from_a_recipient); Ale_ShowA_old (Ale_ERROR,Txt_Error_getting_data_from_a_recipient);
NumErrors++; NumErrors++;
} }
} }
@ -830,17 +830,17 @@ void Msg_RecMsgFromUsr (void)
if (NumRecipients) if (NumRecipients)
{ {
if (NumRecipients == 1) if (NumRecipients == 1)
Ale_ShowAlert (Ale_SUCCESS,Txt_The_message_has_been_sent_to_1_recipient); Ale_ShowA_old (Ale_SUCCESS,Txt_The_message_has_been_sent_to_1_recipient);
else else
{ {
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
Txt_The_message_has_been_sent_to_X_recipients, Txt_The_message_has_been_sent_to_X_recipients,
(unsigned) NumRecipients); (unsigned) NumRecipients);
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt); Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
} }
} }
else else
Ale_ShowAlert (Ale_WARNING,Txt_The_message_has_not_been_sent_to_any_recipient); Ale_ShowA_old (Ale_WARNING,Txt_The_message_has_not_been_sent_to_any_recipient);
/***** Show alert about errors on sending message *****/ /***** Show alert about errors on sending message *****/
if (NumErrors > 1) if (NumErrors > 1)
@ -848,7 +848,7 @@ void Msg_RecMsgFromUsr (void)
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
Txt_There_have_been_X_errors_in_sending_the_message, Txt_There_have_been_X_errors_in_sending_the_message,
(unsigned) NumErrors); (unsigned) NumErrors);
Ale_ShowAlert (Ale_ERROR,Gbl.Alert.Txt); Ale_ShowA_old (Ale_ERROR,Gbl.Alert.Txt);
} }
} }
@ -1010,13 +1010,13 @@ static void Msg_ShowNumMsgsDeleted (unsigned NumMsgs)
extern const char *Txt_X_messages_have_been_deleted; extern const char *Txt_X_messages_have_been_deleted;
if (NumMsgs == 1) if (NumMsgs == 1)
Ale_ShowAlert (Ale_SUCCESS,Txt_One_message_has_been_deleted); Ale_ShowA_old (Ale_SUCCESS,Txt_One_message_has_been_deleted);
else else
{ {
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
Txt_X_messages_have_been_deleted, Txt_X_messages_have_been_deleted,
NumMsgs); NumMsgs);
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt); Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
} }
} }
@ -1115,7 +1115,7 @@ void Msg_DelSntMsg (void)
/***** Delete the message *****/ /***** Delete the message *****/
/* Delete the sent message */ /* Delete the sent message */
Msg_MoveSentMsgToDeleted (MsgCod); Msg_MoveSentMsgToDeleted (MsgCod);
Ale_ShowAlert (Ale_SUCCESS,Txt_Message_deleted); Ale_ShowA_old (Ale_SUCCESS,Txt_Message_deleted);
/* Show the remaining messages */ /* Show the remaining messages */
Msg_ShowSntMsgs (); Msg_ShowSntMsgs ();
@ -1137,7 +1137,7 @@ void Msg_DelRecMsg (void)
/***** Delete the message *****/ /***** Delete the message *****/
/* Delete the received message */ /* Delete the received message */
Msg_MoveReceivedMsgToDeleted (MsgCod,Gbl.Usrs.Me.UsrDat.UsrCod); Msg_MoveReceivedMsgToDeleted (MsgCod,Gbl.Usrs.Me.UsrDat.UsrCod);
Ale_ShowAlert (Ale_SUCCESS,Txt_Message_deleted); Ale_ShowA_old (Ale_SUCCESS,Txt_Message_deleted);
/* Show the remaining messages */ /* Show the remaining messages */
Msg_ShowRecMsgs (); Msg_ShowRecMsgs ();
@ -3721,7 +3721,7 @@ void Msg_BanSenderWhenShowingMsgs (void)
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
Txt_From_this_time_you_will_not_receive_messages_from_X, Txt_From_this_time_you_will_not_receive_messages_from_X,
Gbl.Usrs.Other.UsrDat.FullName); Gbl.Usrs.Other.UsrDat.FullName);
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt); Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
/**** Show received messages again */ /**** Show received messages again */
Msg_ShowRecMsgs (); Msg_ShowRecMsgs ();
@ -3778,7 +3778,7 @@ static void Msg_UnbanSender (void)
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
Txt_From_this_time_you_can_receive_messages_from_X, Txt_From_this_time_you_can_receive_messages_from_X,
Gbl.Usrs.Other.UsrDat.FullName); Gbl.Usrs.Other.UsrDat.FullName);
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt); Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
} }
/*****************************************************************************/ /*****************************************************************************/
@ -3836,7 +3836,7 @@ void Msg_ListBannedUsrs (void)
Gbl.Usrs.Me.UsrDat.UsrCod); Gbl.Usrs.Me.UsrDat.UsrCod);
if (NumUsrs == 0) // If not result ==> sent message is deleted if (NumUsrs == 0) // If not result ==> sent message is deleted
Ale_ShowAlert (Ale_INFO,Txt_You_have_not_banned_any_sender); Ale_ShowA_old (Ale_INFO,Txt_You_have_not_banned_any_sender);
else else
{ {
/***** Initialize structure with user's data *****/ /***** Initialize structure with user's data *****/

View File

@ -254,11 +254,11 @@ static void Nck_ShowFormChangeUsrNickname (const struct UsrData *UsrDat,bool Its
/***** Show possible alert *****/ /***** Show possible alert *****/
if (Gbl.Alert.Section == (const char *) Nck_NICKNAME_SECTION_ID) if (Gbl.Alert.Section == (const char *) Nck_NICKNAME_SECTION_ID)
Ale_ShowAlert (Gbl.Alert.Type,Gbl.Alert.Txt); Ale_ShowA_old (Gbl.Alert.Type,Gbl.Alert.Txt);
/***** Help message *****/ /***** Help message *****/
if (IMustFillNickname) if (IMustFillNickname)
Ale_ShowAlert (Ale_WARNING, Ale_ShowA_old (Ale_WARNING,
Txt_Before_going_to_any_other_option_you_must_fill_your_nickname); Txt_Before_going_to_any_other_option_you_must_fill_your_nickname);
/***** Start table *****/ /***** Start table *****/
@ -488,10 +488,10 @@ void Nck_RemoveOtherUsrNick (void)
Acc_ShowFormChgOtherUsrAccount (); Acc_ShowFormChgOtherUsrAccount ();
} }
else else
Ale_ShowAlert (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_); Ale_ShowA_old (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
} }
else // User not found else // User not found
Ale_ShowAlert (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_); Ale_ShowA_old (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
} }
/*****************************************************************************/ /*****************************************************************************/
@ -540,10 +540,10 @@ void Nck_UpdateOtherUsrNick (void)
Acc_ShowFormChgOtherUsrAccount (); Acc_ShowFormChgOtherUsrAccount ();
} }
else else
Ale_ShowAlert (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_); Ale_ShowA_old (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
} }
else // User not found else // User not found
Ale_ShowAlert (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_); Ale_ShowA_old (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
} }
/*****************************************************************************/ /*****************************************************************************/

View File

@ -101,7 +101,7 @@ void Not_ShowFormNotice (void)
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
Txt_The_notice_will_appear_as_a_yellow_note_, Txt_The_notice_will_appear_as_a_yellow_note_,
Gbl.CurrentCrs.Crs.FullName); Gbl.CurrentCrs.Crs.FullName);
Ale_ShowAlert (Ale_INFO,Gbl.Alert.Txt); Ale_ShowA_old (Ale_INFO,Gbl.Alert.Txt);
/***** Start form *****/ /***** Start form *****/
Frm_StartForm (ActRcvNot); Frm_StartForm (ActRcvNot);
@ -148,7 +148,7 @@ void Not_ReceiveNotice (void)
RSS_UpdateRSSFileForACrs (&Gbl.CurrentCrs.Crs); RSS_UpdateRSSFileForACrs (&Gbl.CurrentCrs.Crs);
/***** Write message of success *****/ /***** Write message of success *****/
Ale_ShowAlert (Ale_SUCCESS,Txt_Notice_created); Ale_ShowA_old (Ale_SUCCESS,Txt_Notice_created);
/***** Notify by email about the new notice *****/ /***** Notify by email about the new notice *****/
if ((NumUsrsToBeNotifiedByEMail = Ntf_StoreNotifyEventsToAllUsrs (Ntf_EVENT_NOTICE,NotCod))) if ((NumUsrsToBeNotifiedByEMail = Ntf_StoreNotifyEventsToAllUsrs (Ntf_EVENT_NOTICE,NotCod)))
@ -198,7 +198,7 @@ void Not_ListNoticesAfterRemoval (void)
extern const char *Txt_Notice_removed; extern const char *Txt_Notice_removed;
/***** Message of success *****/ /***** Message of success *****/
Ale_ShowAlert (Ale_SUCCESS,Txt_Notice_removed); Ale_ShowA_old (Ale_SUCCESS,Txt_Notice_removed);
/***** List remaining notices *****/ /***** List remaining notices *****/
Not_ListFullNotices (); Not_ListFullNotices ();
@ -404,7 +404,7 @@ void Not_ShowNotices (Not_Listing_t TypeNoticesListing)
Not_PutIconsListNotices, Not_PutIconsListNotices,
Hlp_MESSAGES_Notices,Box_NOT_CLOSABLE); Hlp_MESSAGES_Notices,Box_NOT_CLOSABLE);
if (!NumNotices) if (!NumNotices)
Ale_ShowAlert (Ale_INFO,Txt_No_notices); Ale_ShowA_old (Ale_INFO,Txt_No_notices);
} }
/***** Show the notices *****/ /***** Show the notices *****/

View File

@ -627,7 +627,7 @@ void Ntf_ShowMyNotifications (void)
Usr_UsrDataDestructor (&UsrDat); Usr_UsrDataDestructor (&UsrDat);
} }
else else
Ale_ShowAlert (Ale_INFO,AllNotifications ? Txt_You_have_no_notifications : Ale_ShowA_old (Ale_INFO,AllNotifications ? Txt_You_have_no_notifications :
Txt_You_have_no_unread_notifications); Txt_You_have_no_unread_notifications);
/***** End box *****/ /***** End box *****/
@ -2040,7 +2040,7 @@ void Ntf_ChangeNotifyEvents (void)
Gbl.Usrs.Me.UsrDat.UsrCod); Gbl.Usrs.Me.UsrDat.UsrCod);
/***** Show message *****/ /***** Show message *****/
Ale_ShowAlert (Ale_SUCCESS,Txt_Your_preferences_about_notifications_have_changed); Ale_ShowA_old (Ale_SUCCESS,Txt_Your_preferences_about_notifications_have_changed);
} }
/*****************************************************************************/ /*****************************************************************************/

View File

@ -201,10 +201,10 @@ void Pwd_UpdateOtherUsrPwd (void)
/***** Check and update password *****/ /***** Check and update password *****/
Pwd_CheckAndUpdateNewPwd (&Gbl.Usrs.Other.UsrDat); Pwd_CheckAndUpdateNewPwd (&Gbl.Usrs.Other.UsrDat);
else else
Ale_ShowAlert (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_); Ale_ShowA_old (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
} }
else // User not found else // User not found
Ale_ShowAlert (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_); Ale_ShowA_old (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
} }
/*****************************************************************************/ /*****************************************************************************/
@ -291,7 +291,7 @@ void Pwd_ShowFormSendNewPwd (void)
Hlp_PROFILE_Password,Box_NOT_CLOSABLE); Hlp_PROFILE_Password,Box_NOT_CLOSABLE);
/***** Help text *****/ /***** Help text *****/
Ale_ShowAlert (Ale_INFO,Txt_If_you_have_forgotten_your_password_); Ale_ShowA_old (Ale_INFO,Txt_If_you_have_forgotten_your_password_);
/***** User's ID/nickname *****/ /***** User's ID/nickname *****/
fprintf (Gbl.F.Out,"<label class=\"%s\">" fprintf (Gbl.F.Out,"<label class=\"%s\">"
@ -327,7 +327,7 @@ void Pwd_ChkIdLoginAndSendNewPwd (void)
/***** Check if user's ID or nickname is not empty *****/ /***** Check if user's ID or nickname is not empty *****/
if (!Gbl.Usrs.Me.UsrIdLogin[0]) if (!Gbl.Usrs.Me.UsrIdLogin[0])
{ {
Ale_ShowAlert (Ale_WARNING,Txt_You_must_enter_your_nick_email_or_ID); Ale_ShowA_old (Ale_WARNING,Txt_You_must_enter_your_nick_email_or_ID);
Pwd_ShowFormSendNewPwd (); Pwd_ShowFormSendNewPwd ();
return; return;
} }
@ -392,7 +392,7 @@ void Pwd_ChkIdLoginAndSendNewPwd (void)
{ {
case 0: // Message sent successfully case 0: // Message sent successfully
Pwd_SetMyPendingPassword (NewRandomPlainPassword); Pwd_SetMyPendingPassword (NewRandomPlainPassword);
Ale_ShowAlert (Ale_INFO,Txt_If_you_have_written_your_ID_nickname_or_email_correctly_); Ale_ShowA_old (Ale_INFO,Txt_If_you_have_written_your_ID_nickname_or_email_correctly_);
break; break;
case 1: case 1:
Lay_ShowErrorAndExit (Txt_There_was_a_problem_sending_an_email_automatically); Lay_ShowErrorAndExit (Txt_There_was_a_problem_sending_an_email_automatically);
@ -411,7 +411,7 @@ void Pwd_ChkIdLoginAndSendNewPwd (void)
Usr_FreeListUsrCods (&ListUsrCods); Usr_FreeListUsrCods (&ListUsrCods);
/***** Help message *****/ /***** Help message *****/
Ale_ShowAlert (Ale_INFO,Txt_If_you_have_written_your_ID_nickname_or_email_correctly_); Ale_ShowA_old (Ale_INFO,Txt_If_you_have_written_your_ID_nickname_or_email_correctly_);
/**** Show forms to login / create account again *****/ /**** Show forms to login / create account again *****/
Usr_WriteLandingPage (); Usr_WriteLandingPage ();
@ -692,16 +692,16 @@ void Pwd_ShowFormChgMyPwd (void)
/***** Show possible alert *****/ /***** Show possible alert *****/
if (Gbl.Alert.Section == Pwd_PASSWORD_SECTION_ID) if (Gbl.Alert.Section == Pwd_PASSWORD_SECTION_ID)
Ale_ShowAlert (Gbl.Alert.Type,Gbl.Alert.Txt); Ale_ShowA_old (Gbl.Alert.Type,Gbl.Alert.Txt);
/***** Help message *****/ /***** Help message *****/
if (!IHaveAPasswordInDB) // If I don't have a password in database... if (!IHaveAPasswordInDB) // If I don't have a password in database...
Ale_ShowAlert (Ale_WARNING, Ale_ShowA_old (Ale_WARNING,
Txt_Before_going_to_any_other_option_you_must_create_your_password); Txt_Before_going_to_any_other_option_you_must_create_your_password);
else if (Gbl.Usrs.Me.LoginPlainPassword[0]) else if (Gbl.Usrs.Me.LoginPlainPassword[0])
{ {
if (!Pwd_FastCheckIfPasswordSeemsGood (Gbl.Usrs.Me.LoginPlainPassword)) if (!Pwd_FastCheckIfPasswordSeemsGood (Gbl.Usrs.Me.LoginPlainPassword))
Ale_ShowAlert (Ale_WARNING, Ale_ShowA_old (Ale_WARNING,
Txt_Your_password_is_not_secure_enough); Txt_Your_password_is_not_secure_enough);
} }
@ -731,7 +731,7 @@ void Pwd_ShowFormChgMyPwd (void)
if (asprintf (&Txt,Txt_Your_password_must_be_at_least_X_characters_and_can_not_contain_spaces_, if (asprintf (&Txt,Txt_Your_password_must_be_at_least_X_characters_and_can_not_contain_spaces_,
Pwd_MIN_CHARS_PLAIN_PASSWORD) < 0) Pwd_MIN_CHARS_PLAIN_PASSWORD) < 0)
Lay_NotEnoughMemoryExit (); Lay_NotEnoughMemoryExit ();
Ale_ShowAlert (Ale_INFO,Txt); Ale_ShowA_old (Ale_INFO,Txt);
free ((void *) Txt); free ((void *) Txt);
fprintf (Gbl.F.Out,"</td>" fprintf (Gbl.F.Out,"</td>"
"</tr>"); "</tr>");
@ -861,7 +861,7 @@ void Pwd_ShowFormChgOtherUsrPwd (void)
/***** Show possible alert *****/ /***** Show possible alert *****/
if (Gbl.Alert.Section == (const char *) Pwd_PASSWORD_SECTION_ID) if (Gbl.Alert.Section == (const char *) Pwd_PASSWORD_SECTION_ID)
Ale_ShowAlert (Gbl.Alert.Type,Gbl.Alert.Txt); Ale_ShowA_old (Gbl.Alert.Type,Gbl.Alert.Txt);
/***** Form to change password *****/ /***** Form to change password *****/
/* Start form */ /* Start form */
@ -942,7 +942,7 @@ bool Pwd_GetConfirmationOnDangerousAction (void)
/***** Get if consent has been done *****/ /***** Get if consent has been done *****/
if (!Par_GetParToBool ("Consent")) if (!Par_GetParToBool ("Consent"))
{ {
Ale_ShowAlert (Ale_WARNING,Txt_You_have_not_confirmed_the_action); Ale_ShowA_old (Ale_WARNING,Txt_You_have_not_confirmed_the_action);
return false; return false;
} }
@ -956,7 +956,7 @@ bool Pwd_GetConfirmationOnDangerousAction (void)
/* Compare passwords */ /* Compare passwords */
if (strcmp (Gbl.Usrs.Me.LoginEncryptedPassword,EncryptedPassword)) if (strcmp (Gbl.Usrs.Me.LoginEncryptedPassword,EncryptedPassword))
{ {
Ale_ShowAlert (Ale_WARNING,Txt_You_have_not_entered_your_password_correctly); Ale_ShowA_old (Ale_WARNING,Txt_You_have_not_entered_your_password_correctly);
return false; return false;
} }

View File

@ -331,7 +331,7 @@ static void Pho_ReqPhoto (const struct UsrData *UsrDat)
} }
/***** Show help message *****/ /***** Show help message *****/
Ale_ShowAlert (Ale_INFO,Txt_You_can_send_a_file_with_an_image_in_JPEG_format_); Ale_ShowA_old (Ale_INFO,Txt_You_can_send_a_file_with_an_image_in_JPEG_format_);
/***** Form to upload photo *****/ /***** Form to upload photo *****/
fprintf (Gbl.F.Out,"<label class=\"%s\">" fprintf (Gbl.F.Out,"<label class=\"%s\">"
@ -375,10 +375,10 @@ void Pho_SendPhotoUsr (void)
Pho_ReqOtherUsrPhoto (); Pho_ReqOtherUsrPhoto ();
} }
else else
Ale_ShowAlert (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_); Ale_ShowA_old (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
} }
else // User not found else // User not found
Ale_ShowAlert (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_); Ale_ShowA_old (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
} }
/*****************************************************************************/ /*****************************************************************************/
@ -417,7 +417,7 @@ void Pho_RecOtherUsrPhotoDetFaces (void)
Rec_ShowPublicSharedRecordOtherUsr (); Rec_ShowPublicSharedRecordOtherUsr ();
} }
else else
Ale_ShowAlert (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_); Ale_ShowA_old (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
} }
/*****************************************************************************/ /*****************************************************************************/
@ -446,7 +446,7 @@ void Pho_ReqRemoveMyPhoto (void)
Btn_REMOVE_BUTTON,Txt_Remove_photo); Btn_REMOVE_BUTTON,Txt_Remove_photo);
} }
else else
Ale_ShowAlert (Ale_INFO,Txt_The_photo_no_longer_exists); Ale_ShowA_old (Ale_INFO,Txt_The_photo_no_longer_exists);
/***** Show my record and other data *****/ /***** Show my record and other data *****/
Rec_ShowMySharedRecordAndMore (); Rec_ShowMySharedRecordAndMore ();
@ -529,13 +529,13 @@ void Pho_ReqRemoveUsrPhoto (void)
Btn_REMOVE_BUTTON,Txt_Remove_photo); Btn_REMOVE_BUTTON,Txt_Remove_photo);
} }
else else
Ale_ShowAlert (Ale_INFO,Txt_The_photo_no_longer_exists); Ale_ShowA_old (Ale_INFO,Txt_The_photo_no_longer_exists);
} }
else else
Ale_ShowAlert (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_); Ale_ShowA_old (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
} }
else else
Ale_ShowAlert (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_); Ale_ShowA_old (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
/***** Show another user's record card *****/ /***** Show another user's record card *****/
Rec_ShowPublicSharedRecordOtherUsr (); Rec_ShowPublicSharedRecordOtherUsr ();
@ -560,7 +560,7 @@ void Pho_RemoveUsrPhoto (void)
Ale_ShowPendingAlert (); Ale_ShowPendingAlert ();
} }
else else
Ale_ShowAlert (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_); Ale_ShowA_old (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
/***** Show another user's record card *****/ /***** Show another user's record card *****/
Rec_ShowPublicSharedRecordOtherUsr (); Rec_ShowPublicSharedRecordOtherUsr ();
@ -652,7 +652,7 @@ static bool Pho_ReceivePhotoAndDetectFaces (bool ItsMe,const struct UsrData *Usr
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
Txt_The_file_is_not_X, Txt_The_file_is_not_X,
"jpg"); "jpg");
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt); Ale_ShowA_old (Ale_WARNING,Gbl.Alert.Txt);
return false; return false;
} }
@ -663,7 +663,7 @@ static bool Pho_ReceivePhotoAndDetectFaces (bool ItsMe,const struct UsrData *Usr
Cfg_FOLDER_PHOTO_TMP,Gbl.UniqueNameEncrypted); Cfg_FOLDER_PHOTO_TMP,Gbl.UniqueNameEncrypted);
if (!Fil_EndReceptionOfFile (FileNamePhotoTmp,Param)) if (!Fil_EndReceptionOfFile (FileNamePhotoTmp,Param))
{ {
Ale_ShowAlert (Ale_WARNING,"Error copying file."); Ale_ShowA_old (Ale_WARNING,"Error copying file.");
return false; return false;
} }
@ -881,7 +881,7 @@ void Pho_UpdateUsrPhoto1 (void)
if (Usr_GetParamOtherUsrCodEncryptedAndGetUsrData ()) if (Usr_GetParamOtherUsrCodEncryptedAndGetUsrData ())
Pho_UpdatePhoto1 (&Gbl.Usrs.Other.UsrDat); Pho_UpdatePhoto1 (&Gbl.Usrs.Other.UsrDat);
else else
Ale_ShowAlert (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_); Ale_ShowA_old (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
} }
void Pho_UpdateUsrPhoto2 (void) void Pho_UpdateUsrPhoto2 (void)

View File

@ -601,7 +601,7 @@ void Plc_RemovePlace (void)
/***** Check if this place has centres *****/ /***** Check if this place has centres *****/
if (Plc.NumCtrs) // Place has centres ==> don't remove if (Plc.NumCtrs) // Place has centres ==> don't remove
Ale_ShowAlert (Ale_WARNING,Txt_To_remove_a_place_you_must_first_remove_all_centres_of_that_place); Ale_ShowA_old (Ale_WARNING,Txt_To_remove_a_place_you_must_first_remove_all_centres_of_that_place);
else // Place has no centres ==> remove it else // Place has no centres ==> remove it
{ {
/***** Remove place *****/ /***** Remove place *****/
@ -613,7 +613,7 @@ void Plc_RemovePlace (void)
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
Txt_Place_X_removed, Txt_Place_X_removed,
Plc.FullName); Plc.FullName);
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt); Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
} }
/***** Show the form again *****/ /***** Show the form again *****/
@ -689,7 +689,7 @@ static void Plc_RenamePlace (Cns_ShrtOrFullName_t ShrtOrFullName)
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
Txt_You_can_not_leave_the_name_of_the_place_X_empty, Txt_You_can_not_leave_the_name_of_the_place_X_empty,
CurrentPlcName); CurrentPlcName);
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt); Ale_ShowA_old (Ale_WARNING,Gbl.Alert.Txt);
} }
else else
{ {
@ -703,7 +703,7 @@ static void Plc_RenamePlace (Cns_ShrtOrFullName_t ShrtOrFullName)
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
Txt_The_place_X_already_exists, Txt_The_place_X_already_exists,
NewPlcName); NewPlcName);
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt); Ale_ShowA_old (Ale_WARNING,Gbl.Alert.Txt);
} }
else else
{ {
@ -714,7 +714,7 @@ static void Plc_RenamePlace (Cns_ShrtOrFullName_t ShrtOrFullName)
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
Txt_The_place_X_has_been_renamed_as_Y, Txt_The_place_X_has_been_renamed_as_Y,
CurrentPlcName,NewPlcName); CurrentPlcName,NewPlcName);
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt); Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
} }
} }
else // The same name else // The same name
@ -722,7 +722,7 @@ static void Plc_RenamePlace (Cns_ShrtOrFullName_t ShrtOrFullName)
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
Txt_The_name_of_the_place_X_has_not_changed, Txt_The_name_of_the_place_X_has_not_changed,
CurrentPlcName); CurrentPlcName);
Ale_ShowAlert (Ale_INFO,Gbl.Alert.Txt); Ale_ShowA_old (Ale_INFO,Gbl.Alert.Txt);
} }
} }
@ -880,20 +880,20 @@ void Plc_RecFormNewPlace (void)
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
Txt_The_place_X_already_exists, Txt_The_place_X_already_exists,
Plc->ShrtName); Plc->ShrtName);
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt); Ale_ShowA_old (Ale_WARNING,Gbl.Alert.Txt);
} }
else if (Plc_CheckIfPlaceNameExists ("FullName",Plc->FullName,-1L)) else if (Plc_CheckIfPlaceNameExists ("FullName",Plc->FullName,-1L))
{ {
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
Txt_The_place_X_already_exists, Txt_The_place_X_already_exists,
Plc->FullName); Plc->FullName);
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt); Ale_ShowA_old (Ale_WARNING,Gbl.Alert.Txt);
} }
else // Add new place to database else // Add new place to database
Plc_CreatePlace (Plc); Plc_CreatePlace (Plc);
} }
else // If there is not a place name else // If there is not a place name
Ale_ShowAlert (Ale_WARNING,Txt_You_must_specify_the_short_name_and_the_full_name_of_the_new_place); Ale_ShowA_old (Ale_WARNING,Txt_You_must_specify_the_short_name_and_the_full_name_of_the_new_place);
/***** Show the form again *****/ /***** Show the form again *****/
Plc_EditPlaces (); Plc_EditPlaces ();
@ -919,5 +919,5 @@ static void Plc_CreatePlace (struct Place *Plc)
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
Txt_Created_new_place_X, Txt_Created_new_place_X,
Plc->FullName); Plc->FullName);
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt); Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
} }

View File

@ -86,7 +86,7 @@ void Plg_ListPlugins (void)
if (Gbl.Usrs.Me.Role.Logged != Rol_SYS_ADM) if (Gbl.Usrs.Me.Role.Logged != Rol_SYS_ADM)
{ {
Ale_ShowAlert (Ale_WARNING,Txt_Option_under_development); Ale_ShowA_old (Ale_WARNING,Txt_Option_under_development);
return; return;
} }
@ -505,7 +505,7 @@ void Plg_RemovePlugin (void)
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
Txt_Plugin_X_removed, Txt_Plugin_X_removed,
Plg.Name); Plg.Name);
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt); Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
/***** Show the form again *****/ /***** Show the form again *****/
Plg_EditPlugins (); Plg_EditPlugins ();
@ -543,7 +543,7 @@ void Plg_RenamePlugin (void)
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
Txt_You_can_not_leave_the_name_of_the_plugin_X_empty, Txt_You_can_not_leave_the_name_of_the_plugin_X_empty,
Plg->Name); Plg->Name);
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt); Ale_ShowA_old (Ale_WARNING,Gbl.Alert.Txt);
} }
else else
{ {
@ -557,7 +557,7 @@ void Plg_RenamePlugin (void)
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
Txt_The_plugin_X_already_exists, Txt_The_plugin_X_already_exists,
NewPlgName); NewPlgName);
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt); Ale_ShowA_old (Ale_WARNING,Gbl.Alert.Txt);
} }
else else
{ {
@ -570,7 +570,7 @@ void Plg_RenamePlugin (void)
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
Txt_The_plugin_X_has_been_renamed_as_Y, Txt_The_plugin_X_has_been_renamed_as_Y,
Plg->Name,NewPlgName); Plg->Name,NewPlgName);
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt); Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
} }
} }
else // The same name else // The same name
@ -578,7 +578,7 @@ void Plg_RenamePlugin (void)
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
Txt_The_name_of_the_plugin_X_has_not_changed, Txt_The_name_of_the_plugin_X_has_not_changed,
Plg->Name); Plg->Name);
Ale_ShowAlert (Ale_INFO,Gbl.Alert.Txt); Ale_ShowA_old (Ale_INFO,Gbl.Alert.Txt);
} }
} }
@ -635,10 +635,10 @@ void Plg_ChangePlgDescription (void)
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
Txt_The_new_description_is_X, Txt_The_new_description_is_X,
NewDescription); NewDescription);
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt); Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
} }
else else
Ale_ShowAlert (Ale_WARNING,Txt_You_can_not_leave_the_description_empty); Ale_ShowA_old (Ale_WARNING,Txt_You_can_not_leave_the_description_empty);
/***** Show the form again *****/ /***** Show the form again *****/
Str_Copy (Plg->Description,NewDescription, Str_Copy (Plg->Description,NewDescription,
@ -679,10 +679,10 @@ void Plg_ChangePlgLogo (void)
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
Txt_The_new_logo_is_X, Txt_The_new_logo_is_X,
NewLogo); NewLogo);
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt); Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
} }
else else
Ale_ShowAlert (Ale_WARNING,Txt_You_can_not_leave_the_logo_empty); Ale_ShowA_old (Ale_WARNING,Txt_You_can_not_leave_the_logo_empty);
/***** Show the form again *****/ /***** Show the form again *****/
Str_Copy (Plg->Logo,NewLogo, Str_Copy (Plg->Logo,NewLogo,
@ -723,10 +723,10 @@ void Plg_ChangePlgAppKey (void)
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
Txt_The_new_logo_is_X, // TODO!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Txt_The_new_logo_is_X, // TODO!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
NewAppKey); NewAppKey);
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt); Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
} }
else else
Ale_ShowAlert (Ale_WARNING,Txt_You_can_not_leave_the_logo_empty); // TODO!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Ale_ShowA_old (Ale_WARNING,Txt_You_can_not_leave_the_logo_empty); // TODO!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
/***** Show the form again *****/ /***** Show the form again *****/
Str_Copy (Plg->AppKey,NewAppKey, Str_Copy (Plg->AppKey,NewAppKey,
@ -767,10 +767,10 @@ void Plg_ChangePlgURL (void)
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
Txt_The_new_URL_is_X, Txt_The_new_URL_is_X,
NewURL); NewURL);
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt); Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
} }
else else
Ale_ShowAlert (Ale_WARNING,Txt_You_can_not_leave_the_URL_empty); Ale_ShowA_old (Ale_WARNING,Txt_You_can_not_leave_the_URL_empty);
/***** Show the form again *****/ /***** Show the form again *****/
Str_Copy (Plg->URL,NewURL, Str_Copy (Plg->URL,NewURL,
@ -811,10 +811,10 @@ void Plg_ChangePlgIP (void)
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
Txt_The_new_IP_address_is_X, Txt_The_new_IP_address_is_X,
NewIP); NewIP);
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt); Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
} }
else else
Ale_ShowAlert (Ale_WARNING,Txt_You_can_not_leave_the_IP_address_empty); Ale_ShowA_old (Ale_WARNING,Txt_You_can_not_leave_the_IP_address_empty);
/***** Show the form again *****/ /***** Show the form again *****/
Str_Copy (Plg->IP,NewIP, Str_Copy (Plg->IP,NewIP,
@ -1021,16 +1021,16 @@ void Plg_RecFormNewPlg (void)
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
Txt_The_plugin_X_already_exists, Txt_The_plugin_X_already_exists,
Plg->Name); Plg->Name);
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt); Ale_ShowA_old (Ale_WARNING,Gbl.Alert.Txt);
} }
else // Add new plugin to database else // Add new plugin to database
Plg_CreatePlugin (Plg); Plg_CreatePlugin (Plg);
} }
else // If there is not a logo, a URL or a IP else // If there is not a logo, a URL or a IP
Ale_ShowAlert (Ale_WARNING,Txt_You_must_specify_the_logo_the_application_key_the_URL_and_the_IP_address_of_the_new_plugin); Ale_ShowA_old (Ale_WARNING,Txt_You_must_specify_the_logo_the_application_key_the_URL_and_the_IP_address_of_the_new_plugin);
} }
else // If there is not a plugin name else // If there is not a plugin name
Ale_ShowAlert (Ale_WARNING,Txt_You_must_specify_the_name_and_the_description_of_the_new_plugin); Ale_ShowA_old (Ale_WARNING,Txt_You_must_specify_the_name_and_the_description_of_the_new_plugin);
/***** Show the form again *****/ /***** Show the form again *****/
Plg_EditPlugins (); Plg_EditPlugins ();
@ -1059,7 +1059,7 @@ static void Plg_CreatePlugin (struct Plugin *Plg)
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
Txt_Created_new_plugin_X, Txt_Created_new_plugin_X,
Plg->Name); Plg->Name);
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt); Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
} }
/*****************************************************************************/ /*****************************************************************************/

View File

@ -91,7 +91,7 @@ void Pri_EditMyPrivacy (void)
/***** If any of my preferences about privacy is unknown *****/ /***** If any of my preferences about privacy is unknown *****/
if (Gbl.Usrs.Me.UsrDat.PhotoVisibility == Pri_VISIBILITY_UNKNOWN || if (Gbl.Usrs.Me.UsrDat.PhotoVisibility == Pri_VISIBILITY_UNKNOWN ||
Gbl.Usrs.Me.UsrDat.ProfileVisibility == Pri_VISIBILITY_UNKNOWN) Gbl.Usrs.Me.UsrDat.ProfileVisibility == Pri_VISIBILITY_UNKNOWN)
Ale_ShowAlert (Ale_WARNING,Txt_Please_review_your_privacy_preferences); Ale_ShowA_old (Ale_WARNING,Txt_Please_review_your_privacy_preferences);
/***** Start box and table *****/ /***** Start box and table *****/
Box_StartBoxTable (NULL,Txt_Privacy,Pri_PutIconsPrivacy, Box_StartBoxTable (NULL,Txt_Privacy,Pri_PutIconsPrivacy,

View File

@ -238,7 +238,7 @@ void Prf_GetUsrDatAndShowUserProfile (void)
if (!ProfileShown) if (!ProfileShown)
{ {
/* Show error message */ /* Show error message */
Ale_ShowAlert (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_); Ale_ShowA_old (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
/* Request a user's profile */ /* Request a user's profile */
Prf_RequestUserProfile (); Prf_RequestUserProfile ();

View File

@ -235,7 +235,7 @@ void Prj_ShowTableAllProjects (void)
Prj_FreeMemProject (&Prj); Prj_FreeMemProject (&Prj);
} }
else // No projects created else // No projects created
Ale_ShowAlert (Ale_INFO,Txt_No_projects); Ale_ShowA_old (Ale_INFO,Txt_No_projects);
} }
/*****************************************************************************/ /*****************************************************************************/
@ -335,7 +335,7 @@ static void Prj_ShowProjectsInCurrentPage (void)
&Pagination); &Pagination);
} }
else // No projects created else // No projects created
Ale_ShowAlert (Ale_INFO,Txt_No_projects); Ale_ShowA_old (Ale_INFO,Txt_No_projects);
/***** Button to create a new project *****/ /***** Button to create a new project *****/
if (Prj_CheckIfICanCreateProjects ()) if (Prj_CheckIfICanCreateProjects ())
@ -1967,14 +1967,14 @@ static void Prj_AddUsrToProject (Prj_RoleInProject_t RoleInProject)
Txt_THE_USER_X_has_been_enroled_as_a_Y_in_the_project, Txt_THE_USER_X_has_been_enroled_as_a_Y_in_the_project,
Gbl.Usrs.Other.UsrDat.FullName, Gbl.Usrs.Other.UsrDat.FullName,
Txt_PROJECT_ROLES_SINGUL_abc[RoleInProject]); Txt_PROJECT_ROLES_SINGUL_abc[RoleInProject]);
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt); Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
} }
/***** Free list of users' codes *****/ /***** Free list of users' codes *****/
Usr_FreeListUsrCods (&ListUsrCods); Usr_FreeListUsrCods (&ListUsrCods);
} }
else // No users found else // No users found
Ale_ShowAlert (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_); Ale_ShowA_old (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
/***** Put form to edit project again *****/ /***** Put form to edit project again *****/
Prj_RequestCreatOrEditPrj (PrjCod); Prj_RequestCreatOrEditPrj (PrjCod);
@ -2059,10 +2059,10 @@ static void Prj_ReqRemUsrFromPrj (Prj_RoleInProject_t RoleInProject)
Ale_ShowAlertAndButton2 (ActUnk,NULL,NULL,NULL,Btn_NO_BUTTON,NULL); Ale_ShowAlertAndButton2 (ActUnk,NULL,NULL,NULL,Btn_NO_BUTTON,NULL);
} }
else else
Ale_ShowAlert (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_); Ale_ShowA_old (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
} }
else else
Ale_ShowAlert (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_); Ale_ShowA_old (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
/***** Free memory of the project *****/ /***** Free memory of the project *****/
Prj_FreeMemProject (&Prj); Prj_FreeMemProject (&Prj);
@ -2134,13 +2134,13 @@ static void Prj_RemUsrFromPrj (Prj_RoleInProject_t RoleInProject)
Gbl.Usrs.Other.UsrDat.FullName, Gbl.Usrs.Other.UsrDat.FullName,
Txt_PROJECT_ROLES_SINGUL_abc[RoleInProject], Txt_PROJECT_ROLES_SINGUL_abc[RoleInProject],
Prj.Title); Prj.Title);
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt); Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
} }
else else
Ale_ShowAlert (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_); Ale_ShowA_old (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
} }
else else
Ale_ShowAlert (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_); Ale_ShowA_old (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
/***** Free memory of the project *****/ /***** Free memory of the project *****/
Prj_FreeMemProject (&Prj); Prj_FreeMemProject (&Prj);
@ -2692,7 +2692,7 @@ void Prj_ReqRemProject (void)
Btn_REMOVE_BUTTON,Txt_Remove_project); Btn_REMOVE_BUTTON,Txt_Remove_project);
} }
else else
Ale_ShowAlert (Ale_ERROR,"You don't have permission to edit this project."); Ale_ShowA_old (Ale_ERROR,"You don't have permission to edit this project.");
/***** Free memory of the project *****/ /***** Free memory of the project *****/
Prj_FreeMemProject (&Prj); Prj_FreeMemProject (&Prj);
@ -2754,10 +2754,10 @@ void Prj_RemoveProject (void)
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
Txt_Project_X_removed, Txt_Project_X_removed,
Prj.Title); Prj.Title);
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt); Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
} }
else else
Ale_ShowAlert (Ale_ERROR,"You don't have permission to edit this project."); Ale_ShowA_old (Ale_ERROR,"You don't have permission to edit this project.");
/***** Free memory of the project *****/ /***** Free memory of the project *****/
Prj_FreeMemProject (&Prj); Prj_FreeMemProject (&Prj);
@ -2798,10 +2798,10 @@ void Prj_HideProject (void)
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
Txt_Project_X_is_now_hidden, Txt_Project_X_is_now_hidden,
Prj.Title); Prj.Title);
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt); Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
} }
else else
Ale_ShowAlert (Ale_ERROR,"You don't have permission to edit this project."); Ale_ShowA_old (Ale_ERROR,"You don't have permission to edit this project.");
/***** Free memory of the project *****/ /***** Free memory of the project *****/
Prj_FreeMemProject (&Prj); Prj_FreeMemProject (&Prj);
@ -2842,10 +2842,10 @@ void Prj_ShowProject (void)
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
Txt_Project_X_is_now_visible, Txt_Project_X_is_now_visible,
Prj.Title); Prj.Title);
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt); Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
} }
else else
Ale_ShowAlert (Ale_ERROR,"You don't have permission to edit this project."); Ale_ShowA_old (Ale_ERROR,"You don't have permission to edit this project.");
/***** Free memory of the project *****/ /***** Free memory of the project *****/
Prj_FreeMemProject (&Prj); Prj_FreeMemProject (&Prj);
@ -3248,7 +3248,7 @@ void Prj_RecFormProject (void)
if (!Prj.Title[0]) // If there is not a project title if (!Prj.Title[0]) // If there is not a project title
{ {
NewProjectIsCorrect = false; NewProjectIsCorrect = false;
Ale_ShowAlert (Ale_WARNING,Txt_You_must_specify_the_title_of_the_project); Ale_ShowA_old (Ale_WARNING,Txt_You_must_specify_the_title_of_the_project);
} }
/***** Create a new project or update an existing one *****/ /***** Create a new project or update an existing one *****/
@ -3263,7 +3263,7 @@ void Prj_RecFormProject (void)
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
Txt_Created_new_project_X, Txt_Created_new_project_X,
Prj.Title); Prj.Title);
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt); Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
} }
else if (NewProjectIsCorrect) else if (NewProjectIsCorrect)
{ {
@ -3271,7 +3271,7 @@ void Prj_RecFormProject (void)
Prj_UpdateProject (&Prj); Prj_UpdateProject (&Prj);
/* Write success message */ /* Write success message */
Ale_ShowAlert (Ale_SUCCESS,Txt_The_project_has_been_modified); Ale_ShowA_old (Ale_SUCCESS,Txt_The_project_has_been_modified);
} }
} }
else else
@ -3281,7 +3281,7 @@ void Prj_RecFormProject (void)
Prj_RequestCreatOrEditPrj (Prj.PrjCod); Prj_RequestCreatOrEditPrj (Prj.PrjCod);
} }
else else
Ale_ShowAlert (Ale_ERROR,"You don't have permission to edit this project."); Ale_ShowA_old (Ale_ERROR,"You don't have permission to edit this project.");
/***** Free memory of the project *****/ /***** Free memory of the project *****/
Prj_FreeMemProject (&Prj); Prj_FreeMemProject (&Prj);

View File

@ -210,7 +210,7 @@ void Rec_ReqEditRecordFields (void)
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
Txt_There_are_no_record_fields_in_the_course_X, Txt_There_are_no_record_fields_in_the_course_X,
Gbl.CurrentCrs.Crs.FullName); Gbl.CurrentCrs.Crs.FullName);
Ale_ShowAlert (Ale_INFO,Gbl.Alert.Txt); Ale_ShowA_old (Ale_INFO,Gbl.Alert.Txt);
} }
/***** Put a form to create a new record field *****/ /***** Put a form to create a new record field *****/
@ -492,13 +492,13 @@ void Rec_ReceiveFormField (void)
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
Txt_The_record_field_X_already_exists, Txt_The_record_field_X_already_exists,
Gbl.CurrentCrs.Records.Field.Name); Gbl.CurrentCrs.Records.Field.Name);
Ale_ShowAlert (Ale_ERROR,Gbl.Alert.Txt); Ale_ShowA_old (Ale_ERROR,Gbl.Alert.Txt);
} }
else // Add the new field to the database else // Add the new field to the database
Rec_CreateRecordField (); Rec_CreateRecordField ();
} }
else // If there is not name else // If there is not name
Ale_ShowAlert (Ale_ERROR,Txt_You_must_specify_the_name_of_the_new_record_field); Ale_ShowA_old (Ale_ERROR,Txt_You_must_specify_the_name_of_the_new_record_field);
/***** Show the form again *****/ /***** Show the form again *****/
Rec_ReqEditRecordFields (); Rec_ReqEditRecordFields ();
@ -594,7 +594,7 @@ void Rec_CreateRecordField (void)
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
Txt_Created_new_record_field_X, Txt_Created_new_record_field_X,
Gbl.CurrentCrs.Records.Field.Name); Gbl.CurrentCrs.Records.Field.Name);
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt); Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
} }
/*****************************************************************************/ /*****************************************************************************/
@ -710,7 +710,7 @@ void Rec_RemoveFieldFromDB (void)
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
Txt_Record_field_X_removed, Txt_Record_field_X_removed,
Gbl.CurrentCrs.Records.Field.Name); Gbl.CurrentCrs.Records.Field.Name);
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt); Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
/***** Show the form again *****/ /***** Show the form again *****/
Rec_ReqEditRecordFields (); Rec_ReqEditRecordFields ();
@ -817,7 +817,7 @@ void Rec_RenameField (void)
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
Txt_You_can_not_leave_the_name_of_the_field_X_empty, Txt_You_can_not_leave_the_name_of_the_field_X_empty,
Gbl.CurrentCrs.Records.Field.Name); Gbl.CurrentCrs.Records.Field.Name);
Ale_ShowAlert (Ale_ERROR,Gbl.Alert.Txt); Ale_ShowA_old (Ale_ERROR,Gbl.Alert.Txt);
} }
else else
{ {
@ -831,7 +831,7 @@ void Rec_RenameField (void)
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
Txt_The_record_field_X_already_exists, Txt_The_record_field_X_already_exists,
NewFieldName); NewFieldName);
Ale_ShowAlert (Ale_ERROR,Gbl.Alert.Txt); Ale_ShowA_old (Ale_ERROR,Gbl.Alert.Txt);
} }
else else
{ {
@ -845,7 +845,7 @@ void Rec_RenameField (void)
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
Txt_The_record_field_X_has_been_renamed_as_Y, Txt_The_record_field_X_has_been_renamed_as_Y,
Gbl.CurrentCrs.Records.Field.Name,NewFieldName); Gbl.CurrentCrs.Records.Field.Name,NewFieldName);
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt); Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
} }
} }
else // The same name else // The same name
@ -853,7 +853,7 @@ void Rec_RenameField (void)
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
Txt_The_name_of_the_field_X_has_not_changed, Txt_The_name_of_the_field_X_has_not_changed,
NewFieldName); NewFieldName);
Ale_ShowAlert (Ale_INFO,Gbl.Alert.Txt); Ale_ShowA_old (Ale_INFO,Gbl.Alert.Txt);
} }
} }
@ -895,7 +895,7 @@ void Rec_ChangeLinesField (void)
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
Txt_The_number_of_editing_lines_in_the_record_field_X_has_not_changed, Txt_The_number_of_editing_lines_in_the_record_field_X_has_not_changed,
Gbl.CurrentCrs.Records.Field.Name); Gbl.CurrentCrs.Records.Field.Name);
Ale_ShowAlert (Ale_INFO,Gbl.Alert.Txt); Ale_ShowA_old (Ale_INFO,Gbl.Alert.Txt);
} }
else else
{ {
@ -909,7 +909,7 @@ void Rec_ChangeLinesField (void)
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
Txt_From_now_on_the_number_of_editing_lines_of_the_field_X_is_Y, Txt_From_now_on_the_number_of_editing_lines_of_the_field_X_is_Y,
Gbl.CurrentCrs.Records.Field.Name,NewNumLines); Gbl.CurrentCrs.Records.Field.Name,NewNumLines);
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt); Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
} }
/***** Show the form again *****/ /***** Show the form again *****/
@ -949,7 +949,7 @@ void Rec_ChangeVisibilityField (void)
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
Txt_The_visibility_of_the_record_field_X_has_not_changed, Txt_The_visibility_of_the_record_field_X_has_not_changed,
Gbl.CurrentCrs.Records.Field.Name); Gbl.CurrentCrs.Records.Field.Name);
Ale_ShowAlert (Ale_INFO,Gbl.Alert.Txt); Ale_ShowA_old (Ale_INFO,Gbl.Alert.Txt);
} }
else else
{ {
@ -964,7 +964,7 @@ void Rec_ChangeVisibilityField (void)
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
Txt_RECORD_FIELD_VISIBILITY_MSG[NewVisibility], Txt_RECORD_FIELD_VISIBILITY_MSG[NewVisibility],
Gbl.CurrentCrs.Records.Field.Name); Gbl.CurrentCrs.Records.Field.Name);
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt); Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
} }
/***** Show the form again *****/ /***** Show the form again *****/
@ -1038,7 +1038,7 @@ static void Rec_ListRecordsGsts (Rec_SharedRecordViewType_t TypeOfView)
/* Check the number of students to show */ /* Check the number of students to show */
if (!Usr_CountNumUsrsInListOfSelectedUsrs ()) // If no students selected... if (!Usr_CountNumUsrsInListOfSelectedUsrs ()) // If no students selected...
{ // ...write warning notice { // ...write warning notice
Ale_ShowAlert (Ale_WARNING,Txt_You_must_select_one_ore_more_users); Ale_ShowA_old (Ale_WARNING,Txt_You_must_select_one_ore_more_users);
Usr_SeeGuests (); // ...show again the form Usr_SeeGuests (); // ...show again the form
return; return;
} }
@ -1236,7 +1236,7 @@ static void Rec_ListRecordsStds (Rec_SharedRecordViewType_t ShaTypeOfView,
/* Check the number of students to show */ /* Check the number of students to show */
if (!Usr_CountNumUsrsInListOfSelectedUsrs ()) // If no students selected... if (!Usr_CountNumUsrsInListOfSelectedUsrs ()) // If no students selected...
{ // ...write warning notice { // ...write warning notice
Ale_ShowAlert (Ale_WARNING,Txt_You_must_select_one_ore_more_students); Ale_ShowA_old (Ale_WARNING,Txt_You_must_select_one_ore_more_students);
Usr_SeeStudents (); // ...show again the form Usr_SeeStudents (); // ...show again the form
return; return;
} }
@ -1460,7 +1460,7 @@ static void Rec_ListRecordsTchs (Rec_SharedRecordViewType_t TypeOfView)
/* Check the number of teachers to show */ /* Check the number of teachers to show */
if (!Usr_CountNumUsrsInListOfSelectedUsrs ()) // If no teachers selected... if (!Usr_CountNumUsrsInListOfSelectedUsrs ()) // If no teachers selected...
{ // ...write warning notice { // ...write warning notice
Ale_ShowAlert (Ale_WARNING,Txt_You_must_select_one_ore_more_teachers); Ale_ShowA_old (Ale_WARNING,Txt_You_must_select_one_ore_more_teachers);
Usr_SeeTeachers (); // ...show again the form Usr_SeeTeachers (); // ...show again the form
return; return;
} }
@ -2063,7 +2063,7 @@ static void Rec_ShowMyCrsRecordUpdated (void)
extern const char *Txt_Your_record_card_in_this_course_has_been_updated; extern const char *Txt_Your_record_card_in_this_course_has_been_updated;
/***** Write mensaje of success *****/ /***** Write mensaje of success *****/
Ale_ShowAlert (Ale_SUCCESS,Txt_Your_record_card_in_this_course_has_been_updated); Ale_ShowA_old (Ale_SUCCESS,Txt_Your_record_card_in_this_course_has_been_updated);
/***** Shared record *****/ /***** Shared record *****/
Rec_ShowSharedUsrRecord (Rec_SHA_RECORD_LIST,&Gbl.Usrs.Me.UsrDat,NULL); Rec_ShowSharedUsrRecord (Rec_SHA_RECORD_LIST,&Gbl.Usrs.Me.UsrDat,NULL);
@ -2157,7 +2157,7 @@ void Rec_ShowMySharedRecordUpd (void)
extern const char *Txt_Your_personal_data_have_been_updated; extern const char *Txt_Your_personal_data_have_been_updated;
/***** Write alert *****/ /***** Write alert *****/
Ale_ShowAlert (Ale_SUCCESS,Txt_Your_personal_data_have_been_updated); Ale_ShowA_old (Ale_SUCCESS,Txt_Your_personal_data_have_been_updated);
/***** Show my record and other data *****/ /***** Show my record and other data *****/
Rec_ShowMySharedRecordAndMore (); Rec_ShowMySharedRecordAndMore ();
@ -3964,27 +3964,27 @@ void Rec_ShowMySharedRecordAndMore (void)
/***** If user has no name and surname, sex... *****/ /***** If user has no name and surname, sex... *****/
if (!Gbl.Usrs.Me.UsrDat.FirstName[0] || if (!Gbl.Usrs.Me.UsrDat.FirstName[0] ||
!Gbl.Usrs.Me.UsrDat.Surname1[0]) // 1. No name !Gbl.Usrs.Me.UsrDat.Surname1[0]) // 1. No name
Ale_ShowAlert (Ale_WARNING, Ale_ShowA_old (Ale_WARNING,
Txt_Please_fill_in_your_record_card_including_your_name); Txt_Please_fill_in_your_record_card_including_your_name);
else if (Gbl.Usrs.Me.UsrDat.Sex == Usr_SEX_UNKNOWN) // 2. No sex else if (Gbl.Usrs.Me.UsrDat.Sex == Usr_SEX_UNKNOWN) // 2. No sex
Ale_ShowAlert (Ale_WARNING, Ale_ShowA_old (Ale_WARNING,
Txt_Please_fill_in_your_record_card_including_your_sex); Txt_Please_fill_in_your_record_card_including_your_sex);
else if (Gbl.Usrs.Me.UsrDat.CtyCod < 0) // 3. No country else if (Gbl.Usrs.Me.UsrDat.CtyCod < 0) // 3. No country
Ale_ShowAlert (Ale_WARNING, Ale_ShowA_old (Ale_WARNING,
Txt_Please_fill_in_your_record_card_including_your_country_nationality); Txt_Please_fill_in_your_record_card_including_your_country_nationality);
else if (Gbl.Usrs.Me.UsrDat.InsCtyCod < 0) // 4. No institution country else if (Gbl.Usrs.Me.UsrDat.InsCtyCod < 0) // 4. No institution country
Ale_ShowAlert (Ale_WARNING, Ale_ShowA_old (Ale_WARNING,
Txt_Please_select_the_country_of_your_institution); Txt_Please_select_the_country_of_your_institution);
else if (Gbl.Usrs.Me.UsrDat.InsCod < 0) // 5. No institution else if (Gbl.Usrs.Me.UsrDat.InsCod < 0) // 5. No institution
Ale_ShowAlert (Ale_WARNING, Ale_ShowA_old (Ale_WARNING,
Txt_Please_fill_in_your_institution); Txt_Please_fill_in_your_institution);
else if (IAmATeacher) else if (IAmATeacher)
{ {
if (Gbl.Usrs.Me.UsrDat.Tch.CtrCod < 0) // 6. No centre if (Gbl.Usrs.Me.UsrDat.Tch.CtrCod < 0) // 6. No centre
Ale_ShowAlert (Ale_WARNING, Ale_ShowA_old (Ale_WARNING,
Txt_Please_fill_in_your_centre); Txt_Please_fill_in_your_centre);
else if (Gbl.Usrs.Me.UsrDat.Tch.DptCod < 0) // 7. No deparment else if (Gbl.Usrs.Me.UsrDat.Tch.DptCod < 0) // 7. No deparment
Ale_ShowAlert (Ale_WARNING, Ale_ShowA_old (Ale_WARNING,
Txt_Please_fill_in_your_department); Txt_Please_fill_in_your_department);
} }

View File

@ -440,7 +440,7 @@ static void Sch_SearchInDB (void)
} }
if (NumResults == 0) if (NumResults == 0)
Ale_ShowAlert (Ale_INFO,Txt_No_results); Ale_ShowA_old (Ale_INFO,Txt_No_results);
} }
/*****************************************************************************/ /*****************************************************************************/
@ -653,7 +653,7 @@ static unsigned Sch_SearchUsrsInDB (Rol_Role_t Role)
// Too short // Too short
if (!WarningMessageWritten) // To avoid repetitions if (!WarningMessageWritten) // To avoid repetitions
{ {
Ale_ShowAlert (Ale_WARNING,Txt_The_search_text_must_be_longer); Ale_ShowA_old (Ale_WARNING,Txt_The_search_text_must_be_longer);
WarningMessageWritten = true; WarningMessageWritten = true;
} }

View File

@ -1125,7 +1125,7 @@ static void Soc_ShowWarningYouDontFollowAnyUser (void)
if (!Fol_GetNumFollowing (Gbl.Usrs.Me.UsrDat.UsrCod)) if (!Fol_GetNumFollowing (Gbl.Usrs.Me.UsrDat.UsrCod))
{ {
/***** Show warning if I do not follow anyone *****/ /***** Show warning if I do not follow anyone *****/
Ale_ShowAlert (Ale_WARNING,Txt_You_dont_follow_any_user); Ale_ShowA_old (Ale_WARNING,Txt_You_dont_follow_any_user);
/***** Put link to show users to follow *****/ /***** Put link to show users to follow *****/
fprintf (Gbl.F.Out,"<div class=\"CONTEXT_MENU\">"); fprintf (Gbl.F.Out,"<div class=\"CONTEXT_MENU\">");
@ -1331,7 +1331,7 @@ static void Soc_WriteSocialNote (const struct SocialNote *SocNot,
if (SocNot->NotCod <= 0 || if (SocNot->NotCod <= 0 ||
SocNot->NoteType == Soc_NOTE_UNKNOWN || SocNot->NoteType == Soc_NOTE_UNKNOWN ||
SocNot->UsrCod <= 0) SocNot->UsrCod <= 0)
Ale_ShowAlert (Ale_ERROR,"Error in social note."); Ale_ShowA_old (Ale_ERROR,"Error in social note.");
else else
{ {
/***** Initialize location in hierarchy *****/ /***** Initialize location in hierarchy *****/
@ -2571,7 +2571,7 @@ static void Soc_WriteSocialComment (struct SocialComment *SocCom,
if (SocCom->PubCod <= 0 || if (SocCom->PubCod <= 0 ||
SocCom->NotCod <= 0 || SocCom->NotCod <= 0 ||
SocCom->UsrCod <= 0) SocCom->UsrCod <= 0)
Ale_ShowAlert (Ale_ERROR,"Error in social comment."); Ale_ShowA_old (Ale_ERROR,"Error in social comment.");
else else
{ {
/***** Get author's data *****/ /***** Get author's data *****/
@ -3004,7 +3004,7 @@ static long Soc_ReceiveComment (void)
Img_ImageDestructor (&Image); Img_ImageDestructor (&Image);
} }
else else
Ale_ShowAlert (Ale_WARNING,Txt_The_original_post_no_longer_exists); Ale_ShowA_old (Ale_WARNING,Txt_The_original_post_no_longer_exists);
return SocNot.NotCod; return SocNot.NotCod;
} }
@ -3083,7 +3083,7 @@ static long Soc_ShareSocialNote (void)
} }
} }
else else
Ale_ShowAlert (Ale_WARNING,Txt_The_original_post_no_longer_exists); Ale_ShowA_old (Ale_WARNING,Txt_The_original_post_no_longer_exists);
return SocNot.NotCod; return SocNot.NotCod;
} }
@ -3169,7 +3169,7 @@ static long Soc_FavSocialNote (void)
} }
} }
else else
Ale_ShowAlert (Ale_WARNING,Txt_The_original_post_no_longer_exists); Ale_ShowA_old (Ale_WARNING,Txt_The_original_post_no_longer_exists);
return SocNot.NotCod; return SocNot.NotCod;
} }
@ -3255,7 +3255,7 @@ static long Soc_FavSocialComment (void)
} }
} }
else else
Ale_ShowAlert (Ale_WARNING,Txt_The_comment_no_longer_exists); Ale_ShowA_old (Ale_WARNING,Txt_The_comment_no_longer_exists);
/***** Free image *****/ /***** Free image *****/
Img_ImageDestructor (&SocCom.Image); Img_ImageDestructor (&SocCom.Image);
@ -3381,7 +3381,7 @@ static long Soc_UnshareSocialNote (void)
} }
} }
else else
Ale_ShowAlert (Ale_WARNING,Txt_The_original_post_no_longer_exists); Ale_ShowA_old (Ale_WARNING,Txt_The_original_post_no_longer_exists);
return SocNot.NotCod; return SocNot.NotCod;
} }
@ -3465,7 +3465,7 @@ static long Soc_UnfavSocialNote (void)
} }
} }
else else
Ale_ShowAlert (Ale_WARNING,Txt_The_original_post_no_longer_exists); Ale_ShowA_old (Ale_WARNING,Txt_The_original_post_no_longer_exists);
return SocNot.NotCod; return SocNot.NotCod;
} }
@ -3549,7 +3549,7 @@ static long Soc_UnfavSocialComment (void)
} }
} }
else else
Ale_ShowAlert (Ale_WARNING,Txt_The_comment_no_longer_exists); Ale_ShowA_old (Ale_WARNING,Txt_The_comment_no_longer_exists);
/***** Free image *****/ /***** Free image *****/
Img_ImageDestructor (&SocCom.Image); Img_ImageDestructor (&SocCom.Image);
@ -3630,7 +3630,7 @@ static void Soc_RequestRemovalSocialNote (void)
} }
} }
else else
Ale_ShowAlert (Ale_WARNING,Txt_The_original_post_no_longer_exists); Ale_ShowA_old (Ale_WARNING,Txt_The_original_post_no_longer_exists);
} }
/*****************************************************************************/ /*****************************************************************************/
@ -3704,11 +3704,11 @@ static void Soc_RemoveSocialNote (void)
Soc_RemoveASocialNoteFromDB (&SocNot); Soc_RemoveASocialNoteFromDB (&SocNot);
/***** Message of success *****/ /***** Message of success *****/
Ale_ShowAlert (Ale_SUCCESS,Txt_Post_removed); Ale_ShowA_old (Ale_SUCCESS,Txt_Post_removed);
} }
} }
else else
Ale_ShowAlert (Ale_WARNING,Txt_The_original_post_no_longer_exists); Ale_ShowA_old (Ale_WARNING,Txt_The_original_post_no_longer_exists);
} }
/*****************************************************************************/ /*****************************************************************************/
@ -3964,7 +3964,7 @@ static void Soc_RequestRemovalSocialComment (void)
} }
} }
else else
Ale_ShowAlert (Ale_WARNING,Txt_The_comment_no_longer_exists); Ale_ShowA_old (Ale_WARNING,Txt_The_comment_no_longer_exists);
/***** Free image *****/ /***** Free image *****/
Img_ImageDestructor (&SocCom.Image); Img_ImageDestructor (&SocCom.Image);
@ -4043,11 +4043,11 @@ static void Soc_RemoveSocialComment (void)
Soc_RemoveASocialCommentFromDB (&SocCom); Soc_RemoveASocialCommentFromDB (&SocCom);
/***** Message of success *****/ /***** Message of success *****/
Ale_ShowAlert (Ale_SUCCESS,Txt_Comment_removed); Ale_ShowA_old (Ale_SUCCESS,Txt_Comment_removed);
} }
} }
else else
Ale_ShowAlert (Ale_WARNING,Txt_The_comment_no_longer_exists); Ale_ShowA_old (Ale_WARNING,Txt_The_comment_no_longer_exists);
/***** Free image *****/ /***** Free image *****/
Img_ImageDestructor (&SocCom.Image); Img_ImageDestructor (&SocCom.Image);

View File

@ -478,7 +478,7 @@ void Sta_AskShowCrsHits (void)
} }
} }
else // No teachers nor students found else // No teachers nor students found
Ale_ShowAlert (Ale_WARNING,Txt_No_teachers_or_students_found); Ale_ShowA_old (Ale_WARNING,Txt_No_teachers_or_students_found);
/***** End section with user list *****/ /***** End section with user list *****/
Lay_EndSection (); Lay_EndSection ();
@ -861,7 +861,7 @@ static void Sta_ShowHits (Sta_GlobalOrCourseAccesses_t GlobalOrCourse)
Gbl.Stat.CountType == Sta_CLICKS_PER_USR)) // These types of query will never give a valid result Gbl.Stat.CountType == Sta_CLICKS_PER_USR)) // These types of query will never give a valid result
{ {
/* Write warning message and abort */ /* Write warning message and abort */
Ale_ShowAlert (Ale_WARNING,Txt_There_is_no_knowing_how_many_users_not_logged_have_accessed); Ale_ShowA_old (Ale_WARNING,Txt_There_is_no_knowing_how_many_users_not_logged_have_accessed);
return; return;
} }
break; break;
@ -900,7 +900,7 @@ static void Sta_ShowHits (Sta_GlobalOrCourseAccesses_t GlobalOrCourse)
if (!Usr_CountNumUsrsInListOfSelectedUsrs ()) // Error: there are no users selected if (!Usr_CountNumUsrsInListOfSelectedUsrs ()) // Error: there are no users selected
{ {
/* Write warning message, clean and abort */ /* Write warning message, clean and abort */
Ale_ShowAlert (Ale_WARNING,Txt_You_must_select_one_ore_more_users); Ale_ShowA_old (Ale_WARNING,Txt_You_must_select_one_ore_more_users);
Usr_FreeListsSelectedUsrsCods (); Usr_FreeListsSelectedUsrsCods ();
return; return;
} }
@ -926,7 +926,7 @@ static void Sta_ShowHits (Sta_GlobalOrCourseAccesses_t GlobalOrCourse)
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
Txt_The_date_range_must_be_less_than_or_equal_to_X_days, Txt_The_date_range_must_be_less_than_or_equal_to_X_days,
Cfg_DAYS_IN_RECENT_LOG); Cfg_DAYS_IN_RECENT_LOG);
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt); // ...write warning message and show the form again Ale_ShowA_old (Ale_WARNING,Gbl.Alert.Txt); // ...write warning message and show the form again
return; return;
} }
@ -1388,7 +1388,7 @@ static void Sta_ShowHits (Sta_GlobalOrCourseAccesses_t GlobalOrCourse)
/***** Count the number of rows in result *****/ /***** Count the number of rows in result *****/
if (NumRows == 0) if (NumRows == 0)
Ale_ShowAlert (Ale_INFO,Txt_There_are_no_accesses_with_the_selected_search_criteria); Ale_ShowA_old (Ale_INFO,Txt_There_are_no_accesses_with_the_selected_search_criteria);
else else
{ {
/***** Put the table with the clicks *****/ /***** Put the table with the clicks *****/

View File

@ -953,7 +953,7 @@ void Str_SetDecimalPointToUS (void)
{ {
if (!setlocale (LC_NUMERIC,"en_US.utf8")) // To get/print the floating point as a dot if (!setlocale (LC_NUMERIC,"en_US.utf8")) // To get/print the floating point as a dot
if (Gbl.Layout.HTMLStartWritten) if (Gbl.Layout.HTMLStartWritten)
Ale_ShowAlert (Ale_ERROR,"Can not set locale to en_US."); Ale_ShowA_old (Ale_ERROR,"Can not set locale to en_US.");
} }
/*****************************************************************************/ /*****************************************************************************/
@ -965,7 +965,7 @@ void Str_SetDecimalPointToLocal (void)
// TODO: this should be internationalized!!!!!!! // TODO: this should be internationalized!!!!!!!
if (!setlocale (LC_NUMERIC,"es_ES.utf8")) // Return to local system if (!setlocale (LC_NUMERIC,"es_ES.utf8")) // Return to local system
if (Gbl.Layout.HTMLStartWritten) if (Gbl.Layout.HTMLStartWritten)
Ale_ShowAlert (Ale_ERROR,"Can not set locale to es_ES."); Ale_ShowA_old (Ale_ERROR,"Can not set locale to es_ES.");
} }
/*****************************************************************************/ /*****************************************************************************/
@ -2706,7 +2706,7 @@ int Str_ReadFileUntilBoundaryStr (FILE *FileSrc,char *StrDst,
/****** Convert invalid characters in a file name to valid characters ********/ /****** Convert invalid characters in a file name to valid characters ********/
/*****************************************************************************/ /*****************************************************************************/
// Return true if the name of the file o folder is valid // Return true if the name of the file o folder is valid
// If the name is not valid, Gbl.Alert.Txt will contain feedback text // If the name is not valid, Gbl.AlertToShowLater.Txt will contain feedback text
// File names with heading and trailing spaces are allowed // File names with heading and trailing spaces are allowed
bool Str_ConvertFilFolLnkNameToValid (char *FileName) bool Str_ConvertFilFolLnkNameToValid (char *FileName)
@ -2797,13 +2797,13 @@ bool Str_ConvertFilFolLnkNameToValid (char *FileName)
if (NumAlfanum) if (NumAlfanum)
FileNameIsOK = true; FileNameIsOK = true;
else else
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), snprintf (Gbl.AlertToShowLater.Txt,sizeof (Gbl.AlertToShowLater.Txt),
Gbl.FileBrowser.UploadingWithDropzone ? Txt_UPLOAD_FILE_X_invalid_name_NO_HTML : Gbl.FileBrowser.UploadingWithDropzone ? Txt_UPLOAD_FILE_X_invalid_name_NO_HTML :
Txt_UPLOAD_FILE_X_invalid_name, Txt_UPLOAD_FILE_X_invalid_name,
FileName); FileName);
} }
else // FileName is empty else // FileName is empty
Str_Copy (Gbl.Alert.Txt, Str_Copy (Gbl.AlertToShowLater.Txt,
Gbl.FileBrowser.UploadingWithDropzone ? Txt_UPLOAD_FILE_Invalid_name_NO_HTML : Gbl.FileBrowser.UploadingWithDropzone ? Txt_UPLOAD_FILE_Invalid_name_NO_HTML :
Txt_UPLOAD_FILE_Invalid_name, Txt_UPLOAD_FILE_Invalid_name,
Ale_MAX_BYTES_ALERT); Ale_MAX_BYTES_ALERT);

View File

@ -279,7 +279,7 @@ static void Svy_ListAllSurveys (struct SurveyQuestion *SvyQst)
Tbl_EndTable (); Tbl_EndTable ();
} }
else // No surveys created else // No surveys created
Ale_ShowAlert (Ale_INFO,Txt_No_surveys); Ale_ShowA_old (Ale_INFO,Txt_No_surveys);
/***** Button to create a new survey *****/ /***** Button to create a new survey *****/
if (Svy_CheckIfICanCreateSvy ()) if (Svy_CheckIfICanCreateSvy ())
@ -1582,7 +1582,7 @@ void Svy_RemoveSurvey (void)
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
Txt_Survey_X_removed, Txt_Survey_X_removed,
Svy.Title); Svy.Title);
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt); Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
/***** Show surveys again *****/ /***** Show surveys again *****/
Svy_ListAllSurveys (&SvyQst); Svy_ListAllSurveys (&SvyQst);
@ -1619,7 +1619,7 @@ void Svy_AskResetSurvey (void)
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
Txt_Do_you_really_want_to_reset_the_survey_X, Txt_Do_you_really_want_to_reset_the_survey_X,
Svy.Title); Svy.Title);
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt); Ale_ShowA_old (Ale_WARNING,Gbl.Alert.Txt);
/***** Button of confirmation of reset *****/ /***** Button of confirmation of reset *****/
Gbl.Svys.SvyCodToEdit = Svy.SvyCod; Gbl.Svys.SvyCodToEdit = Svy.SvyCod;
@ -1681,7 +1681,7 @@ void Svy_ResetSurvey (void)
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
Txt_Survey_X_reset, Txt_Survey_X_reset,
Svy.Title); Svy.Title);
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt); Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
/***** Show surveys again *****/ /***** Show surveys again *****/
Svy_ListAllSurveys (&SvyQst); Svy_ListAllSurveys (&SvyQst);
@ -1718,7 +1718,7 @@ void Svy_HideSurvey (void)
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
Txt_Survey_X_is_now_hidden, Txt_Survey_X_is_now_hidden,
Svy.Title); Svy.Title);
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt); Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
/***** Show surveys again *****/ /***** Show surveys again *****/
Svy_ListAllSurveys (&SvyQst); Svy_ListAllSurveys (&SvyQst);
@ -1755,7 +1755,7 @@ void Svy_UnhideSurvey (void)
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
Txt_Survey_X_is_now_visible, Txt_Survey_X_is_now_visible,
Svy.Title); Svy.Title);
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt); Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
/***** Show surveys again *****/ /***** Show surveys again *****/
Svy_ListAllSurveys (&SvyQst); Svy_ListAllSurveys (&SvyQst);
@ -2207,13 +2207,13 @@ void Svy_RecFormSurvey (void)
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
Txt_Already_existed_a_survey_with_the_title_X, Txt_Already_existed_a_survey_with_the_title_X,
NewSvy.Title); NewSvy.Title);
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt); Ale_ShowA_old (Ale_WARNING,Gbl.Alert.Txt);
} }
} }
else // If there is not a survey title else // If there is not a survey title
{ {
NewSurveyIsCorrect = false; NewSurveyIsCorrect = false;
Ale_ShowAlert (Ale_WARNING,Txt_You_must_specify_the_title_of_the_survey); Ale_ShowA_old (Ale_WARNING,Txt_You_must_specify_the_title_of_the_survey);
} }
/***** Create a new survey or update an existing one *****/ /***** Create a new survey or update an existing one *****/
@ -2290,7 +2290,7 @@ static void Svy_CreateSurvey (struct Survey *Svy,const char *Txt)
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
Txt_Created_new_survey_X, Txt_Created_new_survey_X,
Svy->Title); Svy->Title);
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt); Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
} }
/*****************************************************************************/ /*****************************************************************************/
@ -2327,7 +2327,7 @@ static void Svy_UpdateSurvey (struct Survey *Svy,const char *Txt)
Svy_CreateGrps (Svy->SvyCod); Svy_CreateGrps (Svy->SvyCod);
/***** Write success message *****/ /***** Write success message *****/
Ale_ShowAlert (Ale_SUCCESS,Txt_The_survey_has_been_modified); Ale_ShowA_old (Ale_SUCCESS,Txt_The_survey_has_been_modified);
} }
/*****************************************************************************/ /*****************************************************************************/
@ -2887,7 +2887,7 @@ static unsigned Svy_GetAnswersQst (long QstCod,MYSQL_RES **mysql_res)
/***** Count number of rows of result *****/ /***** Count number of rows of result *****/
if (NumRows == 0) if (NumRows == 0)
Ale_ShowAlert (Ale_ERROR,"Error when getting answers of a question."); Ale_ShowA_old (Ale_ERROR,"Error when getting answers of a question.");
return (unsigned) NumRows; return (unsigned) NumRows;
} }
@ -3002,7 +3002,7 @@ void Svy_ReceiveQst (void)
{ {
if (ThereIsEndOfAnswers) if (ThereIsEndOfAnswers)
{ {
Ale_ShowAlert (Ale_WARNING,Txt_You_can_not_leave_empty_intermediate_answers); Ale_ShowA_old (Ale_WARNING,Txt_You_can_not_leave_empty_intermediate_answers);
Error = true; Error = true;
} }
else else
@ -3014,20 +3014,20 @@ void Svy_ReceiveQst (void)
{ {
if (NumLastAns < 1) if (NumLastAns < 1)
{ {
Ale_ShowAlert (Ale_WARNING,Txt_You_must_type_at_least_the_first_two_answers); Ale_ShowA_old (Ale_WARNING,Txt_You_must_type_at_least_the_first_two_answers);
Error = true; Error = true;
} }
} }
} }
else // If first answer is empty else // If first answer is empty
{ {
Ale_ShowAlert (Ale_WARNING,Txt_You_must_type_at_least_the_first_two_answers); Ale_ShowA_old (Ale_WARNING,Txt_You_must_type_at_least_the_first_two_answers);
Error = true; Error = true;
} }
} }
else else
{ {
Ale_ShowAlert (Ale_WARNING,Txt_You_must_type_the_stem_of_the_question); Ale_ShowA_old (Ale_WARNING,Txt_You_must_type_the_stem_of_the_question);
Error = true; Error = true;
} }
@ -3090,7 +3090,7 @@ void Svy_ReceiveQst (void)
} }
/***** List the questions of this survey, including the new one just inserted into the database *****/ /***** List the questions of this survey, including the new one just inserted into the database *****/
Ale_ShowAlert (Ale_SUCCESS,Txt_The_survey_has_been_modified); Ale_ShowA_old (Ale_SUCCESS,Txt_The_survey_has_been_modified);
} }
/***** Free answers *****/ /***** Free answers *****/
@ -3299,7 +3299,7 @@ static void Svy_ListSvyQuestions (struct Survey *Svy,
} }
} }
else // This survey has no questions else // This survey has no questions
Ale_ShowAlert (Ale_INFO,Txt_This_survey_has_no_questions); Ale_ShowA_old (Ale_INFO,Txt_This_survey_has_no_questions);
if (Svy->Status.ICanEdit && // I can edit if (Svy->Status.ICanEdit && // I can edit
(!NumQsts || // This survey has no questions (!NumQsts || // This survey has no questions
@ -3621,7 +3621,7 @@ void Svy_RemoveQst (void)
SvyCod,SvyQst.QstInd); SvyCod,SvyQst.QstInd);
/***** Write message *****/ /***** Write message *****/
Ale_ShowAlert (Ale_SUCCESS,Txt_Question_removed); Ale_ShowA_old (Ale_SUCCESS,Txt_Question_removed);
/***** Show current survey *****/ /***** Show current survey *****/
Svy_ShowOneSurvey (SvyCod,&SvyQst,true); Svy_ShowOneSurvey (SvyCod,&SvyQst,true);
@ -3650,12 +3650,12 @@ void Svy_ReceiveSurveyAnswers (void)
/***** Check if I have no answered this survey formerly *****/ /***** Check if I have no answered this survey formerly *****/
if (Svy.Status.IHaveAnswered) if (Svy.Status.IHaveAnswered)
Ale_ShowAlert (Ale_WARNING,Txt_You_already_answered_this_survey_before); Ale_ShowA_old (Ale_WARNING,Txt_You_already_answered_this_survey_before);
else else
{ {
/***** Receive and store user's answers *****/ /***** Receive and store user's answers *****/
Svy_ReceiveAndStoreUserAnswersToASurvey (Svy.SvyCod); Svy_ReceiveAndStoreUserAnswersToASurvey (Svy.SvyCod);
Ale_ShowAlert (Ale_SUCCESS,Txt_Thanks_for_answering_the_survey); Ale_ShowA_old (Ale_SUCCESS,Txt_Thanks_for_answering_the_survey);
} }
/***** Show current survey *****/ /***** Show current survey *****/

View File

@ -389,7 +389,7 @@ void Tst_ShowFormAskTst (void)
else else
{ {
/***** Warning message *****/ /***** Warning message *****/
Ale_ShowAlert (Ale_INFO,Txt_No_test_questions); Ale_ShowA_old (Ale_INFO,Txt_No_test_questions);
/***** Button to create a new question *****/ /***** Button to create a new question *****/
if (Tst_CheckIfICanEditTests ()) if (Tst_CheckIfICanEditTests ())
@ -445,7 +445,7 @@ void Tst_ShowNewTest (void)
/***** Get questions *****/ /***** Get questions *****/
if ((NumRows = Tst_GetQuestionsForTest (&mysql_res)) == 0) // Query database if ((NumRows = Tst_GetQuestionsForTest (&mysql_res)) == 0) // Query database
{ {
Ale_ShowAlert (Ale_INFO,Txt_No_questions_found_matching_your_search_criteria); Ale_ShowA_old (Ale_INFO,Txt_No_questions_found_matching_your_search_criteria);
Tst_ShowFormAskTst (); // Show the form again Tst_ShowFormAskTst (); // Show the form again
} }
else else
@ -593,13 +593,13 @@ void Tst_AssessTest (void)
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
Txt_The_test_X_has_already_been_assessed_previously, Txt_The_test_X_has_already_been_assessed_previously,
NumTst); NumTst);
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt); Ale_ShowA_old (Ale_WARNING,Gbl.Alert.Txt);
break; break;
case Tst_STATUS_ERROR: case Tst_STATUS_ERROR:
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
Txt_There_was_an_error_in_assessing_the_test_X, Txt_There_was_an_error_in_assessing_the_test_X,
NumTst); NumTst);
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt); Ale_ShowA_old (Ale_WARNING,Gbl.Alert.Txt);
break; break;
} }
} }
@ -721,7 +721,7 @@ static bool Tst_CheckIfNextTstAllowed (void)
Txt_You_can_not_take_a_new_test_until, Txt_You_can_not_take_a_new_test_until,
(long) TimeNextTestUTC, (long) TimeNextTestUTC,
(unsigned) Gbl.Prefs.DateFormat,Txt_Today); (unsigned) Gbl.Prefs.DateFormat,Txt_Today);
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt); Ale_ShowA_old (Ale_WARNING,Gbl.Alert.Txt);
return false; return false;
} }
@ -1344,7 +1344,7 @@ void Tst_ShowFormAskEditTsts (void)
else // No test questions else // No test questions
{ {
/***** Warning message *****/ /***** Warning message *****/
Ale_ShowAlert (Ale_INFO,Txt_No_test_questions); Ale_ShowA_old (Ale_INFO,Txt_No_test_questions);
/***** Button to create a new question *****/ /***** Button to create a new question *****/
Tst_PutButtonToAddQuestion (); Tst_PutButtonToAddQuestion ();
@ -1397,7 +1397,7 @@ void Tst_ShowFormAskSelectTstsForGame (long GamCod)
else // No test questions else // No test questions
{ {
/***** Warning message *****/ /***** Warning message *****/
Ale_ShowAlert (Ale_INFO,Txt_No_test_questions); Ale_ShowA_old (Ale_INFO,Txt_No_test_questions);
/***** Button to create a new question *****/ /***** Button to create a new question *****/
Tst_PutButtonToAddQuestion (); Tst_PutButtonToAddQuestion ();
@ -1475,7 +1475,7 @@ void Tst_ShowFormConfig (void)
/***** If current course has tests and pluggable is unknown... *****/ /***** If current course has tests and pluggable is unknown... *****/
if (Tst_CheckIfCourseHaveTestsAndPluggableIsUnknown ()) if (Tst_CheckIfCourseHaveTestsAndPluggableIsUnknown ())
Ale_ShowAlert (Ale_WARNING,Txt_Please_specify_if_you_allow_access_to_test_questions_from_mobile_applications); Ale_ShowA_old (Ale_WARNING,Txt_Please_specify_if_you_allow_access_to_test_questions_from_mobile_applications);
/***** Form to configure test *****/ /***** Form to configure test *****/
Tst_ShowFormConfigTst (); Tst_ShowFormConfigTst ();
@ -1554,7 +1554,7 @@ void Tst_RenameTag (void)
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
Txt_You_can_not_leave_the_name_of_the_tag_X_empty, Txt_You_can_not_leave_the_name_of_the_tag_X_empty,
OldTagTxt); OldTagTxt);
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt); Ale_ShowA_old (Ale_WARNING,Gbl.Alert.Txt);
} }
else // New tag not empty else // New tag not empty
{ {
@ -1567,7 +1567,7 @@ void Tst_RenameTag (void)
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
Txt_The_tag_X_has_not_changed, Txt_The_tag_X_has_not_changed,
NewTagTxt); NewTagTxt);
Ale_ShowAlert (Ale_INFO,Gbl.Alert.Txt); Ale_ShowA_old (Ale_INFO,Gbl.Alert.Txt);
} }
else // The old and the new tag else // The old and the new tag
// are not exactly the same (case sensitively). // are not exactly the same (case sensitively).
@ -1650,7 +1650,7 @@ void Tst_RenameTag (void)
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
Txt_The_tag_X_has_been_renamed_as_Y, Txt_The_tag_X_has_been_renamed_as_Y,
OldTagTxt,NewTagTxt); OldTagTxt,NewTagTxt);
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt); Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
} }
} }
@ -1855,7 +1855,7 @@ static void Tst_ShowFormEditTags (void)
Box_EndBoxTable (); Box_EndBoxTable ();
} }
else else
Ale_ShowAlert (Ale_INFO,Txt_No_test_questions); Ale_ShowA_old (Ale_INFO,Txt_No_test_questions);
/* Free structure that stores the query result */ /* Free structure that stores the query result */
DB_FreeMySQLResult (&mysql_res); DB_FreeMySQLResult (&mysql_res);
@ -2257,7 +2257,7 @@ void Tst_ReceiveConfigTst (void)
Tst_FeedbackDB[Gbl.Test.Config.Feedback]); Tst_FeedbackDB[Gbl.Test.Config.Feedback]);
/***** Show confirmation message *****/ /***** Show confirmation message *****/
Ale_ShowAlert (Ale_SUCCESS,Txt_The_test_configuration_has_been_updated); Ale_ShowA_old (Ale_SUCCESS,Txt_The_test_configuration_has_been_updated);
/***** Show again the form to configure test *****/ /***** Show again the form to configure test *****/
Tst_ShowFormConfig (); Tst_ShowFormConfig ();
@ -2641,7 +2641,7 @@ static unsigned long Tst_GetQuestions (MYSQL_RES **mysql_res)
Query); Query);
if (NumRows == 0) if (NumRows == 0)
Ale_ShowAlert (Ale_INFO,Txt_No_questions_found_matching_your_search_criteria); Ale_ShowA_old (Ale_INFO,Txt_No_questions_found_matching_your_search_criteria);
return NumRows; return NumRows;
} }
@ -3324,7 +3324,7 @@ unsigned Tst_GetAnswersQst (long QstCod,MYSQL_RES **mysql_res,bool Shuffle)
Shuffle ? "RAND(NOW())" : Shuffle ? "RAND(NOW())" :
"AnsInd"); "AnsInd");
if (!NumRows) if (!NumRows)
Ale_ShowAlert (Ale_ERROR,"Error when getting answers of a question."); Ale_ShowA_old (Ale_ERROR,"Error when getting answers of a question.");
return (unsigned) NumRows; return (unsigned) NumRows;
} }
@ -3574,7 +3574,7 @@ void Tst_WriteAnswersGameResult (struct Game *Game,unsigned NumQst,long QstCod,
case Tst_ANS_FLOAT: case Tst_ANS_FLOAT:
case Tst_ANS_TRUE_FALSE: case Tst_ANS_TRUE_FALSE:
case Tst_ANS_TEXT: case Tst_ANS_TEXT:
Ale_ShowAlert (Ale_WARNING,"Type of answer not valid in a game."); Ale_ShowA_old (Ale_WARNING,"Type of answer not valid in a game.");
break; break;
case Tst_ANS_UNIQUE_CHOICE: case Tst_ANS_UNIQUE_CHOICE:
case Tst_ANS_MULTIPLE_CHOICE: case Tst_ANS_MULTIPLE_CHOICE:
@ -4758,7 +4758,7 @@ static bool Tst_GetParamsTst (Tst_ActionToDoWithQuestions_t ActionToDoWithQuesti
/* Check number of tags selected */ /* Check number of tags selected */
if (Tst_CountNumTagsInList () == 0) // If no tags selected... if (Tst_CountNumTagsInList () == 0) // If no tags selected...
{ // ...write alert { // ...write alert
Ale_ShowAlert (Ale_WARNING,Txt_You_must_select_one_ore_more_tags); Ale_ShowA_old (Ale_WARNING,Txt_You_must_select_one_ore_more_tags);
Error = true; Error = true;
} }
@ -4776,7 +4776,7 @@ static bool Tst_GetParamsTst (Tst_ActionToDoWithQuestions_t ActionToDoWithQuesti
/* Check number of types of answer */ /* Check number of types of answer */
if (Tst_CountNumAnswerTypesInList () == 0) // If no types of answer selected... if (Tst_CountNumAnswerTypesInList () == 0) // If no types of answer selected...
{ // ...write warning alert { // ...write warning alert
Ale_ShowAlert (Ale_WARNING,Txt_You_must_select_one_ore_more_types_of_answer); Ale_ShowA_old (Ale_WARNING,Txt_You_must_select_one_ore_more_types_of_answer);
Error = true; Error = true;
} }
break; break;
@ -4802,7 +4802,7 @@ static bool Tst_GetParamsTst (Tst_ActionToDoWithQuestions_t ActionToDoWithQuesti
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
Txt_The_number_of_questions_must_be_in_the_interval_X, Txt_The_number_of_questions_must_be_in_the_interval_X,
Gbl.Test.Config.Min,Gbl.Test.Config.Max); Gbl.Test.Config.Min,Gbl.Test.Config.Max);
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt); Ale_ShowA_old (Ale_WARNING,Gbl.Alert.Txt);
Error = true; Error = true;
} }
break; break;
@ -6009,7 +6009,7 @@ bool Tst_CheckIfQstFormatIsCorrectAndCountNumOptions (void)
Gbl.Test.Image.Action == Img_ACTION_CHANGE_IMAGE) && // Replace existing image by new image Gbl.Test.Image.Action == Img_ACTION_CHANGE_IMAGE) && // Replace existing image by new image
Gbl.Test.Image.Status != Img_FILE_PROCESSED) Gbl.Test.Image.Status != Img_FILE_PROCESSED)
{ {
Ale_ShowAlert (Ale_WARNING,Txt_Error_receiving_or_processing_image); Ale_ShowA_old (Ale_WARNING,Txt_Error_receiving_or_processing_image);
return false; return false;
} }
@ -6019,14 +6019,14 @@ bool Tst_CheckIfQstFormatIsCorrectAndCountNumOptions (void)
/***** A question must have at least one tag *****/ /***** A question must have at least one tag *****/
if (!Gbl.Test.Tags.Num) // There are no tags with text if (!Gbl.Test.Tags.Num) // There are no tags with text
{ {
Ale_ShowAlert (Ale_WARNING,Txt_You_must_type_at_least_one_tag_for_the_question); Ale_ShowA_old (Ale_WARNING,Txt_You_must_type_at_least_one_tag_for_the_question);
return false; return false;
} }
/***** A question must have a stem*****/ /***** A question must have a stem*****/
if (!Gbl.Test.Stem.Length) if (!Gbl.Test.Stem.Length)
{ {
Ale_ShowAlert (Ale_WARNING,Txt_You_must_type_the_stem_of_the_question); Ale_ShowA_old (Ale_WARNING,Txt_You_must_type_the_stem_of_the_question);
return false; return false;
} }
@ -6036,12 +6036,12 @@ bool Tst_CheckIfQstFormatIsCorrectAndCountNumOptions (void)
case Tst_ANS_INT: case Tst_ANS_INT:
if (!Gbl.Test.Answer.Options[0].Text) if (!Gbl.Test.Answer.Options[0].Text)
{ {
Ale_ShowAlert (Ale_WARNING,Txt_You_must_enter_an_integer_value_as_the_correct_answer); Ale_ShowA_old (Ale_WARNING,Txt_You_must_enter_an_integer_value_as_the_correct_answer);
return false; return false;
} }
if (!Gbl.Test.Answer.Options[0].Text[0]) if (!Gbl.Test.Answer.Options[0].Text[0])
{ {
Ale_ShowAlert (Ale_WARNING,Txt_You_must_enter_an_integer_value_as_the_correct_answer); Ale_ShowA_old (Ale_WARNING,Txt_You_must_enter_an_integer_value_as_the_correct_answer);
return false; return false;
} }
Gbl.Test.Answer.Integer = Tst_GetIntAnsFromStr (Gbl.Test.Answer.Options[0].Text); Gbl.Test.Answer.Integer = Tst_GetIntAnsFromStr (Gbl.Test.Answer.Options[0].Text);
@ -6051,13 +6051,13 @@ bool Tst_CheckIfQstFormatIsCorrectAndCountNumOptions (void)
if (!Gbl.Test.Answer.Options[0].Text || if (!Gbl.Test.Answer.Options[0].Text ||
!Gbl.Test.Answer.Options[1].Text) !Gbl.Test.Answer.Options[1].Text)
{ {
Ale_ShowAlert (Ale_WARNING,Txt_You_must_enter_the_range_of_floating_point_values_allowed_as_answer); Ale_ShowA_old (Ale_WARNING,Txt_You_must_enter_the_range_of_floating_point_values_allowed_as_answer);
return false; return false;
} }
if (!Gbl.Test.Answer.Options[0].Text[0] || if (!Gbl.Test.Answer.Options[0].Text[0] ||
!Gbl.Test.Answer.Options[1].Text[0]) !Gbl.Test.Answer.Options[1].Text[0])
{ {
Ale_ShowAlert (Ale_WARNING,Txt_You_must_enter_the_range_of_floating_point_values_allowed_as_answer); Ale_ShowA_old (Ale_WARNING,Txt_You_must_enter_the_range_of_floating_point_values_allowed_as_answer);
return false; return false;
} }
for (i = 0; for (i = 0;
@ -6067,7 +6067,7 @@ bool Tst_CheckIfQstFormatIsCorrectAndCountNumOptions (void)
if (Gbl.Test.Answer.FloatingPoint[0] > if (Gbl.Test.Answer.FloatingPoint[0] >
Gbl.Test.Answer.FloatingPoint[1]) Gbl.Test.Answer.FloatingPoint[1])
{ {
Ale_ShowAlert (Ale_WARNING,Txt_The_lower_limit_of_correct_answers_must_be_less_than_or_equal_to_the_upper_limit); Ale_ShowA_old (Ale_WARNING,Txt_The_lower_limit_of_correct_answers_must_be_less_than_or_equal_to_the_upper_limit);
return false; return false;
} }
Gbl.Test.Answer.NumOptions = 2; Gbl.Test.Answer.NumOptions = 2;
@ -6076,7 +6076,7 @@ bool Tst_CheckIfQstFormatIsCorrectAndCountNumOptions (void)
if (Gbl.Test.Answer.TF != 'T' && if (Gbl.Test.Answer.TF != 'T' &&
Gbl.Test.Answer.TF != 'F') Gbl.Test.Answer.TF != 'F')
{ {
Ale_ShowAlert (Ale_WARNING,Txt_You_must_select_a_T_F_answer); Ale_ShowA_old (Ale_WARNING,Txt_You_must_select_a_T_F_answer);
return false; return false;
} }
Gbl.Test.Answer.NumOptions = 1; Gbl.Test.Answer.NumOptions = 1;
@ -6085,12 +6085,12 @@ bool Tst_CheckIfQstFormatIsCorrectAndCountNumOptions (void)
case Tst_ANS_MULTIPLE_CHOICE: case Tst_ANS_MULTIPLE_CHOICE:
if (!Gbl.Test.Answer.Options[0].Text) // If the first answer is empty if (!Gbl.Test.Answer.Options[0].Text) // If the first answer is empty
{ {
Ale_ShowAlert (Ale_WARNING,Txt_You_must_type_at_least_the_first_two_answers); Ale_ShowA_old (Ale_WARNING,Txt_You_must_type_at_least_the_first_two_answers);
return false; return false;
} }
if (!Gbl.Test.Answer.Options[0].Text[0]) // If the first answer is empty if (!Gbl.Test.Answer.Options[0].Text[0]) // If the first answer is empty
{ {
Ale_ShowAlert (Ale_WARNING,Txt_You_must_type_at_least_the_first_two_answers); Ale_ShowA_old (Ale_WARNING,Txt_You_must_type_at_least_the_first_two_answers);
return false; return false;
} }
@ -6103,7 +6103,7 @@ bool Tst_CheckIfQstFormatIsCorrectAndCountNumOptions (void)
{ {
if (ThereIsEndOfAnswers) if (ThereIsEndOfAnswers)
{ {
Ale_ShowAlert (Ale_WARNING,Txt_You_can_not_leave_empty_intermediate_answers); Ale_ShowA_old (Ale_WARNING,Txt_You_can_not_leave_empty_intermediate_answers);
return false; return false;
} }
NumLastOpt = NumOpt; NumLastOpt = NumOpt;
@ -6117,7 +6117,7 @@ bool Tst_CheckIfQstFormatIsCorrectAndCountNumOptions (void)
if (NumLastOpt < 1) if (NumLastOpt < 1)
{ {
Ale_ShowAlert (Ale_WARNING,Txt_You_must_type_at_least_the_first_two_answers); Ale_ShowA_old (Ale_WARNING,Txt_You_must_type_at_least_the_first_two_answers);
return false; return false;
} }
@ -6128,19 +6128,19 @@ bool Tst_CheckIfQstFormatIsCorrectAndCountNumOptions (void)
break; break;
if (NumOpt > NumLastOpt) if (NumOpt > NumLastOpt)
{ {
Ale_ShowAlert (Ale_WARNING,Txt_You_must_mark_an_answer_as_correct); Ale_ShowA_old (Ale_WARNING,Txt_You_must_mark_an_answer_as_correct);
return false; return false;
} }
break; break;
case Tst_ANS_TEXT: case Tst_ANS_TEXT:
if (!Gbl.Test.Answer.Options[0].Text) // If the first answer is empty if (!Gbl.Test.Answer.Options[0].Text) // If the first answer is empty
{ {
Ale_ShowAlert (Ale_WARNING,Txt_You_must_type_at_least_the_first_two_answers); Ale_ShowA_old (Ale_WARNING,Txt_You_must_type_at_least_the_first_two_answers);
return false; return false;
} }
if (!Gbl.Test.Answer.Options[0].Text[0]) // If the first answer is empty if (!Gbl.Test.Answer.Options[0].Text[0]) // If the first answer is empty
{ {
Ale_ShowAlert (Ale_WARNING,Txt_You_must_type_at_least_the_first_answer); Ale_ShowA_old (Ale_WARNING,Txt_You_must_type_at_least_the_first_answer);
return false; return false;
} }
@ -6153,7 +6153,7 @@ bool Tst_CheckIfQstFormatIsCorrectAndCountNumOptions (void)
{ {
if (ThereIsEndOfAnswers) if (ThereIsEndOfAnswers)
{ {
Ale_ShowAlert (Ale_WARNING,Txt_You_can_not_leave_empty_intermediate_answers); Ale_ShowA_old (Ale_WARNING,Txt_You_can_not_leave_empty_intermediate_answers);
return false; return false;
} }
Gbl.Test.Answer.NumOptions++; Gbl.Test.Answer.NumOptions++;
@ -6456,7 +6456,7 @@ void Tst_RemoveQst (void)
Lay_ShowErrorAndExit ("The question to be removed does not exist or belongs to another course."); Lay_ShowErrorAndExit ("The question to be removed does not exist or belongs to another course.");
/***** Write message *****/ /***** Write message *****/
Ale_ShowAlert (Ale_SUCCESS,Txt_Question_removed); Ale_ShowA_old (Ale_SUCCESS,Txt_Question_removed);
/***** Continue editing questions *****/ /***** Continue editing questions *****/
if (!EditingOnlyThisQst) if (!EditingOnlyThisQst)
@ -6499,7 +6499,7 @@ void Tst_ChangeShuffleQst (void)
Shuffle ? Txt_The_answers_of_the_question_with_code_X_will_appear_shuffled : 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, Txt_The_answers_of_the_question_with_code_X_will_appear_without_shuffling,
Gbl.Test.QstCod); Gbl.Test.QstCod);
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt); Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
/***** Continue editing questions *****/ /***** Continue editing questions *****/
if (EditingOnlyThisQst) if (EditingOnlyThisQst)
@ -7685,7 +7685,7 @@ void Tst_ShowUsrsTestResults (void)
else // If no users are selected... else // If no users are selected...
{ {
// ...write warning alert // ...write warning alert
Ale_ShowAlert (Ale_WARNING,Txt_You_must_select_one_ore_more_users); Ale_ShowA_old (Ale_WARNING,Txt_You_must_select_one_ore_more_users);
// ...and show again the form // ...and show again the form
Tst_SelUsrsToSeeUsrsTestResults (); Tst_SelUsrsToSeeUsrsTestResults ();
} }

View File

@ -139,7 +139,7 @@ void TsI_ShowFormImportQstsFromXML (void)
Hlp_ASSESSMENT_Tests,Box_NOT_CLOSABLE); Hlp_ASSESSMENT_Tests,Box_NOT_CLOSABLE);
/***** Write help message *****/ /***** Write help message *****/
Ale_ShowAlert (Ale_INFO,Txt_You_need_an_XML_file_containing_a_list_of_questions); Ale_ShowA_old (Ale_INFO,Txt_You_need_an_XML_file_containing_a_list_of_questions);
/***** Write a form to import questions *****/ /***** Write a form to import questions *****/
Frm_StartForm (ActImpTstQst); Frm_StartForm (ActImpTstQst);
@ -431,7 +431,7 @@ void TsI_ImportQstsFromXML (void)
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
Txt_The_file_is_not_X, Txt_The_file_is_not_X,
"xml"); "xml");
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt); Ale_ShowA_old (Ale_WARNING,Gbl.Alert.Txt);
} }
else else
{ {
@ -443,7 +443,7 @@ void TsI_ImportQstsFromXML (void)
/***** Get questions from XML file and store them in database *****/ /***** Get questions from XML file and store them in database *****/
TsI_ReadQuestionsFromXMLFileAndStoreInDB (FileNameXMLTmp); TsI_ReadQuestionsFromXMLFileAndStoreInDB (FileNameXMLTmp);
else else
Ale_ShowAlert (Ale_WARNING,"Error copying file."); Ale_ShowA_old (Ale_WARNING,"Error copying file.");
} }
} }
@ -677,7 +677,7 @@ static void TsI_ImportQuestionsFromXMLBuffer (const char *XMLBuffer)
Tbl_EndTable (); Tbl_EndTable ();
} }
else // TestElem not found else // TestElem not found
Ale_ShowAlert (Ale_ERROR,"Root element &lt;test&gt; not found."); Ale_ShowA_old (Ale_ERROR,"Root element &lt;test&gt; not found.");
/***** End table *****/ /***** End table *****/
Box_EndBox (); Box_EndBox ();

View File

@ -547,7 +547,7 @@ void TT_ShowTimeTable (long UsrCod)
if (Gbl.TimeTable.Config.HoursPerDay) if (Gbl.TimeTable.Config.HoursPerDay)
TT_DrawTimeTable (); TT_DrawTimeTable ();
else else
Ale_ShowAlert (Ale_INFO,Txt_The_timetable_is_empty); Ale_ShowA_old (Ale_INFO,Txt_The_timetable_is_empty);
/***** Free internal timetable in memory *****/ /***** Free internal timetable in memory *****/
TT_FreeTimeTable (); TT_FreeTimeTable ();
@ -1001,7 +1001,7 @@ static void TT_FillTimeTableFromDB (long UsrCod)
DB_FreeMySQLResult (&mysql_res); DB_FreeMySQLResult (&mysql_res);
if (TimeTableIsIncomplete) if (TimeTableIsIncomplete)
Ale_ShowAlert (Ale_INFO,Txt_Incomplete_timetable_for_lack_of_space); Ale_ShowA_old (Ale_INFO,Txt_Incomplete_timetable_for_lack_of_space);
} }
/*****************************************************************************/ /*****************************************************************************/

View File

@ -268,7 +268,7 @@ void Usr_InformAboutNumClicksBeforePhoto (void)
if (Gbl.Usrs.Me.NumAccWithoutPhoto) if (Gbl.Usrs.Me.NumAccWithoutPhoto)
{ {
if (Gbl.Usrs.Me.NumAccWithoutPhoto >= Pho_MAX_CLICKS_WITHOUT_PHOTO) if (Gbl.Usrs.Me.NumAccWithoutPhoto >= Pho_MAX_CLICKS_WITHOUT_PHOTO)
Ale_ShowAlert (Ale_WARNING,Txt_You_must_send_your_photo_because_); Ale_ShowA_old (Ale_WARNING,Txt_You_must_send_your_photo_because_);
else if (Act_GetBrowserTab (Gbl.Action.Act) == Act_BRW_1ST_TAB) else if (Act_GetBrowserTab (Gbl.Action.Act) == Act_BRW_1ST_TAB)
{ {
snprintf (Message,sizeof (Message), snprintf (Message,sizeof (Message),
@ -2527,7 +2527,7 @@ void Usr_WelcomeUsr (void)
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
Txt_NEW_YEAR_GREETING, Txt_NEW_YEAR_GREETING,
Gbl.Now.Date.Year); Gbl.Now.Date.Year);
Ale_ShowAlert (Ale_INFO,Gbl.Alert.Txt); Ale_ShowA_old (Ale_INFO,Gbl.Alert.Txt);
} }
/***** Birthday congratulation *****/ /***** Birthday congratulation *****/
@ -2589,7 +2589,7 @@ void Usr_WelcomeUsr (void)
else else
/* The current language is not my preferred language /* The current language is not my preferred language
==> change automatically to my language */ ==> change automatically to my language */
Ale_ShowAlert (Ale_INFO,Txt_Switching_to_LANGUAGE[Gbl.Usrs.Me.UsrDat.Prefs.Language]); Ale_ShowA_old (Ale_INFO,Txt_Switching_to_LANGUAGE[Gbl.Usrs.Me.UsrDat.Prefs.Language]);
} }
} }
@ -2819,7 +2819,7 @@ unsigned Usr_GetParamOtherUsrIDNickOrEMailAndGetUsrCods (struct ListUsrCods *Lis
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
Txt_The_ID_nickname_or_email_X_is_not_valid, Txt_The_ID_nickname_or_email_X_is_not_valid,
Gbl.Usrs.Other.UsrDat.UsrIDNickOrEmail); Gbl.Usrs.Other.UsrDat.UsrIDNickOrEmail);
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt); Ale_ShowA_old (Ale_WARNING,Gbl.Alert.Txt);
} }
return ListUsrCods->NumUsrs; return ListUsrCods->NumUsrs;
@ -2922,7 +2922,7 @@ void Usr_ChkUsrAndGetUsrData (void)
{ {
Gbl.Action.Act = ActLogOut; Gbl.Action.Act = ActLogOut;
Tab_SetCurrentTab (); Tab_SetCurrentTab ();
Ale_ShowAlert (Ale_WARNING,Txt_The_session_has_expired); Ale_ShowA_old (Ale_WARNING,Txt_The_session_has_expired);
FormLogin.PutForm = true; FormLogin.PutForm = true;
} }
} }
@ -3237,7 +3237,7 @@ static void Usr_ShowAlertUsrDoesNotExistsOrWrongPassword (void)
// Gbl.Action.Act = ActFrmLogIn; // Gbl.Action.Act = ActFrmLogIn;
// Tab_SetCurrentTab (); // Tab_SetCurrentTab ();
Ale_ShowAlert (Ale_WARNING,Txt_The_user_does_not_exist_or_password_is_incorrect); Ale_ShowA_old (Ale_WARNING,Txt_The_user_does_not_exist_or_password_is_incorrect);
} }
/*****************************************************************************/ /*****************************************************************************/
@ -3253,7 +3253,7 @@ static void Usr_ShowAlertThereAreMoreThanOneUsr (void)
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), 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, Txt_There_are_more_than_one_user_with_the_ID_X_Please_type_a_nick_or_email,
Gbl.Usrs.Me.UsrIdLogin); Gbl.Usrs.Me.UsrIdLogin);
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt); Ale_ShowA_old (Ale_WARNING,Gbl.Alert.Txt);
} }
/*****************************************************************************/ /*****************************************************************************/
@ -3352,7 +3352,7 @@ void Usr_ShowFormsLogoutAndRole (void)
Txt_You_are_now_LOGGED_IN_as_X, Txt_You_are_now_LOGGED_IN_as_X,
Txt_logged[Gbl.Usrs.Me.UsrDat.Sex], Txt_logged[Gbl.Usrs.Me.UsrDat.Sex],
Txt_ROLES_SINGUL_abc[Gbl.Usrs.Me.Role.Logged][Gbl.Usrs.Me.UsrDat.Sex]); Txt_ROLES_SINGUL_abc[Gbl.Usrs.Me.Role.Logged][Gbl.Usrs.Me.UsrDat.Sex]);
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt); Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
} }
/***** Start box *****/ /***** Start box *****/
@ -5263,7 +5263,7 @@ static void Usr_GetListUsrsFromQuery (char *Query,Rol_Role_t Role,Sco_Scope_t Sc
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
Txt_The_list_of_X_users_is_too_large_to_be_displayed, Txt_The_list_of_X_users_is_too_large_to_be_displayed,
Gbl.Usrs.LstUsrs[Role].NumUsrs); Gbl.Usrs.LstUsrs[Role].NumUsrs);
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt); Ale_ShowA_old (Ale_WARNING,Gbl.Alert.Txt);
Abort = true; Abort = true;
} }
else else
@ -5662,7 +5662,7 @@ bool Usr_GetListMsgRecipientsWrittenExplicitelyBySender (bool WriteErrorMsgs)
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
Txt_There_is_no_user_with_nickname_X, Txt_There_is_no_user_with_nickname_X,
UsrIDNickOrEmail); UsrIDNickOrEmail);
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt); Ale_ShowA_old (Ale_WARNING,Gbl.Alert.Txt);
} }
Error = true; Error = true;
} }
@ -5682,7 +5682,7 @@ bool Usr_GetListMsgRecipientsWrittenExplicitelyBySender (bool WriteErrorMsgs)
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
Txt_There_is_no_user_with_email_X, Txt_There_is_no_user_with_email_X,
UsrIDNickOrEmail); UsrIDNickOrEmail);
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt); Ale_ShowA_old (Ale_WARNING,Gbl.Alert.Txt);
} }
Error = true; Error = true;
} }
@ -5711,7 +5711,7 @@ bool Usr_GetListMsgRecipientsWrittenExplicitelyBySender (bool WriteErrorMsgs)
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), 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, Txt_There_are_more_than_one_user_with_the_ID_X_Please_type_a_nick_or_email,
UsrIDNickOrEmail); UsrIDNickOrEmail);
Ale_ShowAlert (Ale_ERROR,Gbl.Alert.Txt); Ale_ShowA_old (Ale_ERROR,Gbl.Alert.Txt);
} }
Error = true; Error = true;
} }
@ -5723,7 +5723,7 @@ bool Usr_GetListMsgRecipientsWrittenExplicitelyBySender (bool WriteErrorMsgs)
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
Txt_There_is_no_user_with_ID_nick_or_email_X, Txt_There_is_no_user_with_ID_nick_or_email_X,
UsrIDNickOrEmail); UsrIDNickOrEmail);
Ale_ShowAlert (Ale_ERROR,Gbl.Alert.Txt); Ale_ShowA_old (Ale_ERROR,Gbl.Alert.Txt);
} }
Error = true; Error = true;
} }
@ -5735,7 +5735,7 @@ bool Usr_GetListMsgRecipientsWrittenExplicitelyBySender (bool WriteErrorMsgs)
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
Txt_The_ID_nickname_or_email_X_is_not_valid, Txt_The_ID_nickname_or_email_X_is_not_valid,
UsrIDNickOrEmail); UsrIDNickOrEmail);
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt); Ale_ShowA_old (Ale_WARNING,Gbl.Alert.Txt);
} }
Error = true; Error = true;
} }
@ -8539,7 +8539,7 @@ void Usr_ShowWarningNoUsersFound (Rol_Role_t Role)
Btn_CREATE_BUTTON,Txt_Register_teacher); Btn_CREATE_BUTTON,Txt_Register_teacher);
else else
/***** Show alert *****/ /***** Show alert *****/
Ale_ShowAlert (Ale_INFO,Txt_No_users_found[Role]); Ale_ShowA_old (Ale_INFO,Txt_No_users_found[Role]);
} }
/*****************************************************************************/ /*****************************************************************************/
@ -9135,7 +9135,7 @@ void Usr_PrintUsrQRCode (void)
Box_EndBox (); Box_EndBox ();
} }
else else
Ale_ShowAlert (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_); Ale_ShowA_old (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
} }
/*****************************************************************************/ /*****************************************************************************/

View File

@ -454,9 +454,9 @@ static void ZIP_CompressFolderIntoZIP (void)
UncompressedSize = ZIP_CloneDir (Path,PathCompression,Gbl.FileBrowser.Priv.FullPathInTree); UncompressedSize = ZIP_CloneDir (Path,PathCompression,Gbl.FileBrowser.Priv.FullPathInTree);
if (UncompressedSize == 0) // Nothing to compress if (UncompressedSize == 0) // Nothing to compress
Ale_ShowAlert (Ale_WARNING,Txt_The_folder_is_empty); Ale_ShowA_old (Ale_WARNING,Txt_The_folder_is_empty);
else if (UncompressedSize > ZIP_MAX_SIZE_UNCOMPRESSED) // Uncompressed size is too big else if (UncompressedSize > ZIP_MAX_SIZE_UNCOMPRESSED) // Uncompressed size is too big
Ale_ShowAlert (Ale_WARNING,Txt_The_contents_of_the_folder_are_too_big); Ale_ShowA_old (Ale_WARNING,Txt_The_contents_of_the_folder_are_too_big);
else else
{ {
/***** Change to directory of the clone folder /***** Change to directory of the clone folder