mirror of https://github.com/acanas/swad-core.git
Version 16.215
This commit is contained in:
parent
adf84d306a
commit
1313945d32
6
Makefile
6
Makefile
|
@ -9,7 +9,7 @@
|
|||
# and used to support university teaching. #
|
||||
# #
|
||||
# This file is part of SWAD core. #
|
||||
# Copyright (C) 1999-2014 Antonio Cañas Vargas #
|
||||
# Copyright (C) 1999-2017 Antonio Cañas Vargas #
|
||||
# #
|
||||
# This program is free software: you can redistribute it and/or modify #
|
||||
# it under the terms of the GNU Affero General Public License as #
|
||||
|
@ -26,8 +26,8 @@
|
|||
# #
|
||||
###############################################################################
|
||||
|
||||
OBJS = swad_account.o swad_action.o swad_agenda.o swad_announcement.o \
|
||||
swad_assignment.o swad_attendance.o \
|
||||
OBJS = swad_account.o swad_action.o swad_agenda.o swad_alert.o \
|
||||
swad_announcement.o swad_assignment.o swad_attendance.o \
|
||||
swad_banner.o \
|
||||
swad_calendar.o swad_centre.o swad_chat.o swad_config.o \
|
||||
swad_connected.o swad_country.o swad_course.o swad_cryptography.o \
|
||||
|
|
32
swad_ID.c
32
swad_ID.c
|
@ -538,10 +538,10 @@ void ID_ShowFormOthIDs (void)
|
|||
Lay_EndRoundFrame ();
|
||||
}
|
||||
else
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
|
||||
}
|
||||
else // User not found
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -710,7 +710,7 @@ void ID_RemoveOtherUsrID (void)
|
|||
&Gbl.Usrs.Other.UsrDat,NULL);
|
||||
}
|
||||
else // User not found
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -748,13 +748,13 @@ static void ID_RemoveUsrID (const struct UsrData *UsrDat,bool ItsMe)
|
|||
|
||||
/***** Show message *****/
|
||||
sprintf (Gbl.Alert.Txt,Txt_ID_X_removed,UsrID);
|
||||
Lay_ShowAlert (Lay_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
}
|
||||
else
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_You_can_not_delete_this_ID);
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_You_can_not_delete_this_ID);
|
||||
}
|
||||
else
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -826,7 +826,7 @@ void ID_NewOtherUsrID (void)
|
|||
&Gbl.Usrs.Other.UsrDat,NULL);
|
||||
}
|
||||
else // User not found
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -907,12 +907,12 @@ static void ID_NewUsrID (const struct UsrData *UsrDat,bool ItsMe)
|
|||
}
|
||||
|
||||
/***** Show message *****/
|
||||
Lay_ShowAlert (Error ? Lay_WARNING :
|
||||
Lay_SUCCESS,
|
||||
Ale_ShowAlert (Error ? Ale_WARNING :
|
||||
Ale_SUCCESS,
|
||||
Gbl.Alert.Txt);
|
||||
}
|
||||
else
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -951,7 +951,7 @@ void ID_ConfirmOtherUsrID (void)
|
|||
unsigned NumIDFound = 0; // Initialized to avoid warning
|
||||
|
||||
/***** Initialize alert type and message *****/
|
||||
Gbl.Alert.Type = Lay_NONE; // Do not show alert
|
||||
Gbl.Alert.Type = Ale_NONE; // Do not show alert
|
||||
|
||||
/***** Get where we came from *****/
|
||||
OriginalActCod = Par_GetParToLong ("OriginalActCod");
|
||||
|
@ -986,7 +986,7 @@ void ID_ConfirmOtherUsrID (void)
|
|||
if (Gbl.Usrs.Other.UsrDat.IDs.List[NumIDFound].Confirmed)
|
||||
{
|
||||
/***** ID found and already confirmed *****/
|
||||
Gbl.Alert.Type = Lay_INFO;
|
||||
Gbl.Alert.Type = Ale_INFO;
|
||||
sprintf (Gbl.Alert.Txt,Txt_ID_X_had_already_been_confirmed,
|
||||
Gbl.Usrs.Other.UsrDat.IDs.List[NumIDFound].ID);
|
||||
}
|
||||
|
@ -998,20 +998,20 @@ void ID_ConfirmOtherUsrID (void)
|
|||
Gbl.Usrs.Other.UsrDat.IDs.List[NumIDFound].Confirmed = true;
|
||||
|
||||
/***** Write success message *****/
|
||||
Gbl.Alert.Type = Lay_SUCCESS;
|
||||
Gbl.Alert.Type = Ale_SUCCESS;
|
||||
sprintf (Gbl.Alert.Txt,Txt_The_ID_X_has_been_confirmed,
|
||||
Gbl.Usrs.Other.UsrDat.IDs.List[NumIDFound].ID);
|
||||
}
|
||||
}
|
||||
else // User's ID not found
|
||||
{
|
||||
Gbl.Alert.Type = Lay_WARNING;
|
||||
Gbl.Alert.Type = Ale_WARNING;
|
||||
sprintf (Gbl.Alert.Txt,"%s",Txt_User_not_found_or_you_do_not_have_permission_);
|
||||
}
|
||||
}
|
||||
else // I can not confirm
|
||||
{
|
||||
Gbl.Alert.Type = Lay_WARNING;
|
||||
Gbl.Alert.Type = Ale_WARNING;
|
||||
sprintf (Gbl.Alert.Txt,"%s",Txt_User_not_found_or_you_do_not_have_permission_);
|
||||
}
|
||||
|
||||
|
@ -1032,7 +1032,7 @@ void ID_ConfirmOtherUsrID (void)
|
|||
break;
|
||||
default:
|
||||
/* Show optional alert */
|
||||
Lay_ShowPendingAlert ();
|
||||
Ale_ShowPendingAlert ();
|
||||
|
||||
/* Show only the updated record of this user */
|
||||
Rec_ShowSharedUsrRecord (Rec_SHA_RECORD_LIST,
|
||||
|
|
|
@ -244,7 +244,7 @@ void Acc_CheckIfEmptyAccountExists (void)
|
|||
{
|
||||
sprintf (Gbl.Alert.Txt,Txt_There_is_no_empty_account_associated_with_your_ID_X_,
|
||||
ID);
|
||||
Lay_ShowAlert (Lay_INFO,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_INFO,Gbl.Alert.Txt);
|
||||
}
|
||||
|
||||
/***** Free structure that stores the query result *****/
|
||||
|
@ -256,7 +256,7 @@ void Acc_CheckIfEmptyAccountExists (void)
|
|||
else // ID not valid
|
||||
{
|
||||
/**** Show again form to check if I have an account *****/
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_Please_enter_your_ID);
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_Please_enter_your_ID);
|
||||
|
||||
Acc_ShowFormCheckIfIHaveAccount (Txt_Before_creating_a_new_account_check_if_you_have_been_already_registered_with_your_ID);
|
||||
}
|
||||
|
@ -465,7 +465,7 @@ void Acc_ShowFormChangeMyAccount (void)
|
|||
{
|
||||
fprintf (Gbl.F.Out,"<tr>"
|
||||
"<td colspan=\"2\">");
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_Before_going_to_any_other_option_you_must_fill_your_nickname);
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_Before_going_to_any_other_option_you_must_fill_your_nickname);
|
||||
fprintf (Gbl.F.Out,"</td>"
|
||||
"</tr>");
|
||||
}
|
||||
|
@ -479,7 +479,7 @@ void Acc_ShowFormChangeMyAccount (void)
|
|||
{
|
||||
fprintf (Gbl.F.Out,"<tr>"
|
||||
"<td colspan=\"2\">");
|
||||
Lay_ShowAlert (Lay_WARNING,IMustFillEmail ? Txt_Please_fill_in_your_email_address :
|
||||
Ale_ShowAlert (Ale_WARNING,IMustFillEmail ? Txt_Please_fill_in_your_email_address :
|
||||
Txt_Please_check_and_confirm_your_email_address);
|
||||
fprintf (Gbl.F.Out,"</td>"
|
||||
"</tr>");
|
||||
|
@ -494,7 +494,7 @@ void Acc_ShowFormChangeMyAccount (void)
|
|||
{
|
||||
fprintf (Gbl.F.Out,"<tr>"
|
||||
"<td colspan=\"2\">");
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_Please_fill_in_your_ID);
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_Please_fill_in_your_ID);
|
||||
fprintf (Gbl.F.Out,"</td>"
|
||||
"</tr>");
|
||||
}
|
||||
|
@ -635,7 +635,7 @@ static bool Acc_GetParamsNewAccount (char NewNicknameWithoutArroba[Nck_MAX_BYTES
|
|||
Error = true;
|
||||
sprintf (Gbl.Alert.Txt,Txt_The_nickname_X_had_been_registered_by_another_user,
|
||||
NewNicknameWithoutArroba);
|
||||
Lay_ShowAlert (Lay_WARNING,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
}
|
||||
}
|
||||
else // New nickname is not valid
|
||||
|
@ -645,7 +645,7 @@ static bool Acc_GetParamsNewAccount (char NewNicknameWithoutArroba[Nck_MAX_BYTES
|
|||
NewNicknameWithArroba,
|
||||
Nck_MIN_CHARS_NICKNAME_WITHOUT_ARROBA,
|
||||
Nck_MAX_CHARS_NICKNAME_WITHOUT_ARROBA);
|
||||
Lay_ShowAlert (Lay_WARNING,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
}
|
||||
|
||||
/***** Step 2/3: Get new email from form *****/
|
||||
|
@ -663,7 +663,7 @@ static bool Acc_GetParamsNewAccount (char NewNicknameWithoutArroba[Nck_MAX_BYTES
|
|||
Error = true;
|
||||
sprintf (Gbl.Alert.Txt,Txt_The_email_address_X_had_been_registered_by_another_user,
|
||||
NewEmail);
|
||||
Lay_ShowAlert (Lay_WARNING,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
}
|
||||
}
|
||||
else // New email is not valid
|
||||
|
@ -671,7 +671,7 @@ static bool Acc_GetParamsNewAccount (char NewNicknameWithoutArroba[Nck_MAX_BYTES
|
|||
Error = true;
|
||||
sprintf (Gbl.Alert.Txt,Txt_The_email_address_entered_X_is_not_valid,
|
||||
NewEmail);
|
||||
Lay_ShowAlert (Lay_WARNING,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
}
|
||||
|
||||
/***** Step 3/3: Get new password from form *****/
|
||||
|
@ -680,7 +680,7 @@ static bool Acc_GetParamsNewAccount (char NewNicknameWithoutArroba[Nck_MAX_BYTES
|
|||
if (!Pwd_SlowCheckIfPasswordIsGood (NewPlainPassword,NewEncryptedPassword,-1L)) // New password is good?
|
||||
{
|
||||
Error = true;
|
||||
Lay_ShowAlert (Lay_WARNING,Gbl.Alert.Txt); // Error message is set in Usr_SlowCheckIfPasswordIsGood
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt); // Error message is set in Usr_SlowCheckIfPasswordIsGood
|
||||
}
|
||||
|
||||
return !Error;
|
||||
|
@ -817,7 +817,7 @@ void Acc_AfterCreationNewAccount (void)
|
|||
sprintf (Gbl.Alert.Txt,Txt_Congratulations_You_have_created_your_account_X_Now_Y_will_request_you_,
|
||||
Gbl.Usrs.Me.UsrDat.Nickname,
|
||||
Cfg_PLATFORM_SHORT_NAME);
|
||||
Lay_ShowAlert (Lay_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
|
||||
/***** Show form with account data *****/
|
||||
Acc_ShowFormChangeMyAccount ();
|
||||
|
@ -844,7 +844,7 @@ void Acc_GetUsrCodAndRemUsrGbl (void)
|
|||
Error = true;
|
||||
|
||||
if (Error)
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -907,7 +907,7 @@ void Acc_AskIfRemoveMyAccount (void)
|
|||
|
||||
/***** Show question and button to remove my user account *****/
|
||||
/* Start alert */
|
||||
Lay_ShowAlertAndButton1 (Lay_QUESTION,Txt_Do_you_really_want_to_completely_eliminate_your_user_account);
|
||||
Ale_ShowAlertAndButton1 (Ale_QUESTION,Txt_Do_you_really_want_to_completely_eliminate_your_user_account);
|
||||
|
||||
/* Show my record */
|
||||
Rec_ShowSharedRecordUnmodifiable (&Gbl.Usrs.Me.UsrDat);
|
||||
|
@ -919,7 +919,7 @@ void Acc_AskIfRemoveMyAccount (void)
|
|||
Act_FormEnd ();
|
||||
|
||||
/* End alert */
|
||||
Lay_ShowAlertAndButton2 (ActUnk,NULL,NULL,Lay_NO_BUTTON,NULL);
|
||||
Ale_ShowAlertAndButton2 (ActUnk,NULL,NULL,Lay_NO_BUTTON,NULL);
|
||||
}
|
||||
|
||||
static void Acc_AskIfRemoveOtherUsrAccount (void)
|
||||
|
@ -932,7 +932,7 @@ static void Acc_AskIfRemoveOtherUsrAccount (void)
|
|||
{
|
||||
/***** Show question and button to remove user account *****/
|
||||
/* Start alert */
|
||||
Lay_ShowAlertAndButton1 (Lay_QUESTION,Txt_Do_you_really_want_to_completely_eliminate_the_following_user);
|
||||
Ale_ShowAlertAndButton1 (Ale_QUESTION,Txt_Do_you_really_want_to_completely_eliminate_the_following_user);
|
||||
|
||||
/* Show user's record */
|
||||
Rec_ShowSharedRecordUnmodifiable (&Gbl.Usrs.Other.UsrDat);
|
||||
|
@ -945,10 +945,10 @@ static void Acc_AskIfRemoveOtherUsrAccount (void)
|
|||
Act_FormEnd ();
|
||||
|
||||
/* End alert */
|
||||
Lay_ShowAlertAndButton2 (ActUnk,NULL,NULL,Lay_NO_BUTTON,NULL);
|
||||
Ale_ShowAlertAndButton2 (ActUnk,NULL,NULL,Lay_NO_BUTTON,NULL);
|
||||
}
|
||||
else
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -1007,7 +1007,7 @@ void Acc_CompletelyEliminateAccount (struct UsrData *UsrDat,
|
|||
{
|
||||
sprintf (Gbl.Alert.Txt,Txt_THE_USER_X_has_been_removed_from_all_his_her_courses,
|
||||
UsrDat->FullName);
|
||||
Lay_ShowAlert (Lay_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
}
|
||||
|
||||
/***** Remove user as administrator of any degree *****/
|
||||
|
@ -1019,7 +1019,7 @@ void Acc_CompletelyEliminateAccount (struct UsrData *UsrDat,
|
|||
{
|
||||
sprintf (Gbl.Alert.Txt,Txt_THE_USER_X_has_been_removed_as_administrator,
|
||||
UsrDat->FullName);
|
||||
Lay_ShowAlert (Lay_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
}
|
||||
|
||||
/***** Remove user's clipboard in forums *****/
|
||||
|
@ -1034,7 +1034,7 @@ void Acc_CompletelyEliminateAccount (struct UsrData *UsrDat,
|
|||
{
|
||||
sprintf (Gbl.Alert.Txt,Txt_Briefcase_of_THE_USER_X_has_been_removed,
|
||||
UsrDat->FullName);
|
||||
Lay_ShowAlert (Lay_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
}
|
||||
|
||||
/***** Remove test results made by user in all courses *****/
|
||||
|
@ -1050,7 +1050,7 @@ void Acc_CompletelyEliminateAccount (struct UsrData *UsrDat,
|
|||
{
|
||||
sprintf (Gbl.Alert.Txt,Txt_Messages_of_THE_USER_X_have_been_deleted,
|
||||
UsrDat->FullName);
|
||||
Lay_ShowAlert (Lay_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
}
|
||||
|
||||
/***** Remove user from tables of banned users *****/
|
||||
|
@ -1097,7 +1097,7 @@ void Acc_CompletelyEliminateAccount (struct UsrData *UsrDat,
|
|||
{
|
||||
sprintf (Gbl.Alert.Txt,Txt_Photo_of_THE_USER_X_has_been_removed,
|
||||
UsrDat->FullName);
|
||||
Lay_ShowAlert (Lay_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
}
|
||||
|
||||
/***** Remove user *****/
|
||||
|
@ -1106,7 +1106,7 @@ void Acc_CompletelyEliminateAccount (struct UsrData *UsrDat,
|
|||
{
|
||||
sprintf (Gbl.Alert.Txt,Txt_Record_card_of_THE_USER_X_has_been_removed,
|
||||
UsrDat->FullName);
|
||||
Lay_ShowAlert (Lay_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -380,7 +380,7 @@ void Agd_ShowUsrAgenda (void)
|
|||
}
|
||||
|
||||
if (Error)
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -422,12 +422,12 @@ void Agd_ShowOtherAgendaAfterLogIn (void)
|
|||
Lay_EndRoundFrame ();
|
||||
}
|
||||
else
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
|
||||
Ale_ShowAlert (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 */
|
||||
Lay_ShowAlert (Lay_INFO,Txt_Switching_to_LANGUAGE[Gbl.Usrs.Me.UsrDat.Prefs.Language]);
|
||||
Ale_ShowAlert (Ale_INFO,Txt_Switching_to_LANGUAGE[Gbl.Usrs.Me.UsrDat.Prefs.Language]);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -487,7 +487,7 @@ static void Agd_ShowEvents (Agd_AgendaType_t AgendaType)
|
|||
Lay_EndTable ();
|
||||
}
|
||||
else
|
||||
Lay_ShowAlert (Lay_INFO,Txt_No_events);
|
||||
Ale_ShowAlert (Ale_INFO,Txt_No_events);
|
||||
|
||||
/***** Write again links to pages *****/
|
||||
if (Pagination.MoreThanOnePage)
|
||||
|
@ -1301,7 +1301,7 @@ void Agd_AskRemEvent (void)
|
|||
Gbl.Agenda.AgdCodToEdit = AgdEvent.AgdCod;
|
||||
sprintf (Gbl.Alert.Txt,Txt_Do_you_really_want_to_remove_the_event_X,
|
||||
AgdEvent.Event);
|
||||
Lay_ShowAlertAndButton (Lay_QUESTION,Gbl.Alert.Txt,
|
||||
Ale_ShowAlertAndButton (Ale_QUESTION,Gbl.Alert.Txt,
|
||||
ActRemEvtMyAgd,NULL,Agd_PutCurrentParamsMyAgenda,
|
||||
Lay_REMOVE_BUTTON,Txt_Remove_event);
|
||||
|
||||
|
@ -1335,7 +1335,7 @@ void Agd_RemoveEvent (void)
|
|||
|
||||
/***** Write message to show the change made *****/
|
||||
sprintf (Gbl.Alert.Txt,Txt_Event_X_removed,AgdEvent.Event);
|
||||
Lay_ShowAlert (Lay_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
|
||||
/***** Show events again *****/
|
||||
Agd_ShowMyAgenda ();
|
||||
|
@ -1367,7 +1367,7 @@ void Agd_HideEvent (void)
|
|||
|
||||
/***** Write message to show the change made *****/
|
||||
sprintf (Gbl.Alert.Txt,Txt_Event_X_is_now_hidden,AgdEvent.Event);
|
||||
Lay_ShowAlert (Lay_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
|
||||
/***** Show events again *****/
|
||||
Agd_ShowMyAgenda ();
|
||||
|
@ -1400,7 +1400,7 @@ void Agd_UnhideEvent (void)
|
|||
/***** Write message to show the change made *****/
|
||||
sprintf (Gbl.Alert.Txt,Txt_Event_X_is_now_visible,
|
||||
AgdEvent.Event);
|
||||
Lay_ShowAlert (Lay_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
|
||||
/***** Show events again *****/
|
||||
Agd_ShowMyAgenda ();
|
||||
|
@ -1432,7 +1432,7 @@ void Agd_MakeEventPrivate (void)
|
|||
|
||||
/***** Write message to show the change made *****/
|
||||
sprintf (Gbl.Alert.Txt,Txt_Event_X_is_now_private,AgdEvent.Event);
|
||||
Lay_ShowAlert (Lay_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
|
||||
/***** Show events again *****/
|
||||
Agd_ShowMyAgenda ();
|
||||
|
@ -1465,7 +1465,7 @@ void Agd_MakeEventPublic (void)
|
|||
/***** Write message to show the change made *****/
|
||||
sprintf (Gbl.Alert.Txt,Txt_Event_X_is_now_visible_to_users_of_your_courses,
|
||||
AgdEvent.Event);
|
||||
Lay_ShowAlert (Lay_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
|
||||
/***** Show events again *****/
|
||||
Agd_ShowMyAgenda ();
|
||||
|
@ -1644,14 +1644,14 @@ void Agd_RecFormEvent (void)
|
|||
if (!AgdEvent.Location[0]) // If there is no event
|
||||
{
|
||||
NewEventIsCorrect = false;
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_You_must_specify_the_title_of_the_event);
|
||||
Ale_ShowAlert (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;
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_You_must_specify_the_title_of_the_event);
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_You_must_specify_the_title_of_the_event);
|
||||
}
|
||||
|
||||
/***** Create a new event or update an existing one *****/
|
||||
|
@ -1663,14 +1663,14 @@ void Agd_RecFormEvent (void)
|
|||
|
||||
/***** Write success message *****/
|
||||
sprintf (Gbl.Alert.Txt,Txt_Created_new_event_X,AgdEvent.Event);
|
||||
Lay_ShowAlert (Lay_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
}
|
||||
else
|
||||
{
|
||||
Agd_UpdateEvent (&AgdEvent,Txt);
|
||||
|
||||
/***** Write success message *****/
|
||||
Lay_ShowAlert (Lay_SUCCESS,Txt_The_event_has_been_modified);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Txt_The_event_has_been_modified);
|
||||
}
|
||||
|
||||
/* Free memory for list of selected groups */
|
||||
|
|
|
@ -125,7 +125,7 @@ void Ann_ShowAllAnnouncements (void)
|
|||
Hlp_MESSAGES_Announcements);
|
||||
|
||||
if (!NumAnnouncements)
|
||||
Lay_ShowAlert (Lay_INFO,Txt_No_announcements);
|
||||
Ale_ShowAlert (Ale_INFO,Txt_No_announcements);
|
||||
|
||||
/***** Show the announcements *****/
|
||||
for (NumAnn = 0;
|
||||
|
@ -493,7 +493,7 @@ void Ann_ReceiveAnnouncement (void)
|
|||
Ann_CreateAnnouncement (Roles,Subject,Content);
|
||||
|
||||
/***** Write message of success *****/
|
||||
Lay_ShowAlert (Lay_SUCCESS,Txt_Announcement_created);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Txt_Announcement_created);
|
||||
|
||||
/***** Refresh list of announcements *****/
|
||||
Ann_ShowAllAnnouncements ();
|
||||
|
@ -578,7 +578,7 @@ void Ann_RemoveAnnouncement (void)
|
|||
DB_QueryDELETE (Query,"can not remove announcement");
|
||||
|
||||
/***** Write message of success *****/
|
||||
Lay_ShowAlert (Lay_SUCCESS,Txt_Announcement_removed);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Txt_Announcement_removed);
|
||||
|
||||
/***** Refresh list of announcements *****/
|
||||
Ann_ShowAllAnnouncements ();
|
||||
|
|
|
@ -159,7 +159,7 @@ static void Asg_ShowAllAssignments (void)
|
|||
Lay_EndTable ();
|
||||
}
|
||||
else // No assignments created
|
||||
Lay_ShowAlert (Lay_INFO,Txt_No_assignments);
|
||||
Ale_ShowAlert (Ale_INFO,Txt_No_assignments);
|
||||
|
||||
/***** Button to create a new assignment *****/
|
||||
if (Asg_CheckIfICanCreateAssignments ())
|
||||
|
@ -972,7 +972,7 @@ void Asg_ReqRemAssignment (void)
|
|||
Gbl.Asgs.AsgCodToEdit = Asg.AsgCod;
|
||||
sprintf (Gbl.Alert.Txt,Txt_Do_you_really_want_to_remove_the_assignment_X,
|
||||
Asg.Title);
|
||||
Lay_ShowAlertAndButton (Lay_QUESTION,Gbl.Alert.Txt,
|
||||
Ale_ShowAlertAndButton (Ale_QUESTION,Gbl.Alert.Txt,
|
||||
ActRemAsg,NULL,Asg_PutParams,
|
||||
Lay_REMOVE_BUTTON,Txt_Remove_assignment);
|
||||
|
||||
|
@ -1016,7 +1016,7 @@ void Asg_RemoveAssignment (void)
|
|||
/***** Write message to show the change made *****/
|
||||
sprintf (Gbl.Alert.Txt,Txt_Assignment_X_removed,
|
||||
Asg.Title);
|
||||
Lay_ShowAlert (Lay_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
|
||||
/***** Show assignments again *****/
|
||||
Asg_SeeAssignments ();
|
||||
|
@ -1048,7 +1048,7 @@ void Asg_HideAssignment (void)
|
|||
/***** Write message to show the change made *****/
|
||||
sprintf (Gbl.Alert.Txt,Txt_Assignment_X_is_now_hidden,
|
||||
Asg.Title);
|
||||
Lay_ShowAlert (Lay_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
|
||||
/***** Show assignments again *****/
|
||||
Asg_SeeAssignments ();
|
||||
|
@ -1080,7 +1080,7 @@ void Asg_ShowAssignment (void)
|
|||
/***** Write message to show the change made *****/
|
||||
sprintf (Gbl.Alert.Txt,Txt_Assignment_X_is_now_visible,
|
||||
Asg.Title);
|
||||
Lay_ShowAlert (Lay_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
|
||||
/***** Show assignments again *****/
|
||||
Asg_SeeAssignments ();
|
||||
|
@ -1361,7 +1361,7 @@ void Asg_RecFormAssignment (void)
|
|||
NewAssignmentIsCorrect = false;
|
||||
sprintf (Gbl.Alert.Txt,Txt_Already_existed_an_assignment_with_the_title_X,
|
||||
NewAsg.Title);
|
||||
Lay_ShowAlert (Lay_WARNING,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
}
|
||||
else // Title is correct
|
||||
{
|
||||
|
@ -1374,13 +1374,13 @@ void Asg_RecFormAssignment (void)
|
|||
NewAssignmentIsCorrect = false;
|
||||
sprintf (Gbl.Alert.Txt,Txt_Already_existed_an_assignment_with_the_folder_X,
|
||||
NewAsg.Folder);
|
||||
Lay_ShowAlert (Lay_WARNING,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
}
|
||||
}
|
||||
else // Folder name not valid
|
||||
{
|
||||
NewAssignmentIsCorrect = false;
|
||||
Lay_ShowAlert (Lay_WARNING,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
}
|
||||
}
|
||||
else // NewAsg.SendWork == Asg_DO_NOT_SEND_WORK
|
||||
|
@ -1390,7 +1390,7 @@ void Asg_RecFormAssignment (void)
|
|||
if (Brw_CheckIfExistsFolderAssigmentForAnyUsr (OldAsg.Folder))
|
||||
{
|
||||
NewAssignmentIsCorrect = false;
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_You_can_not_disable_file_uploading_once_folders_have_been_created);
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_You_can_not_disable_file_uploading_once_folders_have_been_created);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1399,7 +1399,7 @@ void Asg_RecFormAssignment (void)
|
|||
else // If there is not an assignment title
|
||||
{
|
||||
NewAssignmentIsCorrect = false;
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_You_must_specify_the_title_of_the_assignment);
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_You_must_specify_the_title_of_the_assignment);
|
||||
}
|
||||
|
||||
/***** Create a new assignment or update an existing one *****/
|
||||
|
@ -1414,7 +1414,7 @@ void Asg_RecFormAssignment (void)
|
|||
|
||||
/***** Write success message *****/
|
||||
sprintf (Gbl.Alert.Txt,Txt_Created_new_assignment_X,NewAsg.Title);
|
||||
Lay_ShowAlert (Lay_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1426,7 +1426,7 @@ void Asg_RecFormAssignment (void)
|
|||
Asg_UpdateAssignment (&NewAsg,Txt);
|
||||
|
||||
/***** Write success message *****/
|
||||
Lay_ShowAlert (Lay_SUCCESS,Txt_The_assignment_has_been_modified);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Txt_The_assignment_has_been_modified);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -273,7 +273,7 @@ static void Att_ShowAllAttEvents (void)
|
|||
Lay_EndTable ();
|
||||
}
|
||||
else // No events created
|
||||
Lay_ShowAlert (Lay_INFO,Txt_No_events);
|
||||
Ale_ShowAlert (Ale_INFO,Txt_No_events);
|
||||
|
||||
/***** Button to create a new attendance event *****/
|
||||
if (ICanEdit)
|
||||
|
@ -879,7 +879,7 @@ void Att_AskRemAttEvent (void)
|
|||
/***** Ask for confirmation of removing *****/
|
||||
sprintf (Gbl.Alert.Txt,Txt_Do_you_really_want_to_remove_the_event_X,
|
||||
Att.Title);
|
||||
Lay_ShowAlert (Lay_WARNING,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
Lay_PutRemoveButton (Txt_Remove_event);
|
||||
Act_FormEnd ();
|
||||
|
||||
|
@ -909,7 +909,7 @@ void Att_GetAndRemAttEvent (void)
|
|||
|
||||
/***** Write message to show the change made *****/
|
||||
sprintf (Gbl.Alert.Txt,Txt_Event_X_removed,Att.Title);
|
||||
Lay_ShowAlert (Lay_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
|
||||
/***** Show attendance events again *****/
|
||||
Att_SeeAttEvents ();
|
||||
|
@ -957,7 +957,7 @@ void Att_HideAttEvent (void)
|
|||
/***** Write message to show the change made *****/
|
||||
sprintf (Gbl.Alert.Txt,Txt_Event_X_is_now_hidden,
|
||||
Att.Title);
|
||||
Lay_ShowAlert (Lay_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
|
||||
/***** Show attendance events again *****/
|
||||
Att_SeeAttEvents ();
|
||||
|
@ -989,7 +989,7 @@ void Att_ShowAttEvent (void)
|
|||
/***** Write message to show the change made *****/
|
||||
sprintf (Gbl.Alert.Txt,Txt_Event_X_is_now_visible,
|
||||
Att.Title);
|
||||
Lay_ShowAlert (Lay_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
|
||||
/***** Show attendance events again *****/
|
||||
Att_SeeAttEvents ();
|
||||
|
@ -1270,13 +1270,13 @@ void Att_RecFormAttEvent (void)
|
|||
ReceivedAttEventIsCorrect = false;
|
||||
sprintf (Gbl.Alert.Txt,Txt_Already_existed_an_event_with_the_title_X,
|
||||
ReceivedAtt.Title);
|
||||
Lay_ShowAlert (Lay_WARNING,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
}
|
||||
}
|
||||
else // If there is not an attendance event title
|
||||
{
|
||||
ReceivedAttEventIsCorrect = false;
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_You_must_specify_the_title_of_the_event);
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_You_must_specify_the_title_of_the_event);
|
||||
}
|
||||
|
||||
/***** Create a new attendance event or update an existing one *****/
|
||||
|
@ -1292,14 +1292,14 @@ void Att_RecFormAttEvent (void)
|
|||
|
||||
/***** Write success message *****/
|
||||
sprintf (Gbl.Alert.Txt,Txt_Created_new_event_X,ReceivedAtt.Title);
|
||||
Lay_ShowAlert (Lay_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
}
|
||||
else
|
||||
{
|
||||
Att_UpdateAttEvent (&ReceivedAtt,Txt);
|
||||
|
||||
/***** Write success message *****/
|
||||
Lay_ShowAlert (Lay_SUCCESS,Txt_The_event_has_been_modified);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Txt_The_event_has_been_modified);
|
||||
}
|
||||
|
||||
/* Free memory for list of selected groups */
|
||||
|
@ -2207,7 +2207,7 @@ void Att_RegisterMeAsStdInAttEvent (void)
|
|||
Att_RemoveUsrFromAttEvent (Att.AttCod,Gbl.Usrs.Me.UsrDat.UsrCod);
|
||||
|
||||
/***** Write final message *****/
|
||||
Lay_ShowAlert (Lay_SUCCESS,Txt_Your_comment_has_been_updated);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Txt_Your_comment_has_been_updated);
|
||||
}
|
||||
|
||||
/***** Show the attendance event again *****/
|
||||
|
@ -2334,7 +2334,7 @@ void Att_RegisterStudentsInAttEvent (void)
|
|||
sprintf (Format,"%s: %%u<br />%s: %%u",Txt_Presents,Txt_Absents);
|
||||
sprintf (Gbl.Alert.Txt,Format,
|
||||
NumStdsPresent,NumStdsAbsent);
|
||||
Lay_ShowAlert (Lay_INFO,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_INFO,Gbl.Alert.Txt);
|
||||
}
|
||||
else // Gbl.Usrs.LstUsrs[Rol_STUDENT].NumUsrs == 0
|
||||
/***** Show warning indicating no students found *****/
|
||||
|
@ -2798,7 +2798,7 @@ static void Usr_ListOrPrintStdsAttendanceCrs (Att_TypeOfView_t TypeOfView)
|
|||
}
|
||||
else // No students selected
|
||||
{
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_You_must_select_one_ore_more_students);
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_You_must_select_one_ore_more_students);
|
||||
Usr_ReqListStdsAttendanceCrs (); // ...show again the form
|
||||
}
|
||||
|
||||
|
|
|
@ -113,7 +113,7 @@ void Ban_SeeBanners (void)
|
|||
if (Gbl.Banners.Num) // There are banners
|
||||
Ban_WriteListOfBanners ();
|
||||
else // No banners created
|
||||
Lay_ShowAlert (Lay_INFO,Txt_No_banners);
|
||||
Ale_ShowAlert (Ale_INFO,Txt_No_banners);
|
||||
|
||||
/***** Button to create banner *****/
|
||||
if (Gbl.Usrs.Me.LoggedRole == Rol_SYS_ADM)
|
||||
|
@ -485,7 +485,7 @@ void Ban_RemoveBanner (void)
|
|||
/***** Write message to show the change made *****/
|
||||
sprintf (Gbl.Alert.Txt,Txt_Banner_X_removed,
|
||||
Ban.ShrtName);
|
||||
Lay_ShowAlert (Lay_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
|
||||
/***** Show the form again *****/
|
||||
Ban_EditBanners ();
|
||||
|
@ -544,7 +544,7 @@ static void Ban_ShowOrHideBanner (bool Hide)
|
|||
sprintf (Gbl.Alert.Txt,Hide ? Txt_The_banner_X_is_now_hidden :
|
||||
Txt_The_banner_X_is_now_visible,
|
||||
Ban.ShrtName);
|
||||
Lay_ShowAlert (Lay_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
|
||||
/***** Show the form again *****/
|
||||
Ban_EditBanners ();
|
||||
|
@ -618,7 +618,7 @@ static void Ban_RenameBanner (Cns_ShrtOrFullName_t ShrtOrFullName)
|
|||
{
|
||||
sprintf (Gbl.Alert.Txt,Txt_You_can_not_leave_the_name_of_the_banner_X_empty,
|
||||
CurrentBanName);
|
||||
Lay_ShowAlert (Lay_WARNING,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -630,7 +630,7 @@ static void Ban_RenameBanner (Cns_ShrtOrFullName_t ShrtOrFullName)
|
|||
{
|
||||
sprintf (Gbl.Alert.Txt,Txt_The_banner_X_already_exists,
|
||||
NewBanName);
|
||||
Lay_ShowAlert (Lay_WARNING,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -640,14 +640,14 @@ static void Ban_RenameBanner (Cns_ShrtOrFullName_t ShrtOrFullName)
|
|||
/* Write message to show the change made */
|
||||
sprintf (Gbl.Alert.Txt,Txt_The_banner_X_has_been_renamed_as_Y,
|
||||
CurrentBanName,NewBanName);
|
||||
Lay_ShowAlert (Lay_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
}
|
||||
}
|
||||
else // The same name
|
||||
{
|
||||
sprintf (Gbl.Alert.Txt,Txt_The_name_of_the_banner_X_has_not_changed,
|
||||
CurrentBanName);
|
||||
Lay_ShowAlert (Lay_INFO,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_INFO,Gbl.Alert.Txt);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -719,10 +719,10 @@ void Ban_ChangeBannerImg (void)
|
|||
/***** Write message to show the change made *****/
|
||||
sprintf (Gbl.Alert.Txt,Txt_The_new_image_is_X,
|
||||
NewImg);
|
||||
Lay_ShowAlert (Lay_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
}
|
||||
else
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_You_can_not_leave_the_image_empty);
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_You_can_not_leave_the_image_empty);
|
||||
|
||||
/***** Show the form again *****/
|
||||
Str_Copy (Ban->Img,NewImg,
|
||||
|
@ -764,10 +764,10 @@ void Ban_ChangeBannerWWW (void)
|
|||
/***** Write message to show the change made *****/
|
||||
sprintf (Gbl.Alert.Txt,Txt_The_new_web_address_is_X,
|
||||
NewWWW);
|
||||
Lay_ShowAlert (Lay_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
}
|
||||
else
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_You_can_not_leave_the_web_address_empty);
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_You_can_not_leave_the_web_address_empty);
|
||||
|
||||
/***** Show the form again *****/
|
||||
Str_Copy (Ban->WWW,NewWWW,
|
||||
|
@ -910,23 +910,23 @@ void Ban_RecFormNewBanner (void)
|
|||
{
|
||||
sprintf (Gbl.Alert.Txt,Txt_The_banner_X_already_exists,
|
||||
Ban->ShrtName);
|
||||
Lay_ShowAlert (Lay_WARNING,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
}
|
||||
else if (Ban_CheckIfBannerNameExists ("FullName",Ban->FullName,-1L))
|
||||
{
|
||||
sprintf (Gbl.Alert.Txt,Txt_The_banner_X_already_exists,
|
||||
Ban->FullName);
|
||||
Lay_ShowAlert (Lay_WARNING,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
}
|
||||
else if (!Ban->Img[0])
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_You_must_specify_the_image_of_the_new_banner);
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_You_must_specify_the_image_of_the_new_banner);
|
||||
else if (!Ban->WWW[0])
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_You_must_specify_the_URL_of_the_new_banner);
|
||||
Ale_ShowAlert (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
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_You_must_specify_the_short_name_and_the_full_name_of_the_new_banner);
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_You_must_specify_the_short_name_and_the_full_name_of_the_new_banner);
|
||||
|
||||
/***** Show the form again *****/
|
||||
Ban_EditBanners ();
|
||||
|
@ -952,7 +952,7 @@ static void Ban_CreateBanner (struct Banner *Ban)
|
|||
/***** Write success message *****/
|
||||
sprintf (Gbl.Alert.Txt,Txt_Created_new_banner_X,
|
||||
Ban->ShrtName);
|
||||
Lay_ShowAlert (Lay_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
|
@ -214,7 +214,7 @@ void Ctr_SeeCtrWithPendingDegs (void)
|
|||
Lay_EndRoundFrameTable ();
|
||||
}
|
||||
else
|
||||
Lay_ShowAlert (Lay_INFO,Txt_There_are_no_centres_with_requests_for_degrees_to_be_confirmed);
|
||||
Ale_ShowAlert (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);
|
||||
|
@ -772,7 +772,7 @@ static void Ctr_ListCentres (void)
|
|||
Lay_EndTable ();
|
||||
}
|
||||
else // No centres created in the current institution
|
||||
Lay_ShowAlert (Lay_INFO,Txt_No_centres);
|
||||
Ale_ShowAlert (Ale_INFO,Txt_No_centres);
|
||||
|
||||
/***** Button to create centre *****/
|
||||
if (Ctr_CheckIfICanCreateCentres ())
|
||||
|
@ -1717,7 +1717,7 @@ void Ctr_RemoveCentre (void)
|
|||
if (Ctr.Degs.Num ||
|
||||
Ctr.NumUsrsWhoClaimToBelongToCtr ||
|
||||
Ctr.NumUsrs) // Centre has degrees or users ==> don't remove
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_To_remove_a_centre_you_must_first_remove_all_degrees_and_teachers_in_the_centre);
|
||||
Ale_ShowAlert (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 *****/
|
||||
|
@ -1744,7 +1744,7 @@ void Ctr_RemoveCentre (void)
|
|||
/***** Write message to show the change made *****/
|
||||
sprintf (Gbl.Alert.Txt,Txt_Centre_X_removed,
|
||||
Ctr.FullName);
|
||||
Lay_ShowAlert (Lay_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
}
|
||||
|
||||
/***** Show the form again *****/
|
||||
|
@ -1776,7 +1776,7 @@ void Ctr_ChangeCtrInsInConfig (void)
|
|||
Gbl.CurrentCtr.Ctr.CtrCod,
|
||||
NewIns.InsCod))
|
||||
{
|
||||
Gbl.Alert.Type = Lay_WARNING;
|
||||
Gbl.Alert.Type = Ale_WARNING;
|
||||
sprintf (Gbl.Alert.Txt,Txt_The_centre_X_already_exists,
|
||||
Gbl.CurrentCtr.Ctr.ShrtName);
|
||||
}
|
||||
|
@ -1785,7 +1785,7 @@ void Ctr_ChangeCtrInsInConfig (void)
|
|||
Gbl.CurrentCtr.Ctr.CtrCod,
|
||||
NewIns.InsCod))
|
||||
{
|
||||
Gbl.Alert.Type = Lay_WARNING;
|
||||
Gbl.Alert.Type = Ale_WARNING;
|
||||
sprintf (Gbl.Alert.Txt,Txt_The_centre_X_already_exists,
|
||||
Gbl.CurrentCtr.Ctr.FullName);
|
||||
}
|
||||
|
@ -1800,7 +1800,7 @@ void Ctr_ChangeCtrInsInConfig (void)
|
|||
Hie_InitHierarchy ();
|
||||
|
||||
/***** Write message to show the change made *****/
|
||||
Gbl.Alert.Type = Lay_SUCCESS;
|
||||
Gbl.Alert.Type = Ale_SUCCESS;
|
||||
sprintf (Gbl.Alert.Txt,Txt_The_centre_X_has_been_moved_to_the_institution_Y,
|
||||
Gbl.CurrentCtr.Ctr.FullName,NewIns.FullName);
|
||||
}
|
||||
|
@ -1814,7 +1814,7 @@ void Ctr_ChangeCtrInsInConfig (void)
|
|||
void Ctr_ContEditAfterChgCtrInConfig (void)
|
||||
{
|
||||
/***** Write error/success message *****/
|
||||
Lay_ShowPendingAlert ();
|
||||
Ale_ShowPendingAlert ();
|
||||
|
||||
/***** Show the form again *****/
|
||||
Ctr_ShowConfiguration ();
|
||||
|
@ -1862,7 +1862,7 @@ void Ctr_ChangeCentrePlace (void)
|
|||
|
||||
/***** Write message to show the change made
|
||||
and put button to go to centre changed *****/
|
||||
Gbl.Alert.Type = Lay_SUCCESS;
|
||||
Gbl.Alert.Type = Ale_SUCCESS;
|
||||
sprintf (Gbl.Alert.Txt,"%s",Txt_The_place_of_the_centre_has_changed);
|
||||
Ctr_ShowAlertAndButtonToGoToCtr ();
|
||||
|
||||
|
@ -1942,7 +1942,7 @@ static void Ctr_RenameCentre (struct Centre *Ctr,Cns_ShrtOrFullName_t ShrtOrFull
|
|||
/***** Check if new name is empty *****/
|
||||
if (!NewCtrName[0])
|
||||
{
|
||||
Gbl.Alert.Type = Lay_WARNING;
|
||||
Gbl.Alert.Type = Ale_WARNING;
|
||||
sprintf (Gbl.Alert.Txt,Txt_You_can_not_leave_the_name_of_the_centre_X_empty,
|
||||
CurrentCtrName);
|
||||
}
|
||||
|
@ -1954,7 +1954,7 @@ static void Ctr_RenameCentre (struct Centre *Ctr,Cns_ShrtOrFullName_t ShrtOrFull
|
|||
/***** If degree was in database... *****/
|
||||
if (Ctr_CheckIfCtrNameExistsInIns (ParamName,NewCtrName,Ctr->CtrCod,Gbl.CurrentIns.Ins.InsCod))
|
||||
{
|
||||
Gbl.Alert.Type = Lay_WARNING;
|
||||
Gbl.Alert.Type = Ale_WARNING;
|
||||
sprintf (Gbl.Alert.Txt,Txt_The_centre_X_already_exists,NewCtrName);
|
||||
}
|
||||
else
|
||||
|
@ -1963,7 +1963,7 @@ static void Ctr_RenameCentre (struct Centre *Ctr,Cns_ShrtOrFullName_t ShrtOrFull
|
|||
Ctr_UpdateInsNameDB (Ctr->CtrCod,FieldName,NewCtrName);
|
||||
|
||||
/* Write message to show the change made */
|
||||
Gbl.Alert.Type = Lay_SUCCESS;
|
||||
Gbl.Alert.Type = Ale_SUCCESS;
|
||||
sprintf (Gbl.Alert.Txt,Txt_The_centre_X_has_been_renamed_as_Y,
|
||||
CurrentCtrName,NewCtrName);
|
||||
|
||||
|
@ -1974,7 +1974,7 @@ static void Ctr_RenameCentre (struct Centre *Ctr,Cns_ShrtOrFullName_t ShrtOrFull
|
|||
}
|
||||
else // The same name
|
||||
{
|
||||
Gbl.Alert.Type = Lay_INFO;
|
||||
Gbl.Alert.Type = Ale_INFO;
|
||||
sprintf (Gbl.Alert.Txt,Txt_The_name_of_the_centre_X_has_not_changed,
|
||||
CurrentCtrName);
|
||||
}
|
||||
|
@ -2040,12 +2040,12 @@ void Ctr_ChangeCtrWWW (void)
|
|||
|
||||
/***** Write message to show the change made
|
||||
and put button to go to centre changed *****/
|
||||
Gbl.Alert.Type = Lay_SUCCESS;
|
||||
Gbl.Alert.Type = Ale_SUCCESS;
|
||||
sprintf (Gbl.Alert.Txt,Txt_The_new_web_address_is_X,NewWWW);
|
||||
Ctr_ShowAlertAndButtonToGoToCtr ();
|
||||
}
|
||||
else
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_You_can_not_leave_the_web_address_empty);
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_You_can_not_leave_the_web_address_empty);
|
||||
|
||||
/***** Show the form again *****/
|
||||
Ctr_EditCentres ();
|
||||
|
@ -2071,10 +2071,10 @@ void Ctr_ChangeCtrWWWInConfig (void)
|
|||
|
||||
/***** Write message to show the change made *****/
|
||||
sprintf (Gbl.Alert.Txt,Txt_The_new_web_address_is_X,NewWWW);
|
||||
Lay_ShowAlert (Lay_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
}
|
||||
else
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_You_can_not_leave_the_web_address_empty);
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_You_can_not_leave_the_web_address_empty);
|
||||
|
||||
/***** Show the form again *****/
|
||||
Ctr_ShowConfiguration ();
|
||||
|
@ -2132,7 +2132,7 @@ void Ctr_ChangeCtrStatus (void)
|
|||
|
||||
/***** Write message to show the change made
|
||||
and put button to go to centre changed *****/
|
||||
Gbl.Alert.Type = Lay_SUCCESS;
|
||||
Gbl.Alert.Type = Ale_SUCCESS;
|
||||
sprintf (Gbl.Alert.Txt,Txt_The_status_of_the_centre_X_has_changed,
|
||||
Gbl.Ctrs.EditingCtr.ShrtName);
|
||||
Ctr_ShowAlertAndButtonToGoToCtr ();
|
||||
|
@ -2171,13 +2171,13 @@ static void Ctr_ShowAlertAndButtonToGoToCtr (void)
|
|||
{
|
||||
/***** Alert with button to go to centre *****/
|
||||
sprintf (Gbl.Title,Txt_Go_to_X,Gbl.Ctrs.EditingCtr.ShrtName);
|
||||
Lay_ShowAlertAndButton (Gbl.Alert.Type,Gbl.Alert.Txt,
|
||||
Ale_ShowAlertAndButton (Gbl.Alert.Type,Gbl.Alert.Txt,
|
||||
ActSeeDeg,NULL,Ctr_PutParamGoToCtr,
|
||||
Lay_CONFIRM_BUTTON,Gbl.Title);
|
||||
}
|
||||
else
|
||||
/***** Alert *****/
|
||||
Lay_ShowAlert (Gbl.Alert.Type,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Gbl.Alert.Type,Gbl.Alert.Txt);
|
||||
}
|
||||
|
||||
static void Ctr_PutParamGoToCtr (void)
|
||||
|
@ -2240,7 +2240,7 @@ void Ctr_RequestPhoto (void)
|
|||
Ctr_PHOTO_SAVED_MAX_WIDTH,
|
||||
Ctr_PHOTO_SAVED_MAX_HEIGHT,
|
||||
Txt_XxY_pixels_or_higher);
|
||||
Lay_ShowAlert (Lay_INFO,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_INFO,Gbl.Alert.Txt);
|
||||
|
||||
/***** Upload photo *****/
|
||||
fprintf (Gbl.F.Out,"<label class=\"%s\">"
|
||||
|
@ -2292,7 +2292,7 @@ void Ctr_ReceivePhoto (void)
|
|||
WrongType = true;
|
||||
if (WrongType)
|
||||
{
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_Wrong_file_type);
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_Wrong_file_type);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -2310,14 +2310,14 @@ void Ctr_ReceivePhoto (void)
|
|||
/* Get filename extension */
|
||||
if ((PtrExtension = strrchr (FileNameImgSrc,(int) '.')) == NULL)
|
||||
{
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_Wrong_file_type);
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_Wrong_file_type);
|
||||
return;
|
||||
}
|
||||
LengthExtension = strlen (PtrExtension);
|
||||
if (LengthExtension < Fil_MIN_BYTES_FILE_EXTENSION ||
|
||||
LengthExtension > Fil_MAX_BYTES_FILE_EXTENSION)
|
||||
{
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_Wrong_file_type);
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_Wrong_file_type);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -2327,7 +2327,7 @@ void Ctr_ReceivePhoto (void)
|
|||
Gbl.UniqueNameEncrypted,PtrExtension);
|
||||
if (!Fil_EndReceptionOfFile (FileNameImgTmp,Param))
|
||||
{
|
||||
Lay_ShowAlert (Lay_WARNING,"Error copying file.");
|
||||
Ale_ShowAlert (Ale_WARNING,"Error copying file.");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -2675,7 +2675,7 @@ static void Ctr_RecFormRequestOrCreateCtr (unsigned Status)
|
|||
|
||||
/* Get place */
|
||||
if ((Gbl.Ctrs.EditingCtr.PlcCod = Plc_GetParamPlcCod ()) < 0) // 0 is reserved for "other place"
|
||||
Lay_ShowAlert (Lay_ERROR,"Wrong place.");
|
||||
Ale_ShowAlert (Ale_ERROR,"Wrong place.");
|
||||
|
||||
/* Get centre short name */
|
||||
Par_GetParToText ("ShortName",Gbl.Ctrs.EditingCtr.ShrtName,Hie_MAX_BYTES_SHRT_NAME);
|
||||
|
@ -2696,13 +2696,13 @@ static void Ctr_RecFormRequestOrCreateCtr (unsigned Status)
|
|||
{
|
||||
sprintf (Gbl.Alert.Txt,Txt_The_centre_X_already_exists,
|
||||
Gbl.Ctrs.EditingCtr.ShrtName);
|
||||
Lay_ShowAlert (Lay_WARNING,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
}
|
||||
else if (Ctr_CheckIfCtrNameExistsInIns ("FullName",Gbl.Ctrs.EditingCtr.FullName,-1L,Gbl.CurrentIns.Ins.InsCod))
|
||||
{
|
||||
sprintf (Gbl.Alert.Txt,Txt_The_centre_X_already_exists,
|
||||
Gbl.Ctrs.EditingCtr.FullName);
|
||||
Lay_ShowAlert (Lay_WARNING,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
}
|
||||
else // Add new centre to database
|
||||
Ctr_CreateCentre (Status);
|
||||
|
@ -2710,13 +2710,13 @@ static void Ctr_RecFormRequestOrCreateCtr (unsigned Status)
|
|||
else // If there is not a web
|
||||
{
|
||||
sprintf (Gbl.Alert.Txt,"%s",Txt_You_must_specify_the_web_address_of_the_new_centre);
|
||||
Lay_ShowAlert (Lay_WARNING,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
}
|
||||
}
|
||||
else // If there is not a centre name
|
||||
{
|
||||
sprintf (Gbl.Alert.Txt,"%s",Txt_You_must_specify_the_short_name_and_the_full_name_of_the_new_centre);
|
||||
Lay_ShowAlert (Lay_WARNING,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
}
|
||||
|
||||
/***** Show the form again *****/
|
||||
|
@ -2754,7 +2754,7 @@ static void Ctr_CreateCentre (unsigned Status)
|
|||
|
||||
/***** Write message to show the change made
|
||||
and put button to go to centre created *****/
|
||||
Gbl.Alert.Type = Lay_SUCCESS;
|
||||
Gbl.Alert.Type = Ale_SUCCESS;
|
||||
sprintf (Gbl.Alert.Txt,Txt_Created_new_centre_X,
|
||||
Gbl.Ctrs.EditingCtr.FullName);
|
||||
Ctr_ShowAlertAndButtonToGoToCtr ();
|
||||
|
|
|
@ -235,13 +235,14 @@
|
|||
/****************************** Public constants *****************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
#define Log_PLATFORM_VERSION "SWAD 16.214 (2017-05-10)"
|
||||
#define Log_PLATFORM_VERSION "SWAD 16.215 (2017-05-10)"
|
||||
#define CSS_FILE "swad16.209.3.css"
|
||||
#define JS_FILE "swad16.206.3.js"
|
||||
|
||||
// Number of lines (includes comments but not blank lines) has been got with the following command:
|
||||
// nl swad*.c swad*.h css/swad*.css py/swad*.py js/swad*.js soap/swad*?.h sql/swad*.sql | tail -1
|
||||
/*
|
||||
Version 16.215: May 11, 2017 New module swad_alert for alerts. (218944 lines)
|
||||
Version 16.214: May 11, 2017 Changes in edition of institutions.
|
||||
Code refactoring related to alerts. (218867 lines)
|
||||
Version 16.213: May 11, 2017 Changes in edition of centres. (218881 lines)
|
||||
|
|
|
@ -82,12 +82,12 @@ void Cht_ShowChatRooms (void)
|
|||
sprintf (Gbl.Alert.Txt,Txt_To_use_chat_you_must_have_installed_the_software_X_and_add_Y_,
|
||||
Cfg_JAVA_URL,Cfg_JAVA_NAME,
|
||||
Cfg_PLATFORM_SERVER);
|
||||
Lay_ShowAlert (Lay_INFO,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_INFO,Gbl.Alert.Txt);
|
||||
|
||||
/***** List available chat rooms *****/
|
||||
Cht_ShowListOfAvailableChatRooms ();
|
||||
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_Unfortunately_Firefox_and_Chrome_no_longer_allow_Java_to_run_);
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_Unfortunately_Firefox_and_Chrome_no_longer_allow_Java_to_run_);
|
||||
|
||||
if (Gbl.Usrs.Me.LoggedRole == Rol_SYS_ADM)
|
||||
Cht_ShowListOfChatRoomsWithUsrs ();
|
||||
|
|
|
@ -187,7 +187,7 @@ void Cty_SeeCtyWithPendingInss (void)
|
|||
Lay_EndRoundFrameTable ();
|
||||
}
|
||||
else
|
||||
Lay_ShowAlert (Lay_INFO,Txt_There_are_no_countries_with_requests_for_institutions_to_be_confirmed);
|
||||
Ale_ShowAlert (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);
|
||||
|
@ -1695,7 +1695,7 @@ void Cty_RemoveCountry (void)
|
|||
if (Cty.NumInss ||
|
||||
Cty.NumUsrsWhoClaimToBelongToCty ||
|
||||
Cty.NumUsrs) // Country has institutions or users ==> don't remove
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_You_can_not_remove_a_country_with_institutions_or_users);
|
||||
Ale_ShowAlert (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 *****/
|
||||
|
@ -1709,7 +1709,7 @@ void Cty_RemoveCountry (void)
|
|||
/***** Write message to show the change made *****/
|
||||
sprintf (Gbl.Alert.Txt,Txt_Country_X_removed,
|
||||
Cty.Name[Gbl.Prefs.Language]);
|
||||
Lay_ShowAlert (Lay_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
}
|
||||
|
||||
/***** Show the form again *****/
|
||||
|
@ -1752,7 +1752,7 @@ void Cty_RenameCountry (void)
|
|||
{
|
||||
sprintf (Gbl.Alert.Txt,Txt_You_can_not_leave_the_name_of_the_country_X_empty,
|
||||
Cty->Name[Language]);
|
||||
Lay_ShowAlert (Lay_WARNING,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1764,7 +1764,7 @@ void Cty_RenameCountry (void)
|
|||
{
|
||||
sprintf (Gbl.Alert.Txt,Txt_The_country_X_already_exists,
|
||||
NewCtyName);
|
||||
Lay_ShowAlert (Lay_WARNING,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1775,14 +1775,14 @@ void Cty_RenameCountry (void)
|
|||
/* Write message to show the change made */
|
||||
sprintf (Gbl.Alert.Txt,Txt_The_country_X_has_been_renamed_as_Y,
|
||||
Cty->Name[Language],NewCtyName);
|
||||
Lay_ShowAlert (Lay_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
}
|
||||
}
|
||||
else // The same name
|
||||
{
|
||||
sprintf (Gbl.Alert.Txt,Txt_The_name_of_the_country_X_has_not_changed,
|
||||
Cty->Name[Language]);
|
||||
Lay_ShowAlert (Lay_INFO,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_INFO,Gbl.Alert.Txt);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1886,7 +1886,7 @@ void Cty_ChangeCtyWWW (void)
|
|||
|
||||
/***** Write message to show the change made *****/
|
||||
sprintf (Gbl.Alert.Txt,Txt_The_new_web_address_is_X,NewWWW);
|
||||
Lay_ShowAlert (Lay_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
|
||||
/***** Show the form again *****/
|
||||
Str_Copy (Cty->WWW[Language],NewWWW,
|
||||
|
@ -2091,14 +2091,14 @@ void Cty_RecFormNewCountry (void)
|
|||
/* Get numeric country code */
|
||||
if ((Cty->CtyCod = Cty_GetParamOtherCtyCod ()) < 0)
|
||||
{
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_You_must_specify_the_numerical_code_of_the_new_country);
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_You_must_specify_the_numerical_code_of_the_new_country);
|
||||
CreateCountry = false;
|
||||
}
|
||||
else if (Cty_CheckIfNumericCountryCodeExists (Cty->CtyCod))
|
||||
{
|
||||
sprintf (Gbl.Alert.Txt,Txt_The_numerical_code_X_already_exists,
|
||||
Cty->CtyCod);
|
||||
Lay_ShowAlert (Lay_WARNING,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
CreateCountry = false;
|
||||
}
|
||||
else // Numeric code correct
|
||||
|
@ -2114,7 +2114,7 @@ void Cty_RecFormNewCountry (void)
|
|||
{
|
||||
sprintf (Gbl.Alert.Txt,Txt_The_alphabetical_code_X_is_not_correct,
|
||||
Cty->Alpha2);
|
||||
Lay_ShowAlert (Lay_WARNING,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
CreateCountry = false;
|
||||
}
|
||||
if (CreateCountry)
|
||||
|
@ -2123,7 +2123,7 @@ void Cty_RecFormNewCountry (void)
|
|||
{
|
||||
sprintf (Gbl.Alert.Txt,Txt_The_alphabetical_code_X_already_exists,
|
||||
Cty->Alpha2);
|
||||
Lay_ShowAlert (Lay_WARNING,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
CreateCountry = false;
|
||||
}
|
||||
else // Alphabetic code correct
|
||||
|
@ -2143,14 +2143,14 @@ void Cty_RecFormNewCountry (void)
|
|||
{
|
||||
sprintf (Gbl.Alert.Txt,Txt_The_country_X_already_exists,
|
||||
Cty->Name[Lan]);
|
||||
Lay_ShowAlert (Lay_WARNING,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
CreateCountry = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
else // If there is not a country name
|
||||
{
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_You_must_specify_the_name_of_the_new_country_in_all_languages);
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_You_must_specify_the_name_of_the_new_country_in_all_languages);
|
||||
CreateCountry = false;
|
||||
break;
|
||||
}
|
||||
|
@ -2234,7 +2234,7 @@ static void Cty_CreateCountry (struct Country *Cty)
|
|||
/***** Write success message *****/
|
||||
sprintf (Gbl.Alert.Txt,Txt_Created_new_country_X,
|
||||
Cty->Name);
|
||||
Lay_ShowAlert (Lay_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
|
@ -1146,7 +1146,7 @@ static void Crs_ListCourses (void)
|
|||
Lay_EndTable ();
|
||||
}
|
||||
else // No courses created in the current degree
|
||||
Lay_ShowAlert (Lay_INFO,Txt_No_courses);
|
||||
Ale_ShowAlert (Ale_INFO,Txt_No_courses);
|
||||
|
||||
/***** Button to create course *****/
|
||||
if (Crs_CheckIfICanCreateCourses ())
|
||||
|
@ -1845,14 +1845,14 @@ static void Crs_RecFormRequestOrCreateCrs (unsigned Status)
|
|||
if (Crs_CheckIfCrsNameExistsInYearOfDeg ("ShortName",Gbl.Degs.EditingCrs.ShrtName,-1L,
|
||||
Gbl.Degs.EditingCrs.DegCod,Gbl.Degs.EditingCrs.Year))
|
||||
{
|
||||
Gbl.Alert.Type = Lay_WARNING;
|
||||
Gbl.Alert.Type = Ale_WARNING;
|
||||
sprintf (Gbl.Alert.Txt,Txt_The_course_X_already_exists,
|
||||
Gbl.Degs.EditingCrs.ShrtName);
|
||||
}
|
||||
else if (Crs_CheckIfCrsNameExistsInYearOfDeg ("FullName",Gbl.Degs.EditingCrs.FullName,-1L,
|
||||
Gbl.Degs.EditingCrs.DegCod,Gbl.Degs.EditingCrs.Year))
|
||||
{
|
||||
Gbl.Alert.Type = Lay_WARNING;
|
||||
Gbl.Alert.Type = Ale_WARNING;
|
||||
sprintf (Gbl.Alert.Txt,Txt_The_course_X_already_exists,
|
||||
Gbl.Degs.EditingCrs.FullName);
|
||||
}
|
||||
|
@ -1861,13 +1861,13 @@ static void Crs_RecFormRequestOrCreateCrs (unsigned Status)
|
|||
}
|
||||
else // If there is not a course name
|
||||
{
|
||||
Gbl.Alert.Type = Lay_WARNING;
|
||||
Gbl.Alert.Type = Ale_WARNING;
|
||||
sprintf (Gbl.Alert.Txt,"%s",Txt_You_must_specify_the_short_name_and_the_full_name_of_the_new_course);
|
||||
}
|
||||
}
|
||||
else // Year not valid
|
||||
{
|
||||
Gbl.Alert.Type = Lay_WARNING;
|
||||
Gbl.Alert.Type = Ale_WARNING;
|
||||
sprintf (Gbl.Alert.Txt,Txt_The_year_X_is_not_allowed,
|
||||
Gbl.Degs.EditingCrs.Year);
|
||||
}
|
||||
|
@ -1921,7 +1921,7 @@ static void Crs_CreateCourse (unsigned Status)
|
|||
Gbl.Degs.EditingCrs.CrsCod = DB_QueryINSERTandReturnCode (Query,"can not create a new course");
|
||||
|
||||
/***** Create success message *****/
|
||||
Gbl.Alert.Type = Lay_SUCCESS;
|
||||
Gbl.Alert.Type = Ale_SUCCESS;
|
||||
sprintf (Gbl.Alert.Txt,Txt_Created_new_course_X,
|
||||
Gbl.Degs.EditingCrs.FullName);
|
||||
}
|
||||
|
@ -1947,7 +1947,7 @@ void Crs_RemoveCourse (void)
|
|||
{
|
||||
/***** Check if this course has users *****/
|
||||
if (Crs.NumUsrs) // Course has users ==> don't remove
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_To_remove_a_course_you_must_first_remove_all_users_in_the_course);
|
||||
Ale_ShowAlert (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 *****/
|
||||
|
@ -1956,11 +1956,11 @@ void Crs_RemoveCourse (void)
|
|||
/***** Write message to show the change made *****/
|
||||
sprintf (Gbl.Alert.Txt,Txt_Course_X_removed,
|
||||
Crs.FullName);
|
||||
Lay_ShowAlert (Lay_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
}
|
||||
}
|
||||
else
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_You_dont_have_permission_to_edit_this_course);
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_You_dont_have_permission_to_edit_this_course);
|
||||
|
||||
/***** Show the form again *****/
|
||||
Crs_EditCourses ();
|
||||
|
@ -2299,20 +2299,20 @@ void Crs_ChangeInsCrsCod (void)
|
|||
if (strcmp (NewInstitutionalCrsCod,Gbl.Degs.EditingCrs.InstitutionalCrsCod))
|
||||
{
|
||||
Crs_UpdateInstitutionalCrsCod (&Gbl.Degs.EditingCrs,NewInstitutionalCrsCod);
|
||||
Gbl.Alert.Type = Lay_SUCCESS;
|
||||
Gbl.Alert.Type = Ale_SUCCESS;
|
||||
sprintf (Gbl.Alert.Txt,Txt_The_institutional_code_of_the_course_X_has_changed_to_Y,
|
||||
Gbl.Degs.EditingCrs.ShrtName,NewInstitutionalCrsCod);
|
||||
}
|
||||
else // The same institutional code
|
||||
{
|
||||
Gbl.Alert.Type = Lay_INFO;
|
||||
Gbl.Alert.Type = Ale_INFO;
|
||||
sprintf (Gbl.Alert.Txt,Txt_The_institutional_code_of_the_course_X_has_not_changed,
|
||||
Gbl.Degs.EditingCrs.ShrtName);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Gbl.Alert.Type = Lay_WARNING;
|
||||
Gbl.Alert.Type = Ale_WARNING;
|
||||
sprintf (Gbl.Alert.Txt,"%s",Txt_You_dont_have_permission_to_edit_this_course);
|
||||
}
|
||||
}
|
||||
|
@ -2341,14 +2341,14 @@ void Crs_ChangeCrsDegInConfig (void)
|
|||
if (Crs_CheckIfCrsNameExistsInYearOfDeg ("ShortName",Gbl.CurrentCrs.Crs.ShrtName,-1L,
|
||||
NewDeg.DegCod,Gbl.CurrentCrs.Crs.Year))
|
||||
{
|
||||
Gbl.Alert.Type = Lay_WARNING;
|
||||
Gbl.Alert.Type = Ale_WARNING;
|
||||
sprintf (Gbl.Alert.Txt,Txt_In_the_year_X_of_the_degree_Y_already_existed_a_course_with_the_name_Z,
|
||||
Txt_YEAR_OF_DEGREE[Gbl.CurrentCrs.Crs.Year],NewDeg.FullName,Gbl.CurrentCrs.Crs.ShrtName);
|
||||
}
|
||||
else if (Crs_CheckIfCrsNameExistsInYearOfDeg ("FullName",Gbl.CurrentCrs.Crs.FullName,-1L,
|
||||
NewDeg.DegCod,Gbl.CurrentCrs.Crs.Year))
|
||||
{
|
||||
Gbl.Alert.Type = Lay_WARNING;
|
||||
Gbl.Alert.Type = Ale_WARNING;
|
||||
sprintf (Gbl.Alert.Txt,Txt_In_the_year_X_of_the_degree_Y_already_existed_a_course_with_the_name_Z,
|
||||
Txt_YEAR_OF_DEGREE[Gbl.CurrentCrs.Crs.Year],NewDeg.FullName,Gbl.CurrentCrs.Crs.FullName);
|
||||
}
|
||||
|
@ -2363,7 +2363,7 @@ void Crs_ChangeCrsDegInConfig (void)
|
|||
Hie_InitHierarchy ();
|
||||
|
||||
/***** Create message to show the change made *****/
|
||||
Gbl.Alert.Type = Lay_SUCCESS;
|
||||
Gbl.Alert.Type = Ale_SUCCESS;
|
||||
sprintf (Gbl.Alert.Txt,Txt_The_course_X_has_been_moved_to_the_degree_Y,
|
||||
Gbl.CurrentCrs.Crs.FullName,
|
||||
Gbl.CurrentDeg.Deg.FullName);
|
||||
|
@ -2378,7 +2378,7 @@ void Crs_ChangeCrsDegInConfig (void)
|
|||
void Crs_ContEditAfterChgCrsInConfig (void)
|
||||
{
|
||||
/***** Write error/success message *****/
|
||||
Lay_ShowPendingAlert ();
|
||||
Ale_ShowPendingAlert ();
|
||||
|
||||
/***** Show the form again *****/
|
||||
Crs_ShowIntroduction ();
|
||||
|
@ -2421,14 +2421,14 @@ void Crs_ChangeCrsYearInConfig (void)
|
|||
if (Crs_CheckIfCrsNameExistsInYearOfDeg ("ShortName",Gbl.CurrentCrs.Crs.ShrtName,-1L,
|
||||
Gbl.CurrentCrs.Crs.DegCod,NewYear))
|
||||
{
|
||||
Gbl.Alert.Type = Lay_WARNING;
|
||||
Gbl.Alert.Type = Ale_WARNING;
|
||||
sprintf (Gbl.Alert.Txt,Txt_The_course_X_already_exists_in_year_Y,
|
||||
Gbl.CurrentCrs.Crs.ShrtName,Txt_YEAR_OF_DEGREE[NewYear]);
|
||||
}
|
||||
else if (Crs_CheckIfCrsNameExistsInYearOfDeg ("FullName",Gbl.CurrentCrs.Crs.FullName,-1L,
|
||||
Gbl.CurrentCrs.Crs.DegCod,NewYear))
|
||||
{
|
||||
Gbl.Alert.Type = Lay_WARNING;
|
||||
Gbl.Alert.Type = Ale_WARNING;
|
||||
sprintf (Gbl.Alert.Txt,Txt_The_course_X_already_exists_in_year_Y,
|
||||
Gbl.CurrentCrs.Crs.FullName,Txt_YEAR_OF_DEGREE[NewYear]);
|
||||
}
|
||||
|
@ -2438,14 +2438,14 @@ void Crs_ChangeCrsYearInConfig (void)
|
|||
Crs_UpdateCrsYear (&Gbl.CurrentCrs.Crs,NewYear);
|
||||
|
||||
/***** Create message to show the change made *****/
|
||||
Gbl.Alert.Type = Lay_SUCCESS;
|
||||
Gbl.Alert.Type = Ale_SUCCESS;
|
||||
sprintf (Gbl.Alert.Txt,Txt_The_year_of_the_course_X_has_changed,
|
||||
Gbl.CurrentCrs.Crs.ShrtName);
|
||||
}
|
||||
}
|
||||
else // Year not valid
|
||||
{
|
||||
Gbl.Alert.Type = Lay_WARNING;
|
||||
Gbl.Alert.Type = Ale_WARNING;
|
||||
sprintf (Gbl.Alert.Txt,Txt_The_year_X_is_not_allowed,NewYear);
|
||||
}
|
||||
}
|
||||
|
@ -2486,14 +2486,14 @@ void Crs_ChangeCrsYear (void)
|
|||
if (Crs_CheckIfCrsNameExistsInYearOfDeg ("ShortName",Gbl.Degs.EditingCrs.ShrtName,-1L,
|
||||
Gbl.Degs.EditingCrs.DegCod,NewYear))
|
||||
{
|
||||
Gbl.Alert.Type = Lay_WARNING;
|
||||
Gbl.Alert.Type = Ale_WARNING;
|
||||
sprintf (Gbl.Alert.Txt,Txt_The_course_X_already_exists_in_year_Y,
|
||||
Gbl.Degs.EditingCrs.ShrtName,Txt_YEAR_OF_DEGREE[NewYear]);
|
||||
}
|
||||
else if (Crs_CheckIfCrsNameExistsInYearOfDeg ("FullName",Gbl.Degs.EditingCrs.FullName,-1L,
|
||||
Gbl.Degs.EditingCrs.DegCod,NewYear))
|
||||
{
|
||||
Gbl.Alert.Type = Lay_WARNING;
|
||||
Gbl.Alert.Type = Ale_WARNING;
|
||||
sprintf (Gbl.Alert.Txt,Txt_The_course_X_already_exists_in_year_Y,
|
||||
Gbl.Degs.EditingCrs.FullName,Txt_YEAR_OF_DEGREE[NewYear]);
|
||||
}
|
||||
|
@ -2503,20 +2503,20 @@ void Crs_ChangeCrsYear (void)
|
|||
Crs_UpdateCrsYear (&Gbl.Degs.EditingCrs,NewYear);
|
||||
|
||||
/***** Create message to show the change made *****/
|
||||
Gbl.Alert.Type = Lay_SUCCESS;
|
||||
Gbl.Alert.Type = Ale_SUCCESS;
|
||||
sprintf (Gbl.Alert.Txt,Txt_The_year_of_the_course_X_has_changed,
|
||||
Gbl.Degs.EditingCrs.ShrtName);
|
||||
}
|
||||
}
|
||||
else // Year not valid
|
||||
{
|
||||
Gbl.Alert.Type = Lay_WARNING;
|
||||
Gbl.Alert.Type = Ale_WARNING;
|
||||
sprintf (Gbl.Alert.Txt,Txt_The_year_X_is_not_allowed,NewYear);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Gbl.Alert.Type = Lay_WARNING;
|
||||
Gbl.Alert.Type = Ale_WARNING;
|
||||
sprintf (Gbl.Alert.Txt,"%s",Txt_You_dont_have_permission_to_edit_this_course);
|
||||
}
|
||||
}
|
||||
|
@ -2631,7 +2631,7 @@ static void Crs_RenameCourse (struct Course *Crs,Cns_ShrtOrFullName_t ShrtOrFull
|
|||
/***** Check if new name is empty *****/
|
||||
if (!NewCrsName[0])
|
||||
{
|
||||
Gbl.Alert.Type = Lay_WARNING;
|
||||
Gbl.Alert.Type = Ale_WARNING;
|
||||
sprintf (Gbl.Alert.Txt,Txt_You_can_not_leave_the_name_of_the_course_X_empty,
|
||||
CurrentCrsName);
|
||||
}
|
||||
|
@ -2644,7 +2644,7 @@ static void Crs_RenameCourse (struct Course *Crs,Cns_ShrtOrFullName_t ShrtOrFull
|
|||
if (Crs_CheckIfCrsNameExistsInYearOfDeg (ParamName,NewCrsName,Crs->CrsCod,
|
||||
Crs->DegCod,Crs->Year))
|
||||
{
|
||||
Gbl.Alert.Type = Lay_WARNING;
|
||||
Gbl.Alert.Type = Ale_WARNING;
|
||||
sprintf (Gbl.Alert.Txt,Txt_The_course_X_already_exists,
|
||||
NewCrsName);
|
||||
}
|
||||
|
@ -2654,7 +2654,7 @@ static void Crs_RenameCourse (struct Course *Crs,Cns_ShrtOrFullName_t ShrtOrFull
|
|||
Crs_UpdateCrsNameDB (Crs->CrsCod,FieldName,NewCrsName);
|
||||
|
||||
/* Create message to show the change made */
|
||||
Gbl.Alert.Type = Lay_SUCCESS;
|
||||
Gbl.Alert.Type = Ale_SUCCESS;
|
||||
sprintf (Gbl.Alert.Txt,Txt_The_name_of_the_course_X_has_changed_to_Y,
|
||||
CurrentCrsName,NewCrsName);
|
||||
|
||||
|
@ -2665,7 +2665,7 @@ static void Crs_RenameCourse (struct Course *Crs,Cns_ShrtOrFullName_t ShrtOrFull
|
|||
}
|
||||
else // The same name
|
||||
{
|
||||
Gbl.Alert.Type = Lay_INFO;
|
||||
Gbl.Alert.Type = Ale_INFO;
|
||||
sprintf (Gbl.Alert.Txt,Txt_The_name_of_the_course_X_has_not_changed,
|
||||
CurrentCrsName);
|
||||
}
|
||||
|
@ -2673,7 +2673,7 @@ static void Crs_RenameCourse (struct Course *Crs,Cns_ShrtOrFullName_t ShrtOrFull
|
|||
}
|
||||
else
|
||||
{
|
||||
Gbl.Alert.Type = Lay_WARNING;
|
||||
Gbl.Alert.Type = Ale_WARNING;
|
||||
sprintf (Gbl.Alert.Txt,"%s",Txt_You_dont_have_permission_to_edit_this_course);
|
||||
}
|
||||
}
|
||||
|
@ -2758,9 +2758,9 @@ void Crs_ContEditAfterChgCrs (void)
|
|||
bool PutButtonToRequestRegistration;
|
||||
|
||||
/***** Start alert *****/
|
||||
Lay_ShowAlertAndButton1 (Gbl.Alert.Type,Gbl.Alert.Txt);
|
||||
Ale_ShowAlertAndButton1 (Gbl.Alert.Type,Gbl.Alert.Txt);
|
||||
|
||||
if (Gbl.Alert.Type == Lay_SUCCESS)
|
||||
if (Gbl.Alert.Type == Ale_SUCCESS)
|
||||
{
|
||||
/***** Put button to go to course changed *****/
|
||||
Crs_PutButtonToGoToCrs ();
|
||||
|
@ -2793,7 +2793,7 @@ void Crs_ContEditAfterChgCrs (void)
|
|||
}
|
||||
|
||||
/***** End alert *****/
|
||||
Lay_ShowAlertAndButton2 (ActUnk,NULL,NULL,Lay_NO_BUTTON,NULL);
|
||||
Ale_ShowAlertAndButton2 (ActUnk,NULL,NULL,Lay_NO_BUTTON,NULL);
|
||||
|
||||
/***** Show the form again *****/
|
||||
Crs_EditCourses ();
|
||||
|
@ -3366,7 +3366,7 @@ void Crs_RemoveOldCrss (void)
|
|||
NumCrss,
|
||||
MonthsWithoutAccess,
|
||||
Cfg_PLATFORM_SHORT_NAME);
|
||||
Lay_ShowAlert (Lay_INFO,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_INFO,Gbl.Alert.Txt);
|
||||
|
||||
/***** Remove courses *****/
|
||||
for (NumCrs = 0;
|
||||
|
@ -3386,5 +3386,5 @@ void Crs_RemoveOldCrss (void)
|
|||
/***** Write end message *****/
|
||||
sprintf (Gbl.Alert.Txt,Txt_X_courses_have_been_eliminated,
|
||||
NumCrssRemoved);
|
||||
Lay_ShowAlert (Lay_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
}
|
||||
|
|
|
@ -82,7 +82,7 @@ void DB_CreateTablesIfNotExist (void)
|
|||
extern const char *Txt_Created_tables_in_the_database_that_did_not_exist;
|
||||
|
||||
/***** Information message *****/
|
||||
Lay_ShowAlert (Lay_INFO,Txt_Creating_database_tables_if_they_do_not_exist);
|
||||
Ale_ShowAlert (Ale_INFO,Txt_Creating_database_tables_if_they_do_not_exist);
|
||||
fprintf (Gbl.F.Out,"<ol>");
|
||||
|
||||
/***** Table IP_prefs *****/
|
||||
|
@ -2847,7 +2847,7 @@ mysql> DESCRIBE ws_keys;
|
|||
|
||||
/***** Show success message *****/
|
||||
fprintf (Gbl.F.Out,"</ol>");
|
||||
Lay_ShowAlert (Lay_SUCCESS,Txt_Created_tables_in_the_database_that_did_not_exist);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Txt_Created_tables_in_the_database_that_did_not_exist);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
|
@ -217,7 +217,7 @@ void Deg_SeeDegWithPendingCrss (void)
|
|||
Lay_EndRoundFrameTable ();
|
||||
}
|
||||
else
|
||||
Lay_ShowAlert (Lay_INFO,Txt_There_are_no_degrees_with_requests_for_courses_to_be_confirmed);
|
||||
Ale_ShowAlert (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);
|
||||
|
@ -1144,7 +1144,7 @@ static void Deg_CreateDegree (unsigned Status)
|
|||
|
||||
/***** Write message to show the change made
|
||||
and put button to go to degree created *****/
|
||||
Gbl.Alert.Type = Lay_SUCCESS;
|
||||
Gbl.Alert.Type = Ale_SUCCESS;
|
||||
sprintf (Gbl.Alert.Txt,Txt_Created_new_degree_X,
|
||||
Gbl.Degs.EditingDeg.FullName);
|
||||
Deg_ShowAlertAndButtonToGoToDeg ();
|
||||
|
@ -1184,7 +1184,7 @@ static void Deg_ListDegrees (void)
|
|||
Lay_EndTable ();
|
||||
}
|
||||
else // No degrees created in the current centre
|
||||
Lay_ShowAlert (Lay_INFO,Txt_No_degrees);
|
||||
Ale_ShowAlert (Ale_INFO,Txt_No_degrees);
|
||||
|
||||
/***** Button to create degree *****/
|
||||
if (Deg_CheckIfICanCreateDegrees ())
|
||||
|
@ -1359,7 +1359,7 @@ void Deg_EditDegrees (void)
|
|||
else // No degree types
|
||||
{
|
||||
/***** Warning message *****/
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_No_types_of_degree);
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_No_types_of_degree);
|
||||
|
||||
/***** Form to create the first degree type *****/
|
||||
if (DT_CheckIfICanCreateDegreeTypes ())
|
||||
|
@ -1540,7 +1540,7 @@ static void Deg_RecFormRequestOrCreateDeg (unsigned Status)
|
|||
|
||||
/* Get degree type */
|
||||
if ((Gbl.Degs.EditingDeg.DegTypCod = DT_GetParamOtherDegTypCod ()) <= 0)
|
||||
Lay_ShowAlert (Lay_ERROR,"Wrong type of degree.");
|
||||
Ale_ShowAlert (Ale_ERROR,"Wrong type of degree.");
|
||||
|
||||
/* Get degree WWW */
|
||||
Par_GetParToText ("WWW",Gbl.Degs.EditingDeg.WWW,Cns_MAX_BYTES_WWW);
|
||||
|
@ -1555,13 +1555,13 @@ static void Deg_RecFormRequestOrCreateDeg (unsigned Status)
|
|||
{
|
||||
sprintf (Gbl.Alert.Txt,Txt_The_degree_X_already_exists,
|
||||
Gbl.Degs.EditingDeg.ShrtName);
|
||||
Lay_ShowAlert (Lay_WARNING,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
}
|
||||
else if (Deg_CheckIfDegNameExistsInCtr ("FullName",Gbl.Degs.EditingDeg.FullName,-1L,Gbl.Degs.EditingDeg.CtrCod))
|
||||
{
|
||||
sprintf (Gbl.Alert.Txt,Txt_The_degree_X_already_exists,
|
||||
Gbl.Degs.EditingDeg.FullName);
|
||||
Lay_ShowAlert (Lay_WARNING,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
}
|
||||
else // Add new degree to database
|
||||
Deg_CreateDegree (Status);
|
||||
|
@ -1569,13 +1569,13 @@ static void Deg_RecFormRequestOrCreateDeg (unsigned Status)
|
|||
else // If there is not a degree logo or web
|
||||
{
|
||||
sprintf (Gbl.Alert.Txt,"%s",Txt_You_must_specify_the_web_address_of_the_new_degree);
|
||||
Lay_ShowAlert (Lay_WARNING,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
}
|
||||
}
|
||||
else // If there is not a degree name
|
||||
{
|
||||
sprintf (Gbl.Alert.Txt,"%s",Txt_You_must_specify_the_short_name_and_the_full_name_of_the_new_degree);
|
||||
Lay_ShowAlert (Lay_WARNING,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
}
|
||||
|
||||
/***** Show the form again *****/
|
||||
|
@ -1600,7 +1600,7 @@ void Deg_RemoveDegree (void)
|
|||
|
||||
/***** Check if this degree has courses *****/
|
||||
if (Crs_GetNumCrssInDeg (Deg.DegCod)) // Degree has courses ==> don't remove
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_To_remove_a_degree_you_must_first_remove_all_courses_in_the_degree);
|
||||
Ale_ShowAlert (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 *****/
|
||||
|
@ -1609,7 +1609,7 @@ void Deg_RemoveDegree (void)
|
|||
/***** Write message to show the change made *****/
|
||||
sprintf (Gbl.Alert.Txt,Txt_Degree_X_removed,
|
||||
Deg.FullName);
|
||||
Lay_ShowAlert (Lay_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
}
|
||||
|
||||
/***** Show the form again *****/
|
||||
|
@ -1964,7 +1964,7 @@ static void Deg_RenameDegree (struct Degree *Deg,Cns_ShrtOrFullName_t ShrtOrFull
|
|||
/***** Check if new name is empty *****/
|
||||
if (!NewDegName[0])
|
||||
{
|
||||
Gbl.Alert.Type = Lay_WARNING;
|
||||
Gbl.Alert.Type = Ale_WARNING;
|
||||
sprintf (Gbl.Alert.Txt,Txt_You_can_not_leave_the_name_of_the_degree_X_empty,
|
||||
CurrentDegName);
|
||||
}
|
||||
|
@ -1976,7 +1976,7 @@ static void Deg_RenameDegree (struct Degree *Deg,Cns_ShrtOrFullName_t ShrtOrFull
|
|||
/***** If degree was in database... *****/
|
||||
if (Deg_CheckIfDegNameExistsInCtr (ParamName,NewDegName,Deg->DegCod,Deg->CtrCod))
|
||||
{
|
||||
Gbl.Alert.Type = Lay_WARNING;
|
||||
Gbl.Alert.Type = Ale_WARNING;
|
||||
sprintf (Gbl.Alert.Txt,Txt_The_degree_X_already_exists,NewDegName);
|
||||
}
|
||||
else
|
||||
|
@ -1985,7 +1985,7 @@ static void Deg_RenameDegree (struct Degree *Deg,Cns_ShrtOrFullName_t ShrtOrFull
|
|||
Deg_UpdateDegNameDB (Deg->DegCod,FieldName,NewDegName);
|
||||
|
||||
/* Write message to show the change made */
|
||||
Gbl.Alert.Type = Lay_SUCCESS;
|
||||
Gbl.Alert.Type = Ale_SUCCESS;
|
||||
sprintf (Gbl.Alert.Txt,Txt_The_name_of_the_degree_X_has_changed_to_Y,
|
||||
CurrentDegName,NewDegName);
|
||||
|
||||
|
@ -1996,7 +1996,7 @@ static void Deg_RenameDegree (struct Degree *Deg,Cns_ShrtOrFullName_t ShrtOrFull
|
|||
}
|
||||
else // The same name
|
||||
{
|
||||
Gbl.Alert.Type = Lay_INFO;
|
||||
Gbl.Alert.Type = Ale_INFO;
|
||||
sprintf (Gbl.Alert.Txt,Txt_The_name_of_the_degree_X_has_not_changed,
|
||||
CurrentDegName);
|
||||
}
|
||||
|
@ -2054,13 +2054,13 @@ void Deg_ChangeDegCtrInConfig (void)
|
|||
/***** Check if it already exists a degree with the same name in the new centre *****/
|
||||
if (Deg_CheckIfDegNameExistsInCtr ("ShortName",Gbl.CurrentDeg.Deg.ShrtName,Gbl.CurrentDeg.Deg.DegCod,NewCtr.CtrCod))
|
||||
{
|
||||
Gbl.Alert.Type = Lay_WARNING;
|
||||
Gbl.Alert.Type = Ale_WARNING;
|
||||
sprintf (Gbl.Alert.Txt,Txt_The_degree_X_already_exists,
|
||||
Gbl.CurrentDeg.Deg.ShrtName);
|
||||
}
|
||||
else if (Deg_CheckIfDegNameExistsInCtr ("FullName",Gbl.CurrentDeg.Deg.FullName,Gbl.CurrentDeg.Deg.DegCod,NewCtr.CtrCod))
|
||||
{
|
||||
Gbl.Alert.Type = Lay_WARNING;
|
||||
Gbl.Alert.Type = Ale_WARNING;
|
||||
sprintf (Gbl.Alert.Txt,Txt_The_degree_X_already_exists,
|
||||
Gbl.CurrentDeg.Deg.FullName);
|
||||
}
|
||||
|
@ -2075,7 +2075,7 @@ void Deg_ChangeDegCtrInConfig (void)
|
|||
Hie_InitHierarchy ();
|
||||
|
||||
/***** Create message to show the change made *****/
|
||||
Gbl.Alert.Type = Lay_SUCCESS;
|
||||
Gbl.Alert.Type = Ale_SUCCESS;
|
||||
sprintf (Gbl.Alert.Txt,Txt_The_degree_X_has_been_moved_to_the_centre_Y,
|
||||
Gbl.CurrentDeg.Deg.FullName,
|
||||
Gbl.CurrentCtr.Ctr.FullName);
|
||||
|
@ -2090,7 +2090,7 @@ void Deg_ChangeDegCtrInConfig (void)
|
|||
void Deg_ContEditAfterChgDegInConfig (void)
|
||||
{
|
||||
/***** Write success / warning message *****/
|
||||
Lay_ShowPendingAlert ();
|
||||
Ale_ShowPendingAlert ();
|
||||
|
||||
/***** Show the form again *****/
|
||||
Deg_ShowConfiguration ();
|
||||
|
@ -2140,12 +2140,12 @@ void Deg_ChangeDegWWW (void)
|
|||
|
||||
/***** Write message to show the change made
|
||||
and put button to go to degree changed *****/
|
||||
Gbl.Alert.Type = Lay_SUCCESS;
|
||||
Gbl.Alert.Type = Ale_SUCCESS;
|
||||
sprintf (Gbl.Alert.Txt,Txt_The_new_web_address_is_X,NewWWW);
|
||||
Deg_ShowAlertAndButtonToGoToDeg ();
|
||||
}
|
||||
else
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_You_can_not_leave_the_web_address_empty);
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_You_can_not_leave_the_web_address_empty);
|
||||
|
||||
/***** Show the form again *****/
|
||||
Deg_EditDegrees ();
|
||||
|
@ -2171,10 +2171,10 @@ void Deg_ChangeDegWWWInConfig (void)
|
|||
|
||||
/***** Write message to show the change made *****/
|
||||
sprintf (Gbl.Alert.Txt,Txt_The_new_web_address_is_X,NewWWW);
|
||||
Lay_ShowAlert (Lay_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
}
|
||||
else
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_You_can_not_leave_the_web_address_empty);
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_You_can_not_leave_the_web_address_empty);
|
||||
|
||||
/***** Show the form again *****/
|
||||
Deg_ShowConfiguration ();
|
||||
|
@ -2232,7 +2232,7 @@ void Deg_ChangeDegStatus (void)
|
|||
|
||||
/***** Write message to show the change made
|
||||
and put button to go to degree changed *****/
|
||||
Gbl.Alert.Type = Lay_SUCCESS;
|
||||
Gbl.Alert.Type = Ale_SUCCESS;
|
||||
sprintf (Gbl.Alert.Txt,Txt_The_status_of_the_degree_X_has_changed,
|
||||
Gbl.Degs.EditingDeg.ShrtName);
|
||||
Deg_ShowAlertAndButtonToGoToDeg ();
|
||||
|
@ -2271,13 +2271,13 @@ void Deg_ShowAlertAndButtonToGoToDeg (void)
|
|||
{
|
||||
/***** Alert with button to go to degree *****/
|
||||
sprintf (Gbl.Title,Txt_Go_to_X,Gbl.Degs.EditingDeg.ShrtName);
|
||||
Lay_ShowAlertAndButton (Gbl.Alert.Type,Gbl.Alert.Txt,
|
||||
Ale_ShowAlertAndButton (Gbl.Alert.Type,Gbl.Alert.Txt,
|
||||
ActSeeCrs,NULL,Deg_PutParamGoToDeg,
|
||||
Lay_CONFIRM_BUTTON,Gbl.Title);
|
||||
}
|
||||
else
|
||||
/***** Alert *****/
|
||||
Lay_ShowAlert (Gbl.Alert.Type,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Gbl.Alert.Type,Gbl.Alert.Txt);
|
||||
}
|
||||
|
||||
static void Deg_PutParamGoToDeg (void)
|
||||
|
|
|
@ -232,7 +232,7 @@ static void DT_ListDegreeTypes (Act_Action_t NextAction,DT_Order_t SelectedOrder
|
|||
Lay_EndTable ();
|
||||
}
|
||||
else // No degree types created
|
||||
Lay_ShowAlert (Lay_INFO,Txt_No_types_of_degree);
|
||||
Ale_ShowAlert (Ale_INFO,Txt_No_types_of_degree);
|
||||
|
||||
/***** Button to create degree type *****/
|
||||
if (DT_CheckIfICanCreateDegreeTypes ())
|
||||
|
@ -551,7 +551,7 @@ static void DT_CreateDegreeType (struct DegreeType *DegTyp)
|
|||
/***** Write success message *****/
|
||||
sprintf (Gbl.Alert.Txt,Txt_Created_new_type_of_degree_X,
|
||||
DegTyp->DegTypName);
|
||||
Lay_ShowAlert (Lay_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -720,7 +720,7 @@ void DT_RecFormNewDegreeType (void)
|
|||
{
|
||||
sprintf (Gbl.Alert.Txt,Txt_The_type_of_degree_X_already_exists,
|
||||
DegTyp->DegTypName);
|
||||
Lay_ShowAlert (Lay_WARNING,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
}
|
||||
else // Add new degree type to database
|
||||
DT_CreateDegreeType (DegTyp);
|
||||
|
@ -728,7 +728,7 @@ void DT_RecFormNewDegreeType (void)
|
|||
else // If there is not a degree type name
|
||||
{
|
||||
sprintf (Gbl.Alert.Txt,"%s",Txt_You_must_specify_the_name_of_the_new_type_of_degree);
|
||||
Lay_ShowAlert (Lay_WARNING,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
}
|
||||
|
||||
/***** Show the form again *****/
|
||||
|
@ -755,7 +755,7 @@ void DT_RemoveDegreeType (void)
|
|||
|
||||
/***** Check if this degree type has degrees *****/
|
||||
if (DegTyp.NumDegs) // Degree type has degrees => don't remove
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_To_remove_a_type_of_degree_you_must_first_remove_all_degrees_of_that_type);
|
||||
Ale_ShowAlert (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 *****/
|
||||
|
@ -764,7 +764,7 @@ void DT_RemoveDegreeType (void)
|
|||
/***** Write message to show the change made *****/
|
||||
sprintf (Gbl.Alert.Txt,Txt_Type_of_degree_X_removed,
|
||||
DegTyp.DegTypName);
|
||||
Lay_ShowAlert (Lay_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
}
|
||||
|
||||
/***** Show the form again *****/
|
||||
|
@ -934,7 +934,7 @@ void DT_RenameDegreeType (void)
|
|||
{
|
||||
sprintf (Gbl.Alert.Txt,Txt_You_can_not_leave_the_name_of_the_type_of_degree_X_empty,
|
||||
DegTyp->DegTypName);
|
||||
Lay_ShowAlert (Lay_WARNING,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -946,7 +946,7 @@ void DT_RenameDegreeType (void)
|
|||
{
|
||||
sprintf (Gbl.Alert.Txt,Txt_The_type_of_degree_X_already_exists,
|
||||
NewNameDegTyp);
|
||||
Lay_ShowAlert (Lay_WARNING,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -959,14 +959,14 @@ void DT_RenameDegreeType (void)
|
|||
/* Write message to show the change made */
|
||||
sprintf (Gbl.Alert.Txt,Txt_The_type_of_degree_X_has_been_renamed_as_Y,
|
||||
DegTyp->DegTypName,NewNameDegTyp);
|
||||
Lay_ShowAlert (Lay_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
}
|
||||
}
|
||||
else // The same name
|
||||
{
|
||||
sprintf (Gbl.Alert.Txt,Txt_The_name_of_the_type_of_degree_X_has_not_changed,
|
||||
NewNameDegTyp);
|
||||
Lay_ShowAlert (Lay_INFO,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_INFO,Gbl.Alert.Txt);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1018,7 +1018,7 @@ void DT_ChangeDegreeType (void)
|
|||
|
||||
/***** Write message to show the change made
|
||||
and put button to go to degree changed *****/
|
||||
Gbl.Alert.Type = Lay_SUCCESS;
|
||||
Gbl.Alert.Type = Ale_SUCCESS;
|
||||
sprintf (Gbl.Alert.Txt,Txt_The_type_of_degree_of_the_degree_X_has_changed,
|
||||
Gbl.Degs.EditingDeg.FullName);
|
||||
Deg_ShowAlertAndButtonToGoToDeg ();
|
||||
|
|
|
@ -628,7 +628,7 @@ void Dpt_RemoveDepartment (void)
|
|||
|
||||
/***** Check if this department has teachers *****/
|
||||
if (Dpt.NumTchs) // Department has teachers ==> don't remove
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_To_remove_a_department_you_must_first_remove_all_teachers_in_the_department);
|
||||
Ale_ShowAlert (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 *****/
|
||||
|
@ -638,7 +638,7 @@ void Dpt_RemoveDepartment (void)
|
|||
|
||||
/***** Write message to show the change made *****/
|
||||
sprintf (Gbl.Alert.Txt,Txt_Department_X_removed,Dpt.FullName);
|
||||
Lay_ShowAlert (Lay_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
}
|
||||
|
||||
/***** Show the form again *****/
|
||||
|
@ -671,7 +671,7 @@ void Dpt_ChangeDepartIns (void)
|
|||
DB_QueryUPDATE (Query,"can not update the institution of a department");
|
||||
|
||||
/***** Write message to show the change made *****/
|
||||
Lay_ShowAlert (Lay_SUCCESS,Txt_The_institution_of_the_department_has_changed);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Txt_The_institution_of_the_department_has_changed);
|
||||
|
||||
/***** Show the form again *****/
|
||||
Dpt_EditDepartments ();
|
||||
|
@ -745,7 +745,7 @@ static void Dpt_RenameDepartment (Cns_ShrtOrFullName_t ShrtOrFullName)
|
|||
{
|
||||
sprintf (Gbl.Alert.Txt,Txt_You_can_not_leave_the_name_of_the_department_X_empty,
|
||||
CurrentDptName);
|
||||
Lay_ShowAlert (Lay_WARNING,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -757,7 +757,7 @@ static void Dpt_RenameDepartment (Cns_ShrtOrFullName_t ShrtOrFullName)
|
|||
{
|
||||
sprintf (Gbl.Alert.Txt,Txt_The_department_X_already_exists,
|
||||
NewDptName);
|
||||
Lay_ShowAlert (Lay_WARNING,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -767,14 +767,14 @@ static void Dpt_RenameDepartment (Cns_ShrtOrFullName_t ShrtOrFullName)
|
|||
/* Write message to show the change made */
|
||||
sprintf (Gbl.Alert.Txt,Txt_The_department_X_has_been_renamed_as_Y,
|
||||
CurrentDptName,NewDptName);
|
||||
Lay_ShowAlert (Lay_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
}
|
||||
}
|
||||
else // The same name
|
||||
{
|
||||
sprintf (Gbl.Alert.Txt,Txt_The_name_of_the_department_X_has_not_changed,
|
||||
CurrentDptName);
|
||||
Lay_ShowAlert (Lay_INFO,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_INFO,Gbl.Alert.Txt);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -846,12 +846,12 @@ void Dpt_ChangeDptWWW (void)
|
|||
/***** Write message to show the change made *****/
|
||||
sprintf (Gbl.Alert.Txt,Txt_The_new_web_address_is_X,
|
||||
NewWWW);
|
||||
Lay_ShowAlert (Lay_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
}
|
||||
else
|
||||
{
|
||||
sprintf (Gbl.Alert.Txt,"%s",Txt_You_can_not_leave_the_web_address_empty);
|
||||
Lay_ShowAlert (Lay_WARNING,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
}
|
||||
|
||||
/***** Show the form again *****/
|
||||
|
@ -1038,13 +1038,13 @@ void Dpt_RecFormNewDpt (void)
|
|||
{
|
||||
sprintf (Gbl.Alert.Txt,Txt_The_department_X_already_exists,
|
||||
Dpt->ShrtName);
|
||||
Lay_ShowAlert (Lay_WARNING,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
}
|
||||
else if (Dpt_CheckIfDepartmentNameExists ("FullName",Dpt->FullName,-1L))
|
||||
{
|
||||
sprintf (Gbl.Alert.Txt,Txt_The_department_X_already_exists,
|
||||
Dpt->FullName);
|
||||
Lay_ShowAlert (Lay_WARNING,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
}
|
||||
else // Add new department to database
|
||||
Dpt_CreateDepartment (Dpt);
|
||||
|
@ -1052,13 +1052,13 @@ void Dpt_RecFormNewDpt (void)
|
|||
else // If there is not a web
|
||||
{
|
||||
sprintf (Gbl.Alert.Txt,"%s",Txt_You_must_specify_the_web_address_of_the_new_department);
|
||||
Lay_ShowAlert (Lay_WARNING,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
}
|
||||
}
|
||||
else // If there is not a department name
|
||||
{
|
||||
sprintf (Gbl.Alert.Txt,"%s",Txt_You_must_specify_the_short_name_and_the_full_name_of_the_new_department);
|
||||
Lay_ShowAlert (Lay_WARNING,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
}
|
||||
|
||||
/***** Show the form again *****/
|
||||
|
@ -1088,7 +1088,7 @@ static void Dpt_CreateDepartment (struct Department *Dpt)
|
|||
/***** Write success message *****/
|
||||
sprintf (Gbl.Alert.Txt,Txt_Created_new_department_X,
|
||||
Dpt->FullName);
|
||||
Lay_ShowAlert (Lay_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
|
@ -97,13 +97,13 @@ void Dup_ReportUsrAsPossibleDuplicate (void)
|
|||
DB_QueryINSERT (Query,"can not report duplicate");
|
||||
|
||||
/***** Show feedback message *****/
|
||||
Lay_ShowAlert (Lay_SUCCESS,Txt_Thank_you_for_reporting_a_possible_duplicate_user);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Txt_Thank_you_for_reporting_a_possible_duplicate_user);
|
||||
}
|
||||
else
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
|
||||
}
|
||||
else
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -243,7 +243,7 @@ void Dup_GetUsrCodAndListSimilarUsrs (void)
|
|||
if (Usr_GetParamOtherUsrCodEncryptedAndGetUsrData ())
|
||||
Dup_ListSimilarUsrs ();
|
||||
else
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
|
||||
}
|
||||
|
||||
static void Dup_ListSimilarUsrs (void)
|
||||
|
@ -448,7 +448,7 @@ void Dup_RemoveUsrFromListDupUsrs (void)
|
|||
Dup_ListDuplicateUsrs ();
|
||||
}
|
||||
else
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
170
swad_enrolment.c
170
swad_enrolment.c
|
@ -362,7 +362,7 @@ void Enr_ReqAcceptRegisterInCrs (void)
|
|||
sprintf (Gbl.Alert.Txt,Txt_A_teacher_or_administrator_has_enroled_you_as_X_into_the_course_Y,
|
||||
Txt_ROLES_SINGUL_abc[Gbl.Usrs.Me.UsrDat.RoleInCurrentCrsDB][Gbl.Usrs.Me.UsrDat.Sex],
|
||||
Gbl.CurrentCrs.Crs.FullName);
|
||||
Lay_ShowAlert (Lay_INFO,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_INFO,Gbl.Alert.Txt);
|
||||
|
||||
/***** Send button to accept register in the current course *****/
|
||||
Act_FormStart (Gbl.Usrs.Me.UsrDat.RoleInCurrentCrsDB == Rol_STUDENT ? ActAccEnrStd :
|
||||
|
@ -557,7 +557,7 @@ static void Enr_ReqAdminUsrs (Rol_Role_t Role)
|
|||
Enr_ReqAnotherUsrIDToRegisterRemove (Role);
|
||||
break;
|
||||
default:
|
||||
Lay_ShowAlert (Lay_ERROR,Txt_You_dont_have_permission_to_perform_this_action);
|
||||
Ale_ShowAlert (Ale_ERROR,Txt_You_dont_have_permission_to_perform_this_action);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -612,7 +612,7 @@ static void Enr_ShowFormRegRemSeveralUsrs (Rol_Role_t Role)
|
|||
The_ClassTitle[Gbl.Prefs.Theme],
|
||||
Txt_Step_1_Provide_a_list_of_users);
|
||||
|
||||
Lay_ShowAlert (Lay_INFO,Txt_Type_or_paste_a_list_of_IDs_nicks_or_emails_);
|
||||
Ale_ShowAlert (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 *****/
|
||||
|
@ -633,7 +633,7 @@ static void Enr_ShowFormRegRemSeveralUsrs (Rol_Role_t Role)
|
|||
{
|
||||
if (Gbl.CurrentCrs.Grps.NumGrps) // This course has groups?
|
||||
{
|
||||
Lay_ShowAlert (Lay_INFO,Txt_Select_the_groups_in_from_which_you_want_to_register_remove_users_);
|
||||
Ale_ShowAlert (Ale_INFO,Txt_Select_the_groups_in_from_which_you_want_to_register_remove_users_);
|
||||
Grp_ShowLstGrpsToChgOtherUsrsGrps (-1L);
|
||||
}
|
||||
else
|
||||
|
@ -641,7 +641,7 @@ static void Enr_ShowFormRegRemSeveralUsrs (Rol_Role_t Role)
|
|||
/* Write help message */
|
||||
sprintf (Gbl.Alert.Txt,Txt_No_groups_have_been_created_in_the_course_X_Therefore_,
|
||||
Gbl.CurrentCrs.Crs.FullName);
|
||||
Lay_ShowAlert (Lay_INFO,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_INFO,Gbl.Alert.Txt);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -765,7 +765,7 @@ void Enr_RemoveOldUsrs (void)
|
|||
NumUsrs,
|
||||
MonthsWithoutAccess,
|
||||
Cfg_PLATFORM_SHORT_NAME);
|
||||
Lay_ShowAlert (Lay_INFO,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_INFO,Gbl.Alert.Txt);
|
||||
|
||||
/***** Initialize structure with user's data *****/
|
||||
Usr_UsrDataConstructor (&UsrDat);
|
||||
|
@ -797,7 +797,7 @@ void Enr_RemoveOldUsrs (void)
|
|||
/***** Write end message *****/
|
||||
sprintf (Gbl.Alert.Txt,Txt_X_users_have_been_eliminated,
|
||||
NumUsrsEliminated);
|
||||
Lay_ShowAlert (Lay_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -1374,7 +1374,7 @@ static void Enr_ReceiveFormUsrsCrs (Rol_Role_t Role)
|
|||
if (!Grp_CheckIfSelectionGrpsIsValid (&LstGrps))
|
||||
{
|
||||
/* Show warning message and exit */
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_In_a_type_of_group_with_single_enrolment_students_can_not_be_registered_in_more_than_one_group);
|
||||
Ale_ShowAlert (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);
|
||||
|
@ -1611,30 +1611,30 @@ static void Enr_ReceiveFormUsrsCrs (Rol_Role_t Role)
|
|||
switch (NumUsrsEliminated)
|
||||
{
|
||||
case 0:
|
||||
Lay_ShowAlert (Lay_INFO,Txt_No_user_has_been_eliminated);
|
||||
Ale_ShowAlert (Ale_INFO,Txt_No_user_has_been_eliminated);
|
||||
break;
|
||||
case 1:
|
||||
Lay_ShowAlert (Lay_SUCCESS,Txt_One_user_has_been_eliminated);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Txt_One_user_has_been_eliminated);
|
||||
break;
|
||||
default:
|
||||
sprintf (Gbl.Alert.Txt,Txt_X_users_have_been_eliminated,
|
||||
NumUsrsEliminated);
|
||||
Lay_ShowAlert (Lay_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
break;
|
||||
}
|
||||
else // Only remove from course / groups
|
||||
switch (NumUsrsRemoved)
|
||||
{
|
||||
case 0:
|
||||
Lay_ShowAlert (Lay_INFO,Txt_No_user_has_been_removed);
|
||||
Ale_ShowAlert (Ale_INFO,Txt_No_user_has_been_removed);
|
||||
break;
|
||||
case 1:
|
||||
Lay_ShowAlert (Lay_SUCCESS,Txt_One_user_has_been_removed);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Txt_One_user_has_been_removed);
|
||||
break;
|
||||
default:
|
||||
sprintf (Gbl.Alert.Txt,Txt_X_users_have_been_removed,
|
||||
NumUsrsRemoved);
|
||||
Lay_ShowAlert (Lay_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -1642,15 +1642,15 @@ static void Enr_ReceiveFormUsrsCrs (Rol_Role_t Role)
|
|||
switch (NumUsrsRegistered)
|
||||
{
|
||||
case 0:
|
||||
Lay_ShowAlert (Lay_INFO,Txt_No_user_has_been_enroled);
|
||||
Ale_ShowAlert (Ale_INFO,Txt_No_user_has_been_enroled);
|
||||
break;
|
||||
case 1:
|
||||
Lay_ShowAlert (Lay_SUCCESS,Txt_One_user_has_been_enroled);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Txt_One_user_has_been_enroled);
|
||||
break;
|
||||
default:
|
||||
sprintf (Gbl.Alert.Txt,Txt_X_users_have_been_enroled_including_possible_repetitions,
|
||||
NumUsrsRegistered);
|
||||
Lay_ShowAlert (Lay_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -1751,7 +1751,7 @@ void Enr_AskRemAllStdsThisCrs (void)
|
|||
/* Start alert */
|
||||
sprintf (Gbl.Alert.Txt,Txt_Do_you_really_want_to_remove_the_X_students_from_the_course_Y_,
|
||||
NumStds,Gbl.CurrentCrs.Crs.FullName);
|
||||
Lay_ShowAlertAndButton1 (Lay_QUESTION,Gbl.Alert.Txt);
|
||||
Ale_ShowAlertAndButton1 (Ale_QUESTION,Gbl.Alert.Txt);
|
||||
|
||||
/* Show form to request confirmation */
|
||||
Act_FormStart (ActRemAllStdCrs);
|
||||
|
@ -1761,7 +1761,7 @@ void Enr_AskRemAllStdsThisCrs (void)
|
|||
Act_FormEnd ();
|
||||
|
||||
/* End alert */
|
||||
Lay_ShowAlertAndButton2 (ActUnk,NULL,NULL,Lay_NO_BUTTON,NULL);
|
||||
Ale_ShowAlertAndButton2 (ActUnk,NULL,NULL,Lay_NO_BUTTON,NULL);
|
||||
}
|
||||
else
|
||||
/***** Show warning indicating no students found *****/
|
||||
|
@ -1786,7 +1786,7 @@ void Enr_RemAllStdsThisCrs (void)
|
|||
{
|
||||
sprintf (Gbl.Alert.Txt,Txt_The_X_students_who_belonged_to_the_course_Y_have_been_removed_from_it,
|
||||
NumStdsInCrs,Gbl.CurrentCrs.Crs.FullName);
|
||||
Lay_ShowAlert (Lay_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
}
|
||||
else
|
||||
/***** Show warning indicating no students found *****/
|
||||
|
@ -1840,7 +1840,7 @@ void Enr_ReqSignUpInCrs (void)
|
|||
sprintf (Gbl.Alert.Txt,Txt_You_were_already_enroled_as_X_in_the_course_Y,
|
||||
Txt_ROLES_SINGUL_abc[Gbl.Usrs.Me.UsrDat.RoleInCurrentCrsDB][Gbl.Usrs.Me.UsrDat.Sex],
|
||||
Gbl.CurrentCrs.Crs.FullName);
|
||||
Lay_ShowAlert (Lay_WARNING,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
}
|
||||
else if (Gbl.Usrs.Me.LoggedRole == Rol__GUEST_ ||
|
||||
Gbl.Usrs.Me.LoggedRole == Rol_VISITOR)
|
||||
|
@ -1872,7 +1872,7 @@ void Enr_SignUpInCrs (void)
|
|||
sprintf (Gbl.Alert.Txt,Txt_You_were_already_enroled_as_X_in_the_course_Y,
|
||||
Txt_ROLES_SINGUL_abc[Gbl.Usrs.Me.UsrDat.RoleInCurrentCrsDB][Gbl.Usrs.Me.UsrDat.Sex],
|
||||
Gbl.CurrentCrs.Crs.FullName);
|
||||
Lay_ShowAlert (Lay_WARNING,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1929,7 +1929,7 @@ void Enr_SignUpInCrs (void)
|
|||
sprintf (Gbl.Alert.Txt,Txt_Your_request_for_enrolment_as_X_in_the_course_Y_has_been_accepted_for_processing,
|
||||
Txt_ROLES_SINGUL_abc[RoleFromForm][Gbl.Usrs.Me.UsrDat.Sex],
|
||||
Gbl.CurrentCrs.Crs.FullName);
|
||||
Lay_ShowAlert (Lay_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (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
|
||||
|
@ -2027,7 +2027,7 @@ void Enr_AskIfRejectSignUp (void)
|
|||
/* User already belongs to this course */
|
||||
sprintf (Gbl.Alert.Txt,Txt_THE_USER_X_is_already_enroled_in_the_course_Y,
|
||||
Gbl.Usrs.Other.UsrDat.FullName,Gbl.CurrentCrs.Crs.FullName);
|
||||
Lay_ShowAlert (Lay_WARNING,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
Rec_ShowSharedRecordUnmodifiable (&Gbl.Usrs.Other.UsrDat);
|
||||
|
||||
/* Remove inscription request because it has not sense */
|
||||
|
@ -2045,13 +2045,13 @@ void Enr_AskIfRejectSignUp (void)
|
|||
Gbl.Usrs.Other.UsrDat.FullName,
|
||||
Txt_ROLES_SINGUL_abc[Role][Gbl.Usrs.Other.UsrDat.Sex],
|
||||
Gbl.CurrentCrs.Crs.FullName);
|
||||
Lay_ShowAlertAndButton1 (Lay_QUESTION,Gbl.Alert.Txt);
|
||||
Ale_ShowAlertAndButton1 (Ale_QUESTION,Gbl.Alert.Txt);
|
||||
|
||||
/* Show user's record */
|
||||
Rec_ShowSharedRecordUnmodifiable (&Gbl.Usrs.Other.UsrDat);
|
||||
|
||||
/* End alert */
|
||||
Lay_ShowAlertAndButton2 (ActRejSignUp,NULL,
|
||||
Ale_ShowAlertAndButton2 (ActRejSignUp,NULL,
|
||||
Usr_PutParamOtherUsrCodEncrypted,
|
||||
Lay_REMOVE_BUTTON,Txt_Reject);
|
||||
}
|
||||
|
@ -2060,7 +2060,7 @@ void Enr_AskIfRejectSignUp (void)
|
|||
}
|
||||
}
|
||||
else
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -2085,7 +2085,7 @@ void Enr_RejectSignUp (void)
|
|||
/* User already belongs to this course */
|
||||
sprintf (Gbl.Alert.Txt,Txt_THE_USER_X_is_already_enroled_in_the_course_Y,
|
||||
Gbl.Usrs.Other.UsrDat.FullName,Gbl.CurrentCrs.Crs.FullName);
|
||||
Lay_ShowAlert (Lay_WARNING,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
Rec_ShowSharedRecordUnmodifiable (&Gbl.Usrs.Other.UsrDat);
|
||||
}
|
||||
|
||||
|
@ -2095,10 +2095,10 @@ void Enr_RejectSignUp (void)
|
|||
/* Confirmation message */
|
||||
sprintf (Gbl.Alert.Txt,Txt_Enrolment_of_X_rejected,
|
||||
Gbl.Usrs.Other.UsrDat.FullName);
|
||||
Lay_ShowAlert (Lay_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
}
|
||||
else
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
|
||||
|
||||
/* Show again the rest of registrarion requests */
|
||||
Enr_ShowEnrolmentRequests ();
|
||||
|
@ -2818,7 +2818,7 @@ static void Enr_ShowEnrolmentRequestsGivenRoles (unsigned RolesSelected)
|
|||
Usr_UsrDataDestructor (&UsrDat);
|
||||
}
|
||||
else // There are no requests
|
||||
Lay_ShowAlert (Lay_INFO,Txt_No_enrolment_requests);
|
||||
Ale_ShowAlert (Ale_INFO,Txt_No_enrolment_requests);
|
||||
|
||||
/***** End frame *****/
|
||||
Lay_EndRoundFrame ();
|
||||
|
@ -3079,7 +3079,7 @@ static void Enr_AskIfRegRemUsr (struct ListUsrCods *ListUsrCods,Rol_Role_t Role)
|
|||
{
|
||||
sprintf (Gbl.Alert.Txt,Txt_There_are_X_users_with_the_ID_Y,
|
||||
ListUsrCods->NumUsrs,Gbl.Usrs.Other.UsrDat.UsrIDNickOrEmail);
|
||||
Lay_ShowAlert (Lay_INFO,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_INFO,Gbl.Alert.Txt);
|
||||
}
|
||||
|
||||
/***** For each user found... *****/
|
||||
|
@ -3107,7 +3107,7 @@ static void Enr_AskIfRegRemUsr (struct ListUsrCods *ListUsrCods,Rol_Role_t Role)
|
|||
else // Enrolment not yet accepted
|
||||
sprintf (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);
|
||||
Lay_ShowAlert (Lay_INFO,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_INFO,Gbl.Alert.Txt);
|
||||
|
||||
Enr_ShowFormToEditOtherUsr ();
|
||||
}
|
||||
|
@ -3115,7 +3115,7 @@ static void Enr_AskIfRegRemUsr (struct ListUsrCods *ListUsrCods,Rol_Role_t Role)
|
|||
{
|
||||
sprintf (Gbl.Alert.Txt,Txt_THE_USER_X_already_exists_in_Y_but_is_not_yet_enroled_in_the_course_Z,
|
||||
Gbl.Usrs.Other.UsrDat.FullName,Cfg_PLATFORM_SHORT_NAME,Gbl.CurrentCrs.Crs.FullName);
|
||||
Lay_ShowAlert (Lay_INFO,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_INFO,Gbl.Alert.Txt);
|
||||
|
||||
Enr_ShowFormToEditOtherUsr ();
|
||||
}
|
||||
|
@ -3124,7 +3124,7 @@ static void Enr_AskIfRegRemUsr (struct ListUsrCods *ListUsrCods,Rol_Role_t Role)
|
|||
{
|
||||
sprintf (Gbl.Alert.Txt,Txt_THE_USER_X_already_exists_in_Y,
|
||||
Gbl.Usrs.Other.UsrDat.FullName,Cfg_PLATFORM_SHORT_NAME);
|
||||
Lay_ShowAlert (Lay_INFO,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_INFO,Gbl.Alert.Txt);
|
||||
|
||||
Enr_ShowFormToEditOtherUsr ();
|
||||
}
|
||||
|
@ -3147,7 +3147,7 @@ static void Enr_AskIfRegRemUsr (struct ListUsrCods *ListUsrCods,Rol_Role_t Role)
|
|||
/***** Show form to enter the data of a new user *****/
|
||||
sprintf (Gbl.Alert.Txt,Txt_The_user_is_new_not_yet_in_X,
|
||||
Cfg_PLATFORM_SHORT_NAME);
|
||||
Lay_ShowAlert (Lay_INFO,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_INFO,Gbl.Alert.Txt);
|
||||
Rec_ShowFormOtherNewSharedRecord (&Gbl.Usrs.Other.UsrDat,Role);
|
||||
}
|
||||
else // User's ID is not valid
|
||||
|
@ -3155,7 +3155,7 @@ static void Enr_AskIfRegRemUsr (struct ListUsrCods *ListUsrCods,Rol_Role_t Role)
|
|||
/* Write message and request a new user's ID */
|
||||
sprintf (Gbl.Alert.Txt,Txt_If_this_is_a_new_user_in_X_you_should_indicate_her_his_ID,
|
||||
Cfg_PLATFORM_SHORT_NAME);
|
||||
Lay_ShowAlert (Lay_WARNING,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
Enr_ReqRegRemUsr (Role);
|
||||
}
|
||||
}
|
||||
|
@ -3242,10 +3242,10 @@ static void Enr_AddAdm (Sco_Scope_t Scope,long Cod,const char *InsCtrDegName)
|
|||
Rec_ShowSharedRecordUnmodifiable (&Gbl.Usrs.Other.UsrDat);
|
||||
}
|
||||
else
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
|
||||
}
|
||||
else
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3277,7 +3277,7 @@ static void Enr_RegisterAdmin (struct UsrData *UsrDat,Sco_Scope_t Scope,long Cod
|
|||
sprintf (Gbl.Alert.Txt,Txt_THE_USER_X_has_been_enroled_as_administrator_of_Y,
|
||||
UsrDat->FullName,InsCtrDegName);
|
||||
}
|
||||
Lay_ShowAlert (Lay_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -3339,10 +3339,10 @@ static void Enr_ReqRemOrRemUsrFromCrs (Enr_ReqDelOrDelUsr_t ReqDelOrDelUsr)
|
|||
break;
|
||||
}
|
||||
else
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
|
||||
}
|
||||
else
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -3448,14 +3448,14 @@ static void Enr_ReqRemOrRemAdm (Enr_ReqDelOrDelUsr_t ReqDelOrDelUsr,Sco_Scope_t
|
|||
{
|
||||
sprintf (Gbl.Alert.Txt,Txt_THE_USER_X_is_not_an_administrator_of_Y,
|
||||
Gbl.Usrs.Other.UsrDat.FullName,InsCtrDegName);
|
||||
Lay_ShowAlert (Lay_WARNING,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
}
|
||||
}
|
||||
else
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
|
||||
}
|
||||
else
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3496,7 +3496,7 @@ static void Enr_ReqAddAdm (Sco_Scope_t Scope,long Cod,const char *InsCtrDegName)
|
|||
{
|
||||
sprintf (Gbl.Alert.Txt,Txt_THE_USER_X_is_already_an_administrator_of_Y,
|
||||
Gbl.Usrs.Other.UsrDat.FullName,InsCtrDegName);
|
||||
Lay_ShowAlert (Lay_INFO,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_INFO,Gbl.Alert.Txt);
|
||||
Rec_ShowSharedRecordUnmodifiable (&Gbl.Usrs.Other.UsrDat);
|
||||
}
|
||||
else
|
||||
|
@ -3505,22 +3505,22 @@ static void Enr_ReqAddAdm (Sco_Scope_t Scope,long Cod,const char *InsCtrDegName)
|
|||
/* Start alert */
|
||||
sprintf (Gbl.Alert.Txt,Txt_Do_you_really_want_to_register_the_following_user_as_an_administrator_of_X,
|
||||
InsCtrDegName);
|
||||
Lay_ShowAlertAndButton1 (Lay_QUESTION,Gbl.Alert.Txt);
|
||||
Ale_ShowAlertAndButton1 (Ale_QUESTION,Gbl.Alert.Txt);
|
||||
|
||||
/* Show user's record */
|
||||
Rec_ShowSharedRecordUnmodifiable (&Gbl.Usrs.Other.UsrDat);
|
||||
|
||||
/* End alert */
|
||||
Lay_ShowAlertAndButton2 (Enr_ActNewAdm[Scope],NULL,
|
||||
Ale_ShowAlertAndButton2 (Enr_ActNewAdm[Scope],NULL,
|
||||
Usr_PutParamOtherUsrCodEncrypted,
|
||||
Lay_CREATE_BUTTON,Txt_Register_user_IN_A_COURSE_OR_DEGREE);
|
||||
}
|
||||
}
|
||||
else
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
|
||||
}
|
||||
else
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3545,7 +3545,7 @@ void Enr_AcceptRegisterMeInCrs (void)
|
|||
/***** Confirmation message *****/
|
||||
sprintf (Gbl.Alert.Txt,Txt_You_have_confirmed_your_enrolment_in_the_course_X,
|
||||
Gbl.CurrentCrs.Crs.FullName);
|
||||
Lay_ShowAlert (Lay_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -3565,7 +3565,7 @@ void Enr_CreateNewUsr1 (void)
|
|||
ID_GetParamOtherUsrIDPlain (); // User's ID was already modified and passed as a hidden parameter
|
||||
|
||||
/***** Initialize alert type and message *****/
|
||||
Gbl.Alert.Type = Lay_NONE; // Do not show alert
|
||||
Gbl.Alert.Type = Ale_NONE; // Do not show alert
|
||||
|
||||
if (ID_CheckIfUsrIDIsValid (Gbl.Usrs.Other.UsrDat.IDs.List[0].ID)) // User's ID valid
|
||||
{
|
||||
|
@ -3596,7 +3596,7 @@ void Enr_CreateNewUsr1 (void)
|
|||
Enr_ModifyRoleInCurrentCrs (&Gbl.Usrs.Other.UsrDat,NewRole);
|
||||
|
||||
/* Success message */
|
||||
Gbl.Alert.Type = Lay_SUCCESS;
|
||||
Gbl.Alert.Type = Ale_SUCCESS;
|
||||
sprintf (Gbl.Alert.Txt,Txt_The_role_of_THE_USER_X_in_the_course_Y_has_changed_from_A_to_B,
|
||||
Gbl.Usrs.Other.UsrDat.FullName,Gbl.CurrentCrs.Crs.FullName,
|
||||
Txt_ROLES_SINGUL_abc[OldRole][Gbl.Usrs.Other.UsrDat.Sex],
|
||||
|
@ -3610,7 +3610,7 @@ void Enr_CreateNewUsr1 (void)
|
|||
Enr_SET_ACCEPTED_TO_FALSE);
|
||||
|
||||
/* Success message */
|
||||
Gbl.Alert.Type = Lay_SUCCESS;
|
||||
Gbl.Alert.Type = Ale_SUCCESS;
|
||||
sprintf (Gbl.Alert.Txt,Txt_THE_USER_X_has_been_enroled_in_the_course_Y,
|
||||
Gbl.Usrs.Other.UsrDat.FullName,Gbl.CurrentCrs.Crs.FullName);
|
||||
}
|
||||
|
@ -3625,7 +3625,7 @@ void Enr_CreateNewUsr1 (void)
|
|||
else // User's ID not valid
|
||||
{
|
||||
/***** Error message *****/
|
||||
Gbl.Alert.Type = Lay_ERROR;
|
||||
Gbl.Alert.Type = Ale_ERROR;
|
||||
sprintf (Gbl.Alert.Txt,Txt_The_ID_X_is_not_valid,
|
||||
Gbl.Usrs.Other.UsrDat.IDs.List[0].ID);
|
||||
}
|
||||
|
@ -3633,14 +3633,14 @@ void Enr_CreateNewUsr1 (void)
|
|||
|
||||
void Enr_CreateNewUsr2 (void)
|
||||
{
|
||||
if (Gbl.Alert.Type == Lay_ERROR) // User's ID not valid
|
||||
Lay_ShowPendingAlert ();
|
||||
if (Gbl.Alert.Type == Ale_ERROR) // User's ID not valid
|
||||
Ale_ShowPendingAlert ();
|
||||
else // User's ID valid
|
||||
{
|
||||
if (Gbl.CurrentCrs.Crs.CrsCod > 0) // Course selected
|
||||
{
|
||||
/***** Show optional alert *****/
|
||||
Lay_ShowPendingAlert ();
|
||||
Ale_ShowPendingAlert ();
|
||||
|
||||
/***** Change user's groups *****/
|
||||
if (Gbl.CurrentCrs.Grps.NumGrps) // This course has groups?
|
||||
|
@ -3666,7 +3666,7 @@ void Enr_ModifyUsr1 (void)
|
|||
Rol_Role_t NewRole;
|
||||
|
||||
/***** Initialize alert type and message *****/
|
||||
Gbl.Alert.Type = Lay_NONE; // Do not show alert
|
||||
Gbl.Alert.Type = Ale_NONE; // Do not show alert
|
||||
|
||||
/***** Get user from form *****/
|
||||
if (Usr_GetParamOtherUsrCodEncryptedAndGetUsrData ())
|
||||
|
@ -3708,7 +3708,7 @@ void Enr_ModifyUsr1 (void)
|
|||
Enr_ModifyRoleInCurrentCrs (&Gbl.Usrs.Other.UsrDat,NewRole);
|
||||
|
||||
/* Set success message */
|
||||
Gbl.Alert.Type = Lay_SUCCESS;
|
||||
Gbl.Alert.Type = Ale_SUCCESS;
|
||||
sprintf (Gbl.Alert.Txt,Txt_The_role_of_THE_USER_X_in_the_course_Y_has_changed_from_A_to_B,
|
||||
Gbl.Usrs.Other.UsrDat.FullName,Gbl.CurrentCrs.Crs.FullName,
|
||||
Txt_ROLES_SINGUL_abc[OldRole][Gbl.Usrs.Other.UsrDat.Sex],
|
||||
|
@ -3722,7 +3722,7 @@ void Enr_ModifyUsr1 (void)
|
|||
Enr_SET_ACCEPTED_TO_FALSE);
|
||||
|
||||
/* Set success message */
|
||||
Gbl.Alert.Type = Lay_SUCCESS;
|
||||
Gbl.Alert.Type = Ale_SUCCESS;
|
||||
sprintf (Gbl.Alert.Txt,Txt_THE_USER_X_has_been_enroled_in_the_course_Y,
|
||||
Gbl.Usrs.Other.UsrDat.FullName,Gbl.CurrentCrs.Crs.FullName);
|
||||
}
|
||||
|
@ -3735,59 +3735,59 @@ void Enr_ModifyUsr1 (void)
|
|||
}
|
||||
}
|
||||
else
|
||||
Gbl.Alert.Type = Lay_WARNING;
|
||||
Gbl.Alert.Type = Ale_WARNING;
|
||||
break;
|
||||
case Enr_REGISTER_ONE_DEGREE_ADMIN:
|
||||
if (Gbl.Usrs.Me.LoggedRole < Rol_CTR_ADM)
|
||||
Gbl.Alert.Type = Lay_WARNING;
|
||||
Gbl.Alert.Type = Ale_WARNING;
|
||||
break;
|
||||
case Enr_REGISTER_ONE_CENTRE_ADMIN:
|
||||
if (Gbl.Usrs.Me.LoggedRole < Rol_INS_ADM)
|
||||
Gbl.Alert.Type = Lay_WARNING;
|
||||
Gbl.Alert.Type = Ale_WARNING;
|
||||
break;
|
||||
case Enr_REGISTER_ONE_INSTITUTION_ADMIN:
|
||||
if (Gbl.Usrs.Me.LoggedRole != Rol_SYS_ADM)
|
||||
Gbl.Alert.Type = Lay_WARNING;
|
||||
Gbl.Alert.Type = Ale_WARNING;
|
||||
break;
|
||||
case Enr_REPORT_USR_AS_POSSIBLE_DUPLICATE:
|
||||
if (ItsMe || Gbl.Usrs.Me.LoggedRole < Rol_TEACHER)
|
||||
Gbl.Alert.Type = Lay_WARNING;
|
||||
Gbl.Alert.Type = Ale_WARNING;
|
||||
break;
|
||||
case Enr_REMOVE_ONE_USR_FROM_CRS:
|
||||
if (!ItsMe && Gbl.Usrs.Me.LoggedRole < Rol_TEACHER)
|
||||
Gbl.Alert.Type = Lay_WARNING;
|
||||
Gbl.Alert.Type = Ale_WARNING;
|
||||
break;
|
||||
case Enr_REMOVE_ONE_DEGREE_ADMIN:
|
||||
if (!ItsMe && Gbl.Usrs.Me.LoggedRole < Rol_CTR_ADM)
|
||||
Gbl.Alert.Type = Lay_WARNING;
|
||||
Gbl.Alert.Type = Ale_WARNING;
|
||||
break;
|
||||
case Enr_REMOVE_ONE_CENTRE_ADMIN:
|
||||
if (!ItsMe && Gbl.Usrs.Me.LoggedRole < Rol_INS_ADM)
|
||||
Gbl.Alert.Type = Lay_WARNING;
|
||||
Gbl.Alert.Type = Ale_WARNING;
|
||||
break;
|
||||
case Enr_REMOVE_ONE_INSTITUTION_ADMIN:
|
||||
if (!ItsMe && Gbl.Usrs.Me.LoggedRole != Rol_SYS_ADM)
|
||||
Gbl.Alert.Type = Lay_WARNING;
|
||||
Gbl.Alert.Type = Ale_WARNING;
|
||||
break;
|
||||
case Enr_ELIMINATE_ONE_USR_FROM_PLATFORM:
|
||||
if (!Acc_CheckIfICanEliminateAccount (Gbl.Usrs.Other.UsrDat.UsrCod))
|
||||
Gbl.Alert.Type = Lay_WARNING;
|
||||
Gbl.Alert.Type = Ale_WARNING;
|
||||
break;
|
||||
default:
|
||||
Gbl.Alert.Type = Lay_WARNING;
|
||||
Gbl.Alert.Type = Ale_WARNING;
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
Gbl.Alert.Type = Lay_WARNING;
|
||||
Gbl.Alert.Type = Ale_WARNING;
|
||||
}
|
||||
|
||||
void Enr_ModifyUsr2 (void)
|
||||
{
|
||||
extern const char *Txt_User_not_found_or_you_do_not_have_permission_;
|
||||
|
||||
if (Gbl.Alert.Type == Lay_WARNING)
|
||||
Lay_ShowAlert (Lay_WARNING,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_);
|
||||
else // No error
|
||||
switch (Gbl.Usrs.RegRemAction)
|
||||
{
|
||||
|
@ -3795,7 +3795,7 @@ void Enr_ModifyUsr2 (void)
|
|||
if (Gbl.CurrentCrs.Crs.CrsCod > 0)
|
||||
{
|
||||
/***** Show optional alert *****/
|
||||
Lay_ShowPendingAlert ();
|
||||
Ale_ShowPendingAlert ();
|
||||
|
||||
/***** Change user's groups *****/
|
||||
if (Gbl.CurrentCrs.Grps.NumGrps) // This course has groups?
|
||||
|
@ -3882,7 +3882,7 @@ static void Enr_AskIfRemoveUsrFromCrs (struct UsrData *UsrDat,bool ItsMe)
|
|||
ItsMe ? Txt_Do_you_really_want_to_be_removed_from_the_course_X :
|
||||
Txt_Do_you_really_want_to_remove_the_following_user_from_the_course_X,
|
||||
Gbl.CurrentCrs.Crs.FullName);
|
||||
Lay_ShowAlertAndButton1 (Lay_QUESTION,Gbl.Alert.Txt);
|
||||
Ale_ShowAlertAndButton1 (Ale_QUESTION,Gbl.Alert.Txt);
|
||||
|
||||
/* Show user's record */
|
||||
Rec_ShowSharedRecordUnmodifiable (UsrDat);
|
||||
|
@ -3897,10 +3897,10 @@ static void Enr_AskIfRemoveUsrFromCrs (struct UsrData *UsrDat,bool ItsMe)
|
|||
Act_FormEnd ();
|
||||
|
||||
/* End alert */
|
||||
Lay_ShowAlertAndButton2 (ActUnk,NULL,NULL,Lay_NO_BUTTON,NULL);
|
||||
Ale_ShowAlertAndButton2 (ActUnk,NULL,NULL,Lay_NO_BUTTON,NULL);
|
||||
}
|
||||
else
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -3954,12 +3954,12 @@ static void Enr_EffectivelyRemUsrFromCrs (struct UsrData *UsrDat,struct Course *
|
|||
{
|
||||
sprintf (Gbl.Alert.Txt,Txt_THE_USER_X_has_been_removed_from_the_course_Y,
|
||||
UsrDat->FullName,Crs->FullName);
|
||||
Lay_ShowAlert (Lay_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
}
|
||||
}
|
||||
else // User does not belong to course
|
||||
if (QuietOrVerbose == Cns_VERBOSE)
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -3991,13 +3991,13 @@ static void Enr_AskIfRemAdm (bool ItsMe,Sco_Scope_t Scope,const char *InsCtrDegN
|
|||
ItsMe ? Txt_Do_you_really_want_to_be_removed_as_an_administrator_of_X :
|
||||
Txt_Do_you_really_want_to_remove_the_following_user_as_an_administrator_of_X,
|
||||
InsCtrDegName);
|
||||
Lay_ShowAlertAndButton1 (Lay_QUESTION,Gbl.Alert.Txt);
|
||||
Ale_ShowAlertAndButton1 (Ale_QUESTION,Gbl.Alert.Txt);
|
||||
|
||||
/* Show user's record */
|
||||
Rec_ShowSharedRecordUnmodifiable (&Gbl.Usrs.Other.UsrDat);
|
||||
|
||||
/* End alert */
|
||||
Lay_ShowAlertAndButton2 (Enr_ActRemAdm[Scope],NULL,
|
||||
Ale_ShowAlertAndButton2 (Enr_ActRemAdm[Scope],NULL,
|
||||
Usr_PutParamOtherUsrCodEncrypted,
|
||||
Lay_REMOVE_BUTTON,
|
||||
ItsMe ? Txt_Remove_me_as_an_administrator :
|
||||
|
@ -4029,12 +4029,12 @@ static void Enr_EffectivelyRemAdm (struct UsrData *UsrDat,Sco_Scope_t Scope,
|
|||
|
||||
sprintf (Gbl.Alert.Txt,Txt_THE_USER_X_has_been_removed_as_administrator_of_Y,
|
||||
UsrDat->FullName,InsCtrDegName);
|
||||
Lay_ShowAlert (Lay_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
}
|
||||
else // User is not an administrator of the current institution/centre/degree
|
||||
{
|
||||
sprintf (Gbl.Alert.Txt,Txt_THE_USER_X_is_not_an_administrator_of_Y,
|
||||
UsrDat->FullName,InsCtrDegName);
|
||||
Lay_ShowAlert (Lay_ERROR,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_ERROR,Gbl.Alert.Txt);
|
||||
}
|
||||
}
|
||||
|
|
14
swad_exam.c
14
swad_exam.c
|
@ -292,7 +292,7 @@ void Exa_ReceiveExamAnnouncement2 (void)
|
|||
struct SocialPublishing SocPub;
|
||||
|
||||
/***** Show message *****/
|
||||
Lay_ShowAlert (Lay_SUCCESS,
|
||||
Ale_ShowAlert (Ale_SUCCESS,
|
||||
Gbl.ExamAnns.NewExamAnnouncement ? Txt_Created_new_announcement_of_exam :
|
||||
Txt_The_announcement_of_exam_has_been_successfully_updated);
|
||||
|
||||
|
@ -364,7 +364,7 @@ void Exa_ReqRemoveExamAnnouncement (void)
|
|||
|
||||
/***** Show question and button to remove exam announcement *****/
|
||||
/* Start alert */
|
||||
Lay_ShowAlertAndButton1 (Lay_QUESTION,Txt_Do_you_really_want_to_remove_the_following_announcement_of_exam);
|
||||
Ale_ShowAlertAndButton1 (Ale_QUESTION,Txt_Do_you_really_want_to_remove_the_following_announcement_of_exam);
|
||||
|
||||
/* Show announcement */
|
||||
Exa_AllocMemExamAnnouncement ();
|
||||
|
@ -373,7 +373,7 @@ void Exa_ReqRemoveExamAnnouncement (void)
|
|||
Exa_FreeMemExamAnnouncement ();
|
||||
|
||||
/* End alert */
|
||||
Lay_ShowAlertAndButton2 (ActRemExaAnn,NULL,Exa_PutParamExaCodToEdit,
|
||||
Ale_ShowAlertAndButton2 (ActRemExaAnn,NULL,Exa_PutParamExaCodToEdit,
|
||||
Lay_REMOVE_BUTTON,Txt_Remove);
|
||||
}
|
||||
|
||||
|
@ -414,7 +414,7 @@ void Exa_RemoveExamAnnouncement2 (void)
|
|||
extern const char *Txt_Announcement_of_exam_removed;
|
||||
|
||||
/***** Write message *****/
|
||||
Lay_ShowAlert (Lay_SUCCESS,Txt_Announcement_of_exam_removed);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Txt_Announcement_of_exam_removed);
|
||||
|
||||
/***** List again all the remaining exam announcements *****/
|
||||
Exa_ListExamAnnouncementsEdit ();
|
||||
|
@ -448,7 +448,7 @@ void Exa_HideExamAnnouncement2 (void)
|
|||
extern const char *Txt_The_announcement_of_exam_is_now_hidden;
|
||||
|
||||
/***** Write message to show the change made *****/
|
||||
Lay_ShowAlert (Lay_SUCCESS,Txt_The_announcement_of_exam_is_now_hidden);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Txt_The_announcement_of_exam_is_now_hidden);
|
||||
|
||||
/***** Show exam announcements again *****/
|
||||
Exa_ListExamAnnouncementsEdit ();
|
||||
|
@ -482,7 +482,7 @@ void Exa_UnhideExamAnnouncement2 (void)
|
|||
extern const char *Txt_The_announcement_of_exam_is_now_visible;
|
||||
|
||||
/***** Write message to show the change made *****/
|
||||
Lay_ShowAlert (Lay_SUCCESS,Txt_The_announcement_of_exam_is_now_visible);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Txt_The_announcement_of_exam_is_now_visible);
|
||||
|
||||
/***** Show exam announcements again *****/
|
||||
Exa_ListExamAnnouncementsEdit ();
|
||||
|
@ -660,7 +660,7 @@ static void Exa_ListExamAnnouncements (Exa_TypeViewExamAnnouncement_t TypeViewEx
|
|||
{
|
||||
sprintf (Gbl.Alert.Txt,Txt_No_announcements_of_exams_of_X,
|
||||
Gbl.CurrentCrs.Crs.FullName);
|
||||
Lay_ShowAlert (Lay_INFO,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_INFO,Gbl.Alert.Txt);
|
||||
}
|
||||
|
||||
/***** List the existing exam announcements *****/
|
||||
|
|
|
@ -2857,7 +2857,7 @@ bool Brw_UpdateFoldersAssigmentsIfExistForAllUsrs (const char *OldFolderName,con
|
|||
NewFolderName);
|
||||
if (rename (PathOldFolder,PathNewFolder)) // Fail
|
||||
{
|
||||
Lay_ShowAlert (Lay_ERROR,Txt_Can_not_rename_a_folder_of_assignment);
|
||||
Ale_ShowAlert (Ale_ERROR,Txt_Can_not_rename_a_folder_of_assignment);
|
||||
NumUsrsError++;
|
||||
}
|
||||
else // Success
|
||||
|
@ -2884,11 +2884,11 @@ bool Brw_UpdateFoldersAssigmentsIfExistForAllUsrs (const char *OldFolderName,con
|
|||
Txt_Users,NumUsrs,
|
||||
Txt_Folders_renamed,NumUsrsSuccess,
|
||||
Txt_Folders_not_renamed,NumUsrsError);
|
||||
Lay_ShowAlert (Lay_INFO,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_INFO,Gbl.Alert.Txt);
|
||||
}
|
||||
else
|
||||
/***** Warning message *****/
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_Can_not_rename_a_folder_of_assignment);
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_Can_not_rename_a_folder_of_assignment);
|
||||
|
||||
/***** Free structure that stores the query result *****/
|
||||
DB_FreeMySQLResult (&mysql_res);
|
||||
|
@ -2951,7 +2951,7 @@ static void Brw_SetAndCheckQuota (void)
|
|||
Brw_SetMaxQuota ();
|
||||
Brw_CalcSizeOfDir (Gbl.FileBrowser.Priv.PathRootFolder);
|
||||
if (Brw_CheckIfQuotaExceded ())
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_Quota_exceeded);
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_Quota_exceeded);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -3228,7 +3228,7 @@ static void Brw_ShowFileBrowsersAsgWrkCrs (void)
|
|||
else // If no users are selected...
|
||||
{
|
||||
// ...write warning alert
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_You_must_select_one_ore_more_users);
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_You_must_select_one_ore_more_users);
|
||||
// ...and show again the form
|
||||
Brw_AskEditWorksCrs ();
|
||||
}
|
||||
|
@ -3467,7 +3467,7 @@ void Brw_ShowAgainFileBrowserOrWorks (void)
|
|||
{
|
||||
case Brw_ADMI_MARKS_CRS:
|
||||
case Brw_ADMI_MARKS_GRP:
|
||||
Lay_ShowAlert (Lay_INFO,Txt_Files_of_marks_must_contain_a_table_in_HTML_format_);
|
||||
Ale_ShowAlert (Ale_INFO,Txt_Files_of_marks_must_contain_a_table_in_HTML_format_);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
@ -3477,7 +3477,7 @@ void Brw_ShowAgainFileBrowserOrWorks (void)
|
|||
sprintf (Gbl.Alert.Txt,Txt_Disclaimer_the_files_hosted_here_,
|
||||
Cfg_PLATFORM_SHORT_NAME,
|
||||
Cfg_PLATFORM_RESPONSIBLE_EMAIL);
|
||||
Lay_ShowAlert (Lay_INFO,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_INFO,Gbl.Alert.Txt);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -6189,7 +6189,7 @@ void Brw_AskRemFileFromTree (void)
|
|||
Gbl.FileBrowser.FilFolLnkName,FileNameToShow);
|
||||
sprintf (Gbl.Alert.Txt,Txt_Do_you_really_want_to_remove_FILE_OR_LINK_X,
|
||||
FileNameToShow);
|
||||
Lay_ShowAlertAndButton (Lay_QUESTION,Gbl.Alert.Txt,
|
||||
Ale_ShowAlertAndButton (Ale_QUESTION,Gbl.Alert.Txt,
|
||||
Brw_ActRemoveFile[Gbl.FileBrowser.Type],NULL,
|
||||
Brw_PutParamsRemFile,
|
||||
Lay_REMOVE_BUTTON,
|
||||
|
@ -6255,7 +6255,7 @@ void Brw_RemFileFromTree (void)
|
|||
|
||||
/* Message of confirmation of removing */
|
||||
sprintf (Gbl.Alert.Txt,Txt_FILE_X_removed,FileNameToShow);
|
||||
Lay_ShowAlert (Lay_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
}
|
||||
else // File / link not found
|
||||
Lay_ShowErrorAndExit ("File / link not found.");
|
||||
|
@ -6310,7 +6310,7 @@ void Brw_RemFolderFromTree (void)
|
|||
/* Message of confirmation of successfull removing */
|
||||
sprintf (Gbl.Alert.Txt,Txt_Folder_X_removed,
|
||||
Gbl.FileBrowser.FilFolLnkName);
|
||||
Lay_ShowAlert (Lay_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
}
|
||||
else // Folder not found
|
||||
Lay_ShowErrorAndExit ("Folder not found.");
|
||||
|
@ -6334,7 +6334,7 @@ static void Brw_AskConfirmRemoveFolderNotEmpty (void)
|
|||
/***** Show question and button to remove not empty folder *****/
|
||||
sprintf (Gbl.Alert.Txt,Txt_Do_you_really_want_to_remove_the_folder_X,
|
||||
Gbl.FileBrowser.FilFolLnkName);
|
||||
Lay_ShowAlertAndButton (Lay_QUESTION,Gbl.Alert.Txt,
|
||||
Ale_ShowAlertAndButton (Ale_QUESTION,Gbl.Alert.Txt,
|
||||
Brw_ActRemoveFolderNotEmpty[Gbl.FileBrowser.Type],NULL,
|
||||
Brw_PutParamsRemFolder,
|
||||
Lay_REMOVE_BUTTON,Txt_Remove_folder);
|
||||
|
@ -6385,7 +6385,7 @@ void Brw_RemSubtreeInFileBrowser (void)
|
|||
/***** Write message of confirmation *****/
|
||||
sprintf (Gbl.Alert.Txt,Txt_Folder_X_and_all_its_contents_removed,
|
||||
Gbl.FileBrowser.FilFolLnkName);
|
||||
Lay_ShowAlert (Lay_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
}
|
||||
|
||||
/***** Show again file browser *****/
|
||||
|
@ -6667,7 +6667,7 @@ static void Brw_WriteCurrentClipboard (void)
|
|||
Txt_Copy_source,TxtClipboardZone,
|
||||
Txt_all_files_inside_the_root_folder);
|
||||
|
||||
Lay_ShowAlert (Lay_CLIPBOARD,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_CLIPBOARD,Gbl.Alert.Txt);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -7394,7 +7394,7 @@ void Brw_PasteIntoFileBrowser (void)
|
|||
}
|
||||
else
|
||||
/***** Write message ******/
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_Nothing_has_been_pasted_because_the_clipboard_is_empty_);
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_Nothing_has_been_pasted_because_the_clipboard_is_empty_);
|
||||
|
||||
/***** Show again file browser *****/
|
||||
Brw_ShowAgainFileBrowserOrWorks ();
|
||||
|
@ -7564,7 +7564,7 @@ static void Brw_PasteClipboard (void)
|
|||
Txt_Files_copied ,Pasted.NumFiles,
|
||||
Txt_Links_copied ,Pasted.NumLinks,
|
||||
Txt_Folders_copied,Pasted.NumFolds);
|
||||
Lay_ShowAlert (Lay_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
|
||||
/***** Notify new files *****/
|
||||
if (Pasted.NumFiles ||
|
||||
|
@ -7720,7 +7720,7 @@ static bool Brw_PasteTreeIntoFolder (unsigned LevelOrg,
|
|||
default:
|
||||
Lay_ShowErrorAndExit ("Can not paste unknown file type.");
|
||||
}
|
||||
Lay_ShowAlert (Lay_WARNING,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
CopyIsGoingSuccessful = false;
|
||||
}
|
||||
else // Quota not exceeded
|
||||
|
@ -7736,7 +7736,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);
|
||||
Lay_ShowAlert (Lay_WARNING,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
CopyIsGoingSuccessful = false;
|
||||
}
|
||||
else // Destination file does not exist
|
||||
|
@ -7753,7 +7753,7 @@ static bool Brw_PasteTreeIntoFolder (unsigned LevelOrg,
|
|||
{
|
||||
sprintf (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);
|
||||
Lay_ShowAlert (Lay_WARNING,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
CopyIsGoingSuccessful = false;
|
||||
}
|
||||
}
|
||||
|
@ -7768,7 +7768,7 @@ static bool Brw_PasteTreeIntoFolder (unsigned LevelOrg,
|
|||
sprintf (Gbl.Alert.Txt,FileType == Brw_IS_FILE ? Txt_The_copy_has_stopped_when_trying_to_paste_the_file_X_because_it_would_exceed_the_disk_quota :
|
||||
Txt_The_copy_has_stopped_when_trying_to_paste_the_link_X_because_it_would_exceed_the_disk_quota,
|
||||
FileNameToShow);
|
||||
Lay_ShowAlert (Lay_WARNING,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
CopyIsGoingSuccessful = false;
|
||||
}
|
||||
else // Quota not exceeded
|
||||
|
@ -7810,7 +7810,7 @@ static bool Brw_PasteTreeIntoFolder (unsigned LevelOrg,
|
|||
{
|
||||
sprintf (Gbl.Alert.Txt,Txt_The_copy_has_stopped_when_trying_to_paste_the_folder_X_because_it_would_exceed_the_disk_quota,
|
||||
FileNameToShow);
|
||||
Lay_ShowAlert (Lay_WARNING,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
CopyIsGoingSuccessful = false;
|
||||
}
|
||||
else // Quota not exceded
|
||||
|
@ -7934,7 +7934,7 @@ static void Brw_PutFormToCreateAFolder (const char FileNameToShow[NAME_MAX + 1])
|
|||
Lay_StartRoundFrame (NULL,Txt_Create_folder,NULL,NULL);
|
||||
sprintf (Gbl.Alert.Txt,Txt_You_can_create_a_new_folder_inside_the_folder_X,
|
||||
FileNameToShow);
|
||||
Lay_ShowAlert (Lay_INFO,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_INFO,Gbl.Alert.Txt);
|
||||
|
||||
/***** Folder *****/
|
||||
fprintf (Gbl.F.Out,"<label class=\"%s\">"
|
||||
|
@ -7973,7 +7973,7 @@ static void Brw_PutFormToUploadFilesUsingDropzone (const char *FileNameToShow)
|
|||
/***** Help message *****/
|
||||
sprintf (Gbl.Alert.Txt,Txt_or_you_can_upload_new_files_to_the_folder_X,
|
||||
FileNameToShow);
|
||||
Lay_ShowAlert (Lay_INFO,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (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?
|
||||
|
@ -8034,7 +8034,7 @@ static void Brw_PutFormToUploadOneFileClassic (const char *FileNameToShow)
|
|||
/***** Help message *****/
|
||||
sprintf (Gbl.Alert.Txt,Txt_or_you_can_upload_a_new_file_to_the_folder_X,
|
||||
FileNameToShow);
|
||||
Lay_ShowAlert (Lay_INFO,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_INFO,Gbl.Alert.Txt);
|
||||
|
||||
/***** Form to upload one files using the classic way *****/
|
||||
Act_FormStart (Brw_ActUploadFileClassic[Gbl.FileBrowser.Type]);
|
||||
|
@ -8076,7 +8076,7 @@ static void Brw_PutFormToPasteAFileOrFolder (const char *FileNameToShow)
|
|||
/***** Help message *****/
|
||||
sprintf (Gbl.Alert.Txt,Txt_or_you_can_make_a_file_copy_to_the_folder_X,
|
||||
FileNameToShow);
|
||||
Lay_ShowAlert (Lay_INFO,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_INFO,Gbl.Alert.Txt);
|
||||
|
||||
/***** Send button and end frame *****/
|
||||
Lay_EndRoundFrameWithButton (Lay_CREATE_BUTTON,Txt_Paste);
|
||||
|
@ -8111,7 +8111,7 @@ static void Brw_PutFormToCreateALink (const char *FileNameToShow)
|
|||
/***** Help message *****/
|
||||
sprintf (Gbl.Alert.Txt,Txt_or_you_can_create_a_new_link_inside_the_folder_X,
|
||||
FileNameToShow);
|
||||
Lay_ShowAlert (Lay_INFO,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_INFO,Gbl.Alert.Txt);
|
||||
|
||||
/***** URL *****/
|
||||
fprintf (Gbl.F.Out,"<table>"
|
||||
|
@ -8198,7 +8198,7 @@ void Brw_RecFolderFileBrowser (void)
|
|||
Fil_RemoveTree (Path);
|
||||
sprintf (Gbl.Alert.Txt,Txt_Can_not_create_the_folder_X_because_it_would_exceed_the_disk_quota,
|
||||
Gbl.FileBrowser.NewFilFolLnkName);
|
||||
Lay_ShowAlert (Lay_WARNING,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -8219,7 +8219,7 @@ void Brw_RecFolderFileBrowser (void)
|
|||
Gbl.FileBrowser.FilFolLnkName,FileNameToShow);
|
||||
sprintf (Gbl.Alert.Txt,Txt_The_folder_X_has_been_created_inside_the_folder_Y,
|
||||
Gbl.FileBrowser.NewFilFolLnkName,FileNameToShow);
|
||||
Lay_ShowAlert (Lay_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -8229,7 +8229,7 @@ void Brw_RecFolderFileBrowser (void)
|
|||
case EEXIST:
|
||||
sprintf (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);
|
||||
Lay_ShowAlert (Lay_WARNING,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
break;
|
||||
case EACCES:
|
||||
Lay_ShowErrorAndExit ("Write forbidden.");
|
||||
|
@ -8241,7 +8241,7 @@ void Brw_RecFolderFileBrowser (void)
|
|||
}
|
||||
}
|
||||
else // Folder name not valid
|
||||
Lay_ShowAlert (Lay_WARNING,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
}
|
||||
else
|
||||
Lay_ShowErrorAndExit (Txt_You_can_not_create_folders_here); // It's difficult, but not impossible that a user sees this message
|
||||
|
@ -8307,7 +8307,7 @@ void Brw_RenFolderFileBrowser (void)
|
|||
Lay_ShowErrorAndExit ("Can not rename folder.");
|
||||
break;
|
||||
}
|
||||
Lay_ShowAlert (Lay_WARNING,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
}
|
||||
else // Success
|
||||
{
|
||||
|
@ -8335,7 +8335,7 @@ void Brw_RenFolderFileBrowser (void)
|
|||
sprintf (Gbl.Alert.Txt,Txt_The_folder_name_X_has_changed_to_Y,
|
||||
Gbl.FileBrowser.FilFolLnkName,
|
||||
Gbl.FileBrowser.NewFilFolLnkName);
|
||||
Lay_ShowAlert (Lay_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -8343,11 +8343,11 @@ void Brw_RenFolderFileBrowser (void)
|
|||
{
|
||||
sprintf (Gbl.Alert.Txt,Txt_The_folder_name_X_has_not_changed,
|
||||
Gbl.FileBrowser.FilFolLnkName);
|
||||
Lay_ShowAlert (Lay_INFO,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_INFO,Gbl.Alert.Txt);
|
||||
}
|
||||
}
|
||||
else // Folder name not valid
|
||||
Lay_ShowAlert (Lay_WARNING,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
}
|
||||
else
|
||||
Lay_ShowErrorAndExit (Txt_You_can_not_rename_this_folder);
|
||||
|
@ -8394,7 +8394,7 @@ void Brw_RcvFileInFileBrwClassic (void)
|
|||
{
|
||||
/***** Receive file and show feedback message *****/
|
||||
if (!Brw_RcvFileInFileBrw (Brw_CLASSIC_UPLOAD))
|
||||
Lay_ShowAlert (Lay_WARNING,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
|
||||
/***** Show again file browser *****/
|
||||
Brw_ShowAgainFileBrowserOrWorks ();
|
||||
|
@ -8523,7 +8523,7 @@ static bool Brw_RcvFileInFileBrw (Brw_UploadType_t UploadType)
|
|||
sprintf (Gbl.Alert.Txt,Txt_The_file_X_has_been_placed_inside_the_folder_Y,
|
||||
Gbl.FileBrowser.NewFilFolLnkName,
|
||||
FileNameToShow);
|
||||
Lay_ShowAlert (Lay_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
}
|
||||
UploadSucessful = true;
|
||||
|
||||
|
@ -8665,7 +8665,7 @@ void Brw_RecLinkFileBrowser (void)
|
|||
{
|
||||
sprintf (Gbl.Alert.Txt,Txt_Can_not_create_the_link_X_because_there_is_already_a_folder_or_a_link_with_that_name,
|
||||
FileName);
|
||||
Lay_ShowAlert (Lay_WARNING,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
}
|
||||
else // URL file does not exist
|
||||
{
|
||||
|
@ -8686,7 +8686,7 @@ void Brw_RecLinkFileBrowser (void)
|
|||
Fil_RemoveTree (Path);
|
||||
sprintf (Gbl.Alert.Txt,Txt_Can_not_create_the_link_X_because_it_would_exceed_the_disk_quota,
|
||||
FileName);
|
||||
Lay_ShowAlert (Lay_WARNING,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -8707,7 +8707,7 @@ void Brw_RecLinkFileBrowser (void)
|
|||
Gbl.FileBrowser.FilFolLnkName,FileNameToShow);
|
||||
sprintf (Gbl.Alert.Txt,Txt_The_link_X_has_been_placed_inside_the_folder_Y,
|
||||
FileName,FileNameToShow);
|
||||
Lay_ShowAlert (Lay_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
|
||||
FileMetadata.FilCod = FilCod;
|
||||
Brw_GetFileMetadataByCod (&FileMetadata);
|
||||
|
@ -8745,7 +8745,7 @@ void Brw_RecLinkFileBrowser (void)
|
|||
}
|
||||
}
|
||||
else // Link URL not valid
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_UPLOAD_FILE_Invalid_link);
|
||||
Ale_ShowAlert (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
|
||||
|
@ -8862,7 +8862,7 @@ void Brw_SetDocumentAsVisible (void)
|
|||
Gbl.FileBrowser.FilFolLnkName,FileNameToShow);
|
||||
sprintf (Gbl.Alert.Txt,Txt_FILE_FOLDER_OR_LINK_X_is_now_visible,
|
||||
FileNameToShow);
|
||||
Lay_ShowAlert (Lay_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
|
||||
/***** Show again the file browser *****/
|
||||
Brw_ShowAgainFileBrowserOrWorks ();
|
||||
|
@ -8894,7 +8894,7 @@ void Brw_SetDocumentAsHidden (void)
|
|||
Gbl.FileBrowser.FileType,
|
||||
Gbl.FileBrowser.FilFolLnkName,FileNameToShow);
|
||||
sprintf (Gbl.Alert.Txt,Txt_FILE_FOLDER_OR_LINK_X_is_now_hidden,FileNameToShow);
|
||||
Lay_ShowAlert (Lay_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
|
||||
/***** Show again the file browser *****/
|
||||
Brw_ShowAgainFileBrowserOrWorks ();
|
||||
|
@ -9377,7 +9377,7 @@ void Brw_ShowFileMetadata (void)
|
|||
break;
|
||||
}
|
||||
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_The_file_of_folder_no_longer_exists_or_is_now_hidden);
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_The_file_of_folder_no_longer_exists_or_is_now_hidden);
|
||||
}
|
||||
|
||||
/***** Show again the file browser *****/
|
||||
|
@ -9536,7 +9536,7 @@ void Brw_DownloadFile (void)
|
|||
break;
|
||||
}
|
||||
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_The_file_of_folder_no_longer_exists_or_is_now_hidden);
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_The_file_of_folder_no_longer_exists_or_is_now_hidden);
|
||||
|
||||
/***** Show again the file browser *****/
|
||||
Brw_ShowAgainFileBrowserOrWorks ();
|
||||
|
@ -9854,14 +9854,14 @@ void Brw_ChgFileMetadata (void)
|
|||
/***** Write message of confirmation *****/
|
||||
sprintf (Gbl.Alert.Txt,Txt_The_properties_of_file_X_have_been_saved,
|
||||
Gbl.FileBrowser.FilFolLnkName);
|
||||
Lay_ShowAlert (Lay_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
}
|
||||
else
|
||||
{
|
||||
/***** Write message of error *****/
|
||||
sprintf (Gbl.Alert.Txt,Txt_You_dont_have_permission_to_change_the_properties_of_file_X,
|
||||
Gbl.FileBrowser.FilFolLnkName);
|
||||
Lay_ShowAlert (Lay_ERROR,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_ERROR,Gbl.Alert.Txt);
|
||||
}
|
||||
|
||||
/***** Show again the file browser *****/
|
||||
|
@ -11089,7 +11089,7 @@ void Brw_RemoveUsrWorksInCrs (struct UsrData *UsrDat,struct Course *Crs,Cns_Quie
|
|||
{
|
||||
sprintf (Gbl.Alert.Txt,Txt_Works_of_X_in_Y_removed,
|
||||
UsrDat->FullName,Crs->FullName);
|
||||
Lay_ShowAlert (Lay_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -11132,7 +11132,7 @@ void Brw_RemoveUsrWorksInAllCrss (struct UsrData *UsrDat,Cns_QuietOrVerbose_t Qu
|
|||
{
|
||||
sprintf (Gbl.Alert.Txt,Txt_The_works_of_X_have_been_removed_in_a_total_of_Y_of_his_her_Z_courses,
|
||||
UsrDat->FullName,NumCrssWorksRemoved,(unsigned) NumRows);
|
||||
Lay_ShowAlert (Lay_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -11653,7 +11653,7 @@ void Brw_RemoveOldFilesBriefcase (void)
|
|||
Txt_Files_removed ,Removed.NumFiles,
|
||||
Txt_Links_removed ,Removed.NumLinks,
|
||||
Txt_Folders_removed,Removed.NumFolds);
|
||||
Lay_ShowAlert (Lay_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
}
|
||||
|
||||
/***** Show again the file browser *****/
|
||||
|
|
|
@ -164,7 +164,7 @@ void Fol_SuggestUsrsToFollowMainZone (void)
|
|||
Lay_EndRoundFrameTable ();
|
||||
}
|
||||
else
|
||||
Lay_ShowAlert (Lay_INFO,Txt_No_user_to_whom_you_can_follow_Try_again_later);
|
||||
Ale_ShowAlert (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
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
|
||||
Ale_ShowAlert (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);
|
||||
|
@ -717,7 +717,7 @@ static void Fol_ListFollowingUsr (struct UsrData *UsrDat)
|
|||
DB_FreeMySQLResult (&mysql_res);
|
||||
}
|
||||
else
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -736,7 +736,7 @@ void Fol_ListFollowers (void)
|
|||
if (Usr_ChkUsrCodAndGetAllUsrDataFromUsrCod (&Gbl.Usrs.Other.UsrDat))
|
||||
Fol_ListFollowersUsr (&Gbl.Usrs.Other.UsrDat);
|
||||
else
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
|
||||
Ale_ShowAlert (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);
|
||||
|
@ -806,7 +806,7 @@ static void Fol_ListFollowersUsr (struct UsrData *UsrDat)
|
|||
Gbl.Usrs.Me.UsrDat.UsrCod);
|
||||
}
|
||||
else
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -1031,11 +1031,11 @@ void Fol_FollowUsr1 (void)
|
|||
(Ntf_Status_t) (NotifyByEmail ? Ntf_STATUS_BIT_EMAIL :
|
||||
0));
|
||||
}
|
||||
Gbl.Alert.Type = Lay_SUCCESS;
|
||||
Gbl.Alert.Type = Ale_SUCCESS;
|
||||
}
|
||||
else
|
||||
{
|
||||
Gbl.Alert.Type = Lay_WARNING;
|
||||
Gbl.Alert.Type = Ale_WARNING;
|
||||
sprintf (Gbl.Alert.Txt,"%s",Txt_User_not_found_or_you_do_not_have_permission_);
|
||||
}
|
||||
}
|
||||
|
@ -1044,16 +1044,16 @@ void Fol_FollowUsr2 (void)
|
|||
{
|
||||
extern const char *Txt_User_not_found_or_you_do_not_have_permission_;
|
||||
|
||||
if (Gbl.Alert.Type == Lay_SUCCESS)
|
||||
if (Gbl.Alert.Type == Ale_SUCCESS)
|
||||
/***** Show user's profile again *****/
|
||||
if (!Prf_ShowUserProfile (&Gbl.Usrs.Other.UsrDat))
|
||||
{
|
||||
Gbl.Alert.Type = Lay_WARNING;
|
||||
Gbl.Alert.Type = Ale_WARNING;
|
||||
sprintf (Gbl.Alert.Txt,"%s",Txt_User_not_found_or_you_do_not_have_permission_);
|
||||
}
|
||||
|
||||
if (Gbl.Alert.Type != Lay_SUCCESS)
|
||||
Lay_ShowPendingAlert ();
|
||||
if (Gbl.Alert.Type != Ale_SUCCESS)
|
||||
Ale_ShowPendingAlert ();
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -1079,11 +1079,11 @@ void Fol_UnfollowUsr1 (void)
|
|||
Gbl.Usrs.Other.UsrDat.UsrCod);
|
||||
DB_QueryREPLACE (Query,"can not unfollow user");
|
||||
}
|
||||
Gbl.Alert.Type = Lay_SUCCESS;
|
||||
Gbl.Alert.Type = Ale_SUCCESS;
|
||||
}
|
||||
else
|
||||
{
|
||||
Gbl.Alert.Type = Lay_WARNING;
|
||||
Gbl.Alert.Type = Ale_WARNING;
|
||||
sprintf (Gbl.Alert.Txt,"%s",Txt_User_not_found_or_you_do_not_have_permission_);
|
||||
}
|
||||
}
|
||||
|
@ -1091,7 +1091,7 @@ void Fol_UnfollowUsr1 (void)
|
|||
void Fol_UnfollowUsr2 (void)
|
||||
{
|
||||
/***** Get user to be unfollowed *****/
|
||||
if (Gbl.Alert.Type == Lay_SUCCESS)
|
||||
if (Gbl.Alert.Type == Ale_SUCCESS)
|
||||
{
|
||||
/***** Show user's profile again *****/
|
||||
if (!Prf_ShowUserProfile (&Gbl.Usrs.Other.UsrDat)) // I can not view user's profile
|
||||
|
@ -1101,7 +1101,7 @@ void Fol_UnfollowUsr2 (void)
|
|||
Fol_ListFollowingUsr (&Gbl.Usrs.Me.UsrDat); // List users I follow
|
||||
}
|
||||
else
|
||||
Lay_ShowPendingAlert ();
|
||||
Ale_ShowPendingAlert ();
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
56
swad_forum.c
56
swad_forum.c
|
@ -298,7 +298,7 @@ static unsigned For_GetNumPstsInThr (long ThrCod);
|
|||
static unsigned For_GetNumMyPstInThr (long ThrCod);
|
||||
static time_t For_GetThrReadTime (long ThrCod);
|
||||
static void For_DeleteThrFromReadThrs (long ThrCod);
|
||||
static void For_ShowPostsOfAThread (Lay_AlertType_t AlertType,const char *Message);
|
||||
static void For_ShowPostsOfAThread (Ale_AlertType_t AlertType,const char *Message);
|
||||
static void For_PutIconNewPost (void);
|
||||
static void For_PutAllHiddenParamsNewPost (void);
|
||||
|
||||
|
@ -346,7 +346,7 @@ static unsigned For_GetNumOfPostsInThrNewerThan (long ThrCod,const char *Time);
|
|||
static void For_WriteNumThrsAndPsts (unsigned NumThrs,unsigned NumThrsWithNewPosts,unsigned NumPosts);
|
||||
static void For_WriteNumberOfThrs (unsigned NumThrs,unsigned NumThrsWithNewPosts);
|
||||
static void For_ShowForumThreadsHighlightingOneThread (long ThrCodHighlighted,
|
||||
Lay_AlertType_t AlertType,const char *Message);
|
||||
Ale_AlertType_t AlertType,const char *Message);
|
||||
static void For_PutIconNewThread (void);
|
||||
static void For_PutAllHiddenParamsNewThread (void);
|
||||
static unsigned For_GetNumThrsInForum (struct Forum *Forum);
|
||||
|
@ -393,10 +393,10 @@ void For_EnablePost (void)
|
|||
|
||||
/***** Show threads again *****/
|
||||
For_ShowForumThreadsHighlightingOneThread (Gbl.Forum.ForumSelected.ThrCod,
|
||||
Lay_SUCCESS,NULL);
|
||||
Ale_SUCCESS,NULL);
|
||||
|
||||
/***** Show the posts again *****/
|
||||
For_ShowPostsOfAThread (Lay_SUCCESS,Txt_Post_unbanned);
|
||||
For_ShowPostsOfAThread (Ale_SUCCESS,Txt_Post_unbanned);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -421,10 +421,10 @@ void For_DisablePost (void)
|
|||
|
||||
/***** Show threads again *****/
|
||||
For_ShowForumThreadsHighlightingOneThread (Gbl.Forum.ForumSelected.ThrCod,
|
||||
Lay_SUCCESS,NULL);
|
||||
Ale_SUCCESS,NULL);
|
||||
|
||||
/***** Show the posts again *****/
|
||||
For_ShowPostsOfAThread (Lay_SUCCESS,Txt_Post_banned);
|
||||
For_ShowPostsOfAThread (Ale_SUCCESS,Txt_Post_banned);
|
||||
}
|
||||
else
|
||||
Lay_ShowErrorAndExit ("The post to be banned no longer exists.");
|
||||
|
@ -968,7 +968,7 @@ void For_RemoveUsrFromReadThrs (long UsrCod)
|
|||
/************************ Show posts in a thread *****************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void For_ShowPostsOfAThread (Lay_AlertType_t AlertType,const char *Message)
|
||||
static void For_ShowPostsOfAThread (Ale_AlertType_t AlertType,const char *Message)
|
||||
{
|
||||
extern const char *Hlp_SOCIAL_Forums_posts;
|
||||
extern const char *Txt_Thread;
|
||||
|
@ -1004,7 +1004,7 @@ static void For_ShowPostsOfAThread (Lay_AlertType_t AlertType,const char *Messag
|
|||
fprintf (Gbl.F.Out,"<section id=\"%s\">",For_ID_FORUM_POSTS_SECTION);
|
||||
if (Message)
|
||||
if (Message[0])
|
||||
Lay_ShowAlert (AlertType,Message);
|
||||
Ale_ShowAlert (AlertType,Message);
|
||||
|
||||
/***** Start frame *****/
|
||||
sprintf (FrameTitle,"%s: %s",Txt_Thread,Thr.Subject);
|
||||
|
@ -2451,7 +2451,7 @@ void For_ShowForumTheads (void)
|
|||
For_ShowForumList ();
|
||||
|
||||
/***** Show forum threads with no one highlighted *****/
|
||||
For_ShowForumThreadsHighlightingOneThread (-1L,Lay_SUCCESS,NULL);
|
||||
For_ShowForumThreadsHighlightingOneThread (-1L,Ale_SUCCESS,NULL);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -2459,7 +2459,7 @@ void For_ShowForumTheads (void)
|
|||
/*****************************************************************************/
|
||||
|
||||
static void For_ShowForumThreadsHighlightingOneThread (long ThrCodHighlighted,
|
||||
Lay_AlertType_t AlertType,const char *Message)
|
||||
Ale_AlertType_t AlertType,const char *Message)
|
||||
{
|
||||
extern const char *Hlp_SOCIAL_Forums_threads;
|
||||
extern const char *Txt_Forum;
|
||||
|
@ -2541,7 +2541,7 @@ static void For_ShowForumThreadsHighlightingOneThread (long ThrCodHighlighted,
|
|||
fprintf (Gbl.F.Out,"<section id=\"%s\">",For_ID_FORUM_THREADS_SECTION);
|
||||
if (Message)
|
||||
if (Message[0])
|
||||
Lay_ShowAlert (AlertType,Message);
|
||||
Ale_ShowAlert (AlertType,Message);
|
||||
|
||||
/***** Start frame for threads of this forum *****/
|
||||
sprintf (FrameTitle,"%s: %s",Txt_Forum,ForumName);
|
||||
|
@ -3559,10 +3559,10 @@ void For_ShowThreadPosts (void)
|
|||
|
||||
/***** Show threads again *****/
|
||||
For_ShowForumThreadsHighlightingOneThread (Gbl.Forum.ForumSelected.ThrCod,
|
||||
Lay_SUCCESS,NULL);
|
||||
Ale_SUCCESS,NULL);
|
||||
|
||||
/***** Show the posts of that thread *****/
|
||||
For_ShowPostsOfAThread (Lay_SUCCESS,NULL);
|
||||
For_ShowPostsOfAThread (Ale_SUCCESS,NULL);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -3987,10 +3987,10 @@ void For_ReceiveForumPost (void)
|
|||
|
||||
/***** Show threads again *****/
|
||||
For_ShowForumThreadsHighlightingOneThread (Gbl.Forum.ForumSelected.ThrCod,
|
||||
Lay_SUCCESS,NULL);
|
||||
Ale_SUCCESS,NULL);
|
||||
|
||||
/***** Show again the posts of this thread of the forum *****/
|
||||
For_ShowPostsOfAThread (Lay_SUCCESS,Txt_Post_sent);
|
||||
For_ShowPostsOfAThread (Ale_SUCCESS,Txt_Post_sent);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -4073,14 +4073,14 @@ void For_RemovePost (void)
|
|||
if (ThreadDeleted)
|
||||
/***** Show the remaining threads *****/
|
||||
For_ShowForumThreadsHighlightingOneThread (Gbl.Forum.ForumSelected.ThrCod,
|
||||
Lay_SUCCESS,Txt_Post_and_thread_removed);
|
||||
Ale_SUCCESS,Txt_Post_and_thread_removed);
|
||||
else
|
||||
{
|
||||
/***** Show threads again *****/
|
||||
For_ShowForumThreadsHighlightingOneThread (Gbl.Forum.ForumSelected.ThrCod,
|
||||
Lay_SUCCESS,NULL);
|
||||
Ale_SUCCESS,NULL);
|
||||
/***** Show the remaining posts *****/
|
||||
For_ShowPostsOfAThread (Lay_SUCCESS,Txt_Post_removed);
|
||||
For_ShowPostsOfAThread (Ale_SUCCESS,Txt_Post_removed);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -4112,7 +4112,7 @@ void For_RequestRemoveThread (void)
|
|||
else
|
||||
sprintf (Gbl.Alert.Txt,"%s",
|
||||
Txt_Do_you_really_want_to_remove_the_entire_thread);
|
||||
Lay_ShowAlertAndButton (Lay_QUESTION,Gbl.Alert.Txt,
|
||||
Ale_ShowAlertAndButton (Ale_QUESTION,Gbl.Alert.Txt,
|
||||
For_ActionsDelThrFor[Gbl.Forum.ForumSelected.Type],
|
||||
For_ID_FORUM_THREADS_SECTION,
|
||||
For_PutAllHiddenParamsRemThread,
|
||||
|
@ -4121,7 +4121,7 @@ void For_RequestRemoveThread (void)
|
|||
|
||||
/***** Show the threads again *****/
|
||||
For_ShowForumThreadsHighlightingOneThread (Gbl.Forum.ForumSelected.ThrCod,
|
||||
Lay_SUCCESS,NULL);
|
||||
Ale_SUCCESS,NULL);
|
||||
}
|
||||
|
||||
static void For_PutAllHiddenParamsRemThread (void)
|
||||
|
@ -4165,11 +4165,11 @@ void For_RemoveThread (void)
|
|||
{
|
||||
sprintf (Gbl.Alert.Txt,Txt_Thread_X_removed,Subject);
|
||||
For_ShowForumThreadsHighlightingOneThread (Gbl.Forum.ForumSelected.ThrCod,
|
||||
Lay_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
}
|
||||
else
|
||||
For_ShowForumThreadsHighlightingOneThread (Gbl.Forum.ForumSelected.ThrCod,
|
||||
Lay_SUCCESS,Txt_Thread_removed);
|
||||
Ale_SUCCESS,Txt_Thread_removed);
|
||||
}
|
||||
else
|
||||
Lay_ShowErrorAndExit ("You can not remove threads in this forum.");
|
||||
|
@ -4202,11 +4202,11 @@ void For_CutThread (void)
|
|||
{
|
||||
sprintf (Gbl.Alert.Txt,Txt_Thread_X_marked_to_be_moved,Subject);
|
||||
For_ShowForumThreadsHighlightingOneThread (Gbl.Forum.ForumSelected.ThrCod,
|
||||
Lay_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
}
|
||||
else
|
||||
For_ShowForumThreadsHighlightingOneThread (Gbl.Forum.ForumSelected.ThrCod,
|
||||
Lay_SUCCESS,Txt_Thread_marked_to_be_moved);
|
||||
Ale_SUCCESS,Txt_Thread_marked_to_be_moved);
|
||||
|
||||
}
|
||||
|
||||
|
@ -4240,11 +4240,11 @@ void For_PasteThread (void)
|
|||
sprintf (Gbl.Alert.Txt,Txt_The_thread_X_is_already_in_this_forum,
|
||||
Subject);
|
||||
For_ShowForumThreadsHighlightingOneThread (Gbl.Forum.ForumSelected.ThrCod,
|
||||
Lay_WARNING,Gbl.Alert.Txt);
|
||||
Ale_WARNING,Gbl.Alert.Txt);
|
||||
}
|
||||
else
|
||||
For_ShowForumThreadsHighlightingOneThread (Gbl.Forum.ForumSelected.ThrCod,
|
||||
Lay_WARNING,Txt_The_thread_is_already_in_this_forum);
|
||||
Ale_WARNING,Txt_The_thread_is_already_in_this_forum);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -4260,11 +4260,11 @@ void For_PasteThread (void)
|
|||
sprintf (Gbl.Alert.Txt,Txt_Thread_X_moved_to_this_forum,
|
||||
Subject);
|
||||
For_ShowForumThreadsHighlightingOneThread (Gbl.Forum.ForumSelected.ThrCod,
|
||||
Lay_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
}
|
||||
else
|
||||
For_ShowForumThreadsHighlightingOneThread (Gbl.Forum.ForumSelected.ThrCod,
|
||||
Lay_SUCCESS,Txt_Thread_moved_to_this_forum);
|
||||
Ale_SUCCESS,Txt_Thread_moved_to_this_forum);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -120,7 +120,7 @@ void Gbl_InitializeGlobals (void)
|
|||
Gbl.Form.Num = -1; // Number of form. It's increased by 1 at the begin of each form
|
||||
Gbl.Form.Inside = false; // Set to true inside a form to avoid nested forms
|
||||
|
||||
Gbl.Alert.Type = Lay_NONE; // Used to show alert in a posteriori function
|
||||
Gbl.Alert.Type = Ale_NONE; // Used to show alert in a posteriori function
|
||||
|
||||
Gbl.DB.DatabaseIsOpen = false;
|
||||
Gbl.DB.LockedTables = false;
|
||||
|
|
|
@ -32,6 +32,7 @@
|
|||
#include <sys/time.h> // For tz
|
||||
#include <mysql/mysql.h> // To access MySQL databases
|
||||
|
||||
#include "swad_alert.h"
|
||||
#include "swad_agenda.h"
|
||||
#include "swad_assignment.h"
|
||||
#include "swad_attendance.h"
|
||||
|
@ -102,8 +103,8 @@ struct Globals
|
|||
} Form;
|
||||
struct
|
||||
{
|
||||
Lay_AlertType_t Type;
|
||||
char Txt[Lay_MAX_BYTES_ALERT + 1];
|
||||
Ale_AlertType_t Type;
|
||||
char Txt[Ale_MAX_BYTES_ALERT + 1];
|
||||
} Alert; // Used in a posteriori function to write success / warning message
|
||||
struct
|
||||
{
|
||||
|
|
174
swad_group.c
174
swad_group.c
|
@ -63,11 +63,11 @@ extern struct Globals Gbl;
|
|||
/***************************** Internal prototypes ***************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void Grp_ReqEditGroupsInternal (Lay_AlertType_t AlertTypeGroupTypes,const char *MessageGroupTypes,
|
||||
Lay_AlertType_t AlertTypeGroups,const char *MessageGroups);
|
||||
static void Grp_ReqEditGroupsInternal (Ale_AlertType_t AlertTypeGroupTypes,const char *MessageGroupTypes,
|
||||
Ale_AlertType_t AlertTypeGroups,const char *MessageGroups);
|
||||
static void Grp_ReqEditGroupsInternal0 (void);
|
||||
static void Grp_ReqEditGroupsInternal1 (Lay_AlertType_t AlertTypeGroupTypes,const char *MessageGroupTypes);
|
||||
static void Grp_ReqEditGroupsInternal2 (Lay_AlertType_t AlertTypeGroups,const char *MessageGroups);
|
||||
static void Grp_ReqEditGroupsInternal1 (Ale_AlertType_t AlertTypeGroupTypes,const char *MessageGroupTypes);
|
||||
static void Grp_ReqEditGroupsInternal2 (Ale_AlertType_t AlertTypeGroups,const char *MessageGroups);
|
||||
|
||||
static void Grp_EditGroupTypes (void);
|
||||
static void Grp_EditGroups (void);
|
||||
|
@ -181,12 +181,12 @@ void Grp_WriteNamesOfSelectedGrps (void)
|
|||
|
||||
void Grp_ReqEditGroups (void)
|
||||
{
|
||||
Grp_ReqEditGroupsInternal (Lay_INFO,NULL,
|
||||
Lay_INFO,NULL);
|
||||
Grp_ReqEditGroupsInternal (Ale_INFO,NULL,
|
||||
Ale_INFO,NULL);
|
||||
}
|
||||
|
||||
static void Grp_ReqEditGroupsInternal (Lay_AlertType_t AlertTypeGroupTypes,const char *MessageGroupTypes,
|
||||
Lay_AlertType_t AlertTypeGroups,const char *MessageGroups)
|
||||
static void Grp_ReqEditGroupsInternal (Ale_AlertType_t AlertTypeGroupTypes,const char *MessageGroupTypes,
|
||||
Ale_AlertType_t AlertTypeGroups,const char *MessageGroups)
|
||||
{
|
||||
Grp_ReqEditGroupsInternal0 ();
|
||||
Grp_ReqEditGroupsInternal1 (AlertTypeGroupTypes,MessageGroupTypes);
|
||||
|
@ -199,7 +199,7 @@ static void Grp_ReqEditGroupsInternal0 (void)
|
|||
fprintf (Gbl.F.Out,"<section id=\"%s\">",Grp_SECTION_GROUP_TYPES);
|
||||
}
|
||||
|
||||
static void Grp_ReqEditGroupsInternal1 (Lay_AlertType_t AlertTypeGroupTypes,const char *MessageGroupTypes)
|
||||
static void Grp_ReqEditGroupsInternal1 (Ale_AlertType_t AlertTypeGroupTypes,const char *MessageGroupTypes)
|
||||
{
|
||||
/***** Get list of groups types and groups in this course *****/
|
||||
Grp_GetListGrpTypesAndGrpsInThisCrs (Grp_ALL_GROUP_TYPES);
|
||||
|
@ -207,7 +207,7 @@ static void Grp_ReqEditGroupsInternal1 (Lay_AlertType_t AlertTypeGroupTypes,cons
|
|||
/***** Show optional alert *****/
|
||||
if (MessageGroupTypes)
|
||||
if (MessageGroupTypes[0])
|
||||
Lay_ShowAlert (AlertTypeGroupTypes,MessageGroupTypes);
|
||||
Ale_ShowAlert (AlertTypeGroupTypes,MessageGroupTypes);
|
||||
|
||||
/***** Put form to edit group types *****/
|
||||
Grp_EditGroupTypes ();
|
||||
|
@ -219,12 +219,12 @@ static void Grp_ReqEditGroupsInternal1 (Lay_AlertType_t AlertTypeGroupTypes,cons
|
|||
fprintf (Gbl.F.Out,"<section id=\"%s\">",Grp_SECTION_GROUPS);
|
||||
}
|
||||
|
||||
static void Grp_ReqEditGroupsInternal2 (Lay_AlertType_t AlertTypeGroups,const char *MessageGroups)
|
||||
static void Grp_ReqEditGroupsInternal2 (Ale_AlertType_t AlertTypeGroups,const char *MessageGroups)
|
||||
{
|
||||
/***** Show optional alert *****/
|
||||
if (MessageGroups)
|
||||
if (MessageGroups[0])
|
||||
Lay_ShowAlert (AlertTypeGroups,MessageGroups);
|
||||
Ale_ShowAlert (AlertTypeGroups,MessageGroups);
|
||||
|
||||
/***** Put form to edit groups *****/
|
||||
if (Gbl.CurrentCrs.Grps.GrpTypes.Num) // If there are group types...
|
||||
|
@ -262,7 +262,7 @@ static void Grp_EditGroupTypes (void)
|
|||
{
|
||||
sprintf (Gbl.Alert.Txt,Txt_There_are_no_types_of_group_in_the_course_X,
|
||||
Gbl.CurrentCrs.Crs.ShrtName);
|
||||
Lay_ShowAlert (Lay_INFO,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_INFO,Gbl.Alert.Txt);
|
||||
}
|
||||
|
||||
/***** End frame *****/
|
||||
|
@ -293,7 +293,7 @@ static void Grp_EditGroups (void)
|
|||
{
|
||||
sprintf (Gbl.Alert.Txt,Txt_No_groups_have_been_created_in_the_course_X,
|
||||
Gbl.CurrentCrs.Crs.ShrtName);
|
||||
Lay_ShowAlert (Lay_INFO,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_INFO,Gbl.Alert.Txt);
|
||||
}
|
||||
|
||||
/***** End frame *****/
|
||||
|
@ -607,12 +607,12 @@ void Grp_ChangeMyGrps (void)
|
|||
if (MySelectionIsValid)
|
||||
{
|
||||
if (Grp_ChangeMyGrpsAtomically (&LstGrpsIWant))
|
||||
Lay_ShowAlert (Lay_SUCCESS,Txt_The_requested_group_changes_were_successful);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Txt_The_requested_group_changes_were_successful);
|
||||
else
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_There_has_been_no_change_in_groups);
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_There_has_been_no_change_in_groups);
|
||||
}
|
||||
else
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_In_a_type_of_group_with_single_enrolment_students_can_not_be_registered_in_more_than_one_group);
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_In_a_type_of_group_with_single_enrolment_students_can_not_be_registered_in_more_than_one_group);
|
||||
|
||||
/***** Free memory with the list of groups which I want to belong to *****/
|
||||
Grp_FreeListCodGrp (&LstGrpsIWant);
|
||||
|
@ -653,12 +653,12 @@ void Grp_ChangeOtherUsrGrps (void)
|
|||
if (SelectionIsValid)
|
||||
{
|
||||
if (Grp_ChangeGrpsOtherUsrAtomically (&LstGrpsUsrWants))
|
||||
Lay_ShowAlert (Lay_SUCCESS,Txt_The_requested_group_changes_were_successful);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Txt_The_requested_group_changes_were_successful);
|
||||
else
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_There_has_been_no_change_in_groups);
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_There_has_been_no_change_in_groups);
|
||||
}
|
||||
else
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_In_a_type_of_group_with_single_enrolment_students_can_not_be_registered_in_more_than_one_group);
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_In_a_type_of_group_with_single_enrolment_students_can_not_be_registered_in_more_than_one_group);
|
||||
|
||||
/***** Free memory with the list of groups to/from which register/remove users *****/
|
||||
Grp_FreeListCodGrp (&LstGrpsUsrWants);
|
||||
|
@ -1025,7 +1025,7 @@ void Grp_RegisterUsrIntoGroups (struct UsrData *UsrDat,struct ListCodGrps *LstGr
|
|||
Grp_RemoveUsrFromGroup (UsrDat->UsrCod,LstGrpsHeBelongs.GrpCods[NumGrpHeBelongs]);
|
||||
sprintf (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);
|
||||
Lay_ShowAlert (Lay_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
}
|
||||
|
||||
if (!AlreadyRegisteredInGrp) // If the user does not belong to the selected group
|
||||
|
@ -1034,7 +1034,7 @@ void Grp_RegisterUsrIntoGroups (struct UsrData *UsrDat,struct ListCodGrps *LstGr
|
|||
sprintf (Gbl.Alert.Txt,Txt_THE_USER_X_has_been_enroled_in_the_group_of_type_Y_Z,
|
||||
UsrDat->FullName,Gbl.CurrentCrs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp].GrpTypName,
|
||||
Gbl.CurrentCrs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp].LstGrps[NumGrpThisType].GrpName);
|
||||
Lay_ShowAlert (Lay_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (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
|
||||
|
@ -1088,7 +1088,7 @@ unsigned Grp_RemoveUsrFromGroups (struct UsrData *UsrDat,struct ListCodGrps *Lst
|
|||
else // NumGrpsHeIsRemoved > 1
|
||||
sprintf (Gbl.Alert.Txt,Txt_THE_USER_X_has_been_removed_from_Y_groups,
|
||||
UsrDat->FullName,NumGrpsHeIsRemoved);
|
||||
Lay_ShowAlert (Lay_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
|
||||
/***** Free the list of groups of this type to which the user belonged *****/
|
||||
Grp_FreeListCodGrp (&LstGrpsHeBelongs);
|
||||
|
@ -1119,7 +1119,7 @@ void Grp_RemUsrFromAllGrpsInCrs (struct UsrData *UsrDat,struct Course *Crs,Cns_Q
|
|||
{
|
||||
sprintf (Gbl.Alert.Txt,Txt_THE_USER_X_has_been_removed_from_all_groups_of_the_course_Y,
|
||||
UsrDat->FullName,Crs->FullName);
|
||||
Lay_ShowAlert (Lay_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1142,7 +1142,7 @@ void Grp_RemUsrFromAllGrps (struct UsrData *UsrDat,Cns_QuietOrVerbose_t QuietOrV
|
|||
{
|
||||
sprintf (Gbl.Alert.Txt,Txt_THE_USER_X_has_been_removed_from_all_groups_in_all_courses,
|
||||
UsrDat->FullName);
|
||||
Lay_ShowAlert (Lay_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1701,7 +1701,7 @@ void Grp_ShowLstGrpsToChgMyGrps (bool ShowWarningsToStudents)
|
|||
{
|
||||
sprintf (Gbl.Alert.Txt,Txt_No_groups_have_been_created_in_the_course_X,
|
||||
Gbl.CurrentCrs.Crs.FullName);
|
||||
Lay_ShowAlert (Lay_INFO,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_INFO,Gbl.Alert.Txt);
|
||||
|
||||
/***** Button to create group *****/
|
||||
if (ICanEdit)
|
||||
|
@ -1757,7 +1757,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);
|
||||
Lay_ShowAlert (Lay_WARNING,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1765,7 +1765,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);
|
||||
Lay_ShowAlert (Lay_INFO,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_INFO,Gbl.Alert.Txt);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -3257,7 +3257,7 @@ void Grp_RecFormNewGrpTyp (void)
|
|||
extern const char *Txt_The_type_of_group_X_already_exists;
|
||||
extern const char *Txt_Created_new_type_of_group_X;
|
||||
extern const char *Txt_You_must_specify_the_name_of_the_new_type_of_group;
|
||||
Lay_AlertType_t AlertType;
|
||||
Ale_AlertType_t AlertType;
|
||||
|
||||
/***** Get parameters from form *****/
|
||||
/* Get the name of group type */
|
||||
|
@ -3279,7 +3279,7 @@ void Grp_RecFormNewGrpTyp (void)
|
|||
/***** If name of group type was in database... *****/
|
||||
if (Grp_CheckIfGroupTypeNameExists (Gbl.CurrentCrs.Grps.GrpTyp.GrpTypName,-1L))
|
||||
{
|
||||
AlertType = Lay_WARNING;
|
||||
AlertType = Ale_WARNING;
|
||||
sprintf (Gbl.Alert.Txt,Txt_The_type_of_group_X_already_exists,
|
||||
Gbl.CurrentCrs.Grps.GrpTyp.GrpTypName);
|
||||
}
|
||||
|
@ -3287,20 +3287,20 @@ void Grp_RecFormNewGrpTyp (void)
|
|||
{
|
||||
Grp_CreateGroupType ();
|
||||
|
||||
AlertType = Lay_SUCCESS;
|
||||
AlertType = Ale_SUCCESS;
|
||||
sprintf (Gbl.Alert.Txt,Txt_Created_new_type_of_group_X,
|
||||
Gbl.CurrentCrs.Grps.GrpTyp.GrpTypName);
|
||||
}
|
||||
}
|
||||
else // If there is not a group type name
|
||||
{
|
||||
AlertType = Lay_WARNING;
|
||||
AlertType = Ale_WARNING;
|
||||
sprintf (Gbl.Alert.Txt,"%s",Txt_You_must_specify_the_name_of_the_new_type_of_group);
|
||||
}
|
||||
|
||||
/***** Show the form again *****/
|
||||
Grp_ReqEditGroupsInternal (AlertType,Gbl.Alert.Txt,
|
||||
Lay_INFO,NULL);
|
||||
Ale_INFO,NULL);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -3326,7 +3326,7 @@ void Grp_RecFormNewGrp (void)
|
|||
extern const char *Txt_The_group_X_already_exists;
|
||||
extern const char *Txt_Created_new_group_X;
|
||||
extern const char *Txt_You_must_specify_the_name_of_the_new_group;
|
||||
Lay_AlertType_t AlertType;
|
||||
Ale_AlertType_t AlertType;
|
||||
|
||||
/***** Get parameters from form *****/
|
||||
if ((Gbl.CurrentCrs.Grps.GrpTyp.GrpTypCod = Grp_GetParamGrpTypCod ()) > 0) // Group type valid
|
||||
|
@ -3347,7 +3347,7 @@ void Grp_RecFormNewGrp (void)
|
|||
/***** If name of group was in database... *****/
|
||||
if (Grp_CheckIfGroupNameExists (Gbl.CurrentCrs.Grps.GrpTyp.GrpTypCod,Gbl.CurrentCrs.Grps.GrpName,-1L))
|
||||
{
|
||||
AlertType = Lay_WARNING;
|
||||
AlertType = Ale_WARNING;
|
||||
sprintf (Gbl.Alert.Txt,Txt_The_group_X_already_exists,
|
||||
Gbl.CurrentCrs.Grps.GrpName);
|
||||
}
|
||||
|
@ -3356,25 +3356,25 @@ void Grp_RecFormNewGrp (void)
|
|||
Grp_CreateGroup ();
|
||||
|
||||
/* Write success message */
|
||||
AlertType = Lay_SUCCESS;
|
||||
AlertType = Ale_SUCCESS;
|
||||
sprintf (Gbl.Alert.Txt,Txt_Created_new_group_X,
|
||||
Gbl.CurrentCrs.Grps.GrpName);
|
||||
}
|
||||
}
|
||||
else // If there is not a group name
|
||||
{
|
||||
AlertType = Lay_ERROR;
|
||||
AlertType = Ale_ERROR;
|
||||
sprintf (Gbl.Alert.Txt,"%s",Txt_You_must_specify_the_name_of_the_new_group);
|
||||
}
|
||||
}
|
||||
else // Invalid group type
|
||||
{
|
||||
AlertType = Lay_ERROR;
|
||||
AlertType = Ale_ERROR;
|
||||
sprintf (Gbl.Alert.Txt,"%s","Wrong type of group.");
|
||||
}
|
||||
|
||||
/***** Show the form again *****/
|
||||
Grp_ReqEditGroupsInternal (Lay_INFO,NULL,
|
||||
Grp_ReqEditGroupsInternal (Ale_INFO,NULL,
|
||||
AlertType,Gbl.Alert.Txt);
|
||||
}
|
||||
|
||||
|
@ -3508,14 +3508,14 @@ static void Grp_AskConfirmRemGrpTypWithGrps (unsigned NumGrps)
|
|||
else
|
||||
sprintf (Gbl.Alert.Txt,Txt_Do_you_really_want_to_remove_the_type_of_group_X_Y_groups_,
|
||||
Gbl.CurrentCrs.Grps.GrpTyp.GrpTypName,NumGrps);
|
||||
Lay_ShowAlertAndButton (Lay_QUESTION,Gbl.Alert.Txt,
|
||||
Ale_ShowAlertAndButton (Ale_QUESTION,Gbl.Alert.Txt,
|
||||
ActRemGrpTyp,Grp_SECTION_GROUP_TYPES,
|
||||
Grp_PutParamRemGrpTyp,
|
||||
Lay_REMOVE_BUTTON,Txt_Remove_type_of_group);
|
||||
|
||||
/***** Show the form to edit group types and groups again *****/
|
||||
Grp_ReqEditGroupsInternal1 (Lay_INFO,NULL);
|
||||
Grp_ReqEditGroupsInternal2 (Lay_INFO,NULL);
|
||||
Grp_ReqEditGroupsInternal1 (Ale_INFO,NULL);
|
||||
Grp_ReqEditGroupsInternal2 (Ale_INFO,NULL);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -3549,7 +3549,7 @@ static void Grp_AskConfirmRemGrp (void)
|
|||
|
||||
/***** Show the form to edit group types again *****/
|
||||
Grp_ReqEditGroupsInternal0 ();
|
||||
Grp_ReqEditGroupsInternal1 (Lay_INFO,NULL);
|
||||
Grp_ReqEditGroupsInternal1 (Ale_INFO,NULL);
|
||||
|
||||
/***** Show question and button to remove group *****/
|
||||
if (NumStds == 0)
|
||||
|
@ -3561,12 +3561,12 @@ static void Grp_AskConfirmRemGrp (void)
|
|||
else
|
||||
sprintf (Gbl.Alert.Txt,Txt_Do_you_really_want_to_remove_the_group_X_Y_students_,
|
||||
GrpDat.GrpName,NumStds);
|
||||
Lay_ShowAlertAndButton (Lay_QUESTION,Gbl.Alert.Txt,
|
||||
Ale_ShowAlertAndButton (Ale_QUESTION,Gbl.Alert.Txt,
|
||||
ActRemGrp,Grp_SECTION_GROUPS,Grp_PutParamRemGrp,
|
||||
Lay_REMOVE_BUTTON,Txt_Remove_group);
|
||||
|
||||
/***** Show the form to edit groups again *****/
|
||||
Grp_ReqEditGroupsInternal2 (Lay_INFO,NULL);
|
||||
Grp_ReqEditGroupsInternal2 (Ale_INFO,NULL);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -3658,8 +3658,8 @@ static void Grp_RemoveGroupTypeCompletely (void)
|
|||
Gbl.CurrentCrs.Grps.GrpTyp.GrpTypName);
|
||||
|
||||
/***** Show the form again *****/
|
||||
Grp_ReqEditGroupsInternal (Lay_SUCCESS,Gbl.Alert.Txt,
|
||||
Lay_INFO,NULL);
|
||||
Grp_ReqEditGroupsInternal (Ale_SUCCESS,Gbl.Alert.Txt,
|
||||
Ale_INFO,NULL);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -3707,8 +3707,8 @@ static void Grp_RemoveGroupCompletely (void)
|
|||
sprintf (Gbl.Alert.Txt,Txt_Group_X_removed,GrpDat.GrpName);
|
||||
|
||||
/***** Show the form again *****/
|
||||
Grp_ReqEditGroupsInternal (Lay_INFO,NULL,
|
||||
Lay_SUCCESS,Gbl.Alert.Txt);
|
||||
Grp_ReqEditGroupsInternal (Ale_INFO,NULL,
|
||||
Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -3739,8 +3739,8 @@ void Grp_OpenGroup (void)
|
|||
|
||||
/***** Show the form again *****/
|
||||
Gbl.CurrentCrs.Grps.Open = true;
|
||||
Grp_ReqEditGroupsInternal (Lay_INFO,NULL,
|
||||
Lay_SUCCESS,Gbl.Alert.Txt);
|
||||
Grp_ReqEditGroupsInternal (Ale_INFO,NULL,
|
||||
Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -3771,8 +3771,8 @@ void Grp_CloseGroup (void)
|
|||
|
||||
/***** Show the form again *****/
|
||||
Gbl.CurrentCrs.Grps.Open = false;
|
||||
Grp_ReqEditGroupsInternal (Lay_INFO,NULL,
|
||||
Lay_SUCCESS,Gbl.Alert.Txt);
|
||||
Grp_ReqEditGroupsInternal (Ale_INFO,NULL,
|
||||
Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -3804,8 +3804,8 @@ void Grp_EnableFileZonesGrp (void)
|
|||
|
||||
/***** Show the form again *****/
|
||||
Gbl.CurrentCrs.Grps.FileZones = true;
|
||||
Grp_ReqEditGroupsInternal (Lay_INFO,NULL,
|
||||
Lay_SUCCESS,Gbl.Alert.Txt);
|
||||
Grp_ReqEditGroupsInternal (Ale_INFO,NULL,
|
||||
Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -3837,8 +3837,8 @@ void Grp_DisableFileZonesGrp (void)
|
|||
|
||||
/***** Show the form again *****/
|
||||
Gbl.CurrentCrs.Grps.FileZones = false;
|
||||
Grp_ReqEditGroupsInternal (Lay_INFO,NULL,
|
||||
Lay_SUCCESS,Gbl.Alert.Txt);
|
||||
Grp_ReqEditGroupsInternal (Ale_INFO,NULL,
|
||||
Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -3852,7 +3852,7 @@ void Grp_ChangeGroupType (void)
|
|||
long NewGrpTypCod;
|
||||
struct GroupData GrpDat;
|
||||
char Query[512];
|
||||
Lay_AlertType_t AlertType;
|
||||
Ale_AlertType_t AlertType;
|
||||
|
||||
/***** Get parameters from form *****/
|
||||
/* Get group code */
|
||||
|
@ -3869,7 +3869,7 @@ void Grp_ChangeGroupType (void)
|
|||
/***** If group was in database... *****/
|
||||
if (Grp_CheckIfGroupNameExists (NewGrpTypCod,GrpDat.GrpName,-1L))
|
||||
{
|
||||
AlertType = Lay_WARNING;
|
||||
AlertType = Ale_WARNING;
|
||||
sprintf (Gbl.Alert.Txt,Txt_The_group_X_already_exists,GrpDat.GrpName);
|
||||
}
|
||||
else
|
||||
|
@ -3880,14 +3880,14 @@ void Grp_ChangeGroupType (void)
|
|||
DB_QueryUPDATE (Query,"can not update the type of a group");
|
||||
|
||||
/***** Write message to show the change made *****/
|
||||
AlertType = Lay_SUCCESS;
|
||||
AlertType = Ale_SUCCESS;
|
||||
sprintf (Gbl.Alert.Txt,Txt_The_type_of_group_of_the_group_X_has_changed,
|
||||
GrpDat.GrpName);
|
||||
}
|
||||
|
||||
/***** Show the form again *****/
|
||||
Gbl.CurrentCrs.Grps.GrpTyp.GrpTypCod = NewGrpTypCod;
|
||||
Grp_ReqEditGroupsInternal (Lay_INFO,NULL,
|
||||
Grp_ReqEditGroupsInternal (Ale_INFO,NULL,
|
||||
AlertType,Gbl.Alert.Txt);
|
||||
}
|
||||
|
||||
|
@ -3902,7 +3902,7 @@ void Grp_ChangeMandatGrpTyp (void)
|
|||
extern const char *Txt_The_enrolment_of_students_into_groups_of_type_X_is_now_voluntary;
|
||||
char Query[1024];
|
||||
bool NewMandatoryEnrolment;
|
||||
Lay_AlertType_t AlertType;
|
||||
Ale_AlertType_t AlertType;
|
||||
|
||||
/***** Get parameters of the form *****/
|
||||
/* Get the código of type of group */
|
||||
|
@ -3919,7 +3919,7 @@ void Grp_ChangeMandatGrpTyp (void)
|
|||
(this happens when return is pressed without changes in the form) *****/
|
||||
if (Gbl.CurrentCrs.Grps.GrpTyp.MandatoryEnrolment == NewMandatoryEnrolment)
|
||||
{
|
||||
AlertType = Lay_INFO;
|
||||
AlertType = Ale_INFO;
|
||||
sprintf (Gbl.Alert.Txt,Txt_The_type_of_enrolment_of_the_type_of_group_X_has_not_changed,
|
||||
Gbl.CurrentCrs.Grps.GrpTyp.GrpTypName);
|
||||
}
|
||||
|
@ -3933,7 +3933,7 @@ void Grp_ChangeMandatGrpTyp (void)
|
|||
DB_QueryUPDATE (Query,"can not update enrolment type of a type of group");
|
||||
|
||||
/***** Write message to show the change made *****/
|
||||
AlertType = Lay_SUCCESS;
|
||||
AlertType = Ale_SUCCESS;
|
||||
sprintf (Gbl.Alert.Txt,
|
||||
NewMandatoryEnrolment ? Txt_The_enrolment_of_students_into_groups_of_type_X_is_now_mandatory :
|
||||
Txt_The_enrolment_of_students_into_groups_of_type_X_is_now_voluntary,
|
||||
|
@ -3943,7 +3943,7 @@ void Grp_ChangeMandatGrpTyp (void)
|
|||
/***** Show the form again *****/
|
||||
Gbl.CurrentCrs.Grps.GrpTyp.MandatoryEnrolment = NewMandatoryEnrolment;
|
||||
Grp_ReqEditGroupsInternal (AlertType,Gbl.Alert.Txt,
|
||||
Lay_INFO,NULL);
|
||||
Ale_INFO,NULL);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -3957,7 +3957,7 @@ void Grp_ChangeMultiGrpTyp (void)
|
|||
extern const char *Txt_Now_each_student_can_only_belong_to_a_group_of_type_X;
|
||||
char Query[1024];
|
||||
bool NewMultipleEnrolment;
|
||||
Lay_AlertType_t AlertType;
|
||||
Ale_AlertType_t AlertType;
|
||||
|
||||
/***** Get parameters from the form *****/
|
||||
/* Get the code of type of group */
|
||||
|
@ -3974,7 +3974,7 @@ void Grp_ChangeMultiGrpTyp (void)
|
|||
(this happends when return is pressed without changes) *****/
|
||||
if (Gbl.CurrentCrs.Grps.GrpTyp.MultipleEnrolment == NewMultipleEnrolment)
|
||||
{
|
||||
AlertType = Lay_INFO;
|
||||
AlertType = Ale_INFO;
|
||||
sprintf (Gbl.Alert.Txt,Txt_The_type_of_enrolment_of_the_type_of_group_X_has_not_changed,
|
||||
Gbl.CurrentCrs.Grps.GrpTyp.GrpTypName);
|
||||
}
|
||||
|
@ -3989,7 +3989,7 @@ void Grp_ChangeMultiGrpTyp (void)
|
|||
DB_QueryUPDATE (Query,"can not update enrolment type of a type of group");
|
||||
|
||||
/***** Write message to show the change made *****/
|
||||
AlertType = Lay_SUCCESS;
|
||||
AlertType = Ale_SUCCESS;
|
||||
sprintf (Gbl.Alert.Txt,
|
||||
NewMultipleEnrolment ? Txt_Now_each_student_can_belong_to_multiple_groups_of_type_X :
|
||||
Txt_Now_each_student_can_only_belong_to_a_group_of_type_X,
|
||||
|
@ -3999,7 +3999,7 @@ void Grp_ChangeMultiGrpTyp (void)
|
|||
/***** Show the form again *****/
|
||||
Gbl.CurrentCrs.Grps.GrpTyp.MultipleEnrolment = NewMultipleEnrolment;
|
||||
Grp_ReqEditGroupsInternal (AlertType,Gbl.Alert.Txt,
|
||||
Lay_INFO,NULL);
|
||||
Ale_INFO,NULL);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -4037,8 +4037,8 @@ void Grp_ChangeOpenTimeGrpTyp (void)
|
|||
sprintf (Gbl.Alert.Txt,"%s",Txt_The_date_time_of_opening_of_groups_has_changed);
|
||||
|
||||
/***** Show the form again *****/
|
||||
Grp_ReqEditGroupsInternal (Lay_SUCCESS,Gbl.Alert.Txt,
|
||||
Lay_INFO,NULL);
|
||||
Grp_ReqEditGroupsInternal (Ale_SUCCESS,Gbl.Alert.Txt,
|
||||
Ale_INFO,NULL);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -4053,7 +4053,7 @@ void Grp_ChangeMaxStdsGrp (void)
|
|||
struct GroupData GrpDat;
|
||||
char Query[1024];
|
||||
unsigned NewMaxStds;
|
||||
Lay_AlertType_t AlertType;
|
||||
Ale_AlertType_t AlertType;
|
||||
|
||||
/***** Get parameters of the form *****/
|
||||
/* Get group code */
|
||||
|
@ -4074,7 +4074,7 @@ void Grp_ChangeMaxStdsGrp (void)
|
|||
/***** Check if the old maximum of students equals the new one (this happens when user press return without change the form) *****/
|
||||
if (GrpDat.MaxStudents == NewMaxStds)
|
||||
{
|
||||
AlertType = Lay_INFO;
|
||||
AlertType = Ale_INFO;
|
||||
sprintf (Gbl.Alert.Txt,Txt_The_maximum_number_of_students_in_the_group_X_has_not_changed,
|
||||
GrpDat.GrpName);
|
||||
}
|
||||
|
@ -4086,7 +4086,7 @@ void Grp_ChangeMaxStdsGrp (void)
|
|||
DB_QueryUPDATE (Query,"can not update the maximum number of students in a group");
|
||||
|
||||
/***** Write message to show the change made *****/
|
||||
AlertType = Lay_SUCCESS;
|
||||
AlertType = Ale_SUCCESS;
|
||||
if (NewMaxStds > Grp_MAX_STUDENTS_IN_A_GROUP)
|
||||
sprintf (Gbl.Alert.Txt,Txt_The_group_X_now_has_no_limit_of_students,
|
||||
GrpDat.GrpName);
|
||||
|
@ -4097,7 +4097,7 @@ void Grp_ChangeMaxStdsGrp (void)
|
|||
|
||||
/***** Show the form again *****/
|
||||
Gbl.CurrentCrs.Grps.MaxStudents = NewMaxStds;
|
||||
Grp_ReqEditGroupsInternal (Lay_INFO,NULL,
|
||||
Grp_ReqEditGroupsInternal (Ale_INFO,NULL,
|
||||
AlertType,Gbl.Alert.Txt);
|
||||
}
|
||||
|
||||
|
@ -4140,7 +4140,7 @@ void Grp_RenameGroupType (void)
|
|||
extern const char *Txt_The_name_of_the_type_of_group_X_has_not_changed;
|
||||
char Query[128 + Grp_MAX_BYTES_GROUP_TYPE_NAME];
|
||||
char NewNameGrpTyp[Grp_MAX_BYTES_GROUP_TYPE_NAME + 1];
|
||||
Lay_AlertType_t AlertType;
|
||||
Ale_AlertType_t AlertType;
|
||||
|
||||
/***** Get parameters from form *****/
|
||||
/* Get the code of the group type */
|
||||
|
@ -4156,7 +4156,7 @@ void Grp_RenameGroupType (void)
|
|||
/***** Check if new name is empty *****/
|
||||
if (!NewNameGrpTyp[0])
|
||||
{
|
||||
AlertType = Lay_WARNING;
|
||||
AlertType = Ale_WARNING;
|
||||
sprintf (Gbl.Alert.Txt,Txt_You_can_not_leave_the_name_of_the_type_of_group_X_empty,
|
||||
Gbl.CurrentCrs.Grps.GrpTyp.GrpTypName);
|
||||
}
|
||||
|
@ -4168,7 +4168,7 @@ void Grp_RenameGroupType (void)
|
|||
/***** If group type was in database... *****/
|
||||
if (Grp_CheckIfGroupTypeNameExists (NewNameGrpTyp,Gbl.CurrentCrs.Grps.GrpTyp.GrpTypCod))
|
||||
{
|
||||
AlertType = Lay_WARNING;
|
||||
AlertType = Ale_WARNING;
|
||||
sprintf (Gbl.Alert.Txt,Txt_The_type_of_group_X_already_exists,
|
||||
NewNameGrpTyp);
|
||||
}
|
||||
|
@ -4182,14 +4182,14 @@ void Grp_RenameGroupType (void)
|
|||
DB_QueryUPDATE (Query,"can not update the type of a group");
|
||||
|
||||
/***** Write message to show the change made *****/
|
||||
AlertType = Lay_SUCCESS;
|
||||
AlertType = Ale_SUCCESS;
|
||||
sprintf (Gbl.Alert.Txt,Txt_The_type_of_group_X_has_been_renamed_as_Y,
|
||||
Gbl.CurrentCrs.Grps.GrpTyp.GrpTypName,NewNameGrpTyp);
|
||||
}
|
||||
}
|
||||
else // The same name
|
||||
{
|
||||
AlertType = Lay_INFO;
|
||||
AlertType = Ale_INFO;
|
||||
sprintf (Gbl.Alert.Txt,Txt_The_name_of_the_type_of_group_X_has_not_changed,
|
||||
NewNameGrpTyp);
|
||||
}
|
||||
|
@ -4199,7 +4199,7 @@ void Grp_RenameGroupType (void)
|
|||
Str_Copy (Gbl.CurrentCrs.Grps.GrpTyp.GrpTypName,NewNameGrpTyp,
|
||||
Grp_MAX_BYTES_GROUP_TYPE_NAME);
|
||||
Grp_ReqEditGroupsInternal (AlertType,Gbl.Alert.Txt,
|
||||
Lay_INFO,NULL);
|
||||
Ale_INFO,NULL);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -4215,7 +4215,7 @@ void Grp_RenameGroup (void)
|
|||
struct GroupData GrpDat;
|
||||
char Query[128 + Grp_MAX_BYTES_GROUP_NAME];
|
||||
char NewNameGrp[Grp_MAX_BYTES_GROUP_NAME + 1];
|
||||
Lay_AlertType_t AlertType;
|
||||
Ale_AlertType_t AlertType;
|
||||
|
||||
/***** Get parameters from form *****/
|
||||
/* Get the code of the group */
|
||||
|
@ -4232,7 +4232,7 @@ void Grp_RenameGroup (void)
|
|||
/***** Check if new name is empty *****/
|
||||
if (!NewNameGrp[0])
|
||||
{
|
||||
AlertType = Lay_WARNING;
|
||||
AlertType = Ale_WARNING;
|
||||
sprintf (Gbl.Alert.Txt,Txt_You_can_not_leave_the_name_of_the_group_X_empty,
|
||||
GrpDat.GrpName);
|
||||
}
|
||||
|
@ -4244,7 +4244,7 @@ void Grp_RenameGroup (void)
|
|||
/***** If group was in database... *****/
|
||||
if (Grp_CheckIfGroupNameExists (GrpDat.GrpTypCod,NewNameGrp,Gbl.CurrentCrs.Grps.GrpCod))
|
||||
{
|
||||
AlertType = Lay_WARNING;
|
||||
AlertType = Ale_WARNING;
|
||||
sprintf (Gbl.Alert.Txt,Txt_The_group_X_already_exists,NewNameGrp);
|
||||
}
|
||||
else
|
||||
|
@ -4255,14 +4255,14 @@ void Grp_RenameGroup (void)
|
|||
DB_QueryUPDATE (Query,"can not update the name of a group");
|
||||
|
||||
/***** Write message to show the change made *****/
|
||||
AlertType = Lay_SUCCESS;
|
||||
AlertType = Ale_SUCCESS;
|
||||
sprintf (Gbl.Alert.Txt,Txt_The_group_X_has_been_renamed_as_Y,
|
||||
GrpDat.GrpName,NewNameGrp);
|
||||
}
|
||||
}
|
||||
else // The same name
|
||||
{
|
||||
AlertType = Lay_INFO;
|
||||
AlertType = Ale_INFO;
|
||||
sprintf (Gbl.Alert.Txt,Txt_The_name_of_the_group_X_has_not_changed,
|
||||
NewNameGrp);
|
||||
}
|
||||
|
@ -4271,7 +4271,7 @@ void Grp_RenameGroup (void)
|
|||
/***** Show the form again *****/
|
||||
Str_Copy (Gbl.CurrentCrs.Grps.GrpName,NewNameGrp,
|
||||
Grp_MAX_BYTES_GROUP_NAME);
|
||||
Grp_ReqEditGroupsInternal (Lay_INFO,NULL,
|
||||
Grp_ReqEditGroupsInternal (Ale_INFO,NULL,
|
||||
AlertType,Gbl.Alert.Txt);
|
||||
}
|
||||
|
||||
|
|
|
@ -111,7 +111,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);
|
||||
Lay_ShowAlert (Lay_INFO,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_INFO,Gbl.Alert.Txt);
|
||||
}
|
||||
|
||||
/***** Contextual buttons *****/
|
||||
|
|
|
@ -172,7 +172,7 @@ void Hld_SeeHolidays (void)
|
|||
Lay_EndTable ();
|
||||
}
|
||||
else // No holidays created in the current institution
|
||||
Lay_ShowAlert (Lay_INFO,Txt_No_holidays);
|
||||
Ale_ShowAlert (Ale_INFO,Txt_No_holidays);
|
||||
|
||||
/***** Button to create centre *****/
|
||||
if (Gbl.Usrs.Me.LoggedRole >= Rol_INS_ADM) // Institution admin or system admin
|
||||
|
@ -651,7 +651,7 @@ void Hld_RemoveHoliday1 (void)
|
|||
DB_QueryDELETE (Query,"can not remove a holiday");
|
||||
|
||||
/***** Write message to show the change made *****/
|
||||
Gbl.Alert.Type = Lay_SUCCESS;
|
||||
Gbl.Alert.Type = Ale_SUCCESS;
|
||||
sprintf (Gbl.Alert.Txt,Txt_Holiday_X_removed,Hld.Name);
|
||||
|
||||
}
|
||||
|
@ -659,7 +659,7 @@ void Hld_RemoveHoliday1 (void)
|
|||
void Hld_RemoveHoliday2 (void)
|
||||
{
|
||||
/***** Show success message *****/
|
||||
Lay_ShowPendingAlert ();
|
||||
Ale_ShowPendingAlert ();
|
||||
|
||||
/***** Show the form again *****/
|
||||
Hld_EditHolidays ();
|
||||
|
@ -701,7 +701,7 @@ void Hld_ChangeHolidayPlace1 (void)
|
|||
Plc_MAX_BYTES_PLACE_FULL_NAME);
|
||||
|
||||
/***** Write message to show the change made *****/
|
||||
Gbl.Alert.Type = Lay_SUCCESS;
|
||||
Gbl.Alert.Type = Ale_SUCCESS;
|
||||
sprintf (Gbl.Alert.Txt,Txt_The_place_of_the_holiday_X_has_changed_to_Y,
|
||||
Hld->Name,NewPlace.FullName);
|
||||
}
|
||||
|
@ -709,7 +709,7 @@ void Hld_ChangeHolidayPlace1 (void)
|
|||
void Hld_ChangeHolidayPlace2 (void)
|
||||
{
|
||||
/***** Show success message *****/
|
||||
Lay_ShowPendingAlert ();
|
||||
Ale_ShowPendingAlert ();
|
||||
|
||||
/***** Show the form again *****/
|
||||
Hld_EditHolidays ();
|
||||
|
@ -745,7 +745,7 @@ void Hld_ChangeHolidayType1 (void)
|
|||
DB_QueryUPDATE (Query,"can not update the type of a holiday");
|
||||
|
||||
/***** Write message to show the change made *****/
|
||||
Gbl.Alert.Type = Lay_SUCCESS;
|
||||
Gbl.Alert.Type = Ale_SUCCESS;
|
||||
sprintf (Gbl.Alert.Txt,Txt_The_type_of_the_holiday_X_has_changed,
|
||||
Hld->Name);
|
||||
}
|
||||
|
@ -753,7 +753,7 @@ void Hld_ChangeHolidayType1 (void)
|
|||
void Hld_ChangeHolidayType2 (void)
|
||||
{
|
||||
/***** Show success message *****/
|
||||
Lay_ShowPendingAlert ();
|
||||
Ale_ShowPendingAlert ();
|
||||
|
||||
/***** Show the form again *****/
|
||||
Hld_EditHolidays ();
|
||||
|
@ -844,7 +844,7 @@ static void Hld_ChangeDate (Hld_StartOrEndDate_t StartOrEndDate)
|
|||
Dat_AssignDate (PtrDate,&NewDate);
|
||||
|
||||
/***** Write message to show the change made *****/
|
||||
Gbl.Alert.Type = Lay_SUCCESS;
|
||||
Gbl.Alert.Type = Ale_SUCCESS;
|
||||
Dat_ConvDateToDateStr (&NewDate,StrDate);
|
||||
sprintf (Gbl.Alert.Txt,Txt_The_date_of_the_holiday_X_has_changed_to_Y,
|
||||
Hld->Name,StrDate);
|
||||
|
@ -857,7 +857,7 @@ static void Hld_ChangeDate (Hld_StartOrEndDate_t StartOrEndDate)
|
|||
void Hld_ChangeDate2 (void)
|
||||
{
|
||||
/***** Show success message *****/
|
||||
Lay_ShowPendingAlert ();
|
||||
Ale_ShowPendingAlert ();
|
||||
|
||||
/***** Show the form again *****/
|
||||
Hld_EditHolidays ();
|
||||
|
@ -892,7 +892,7 @@ void Hld_RenameHoliday1 (void)
|
|||
/***** Check if new name is empty *****/
|
||||
if (!NewHldName[0])
|
||||
{
|
||||
Gbl.Alert.Type = Lay_WARNING;
|
||||
Gbl.Alert.Type = Ale_WARNING;
|
||||
sprintf (Gbl.Alert.Txt,Txt_You_can_not_leave_the_name_of_the_holiday_X_empty,
|
||||
Hld->Name);
|
||||
}
|
||||
|
@ -910,13 +910,13 @@ void Hld_RenameHoliday1 (void)
|
|||
Hld_MAX_BYTES_HOLIDAY_NAME);
|
||||
|
||||
/***** Write message to show the change made *****/
|
||||
Gbl.Alert.Type = Lay_SUCCESS;
|
||||
Gbl.Alert.Type = Ale_SUCCESS;
|
||||
sprintf (Gbl.Alert.Txt,Txt_The_name_of_the_holiday_X_has_changed_to_Y,
|
||||
Hld->Name,NewHldName);
|
||||
}
|
||||
else // The same name
|
||||
{
|
||||
Gbl.Alert.Type = Lay_INFO;
|
||||
Gbl.Alert.Type = Ale_INFO;
|
||||
sprintf (Gbl.Alert.Txt,Txt_The_name_of_the_holiday_X_has_not_changed,
|
||||
Hld->Name);
|
||||
}
|
||||
|
@ -926,7 +926,7 @@ void Hld_RenameHoliday1 (void)
|
|||
void Hld_RenameHoliday2 (void)
|
||||
{
|
||||
/***** Write error/success message *****/
|
||||
Lay_ShowPendingAlert ();
|
||||
Ale_ShowPendingAlert ();
|
||||
|
||||
/***** Show the form again *****/
|
||||
Hld_EditHolidays ();
|
||||
|
@ -1147,13 +1147,13 @@ void Hld_RecFormNewHoliday1 (void)
|
|||
Hld_CreateHoliday (Hld);
|
||||
|
||||
/* Success message */
|
||||
Gbl.Alert.Type = Lay_SUCCESS;
|
||||
Gbl.Alert.Type = Ale_SUCCESS;
|
||||
sprintf (Gbl.Alert.Txt,Txt_Created_new_holiday_X,Hld->Name);
|
||||
}
|
||||
else // If there is not a holiday name
|
||||
{
|
||||
/* Error message */
|
||||
Gbl.Alert.Type = Lay_WARNING;
|
||||
Gbl.Alert.Type = Ale_WARNING;
|
||||
sprintf (Gbl.Alert.Txt,"%s",Txt_You_must_specify_the_name_of_the_new_holiday);
|
||||
}
|
||||
}
|
||||
|
@ -1161,7 +1161,7 @@ void Hld_RecFormNewHoliday1 (void)
|
|||
void Hld_RecFormNewHoliday2 (void)
|
||||
{
|
||||
/***** Write error/success message *****/
|
||||
Lay_ShowPendingAlert ();
|
||||
Ale_ShowPendingAlert ();
|
||||
|
||||
/***** Show the form again *****/
|
||||
Hld_EditHolidays ();
|
||||
|
|
|
@ -527,7 +527,7 @@ void Img_MoveImageToDefinitiveDirectory (struct Image *Image)
|
|||
|
||||
/***** Move file *****/
|
||||
if (rename (FileNameImgTmp,FileNameImg)) // Fail
|
||||
Lay_ShowAlert (Lay_ERROR,"Can not move file.");
|
||||
Ale_ShowAlert (Ale_ERROR,"Can not move file.");
|
||||
else // Success
|
||||
Image->Status = Img_FILE_MOVED;
|
||||
}
|
||||
|
@ -606,7 +606,7 @@ void Img_ShowImage (struct Image *Image,
|
|||
fprintf (Gbl.F.Out,"</div>");
|
||||
}
|
||||
else
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_Image_not_found);
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_Image_not_found);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
|
@ -521,7 +521,7 @@ static void Ind_PutButtonToConfirmIWantToSeeBigList (unsigned NumCrss)
|
|||
/***** Show warning *****/
|
||||
sprintf (Gbl.Alert.Txt,Txt_The_list_of_X_courses_is_too_large_to_be_displayed,
|
||||
NumCrss);
|
||||
Lay_ShowAlert (Lay_WARNING,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
|
||||
/***** Put form to confirm that I want to see the big list *****/
|
||||
Act_FormStart (Gbl.Action.Act);
|
||||
|
|
46
swad_info.c
46
swad_info.c
|
@ -442,7 +442,7 @@ void Inf_ShowInfo (void)
|
|||
ICanEdit ? Inf_PutIconToEditInfo :
|
||||
NULL,
|
||||
Help[Gbl.CurrentCrs.Info.Type]);
|
||||
Lay_ShowAlert (Lay_INFO,Txt_No_information);
|
||||
Ale_ShowAlert (Ale_INFO,Txt_No_information);
|
||||
if (ICanEdit)
|
||||
Inf_PutButtonToEditInfo ();
|
||||
Lay_EndRoundFrame ();
|
||||
|
@ -586,7 +586,7 @@ void Inf_WriteMsgYouMustReadInfo (void)
|
|||
Lay_StartRoundFrame (NULL,Txt_Required_reading,NULL,NULL);
|
||||
|
||||
/***** Write message *****/
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_You_should_read_the_following_information);
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_You_should_read_the_following_information);
|
||||
|
||||
/***** Write every information I must read *****/
|
||||
fprintf (Gbl.F.Out,"<div class=\"CENTER_MIDDLE\">"
|
||||
|
@ -631,7 +631,7 @@ void Inf_ChangeForceReadInfo (void)
|
|||
Inf_SetForceReadIntoDB (MustBeRead);
|
||||
|
||||
/***** Write message of success *****/
|
||||
Lay_ShowAlert (Lay_SUCCESS,
|
||||
Ale_ShowAlert (Ale_SUCCESS,
|
||||
MustBeRead ? Txt_Students_now_are_required_to_read_this_information :
|
||||
Txt_Students_are_no_longer_obliged_to_read_this_information);
|
||||
|
||||
|
@ -656,7 +656,7 @@ void Inf_ChangeIHaveReadInfo (void)
|
|||
Inf_SetIHaveReadIntoDB (IHaveRead);
|
||||
|
||||
/***** Write message of success *****/
|
||||
Lay_ShowAlert (Lay_SUCCESS,
|
||||
Ale_ShowAlert (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);
|
||||
|
||||
|
@ -2230,11 +2230,11 @@ void Inf_ReceiveURLInfo (void)
|
|||
/***** Write message *****/
|
||||
sprintf (Gbl.Alert.Txt,Txt_The_URL_X_has_been_updated,
|
||||
Gbl.CurrentCrs.Info.URL);
|
||||
Lay_ShowAlert (Lay_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
URLIsOK = true;
|
||||
}
|
||||
else
|
||||
Lay_ShowAlert (Lay_ERROR,"Error when saving URL to file.");
|
||||
Ale_ShowAlert (Ale_ERROR,"Error when saving URL to file.");
|
||||
|
||||
if (URLIsOK)
|
||||
{
|
||||
|
@ -2299,7 +2299,7 @@ void Inf_ReceivePagInfo (void)
|
|||
{
|
||||
sprintf (Gbl.Alert.Txt,Txt_The_file_type_is_X_and_should_be_HTML_or_ZIP,
|
||||
MIMEType);
|
||||
Lay_ShowAlert (Lay_INFO,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_INFO,Gbl.Alert.Txt);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -2315,11 +2315,11 @@ void Inf_ReceivePagInfo (void)
|
|||
sprintf (PathRelFileHTML,"%s/index.html",PathRelDirHTML);
|
||||
if (Fil_EndReceptionOfFile (PathRelFileHTML,Param))
|
||||
{
|
||||
Lay_ShowAlert (Lay_SUCCESS,Txt_The_HTML_file_has_been_received_successfully);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Txt_The_HTML_file_has_been_received_successfully);
|
||||
FileIsOK = true;
|
||||
}
|
||||
else
|
||||
Lay_ShowAlert (Lay_WARNING,"Error uploading file.");
|
||||
Ale_ShowAlert (Ale_WARNING,"Error uploading file.");
|
||||
}
|
||||
else if (Str_FileIs (SourceFileName,"zip")) // .zip file
|
||||
{
|
||||
|
@ -2331,7 +2331,7 @@ void Inf_ReceivePagInfo (void)
|
|||
|
||||
if (Fil_EndReceptionOfFile (PathRelFileZIP,Param))
|
||||
{
|
||||
Lay_ShowAlert (Lay_SUCCESS,Txt_The_ZIP_file_has_been_received_successfully);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Txt_The_ZIP_file_has_been_received_successfully);
|
||||
|
||||
/* Uncompress ZIP */
|
||||
sprintf (StrUnzip,"unzip -qq -o %s -d %s",
|
||||
|
@ -2342,8 +2342,8 @@ void Inf_ReceivePagInfo (void)
|
|||
sprintf (PathRelFileHTML,"%s/index.html",PathRelDirHTML);
|
||||
if (Fil_CheckIfPathExists (PathRelFileHTML))
|
||||
{
|
||||
Lay_ShowAlert (Lay_SUCCESS,Txt_The_ZIP_file_has_been_unzipped_successfully);
|
||||
Lay_ShowAlert (Lay_SUCCESS,Txt_Found_an_index_html_file);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Txt_The_ZIP_file_has_been_unzipped_successfully);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Txt_Found_an_index_html_file);
|
||||
FileIsOK = true;
|
||||
}
|
||||
else
|
||||
|
@ -2351,22 +2351,22 @@ void Inf_ReceivePagInfo (void)
|
|||
sprintf (PathRelFileHTML,"%s/index.htm",PathRelDirHTML);
|
||||
if (Fil_CheckIfPathExists (PathRelFileHTML))
|
||||
{
|
||||
Lay_ShowAlert (Lay_SUCCESS,Txt_The_ZIP_file_has_been_unzipped_successfully);
|
||||
Lay_ShowAlert (Lay_SUCCESS,Txt_Found_an_index_htm_file);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Txt_The_ZIP_file_has_been_unzipped_successfully);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Txt_Found_an_index_htm_file);
|
||||
FileIsOK = true;
|
||||
}
|
||||
else
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_No_file_index_html_index_htm_found_within_the_ZIP_file);
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_No_file_index_html_index_htm_found_within_the_ZIP_file);
|
||||
}
|
||||
}
|
||||
else
|
||||
Lay_ShowErrorAndExit ("Can not unzip file.");
|
||||
}
|
||||
else
|
||||
Lay_ShowAlert (Lay_WARNING,"Error uploading file.");
|
||||
Ale_ShowAlert (Ale_WARNING,"Error uploading file.");
|
||||
}
|
||||
else
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_The_file_type_should_be_HTML_or_ZIP);
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_The_file_type_should_be_HTML_or_ZIP);
|
||||
}
|
||||
|
||||
if (FileIsOK)
|
||||
|
@ -2395,7 +2395,7 @@ void Inf_EditorCourseInfo (void)
|
|||
{
|
||||
extern const char *Txt_The_integrated_editor_is_not_yet_available;
|
||||
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_The_integrated_editor_is_not_yet_available);
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_The_integrated_editor_is_not_yet_available);
|
||||
|
||||
/***** Show again the form to select and send course info *****/
|
||||
Inf_FormsToSelSendInfo ();
|
||||
|
@ -2409,7 +2409,7 @@ void Inf_EditorTeachingGuide (void)
|
|||
{
|
||||
extern const char *Txt_The_integrated_editor_is_not_yet_available;
|
||||
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_The_integrated_editor_is_not_yet_available);
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_The_integrated_editor_is_not_yet_available);
|
||||
|
||||
/***** Show again the form to select and send course info *****/
|
||||
Inf_FormsToSelSendInfo ();
|
||||
|
@ -2423,7 +2423,7 @@ void Inf_EditorBibliography (void)
|
|||
{
|
||||
extern const char *Txt_The_integrated_editor_is_not_yet_available;
|
||||
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_The_integrated_editor_is_not_yet_available);
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_The_integrated_editor_is_not_yet_available);
|
||||
|
||||
/***** Show again the form to select and send course info *****/
|
||||
Inf_FormsToSelSendInfo ();
|
||||
|
@ -2437,7 +2437,7 @@ void Inf_EditorFAQ (void)
|
|||
{
|
||||
extern const char *Txt_The_integrated_editor_is_not_yet_available;
|
||||
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_The_integrated_editor_is_not_yet_available);
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_The_integrated_editor_is_not_yet_available);
|
||||
|
||||
/***** Show again the form to select and send course info *****/
|
||||
Inf_FormsToSelSendInfo ();
|
||||
|
@ -2451,7 +2451,7 @@ void Inf_EditorLinks (void)
|
|||
{
|
||||
extern const char *Txt_The_integrated_editor_is_not_yet_available;
|
||||
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_The_integrated_editor_is_not_yet_available);
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_The_integrated_editor_is_not_yet_available);
|
||||
|
||||
/***** Show again the form to select and send course info *****/
|
||||
Inf_FormsToSelSendInfo ();
|
||||
|
@ -2465,7 +2465,7 @@ void Inf_EditorAssessment (void)
|
|||
{
|
||||
extern const char *Txt_The_integrated_editor_is_not_yet_available;
|
||||
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_The_integrated_editor_is_not_yet_available);
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_The_integrated_editor_is_not_yet_available);
|
||||
|
||||
/***** Show again the form to select and send course info *****/
|
||||
Inf_FormsToSelSendInfo ();
|
||||
|
|
|
@ -200,7 +200,7 @@ void Ins_SeeInsWithPendingCtrs (void)
|
|||
Lay_EndRoundFrameTable ();
|
||||
}
|
||||
else
|
||||
Lay_ShowAlert (Lay_INFO,Txt_There_are_no_institutions_with_requests_for_centres_to_be_confirmed);
|
||||
Ale_ShowAlert (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);
|
||||
|
@ -695,7 +695,7 @@ static void Ins_ListInstitutions (void)
|
|||
Lay_EndTable ();
|
||||
}
|
||||
else // No insrtitutions created in the current country
|
||||
Lay_ShowAlert (Lay_INFO,Txt_No_institutions);
|
||||
Ale_ShowAlert (Ale_INFO,Txt_No_institutions);
|
||||
|
||||
/***** Button to create institution *****/
|
||||
if (Ins_CheckIfICanCreateInstitutions ())
|
||||
|
@ -1692,7 +1692,7 @@ void Ins_RemoveInstitution (void)
|
|||
else if (Ins.NumCtrs ||
|
||||
Ins.NumUsrsWhoClaimToBelongToIns ||
|
||||
Ins.NumUsrs) // Institution has centres or users ==> don't remove
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_To_remove_an_institution_you_must_first_remove_all_centres_and_users_in_the_institution);
|
||||
Ale_ShowAlert (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 *****/
|
||||
|
@ -1719,7 +1719,7 @@ void Ins_RemoveInstitution (void)
|
|||
/***** Write message to show the change made *****/
|
||||
sprintf (Gbl.Alert.Txt,Txt_Institution_X_removed,
|
||||
Ins.FullName);
|
||||
Lay_ShowAlert (Lay_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
}
|
||||
|
||||
/***** Show the form again *****/
|
||||
|
@ -1797,7 +1797,7 @@ static void Ins_RenameInstitution (struct Instit *Ins,Cns_ShrtOrFullName_t ShrtO
|
|||
/***** Check if new name is empty *****/
|
||||
if (!NewInsName[0])
|
||||
{
|
||||
Gbl.Alert.Type = Lay_WARNING;
|
||||
Gbl.Alert.Type = Ale_WARNING;
|
||||
sprintf (Gbl.Alert.Txt,Txt_You_can_not_leave_the_name_of_the_institution_X_empty,
|
||||
CurrentInsName);
|
||||
}
|
||||
|
@ -1809,7 +1809,7 @@ static void Ins_RenameInstitution (struct Instit *Ins,Cns_ShrtOrFullName_t ShrtO
|
|||
/***** If institution was in database... *****/
|
||||
if (Ins_CheckIfInsNameExistsInCty (ParamName,NewInsName,Ins->InsCod,Gbl.CurrentCty.Cty.CtyCod))
|
||||
{
|
||||
Gbl.Alert.Type = Lay_WARNING;
|
||||
Gbl.Alert.Type = Ale_WARNING;
|
||||
sprintf (Gbl.Alert.Txt,Txt_The_institution_X_already_exists,
|
||||
NewInsName);
|
||||
}
|
||||
|
@ -1819,7 +1819,7 @@ static void Ins_RenameInstitution (struct Instit *Ins,Cns_ShrtOrFullName_t ShrtO
|
|||
Ins_UpdateInsNameDB (Ins->InsCod,FieldName,NewInsName);
|
||||
|
||||
/* Create message to show the change made */
|
||||
Gbl.Alert.Type = Lay_SUCCESS;
|
||||
Gbl.Alert.Type = Ale_SUCCESS;
|
||||
sprintf (Gbl.Alert.Txt,Txt_The_institution_X_has_been_renamed_as_Y,
|
||||
CurrentInsName,NewInsName);
|
||||
|
||||
|
@ -1830,7 +1830,7 @@ static void Ins_RenameInstitution (struct Instit *Ins,Cns_ShrtOrFullName_t ShrtO
|
|||
}
|
||||
else // The same name
|
||||
{
|
||||
Gbl.Alert.Type = Lay_INFO;
|
||||
Gbl.Alert.Type = Ale_INFO;
|
||||
sprintf (Gbl.Alert.Txt,Txt_The_name_of_the_institution_X_has_not_changed,
|
||||
CurrentInsName);
|
||||
}
|
||||
|
@ -1888,13 +1888,13 @@ void Ins_ChangeInsCtyInConfig (void)
|
|||
/***** Check if it already exists an institution with the same name in the new country *****/
|
||||
if (Ins_CheckIfInsNameExistsInCty ("ShortName",Gbl.CurrentIns.Ins.ShrtName,-1L,NewCty.CtyCod))
|
||||
{
|
||||
Gbl.Alert.Type = Lay_WARNING;
|
||||
Gbl.Alert.Type = Ale_WARNING;
|
||||
sprintf (Gbl.Alert.Txt,Txt_The_institution_X_already_exists,
|
||||
Gbl.CurrentIns.Ins.ShrtName);
|
||||
}
|
||||
else if (Ins_CheckIfInsNameExistsInCty ("FullName",Gbl.CurrentIns.Ins.FullName,-1L,NewCty.CtyCod))
|
||||
{
|
||||
Gbl.Alert.Type = Lay_WARNING;
|
||||
Gbl.Alert.Type = Ale_WARNING;
|
||||
sprintf (Gbl.Alert.Txt,Txt_The_institution_X_already_exists,
|
||||
Gbl.CurrentIns.Ins.FullName);
|
||||
}
|
||||
|
@ -1909,7 +1909,7 @@ void Ins_ChangeInsCtyInConfig (void)
|
|||
Hie_InitHierarchy ();
|
||||
|
||||
/***** Write message to show the change made *****/
|
||||
Gbl.Alert.Type = Lay_SUCCESS;
|
||||
Gbl.Alert.Type = Ale_SUCCESS;
|
||||
sprintf (Gbl.Alert.Txt,Txt_The_country_of_the_institution_X_has_changed_to_Y,
|
||||
Gbl.CurrentIns.Ins.FullName,NewCty.Name[Gbl.Prefs.Language]);
|
||||
}
|
||||
|
@ -1923,7 +1923,7 @@ void Ins_ChangeInsCtyInConfig (void)
|
|||
void Ins_ContEditAfterChgInsInConfig (void)
|
||||
{
|
||||
/***** Write success / warning message *****/
|
||||
Lay_ShowPendingAlert ();
|
||||
Ale_ShowPendingAlert ();
|
||||
|
||||
/***** Show the form again *****/
|
||||
Ins_ShowConfiguration ();
|
||||
|
@ -1973,12 +1973,12 @@ void Ins_ChangeInsWWW (void)
|
|||
|
||||
/***** Write message to show the change made
|
||||
and put button to go to institution changed *****/
|
||||
Gbl.Alert.Type = Lay_SUCCESS;
|
||||
Gbl.Alert.Type = Ale_SUCCESS;
|
||||
sprintf (Gbl.Alert.Txt,Txt_The_new_web_address_is_X,NewWWW);
|
||||
Ins_ShowAlertAndButtonToGoToIns ();
|
||||
}
|
||||
else
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_You_can_not_leave_the_web_address_empty);
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_You_can_not_leave_the_web_address_empty);
|
||||
|
||||
/***** Show the form again *****/
|
||||
Ins_EditInstitutions ();
|
||||
|
@ -2004,10 +2004,10 @@ void Ins_ChangeInsWWWInConfig (void)
|
|||
|
||||
/***** Write message to show the change made *****/
|
||||
sprintf (Gbl.Alert.Txt,Txt_The_new_web_address_is_X,NewWWW);
|
||||
Lay_ShowAlert (Lay_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
}
|
||||
else
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_You_can_not_leave_the_web_address_empty);
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_You_can_not_leave_the_web_address_empty);
|
||||
|
||||
/***** Show the form again *****/
|
||||
Ins_ShowConfiguration ();
|
||||
|
@ -2064,7 +2064,7 @@ void Ins_ChangeInsStatus (void)
|
|||
|
||||
/***** Write message to show the change made
|
||||
and put button to go to institution changed *****/
|
||||
Gbl.Alert.Type = Lay_SUCCESS;
|
||||
Gbl.Alert.Type = Ale_SUCCESS;
|
||||
sprintf (Gbl.Alert.Txt,Txt_The_status_of_the_institution_X_has_changed,
|
||||
Gbl.Inss.EditingIns.ShrtName);
|
||||
Ins_ShowAlertAndButtonToGoToIns ();
|
||||
|
@ -2103,13 +2103,13 @@ static void Ins_ShowAlertAndButtonToGoToIns (void)
|
|||
{
|
||||
/***** Alert with button to go to degree *****/
|
||||
sprintf (Gbl.Title,Txt_Go_to_X,Gbl.Inss.EditingIns.ShrtName);
|
||||
Lay_ShowAlertAndButton (Gbl.Alert.Type,Gbl.Alert.Txt,
|
||||
Ale_ShowAlertAndButton (Gbl.Alert.Type,Gbl.Alert.Txt,
|
||||
ActSeeCtr,NULL,Ins_PutParamGoToIns,
|
||||
Lay_CONFIRM_BUTTON,Gbl.Title);
|
||||
}
|
||||
else
|
||||
/***** Alert *****/
|
||||
Lay_ShowAlert (Gbl.Alert.Type,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Gbl.Alert.Type,Gbl.Alert.Txt);
|
||||
}
|
||||
|
||||
static void Ins_PutParamGoToIns (void)
|
||||
|
@ -2345,22 +2345,22 @@ static void Ins_RecFormRequestOrCreateIns (unsigned Status)
|
|||
{
|
||||
sprintf (Gbl.Alert.Txt,Txt_The_institution_X_already_exists,
|
||||
Gbl.Inss.EditingIns.ShrtName);
|
||||
Lay_ShowAlert (Lay_WARNING,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
}
|
||||
else if (Ins_CheckIfInsNameExistsInCty ("FullName",Gbl.Inss.EditingIns.FullName,-1L,Gbl.CurrentCty.Cty.CtyCod))
|
||||
{
|
||||
sprintf (Gbl.Alert.Txt,Txt_The_institution_X_already_exists,
|
||||
Gbl.Inss.EditingIns.FullName);
|
||||
Lay_ShowAlert (Lay_WARNING,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
}
|
||||
else // Add new institution to database
|
||||
Ins_CreateInstitution (Status);
|
||||
}
|
||||
else // If there is not a web
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_You_must_specify_the_web_address_of_the_new_institution);
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_You_must_specify_the_web_address_of_the_new_institution);
|
||||
}
|
||||
else // If there is not a institution name
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_You_must_specify_the_short_name_and_the_full_name_of_the_new_institution);
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_You_must_specify_the_short_name_and_the_full_name_of_the_new_institution);
|
||||
|
||||
/***** Show the form again *****/
|
||||
Ins_EditInstitutions ();
|
||||
|
@ -2394,7 +2394,7 @@ static void Ins_CreateInstitution (unsigned Status)
|
|||
|
||||
/***** Write message to show the change made
|
||||
and put button to go to institution created *****/
|
||||
Gbl.Alert.Type = Lay_SUCCESS;
|
||||
Gbl.Alert.Type = Ale_SUCCESS;
|
||||
sprintf (Gbl.Alert.Txt,Txt_Created_new_institution_X,
|
||||
Gbl.Inss.EditingIns.FullName);
|
||||
Ins_ShowAlertAndButtonToGoToIns ();
|
||||
|
|
100
swad_layout.c
100
swad_layout.c
|
@ -66,17 +66,6 @@ extern struct Globals Gbl;
|
|||
/***************************** Private constants *****************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static const char *Lay_AlertIcons[Lay_NUM_ALERT_TYPES] =
|
||||
{
|
||||
NULL, // Lay_NONE
|
||||
"info64x64.png", // Lay_INFO
|
||||
"success64x64.png", // Lay_SUCCESS
|
||||
"question64x64.gif", // Lay_QUESTION animated gif
|
||||
"warning64x64.gif", // Lay_WARNING animated gif
|
||||
"error64x64.gif", // Lay_ERROR animated gif
|
||||
"copy_on16x16.gif", // Lay_CLIPBOARD
|
||||
};
|
||||
|
||||
/*****************************************************************************/
|
||||
/******************************* Private types *******************************/
|
||||
/*****************************************************************************/
|
||||
|
@ -106,8 +95,6 @@ static void Lay_WriteTitleAction (void);
|
|||
static void Lay_ShowLeftColumn (void);
|
||||
static void Lay_ShowRightColumn (void);
|
||||
|
||||
static void Lay_PutButton (Lay_Button_t Button,const char *TxtButton);
|
||||
|
||||
static void Lay_StartRoundFrameInternal (const char *Width,const char *Title,
|
||||
void (*FunctionToDrawContextualIcons) (void),
|
||||
const char *HelpLink,
|
||||
|
@ -1351,7 +1338,7 @@ void Lay_PutIconRemove (void)
|
|||
/********************** Put a button to submit a form ************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void Lay_PutButton (Lay_Button_t Button,const char *TxtButton)
|
||||
void Lay_PutButton (Lay_Button_t Button,const char *TxtButton)
|
||||
{
|
||||
if (TxtButton)
|
||||
if (TxtButton[0])
|
||||
|
@ -1600,7 +1587,7 @@ void Lay_ShowErrorAndExit (const char *Txt)
|
|||
|
||||
/***** Write possible error message *****/
|
||||
if (Txt)
|
||||
Lay_ShowAlert (Lay_ERROR,Txt);
|
||||
Ale_ShowAlert (Ale_ERROR,Txt);
|
||||
|
||||
/***** Finish the page, except </body> and </html> *****/
|
||||
Lay_WriteEndOfPage ();
|
||||
|
@ -1660,89 +1647,6 @@ void Lay_ShowErrorAndExit (const char *Txt)
|
|||
exit (0);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/*********************** Show a write-pending alert **************************/
|
||||
/*****************************************************************************/
|
||||
// Gbl.Alert.Type must be Lay_NONE or any type of alert
|
||||
// If Gbl.Alert.Type != Lay_NONE ==> Gbl.Alert.Txt must hold the message
|
||||
|
||||
void Lay_ShowPendingAlert (void)
|
||||
{
|
||||
/***** Anything to show? *****/
|
||||
if (Gbl.Alert.Type != Lay_NONE)
|
||||
/***** Show alert *****/
|
||||
Lay_ShowAlert (Gbl.Alert.Type,Gbl.Alert.Txt);
|
||||
|
||||
// Do not be tempted to restore the value of Gbl.Alert.Type to Lay_NONE here,
|
||||
// since it can still be used after calling this function.
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/******************** Show an alert message to the user **********************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Lay_ShowAlert (Lay_AlertType_t AlertType,const char *Txt)
|
||||
{
|
||||
if (AlertType != Lay_NONE)
|
||||
Lay_ShowAlertAndButton (AlertType,Txt,
|
||||
ActUnk,NULL,NULL,Lay_NO_BUTTON,NULL);
|
||||
}
|
||||
|
||||
void Lay_ShowAlertAndButton (Lay_AlertType_t AlertType,const char *Txt,
|
||||
Act_Action_t NextAction,const char *Anchor,
|
||||
void (*FuncParams) (),
|
||||
Lay_Button_t Button,const char *TxtButton)
|
||||
{
|
||||
Lay_ShowAlertAndButton1 (AlertType,Txt);
|
||||
Lay_ShowAlertAndButton2 (NextAction,Anchor,FuncParams,Button,TxtButton);
|
||||
}
|
||||
|
||||
void Lay_ShowAlertAndButton1 (Lay_AlertType_t AlertType,const char *Txt)
|
||||
{
|
||||
/****** If start of page is not written yet, do it now ******/
|
||||
if (!Gbl.Layout.HTMLStartWritten)
|
||||
Lay_WriteStartOfPage ();
|
||||
|
||||
/***** Start box *****/
|
||||
fprintf (Gbl.F.Out,"<div class=\"CENTER_MIDDLE\">"
|
||||
"<div class=\"ALERT\">");
|
||||
|
||||
/***** Write message *****/
|
||||
fprintf (Gbl.F.Out,"<div class=\"ALERT_TXT\""
|
||||
" style=\"background-image:url('%s/%s'); background-size:20px 20px;\">",
|
||||
Gbl.Prefs.IconsURL,Lay_AlertIcons[AlertType]);
|
||||
if (Txt)
|
||||
fprintf (Gbl.F.Out,"%s",Txt);
|
||||
fprintf (Gbl.F.Out,"</div>");
|
||||
}
|
||||
|
||||
void Lay_ShowAlertAndButton2 (Act_Action_t NextAction,const char *Anchor,
|
||||
void (*FuncParams) (),
|
||||
Lay_Button_t Button,const char *TxtButton)
|
||||
{
|
||||
/***** Optional button *****/
|
||||
if (NextAction != ActUnk &&
|
||||
Button != Lay_NO_BUTTON &&
|
||||
TxtButton)
|
||||
if (TxtButton[0])
|
||||
{
|
||||
/* Start form */
|
||||
Act_FormStartAnchor (NextAction,Anchor);
|
||||
if (FuncParams)
|
||||
FuncParams ();
|
||||
|
||||
/* Put button *****/
|
||||
Lay_PutButton (Button,TxtButton);
|
||||
|
||||
/* End form */
|
||||
Act_FormEnd ();
|
||||
}
|
||||
|
||||
/***** End box *****/
|
||||
fprintf (Gbl.F.Out,"</div>"
|
||||
"</div>");
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/***************** Write about zone at the end of the page *******************/
|
||||
/*****************************************************************************/
|
||||
|
|
|
@ -33,9 +33,6 @@
|
|||
/****************************** Public constants *****************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
#define Lay_MAX_BYTES_ALERT (16 * 1024 - 1) // Max. size for alert message
|
||||
// Important: the size of alert message must be enough large to store the longest message.
|
||||
|
||||
#define Lay_MAX_BYTES_TITLE (4096 - 1)
|
||||
|
||||
#define Lay_HIDE_BOTH_COLUMNS 0 // 00
|
||||
|
@ -47,18 +44,6 @@
|
|||
/********************************* Public types ******************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
#define Lay_NUM_ALERT_TYPES 7
|
||||
typedef enum
|
||||
{
|
||||
Lay_NONE = 0,
|
||||
Lay_INFO = 1,
|
||||
Lay_SUCCESS = 2,
|
||||
Lay_QUESTION = 3,
|
||||
Lay_WARNING = 4,
|
||||
Lay_ERROR = 5,
|
||||
Lay_CLIPBOARD = 6,
|
||||
} Lay_AlertType_t;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
Lay_NO_BUTTON,
|
||||
|
@ -98,6 +83,7 @@ void Lay_PutIconRemovalNotAllowed (void);
|
|||
void Lay_PutIconBRemovalNotAllowed (void);
|
||||
void Lay_PutIconRemove (void);
|
||||
|
||||
void Lay_PutButton (Lay_Button_t Button,const char *TxtButton);
|
||||
void Lay_PutCreateButton (const char *TxtButton);
|
||||
void Lay_PutCreateButtonInline (const char *TxtButton);
|
||||
void Lay_PutConfirmButton (const char *TxtButton);
|
||||
|
@ -131,16 +117,6 @@ void Lay_StartTableWideMargin (unsigned CellPadding);
|
|||
void Lay_EndTable (void);
|
||||
|
||||
void Lay_ShowErrorAndExit (const char *Txt);
|
||||
void Lay_ShowPendingAlert (void);
|
||||
void Lay_ShowAlert (Lay_AlertType_t AlertType,const char *Txt);
|
||||
void Lay_ShowAlertAndButton (Lay_AlertType_t AlertType,const char *Txt,
|
||||
Act_Action_t NextAction,const char *Anchor,
|
||||
void (*FuncParams) (),
|
||||
Lay_Button_t Button,const char *TxtButton);
|
||||
void Lay_ShowAlertAndButton1 (Lay_AlertType_t AlertType,const char *Txt);
|
||||
void Lay_ShowAlertAndButton2 (Act_Action_t NextAction,const char *Anchor,
|
||||
void (*FuncParams) (),
|
||||
Lay_Button_t Button,const char *TxtButton);
|
||||
|
||||
void Lay_RefreshNotifsAndConnected (void);
|
||||
void Lay_RefreshLastClicks (void);
|
||||
|
|
26
swad_link.c
26
swad_link.c
|
@ -107,7 +107,7 @@ void Lnk_SeeLinks (void)
|
|||
if (Gbl.Links.Num) // There are links
|
||||
Lnk_WriteListOfLinks ();
|
||||
else // No links created
|
||||
Lay_ShowAlert (Lay_INFO,Txt_No_links);
|
||||
Ale_ShowAlert (Ale_INFO,Txt_No_links);
|
||||
|
||||
/***** Button to create link *****/
|
||||
if (Gbl.Usrs.Me.LoggedRole == Rol_SYS_ADM)
|
||||
|
@ -464,7 +464,7 @@ void Lnk_RemoveLink (void)
|
|||
/***** Write message to show the change made *****/
|
||||
sprintf (Gbl.Alert.Txt,Txt_Link_X_removed,
|
||||
Lnk.ShrtName);
|
||||
Lay_ShowAlert (Lay_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
|
||||
/***** Show the form again *****/
|
||||
Lnk_EditLinks ();
|
||||
|
@ -538,7 +538,7 @@ static void Lnk_RenameLink (Cns_ShrtOrFullName_t ShrtOrFullName)
|
|||
{
|
||||
sprintf (Gbl.Alert.Txt,Txt_You_can_not_leave_the_name_of_the_link_X_empty,
|
||||
CurrentLnkName);
|
||||
Lay_ShowAlert (Lay_WARNING,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -550,7 +550,7 @@ static void Lnk_RenameLink (Cns_ShrtOrFullName_t ShrtOrFullName)
|
|||
{
|
||||
sprintf (Gbl.Alert.Txt,Txt_The_link_X_already_exists,
|
||||
NewLnkName);
|
||||
Lay_ShowAlert (Lay_WARNING,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -560,14 +560,14 @@ static void Lnk_RenameLink (Cns_ShrtOrFullName_t ShrtOrFullName)
|
|||
/* Write message to show the change made */
|
||||
sprintf (Gbl.Alert.Txt,Txt_The_link_X_has_been_renamed_as_Y,
|
||||
CurrentLnkName,NewLnkName);
|
||||
Lay_ShowAlert (Lay_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
}
|
||||
}
|
||||
else // The same name
|
||||
{
|
||||
sprintf (Gbl.Alert.Txt,Txt_The_name_of_the_link_X_has_not_changed,
|
||||
CurrentLnkName);
|
||||
Lay_ShowAlert (Lay_INFO,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_INFO,Gbl.Alert.Txt);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -638,10 +638,10 @@ void Lnk_ChangeLinkWWW (void)
|
|||
/***** Write message to show the change made *****/
|
||||
sprintf (Gbl.Alert.Txt,Txt_The_new_web_address_is_X,
|
||||
NewWWW);
|
||||
Lay_ShowAlert (Lay_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
}
|
||||
else
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_You_can_not_leave_the_web_address_empty);
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_You_can_not_leave_the_web_address_empty);
|
||||
|
||||
/***** Show the form again *****/
|
||||
Str_Copy (Lnk->WWW,NewWWW,
|
||||
|
@ -773,21 +773,21 @@ void Lnk_RecFormNewLink (void)
|
|||
{
|
||||
sprintf (Gbl.Alert.Txt,Txt_The_link_X_already_exists,
|
||||
Lnk->ShrtName);
|
||||
Lay_ShowAlert (Lay_WARNING,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
}
|
||||
else if (Lnk_CheckIfLinkNameExists ("FullName",Lnk->FullName,-1L))
|
||||
{
|
||||
sprintf (Gbl.Alert.Txt,Txt_The_link_X_already_exists,
|
||||
Lnk->FullName);
|
||||
Lay_ShowAlert (Lay_WARNING,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
}
|
||||
else if (!Lnk->WWW[0])
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_You_must_specify_the_URL_of_the_new_link);
|
||||
Ale_ShowAlert (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
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_You_must_specify_the_short_name_and_the_full_name_of_the_new_link);
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_You_must_specify_the_short_name_and_the_full_name_of_the_new_link);
|
||||
|
||||
/***** Show the form again *****/
|
||||
Lnk_EditLinks ();
|
||||
|
@ -816,5 +816,5 @@ static void Lnk_CreateLink (struct Link *Lnk)
|
|||
/***** Write success message *****/
|
||||
sprintf (Gbl.Alert.Txt,Txt_Created_new_link_X,
|
||||
Lnk->ShrtName);
|
||||
Lay_ShowAlert (Lay_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
}
|
||||
|
|
|
@ -288,7 +288,7 @@ void Log_RequestLogo (Sco_Scope_t Scope)
|
|||
/***** Write help message *****/
|
||||
sprintf (Gbl.Alert.Txt,Txt_You_can_send_a_file_with_an_image_in_PNG_format_transparent_background_and_size_X_Y,
|
||||
64,64);
|
||||
Lay_ShowAlert (Lay_INFO,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_INFO,Gbl.Alert.Txt);
|
||||
|
||||
/***** Upload logo *****/
|
||||
fprintf (Gbl.F.Out,"<label class=\"%s\">"
|
||||
|
@ -376,7 +376,7 @@ void Log_ReceiveLogo (Sco_Scope_t Scope)
|
|||
if (WrongType)
|
||||
{
|
||||
sprintf (Gbl.Alert.Txt,Txt_The_file_is_not_X,"png");
|
||||
Lay_ShowAlert (Lay_WARNING,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -387,7 +387,7 @@ void Log_ReceiveLogo (Sco_Scope_t Scope)
|
|||
(unsigned) Cod,
|
||||
(unsigned) Cod);
|
||||
if (!Fil_EndReceptionOfFile (FileNameLogo,Param))
|
||||
Lay_ShowAlert (Lay_WARNING,"Error copying file.");
|
||||
Ale_ShowAlert (Ale_WARNING,"Error copying file.");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
56
swad_mail.c
56
swad_mail.c
|
@ -376,7 +376,7 @@ void Mai_WriteWarningEmailNotifications (void)
|
|||
Txt_TABS_TXT[TabMailDomains],
|
||||
Txt_MENU_TITLE[TabMailDomains][Act_Actions[SuperActionMailDomains].IndexInMenu],
|
||||
Txt_Domains);
|
||||
Lay_ShowAlert (Lay_WARNING,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -553,7 +553,7 @@ void Mai_RemoveMailDomain (void)
|
|||
/***** Write message to show the change made *****/
|
||||
sprintf (Gbl.Alert.Txt,Txt_Email_domain_X_removed,
|
||||
Mai.Domain);
|
||||
Lay_ShowAlert (Lay_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
|
||||
/***** Show the form again *****/
|
||||
Mai_EditMailDomains ();
|
||||
|
@ -627,7 +627,7 @@ static void Mai_RenameMailDomain (Cns_ShrtOrFullName_t ShrtOrFullName)
|
|||
{
|
||||
sprintf (Gbl.Alert.Txt,Txt_You_can_not_leave_the_name_of_the_email_domain_X_empty,
|
||||
CurrentMaiName);
|
||||
Lay_ShowAlert (Lay_WARNING,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -639,7 +639,7 @@ static void Mai_RenameMailDomain (Cns_ShrtOrFullName_t ShrtOrFullName)
|
|||
{
|
||||
sprintf (Gbl.Alert.Txt,Txt_The_email_domain_X_already_exists,
|
||||
NewMaiName);
|
||||
Lay_ShowAlert (Lay_WARNING,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -649,14 +649,14 @@ static void Mai_RenameMailDomain (Cns_ShrtOrFullName_t ShrtOrFullName)
|
|||
/* Write message to show the change made */
|
||||
sprintf (Gbl.Alert.Txt,Txt_The_email_domain_X_has_been_renamed_as_Y,
|
||||
CurrentMaiName,NewMaiName);
|
||||
Lay_ShowAlert (Lay_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
}
|
||||
}
|
||||
else // The same name
|
||||
{
|
||||
sprintf (Gbl.Alert.Txt,Txt_The_email_domain_X_has_not_changed,
|
||||
CurrentMaiName);
|
||||
Lay_ShowAlert (Lay_INFO,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_INFO,Gbl.Alert.Txt);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -811,19 +811,19 @@ void Mai_RecFormNewMailDomain (void)
|
|||
{
|
||||
sprintf (Gbl.Alert.Txt,Txt_The_email_domain_X_already_exists,
|
||||
Mai->Domain);
|
||||
Lay_ShowAlert (Lay_WARNING,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
}
|
||||
else if (Mai_CheckIfMailDomainNameExists ("Info",Mai->Info,-1L))
|
||||
{
|
||||
sprintf (Gbl.Alert.Txt,Txt_The_email_domain_X_already_exists,
|
||||
Mai->Info);
|
||||
Lay_ShowAlert (Lay_WARNING,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
}
|
||||
else // Add new mail to database
|
||||
Mai_CreateMailDomain (Mai);
|
||||
}
|
||||
else // If there is not a mail name
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_You_must_specify_the_short_name_and_the_full_name_of_the_new_email_domain);
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_You_must_specify_the_short_name_and_the_full_name_of_the_new_email_domain);
|
||||
|
||||
/***** Show the form again *****/
|
||||
Mai_EditMailDomains ();
|
||||
|
@ -851,7 +851,7 @@ static void Mai_CreateMailDomain (struct Mail *Mai)
|
|||
/***** Write success message *****/
|
||||
sprintf (Gbl.Alert.Txt,Txt_Created_new_email_domain_X,
|
||||
Mai->Domain);
|
||||
Lay_ShowAlert (Lay_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -1175,10 +1175,10 @@ void Mai_ShowFormOthEmail (void)
|
|||
Lay_EndRoundFrame ();
|
||||
}
|
||||
else
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
|
||||
}
|
||||
else // User not found
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -1364,7 +1364,7 @@ void Mai_RemoveOtherUsrEmail (void)
|
|||
&Gbl.Usrs.Other.UsrDat,NULL);
|
||||
}
|
||||
else // User not found
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -1387,13 +1387,13 @@ static void Mai_RemoveEmail (struct UsrData *UsrDat)
|
|||
|
||||
/***** Show message *****/
|
||||
sprintf (Gbl.Alert.Txt,Txt_Email_X_removed,Email);
|
||||
Lay_ShowAlert (Lay_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
|
||||
/***** Update list of emails *****/
|
||||
Mai_GetEmailFromUsrCod (UsrDat);
|
||||
}
|
||||
else
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -1444,7 +1444,7 @@ void Mai_NewOtherUsrEmail (void)
|
|||
&Gbl.Usrs.Other.UsrDat,NULL);
|
||||
}
|
||||
else // User not found
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -1473,7 +1473,7 @@ static void Mai_NewUsrEmail (struct UsrData *UsrDat,bool ItsMe)
|
|||
{
|
||||
sprintf (Gbl.Alert.Txt,Txt_The_email_address_X_matches_one_previously_registered,
|
||||
NewEmail);
|
||||
Lay_ShowAlert (Lay_WARNING,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1482,7 +1482,7 @@ static void Mai_NewUsrEmail (struct UsrData *UsrDat,bool ItsMe)
|
|||
/***** Email updated sucessfully *****/
|
||||
sprintf (Gbl.Alert.Txt,Txt_The_email_address_X_has_been_registered_successfully,
|
||||
NewEmail);
|
||||
Lay_ShowAlert (Lay_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
|
||||
/***** Update list of emails *****/
|
||||
Mai_GetEmailFromUsrCod (UsrDat);
|
||||
|
@ -1496,7 +1496,7 @@ static void Mai_NewUsrEmail (struct UsrData *UsrDat,bool ItsMe)
|
|||
{
|
||||
sprintf (Gbl.Alert.Txt,Txt_The_email_address_X_had_been_registered_by_another_user,
|
||||
NewEmail);
|
||||
Lay_ShowAlert (Lay_WARNING,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1504,11 +1504,11 @@ static void Mai_NewUsrEmail (struct UsrData *UsrDat,bool ItsMe)
|
|||
{
|
||||
sprintf (Gbl.Alert.Txt,Txt_The_email_address_entered_X_is_not_valid,
|
||||
NewEmail);
|
||||
Lay_ShowAlert (Lay_WARNING,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
}
|
||||
}
|
||||
else
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -1569,7 +1569,7 @@ void Mai_PutButtonToCheckEmailAddress (void)
|
|||
/***** Frame with button to go to account *****/
|
||||
Lay_StartRoundFrame (NULL,Txt_Email_unconfirmed,
|
||||
NULL,Hlp_PROFILE_Account_email);
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_Please_check_and_confirm_your_email_address);
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_Please_check_and_confirm_your_email_address);
|
||||
Lay_EndRoundFrameWithButton (Lay_CONFIRM_BUTTON,Txt_Check);
|
||||
|
||||
/***** End form *****/
|
||||
|
@ -1638,13 +1638,13 @@ bool Mai_SendMailMsgToConfirmEmail (void)
|
|||
Gbl.Usrs.Me.ConfirmEmailJustSent = true;
|
||||
return true;
|
||||
case 1:
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_There_was_a_problem_sending_an_email_automatically);
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_There_was_a_problem_sending_an_email_automatically);
|
||||
return false;
|
||||
default:
|
||||
sprintf (Gbl.Alert.Txt,"Internal error: an email message has not been sent successfully."
|
||||
" Error code returned by the script: %d",
|
||||
ReturnCode);
|
||||
Lay_ShowAlert (Lay_ERROR,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_ERROR,Gbl.Alert.Txt);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -1659,7 +1659,7 @@ void Mai_ShowMsgConfirmEmailHasBeenSent (void)
|
|||
|
||||
sprintf (Gbl.Alert.Txt,Txt_A_message_has_been_sent_to_email_address_X_to_confirm_that_address,
|
||||
Gbl.Usrs.Me.UsrDat.Email);
|
||||
Lay_ShowAlert (Lay_INFO,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_INFO,Gbl.Alert.Txt);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -1765,16 +1765,16 @@ void Mai_ConfirmEmail (void)
|
|||
|
||||
sprintf (Gbl.Alert.Txt,Txt_The_email_X_has_been_confirmed,Email);
|
||||
}
|
||||
Lay_ShowAlert (Lay_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
}
|
||||
else
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_The_email_address_has_not_been_confirmed);
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_The_email_address_has_not_been_confirmed);
|
||||
|
||||
/***** Free structure that stores the query result *****/
|
||||
DB_FreeMySQLResult (&mysql_res);
|
||||
}
|
||||
else
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_Failed_email_confirmation_key);
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_Failed_email_confirmation_key);
|
||||
|
||||
/***** Form to log in *****/
|
||||
Usr_WriteFormLogin (ActLogIn,NULL);
|
||||
|
|
|
@ -281,7 +281,7 @@ static void Mrk_ChangeNumRowsHeaderOrFooter (Brw_HeadOrFoot_t HeaderOrFooter)
|
|||
/***** Write message of success *****/
|
||||
sprintf (Gbl.Alert.Txt,Txt_The_number_of_rows_is_now_X,
|
||||
NumRows);
|
||||
Lay_ShowAlert (Lay_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
}
|
||||
else
|
||||
Lay_ShowErrorAndExit ("Wrong number of rows.");
|
||||
|
@ -701,7 +701,7 @@ void Mrk_ShowMyMarks (void)
|
|||
else // Problems in table of marks or user's ID not found
|
||||
{
|
||||
fclose (FileUsrMarks);
|
||||
Lay_ShowAlert (Lay_WARNING,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
}
|
||||
|
||||
unlink (FileNameUsrMarks); // File with marks is no longer necessary
|
||||
|
|
|
@ -683,14 +683,14 @@ void Msg_RecMsgFromUsr (void)
|
|||
NumRecipients > Cfg_MAX_RECIPIENTS)
|
||||
{
|
||||
/* Write warning message */
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_You_can_not_send_a_message_to_so_many_recipients_);
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_You_can_not_send_a_message_to_so_many_recipients_);
|
||||
Error = true;
|
||||
}
|
||||
}
|
||||
else // No recipients selected
|
||||
{
|
||||
/* Write warning message */
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_You_must_select_one_ore_more_recipients);
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_You_must_select_one_ore_more_recipients);
|
||||
Error = true;
|
||||
}
|
||||
|
||||
|
@ -736,7 +736,7 @@ void Msg_RecMsgFromUsr (void)
|
|||
{
|
||||
/***** Show an alert indicating that the message has not been sent successfully *****/
|
||||
sprintf (Gbl.Alert.Txt,Txt_message_not_sent_to_X,UsrDstData.FullName);
|
||||
Lay_ShowAlert (Lay_WARNING,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -774,7 +774,7 @@ void Msg_RecMsgFromUsr (void)
|
|||
sprintf (Gbl.Alert.Txt,NotifyByEmail ? Txt_message_sent_to_X_notified_by_email :
|
||||
Txt_message_sent_to_X_not_notified_by_email,
|
||||
UsrDstData.FullName);
|
||||
Lay_ShowAlert (Lay_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
|
||||
/***** Increment number of recipients *****/
|
||||
if (NotifyByEmail)
|
||||
|
@ -784,7 +784,7 @@ void Msg_RecMsgFromUsr (void)
|
|||
}
|
||||
else
|
||||
{
|
||||
Lay_ShowAlert (Lay_ERROR,Txt_Error_getting_data_from_a_recipient);
|
||||
Ale_ShowAlert (Ale_ERROR,Txt_Error_getting_data_from_a_recipient);
|
||||
NumErrors++;
|
||||
}
|
||||
}
|
||||
|
@ -808,27 +808,27 @@ void Msg_RecMsgFromUsr (void)
|
|||
if (NumRecipients)
|
||||
{
|
||||
if (NumRecipients == 1)
|
||||
Lay_ShowAlert (Lay_SUCCESS,Txt_The_message_has_been_sent_to_1_recipient);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Txt_The_message_has_been_sent_to_1_recipient);
|
||||
else
|
||||
{
|
||||
sprintf (Gbl.Alert.Txt,Txt_The_message_has_been_sent_to_X_recipients,
|
||||
(unsigned) NumRecipients);
|
||||
Lay_ShowAlert (Lay_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
}
|
||||
|
||||
/***** Show message about number of users to be notified *****/
|
||||
Ntf_ShowAlertNumUsrsToBeNotifiedByEMail (NumRecipientsToBeNotifiedByEMail);
|
||||
Lay_ShowAlert (Lay_INFO,Txt_Do_not_reload_this_page_because_the_message_will_be_sent_again_);
|
||||
Ale_ShowAlert (Ale_INFO,Txt_Do_not_reload_this_page_because_the_message_will_be_sent_again_);
|
||||
}
|
||||
else
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_The_message_has_not_been_sent_to_any_recipient);
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_The_message_has_not_been_sent_to_any_recipient);
|
||||
|
||||
/***** Show alert about errors on sending message *****/
|
||||
if (NumErrors > 1)
|
||||
{
|
||||
sprintf (Gbl.Alert.Txt,Txt_There_have_been_X_errors_in_sending_the_message,
|
||||
(unsigned) NumErrors);
|
||||
Lay_ShowAlert (Lay_ERROR,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_ERROR,Gbl.Alert.Txt);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -879,14 +879,14 @@ void Msg_ReqDelAllRecMsgs (void)
|
|||
Txt_any_user,
|
||||
Gbl.Msg.FilterCrsShrtName);
|
||||
}
|
||||
Lay_ShowAlertAndButton1 (Lay_QUESTION,Gbl.Alert.Txt);
|
||||
Ale_ShowAlertAndButton1 (Ale_QUESTION,Gbl.Alert.Txt);
|
||||
|
||||
/* Show received messages again */
|
||||
Gbl.Msg.TypeOfMessages = Msg_MESSAGES_RECEIVED;
|
||||
Msg_ShowSentOrReceivedMessages ();
|
||||
|
||||
/* End alert */
|
||||
Lay_ShowAlertAndButton2 (ActDelAllRcvMsg,NULL,
|
||||
Ale_ShowAlertAndButton2 (ActDelAllRcvMsg,NULL,
|
||||
Msg_PutHiddenParamsMsgsFilters,
|
||||
Lay_REMOVE_BUTTON,Txt_Delete_messages_received);
|
||||
}
|
||||
|
@ -919,14 +919,14 @@ void Msg_ReqDelAllSntMsgs (void)
|
|||
Gbl.Msg.FilterFromTo[0] ? Gbl.Msg.FilterFromTo :
|
||||
Txt_any_user,
|
||||
Gbl.Msg.FilterCrsShrtName);
|
||||
Lay_ShowAlertAndButton1 (Lay_QUESTION,Gbl.Alert.Txt);
|
||||
Ale_ShowAlertAndButton1 (Ale_QUESTION,Gbl.Alert.Txt);
|
||||
|
||||
/* Show sent messages again */
|
||||
Gbl.Msg.TypeOfMessages = Msg_MESSAGES_SENT;
|
||||
Msg_ShowSentOrReceivedMessages ();
|
||||
|
||||
/* End alert */
|
||||
Lay_ShowAlertAndButton2 (ActDelAllSntMsg,NULL,
|
||||
Ale_ShowAlertAndButton2 (ActDelAllSntMsg,NULL,
|
||||
Msg_PutHiddenParamsMsgsFilters,
|
||||
Lay_REMOVE_BUTTON,Txt_Delete_messages_sent);
|
||||
}
|
||||
|
@ -984,12 +984,12 @@ static void Msg_ShowNumMsgsDeleted (unsigned NumMsgs)
|
|||
extern const char *Txt_X_messages_have_been_deleted;
|
||||
|
||||
if (NumMsgs == 1)
|
||||
Lay_ShowAlert (Lay_SUCCESS,Txt_One_message_has_been_deleted);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Txt_One_message_has_been_deleted);
|
||||
else
|
||||
{
|
||||
sprintf (Gbl.Alert.Txt,Txt_X_messages_have_been_deleted,
|
||||
NumMsgs);
|
||||
Lay_ShowAlert (Lay_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1088,7 +1088,7 @@ void Msg_DelSntMsg (void)
|
|||
/***** Delete the message *****/
|
||||
/* Delete the sent message */
|
||||
Msg_MoveSentMsgToDeleted (MsgCod);
|
||||
Lay_ShowAlert (Lay_SUCCESS,Txt_Message_deleted);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Txt_Message_deleted);
|
||||
|
||||
/* Show the remaining messages */
|
||||
Msg_ShowSntMsgs ();
|
||||
|
@ -1110,7 +1110,7 @@ void Msg_DelRecMsg (void)
|
|||
/***** Delete the message *****/
|
||||
/* Delete the received message */
|
||||
Msg_MoveReceivedMsgToDeleted (MsgCod,Gbl.Usrs.Me.UsrDat.UsrCod);
|
||||
Lay_ShowAlert (Lay_SUCCESS,Txt_Message_deleted);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Txt_Message_deleted);
|
||||
|
||||
/* Show the remaining messages */
|
||||
Msg_ShowRecMsgs ();
|
||||
|
@ -3642,7 +3642,7 @@ void Msg_BanSenderWhenShowingMsgs (void)
|
|||
/***** Show alert with the change made *****/
|
||||
sprintf (Gbl.Alert.Txt,Txt_From_this_time_you_will_not_receive_messages_from_X,
|
||||
Gbl.Usrs.Other.UsrDat.FullName);
|
||||
Lay_ShowAlert (Lay_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
|
||||
/**** Show received messages again */
|
||||
Msg_ShowRecMsgs ();
|
||||
|
@ -3699,7 +3699,7 @@ static void Msg_UnbanSender (void)
|
|||
/***** Show alert with the change made *****/
|
||||
sprintf (Gbl.Alert.Txt,Txt_From_this_time_you_can_receive_messages_from_X,
|
||||
Gbl.Usrs.Other.UsrDat.FullName);
|
||||
Lay_ShowAlert (Lay_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -3759,7 +3759,7 @@ void Msg_ListBannedUsrs (void)
|
|||
NumUsrs = (unsigned) DB_QuerySELECT (Query,&mysql_res,"can not get banned users");
|
||||
|
||||
if (NumUsrs == 0) // If not result ==> sent message is deleted
|
||||
Lay_ShowAlert (Lay_INFO,Txt_You_have_not_banned_any_sender);
|
||||
Ale_ShowAlert (Ale_INFO,Txt_You_have_not_banned_any_sender);
|
||||
else
|
||||
{
|
||||
/***** Initialize structure with user's data *****/
|
||||
|
|
|
@ -318,10 +318,10 @@ void Nck_RemoveNick (void)
|
|||
|
||||
/***** Show message *****/
|
||||
sprintf (Gbl.Alert.Txt,Txt_Nickname_X_removed,NicknameWithoutArroba);
|
||||
Lay_ShowAlert (Lay_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
}
|
||||
else
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_You_can_not_delete_your_current_nickname);
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_You_can_not_delete_your_current_nickname);
|
||||
|
||||
/***** Show my account again *****/
|
||||
Acc_ShowFormChangeMyAccount ();
|
||||
|
@ -414,8 +414,8 @@ void Nck_UpdateNick (void)
|
|||
}
|
||||
|
||||
/***** Show message *****/
|
||||
Lay_ShowAlert (Error ? Lay_WARNING :
|
||||
Lay_SUCCESS,
|
||||
Ale_ShowAlert (Error ? Ale_WARNING :
|
||||
Ale_SUCCESS,
|
||||
Gbl.Alert.Txt);
|
||||
|
||||
/***** Show my account again *****/
|
||||
|
|
|
@ -96,7 +96,7 @@ void Not_ShowFormNotice (void)
|
|||
/***** Help message *****/
|
||||
sprintf (Gbl.Alert.Txt,Txt_The_notice_will_appear_as_a_yellow_note_,
|
||||
Gbl.CurrentCrs.Crs.FullName);
|
||||
Lay_ShowAlert (Lay_INFO,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_INFO,Gbl.Alert.Txt);
|
||||
|
||||
/***** Start form *****/
|
||||
Act_FormStart (ActRcvNot);
|
||||
|
@ -142,7 +142,7 @@ void Not_ReceiveNotice (void)
|
|||
RSS_UpdateRSSFileForACrs (&Gbl.CurrentCrs.Crs);
|
||||
|
||||
/***** Write message of success *****/
|
||||
Lay_ShowAlert (Lay_SUCCESS,Txt_Notice_created);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Txt_Notice_created);
|
||||
|
||||
/***** Notify by email about the new notice *****/
|
||||
if ((NumUsrsToBeNotifiedByEMail = Ntf_StoreNotifyEventsToAllUsrs (Ntf_EVENT_NOTICE,NotCod)))
|
||||
|
@ -195,7 +195,7 @@ void Not_ListNoticesAfterRemoval (void)
|
|||
extern const char *Txt_Notice_removed;
|
||||
|
||||
/***** Message of success *****/
|
||||
Lay_ShowAlert (Lay_SUCCESS,Txt_Notice_removed);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Txt_Notice_removed);
|
||||
|
||||
/***** List remaining notices *****/
|
||||
Not_ListFullNotices ();
|
||||
|
@ -275,13 +275,13 @@ void Not_RequestRemNotice (void)
|
|||
|
||||
/***** Show question and button to remove this notice *****/
|
||||
/* Start alert */
|
||||
Lay_ShowAlertAndButton1 (Lay_QUESTION,Txt_Do_you_really_want_to_remove_the_following_notice);
|
||||
Ale_ShowAlertAndButton1 (Ale_QUESTION,Txt_Do_you_really_want_to_remove_the_following_notice);
|
||||
|
||||
/* Show notice */
|
||||
Not_GetDataAndShowNotice (Gbl.CurrentCrs.Notices.NotCod);
|
||||
|
||||
/* End alert */
|
||||
Lay_ShowAlertAndButton2 (ActRemNot,NULL,Not_PutParams,
|
||||
Ale_ShowAlertAndButton2 (ActRemNot,NULL,Not_PutParams,
|
||||
Lay_REMOVE_BUTTON,Txt_Remove);
|
||||
|
||||
/***** Show all notices *****/
|
||||
|
@ -394,7 +394,7 @@ void Not_ShowNotices (Not_Listing_t TypeNoticesListing)
|
|||
Txt_Notices,
|
||||
Not_PutIconsListNotices,Hlp_MESSAGES_Notices);
|
||||
if (!NumNotices)
|
||||
Lay_ShowAlert (Lay_INFO,Txt_No_notices);
|
||||
Ale_ShowAlert (Ale_INFO,Txt_No_notices);
|
||||
}
|
||||
|
||||
/***** Show the notices *****/
|
||||
|
|
|
@ -630,7 +630,7 @@ void Ntf_ShowMyNotifications (void)
|
|||
Usr_UsrDataDestructor (&UsrDat);
|
||||
}
|
||||
else
|
||||
Lay_ShowAlert (Lay_INFO,AllNotifications ? Txt_You_have_no_notifications :
|
||||
Ale_ShowAlert (Ale_INFO,AllNotifications ? Txt_You_have_no_notifications :
|
||||
Txt_You_have_no_unread_notifications);
|
||||
|
||||
/***** End frame *****/
|
||||
|
@ -1796,7 +1796,7 @@ void Ntf_ShowAlertNumUsrsToBeNotifiedByEMail (unsigned NumUsrsToBeNotifiedByEMai
|
|||
|
||||
sprintf (Gbl.Alert.Txt,"%s: %u",
|
||||
Txt_No_of_users_who_will_be_notified_by_email,NumUsrsToBeNotifiedByEMail);
|
||||
Lay_ShowAlert (Lay_INFO,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_INFO,Gbl.Alert.Txt);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -2010,7 +2010,7 @@ void Ntf_ChangeNotifyEvents (void)
|
|||
DB_QueryUPDATE (Query,"can not update user's preferences");
|
||||
|
||||
/***** Show message *****/
|
||||
Lay_ShowAlert (Lay_SUCCESS,Txt_Your_preferences_about_notifications_have_changed);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Txt_Your_preferences_about_notifications_have_changed);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
|
@ -205,8 +205,8 @@ void Pwd_ActChgMyPwd1 (void)
|
|||
void Pwd_ActChgMyPwd2 (void)
|
||||
{
|
||||
/***** Write error message when updating password *****/
|
||||
Lay_ShowAlert (Gbl.Usrs.Error ? Lay_WARNING :
|
||||
Lay_INFO,
|
||||
Ale_ShowAlert (Gbl.Usrs.Error ? Ale_WARNING :
|
||||
Ale_INFO,
|
||||
Gbl.Alert.Txt);
|
||||
|
||||
/***** Retry? *****/
|
||||
|
@ -254,7 +254,7 @@ void Pwd_ShowFormSendNewPwd (void)
|
|||
Lay_StartRoundFrame (NULL,Txt_Forgotten_password,NULL,Hlp_PROFILE_Password);
|
||||
|
||||
/***** Help text *****/
|
||||
Lay_ShowAlert (Lay_INFO,Txt_If_you_have_forgotten_your_password_);
|
||||
Ale_ShowAlert (Ale_INFO,Txt_If_you_have_forgotten_your_password_);
|
||||
|
||||
/***** User's ID/nickname *****/
|
||||
fprintf (Gbl.F.Out,"<label class=\"%s\">"
|
||||
|
@ -289,7 +289,7 @@ void Pwd_ChkIdLoginAndSendNewPwd (void)
|
|||
/***** Check if user's ID or nickname is not empty *****/
|
||||
if (!Gbl.Usrs.Me.UsrIdLogin[0])
|
||||
{
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_You_must_enter_your_nick_email_or_ID);
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_You_must_enter_your_nick_email_or_ID);
|
||||
Pwd_ShowFormSendNewPwd ();
|
||||
return;
|
||||
}
|
||||
|
@ -353,21 +353,21 @@ void Pwd_ChkIdLoginAndSendNewPwd (void)
|
|||
{
|
||||
case 0: // Message sent successfully
|
||||
Pwd_SetMyPendingPassword (NewRandomPlainPassword);
|
||||
Lay_ShowAlert (Lay_INFO,Txt_If_you_have_written_your_ID_nickname_or_email_correctly_);
|
||||
Ale_ShowAlert (Ale_INFO,Txt_If_you_have_written_your_ID_nickname_or_email_correctly_);
|
||||
break;
|
||||
case 1:
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_There_was_a_problem_sending_an_email_automatically);
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_There_was_a_problem_sending_an_email_automatically);
|
||||
break;
|
||||
default:
|
||||
sprintf (Gbl.Alert.Txt,"Internal error: an email message has not been sent successfully."
|
||||
" Error code returned by the script: %d",
|
||||
ReturnCode);
|
||||
Lay_ShowAlert (Lay_ERROR,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_ERROR,Gbl.Alert.Txt);
|
||||
break;
|
||||
}
|
||||
else // I have no email address
|
||||
/***** Help message *****/
|
||||
Lay_ShowAlert (Lay_INFO,Txt_If_you_have_written_your_ID_nickname_or_email_correctly_);
|
||||
Ale_ShowAlert (Ale_INFO,Txt_If_you_have_written_your_ID_nickname_or_email_correctly_);
|
||||
}
|
||||
else // ListUsrCods.NumUsrs > 1
|
||||
{
|
||||
|
@ -375,7 +375,7 @@ void Pwd_ChkIdLoginAndSendNewPwd (void)
|
|||
// TODO: This message allows to know if a ID exists in database (when no unique). This should be hidden!
|
||||
sprintf (Gbl.Alert.Txt,Txt_There_are_more_than_one_user_with_the_ID_X_Please_type_a_nick_or_email,
|
||||
Gbl.Usrs.Me.UsrIdLogin);
|
||||
Lay_ShowAlert (Lay_WARNING,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
|
||||
Pwd_ShowFormSendNewPwd ();
|
||||
}
|
||||
|
@ -385,7 +385,7 @@ void Pwd_ChkIdLoginAndSendNewPwd (void)
|
|||
}
|
||||
else // ListUsrCods.NumUsrs == 0 ==> user does not exist
|
||||
/***** Help message *****/
|
||||
Lay_ShowAlert (Lay_INFO,Txt_If_you_have_written_your_ID_nickname_or_email_correctly_);
|
||||
Ale_ShowAlert (Ale_INFO,Txt_If_you_have_written_your_ID_nickname_or_email_correctly_);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -532,8 +532,8 @@ void Pwd_UpdateOtherPwd2 (void)
|
|||
{
|
||||
/***** Write message when updating the password *****/
|
||||
if (Gbl.Alert.Txt[0])
|
||||
Lay_ShowAlert (Gbl.Usrs.Error ? Lay_WARNING :
|
||||
Lay_INFO,
|
||||
Ale_ShowAlert (Gbl.Usrs.Error ? Ale_WARNING :
|
||||
Ale_INFO,
|
||||
Gbl.Alert.Txt);
|
||||
|
||||
if (Gbl.Usrs.Error)
|
||||
|
@ -684,11 +684,11 @@ void Pwd_ShowFormChgPwd (void)
|
|||
|
||||
/***** Help message *****/
|
||||
if (!IHaveAPasswordInDB) // If I don't have a password in database...
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_Before_going_to_any_other_option_you_must_create_your_password);
|
||||
Ale_ShowAlert (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))
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_Your_password_is_not_secure_enough);
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_Your_password_is_not_secure_enough);
|
||||
}
|
||||
|
||||
/***** Start form *****/
|
||||
|
@ -719,7 +719,7 @@ void Pwd_ShowFormChgPwd (void)
|
|||
"<td colspan=\"2\">");
|
||||
sprintf (Gbl.Alert.Txt,Txt_Your_password_must_be_at_least_X_characters_and_can_not_contain_spaces_,
|
||||
Pwd_MIN_CHARS_PLAIN_PASSWORD);
|
||||
Lay_ShowAlert (Lay_INFO,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_INFO,Gbl.Alert.Txt);
|
||||
fprintf (Gbl.F.Out,"</td>"
|
||||
"</tr>");
|
||||
|
||||
|
@ -846,10 +846,10 @@ void Pwd_ShowFormOthPwd (void)
|
|||
Lay_EndRoundFrame ();
|
||||
}
|
||||
else
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
|
||||
}
|
||||
else // User not found
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -933,7 +933,7 @@ bool Pwd_GetConfirmationOnDangerousAction (void)
|
|||
/***** Get if consent has been done *****/
|
||||
if (!Par_GetParToBool ("Consent"))
|
||||
{
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_You_have_not_confirmed_the_action);
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_You_have_not_confirmed_the_action);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -947,7 +947,7 @@ bool Pwd_GetConfirmationOnDangerousAction (void)
|
|||
/* Compare passwords */
|
||||
if (strcmp (Gbl.Usrs.Me.LoginEncryptedPassword,EncryptedPassword))
|
||||
{
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_You_have_not_entered_your_password_correctly);
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_You_have_not_entered_your_password_correctly);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
60
swad_photo.c
60
swad_photo.c
|
@ -316,7 +316,7 @@ static void Pho_ReqPhoto (const struct UsrData *UsrDat,const char *PhotoURL)
|
|||
/***** Show current photo and help message *****/
|
||||
Pho_ShowUsrPhoto (UsrDat,PhotoURL,
|
||||
"PHOTO186x248",Pho_NO_ZOOM,false);
|
||||
Lay_ShowAlert (Lay_INFO,Txt_You_can_send_a_file_with_an_image_in_JPEG_format_);
|
||||
Ale_ShowAlert (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\">"
|
||||
|
@ -360,10 +360,10 @@ void Pho_SendPhotoUsr (void)
|
|||
Pho_ReqOtherUsrPhoto ();
|
||||
}
|
||||
else
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
|
||||
}
|
||||
else // User not found
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -396,7 +396,7 @@ void Pho_RecOtherUsrPhotoDetFaces (void)
|
|||
Pho_ReqOtherUsrPhoto (); // Request user's photograph again
|
||||
}
|
||||
else
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -414,18 +414,18 @@ void Pho_ReqRemoveMyPhoto (void)
|
|||
{
|
||||
/***** Show question and button to remove my photo *****/
|
||||
/* Start alert */
|
||||
Lay_ShowAlertAndButton1 (Lay_QUESTION,Txt_Do_you_really_want_to_remove_your_photo);
|
||||
Ale_ShowAlertAndButton1 (Ale_QUESTION,Txt_Do_you_really_want_to_remove_your_photo);
|
||||
|
||||
/* Show current photo */
|
||||
Pho_ShowUsrPhoto (&Gbl.Usrs.Me.UsrDat,Gbl.Usrs.Me.PhotoURL,
|
||||
"PHOTO186x248",Pho_NO_ZOOM,false);
|
||||
|
||||
/* End alert */
|
||||
Lay_ShowAlertAndButton2 (ActRemMyPho,NULL,NULL,
|
||||
Ale_ShowAlertAndButton2 (ActRemMyPho,NULL,NULL,
|
||||
Lay_REMOVE_BUTTON,Txt_Remove_photo);
|
||||
}
|
||||
else
|
||||
Lay_ShowAlert (Lay_INFO,Txt_The_photo_no_longer_exists);
|
||||
Ale_ShowAlert (Ale_INFO,Txt_The_photo_no_longer_exists);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -444,7 +444,7 @@ void Pho_RemoveMyPhoto1 (void)
|
|||
void Pho_RemoveMyPhoto2 (void)
|
||||
{
|
||||
/***** Write success / warning message *****/
|
||||
Lay_ShowPendingAlert ();
|
||||
Ale_ShowPendingAlert ();
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -475,27 +475,27 @@ void Pho_ReqRemoveUsrPhoto (void)
|
|||
/* Start alert */
|
||||
sprintf (Gbl.Alert.Txt,Txt_Do_you_really_want_to_remove_the_photo_of_X,
|
||||
Gbl.Usrs.Other.UsrDat.FullName);
|
||||
Lay_ShowAlertAndButton1 (Lay_QUESTION,Gbl.Alert.Txt);
|
||||
Ale_ShowAlertAndButton1 (Ale_QUESTION,Gbl.Alert.Txt);
|
||||
|
||||
/* Show current photo */
|
||||
Pho_ShowUsrPhoto (&Gbl.Usrs.Other.UsrDat,PhotoURL,
|
||||
"PHOTO186x248",Pho_NO_ZOOM,false);
|
||||
|
||||
/* End alert */
|
||||
Lay_ShowAlertAndButton2 ( Gbl.Usrs.Other.UsrDat.RoleInCurrentCrsDB == Rol_STUDENT ? ActRemStdPho :
|
||||
Ale_ShowAlertAndButton2 ( Gbl.Usrs.Other.UsrDat.RoleInCurrentCrsDB == Rol_STUDENT ? ActRemStdPho :
|
||||
(Gbl.Usrs.Other.UsrDat.RoleInCurrentCrsDB == Rol_TEACHER ? ActRemTchPho :
|
||||
ActRemOthPho), // Guest, visitor or admin
|
||||
NULL,Usr_PutParamOtherUsrCodEncrypted,
|
||||
Lay_REMOVE_BUTTON,Txt_Remove_photo);
|
||||
}
|
||||
else
|
||||
Lay_ShowAlert (Lay_INFO,Txt_The_photo_no_longer_exists);
|
||||
Ale_ShowAlert (Ale_INFO,Txt_The_photo_no_longer_exists);
|
||||
}
|
||||
else
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
|
||||
}
|
||||
else
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -514,10 +514,10 @@ void Pho_RemoveUsrPhoto (void)
|
|||
{
|
||||
/***** Remove photo *****/
|
||||
if (Pho_RemovePhoto (&Gbl.Usrs.Other.UsrDat))
|
||||
Lay_ShowPendingAlert ();
|
||||
Ale_ShowPendingAlert ();
|
||||
}
|
||||
else
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -599,7 +599,7 @@ static bool Pho_ReceivePhotoAndDetectFaces (bool ItsMe,const struct UsrData *Usr
|
|||
if (WrongType)
|
||||
{
|
||||
sprintf (Gbl.Alert.Txt,Txt_The_file_is_not_X,"jpg");
|
||||
Lay_ShowAlert (Lay_WARNING,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -609,7 +609,7 @@ static bool Pho_ReceivePhotoAndDetectFaces (bool ItsMe,const struct UsrData *Usr
|
|||
Cfg_FOLDER_PHOTO_TMP,Gbl.UniqueNameEncrypted);
|
||||
if (!Fil_EndReceptionOfFile (FileNamePhotoTmp,Param))
|
||||
{
|
||||
Lay_ShowAlert (Lay_WARNING,"Error copying file.");
|
||||
Ale_ShowAlert (Ale_WARNING,"Error copying file.");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -675,13 +675,13 @@ static bool Pho_ReceivePhotoAndDetectFaces (bool ItsMe,const struct UsrData *Usr
|
|||
|
||||
/***** Message to the user about the number of faces detected in the image*****/
|
||||
if (NumFacesTotal == 0)
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_Could_not_detect_any_face_in_front_position_);
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_Could_not_detect_any_face_in_front_position_);
|
||||
else if (NumFacesTotal == 1)
|
||||
{
|
||||
if (NumFacesGreen == 1)
|
||||
Lay_ShowAlert (Lay_SUCCESS,Txt_A_face_marked_in_green_has_been_detected_);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Txt_A_face_marked_in_green_has_been_detected_);
|
||||
else
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_A_face_marked_in_red_has_been_detected_);
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_A_face_marked_in_red_has_been_detected_);
|
||||
}
|
||||
else // NumFacesTotal > 1
|
||||
{
|
||||
|
@ -689,13 +689,13 @@ static bool Pho_ReceivePhotoAndDetectFaces (bool ItsMe,const struct UsrData *Usr
|
|||
{
|
||||
sprintf (Gbl.Alert.Txt,Txt_X_faces_marked_in_green_have_been_detected_,
|
||||
NumFacesGreen);
|
||||
Lay_ShowAlert (Lay_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
}
|
||||
else if (NumFacesGreen == 0)
|
||||
{
|
||||
sprintf (Gbl.Alert.Txt,Txt_X_faces_marked_in_red_have_been_detected_,
|
||||
NumFacesRed);
|
||||
Lay_ShowAlert (Lay_WARNING,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
}
|
||||
else // NumFacesGreen > 0
|
||||
{
|
||||
|
@ -705,7 +705,7 @@ static bool Pho_ReceivePhotoAndDetectFaces (bool ItsMe,const struct UsrData *Usr
|
|||
else
|
||||
sprintf (Gbl.Alert.Txt,Txt_X_faces_have_been_detected_in_front_position_Y_Z_,
|
||||
NumFacesTotal,NumFacesGreen,NumFacesRed);
|
||||
Lay_ShowAlert (Lay_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -779,7 +779,7 @@ void Pho_UpdateUsrPhoto1 (void)
|
|||
if (Usr_GetParamOtherUsrCodEncryptedAndGetUsrData ())
|
||||
Pho_UpdatePhoto1 (&Gbl.Usrs.Other.UsrDat);
|
||||
else
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
|
||||
}
|
||||
|
||||
void Pho_UpdateUsrPhoto2 (void)
|
||||
|
@ -817,12 +817,12 @@ static void Pho_UpdatePhoto1 (struct UsrData *UsrDat)
|
|||
/* Remove the user from the list of users without photo */
|
||||
Pho_RemoveUsrFromTableClicksWithoutPhoto (UsrDat->UsrCod);
|
||||
|
||||
Gbl.Alert.Type = Lay_SUCCESS;
|
||||
Gbl.Alert.Type = Ale_SUCCESS;
|
||||
sprintf (Gbl.Alert.Txt,"%s",Txt_Photo_has_been_updated);
|
||||
}
|
||||
else
|
||||
{
|
||||
Gbl.Alert.Type = Lay_ERROR;
|
||||
Gbl.Alert.Type = Ale_ERROR;
|
||||
sprintf (Gbl.Alert.Txt,"%s","Error updating photo.");
|
||||
}
|
||||
}
|
||||
|
@ -854,7 +854,7 @@ static void Pho_UpdatePhoto2 (void)
|
|||
Lay_EndTable ();
|
||||
|
||||
/***** Show message *****/
|
||||
Lay_ShowPendingAlert ();
|
||||
Ale_ShowPendingAlert ();
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -1045,13 +1045,13 @@ bool Pho_RemovePhoto (struct UsrData *UsrDat)
|
|||
|
||||
if (NumErrors)
|
||||
{
|
||||
Gbl.Alert.Type = Lay_ERROR;
|
||||
Gbl.Alert.Type = Ale_ERROR;
|
||||
sprintf (Gbl.Alert.Txt,"%s","Error removing photo.");
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
Gbl.Alert.Type = Lay_SUCCESS;
|
||||
Gbl.Alert.Type = Ale_SUCCESS;
|
||||
sprintf (Gbl.Alert.Txt,"%s",Txt_Photo_removed);
|
||||
return true;
|
||||
}
|
||||
|
@ -1220,7 +1220,7 @@ void Pho_ChangePhotoVisibility (void)
|
|||
DB_QueryUPDATE (Query,"can not update your preference about photo visibility");
|
||||
|
||||
/***** Show alert *****/
|
||||
Lay_ShowAlert (Lay_SUCCESS,Txt_The_visibility_of_your_photo_has_changed);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Txt_The_visibility_of_your_photo_has_changed);
|
||||
|
||||
/***** Show form again *****/
|
||||
Pri_EditMyPrivacy ();
|
||||
|
|
20
swad_place.c
20
swad_place.c
|
@ -567,7 +567,7 @@ void Plc_RemovePlace (void)
|
|||
|
||||
/***** Check if this place has centres *****/
|
||||
if (Plc.NumCtrs) // Place has centres ==> don't remove
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_To_remove_a_place_you_must_first_remove_all_centres_of_that_place);
|
||||
Ale_ShowAlert (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 *****/
|
||||
|
@ -578,7 +578,7 @@ void Plc_RemovePlace (void)
|
|||
/***** Write message to show the change made *****/
|
||||
sprintf (Gbl.Alert.Txt,Txt_Place_X_removed,
|
||||
Plc.FullName);
|
||||
Lay_ShowAlert (Lay_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
}
|
||||
|
||||
/***** Show the form again *****/
|
||||
|
@ -653,7 +653,7 @@ static void Plc_RenamePlace (Cns_ShrtOrFullName_t ShrtOrFullName)
|
|||
{
|
||||
sprintf (Gbl.Alert.Txt,Txt_You_can_not_leave_the_name_of_the_place_X_empty,
|
||||
CurrentPlcName);
|
||||
Lay_ShowAlert (Lay_WARNING,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -665,7 +665,7 @@ static void Plc_RenamePlace (Cns_ShrtOrFullName_t ShrtOrFullName)
|
|||
{
|
||||
sprintf (Gbl.Alert.Txt,Txt_The_place_X_already_exists,
|
||||
NewPlcName);
|
||||
Lay_ShowAlert (Lay_WARNING,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -675,14 +675,14 @@ static void Plc_RenamePlace (Cns_ShrtOrFullName_t ShrtOrFullName)
|
|||
/* Write message to show the change made */
|
||||
sprintf (Gbl.Alert.Txt,Txt_The_place_X_has_been_renamed_as_Y,
|
||||
CurrentPlcName,NewPlcName);
|
||||
Lay_ShowAlert (Lay_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
}
|
||||
}
|
||||
else // The same name
|
||||
{
|
||||
sprintf (Gbl.Alert.Txt,Txt_The_name_of_the_place_X_has_not_changed,
|
||||
CurrentPlcName);
|
||||
Lay_ShowAlert (Lay_INFO,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_INFO,Gbl.Alert.Txt);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -839,19 +839,19 @@ void Plc_RecFormNewPlace (void)
|
|||
{
|
||||
sprintf (Gbl.Alert.Txt,Txt_The_place_X_already_exists,
|
||||
Plc->ShrtName);
|
||||
Lay_ShowAlert (Lay_WARNING,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
}
|
||||
else if (Plc_CheckIfPlaceNameExists ("FullName",Plc->FullName,-1L))
|
||||
{
|
||||
sprintf (Gbl.Alert.Txt,Txt_The_place_X_already_exists,
|
||||
Plc->FullName);
|
||||
Lay_ShowAlert (Lay_WARNING,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
}
|
||||
else // Add new place to database
|
||||
Plc_CreatePlace (Plc);
|
||||
}
|
||||
else // If there is not a place name
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_You_must_specify_the_short_name_and_the_full_name_of_the_new_place);
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_You_must_specify_the_short_name_and_the_full_name_of_the_new_place);
|
||||
|
||||
/***** Show the form again *****/
|
||||
Plc_EditPlaces ();
|
||||
|
@ -879,5 +879,5 @@ static void Plc_CreatePlace (struct Place *Plc)
|
|||
/***** Write success message *****/
|
||||
sprintf (Gbl.Alert.Txt,Txt_Created_new_place_X,
|
||||
Plc->FullName);
|
||||
Lay_ShowAlert (Lay_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
}
|
||||
|
|
|
@ -83,7 +83,7 @@ void Plg_ListPlugins (void)
|
|||
|
||||
if (Gbl.Usrs.Me.LoggedRole != Rol_SYS_ADM)
|
||||
{
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_Option_under_development);
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_Option_under_development);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -499,7 +499,7 @@ void Plg_RemovePlugin (void)
|
|||
/***** Write message to show the change made *****/
|
||||
sprintf (Gbl.Alert.Txt,Txt_Plugin_X_removed,
|
||||
Plg.Name);
|
||||
Lay_ShowAlert (Lay_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
|
||||
/***** Show the form again *****/
|
||||
Plg_EditPlugins ();
|
||||
|
@ -537,7 +537,7 @@ void Plg_RenamePlugin (void)
|
|||
{
|
||||
sprintf (Gbl.Alert.Txt,Txt_You_can_not_leave_the_name_of_the_plugin_X_empty,
|
||||
Plg->Name);
|
||||
Lay_ShowAlert (Lay_WARNING,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -549,7 +549,7 @@ void Plg_RenamePlugin (void)
|
|||
{
|
||||
sprintf (Gbl.Alert.Txt,Txt_The_plugin_X_already_exists,
|
||||
NewPlgName);
|
||||
Lay_ShowAlert (Lay_WARNING,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -561,14 +561,14 @@ void Plg_RenamePlugin (void)
|
|||
/***** Write message to show the change made *****/
|
||||
sprintf (Gbl.Alert.Txt,Txt_The_plugin_X_has_been_renamed_as_Y,
|
||||
Plg->Name,NewPlgName);
|
||||
Lay_ShowAlert (Lay_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
}
|
||||
}
|
||||
else // The same name
|
||||
{
|
||||
sprintf (Gbl.Alert.Txt,Txt_The_name_of_the_plugin_X_has_not_changed,
|
||||
Plg->Name);
|
||||
Lay_ShowAlert (Lay_INFO,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_INFO,Gbl.Alert.Txt);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -626,12 +626,12 @@ void Plg_ChangePlgDescription (void)
|
|||
/***** Write message to show the change made *****/
|
||||
sprintf (Gbl.Alert.Txt,Txt_The_new_description_is_X,
|
||||
NewDescription);
|
||||
Lay_ShowAlert (Lay_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
}
|
||||
else
|
||||
{
|
||||
sprintf (Gbl.Alert.Txt,"%s",Txt_You_can_not_leave_the_description_empty);
|
||||
Lay_ShowAlert (Lay_WARNING,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
}
|
||||
|
||||
/***** Show the form again *****/
|
||||
|
@ -673,10 +673,10 @@ void Plg_ChangePlgLogo (void)
|
|||
/***** Write message to show the change made *****/
|
||||
sprintf (Gbl.Alert.Txt,Txt_The_new_logo_is_X,
|
||||
NewLogo);
|
||||
Lay_ShowAlert (Lay_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
}
|
||||
else
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_You_can_not_leave_the_logo_empty);
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_You_can_not_leave_the_logo_empty);
|
||||
|
||||
/***** Show the form again *****/
|
||||
Str_Copy (Plg->Logo,NewLogo,
|
||||
|
@ -717,10 +717,10 @@ void Plg_ChangePlgAppKey (void)
|
|||
/***** Write message to show the change made *****/
|
||||
sprintf (Gbl.Alert.Txt,Txt_The_new_logo_is_X, // TODO!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
NewAppKey);
|
||||
Lay_ShowAlert (Lay_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
}
|
||||
else
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_You_can_not_leave_the_logo_empty); // TODO!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_You_can_not_leave_the_logo_empty); // TODO!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
|
||||
/***** Show the form again *****/
|
||||
Str_Copy (Plg->AppKey,NewAppKey,
|
||||
|
@ -761,10 +761,10 @@ void Plg_ChangePlgURL (void)
|
|||
/***** Write message to show the change made *****/
|
||||
sprintf (Gbl.Alert.Txt,Txt_The_new_URL_is_X,
|
||||
NewURL);
|
||||
Lay_ShowAlert (Lay_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
}
|
||||
else
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_You_can_not_leave_the_URL_empty);
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_You_can_not_leave_the_URL_empty);
|
||||
|
||||
/***** Show the form again *****/
|
||||
Str_Copy (Plg->URL,NewURL,
|
||||
|
@ -805,10 +805,10 @@ void Plg_ChangePlgIP (void)
|
|||
/***** Write message to show the change made *****/
|
||||
sprintf (Gbl.Alert.Txt,Txt_The_new_IP_address_is_X,
|
||||
NewIP);
|
||||
Lay_ShowAlert (Lay_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
}
|
||||
else
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_You_can_not_leave_the_IP_address_empty);
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_You_can_not_leave_the_IP_address_empty);
|
||||
|
||||
/***** Show the form again *****/
|
||||
Str_Copy (Plg->IP,NewIP,
|
||||
|
@ -1013,16 +1013,16 @@ void Plg_RecFormNewPlg (void)
|
|||
{
|
||||
sprintf (Gbl.Alert.Txt,Txt_The_plugin_X_already_exists,
|
||||
Plg->Name);
|
||||
Lay_ShowAlert (Lay_WARNING,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (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
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_You_must_specify_the_logo_the_application_key_the_URL_and_the_IP_address_of_the_new_plugin);
|
||||
Ale_ShowAlert (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
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_You_must_specify_the_name_and_the_description_of_the_new_plugin);
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_You_must_specify_the_name_and_the_description_of_the_new_plugin);
|
||||
|
||||
/***** Show the form again *****/
|
||||
Plg_EditPlugins ();
|
||||
|
@ -1053,7 +1053,7 @@ static void Plg_CreatePlugin (struct Plugin *Plg)
|
|||
/***** Write success message *****/
|
||||
sprintf (Gbl.Alert.Txt,Txt_Created_new_plugin_X,
|
||||
Plg->Name);
|
||||
Lay_ShowAlert (Lay_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
|
@ -99,7 +99,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)
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_Please_review_your_privacy_preferences);
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_Please_review_your_privacy_preferences);
|
||||
|
||||
/***** Start frame and table *****/
|
||||
Lay_StartRoundFrameTable (NULL,Txt_Privacy,Pri_PutIconsPrivacy,
|
||||
|
|
|
@ -230,7 +230,7 @@ void Prf_GetUsrDatAndShowUserProfile (void)
|
|||
if (!ProfileShown)
|
||||
{
|
||||
/* Show error message */
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
|
||||
|
||||
/* Request a user's profile */
|
||||
Prf_RequestUserProfile ();
|
||||
|
@ -338,7 +338,7 @@ void Prf_ChangeProfileVisibility (void)
|
|||
DB_QueryUPDATE (Query,"can not update your preference about public profile visibility");
|
||||
|
||||
/***** Show alert *****/
|
||||
Lay_ShowAlert (Lay_SUCCESS,Txt_The_visibility_of_your_public_profile_has_changed);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Txt_The_visibility_of_your_public_profile_has_changed);
|
||||
|
||||
/***** Show form again *****/
|
||||
Pri_EditMyPrivacy ();
|
||||
|
|
|
@ -190,7 +190,7 @@ void Rec_ReqEditRecordFields (void)
|
|||
{
|
||||
sprintf (Gbl.Alert.Txt,Txt_There_are_no_record_fields_in_the_course_X,
|
||||
Gbl.CurrentCrs.Crs.FullName);
|
||||
Lay_ShowAlert (Lay_INFO,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_INFO,Gbl.Alert.Txt);
|
||||
}
|
||||
|
||||
/***** Put a form to create a new record field *****/
|
||||
|
@ -470,13 +470,13 @@ void Rec_ReceiveFormField (void)
|
|||
{
|
||||
sprintf (Gbl.Alert.Txt,Txt_The_record_field_X_already_exists,
|
||||
Gbl.CurrentCrs.Records.Field.Name);
|
||||
Lay_ShowAlert (Lay_ERROR,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_ERROR,Gbl.Alert.Txt);
|
||||
}
|
||||
else // Add the new field to the database
|
||||
Rec_CreateRecordField ();
|
||||
}
|
||||
else // If there is not name
|
||||
Lay_ShowAlert (Lay_ERROR,Txt_You_must_specify_the_name_of_the_new_record_field);
|
||||
Ale_ShowAlert (Ale_ERROR,Txt_You_must_specify_the_name_of_the_new_record_field);
|
||||
|
||||
/***** Show the form again *****/
|
||||
Rec_ReqEditRecordFields ();
|
||||
|
@ -574,7 +574,7 @@ void Rec_CreateRecordField (void)
|
|||
/***** Write message of success *****/
|
||||
sprintf (Gbl.Alert.Txt,Txt_Created_new_record_field_X,
|
||||
Gbl.CurrentCrs.Records.Field.Name);
|
||||
Lay_ShowAlert (Lay_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -645,15 +645,15 @@ void Rec_AskConfirmRemFieldWithRecords (unsigned NumRecords)
|
|||
Gbl.CurrentCrs.Records.Field.Name,Gbl.CurrentCrs.Crs.FullName);
|
||||
if (NumRecords == 1)
|
||||
Str_Concat (Gbl.Alert.Txt,Txt_this_field_is_filled_in_the_record_of_one_student,
|
||||
Lay_MAX_BYTES_ALERT);
|
||||
Ale_MAX_BYTES_ALERT);
|
||||
else
|
||||
{
|
||||
sprintf (Message_part2,Txt_this_field_is_filled_in_the_records_of_X_students,
|
||||
NumRecords);
|
||||
Str_Concat (Gbl.Alert.Txt,Message_part2,
|
||||
Lay_MAX_BYTES_ALERT);
|
||||
Ale_MAX_BYTES_ALERT);
|
||||
}
|
||||
Lay_ShowAlertAndButton (Lay_QUESTION,Gbl.Alert.Txt,
|
||||
Ale_ShowAlertAndButton (Ale_QUESTION,Gbl.Alert.Txt,
|
||||
ActRemFie,NULL,Rec_PutParamFielCod,
|
||||
Lay_REMOVE_BUTTON,Txt_Remove_record_field);
|
||||
|
||||
|
@ -689,7 +689,7 @@ void Rec_RemoveFieldFromDB (void)
|
|||
/***** Write message to show the change made *****/
|
||||
sprintf (Gbl.Alert.Txt,Txt_Record_field_X_removed,
|
||||
Gbl.CurrentCrs.Records.Field.Name);
|
||||
Lay_ShowAlert (Lay_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
|
||||
/***** Show the form again *****/
|
||||
Rec_ReqEditRecordFields ();
|
||||
|
@ -795,7 +795,7 @@ void Rec_RenameField (void)
|
|||
{
|
||||
sprintf (Gbl.Alert.Txt,Txt_You_can_not_leave_the_name_of_the_field_X_empty,
|
||||
Gbl.CurrentCrs.Records.Field.Name);
|
||||
Lay_ShowAlert (Lay_ERROR,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_ERROR,Gbl.Alert.Txt);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -808,7 +808,7 @@ void Rec_RenameField (void)
|
|||
{
|
||||
sprintf (Gbl.Alert.Txt,Txt_The_record_field_X_already_exists,
|
||||
NewFieldName);
|
||||
Lay_ShowAlert (Lay_ERROR,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_ERROR,Gbl.Alert.Txt);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -821,14 +821,14 @@ void Rec_RenameField (void)
|
|||
/***** Write message to show the change made *****/
|
||||
sprintf (Gbl.Alert.Txt,Txt_The_record_field_X_has_been_renamed_as_Y,
|
||||
Gbl.CurrentCrs.Records.Field.Name,NewFieldName);
|
||||
Lay_ShowAlert (Lay_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
}
|
||||
}
|
||||
else // The same name
|
||||
{
|
||||
sprintf (Gbl.Alert.Txt,Txt_The_name_of_the_field_X_has_not_changed,
|
||||
NewFieldName);
|
||||
Lay_ShowAlert (Lay_INFO,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_INFO,Gbl.Alert.Txt);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -870,7 +870,7 @@ void Rec_ChangeLinesField (void)
|
|||
{
|
||||
sprintf (Gbl.Alert.Txt,Txt_The_number_of_editing_lines_in_the_record_field_X_has_not_changed,
|
||||
Gbl.CurrentCrs.Records.Field.Name);
|
||||
Lay_ShowAlert (Lay_INFO,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_INFO,Gbl.Alert.Txt);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -883,7 +883,7 @@ void Rec_ChangeLinesField (void)
|
|||
/***** Write message to show the change made *****/
|
||||
sprintf (Gbl.Alert.Txt,Txt_From_now_on_the_number_of_editing_lines_of_the_field_X_is_Y,
|
||||
Gbl.CurrentCrs.Records.Field.Name,NewNumLines);
|
||||
Lay_ShowAlert (Lay_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
}
|
||||
|
||||
/***** Show the form again *****/
|
||||
|
@ -923,7 +923,7 @@ void Rec_ChangeVisibilityField (void)
|
|||
{
|
||||
sprintf (Gbl.Alert.Txt,Txt_The_visibility_of_the_record_field_X_has_not_changed,
|
||||
Gbl.CurrentCrs.Records.Field.Name);
|
||||
Lay_ShowAlert (Lay_INFO,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_INFO,Gbl.Alert.Txt);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -936,7 +936,7 @@ void Rec_ChangeVisibilityField (void)
|
|||
/***** Write message to show the change made *****/
|
||||
sprintf (Gbl.Alert.Txt,Txt_RECORD_FIELD_VISIBILITY_MSG[NewVisibility],
|
||||
Gbl.CurrentCrs.Records.Field.Name);
|
||||
Lay_ShowAlert (Lay_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
}
|
||||
|
||||
/***** Show the form again *****/
|
||||
|
@ -1011,7 +1011,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
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_You_must_select_one_ore_more_users);
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_You_must_select_one_ore_more_users);
|
||||
Usr_SeeGuests (); // ...show again the form
|
||||
return;
|
||||
}
|
||||
|
@ -1055,7 +1055,7 @@ static void Rec_ListRecordsGsts (Rec_SharedRecordViewType_t TypeOfView)
|
|||
|
||||
/* Show optional alert */
|
||||
if (UsrDat.UsrCod == Gbl.Usrs.Other.UsrDat.UsrCod) // Selected user
|
||||
Lay_ShowPendingAlert ();
|
||||
Ale_ShowPendingAlert ();
|
||||
|
||||
/* Shared record */
|
||||
fprintf (Gbl.F.Out,"<section class=\"REC_SHA\">");
|
||||
|
@ -1122,7 +1122,7 @@ static void Rec_ShowRecordOneStdCrs (void)
|
|||
fprintf (Gbl.F.Out,"</div>");
|
||||
|
||||
/***** Show optional alert (result of editing data in course record) *****/
|
||||
Lay_ShowPendingAlert ();
|
||||
Ale_ShowPendingAlert ();
|
||||
|
||||
/***** Start container for this user *****/
|
||||
fprintf (Gbl.F.Out,"<section class=\"REC_USR\">");
|
||||
|
@ -1198,7 +1198,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
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_You_must_select_one_ore_more_students);
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_You_must_select_one_ore_more_students);
|
||||
Usr_SeeStudents (); // ...show again the form
|
||||
return;
|
||||
}
|
||||
|
@ -1255,7 +1255,7 @@ static void Rec_ListRecordsStds (Rec_SharedRecordViewType_t ShaTypeOfView,
|
|||
|
||||
/* Show optional alert */
|
||||
if (UsrDat.UsrCod == Gbl.Usrs.Other.UsrDat.UsrCod) // Selected user
|
||||
Lay_ShowPendingAlert ();
|
||||
Ale_ShowPendingAlert ();
|
||||
|
||||
/* Shared record */
|
||||
fprintf (Gbl.F.Out,"<section class=\"REC_SHA\">");
|
||||
|
@ -1417,7 +1417,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
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_You_must_select_one_ore_more_teachers);
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_You_must_select_one_ore_more_teachers);
|
||||
Usr_SeeTeachers (); // ...show again the form
|
||||
return;
|
||||
}
|
||||
|
@ -1476,7 +1476,7 @@ static void Rec_ListRecordsTchs (Rec_SharedRecordViewType_t TypeOfView)
|
|||
|
||||
/* Show optional alert */
|
||||
if (UsrDat.UsrCod == Gbl.Usrs.Other.UsrDat.UsrCod) // Selected user
|
||||
Lay_ShowPendingAlert ();
|
||||
Ale_ShowPendingAlert ();
|
||||
|
||||
/* Shared record */
|
||||
fprintf (Gbl.F.Out,"<section class=\"REC_SHA\">");
|
||||
|
@ -1637,7 +1637,7 @@ void Rec_UpdateAndShowOtherCrsRecord (void)
|
|||
long OriginalActCod;
|
||||
|
||||
/***** Initialize alert type and message *****/
|
||||
Gbl.Alert.Type = Lay_NONE; // Do not show alert
|
||||
Gbl.Alert.Type = Ale_NONE; // Do not show alert
|
||||
|
||||
/***** Get where we came from *****/
|
||||
OriginalActCod = Par_GetParToLong ("OriginalActCod");
|
||||
|
@ -1658,7 +1658,7 @@ void Rec_UpdateAndShowOtherCrsRecord (void)
|
|||
|
||||
/***** Update the record *****/
|
||||
Rec_UpdateCrsRecord (Gbl.Usrs.Other.UsrDat.UsrCod);
|
||||
Gbl.Alert.Type = Lay_SUCCESS;
|
||||
Gbl.Alert.Type = Ale_SUCCESS;
|
||||
sprintf (Gbl.Alert.Txt,"%s",
|
||||
Txt_Student_record_card_in_this_course_has_been_updated);
|
||||
|
||||
|
@ -1996,7 +1996,7 @@ void Rec_RemoveFieldsCrsRecordInCrs (long UsrCod,struct Course *Crs,Cns_QuietOrV
|
|||
{
|
||||
sprintf (Gbl.Alert.Txt,Txt_User_record_card_in_the_course_X_has_been_removed,
|
||||
Crs->FullName);
|
||||
Lay_ShowAlert (Lay_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2015,7 +2015,7 @@ void Rec_RemoveFieldsCrsRecordAll (long UsrCod,Cns_QuietOrVerbose_t QuietOrVerbo
|
|||
|
||||
/***** Write mensaje *****/
|
||||
if (QuietOrVerbose == Cns_VERBOSE)
|
||||
Lay_ShowAlert (Lay_SUCCESS,Txt_User_record_cards_in_all_courses_have_been_removed);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Txt_User_record_cards_in_all_courses_have_been_removed);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -2027,7 +2027,7 @@ static void Rec_ShowMyCrsRecordUpdated (void)
|
|||
extern const char *Txt_Your_record_card_in_this_course_has_been_updated;
|
||||
|
||||
/***** Write mensaje of success *****/
|
||||
Lay_ShowAlert (Lay_SUCCESS,Txt_Your_record_card_in_this_course_has_been_updated);
|
||||
Ale_ShowAlert (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);
|
||||
|
@ -2102,12 +2102,12 @@ void Rec_ShowFormMySharedRecord (void)
|
|||
|
||||
/***** If user has no sex, name and surname... *****/
|
||||
if (Gbl.Usrs.Me.UsrDat.CtyCod < 0)
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_Please_fill_in_your_record_card_including_your_country_nationality);
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_Please_fill_in_your_record_card_including_your_country_nationality);
|
||||
else if (Gbl.Usrs.Me.UsrDat.Sex == Usr_SEX_UNKNOWN)
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_Please_fill_in_your_record_card_including_your_sex);
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_Please_fill_in_your_record_card_including_your_sex);
|
||||
else if (!Gbl.Usrs.Me.UsrDat.FirstName[0] ||
|
||||
!Gbl.Usrs.Me.UsrDat.Surname1[0])
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_Please_fill_in_your_record_card_including_your_name);
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_Please_fill_in_your_record_card_including_your_name);
|
||||
|
||||
/***** Contextual links *****/
|
||||
fprintf (Gbl.F.Out,"<div class=\"CONTEXT_MENU\">");
|
||||
|
@ -2146,7 +2146,7 @@ void Rec_ShowMySharedRecordUpd (void)
|
|||
extern const char *Txt_Your_personal_data_have_been_updated;
|
||||
|
||||
/***** Write alert *****/
|
||||
Lay_ShowAlert (Lay_SUCCESS,Txt_Your_personal_data_have_been_updated);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Txt_Your_personal_data_have_been_updated);
|
||||
|
||||
/***** Show my record for checking *****/
|
||||
Rec_ShowSharedUsrRecord (Rec_SHA_MY_RECORD_CHECK,&Gbl.Usrs.Me.UsrDat,NULL);
|
||||
|
@ -3858,13 +3858,13 @@ void Rec_ShowFormMyInsCtrDpt (void)
|
|||
|
||||
/***** If there is no country, institution, centre or department *****/
|
||||
if (Gbl.Usrs.Me.UsrDat.InsCtyCod < 0)
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_Please_select_the_country_of_your_institution);
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_Please_select_the_country_of_your_institution);
|
||||
else if (Gbl.Usrs.Me.UsrDat.InsCod < 0)
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_Please_fill_in_your_institution);
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_Please_fill_in_your_institution);
|
||||
else if ((Gbl.Usrs.Me.UsrDat.Roles & (1 << Rol_TEACHER)) &&
|
||||
(Gbl.Usrs.Me.UsrDat.Tch.CtrCod < 0 ||
|
||||
Gbl.Usrs.Me.UsrDat.Tch.DptCod < 0))
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_Please_fill_in_your_centre_and_department);
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_Please_fill_in_your_centre_and_department);
|
||||
|
||||
/***** Start table *****/
|
||||
Lay_StartRoundFrameTable ("800px",
|
||||
|
|
|
@ -644,7 +644,7 @@ static void Sch_SearchInDB (void)
|
|||
}
|
||||
|
||||
if (NumResults == 0)
|
||||
Lay_ShowAlert (Lay_INFO,Txt_No_results);
|
||||
Ale_ShowAlert (Ale_INFO,Txt_No_results);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -840,7 +840,7 @@ static unsigned Sch_SearchUsrsInDB (Rol_Role_t Role)
|
|||
// Too short
|
||||
if (!WarningMessageWritten) // To avoid repetitions
|
||||
{
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_The_search_text_must_be_longer);
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_The_search_text_must_be_longer);
|
||||
WarningMessageWritten = true;
|
||||
}
|
||||
|
||||
|
|
|
@ -1092,7 +1092,7 @@ static void Soc_ShowWarningYouDontFollowAnyUser (void)
|
|||
if (!Fol_GetNumFollowing (Gbl.Usrs.Me.UsrDat.UsrCod))
|
||||
{
|
||||
/***** Show warning if I do not follow anyone *****/
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_You_dont_follow_any_user);
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_You_dont_follow_any_user);
|
||||
|
||||
/***** Put link to show users to follow *****/
|
||||
fprintf (Gbl.F.Out,"<div class=\"CONTEXT_MENU\">");
|
||||
|
@ -1292,7 +1292,7 @@ static void Soc_WriteSocialNote (const struct SocialNote *SocNot,
|
|||
if (SocNot->NotCod <= 0 ||
|
||||
SocNot->NoteType == Soc_NOTE_UNKNOWN ||
|
||||
SocNot->UsrCod <= 0)
|
||||
Lay_ShowAlert (Lay_ERROR,"Error in social note.");
|
||||
Ale_ShowAlert (Ale_ERROR,"Error in social note.");
|
||||
else
|
||||
{
|
||||
/***** Initialize location in hierarchy *****/
|
||||
|
@ -2546,7 +2546,7 @@ static void Soc_WriteSocialComment (struct SocialComment *SocCom,
|
|||
if (SocCom->PubCod <= 0 ||
|
||||
SocCom->NotCod <= 0 ||
|
||||
SocCom->UsrCod <= 0)
|
||||
Lay_ShowAlert (Lay_ERROR,"Error in social comment.");
|
||||
Ale_ShowAlert (Ale_ERROR,"Error in social comment.");
|
||||
else
|
||||
{
|
||||
/***** Get author's data *****/
|
||||
|
@ -3048,7 +3048,7 @@ static long Soc_ReceiveComment (void)
|
|||
Img_ImageDestructor (&Image);
|
||||
}
|
||||
else
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_The_original_post_no_longer_exists);
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_The_original_post_no_longer_exists);
|
||||
|
||||
return SocNot.NotCod;
|
||||
}
|
||||
|
@ -3126,7 +3126,7 @@ static long Soc_ShareSocialNote (void)
|
|||
}
|
||||
}
|
||||
else
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_The_original_post_no_longer_exists);
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_The_original_post_no_longer_exists);
|
||||
|
||||
return SocNot.NotCod;
|
||||
}
|
||||
|
@ -3212,7 +3212,7 @@ static long Soc_FavSocialNote (void)
|
|||
}
|
||||
}
|
||||
else
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_The_original_post_no_longer_exists);
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_The_original_post_no_longer_exists);
|
||||
|
||||
return SocNot.NotCod;
|
||||
}
|
||||
|
@ -3298,7 +3298,7 @@ static long Soc_FavSocialComment (void)
|
|||
}
|
||||
}
|
||||
else
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_The_comment_no_longer_exists);
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_The_comment_no_longer_exists);
|
||||
|
||||
/***** Free image *****/
|
||||
Img_ImageDestructor (&SocCom.Image);
|
||||
|
@ -3424,7 +3424,7 @@ static long Soc_UnshareSocialNote (void)
|
|||
}
|
||||
}
|
||||
else
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_The_original_post_no_longer_exists);
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_The_original_post_no_longer_exists);
|
||||
|
||||
return SocNot.NotCod;
|
||||
}
|
||||
|
@ -3508,7 +3508,7 @@ static long Soc_UnfavSocialNote (void)
|
|||
}
|
||||
}
|
||||
else
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_The_original_post_no_longer_exists);
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_The_original_post_no_longer_exists);
|
||||
|
||||
return SocNot.NotCod;
|
||||
}
|
||||
|
@ -3592,7 +3592,7 @@ static long Soc_UnfavSocialComment (void)
|
|||
}
|
||||
}
|
||||
else
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_The_comment_no_longer_exists);
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_The_comment_no_longer_exists);
|
||||
|
||||
/***** Free image *****/
|
||||
Img_ImageDestructor (&SocCom.Image);
|
||||
|
@ -3652,7 +3652,7 @@ static void Soc_RequestRemovalSocialNote (void)
|
|||
{
|
||||
/***** Show question and button to remove social note *****/
|
||||
/* Start alert */
|
||||
Lay_ShowAlertAndButton1 (Lay_QUESTION,Txt_Do_you_really_want_to_remove_the_following_post);
|
||||
Ale_ShowAlertAndButton1 (Ale_QUESTION,Txt_Do_you_really_want_to_remove_the_following_post);
|
||||
|
||||
/* Show social note */
|
||||
Soc_WriteSocialNote (&SocNot,
|
||||
|
@ -3662,17 +3662,17 @@ static void Soc_RequestRemovalSocialNote (void)
|
|||
/* End alert */
|
||||
Gbl.Social.NotCod = SocNot.NotCod; // Social note to be removed
|
||||
if (Gbl.Usrs.Other.UsrDat.UsrCod > 0)
|
||||
Lay_ShowAlertAndButton2 (ActRemSocPubUsr,"timeline",
|
||||
Ale_ShowAlertAndButton2 (ActRemSocPubUsr,"timeline",
|
||||
Soc_PutParamsRemoveSocialNote,
|
||||
Lay_REMOVE_BUTTON,Txt_Remove);
|
||||
else
|
||||
Lay_ShowAlertAndButton2 (ActRemSocPubGbl,NULL,
|
||||
Ale_ShowAlertAndButton2 (ActRemSocPubGbl,NULL,
|
||||
Soc_PutParamsRemoveSocialNote,
|
||||
Lay_REMOVE_BUTTON,Txt_Remove);
|
||||
}
|
||||
}
|
||||
else
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_The_original_post_no_longer_exists);
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_The_original_post_no_longer_exists);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -3745,11 +3745,11 @@ static void Soc_RemoveSocialNote (void)
|
|||
Soc_RemoveASocialNoteFromDB (&SocNot);
|
||||
|
||||
/***** Message of success *****/
|
||||
Lay_ShowAlert (Lay_SUCCESS,Txt_Post_removed);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Txt_Post_removed);
|
||||
}
|
||||
}
|
||||
else
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_The_original_post_no_longer_exists);
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_The_original_post_no_longer_exists);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -3990,7 +3990,7 @@ static void Soc_RequestRemovalSocialComment (void)
|
|||
{
|
||||
/***** Show question and button to remove social comment *****/
|
||||
/* Start alert */
|
||||
Lay_ShowAlertAndButton1 (Lay_QUESTION,Txt_Do_you_really_want_to_remove_the_following_comment);
|
||||
Ale_ShowAlertAndButton1 (Ale_QUESTION,Txt_Do_you_really_want_to_remove_the_following_comment);
|
||||
|
||||
/* Show social comment */
|
||||
Soc_WriteSocialComment (&SocCom,
|
||||
|
@ -4000,17 +4000,17 @@ static void Soc_RequestRemovalSocialComment (void)
|
|||
/* End alert */
|
||||
Gbl.Social.PubCod = SocCom.PubCod; // Social publishing to be removed
|
||||
if (Gbl.Usrs.Other.UsrDat.UsrCod > 0)
|
||||
Lay_ShowAlertAndButton2 (ActRemSocComUsr,"timeline",
|
||||
Ale_ShowAlertAndButton2 (ActRemSocComUsr,"timeline",
|
||||
Soc_PutParamsRemoveSocialCommment,
|
||||
Lay_REMOVE_BUTTON,Txt_Remove);
|
||||
else
|
||||
Lay_ShowAlertAndButton2 (ActRemSocComGbl,NULL,
|
||||
Ale_ShowAlertAndButton2 (ActRemSocComGbl,NULL,
|
||||
Soc_PutParamsRemoveSocialCommment,
|
||||
Lay_REMOVE_BUTTON,Txt_Remove);
|
||||
}
|
||||
}
|
||||
else
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_The_comment_no_longer_exists);
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_The_comment_no_longer_exists);
|
||||
|
||||
/***** Free image *****/
|
||||
Img_ImageDestructor (&SocCom.Image);
|
||||
|
@ -4088,11 +4088,11 @@ static void Soc_RemoveSocialComment (void)
|
|||
Soc_RemoveASocialCommentFromDB (&SocCom);
|
||||
|
||||
/***** Message of success *****/
|
||||
Lay_ShowAlert (Lay_SUCCESS,Txt_Comment_removed);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Txt_Comment_removed);
|
||||
}
|
||||
}
|
||||
else
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_The_comment_no_longer_exists);
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_The_comment_no_longer_exists);
|
||||
|
||||
/***** Free image *****/
|
||||
Img_ImageDestructor (&SocCom.Image);
|
||||
|
|
|
@ -601,7 +601,7 @@ void Sta_AskShowCrsHits (void)
|
|||
}
|
||||
}
|
||||
else // No teachers nor students found
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_No_teachers_or_students_found);
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_No_teachers_or_students_found);
|
||||
|
||||
/***** End frame *****/
|
||||
Lay_EndRoundFrame ();
|
||||
|
@ -954,7 +954,7 @@ static void Sta_ShowHits (Sta_GlobalOrCourseAccesses_t GlobalOrCourse)
|
|||
(Gbl.Stat.CountType == Sta_DISTINCT_USRS ||
|
||||
Gbl.Stat.CountType == Sta_CLICKS_PER_USR))
|
||||
{
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_There_is_no_knowing_how_many_users_not_logged_have_accessed);
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_There_is_no_knowing_how_many_users_not_logged_have_accessed);
|
||||
Usr_UsrDataDestructor (&UsrDat);
|
||||
return;
|
||||
}
|
||||
|
@ -990,7 +990,7 @@ static void Sta_ShowHits (Sta_GlobalOrCourseAccesses_t GlobalOrCourse)
|
|||
/* Check the number of users whose clicks will be shown */
|
||||
if (!Usr_CountNumUsrsInListOfSelectedUsrs ()) // If there are no users selected...
|
||||
{ // ...write warning message and show the form again
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_You_must_select_one_ore_more_users);
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_You_must_select_one_ore_more_users);
|
||||
return;
|
||||
}
|
||||
break;
|
||||
|
@ -1014,7 +1014,7 @@ static void Sta_ShowHits (Sta_GlobalOrCourseAccesses_t GlobalOrCourse)
|
|||
{
|
||||
sprintf (Gbl.Alert.Txt,Txt_The_date_range_must_be_less_than_or_equal_to_X_days,
|
||||
Cfg_DAYS_IN_RECENT_LOG);
|
||||
Lay_ShowAlert (Lay_WARNING,Gbl.Alert.Txt); // ...write warning message and show the form again
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt); // ...write warning message and show the form again
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1428,7 +1428,7 @@ static void Sta_ShowHits (Sta_GlobalOrCourseAccesses_t GlobalOrCourse)
|
|||
|
||||
/***** Count the number of rows in result *****/
|
||||
if (NumRows == 0)
|
||||
Lay_ShowAlert (Lay_INFO,Txt_There_are_no_accesses_with_the_selected_search_criteria);
|
||||
Ale_ShowAlert (Ale_INFO,Txt_There_are_no_accesses_with_the_selected_search_criteria);
|
||||
else
|
||||
{
|
||||
/***** Put the table with the clicks *****/
|
||||
|
|
|
@ -944,7 +944,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)
|
||||
Lay_ShowAlert (Lay_ERROR,"Can not set locale to en_US.");
|
||||
Ale_ShowAlert (Ale_ERROR,"Can not set locale to en_US.");
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -956,7 +956,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)
|
||||
Lay_ShowAlert (Lay_ERROR,"Can not set locale to es_ES.");
|
||||
Ale_ShowAlert (Ale_ERROR,"Can not set locale to es_ES.");
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -2784,7 +2784,7 @@ bool Str_ConvertFilFolLnkNameToValid (char *FileName)
|
|||
if (NumAlfanum)
|
||||
FileNameIsOK = true;
|
||||
else
|
||||
snprintf (Gbl.Alert.Txt,Lay_MAX_BYTES_ALERT,
|
||||
snprintf (Gbl.Alert.Txt,Ale_MAX_BYTES_ALERT,
|
||||
Gbl.FileBrowser.UploadingWithDropzone ? Txt_UPLOAD_FILE_X_invalid_name_NO_HTML :
|
||||
Txt_UPLOAD_FILE_X_invalid_name,
|
||||
FileName);
|
||||
|
|
|
@ -267,7 +267,7 @@ static void Svy_ListAllSurveys (struct SurveyQuestion *SvyQst)
|
|||
Lay_EndTable ();
|
||||
}
|
||||
else // No surveys created
|
||||
Lay_ShowAlert (Lay_INFO,Txt_No_surveys);
|
||||
Ale_ShowAlert (Ale_INFO,Txt_No_surveys);
|
||||
|
||||
/***** Button to create a new survey *****/
|
||||
if (Svy_CheckIfICanCreateSvy ())
|
||||
|
@ -1481,7 +1481,7 @@ void Svy_AskRemSurvey (void)
|
|||
Gbl.Svys.SvyCodToEdit = Svy.SvyCod;
|
||||
sprintf (Gbl.Alert.Txt,Txt_Do_you_really_want_to_remove_the_survey_X,
|
||||
Svy.Title);
|
||||
Lay_ShowAlertAndButton (Lay_QUESTION,Gbl.Alert.Txt,
|
||||
Ale_ShowAlertAndButton (Ale_QUESTION,Gbl.Alert.Txt,
|
||||
ActRemSvy,NULL,Svy_PutParams,
|
||||
Lay_REMOVE_BUTTON,Txt_Remove_survey);
|
||||
|
||||
|
@ -1541,7 +1541,7 @@ void Svy_RemoveSurvey (void)
|
|||
/***** Write message to show the change made *****/
|
||||
sprintf (Gbl.Alert.Txt,Txt_Survey_X_removed,
|
||||
Svy.Title);
|
||||
Lay_ShowAlert (Lay_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
|
||||
/***** Show surveys again *****/
|
||||
Svy_ListAllSurveys (&SvyQst);
|
||||
|
@ -1574,7 +1574,7 @@ void Svy_AskResetSurvey (void)
|
|||
/***** Ask for confirmation of reset *****/
|
||||
sprintf (Gbl.Alert.Txt,Txt_Do_you_really_want_to_reset_the_survey_X,
|
||||
Svy.Title);
|
||||
Lay_ShowAlert (Lay_WARNING,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
|
||||
/***** Button of confirmation of reset *****/
|
||||
Gbl.Svys.SvyCodToEdit = Svy.SvyCod;
|
||||
|
@ -1633,7 +1633,7 @@ void Svy_ResetSurvey (void)
|
|||
/***** Write message to show the change made *****/
|
||||
sprintf (Gbl.Alert.Txt,Txt_Survey_X_reset,
|
||||
Svy.Title);
|
||||
Lay_ShowAlert (Lay_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
|
||||
/***** Show surveys again *****/
|
||||
Svy_ListAllSurveys (&SvyQst);
|
||||
|
@ -1667,7 +1667,7 @@ void Svy_HideSurvey (void)
|
|||
/***** Write message to show the change made *****/
|
||||
sprintf (Gbl.Alert.Txt,Txt_Survey_X_is_now_hidden,
|
||||
Svy.Title);
|
||||
Lay_ShowAlert (Lay_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
|
||||
/***** Show surveys again *****/
|
||||
Svy_ListAllSurveys (&SvyQst);
|
||||
|
@ -1701,7 +1701,7 @@ void Svy_UnhideSurvey (void)
|
|||
/***** Write message to show the change made *****/
|
||||
sprintf (Gbl.Alert.Txt,Txt_Survey_X_is_now_visible,
|
||||
Svy.Title);
|
||||
Lay_ShowAlert (Lay_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
|
||||
/***** Show surveys again *****/
|
||||
Svy_ListAllSurveys (&SvyQst);
|
||||
|
@ -2140,13 +2140,13 @@ void Svy_RecFormSurvey (void)
|
|||
NewSurveyIsCorrect = false;
|
||||
sprintf (Gbl.Alert.Txt,Txt_Already_existed_a_survey_with_the_title_X,
|
||||
NewSvy.Title);
|
||||
Lay_ShowAlert (Lay_WARNING,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
}
|
||||
}
|
||||
else // If there is not a survey title
|
||||
{
|
||||
NewSurveyIsCorrect = false;
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_You_must_specify_the_title_of_the_survey);
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_You_must_specify_the_title_of_the_survey);
|
||||
}
|
||||
|
||||
/***** Create a new survey or update an existing one *****/
|
||||
|
@ -2229,7 +2229,7 @@ static void Svy_CreateSurvey (struct Survey *Svy,const char *Txt)
|
|||
/***** Write success message *****/
|
||||
sprintf (Gbl.Alert.Txt,Txt_Created_new_survey_X,
|
||||
Svy->Title);
|
||||
Lay_ShowAlert (Lay_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -2269,7 +2269,7 @@ static void Svy_UpdateSurvey (struct Survey *Svy,const char *Txt)
|
|||
Svy_CreateGrps (Svy->SvyCod);
|
||||
|
||||
/***** Write success message *****/
|
||||
Lay_ShowAlert (Lay_SUCCESS,Txt_The_survey_has_been_modified);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Txt_The_survey_has_been_modified);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -2843,7 +2843,7 @@ static unsigned Svy_GetAnswersQst (long QstCod,MYSQL_RES **mysql_res)
|
|||
|
||||
/***** Count number of rows of result *****/
|
||||
if (NumRows == 0)
|
||||
Lay_ShowAlert (Lay_ERROR,"Error when getting answers of a question.");
|
||||
Ale_ShowAlert (Ale_ERROR,"Error when getting answers of a question.");
|
||||
|
||||
return (unsigned) NumRows;
|
||||
}
|
||||
|
@ -2954,7 +2954,7 @@ void Svy_ReceiveQst (void)
|
|||
{
|
||||
if (ThereIsEndOfAnswers)
|
||||
{
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_You_can_not_leave_empty_intermediate_answers);
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_You_can_not_leave_empty_intermediate_answers);
|
||||
Error = true;
|
||||
}
|
||||
else
|
||||
|
@ -2966,20 +2966,20 @@ void Svy_ReceiveQst (void)
|
|||
{
|
||||
if (NumLastAns < 1)
|
||||
{
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_You_must_type_at_least_the_first_two_answers);
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_You_must_type_at_least_the_first_two_answers);
|
||||
Error = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
else // If first answer is empty
|
||||
{
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_You_must_type_at_least_the_first_two_answers);
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_You_must_type_at_least_the_first_two_answers);
|
||||
Error = true;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_You_must_type_the_stem_of_the_question);
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_You_must_type_the_stem_of_the_question);
|
||||
Error = true;
|
||||
}
|
||||
|
||||
|
@ -3048,7 +3048,7 @@ void Svy_ReceiveQst (void)
|
|||
}
|
||||
|
||||
/***** List the questions of this survey, including the new one just inserted into the database *****/
|
||||
Lay_ShowAlert (Lay_SUCCESS,Txt_The_survey_has_been_modified);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Txt_The_survey_has_been_modified);
|
||||
}
|
||||
|
||||
/***** Free answers *****/
|
||||
|
@ -3266,7 +3266,7 @@ static void Svy_ListSvyQuestions (struct Survey *Svy,struct SurveyQuestion *SvyQ
|
|||
}
|
||||
}
|
||||
else // This survey has no questions
|
||||
Lay_ShowAlert (Lay_INFO,Txt_This_survey_has_no_questions);
|
||||
Ale_ShowAlert (Ale_INFO,Txt_This_survey_has_no_questions);
|
||||
|
||||
if (Svy->Status.ICanEdit && // I can edit
|
||||
(!NumQsts || // This survey has no questions
|
||||
|
@ -3517,7 +3517,7 @@ void Svy_RequestRemoveQst (void)
|
|||
Gbl.Svys.SvyQstCodToEdit = SvyQst.QstCod;
|
||||
sprintf (Gbl.Alert.Txt,Txt_Do_you_really_want_to_remove_the_question_X,
|
||||
(unsigned long) (SvyQst.QstInd + 1));
|
||||
Lay_ShowAlertAndButton (Lay_QUESTION,Gbl.Alert.Txt,
|
||||
Ale_ShowAlertAndButton (Ale_QUESTION,Gbl.Alert.Txt,
|
||||
ActRemSvyQst,NULL,Svy_PutParamsRemoveOneQst,
|
||||
Lay_REMOVE_BUTTON,Txt_Remove_question);
|
||||
|
||||
|
@ -3567,7 +3567,7 @@ void Svy_RemoveQst (void)
|
|||
|
||||
/***** Write message *****/
|
||||
sprintf (Gbl.Alert.Txt,"%s",Txt_Question_removed);
|
||||
Lay_ShowAlert (Lay_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
|
||||
/***** Show current survey *****/
|
||||
Svy_ShowOneSurvey (SvyCod,&SvyQst,true);
|
||||
|
@ -3593,12 +3593,12 @@ void Svy_ReceiveSurveyAnswers (void)
|
|||
|
||||
/***** Check if I have no answered this survey formerly *****/
|
||||
if (Svy.Status.IHaveAnswered)
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_You_already_answered_this_survey_before);
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_You_already_answered_this_survey_before);
|
||||
else
|
||||
{
|
||||
/***** Receive and store user's answers *****/
|
||||
Svy_ReceiveAndStoreUserAnswersToASurvey (Svy.SvyCod);
|
||||
Lay_ShowAlert (Lay_INFO,Txt_Thanks_for_answering_the_survey);
|
||||
Ale_ShowAlert (Ale_INFO,Txt_Thanks_for_answering_the_survey);
|
||||
}
|
||||
|
||||
/***** Show current survey *****/
|
||||
|
|
78
swad_test.c
78
swad_test.c
|
@ -364,7 +364,7 @@ void Tst_ShowFormAskTst (void)
|
|||
else
|
||||
{
|
||||
/***** Warning message *****/
|
||||
Lay_ShowAlert (Lay_INFO,Txt_No_test_questions);
|
||||
Ale_ShowAlert (Ale_INFO,Txt_No_test_questions);
|
||||
|
||||
/***** Button to create a new question *****/
|
||||
if (Tst_CheckIfICanEditTests ())
|
||||
|
@ -421,7 +421,7 @@ void Tst_ShowNewTest (void)
|
|||
/***** Get questions *****/
|
||||
if ((NumRows = Tst_GetQuestionsForTest (&mysql_res)) == 0) // Query database
|
||||
{
|
||||
Lay_ShowAlert (Lay_INFO,Txt_No_questions_found_matching_your_search_criteria);
|
||||
Ale_ShowAlert (Ale_INFO,Txt_No_questions_found_matching_your_search_criteria);
|
||||
Tst_ShowFormAskTst (); // Show the form again
|
||||
}
|
||||
else
|
||||
|
@ -566,12 +566,12 @@ void Tst_AssessTest (void)
|
|||
case Tst_STATUS_ASSESSED:
|
||||
sprintf (Gbl.Alert.Txt,Txt_The_test_X_has_already_been_assessed_previously,
|
||||
NumTst);
|
||||
Lay_ShowAlert (Lay_WARNING,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
break;
|
||||
case Tst_STATUS_ERROR:
|
||||
sprintf (Gbl.Alert.Txt,Txt_There_was_an_error_in_assessing_the_test_X,
|
||||
NumTst);
|
||||
Lay_ShowAlert (Lay_WARNING,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -686,7 +686,7 @@ static bool Tst_CheckIfNextTstAllowed (void)
|
|||
Txt_You_can_not_take_a_new_test_until,
|
||||
(long) TimeNextTestUTC,
|
||||
(unsigned) Gbl.Prefs.DateFormat,Txt_Today);
|
||||
Lay_ShowAlert (Lay_WARNING,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
@ -1302,7 +1302,7 @@ void Tst_ShowFormAskEditTsts (void)
|
|||
else // No test questions
|
||||
{
|
||||
/***** Warning message *****/
|
||||
Lay_ShowAlert (Lay_INFO,Txt_No_test_questions);
|
||||
Ale_ShowAlert (Ale_INFO,Txt_No_test_questions);
|
||||
|
||||
/***** Button to create a new question *****/
|
||||
Tst_PutButtonToAddQuestion ();
|
||||
|
@ -1383,7 +1383,7 @@ void Tst_ShowFormConfig (void)
|
|||
|
||||
/***** If current course has tests and pluggable is unknown... *****/
|
||||
if (Tst_CheckIfCourseHaveTestsAndPluggableIsUnknown ())
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_Please_specify_if_you_allow_access_to_test_questions_from_mobile_applications);
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_Please_specify_if_you_allow_access_to_test_questions_from_mobile_applications);
|
||||
|
||||
/***** Form to configure test *****/
|
||||
Tst_ShowFormConfigTst ();
|
||||
|
@ -1462,7 +1462,7 @@ void Tst_RenameTag (void)
|
|||
{
|
||||
sprintf (Gbl.Alert.Txt,Txt_You_can_not_leave_the_name_of_the_tag_X_empty,
|
||||
OldTagTxt);
|
||||
Lay_ShowAlert (Lay_WARNING,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
}
|
||||
else // New tag not empty
|
||||
{
|
||||
|
@ -1474,7 +1474,7 @@ void Tst_RenameTag (void)
|
|||
{
|
||||
sprintf (Gbl.Alert.Txt,Txt_The_tag_X_has_not_changed,
|
||||
NewTagTxt);
|
||||
Lay_ShowAlert (Lay_INFO,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_INFO,Gbl.Alert.Txt);
|
||||
}
|
||||
else // The old and the new tag
|
||||
// are not exactly the same (case sensitively).
|
||||
|
@ -1558,7 +1558,7 @@ void Tst_RenameTag (void)
|
|||
/***** Write message to show the change made *****/
|
||||
sprintf (Gbl.Alert.Txt,Txt_The_tag_X_has_been_renamed_as_Y,
|
||||
OldTagTxt,NewTagTxt);
|
||||
Lay_ShowAlert (Lay_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1765,7 +1765,7 @@ static void Tst_ShowFormEditTags (void)
|
|||
Lay_EndRoundFrameTable ();
|
||||
}
|
||||
else
|
||||
Lay_ShowAlert (Lay_INFO,Txt_No_test_questions);
|
||||
Ale_ShowAlert (Ale_INFO,Txt_No_test_questions);
|
||||
|
||||
/* Free structure that stores the query result */
|
||||
DB_FreeMySQLResult (&mysql_res);
|
||||
|
@ -2171,7 +2171,7 @@ void Tst_ReceiveConfigTst (void)
|
|||
DB_QueryREPLACE (Query,"can not save configuration of tests");
|
||||
|
||||
/***** Show confirmation message *****/
|
||||
Lay_ShowAlert (Lay_SUCCESS,Txt_The_test_configuration_has_been_updated);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Txt_The_test_configuration_has_been_updated);
|
||||
|
||||
/***** Show again the form to configure test *****/
|
||||
Tst_ShowFormConfig ();
|
||||
|
@ -2510,7 +2510,7 @@ static unsigned long Tst_GetQuestionsForEdit (MYSQL_RES **mysql_res)
|
|||
NumRows = DB_QuerySELECT (Query,mysql_res,"can not get questions");
|
||||
|
||||
if (NumRows == 0)
|
||||
Lay_ShowAlert (Lay_INFO,Txt_No_questions_found_matching_your_search_criteria);
|
||||
Ale_ShowAlert (Ale_INFO,Txt_No_questions_found_matching_your_search_criteria);
|
||||
|
||||
return NumRows;
|
||||
}
|
||||
|
@ -3014,7 +3014,7 @@ unsigned Tst_GetAnswersQst (long QstCod,MYSQL_RES **mysql_res,bool Shuffle)
|
|||
Shuffle ? "RAND(NOW())" :
|
||||
"AnsInd");
|
||||
if (!(NumRows = DB_QuerySELECT (Query,mysql_res,"can not get answers of a question")))
|
||||
Lay_ShowAlert (Lay_ERROR,"Error when getting answers of a question.");
|
||||
Ale_ShowAlert (Ale_ERROR,"Error when getting answers of a question.");
|
||||
|
||||
return (unsigned) NumRows;
|
||||
}
|
||||
|
@ -4296,7 +4296,7 @@ static bool Tst_GetParamsTst (void)
|
|||
/* Check number of tags selected */
|
||||
if (Tst_CountNumTagsInList () == 0) // If no tags selected...
|
||||
{ // ...write alert
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_You_must_select_one_ore_more_tags);
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_You_must_select_one_ore_more_tags);
|
||||
Error = true;
|
||||
}
|
||||
|
||||
|
@ -4310,7 +4310,7 @@ static bool Tst_GetParamsTst (void)
|
|||
/* Check number of types of answer */
|
||||
if (Tst_CountNumAnswerTypesInList () == 0) // If no types of answer selected...
|
||||
{ // ...write warning alert
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_You_must_select_one_ore_more_types_of_answer);
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_You_must_select_one_ore_more_types_of_answer);
|
||||
Error = true;
|
||||
}
|
||||
|
||||
|
@ -4323,7 +4323,7 @@ static bool Tst_GetParamsTst (void)
|
|||
{
|
||||
sprintf (Gbl.Alert.Txt,Txt_The_number_of_questions_must_be_in_the_interval_X,
|
||||
Gbl.Test.Config.Min,Gbl.Test.Config.Max);
|
||||
Lay_ShowAlert (Lay_WARNING,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
Error = true;
|
||||
}
|
||||
}
|
||||
|
@ -5507,7 +5507,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)
|
||||
{
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_Error_receiving_or_processing_image);
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_Error_receiving_or_processing_image);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -5517,14 +5517,14 @@ bool Tst_CheckIfQstFormatIsCorrectAndCountNumOptions (void)
|
|||
/***** A question must have at least one tag *****/
|
||||
if (!Gbl.Test.Tags.Num) // There are no tags with text
|
||||
{
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_You_must_type_at_least_one_tag_for_the_question);
|
||||
Ale_ShowAlert (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)
|
||||
{
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_You_must_type_the_stem_of_the_question);
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_You_must_type_the_stem_of_the_question);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -5534,12 +5534,12 @@ bool Tst_CheckIfQstFormatIsCorrectAndCountNumOptions (void)
|
|||
case Tst_ANS_INT:
|
||||
if (!Gbl.Test.Answer.Options[0].Text)
|
||||
{
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_You_must_enter_an_integer_value_as_the_correct_answer);
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_You_must_enter_an_integer_value_as_the_correct_answer);
|
||||
return false;
|
||||
}
|
||||
if (!Gbl.Test.Answer.Options[0].Text[0])
|
||||
{
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_You_must_enter_an_integer_value_as_the_correct_answer);
|
||||
Ale_ShowAlert (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);
|
||||
|
@ -5549,13 +5549,13 @@ bool Tst_CheckIfQstFormatIsCorrectAndCountNumOptions (void)
|
|||
if (!Gbl.Test.Answer.Options[0].Text ||
|
||||
!Gbl.Test.Answer.Options[1].Text)
|
||||
{
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_You_must_enter_the_range_of_floating_point_values_allowed_as_answer);
|
||||
Ale_ShowAlert (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])
|
||||
{
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_You_must_enter_the_range_of_floating_point_values_allowed_as_answer);
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_You_must_enter_the_range_of_floating_point_values_allowed_as_answer);
|
||||
return false;
|
||||
}
|
||||
for (i = 0;
|
||||
|
@ -5565,7 +5565,7 @@ bool Tst_CheckIfQstFormatIsCorrectAndCountNumOptions (void)
|
|||
if (Gbl.Test.Answer.FloatingPoint[0] >
|
||||
Gbl.Test.Answer.FloatingPoint[1])
|
||||
{
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_The_lower_limit_of_correct_answers_must_be_less_than_or_equal_to_the_upper_limit);
|
||||
Ale_ShowAlert (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;
|
||||
|
@ -5574,7 +5574,7 @@ bool Tst_CheckIfQstFormatIsCorrectAndCountNumOptions (void)
|
|||
if (Gbl.Test.Answer.TF != 'T' &&
|
||||
Gbl.Test.Answer.TF != 'F')
|
||||
{
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_You_must_select_a_T_F_answer);
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_You_must_select_a_T_F_answer);
|
||||
return false;
|
||||
}
|
||||
Gbl.Test.Answer.NumOptions = 1;
|
||||
|
@ -5583,12 +5583,12 @@ bool Tst_CheckIfQstFormatIsCorrectAndCountNumOptions (void)
|
|||
case Tst_ANS_MULTIPLE_CHOICE:
|
||||
if (!Gbl.Test.Answer.Options[0].Text) // If the first answer is empty
|
||||
{
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_You_must_type_at_least_the_first_two_answers);
|
||||
Ale_ShowAlert (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
|
||||
{
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_You_must_type_at_least_the_first_two_answers);
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_You_must_type_at_least_the_first_two_answers);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -5601,7 +5601,7 @@ bool Tst_CheckIfQstFormatIsCorrectAndCountNumOptions (void)
|
|||
{
|
||||
if (ThereIsEndOfAnswers)
|
||||
{
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_You_can_not_leave_empty_intermediate_answers);
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_You_can_not_leave_empty_intermediate_answers);
|
||||
return false;
|
||||
}
|
||||
NumLastOpt = NumOpt;
|
||||
|
@ -5615,7 +5615,7 @@ bool Tst_CheckIfQstFormatIsCorrectAndCountNumOptions (void)
|
|||
|
||||
if (NumLastOpt < 1)
|
||||
{
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_You_must_type_at_least_the_first_two_answers);
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_You_must_type_at_least_the_first_two_answers);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -5626,19 +5626,19 @@ bool Tst_CheckIfQstFormatIsCorrectAndCountNumOptions (void)
|
|||
break;
|
||||
if (NumOpt > NumLastOpt)
|
||||
{
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_You_must_mark_an_answer_as_correct);
|
||||
Ale_ShowAlert (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
|
||||
{
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_You_must_type_at_least_the_first_two_answers);
|
||||
Ale_ShowAlert (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
|
||||
{
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_You_must_type_at_least_the_first_answer);
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_You_must_type_at_least_the_first_answer);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -5651,7 +5651,7 @@ bool Tst_CheckIfQstFormatIsCorrectAndCountNumOptions (void)
|
|||
{
|
||||
if (ThereIsEndOfAnswers)
|
||||
{
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_You_can_not_leave_empty_intermediate_answers);
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_You_can_not_leave_empty_intermediate_answers);
|
||||
return false;
|
||||
}
|
||||
Gbl.Test.Answer.NumOptions++;
|
||||
|
@ -5876,13 +5876,13 @@ void Tst_RequestRemoveQst (void)
|
|||
sprintf (Gbl.Alert.Txt,Txt_Do_you_really_want_to_remove_the_question_X,
|
||||
(unsigned long) Gbl.Test.QstCod);
|
||||
if (EditingOnlyThisQst)
|
||||
Lay_ShowAlertAndButton (Lay_QUESTION,Gbl.Alert.Txt,
|
||||
Ale_ShowAlertAndButton (Ale_QUESTION,Gbl.Alert.Txt,
|
||||
ActRemTstQst,NULL,
|
||||
Tst_PutParamsRemoveOneQst,
|
||||
Lay_REMOVE_BUTTON,Txt_Remove_question);
|
||||
else
|
||||
{
|
||||
Lay_ShowAlertAndButton (Lay_QUESTION,Gbl.Alert.Txt,
|
||||
Ale_ShowAlertAndButton (Ale_QUESTION,Gbl.Alert.Txt,
|
||||
ActRemTstQst,NULL,
|
||||
Tst_PutParamsRemoveQst,
|
||||
Lay_REMOVE_BUTTON,Txt_Remove_question);
|
||||
|
@ -5956,7 +5956,7 @@ void Tst_RemoveQst (void)
|
|||
Lay_ShowErrorAndExit ("The question to be removed does not exist or belongs to another course.");
|
||||
|
||||
/***** Write message *****/
|
||||
Lay_ShowAlert (Lay_SUCCESS,Txt_Question_removed);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Txt_Question_removed);
|
||||
|
||||
/***** Continue editing questions *****/
|
||||
if (!EditingOnlyThisQst)
|
||||
|
@ -6000,7 +6000,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);
|
||||
Lay_ShowAlert (Lay_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
|
||||
/***** Continue editing questions *****/
|
||||
if (EditingOnlyThisQst)
|
||||
|
@ -7147,7 +7147,7 @@ void Tst_ShowUsrsTestResults (void)
|
|||
else // If no users are selected...
|
||||
{
|
||||
// ...write warning alert
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_You_must_select_one_ore_more_users);
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_You_must_select_one_ore_more_users);
|
||||
// ...and show again the form
|
||||
Tst_SelUsrsToSeeUsrsTestResults ();
|
||||
}
|
||||
|
|
|
@ -138,7 +138,7 @@ void TsI_ShowFormImportQstsFromXML (void)
|
|||
Lay_StartRoundFrame (NULL,Txt_Import_questions,NULL,Hlp_ASSESSMENT_Tests);
|
||||
|
||||
/***** Write help message *****/
|
||||
Lay_ShowAlert (Lay_INFO,Txt_You_need_an_XML_file_containing_a_list_of_questions);
|
||||
Ale_ShowAlert (Ale_INFO,Txt_You_need_an_XML_file_containing_a_list_of_questions);
|
||||
|
||||
/***** Write a form to import questions *****/
|
||||
Act_FormStart (ActImpTstQst);
|
||||
|
@ -426,7 +426,7 @@ void TsI_ImportQstsFromXML (void)
|
|||
if (WrongType)
|
||||
{
|
||||
sprintf (Gbl.Alert.Txt,Txt_The_file_is_not_X,"xml");
|
||||
Lay_ShowAlert (Lay_WARNING,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -436,7 +436,7 @@ void TsI_ImportQstsFromXML (void)
|
|||
/***** Get questions from XML file and store them in database *****/
|
||||
TsI_ReadQuestionsFromXMLFileAndStoreInDB (FileNameXMLTmp);
|
||||
else
|
||||
Lay_ShowAlert (Lay_WARNING,"Error copying file.");
|
||||
Ale_ShowAlert (Ale_WARNING,"Error copying file.");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -669,7 +669,7 @@ static void TsI_ImportQuestionsFromXMLBuffer (const char *XMLBuffer)
|
|||
Lay_EndTable ();
|
||||
}
|
||||
else // TestElem not found
|
||||
Lay_ShowAlert (Lay_ERROR,"Root element <test> not found.");
|
||||
Ale_ShowAlert (Ale_ERROR,"Root element <test> not found.");
|
||||
|
||||
/***** End table *****/
|
||||
Lay_EndRoundFrame ();
|
||||
|
|
|
@ -545,7 +545,7 @@ void TT_ShowTimeTable (long UsrCod)
|
|||
if (Gbl.TimeTable.Config.HoursPerDay)
|
||||
TT_DrawTimeTable ();
|
||||
else
|
||||
Lay_ShowAlert (Lay_INFO,Txt_The_timetable_is_empty);
|
||||
Ale_ShowAlert (Ale_INFO,Txt_The_timetable_is_empty);
|
||||
|
||||
/***** Free internal timetable in memory *****/
|
||||
TT_FreeTimeTable ();
|
||||
|
@ -1026,7 +1026,7 @@ static void TT_FillTimeTableFromDB (long UsrCod)
|
|||
DB_FreeMySQLResult (&mysql_res);
|
||||
|
||||
if (TimeTableIsIncomplete)
|
||||
Lay_ShowAlert (Lay_INFO,Txt_Incomplete_timetable_for_lack_of_space);
|
||||
Ale_ShowAlert (Ale_INFO,Txt_Incomplete_timetable_for_lack_of_space);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
38
swad_user.c
38
swad_user.c
|
@ -225,12 +225,12 @@ void Usr_InformAboutNumClicksBeforePhoto (void)
|
|||
if (Gbl.Usrs.Me.NumAccWithoutPhoto)
|
||||
{
|
||||
if (Gbl.Usrs.Me.NumAccWithoutPhoto >= Pho_MAX_CLICKS_WITHOUT_PHOTO)
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_You_must_send_your_photo_because_);
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_You_must_send_your_photo_because_);
|
||||
else if (Act_Actions[Gbl.Action.Act].BrowserWindow == Act_THIS_WINDOW)
|
||||
{
|
||||
sprintf (Message,Txt_You_can_only_perform_X_further_actions_,
|
||||
Pho_MAX_CLICKS_WITHOUT_PHOTO-Gbl.Usrs.Me.NumAccWithoutPhoto);
|
||||
Lay_ShowAlert (Lay_WARNING,Message);
|
||||
Ale_ShowAlert (Ale_WARNING,Message);
|
||||
|
||||
fprintf (Gbl.F.Out,"<div class=\"CENTER_MIDDLE\">");
|
||||
Pho_PutLinkToChangeMyPhoto ();
|
||||
|
@ -1979,7 +1979,7 @@ void Usr_Logout (void)
|
|||
extern const char *Txt_The_session_has_been_closed;
|
||||
|
||||
/***** Confirmation message *****/
|
||||
Lay_ShowAlert (Lay_INFO,Txt_The_session_has_been_closed);
|
||||
Ale_ShowAlert (Ale_INFO,Txt_The_session_has_been_closed);
|
||||
|
||||
/***** Form to log in *****/
|
||||
Usr_WriteFormLogin (ActLogIn,NULL);
|
||||
|
@ -2118,10 +2118,10 @@ void Usr_WelcomeUsr (void)
|
|||
if (!CongratulateMyBirthday)
|
||||
sprintf (Gbl.Alert.Txt,Txt_Welcome_X[Gbl.Usrs.Me.UsrDat.Sex],
|
||||
Gbl.Usrs.Me.UsrDat.FirstName);
|
||||
Lay_ShowAlert (Lay_INFO,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_INFO,Gbl.Alert.Txt);
|
||||
}
|
||||
else
|
||||
Lay_ShowAlert (Lay_INFO,Txt_Welcome[Gbl.Usrs.Me.UsrDat.Sex]);
|
||||
Ale_ShowAlert (Ale_INFO,Txt_Welcome[Gbl.Usrs.Me.UsrDat.Sex]);
|
||||
|
||||
/***** Warning to confirm my email address *****/
|
||||
if (Gbl.Usrs.Me.UsrDat.Email[0] &&
|
||||
|
@ -2139,7 +2139,7 @@ void Usr_WelcomeUsr (void)
|
|||
else
|
||||
/* The current language is not my preferred language
|
||||
==> change automatically to my language */
|
||||
Lay_ShowAlert (Lay_INFO,Txt_Switching_to_LANGUAGE[Gbl.Usrs.Me.UsrDat.Prefs.Language]);
|
||||
Ale_ShowAlert (Ale_INFO,Txt_Switching_to_LANGUAGE[Gbl.Usrs.Me.UsrDat.Prefs.Language]);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2389,7 +2389,7 @@ unsigned Usr_GetParamOtherUsrIDNickOrEMailAndGetUsrCods (struct ListUsrCods *Lis
|
|||
/***** String is not a valid user's nickname, email or ID *****/
|
||||
sprintf (Gbl.Alert.Txt,Txt_The_ID_nickname_or_email_X_is_not_valid,
|
||||
Gbl.Usrs.Other.UsrDat.UsrIDNickOrEmail);
|
||||
Lay_ShowAlert (Lay_WARNING,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
}
|
||||
|
||||
return ListUsrCods->NumUsrs;
|
||||
|
@ -2492,7 +2492,7 @@ void Usr_ChkUsrAndGetUsrData (void)
|
|||
{
|
||||
Gbl.Action.Act = ActLogOut;
|
||||
Tab_SetCurrentTab ();
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_The_session_has_expired_due_to_inactivity);
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_The_session_has_expired_due_to_inactivity);
|
||||
FormLogin.PutForm = true;
|
||||
}
|
||||
}
|
||||
|
@ -2806,7 +2806,7 @@ static void Usr_ShowAlertUsrDoesNotExistsOrWrongPassword (void)
|
|||
|
||||
// Gbl.Action.Act = ActFrmLogIn;
|
||||
// Tab_SetCurrentTab ();
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_The_user_does_not_exist_or_password_is_incorrect);
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_The_user_does_not_exist_or_password_is_incorrect);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -2821,7 +2821,7 @@ static void Usr_ShowAlertThereAreMoreThanOneUsr (void)
|
|||
Tab_SetCurrentTab ();
|
||||
sprintf (Gbl.Alert.Txt,Txt_There_are_more_than_one_user_with_the_ID_X_Please_type_a_nick_or_email,
|
||||
Gbl.Usrs.Me.UsrIdLogin);
|
||||
Lay_ShowAlert (Lay_WARNING,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -3020,7 +3020,7 @@ void Usr_ShowFormsLogoutAndRole (void)
|
|||
sprintf (Gbl.Alert.Txt,Txt_You_are_now_LOGGED_IN_as_X,
|
||||
Txt_logged[Gbl.Usrs.Me.UsrDat.Sex],
|
||||
Txt_ROLES_SINGUL_abc[Gbl.Usrs.Me.LoggedRole][Gbl.Usrs.Me.UsrDat.Sex]);
|
||||
Lay_ShowAlert (Lay_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
}
|
||||
|
||||
/***** Start frame *****/
|
||||
|
@ -5109,7 +5109,7 @@ static void Usr_ShowWarningListIsTooBig (unsigned NumUsrs)
|
|||
|
||||
sprintf (Gbl.Alert.Txt,Txt_The_list_of_X_users_is_too_large_to_be_displayed,
|
||||
NumUsrs);
|
||||
Lay_ShowAlert (Lay_WARNING,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -5257,7 +5257,7 @@ bool Usr_GetListMsgRecipientsWrittenExplicitelyBySender (bool WriteErrorMsgs)
|
|||
{
|
||||
sprintf (Gbl.Alert.Txt,Txt_There_is_no_user_with_nickname_X,
|
||||
UsrIDNickOrEmail);
|
||||
Lay_ShowAlert (Lay_WARNING,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
}
|
||||
Error = true;
|
||||
}
|
||||
|
@ -5276,7 +5276,7 @@ bool Usr_GetListMsgRecipientsWrittenExplicitelyBySender (bool WriteErrorMsgs)
|
|||
{
|
||||
sprintf (Gbl.Alert.Txt,Txt_There_is_no_user_with_email_X,
|
||||
UsrIDNickOrEmail);
|
||||
Lay_ShowAlert (Lay_WARNING,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
}
|
||||
Error = true;
|
||||
}
|
||||
|
@ -5304,7 +5304,7 @@ bool Usr_GetListMsgRecipientsWrittenExplicitelyBySender (bool WriteErrorMsgs)
|
|||
{
|
||||
sprintf (Gbl.Alert.Txt,Txt_There_are_more_than_one_user_with_the_ID_X_Please_type_a_nick_or_email,
|
||||
UsrIDNickOrEmail);
|
||||
Lay_ShowAlert (Lay_ERROR,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_ERROR,Gbl.Alert.Txt);
|
||||
}
|
||||
Error = true;
|
||||
}
|
||||
|
@ -5315,7 +5315,7 @@ bool Usr_GetListMsgRecipientsWrittenExplicitelyBySender (bool WriteErrorMsgs)
|
|||
{
|
||||
sprintf (Gbl.Alert.Txt,Txt_There_is_no_user_with_ID_nick_or_email_X,
|
||||
UsrIDNickOrEmail);
|
||||
Lay_ShowAlert (Lay_ERROR,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_ERROR,Gbl.Alert.Txt);
|
||||
}
|
||||
Error = true;
|
||||
}
|
||||
|
@ -5326,7 +5326,7 @@ bool Usr_GetListMsgRecipientsWrittenExplicitelyBySender (bool WriteErrorMsgs)
|
|||
{
|
||||
sprintf (Gbl.Alert.Txt,Txt_The_ID_nickname_or_email_X_is_not_valid,
|
||||
UsrIDNickOrEmail);
|
||||
Lay_ShowAlert (Lay_WARNING,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||
}
|
||||
Error = true;
|
||||
}
|
||||
|
@ -8096,7 +8096,7 @@ void Usr_ShowWarningNoUsersFound (Rol_Role_t Role)
|
|||
{
|
||||
extern const char *Txt_No_users_found[Rol_NUM_ROLES];
|
||||
|
||||
Lay_ShowAlert (Lay_INFO,Txt_No_users_found[Role]);
|
||||
Ale_ShowAlert (Ale_INFO,Txt_No_users_found[Role]);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -8491,7 +8491,7 @@ void Usr_PrintUsrQRCode (void)
|
|||
Lay_EndRoundFrame ();
|
||||
}
|
||||
else
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
|
@ -432,9 +432,9 @@ static void ZIP_CompressFolderIntoZIP (void)
|
|||
UncompressedSize = ZIP_CloneDir (Path,PathCompression,Gbl.FileBrowser.Priv.FullPathInTree);
|
||||
|
||||
if (UncompressedSize == 0) // Nothing to compress
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_The_folder_is_empty);
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_The_folder_is_empty);
|
||||
else if (UncompressedSize > ZIP_MAX_SIZE_UNCOMPRESSED) // Uncompressed size is too big
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_The_contents_of_the_folder_are_too_big);
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_The_contents_of_the_folder_are_too_big);
|
||||
else
|
||||
{
|
||||
/***** Change to directory of the clone folder
|
||||
|
|
Loading…
Reference in New Issue