mirror of https://github.com/acanas/swad-core.git
Version18.101.5
This commit is contained in:
parent
2da01d09ee
commit
40a5e61e10
|
@ -1742,13 +1742,13 @@ struct Act_Actions Act_Actions[Act_NUM_ACTIONS] =
|
||||||
/* ActChgCtyMapAtt */{1158,-1,TabUnk,ActSeeCtyInf , 0, 0, 0, 0, 0,0x200, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Cty_ChangeCtyMapAttribution ,NULL},
|
/* ActChgCtyMapAtt */{1158,-1,TabUnk,ActSeeCtyInf , 0, 0, 0, 0, 0,0x200, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Cty_ChangeCtyMapAttribution ,NULL},
|
||||||
|
|
||||||
/* ActEdiIns */{ 697,-1,TabUnk,ActSeeIns , 0, 0, 0, 0, 0,0x3C6, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Ins_EditInstitutions ,NULL},
|
/* ActEdiIns */{ 697,-1,TabUnk,ActSeeIns , 0, 0, 0, 0, 0,0x3C6, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Ins_EditInstitutions ,NULL},
|
||||||
/* ActReqIns */{1210,-1,TabUnk,ActSeeIns , 0, 0, 0, 0, 0,0x3C6, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Ins_RecFormReqIns ,NULL},
|
/* ActReqIns */{1210,-1,TabUnk,ActSeeIns , 0, 0, 0, 0, 0,0x3C6, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,Ins_RecFormReqIns ,Ins_ContEditAfterChgIns ,NULL},
|
||||||
/* ActNewIns */{ 698,-1,TabUnk,ActSeeIns , 0, 0, 0, 0, 0,0x200, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Ins_RecFormNewIns ,NULL},
|
/* ActNewIns */{ 698,-1,TabUnk,ActSeeIns , 0, 0, 0, 0, 0,0x200, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,Ins_RecFormNewIns ,Ins_ContEditAfterChgIns ,NULL},
|
||||||
/* ActRemIns */{ 759,-1,TabUnk,ActSeeIns , 0, 0, 0, 0, 0,0x3C6, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Ins_RemoveInstitution ,NULL},
|
/* ActRemIns */{ 759,-1,TabUnk,ActSeeIns , 0, 0, 0, 0, 0,0x3C6, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,Ins_RemoveInstitution ,Ins_ContEditAfterChgIns ,NULL},
|
||||||
/* ActRenInsSho */{ 702,-1,TabUnk,ActSeeIns , 0, 0, 0, 0, 0,0x3C6, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,Ins_RenameInsShort ,Ins_ContEditAfterChgIns ,NULL},
|
/* ActRenInsSho */{ 702,-1,TabUnk,ActSeeIns , 0, 0, 0, 0, 0,0x3C6, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,Ins_RenameInsShort ,Ins_ContEditAfterChgIns ,NULL},
|
||||||
/* ActRenInsFul */{ 701,-1,TabUnk,ActSeeIns , 0, 0, 0, 0, 0,0x3C6, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,Ins_RenameInsFull ,Ins_ContEditAfterChgIns ,NULL},
|
/* ActRenInsFul */{ 701,-1,TabUnk,ActSeeIns , 0, 0, 0, 0, 0,0x3C6, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,Ins_RenameInsFull ,Ins_ContEditAfterChgIns ,NULL},
|
||||||
/* ActChgInsWWW */{ 700,-1,TabUnk,ActSeeIns , 0, 0, 0, 0, 0,0x3C6, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Ins_ChangeInsWWW ,NULL},
|
/* ActChgInsWWW */{ 700,-1,TabUnk,ActSeeIns , 0, 0, 0, 0, 0,0x3C6, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,Ins_ChangeInsWWW ,Ins_ContEditAfterChgIns ,NULL},
|
||||||
/* ActChgInsSta */{1211,-1,TabUnk,ActSeeIns , 0, 0, 0, 0, 0,0x3C6, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Ins_ChangeInsStatus ,NULL},
|
/* ActChgInsSta */{1211,-1,TabUnk,ActSeeIns , 0, 0, 0, 0, 0,0x3C6, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,Ins_ChangeInsStatus ,Ins_ContEditAfterChgIns ,NULL},
|
||||||
|
|
||||||
// TabIns ******************************************************************
|
// TabIns ******************************************************************
|
||||||
// Actions in menu:
|
// Actions in menu:
|
||||||
|
@ -1769,14 +1769,14 @@ struct Act_Actions Act_Actions[Act_NUM_ACTIONS] =
|
||||||
/* ActRemInsLog */{1341,-1,TabUnk,ActSeeInsInf , 0, 0, 0, 0,0x300, 0, 0,Act_CONT_DATA,Act_BRW_1ST_TAB,Ins_RemoveLogo ,Ins_ShowConfiguration ,NULL},
|
/* ActRemInsLog */{1341,-1,TabUnk,ActSeeInsInf , 0, 0, 0, 0,0x300, 0, 0,Act_CONT_DATA,Act_BRW_1ST_TAB,Ins_RemoveLogo ,Ins_ShowConfiguration ,NULL},
|
||||||
|
|
||||||
/* ActEdiCtr */{ 681,-1,TabUnk,ActSeeCtr , 0, 0, 0, 0,0x3C6, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Ctr_EditCentres ,NULL},
|
/* ActEdiCtr */{ 681,-1,TabUnk,ActSeeCtr , 0, 0, 0, 0,0x3C6, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Ctr_EditCentres ,NULL},
|
||||||
/* ActReqCtr */{1208,-1,TabUnk,ActSeeCtr , 0, 0, 0, 0,0x3C6, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Ctr_RecFormReqCtr ,NULL},
|
/* ActReqCtr */{1208,-1,TabUnk,ActSeeCtr , 0, 0, 0, 0,0x3C6, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,Ctr_RecFormReqCtr ,Ctr_ContEditAfterChgCtr ,NULL},
|
||||||
/* ActNewCtr */{ 685,-1,TabUnk,ActSeeCtr , 0, 0, 0, 0,0x300, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Ctr_RecFormNewCtr ,NULL},
|
/* ActNewCtr */{ 685,-1,TabUnk,ActSeeCtr , 0, 0, 0, 0,0x300, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,Ctr_RecFormNewCtr ,Ctr_ContEditAfterChgCtr ,NULL},
|
||||||
/* ActRemCtr */{ 686,-1,TabUnk,ActSeeCtr , 0, 0, 0, 0,0x3C6, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Ctr_RemoveCentre ,NULL},
|
/* ActRemCtr */{ 686,-1,TabUnk,ActSeeCtr , 0, 0, 0, 0,0x3C6, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,Ctr_RemoveCentre ,Ctr_ContEditAfterChgCtr ,NULL},
|
||||||
/* ActChgDegPlc */{ 706,-1,TabUnk,ActSeeCtr , 0, 0, 0, 0,0x300, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Ctr_ChangeCtrPlc ,NULL},
|
/* ActChgDegPlc */{ 706,-1,TabUnk,ActSeeCtr , 0, 0, 0, 0,0x300, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,Ctr_ChangeCtrPlc ,Ctr_ContEditAfterChgCtr ,NULL},
|
||||||
/* ActRenCtrSho */{ 682,-1,TabUnk,ActSeeCtr , 0, 0, 0, 0,0x3C6, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,Ctr_RenameCentreShort ,Ctr_ContEditAfterChgCtr ,NULL},
|
/* ActRenCtrSho */{ 682,-1,TabUnk,ActSeeCtr , 0, 0, 0, 0,0x3C6, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,Ctr_RenameCentreShort ,Ctr_ContEditAfterChgCtr ,NULL},
|
||||||
/* ActRenCtrFul */{ 684,-1,TabUnk,ActSeeCtr , 0, 0, 0, 0,0x3C6, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,Ctr_RenameCentreFull ,Ctr_ContEditAfterChgCtr ,NULL},
|
/* ActRenCtrFul */{ 684,-1,TabUnk,ActSeeCtr , 0, 0, 0, 0,0x3C6, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,Ctr_RenameCentreFull ,Ctr_ContEditAfterChgCtr ,NULL},
|
||||||
/* ActChgCtrWWW */{ 683,-1,TabUnk,ActSeeCtr , 0, 0, 0, 0,0x3C6, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Ctr_ChangeCtrWWW ,NULL},
|
/* ActChgCtrWWW */{ 683,-1,TabUnk,ActSeeCtr , 0, 0, 0, 0,0x3C6, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,Ctr_ChangeCtrWWW ,Ctr_ContEditAfterChgCtr ,NULL},
|
||||||
/* ActChgCtrSta */{1209,-1,TabUnk,ActSeeCtr , 0, 0, 0, 0,0x300, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Ctr_ChangeCtrStatus ,NULL},
|
/* ActChgCtrSta */{1209,-1,TabUnk,ActSeeCtr , 0, 0, 0, 0,0x300, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,Ctr_ChangeCtrStatus ,Ctr_ContEditAfterChgCtr ,NULL},
|
||||||
|
|
||||||
/* ActEdiPlc */{ 704,-1,TabUnk,ActSeePlc , 0, 0, 0, 0,0x200, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Plc_EditPlaces ,NULL},
|
/* ActEdiPlc */{ 704,-1,TabUnk,ActSeePlc , 0, 0, 0, 0,0x200, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Plc_EditPlaces ,NULL},
|
||||||
/* ActNewPlc */{ 705,-1,TabUnk,ActSeePlc , 0, 0, 0, 0,0x200, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Plc_RecFormNewPlace ,NULL},
|
/* ActNewPlc */{ 705,-1,TabUnk,ActSeePlc , 0, 0, 0, 0,0x200, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Plc_RecFormNewPlace ,NULL},
|
||||||
|
|
|
@ -1816,15 +1816,10 @@ void Ctr_RemoveCentre (void)
|
||||||
Ctr_EditingCtr->CtrCod);
|
Ctr_EditingCtr->CtrCod);
|
||||||
|
|
||||||
/***** Write message to show the change made *****/
|
/***** Write message to show the change made *****/
|
||||||
Ale_ShowAlert (Ale_SUCCESS,Txt_Centre_X_removed,
|
Ale_CreateAlert (Ale_SUCCESS,NULL,
|
||||||
Ctr_EditingCtr->FullName);
|
Txt_Centre_X_removed,
|
||||||
|
Ctr_EditingCtr->FullName);
|
||||||
}
|
}
|
||||||
|
|
||||||
/***** Show the form again *****/
|
|
||||||
Ctr_EditCentresInternal ();
|
|
||||||
|
|
||||||
/***** Centre destructor *****/
|
|
||||||
Ctr_EditingCentreDestructor ();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
@ -1935,13 +1930,6 @@ void Ctr_ChangeCtrPlc (void)
|
||||||
and put button to go to centre changed *****/
|
and put button to go to centre changed *****/
|
||||||
Ale_CreateAlert (Ale_SUCCESS,NULL,
|
Ale_CreateAlert (Ale_SUCCESS,NULL,
|
||||||
Txt_The_place_of_the_centre_has_changed);
|
Txt_The_place_of_the_centre_has_changed);
|
||||||
Ctr_ShowAlertAndButtonToGoToCtr ();
|
|
||||||
|
|
||||||
/***** Show the form again *****/
|
|
||||||
Ctr_EditCentresInternal ();
|
|
||||||
|
|
||||||
/***** Centre destructor *****/
|
|
||||||
Ctr_EditingCentreDestructor ();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Ctr_ChangeCtrPlcInConfig (void)
|
void Ctr_ChangeCtrPlcInConfig (void)
|
||||||
|
@ -1998,19 +1986,6 @@ void Ctr_RenameCentreFull (void)
|
||||||
Ctr_RenameCentre (Ctr_EditingCtr,Cns_FULL_NAME);
|
Ctr_RenameCentre (Ctr_EditingCtr,Cns_FULL_NAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Ctr_ContEditAfterChgCtr (void)
|
|
||||||
{
|
|
||||||
/***** Write message to show the change made
|
|
||||||
and put button to go to centre changed *****/
|
|
||||||
Ctr_ShowAlertAndButtonToGoToCtr ();
|
|
||||||
|
|
||||||
/***** Show the form again *****/
|
|
||||||
Ctr_EditCentresInternal ();
|
|
||||||
|
|
||||||
/***** Centre destructor *****/
|
|
||||||
Ctr_EditingCentreDestructor ();
|
|
||||||
}
|
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/*************** Change the name of a centre in configuration ****************/
|
/*************** Change the name of a centre in configuration ****************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
@ -2163,16 +2138,10 @@ void Ctr_ChangeCtrWWW (void)
|
||||||
Ale_CreateAlert (Ale_SUCCESS,NULL,
|
Ale_CreateAlert (Ale_SUCCESS,NULL,
|
||||||
Txt_The_new_web_address_is_X,
|
Txt_The_new_web_address_is_X,
|
||||||
NewWWW);
|
NewWWW);
|
||||||
Ctr_ShowAlertAndButtonToGoToCtr ();
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
Ale_ShowAlert (Ale_WARNING,Txt_You_can_not_leave_the_web_address_empty);
|
Ale_CreateAlert (Ale_WARNING,NULL,
|
||||||
|
Txt_You_can_not_leave_the_web_address_empty);
|
||||||
/***** Show the form again *****/
|
|
||||||
Ctr_EditCentresInternal ();
|
|
||||||
|
|
||||||
/***** Centre destructor *****/
|
|
||||||
Ctr_EditingCentreDestructor ();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Ctr_ChangeCtrWWWInConfig (void)
|
void Ctr_ChangeCtrWWWInConfig (void)
|
||||||
|
@ -2258,6 +2227,16 @@ void Ctr_ChangeCtrStatus (void)
|
||||||
Ale_CreateAlert (Ale_SUCCESS,NULL,
|
Ale_CreateAlert (Ale_SUCCESS,NULL,
|
||||||
Txt_The_status_of_the_centre_X_has_changed,
|
Txt_The_status_of_the_centre_X_has_changed,
|
||||||
Ctr_EditingCtr->ShrtName);
|
Ctr_EditingCtr->ShrtName);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
/********* Show alerts after changing a centre and continue editing **********/
|
||||||
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
void Ctr_ContEditAfterChgCtr (void)
|
||||||
|
{
|
||||||
|
/***** Write message to show the change made
|
||||||
|
and put button to go to centre changed *****/
|
||||||
Ctr_ShowAlertAndButtonToGoToCtr ();
|
Ctr_ShowAlertAndButtonToGoToCtr ();
|
||||||
|
|
||||||
/***** Show the form again *****/
|
/***** Show the form again *****/
|
||||||
|
@ -2763,9 +2742,6 @@ void Ctr_RecFormReqCtr (void)
|
||||||
|
|
||||||
/***** Receive form to request a new centre *****/
|
/***** Receive form to request a new centre *****/
|
||||||
Ctr_RecFormRequestOrCreateCtr ((unsigned) Ctr_STATUS_BIT_PENDING);
|
Ctr_RecFormRequestOrCreateCtr ((unsigned) Ctr_STATUS_BIT_PENDING);
|
||||||
|
|
||||||
/***** Centre destructor *****/
|
|
||||||
Ctr_EditingCentreDestructor ();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
@ -2779,9 +2755,6 @@ void Ctr_RecFormNewCtr (void)
|
||||||
|
|
||||||
/***** Receive form to create a new centre *****/
|
/***** Receive form to create a new centre *****/
|
||||||
Ctr_RecFormRequestOrCreateCtr (0);
|
Ctr_RecFormRequestOrCreateCtr (0);
|
||||||
|
|
||||||
/***** Centre destructor *****/
|
|
||||||
Ctr_EditingCentreDestructor ();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
@ -2791,6 +2764,7 @@ void Ctr_RecFormNewCtr (void)
|
||||||
static void Ctr_RecFormRequestOrCreateCtr (unsigned Status)
|
static void Ctr_RecFormRequestOrCreateCtr (unsigned Status)
|
||||||
{
|
{
|
||||||
extern const char *Txt_The_centre_X_already_exists;
|
extern const char *Txt_The_centre_X_already_exists;
|
||||||
|
extern const char *Txt_Created_new_centre_X;
|
||||||
extern const char *Txt_You_must_specify_the_web_address_of_the_new_centre;
|
extern const char *Txt_You_must_specify_the_web_address_of_the_new_centre;
|
||||||
extern const char *Txt_You_must_specify_the_short_name_and_the_full_name_of_the_new_centre;
|
extern const char *Txt_You_must_specify_the_short_name_and_the_full_name_of_the_new_centre;
|
||||||
|
|
||||||
|
@ -2818,22 +2792,28 @@ static void Ctr_RecFormRequestOrCreateCtr (unsigned Status)
|
||||||
{
|
{
|
||||||
/***** If name of centre was in database... *****/
|
/***** If name of centre was in database... *****/
|
||||||
if (Ctr_CheckIfCtrNameExistsInIns ("ShortName",Ctr_EditingCtr->ShrtName,-1L,Gbl.Hierarchy.Ins.InsCod))
|
if (Ctr_CheckIfCtrNameExistsInIns ("ShortName",Ctr_EditingCtr->ShrtName,-1L,Gbl.Hierarchy.Ins.InsCod))
|
||||||
Ale_ShowAlert (Ale_WARNING,Txt_The_centre_X_already_exists,
|
Ale_CreateAlert (Ale_WARNING,NULL,
|
||||||
Ctr_EditingCtr->ShrtName);
|
Txt_The_centre_X_already_exists,
|
||||||
|
Ctr_EditingCtr->ShrtName);
|
||||||
else if (Ctr_CheckIfCtrNameExistsInIns ("FullName",Ctr_EditingCtr->FullName,-1L,Gbl.Hierarchy.Ins.InsCod))
|
else if (Ctr_CheckIfCtrNameExistsInIns ("FullName",Ctr_EditingCtr->FullName,-1L,Gbl.Hierarchy.Ins.InsCod))
|
||||||
Ale_ShowAlert (Ale_WARNING,Txt_The_centre_X_already_exists,
|
Ale_CreateAlert (Ale_WARNING,NULL,
|
||||||
Ctr_EditingCtr->FullName);
|
Txt_The_centre_X_already_exists,
|
||||||
|
Ctr_EditingCtr->FullName);
|
||||||
else // Add new centre to database
|
else // Add new centre to database
|
||||||
|
{
|
||||||
Ctr_CreateCentre (Status);
|
Ctr_CreateCentre (Status);
|
||||||
|
Ale_CreateAlert (Ale_SUCCESS,NULL,
|
||||||
|
Txt_Created_new_centre_X,
|
||||||
|
Ctr_EditingCtr->FullName);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else // If there is not a web
|
else // If there is not a web
|
||||||
Ale_ShowAlert (Ale_WARNING,Txt_You_must_specify_the_web_address_of_the_new_centre);
|
Ale_CreateAlert (Ale_WARNING,NULL,
|
||||||
|
Txt_You_must_specify_the_web_address_of_the_new_centre);
|
||||||
}
|
}
|
||||||
else // If there is not a centre name
|
else // If there is not a centre name
|
||||||
Ale_ShowAlert (Ale_WARNING,Txt_You_must_specify_the_short_name_and_the_full_name_of_the_new_centre);
|
Ale_CreateAlert (Ale_WARNING,NULL,
|
||||||
|
Txt_You_must_specify_the_short_name_and_the_full_name_of_the_new_centre);
|
||||||
/***** Show the form again *****/
|
|
||||||
Ctr_EditCentresInternal ();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
@ -2842,8 +2822,6 @@ static void Ctr_RecFormRequestOrCreateCtr (unsigned Status)
|
||||||
|
|
||||||
static void Ctr_CreateCentre (unsigned Status)
|
static void Ctr_CreateCentre (unsigned Status)
|
||||||
{
|
{
|
||||||
extern const char *Txt_Created_new_centre_X;
|
|
||||||
|
|
||||||
/***** Create a new centre *****/
|
/***** Create a new centre *****/
|
||||||
Ctr_EditingCtr->CtrCod =
|
Ctr_EditingCtr->CtrCod =
|
||||||
DB_QueryINSERTandReturnCode ("can not create a new centre",
|
DB_QueryINSERTandReturnCode ("can not create a new centre",
|
||||||
|
@ -2860,13 +2838,6 @@ static void Ctr_CreateCentre (unsigned Status)
|
||||||
Ctr_EditingCtr->ShrtName,
|
Ctr_EditingCtr->ShrtName,
|
||||||
Ctr_EditingCtr->FullName,
|
Ctr_EditingCtr->FullName,
|
||||||
Ctr_EditingCtr->WWW);
|
Ctr_EditingCtr->WWW);
|
||||||
|
|
||||||
/***** Write message to show the change made
|
|
||||||
and put button to go to centre created *****/
|
|
||||||
Ale_CreateAlert (Ale_SUCCESS,NULL,
|
|
||||||
Txt_Created_new_centre_X,
|
|
||||||
Ctr_EditingCtr->FullName);
|
|
||||||
Ctr_ShowAlertAndButtonToGoToCtr ();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
|
@ -464,11 +464,13 @@ En OpenSWAD:
|
||||||
ps2pdf source.ps destination.pdf
|
ps2pdf source.ps destination.pdf
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define Log_PLATFORM_VERSION "SWAD 18.101.3 (2019-04-08)"
|
#define Log_PLATFORM_VERSION "SWAD 18.101.5 (2019-04-08)"
|
||||||
#define CSS_FILE "swad18.92.css"
|
#define CSS_FILE "swad18.92.css"
|
||||||
#define JS_FILE "swad18.92.js"
|
#define JS_FILE "swad18.92.js"
|
||||||
/*
|
/*
|
||||||
En centre, institution y country, hacer más funciones a priori al estilo de como está hecha la edición de course
|
En country, hacer más funciones a priori al estilo de como está hecha la edición de course
|
||||||
|
Version 18.101.5: Apr 08, 2019 Code refactoring in edition of institutions. (241898 lines)
|
||||||
|
Version 18.101.4: Apr 08, 2019 Code refactoring in edition of centres. (241908 lines)
|
||||||
Version 18.101.3: Apr 08, 2019 Code refactoring in edition of degrees. (241924 lines)
|
Version 18.101.3: Apr 08, 2019 Code refactoring in edition of degrees. (241924 lines)
|
||||||
Version 18.101.2: Apr 08, 2019 Code refactoring in edition of degree types.
|
Version 18.101.2: Apr 08, 2019 Code refactoring in edition of degree types.
|
||||||
Fixed bug in alerts. (241936 lines)
|
Fixed bug in alerts. (241936 lines)
|
||||||
|
|
|
@ -2306,7 +2306,7 @@ void Deg_ChangeDegStatus (void)
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/********* Show alerts after changing a course and continue editing **********/
|
/********* Show alerts after changing a degree and continue editing **********/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
void Deg_ContEditAfterChgDeg (void)
|
void Deg_ContEditAfterChgDeg (void)
|
||||||
|
|
|
@ -1754,7 +1754,8 @@ void Ins_RemoveInstitution (void)
|
||||||
else if (Ins_EditingIns->Ctrs.Num ||
|
else if (Ins_EditingIns->Ctrs.Num ||
|
||||||
Ins_EditingIns->NumUsrsWhoClaimToBelongToIns ||
|
Ins_EditingIns->NumUsrsWhoClaimToBelongToIns ||
|
||||||
Ins_EditingIns->NumUsrs) // Institution has centres or users ==> don't remove
|
Ins_EditingIns->NumUsrs) // Institution has centres or users ==> don't remove
|
||||||
Ale_ShowAlert (Ale_WARNING,Txt_To_remove_an_institution_you_must_first_remove_all_centres_and_users_in_the_institution);
|
Ale_CreateAlert (Ale_WARNING,NULL,
|
||||||
|
Txt_To_remove_an_institution_you_must_first_remove_all_centres_and_users_in_the_institution);
|
||||||
else // Institution has no users ==> remove it
|
else // Institution has no users ==> remove it
|
||||||
{
|
{
|
||||||
/***** Remove all the threads and posts in forums of the institution *****/
|
/***** Remove all the threads and posts in forums of the institution *****/
|
||||||
|
@ -1784,15 +1785,10 @@ void Ins_RemoveInstitution (void)
|
||||||
Ins_FlushCacheFullNameAndCtyOfInstitution ();
|
Ins_FlushCacheFullNameAndCtyOfInstitution ();
|
||||||
|
|
||||||
/***** Write message to show the change made *****/
|
/***** Write message to show the change made *****/
|
||||||
Ale_ShowAlert (Ale_SUCCESS,Txt_Institution_X_removed,
|
Ale_CreateAlert (Ale_SUCCESS,NULL,
|
||||||
Ins_EditingIns->FullName);
|
Txt_Institution_X_removed,
|
||||||
|
Ins_EditingIns->FullName);
|
||||||
}
|
}
|
||||||
|
|
||||||
/***** Show the form again *****/
|
|
||||||
Ins_EditInstitutionsInternal ();
|
|
||||||
|
|
||||||
/***** Institution destructor *****/
|
|
||||||
Ins_EditingInstitutionDestructor ();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
@ -1819,19 +1815,6 @@ void Ins_RenameInsFull (void)
|
||||||
Ins_RenameInstitution (Ins_EditingIns,Cns_FULL_NAME);
|
Ins_RenameInstitution (Ins_EditingIns,Cns_FULL_NAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Ins_ContEditAfterChgIns (void)
|
|
||||||
{
|
|
||||||
/***** Write message to show the change made
|
|
||||||
and put button to go to institution changed *****/
|
|
||||||
Ins_ShowAlertAndButtonToGoToIns ();
|
|
||||||
|
|
||||||
/***** Show the form again *****/
|
|
||||||
Ins_EditInstitutionsInternal ();
|
|
||||||
|
|
||||||
/***** Institution destructor *****/
|
|
||||||
Ins_EditingInstitutionDestructor ();
|
|
||||||
}
|
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/************ Change the name of an institution in configuration *************/
|
/************ Change the name of an institution in configuration *************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
@ -2083,16 +2066,10 @@ void Ins_ChangeInsWWW (void)
|
||||||
Ale_CreateAlert (Ale_SUCCESS,NULL,
|
Ale_CreateAlert (Ale_SUCCESS,NULL,
|
||||||
Txt_The_new_web_address_is_X,
|
Txt_The_new_web_address_is_X,
|
||||||
NewWWW);
|
NewWWW);
|
||||||
Ins_ShowAlertAndButtonToGoToIns ();
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
Ale_ShowAlert (Ale_WARNING,Txt_You_can_not_leave_the_web_address_empty);
|
Ale_CreateAlert (Ale_WARNING,NULL,
|
||||||
|
Txt_You_can_not_leave_the_web_address_empty);
|
||||||
/***** Show the form again *****/
|
|
||||||
Ins_EditInstitutionsInternal ();
|
|
||||||
|
|
||||||
/***** Institution destructor *****/
|
|
||||||
Ins_EditingInstitutionDestructor ();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Ins_ChangeInsWWWInConfig (void)
|
void Ins_ChangeInsWWWInConfig (void)
|
||||||
|
@ -2173,11 +2150,21 @@ void Ins_ChangeInsStatus (void)
|
||||||
(unsigned) Status,Ins_EditingIns->InsCod);
|
(unsigned) Status,Ins_EditingIns->InsCod);
|
||||||
Ins_EditingIns->Status = Status;
|
Ins_EditingIns->Status = Status;
|
||||||
|
|
||||||
/***** Write message to show the change made
|
/***** Create message to show the change made
|
||||||
and put button to go to institution changed *****/
|
and put button to go to institution changed *****/
|
||||||
Ale_CreateAlert (Ale_SUCCESS,NULL,
|
Ale_CreateAlert (Ale_SUCCESS,NULL,
|
||||||
Txt_The_status_of_the_institution_X_has_changed,
|
Txt_The_status_of_the_institution_X_has_changed,
|
||||||
Ins_EditingIns->ShrtName);
|
Ins_EditingIns->ShrtName);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
/****** Show alerts after changing an institution and continue editing *******/
|
||||||
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
void Ins_ContEditAfterChgIns (void)
|
||||||
|
{
|
||||||
|
/***** Write message to show the change made
|
||||||
|
and put button to go to institution changed *****/
|
||||||
Ins_ShowAlertAndButtonToGoToIns ();
|
Ins_ShowAlertAndButtonToGoToIns ();
|
||||||
|
|
||||||
/***** Show the form again *****/
|
/***** Show the form again *****/
|
||||||
|
@ -2197,7 +2184,7 @@ static void Ins_ShowAlertAndButtonToGoToIns (void)
|
||||||
// If the institution beeing edited is different to the current one...
|
// If the institution beeing edited is different to the current one...
|
||||||
if (Ins_EditingIns->InsCod != Gbl.Hierarchy.Ins.InsCod)
|
if (Ins_EditingIns->InsCod != Gbl.Hierarchy.Ins.InsCod)
|
||||||
{
|
{
|
||||||
/***** Alert with button to go to degree *****/
|
/***** Alert with button to go to institution *****/
|
||||||
Ale_ShowLastAlertAndButton (ActSeeCtr,NULL,NULL,Ins_PutParamGoToIns,
|
Ale_ShowLastAlertAndButton (ActSeeCtr,NULL,NULL,Ins_PutParamGoToIns,
|
||||||
Btn_CONFIRM_BUTTON,Gbl.Title);
|
Btn_CONFIRM_BUTTON,Gbl.Title);
|
||||||
}
|
}
|
||||||
|
@ -2401,9 +2388,6 @@ void Ins_RecFormReqIns (void)
|
||||||
|
|
||||||
/***** Receive form to request a new institution *****/
|
/***** Receive form to request a new institution *****/
|
||||||
Ins_RecFormRequestOrCreateIns ((unsigned) Ins_STATUS_BIT_PENDING);
|
Ins_RecFormRequestOrCreateIns ((unsigned) Ins_STATUS_BIT_PENDING);
|
||||||
|
|
||||||
/***** Institution destructor *****/
|
|
||||||
Ins_EditingInstitutionDestructor ();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
@ -2417,9 +2401,6 @@ void Ins_RecFormNewIns (void)
|
||||||
|
|
||||||
/***** Receive form to create a new institution *****/
|
/***** Receive form to create a new institution *****/
|
||||||
Ins_RecFormRequestOrCreateIns (0);
|
Ins_RecFormRequestOrCreateIns (0);
|
||||||
|
|
||||||
/***** Institution destructor *****/
|
|
||||||
Ins_EditingInstitutionDestructor ();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
@ -2429,6 +2410,7 @@ void Ins_RecFormNewIns (void)
|
||||||
static void Ins_RecFormRequestOrCreateIns (unsigned Status)
|
static void Ins_RecFormRequestOrCreateIns (unsigned Status)
|
||||||
{
|
{
|
||||||
extern const char *Txt_The_institution_X_already_exists;
|
extern const char *Txt_The_institution_X_already_exists;
|
||||||
|
extern const char *Txt_Created_new_institution_X;
|
||||||
extern const char *Txt_You_must_specify_the_web_address_of_the_new_institution;
|
extern const char *Txt_You_must_specify_the_web_address_of_the_new_institution;
|
||||||
extern const char *Txt_You_must_specify_the_short_name_and_the_full_name_of_the_new_institution;
|
extern const char *Txt_You_must_specify_the_short_name_and_the_full_name_of_the_new_institution;
|
||||||
|
|
||||||
|
@ -2453,23 +2435,29 @@ static void Ins_RecFormRequestOrCreateIns (unsigned Status)
|
||||||
/***** If name of institution was in database... *****/
|
/***** If name of institution was in database... *****/
|
||||||
if (Ins_CheckIfInsNameExistsInCty ("ShortName",Ins_EditingIns->ShrtName,
|
if (Ins_CheckIfInsNameExistsInCty ("ShortName",Ins_EditingIns->ShrtName,
|
||||||
-1L,Gbl.Hierarchy.Cty.CtyCod))
|
-1L,Gbl.Hierarchy.Cty.CtyCod))
|
||||||
Ale_ShowAlert (Ale_WARNING,Txt_The_institution_X_already_exists,
|
Ale_CreateAlert (Ale_WARNING,NULL,
|
||||||
Ins_EditingIns->ShrtName);
|
Txt_The_institution_X_already_exists,
|
||||||
|
Ins_EditingIns->ShrtName);
|
||||||
else if (Ins_CheckIfInsNameExistsInCty ("FullName",Ins_EditingIns->FullName,
|
else if (Ins_CheckIfInsNameExistsInCty ("FullName",Ins_EditingIns->FullName,
|
||||||
-1L,Gbl.Hierarchy.Cty.CtyCod))
|
-1L,Gbl.Hierarchy.Cty.CtyCod))
|
||||||
Ale_ShowAlert (Ale_WARNING,Txt_The_institution_X_already_exists,
|
Ale_CreateAlert (Ale_WARNING,NULL,
|
||||||
Ins_EditingIns->FullName);
|
Txt_The_institution_X_already_exists,
|
||||||
|
Ins_EditingIns->FullName);
|
||||||
else // Add new institution to database
|
else // Add new institution to database
|
||||||
|
{
|
||||||
Ins_CreateInstitution (Status);
|
Ins_CreateInstitution (Status);
|
||||||
|
Ale_CreateAlert (Ale_SUCCESS,NULL,
|
||||||
|
Txt_Created_new_institution_X,
|
||||||
|
Ins_EditingIns->FullName);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else // If there is not a web
|
else // If there is not a web
|
||||||
Ale_ShowAlert (Ale_WARNING,Txt_You_must_specify_the_web_address_of_the_new_institution);
|
Ale_CreateAlert (Ale_WARNING,NULL,
|
||||||
|
Txt_You_must_specify_the_web_address_of_the_new_institution);
|
||||||
}
|
}
|
||||||
else // If there is not a institution name
|
else // If there is not a institution name
|
||||||
Ale_ShowAlert (Ale_WARNING,Txt_You_must_specify_the_short_name_and_the_full_name_of_the_new_institution);
|
Ale_CreateAlert (Ale_WARNING,NULL,
|
||||||
|
Txt_You_must_specify_the_short_name_and_the_full_name_of_the_new_institution);
|
||||||
/***** Show the form again *****/
|
|
||||||
Ins_EditInstitutionsInternal ();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
@ -2478,8 +2466,6 @@ static void Ins_RecFormRequestOrCreateIns (unsigned Status)
|
||||||
|
|
||||||
static void Ins_CreateInstitution (unsigned Status)
|
static void Ins_CreateInstitution (unsigned Status)
|
||||||
{
|
{
|
||||||
extern const char *Txt_Created_new_institution_X;
|
|
||||||
|
|
||||||
/***** Create a new institution *****/
|
/***** Create a new institution *****/
|
||||||
Ins_EditingIns->InsCod =
|
Ins_EditingIns->InsCod =
|
||||||
DB_QueryINSERTandReturnCode ("can not create institution",
|
DB_QueryINSERTandReturnCode ("can not create institution",
|
||||||
|
@ -2493,13 +2479,6 @@ static void Ins_CreateInstitution (unsigned Status)
|
||||||
Ins_EditingIns->ShrtName,
|
Ins_EditingIns->ShrtName,
|
||||||
Ins_EditingIns->FullName,
|
Ins_EditingIns->FullName,
|
||||||
Ins_EditingIns->WWW);
|
Ins_EditingIns->WWW);
|
||||||
|
|
||||||
/***** Write message to show the change made
|
|
||||||
and put button to go to institution created *****/
|
|
||||||
Ale_CreateAlert (Ale_SUCCESS,NULL,
|
|
||||||
Txt_Created_new_institution_X,
|
|
||||||
Ins_EditingIns->FullName);
|
|
||||||
Ins_ShowAlertAndButtonToGoToIns ();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
Loading…
Reference in New Issue