mirror of
https://github.com/acanas/swad-core.git
synced 2024-06-01 22:35:28 +02:00
Version 16.167.12
This commit is contained in:
parent
107b2695ee
commit
34a735187b
|
@ -209,13 +209,14 @@
|
||||||
/****************************** Public constants *****************************/
|
/****************************** Public constants *****************************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
#define Log_PLATFORM_VERSION "SWAD 16.167.11 (2017-03-26)"
|
#define Log_PLATFORM_VERSION "SWAD 16.167.12 (2017-03-26)"
|
||||||
#define CSS_FILE "swad16.166.css"
|
#define CSS_FILE "swad16.166.css"
|
||||||
#define JS_FILE "swad16.144.js"
|
#define JS_FILE "swad16.144.js"
|
||||||
|
|
||||||
// Number of lines (includes comments but not blank lines) has been got with the following command:
|
// Number of lines (includes comments but not blank lines) has been got with the following command:
|
||||||
// nl swad*.c swad*.h css/swad*.css py/swad*.py js/swad*.js soap/swad*?.h sql/swad*.sql | tail -1
|
// nl swad*.c swad*.h css/swad*.css py/swad*.py js/swad*.js soap/swad*?.h sql/swad*.sql | tail -1
|
||||||
/*
|
/*
|
||||||
|
Version 16.167.12:Mar 26, 2017 Code refactoring in edition of institutions. (217685 lines)
|
||||||
Version 16.167.11:Mar 26, 2017 Code refactoring in edition of degrees. (217686 lines)
|
Version 16.167.11:Mar 26, 2017 Code refactoring in edition of degrees. (217686 lines)
|
||||||
Version 16.167.10:Mar 26, 2017 Code refactoring in edition of courses. (217688 lines)
|
Version 16.167.10:Mar 26, 2017 Code refactoring in edition of courses. (217688 lines)
|
||||||
Version 16.167.9: Mar 26, 2017 Code refactoring in edition of centres. (217680 lines)
|
Version 16.167.9: Mar 26, 2017 Code refactoring in edition of centres. (217680 lines)
|
||||||
|
|
|
@ -1792,7 +1792,7 @@ static void Ins_RenameInstitution (struct Instit *Ins,Cns_ShrtOrFullName_t ShrtO
|
||||||
/***** Check if new name is empty *****/
|
/***** Check if new name is empty *****/
|
||||||
if (!NewInsName[0])
|
if (!NewInsName[0])
|
||||||
{
|
{
|
||||||
Gbl.Error = true;
|
Gbl.AlertType = Lay_WARNING;
|
||||||
sprintf (Gbl.Message,Txt_You_can_not_leave_the_name_of_the_institution_X_empty,
|
sprintf (Gbl.Message,Txt_You_can_not_leave_the_name_of_the_institution_X_empty,
|
||||||
CurrentInsName);
|
CurrentInsName);
|
||||||
}
|
}
|
||||||
|
@ -1804,7 +1804,7 @@ static void Ins_RenameInstitution (struct Instit *Ins,Cns_ShrtOrFullName_t ShrtO
|
||||||
/***** If institution was in database... *****/
|
/***** If institution was in database... *****/
|
||||||
if (Ins_CheckIfInsNameExistsInCty (ParamName,NewInsName,Ins->InsCod,Gbl.CurrentCty.Cty.CtyCod))
|
if (Ins_CheckIfInsNameExistsInCty (ParamName,NewInsName,Ins->InsCod,Gbl.CurrentCty.Cty.CtyCod))
|
||||||
{
|
{
|
||||||
Gbl.Error = true;
|
Gbl.AlertType = Lay_WARNING;
|
||||||
sprintf (Gbl.Message,Txt_The_institution_X_already_exists,
|
sprintf (Gbl.Message,Txt_The_institution_X_already_exists,
|
||||||
NewInsName);
|
NewInsName);
|
||||||
}
|
}
|
||||||
|
@ -1814,6 +1814,7 @@ static void Ins_RenameInstitution (struct Instit *Ins,Cns_ShrtOrFullName_t ShrtO
|
||||||
Ins_UpdateInsNameDB (Ins->InsCod,FieldName,NewInsName);
|
Ins_UpdateInsNameDB (Ins->InsCod,FieldName,NewInsName);
|
||||||
|
|
||||||
/* Create message to show the change made */
|
/* Create message to show the change made */
|
||||||
|
Gbl.AlertType = Lay_SUCCESS;
|
||||||
sprintf (Gbl.Message,Txt_The_institution_X_has_been_renamed_as_Y,
|
sprintf (Gbl.Message,Txt_The_institution_X_has_been_renamed_as_Y,
|
||||||
CurrentInsName,NewInsName);
|
CurrentInsName,NewInsName);
|
||||||
|
|
||||||
|
@ -1823,8 +1824,11 @@ static void Ins_RenameInstitution (struct Instit *Ins,Cns_ShrtOrFullName_t ShrtO
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else // The same name
|
else // The same name
|
||||||
|
{
|
||||||
|
Gbl.AlertType = Lay_INFO;
|
||||||
sprintf (Gbl.Message,Txt_The_name_of_the_institution_X_has_not_changed,
|
sprintf (Gbl.Message,Txt_The_name_of_the_institution_X_has_not_changed,
|
||||||
CurrentInsName);
|
CurrentInsName);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1879,13 +1883,13 @@ void Ins_ChangeInsCtyInConfig (void)
|
||||||
/***** Check if it already exists an institution with the same name in the new country *****/
|
/***** Check if it already exists an institution with the same name in the new country *****/
|
||||||
if (Ins_CheckIfInsNameExistsInCty ("ShortName",Gbl.CurrentIns.Ins.ShrtName,-1L,NewCty.CtyCod))
|
if (Ins_CheckIfInsNameExistsInCty ("ShortName",Gbl.CurrentIns.Ins.ShrtName,-1L,NewCty.CtyCod))
|
||||||
{
|
{
|
||||||
Gbl.Error = true;
|
Gbl.AlertType = Lay_WARNING;
|
||||||
sprintf (Gbl.Message,Txt_The_institution_X_already_exists,
|
sprintf (Gbl.Message,Txt_The_institution_X_already_exists,
|
||||||
Gbl.CurrentIns.Ins.ShrtName);
|
Gbl.CurrentIns.Ins.ShrtName);
|
||||||
}
|
}
|
||||||
else if (Ins_CheckIfInsNameExistsInCty ("FullName",Gbl.CurrentIns.Ins.FullName,-1L,NewCty.CtyCod))
|
else if (Ins_CheckIfInsNameExistsInCty ("FullName",Gbl.CurrentIns.Ins.FullName,-1L,NewCty.CtyCod))
|
||||||
{
|
{
|
||||||
Gbl.Error = true;
|
Gbl.AlertType = Lay_WARNING;
|
||||||
sprintf (Gbl.Message,Txt_The_institution_X_already_exists,
|
sprintf (Gbl.Message,Txt_The_institution_X_already_exists,
|
||||||
Gbl.CurrentIns.Ins.FullName);
|
Gbl.CurrentIns.Ins.FullName);
|
||||||
}
|
}
|
||||||
|
@ -1900,6 +1904,7 @@ void Ins_ChangeInsCtyInConfig (void)
|
||||||
Hie_InitHierarchy ();
|
Hie_InitHierarchy ();
|
||||||
|
|
||||||
/***** Write message to show the change made *****/
|
/***** Write message to show the change made *****/
|
||||||
|
Gbl.AlertType = Lay_SUCCESS;
|
||||||
sprintf (Gbl.Message,Txt_The_country_of_the_institution_X_has_changed_to_Y,
|
sprintf (Gbl.Message,Txt_The_country_of_the_institution_X_has_changed_to_Y,
|
||||||
Gbl.CurrentIns.Ins.FullName,NewCty.Name[Gbl.Prefs.Language]);
|
Gbl.CurrentIns.Ins.FullName,NewCty.Name[Gbl.Prefs.Language]);
|
||||||
}
|
}
|
||||||
|
@ -1912,10 +1917,8 @@ void Ins_ChangeInsCtyInConfig (void)
|
||||||
|
|
||||||
void Ins_ContEditAfterChgInsInConfig (void)
|
void Ins_ContEditAfterChgInsInConfig (void)
|
||||||
{
|
{
|
||||||
/***** Write error/success message *****/
|
/***** Write success / warning message *****/
|
||||||
Lay_ShowAlert (Gbl.Error ? Lay_WARNING :
|
Lay_ShowAlert (Gbl.AlertType,Gbl.Message);
|
||||||
Lay_SUCCESS,
|
|
||||||
Gbl.Message);
|
|
||||||
|
|
||||||
/***** Show the form again *****/
|
/***** Show the form again *****/
|
||||||
Ins_ShowConfiguration ();
|
Ins_ShowConfiguration ();
|
||||||
|
@ -2080,17 +2083,12 @@ void Ins_ChangeInsStatus (void)
|
||||||
|
|
||||||
void Ins_ContEditAfterChgIns (void)
|
void Ins_ContEditAfterChgIns (void)
|
||||||
{
|
{
|
||||||
if (Gbl.Error)
|
/***** Write success / warning message *****/
|
||||||
/***** Write error message *****/
|
Lay_ShowAlert (Gbl.AlertType,Gbl.Message);
|
||||||
Lay_ShowAlert (Lay_WARNING,Gbl.Message);
|
|
||||||
else
|
|
||||||
{
|
|
||||||
/***** Write success message showing the change made *****/
|
|
||||||
Lay_ShowAlert (Lay_INFO,Gbl.Message);
|
|
||||||
|
|
||||||
|
if (Gbl.AlertType == Lay_SUCCESS)
|
||||||
/***** Put button to go to institution changed *****/
|
/***** Put button to go to institution changed *****/
|
||||||
Ins_PutButtonToGoToIns (&Gbl.Inss.EditingIns);
|
Ins_PutButtonToGoToIns (&Gbl.Inss.EditingIns);
|
||||||
}
|
|
||||||
|
|
||||||
/***** Show the form again *****/
|
/***** Show the form again *****/
|
||||||
Ins_EditInstitutions ();
|
Ins_EditInstitutions ();
|
||||||
|
|
Loading…
Reference in New Issue
Block a user