mirror of https://github.com/acanas/swad-core.git
Version 18.46.10
This commit is contained in:
parent
173f347bba
commit
afcae28b00
|
@ -92,7 +92,7 @@ void Ale_ShowPendingAlert (void)
|
||||||
/***** Anything to show? *****/
|
/***** Anything to show? *****/
|
||||||
if (Gbl.Alert.Type != Ale_NONE)
|
if (Gbl.Alert.Type != Ale_NONE)
|
||||||
/***** Show alert *****/
|
/***** Show alert *****/
|
||||||
Ale_ShowA_old (Gbl.Alert.Type,Gbl.Alert.Txt);
|
Ale_ShowAlert (Gbl.Alert.Type,Gbl.Alert.Txt);
|
||||||
|
|
||||||
Ale_ResetAlert ();
|
Ale_ResetAlert ();
|
||||||
}
|
}
|
||||||
|
@ -137,13 +137,6 @@ static void Ale_ShowFixAlert (Ale_AlertType_t AlertType,const char *Txt)
|
||||||
ActUnk,NULL,NULL,NULL,Btn_NO_BUTTON,NULL);
|
ActUnk,NULL,NULL,NULL,Btn_NO_BUTTON,NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Ale_ShowA_old (Ale_AlertType_t AlertType,const char *Txt)
|
|
||||||
{
|
|
||||||
if (AlertType != Ale_NONE)
|
|
||||||
Ale_ShowAlertAndButton (AlertType,Txt,
|
|
||||||
ActUnk,NULL,NULL,NULL,Btn_NO_BUTTON,NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
void Ale_ShowAlertAndButton (Ale_AlertType_t AlertType,const char *Txt,
|
void Ale_ShowAlertAndButton (Ale_AlertType_t AlertType,const char *Txt,
|
||||||
Act_Action_t NextAction,const char *Anchor,const char *OnSubmit,
|
Act_Action_t NextAction,const char *Anchor,const char *OnSubmit,
|
||||||
void (*FuncParams) (),
|
void (*FuncParams) (),
|
||||||
|
|
|
@ -63,7 +63,6 @@ void Ale_ResetAlert (void);
|
||||||
void Ale_ShowPendingAlert (void);
|
void Ale_ShowPendingAlert (void);
|
||||||
void Ale_ShowDelayedAlert (void);
|
void Ale_ShowDelayedAlert (void);
|
||||||
void Ale_ShowAlert (Ale_AlertType_t AlertType,const char *fmt,...);
|
void Ale_ShowAlert (Ale_AlertType_t AlertType,const char *fmt,...);
|
||||||
void Ale_ShowA_old (Ale_AlertType_t AlertType,const char *Txt);
|
|
||||||
void Ale_ShowAlertAndButton (Ale_AlertType_t AlertType,const char *Txt,
|
void Ale_ShowAlertAndButton (Ale_AlertType_t AlertType,const char *Txt,
|
||||||
Act_Action_t NextAction,const char *Anchor,const char *OnSubmit,
|
Act_Action_t NextAction,const char *Anchor,const char *OnSubmit,
|
||||||
void (*FuncParams) (),
|
void (*FuncParams) (),
|
||||||
|
|
|
@ -405,22 +405,23 @@ En OpenSWAD:
|
||||||
ps2pdf source.ps destination.pdf
|
ps2pdf source.ps destination.pdf
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define Log_PLATFORM_VERSION "SWAD 18.46.9 (2019-02-16)"
|
#define Log_PLATFORM_VERSION "SWAD 18.46.10 (2019-02-16)"
|
||||||
#define CSS_FILE "swad18.41.1.css"
|
#define CSS_FILE "swad18.41.1.css"
|
||||||
#define JS_FILE "swad18.32.1.js"
|
#define JS_FILE "swad18.32.1.js"
|
||||||
/*
|
/*
|
||||||
Version 18.46.9: Feb 16, 2019 Refactoring code related to alerts. (237809 lines)
|
Version 18.46.10: Feb 16, 2019 Code refactoring related to alerts. (237729 lines)
|
||||||
Version 18.46.8: Feb 16, 2019 Refactoring code related to alerts. (237863 lines)
|
Version 18.46.9: Feb 16, 2019 Code refactoring related to alerts. (237809 lines)
|
||||||
Version 18.46.7: Feb 16, 2019 Refactoring code related to alerts. (237953 lines)
|
Version 18.46.8: Feb 16, 2019 Code refactoring related to alerts. (237863 lines)
|
||||||
Version 18.46.6: Feb 16, 2019 Refactoring code related to alerts. (238019 lines)
|
Version 18.46.7: Feb 16, 2019 Code refactoring related to alerts. (237953 lines)
|
||||||
Version 18.46.5: Feb 16, 2019 Refactoring code related to alerts. (238062 lines)
|
Version 18.46.6: Feb 16, 2019 Code refactoring related to alerts. (238019 lines)
|
||||||
Version 18.46.4: Feb 16, 2019 Refactoring code related to alerts. (238061 lines)
|
Version 18.46.5: Feb 16, 2019 Code refactoring related to alerts. (238062 lines)
|
||||||
Version 18.46.3: Feb 16, 2019 Refactoring code related to alerts. (238243 lines)
|
Version 18.46.4: Feb 16, 2019 Code refactoring related to alerts. (238061 lines)
|
||||||
Version 18.46.2: Feb 16, 2019 Refactoring code related to alerts. (238298 lines)
|
Version 18.46.3: Feb 16, 2019 Code refactoring related to alerts. (238243 lines)
|
||||||
Version 18.46.1: Feb 15, 2019 Refactoring code related to alerts. (238355 lines)
|
Version 18.46.2: Feb 16, 2019 Code refactoring related to alerts. (238298 lines)
|
||||||
|
Version 18.46.1: Feb 15, 2019 Code refactoring related to alerts. (238355 lines)
|
||||||
Version 18.46: Feb 15, 2019 Removed unused code related to tabs.
|
Version 18.46: Feb 15, 2019 Removed unused code related to tabs.
|
||||||
Fixed bug in actions related to login.
|
Fixed bug in actions related to login.
|
||||||
Refactoring code related to alerts. (238468 lines)
|
Code refactoring related to alerts. (238468 lines)
|
||||||
2 changes necessary in database:
|
2 changes necessary in database:
|
||||||
UPDATE actions SET Obsolete='Y' WHERE ActCod='34';
|
UPDATE actions SET Obsolete='Y' WHERE ActCod='34';
|
||||||
UPDATE actions SET Obsolete='Y' WHERE ActCod='844';
|
UPDATE actions SET Obsolete='Y' WHERE ActCod='844';
|
||||||
|
@ -5261,8 +5262,8 @@ ALTER TABLE usr_webs CHANGE Web Web ENUM('www','500px','delicious','deviantart',
|
||||||
Version 14.113.3: Apr 15, 2015 New welcome message after creating an account. (184536 lines)
|
Version 14.113.3: Apr 15, 2015 New welcome message after creating an account. (184536 lines)
|
||||||
Version 14.113.2: Apr 14, 2015 Fixed bug when compressing users' works. (184486 lines)
|
Version 14.113.2: Apr 14, 2015 Fixed bug when compressing users' works. (184486 lines)
|
||||||
Version 14.113.1: Apr 14, 2015 Fixed bug when compressing users' works, reported by José Martínez Aroza. (184484 lines)
|
Version 14.113.1: Apr 14, 2015 Fixed bug when compressing users' works, reported by José Martínez Aroza. (184484 lines)
|
||||||
Version 14.113: Apr 12, 2015 Refactoring code related to frames. (184462 lines)
|
Version 14.113: Apr 12, 2015 Code refactoring related to frames. (184462 lines)
|
||||||
Version 14.112.1: Apr 12, 2015 Refactoring code related to frames with ending buttons. (184583 lines)
|
Version 14.112.1: Apr 12, 2015 Code refactoring related to frames with ending buttons. (184583 lines)
|
||||||
Version 14.112: Apr 12, 2015 Optimization in frames with ending buttons.
|
Version 14.112: Apr 12, 2015 Optimization in frames with ending buttons.
|
||||||
Changes in form to upload logo.
|
Changes in form to upload logo.
|
||||||
Changes in form to photo of centre.
|
Changes in form to photo of centre.
|
||||||
|
|
|
@ -279,7 +279,7 @@ static void Svy_ListAllSurveys (struct SurveyQuestion *SvyQst)
|
||||||
Tbl_EndTable ();
|
Tbl_EndTable ();
|
||||||
}
|
}
|
||||||
else // No surveys created
|
else // No surveys created
|
||||||
Ale_ShowA_old (Ale_INFO,Txt_No_surveys);
|
Ale_ShowAlert (Ale_INFO,Txt_No_surveys);
|
||||||
|
|
||||||
/***** Button to create a new survey *****/
|
/***** Button to create a new survey *****/
|
||||||
if (Svy_CheckIfICanCreateSvy ())
|
if (Svy_CheckIfICanCreateSvy ())
|
||||||
|
@ -1579,10 +1579,8 @@ void Svy_RemoveSurvey (void)
|
||||||
Ntf_MarkNotifAsRemoved (Ntf_EVENT_SURVEY,Svy.SvyCod);
|
Ntf_MarkNotifAsRemoved (Ntf_EVENT_SURVEY,Svy.SvyCod);
|
||||||
|
|
||||||
/***** Write message to show the change made *****/
|
/***** Write message to show the change made *****/
|
||||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
Ale_ShowAlert (Ale_SUCCESS,Txt_Survey_X_removed,
|
||||||
Txt_Survey_X_removed,
|
Svy.Title);
|
||||||
Svy.Title);
|
|
||||||
Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
|
|
||||||
|
|
||||||
/***** Show surveys again *****/
|
/***** Show surveys again *****/
|
||||||
Svy_ListAllSurveys (&SvyQst);
|
Svy_ListAllSurveys (&SvyQst);
|
||||||
|
@ -1616,10 +1614,8 @@ void Svy_AskResetSurvey (void)
|
||||||
Lay_ShowErrorAndExit ("You can not reset this survey.");
|
Lay_ShowErrorAndExit ("You can not reset this survey.");
|
||||||
|
|
||||||
/***** Ask for confirmation of reset *****/
|
/***** Ask for confirmation of reset *****/
|
||||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
Ale_ShowAlert (Ale_WARNING,Txt_Do_you_really_want_to_reset_the_survey_X,
|
||||||
Txt_Do_you_really_want_to_reset_the_survey_X,
|
Svy.Title);
|
||||||
Svy.Title);
|
|
||||||
Ale_ShowA_old (Ale_WARNING,Gbl.Alert.Txt);
|
|
||||||
|
|
||||||
/***** Button of confirmation of reset *****/
|
/***** Button of confirmation of reset *****/
|
||||||
Gbl.Svys.SvyCodToEdit = Svy.SvyCod;
|
Gbl.Svys.SvyCodToEdit = Svy.SvyCod;
|
||||||
|
@ -1678,10 +1674,8 @@ void Svy_ResetSurvey (void)
|
||||||
Svy.SvyCod);
|
Svy.SvyCod);
|
||||||
|
|
||||||
/***** Write message to show the change made *****/
|
/***** Write message to show the change made *****/
|
||||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
Ale_ShowAlert (Ale_SUCCESS,Txt_Survey_X_reset,
|
||||||
Txt_Survey_X_reset,
|
Svy.Title);
|
||||||
Svy.Title);
|
|
||||||
Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
|
|
||||||
|
|
||||||
/***** Show surveys again *****/
|
/***** Show surveys again *****/
|
||||||
Svy_ListAllSurveys (&SvyQst);
|
Svy_ListAllSurveys (&SvyQst);
|
||||||
|
@ -1715,10 +1709,8 @@ void Svy_HideSurvey (void)
|
||||||
Svy.SvyCod);
|
Svy.SvyCod);
|
||||||
|
|
||||||
/***** Write message to show the change made *****/
|
/***** Write message to show the change made *****/
|
||||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
Ale_ShowAlert (Ale_SUCCESS,Txt_Survey_X_is_now_hidden,
|
||||||
Txt_Survey_X_is_now_hidden,
|
Svy.Title);
|
||||||
Svy.Title);
|
|
||||||
Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
|
|
||||||
|
|
||||||
/***** Show surveys again *****/
|
/***** Show surveys again *****/
|
||||||
Svy_ListAllSurveys (&SvyQst);
|
Svy_ListAllSurveys (&SvyQst);
|
||||||
|
@ -1752,10 +1744,8 @@ void Svy_UnhideSurvey (void)
|
||||||
Svy.SvyCod);
|
Svy.SvyCod);
|
||||||
|
|
||||||
/***** Write message to show the change made *****/
|
/***** Write message to show the change made *****/
|
||||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
Ale_ShowAlert (Ale_SUCCESS,Txt_Survey_X_is_now_visible,
|
||||||
Txt_Survey_X_is_now_visible,
|
Svy.Title);
|
||||||
Svy.Title);
|
|
||||||
Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
|
|
||||||
|
|
||||||
/***** Show surveys again *****/
|
/***** Show surveys again *****/
|
||||||
Svy_ListAllSurveys (&SvyQst);
|
Svy_ListAllSurveys (&SvyQst);
|
||||||
|
@ -2204,16 +2194,14 @@ void Svy_RecFormSurvey (void)
|
||||||
if (Svy_CheckIfSimilarSurveyExists (&NewSvy))
|
if (Svy_CheckIfSimilarSurveyExists (&NewSvy))
|
||||||
{
|
{
|
||||||
NewSurveyIsCorrect = false;
|
NewSurveyIsCorrect = false;
|
||||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
Ale_ShowAlert (Ale_WARNING,Txt_Already_existed_a_survey_with_the_title_X,
|
||||||
Txt_Already_existed_a_survey_with_the_title_X,
|
NewSvy.Title);
|
||||||
NewSvy.Title);
|
|
||||||
Ale_ShowA_old (Ale_WARNING,Gbl.Alert.Txt);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else // If there is not a survey title
|
else // If there is not a survey title
|
||||||
{
|
{
|
||||||
NewSurveyIsCorrect = false;
|
NewSurveyIsCorrect = false;
|
||||||
Ale_ShowA_old (Ale_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 *****/
|
/***** Create a new survey or update an existing one *****/
|
||||||
|
@ -2287,10 +2275,8 @@ static void Svy_CreateSurvey (struct Survey *Svy,const char *Txt)
|
||||||
Svy_CreateGrps (Svy->SvyCod);
|
Svy_CreateGrps (Svy->SvyCod);
|
||||||
|
|
||||||
/***** Write success message *****/
|
/***** Write success message *****/
|
||||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
Ale_ShowAlert (Ale_SUCCESS,Txt_Created_new_survey_X,
|
||||||
Txt_Created_new_survey_X,
|
Svy->Title);
|
||||||
Svy->Title);
|
|
||||||
Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
@ -2327,7 +2313,7 @@ static void Svy_UpdateSurvey (struct Survey *Svy,const char *Txt)
|
||||||
Svy_CreateGrps (Svy->SvyCod);
|
Svy_CreateGrps (Svy->SvyCod);
|
||||||
|
|
||||||
/***** Write success message *****/
|
/***** Write success message *****/
|
||||||
Ale_ShowA_old (Ale_SUCCESS,Txt_The_survey_has_been_modified);
|
Ale_ShowAlert (Ale_SUCCESS,Txt_The_survey_has_been_modified);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
@ -2887,7 +2873,7 @@ static unsigned Svy_GetAnswersQst (long QstCod,MYSQL_RES **mysql_res)
|
||||||
|
|
||||||
/***** Count number of rows of result *****/
|
/***** Count number of rows of result *****/
|
||||||
if (NumRows == 0)
|
if (NumRows == 0)
|
||||||
Ale_ShowA_old (Ale_ERROR,"Error when getting answers of a question.");
|
Ale_ShowAlert (Ale_ERROR,"Error when getting answers of a question.");
|
||||||
|
|
||||||
return (unsigned) NumRows;
|
return (unsigned) NumRows;
|
||||||
}
|
}
|
||||||
|
@ -3002,7 +2988,7 @@ void Svy_ReceiveQst (void)
|
||||||
{
|
{
|
||||||
if (ThereIsEndOfAnswers)
|
if (ThereIsEndOfAnswers)
|
||||||
{
|
{
|
||||||
Ale_ShowA_old (Ale_WARNING,Txt_You_can_not_leave_empty_intermediate_answers);
|
Ale_ShowAlert (Ale_WARNING,Txt_You_can_not_leave_empty_intermediate_answers);
|
||||||
Error = true;
|
Error = true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -3014,20 +3000,20 @@ void Svy_ReceiveQst (void)
|
||||||
{
|
{
|
||||||
if (NumLastAns < 1)
|
if (NumLastAns < 1)
|
||||||
{
|
{
|
||||||
Ale_ShowA_old (Ale_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;
|
Error = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else // If first answer is empty
|
else // If first answer is empty
|
||||||
{
|
{
|
||||||
Ale_ShowA_old (Ale_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;
|
Error = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Ale_ShowA_old (Ale_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;
|
Error = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3090,7 +3076,7 @@ void Svy_ReceiveQst (void)
|
||||||
}
|
}
|
||||||
|
|
||||||
/***** List the questions of this survey, including the new one just inserted into the database *****/
|
/***** List the questions of this survey, including the new one just inserted into the database *****/
|
||||||
Ale_ShowA_old (Ale_SUCCESS,Txt_The_survey_has_been_modified);
|
Ale_ShowAlert (Ale_SUCCESS,Txt_The_survey_has_been_modified);
|
||||||
}
|
}
|
||||||
|
|
||||||
/***** Free answers *****/
|
/***** Free answers *****/
|
||||||
|
@ -3299,7 +3285,7 @@ static void Svy_ListSvyQuestions (struct Survey *Svy,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else // This survey has no questions
|
else // This survey has no questions
|
||||||
Ale_ShowA_old (Ale_INFO,Txt_This_survey_has_no_questions);
|
Ale_ShowAlert (Ale_INFO,Txt_This_survey_has_no_questions);
|
||||||
|
|
||||||
if (Svy->Status.ICanEdit && // I can edit
|
if (Svy->Status.ICanEdit && // I can edit
|
||||||
(!NumQsts || // This survey has no questions
|
(!NumQsts || // This survey has no questions
|
||||||
|
@ -3621,7 +3607,7 @@ void Svy_RemoveQst (void)
|
||||||
SvyCod,SvyQst.QstInd);
|
SvyCod,SvyQst.QstInd);
|
||||||
|
|
||||||
/***** Write message *****/
|
/***** Write message *****/
|
||||||
Ale_ShowA_old (Ale_SUCCESS,Txt_Question_removed);
|
Ale_ShowAlert (Ale_SUCCESS,Txt_Question_removed);
|
||||||
|
|
||||||
/***** Show current survey *****/
|
/***** Show current survey *****/
|
||||||
Svy_ShowOneSurvey (SvyCod,&SvyQst,true);
|
Svy_ShowOneSurvey (SvyCod,&SvyQst,true);
|
||||||
|
@ -3650,12 +3636,12 @@ void Svy_ReceiveSurveyAnswers (void)
|
||||||
|
|
||||||
/***** Check if I have no answered this survey formerly *****/
|
/***** Check if I have no answered this survey formerly *****/
|
||||||
if (Svy.Status.IHaveAnswered)
|
if (Svy.Status.IHaveAnswered)
|
||||||
Ale_ShowA_old (Ale_WARNING,Txt_You_already_answered_this_survey_before);
|
Ale_ShowAlert (Ale_WARNING,Txt_You_already_answered_this_survey_before);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/***** Receive and store user's answers *****/
|
/***** Receive and store user's answers *****/
|
||||||
Svy_ReceiveAndStoreUserAnswersToASurvey (Svy.SvyCod);
|
Svy_ReceiveAndStoreUserAnswersToASurvey (Svy.SvyCod);
|
||||||
Ale_ShowA_old (Ale_SUCCESS,Txt_Thanks_for_answering_the_survey);
|
Ale_ShowAlert (Ale_SUCCESS,Txt_Thanks_for_answering_the_survey);
|
||||||
}
|
}
|
||||||
|
|
||||||
/***** Show current survey *****/
|
/***** Show current survey *****/
|
||||||
|
|
128
swad_test.c
128
swad_test.c
|
@ -389,7 +389,7 @@ void Tst_ShowFormAskTst (void)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/***** Warning message *****/
|
/***** Warning message *****/
|
||||||
Ale_ShowA_old (Ale_INFO,Txt_No_test_questions);
|
Ale_ShowAlert (Ale_INFO,Txt_No_test_questions);
|
||||||
|
|
||||||
/***** Button to create a new question *****/
|
/***** Button to create a new question *****/
|
||||||
if (Tst_CheckIfICanEditTests ())
|
if (Tst_CheckIfICanEditTests ())
|
||||||
|
@ -445,7 +445,7 @@ void Tst_ShowNewTest (void)
|
||||||
/***** Get questions *****/
|
/***** Get questions *****/
|
||||||
if ((NumRows = Tst_GetQuestionsForTest (&mysql_res)) == 0) // Query database
|
if ((NumRows = Tst_GetQuestionsForTest (&mysql_res)) == 0) // Query database
|
||||||
{
|
{
|
||||||
Ale_ShowA_old (Ale_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
|
Tst_ShowFormAskTst (); // Show the form again
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -590,16 +590,12 @@ void Tst_AssessTest (void)
|
||||||
Tst_SetTstStatus (NumTst,Tst_STATUS_ASSESSED);
|
Tst_SetTstStatus (NumTst,Tst_STATUS_ASSESSED);
|
||||||
break;
|
break;
|
||||||
case Tst_STATUS_ASSESSED:
|
case Tst_STATUS_ASSESSED:
|
||||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
Ale_ShowAlert (Ale_WARNING,Txt_The_test_X_has_already_been_assessed_previously,
|
||||||
Txt_The_test_X_has_already_been_assessed_previously,
|
NumTst);
|
||||||
NumTst);
|
|
||||||
Ale_ShowA_old (Ale_WARNING,Gbl.Alert.Txt);
|
|
||||||
break;
|
break;
|
||||||
case Tst_STATUS_ERROR:
|
case Tst_STATUS_ERROR:
|
||||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
Ale_ShowAlert (Ale_WARNING,Txt_There_was_an_error_in_assessing_the_test_X,
|
||||||
Txt_There_was_an_error_in_assessing_the_test_X,
|
NumTst);
|
||||||
NumTst);
|
|
||||||
Ale_ShowA_old (Ale_WARNING,Gbl.Alert.Txt);
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -712,16 +708,14 @@ static bool Tst_CheckIfNextTstAllowed (void)
|
||||||
if (NumSecondsFromNowToNextAccTst > 0)
|
if (NumSecondsFromNowToNextAccTst > 0)
|
||||||
{
|
{
|
||||||
/***** Write warning *****/
|
/***** Write warning *****/
|
||||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
Ale_ShowAlert (Ale_WARNING,"%s:<br /><span id=\"date_next_test\"></span>."
|
||||||
"%s:<br /><span id=\"date_next_test\"></span>."
|
"<script type=\"text/javascript\">"
|
||||||
"<script type=\"text/javascript\">"
|
"writeLocalDateHMSFromUTC('date_next_test',%ld,"
|
||||||
"writeLocalDateHMSFromUTC('date_next_test',%ld,"
|
"%u,', ','%s',true,true,0x7);"
|
||||||
"%u,', ','%s',true,true,0x7);"
|
"</script>",
|
||||||
"</script>",
|
Txt_You_can_not_take_a_new_test_until,
|
||||||
Txt_You_can_not_take_a_new_test_until,
|
(long) TimeNextTestUTC,
|
||||||
(long) TimeNextTestUTC,
|
(unsigned) Gbl.Prefs.DateFormat,Txt_Today);
|
||||||
(unsigned) Gbl.Prefs.DateFormat,Txt_Today);
|
|
||||||
Ale_ShowA_old (Ale_WARNING,Gbl.Alert.Txt);
|
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -1344,7 +1338,7 @@ void Tst_ShowFormAskEditTsts (void)
|
||||||
else // No test questions
|
else // No test questions
|
||||||
{
|
{
|
||||||
/***** Warning message *****/
|
/***** Warning message *****/
|
||||||
Ale_ShowA_old (Ale_INFO,Txt_No_test_questions);
|
Ale_ShowAlert (Ale_INFO,Txt_No_test_questions);
|
||||||
|
|
||||||
/***** Button to create a new question *****/
|
/***** Button to create a new question *****/
|
||||||
Tst_PutButtonToAddQuestion ();
|
Tst_PutButtonToAddQuestion ();
|
||||||
|
@ -1397,7 +1391,7 @@ void Tst_ShowFormAskSelectTstsForGame (long GamCod)
|
||||||
else // No test questions
|
else // No test questions
|
||||||
{
|
{
|
||||||
/***** Warning message *****/
|
/***** Warning message *****/
|
||||||
Ale_ShowA_old (Ale_INFO,Txt_No_test_questions);
|
Ale_ShowAlert (Ale_INFO,Txt_No_test_questions);
|
||||||
|
|
||||||
/***** Button to create a new question *****/
|
/***** Button to create a new question *****/
|
||||||
Tst_PutButtonToAddQuestion ();
|
Tst_PutButtonToAddQuestion ();
|
||||||
|
@ -1475,7 +1469,7 @@ void Tst_ShowFormConfig (void)
|
||||||
|
|
||||||
/***** If current course has tests and pluggable is unknown... *****/
|
/***** If current course has tests and pluggable is unknown... *****/
|
||||||
if (Tst_CheckIfCourseHaveTestsAndPluggableIsUnknown ())
|
if (Tst_CheckIfCourseHaveTestsAndPluggableIsUnknown ())
|
||||||
Ale_ShowA_old (Ale_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 *****/
|
/***** Form to configure test *****/
|
||||||
Tst_ShowFormConfigTst ();
|
Tst_ShowFormConfigTst ();
|
||||||
|
@ -1550,12 +1544,8 @@ void Tst_RenameTag (void)
|
||||||
|
|
||||||
/***** Check that the new tag is not empty *****/
|
/***** Check that the new tag is not empty *****/
|
||||||
if (!NewTagTxt[0]) // New tag empty
|
if (!NewTagTxt[0]) // New tag empty
|
||||||
{
|
Ale_ShowAlert (Ale_WARNING,Txt_You_can_not_leave_the_name_of_the_tag_X_empty,
|
||||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
OldTagTxt);
|
||||||
Txt_You_can_not_leave_the_name_of_the_tag_X_empty,
|
|
||||||
OldTagTxt);
|
|
||||||
Ale_ShowA_old (Ale_WARNING,Gbl.Alert.Txt);
|
|
||||||
}
|
|
||||||
else // New tag not empty
|
else // New tag not empty
|
||||||
{
|
{
|
||||||
/***** Check if the old tag is equal to the new one *****/
|
/***** Check if the old tag is equal to the new one *****/
|
||||||
|
@ -1563,12 +1553,8 @@ void Tst_RenameTag (void)
|
||||||
// are exactly the same (case sensitively).
|
// are exactly the same (case sensitively).
|
||||||
// This happens when user press INTRO
|
// This happens when user press INTRO
|
||||||
// without changing anything in the form.
|
// without changing anything in the form.
|
||||||
{
|
Ale_ShowAlert (Ale_INFO,Txt_The_tag_X_has_not_changed,
|
||||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
NewTagTxt);
|
||||||
Txt_The_tag_X_has_not_changed,
|
|
||||||
NewTagTxt);
|
|
||||||
Ale_ShowA_old (Ale_INFO,Gbl.Alert.Txt);
|
|
||||||
}
|
|
||||||
else // The old and the new tag
|
else // The old and the new tag
|
||||||
// are not exactly the same (case sensitively).
|
// are not exactly the same (case sensitively).
|
||||||
{
|
{
|
||||||
|
@ -1647,10 +1633,8 @@ void Tst_RenameTag (void)
|
||||||
}
|
}
|
||||||
|
|
||||||
/***** Write message to show the change made *****/
|
/***** Write message to show the change made *****/
|
||||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
Ale_ShowAlert (Ale_SUCCESS,Txt_The_tag_X_has_been_renamed_as_Y,
|
||||||
Txt_The_tag_X_has_been_renamed_as_Y,
|
OldTagTxt,NewTagTxt);
|
||||||
OldTagTxt,NewTagTxt);
|
|
||||||
Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1855,7 +1839,7 @@ static void Tst_ShowFormEditTags (void)
|
||||||
Box_EndBoxTable ();
|
Box_EndBoxTable ();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
Ale_ShowA_old (Ale_INFO,Txt_No_test_questions);
|
Ale_ShowAlert (Ale_INFO,Txt_No_test_questions);
|
||||||
|
|
||||||
/* Free structure that stores the query result */
|
/* Free structure that stores the query result */
|
||||||
DB_FreeMySQLResult (&mysql_res);
|
DB_FreeMySQLResult (&mysql_res);
|
||||||
|
@ -2257,7 +2241,7 @@ void Tst_ReceiveConfigTst (void)
|
||||||
Tst_FeedbackDB[Gbl.Test.Config.Feedback]);
|
Tst_FeedbackDB[Gbl.Test.Config.Feedback]);
|
||||||
|
|
||||||
/***** Show confirmation message *****/
|
/***** Show confirmation message *****/
|
||||||
Ale_ShowA_old (Ale_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 *****/
|
/***** Show again the form to configure test *****/
|
||||||
Tst_ShowFormConfig ();
|
Tst_ShowFormConfig ();
|
||||||
|
@ -2641,7 +2625,7 @@ static unsigned long Tst_GetQuestions (MYSQL_RES **mysql_res)
|
||||||
Query);
|
Query);
|
||||||
|
|
||||||
if (NumRows == 0)
|
if (NumRows == 0)
|
||||||
Ale_ShowA_old (Ale_INFO,Txt_No_questions_found_matching_your_search_criteria);
|
Ale_ShowAlert (Ale_INFO,Txt_No_questions_found_matching_your_search_criteria);
|
||||||
|
|
||||||
return NumRows;
|
return NumRows;
|
||||||
}
|
}
|
||||||
|
@ -3324,7 +3308,7 @@ unsigned Tst_GetAnswersQst (long QstCod,MYSQL_RES **mysql_res,bool Shuffle)
|
||||||
Shuffle ? "RAND(NOW())" :
|
Shuffle ? "RAND(NOW())" :
|
||||||
"AnsInd");
|
"AnsInd");
|
||||||
if (!NumRows)
|
if (!NumRows)
|
||||||
Ale_ShowA_old (Ale_ERROR,"Error when getting answers of a question.");
|
Ale_ShowAlert (Ale_ERROR,"Error when getting answers of a question.");
|
||||||
|
|
||||||
return (unsigned) NumRows;
|
return (unsigned) NumRows;
|
||||||
}
|
}
|
||||||
|
@ -3574,7 +3558,7 @@ void Tst_WriteAnswersGameResult (struct Game *Game,unsigned NumQst,long QstCod,
|
||||||
case Tst_ANS_FLOAT:
|
case Tst_ANS_FLOAT:
|
||||||
case Tst_ANS_TRUE_FALSE:
|
case Tst_ANS_TRUE_FALSE:
|
||||||
case Tst_ANS_TEXT:
|
case Tst_ANS_TEXT:
|
||||||
Ale_ShowA_old (Ale_WARNING,"Type of answer not valid in a game.");
|
Ale_ShowAlert (Ale_ERROR,"Type of answer not valid in a game.");
|
||||||
break;
|
break;
|
||||||
case Tst_ANS_UNIQUE_CHOICE:
|
case Tst_ANS_UNIQUE_CHOICE:
|
||||||
case Tst_ANS_MULTIPLE_CHOICE:
|
case Tst_ANS_MULTIPLE_CHOICE:
|
||||||
|
@ -4758,7 +4742,7 @@ static bool Tst_GetParamsTst (Tst_ActionToDoWithQuestions_t ActionToDoWithQuesti
|
||||||
/* Check number of tags selected */
|
/* Check number of tags selected */
|
||||||
if (Tst_CountNumTagsInList () == 0) // If no tags selected...
|
if (Tst_CountNumTagsInList () == 0) // If no tags selected...
|
||||||
{ // ...write alert
|
{ // ...write alert
|
||||||
Ale_ShowA_old (Ale_WARNING,Txt_You_must_select_one_ore_more_tags);
|
Ale_ShowAlert (Ale_WARNING,Txt_You_must_select_one_ore_more_tags);
|
||||||
Error = true;
|
Error = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4776,7 +4760,7 @@ static bool Tst_GetParamsTst (Tst_ActionToDoWithQuestions_t ActionToDoWithQuesti
|
||||||
/* Check number of types of answer */
|
/* Check number of types of answer */
|
||||||
if (Tst_CountNumAnswerTypesInList () == 0) // If no types of answer selected...
|
if (Tst_CountNumAnswerTypesInList () == 0) // If no types of answer selected...
|
||||||
{ // ...write warning alert
|
{ // ...write warning alert
|
||||||
Ale_ShowA_old (Ale_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;
|
Error = true;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -4799,10 +4783,8 @@ static bool Tst_GetParamsTst (Tst_ActionToDoWithQuestions_t ActionToDoWithQuesti
|
||||||
if (Gbl.Test.NumQsts < Gbl.Test.Config.Min ||
|
if (Gbl.Test.NumQsts < Gbl.Test.Config.Min ||
|
||||||
Gbl.Test.NumQsts > Gbl.Test.Config.Max)
|
Gbl.Test.NumQsts > Gbl.Test.Config.Max)
|
||||||
{
|
{
|
||||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
Ale_ShowAlert (Ale_WARNING,Txt_The_number_of_questions_must_be_in_the_interval_X,
|
||||||
Txt_The_number_of_questions_must_be_in_the_interval_X,
|
Gbl.Test.Config.Min,Gbl.Test.Config.Max);
|
||||||
Gbl.Test.Config.Min,Gbl.Test.Config.Max);
|
|
||||||
Ale_ShowA_old (Ale_WARNING,Gbl.Alert.Txt);
|
|
||||||
Error = true;
|
Error = true;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -6009,7 +5991,7 @@ bool Tst_CheckIfQstFormatIsCorrectAndCountNumOptions (void)
|
||||||
Gbl.Test.Image.Action == Img_ACTION_CHANGE_IMAGE) && // Replace existing image by new image
|
Gbl.Test.Image.Action == Img_ACTION_CHANGE_IMAGE) && // Replace existing image by new image
|
||||||
Gbl.Test.Image.Status != Img_FILE_PROCESSED)
|
Gbl.Test.Image.Status != Img_FILE_PROCESSED)
|
||||||
{
|
{
|
||||||
Ale_ShowA_old (Ale_WARNING,Txt_Error_receiving_or_processing_image);
|
Ale_ShowAlert (Ale_WARNING,Txt_Error_receiving_or_processing_image);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -6019,14 +6001,14 @@ bool Tst_CheckIfQstFormatIsCorrectAndCountNumOptions (void)
|
||||||
/***** A question must have at least one tag *****/
|
/***** A question must have at least one tag *****/
|
||||||
if (!Gbl.Test.Tags.Num) // There are no tags with text
|
if (!Gbl.Test.Tags.Num) // There are no tags with text
|
||||||
{
|
{
|
||||||
Ale_ShowA_old (Ale_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;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/***** A question must have a stem*****/
|
/***** A question must have a stem*****/
|
||||||
if (!Gbl.Test.Stem.Length)
|
if (!Gbl.Test.Stem.Length)
|
||||||
{
|
{
|
||||||
Ale_ShowA_old (Ale_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;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -6036,12 +6018,12 @@ bool Tst_CheckIfQstFormatIsCorrectAndCountNumOptions (void)
|
||||||
case Tst_ANS_INT:
|
case Tst_ANS_INT:
|
||||||
if (!Gbl.Test.Answer.Options[0].Text)
|
if (!Gbl.Test.Answer.Options[0].Text)
|
||||||
{
|
{
|
||||||
Ale_ShowA_old (Ale_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;
|
return false;
|
||||||
}
|
}
|
||||||
if (!Gbl.Test.Answer.Options[0].Text[0])
|
if (!Gbl.Test.Answer.Options[0].Text[0])
|
||||||
{
|
{
|
||||||
Ale_ShowA_old (Ale_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;
|
return false;
|
||||||
}
|
}
|
||||||
Gbl.Test.Answer.Integer = Tst_GetIntAnsFromStr (Gbl.Test.Answer.Options[0].Text);
|
Gbl.Test.Answer.Integer = Tst_GetIntAnsFromStr (Gbl.Test.Answer.Options[0].Text);
|
||||||
|
@ -6051,13 +6033,13 @@ bool Tst_CheckIfQstFormatIsCorrectAndCountNumOptions (void)
|
||||||
if (!Gbl.Test.Answer.Options[0].Text ||
|
if (!Gbl.Test.Answer.Options[0].Text ||
|
||||||
!Gbl.Test.Answer.Options[1].Text)
|
!Gbl.Test.Answer.Options[1].Text)
|
||||||
{
|
{
|
||||||
Ale_ShowA_old (Ale_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;
|
return false;
|
||||||
}
|
}
|
||||||
if (!Gbl.Test.Answer.Options[0].Text[0] ||
|
if (!Gbl.Test.Answer.Options[0].Text[0] ||
|
||||||
!Gbl.Test.Answer.Options[1].Text[0])
|
!Gbl.Test.Answer.Options[1].Text[0])
|
||||||
{
|
{
|
||||||
Ale_ShowA_old (Ale_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;
|
return false;
|
||||||
}
|
}
|
||||||
for (i = 0;
|
for (i = 0;
|
||||||
|
@ -6067,7 +6049,7 @@ bool Tst_CheckIfQstFormatIsCorrectAndCountNumOptions (void)
|
||||||
if (Gbl.Test.Answer.FloatingPoint[0] >
|
if (Gbl.Test.Answer.FloatingPoint[0] >
|
||||||
Gbl.Test.Answer.FloatingPoint[1])
|
Gbl.Test.Answer.FloatingPoint[1])
|
||||||
{
|
{
|
||||||
Ale_ShowA_old (Ale_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;
|
return false;
|
||||||
}
|
}
|
||||||
Gbl.Test.Answer.NumOptions = 2;
|
Gbl.Test.Answer.NumOptions = 2;
|
||||||
|
@ -6076,7 +6058,7 @@ bool Tst_CheckIfQstFormatIsCorrectAndCountNumOptions (void)
|
||||||
if (Gbl.Test.Answer.TF != 'T' &&
|
if (Gbl.Test.Answer.TF != 'T' &&
|
||||||
Gbl.Test.Answer.TF != 'F')
|
Gbl.Test.Answer.TF != 'F')
|
||||||
{
|
{
|
||||||
Ale_ShowA_old (Ale_WARNING,Txt_You_must_select_a_T_F_answer);
|
Ale_ShowAlert (Ale_WARNING,Txt_You_must_select_a_T_F_answer);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
Gbl.Test.Answer.NumOptions = 1;
|
Gbl.Test.Answer.NumOptions = 1;
|
||||||
|
@ -6085,12 +6067,12 @@ bool Tst_CheckIfQstFormatIsCorrectAndCountNumOptions (void)
|
||||||
case Tst_ANS_MULTIPLE_CHOICE:
|
case Tst_ANS_MULTIPLE_CHOICE:
|
||||||
if (!Gbl.Test.Answer.Options[0].Text) // If the first answer is empty
|
if (!Gbl.Test.Answer.Options[0].Text) // If the first answer is empty
|
||||||
{
|
{
|
||||||
Ale_ShowA_old (Ale_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;
|
return false;
|
||||||
}
|
}
|
||||||
if (!Gbl.Test.Answer.Options[0].Text[0]) // If the first answer is empty
|
if (!Gbl.Test.Answer.Options[0].Text[0]) // If the first answer is empty
|
||||||
{
|
{
|
||||||
Ale_ShowA_old (Ale_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;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -6103,7 +6085,7 @@ bool Tst_CheckIfQstFormatIsCorrectAndCountNumOptions (void)
|
||||||
{
|
{
|
||||||
if (ThereIsEndOfAnswers)
|
if (ThereIsEndOfAnswers)
|
||||||
{
|
{
|
||||||
Ale_ShowA_old (Ale_WARNING,Txt_You_can_not_leave_empty_intermediate_answers);
|
Ale_ShowAlert (Ale_WARNING,Txt_You_can_not_leave_empty_intermediate_answers);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
NumLastOpt = NumOpt;
|
NumLastOpt = NumOpt;
|
||||||
|
@ -6117,7 +6099,7 @@ bool Tst_CheckIfQstFormatIsCorrectAndCountNumOptions (void)
|
||||||
|
|
||||||
if (NumLastOpt < 1)
|
if (NumLastOpt < 1)
|
||||||
{
|
{
|
||||||
Ale_ShowA_old (Ale_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;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -6128,19 +6110,19 @@ bool Tst_CheckIfQstFormatIsCorrectAndCountNumOptions (void)
|
||||||
break;
|
break;
|
||||||
if (NumOpt > NumLastOpt)
|
if (NumOpt > NumLastOpt)
|
||||||
{
|
{
|
||||||
Ale_ShowA_old (Ale_WARNING,Txt_You_must_mark_an_answer_as_correct);
|
Ale_ShowAlert (Ale_WARNING,Txt_You_must_mark_an_answer_as_correct);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case Tst_ANS_TEXT:
|
case Tst_ANS_TEXT:
|
||||||
if (!Gbl.Test.Answer.Options[0].Text) // If the first answer is empty
|
if (!Gbl.Test.Answer.Options[0].Text) // If the first answer is empty
|
||||||
{
|
{
|
||||||
Ale_ShowA_old (Ale_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;
|
return false;
|
||||||
}
|
}
|
||||||
if (!Gbl.Test.Answer.Options[0].Text[0]) // If the first answer is empty
|
if (!Gbl.Test.Answer.Options[0].Text[0]) // If the first answer is empty
|
||||||
{
|
{
|
||||||
Ale_ShowA_old (Ale_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;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -6153,7 +6135,7 @@ bool Tst_CheckIfQstFormatIsCorrectAndCountNumOptions (void)
|
||||||
{
|
{
|
||||||
if (ThereIsEndOfAnswers)
|
if (ThereIsEndOfAnswers)
|
||||||
{
|
{
|
||||||
Ale_ShowA_old (Ale_WARNING,Txt_You_can_not_leave_empty_intermediate_answers);
|
Ale_ShowAlert (Ale_WARNING,Txt_You_can_not_leave_empty_intermediate_answers);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
Gbl.Test.Answer.NumOptions++;
|
Gbl.Test.Answer.NumOptions++;
|
||||||
|
@ -6456,7 +6438,7 @@ void Tst_RemoveQst (void)
|
||||||
Lay_ShowErrorAndExit ("The question to be removed does not exist or belongs to another course.");
|
Lay_ShowErrorAndExit ("The question to be removed does not exist or belongs to another course.");
|
||||||
|
|
||||||
/***** Write message *****/
|
/***** Write message *****/
|
||||||
Ale_ShowA_old (Ale_SUCCESS,Txt_Question_removed);
|
Ale_ShowAlert (Ale_SUCCESS,Txt_Question_removed);
|
||||||
|
|
||||||
/***** Continue editing questions *****/
|
/***** Continue editing questions *****/
|
||||||
if (!EditingOnlyThisQst)
|
if (!EditingOnlyThisQst)
|
||||||
|
@ -6495,11 +6477,9 @@ void Tst_ChangeShuffleQst (void)
|
||||||
Gbl.Test.QstCod,Gbl.CurrentCrs.Crs.CrsCod);
|
Gbl.Test.QstCod,Gbl.CurrentCrs.Crs.CrsCod);
|
||||||
|
|
||||||
/***** Write message *****/
|
/***** Write message *****/
|
||||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
Ale_ShowAlert (Ale_SUCCESS,Shuffle ? Txt_The_answers_of_the_question_with_code_X_will_appear_shuffled :
|
||||||
Shuffle ? Txt_The_answers_of_the_question_with_code_X_will_appear_shuffled :
|
Txt_The_answers_of_the_question_with_code_X_will_appear_without_shuffling,
|
||||||
Txt_The_answers_of_the_question_with_code_X_will_appear_without_shuffling,
|
Gbl.Test.QstCod);
|
||||||
Gbl.Test.QstCod);
|
|
||||||
Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
|
|
||||||
|
|
||||||
/***** Continue editing questions *****/
|
/***** Continue editing questions *****/
|
||||||
if (EditingOnlyThisQst)
|
if (EditingOnlyThisQst)
|
||||||
|
@ -7685,7 +7665,7 @@ void Tst_ShowUsrsTestResults (void)
|
||||||
else // If no users are selected...
|
else // If no users are selected...
|
||||||
{
|
{
|
||||||
// ...write warning alert
|
// ...write warning alert
|
||||||
Ale_ShowA_old (Ale_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
|
// ...and show again the form
|
||||||
Tst_SelUsrsToSeeUsrsTestResults ();
|
Tst_SelUsrsToSeeUsrsTestResults ();
|
||||||
}
|
}
|
||||||
|
|
|
@ -139,7 +139,7 @@ void TsI_ShowFormImportQstsFromXML (void)
|
||||||
Hlp_ASSESSMENT_Tests,Box_NOT_CLOSABLE);
|
Hlp_ASSESSMENT_Tests,Box_NOT_CLOSABLE);
|
||||||
|
|
||||||
/***** Write help message *****/
|
/***** Write help message *****/
|
||||||
Ale_ShowA_old (Ale_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 *****/
|
/***** Write a form to import questions *****/
|
||||||
Frm_StartForm (ActImpTstQst);
|
Frm_StartForm (ActImpTstQst);
|
||||||
|
@ -427,12 +427,8 @@ void TsI_ImportQstsFromXML (void)
|
||||||
WrongType = true;
|
WrongType = true;
|
||||||
|
|
||||||
if (WrongType)
|
if (WrongType)
|
||||||
{
|
Ale_ShowAlert (Ale_WARNING,Txt_The_file_is_not_X,
|
||||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
"xml");
|
||||||
Txt_The_file_is_not_X,
|
|
||||||
"xml");
|
|
||||||
Ale_ShowA_old (Ale_WARNING,Gbl.Alert.Txt);
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* End the reception of XML in a temporary file */
|
/* End the reception of XML in a temporary file */
|
||||||
|
@ -443,7 +439,7 @@ void TsI_ImportQstsFromXML (void)
|
||||||
/***** Get questions from XML file and store them in database *****/
|
/***** Get questions from XML file and store them in database *****/
|
||||||
TsI_ReadQuestionsFromXMLFileAndStoreInDB (FileNameXMLTmp);
|
TsI_ReadQuestionsFromXMLFileAndStoreInDB (FileNameXMLTmp);
|
||||||
else
|
else
|
||||||
Ale_ShowA_old (Ale_WARNING,"Error copying file.");
|
Ale_ShowAlert (Ale_WARNING,"Error copying file.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -677,7 +673,7 @@ static void TsI_ImportQuestionsFromXMLBuffer (const char *XMLBuffer)
|
||||||
Tbl_EndTable ();
|
Tbl_EndTable ();
|
||||||
}
|
}
|
||||||
else // TestElem not found
|
else // TestElem not found
|
||||||
Ale_ShowA_old (Ale_ERROR,"Root element <test> not found.");
|
Ale_ShowAlert (Ale_ERROR,"Root element <test> not found.");
|
||||||
|
|
||||||
/***** End table *****/
|
/***** End table *****/
|
||||||
Box_EndBox ();
|
Box_EndBox ();
|
||||||
|
|
|
@ -547,7 +547,7 @@ void TT_ShowTimeTable (long UsrCod)
|
||||||
if (Gbl.TimeTable.Config.HoursPerDay)
|
if (Gbl.TimeTable.Config.HoursPerDay)
|
||||||
TT_DrawTimeTable ();
|
TT_DrawTimeTable ();
|
||||||
else
|
else
|
||||||
Ale_ShowA_old (Ale_INFO,Txt_The_timetable_is_empty);
|
Ale_ShowAlert (Ale_INFO,Txt_The_timetable_is_empty);
|
||||||
|
|
||||||
/***** Free internal timetable in memory *****/
|
/***** Free internal timetable in memory *****/
|
||||||
TT_FreeTimeTable ();
|
TT_FreeTimeTable ();
|
||||||
|
@ -1001,7 +1001,7 @@ static void TT_FillTimeTableFromDB (long UsrCod)
|
||||||
DB_FreeMySQLResult (&mysql_res);
|
DB_FreeMySQLResult (&mysql_res);
|
||||||
|
|
||||||
if (TimeTableIsIncomplete)
|
if (TimeTableIsIncomplete)
|
||||||
Ale_ShowA_old (Ale_INFO,Txt_Incomplete_timetable_for_lack_of_space);
|
Ale_ShowAlert (Ale_INFO,Txt_Incomplete_timetable_for_lack_of_space);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
90
swad_user.c
90
swad_user.c
|
@ -268,7 +268,7 @@ void Usr_InformAboutNumClicksBeforePhoto (void)
|
||||||
if (Gbl.Usrs.Me.NumAccWithoutPhoto)
|
if (Gbl.Usrs.Me.NumAccWithoutPhoto)
|
||||||
{
|
{
|
||||||
if (Gbl.Usrs.Me.NumAccWithoutPhoto >= Pho_MAX_CLICKS_WITHOUT_PHOTO)
|
if (Gbl.Usrs.Me.NumAccWithoutPhoto >= Pho_MAX_CLICKS_WITHOUT_PHOTO)
|
||||||
Ale_ShowA_old (Ale_WARNING,Txt_You_must_send_your_photo_because_);
|
Ale_ShowAlert (Ale_WARNING,Txt_You_must_send_your_photo_because_);
|
||||||
else if (Act_GetBrowserTab (Gbl.Action.Act) == Act_BRW_1ST_TAB)
|
else if (Act_GetBrowserTab (Gbl.Action.Act) == Act_BRW_1ST_TAB)
|
||||||
{
|
{
|
||||||
snprintf (Message,sizeof (Message),
|
snprintf (Message,sizeof (Message),
|
||||||
|
@ -2523,12 +2523,8 @@ void Usr_WelcomeUsr (void)
|
||||||
/***** New year greeting *****/
|
/***** New year greeting *****/
|
||||||
if (Gbl.Now.Date.Day == 1 &&
|
if (Gbl.Now.Date.Day == 1 &&
|
||||||
Gbl.Now.Date.Month == 1)
|
Gbl.Now.Date.Month == 1)
|
||||||
{
|
Ale_ShowAlert (Ale_INFO,Txt_NEW_YEAR_GREETING,
|
||||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
Gbl.Now.Date.Year);
|
||||||
Txt_NEW_YEAR_GREETING,
|
|
||||||
Gbl.Now.Date.Year);
|
|
||||||
Ale_ShowA_old (Ale_INFO,Gbl.Alert.Txt);
|
|
||||||
}
|
|
||||||
|
|
||||||
/***** Birthday congratulation *****/
|
/***** Birthday congratulation *****/
|
||||||
if (Gbl.Usrs.Me.UsrDat.Birthday.Day == Gbl.Now.Date.Day &&
|
if (Gbl.Usrs.Me.UsrDat.Birthday.Day == Gbl.Now.Date.Day &&
|
||||||
|
@ -2589,7 +2585,7 @@ void Usr_WelcomeUsr (void)
|
||||||
else
|
else
|
||||||
/* The current language is not my preferred language
|
/* The current language is not my preferred language
|
||||||
==> change automatically to my language */
|
==> change automatically to my language */
|
||||||
Ale_ShowA_old (Ale_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]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2814,13 +2810,9 @@ unsigned Usr_GetParamOtherUsrIDNickOrEMailAndGetUsrCods (struct ListUsrCods *Lis
|
||||||
Wrong = true;
|
Wrong = true;
|
||||||
|
|
||||||
if (Wrong)
|
if (Wrong)
|
||||||
{
|
|
||||||
/***** String is not a valid user's nickname, email or ID *****/
|
/***** String is not a valid user's nickname, email or ID *****/
|
||||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
Ale_ShowAlert (Ale_WARNING,Txt_The_ID_nickname_or_email_X_is_not_valid,
|
||||||
Txt_The_ID_nickname_or_email_X_is_not_valid,
|
Gbl.Usrs.Other.UsrDat.UsrIDNickOrEmail);
|
||||||
Gbl.Usrs.Other.UsrDat.UsrIDNickOrEmail);
|
|
||||||
Ale_ShowA_old (Ale_WARNING,Gbl.Alert.Txt);
|
|
||||||
}
|
|
||||||
|
|
||||||
return ListUsrCods->NumUsrs;
|
return ListUsrCods->NumUsrs;
|
||||||
}
|
}
|
||||||
|
@ -2922,7 +2914,7 @@ void Usr_ChkUsrAndGetUsrData (void)
|
||||||
{
|
{
|
||||||
Gbl.Action.Act = ActLogOut;
|
Gbl.Action.Act = ActLogOut;
|
||||||
Tab_SetCurrentTab ();
|
Tab_SetCurrentTab ();
|
||||||
Ale_ShowA_old (Ale_WARNING,Txt_The_session_has_expired);
|
Ale_ShowAlert (Ale_WARNING,Txt_The_session_has_expired);
|
||||||
FormLogin.PutForm = true;
|
FormLogin.PutForm = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3237,7 +3229,7 @@ static void Usr_ShowAlertUsrDoesNotExistsOrWrongPassword (void)
|
||||||
|
|
||||||
// Gbl.Action.Act = ActFrmLogIn;
|
// Gbl.Action.Act = ActFrmLogIn;
|
||||||
// Tab_SetCurrentTab ();
|
// Tab_SetCurrentTab ();
|
||||||
Ale_ShowA_old (Ale_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);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
@ -3250,10 +3242,8 @@ static void Usr_ShowAlertThereAreMoreThanOneUsr (void)
|
||||||
|
|
||||||
Gbl.Action.Act = ActFrmLogIn;
|
Gbl.Action.Act = ActFrmLogIn;
|
||||||
Tab_SetCurrentTab ();
|
Tab_SetCurrentTab ();
|
||||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
Ale_ShowAlert (Ale_WARNING,Txt_There_are_more_than_one_user_with_the_ID_X_Please_type_a_nick_or_email,
|
||||||
Txt_There_are_more_than_one_user_with_the_ID_X_Please_type_a_nick_or_email,
|
Gbl.Usrs.Me.UsrIdLogin);
|
||||||
Gbl.Usrs.Me.UsrIdLogin);
|
|
||||||
Ale_ShowA_old (Ale_WARNING,Gbl.Alert.Txt);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
@ -3347,13 +3337,9 @@ void Usr_ShowFormsLogoutAndRole (void)
|
||||||
|
|
||||||
/***** Write message with my new logged role *****/
|
/***** Write message with my new logged role *****/
|
||||||
if (Gbl.Usrs.Me.Role.HasChanged)
|
if (Gbl.Usrs.Me.Role.HasChanged)
|
||||||
{
|
Ale_ShowAlert (Ale_SUCCESS,Txt_You_are_now_LOGGED_IN_as_X,
|
||||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
Txt_logged[Gbl.Usrs.Me.UsrDat.Sex],
|
||||||
Txt_You_are_now_LOGGED_IN_as_X,
|
Txt_ROLES_SINGUL_abc[Gbl.Usrs.Me.Role.Logged][Gbl.Usrs.Me.UsrDat.Sex]);
|
||||||
Txt_logged[Gbl.Usrs.Me.UsrDat.Sex],
|
|
||||||
Txt_ROLES_SINGUL_abc[Gbl.Usrs.Me.Role.Logged][Gbl.Usrs.Me.UsrDat.Sex]);
|
|
||||||
Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
|
|
||||||
}
|
|
||||||
|
|
||||||
/***** Start box *****/
|
/***** Start box *****/
|
||||||
Box_StartBox (NULL,Txt_Session,Usr_PutLinkToLogOut,
|
Box_StartBox (NULL,Txt_Session,Usr_PutLinkToLogOut,
|
||||||
|
@ -5260,10 +5246,8 @@ static void Usr_GetListUsrsFromQuery (char *Query,Rol_Role_t Role,Sco_Scope_t Sc
|
||||||
{
|
{
|
||||||
if (Gbl.Usrs.LstUsrs[Role].NumUsrs > Cfg_MAX_USRS_IN_LIST)
|
if (Gbl.Usrs.LstUsrs[Role].NumUsrs > Cfg_MAX_USRS_IN_LIST)
|
||||||
{
|
{
|
||||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
Ale_ShowAlert (Ale_WARNING,Txt_The_list_of_X_users_is_too_large_to_be_displayed,
|
||||||
Txt_The_list_of_X_users_is_too_large_to_be_displayed,
|
Gbl.Usrs.LstUsrs[Role].NumUsrs);
|
||||||
Gbl.Usrs.LstUsrs[Role].NumUsrs);
|
|
||||||
Ale_ShowA_old (Ale_WARNING,Gbl.Alert.Txt);
|
|
||||||
Abort = true;
|
Abort = true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -5658,12 +5642,8 @@ bool Usr_GetListMsgRecipientsWrittenExplicitelyBySender (bool WriteErrorMsgs)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (WriteErrorMsgs)
|
if (WriteErrorMsgs)
|
||||||
{
|
Ale_ShowAlert (Ale_WARNING,Txt_There_is_no_user_with_nickname_X,
|
||||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
UsrIDNickOrEmail);
|
||||||
Txt_There_is_no_user_with_nickname_X,
|
|
||||||
UsrIDNickOrEmail);
|
|
||||||
Ale_ShowA_old (Ale_WARNING,Gbl.Alert.Txt);
|
|
||||||
}
|
|
||||||
Error = true;
|
Error = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -5678,12 +5658,8 @@ bool Usr_GetListMsgRecipientsWrittenExplicitelyBySender (bool WriteErrorMsgs)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (WriteErrorMsgs)
|
if (WriteErrorMsgs)
|
||||||
{
|
Ale_ShowAlert (Ale_WARNING,Txt_There_is_no_user_with_email_X,
|
||||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
UsrIDNickOrEmail);
|
||||||
Txt_There_is_no_user_with_email_X,
|
|
||||||
UsrIDNickOrEmail);
|
|
||||||
Ale_ShowA_old (Ale_WARNING,Gbl.Alert.Txt);
|
|
||||||
}
|
|
||||||
Error = true;
|
Error = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -5707,36 +5683,24 @@ bool Usr_GetListMsgRecipientsWrittenExplicitelyBySender (bool WriteErrorMsgs)
|
||||||
if (ListUsrCods.NumUsrs > 1) // Two or more user share the same user's ID
|
if (ListUsrCods.NumUsrs > 1) // Two or more user share the same user's ID
|
||||||
{// TODO: Consider forbid IDs here
|
{// TODO: Consider forbid IDs here
|
||||||
if (WriteErrorMsgs)
|
if (WriteErrorMsgs)
|
||||||
{
|
Ale_ShowAlert (Ale_ERROR,Txt_There_are_more_than_one_user_with_the_ID_X_Please_type_a_nick_or_email,
|
||||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
UsrIDNickOrEmail);
|
||||||
Txt_There_are_more_than_one_user_with_the_ID_X_Please_type_a_nick_or_email,
|
|
||||||
UsrIDNickOrEmail);
|
|
||||||
Ale_ShowA_old (Ale_ERROR,Gbl.Alert.Txt);
|
|
||||||
}
|
|
||||||
Error = true;
|
Error = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else // No users found
|
else // No users found
|
||||||
{
|
{
|
||||||
if (WriteErrorMsgs)
|
if (WriteErrorMsgs)
|
||||||
{
|
Ale_ShowAlert (Ale_ERROR,Txt_There_is_no_user_with_ID_nick_or_email_X,
|
||||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
UsrIDNickOrEmail);
|
||||||
Txt_There_is_no_user_with_ID_nick_or_email_X,
|
|
||||||
UsrIDNickOrEmail);
|
|
||||||
Ale_ShowA_old (Ale_ERROR,Gbl.Alert.Txt);
|
|
||||||
}
|
|
||||||
Error = true;
|
Error = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else // String is not a valid user's nickname, email or ID
|
else // String is not a valid user's nickname, email or ID
|
||||||
{
|
{
|
||||||
if (WriteErrorMsgs)
|
if (WriteErrorMsgs)
|
||||||
{
|
Ale_ShowAlert (Ale_WARNING,Txt_The_ID_nickname_or_email_X_is_not_valid,
|
||||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
UsrIDNickOrEmail);
|
||||||
Txt_The_ID_nickname_or_email_X_is_not_valid,
|
|
||||||
UsrIDNickOrEmail);
|
|
||||||
Ale_ShowA_old (Ale_WARNING,Gbl.Alert.Txt);
|
|
||||||
}
|
|
||||||
Error = true;
|
Error = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -8539,7 +8503,7 @@ void Usr_ShowWarningNoUsersFound (Rol_Role_t Role)
|
||||||
Btn_CREATE_BUTTON,Txt_Register_teacher);
|
Btn_CREATE_BUTTON,Txt_Register_teacher);
|
||||||
else
|
else
|
||||||
/***** Show alert *****/
|
/***** Show alert *****/
|
||||||
Ale_ShowA_old (Ale_INFO,Txt_No_users_found[Role]);
|
Ale_ShowAlert (Ale_INFO,Txt_No_users_found[Role]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
@ -9135,7 +9099,7 @@ void Usr_PrintUsrQRCode (void)
|
||||||
Box_EndBox ();
|
Box_EndBox ();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
Ale_ShowA_old (Ale_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_);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
|
@ -454,9 +454,9 @@ static void ZIP_CompressFolderIntoZIP (void)
|
||||||
UncompressedSize = ZIP_CloneDir (Path,PathCompression,Gbl.FileBrowser.Priv.FullPathInTree);
|
UncompressedSize = ZIP_CloneDir (Path,PathCompression,Gbl.FileBrowser.Priv.FullPathInTree);
|
||||||
|
|
||||||
if (UncompressedSize == 0) // Nothing to compress
|
if (UncompressedSize == 0) // Nothing to compress
|
||||||
Ale_ShowA_old (Ale_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
|
else if (UncompressedSize > ZIP_MAX_SIZE_UNCOMPRESSED) // Uncompressed size is too big
|
||||||
Ale_ShowA_old (Ale_WARNING,Txt_The_contents_of_the_folder_are_too_big);
|
Ale_ShowAlert (Ale_WARNING,Txt_The_contents_of_the_folder_are_too_big);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/***** Change to directory of the clone folder
|
/***** Change to directory of the clone folder
|
||||||
|
|
Loading…
Reference in New Issue