mirror of
https://github.com/acanas/swad-core.git
synced 2024-06-01 14:25:27 +02:00
Version 18.46.9
This commit is contained in:
parent
5a6e0111ba
commit
173f347bba
|
@ -384,6 +384,7 @@ OPTIMIZE TABLE debug;
|
||||||
// TODO: Revisar todos los Ale_ShowAlertAndButton
|
// TODO: Revisar todos los Ale_ShowAlertAndButton
|
||||||
|
|
||||||
// TODO: Pasar a una función Ale_ShowAlert (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
|
// TODO: Pasar a una función Ale_ShowAlert (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
|
||||||
|
// TODO: Pasar a una función Ale_ShowAlert (Ale_ERROR,"You don't have permission to edit this project.");
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/****************************** Public constants *****************************/
|
/****************************** Public constants *****************************/
|
||||||
|
@ -404,10 +405,11 @@ En OpenSWAD:
|
||||||
ps2pdf source.ps destination.pdf
|
ps2pdf source.ps destination.pdf
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define Log_PLATFORM_VERSION "SWAD 18.46.8 (2019-02-16)"
|
#define Log_PLATFORM_VERSION "SWAD 18.46.9 (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.8: Feb 16, 2019 Refactoring code related to alerts. (237863 lines)
|
Version 18.46.8: Feb 16, 2019 Refactoring code related to alerts. (237863 lines)
|
||||||
Version 18.46.7: Feb 16, 2019 Refactoring code related to alerts. (237953 lines)
|
Version 18.46.7: Feb 16, 2019 Refactoring code related to alerts. (237953 lines)
|
||||||
Version 18.46.6: Feb 16, 2019 Refactoring code related to alerts. (238019 lines)
|
Version 18.46.6: Feb 16, 2019 Refactoring code related to alerts. (238019 lines)
|
||||||
|
|
|
@ -235,7 +235,7 @@ void Prj_ShowTableAllProjects (void)
|
||||||
Prj_FreeMemProject (&Prj);
|
Prj_FreeMemProject (&Prj);
|
||||||
}
|
}
|
||||||
else // No projects created
|
else // No projects created
|
||||||
Ale_ShowA_old (Ale_INFO,Txt_No_projects);
|
Ale_ShowAlert (Ale_INFO,Txt_No_projects);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
@ -335,7 +335,7 @@ static void Prj_ShowProjectsInCurrentPage (void)
|
||||||
&Pagination);
|
&Pagination);
|
||||||
}
|
}
|
||||||
else // No projects created
|
else // No projects created
|
||||||
Ale_ShowA_old (Ale_INFO,Txt_No_projects);
|
Ale_ShowAlert (Ale_INFO,Txt_No_projects);
|
||||||
|
|
||||||
/***** Button to create a new project *****/
|
/***** Button to create a new project *****/
|
||||||
if (Prj_CheckIfICanCreateProjects ())
|
if (Prj_CheckIfICanCreateProjects ())
|
||||||
|
@ -1963,18 +1963,16 @@ static void Prj_AddUsrToProject (Prj_RoleInProject_t RoleInProject)
|
||||||
Prj_FlushCacheMyRoleInProject ();
|
Prj_FlushCacheMyRoleInProject ();
|
||||||
|
|
||||||
/* Show success alert */
|
/* Show success alert */
|
||||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
Ale_ShowAlert (Ale_SUCCESS,Txt_THE_USER_X_has_been_enroled_as_a_Y_in_the_project,
|
||||||
Txt_THE_USER_X_has_been_enroled_as_a_Y_in_the_project,
|
|
||||||
Gbl.Usrs.Other.UsrDat.FullName,
|
Gbl.Usrs.Other.UsrDat.FullName,
|
||||||
Txt_PROJECT_ROLES_SINGUL_abc[RoleInProject]);
|
Txt_PROJECT_ROLES_SINGUL_abc[RoleInProject]);
|
||||||
Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/***** Free list of users' codes *****/
|
/***** Free list of users' codes *****/
|
||||||
Usr_FreeListUsrCods (&ListUsrCods);
|
Usr_FreeListUsrCods (&ListUsrCods);
|
||||||
}
|
}
|
||||||
else // No users found
|
else // No users found
|
||||||
Ale_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_);
|
||||||
|
|
||||||
/***** Put form to edit project again *****/
|
/***** Put form to edit project again *****/
|
||||||
Prj_RequestCreatOrEditPrj (PrjCod);
|
Prj_RequestCreatOrEditPrj (PrjCod);
|
||||||
|
@ -2059,10 +2057,10 @@ static void Prj_ReqRemUsrFromPrj (Prj_RoleInProject_t RoleInProject)
|
||||||
Ale_ShowAlertAndButton2 (ActUnk,NULL,NULL,NULL,Btn_NO_BUTTON,NULL);
|
Ale_ShowAlertAndButton2 (ActUnk,NULL,NULL,NULL,Btn_NO_BUTTON,NULL);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
Ale_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_);
|
||||||
}
|
}
|
||||||
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_);
|
||||||
|
|
||||||
/***** Free memory of the project *****/
|
/***** Free memory of the project *****/
|
||||||
Prj_FreeMemProject (&Prj);
|
Prj_FreeMemProject (&Prj);
|
||||||
|
@ -2129,18 +2127,16 @@ static void Prj_RemUsrFromPrj (Prj_RoleInProject_t RoleInProject)
|
||||||
Prj_FlushCacheMyRoleInProject ();
|
Prj_FlushCacheMyRoleInProject ();
|
||||||
|
|
||||||
/***** Show success alert *****/
|
/***** Show success alert *****/
|
||||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
Ale_ShowAlert (Ale_SUCCESS,Txt_THE_USER_X_has_been_removed_as_a_Y_from_the_project_Z,
|
||||||
Txt_THE_USER_X_has_been_removed_as_a_Y_from_the_project_Z,
|
|
||||||
Gbl.Usrs.Other.UsrDat.FullName,
|
Gbl.Usrs.Other.UsrDat.FullName,
|
||||||
Txt_PROJECT_ROLES_SINGUL_abc[RoleInProject],
|
Txt_PROJECT_ROLES_SINGUL_abc[RoleInProject],
|
||||||
Prj.Title);
|
Prj.Title);
|
||||||
Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
|
|
||||||
}
|
}
|
||||||
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_);
|
||||||
}
|
}
|
||||||
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_);
|
||||||
|
|
||||||
/***** Free memory of the project *****/
|
/***** Free memory of the project *****/
|
||||||
Prj_FreeMemProject (&Prj);
|
Prj_FreeMemProject (&Prj);
|
||||||
|
@ -2692,7 +2688,7 @@ void Prj_ReqRemProject (void)
|
||||||
Btn_REMOVE_BUTTON,Txt_Remove_project);
|
Btn_REMOVE_BUTTON,Txt_Remove_project);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
Ale_ShowA_old (Ale_ERROR,"You don't have permission to edit this project.");
|
Ale_ShowAlert (Ale_ERROR,"You don't have permission to edit this project.");
|
||||||
|
|
||||||
/***** Free memory of the project *****/
|
/***** Free memory of the project *****/
|
||||||
Prj_FreeMemProject (&Prj);
|
Prj_FreeMemProject (&Prj);
|
||||||
|
@ -2751,13 +2747,11 @@ void Prj_RemoveProject (void)
|
||||||
Fil_RemoveTree (PathRelPrj);
|
Fil_RemoveTree (PathRelPrj);
|
||||||
|
|
||||||
/***** 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_Project_X_removed,
|
||||||
Txt_Project_X_removed,
|
|
||||||
Prj.Title);
|
Prj.Title);
|
||||||
Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
Ale_ShowA_old (Ale_ERROR,"You don't have permission to edit this project.");
|
Ale_ShowAlert (Ale_ERROR,"You don't have permission to edit this project.");
|
||||||
|
|
||||||
/***** Free memory of the project *****/
|
/***** Free memory of the project *****/
|
||||||
Prj_FreeMemProject (&Prj);
|
Prj_FreeMemProject (&Prj);
|
||||||
|
@ -2795,13 +2789,11 @@ void Prj_HideProject (void)
|
||||||
Prj.PrjCod,Gbl.CurrentCrs.Crs.CrsCod);
|
Prj.PrjCod,Gbl.CurrentCrs.Crs.CrsCod);
|
||||||
|
|
||||||
/***** Write message to show the change made *****/
|
/***** Write message to show the change made *****/
|
||||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
Ale_ShowAlert (Ale_SUCCESS,Txt_Project_X_is_now_hidden,
|
||||||
Txt_Project_X_is_now_hidden,
|
|
||||||
Prj.Title);
|
Prj.Title);
|
||||||
Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
Ale_ShowA_old (Ale_ERROR,"You don't have permission to edit this project.");
|
Ale_ShowAlert (Ale_ERROR,"You don't have permission to edit this project.");
|
||||||
|
|
||||||
/***** Free memory of the project *****/
|
/***** Free memory of the project *****/
|
||||||
Prj_FreeMemProject (&Prj);
|
Prj_FreeMemProject (&Prj);
|
||||||
|
@ -2839,13 +2831,11 @@ void Prj_ShowProject (void)
|
||||||
Prj.PrjCod,Gbl.CurrentCrs.Crs.CrsCod);
|
Prj.PrjCod,Gbl.CurrentCrs.Crs.CrsCod);
|
||||||
|
|
||||||
/***** Write message to show the change made *****/
|
/***** Write message to show the change made *****/
|
||||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
Ale_ShowAlert (Ale_SUCCESS,Txt_Project_X_is_now_visible,
|
||||||
Txt_Project_X_is_now_visible,
|
|
||||||
Prj.Title);
|
Prj.Title);
|
||||||
Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
Ale_ShowA_old (Ale_ERROR,"You don't have permission to edit this project.");
|
Ale_ShowAlert (Ale_ERROR,"You don't have permission to edit this project.");
|
||||||
|
|
||||||
/***** Free memory of the project *****/
|
/***** Free memory of the project *****/
|
||||||
Prj_FreeMemProject (&Prj);
|
Prj_FreeMemProject (&Prj);
|
||||||
|
@ -3248,7 +3238,7 @@ void Prj_RecFormProject (void)
|
||||||
if (!Prj.Title[0]) // If there is not a project title
|
if (!Prj.Title[0]) // If there is not a project title
|
||||||
{
|
{
|
||||||
NewProjectIsCorrect = false;
|
NewProjectIsCorrect = false;
|
||||||
Ale_ShowA_old (Ale_WARNING,Txt_You_must_specify_the_title_of_the_project);
|
Ale_ShowAlert (Ale_WARNING,Txt_You_must_specify_the_title_of_the_project);
|
||||||
}
|
}
|
||||||
|
|
||||||
/***** Create a new project or update an existing one *****/
|
/***** Create a new project or update an existing one *****/
|
||||||
|
@ -3260,10 +3250,8 @@ void Prj_RecFormProject (void)
|
||||||
Prj_CreateProject (&Prj); // Add new project to database
|
Prj_CreateProject (&Prj); // Add new project to database
|
||||||
|
|
||||||
/* Write success message */
|
/* Write success message */
|
||||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
Ale_ShowAlert (Ale_SUCCESS,Txt_Created_new_project_X,
|
||||||
Txt_Created_new_project_X,
|
|
||||||
Prj.Title);
|
Prj.Title);
|
||||||
Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
|
|
||||||
}
|
}
|
||||||
else if (NewProjectIsCorrect)
|
else if (NewProjectIsCorrect)
|
||||||
{
|
{
|
||||||
|
@ -3271,7 +3259,7 @@ void Prj_RecFormProject (void)
|
||||||
Prj_UpdateProject (&Prj);
|
Prj_UpdateProject (&Prj);
|
||||||
|
|
||||||
/* Write success message */
|
/* Write success message */
|
||||||
Ale_ShowA_old (Ale_SUCCESS,Txt_The_project_has_been_modified);
|
Ale_ShowAlert (Ale_SUCCESS,Txt_The_project_has_been_modified);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -3281,7 +3269,7 @@ void Prj_RecFormProject (void)
|
||||||
Prj_RequestCreatOrEditPrj (Prj.PrjCod);
|
Prj_RequestCreatOrEditPrj (Prj.PrjCod);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
Ale_ShowA_old (Ale_ERROR,"You don't have permission to edit this project.");
|
Ale_ShowAlert (Ale_ERROR,"You don't have permission to edit this project.");
|
||||||
|
|
||||||
/***** Free memory of the project *****/
|
/***** Free memory of the project *****/
|
||||||
Prj_FreeMemProject (&Prj);
|
Prj_FreeMemProject (&Prj);
|
||||||
|
|
|
@ -206,12 +206,8 @@ void Rec_ReqEditRecordFields (void)
|
||||||
Box_EndBoxTable ();
|
Box_EndBoxTable ();
|
||||||
}
|
}
|
||||||
else // No fields of records found for current course in the database
|
else // No fields of records found for current course in the database
|
||||||
{
|
Ale_ShowAlert (Ale_INFO,Txt_There_are_no_record_fields_in_the_course_X,
|
||||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
|
||||||
Txt_There_are_no_record_fields_in_the_course_X,
|
|
||||||
Gbl.CurrentCrs.Crs.FullName);
|
Gbl.CurrentCrs.Crs.FullName);
|
||||||
Ale_ShowA_old (Ale_INFO,Gbl.Alert.Txt);
|
|
||||||
}
|
|
||||||
|
|
||||||
/***** Put a form to create a new record field *****/
|
/***** Put a form to create a new record field *****/
|
||||||
Rec_ShowFormCreateRecordField ();
|
Rec_ShowFormCreateRecordField ();
|
||||||
|
@ -488,17 +484,13 @@ void Rec_ReceiveFormField (void)
|
||||||
{
|
{
|
||||||
/***** If the field already was in the database... *****/
|
/***** If the field already was in the database... *****/
|
||||||
if (Rec_CheckIfRecordFieldIsRepeated (Gbl.CurrentCrs.Records.Field.Name))
|
if (Rec_CheckIfRecordFieldIsRepeated (Gbl.CurrentCrs.Records.Field.Name))
|
||||||
{
|
Ale_ShowAlert (Ale_ERROR,Txt_The_record_field_X_already_exists,
|
||||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
|
||||||
Txt_The_record_field_X_already_exists,
|
|
||||||
Gbl.CurrentCrs.Records.Field.Name);
|
Gbl.CurrentCrs.Records.Field.Name);
|
||||||
Ale_ShowA_old (Ale_ERROR,Gbl.Alert.Txt);
|
|
||||||
}
|
|
||||||
else // Add the new field to the database
|
else // Add the new field to the database
|
||||||
Rec_CreateRecordField ();
|
Rec_CreateRecordField ();
|
||||||
}
|
}
|
||||||
else // If there is not name
|
else // If there is not name
|
||||||
Ale_ShowA_old (Ale_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 *****/
|
/***** Show the form again *****/
|
||||||
Rec_ReqEditRecordFields ();
|
Rec_ReqEditRecordFields ();
|
||||||
|
@ -594,7 +586,7 @@ void Rec_CreateRecordField (void)
|
||||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||||
Txt_Created_new_record_field_X,
|
Txt_Created_new_record_field_X,
|
||||||
Gbl.CurrentCrs.Records.Field.Name);
|
Gbl.CurrentCrs.Records.Field.Name);
|
||||||
Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
|
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
@ -707,10 +699,8 @@ void Rec_RemoveFieldFromDB (void)
|
||||||
Gbl.CurrentCrs.Records.Field.FieldCod);
|
Gbl.CurrentCrs.Records.Field.FieldCod);
|
||||||
|
|
||||||
/***** 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_Record_field_X_removed,
|
||||||
Txt_Record_field_X_removed,
|
|
||||||
Gbl.CurrentCrs.Records.Field.Name);
|
Gbl.CurrentCrs.Records.Field.Name);
|
||||||
Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
|
|
||||||
|
|
||||||
/***** Show the form again *****/
|
/***** Show the form again *****/
|
||||||
Rec_ReqEditRecordFields ();
|
Rec_ReqEditRecordFields ();
|
||||||
|
@ -813,12 +803,8 @@ void Rec_RenameField (void)
|
||||||
|
|
||||||
/***** Check if new name is empty *****/
|
/***** Check if new name is empty *****/
|
||||||
if (!NewFieldName[0])
|
if (!NewFieldName[0])
|
||||||
{
|
Ale_ShowAlert (Ale_ERROR,Txt_You_can_not_leave_the_name_of_the_field_X_empty,
|
||||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
|
||||||
Txt_You_can_not_leave_the_name_of_the_field_X_empty,
|
|
||||||
Gbl.CurrentCrs.Records.Field.Name);
|
Gbl.CurrentCrs.Records.Field.Name);
|
||||||
Ale_ShowA_old (Ale_ERROR,Gbl.Alert.Txt);
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/***** Check if the name of the olde field match the new one
|
/***** Check if the name of the olde field match the new one
|
||||||
|
@ -827,12 +813,8 @@ void Rec_RenameField (void)
|
||||||
{
|
{
|
||||||
/***** If the group ya estaba in the database... *****/
|
/***** If the group ya estaba in the database... *****/
|
||||||
if (Rec_CheckIfRecordFieldIsRepeated (NewFieldName))
|
if (Rec_CheckIfRecordFieldIsRepeated (NewFieldName))
|
||||||
{
|
Ale_ShowAlert (Ale_ERROR,Txt_The_record_field_X_already_exists,
|
||||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
|
||||||
Txt_The_record_field_X_already_exists,
|
|
||||||
NewFieldName);
|
NewFieldName);
|
||||||
Ale_ShowA_old (Ale_ERROR,Gbl.Alert.Txt);
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* Update the table of fields changing then old name by the new one */
|
/* Update the table of fields changing then old name by the new one */
|
||||||
|
@ -842,19 +824,13 @@ void Rec_RenameField (void)
|
||||||
NewFieldName,Gbl.CurrentCrs.Records.Field.FieldCod);
|
NewFieldName,Gbl.CurrentCrs.Records.Field.FieldCod);
|
||||||
|
|
||||||
/***** 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_record_field_X_has_been_renamed_as_Y,
|
||||||
Txt_The_record_field_X_has_been_renamed_as_Y,
|
|
||||||
Gbl.CurrentCrs.Records.Field.Name,NewFieldName);
|
Gbl.CurrentCrs.Records.Field.Name,NewFieldName);
|
||||||
Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else // The same name
|
else // The same name
|
||||||
{
|
Ale_ShowAlert (Ale_INFO,Txt_The_name_of_the_field_X_has_not_changed,
|
||||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
|
||||||
Txt_The_name_of_the_field_X_has_not_changed,
|
|
||||||
NewFieldName);
|
NewFieldName);
|
||||||
Ale_ShowA_old (Ale_INFO,Gbl.Alert.Txt);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/***** Show the form again *****/
|
/***** Show the form again *****/
|
||||||
|
@ -891,12 +867,8 @@ void Rec_ChangeLinesField (void)
|
||||||
/***** Check if the old number of rows matches the new one
|
/***** Check if the old number of rows matches the new one
|
||||||
(this happens when return is pressed without changes) *****/
|
(this happens when return is pressed without changes) *****/
|
||||||
if (Gbl.CurrentCrs.Records.Field.NumLines == NewNumLines)
|
if (Gbl.CurrentCrs.Records.Field.NumLines == NewNumLines)
|
||||||
{
|
Ale_ShowAlert (Ale_INFO,Txt_The_number_of_editing_lines_in_the_record_field_X_has_not_changed,
|
||||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
|
||||||
Txt_The_number_of_editing_lines_in_the_record_field_X_has_not_changed,
|
|
||||||
Gbl.CurrentCrs.Records.Field.Name);
|
Gbl.CurrentCrs.Records.Field.Name);
|
||||||
Ale_ShowA_old (Ale_INFO,Gbl.Alert.Txt);
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/***** Update of the table of fields changing the old maximum of students by the new one *****/
|
/***** Update of the table of fields changing the old maximum of students by the new one *****/
|
||||||
|
@ -906,10 +878,8 @@ void Rec_ChangeLinesField (void)
|
||||||
NewNumLines,Gbl.CurrentCrs.Records.Field.FieldCod);
|
NewNumLines,Gbl.CurrentCrs.Records.Field.FieldCod);
|
||||||
|
|
||||||
/***** 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_From_now_on_the_number_of_editing_lines_of_the_field_X_is_Y,
|
||||||
Txt_From_now_on_the_number_of_editing_lines_of_the_field_X_is_Y,
|
|
||||||
Gbl.CurrentCrs.Records.Field.Name,NewNumLines);
|
Gbl.CurrentCrs.Records.Field.Name,NewNumLines);
|
||||||
Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/***** Show the form again *****/
|
/***** Show the form again *****/
|
||||||
|
@ -945,12 +915,8 @@ void Rec_ChangeVisibilityField (void)
|
||||||
/***** Check if the old visibility matches the new one
|
/***** Check if the old visibility matches the new one
|
||||||
(this happens when return is pressed without changes) *****/
|
(this happens when return is pressed without changes) *****/
|
||||||
if (Gbl.CurrentCrs.Records.Field.Visibility == NewVisibility)
|
if (Gbl.CurrentCrs.Records.Field.Visibility == NewVisibility)
|
||||||
{
|
Ale_ShowAlert (Ale_INFO,Txt_The_visibility_of_the_record_field_X_has_not_changed,
|
||||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
|
||||||
Txt_The_visibility_of_the_record_field_X_has_not_changed,
|
|
||||||
Gbl.CurrentCrs.Records.Field.Name);
|
Gbl.CurrentCrs.Records.Field.Name);
|
||||||
Ale_ShowA_old (Ale_INFO,Gbl.Alert.Txt);
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/***** Update of the table of fields changing the old visibility by the new *****/
|
/***** Update of the table of fields changing the old visibility by the new *****/
|
||||||
|
@ -961,10 +927,8 @@ void Rec_ChangeVisibilityField (void)
|
||||||
Gbl.CurrentCrs.Records.Field.FieldCod);
|
Gbl.CurrentCrs.Records.Field.FieldCod);
|
||||||
|
|
||||||
/***** 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_RECORD_FIELD_VISIBILITY_MSG[NewVisibility],
|
||||||
Txt_RECORD_FIELD_VISIBILITY_MSG[NewVisibility],
|
|
||||||
Gbl.CurrentCrs.Records.Field.Name);
|
Gbl.CurrentCrs.Records.Field.Name);
|
||||||
Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/***** Show the form again *****/
|
/***** Show the form again *****/
|
||||||
|
@ -1038,7 +1002,7 @@ static void Rec_ListRecordsGsts (Rec_SharedRecordViewType_t TypeOfView)
|
||||||
/* Check the number of students to show */
|
/* Check the number of students to show */
|
||||||
if (!Usr_CountNumUsrsInListOfSelectedUsrs ()) // If no students selected...
|
if (!Usr_CountNumUsrsInListOfSelectedUsrs ()) // If no students selected...
|
||||||
{ // ...write warning notice
|
{ // ...write warning notice
|
||||||
Ale_ShowA_old (Ale_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
|
Usr_SeeGuests (); // ...show again the form
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1236,7 +1200,7 @@ static void Rec_ListRecordsStds (Rec_SharedRecordViewType_t ShaTypeOfView,
|
||||||
/* Check the number of students to show */
|
/* Check the number of students to show */
|
||||||
if (!Usr_CountNumUsrsInListOfSelectedUsrs ()) // If no students selected...
|
if (!Usr_CountNumUsrsInListOfSelectedUsrs ()) // If no students selected...
|
||||||
{ // ...write warning notice
|
{ // ...write warning notice
|
||||||
Ale_ShowA_old (Ale_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
|
Usr_SeeStudents (); // ...show again the form
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1460,7 +1424,7 @@ static void Rec_ListRecordsTchs (Rec_SharedRecordViewType_t TypeOfView)
|
||||||
/* Check the number of teachers to show */
|
/* Check the number of teachers to show */
|
||||||
if (!Usr_CountNumUsrsInListOfSelectedUsrs ()) // If no teachers selected...
|
if (!Usr_CountNumUsrsInListOfSelectedUsrs ()) // If no teachers selected...
|
||||||
{ // ...write warning notice
|
{ // ...write warning notice
|
||||||
Ale_ShowA_old (Ale_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
|
Usr_SeeTeachers (); // ...show again the form
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -2062,8 +2026,8 @@ static void Rec_ShowMyCrsRecordUpdated (void)
|
||||||
{
|
{
|
||||||
extern const char *Txt_Your_record_card_in_this_course_has_been_updated;
|
extern const char *Txt_Your_record_card_in_this_course_has_been_updated;
|
||||||
|
|
||||||
/***** Write mensaje of success *****/
|
/***** Write success message *****/
|
||||||
Ale_ShowA_old (Ale_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 *****/
|
/***** Shared record *****/
|
||||||
Rec_ShowSharedUsrRecord (Rec_SHA_RECORD_LIST,&Gbl.Usrs.Me.UsrDat,NULL);
|
Rec_ShowSharedUsrRecord (Rec_SHA_RECORD_LIST,&Gbl.Usrs.Me.UsrDat,NULL);
|
||||||
|
@ -2157,7 +2121,7 @@ void Rec_ShowMySharedRecordUpd (void)
|
||||||
extern const char *Txt_Your_personal_data_have_been_updated;
|
extern const char *Txt_Your_personal_data_have_been_updated;
|
||||||
|
|
||||||
/***** Write alert *****/
|
/***** Write alert *****/
|
||||||
Ale_ShowA_old (Ale_SUCCESS,Txt_Your_personal_data_have_been_updated);
|
Ale_ShowAlert (Ale_SUCCESS,Txt_Your_personal_data_have_been_updated);
|
||||||
|
|
||||||
/***** Show my record and other data *****/
|
/***** Show my record and other data *****/
|
||||||
Rec_ShowMySharedRecordAndMore ();
|
Rec_ShowMySharedRecordAndMore ();
|
||||||
|
@ -3964,28 +3928,21 @@ void Rec_ShowMySharedRecordAndMore (void)
|
||||||
/***** If user has no name and surname, sex... *****/
|
/***** If user has no name and surname, sex... *****/
|
||||||
if (!Gbl.Usrs.Me.UsrDat.FirstName[0] ||
|
if (!Gbl.Usrs.Me.UsrDat.FirstName[0] ||
|
||||||
!Gbl.Usrs.Me.UsrDat.Surname1[0]) // 1. No name
|
!Gbl.Usrs.Me.UsrDat.Surname1[0]) // 1. No name
|
||||||
Ale_ShowA_old (Ale_WARNING,
|
Ale_ShowAlert (Ale_WARNING,Txt_Please_fill_in_your_record_card_including_your_name);
|
||||||
Txt_Please_fill_in_your_record_card_including_your_name);
|
|
||||||
else if (Gbl.Usrs.Me.UsrDat.Sex == Usr_SEX_UNKNOWN) // 2. No sex
|
else if (Gbl.Usrs.Me.UsrDat.Sex == Usr_SEX_UNKNOWN) // 2. No sex
|
||||||
Ale_ShowA_old (Ale_WARNING,
|
Ale_ShowAlert (Ale_WARNING,Txt_Please_fill_in_your_record_card_including_your_sex);
|
||||||
Txt_Please_fill_in_your_record_card_including_your_sex);
|
|
||||||
else if (Gbl.Usrs.Me.UsrDat.CtyCod < 0) // 3. No country
|
else if (Gbl.Usrs.Me.UsrDat.CtyCod < 0) // 3. No country
|
||||||
Ale_ShowA_old (Ale_WARNING,
|
Ale_ShowAlert (Ale_WARNING,Txt_Please_fill_in_your_record_card_including_your_country_nationality);
|
||||||
Txt_Please_fill_in_your_record_card_including_your_country_nationality);
|
|
||||||
else if (Gbl.Usrs.Me.UsrDat.InsCtyCod < 0) // 4. No institution country
|
else if (Gbl.Usrs.Me.UsrDat.InsCtyCod < 0) // 4. No institution country
|
||||||
Ale_ShowA_old (Ale_WARNING,
|
Ale_ShowAlert (Ale_WARNING,Txt_Please_select_the_country_of_your_institution);
|
||||||
Txt_Please_select_the_country_of_your_institution);
|
|
||||||
else if (Gbl.Usrs.Me.UsrDat.InsCod < 0) // 5. No institution
|
else if (Gbl.Usrs.Me.UsrDat.InsCod < 0) // 5. No institution
|
||||||
Ale_ShowA_old (Ale_WARNING,
|
Ale_ShowAlert (Ale_WARNING,Txt_Please_fill_in_your_institution);
|
||||||
Txt_Please_fill_in_your_institution);
|
|
||||||
else if (IAmATeacher)
|
else if (IAmATeacher)
|
||||||
{
|
{
|
||||||
if (Gbl.Usrs.Me.UsrDat.Tch.CtrCod < 0) // 6. No centre
|
if (Gbl.Usrs.Me.UsrDat.Tch.CtrCod < 0) // 6. No centre
|
||||||
Ale_ShowA_old (Ale_WARNING,
|
Ale_ShowAlert (Ale_WARNING,Txt_Please_fill_in_your_centre);
|
||||||
Txt_Please_fill_in_your_centre);
|
|
||||||
else if (Gbl.Usrs.Me.UsrDat.Tch.DptCod < 0) // 7. No deparment
|
else if (Gbl.Usrs.Me.UsrDat.Tch.DptCod < 0) // 7. No deparment
|
||||||
Ale_ShowA_old (Ale_WARNING,
|
Ale_ShowAlert (Ale_WARNING,Txt_Please_fill_in_your_department);
|
||||||
Txt_Please_fill_in_your_department);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/***** Start container *****/
|
/***** Start container *****/
|
||||||
|
|
|
@ -440,7 +440,7 @@ static void Sch_SearchInDB (void)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (NumResults == 0)
|
if (NumResults == 0)
|
||||||
Ale_ShowA_old (Ale_INFO,Txt_No_results);
|
Ale_ShowAlert (Ale_INFO,Txt_No_results);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
@ -653,7 +653,7 @@ static unsigned Sch_SearchUsrsInDB (Rol_Role_t Role)
|
||||||
// Too short
|
// Too short
|
||||||
if (!WarningMessageWritten) // To avoid repetitions
|
if (!WarningMessageWritten) // To avoid repetitions
|
||||||
{
|
{
|
||||||
Ale_ShowA_old (Ale_WARNING,Txt_The_search_text_must_be_longer);
|
Ale_ShowAlert (Ale_WARNING,Txt_The_search_text_must_be_longer);
|
||||||
WarningMessageWritten = true;
|
WarningMessageWritten = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1125,7 +1125,7 @@ static void Soc_ShowWarningYouDontFollowAnyUser (void)
|
||||||
if (!Fol_GetNumFollowing (Gbl.Usrs.Me.UsrDat.UsrCod))
|
if (!Fol_GetNumFollowing (Gbl.Usrs.Me.UsrDat.UsrCod))
|
||||||
{
|
{
|
||||||
/***** Show warning if I do not follow anyone *****/
|
/***** Show warning if I do not follow anyone *****/
|
||||||
Ale_ShowA_old (Ale_WARNING,Txt_You_dont_follow_any_user);
|
Ale_ShowAlert (Ale_WARNING,Txt_You_dont_follow_any_user);
|
||||||
|
|
||||||
/***** Put link to show users to follow *****/
|
/***** Put link to show users to follow *****/
|
||||||
fprintf (Gbl.F.Out,"<div class=\"CONTEXT_MENU\">");
|
fprintf (Gbl.F.Out,"<div class=\"CONTEXT_MENU\">");
|
||||||
|
@ -1331,7 +1331,7 @@ static void Soc_WriteSocialNote (const struct SocialNote *SocNot,
|
||||||
if (SocNot->NotCod <= 0 ||
|
if (SocNot->NotCod <= 0 ||
|
||||||
SocNot->NoteType == Soc_NOTE_UNKNOWN ||
|
SocNot->NoteType == Soc_NOTE_UNKNOWN ||
|
||||||
SocNot->UsrCod <= 0)
|
SocNot->UsrCod <= 0)
|
||||||
Ale_ShowA_old (Ale_ERROR,"Error in social note.");
|
Ale_ShowAlert (Ale_ERROR,"Error in social note.");
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/***** Initialize location in hierarchy *****/
|
/***** Initialize location in hierarchy *****/
|
||||||
|
@ -2571,7 +2571,7 @@ static void Soc_WriteSocialComment (struct SocialComment *SocCom,
|
||||||
if (SocCom->PubCod <= 0 ||
|
if (SocCom->PubCod <= 0 ||
|
||||||
SocCom->NotCod <= 0 ||
|
SocCom->NotCod <= 0 ||
|
||||||
SocCom->UsrCod <= 0)
|
SocCom->UsrCod <= 0)
|
||||||
Ale_ShowA_old (Ale_ERROR,"Error in social comment.");
|
Ale_ShowAlert (Ale_ERROR,"Error in social comment.");
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/***** Get author's data *****/
|
/***** Get author's data *****/
|
||||||
|
@ -3004,7 +3004,7 @@ static long Soc_ReceiveComment (void)
|
||||||
Img_ImageDestructor (&Image);
|
Img_ImageDestructor (&Image);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
Ale_ShowA_old (Ale_WARNING,Txt_The_original_post_no_longer_exists);
|
Ale_ShowAlert (Ale_WARNING,Txt_The_original_post_no_longer_exists);
|
||||||
|
|
||||||
return SocNot.NotCod;
|
return SocNot.NotCod;
|
||||||
}
|
}
|
||||||
|
@ -3083,7 +3083,7 @@ static long Soc_ShareSocialNote (void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
Ale_ShowA_old (Ale_WARNING,Txt_The_original_post_no_longer_exists);
|
Ale_ShowAlert (Ale_WARNING,Txt_The_original_post_no_longer_exists);
|
||||||
|
|
||||||
return SocNot.NotCod;
|
return SocNot.NotCod;
|
||||||
}
|
}
|
||||||
|
@ -3169,7 +3169,7 @@ static long Soc_FavSocialNote (void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
Ale_ShowA_old (Ale_WARNING,Txt_The_original_post_no_longer_exists);
|
Ale_ShowAlert (Ale_WARNING,Txt_The_original_post_no_longer_exists);
|
||||||
|
|
||||||
return SocNot.NotCod;
|
return SocNot.NotCod;
|
||||||
}
|
}
|
||||||
|
@ -3255,7 +3255,7 @@ static long Soc_FavSocialComment (void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
Ale_ShowA_old (Ale_WARNING,Txt_The_comment_no_longer_exists);
|
Ale_ShowAlert (Ale_WARNING,Txt_The_comment_no_longer_exists);
|
||||||
|
|
||||||
/***** Free image *****/
|
/***** Free image *****/
|
||||||
Img_ImageDestructor (&SocCom.Image);
|
Img_ImageDestructor (&SocCom.Image);
|
||||||
|
@ -3381,7 +3381,7 @@ static long Soc_UnshareSocialNote (void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
Ale_ShowA_old (Ale_WARNING,Txt_The_original_post_no_longer_exists);
|
Ale_ShowAlert (Ale_WARNING,Txt_The_original_post_no_longer_exists);
|
||||||
|
|
||||||
return SocNot.NotCod;
|
return SocNot.NotCod;
|
||||||
}
|
}
|
||||||
|
@ -3465,7 +3465,7 @@ static long Soc_UnfavSocialNote (void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
Ale_ShowA_old (Ale_WARNING,Txt_The_original_post_no_longer_exists);
|
Ale_ShowAlert (Ale_WARNING,Txt_The_original_post_no_longer_exists);
|
||||||
|
|
||||||
return SocNot.NotCod;
|
return SocNot.NotCod;
|
||||||
}
|
}
|
||||||
|
@ -3549,7 +3549,7 @@ static long Soc_UnfavSocialComment (void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
Ale_ShowA_old (Ale_WARNING,Txt_The_comment_no_longer_exists);
|
Ale_ShowAlert (Ale_WARNING,Txt_The_comment_no_longer_exists);
|
||||||
|
|
||||||
/***** Free image *****/
|
/***** Free image *****/
|
||||||
Img_ImageDestructor (&SocCom.Image);
|
Img_ImageDestructor (&SocCom.Image);
|
||||||
|
@ -3630,7 +3630,7 @@ static void Soc_RequestRemovalSocialNote (void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
Ale_ShowA_old (Ale_WARNING,Txt_The_original_post_no_longer_exists);
|
Ale_ShowAlert (Ale_WARNING,Txt_The_original_post_no_longer_exists);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
@ -3704,11 +3704,11 @@ static void Soc_RemoveSocialNote (void)
|
||||||
Soc_RemoveASocialNoteFromDB (&SocNot);
|
Soc_RemoveASocialNoteFromDB (&SocNot);
|
||||||
|
|
||||||
/***** Message of success *****/
|
/***** Message of success *****/
|
||||||
Ale_ShowA_old (Ale_SUCCESS,Txt_Post_removed);
|
Ale_ShowAlert (Ale_SUCCESS,Txt_Post_removed);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
Ale_ShowA_old (Ale_WARNING,Txt_The_original_post_no_longer_exists);
|
Ale_ShowAlert (Ale_WARNING,Txt_The_original_post_no_longer_exists);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
@ -3964,7 +3964,7 @@ static void Soc_RequestRemovalSocialComment (void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
Ale_ShowA_old (Ale_WARNING,Txt_The_comment_no_longer_exists);
|
Ale_ShowAlert (Ale_WARNING,Txt_The_comment_no_longer_exists);
|
||||||
|
|
||||||
/***** Free image *****/
|
/***** Free image *****/
|
||||||
Img_ImageDestructor (&SocCom.Image);
|
Img_ImageDestructor (&SocCom.Image);
|
||||||
|
@ -4043,11 +4043,11 @@ static void Soc_RemoveSocialComment (void)
|
||||||
Soc_RemoveASocialCommentFromDB (&SocCom);
|
Soc_RemoveASocialCommentFromDB (&SocCom);
|
||||||
|
|
||||||
/***** Message of success *****/
|
/***** Message of success *****/
|
||||||
Ale_ShowA_old (Ale_SUCCESS,Txt_Comment_removed);
|
Ale_ShowAlert (Ale_SUCCESS,Txt_Comment_removed);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
Ale_ShowA_old (Ale_WARNING,Txt_The_comment_no_longer_exists);
|
Ale_ShowAlert (Ale_WARNING,Txt_The_comment_no_longer_exists);
|
||||||
|
|
||||||
/***** Free image *****/
|
/***** Free image *****/
|
||||||
Img_ImageDestructor (&SocCom.Image);
|
Img_ImageDestructor (&SocCom.Image);
|
||||||
|
|
|
@ -478,7 +478,7 @@ void Sta_AskShowCrsHits (void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else // No teachers nor students found
|
else // No teachers nor students found
|
||||||
Ale_ShowA_old (Ale_WARNING,Txt_No_teachers_or_students_found);
|
Ale_ShowAlert (Ale_WARNING,Txt_No_teachers_or_students_found);
|
||||||
|
|
||||||
/***** End section with user list *****/
|
/***** End section with user list *****/
|
||||||
Lay_EndSection ();
|
Lay_EndSection ();
|
||||||
|
@ -861,7 +861,7 @@ static void Sta_ShowHits (Sta_GlobalOrCourseAccesses_t GlobalOrCourse)
|
||||||
Gbl.Stat.CountType == Sta_CLICKS_PER_USR)) // These types of query will never give a valid result
|
Gbl.Stat.CountType == Sta_CLICKS_PER_USR)) // These types of query will never give a valid result
|
||||||
{
|
{
|
||||||
/* Write warning message and abort */
|
/* Write warning message and abort */
|
||||||
Ale_ShowA_old (Ale_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);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -900,7 +900,7 @@ static void Sta_ShowHits (Sta_GlobalOrCourseAccesses_t GlobalOrCourse)
|
||||||
if (!Usr_CountNumUsrsInListOfSelectedUsrs ()) // Error: there are no users selected
|
if (!Usr_CountNumUsrsInListOfSelectedUsrs ()) // Error: there are no users selected
|
||||||
{
|
{
|
||||||
/* Write warning message, clean and abort */
|
/* Write warning message, clean and abort */
|
||||||
Ale_ShowA_old (Ale_WARNING,Txt_You_must_select_one_ore_more_users);
|
Ale_ShowAlert (Ale_WARNING,Txt_You_must_select_one_ore_more_users);
|
||||||
Usr_FreeListsSelectedUsrsCods ();
|
Usr_FreeListsSelectedUsrsCods ();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -923,10 +923,9 @@ static void Sta_ShowHits (Sta_GlobalOrCourseAccesses_t GlobalOrCourse)
|
||||||
Gbl.Usrs.Me.Role.Logged == Rol_SYS_ADM;
|
Gbl.Usrs.Me.Role.Logged == Rol_SYS_ADM;
|
||||||
if (!ICanQueryWholeRange && NumDays > Cfg_DAYS_IN_RECENT_LOG)
|
if (!ICanQueryWholeRange && NumDays > Cfg_DAYS_IN_RECENT_LOG)
|
||||||
{
|
{
|
||||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
/* ...write warning message and show the form again */
|
||||||
Txt_The_date_range_must_be_less_than_or_equal_to_X_days,
|
Ale_ShowAlert (Ale_WARNING,Txt_The_date_range_must_be_less_than_or_equal_to_X_days,
|
||||||
Cfg_DAYS_IN_RECENT_LOG);
|
Cfg_DAYS_IN_RECENT_LOG);
|
||||||
Ale_ShowA_old (Ale_WARNING,Gbl.Alert.Txt); // ...write warning message and show the form again
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1388,7 +1387,7 @@ static void Sta_ShowHits (Sta_GlobalOrCourseAccesses_t GlobalOrCourse)
|
||||||
|
|
||||||
/***** Count the number of rows in result *****/
|
/***** Count the number of rows in result *****/
|
||||||
if (NumRows == 0)
|
if (NumRows == 0)
|
||||||
Ale_ShowA_old (Ale_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
|
else
|
||||||
{
|
{
|
||||||
/***** Put the table with the clicks *****/
|
/***** Put the table with the clicks *****/
|
||||||
|
|
|
@ -953,7 +953,7 @@ void Str_SetDecimalPointToUS (void)
|
||||||
{
|
{
|
||||||
if (!setlocale (LC_NUMERIC,"en_US.utf8")) // To get/print the floating point as a dot
|
if (!setlocale (LC_NUMERIC,"en_US.utf8")) // To get/print the floating point as a dot
|
||||||
if (Gbl.Layout.HTMLStartWritten)
|
if (Gbl.Layout.HTMLStartWritten)
|
||||||
Ale_ShowA_old (Ale_ERROR,"Can not set locale to en_US.");
|
Ale_ShowAlert (Ale_ERROR,"Can not set locale to en_US.");
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
@ -965,7 +965,7 @@ void Str_SetDecimalPointToLocal (void)
|
||||||
// TODO: this should be internationalized!!!!!!!
|
// TODO: this should be internationalized!!!!!!!
|
||||||
if (!setlocale (LC_NUMERIC,"es_ES.utf8")) // Return to local system
|
if (!setlocale (LC_NUMERIC,"es_ES.utf8")) // Return to local system
|
||||||
if (Gbl.Layout.HTMLStartWritten)
|
if (Gbl.Layout.HTMLStartWritten)
|
||||||
Ale_ShowA_old (Ale_ERROR,"Can not set locale to es_ES.");
|
Ale_ShowAlert (Ale_ERROR,"Can not set locale to es_ES.");
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
Loading…
Reference in New Issue
Block a user