mirror of https://github.com/acanas/swad-core.git
Version 18.46.1
This commit is contained in:
parent
3d83ba9d8e
commit
2dc4c6df2f
14
swad_ID.c
14
swad_ID.c
|
@ -592,11 +592,11 @@ static void ID_ShowFormChangeUsrID (const struct UsrData *UsrDat,
|
|||
|
||||
/***** Show possible alert *****/
|
||||
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 *****/
|
||||
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 *****/
|
||||
Tbl_StartTableWide (2);
|
||||
|
@ -676,7 +676,7 @@ static void ID_ShowFormChangeUsrID (const struct UsrData *UsrDat,
|
|||
/***** Write help text *****/
|
||||
fprintf (Gbl.F.Out,"<tr>"
|
||||
"<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>"
|
||||
"</tr>");
|
||||
|
||||
|
@ -767,10 +767,10 @@ void ID_RemoveOtherUsrID (void)
|
|||
Acc_ShowFormChgOtherUsrAccount ();
|
||||
}
|
||||
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
|
||||
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 ();
|
||||
}
|
||||
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
|
||||
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_);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
130
swad_account.c
130
swad_account.c
|
@ -25,8 +25,6 @@
|
|||
/*********************************** Headers *********************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
#define _GNU_SOURCE // For asprintf
|
||||
#include <stdio.h> // For asprintf
|
||||
#include <string.h> // For string functions
|
||||
|
||||
#include "swad_account.h"
|
||||
|
@ -147,7 +145,7 @@ static void Acc_ShowFormCheckIfIHaveAccount (const char *Title)
|
|||
Hlp_PROFILE_SignUp,Box_CLOSABLE);
|
||||
|
||||
/***** 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 *****/
|
||||
Frm_StartForm (ActChkUsrAcc);
|
||||
|
@ -184,7 +182,6 @@ void Acc_CheckIfEmptyAccountExists (void)
|
|||
struct UsrData UsrDat;
|
||||
MYSQL_RES *mysql_res;
|
||||
MYSQL_ROW row;
|
||||
char *Txt;
|
||||
|
||||
/***** Links to other actions *****/
|
||||
fprintf (Gbl.F.Out,"<div class=\"CONTEXT_MENU\">");
|
||||
|
@ -246,13 +243,8 @@ void Acc_CheckIfEmptyAccountExists (void)
|
|||
Box_EndBoxTable ();
|
||||
}
|
||||
else
|
||||
{
|
||||
if (asprintf (&Txt,Txt_There_is_no_empty_account_associated_with_your_ID_X,
|
||||
ID) < 0)
|
||||
Lay_NotEnoughMemoryExit ();
|
||||
Ale_ShowAlert (Ale_INFO,Txt);
|
||||
free ((void *) Txt);
|
||||
}
|
||||
Ale_ShowA_fmt (Ale_INFO,Txt_There_is_no_empty_account_associated_with_your_ID_X,
|
||||
ID);
|
||||
|
||||
/***** Free structure that stores the query result *****/
|
||||
DB_FreeMySQLResult (&mysql_res);
|
||||
|
@ -263,7 +255,7 @@ void Acc_CheckIfEmptyAccountExists (void)
|
|||
else // ID not valid
|
||||
{
|
||||
/**** 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);
|
||||
}
|
||||
|
@ -450,19 +442,19 @@ void Acc_ShowFormChgMyAccount (void)
|
|||
/***** Check nickname, email and ID *****/
|
||||
IMustCreateMyPasswordNow = (Gbl.Usrs.Me.UsrDat.Password[0] == '\0');
|
||||
if (IMustCreateMyPasswordNow)
|
||||
Ale_ShowAlert (Ale_WARNING,
|
||||
Ale_ShowA_fmt (Ale_WARNING,
|
||||
Txt_Before_going_to_any_other_option_you_must_create_your_password);
|
||||
else
|
||||
{
|
||||
IMustCreateMyNicknameNow = (Gbl.Usrs.Me.UsrDat.Nickname[0] == '\0');
|
||||
if (IMustCreateMyNicknameNow)
|
||||
Ale_ShowAlert (Ale_WARNING,
|
||||
Ale_ShowA_fmt (Ale_WARNING,
|
||||
Txt_Before_going_to_any_other_option_you_must_fill_your_nickname);
|
||||
else
|
||||
{
|
||||
IMustFillInMyEmailNow = (Gbl.Usrs.Me.UsrDat.Email[0] == '\0');
|
||||
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);
|
||||
else
|
||||
{
|
||||
|
@ -533,10 +525,10 @@ void Acc_ShowFormChgOtherUsrAccount (void)
|
|||
fprintf (Gbl.F.Out,"</div>");
|
||||
}
|
||||
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
|
||||
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;
|
||||
char NewNicknameWithArroba[Nck_MAX_BYTES_NICKNAME_FROM_FORM + 1];
|
||||
char NewPlainPassword[Pwd_MAX_BYTES_PLAIN_PASSWORD + 1];
|
||||
char *Txt;
|
||||
bool Error = false;
|
||||
|
||||
/***** 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
|
||||
{
|
||||
Error = true;
|
||||
if (asprintf (&Txt,Txt_The_nickname_X_had_been_registered_by_another_user,
|
||||
NewNicknameWithoutArroba) < 0)
|
||||
Lay_NotEnoughMemoryExit ();
|
||||
Ale_ShowAlert (Ale_WARNING,Txt);
|
||||
free ((void *) Txt);
|
||||
Ale_ShowA_fmt (Ale_WARNING,Txt_The_nickname_X_had_been_registered_by_another_user,
|
||||
NewNicknameWithoutArroba);
|
||||
}
|
||||
}
|
||||
else // New nickname is not valid
|
||||
{
|
||||
Error = true;
|
||||
if (asprintf (&Txt,Txt_The_nickname_entered_X_is_not_valid_,
|
||||
NewNicknameWithArroba,
|
||||
Nck_MIN_CHARS_NICKNAME_WITHOUT_ARROBA,
|
||||
Nck_MAX_CHARS_NICKNAME_WITHOUT_ARROBA) < 0)
|
||||
Lay_NotEnoughMemoryExit ();
|
||||
Ale_ShowAlert (Ale_WARNING,Txt);
|
||||
free ((void *) Txt);
|
||||
Ale_ShowA_fmt (Ale_WARNING,Txt_The_nickname_entered_X_is_not_valid_,
|
||||
NewNicknameWithArroba,
|
||||
Nck_MIN_CHARS_NICKNAME_WITHOUT_ARROBA,
|
||||
Nck_MAX_CHARS_NICKNAME_WITHOUT_ARROBA);
|
||||
}
|
||||
|
||||
/***** 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
|
||||
{
|
||||
Error = true;
|
||||
if (asprintf (&Txt,Txt_The_email_address_X_had_been_registered_by_another_user,
|
||||
NewEmail) < 0)
|
||||
Lay_NotEnoughMemoryExit ();
|
||||
Ale_ShowAlert (Ale_WARNING,Txt);
|
||||
free ((void *) Txt);
|
||||
Ale_ShowA_fmt (Ale_WARNING,Txt_The_email_address_X_had_been_registered_by_another_user,
|
||||
NewEmail);
|
||||
}
|
||||
}
|
||||
else // New email is not valid
|
||||
{
|
||||
Error = true;
|
||||
if (asprintf (&Txt,Txt_The_email_address_entered_X_is_not_valid,
|
||||
NewEmail) < 0)
|
||||
Lay_NotEnoughMemoryExit ();
|
||||
Ale_ShowAlert (Ale_WARNING,Txt);
|
||||
free ((void *) Txt);
|
||||
Ale_ShowA_fmt (Ale_WARNING,Txt_The_email_address_entered_X_is_not_valid,
|
||||
NewEmail);
|
||||
}
|
||||
|
||||
/***** 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?
|
||||
{
|
||||
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;
|
||||
|
@ -851,17 +830,13 @@ static void Acc_CreateNewEncryptedUsrCod (struct UsrData *UsrDat)
|
|||
void Acc_AfterCreationNewAccount (void)
|
||||
{
|
||||
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
|
||||
{
|
||||
/***** Show message of success *****/
|
||||
if (asprintf (&Txt,Txt_Congratulations_You_have_created_your_account_X_Now_Y_will_request_you_,
|
||||
Gbl.Usrs.Me.UsrDat.Nickname,
|
||||
Cfg_PLATFORM_SHORT_NAME) < 0)
|
||||
Lay_NotEnoughMemoryExit ();
|
||||
Ale_ShowAlert (Ale_SUCCESS,Txt);
|
||||
free ((void *) Txt);
|
||||
Ale_ShowA_fmt (Ale_SUCCESS,Txt_Congratulations_You_have_created_your_account_X_Now_Y_will_request_you_,
|
||||
Gbl.Usrs.Me.UsrDat.Nickname,
|
||||
Cfg_PLATFORM_SHORT_NAME);
|
||||
|
||||
/***** Show form with account data *****/
|
||||
Acc_ShowFormChgMyAccount ();
|
||||
|
@ -888,7 +863,7 @@ void Acc_GetUsrCodAndRemUsrGbl (void)
|
|||
Error = true;
|
||||
|
||||
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);
|
||||
}
|
||||
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_Photo_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;
|
||||
|
||||
/***** Remove the works zones of the user in all courses *****/
|
||||
|
@ -1059,13 +1033,8 @@ void Acc_CompletelyEliminateAccount (struct UsrData *UsrDat,
|
|||
UsrDat->UsrCod);
|
||||
|
||||
if (QuietOrVerbose == Cns_VERBOSE)
|
||||
{
|
||||
if (asprintf (&Txt,Txt_THE_USER_X_has_been_removed_from_all_his_her_courses,
|
||||
UsrDat->FullName) < 0)
|
||||
Lay_NotEnoughMemoryExit ();
|
||||
Ale_ShowAlert (Ale_SUCCESS,Txt);
|
||||
free ((void *) Txt);
|
||||
}
|
||||
Ale_ShowA_fmt (Ale_SUCCESS,Txt_THE_USER_X_has_been_removed_from_all_his_her_courses,
|
||||
UsrDat->FullName);
|
||||
|
||||
/***** Remove user as administrator of any degree *****/
|
||||
DB_QueryDELETE ("can not remove a user as administrator",
|
||||
|
@ -1073,13 +1042,8 @@ void Acc_CompletelyEliminateAccount (struct UsrData *UsrDat,
|
|||
UsrDat->UsrCod);
|
||||
|
||||
if (QuietOrVerbose == Cns_VERBOSE)
|
||||
{
|
||||
if (asprintf (&Txt,Txt_THE_USER_X_has_been_removed_as_administrator,
|
||||
UsrDat->FullName) < 0)
|
||||
Lay_NotEnoughMemoryExit ();
|
||||
Ale_ShowAlert (Ale_SUCCESS,Txt);
|
||||
free ((void *) Txt);
|
||||
}
|
||||
Ale_ShowA_fmt (Ale_SUCCESS,Txt_THE_USER_X_has_been_removed_as_administrator,
|
||||
UsrDat->FullName);
|
||||
|
||||
/***** Remove user's clipboard in forums *****/
|
||||
For_RemoveUsrFromThrClipboard (UsrDat->UsrCod);
|
||||
|
@ -1090,13 +1054,8 @@ void Acc_CompletelyEliminateAccount (struct UsrData *UsrDat,
|
|||
/***** Remove the file tree of a user *****/
|
||||
Acc_RemoveUsrBriefcase (UsrDat);
|
||||
if (QuietOrVerbose == Cns_VERBOSE)
|
||||
{
|
||||
if (asprintf (&Txt,Txt_Briefcase_of_THE_USER_X_has_been_removed,
|
||||
UsrDat->FullName) < 0)
|
||||
Lay_NotEnoughMemoryExit ();
|
||||
Ale_ShowAlert (Ale_SUCCESS,Txt);
|
||||
free ((void *) Txt);
|
||||
}
|
||||
Ale_ShowA_fmt (Ale_SUCCESS,Txt_Briefcase_of_THE_USER_X_has_been_removed,
|
||||
UsrDat->FullName);
|
||||
|
||||
/***** Remove test results made by user in all courses *****/
|
||||
Tst_RemoveTestResultsMadeByUsrInAllCrss (UsrDat->UsrCod);
|
||||
|
@ -1108,13 +1067,8 @@ void Acc_CompletelyEliminateAccount (struct UsrData *UsrDat,
|
|||
Gbl.Msg.FilterContent[0] = '\0';
|
||||
Msg_DelAllRecAndSntMsgsUsr (UsrDat->UsrCod);
|
||||
if (QuietOrVerbose == Cns_VERBOSE)
|
||||
{
|
||||
if (asprintf (&Txt,Txt_Messages_of_THE_USER_X_have_been_deleted,
|
||||
UsrDat->FullName) < 0)
|
||||
Lay_NotEnoughMemoryExit ();
|
||||
Ale_ShowAlert (Ale_SUCCESS,Txt);
|
||||
free ((void *) Txt);
|
||||
}
|
||||
Ale_ShowA_fmt (Ale_SUCCESS,Txt_Messages_of_THE_USER_X_have_been_deleted,
|
||||
UsrDat->FullName);
|
||||
|
||||
/***** Remove user from tables of banned users *****/
|
||||
Usr_RemoveUsrFromUsrBanned (UsrDat->UsrCod);
|
||||
|
@ -1157,24 +1111,14 @@ void Acc_CompletelyEliminateAccount (struct UsrData *UsrDat,
|
|||
/***** Remove user's photo *****/
|
||||
PhotoRemoved = Pho_RemovePhoto (UsrDat);
|
||||
if (PhotoRemoved && QuietOrVerbose == Cns_VERBOSE)
|
||||
{
|
||||
if (asprintf (&Txt,Txt_Photo_of_THE_USER_X_has_been_removed,
|
||||
UsrDat->FullName) < 0)
|
||||
Lay_NotEnoughMemoryExit ();
|
||||
Ale_ShowAlert (Ale_SUCCESS,Txt);
|
||||
free ((void *) Txt);
|
||||
}
|
||||
Ale_ShowA_fmt (Ale_SUCCESS,Txt_Photo_of_THE_USER_X_has_been_removed,
|
||||
UsrDat->FullName);
|
||||
|
||||
/***** Remove user *****/
|
||||
Acc_RemoveUsr (UsrDat);
|
||||
if (QuietOrVerbose == Cns_VERBOSE)
|
||||
{
|
||||
if (asprintf (&Txt,Txt_Record_card_of_THE_USER_X_has_been_removed,
|
||||
UsrDat->FullName) < 0)
|
||||
Lay_NotEnoughMemoryExit ();
|
||||
Ale_ShowAlert (Ale_SUCCESS,Txt);
|
||||
free ((void *) Txt);
|
||||
}
|
||||
Ale_ShowA_fmt (Ale_SUCCESS,Txt_Record_card_of_THE_USER_X_has_been_removed,
|
||||
UsrDat->FullName);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
|
@ -371,7 +371,7 @@ void Agd_ShowUsrAgenda (void)
|
|||
}
|
||||
|
||||
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 ();
|
||||
}
|
||||
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
|
||||
/* The current language is not my preferred 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 ();
|
||||
}
|
||||
else
|
||||
Ale_ShowAlert (Ale_INFO,Txt_No_events);
|
||||
Ale_ShowA_fmt (Ale_INFO,Txt_No_events);
|
||||
|
||||
/***** Write again links to pages *****/
|
||||
if (Pagination.MoreThanOnePage)
|
||||
|
@ -1296,7 +1296,6 @@ void Agd_RemoveEvent (void)
|
|||
{
|
||||
extern const char *Txt_Event_X_removed;
|
||||
struct AgendaEvent AgdEvent;
|
||||
char *Txt;
|
||||
|
||||
/***** Get event code *****/
|
||||
if ((AgdEvent.AgdCod = Agd_GetParamAgdCod ()) == -1L)
|
||||
|
@ -1312,11 +1311,8 @@ void Agd_RemoveEvent (void)
|
|||
AgdEvent.AgdCod,AgdEvent.UsrCod);
|
||||
|
||||
/***** Write message to show the change made *****/
|
||||
if (asprintf (&Txt,Txt_Event_X_removed,
|
||||
AgdEvent.Event) < 0)
|
||||
Lay_NotEnoughMemoryExit ();
|
||||
Ale_ShowAlert (Ale_SUCCESS,Txt);
|
||||
free ((void *) Txt);
|
||||
Ale_ShowA_fmt (Ale_SUCCESS,Txt_Event_X_removed,
|
||||
AgdEvent.Event);
|
||||
|
||||
/***** Show events again *****/
|
||||
Agd_ShowMyAgenda ();
|
||||
|
@ -1330,7 +1326,6 @@ void Agd_HideEvent (void)
|
|||
{
|
||||
extern const char *Txt_Event_X_is_now_hidden;
|
||||
struct AgendaEvent AgdEvent;
|
||||
char *Txt;
|
||||
|
||||
/***** Get event code *****/
|
||||
if ((AgdEvent.AgdCod = Agd_GetParamAgdCod ()) == -1L)
|
||||
|
@ -1347,11 +1342,8 @@ void Agd_HideEvent (void)
|
|||
AgdEvent.AgdCod,AgdEvent.UsrCod);
|
||||
|
||||
/***** Write message to show the change made *****/
|
||||
if (asprintf (&Txt,Txt_Event_X_is_now_hidden,
|
||||
AgdEvent.Event) < 0)
|
||||
Lay_NotEnoughMemoryExit ();
|
||||
Ale_ShowAlert (Ale_SUCCESS,Txt);
|
||||
free ((void *) Txt);
|
||||
Ale_ShowA_fmt (Ale_SUCCESS,Txt_Event_X_is_now_hidden,
|
||||
AgdEvent.Event);
|
||||
|
||||
/***** Show events again *****/
|
||||
Agd_ShowMyAgenda ();
|
||||
|
@ -1365,7 +1357,6 @@ void Agd_UnhideEvent (void)
|
|||
{
|
||||
extern const char *Txt_Event_X_is_now_visible;
|
||||
struct AgendaEvent AgdEvent;
|
||||
char *Txt;
|
||||
|
||||
/***** Get event code *****/
|
||||
if ((AgdEvent.AgdCod = Agd_GetParamAgdCod ()) == -1L)
|
||||
|
@ -1382,11 +1373,8 @@ void Agd_UnhideEvent (void)
|
|||
AgdEvent.AgdCod,AgdEvent.UsrCod);
|
||||
|
||||
/***** Write message to show the change made *****/
|
||||
if (asprintf (&Txt,Txt_Event_X_is_now_visible,
|
||||
AgdEvent.Event) < 0)
|
||||
Lay_NotEnoughMemoryExit ();
|
||||
Ale_ShowAlert (Ale_SUCCESS,Txt);
|
||||
free ((void *) Txt);
|
||||
Ale_ShowA_fmt (Ale_SUCCESS,Txt_Event_X_is_now_visible,
|
||||
AgdEvent.Event);
|
||||
|
||||
/***** Show events again *****/
|
||||
Agd_ShowMyAgenda ();
|
||||
|
@ -1400,7 +1388,6 @@ void Agd_MakeEventPrivate (void)
|
|||
{
|
||||
extern const char *Txt_Event_X_is_now_private;
|
||||
struct AgendaEvent AgdEvent;
|
||||
char *Txt;
|
||||
|
||||
/***** Get event code *****/
|
||||
if ((AgdEvent.AgdCod = Agd_GetParamAgdCod ()) == -1L)
|
||||
|
@ -1417,11 +1404,8 @@ void Agd_MakeEventPrivate (void)
|
|||
AgdEvent.AgdCod,AgdEvent.UsrCod);
|
||||
|
||||
/***** Write message to show the change made *****/
|
||||
if (asprintf (&Txt,Txt_Event_X_is_now_private,
|
||||
AgdEvent.Event) < 0)
|
||||
Lay_NotEnoughMemoryExit ();
|
||||
Ale_ShowAlert (Ale_SUCCESS,Txt);
|
||||
free ((void *) Txt);
|
||||
Ale_ShowA_fmt (Ale_SUCCESS,Txt_Event_X_is_now_private,
|
||||
AgdEvent.Event);
|
||||
|
||||
/***** Show events again *****/
|
||||
Agd_ShowMyAgenda ();
|
||||
|
@ -1435,7 +1419,6 @@ void Agd_MakeEventPublic (void)
|
|||
{
|
||||
extern const char *Txt_Event_X_is_now_visible_to_users_of_your_courses;
|
||||
struct AgendaEvent AgdEvent;
|
||||
char *Txt;
|
||||
|
||||
/***** Get event code *****/
|
||||
if ((AgdEvent.AgdCod = Agd_GetParamAgdCod ()) == -1L)
|
||||
|
@ -1452,11 +1435,8 @@ void Agd_MakeEventPublic (void)
|
|||
AgdEvent.AgdCod,AgdEvent.UsrCod);
|
||||
|
||||
/***** Write message to show the change made *****/
|
||||
if (asprintf (&Txt,Txt_Event_X_is_now_visible_to_users_of_your_courses,
|
||||
AgdEvent.Event) < 0)
|
||||
Lay_NotEnoughMemoryExit ();
|
||||
Ale_ShowAlert (Ale_SUCCESS,Txt);
|
||||
free ((void *) Txt);
|
||||
Ale_ShowA_fmt (Ale_SUCCESS,Txt_Event_X_is_now_visible_to_users_of_your_courses,
|
||||
AgdEvent.Event);
|
||||
|
||||
/***** Show events again *****/
|
||||
Agd_ShowMyAgenda ();
|
||||
|
@ -1606,7 +1586,6 @@ void Agd_RecFormEvent (void)
|
|||
bool ItsANewEvent;
|
||||
bool NewEventIsCorrect = true;
|
||||
char EventTxt[Cns_MAX_BYTES_TEXT + 1];
|
||||
char *Txt;
|
||||
|
||||
/***** Set author of the event *****/
|
||||
AgdEvent.UsrCod = Gbl.Usrs.Me.UsrDat.UsrCod;
|
||||
|
@ -1637,14 +1616,14 @@ void Agd_RecFormEvent (void)
|
|||
if (!AgdEvent.Location[0]) // If there is no event
|
||||
{
|
||||
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 *****/
|
||||
if (!AgdEvent.Event[0]) // If there is no event
|
||||
{
|
||||
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 *****/
|
||||
|
@ -1655,18 +1634,15 @@ void Agd_RecFormEvent (void)
|
|||
Agd_CreateEvent (&AgdEvent,EventTxt); // Add new event to database
|
||||
|
||||
/***** Write success message *****/
|
||||
if (asprintf (&Txt,Txt_Created_new_event_X,
|
||||
AgdEvent.Event) < 0)
|
||||
Lay_NotEnoughMemoryExit ();
|
||||
Ale_ShowAlert (Ale_SUCCESS,Txt);
|
||||
free ((void *) Txt);
|
||||
Ale_ShowA_fmt (Ale_SUCCESS,Txt_Created_new_event_X,
|
||||
AgdEvent.Event);
|
||||
}
|
||||
else
|
||||
{
|
||||
Agd_UpdateEvent (&AgdEvent,EventTxt);
|
||||
|
||||
/***** 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 */
|
||||
|
|
40
swad_alert.c
40
swad_alert.c
|
@ -25,7 +25,11 @@
|
|||
/********************************* Headers ***********************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
#define _GNU_SOURCE // For vasprintf
|
||||
#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_form.h"
|
||||
|
@ -86,7 +90,7 @@ void Ale_ShowPendingAlert (void)
|
|||
/***** Anything to show? *****/
|
||||
if (Gbl.Alert.Type != Ale_NONE)
|
||||
/***** Show alert *****/
|
||||
Ale_ShowAlert (Gbl.Alert.Type,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Gbl.Alert.Type,Gbl.Alert.Txt);
|
||||
|
||||
Ale_ResetAlert ();
|
||||
}
|
||||
|
@ -95,7 +99,39 @@ void Ale_ShowPendingAlert (void)
|
|||
/******************** 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)
|
||||
Ale_ShowAlertAndButton (AlertType,Txt,
|
||||
|
|
|
@ -61,7 +61,10 @@ typedef enum
|
|||
void Ale_ResetAlert (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,
|
||||
Act_Action_t NextAction,const char *Anchor,const char *OnSubmit,
|
||||
void (*FuncParams) (),
|
||||
|
|
|
@ -131,7 +131,7 @@ void Ann_ShowAllAnnouncements (void)
|
|||
NULL,
|
||||
Hlp_MESSAGES_Announcements,Box_NOT_CLOSABLE);
|
||||
if (!NumAnnouncements)
|
||||
Ale_ShowAlert (Ale_INFO,Txt_No_announcements);
|
||||
Ale_ShowA_fmt (Ale_INFO,Txt_No_announcements);
|
||||
|
||||
/***** Show the announcements *****/
|
||||
for (NumAnn = 0;
|
||||
|
@ -495,7 +495,7 @@ void Ann_ReceiveAnnouncement (void)
|
|||
Ann_CreateAnnouncement (Roles,Subject,Content);
|
||||
|
||||
/***** Write message of success *****/
|
||||
Ale_ShowAlert (Ale_SUCCESS,Txt_Announcement_created);
|
||||
Ale_ShowA_fmt (Ale_SUCCESS,Txt_Announcement_created);
|
||||
|
||||
/***** Refresh list of announcements *****/
|
||||
Ann_ShowAllAnnouncements ();
|
||||
|
@ -575,7 +575,7 @@ void Ann_RemoveAnnouncement (void)
|
|||
AnnCod);
|
||||
|
||||
/***** Write message of success *****/
|
||||
Ale_ShowAlert (Ale_SUCCESS,Txt_Announcement_removed);
|
||||
Ale_ShowA_fmt (Ale_SUCCESS,Txt_Announcement_removed);
|
||||
|
||||
/***** Refresh list of announcements *****/
|
||||
Ann_ShowAllAnnouncements ();
|
||||
|
|
|
@ -167,7 +167,7 @@ static void Asg_ShowAllAssignments (void)
|
|||
Tbl_EndTable ();
|
||||
}
|
||||
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 *****/
|
||||
if (Asg_CheckIfICanCreateAssignments ())
|
||||
|
@ -965,7 +965,6 @@ void Asg_RemoveAssignment (void)
|
|||
{
|
||||
extern const char *Txt_Assignment_X_removed;
|
||||
struct Assignment Asg;
|
||||
char *Txt;
|
||||
|
||||
/***** Get assignment code *****/
|
||||
if ((Asg.AsgCod = Asg_GetParamAsgCod ()) == -1L)
|
||||
|
@ -990,11 +989,8 @@ void Asg_RemoveAssignment (void)
|
|||
Ntf_MarkNotifAsRemoved (Ntf_EVENT_ASSIGNMENT,Asg.AsgCod);
|
||||
|
||||
/***** Write message to show the change made *****/
|
||||
if (asprintf (&Txt,Txt_Assignment_X_removed,
|
||||
Asg.Title) < 0)
|
||||
Lay_NotEnoughMemoryExit ();
|
||||
Ale_ShowAlert (Ale_SUCCESS,Txt);
|
||||
free ((void *) Txt);
|
||||
Ale_ShowA_fmt (Ale_SUCCESS,Txt_Assignment_X_removed,
|
||||
Asg.Title);
|
||||
|
||||
/***** Show assignments again *****/
|
||||
Asg_SeeAssignments ();
|
||||
|
@ -1008,7 +1004,6 @@ void Asg_HideAssignment (void)
|
|||
{
|
||||
extern const char *Txt_Assignment_X_is_now_hidden;
|
||||
struct Assignment Asg;
|
||||
char *Txt;
|
||||
|
||||
/***** Get assignment code *****/
|
||||
if ((Asg.AsgCod = Asg_GetParamAsgCod ()) == -1L)
|
||||
|
@ -1024,11 +1019,8 @@ void Asg_HideAssignment (void)
|
|||
Asg.AsgCod,Gbl.CurrentCrs.Crs.CrsCod);
|
||||
|
||||
/***** Write message to show the change made *****/
|
||||
if (asprintf (&Txt,Txt_Assignment_X_is_now_hidden,
|
||||
Asg.Title) < 0)
|
||||
Lay_NotEnoughMemoryExit ();
|
||||
Ale_ShowAlert (Ale_SUCCESS,Txt);
|
||||
free ((void *) Txt);
|
||||
Ale_ShowA_fmt (Ale_SUCCESS,Txt_Assignment_X_is_now_hidden,
|
||||
Asg.Title);
|
||||
|
||||
/***** Show assignments again *****/
|
||||
Asg_SeeAssignments ();
|
||||
|
@ -1042,7 +1034,6 @@ void Asg_ShowAssignment (void)
|
|||
{
|
||||
extern const char *Txt_Assignment_X_is_now_visible;
|
||||
struct Assignment Asg;
|
||||
char *Txt;
|
||||
|
||||
/***** Get assignment code *****/
|
||||
if ((Asg.AsgCod = Asg_GetParamAsgCod ()) == -1L)
|
||||
|
@ -1058,11 +1049,8 @@ void Asg_ShowAssignment (void)
|
|||
Asg.AsgCod,Gbl.CurrentCrs.Crs.CrsCod);
|
||||
|
||||
/***** Write message to show the change made *****/
|
||||
if (asprintf (&Txt,Txt_Assignment_X_is_now_visible,
|
||||
Asg.Title) < 0)
|
||||
Lay_NotEnoughMemoryExit ();
|
||||
Ale_ShowAlert (Ale_SUCCESS,Txt);
|
||||
free ((void *) Txt);
|
||||
Ale_ShowA_fmt (Ale_SUCCESS,Txt_Assignment_X_is_now_visible,
|
||||
Asg.Title);
|
||||
|
||||
/***** Show assignments again *****/
|
||||
Asg_SeeAssignments ();
|
||||
|
@ -1302,7 +1290,6 @@ void Asg_RecFormAssignment (void)
|
|||
bool NewAssignmentIsCorrect = true;
|
||||
unsigned NumUsrsToBeNotifiedByEMail;
|
||||
char Description[Cns_MAX_BYTES_TEXT + 1];
|
||||
char *Txt;
|
||||
|
||||
/***** Get the code of the assignment *****/
|
||||
NewAsg.AsgCod = Asg_GetParamAsgCod ();
|
||||
|
@ -1350,11 +1337,8 @@ void Asg_RecFormAssignment (void)
|
|||
{
|
||||
NewAssignmentIsCorrect = false;
|
||||
|
||||
if (asprintf (&Txt,Txt_Already_existed_an_assignment_with_the_title_X,
|
||||
NewAsg.Title) < 0)
|
||||
Lay_NotEnoughMemoryExit ();
|
||||
Ale_ShowAlert (Ale_WARNING,Txt);
|
||||
free ((void *) Txt);
|
||||
Ale_ShowA_fmt (Ale_WARNING,Txt_Already_existed_an_assignment_with_the_title_X,
|
||||
NewAsg.Title);
|
||||
}
|
||||
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...
|
||||
{
|
||||
NewAssignmentIsCorrect = false;
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_Already_existed_an_assignment_with_the_folder_X,
|
||||
NewAsg.Folder);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
|
||||
Ale_ShowA_fmt (Ale_WARNING,Txt_Already_existed_an_assignment_with_the_folder_X,
|
||||
NewAsg.Folder);
|
||||
}
|
||||
}
|
||||
else // Folder name not valid
|
||||
{
|
||||
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
|
||||
|
@ -1384,7 +1367,7 @@ void Asg_RecFormAssignment (void)
|
|||
if (Brw_CheckIfExistsFolderAssigmentForAnyUsr (OldAsg.Folder))
|
||||
{
|
||||
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
|
||||
{
|
||||
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 *****/
|
||||
|
@ -1407,10 +1390,8 @@ void Asg_RecFormAssignment (void)
|
|||
Asg_CreateAssignment (&NewAsg,Description); // Add new assignment to database
|
||||
|
||||
/***** Write success message *****/
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_Created_new_assignment_X,
|
||||
NewAsg.Title);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowA_fmt (Ale_SUCCESS,Txt_Created_new_assignment_X,
|
||||
NewAsg.Title);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1422,7 +1403,7 @@ void Asg_RecFormAssignment (void)
|
|||
Asg_UpdateAssignment (&NewAsg,Description);
|
||||
|
||||
/***** Write success message *****/
|
||||
Ale_ShowAlert (Ale_SUCCESS,Txt_The_assignment_has_been_modified);
|
||||
Ale_ShowA_fmt (Ale_SUCCESS,Txt_The_assignment_has_been_modified);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -276,7 +276,7 @@ static void Att_ShowAllAttEvents (void)
|
|||
Tbl_EndTable ();
|
||||
}
|
||||
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 *****/
|
||||
if (ICanEdit)
|
||||
|
@ -896,11 +896,10 @@ void Att_AskRemAttEvent (void)
|
|||
Grp_PutParamWhichGrps ();
|
||||
Pag_PutHiddenParamPagNum (Pag_ATT_EVENTS,Gbl.AttEvents.CurrentPage);
|
||||
|
||||
/***** Ask for confirmation of removing *****/
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_Do_you_really_want_to_remove_the_event_X,
|
||||
Att.Title);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
/* Ask for confirmation of removing */
|
||||
Ale_ShowA_fmt (Ale_WARNING,Txt_Do_you_really_want_to_remove_the_event_X,
|
||||
Att.Title);
|
||||
|
||||
Btn_PutRemoveButton (Txt_Remove_event);
|
||||
Frm_EndForm ();
|
||||
|
||||
|
@ -929,10 +928,8 @@ void Att_GetAndRemAttEvent (void)
|
|||
Att_RemoveAttEventFromDB (Att.AttCod);
|
||||
|
||||
/***** Write message to show the change made *****/
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_Event_X_removed,
|
||||
Att.Title);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowA_fmt (Ale_SUCCESS,Txt_Event_X_removed,
|
||||
Att.Title);
|
||||
|
||||
/***** Show attendance events again *****/
|
||||
Att_SeeAttEvents ();
|
||||
|
@ -977,10 +974,8 @@ void Att_HideAttEvent (void)
|
|||
Att.AttCod,Gbl.CurrentCrs.Crs.CrsCod);
|
||||
|
||||
/***** Write message to show the change made *****/
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_Event_X_is_now_hidden,
|
||||
Att.Title);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowA_fmt (Ale_SUCCESS,Txt_Event_X_is_now_hidden,
|
||||
Att.Title);
|
||||
|
||||
/***** Show attendance events again *****/
|
||||
Att_SeeAttEvents ();
|
||||
|
@ -1009,10 +1004,8 @@ void Att_ShowAttEvent (void)
|
|||
Att.AttCod,Gbl.CurrentCrs.Crs.CrsCod);
|
||||
|
||||
/***** Write message to show the change made *****/
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_Event_X_is_now_visible,
|
||||
Att.Title);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowA_fmt (Ale_SUCCESS,Txt_Event_X_is_now_visible,
|
||||
Att.Title);
|
||||
|
||||
/***** Show attendance events again *****/
|
||||
Att_SeeAttEvents ();
|
||||
|
@ -1296,16 +1289,15 @@ void Att_RecFormAttEvent (void)
|
|||
if (Att_CheckIfSimilarAttEventExists ("Title",ReceivedAtt.Title,ReceivedAtt.AttCod))
|
||||
{
|
||||
ReceivedAttEventIsCorrect = false;
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_Already_existed_an_event_with_the_title_X,
|
||||
ReceivedAtt.Title);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
|
||||
Ale_ShowA_fmt (Ale_WARNING,Txt_Already_existed_an_event_with_the_title_X,
|
||||
ReceivedAtt.Title);
|
||||
}
|
||||
}
|
||||
else // If there is not an attendance event title
|
||||
{
|
||||
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 *****/
|
||||
|
@ -1320,17 +1312,15 @@ void Att_RecFormAttEvent (void)
|
|||
Att_CreateAttEvent (&ReceivedAtt,Description); // Add new attendance event to database
|
||||
|
||||
/***** Write success message *****/
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_Created_new_event_X,
|
||||
ReceivedAtt.Title);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowA_fmt (Ale_SUCCESS,Txt_Created_new_event_X,
|
||||
ReceivedAtt.Title);
|
||||
}
|
||||
else
|
||||
{
|
||||
Att_UpdateAttEvent (&ReceivedAtt,Description);
|
||||
|
||||
/***** 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 */
|
||||
|
@ -2292,7 +2282,7 @@ void Att_RegisterMeAsStdInAttEvent (void)
|
|||
Att_RemoveUsrFromAttEvent (Att.AttCod,Gbl.Usrs.Me.UsrDat.UsrCod);
|
||||
|
||||
/***** 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 *****/
|
||||
|
@ -2417,12 +2407,10 @@ void Att_RegisterStudentsInAttEvent (void)
|
|||
Usr_FreeUsrsList (Rol_STD);
|
||||
|
||||
/***** Write final message *****/
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
"%s: %u<br />"
|
||||
"%s: %u",
|
||||
Txt_Presents,NumStdsPresent,
|
||||
Txt_Absents ,NumStdsAbsent );
|
||||
Ale_ShowAlert (Ale_INFO,Gbl.Alert.Txt);
|
||||
Ale_ShowA_fmt (Ale_INFO,"%s: %u<br />"
|
||||
"%s: %u",
|
||||
Txt_Presents,NumStdsPresent,
|
||||
Txt_Absents ,NumStdsAbsent );
|
||||
}
|
||||
else // Gbl.Usrs.LstUsrs[Rol_STD].NumUsrs == 0
|
||||
/***** Show warning indicating no students found *****/
|
||||
|
@ -2928,7 +2916,7 @@ static void Usr_ListOrPrintStdsAttendanceCrs (Att_TypeOfView_t TypeOfView)
|
|||
}
|
||||
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
|
||||
}
|
||||
|
||||
|
|
|
@ -25,9 +25,7 @@
|
|||
/********************************* Headers ***********************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
#define _GNU_SOURCE // For asprintf
|
||||
#include <linux/stddef.h> // For NULL
|
||||
#include <stdio.h> // For asprintf
|
||||
#include <stdlib.h> // For calloc
|
||||
#include <string.h> // For string functions
|
||||
|
||||
|
@ -113,7 +111,7 @@ void Ban_SeeBanners (void)
|
|||
if (Gbl.Banners.Num) // There are banners
|
||||
Ban_WriteListOfBanners ();
|
||||
else // No banners created
|
||||
Ale_ShowAlert (Ale_INFO,Txt_No_banners);
|
||||
Ale_ShowA_fmt (Ale_INFO,Txt_No_banners);
|
||||
|
||||
/***** Button to create banner *****/
|
||||
if (Gbl.Usrs.Me.Role.Logged == Rol_SYS_ADM)
|
||||
|
@ -523,10 +521,8 @@ void Ban_RemoveBanner (void)
|
|||
Ban.BanCod);
|
||||
|
||||
/***** Write message to show the change made *****/
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_Banner_X_removed,
|
||||
Ban.ShrtName);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowA_fmt (Ale_SUCCESS,Txt_Banner_X_removed,
|
||||
Ban.ShrtName);
|
||||
|
||||
/***** Show the form again *****/
|
||||
Ban_EditBanners ();
|
||||
|
@ -579,11 +575,9 @@ static void Ban_ShowOrHideBanner (bool Hide)
|
|||
Ban.BanCod);
|
||||
|
||||
/***** Write message to show the change made *****/
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Hide ? Txt_The_banner_X_is_now_hidden :
|
||||
Txt_The_banner_X_is_now_visible,
|
||||
Ban.ShrtName);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowA_fmt (Ale_SUCCESS,Hide ? Txt_The_banner_X_is_now_hidden :
|
||||
Txt_The_banner_X_is_now_visible,
|
||||
Ban.ShrtName);
|
||||
|
||||
/***** Show the form again *****/
|
||||
Ban_EditBanners ();
|
||||
|
@ -654,12 +648,8 @@ static void Ban_RenameBanner (Cns_ShrtOrFullName_t ShrtOrFullName)
|
|||
|
||||
/***** Check if new name is empty *****/
|
||||
if (!NewBanName[0])
|
||||
{
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_You_can_not_leave_the_name_of_the_banner_X_empty,
|
||||
CurrentBanName);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
}
|
||||
Ale_ShowA_fmt (Ale_WARNING,Txt_You_can_not_leave_the_name_of_the_banner_X_empty,
|
||||
CurrentBanName);
|
||||
else
|
||||
{
|
||||
/***** 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 (Ban_CheckIfBannerNameExists (ParamName,NewBanName,Ban->BanCod))
|
||||
{
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_banner_X_already_exists,
|
||||
NewBanName);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
}
|
||||
Ale_ShowA_fmt (Ale_WARNING,Txt_The_banner_X_already_exists,
|
||||
NewBanName);
|
||||
else
|
||||
{
|
||||
/* Update the table changing old name by new name */
|
||||
Ban_UpdateBanNameDB (Ban->BanCod,FieldName,NewBanName);
|
||||
|
||||
/* Write message to show the change made */
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_banner_X_has_been_renamed_as_Y,
|
||||
CurrentBanName,NewBanName);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowA_fmt (Ale_SUCCESS,Txt_The_banner_X_has_been_renamed_as_Y,
|
||||
CurrentBanName,NewBanName);
|
||||
}
|
||||
}
|
||||
else // The same name
|
||||
{
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_name_of_the_banner_X_has_not_changed,
|
||||
CurrentBanName);
|
||||
Ale_ShowAlert (Ale_INFO,Gbl.Alert.Txt);
|
||||
}
|
||||
Ale_ShowA_fmt (Ale_INFO,Txt_The_name_of_the_banner_X_has_not_changed,
|
||||
CurrentBanName);
|
||||
}
|
||||
|
||||
/***** Show the form again *****/
|
||||
|
@ -759,13 +739,11 @@ void Ban_ChangeBannerImg (void)
|
|||
NewImg,Ban->BanCod);
|
||||
|
||||
/***** Write message to show the change made *****/
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_new_image_is_X,
|
||||
NewImg);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowA_fmt (Ale_SUCCESS,Txt_The_new_image_is_X,
|
||||
NewImg);
|
||||
}
|
||||
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 *****/
|
||||
Str_Copy (Ban->Img,NewImg,
|
||||
|
@ -804,13 +782,11 @@ void Ban_ChangeBannerWWW (void)
|
|||
NewWWW,Ban->BanCod);
|
||||
|
||||
/***** Write message to show the change made *****/
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_new_web_address_is_X,
|
||||
NewWWW);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowA_fmt (Ale_SUCCESS,Txt_The_new_web_address_is_X,
|
||||
NewWWW);
|
||||
}
|
||||
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 *****/
|
||||
Str_Copy (Ban->WWW,NewWWW,
|
||||
|
@ -950,28 +926,20 @@ void Ban_RecFormNewBanner (void)
|
|||
{
|
||||
/***** If name of banner was in database... *****/
|
||||
if (Ban_CheckIfBannerNameExists ("ShortName",Ban->ShrtName,-1L))
|
||||
{
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_banner_X_already_exists,
|
||||
Ban->ShrtName);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
}
|
||||
Ale_ShowA_fmt (Ale_WARNING,Txt_The_banner_X_already_exists,
|
||||
Ban->ShrtName);
|
||||
else if (Ban_CheckIfBannerNameExists ("FullName",Ban->FullName,-1L))
|
||||
{
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_banner_X_already_exists,
|
||||
Ban->FullName);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
}
|
||||
Ale_ShowA_fmt (Ale_WARNING,Txt_The_banner_X_already_exists,
|
||||
Ban->FullName);
|
||||
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])
|
||||
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
|
||||
Ban_CreateBanner (Ban);
|
||||
}
|
||||
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 *****/
|
||||
Ban_EditBanners ();
|
||||
|
@ -994,10 +962,8 @@ static void Ban_CreateBanner (struct Banner *Ban)
|
|||
Ban->ShrtName,Ban->FullName,Ban->Img,Ban->WWW);
|
||||
|
||||
/***** Write success message *****/
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_Created_new_banner_X,
|
||||
Ban->ShrtName);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowA_fmt (Ale_SUCCESS,Txt_Created_new_banner_X,
|
||||
Ban->ShrtName);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
|
@ -225,7 +225,7 @@ void Ctr_SeeCtrWithPendingDegs (void)
|
|||
Box_EndBoxTable ();
|
||||
}
|
||||
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 *****/
|
||||
DB_FreeMySQLResult (&mysql_res);
|
||||
|
@ -816,7 +816,7 @@ static void Ctr_ListCentres (void)
|
|||
Tbl_EndTable ();
|
||||
}
|
||||
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 *****/
|
||||
if (Ctr_CheckIfICanCreateCentres ())
|
||||
|
@ -1766,7 +1766,7 @@ void Ctr_RemoveCentre (void)
|
|||
if (Ctr.Degs.Num ||
|
||||
Ctr.NumUsrsWhoClaimToBelongToCtr ||
|
||||
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
|
||||
{
|
||||
/***** 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),
|
||||
Txt_Centre_X_removed,
|
||||
Ctr.FullName);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
}
|
||||
|
||||
/***** Show the form again *****/
|
||||
|
@ -1935,7 +1935,7 @@ void Ctr_ChangeCtrPlcInConfig (void)
|
|||
Gbl.CurrentCtr.Ctr.PlcCod = NewPlcCod;
|
||||
|
||||
/***** 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 *****/
|
||||
Ctr_ShowConfiguration ();
|
||||
|
@ -2130,7 +2130,7 @@ void Ctr_ChangeCtrWWW (void)
|
|||
Ctr_ShowAlertAndButtonToGoToCtr ();
|
||||
}
|
||||
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 *****/
|
||||
Ctr_EditCentres ();
|
||||
|
@ -2158,10 +2158,10 @@ void Ctr_ChangeCtrWWWInConfig (void)
|
|||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_new_web_address_is_X,
|
||||
NewWWW);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
}
|
||||
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 *****/
|
||||
Ctr_ShowConfiguration ();
|
||||
|
@ -2263,7 +2263,7 @@ static void Ctr_ShowAlertAndButtonToGoToCtr (void)
|
|||
}
|
||||
else
|
||||
/***** Alert *****/
|
||||
Ale_ShowAlert (Gbl.Alert.Type,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Gbl.Alert.Type,Gbl.Alert.Txt);
|
||||
}
|
||||
|
||||
static void Ctr_PutParamGoToCtr (void)
|
||||
|
@ -2328,7 +2328,7 @@ void Ctr_RequestPhoto (void)
|
|||
Ctr_PHOTO_SAVED_MAX_WIDTH,
|
||||
Ctr_PHOTO_SAVED_MAX_HEIGHT,
|
||||
Txt_XxY_pixels_or_higher);
|
||||
Ale_ShowAlert (Ale_INFO,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Ale_INFO,Gbl.Alert.Txt);
|
||||
|
||||
/***** Upload photo *****/
|
||||
fprintf (Gbl.F.Out,"<label class=\"%s\">"
|
||||
|
@ -2380,7 +2380,7 @@ void Ctr_ReceivePhoto (void)
|
|||
WrongType = true;
|
||||
if (WrongType)
|
||||
{
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_Wrong_file_type);
|
||||
Ale_ShowA_old (Ale_WARNING,Txt_Wrong_file_type);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -2400,14 +2400,14 @@ void Ctr_ReceivePhoto (void)
|
|||
/* Get filename extension */
|
||||
if ((PtrExtension = strrchr (FileNameImgSrc,(int) '.')) == NULL)
|
||||
{
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_Wrong_file_type);
|
||||
Ale_ShowA_old (Ale_WARNING,Txt_Wrong_file_type);
|
||||
return;
|
||||
}
|
||||
LengthExtension = strlen (PtrExtension);
|
||||
if (LengthExtension < Fil_MIN_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;
|
||||
}
|
||||
|
||||
|
@ -2418,7 +2418,7 @@ void Ctr_ReceivePhoto (void)
|
|||
Gbl.UniqueNameEncrypted,PtrExtension);
|
||||
if (!Fil_EndReceptionOfFile (FileNameImgTmp,Param))
|
||||
{
|
||||
Ale_ShowAlert (Ale_WARNING,"Error copying file.");
|
||||
Ale_ShowA_old (Ale_WARNING,"Error copying file.");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -2773,7 +2773,7 @@ static void Ctr_RecFormRequestOrCreateCtr (unsigned Status)
|
|||
|
||||
/* Get 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 */
|
||||
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),
|
||||
Txt_The_centre_X_already_exists,
|
||||
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))
|
||||
{
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_centre_X_already_exists,
|
||||
Gbl.Ctrs.EditingCtr.FullName);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Ale_WARNING,Gbl.Alert.Txt);
|
||||
}
|
||||
else // Add new centre to database
|
||||
Ctr_CreateCentre (Status);
|
||||
}
|
||||
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
|
||||
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 *****/
|
||||
Ctr_EditCentres ();
|
||||
|
|
|
@ -380,6 +380,9 @@ SHOW TABLE STATUS WHERE Name = 'debug';
|
|||
ALTER TABLE debug ENGINE=MyISAM;
|
||||
OPTIMIZE TABLE debug;
|
||||
*/
|
||||
|
||||
// TODO: Revisar todos los Ale_ShowAlertAndButton
|
||||
|
||||
/*****************************************************************************/
|
||||
/****************************** Public constants *****************************/
|
||||
/*****************************************************************************/
|
||||
|
@ -399,10 +402,11 @@ En OpenSWAD:
|
|||
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 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.
|
||||
Fixed bug in actions related to login.
|
||||
Refactoring code related to alerts. (238468 lines)
|
||||
|
|
|
@ -86,12 +86,12 @@ void Cht_ShowChatRooms (void)
|
|||
Txt_To_use_chat_you_must_have_installed_the_software_X_and_add_Y_,
|
||||
Cfg_JAVA_URL,Cfg_JAVA_NAME,
|
||||
Cfg_PLATFORM_SERVER);
|
||||
Ale_ShowAlert (Ale_INFO,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Ale_INFO,Gbl.Alert.Txt);
|
||||
|
||||
/***** List available chat rooms *****/
|
||||
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)
|
||||
Cht_ShowListOfChatRoomsWithUsrs ();
|
||||
|
|
|
@ -586,7 +586,7 @@ void Cla_RemoveClassroom (void)
|
|||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_Classroom_X_removed,
|
||||
Cla->FullName);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
|
||||
/***** Show the form again *****/
|
||||
Cla_EditClassrooms ();
|
||||
|
@ -674,7 +674,7 @@ static void Cla_RenameClassroom (Cns_ShrtOrFullName_t ShrtOrFullName)
|
|||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_You_can_not_leave_the_name_of_the_classroom_X_empty,
|
||||
CurrentClaName);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Ale_WARNING,Gbl.Alert.Txt);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -688,7 +688,7 @@ static void Cla_RenameClassroom (Cns_ShrtOrFullName_t ShrtOrFullName)
|
|||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_classroom_X_already_exists,
|
||||
NewClaName);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Ale_WARNING,Gbl.Alert.Txt);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -699,7 +699,7 @@ static void Cla_RenameClassroom (Cns_ShrtOrFullName_t ShrtOrFullName)
|
|||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_classroom_X_has_been_renamed_as_Y,
|
||||
CurrentClaName,NewClaName);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
}
|
||||
}
|
||||
else // The same name
|
||||
|
@ -707,7 +707,7 @@ static void Cla_RenameClassroom (Cns_ShrtOrFullName_t ShrtOrFullName)
|
|||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_name_of_the_classroom_X_has_not_changed,
|
||||
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,
|
||||
Cla->FullName,NewCapacity);
|
||||
}
|
||||
Ale_ShowAlert (Gbl.Alert.Type,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Gbl.Alert.Type,Gbl.Alert.Txt);
|
||||
|
||||
/***** Show the form again *****/
|
||||
Cla_EditClassrooms ();
|
||||
|
@ -868,7 +868,7 @@ void Cla_ChangeClassroomLocation (void)
|
|||
}
|
||||
|
||||
/***** 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 *****/
|
||||
Cla_EditClassrooms ();
|
||||
|
@ -1020,20 +1020,20 @@ void Cla_RecFormNewClassroom (void)
|
|||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_classroom_X_already_exists,
|
||||
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))
|
||||
{
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_classroom_X_already_exists,
|
||||
Cla->FullName);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Ale_WARNING,Gbl.Alert.Txt);
|
||||
}
|
||||
else // Add new classroom to database
|
||||
Cla_CreateClassroom (Cla);
|
||||
}
|
||||
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 *****/
|
||||
Cla_EditClassrooms ();
|
||||
|
@ -1060,5 +1060,5 @@ static void Cla_CreateClassroom (struct Classroom *Cla)
|
|||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_Created_new_classroom_X,
|
||||
Cla->FullName);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
}
|
||||
|
|
|
@ -197,7 +197,7 @@ void Cty_SeeCtyWithPendingInss (void)
|
|||
Box_EndBoxTable ();
|
||||
}
|
||||
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 *****/
|
||||
DB_FreeMySQLResult (&mysql_res);
|
||||
|
@ -1740,7 +1740,7 @@ void Cty_RemoveCountry (void)
|
|||
if (Cty.NumInss ||
|
||||
Cty.NumUsrsWhoClaimToBelongToCty ||
|
||||
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
|
||||
{
|
||||
/***** Remove surveys of the country *****/
|
||||
|
@ -1758,7 +1758,7 @@ void Cty_RemoveCountry (void)
|
|||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_Country_X_removed,
|
||||
Cty.Name[Gbl.Prefs.Language]);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
}
|
||||
|
||||
/***** Show the form again *****/
|
||||
|
@ -1801,7 +1801,7 @@ void Cty_RenameCountry (void)
|
|||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_You_can_not_leave_the_name_of_the_country_X_empty,
|
||||
Cty->Name[Language]);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Ale_WARNING,Gbl.Alert.Txt);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1815,7 +1815,7 @@ void Cty_RenameCountry (void)
|
|||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_country_X_already_exists,
|
||||
NewCtyName);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Ale_WARNING,Gbl.Alert.Txt);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1829,7 +1829,7 @@ void Cty_RenameCountry (void)
|
|||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_country_X_has_been_renamed_as_Y,
|
||||
Cty->Name[Language],NewCtyName);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
|
||||
/* Update country name */
|
||||
Str_Copy (Cty->Name[Language],NewCtyName,
|
||||
|
@ -1841,7 +1841,7 @@ void Cty_RenameCountry (void)
|
|||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_name_of_the_country_X_has_not_changed,
|
||||
Cty->Name[Language]);
|
||||
Ale_ShowAlert (Ale_INFO,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Ale_INFO,Gbl.Alert.Txt);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1946,7 +1946,7 @@ void Cty_ChangeCtyWWW (void)
|
|||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_new_web_address_is_X,
|
||||
NewWWW);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
|
||||
/***** Show the form again *****/
|
||||
Cty_EditCountries ();
|
||||
|
@ -2149,7 +2149,7 @@ void Cty_RecFormNewCountry (void)
|
|||
/* Get numeric country code */
|
||||
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;
|
||||
}
|
||||
else if (Cty_CheckIfNumericCountryCodeExists (Cty->CtyCod))
|
||||
|
@ -2157,7 +2157,7 @@ void Cty_RecFormNewCountry (void)
|
|||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_numerical_code_X_already_exists,
|
||||
Cty->CtyCod);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Ale_WARNING,Gbl.Alert.Txt);
|
||||
CreateCountry = false;
|
||||
}
|
||||
else // Numeric code correct
|
||||
|
@ -2174,7 +2174,7 @@ void Cty_RecFormNewCountry (void)
|
|||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_alphabetical_code_X_is_not_correct,
|
||||
Cty->Alpha2);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Ale_WARNING,Gbl.Alert.Txt);
|
||||
CreateCountry = false;
|
||||
}
|
||||
if (CreateCountry)
|
||||
|
@ -2184,7 +2184,7 @@ void Cty_RecFormNewCountry (void)
|
|||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_alphabetical_code_X_already_exists,
|
||||
Cty->Alpha2);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Ale_WARNING,Gbl.Alert.Txt);
|
||||
CreateCountry = false;
|
||||
}
|
||||
else // Alphabetic code correct
|
||||
|
@ -2207,14 +2207,14 @@ void Cty_RecFormNewCountry (void)
|
|||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_country_X_already_exists,
|
||||
Cty->Name[Lan]);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Ale_WARNING,Gbl.Alert.Txt);
|
||||
CreateCountry = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
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;
|
||||
break;
|
||||
}
|
||||
|
@ -2300,7 +2300,7 @@ static void Cty_CreateCountry (struct Country *Cty)
|
|||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_Created_new_country_X,
|
||||
Cty->Name);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
|
@ -1164,7 +1164,7 @@ static void Crs_ListCourses (void)
|
|||
Tbl_EndTable ();
|
||||
}
|
||||
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 *****/
|
||||
if (Crs_CheckIfICanCreateCourses ())
|
||||
|
@ -1998,7 +1998,7 @@ void Crs_RemoveCourse (void)
|
|||
{
|
||||
/***** Check if this course has users *****/
|
||||
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
|
||||
{
|
||||
/***** Remove course *****/
|
||||
|
@ -2008,11 +2008,11 @@ void Crs_RemoveCourse (void)
|
|||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_Course_X_removed,
|
||||
Crs.FullName);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
}
|
||||
}
|
||||
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 *****/
|
||||
Crs_EditCourses ();
|
||||
|
@ -3475,7 +3475,7 @@ void Crs_RemoveOldCrss (void)
|
|||
NumCrss,
|
||||
MonthsWithoutAccess,
|
||||
Cfg_PLATFORM_SHORT_NAME);
|
||||
Ale_ShowAlert (Ale_INFO,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Ale_INFO,Gbl.Alert.Txt);
|
||||
|
||||
/***** Remove courses *****/
|
||||
for (NumCrs = 0;
|
||||
|
@ -3496,5 +3496,5 @@ void Crs_RemoveOldCrss (void)
|
|||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_X_courses_have_been_eliminated,
|
||||
NumCrssRemoved);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
}
|
||||
|
|
|
@ -88,7 +88,7 @@ void DB_CreateTablesIfNotExist (void)
|
|||
extern const char *Txt_Created_tables_in_the_database_that_did_not_exist;
|
||||
|
||||
/***** 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>");
|
||||
|
||||
/***** Table IP_prefs *****/
|
||||
|
@ -3086,7 +3086,7 @@ mysql> DESCRIBE ws_keys;
|
|||
|
||||
/***** Show success message *****/
|
||||
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);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
|
@ -228,7 +228,7 @@ void Deg_SeeDegWithPendingCrss (void)
|
|||
Box_EndBoxTable ();
|
||||
}
|
||||
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 *****/
|
||||
DB_FreeMySQLResult (&mysql_res);
|
||||
|
@ -1202,7 +1202,7 @@ static void Deg_ListDegrees (void)
|
|||
Tbl_EndTable ();
|
||||
}
|
||||
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 *****/
|
||||
if (Deg_CheckIfICanCreateDegrees ())
|
||||
|
@ -1376,7 +1376,7 @@ void Deg_EditDegrees (void)
|
|||
else // No degree types
|
||||
{
|
||||
/***** 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 *****/
|
||||
if (DT_CheckIfICanCreateDegreeTypes ())
|
||||
|
@ -1583,23 +1583,23 @@ static void Deg_RecFormRequestOrCreateDeg (unsigned Status)
|
|||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_degree_X_already_exists,
|
||||
Gbl.Degs.EditingDeg.ShrtName);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Ale_WARNING,Gbl.Alert.Txt);
|
||||
}
|
||||
else if (Deg_CheckIfDegNameExistsInCtr ("FullName",Gbl.Degs.EditingDeg.FullName,-1L,Gbl.Degs.EditingDeg.CtrCod))
|
||||
{
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_degree_X_already_exists,
|
||||
Gbl.Degs.EditingDeg.FullName);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Ale_WARNING,Gbl.Alert.Txt);
|
||||
}
|
||||
else // Add new degree to database
|
||||
Deg_CreateDegree (Status);
|
||||
}
|
||||
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
|
||||
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 *****/
|
||||
Deg_EditDegrees ();
|
||||
|
@ -1623,7 +1623,7 @@ void Deg_RemoveDegree (void)
|
|||
|
||||
/***** Check if this degree has courses *****/
|
||||
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
|
||||
{
|
||||
/***** Remove degree *****/
|
||||
|
@ -1633,7 +1633,7 @@ void Deg_RemoveDegree (void)
|
|||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_Degree_X_removed,
|
||||
Deg.FullName);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
}
|
||||
|
||||
/***** Show the form again *****/
|
||||
|
@ -2173,7 +2173,7 @@ void Deg_ChangeDegWWW (void)
|
|||
Deg_ShowAlertAndButtonToGoToDeg ();
|
||||
}
|
||||
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 *****/
|
||||
Deg_EditDegrees ();
|
||||
|
@ -2201,10 +2201,10 @@ void Deg_ChangeDegWWWInConfig (void)
|
|||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_new_web_address_is_X,
|
||||
NewWWW);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
}
|
||||
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 *****/
|
||||
Deg_ShowConfiguration ();
|
||||
|
@ -2307,7 +2307,7 @@ void Deg_ShowAlertAndButtonToGoToDeg (void)
|
|||
}
|
||||
else
|
||||
/***** Alert *****/
|
||||
Ale_ShowAlert (Gbl.Alert.Type,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Gbl.Alert.Type,Gbl.Alert.Txt);
|
||||
}
|
||||
|
||||
static void Deg_PutParamGoToDeg (void)
|
||||
|
|
|
@ -218,7 +218,7 @@ static void DT_ListDegreeTypes (Act_Action_t NextAction,DT_Order_t SelectedOrder
|
|||
Tbl_EndTable ();
|
||||
}
|
||||
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 *****/
|
||||
if (DT_CheckIfICanCreateDegreeTypes ())
|
||||
|
@ -570,7 +570,7 @@ static void DT_CreateDegreeType (struct DegreeType *DegTyp)
|
|||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_Created_new_type_of_degree_X,
|
||||
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),
|
||||
Txt_The_type_of_degree_X_already_exists,
|
||||
DegTyp->DegTypName);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Ale_WARNING,Gbl.Alert.Txt);
|
||||
}
|
||||
else // Add new degree type to database
|
||||
DT_CreateDegreeType (DegTyp);
|
||||
}
|
||||
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 *****/
|
||||
DT_EditDegreeTypes ();
|
||||
|
@ -776,7 +776,7 @@ void DT_RemoveDegreeType (void)
|
|||
|
||||
/***** Check if this degree type has degrees *****/
|
||||
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
|
||||
{
|
||||
/***** Remove degree type *****/
|
||||
|
@ -786,7 +786,7 @@ void DT_RemoveDegreeType (void)
|
|||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_Type_of_degree_X_removed,
|
||||
DegTyp.DegTypName);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
}
|
||||
|
||||
/***** Show the form again *****/
|
||||
|
@ -958,7 +958,7 @@ void DT_RenameDegreeType (void)
|
|||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_You_can_not_leave_the_name_of_the_type_of_degree_X_empty,
|
||||
DegTyp->DegTypName);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Ale_WARNING,Gbl.Alert.Txt);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -972,7 +972,7 @@ void DT_RenameDegreeType (void)
|
|||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_type_of_degree_X_already_exists,
|
||||
NewNameDegTyp);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Ale_WARNING,Gbl.Alert.Txt);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -986,7 +986,7 @@ void DT_RenameDegreeType (void)
|
|||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_type_of_degree_X_has_been_renamed_as_Y,
|
||||
DegTyp->DegTypName,NewNameDegTyp);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
}
|
||||
}
|
||||
else // The same name
|
||||
|
@ -994,7 +994,7 @@ void DT_RenameDegreeType (void)
|
|||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_name_of_the_type_of_degree_X_has_not_changed,
|
||||
NewNameDegTyp);
|
||||
Ale_ShowAlert (Ale_INFO,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Ale_INFO,Gbl.Alert.Txt);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -613,7 +613,7 @@ void Dpt_RemoveDepartment (void)
|
|||
|
||||
/***** Check if this department has teachers *****/
|
||||
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
|
||||
{
|
||||
/***** Remove department *****/
|
||||
|
@ -625,7 +625,7 @@ void Dpt_RemoveDepartment (void)
|
|||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_Department_X_removed,
|
||||
Dpt.FullName);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
}
|
||||
|
||||
/***** Show the form again *****/
|
||||
|
@ -656,7 +656,7 @@ void Dpt_ChangeDepartIns (void)
|
|||
Dpt->InsCod,Dpt->DptCod);
|
||||
|
||||
/***** 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 *****/
|
||||
Dpt_EditDepartments ();
|
||||
|
@ -730,7 +730,7 @@ static void Dpt_RenameDepartment (Cns_ShrtOrFullName_t ShrtOrFullName)
|
|||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_You_can_not_leave_the_name_of_the_department_X_empty,
|
||||
CurrentDptName);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Ale_WARNING,Gbl.Alert.Txt);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -744,7 +744,7 @@ static void Dpt_RenameDepartment (Cns_ShrtOrFullName_t ShrtOrFullName)
|
|||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_department_X_already_exists,
|
||||
NewDptName);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Ale_WARNING,Gbl.Alert.Txt);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -755,7 +755,7 @@ static void Dpt_RenameDepartment (Cns_ShrtOrFullName_t ShrtOrFullName)
|
|||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_department_X_has_been_renamed_as_Y,
|
||||
CurrentDptName,NewDptName);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
}
|
||||
}
|
||||
else // The same name
|
||||
|
@ -763,7 +763,7 @@ static void Dpt_RenameDepartment (Cns_ShrtOrFullName_t ShrtOrFullName)
|
|||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_name_of_the_department_X_has_not_changed,
|
||||
CurrentDptName);
|
||||
Ale_ShowAlert (Ale_INFO,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Ale_INFO,Gbl.Alert.Txt);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -831,10 +831,10 @@ void Dpt_ChangeDptWWW (void)
|
|||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_new_web_address_is_X,
|
||||
NewWWW);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
}
|
||||
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 *****/
|
||||
Str_Copy (Dpt->WWW,NewWWW,
|
||||
|
@ -1021,23 +1021,23 @@ void Dpt_RecFormNewDpt (void)
|
|||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_department_X_already_exists,
|
||||
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))
|
||||
{
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_department_X_already_exists,
|
||||
Dpt->FullName);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Ale_WARNING,Gbl.Alert.Txt);
|
||||
}
|
||||
else // Add new department to database
|
||||
Dpt_CreateDepartment (Dpt);
|
||||
}
|
||||
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
|
||||
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 *****/
|
||||
Dpt_EditDepartments ();
|
||||
|
@ -1063,7 +1063,7 @@ static void Dpt_CreateDepartment (struct Department *Dpt)
|
|||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_Created_new_department_X,
|
||||
Dpt->FullName);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
|
@ -102,13 +102,13 @@ void Dup_ReportUsrAsPossibleDuplicate (void)
|
|||
Gbl.Usrs.Me.UsrDat.UsrCod);
|
||||
|
||||
/***** 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
|
||||
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
|
||||
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 ())
|
||||
Dup_ListSimilarUsrs ();
|
||||
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)
|
||||
|
@ -459,7 +459,7 @@ void Dup_RemoveUsrFromListDupUsrs (void)
|
|||
Dup_ListDuplicateUsrs ();
|
||||
}
|
||||
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_);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
100
swad_enrolment.c
100
swad_enrolment.c
|
@ -398,7 +398,7 @@ void Enr_ReqAcceptRegisterInCrs (void)
|
|||
Txt_A_teacher_or_administrator_has_enroled_you_as_X_into_the_course_Y,
|
||||
Txt_ROLES_SINGUL_abc[Gbl.Usrs.Me.UsrDat.Roles.InCurrentCrs.Role][Gbl.Usrs.Me.UsrDat.Sex],
|
||||
Gbl.CurrentCrs.Crs.FullName);
|
||||
Ale_ShowAlert (Ale_INFO,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Ale_INFO,Gbl.Alert.Txt);
|
||||
|
||||
/***** Send button to accept register in the current course *****/
|
||||
switch (Gbl.Usrs.Me.UsrDat.Roles.InCurrentCrs.Role)
|
||||
|
@ -627,7 +627,7 @@ static void Enr_ReqAdminUsrs (Rol_Role_t Role)
|
|||
Enr_ReqAnotherUsrIDToRegisterRemove (Role);
|
||||
break;
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
@ -721,7 +721,7 @@ static void Enr_ShowFormRegRemSeveralUsrs (Rol_Role_t Role)
|
|||
The_ClassTitle[Gbl.Prefs.Theme],
|
||||
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 ();
|
||||
|
||||
/***** 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?
|
||||
{
|
||||
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);
|
||||
}
|
||||
else
|
||||
|
@ -751,7 +751,7 @@ static void Enr_ShowFormRegRemSeveralUsrs (Rol_Role_t Role)
|
|||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_No_groups_have_been_created_in_the_course_X_Therefore_,
|
||||
Gbl.CurrentCrs.Crs.FullName);
|
||||
Ale_ShowAlert (Ale_INFO,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Ale_INFO,Gbl.Alert.Txt);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -876,7 +876,7 @@ void Enr_RemoveOldUsrs (void)
|
|||
NumUsrs,
|
||||
MonthsWithoutAccess,
|
||||
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 *****/
|
||||
Usr_UsrDataConstructor (&UsrDat);
|
||||
|
@ -909,7 +909,7 @@ void Enr_RemoveOldUsrs (void)
|
|||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_X_users_have_been_eliminated,
|
||||
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))
|
||||
{
|
||||
/* 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 */
|
||||
Grp_FreeListCodGrp (&LstGrps);
|
||||
|
@ -1746,32 +1746,32 @@ static void Enr_ReceiveFormUsrsCrs (Rol_Role_t Role)
|
|||
switch (NumUsrsEliminated)
|
||||
{
|
||||
case 0:
|
||||
Ale_ShowAlert (Ale_INFO,Txt_No_user_has_been_eliminated);
|
||||
Ale_ShowA_old (Ale_INFO,Txt_No_user_has_been_eliminated);
|
||||
break;
|
||||
case 1:
|
||||
Ale_ShowAlert (Ale_SUCCESS,Txt_One_user_has_been_eliminated);
|
||||
Ale_ShowA_old (Ale_SUCCESS,Txt_One_user_has_been_eliminated);
|
||||
break;
|
||||
default:
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_X_users_have_been_eliminated,
|
||||
NumUsrsEliminated);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
break;
|
||||
}
|
||||
else // Only remove from course / groups
|
||||
switch (NumUsrsRemoved)
|
||||
{
|
||||
case 0:
|
||||
Ale_ShowAlert (Ale_INFO,Txt_No_user_has_been_removed);
|
||||
Ale_ShowA_old (Ale_INFO,Txt_No_user_has_been_removed);
|
||||
break;
|
||||
case 1:
|
||||
Ale_ShowAlert (Ale_SUCCESS,Txt_One_user_has_been_removed);
|
||||
Ale_ShowA_old (Ale_SUCCESS,Txt_One_user_has_been_removed);
|
||||
break;
|
||||
default:
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_X_users_have_been_removed,
|
||||
NumUsrsRemoved);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -1779,16 +1779,16 @@ static void Enr_ReceiveFormUsrsCrs (Rol_Role_t Role)
|
|||
switch (NumUsrsRegistered)
|
||||
{
|
||||
case 0:
|
||||
Ale_ShowAlert (Ale_INFO,Txt_No_user_has_been_enroled);
|
||||
Ale_ShowA_old (Ale_INFO,Txt_No_user_has_been_enroled);
|
||||
break;
|
||||
case 1:
|
||||
Ale_ShowAlert (Ale_SUCCESS,Txt_One_user_has_been_enroled);
|
||||
Ale_ShowA_old (Ale_SUCCESS,Txt_One_user_has_been_enroled);
|
||||
break;
|
||||
default:
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_X_users_have_been_enroled_including_possible_repetitions,
|
||||
NumUsrsRegistered);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -1923,7 +1923,7 @@ void Enr_RemAllStdsThisCrs (void)
|
|||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_X_students_who_belonged_to_the_course_Y_have_been_removed_from_it,
|
||||
NumStdsInCrs,Gbl.CurrentCrs.Crs.FullName);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
}
|
||||
else // NumStdsInCrs == 0
|
||||
/***** 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_ROLES_SINGUL_abc[Gbl.Usrs.Me.UsrDat.Roles.InCurrentCrs.Role][Gbl.Usrs.Me.UsrDat.Sex],
|
||||
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 ||
|
||||
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_ROLES_SINGUL_abc[Gbl.Usrs.Me.UsrDat.Roles.InCurrentCrs.Role][Gbl.Usrs.Me.UsrDat.Sex],
|
||||
Gbl.CurrentCrs.Crs.FullName);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Ale_WARNING,Gbl.Alert.Txt);
|
||||
}
|
||||
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_ROLES_SINGUL_abc[RoleFromForm][Gbl.Usrs.Me.UsrDat.Sex],
|
||||
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 *****/
|
||||
// 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),
|
||||
Txt_THE_USER_X_is_already_enroled_in_the_course_Y,
|
||||
Gbl.Usrs.Other.UsrDat.FullName,Gbl.CurrentCrs.Crs.FullName);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Ale_WARNING,Gbl.Alert.Txt);
|
||||
Rec_ShowSharedRecordUnmodifiable (&Gbl.Usrs.Other.UsrDat);
|
||||
|
||||
/* Remove inscription request because it has not sense */
|
||||
|
@ -2190,7 +2190,7 @@ void Enr_AskIfRejectSignUp (void)
|
|||
}
|
||||
}
|
||||
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),
|
||||
Txt_THE_USER_X_is_already_enroled_in_the_course_Y,
|
||||
Gbl.Usrs.Other.UsrDat.FullName,Gbl.CurrentCrs.Crs.FullName);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Ale_WARNING,Gbl.Alert.Txt);
|
||||
Rec_ShowSharedRecordUnmodifiable (&Gbl.Usrs.Other.UsrDat);
|
||||
}
|
||||
|
||||
|
@ -2225,10 +2225,10 @@ void Enr_RejectSignUp (void)
|
|||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_Enrolment_of_X_rejected,
|
||||
Gbl.Usrs.Other.UsrDat.FullName);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
}
|
||||
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 */
|
||||
Enr_ShowEnrolmentRequests ();
|
||||
|
@ -3008,7 +3008,7 @@ static void Enr_ShowEnrolmentRequestsGivenRoles (unsigned RolesSelected)
|
|||
Usr_UsrDataDestructor (&UsrDat);
|
||||
}
|
||||
else // There are no requests
|
||||
Ale_ShowAlert (Ale_INFO,Txt_No_enrolment_requests);
|
||||
Ale_ShowA_old (Ale_INFO,Txt_No_enrolment_requests);
|
||||
|
||||
/***** End box *****/
|
||||
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),
|
||||
Txt_There_are_X_users_with_the_ID_Y,
|
||||
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... *****/
|
||||
|
@ -3317,7 +3317,7 @@ static void Enr_AskIfRegRemUsr (struct ListUsrCods *ListUsrCods,Rol_Role_t Role)
|
|||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_THE_USER_X_is_already_in_the_course_Y_but_has_not_yet_accepted_the_enrolment,
|
||||
Gbl.Usrs.Other.UsrDat.FullName,Gbl.CurrentCrs.Crs.FullName);
|
||||
Ale_ShowAlert (Ale_INFO,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Ale_INFO,Gbl.Alert.Txt);
|
||||
|
||||
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,
|
||||
Gbl.Usrs.Other.UsrDat.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 ();
|
||||
}
|
||||
|
@ -3337,7 +3337,7 @@ static void Enr_AskIfRegRemUsr (struct ListUsrCods *ListUsrCods,Rol_Role_t Role)
|
|||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_THE_USER_X_already_exists_in_Y,
|
||||
Gbl.Usrs.Other.UsrDat.FullName,Cfg_PLATFORM_SHORT_NAME);
|
||||
Ale_ShowAlert (Ale_INFO,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Ale_INFO,Gbl.Alert.Txt);
|
||||
|
||||
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),
|
||||
Txt_The_user_is_new_not_yet_in_X,
|
||||
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);
|
||||
}
|
||||
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),
|
||||
Txt_If_this_is_a_new_user_in_X_you_should_indicate_her_his_ID,
|
||||
Cfg_PLATFORM_SHORT_NAME);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Ale_WARNING,Gbl.Alert.Txt);
|
||||
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);
|
||||
}
|
||||
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
|
||||
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,
|
||||
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 ())
|
||||
Enr_AskIfRemoveUsrFromCrs (&Gbl.Usrs.Other.UsrDat);
|
||||
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
|
||||
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)
|
||||
{
|
||||
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),
|
||||
Txt_THE_USER_X_is_not_an_administrator_of_Y,
|
||||
Gbl.Usrs.Other.UsrDat.FullName,InsCtrDegName);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Ale_WARNING,Gbl.Alert.Txt);
|
||||
}
|
||||
}
|
||||
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
|
||||
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),
|
||||
Txt_THE_USER_X_is_already_an_administrator_of_Y,
|
||||
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);
|
||||
}
|
||||
else
|
||||
|
@ -3749,10 +3749,10 @@ static void Enr_ReqAddAdm (Sco_Scope_t Scope,long Cod,const char *InsCtrDegName)
|
|||
}
|
||||
}
|
||||
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
|
||||
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),
|
||||
Txt_You_have_confirmed_your_enrolment_in_the_course_X,
|
||||
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_;
|
||||
|
||||
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
|
||||
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);
|
||||
}
|
||||
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),
|
||||
Txt_THE_USER_X_has_been_removed_as_administrator_of_Y,
|
||||
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
|
||||
{
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_THE_USER_X_is_not_an_administrator_of_Y,
|
||||
UsrDat->FullName,InsCtrDegName);
|
||||
Ale_ShowAlert (Ale_ERROR,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Ale_ERROR,Gbl.Alert.Txt);
|
||||
}
|
||||
}
|
||||
|
|
10
swad_exam.c
10
swad_exam.c
|
@ -295,7 +295,7 @@ void Exa_ReceiveExamAnnouncement2 (void)
|
|||
struct SocialPublishing SocPub;
|
||||
|
||||
/***** Show message *****/
|
||||
Ale_ShowAlert (Ale_SUCCESS,
|
||||
Ale_ShowA_old (Ale_SUCCESS,
|
||||
Gbl.ExamAnns.NewExamAnnouncement ? Txt_Created_new_announcement_of_exam :
|
||||
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;
|
||||
|
||||
/***** 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 *****/
|
||||
Exa_ListExamAnnouncementsEdit ();
|
||||
|
@ -447,7 +447,7 @@ void Exa_HideExamAnnouncement2 (void)
|
|||
extern const char *Txt_The_announcement_of_exam_is_now_hidden;
|
||||
|
||||
/***** 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 *****/
|
||||
Exa_ListExamAnnouncementsEdit ();
|
||||
|
@ -480,7 +480,7 @@ void Exa_UnhideExamAnnouncement2 (void)
|
|||
extern const char *Txt_The_announcement_of_exam_is_now_visible;
|
||||
|
||||
/***** 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 *****/
|
||||
Exa_ListExamAnnouncementsEdit ();
|
||||
|
@ -661,7 +661,7 @@ static void Exa_ListExamAnnouncements (Exa_TypeViewExamAnnouncement_t TypeViewEx
|
|||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_No_announcements_of_exams_of_X,
|
||||
Gbl.CurrentCrs.Crs.FullName);
|
||||
Ale_ShowAlert (Ale_INFO,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Ale_INFO,Gbl.Alert.Txt);
|
||||
}
|
||||
|
||||
/***** List the existing exam announcements *****/
|
||||
|
|
|
@ -2820,7 +2820,7 @@ bool Brw_UpdateFoldersAssigmentsIfExistForAllUsrs (const char *OldFolderName,con
|
|||
NewFolderName);
|
||||
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++;
|
||||
}
|
||||
else // Success
|
||||
|
@ -2854,11 +2854,11 @@ bool Brw_UpdateFoldersAssigmentsIfExistForAllUsrs (const char *OldFolderName,con
|
|||
Txt_Users,NumUsrs,
|
||||
Txt_Folders_renamed,NumUsrsSuccess,
|
||||
Txt_Folders_not_renamed,NumUsrsError);
|
||||
Ale_ShowAlert (Ale_INFO,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Ale_INFO,Gbl.Alert.Txt);
|
||||
}
|
||||
else
|
||||
/***** 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 *****/
|
||||
DB_FreeMySQLResult (&mysql_res);
|
||||
|
@ -2923,7 +2923,7 @@ static void Brw_SetAndCheckQuota (void)
|
|||
Brw_SetMaxQuota ();
|
||||
Brw_CalcSizeOfDir (Gbl.FileBrowser.Priv.PathRootFolder);
|
||||
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
|
||||
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 *****/
|
||||
Box_EndBox ();
|
||||
|
@ -3280,7 +3280,7 @@ static void Brw_ShowFileBrowsersAsgWrkCrs (void)
|
|||
else // If no users are selected...
|
||||
{
|
||||
// ...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
|
||||
Brw_AskEditWorksCrs ();
|
||||
}
|
||||
|
@ -3535,7 +3535,7 @@ void Brw_ShowAgainFileBrowserOrWorks (void)
|
|||
{
|
||||
case Brw_ADMI_MRK_CRS:
|
||||
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;
|
||||
default:
|
||||
break;
|
||||
|
@ -3546,7 +3546,7 @@ void Brw_ShowAgainFileBrowserOrWorks (void)
|
|||
Txt_Disclaimer_the_files_hosted_here_,
|
||||
Cfg_PLATFORM_SHORT_NAME,
|
||||
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),
|
||||
Txt_FILE_X_removed,
|
||||
FileNameToShow);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
}
|
||||
else // 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),
|
||||
Txt_Folder_X_removed,
|
||||
Gbl.FileBrowser.FilFolLnkName);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
}
|
||||
else // Folder not found
|
||||
Lay_ShowErrorAndExit ("Folder not found.");
|
||||
|
@ -6931,7 +6931,7 @@ void Brw_RemSubtreeInFileBrowser (void)
|
|||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_Folder_X_and_all_its_contents_removed,
|
||||
Gbl.FileBrowser.FilFolLnkName);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
}
|
||||
|
||||
/***** Show again file browser *****/
|
||||
|
@ -7255,7 +7255,7 @@ static void Brw_WriteCurrentClipboard (void)
|
|||
Txt_Copy_source,TxtClipboardZone,
|
||||
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
|
||||
/***** 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 *****/
|
||||
Brw_ShowAgainFileBrowserOrWorks ();
|
||||
|
@ -8203,7 +8203,7 @@ static void Brw_PasteClipboard (void)
|
|||
Txt_Files_copied ,Pasted.NumFiles,
|
||||
Txt_Links_copied ,Pasted.NumLinks,
|
||||
Txt_Folders_copied,Pasted.NumFolds);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
|
||||
/***** Notify new files *****/
|
||||
if (Pasted.NumFiles ||
|
||||
|
@ -8363,7 +8363,7 @@ static bool Brw_PasteTreeIntoFolder (unsigned LevelOrg,
|
|||
default:
|
||||
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;
|
||||
}
|
||||
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 :
|
||||
Txt_The_copy_has_stopped_when_trying_to_paste_the_link_X_because_there_is_already_an_object_with_that_name,
|
||||
FileNameToShow);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Ale_WARNING,Gbl.Alert.Txt);
|
||||
CopyIsGoingSuccessful = false;
|
||||
}
|
||||
else // Destination file does not exist
|
||||
|
@ -8397,7 +8397,7 @@ static bool Brw_PasteTreeIntoFolder (unsigned LevelOrg,
|
|||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_copy_has_stopped_when_trying_to_paste_the_file_X_because_you_can_not_paste_a_file_here_of_a_type_other_than_HTML,
|
||||
FileNameToShow);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Ale_WARNING,Gbl.Alert.Txt);
|
||||
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 :
|
||||
Txt_The_copy_has_stopped_when_trying_to_paste_the_link_X_because_it_would_exceed_the_disk_quota,
|
||||
FileNameToShow);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Ale_WARNING,Gbl.Alert.Txt);
|
||||
CopyIsGoingSuccessful = false;
|
||||
}
|
||||
else // Quota not exceeded
|
||||
|
@ -8456,7 +8456,7 @@ static bool Brw_PasteTreeIntoFolder (unsigned LevelOrg,
|
|||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_copy_has_stopped_when_trying_to_paste_the_folder_X_because_it_would_exceed_the_disk_quota,
|
||||
FileNameToShow);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Ale_WARNING,Gbl.Alert.Txt);
|
||||
CopyIsGoingSuccessful = false;
|
||||
}
|
||||
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),
|
||||
Txt_You_can_create_a_new_folder_inside_the_folder_X,
|
||||
FileNameToShow);
|
||||
Ale_ShowAlert (Ale_INFO,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Ale_INFO,Gbl.Alert.Txt);
|
||||
|
||||
/***** Folder *****/
|
||||
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),
|
||||
Txt_or_you_can_upload_new_files_to_the_folder_X,
|
||||
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 *****/
|
||||
// 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),
|
||||
Txt_or_you_can_upload_a_new_file_to_the_folder_X,
|
||||
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 *****/
|
||||
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),
|
||||
Txt_or_you_can_make_a_file_copy_to_the_folder_X,
|
||||
FileNameToShow);
|
||||
Ale_ShowAlert (Ale_INFO,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Ale_INFO,Gbl.Alert.Txt);
|
||||
|
||||
/***** Send button and end box *****/
|
||||
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),
|
||||
Txt_or_you_can_create_a_new_link_inside_the_folder_X,
|
||||
FileNameToShow);
|
||||
Ale_ShowAlert (Ale_INFO,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Ale_INFO,Gbl.Alert.Txt);
|
||||
|
||||
/***** URL *****/
|
||||
fprintf (Gbl.F.Out,"<table>"
|
||||
|
@ -8861,7 +8861,7 @@ void Brw_RecFolderFileBrowser (void)
|
|||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_Can_not_create_the_folder_X_because_it_would_exceed_the_disk_quota,
|
||||
Gbl.FileBrowser.NewFilFolLnkName);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Ale_WARNING,Gbl.Alert.Txt);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -8890,7 +8890,7 @@ void Brw_RecFolderFileBrowser (void)
|
|||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_folder_X_has_been_created_inside_the_folder_Y,
|
||||
Gbl.FileBrowser.NewFilFolLnkName,FileNameToShow);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -8901,7 +8901,7 @@ void Brw_RecFolderFileBrowser (void)
|
|||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_Can_not_create_the_folder_X_because_there_is_already_a_folder_or_a_file_with_that_name,
|
||||
Gbl.FileBrowser.NewFilFolLnkName);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Ale_WARNING,Gbl.Alert.Txt);
|
||||
break;
|
||||
case EACCES:
|
||||
Lay_ShowErrorAndExit ("Write forbidden.");
|
||||
|
@ -8913,7 +8913,7 @@ void Brw_RecFolderFileBrowser (void)
|
|||
}
|
||||
}
|
||||
else // Folder name not valid
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Ale_WARNING,Gbl.AlertToShowLater.Txt);
|
||||
}
|
||||
else
|
||||
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.");
|
||||
break;
|
||||
}
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Ale_WARNING,Gbl.Alert.Txt);
|
||||
}
|
||||
else // Success
|
||||
{
|
||||
|
@ -9021,7 +9021,7 @@ void Brw_RenFolderFileBrowser (void)
|
|||
Txt_The_folder_name_X_has_changed_to_Y,
|
||||
Gbl.FileBrowser.FilFolLnkName,
|
||||
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),
|
||||
Txt_The_folder_name_X_has_not_changed,
|
||||
Gbl.FileBrowser.FilFolLnkName);
|
||||
Ale_ShowAlert (Ale_INFO,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Ale_INFO,Gbl.Alert.Txt);
|
||||
}
|
||||
}
|
||||
else // Folder name not valid
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Ale_WARNING,Gbl.AlertToShowLater.Txt);
|
||||
}
|
||||
else
|
||||
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 *****/
|
||||
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 */
|
||||
snprintf (Path,sizeof (Path),
|
||||
|
@ -9376,7 +9376,7 @@ void Brw_RecLinkFileBrowser (void)
|
|||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_Can_not_create_the_link_X_because_there_is_already_a_folder_or_a_link_with_that_name,
|
||||
FileName);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Ale_WARNING,Gbl.Alert.Txt);
|
||||
}
|
||||
else // URL file does not exist
|
||||
{
|
||||
|
@ -9398,7 +9398,7 @@ void Brw_RecLinkFileBrowser (void)
|
|||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_Can_not_create_the_link_X_because_it_would_exceed_the_disk_quota,
|
||||
FileName);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Ale_WARNING,Gbl.Alert.Txt);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -9428,7 +9428,7 @@ void Brw_RecLinkFileBrowser (void)
|
|||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_link_X_has_been_placed_inside_the_folder_Y,
|
||||
FileName,FileNameToShow);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
|
||||
FileMetadata.FilCod = FilCod;
|
||||
Brw_GetFileMetadataByCod (&FileMetadata);
|
||||
|
@ -9461,10 +9461,10 @@ void Brw_RecLinkFileBrowser (void)
|
|||
}
|
||||
}
|
||||
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
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_UPLOAD_FILE_Invalid_link);
|
||||
Ale_ShowA_old (Ale_WARNING,Txt_UPLOAD_FILE_Invalid_link);
|
||||
}
|
||||
else
|
||||
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),
|
||||
Txt_FILE_FOLDER_OR_LINK_X_is_now_visible,
|
||||
FileNameToShow);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
|
||||
/***** Show again the file browser *****/
|
||||
Brw_ShowAgainFileBrowserOrWorks ();
|
||||
|
@ -9605,7 +9605,7 @@ void Brw_SetDocumentAsHidden (void)
|
|||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_FILE_FOLDER_OR_LINK_X_is_now_hidden,
|
||||
FileNameToShow);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
|
||||
/***** Show again the file browser *****/
|
||||
Brw_ShowAgainFileBrowserOrWorks ();
|
||||
|
@ -10088,7 +10088,7 @@ void Brw_ShowFileMetadata (void)
|
|||
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 *****/
|
||||
|
@ -10247,7 +10247,7 @@ void Brw_DownloadFile (void)
|
|||
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 *****/
|
||||
Brw_ShowAgainFileBrowserOrWorks ();
|
||||
|
@ -10574,7 +10574,7 @@ void Brw_ChgFileMetadata (void)
|
|||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_properties_of_file_X_have_been_saved,
|
||||
Gbl.FileBrowser.FilFolLnkName);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -10582,7 +10582,7 @@ void Brw_ChgFileMetadata (void)
|
|||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_You_dont_have_permission_to_change_the_properties_of_file_X,
|
||||
Gbl.FileBrowser.FilFolLnkName);
|
||||
Ale_ShowAlert (Ale_ERROR,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Ale_ERROR,Gbl.Alert.Txt);
|
||||
}
|
||||
|
||||
/***** Show again the file browser *****/
|
||||
|
@ -12577,7 +12577,7 @@ void Brw_RemoveOldFilesBriefcase (void)
|
|||
Txt_Files_removed ,Removed.NumFiles,
|
||||
Txt_Links_removed ,Removed.NumLinks,
|
||||
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 *****/
|
||||
|
|
|
@ -167,7 +167,7 @@ void Fol_SuggestUsrsToFollowMainZone (void)
|
|||
Box_EndBoxTable ();
|
||||
}
|
||||
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 *****/
|
||||
DB_FreeMySQLResult (&mysql_res);
|
||||
|
@ -653,7 +653,7 @@ void Fol_ListFollowing (void)
|
|||
if (Usr_ChkUsrCodAndGetAllUsrDataFromUsrCod (&Gbl.Usrs.Other.UsrDat))
|
||||
Fol_ListFollowingUsr (&Gbl.Usrs.Other.UsrDat);
|
||||
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
|
||||
Fol_ListFollowingUsr (&Gbl.Usrs.Me.UsrDat);
|
||||
|
@ -719,7 +719,7 @@ static void Fol_ListFollowingUsr (struct UsrData *UsrDat)
|
|||
DB_FreeMySQLResult (&mysql_res);
|
||||
}
|
||||
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))
|
||||
Fol_ListFollowersUsr (&Gbl.Usrs.Other.UsrDat);
|
||||
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
|
||||
Fol_ListFollowersUsr (&Gbl.Usrs.Me.UsrDat);
|
||||
|
@ -812,7 +812,7 @@ static void Fol_ListFollowersUsr (struct UsrData *UsrDat)
|
|||
Gbl.Usrs.Me.UsrDat.UsrCod);
|
||||
}
|
||||
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_);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
|
@ -972,7 +972,7 @@ static void For_ShowPostsOfAThread (Ale_AlertType_t AlertType,const char *Messag
|
|||
Lay_StartSection (For_FORUM_POSTS_SECTION_ID);
|
||||
if (Message)
|
||||
if (Message[0])
|
||||
Ale_ShowAlert (AlertType,Message);
|
||||
Ale_ShowA_old (AlertType,Message);
|
||||
|
||||
/***** Start box *****/
|
||||
snprintf (FrameTitle,sizeof (FrameTitle),
|
||||
|
@ -2541,7 +2541,7 @@ static void For_ShowForumThreadsHighlightingOneThread (long ThrCodHighlighted,
|
|||
Lay_StartSection (For_FORUM_THREADS_SECTION_ID);
|
||||
if (Message)
|
||||
if (Message[0])
|
||||
Ale_ShowAlert (AlertType,Message);
|
||||
Ale_ShowA_old (AlertType,Message);
|
||||
|
||||
/***** Start box for threads of this forum *****/
|
||||
snprintf (FrameTitle,sizeof (FrameTitle),
|
||||
|
|
36
swad_game.c
36
swad_game.c
|
@ -277,7 +277,7 @@ static void Gam_ListAllGames (void)
|
|||
Tbl_EndTable ();
|
||||
}
|
||||
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 *****/
|
||||
if (Gam_CheckIfICanCreateGame ())
|
||||
|
@ -1552,7 +1552,7 @@ void Gam_RemoveGame (void)
|
|||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_Game_X_removed,
|
||||
Game.Title);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
|
||||
/***** Show games again *****/
|
||||
Gam_ListAllGames ();
|
||||
|
@ -1585,7 +1585,7 @@ void Gam_AskResetGame (void)
|
|||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_Do_you_really_want_to_reset_the_game_X,
|
||||
Game.Title);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Ale_WARNING,Gbl.Alert.Txt);
|
||||
|
||||
/***** Button of confirmation of reset *****/
|
||||
Gbl.Games.CurrentGamCod = Game.GamCod;
|
||||
|
@ -1644,7 +1644,7 @@ void Gam_ResetGame (void)
|
|||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_Game_X_reset,
|
||||
Game.Title);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
|
||||
/***** Show games again *****/
|
||||
Gam_ListAllGames ();
|
||||
|
@ -1677,7 +1677,7 @@ void Gam_HideGame (void)
|
|||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_Game_X_is_now_hidden,
|
||||
Game.Title);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
|
||||
/***** Show games again *****/
|
||||
Gam_ListAllGames ();
|
||||
|
@ -1710,7 +1710,7 @@ void Gam_UnhideGame (void)
|
|||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_Game_X_is_now_visible,
|
||||
Game.Title);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
|
||||
/***** Show games again *****/
|
||||
Gam_ListAllGames ();
|
||||
|
@ -2153,13 +2153,13 @@ void Gam_RecFormGame (void)
|
|||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_Already_existed_a_game_with_the_title_X,
|
||||
NewGame.Title);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Ale_WARNING,Gbl.Alert.Txt);
|
||||
}
|
||||
}
|
||||
else // If there is not a game title
|
||||
{
|
||||
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 *****/
|
||||
|
@ -2217,7 +2217,7 @@ static void Gam_CreateGame (struct Game *Game,const char *Txt)
|
|||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_Created_new_game_X,
|
||||
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);
|
||||
|
||||
/***** 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
|
||||
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
|
||||
(!NumQsts || // This game has no questions
|
||||
|
@ -3034,7 +3034,7 @@ void Gam_AddTstQuestionsToGame (void)
|
|||
/* Check number of questions */
|
||||
if (Gam_CountNumQuestionsInList () == 0) // If no questions selected...
|
||||
{ // ...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!!!
|
||||
}
|
||||
|
@ -3307,7 +3307,7 @@ void Gam_RemoveQst (void)
|
|||
Game.GamCod,QstInd);
|
||||
|
||||
/***** Write message *****/
|
||||
Ale_ShowAlert (Ale_SUCCESS,Txt_Question_removed);
|
||||
Ale_ShowA_old (Ale_SUCCESS,Txt_Question_removed);
|
||||
|
||||
/***** Show current game *****/
|
||||
Gam_ShowOneGame (Game.GamCod,
|
||||
|
@ -3353,7 +3353,7 @@ void Gam_MoveUpQst (void)
|
|||
(unsigned) QstIndTop,(unsigned) QstIndBottom);
|
||||
|
||||
/* 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 *****/
|
||||
|
@ -3405,7 +3405,7 @@ void Gam_MoveDownQst (void)
|
|||
(unsigned) QstIndTop,(unsigned) QstIndBottom);
|
||||
|
||||
/* 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 *****/
|
||||
|
@ -3576,7 +3576,7 @@ static void Gam_PlayGameShowQuestionAndAnswers (bool ShowAnswers)
|
|||
" AND gam_questions.QstInd=%u"
|
||||
" AND gam_questions.QstCod=tst_questions.QstCod",
|
||||
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);
|
||||
|
||||
/***** Show question *****/
|
||||
|
@ -3687,12 +3687,12 @@ void Gam_ReceiveGameAnswers (void)
|
|||
|
||||
/***** Check if I have no answered this game formerly *****/
|
||||
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
|
||||
{
|
||||
/***** Receive and store user's answers *****/
|
||||
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 *****/
|
||||
|
|
22
swad_group.c
22
swad_group.c
|
@ -238,7 +238,7 @@ static void Grp_ReqEditGroupsInternal1 (Ale_AlertType_t AlertTypeGroupTypes,cons
|
|||
/***** Show optional alert *****/
|
||||
if (MessageGroupTypes)
|
||||
if (MessageGroupTypes[0])
|
||||
Ale_ShowAlert (AlertTypeGroupTypes,MessageGroupTypes);
|
||||
Ale_ShowA_old (AlertTypeGroupTypes,MessageGroupTypes);
|
||||
|
||||
/***** Put form to edit group types *****/
|
||||
Grp_EditGroupTypes ();
|
||||
|
@ -255,7 +255,7 @@ static void Grp_ReqEditGroupsInternal2 (Ale_AlertType_t AlertTypeGroups,const ch
|
|||
/***** Show optional alert *****/
|
||||
if (MessageGroups)
|
||||
if (MessageGroups[0])
|
||||
Ale_ShowAlert (AlertTypeGroups,MessageGroups);
|
||||
Ale_ShowA_old (AlertTypeGroups,MessageGroups);
|
||||
|
||||
/***** Put form to edit groups *****/
|
||||
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),
|
||||
Txt_There_are_no_types_of_group_in_the_course_X,
|
||||
Gbl.CurrentCrs.Crs.ShrtName);
|
||||
Ale_ShowAlert (Ale_INFO,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Ale_INFO,Gbl.Alert.Txt);
|
||||
}
|
||||
|
||||
/***** End box *****/
|
||||
|
@ -328,7 +328,7 @@ static void Grp_EditGroups (void)
|
|||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_No_groups_have_been_created_in_the_course_X,
|
||||
Gbl.CurrentCrs.Crs.ShrtName);
|
||||
Ale_ShowAlert (Ale_INFO,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Ale_INFO,Gbl.Alert.Txt);
|
||||
}
|
||||
|
||||
/***** End box *****/
|
||||
|
@ -1128,7 +1128,7 @@ void Grp_RegisterUsrIntoGroups (struct UsrData *UsrDat,struct ListCodGrps *LstGr
|
|||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_THE_USER_X_has_been_removed_from_the_group_of_type_Y_to_which_it_belonged,
|
||||
UsrDat->FullName,Gbl.CurrentCrs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp].GrpTypName);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
}
|
||||
|
||||
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,
|
||||
UsrDat->FullName,Gbl.CurrentCrs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp].GrpTypName,
|
||||
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
|
||||
|
@ -1197,7 +1197,7 @@ unsigned Grp_RemoveUsrFromGroups (struct UsrData *UsrDat,struct ListCodGrps *Lst
|
|||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_THE_USER_X_has_been_removed_from_Y_groups,
|
||||
UsrDat->FullName,NumGrpsHeIsRemoved);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
|
||||
/***** Free the list of groups of this type to which the user belonged *****/
|
||||
Grp_FreeListCodGrp (&LstGrpsHeBelongs);
|
||||
|
@ -1869,7 +1869,7 @@ void Grp_ShowLstGrpsToChgMyGrps (void)
|
|||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_No_groups_have_been_created_in_the_course_X,
|
||||
Gbl.CurrentCrs.Crs.FullName);
|
||||
Ale_ShowAlert (Ale_INFO,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Ale_INFO,Gbl.Alert.Txt);
|
||||
|
||||
/***** Button to create group *****/
|
||||
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 :
|
||||
Txt_You_have_to_register_compulsorily_in_one_group_of_type_X,
|
||||
GrpTyp->GrpTypName);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Ale_WARNING,Gbl.Alert.Txt);
|
||||
}
|
||||
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 :
|
||||
Txt_You_can_register_voluntarily_in_one_group_of_type_X,
|
||||
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);
|
||||
|
||||
/***** 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 *****/
|
||||
Grp_ReqEditGroupsInternal (Ale_SUCCESS,Gbl.Alert.Txt,
|
||||
|
|
|
@ -127,7 +127,7 @@ void Hlp_ShowHelpWhatWouldYouLikeToDo (void)
|
|||
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_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 *****/
|
||||
|
|
|
@ -176,7 +176,7 @@ void Hld_SeeHolidays (void)
|
|||
Tbl_EndTable ();
|
||||
}
|
||||
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 *****/
|
||||
if (Gbl.Usrs.Me.Role.Logged >= Rol_INS_ADM) // Institution admin or system admin
|
||||
|
|
|
@ -545,7 +545,7 @@ void Img_MoveImageToDefinitiveDirectory (struct Image *Image)
|
|||
|
||||
/***** Move file *****/
|
||||
if (rename (FileNameImgTmp,FileNameImg)) // Fail
|
||||
Ale_ShowAlert (Ale_ERROR,"Can not move file.");
|
||||
Ale_ShowA_old (Ale_ERROR,"Can not move file.");
|
||||
else // Success
|
||||
Image->Status = Img_FILE_MOVED;
|
||||
}
|
||||
|
@ -628,7 +628,7 @@ void Img_ShowImage (struct Image *Image,
|
|||
fprintf (Gbl.F.Out,"</div>");
|
||||
}
|
||||
else
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_Image_not_found);
|
||||
Ale_ShowA_old (Ale_WARNING,Txt_Image_not_found);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
46
swad_info.c
46
swad_info.c
|
@ -450,7 +450,7 @@ void Inf_ShowInfo (void)
|
|||
ICanEdit ? Inf_PutIconToEditInfo :
|
||||
NULL,
|
||||
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)
|
||||
Inf_PutButtonToEditInfo ();
|
||||
Box_EndBox ();
|
||||
|
@ -597,7 +597,7 @@ void Inf_WriteMsgYouMustReadInfo (void)
|
|||
NULL,Box_NOT_CLOSABLE);
|
||||
|
||||
/***** 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 *****/
|
||||
fprintf (Gbl.F.Out,"<div class=\"CENTER_MIDDLE\">"
|
||||
|
@ -642,7 +642,7 @@ void Inf_ChangeForceReadInfo (void)
|
|||
Inf_SetForceReadIntoDB (MustBeRead);
|
||||
|
||||
/***** Write message of success *****/
|
||||
Ale_ShowAlert (Ale_SUCCESS,
|
||||
Ale_ShowA_old (Ale_SUCCESS,
|
||||
MustBeRead ? Txt_Students_now_are_required_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);
|
||||
|
||||
/***** Write message of success *****/
|
||||
Ale_ShowAlert (Ale_SUCCESS,
|
||||
Ale_ShowA_old (Ale_SUCCESS,
|
||||
IHaveRead ? Txt_You_have_confirmed_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),
|
||||
Txt_The_URL_X_has_been_updated,
|
||||
Gbl.CurrentCrs.Info.URL);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
URLIsOK = true;
|
||||
}
|
||||
else
|
||||
Ale_ShowAlert (Ale_ERROR,"Error when saving URL to file.");
|
||||
Ale_ShowA_old (Ale_ERROR,"Error when saving URL to file.");
|
||||
|
||||
if (URLIsOK)
|
||||
{
|
||||
|
@ -2316,7 +2316,7 @@ void Inf_ReceivePagInfo (void)
|
|||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_file_type_is_X_and_should_be_HTML_or_ZIP,
|
||||
MIMEType);
|
||||
Ale_ShowAlert (Ale_INFO,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Ale_INFO,Gbl.Alert.Txt);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -2334,11 +2334,11 @@ void Inf_ReceivePagInfo (void)
|
|||
PathRelDirHTML);
|
||||
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;
|
||||
}
|
||||
else
|
||||
Ale_ShowAlert (Ale_WARNING,"Error uploading file.");
|
||||
Ale_ShowA_old (Ale_WARNING,"Error uploading file.");
|
||||
}
|
||||
else if (Str_FileIs (SourceFileName,"zip")) // .zip file
|
||||
{
|
||||
|
@ -2351,7 +2351,7 @@ void Inf_ReceivePagInfo (void)
|
|||
|
||||
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 */
|
||||
snprintf (StrUnzip,sizeof (StrUnzip),
|
||||
|
@ -2365,8 +2365,8 @@ void Inf_ReceivePagInfo (void)
|
|||
PathRelDirHTML);
|
||||
if (Fil_CheckIfPathExists (PathRelFileHTML))
|
||||
{
|
||||
Ale_ShowAlert (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_The_ZIP_file_has_been_unzipped_successfully);
|
||||
Ale_ShowA_old (Ale_SUCCESS,Txt_Found_an_index_html_file);
|
||||
FileIsOK = true;
|
||||
}
|
||||
else
|
||||
|
@ -2376,22 +2376,22 @@ void Inf_ReceivePagInfo (void)
|
|||
PathRelDirHTML);
|
||||
if (Fil_CheckIfPathExists (PathRelFileHTML))
|
||||
{
|
||||
Ale_ShowAlert (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_The_ZIP_file_has_been_unzipped_successfully);
|
||||
Ale_ShowA_old (Ale_SUCCESS,Txt_Found_an_index_htm_file);
|
||||
FileIsOK = true;
|
||||
}
|
||||
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
|
||||
Lay_ShowErrorAndExit ("Can not unzip file.");
|
||||
}
|
||||
else
|
||||
Ale_ShowAlert (Ale_WARNING,"Error uploading file.");
|
||||
Ale_ShowA_old (Ale_WARNING,"Error uploading file.");
|
||||
}
|
||||
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)
|
||||
|
@ -2420,7 +2420,7 @@ void Inf_EditorCourseInfo (void)
|
|||
{
|
||||
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 *****/
|
||||
Inf_FormsToSelSendInfo ();
|
||||
|
@ -2434,7 +2434,7 @@ void Inf_EditorTeachingGuide (void)
|
|||
{
|
||||
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 *****/
|
||||
Inf_FormsToSelSendInfo ();
|
||||
|
@ -2448,7 +2448,7 @@ void Inf_EditorBibliography (void)
|
|||
{
|
||||
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 *****/
|
||||
Inf_FormsToSelSendInfo ();
|
||||
|
@ -2462,7 +2462,7 @@ void Inf_EditorFAQ (void)
|
|||
{
|
||||
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 *****/
|
||||
Inf_FormsToSelSendInfo ();
|
||||
|
@ -2476,7 +2476,7 @@ void Inf_EditorLinks (void)
|
|||
{
|
||||
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 *****/
|
||||
Inf_FormsToSelSendInfo ();
|
||||
|
@ -2490,7 +2490,7 @@ void Inf_EditorAssessment (void)
|
|||
{
|
||||
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 *****/
|
||||
Inf_FormsToSelSendInfo ();
|
||||
|
|
|
@ -215,7 +215,7 @@ void Ins_SeeInsWithPendingCtrs (void)
|
|||
Box_EndBoxTable ();
|
||||
}
|
||||
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 *****/
|
||||
DB_FreeMySQLResult (&mysql_res);
|
||||
|
@ -708,7 +708,7 @@ static void Ins_ListInstitutions (void)
|
|||
Tbl_EndTable ();
|
||||
}
|
||||
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 *****/
|
||||
if (Ins_CheckIfICanCreateInstitutions ())
|
||||
|
@ -1731,7 +1731,7 @@ void Ins_RemoveInstitution (void)
|
|||
else if (Ins.NumCtrs ||
|
||||
Ins.NumUsrsWhoClaimToBelongToIns ||
|
||||
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
|
||||
{
|
||||
/***** 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),
|
||||
Txt_Institution_X_removed,
|
||||
Ins.FullName);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
}
|
||||
|
||||
/***** Show the form again *****/
|
||||
|
@ -2032,7 +2032,7 @@ void Ins_ChangeInsWWW (void)
|
|||
Ins_ShowAlertAndButtonToGoToIns ();
|
||||
}
|
||||
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 *****/
|
||||
Ins_EditInstitutions ();
|
||||
|
@ -2060,10 +2060,10 @@ void Ins_ChangeInsWWWInConfig (void)
|
|||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_new_web_address_is_X,
|
||||
NewWWW);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
}
|
||||
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 *****/
|
||||
Ins_ShowConfiguration ();
|
||||
|
@ -2165,7 +2165,7 @@ static void Ins_ShowAlertAndButtonToGoToIns (void)
|
|||
}
|
||||
else
|
||||
/***** Alert *****/
|
||||
Ale_ShowAlert (Gbl.Alert.Type,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Gbl.Alert.Type,Gbl.Alert.Txt);
|
||||
}
|
||||
|
||||
static void Ins_PutParamGoToIns (void)
|
||||
|
@ -2403,23 +2403,23 @@ static void Ins_RecFormRequestOrCreateIns (unsigned Status)
|
|||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_institution_X_already_exists,
|
||||
Gbl.Inss.EditingIns.ShrtName);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Ale_WARNING,Gbl.Alert.Txt);
|
||||
}
|
||||
else if (Ins_CheckIfInsNameExistsInCty ("FullName",Gbl.Inss.EditingIns.FullName,-1L,Gbl.CurrentCty.Cty.CtyCod))
|
||||
{
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_institution_X_already_exists,
|
||||
Gbl.Inss.EditingIns.FullName);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Ale_WARNING,Gbl.Alert.Txt);
|
||||
}
|
||||
else // Add new institution to database
|
||||
Ins_CreateInstitution (Status);
|
||||
}
|
||||
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
|
||||
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 *****/
|
||||
Ins_EditInstitutions ();
|
||||
|
|
|
@ -1269,7 +1269,7 @@ void Lay_ShowErrorAndExit (const char *Txt)
|
|||
|
||||
/***** Write possible error message *****/
|
||||
if (Txt)
|
||||
Ale_ShowAlert (Ale_ERROR,Txt);
|
||||
Ale_ShowA_old (Ale_ERROR,Txt);
|
||||
|
||||
/***** Finish the page, except </body> and </html> *****/
|
||||
Lay_WriteEndOfPage ();
|
||||
|
|
26
swad_link.c
26
swad_link.c
|
@ -104,7 +104,7 @@ void Lnk_SeeLinks (void)
|
|||
if (Gbl.Links.Num) // There are links
|
||||
Lnk_WriteListOfLinks ();
|
||||
else // No links created
|
||||
Ale_ShowAlert (Ale_INFO,Txt_No_links);
|
||||
Ale_ShowA_old (Ale_INFO,Txt_No_links);
|
||||
|
||||
/***** Button to create link *****/
|
||||
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),
|
||||
Txt_Link_X_removed,
|
||||
Lnk.ShrtName);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
|
||||
/***** Show the form again *****/
|
||||
Lnk_EditLinks ();
|
||||
|
@ -585,7 +585,7 @@ static void Lnk_RenameLink (Cns_ShrtOrFullName_t ShrtOrFullName)
|
|||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_You_can_not_leave_the_name_of_the_link_X_empty,
|
||||
CurrentLnkName);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Ale_WARNING,Gbl.Alert.Txt);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -599,7 +599,7 @@ static void Lnk_RenameLink (Cns_ShrtOrFullName_t ShrtOrFullName)
|
|||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_link_X_already_exists,
|
||||
NewLnkName);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Ale_WARNING,Gbl.Alert.Txt);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -610,7 +610,7 @@ static void Lnk_RenameLink (Cns_ShrtOrFullName_t ShrtOrFullName)
|
|||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_link_X_has_been_renamed_as_Y,
|
||||
CurrentLnkName,NewLnkName);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
}
|
||||
}
|
||||
else // The same name
|
||||
|
@ -618,7 +618,7 @@ static void Lnk_RenameLink (Cns_ShrtOrFullName_t ShrtOrFullName)
|
|||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_name_of_the_link_X_has_not_changed,
|
||||
CurrentLnkName);
|
||||
Ale_ShowAlert (Ale_INFO,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Ale_INFO,Gbl.Alert.Txt);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -687,10 +687,10 @@ void Lnk_ChangeLinkWWW (void)
|
|||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_new_web_address_is_X,
|
||||
NewWWW);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
}
|
||||
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 *****/
|
||||
Str_Copy (Lnk->WWW,NewWWW,
|
||||
|
@ -824,22 +824,22 @@ void Lnk_RecFormNewLink (void)
|
|||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_link_X_already_exists,
|
||||
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))
|
||||
{
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_link_X_already_exists,
|
||||
Lnk->FullName);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Ale_WARNING,Gbl.Alert.Txt);
|
||||
}
|
||||
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
|
||||
Lnk_CreateLink (Lnk);
|
||||
}
|
||||
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 *****/
|
||||
Lnk_EditLinks ();
|
||||
|
@ -865,5 +865,5 @@ static void Lnk_CreateLink (struct Link *Lnk)
|
|||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_Created_new_link_X,
|
||||
Lnk->ShrtName);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
}
|
||||
|
|
|
@ -295,7 +295,7 @@ void Log_RequestLogo (Sco_Scope_t Scope)
|
|||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_You_can_send_a_file_with_an_image_in_PNG_format_transparent_background_and_size_X_Y,
|
||||
64,64);
|
||||
Ale_ShowAlert (Ale_INFO,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Ale_INFO,Gbl.Alert.Txt);
|
||||
|
||||
/***** Upload logo *****/
|
||||
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),
|
||||
Txt_The_file_is_not_X,
|
||||
"png");
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Ale_WARNING,Gbl.Alert.Txt);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -401,7 +401,7 @@ void Log_ReceiveLogo (Sco_Scope_t Scope)
|
|||
(unsigned) Cod,
|
||||
(unsigned) Cod);
|
||||
if (!Fil_EndReceptionOfFile (FileNameLogo,Param))
|
||||
Ale_ShowAlert (Ale_WARNING,"Error copying file.");
|
||||
Ale_ShowA_old (Ale_WARNING,"Error copying file.");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
34
swad_mail.c
34
swad_mail.c
|
@ -382,7 +382,7 @@ void Mai_WriteWarningEmailNotifications (void)
|
|||
Txt_TABS_TXT [TabMailDomains],
|
||||
Txt_MENU_TITLE[TabMailDomains][Act_GetIndexInMenu (ActSeeMai )],
|
||||
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),
|
||||
Txt_Email_domain_X_removed,
|
||||
Mai.Domain);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
|
||||
/***** Show the form again *****/
|
||||
Mai_EditMailDomains ();
|
||||
|
@ -827,20 +827,20 @@ void Mai_RecFormNewMailDomain (void)
|
|||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_email_domain_X_already_exists,
|
||||
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))
|
||||
{
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_email_domain_X_already_exists,
|
||||
Mai->Info);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Ale_WARNING,Gbl.Alert.Txt);
|
||||
}
|
||||
else // Add new mail to database
|
||||
Mai_CreateMailDomain (Mai);
|
||||
}
|
||||
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 *****/
|
||||
Mai_EditMailDomains ();
|
||||
|
@ -866,7 +866,7 @@ static void Mai_CreateMailDomain (struct Mail *Mai)
|
|||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_Created_new_email_domain_X,
|
||||
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 *****/
|
||||
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 *****/
|
||||
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)
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_Please_confirm_your_email_address);
|
||||
Ale_ShowA_old (Ale_WARNING,Txt_Please_confirm_your_email_address);
|
||||
|
||||
/***** Get my emails *****/
|
||||
NumEmails = (unsigned) DB_QuerySELECT (&mysql_res,"can not get"
|
||||
|
@ -1445,10 +1445,10 @@ void Mai_RemoveOtherUsrEmail (void)
|
|||
Acc_ShowFormChgOtherUsrAccount ();
|
||||
}
|
||||
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
|
||||
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.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 ();
|
||||
}
|
||||
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
|
||||
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,
|
||||
Email);
|
||||
}
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
}
|
||||
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 *****/
|
||||
DB_FreeMySQLResult (&mysql_res);
|
||||
}
|
||||
else
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_Failed_email_confirmation_key);
|
||||
Ale_ShowA_old (Ale_WARNING,Txt_Failed_email_confirmation_key);
|
||||
|
||||
/***** Form to log in *****/
|
||||
Usr_WriteFormLogin (ActLogIn,NULL);
|
||||
|
|
|
@ -286,7 +286,7 @@ static void Mrk_ChangeNumRowsHeaderOrFooter (Brw_HeadOrFoot_t HeaderOrFooter)
|
|||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_number_of_rows_is_now_X,
|
||||
NumRows);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
}
|
||||
else
|
||||
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
|
||||
{
|
||||
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
|
||||
|
|
|
@ -702,14 +702,14 @@ void Msg_RecMsgFromUsr (void)
|
|||
NumRecipients > Cfg_MAX_RECIPIENTS)
|
||||
{
|
||||
/* 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;
|
||||
}
|
||||
}
|
||||
else // No recipients selected
|
||||
{
|
||||
/* 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;
|
||||
}
|
||||
|
||||
|
@ -757,7 +757,7 @@ void Msg_RecMsgFromUsr (void)
|
|||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_message_not_sent_to_X,
|
||||
UsrDstData.FullName);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Ale_WARNING,Gbl.Alert.Txt);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -796,7 +796,7 @@ void Msg_RecMsgFromUsr (void)
|
|||
NotifyByEmail ? Txt_message_sent_to_X_notified_by_email :
|
||||
Txt_message_sent_to_X_not_notified_by_email,
|
||||
UsrDstData.FullName);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
|
||||
/***** Increment number of recipients *****/
|
||||
if (NotifyByEmail)
|
||||
|
@ -806,7 +806,7 @@ void Msg_RecMsgFromUsr (void)
|
|||
}
|
||||
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++;
|
||||
}
|
||||
}
|
||||
|
@ -830,17 +830,17 @@ void Msg_RecMsgFromUsr (void)
|
|||
if (NumRecipients)
|
||||
{
|
||||
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
|
||||
{
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_message_has_been_sent_to_X_recipients,
|
||||
(unsigned) NumRecipients);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
}
|
||||
}
|
||||
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 *****/
|
||||
if (NumErrors > 1)
|
||||
|
@ -848,7 +848,7 @@ void Msg_RecMsgFromUsr (void)
|
|||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_There_have_been_X_errors_in_sending_the_message,
|
||||
(unsigned) NumErrors);
|
||||
Ale_ShowAlert (Ale_ERROR,Gbl.Alert.Txt);
|
||||
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;
|
||||
|
||||
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
|
||||
{
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_X_messages_have_been_deleted,
|
||||
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 sent message */
|
||||
Msg_MoveSentMsgToDeleted (MsgCod);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Txt_Message_deleted);
|
||||
Ale_ShowA_old (Ale_SUCCESS,Txt_Message_deleted);
|
||||
|
||||
/* Show the remaining messages */
|
||||
Msg_ShowSntMsgs ();
|
||||
|
@ -1137,7 +1137,7 @@ void Msg_DelRecMsg (void)
|
|||
/***** Delete the message *****/
|
||||
/* Delete the received message */
|
||||
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 */
|
||||
Msg_ShowRecMsgs ();
|
||||
|
@ -3721,7 +3721,7 @@ void Msg_BanSenderWhenShowingMsgs (void)
|
|||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_From_this_time_you_will_not_receive_messages_from_X,
|
||||
Gbl.Usrs.Other.UsrDat.FullName);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
|
||||
/**** Show received messages again */
|
||||
Msg_ShowRecMsgs ();
|
||||
|
@ -3778,7 +3778,7 @@ static void Msg_UnbanSender (void)
|
|||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_From_this_time_you_can_receive_messages_from_X,
|
||||
Gbl.Usrs.Other.UsrDat.FullName);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -3836,7 +3836,7 @@ void Msg_ListBannedUsrs (void)
|
|||
Gbl.Usrs.Me.UsrDat.UsrCod);
|
||||
|
||||
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
|
||||
{
|
||||
/***** Initialize structure with user's data *****/
|
||||
|
|
|
@ -254,11 +254,11 @@ static void Nck_ShowFormChangeUsrNickname (const struct UsrData *UsrDat,bool Its
|
|||
|
||||
/***** Show possible alert *****/
|
||||
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 *****/
|
||||
if (IMustFillNickname)
|
||||
Ale_ShowAlert (Ale_WARNING,
|
||||
Ale_ShowA_old (Ale_WARNING,
|
||||
Txt_Before_going_to_any_other_option_you_must_fill_your_nickname);
|
||||
|
||||
/***** Start table *****/
|
||||
|
@ -488,10 +488,10 @@ void Nck_RemoveOtherUsrNick (void)
|
|||
Acc_ShowFormChgOtherUsrAccount ();
|
||||
}
|
||||
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
|
||||
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 ();
|
||||
}
|
||||
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
|
||||
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_);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
|
@ -101,7 +101,7 @@ void Not_ShowFormNotice (void)
|
|||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_notice_will_appear_as_a_yellow_note_,
|
||||
Gbl.CurrentCrs.Crs.FullName);
|
||||
Ale_ShowAlert (Ale_INFO,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Ale_INFO,Gbl.Alert.Txt);
|
||||
|
||||
/***** Start form *****/
|
||||
Frm_StartForm (ActRcvNot);
|
||||
|
@ -148,7 +148,7 @@ void Not_ReceiveNotice (void)
|
|||
RSS_UpdateRSSFileForACrs (&Gbl.CurrentCrs.Crs);
|
||||
|
||||
/***** 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 *****/
|
||||
if ((NumUsrsToBeNotifiedByEMail = Ntf_StoreNotifyEventsToAllUsrs (Ntf_EVENT_NOTICE,NotCod)))
|
||||
|
@ -198,7 +198,7 @@ void Not_ListNoticesAfterRemoval (void)
|
|||
extern const char *Txt_Notice_removed;
|
||||
|
||||
/***** Message of success *****/
|
||||
Ale_ShowAlert (Ale_SUCCESS,Txt_Notice_removed);
|
||||
Ale_ShowA_old (Ale_SUCCESS,Txt_Notice_removed);
|
||||
|
||||
/***** List remaining notices *****/
|
||||
Not_ListFullNotices ();
|
||||
|
@ -404,7 +404,7 @@ void Not_ShowNotices (Not_Listing_t TypeNoticesListing)
|
|||
Not_PutIconsListNotices,
|
||||
Hlp_MESSAGES_Notices,Box_NOT_CLOSABLE);
|
||||
if (!NumNotices)
|
||||
Ale_ShowAlert (Ale_INFO,Txt_No_notices);
|
||||
Ale_ShowA_old (Ale_INFO,Txt_No_notices);
|
||||
}
|
||||
|
||||
/***** Show the notices *****/
|
||||
|
|
|
@ -627,7 +627,7 @@ void Ntf_ShowMyNotifications (void)
|
|||
Usr_UsrDataDestructor (&UsrDat);
|
||||
}
|
||||
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);
|
||||
|
||||
/***** End box *****/
|
||||
|
@ -2040,7 +2040,7 @@ void Ntf_ChangeNotifyEvents (void)
|
|||
Gbl.Usrs.Me.UsrDat.UsrCod);
|
||||
|
||||
/***** 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);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
|
@ -201,10 +201,10 @@ void Pwd_UpdateOtherUsrPwd (void)
|
|||
/***** Check and update password *****/
|
||||
Pwd_CheckAndUpdateNewPwd (&Gbl.Usrs.Other.UsrDat);
|
||||
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
|
||||
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);
|
||||
|
||||
/***** 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 *****/
|
||||
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 *****/
|
||||
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 ();
|
||||
return;
|
||||
}
|
||||
|
@ -392,7 +392,7 @@ void Pwd_ChkIdLoginAndSendNewPwd (void)
|
|||
{
|
||||
case 0: // Message sent successfully
|
||||
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;
|
||||
case 1:
|
||||
Lay_ShowErrorAndExit (Txt_There_was_a_problem_sending_an_email_automatically);
|
||||
|
@ -411,7 +411,7 @@ void Pwd_ChkIdLoginAndSendNewPwd (void)
|
|||
Usr_FreeListUsrCods (&ListUsrCods);
|
||||
|
||||
/***** 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 *****/
|
||||
Usr_WriteLandingPage ();
|
||||
|
@ -692,16 +692,16 @@ void Pwd_ShowFormChgMyPwd (void)
|
|||
|
||||
/***** Show possible alert *****/
|
||||
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 *****/
|
||||
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);
|
||||
else if (Gbl.Usrs.Me.LoginPlainPassword[0])
|
||||
{
|
||||
if (!Pwd_FastCheckIfPasswordSeemsGood (Gbl.Usrs.Me.LoginPlainPassword))
|
||||
Ale_ShowAlert (Ale_WARNING,
|
||||
Ale_ShowA_old (Ale_WARNING,
|
||||
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_,
|
||||
Pwd_MIN_CHARS_PLAIN_PASSWORD) < 0)
|
||||
Lay_NotEnoughMemoryExit ();
|
||||
Ale_ShowAlert (Ale_INFO,Txt);
|
||||
Ale_ShowA_old (Ale_INFO,Txt);
|
||||
free ((void *) Txt);
|
||||
fprintf (Gbl.F.Out,"</td>"
|
||||
"</tr>");
|
||||
|
@ -861,7 +861,7 @@ void Pwd_ShowFormChgOtherUsrPwd (void)
|
|||
|
||||
/***** Show possible alert *****/
|
||||
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 *****/
|
||||
/* Start form */
|
||||
|
@ -942,7 +942,7 @@ bool Pwd_GetConfirmationOnDangerousAction (void)
|
|||
/***** Get if consent has been done *****/
|
||||
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;
|
||||
}
|
||||
|
||||
|
@ -956,7 +956,7 @@ bool Pwd_GetConfirmationOnDangerousAction (void)
|
|||
/* Compare passwords */
|
||||
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;
|
||||
}
|
||||
|
||||
|
|
24
swad_photo.c
24
swad_photo.c
|
@ -331,7 +331,7 @@ static void Pho_ReqPhoto (const struct UsrData *UsrDat)
|
|||
}
|
||||
|
||||
/***** 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 *****/
|
||||
fprintf (Gbl.F.Out,"<label class=\"%s\">"
|
||||
|
@ -375,10 +375,10 @@ void Pho_SendPhotoUsr (void)
|
|||
Pho_ReqOtherUsrPhoto ();
|
||||
}
|
||||
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
|
||||
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 ();
|
||||
}
|
||||
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);
|
||||
}
|
||||
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 *****/
|
||||
Rec_ShowMySharedRecordAndMore ();
|
||||
|
@ -529,13 +529,13 @@ void Pho_ReqRemoveUsrPhoto (void)
|
|||
Btn_REMOVE_BUTTON,Txt_Remove_photo);
|
||||
}
|
||||
else
|
||||
Ale_ShowAlert (Ale_INFO,Txt_The_photo_no_longer_exists);
|
||||
Ale_ShowA_old (Ale_INFO,Txt_The_photo_no_longer_exists);
|
||||
}
|
||||
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
|
||||
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 *****/
|
||||
Rec_ShowPublicSharedRecordOtherUsr ();
|
||||
|
@ -560,7 +560,7 @@ void Pho_RemoveUsrPhoto (void)
|
|||
Ale_ShowPendingAlert ();
|
||||
}
|
||||
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 *****/
|
||||
Rec_ShowPublicSharedRecordOtherUsr ();
|
||||
|
@ -652,7 +652,7 @@ static bool Pho_ReceivePhotoAndDetectFaces (bool ItsMe,const struct UsrData *Usr
|
|||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_file_is_not_X,
|
||||
"jpg");
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Ale_WARNING,Gbl.Alert.Txt);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -663,7 +663,7 @@ static bool Pho_ReceivePhotoAndDetectFaces (bool ItsMe,const struct UsrData *Usr
|
|||
Cfg_FOLDER_PHOTO_TMP,Gbl.UniqueNameEncrypted);
|
||||
if (!Fil_EndReceptionOfFile (FileNamePhotoTmp,Param))
|
||||
{
|
||||
Ale_ShowAlert (Ale_WARNING,"Error copying file.");
|
||||
Ale_ShowA_old (Ale_WARNING,"Error copying file.");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -881,7 +881,7 @@ void Pho_UpdateUsrPhoto1 (void)
|
|||
if (Usr_GetParamOtherUsrCodEncryptedAndGetUsrData ())
|
||||
Pho_UpdatePhoto1 (&Gbl.Usrs.Other.UsrDat);
|
||||
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)
|
||||
|
|
20
swad_place.c
20
swad_place.c
|
@ -601,7 +601,7 @@ void Plc_RemovePlace (void)
|
|||
|
||||
/***** Check if this place has centres *****/
|
||||
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
|
||||
{
|
||||
/***** Remove place *****/
|
||||
|
@ -613,7 +613,7 @@ void Plc_RemovePlace (void)
|
|||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_Place_X_removed,
|
||||
Plc.FullName);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
}
|
||||
|
||||
/***** Show the form again *****/
|
||||
|
@ -689,7 +689,7 @@ static void Plc_RenamePlace (Cns_ShrtOrFullName_t ShrtOrFullName)
|
|||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_You_can_not_leave_the_name_of_the_place_X_empty,
|
||||
CurrentPlcName);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Ale_WARNING,Gbl.Alert.Txt);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -703,7 +703,7 @@ static void Plc_RenamePlace (Cns_ShrtOrFullName_t ShrtOrFullName)
|
|||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_place_X_already_exists,
|
||||
NewPlcName);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Ale_WARNING,Gbl.Alert.Txt);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -714,7 +714,7 @@ static void Plc_RenamePlace (Cns_ShrtOrFullName_t ShrtOrFullName)
|
|||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_place_X_has_been_renamed_as_Y,
|
||||
CurrentPlcName,NewPlcName);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
}
|
||||
}
|
||||
else // The same name
|
||||
|
@ -722,7 +722,7 @@ static void Plc_RenamePlace (Cns_ShrtOrFullName_t ShrtOrFullName)
|
|||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_name_of_the_place_X_has_not_changed,
|
||||
CurrentPlcName);
|
||||
Ale_ShowAlert (Ale_INFO,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Ale_INFO,Gbl.Alert.Txt);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -880,20 +880,20 @@ void Plc_RecFormNewPlace (void)
|
|||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_place_X_already_exists,
|
||||
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))
|
||||
{
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_place_X_already_exists,
|
||||
Plc->FullName);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Ale_WARNING,Gbl.Alert.Txt);
|
||||
}
|
||||
else // Add new place to database
|
||||
Plc_CreatePlace (Plc);
|
||||
}
|
||||
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 *****/
|
||||
Plc_EditPlaces ();
|
||||
|
@ -919,5 +919,5 @@ static void Plc_CreatePlace (struct Place *Plc)
|
|||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_Created_new_place_X,
|
||||
Plc->FullName);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
}
|
||||
|
|
|
@ -86,7 +86,7 @@ void Plg_ListPlugins (void)
|
|||
|
||||
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;
|
||||
}
|
||||
|
||||
|
@ -505,7 +505,7 @@ void Plg_RemovePlugin (void)
|
|||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_Plugin_X_removed,
|
||||
Plg.Name);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
|
||||
/***** Show the form again *****/
|
||||
Plg_EditPlugins ();
|
||||
|
@ -543,7 +543,7 @@ void Plg_RenamePlugin (void)
|
|||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_You_can_not_leave_the_name_of_the_plugin_X_empty,
|
||||
Plg->Name);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Ale_WARNING,Gbl.Alert.Txt);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -557,7 +557,7 @@ void Plg_RenamePlugin (void)
|
|||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_plugin_X_already_exists,
|
||||
NewPlgName);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Ale_WARNING,Gbl.Alert.Txt);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -570,7 +570,7 @@ void Plg_RenamePlugin (void)
|
|||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_plugin_X_has_been_renamed_as_Y,
|
||||
Plg->Name,NewPlgName);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
}
|
||||
}
|
||||
else // The same name
|
||||
|
@ -578,7 +578,7 @@ void Plg_RenamePlugin (void)
|
|||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_name_of_the_plugin_X_has_not_changed,
|
||||
Plg->Name);
|
||||
Ale_ShowAlert (Ale_INFO,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Ale_INFO,Gbl.Alert.Txt);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -635,10 +635,10 @@ void Plg_ChangePlgDescription (void)
|
|||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_new_description_is_X,
|
||||
NewDescription);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
}
|
||||
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 *****/
|
||||
Str_Copy (Plg->Description,NewDescription,
|
||||
|
@ -679,10 +679,10 @@ void Plg_ChangePlgLogo (void)
|
|||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_new_logo_is_X,
|
||||
NewLogo);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
}
|
||||
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 *****/
|
||||
Str_Copy (Plg->Logo,NewLogo,
|
||||
|
@ -723,10 +723,10 @@ void Plg_ChangePlgAppKey (void)
|
|||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_new_logo_is_X, // TODO!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
NewAppKey);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
}
|
||||
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 *****/
|
||||
Str_Copy (Plg->AppKey,NewAppKey,
|
||||
|
@ -767,10 +767,10 @@ void Plg_ChangePlgURL (void)
|
|||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_new_URL_is_X,
|
||||
NewURL);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
}
|
||||
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 *****/
|
||||
Str_Copy (Plg->URL,NewURL,
|
||||
|
@ -811,10 +811,10 @@ void Plg_ChangePlgIP (void)
|
|||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_new_IP_address_is_X,
|
||||
NewIP);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
}
|
||||
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 *****/
|
||||
Str_Copy (Plg->IP,NewIP,
|
||||
|
@ -1021,16 +1021,16 @@ void Plg_RecFormNewPlg (void)
|
|||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_plugin_X_already_exists,
|
||||
Plg->Name);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Ale_WARNING,Gbl.Alert.Txt);
|
||||
}
|
||||
else // Add new plugin to database
|
||||
Plg_CreatePlugin (Plg);
|
||||
}
|
||||
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
|
||||
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 *****/
|
||||
Plg_EditPlugins ();
|
||||
|
@ -1059,7 +1059,7 @@ static void Plg_CreatePlugin (struct Plugin *Plg)
|
|||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_Created_new_plugin_X,
|
||||
Plg->Name);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
|
@ -91,7 +91,7 @@ void Pri_EditMyPrivacy (void)
|
|||
/***** If any of my preferences about privacy is unknown *****/
|
||||
if (Gbl.Usrs.Me.UsrDat.PhotoVisibility == 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 *****/
|
||||
Box_StartBoxTable (NULL,Txt_Privacy,Pri_PutIconsPrivacy,
|
||||
|
|
|
@ -238,7 +238,7 @@ void Prf_GetUsrDatAndShowUserProfile (void)
|
|||
if (!ProfileShown)
|
||||
{
|
||||
/* 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 */
|
||||
Prf_RequestUserProfile ();
|
||||
|
|
|
@ -235,7 +235,7 @@ void Prj_ShowTableAllProjects (void)
|
|||
Prj_FreeMemProject (&Prj);
|
||||
}
|
||||
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);
|
||||
}
|
||||
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 *****/
|
||||
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,
|
||||
Gbl.Usrs.Other.UsrDat.FullName,
|
||||
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 *****/
|
||||
Usr_FreeListUsrCods (&ListUsrCods);
|
||||
}
|
||||
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 *****/
|
||||
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);
|
||||
}
|
||||
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
|
||||
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 *****/
|
||||
Prj_FreeMemProject (&Prj);
|
||||
|
@ -2134,13 +2134,13 @@ static void Prj_RemUsrFromPrj (Prj_RoleInProject_t RoleInProject)
|
|||
Gbl.Usrs.Other.UsrDat.FullName,
|
||||
Txt_PROJECT_ROLES_SINGUL_abc[RoleInProject],
|
||||
Prj.Title);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
}
|
||||
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
|
||||
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 *****/
|
||||
Prj_FreeMemProject (&Prj);
|
||||
|
@ -2692,7 +2692,7 @@ void Prj_ReqRemProject (void)
|
|||
Btn_REMOVE_BUTTON,Txt_Remove_project);
|
||||
}
|
||||
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 *****/
|
||||
Prj_FreeMemProject (&Prj);
|
||||
|
@ -2754,10 +2754,10 @@ void Prj_RemoveProject (void)
|
|||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_Project_X_removed,
|
||||
Prj.Title);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
}
|
||||
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 *****/
|
||||
Prj_FreeMemProject (&Prj);
|
||||
|
@ -2798,10 +2798,10 @@ void Prj_HideProject (void)
|
|||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_Project_X_is_now_hidden,
|
||||
Prj.Title);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
}
|
||||
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 *****/
|
||||
Prj_FreeMemProject (&Prj);
|
||||
|
@ -2842,10 +2842,10 @@ void Prj_ShowProject (void)
|
|||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_Project_X_is_now_visible,
|
||||
Prj.Title);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
}
|
||||
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 *****/
|
||||
Prj_FreeMemProject (&Prj);
|
||||
|
@ -3248,7 +3248,7 @@ void Prj_RecFormProject (void)
|
|||
if (!Prj.Title[0]) // If there is not a project title
|
||||
{
|
||||
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 *****/
|
||||
|
@ -3263,7 +3263,7 @@ void Prj_RecFormProject (void)
|
|||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_Created_new_project_X,
|
||||
Prj.Title);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
}
|
||||
else if (NewProjectIsCorrect)
|
||||
{
|
||||
|
@ -3271,7 +3271,7 @@ void Prj_RecFormProject (void)
|
|||
Prj_UpdateProject (&Prj);
|
||||
|
||||
/* 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
|
||||
|
@ -3281,7 +3281,7 @@ void Prj_RecFormProject (void)
|
|||
Prj_RequestCreatOrEditPrj (Prj.PrjCod);
|
||||
}
|
||||
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 *****/
|
||||
Prj_FreeMemProject (&Prj);
|
||||
|
|
|
@ -210,7 +210,7 @@ void Rec_ReqEditRecordFields (void)
|
|||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_There_are_no_record_fields_in_the_course_X,
|
||||
Gbl.CurrentCrs.Crs.FullName);
|
||||
Ale_ShowAlert (Ale_INFO,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Ale_INFO,Gbl.Alert.Txt);
|
||||
}
|
||||
|
||||
/***** 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),
|
||||
Txt_The_record_field_X_already_exists,
|
||||
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
|
||||
Rec_CreateRecordField ();
|
||||
}
|
||||
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 *****/
|
||||
Rec_ReqEditRecordFields ();
|
||||
|
@ -594,7 +594,7 @@ void Rec_CreateRecordField (void)
|
|||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_Created_new_record_field_X,
|
||||
Gbl.CurrentCrs.Records.Field.Name);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -710,7 +710,7 @@ void Rec_RemoveFieldFromDB (void)
|
|||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_Record_field_X_removed,
|
||||
Gbl.CurrentCrs.Records.Field.Name);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
|
||||
/***** Show the form again *****/
|
||||
Rec_ReqEditRecordFields ();
|
||||
|
@ -817,7 +817,7 @@ void Rec_RenameField (void)
|
|||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_You_can_not_leave_the_name_of_the_field_X_empty,
|
||||
Gbl.CurrentCrs.Records.Field.Name);
|
||||
Ale_ShowAlert (Ale_ERROR,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Ale_ERROR,Gbl.Alert.Txt);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -831,7 +831,7 @@ void Rec_RenameField (void)
|
|||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_record_field_X_already_exists,
|
||||
NewFieldName);
|
||||
Ale_ShowAlert (Ale_ERROR,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Ale_ERROR,Gbl.Alert.Txt);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -845,7 +845,7 @@ void Rec_RenameField (void)
|
|||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_record_field_X_has_been_renamed_as_Y,
|
||||
Gbl.CurrentCrs.Records.Field.Name,NewFieldName);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
}
|
||||
}
|
||||
else // The same name
|
||||
|
@ -853,7 +853,7 @@ void Rec_RenameField (void)
|
|||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_name_of_the_field_X_has_not_changed,
|
||||
NewFieldName);
|
||||
Ale_ShowAlert (Ale_INFO,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Ale_INFO,Gbl.Alert.Txt);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -895,7 +895,7 @@ void Rec_ChangeLinesField (void)
|
|||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_number_of_editing_lines_in_the_record_field_X_has_not_changed,
|
||||
Gbl.CurrentCrs.Records.Field.Name);
|
||||
Ale_ShowAlert (Ale_INFO,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Ale_INFO,Gbl.Alert.Txt);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -909,7 +909,7 @@ void Rec_ChangeLinesField (void)
|
|||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_From_now_on_the_number_of_editing_lines_of_the_field_X_is_Y,
|
||||
Gbl.CurrentCrs.Records.Field.Name,NewNumLines);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
}
|
||||
|
||||
/***** Show the form again *****/
|
||||
|
@ -949,7 +949,7 @@ void Rec_ChangeVisibilityField (void)
|
|||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_visibility_of_the_record_field_X_has_not_changed,
|
||||
Gbl.CurrentCrs.Records.Field.Name);
|
||||
Ale_ShowAlert (Ale_INFO,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Ale_INFO,Gbl.Alert.Txt);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -964,7 +964,7 @@ void Rec_ChangeVisibilityField (void)
|
|||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_RECORD_FIELD_VISIBILITY_MSG[NewVisibility],
|
||||
Gbl.CurrentCrs.Records.Field.Name);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
}
|
||||
|
||||
/***** Show the form again *****/
|
||||
|
@ -1038,7 +1038,7 @@ static void Rec_ListRecordsGsts (Rec_SharedRecordViewType_t TypeOfView)
|
|||
/* Check the number of students to show */
|
||||
if (!Usr_CountNumUsrsInListOfSelectedUsrs ()) // If no students selected...
|
||||
{ // ...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
|
||||
return;
|
||||
}
|
||||
|
@ -1236,7 +1236,7 @@ static void Rec_ListRecordsStds (Rec_SharedRecordViewType_t ShaTypeOfView,
|
|||
/* Check the number of students to show */
|
||||
if (!Usr_CountNumUsrsInListOfSelectedUsrs ()) // If no students selected...
|
||||
{ // ...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
|
||||
return;
|
||||
}
|
||||
|
@ -1460,7 +1460,7 @@ static void Rec_ListRecordsTchs (Rec_SharedRecordViewType_t TypeOfView)
|
|||
/* Check the number of teachers to show */
|
||||
if (!Usr_CountNumUsrsInListOfSelectedUsrs ()) // If no teachers selected...
|
||||
{ // ...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
|
||||
return;
|
||||
}
|
||||
|
@ -2063,7 +2063,7 @@ static void Rec_ShowMyCrsRecordUpdated (void)
|
|||
extern const char *Txt_Your_record_card_in_this_course_has_been_updated;
|
||||
|
||||
/***** 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 *****/
|
||||
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;
|
||||
|
||||
/***** 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 *****/
|
||||
Rec_ShowMySharedRecordAndMore ();
|
||||
|
@ -3964,27 +3964,27 @@ void Rec_ShowMySharedRecordAndMore (void)
|
|||
/***** If user has no name and surname, sex... *****/
|
||||
if (!Gbl.Usrs.Me.UsrDat.FirstName[0] ||
|
||||
!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);
|
||||
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);
|
||||
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);
|
||||
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);
|
||||
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);
|
||||
else if (IAmATeacher)
|
||||
{
|
||||
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);
|
||||
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);
|
||||
}
|
||||
|
||||
|
|
|
@ -440,7 +440,7 @@ static void Sch_SearchInDB (void)
|
|||
}
|
||||
|
||||
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
|
||||
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;
|
||||
}
|
||||
|
||||
|
|
|
@ -1125,7 +1125,7 @@ static void Soc_ShowWarningYouDontFollowAnyUser (void)
|
|||
if (!Fol_GetNumFollowing (Gbl.Usrs.Me.UsrDat.UsrCod))
|
||||
{
|
||||
/***** 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 *****/
|
||||
fprintf (Gbl.F.Out,"<div class=\"CONTEXT_MENU\">");
|
||||
|
@ -1331,7 +1331,7 @@ static void Soc_WriteSocialNote (const struct SocialNote *SocNot,
|
|||
if (SocNot->NotCod <= 0 ||
|
||||
SocNot->NoteType == Soc_NOTE_UNKNOWN ||
|
||||
SocNot->UsrCod <= 0)
|
||||
Ale_ShowAlert (Ale_ERROR,"Error in social note.");
|
||||
Ale_ShowA_old (Ale_ERROR,"Error in social note.");
|
||||
else
|
||||
{
|
||||
/***** Initialize location in hierarchy *****/
|
||||
|
@ -2571,7 +2571,7 @@ static void Soc_WriteSocialComment (struct SocialComment *SocCom,
|
|||
if (SocCom->PubCod <= 0 ||
|
||||
SocCom->NotCod <= 0 ||
|
||||
SocCom->UsrCod <= 0)
|
||||
Ale_ShowAlert (Ale_ERROR,"Error in social comment.");
|
||||
Ale_ShowA_old (Ale_ERROR,"Error in social comment.");
|
||||
else
|
||||
{
|
||||
/***** Get author's data *****/
|
||||
|
@ -3004,7 +3004,7 @@ static long Soc_ReceiveComment (void)
|
|||
Img_ImageDestructor (&Image);
|
||||
}
|
||||
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;
|
||||
}
|
||||
|
@ -3083,7 +3083,7 @@ static long Soc_ShareSocialNote (void)
|
|||
}
|
||||
}
|
||||
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;
|
||||
}
|
||||
|
@ -3169,7 +3169,7 @@ static long Soc_FavSocialNote (void)
|
|||
}
|
||||
}
|
||||
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;
|
||||
}
|
||||
|
@ -3255,7 +3255,7 @@ static long Soc_FavSocialComment (void)
|
|||
}
|
||||
}
|
||||
else
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_The_comment_no_longer_exists);
|
||||
Ale_ShowA_old (Ale_WARNING,Txt_The_comment_no_longer_exists);
|
||||
|
||||
/***** Free image *****/
|
||||
Img_ImageDestructor (&SocCom.Image);
|
||||
|
@ -3381,7 +3381,7 @@ static long Soc_UnshareSocialNote (void)
|
|||
}
|
||||
}
|
||||
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;
|
||||
}
|
||||
|
@ -3465,7 +3465,7 @@ static long Soc_UnfavSocialNote (void)
|
|||
}
|
||||
}
|
||||
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;
|
||||
}
|
||||
|
@ -3549,7 +3549,7 @@ static long Soc_UnfavSocialComment (void)
|
|||
}
|
||||
}
|
||||
else
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_The_comment_no_longer_exists);
|
||||
Ale_ShowA_old (Ale_WARNING,Txt_The_comment_no_longer_exists);
|
||||
|
||||
/***** Free image *****/
|
||||
Img_ImageDestructor (&SocCom.Image);
|
||||
|
@ -3630,7 +3630,7 @@ static void Soc_RequestRemovalSocialNote (void)
|
|||
}
|
||||
}
|
||||
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);
|
||||
|
||||
/***** Message of success *****/
|
||||
Ale_ShowAlert (Ale_SUCCESS,Txt_Post_removed);
|
||||
Ale_ShowA_old (Ale_SUCCESS,Txt_Post_removed);
|
||||
}
|
||||
}
|
||||
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
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_The_comment_no_longer_exists);
|
||||
Ale_ShowA_old (Ale_WARNING,Txt_The_comment_no_longer_exists);
|
||||
|
||||
/***** Free image *****/
|
||||
Img_ImageDestructor (&SocCom.Image);
|
||||
|
@ -4043,11 +4043,11 @@ static void Soc_RemoveSocialComment (void)
|
|||
Soc_RemoveASocialCommentFromDB (&SocCom);
|
||||
|
||||
/***** Message of success *****/
|
||||
Ale_ShowAlert (Ale_SUCCESS,Txt_Comment_removed);
|
||||
Ale_ShowA_old (Ale_SUCCESS,Txt_Comment_removed);
|
||||
}
|
||||
}
|
||||
else
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_The_comment_no_longer_exists);
|
||||
Ale_ShowA_old (Ale_WARNING,Txt_The_comment_no_longer_exists);
|
||||
|
||||
/***** Free image *****/
|
||||
Img_ImageDestructor (&SocCom.Image);
|
||||
|
|
|
@ -478,7 +478,7 @@ void Sta_AskShowCrsHits (void)
|
|||
}
|
||||
}
|
||||
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 *****/
|
||||
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
|
||||
{
|
||||
/* 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;
|
||||
}
|
||||
break;
|
||||
|
@ -900,7 +900,7 @@ static void Sta_ShowHits (Sta_GlobalOrCourseAccesses_t GlobalOrCourse)
|
|||
if (!Usr_CountNumUsrsInListOfSelectedUsrs ()) // Error: there are no users selected
|
||||
{
|
||||
/* 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 ();
|
||||
return;
|
||||
}
|
||||
|
@ -926,7 +926,7 @@ static void Sta_ShowHits (Sta_GlobalOrCourseAccesses_t GlobalOrCourse)
|
|||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_date_range_must_be_less_than_or_equal_to_X_days,
|
||||
Cfg_DAYS_IN_RECENT_LOG);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt); // ...write warning message and show the form again
|
||||
Ale_ShowA_old (Ale_WARNING,Gbl.Alert.Txt); // ...write warning message and show the form again
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1388,7 +1388,7 @@ static void Sta_ShowHits (Sta_GlobalOrCourseAccesses_t GlobalOrCourse)
|
|||
|
||||
/***** Count the number of rows in result *****/
|
||||
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
|
||||
{
|
||||
/***** Put the table with the clicks *****/
|
||||
|
|
|
@ -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 (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!!!!!!!
|
||||
if (!setlocale (LC_NUMERIC,"es_ES.utf8")) // Return to local system
|
||||
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 ********/
|
||||
/*****************************************************************************/
|
||||
// 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
|
||||
|
||||
bool Str_ConvertFilFolLnkNameToValid (char *FileName)
|
||||
|
@ -2797,13 +2797,13 @@ bool Str_ConvertFilFolLnkNameToValid (char *FileName)
|
|||
if (NumAlfanum)
|
||||
FileNameIsOK = true;
|
||||
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 :
|
||||
Txt_UPLOAD_FILE_X_invalid_name,
|
||||
FileName);
|
||||
}
|
||||
else // FileName is empty
|
||||
Str_Copy (Gbl.Alert.Txt,
|
||||
Str_Copy (Gbl.AlertToShowLater.Txt,
|
||||
Gbl.FileBrowser.UploadingWithDropzone ? Txt_UPLOAD_FILE_Invalid_name_NO_HTML :
|
||||
Txt_UPLOAD_FILE_Invalid_name,
|
||||
Ale_MAX_BYTES_ALERT);
|
||||
|
|
|
@ -279,7 +279,7 @@ static void Svy_ListAllSurveys (struct SurveyQuestion *SvyQst)
|
|||
Tbl_EndTable ();
|
||||
}
|
||||
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 *****/
|
||||
if (Svy_CheckIfICanCreateSvy ())
|
||||
|
@ -1582,7 +1582,7 @@ void Svy_RemoveSurvey (void)
|
|||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_Survey_X_removed,
|
||||
Svy.Title);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
|
||||
/***** Show surveys again *****/
|
||||
Svy_ListAllSurveys (&SvyQst);
|
||||
|
@ -1619,7 +1619,7 @@ void Svy_AskResetSurvey (void)
|
|||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_Do_you_really_want_to_reset_the_survey_X,
|
||||
Svy.Title);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Ale_WARNING,Gbl.Alert.Txt);
|
||||
|
||||
/***** Button of confirmation of reset *****/
|
||||
Gbl.Svys.SvyCodToEdit = Svy.SvyCod;
|
||||
|
@ -1681,7 +1681,7 @@ void Svy_ResetSurvey (void)
|
|||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_Survey_X_reset,
|
||||
Svy.Title);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
|
||||
/***** Show surveys again *****/
|
||||
Svy_ListAllSurveys (&SvyQst);
|
||||
|
@ -1718,7 +1718,7 @@ void Svy_HideSurvey (void)
|
|||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_Survey_X_is_now_hidden,
|
||||
Svy.Title);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
|
||||
/***** Show surveys again *****/
|
||||
Svy_ListAllSurveys (&SvyQst);
|
||||
|
@ -1755,7 +1755,7 @@ void Svy_UnhideSurvey (void)
|
|||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_Survey_X_is_now_visible,
|
||||
Svy.Title);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
|
||||
/***** Show surveys again *****/
|
||||
Svy_ListAllSurveys (&SvyQst);
|
||||
|
@ -2207,13 +2207,13 @@ void Svy_RecFormSurvey (void)
|
|||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_Already_existed_a_survey_with_the_title_X,
|
||||
NewSvy.Title);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Ale_WARNING,Gbl.Alert.Txt);
|
||||
}
|
||||
}
|
||||
else // If there is not a survey title
|
||||
{
|
||||
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 *****/
|
||||
|
@ -2290,7 +2290,7 @@ static void Svy_CreateSurvey (struct Survey *Svy,const char *Txt)
|
|||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_Created_new_survey_X,
|
||||
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);
|
||||
|
||||
/***** 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 *****/
|
||||
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;
|
||||
}
|
||||
|
@ -3002,7 +3002,7 @@ void Svy_ReceiveQst (void)
|
|||
{
|
||||
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;
|
||||
}
|
||||
else
|
||||
|
@ -3014,20 +3014,20 @@ void Svy_ReceiveQst (void)
|
|||
{
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
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;
|
||||
}
|
||||
}
|
||||
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;
|
||||
}
|
||||
|
||||
|
@ -3090,7 +3090,7 @@ void Svy_ReceiveQst (void)
|
|||
}
|
||||
|
||||
/***** 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 *****/
|
||||
|
@ -3299,7 +3299,7 @@ static void Svy_ListSvyQuestions (struct Survey *Svy,
|
|||
}
|
||||
}
|
||||
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
|
||||
(!NumQsts || // This survey has no questions
|
||||
|
@ -3621,7 +3621,7 @@ void Svy_RemoveQst (void)
|
|||
SvyCod,SvyQst.QstInd);
|
||||
|
||||
/***** Write message *****/
|
||||
Ale_ShowAlert (Ale_SUCCESS,Txt_Question_removed);
|
||||
Ale_ShowA_old (Ale_SUCCESS,Txt_Question_removed);
|
||||
|
||||
/***** Show current survey *****/
|
||||
Svy_ShowOneSurvey (SvyCod,&SvyQst,true);
|
||||
|
@ -3650,12 +3650,12 @@ void Svy_ReceiveSurveyAnswers (void)
|
|||
|
||||
/***** Check if I have no answered this survey formerly *****/
|
||||
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
|
||||
{
|
||||
/***** Receive and store user's answers *****/
|
||||
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 *****/
|
||||
|
|
78
swad_test.c
78
swad_test.c
|
@ -389,7 +389,7 @@ void Tst_ShowFormAskTst (void)
|
|||
else
|
||||
{
|
||||
/***** 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 *****/
|
||||
if (Tst_CheckIfICanEditTests ())
|
||||
|
@ -445,7 +445,7 @@ void Tst_ShowNewTest (void)
|
|||
/***** Get questions *****/
|
||||
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
|
||||
}
|
||||
else
|
||||
|
@ -593,13 +593,13 @@ void Tst_AssessTest (void)
|
|||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_test_X_has_already_been_assessed_previously,
|
||||
NumTst);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Ale_WARNING,Gbl.Alert.Txt);
|
||||
break;
|
||||
case Tst_STATUS_ERROR:
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_There_was_an_error_in_assessing_the_test_X,
|
||||
NumTst);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Ale_WARNING,Gbl.Alert.Txt);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -721,7 +721,7 @@ static bool Tst_CheckIfNextTstAllowed (void)
|
|||
Txt_You_can_not_take_a_new_test_until,
|
||||
(long) TimeNextTestUTC,
|
||||
(unsigned) Gbl.Prefs.DateFormat,Txt_Today);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Ale_WARNING,Gbl.Alert.Txt);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
@ -1344,7 +1344,7 @@ void Tst_ShowFormAskEditTsts (void)
|
|||
else // No test questions
|
||||
{
|
||||
/***** 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 *****/
|
||||
Tst_PutButtonToAddQuestion ();
|
||||
|
@ -1397,7 +1397,7 @@ void Tst_ShowFormAskSelectTstsForGame (long GamCod)
|
|||
else // No test questions
|
||||
{
|
||||
/***** 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 *****/
|
||||
Tst_PutButtonToAddQuestion ();
|
||||
|
@ -1475,7 +1475,7 @@ void Tst_ShowFormConfig (void)
|
|||
|
||||
/***** If current course has tests and pluggable is unknown... *****/
|
||||
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 *****/
|
||||
Tst_ShowFormConfigTst ();
|
||||
|
@ -1554,7 +1554,7 @@ void Tst_RenameTag (void)
|
|||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_You_can_not_leave_the_name_of_the_tag_X_empty,
|
||||
OldTagTxt);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Ale_WARNING,Gbl.Alert.Txt);
|
||||
}
|
||||
else // New tag not empty
|
||||
{
|
||||
|
@ -1567,7 +1567,7 @@ void Tst_RenameTag (void)
|
|||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_tag_X_has_not_changed,
|
||||
NewTagTxt);
|
||||
Ale_ShowAlert (Ale_INFO,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Ale_INFO,Gbl.Alert.Txt);
|
||||
}
|
||||
else // The old and the new tag
|
||||
// are not exactly the same (case sensitively).
|
||||
|
@ -1650,7 +1650,7 @@ void Tst_RenameTag (void)
|
|||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_tag_X_has_been_renamed_as_Y,
|
||||
OldTagTxt,NewTagTxt);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1855,7 +1855,7 @@ static void Tst_ShowFormEditTags (void)
|
|||
Box_EndBoxTable ();
|
||||
}
|
||||
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 */
|
||||
DB_FreeMySQLResult (&mysql_res);
|
||||
|
@ -2257,7 +2257,7 @@ void Tst_ReceiveConfigTst (void)
|
|||
Tst_FeedbackDB[Gbl.Test.Config.Feedback]);
|
||||
|
||||
/***** 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 *****/
|
||||
Tst_ShowFormConfig ();
|
||||
|
@ -2641,7 +2641,7 @@ static unsigned long Tst_GetQuestions (MYSQL_RES **mysql_res)
|
|||
Query);
|
||||
|
||||
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;
|
||||
}
|
||||
|
@ -3324,7 +3324,7 @@ unsigned Tst_GetAnswersQst (long QstCod,MYSQL_RES **mysql_res,bool Shuffle)
|
|||
Shuffle ? "RAND(NOW())" :
|
||||
"AnsInd");
|
||||
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;
|
||||
}
|
||||
|
@ -3574,7 +3574,7 @@ void Tst_WriteAnswersGameResult (struct Game *Game,unsigned NumQst,long QstCod,
|
|||
case Tst_ANS_FLOAT:
|
||||
case Tst_ANS_TRUE_FALSE:
|
||||
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;
|
||||
case Tst_ANS_UNIQUE_CHOICE:
|
||||
case Tst_ANS_MULTIPLE_CHOICE:
|
||||
|
@ -4758,7 +4758,7 @@ static bool Tst_GetParamsTst (Tst_ActionToDoWithQuestions_t ActionToDoWithQuesti
|
|||
/* Check number of tags selected */
|
||||
if (Tst_CountNumTagsInList () == 0) // If no tags selected...
|
||||
{ // ...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;
|
||||
}
|
||||
|
||||
|
@ -4776,7 +4776,7 @@ static bool Tst_GetParamsTst (Tst_ActionToDoWithQuestions_t ActionToDoWithQuesti
|
|||
/* Check number of types of answer */
|
||||
if (Tst_CountNumAnswerTypesInList () == 0) // If no types of answer selected...
|
||||
{ // ...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;
|
||||
}
|
||||
break;
|
||||
|
@ -4802,7 +4802,7 @@ static bool Tst_GetParamsTst (Tst_ActionToDoWithQuestions_t ActionToDoWithQuesti
|
|||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_number_of_questions_must_be_in_the_interval_X,
|
||||
Gbl.Test.Config.Min,Gbl.Test.Config.Max);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Ale_WARNING,Gbl.Alert.Txt);
|
||||
Error = true;
|
||||
}
|
||||
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.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;
|
||||
}
|
||||
|
||||
|
@ -6019,14 +6019,14 @@ bool Tst_CheckIfQstFormatIsCorrectAndCountNumOptions (void)
|
|||
/***** A question must have at least one tag *****/
|
||||
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;
|
||||
}
|
||||
|
||||
/***** A question must have a stem*****/
|
||||
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;
|
||||
}
|
||||
|
||||
|
@ -6036,12 +6036,12 @@ bool Tst_CheckIfQstFormatIsCorrectAndCountNumOptions (void)
|
|||
case Tst_ANS_INT:
|
||||
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;
|
||||
}
|
||||
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;
|
||||
}
|
||||
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 ||
|
||||
!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;
|
||||
}
|
||||
if (!Gbl.Test.Answer.Options[0].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;
|
||||
}
|
||||
for (i = 0;
|
||||
|
@ -6067,7 +6067,7 @@ bool Tst_CheckIfQstFormatIsCorrectAndCountNumOptions (void)
|
|||
if (Gbl.Test.Answer.FloatingPoint[0] >
|
||||
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;
|
||||
}
|
||||
Gbl.Test.Answer.NumOptions = 2;
|
||||
|
@ -6076,7 +6076,7 @@ bool Tst_CheckIfQstFormatIsCorrectAndCountNumOptions (void)
|
|||
if (Gbl.Test.Answer.TF != 'T' &&
|
||||
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;
|
||||
}
|
||||
Gbl.Test.Answer.NumOptions = 1;
|
||||
|
@ -6085,12 +6085,12 @@ bool Tst_CheckIfQstFormatIsCorrectAndCountNumOptions (void)
|
|||
case Tst_ANS_MULTIPLE_CHOICE:
|
||||
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;
|
||||
}
|
||||
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;
|
||||
}
|
||||
|
||||
|
@ -6103,7 +6103,7 @@ bool Tst_CheckIfQstFormatIsCorrectAndCountNumOptions (void)
|
|||
{
|
||||
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;
|
||||
}
|
||||
NumLastOpt = NumOpt;
|
||||
|
@ -6117,7 +6117,7 @@ bool Tst_CheckIfQstFormatIsCorrectAndCountNumOptions (void)
|
|||
|
||||
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;
|
||||
}
|
||||
|
||||
|
@ -6128,19 +6128,19 @@ bool Tst_CheckIfQstFormatIsCorrectAndCountNumOptions (void)
|
|||
break;
|
||||
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;
|
||||
}
|
||||
break;
|
||||
case Tst_ANS_TEXT:
|
||||
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;
|
||||
}
|
||||
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;
|
||||
}
|
||||
|
||||
|
@ -6153,7 +6153,7 @@ bool Tst_CheckIfQstFormatIsCorrectAndCountNumOptions (void)
|
|||
{
|
||||
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;
|
||||
}
|
||||
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.");
|
||||
|
||||
/***** Write message *****/
|
||||
Ale_ShowAlert (Ale_SUCCESS,Txt_Question_removed);
|
||||
Ale_ShowA_old (Ale_SUCCESS,Txt_Question_removed);
|
||||
|
||||
/***** Continue editing questions *****/
|
||||
if (!EditingOnlyThisQst)
|
||||
|
@ -6499,7 +6499,7 @@ void Tst_ChangeShuffleQst (void)
|
|||
Shuffle ? Txt_The_answers_of_the_question_with_code_X_will_appear_shuffled :
|
||||
Txt_The_answers_of_the_question_with_code_X_will_appear_without_shuffling,
|
||||
Gbl.Test.QstCod);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
|
||||
/***** Continue editing questions *****/
|
||||
if (EditingOnlyThisQst)
|
||||
|
@ -7685,7 +7685,7 @@ void Tst_ShowUsrsTestResults (void)
|
|||
else // If no users are selected...
|
||||
{
|
||||
// ...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
|
||||
Tst_SelUsrsToSeeUsrsTestResults ();
|
||||
}
|
||||
|
|
|
@ -139,7 +139,7 @@ void TsI_ShowFormImportQstsFromXML (void)
|
|||
Hlp_ASSESSMENT_Tests,Box_NOT_CLOSABLE);
|
||||
|
||||
/***** 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 *****/
|
||||
Frm_StartForm (ActImpTstQst);
|
||||
|
@ -431,7 +431,7 @@ void TsI_ImportQstsFromXML (void)
|
|||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_file_is_not_X,
|
||||
"xml");
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Ale_WARNING,Gbl.Alert.Txt);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -443,7 +443,7 @@ void TsI_ImportQstsFromXML (void)
|
|||
/***** Get questions from XML file and store them in database *****/
|
||||
TsI_ReadQuestionsFromXMLFileAndStoreInDB (FileNameXMLTmp);
|
||||
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 ();
|
||||
}
|
||||
else // TestElem not found
|
||||
Ale_ShowAlert (Ale_ERROR,"Root element <test> not found.");
|
||||
Ale_ShowA_old (Ale_ERROR,"Root element <test> not found.");
|
||||
|
||||
/***** End table *****/
|
||||
Box_EndBox ();
|
||||
|
|
|
@ -547,7 +547,7 @@ void TT_ShowTimeTable (long UsrCod)
|
|||
if (Gbl.TimeTable.Config.HoursPerDay)
|
||||
TT_DrawTimeTable ();
|
||||
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 *****/
|
||||
TT_FreeTimeTable ();
|
||||
|
@ -1001,7 +1001,7 @@ static void TT_FillTimeTableFromDB (long UsrCod)
|
|||
DB_FreeMySQLResult (&mysql_res);
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
32
swad_user.c
32
swad_user.c
|
@ -268,7 +268,7 @@ void Usr_InformAboutNumClicksBeforePhoto (void)
|
|||
if (Gbl.Usrs.Me.NumAccWithoutPhoto)
|
||||
{
|
||||
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)
|
||||
{
|
||||
snprintf (Message,sizeof (Message),
|
||||
|
@ -2527,7 +2527,7 @@ void Usr_WelcomeUsr (void)
|
|||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_NEW_YEAR_GREETING,
|
||||
Gbl.Now.Date.Year);
|
||||
Ale_ShowAlert (Ale_INFO,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Ale_INFO,Gbl.Alert.Txt);
|
||||
}
|
||||
|
||||
/***** Birthday congratulation *****/
|
||||
|
@ -2589,7 +2589,7 @@ void Usr_WelcomeUsr (void)
|
|||
else
|
||||
/* The current language is not my preferred 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),
|
||||
Txt_The_ID_nickname_or_email_X_is_not_valid,
|
||||
Gbl.Usrs.Other.UsrDat.UsrIDNickOrEmail);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Ale_WARNING,Gbl.Alert.Txt);
|
||||
}
|
||||
|
||||
return ListUsrCods->NumUsrs;
|
||||
|
@ -2922,7 +2922,7 @@ void Usr_ChkUsrAndGetUsrData (void)
|
|||
{
|
||||
Gbl.Action.Act = ActLogOut;
|
||||
Tab_SetCurrentTab ();
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_The_session_has_expired);
|
||||
Ale_ShowA_old (Ale_WARNING,Txt_The_session_has_expired);
|
||||
FormLogin.PutForm = true;
|
||||
}
|
||||
}
|
||||
|
@ -3237,7 +3237,7 @@ static void Usr_ShowAlertUsrDoesNotExistsOrWrongPassword (void)
|
|||
|
||||
// Gbl.Action.Act = ActFrmLogIn;
|
||||
// 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),
|
||||
Txt_There_are_more_than_one_user_with_the_ID_X_Please_type_a_nick_or_email,
|
||||
Gbl.Usrs.Me.UsrIdLogin);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
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_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 *****/
|
||||
|
@ -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),
|
||||
Txt_The_list_of_X_users_is_too_large_to_be_displayed,
|
||||
Gbl.Usrs.LstUsrs[Role].NumUsrs);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Ale_WARNING,Gbl.Alert.Txt);
|
||||
Abort = true;
|
||||
}
|
||||
else
|
||||
|
@ -5662,7 +5662,7 @@ bool Usr_GetListMsgRecipientsWrittenExplicitelyBySender (bool WriteErrorMsgs)
|
|||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_There_is_no_user_with_nickname_X,
|
||||
UsrIDNickOrEmail);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Ale_WARNING,Gbl.Alert.Txt);
|
||||
}
|
||||
Error = true;
|
||||
}
|
||||
|
@ -5682,7 +5682,7 @@ bool Usr_GetListMsgRecipientsWrittenExplicitelyBySender (bool WriteErrorMsgs)
|
|||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_There_is_no_user_with_email_X,
|
||||
UsrIDNickOrEmail);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Ale_WARNING,Gbl.Alert.Txt);
|
||||
}
|
||||
Error = true;
|
||||
}
|
||||
|
@ -5711,7 +5711,7 @@ bool Usr_GetListMsgRecipientsWrittenExplicitelyBySender (bool WriteErrorMsgs)
|
|||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_There_are_more_than_one_user_with_the_ID_X_Please_type_a_nick_or_email,
|
||||
UsrIDNickOrEmail);
|
||||
Ale_ShowAlert (Ale_ERROR,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Ale_ERROR,Gbl.Alert.Txt);
|
||||
}
|
||||
Error = true;
|
||||
}
|
||||
|
@ -5723,7 +5723,7 @@ bool Usr_GetListMsgRecipientsWrittenExplicitelyBySender (bool WriteErrorMsgs)
|
|||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_There_is_no_user_with_ID_nick_or_email_X,
|
||||
UsrIDNickOrEmail);
|
||||
Ale_ShowAlert (Ale_ERROR,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Ale_ERROR,Gbl.Alert.Txt);
|
||||
}
|
||||
Error = true;
|
||||
}
|
||||
|
@ -5735,7 +5735,7 @@ bool Usr_GetListMsgRecipientsWrittenExplicitelyBySender (bool WriteErrorMsgs)
|
|||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_ID_nickname_or_email_X_is_not_valid,
|
||||
UsrIDNickOrEmail);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
Ale_ShowA_old (Ale_WARNING,Gbl.Alert.Txt);
|
||||
}
|
||||
Error = true;
|
||||
}
|
||||
|
@ -8539,7 +8539,7 @@ void Usr_ShowWarningNoUsersFound (Rol_Role_t Role)
|
|||
Btn_CREATE_BUTTON,Txt_Register_teacher);
|
||||
else
|
||||
/***** 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 ();
|
||||
}
|
||||
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_);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
|
@ -454,9 +454,9 @@ static void ZIP_CompressFolderIntoZIP (void)
|
|||
UncompressedSize = ZIP_CloneDir (Path,PathCompression,Gbl.FileBrowser.Priv.FullPathInTree);
|
||||
|
||||
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
|
||||
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
|
||||
{
|
||||
/***** Change to directory of the clone folder
|
||||
|
|
Loading…
Reference in New Issue