mirror of https://github.com/acanas/swad-core.git
Version 23.33.2: Oct 10, 2023 Code refactoring in short and full names. Not finished.
This commit is contained in:
parent
429668a241
commit
7d8fa0bebb
|
@ -649,14 +649,13 @@ static void Ban_RenameBanner (struct Ban_Banner *Ban,
|
||||||
|
|
||||||
/* Write message to show the change made */
|
/* Write message to show the change made */
|
||||||
Ale_CreateAlert (Ale_SUCCESS,NULL,
|
Ale_CreateAlert (Ale_SUCCESS,NULL,
|
||||||
Txt_The_banner_X_has_been_renamed_as_Y,
|
Txt_The_banner_X_has_been_renamed_as_Y,
|
||||||
CurrentName[ShrtOrFullName],NewName);
|
CurrentName[ShrtOrFullName],NewName);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else // The same name
|
else // The same name
|
||||||
/* Write warning message */
|
/* Write warning message */
|
||||||
Ale_CreateAlert (Ale_INFO,NULL,
|
Ale_CreateAlert (Ale_INFO,NULL,Txt_The_name_X_has_not_changed,
|
||||||
Txt_The_name_X_has_not_changed,
|
|
||||||
CurrentName[ShrtOrFullName]);
|
CurrentName[ShrtOrFullName]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -882,7 +881,7 @@ void Ban_ReceiveFormNewBanner (void)
|
||||||
if (Ban->ShrtName[0] &&
|
if (Ban->ShrtName[0] &&
|
||||||
Ban->FullName[0]) // If there's a banner name
|
Ban->FullName[0]) // If there's a banner name
|
||||||
{
|
{
|
||||||
/***** If name of banner was in database... *****/
|
/***** If name of banner was not in database... *****/
|
||||||
if (!Nam_CheckIfNameExists (Ban_DB_CheckIfBannerNameExists,Names,-1L,
|
if (!Nam_CheckIfNameExists (Ban_DB_CheckIfBannerNameExists,Names,-1L,
|
||||||
-1L,0)) // Unused
|
-1L,0)) // Unused
|
||||||
{
|
{
|
||||||
|
@ -892,7 +891,7 @@ void Ban_ReceiveFormNewBanner (void)
|
||||||
else if (!Ban->WWW[0])
|
else if (!Ban->WWW[0])
|
||||||
Ale_CreateAlert (Ale_WARNING,NULL,
|
Ale_CreateAlert (Ale_WARNING,NULL,
|
||||||
Txt_You_must_specify_the_web_address);
|
Txt_You_must_specify_the_web_address);
|
||||||
else // Add new banner to database
|
else
|
||||||
{
|
{
|
||||||
Ban_DB_CreateBanner (Ban);
|
Ban_DB_CreateBanner (Ban);
|
||||||
Ale_CreateAlert (Ale_SUCCESS,Txt_Created_new_banner_X,
|
Ale_CreateAlert (Ale_SUCCESS,Txt_Created_new_banner_X,
|
||||||
|
|
|
@ -114,7 +114,6 @@ unsigned Ban_DB_GetBannerDataByCod (MYSQL_RES **mysql_res,long BanCod)
|
||||||
/********************* Check if the name of banner exists ********************/
|
/********************* Check if the name of banner exists ********************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
// bool Ban_DB_CheckIfBannerNameExists (const char *FldName,const char *Name,long BanCod)
|
|
||||||
bool Ban_DB_CheckIfBannerNameExists (const char *FldName,const char *Name,long Cod,
|
bool Ban_DB_CheckIfBannerNameExists (const char *FldName,const char *Name,long Cod,
|
||||||
__attribute__((unused)) long PrtCod,
|
__attribute__((unused)) long PrtCod,
|
||||||
__attribute__((unused)) unsigned Year)
|
__attribute__((unused)) unsigned Year)
|
||||||
|
|
|
@ -531,7 +531,7 @@ static void Bld_RenameBuilding (Nam_ShrtOrFullName_t ShrtOrFullName)
|
||||||
extern const char *Nam_ParShrtOrFullName[Nam_NUM_SHRT_FULL_NAMES];
|
extern const char *Nam_ParShrtOrFullName[Nam_NUM_SHRT_FULL_NAMES];
|
||||||
extern const char *Nam_FldShrtOrFullName[Nam_NUM_SHRT_FULL_NAMES];
|
extern const char *Nam_FldShrtOrFullName[Nam_NUM_SHRT_FULL_NAMES];
|
||||||
extern unsigned Nam_MaxBytesShrtOrFullName[Nam_NUM_SHRT_FULL_NAMES];
|
extern unsigned Nam_MaxBytesShrtOrFullName[Nam_NUM_SHRT_FULL_NAMES];
|
||||||
extern const char *Txt_The_building_X_already_exists;
|
extern const char *Txt_X_already_exists;
|
||||||
extern const char *Txt_The_building_X_has_been_renamed_as_Y;
|
extern const char *Txt_The_building_X_has_been_renamed_as_Y;
|
||||||
extern const char *Txt_The_name_X_has_not_changed;
|
extern const char *Txt_The_name_X_has_not_changed;
|
||||||
char *CurrentName[Nam_NUM_SHRT_FULL_NAMES] =
|
char *CurrentName[Nam_NUM_SHRT_FULL_NAMES] =
|
||||||
|
@ -560,10 +560,9 @@ static void Bld_RenameBuilding (Nam_ShrtOrFullName_t ShrtOrFullName)
|
||||||
{
|
{
|
||||||
/***** If building was in database... *****/
|
/***** If building was in database... *****/
|
||||||
if (Bld_DB_CheckIfBuildingNameExists (Nam_ParShrtOrFullName[ShrtOrFullName],
|
if (Bld_DB_CheckIfBuildingNameExists (Nam_ParShrtOrFullName[ShrtOrFullName],
|
||||||
NewName,Bld_EditingBuilding->BldCod))
|
NewName,Bld_EditingBuilding->BldCod,
|
||||||
Ale_CreateAlert (Ale_WARNING,NULL,
|
-1L,0)) // Unused
|
||||||
Txt_The_building_X_already_exists,
|
Ale_CreateAlert (Ale_WARNING,NULL,Txt_X_already_exists,NewName);
|
||||||
NewName);
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* Update the table changing old name by new name */
|
/* Update the table changing old name by new name */
|
||||||
|
@ -722,11 +721,7 @@ static void Bld_PutHeadBuildings (void)
|
||||||
|
|
||||||
void Bld_ReceiveFormNewBuilding (void)
|
void Bld_ReceiveFormNewBuilding (void)
|
||||||
{
|
{
|
||||||
extern const char *Nam_FldShrtOrFullName[Nam_NUM_SHRT_FULL_NAMES];
|
|
||||||
extern const char *Txt_The_building_X_already_exists;
|
|
||||||
extern const char *Txt_Created_new_building_X;
|
extern const char *Txt_Created_new_building_X;
|
||||||
Nam_ShrtOrFullName_t ShrtOrFullName;
|
|
||||||
bool Exists;
|
|
||||||
char *Names[Nam_NUM_SHRT_FULL_NAMES] =
|
char *Names[Nam_NUM_SHRT_FULL_NAMES] =
|
||||||
{
|
{
|
||||||
[Nam_SHRT_NAME] = Bld_EditingBuilding->ShrtName,
|
[Nam_SHRT_NAME] = Bld_EditingBuilding->ShrtName,
|
||||||
|
@ -746,19 +741,9 @@ void Bld_ReceiveFormNewBuilding (void)
|
||||||
if (Bld_EditingBuilding->ShrtName[0] &&
|
if (Bld_EditingBuilding->ShrtName[0] &&
|
||||||
Bld_EditingBuilding->FullName[0]) // If there's a building name
|
Bld_EditingBuilding->FullName[0]) // If there's a building name
|
||||||
{
|
{
|
||||||
/***** If name of building was in database... *****/
|
/***** If name of building was not in database... *****/
|
||||||
for (ShrtOrFullName = Nam_SHRT_NAME, Exists = false;
|
if (!Nam_CheckIfNameExists (Bld_DB_CheckIfBuildingNameExists,Names,-1L,
|
||||||
ShrtOrFullName <= Nam_FULL_NAME && !Exists;
|
-1L,0)) // Unused
|
||||||
ShrtOrFullName++)
|
|
||||||
if (Bld_DB_CheckIfBuildingNameExists (Nam_FldShrtOrFullName[ShrtOrFullName],
|
|
||||||
Names[ShrtOrFullName],-1L))
|
|
||||||
{
|
|
||||||
Ale_CreateAlert (Ale_WARNING,NULL,
|
|
||||||
Txt_The_building_X_already_exists,
|
|
||||||
Names[ShrtOrFullName]);
|
|
||||||
Exists = true;
|
|
||||||
}
|
|
||||||
if (!Exists) // Add new building to database
|
|
||||||
{
|
{
|
||||||
Bld_DB_CreateBuilding (Bld_EditingBuilding);
|
Bld_DB_CreateBuilding (Bld_EditingBuilding);
|
||||||
Ale_CreateAlert (Ale_SUCCESS,NULL,Txt_Created_new_building_X,
|
Ale_CreateAlert (Ale_SUCCESS,NULL,Txt_Created_new_building_X,
|
||||||
|
|
|
@ -116,7 +116,9 @@ unsigned Bld_DB_GetBuildingDataByCod (MYSQL_RES **mysql_res,long BldCod)
|
||||||
/******************** Check if the name of building exists *******************/
|
/******************** Check if the name of building exists *******************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
bool Bld_DB_CheckIfBuildingNameExists (const char *FldName,const char *Name,long BldCod)
|
bool Bld_DB_CheckIfBuildingNameExists (const char *FldName,const char *Name,long Cod,
|
||||||
|
__attribute__((unused)) long PrtCod,
|
||||||
|
__attribute__((unused)) unsigned Year)
|
||||||
{
|
{
|
||||||
return
|
return
|
||||||
DB_QueryEXISTS ("can not check if the name of a building already existed",
|
DB_QueryEXISTS ("can not check if the name of a building already existed",
|
||||||
|
@ -128,7 +130,7 @@ bool Bld_DB_CheckIfBuildingNameExists (const char *FldName,const char *Name,long
|
||||||
" AND BldCod<>%ld)",
|
" AND BldCod<>%ld)",
|
||||||
Gbl.Hierarchy.Node[Hie_CTR].HieCod,
|
Gbl.Hierarchy.Node[Hie_CTR].HieCod,
|
||||||
FldName,Name,
|
FldName,Name,
|
||||||
BldCod);
|
Cod);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -41,7 +41,9 @@ unsigned Bld_DB_GetListBuildings (MYSQL_RES **mysql_res,
|
||||||
Bld_WhichData_t WhichData,
|
Bld_WhichData_t WhichData,
|
||||||
Bld_Order_t SelectedOrder);
|
Bld_Order_t SelectedOrder);
|
||||||
unsigned Bld_DB_GetBuildingDataByCod (MYSQL_RES **mysql_res,long BldCod);
|
unsigned Bld_DB_GetBuildingDataByCod (MYSQL_RES **mysql_res,long BldCod);
|
||||||
bool Bld_DB_CheckIfBuildingNameExists (const char *FldName,const char *Name,long BldCod);
|
bool Bld_DB_CheckIfBuildingNameExists (const char *FldName,const char *Name,long Cod,
|
||||||
|
__attribute__((unused)) long PrtCod,
|
||||||
|
__attribute__((unused)) unsigned Year);
|
||||||
|
|
||||||
void Bld_DB_UpdateBuildingName (long BldCod,const char *FldName,const char *NewBuildingName);
|
void Bld_DB_UpdateBuildingName (long BldCod,const char *FldName,const char *NewBuildingName);
|
||||||
|
|
||||||
|
|
|
@ -1064,7 +1064,7 @@ void Ctr_RenameCenter (struct Hie_Node *Ctr,Nam_ShrtOrFullName_t ShrtOrFullName)
|
||||||
extern const char *Nam_ParShrtOrFullName[Nam_NUM_SHRT_FULL_NAMES];
|
extern const char *Nam_ParShrtOrFullName[Nam_NUM_SHRT_FULL_NAMES];
|
||||||
extern const char *Nam_FldShrtOrFullName[Nam_NUM_SHRT_FULL_NAMES];
|
extern const char *Nam_FldShrtOrFullName[Nam_NUM_SHRT_FULL_NAMES];
|
||||||
extern unsigned Nam_MaxBytesShrtOrFullName[Nam_NUM_SHRT_FULL_NAMES];
|
extern unsigned Nam_MaxBytesShrtOrFullName[Nam_NUM_SHRT_FULL_NAMES];
|
||||||
extern const char *Txt_The_center_X_already_exists;
|
extern const char *Txt_X_already_exists;
|
||||||
extern const char *Txt_The_center_X_has_been_renamed_as_Y;
|
extern const char *Txt_The_center_X_has_been_renamed_as_Y;
|
||||||
extern const char *Txt_The_name_X_has_not_changed;
|
extern const char *Txt_The_name_X_has_not_changed;
|
||||||
char *CurrentName[Nam_NUM_SHRT_FULL_NAMES] =
|
char *CurrentName[Nam_NUM_SHRT_FULL_NAMES] =
|
||||||
|
@ -1093,10 +1093,9 @@ void Ctr_RenameCenter (struct Hie_Node *Ctr,Nam_ShrtOrFullName_t ShrtOrFullName)
|
||||||
/***** If degree was in database... *****/
|
/***** If degree was in database... *****/
|
||||||
if (Ctr_DB_CheckIfCtrNameExistsInIns (Nam_ParShrtOrFullName[ShrtOrFullName],
|
if (Ctr_DB_CheckIfCtrNameExistsInIns (Nam_ParShrtOrFullName[ShrtOrFullName],
|
||||||
NewName,Ctr->HieCod,
|
NewName,Ctr->HieCod,
|
||||||
Gbl.Hierarchy.Node[Hie_INS].HieCod))
|
Gbl.Hierarchy.Node[Hie_INS].HieCod,
|
||||||
Ale_CreateAlert (Ale_WARNING,NULL,
|
0)) // Unused
|
||||||
Txt_The_center_X_already_exists,
|
Ale_CreateAlert (Ale_WARNING,NULL,Txt_X_already_exists,NewName);
|
||||||
NewName);
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* Update the table changing old name by new name */
|
/* Update the table changing old name by new name */
|
||||||
|
@ -1475,16 +1474,12 @@ void Ctr_ReceiveFormNewCtr (void)
|
||||||
|
|
||||||
static void Ctr_ReceiveFormRequestOrCreateCtr (Hie_Status_t Status)
|
static void Ctr_ReceiveFormRequestOrCreateCtr (Hie_Status_t Status)
|
||||||
{
|
{
|
||||||
extern const char *Nam_FldShrtOrFullName[Nam_NUM_SHRT_FULL_NAMES];
|
|
||||||
extern const char *Txt_The_center_X_already_exists;
|
|
||||||
extern const char *Txt_Created_new_center_X;
|
extern const char *Txt_Created_new_center_X;
|
||||||
Nam_ShrtOrFullName_t ShrtOrFullName;
|
|
||||||
char *Names[Nam_NUM_SHRT_FULL_NAMES] =
|
char *Names[Nam_NUM_SHRT_FULL_NAMES] =
|
||||||
{
|
{
|
||||||
[Nam_SHRT_NAME] = Ctr_EditingCtr->ShrtName,
|
[Nam_SHRT_NAME] = Ctr_EditingCtr->ShrtName,
|
||||||
[Nam_FULL_NAME] = Ctr_EditingCtr->FullName,
|
[Nam_FULL_NAME] = Ctr_EditingCtr->FullName,
|
||||||
};
|
};
|
||||||
bool Exists;
|
|
||||||
|
|
||||||
/***** Get parameters from form *****/
|
/***** Get parameters from form *****/
|
||||||
/* Set center institution */
|
/* Set center institution */
|
||||||
|
@ -1505,19 +1500,9 @@ static void Ctr_ReceiveFormRequestOrCreateCtr (Hie_Status_t Status)
|
||||||
if (Ctr_EditingCtr->WWW[0])
|
if (Ctr_EditingCtr->WWW[0])
|
||||||
{
|
{
|
||||||
/***** If name of center was in database... *****/
|
/***** If name of center was in database... *****/
|
||||||
for (ShrtOrFullName = Nam_SHRT_NAME, Exists = false;
|
if (!Nam_CheckIfNameExists (Ctr_DB_CheckIfCtrNameExistsInIns,Names,
|
||||||
ShrtOrFullName <= Nam_FULL_NAME && !Exists;
|
-1L,Gbl.Hierarchy.Node[Hie_INS].HieCod,
|
||||||
ShrtOrFullName++)
|
0)) // Unused
|
||||||
if (Ctr_DB_CheckIfCtrNameExistsInIns (Nam_FldShrtOrFullName[ShrtOrFullName],
|
|
||||||
Names[ShrtOrFullName],-1L,
|
|
||||||
Gbl.Hierarchy.Node[Hie_INS].HieCod))
|
|
||||||
{
|
|
||||||
Ale_CreateAlert (Ale_WARNING,NULL,
|
|
||||||
Txt_The_center_X_already_exists,
|
|
||||||
Names[ShrtOrFullName]);
|
|
||||||
Exists = true;
|
|
||||||
}
|
|
||||||
if (!Exists) // Add new center to database
|
|
||||||
{
|
{
|
||||||
Ctr_EditingCtr->HieCod = Ctr_DB_CreateCenter (Ctr_EditingCtr,Status);
|
Ctr_EditingCtr->HieCod = Ctr_DB_CreateCenter (Ctr_EditingCtr,Status);
|
||||||
Ale_CreateAlert (Ale_SUCCESS,NULL,Txt_Created_new_center_X,
|
Ale_CreateAlert (Ale_SUCCESS,NULL,Txt_Created_new_center_X,
|
||||||
|
|
|
@ -1015,13 +1015,9 @@ void CtrCfg_ChangeCtrPhotoAttr (void)
|
||||||
|
|
||||||
void CtrCfg_ChangeCtrIns (void)
|
void CtrCfg_ChangeCtrIns (void)
|
||||||
{
|
{
|
||||||
extern const char *Nam_FldShrtOrFullName[Nam_NUM_SHRT_FULL_NAMES];
|
|
||||||
extern const char *Txt_The_center_X_already_exists;
|
|
||||||
extern const char *Txt_The_center_X_has_been_moved_to_the_institution_Y;
|
extern const char *Txt_The_center_X_has_been_moved_to_the_institution_Y;
|
||||||
struct Hie_Node NewIns;
|
struct Hie_Node NewIns;
|
||||||
Nam_ShrtOrFullName_t ShrtOrFullName;
|
char *Names[Nam_NUM_SHRT_FULL_NAMES] =
|
||||||
bool Exists;
|
|
||||||
char *Name[Nam_NUM_SHRT_FULL_NAMES] =
|
|
||||||
{
|
{
|
||||||
[Nam_SHRT_NAME] = Gbl.Hierarchy.Node[Hie_CTR].ShrtName,
|
[Nam_SHRT_NAME] = Gbl.Hierarchy.Node[Hie_CTR].ShrtName,
|
||||||
[Nam_FULL_NAME] = Gbl.Hierarchy.Node[Hie_CTR].FullName,
|
[Nam_FULL_NAME] = Gbl.Hierarchy.Node[Hie_CTR].FullName,
|
||||||
|
@ -1037,20 +1033,9 @@ void CtrCfg_ChangeCtrIns (void)
|
||||||
Ins_GetInstitDataByCod (&NewIns);
|
Ins_GetInstitDataByCod (&NewIns);
|
||||||
|
|
||||||
/***** Check if it already exists a center with the same name in the new institution *****/
|
/***** Check if it already exists a center with the same name in the new institution *****/
|
||||||
for (ShrtOrFullName = Nam_SHRT_NAME, Exists = false;
|
if (!Nam_CheckIfNameExists (Ctr_DB_CheckIfCtrNameExistsInIns,Names,
|
||||||
ShrtOrFullName <= Nam_FULL_NAME && !Exists;
|
Gbl.Hierarchy.Node[Hie_CTR].HieCod,NewIns.HieCod,
|
||||||
ShrtOrFullName++)
|
0)) // Unused
|
||||||
if (Ctr_DB_CheckIfCtrNameExistsInIns (Nam_FldShrtOrFullName[ShrtOrFullName],
|
|
||||||
Name[ShrtOrFullName],
|
|
||||||
Gbl.Hierarchy.Node[Hie_CTR].HieCod,
|
|
||||||
NewIns.HieCod))
|
|
||||||
{
|
|
||||||
Ale_CreateAlert (Ale_WARNING,NULL,
|
|
||||||
Txt_The_center_X_already_exists,
|
|
||||||
Name[ShrtOrFullName]);
|
|
||||||
Exists = true;
|
|
||||||
}
|
|
||||||
if (!Exists)
|
|
||||||
{
|
{
|
||||||
/***** Update institution in table of centers *****/
|
/***** Update institution in table of centers *****/
|
||||||
Ctr_DB_UpdateCtrIns (Gbl.Hierarchy.Node[Hie_CTR].HieCod,NewIns.HieCod);
|
Ctr_DB_UpdateCtrIns (Gbl.Hierarchy.Node[Hie_CTR].HieCod,NewIns.HieCod);
|
||||||
|
|
|
@ -297,7 +297,8 @@ unsigned Ctr_DB_GetPhotoAttribution (MYSQL_RES **mysql_res,long CtrCod)
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
bool Ctr_DB_CheckIfCtrNameExistsInIns (const char *FldName,const char *Name,
|
bool Ctr_DB_CheckIfCtrNameExistsInIns (const char *FldName,const char *Name,
|
||||||
long CtrCod,long InsCod)
|
long Cod,long PrtCod,
|
||||||
|
__attribute__((unused)) unsigned Year)
|
||||||
{
|
{
|
||||||
return
|
return
|
||||||
DB_QueryEXISTS ("can not check if the name of a center already existed",
|
DB_QueryEXISTS ("can not check if the name of a center already existed",
|
||||||
|
@ -307,10 +308,9 @@ bool Ctr_DB_CheckIfCtrNameExistsInIns (const char *FldName,const char *Name,
|
||||||
" WHERE InsCod=%ld"
|
" WHERE InsCod=%ld"
|
||||||
" AND %s='%s'"
|
" AND %s='%s'"
|
||||||
" AND CtrCod<>%ld)",
|
" AND CtrCod<>%ld)",
|
||||||
InsCod,
|
PrtCod,
|
||||||
FldName,
|
FldName,Name,
|
||||||
Name,
|
Cod);
|
||||||
CtrCod);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
|
@ -51,7 +51,8 @@ long Ctr_DB_GetInsCodOfCenterByCod (long CtrCod);
|
||||||
void Ctr_DB_GetShortNameOfCenterByCod (long CtrCod,char ShrtName[Nam_MAX_BYTES_SHRT_NAME + 1]);
|
void Ctr_DB_GetShortNameOfCenterByCod (long CtrCod,char ShrtName[Nam_MAX_BYTES_SHRT_NAME + 1]);
|
||||||
unsigned Ctr_DB_GetPhotoAttribution (MYSQL_RES **mysql_res,long CtrCod);
|
unsigned Ctr_DB_GetPhotoAttribution (MYSQL_RES **mysql_res,long CtrCod);
|
||||||
bool Ctr_DB_CheckIfCtrNameExistsInIns (const char *FldName,const char *Name,
|
bool Ctr_DB_CheckIfCtrNameExistsInIns (const char *FldName,const char *Name,
|
||||||
long CtrCod,long InsCod);
|
long Cod,long PrtCod,
|
||||||
|
__attribute__((unused)) unsigned Year);
|
||||||
|
|
||||||
unsigned Ctr_DB_SearchCtrs (MYSQL_RES **mysql_res,
|
unsigned Ctr_DB_SearchCtrs (MYSQL_RES **mysql_res,
|
||||||
const char SearchQuery[Sch_MAX_BYTES_SEARCH_QUERY + 1],
|
const char SearchQuery[Sch_MAX_BYTES_SEARCH_QUERY + 1],
|
||||||
|
|
|
@ -633,12 +633,13 @@ Me sale este error, no s
|
||||||
"can npt create received message (duplicated entry '243218-2160773' for key 'UsrCod_MsgCod')
|
"can npt create received message (duplicated entry '243218-2160773' for key 'UsrCod_MsgCod')
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define Log_PLATFORM_VERSION "SWAD 23.33.1 (2023-10-10)"
|
#define Log_PLATFORM_VERSION "SWAD 23.33.2 (2023-10-10)"
|
||||||
#define CSS_FILE "swad23.25.2.css"
|
#define CSS_FILE "swad23.25.2.css"
|
||||||
#define JS_FILE "swad22.49.js"
|
#define JS_FILE "swad22.49.js"
|
||||||
/*
|
/*
|
||||||
// TODO: Donde aparezca Txt_X_already_exists cambiar por la función nueva Nam_...
|
// TODO: Donde aparezca Txt_X_already_exists cambiar por la función nueva Nam_...
|
||||||
|
|
||||||
|
Version 23.33.2: Oct 10, 2023 Code refactoring in short and full names. Not finished. (335661 lines)
|
||||||
Version 23.33.1: Oct 10, 2023 Code refactoring in short and full names. Not finished. (335930 lines)
|
Version 23.33.1: Oct 10, 2023 Code refactoring in short and full names. Not finished. (335930 lines)
|
||||||
Version 23.33: Oct 10, 2023 Code refactoring in short and full names. (335919 lines)
|
Version 23.33: Oct 10, 2023 Code refactoring in short and full names. (335919 lines)
|
||||||
Version 23.32: Oct 10, 2023 Code refactoring in short and full names. (336110 lines)
|
Version 23.32: Oct 10, 2023 Code refactoring in short and full names. (336110 lines)
|
||||||
|
|
|
@ -1248,13 +1248,9 @@ void Crs_ReceiveFormNewCrs (void)
|
||||||
|
|
||||||
static void Crs_ReceiveFormRequestOrCreateCrs (Hie_Status_t Status)
|
static void Crs_ReceiveFormRequestOrCreateCrs (Hie_Status_t Status)
|
||||||
{
|
{
|
||||||
extern const char *Nam_FldShrtOrFullName[Nam_NUM_SHRT_FULL_NAMES];
|
|
||||||
extern const char *Txt_The_course_X_already_exists;
|
|
||||||
extern const char *Txt_Created_new_course_X;
|
extern const char *Txt_Created_new_course_X;
|
||||||
extern const char *Txt_The_year_X_is_not_allowed;
|
extern const char *Txt_The_year_X_is_not_allowed;
|
||||||
extern const char *Txt_YEAR_OF_DEGREE[1 + Deg_MAX_YEARS_PER_DEGREE];
|
extern const char *Txt_YEAR_OF_DEGREE[1 + Deg_MAX_YEARS_PER_DEGREE];
|
||||||
Nam_ShrtOrFullName_t ShrtOrFullName;
|
|
||||||
bool Exists;
|
|
||||||
char *Names[Nam_NUM_SHRT_FULL_NAMES] =
|
char *Names[Nam_NUM_SHRT_FULL_NAMES] =
|
||||||
{
|
{
|
||||||
[Nam_SHRT_NAME] = Crs_EditingCrs->ShrtName,
|
[Nam_SHRT_NAME] = Crs_EditingCrs->ShrtName,
|
||||||
|
@ -1275,21 +1271,10 @@ static void Crs_ReceiveFormRequestOrCreateCrs (Hie_Status_t Status)
|
||||||
if (Crs_EditingCrs->ShrtName[0] &&
|
if (Crs_EditingCrs->ShrtName[0] &&
|
||||||
Crs_EditingCrs->FullName[0]) // If there's a course name
|
Crs_EditingCrs->FullName[0]) // If there's a course name
|
||||||
{
|
{
|
||||||
/***** If name of course was in database... *****/
|
/***** If name of course was not in database... *****/
|
||||||
for (ShrtOrFullName = Nam_SHRT_NAME, Exists = false;
|
if (!Nam_CheckIfNameExists (Crs_DB_CheckIfCrsNameExistsInYearOfDeg,Names,
|
||||||
ShrtOrFullName <= Nam_FULL_NAME && !Exists;
|
-1L,Crs_EditingCrs->PrtCod,
|
||||||
ShrtOrFullName++)
|
Crs_EditingCrs->Specific.Year))
|
||||||
if (Crs_DB_CheckIfCrsNameExistsInYearOfDeg (Nam_FldShrtOrFullName[ShrtOrFullName],
|
|
||||||
Names[ShrtOrFullName],
|
|
||||||
-1L,Crs_EditingCrs->PrtCod,
|
|
||||||
Crs_EditingCrs->Specific.Year))
|
|
||||||
{
|
|
||||||
Ale_CreateAlert (Ale_WARNING,NULL,
|
|
||||||
Txt_The_course_X_already_exists,
|
|
||||||
Names[ShrtOrFullName]);
|
|
||||||
Exists = true;
|
|
||||||
}
|
|
||||||
if (!Exists) // Add new requested course to database
|
|
||||||
{
|
{
|
||||||
Crs_DB_CreateCourse (Crs_EditingCrs,Status);
|
Crs_DB_CreateCourse (Crs_EditingCrs,Status);
|
||||||
Ale_CreateAlert (Ale_SUCCESS,NULL,Txt_Created_new_course_X,
|
Ale_CreateAlert (Ale_SUCCESS,NULL,Txt_Created_new_course_X,
|
||||||
|
@ -1612,15 +1597,11 @@ void Crs_ChangeInsCrsCod (void)
|
||||||
|
|
||||||
void Crs_ChangeCrsYear (void)
|
void Crs_ChangeCrsYear (void)
|
||||||
{
|
{
|
||||||
extern const char *Nam_FldShrtOrFullName[Nam_NUM_SHRT_FULL_NAMES];
|
|
||||||
extern const char *Txt_The_course_X_already_exists_in_year_Y;
|
|
||||||
extern const char *Txt_YEAR_OF_DEGREE[1 + Deg_MAX_YEARS_PER_DEGREE];
|
extern const char *Txt_YEAR_OF_DEGREE[1 + Deg_MAX_YEARS_PER_DEGREE];
|
||||||
extern const char *Txt_The_year_of_the_course_X_has_changed;
|
extern const char *Txt_The_year_of_the_course_X_has_changed;
|
||||||
extern const char *Txt_The_year_X_is_not_allowed;
|
extern const char *Txt_The_year_X_is_not_allowed;
|
||||||
char YearStr[2 + 1];
|
char YearStr[2 + 1];
|
||||||
unsigned NewYear;
|
unsigned NewYear;
|
||||||
Nam_ShrtOrFullName_t ShrtOrFullName;
|
|
||||||
bool Exists;
|
|
||||||
char *Names[Nam_NUM_SHRT_FULL_NAMES] =
|
char *Names[Nam_NUM_SHRT_FULL_NAMES] =
|
||||||
{
|
{
|
||||||
[Nam_SHRT_NAME] = Crs_EditingCrs->ShrtName,
|
[Nam_SHRT_NAME] = Crs_EditingCrs->ShrtName,
|
||||||
|
@ -1645,20 +1626,9 @@ void Crs_ChangeCrsYear (void)
|
||||||
|
|
||||||
if (NewYear <= Deg_MAX_YEARS_PER_DEGREE) // If year is valid
|
if (NewYear <= Deg_MAX_YEARS_PER_DEGREE) // If year is valid
|
||||||
{
|
{
|
||||||
/***** If name of course was in database in the new year... *****/
|
/***** If name of course was not in database in the new year... *****/
|
||||||
for (ShrtOrFullName = Nam_SHRT_NAME, Exists = false;
|
if (!Nam_CheckIfNameExists (Crs_DB_CheckIfCrsNameExistsInYearOfDeg,Names,
|
||||||
ShrtOrFullName <= Nam_FULL_NAME && !Exists;
|
-1L,Crs_EditingCrs->PrtCod,NewYear))
|
||||||
ShrtOrFullName++)
|
|
||||||
{
|
|
||||||
if (Crs_DB_CheckIfCrsNameExistsInYearOfDeg (Nam_FldShrtOrFullName[ShrtOrFullName],
|
|
||||||
Names[ShrtOrFullName],
|
|
||||||
-1L,Crs_EditingCrs->PrtCod,NewYear))
|
|
||||||
Ale_CreateAlert (Ale_WARNING,NULL,
|
|
||||||
Txt_The_course_X_already_exists_in_year_Y,
|
|
||||||
Names[ShrtOrFullName],Txt_YEAR_OF_DEGREE[NewYear]);
|
|
||||||
Exists = true;
|
|
||||||
}
|
|
||||||
if (!Exists) // Update year in database
|
|
||||||
{
|
{
|
||||||
/***** Update year in table of courses *****/
|
/***** Update year in table of courses *****/
|
||||||
Crs_UpdateCrsYear (Crs_EditingCrs,NewYear);
|
Crs_UpdateCrsYear (Crs_EditingCrs,NewYear);
|
||||||
|
@ -1735,7 +1705,7 @@ void Crs_RenameCourse (struct Hie_Node *Crs,Nam_ShrtOrFullName_t ShrtOrFullName)
|
||||||
extern const char *Nam_ParShrtOrFullName[Nam_NUM_SHRT_FULL_NAMES];
|
extern const char *Nam_ParShrtOrFullName[Nam_NUM_SHRT_FULL_NAMES];
|
||||||
extern const char *Nam_FldShrtOrFullName[Nam_NUM_SHRT_FULL_NAMES];
|
extern const char *Nam_FldShrtOrFullName[Nam_NUM_SHRT_FULL_NAMES];
|
||||||
extern unsigned Nam_MaxBytesShrtOrFullName[Nam_NUM_SHRT_FULL_NAMES];
|
extern unsigned Nam_MaxBytesShrtOrFullName[Nam_NUM_SHRT_FULL_NAMES];
|
||||||
extern const char *Txt_The_course_X_already_exists;
|
extern const char *Txt_X_already_exists;
|
||||||
extern const char *Txt_The_course_X_has_been_renamed_as_Y;
|
extern const char *Txt_The_course_X_has_been_renamed_as_Y;
|
||||||
extern const char *Txt_The_name_X_has_not_changed;
|
extern const char *Txt_The_name_X_has_not_changed;
|
||||||
char *CurrentName[Nam_NUM_SHRT_FULL_NAMES] =
|
char *CurrentName[Nam_NUM_SHRT_FULL_NAMES] =
|
||||||
|
@ -1765,9 +1735,7 @@ void Crs_RenameCourse (struct Hie_Node *Crs,Nam_ShrtOrFullName_t ShrtOrFullName)
|
||||||
if (Crs_DB_CheckIfCrsNameExistsInYearOfDeg (Nam_ParShrtOrFullName[ShrtOrFullName],
|
if (Crs_DB_CheckIfCrsNameExistsInYearOfDeg (Nam_ParShrtOrFullName[ShrtOrFullName],
|
||||||
NewName,Crs->HieCod,
|
NewName,Crs->HieCod,
|
||||||
Crs->PrtCod,Crs->Specific.Year))
|
Crs->PrtCod,Crs->Specific.Year))
|
||||||
Ale_CreateAlert (Ale_WARNING,NULL,
|
Ale_CreateAlert (Ale_WARNING,NULL,Txt_X_already_exists,NewName);
|
||||||
Txt_The_course_X_already_exists,
|
|
||||||
NewName);
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* Update the table changing old name by new name */
|
/* Update the table changing old name by new name */
|
||||||
|
|
|
@ -458,13 +458,9 @@ static void CrsCfg_Indicators (void)
|
||||||
|
|
||||||
void CrsCfg_ChangeCrsDeg (void)
|
void CrsCfg_ChangeCrsDeg (void)
|
||||||
{
|
{
|
||||||
extern const char *Nam_FldShrtOrFullName[Nam_NUM_SHRT_FULL_NAMES];
|
|
||||||
extern const char *Txt_In_the_year_X_of_the_degree_Y_already_existed_a_course_with_the_name_Z;
|
|
||||||
extern const char *Txt_YEAR_OF_DEGREE[1 + Deg_MAX_YEARS_PER_DEGREE];
|
extern const char *Txt_YEAR_OF_DEGREE[1 + Deg_MAX_YEARS_PER_DEGREE];
|
||||||
extern const char *Txt_The_course_X_has_been_moved_to_the_degree_Y;
|
extern const char *Txt_The_course_X_has_been_moved_to_the_degree_Y;
|
||||||
struct Hie_Node NewDeg;
|
struct Hie_Node NewDeg;
|
||||||
Nam_ShrtOrFullName_t ShrtOrFullName;
|
|
||||||
bool Exists;
|
|
||||||
char *Names[Nam_NUM_SHRT_FULL_NAMES] =
|
char *Names[Nam_NUM_SHRT_FULL_NAMES] =
|
||||||
{
|
{
|
||||||
[Nam_SHRT_NAME] = Gbl.Hierarchy.Node[Hie_CRS].ShrtName,
|
[Nam_SHRT_NAME] = Gbl.Hierarchy.Node[Hie_CRS].ShrtName,
|
||||||
|
@ -480,21 +476,10 @@ void CrsCfg_ChangeCrsDeg (void)
|
||||||
/***** Get data of new degree *****/
|
/***** Get data of new degree *****/
|
||||||
Deg_GetDegreeDataByCod (&NewDeg);
|
Deg_GetDegreeDataByCod (&NewDeg);
|
||||||
|
|
||||||
/***** If name of course was in database in the new degree... *****/
|
/***** If name of course was not in database in the new degree... *****/
|
||||||
for (ShrtOrFullName = Nam_SHRT_NAME, Exists = false;
|
if (!Nam_CheckIfNameExists (Crs_DB_CheckIfCrsNameExistsInYearOfDeg,Names,
|
||||||
ShrtOrFullName <= Nam_FULL_NAME && !Exists;
|
-1L,NewDeg.HieCod,
|
||||||
ShrtOrFullName++)
|
Gbl.Hierarchy.Node[Hie_CRS].Specific.Year))
|
||||||
if (Crs_DB_CheckIfCrsNameExistsInYearOfDeg (Nam_FldShrtOrFullName[ShrtOrFullName],
|
|
||||||
Names[ShrtOrFullName],-1L,
|
|
||||||
NewDeg.HieCod,Gbl.Hierarchy.Node[Hie_CRS].Specific.Year))
|
|
||||||
{
|
|
||||||
Ale_CreateAlert (Ale_WARNING,NULL,
|
|
||||||
Txt_In_the_year_X_of_the_degree_Y_already_existed_a_course_with_the_name_Z,
|
|
||||||
Txt_YEAR_OF_DEGREE[Gbl.Hierarchy.Node[Hie_CRS].Specific.Year],
|
|
||||||
NewDeg.FullName,Names[ShrtOrFullName]);
|
|
||||||
Exists = true;
|
|
||||||
}
|
|
||||||
if (!Exists) // Update degree in database
|
|
||||||
{
|
{
|
||||||
/***** Update degree in table of courses *****/
|
/***** Update degree in table of courses *****/
|
||||||
Crs_DB_UpdateCrsDeg (Gbl.Hierarchy.Node[Hie_CRS].HieCod,NewDeg.HieCod);
|
Crs_DB_UpdateCrsDeg (Gbl.Hierarchy.Node[Hie_CRS].HieCod,NewDeg.HieCod);
|
||||||
|
@ -533,15 +518,11 @@ void CrsCfg_RenameCourseFull (void)
|
||||||
|
|
||||||
void CrsCfg_ChangeCrsYear (void)
|
void CrsCfg_ChangeCrsYear (void)
|
||||||
{
|
{
|
||||||
extern const char *Nam_FldShrtOrFullName[Nam_NUM_SHRT_FULL_NAMES];
|
|
||||||
extern const char *Txt_The_course_X_already_exists_in_year_Y;
|
|
||||||
extern const char *Txt_YEAR_OF_DEGREE[1 + Deg_MAX_YEARS_PER_DEGREE];
|
extern const char *Txt_YEAR_OF_DEGREE[1 + Deg_MAX_YEARS_PER_DEGREE];
|
||||||
extern const char *Txt_The_year_of_the_course_X_has_changed;
|
extern const char *Txt_The_year_of_the_course_X_has_changed;
|
||||||
extern const char *Txt_The_year_X_is_not_allowed;
|
extern const char *Txt_The_year_X_is_not_allowed;
|
||||||
char YearStr[2 + 1];
|
char YearStr[2 + 1];
|
||||||
unsigned NewYear;
|
unsigned NewYear;
|
||||||
Nam_ShrtOrFullName_t ShrtOrFullName;
|
|
||||||
bool Exists;
|
|
||||||
char *Names[Nam_NUM_SHRT_FULL_NAMES] =
|
char *Names[Nam_NUM_SHRT_FULL_NAMES] =
|
||||||
{
|
{
|
||||||
[Nam_SHRT_NAME] = Gbl.Hierarchy.Node[Hie_CRS].ShrtName,
|
[Nam_SHRT_NAME] = Gbl.Hierarchy.Node[Hie_CRS].ShrtName,
|
||||||
|
@ -554,20 +535,9 @@ void CrsCfg_ChangeCrsYear (void)
|
||||||
|
|
||||||
if (NewYear <= Deg_MAX_YEARS_PER_DEGREE) // If year is valid
|
if (NewYear <= Deg_MAX_YEARS_PER_DEGREE) // If year is valid
|
||||||
{
|
{
|
||||||
/***** If name of course was in database in the new year... *****/
|
/***** If name of course was not in database in the new year... *****/
|
||||||
for (ShrtOrFullName = Nam_SHRT_NAME, Exists = false;
|
if (!Nam_CheckIfNameExists (Crs_DB_CheckIfCrsNameExistsInYearOfDeg,Names,
|
||||||
ShrtOrFullName <= Nam_FULL_NAME && !Exists;
|
-1L,Gbl.Hierarchy.Node[Hie_CRS].PrtCod,NewYear))
|
||||||
ShrtOrFullName++)
|
|
||||||
if (Crs_DB_CheckIfCrsNameExistsInYearOfDeg (Nam_FldShrtOrFullName[ShrtOrFullName],
|
|
||||||
Names[ShrtOrFullName],-1L,
|
|
||||||
Gbl.Hierarchy.Node[Hie_CRS].PrtCod,NewYear))
|
|
||||||
{
|
|
||||||
Ale_CreateAlert (Ale_WARNING,NULL,
|
|
||||||
Txt_The_course_X_already_exists_in_year_Y,
|
|
||||||
Names[ShrtOrFullName],Txt_YEAR_OF_DEGREE[NewYear]);
|
|
||||||
Exists = true;
|
|
||||||
}
|
|
||||||
if (!Exists) // Update year in database
|
|
||||||
{
|
{
|
||||||
/***** Update year in table of courses *****/
|
/***** Update year in table of courses *****/
|
||||||
Crs_UpdateCrsYear (&Gbl.Hierarchy.Node[Hie_CRS],NewYear);
|
Crs_UpdateCrsYear (&Gbl.Hierarchy.Node[Hie_CRS],NewYear);
|
||||||
|
|
|
@ -213,7 +213,7 @@ bool Crs_DB_CheckIfCrsCodExists (long CrsCod)
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
bool Crs_DB_CheckIfCrsNameExistsInYearOfDeg (const char *FldName,const char *Name,
|
bool Crs_DB_CheckIfCrsNameExistsInYearOfDeg (const char *FldName,const char *Name,
|
||||||
long CrsCod,long DegCod,unsigned Year)
|
long Cod,long PrtCod,unsigned Year)
|
||||||
{
|
{
|
||||||
return
|
return
|
||||||
DB_QueryEXISTS ("can not check if the name of a course already existed",
|
DB_QueryEXISTS ("can not check if the name of a course already existed",
|
||||||
|
@ -224,11 +224,10 @@ bool Crs_DB_CheckIfCrsNameExistsInYearOfDeg (const char *FldName,const char *Nam
|
||||||
" AND Year=%u"
|
" AND Year=%u"
|
||||||
" AND %s='%s'"
|
" AND %s='%s'"
|
||||||
" AND CrsCod<>%ld)",
|
" AND CrsCod<>%ld)",
|
||||||
DegCod,
|
PrtCod,
|
||||||
Year,
|
Year,
|
||||||
FldName,
|
FldName,Name,
|
||||||
Name,
|
Cod);
|
||||||
CrsCod);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
|
@ -47,7 +47,7 @@ void Crs_DB_GetShortNamesByCod (long CrsCod,
|
||||||
char DegShortName[Nam_MAX_BYTES_SHRT_NAME + 1]);
|
char DegShortName[Nam_MAX_BYTES_SHRT_NAME + 1]);
|
||||||
bool Crs_DB_CheckIfCrsCodExists (long CrsCod);
|
bool Crs_DB_CheckIfCrsCodExists (long CrsCod);
|
||||||
bool Crs_DB_CheckIfCrsNameExistsInYearOfDeg (const char *FldName,const char *Name,
|
bool Crs_DB_CheckIfCrsNameExistsInYearOfDeg (const char *FldName,const char *Name,
|
||||||
long CrsCod,long DegCod,unsigned Year);
|
long Cod,long PrtCod,unsigned Year);
|
||||||
unsigned Crs_DB_GetCrssOfAUsr (MYSQL_RES **mysql_res,long UsrCod,Rol_Role_t Role);
|
unsigned Crs_DB_GetCrssOfAUsr (MYSQL_RES **mysql_res,long UsrCod,Rol_Role_t Role);
|
||||||
unsigned Crs_DB_GetOldCrss (MYSQL_RES **mysql_res,unsigned long SecondsWithoutAccess);
|
unsigned Crs_DB_GetOldCrss (MYSQL_RES **mysql_res,unsigned long SecondsWithoutAccess);
|
||||||
|
|
||||||
|
|
|
@ -1045,11 +1045,7 @@ void Deg_ReceiveFormNewDeg (void)
|
||||||
|
|
||||||
static void Deg_ReceiveFormRequestOrCreateDeg (Hie_Status_t Status)
|
static void Deg_ReceiveFormRequestOrCreateDeg (Hie_Status_t Status)
|
||||||
{
|
{
|
||||||
extern const char *Nam_FldShrtOrFullName[Nam_NUM_SHRT_FULL_NAMES];
|
|
||||||
extern const char *Txt_The_degree_X_already_exists;
|
|
||||||
extern const char *Txt_Created_new_degree_X;
|
extern const char *Txt_Created_new_degree_X;
|
||||||
Nam_ShrtOrFullName_t ShrtOrFullName;
|
|
||||||
bool Exists;
|
|
||||||
char *Names[Nam_NUM_SHRT_FULL_NAMES] =
|
char *Names[Nam_NUM_SHRT_FULL_NAMES] =
|
||||||
{
|
{
|
||||||
[Nam_SHRT_NAME] = Deg_EditingDeg->ShrtName,
|
[Nam_SHRT_NAME] = Deg_EditingDeg->ShrtName,
|
||||||
|
@ -1074,20 +1070,10 @@ static void Deg_ReceiveFormRequestOrCreateDeg (Hie_Status_t Status)
|
||||||
{
|
{
|
||||||
if (Deg_EditingDeg->WWW[0])
|
if (Deg_EditingDeg->WWW[0])
|
||||||
{
|
{
|
||||||
/***** If name of degree was in database... *****/
|
/***** If name of degree was not in database... *****/
|
||||||
for (ShrtOrFullName = Nam_SHRT_NAME, Exists = false;
|
if (!Nam_CheckIfNameExists (Deg_DB_CheckIfDegNameExistsInCtr,Names,
|
||||||
ShrtOrFullName <= Nam_FULL_NAME && !Exists;
|
-1L,Deg_EditingDeg->PrtCod,
|
||||||
ShrtOrFullName++)
|
0)) // Unused
|
||||||
if (Deg_DB_CheckIfDegNameExistsInCtr (Nam_FldShrtOrFullName[ShrtOrFullName],
|
|
||||||
Names[ShrtOrFullName],
|
|
||||||
-1L,Deg_EditingDeg->PrtCod))
|
|
||||||
{
|
|
||||||
Ale_CreateAlert (Ale_WARNING,NULL,
|
|
||||||
Txt_The_degree_X_already_exists,
|
|
||||||
Names[ShrtOrFullName]);
|
|
||||||
Exists = true;
|
|
||||||
}
|
|
||||||
if (!Exists) // Add new degree to database
|
|
||||||
{
|
{
|
||||||
Deg_DB_CreateDegree (Deg_EditingDeg,Status);
|
Deg_DB_CreateDegree (Deg_EditingDeg,Status);
|
||||||
Ale_CreateAlert (Ale_SUCCESS,NULL,Txt_Created_new_degree_X,
|
Ale_CreateAlert (Ale_SUCCESS,NULL,Txt_Created_new_degree_X,
|
||||||
|
@ -1302,7 +1288,7 @@ void Deg_RenameDegree (struct Hie_Node *Deg,Nam_ShrtOrFullName_t ShrtOrFullName)
|
||||||
extern const char *Nam_ParShrtOrFullName[Nam_NUM_SHRT_FULL_NAMES];
|
extern const char *Nam_ParShrtOrFullName[Nam_NUM_SHRT_FULL_NAMES];
|
||||||
extern const char *Nam_FldShrtOrFullName[Nam_NUM_SHRT_FULL_NAMES];
|
extern const char *Nam_FldShrtOrFullName[Nam_NUM_SHRT_FULL_NAMES];
|
||||||
extern unsigned Nam_MaxBytesShrtOrFullName[Nam_NUM_SHRT_FULL_NAMES];
|
extern unsigned Nam_MaxBytesShrtOrFullName[Nam_NUM_SHRT_FULL_NAMES];
|
||||||
extern const char *Txt_The_degree_X_already_exists;
|
extern const char *Txt_X_already_exists;
|
||||||
extern const char *Txt_The_degree_X_has_been_renamed_as_Y;
|
extern const char *Txt_The_degree_X_has_been_renamed_as_Y;
|
||||||
extern const char *Txt_The_name_X_has_not_changed;
|
extern const char *Txt_The_name_X_has_not_changed;
|
||||||
char *CurrentName[Nam_NUM_SHRT_FULL_NAMES] =
|
char *CurrentName[Nam_NUM_SHRT_FULL_NAMES] =
|
||||||
|
@ -1328,9 +1314,9 @@ void Deg_RenameDegree (struct Hie_Node *Deg,Nam_ShrtOrFullName_t ShrtOrFullName)
|
||||||
{
|
{
|
||||||
/***** If degree was in database... *****/
|
/***** If degree was in database... *****/
|
||||||
if (Deg_DB_CheckIfDegNameExistsInCtr (Nam_ParShrtOrFullName[ShrtOrFullName],
|
if (Deg_DB_CheckIfDegNameExistsInCtr (Nam_ParShrtOrFullName[ShrtOrFullName],
|
||||||
NewName,Deg->HieCod,Deg->PrtCod))
|
NewName,Deg->HieCod,Deg->PrtCod,
|
||||||
Ale_CreateAlert (Ale_WARNING,NULL,
|
0)) // Unused
|
||||||
Txt_The_degree_X_already_exists,NewName);
|
Ale_CreateAlert (Ale_WARNING,NULL,Txt_X_already_exists,NewName);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* Update the table changing old name by new name */
|
/* Update the table changing old name by new name */
|
||||||
|
|
|
@ -348,12 +348,8 @@ static void DegCfg_NumCrss (void)
|
||||||
|
|
||||||
void DegCfg_ChangeDegCtr (void)
|
void DegCfg_ChangeDegCtr (void)
|
||||||
{
|
{
|
||||||
extern const char *Nam_FldShrtOrFullName[Nam_NUM_SHRT_FULL_NAMES];
|
|
||||||
extern const char *Txt_The_degree_X_already_exists;
|
|
||||||
extern const char *Txt_The_degree_X_has_been_moved_to_the_center_Y;
|
extern const char *Txt_The_degree_X_has_been_moved_to_the_center_Y;
|
||||||
struct Hie_Node NewCtr;
|
struct Hie_Node NewCtr;
|
||||||
Nam_ShrtOrFullName_t ShrtOrFullName;
|
|
||||||
bool Exists;
|
|
||||||
char *Names[Nam_NUM_SHRT_FULL_NAMES] =
|
char *Names[Nam_NUM_SHRT_FULL_NAMES] =
|
||||||
{
|
{
|
||||||
[Nam_SHRT_NAME] = Gbl.Hierarchy.Node[Hie_DEG].ShrtName,
|
[Nam_SHRT_NAME] = Gbl.Hierarchy.Node[Hie_DEG].ShrtName,
|
||||||
|
@ -369,20 +365,10 @@ void DegCfg_ChangeDegCtr (void)
|
||||||
/***** Get data of new center *****/
|
/***** Get data of new center *****/
|
||||||
Ctr_GetCenterDataByCod (&NewCtr);
|
Ctr_GetCenterDataByCod (&NewCtr);
|
||||||
|
|
||||||
/***** Check if it already exists a degree with the same name in the new center *****/
|
/***** Check if it already existed a degree with the same name in the new center *****/
|
||||||
for (ShrtOrFullName = Nam_SHRT_NAME, Exists = false;
|
if (!Nam_CheckIfNameExists (Deg_DB_CheckIfDegNameExistsInCtr,Names,
|
||||||
ShrtOrFullName <= Nam_FULL_NAME && !Exists;
|
Gbl.Hierarchy.Node[Hie_DEG].HieCod,NewCtr.HieCod,
|
||||||
ShrtOrFullName++)
|
0)) // Unused
|
||||||
if (Deg_DB_CheckIfDegNameExistsInCtr (Nam_FldShrtOrFullName[ShrtOrFullName],
|
|
||||||
Names[ShrtOrFullName],
|
|
||||||
Gbl.Hierarchy.Node[Hie_DEG].HieCod,
|
|
||||||
NewCtr.HieCod))
|
|
||||||
{
|
|
||||||
Ale_CreateAlert (Ale_WARNING,Txt_The_degree_X_already_exists,
|
|
||||||
Names[ShrtOrFullName]);
|
|
||||||
Exists = true;
|
|
||||||
}
|
|
||||||
if (Exists)
|
|
||||||
{
|
{
|
||||||
/***** Update center in table of degrees *****/
|
/***** Update center in table of degrees *****/
|
||||||
Deg_DB_UpdateDegCtr (Gbl.Hierarchy.Node[Hie_DEG].HieCod,NewCtr.HieCod);
|
Deg_DB_UpdateDegCtr (Gbl.Hierarchy.Node[Hie_DEG].HieCod,NewCtr.HieCod);
|
||||||
|
|
|
@ -517,7 +517,8 @@ unsigned Deg_DB_GetDegsWithStds (MYSQL_RES **mysql_res)
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
bool Deg_DB_CheckIfDegNameExistsInCtr (const char *FldName,const char *Name,
|
bool Deg_DB_CheckIfDegNameExistsInCtr (const char *FldName,const char *Name,
|
||||||
long DegCod,long CtrCod)
|
long Cod,long PrtCod,
|
||||||
|
__attribute__((unused)) unsigned Year)
|
||||||
{
|
{
|
||||||
return
|
return
|
||||||
DB_QueryEXISTS ("can not check if the name of a degree already existed",
|
DB_QueryEXISTS ("can not check if the name of a degree already existed",
|
||||||
|
@ -527,9 +528,9 @@ bool Deg_DB_CheckIfDegNameExistsInCtr (const char *FldName,const char *Name,
|
||||||
" WHERE CtrCod=%ld"
|
" WHERE CtrCod=%ld"
|
||||||
" AND %s='%s'"
|
" AND %s='%s'"
|
||||||
" AND DegCod<>%ld)",
|
" AND DegCod<>%ld)",
|
||||||
CtrCod,
|
PrtCod,
|
||||||
FldName,Name,
|
FldName,Name,
|
||||||
DegCod);
|
Cod);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
|
@ -56,7 +56,8 @@ unsigned Deg_DB_GetDegsOfCurrentCtrFull (MYSQL_RES **mysql_res);
|
||||||
unsigned Deg_DB_GetDegsWithPendingCrss (MYSQL_RES **mysql_res);
|
unsigned Deg_DB_GetDegsWithPendingCrss (MYSQL_RES **mysql_res);
|
||||||
unsigned Deg_DB_GetDegsWithStds (MYSQL_RES **mysql_res);
|
unsigned Deg_DB_GetDegsWithStds (MYSQL_RES **mysql_res);
|
||||||
bool Deg_DB_CheckIfDegNameExistsInCtr (const char *FldName,const char *Name,
|
bool Deg_DB_CheckIfDegNameExistsInCtr (const char *FldName,const char *Name,
|
||||||
long DegCod,long CtrCod);
|
long Cod,long PrtCod,
|
||||||
|
__attribute__((unused)) unsigned Year);
|
||||||
|
|
||||||
unsigned Deg_DB_SearchDegs (MYSQL_RES **mysql_res,
|
unsigned Deg_DB_SearchDegs (MYSQL_RES **mysql_res,
|
||||||
const char SearchQuery[Sch_MAX_BYTES_SEARCH_QUERY + 1],
|
const char SearchQuery[Sch_MAX_BYTES_SEARCH_QUERY + 1],
|
||||||
|
|
|
@ -673,7 +673,7 @@ static void Dpt_RenameDepartment (Nam_ShrtOrFullName_t ShrtOrFullName)
|
||||||
extern const char *Nam_ParShrtOrFullName[Nam_NUM_SHRT_FULL_NAMES];
|
extern const char *Nam_ParShrtOrFullName[Nam_NUM_SHRT_FULL_NAMES];
|
||||||
extern const char *Nam_FldShrtOrFullName[Nam_NUM_SHRT_FULL_NAMES];
|
extern const char *Nam_FldShrtOrFullName[Nam_NUM_SHRT_FULL_NAMES];
|
||||||
extern unsigned Nam_MaxBytesShrtOrFullName[Nam_NUM_SHRT_FULL_NAMES];
|
extern unsigned Nam_MaxBytesShrtOrFullName[Nam_NUM_SHRT_FULL_NAMES];
|
||||||
extern const char *Txt_The_department_X_already_exists;
|
extern const char *Txt_X_already_exists;
|
||||||
extern const char *Txt_The_department_X_has_been_renamed_as_Y;
|
extern const char *Txt_The_department_X_has_been_renamed_as_Y;
|
||||||
extern const char *Txt_The_name_X_has_not_changed;
|
extern const char *Txt_The_name_X_has_not_changed;
|
||||||
char *CurrentName[Nam_NUM_SHRT_FULL_NAMES] =
|
char *CurrentName[Nam_NUM_SHRT_FULL_NAMES] =
|
||||||
|
@ -700,12 +700,12 @@ static void Dpt_RenameDepartment (Nam_ShrtOrFullName_t ShrtOrFullName)
|
||||||
(this happens when return is pressed without changes) *****/
|
(this happens when return is pressed without changes) *****/
|
||||||
if (strcmp (CurrentName[ShrtOrFullName],NewName)) // Different names
|
if (strcmp (CurrentName[ShrtOrFullName],NewName)) // Different names
|
||||||
{
|
{
|
||||||
/***** If degree was in database... *****/
|
/***** If name department was not in database... *****/
|
||||||
if (Dpt_DB_CheckIfDepartmentNameExists (Nam_ParShrtOrFullName[ShrtOrFullName],
|
if (Dpt_DB_CheckIfDepartmentNameExists (Nam_ParShrtOrFullName[ShrtOrFullName],
|
||||||
NewName,Dpt_EditingDpt->DptCod))
|
NewName,Dpt_EditingDpt->DptCod,
|
||||||
Ale_CreateAlert (Ale_WARNING,NULL,
|
-1L, // Unused
|
||||||
Txt_The_department_X_already_exists,
|
0)) // Unused
|
||||||
NewName);
|
Ale_CreateAlert (Ale_WARNING,NULL,Txt_X_already_exists,NewName);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* Update the table changing old name by new name */
|
/* Update the table changing old name by new name */
|
||||||
|
@ -895,11 +895,7 @@ static void Dpt_PutHeadDepartments (void)
|
||||||
|
|
||||||
void Dpt_ReceiveFormNewDpt (void)
|
void Dpt_ReceiveFormNewDpt (void)
|
||||||
{
|
{
|
||||||
extern const char *Nam_FldShrtOrFullName[Nam_NUM_SHRT_FULL_NAMES];
|
|
||||||
extern const char *Txt_The_department_X_already_exists;
|
|
||||||
extern const char *Txt_Created_new_department_X;
|
extern const char *Txt_Created_new_department_X;
|
||||||
Nam_ShrtOrFullName_t ShrtOrFullName;
|
|
||||||
bool Exists;
|
|
||||||
char *Names[Nam_NUM_SHRT_FULL_NAMES] =
|
char *Names[Nam_NUM_SHRT_FULL_NAMES] =
|
||||||
{
|
{
|
||||||
[Nam_SHRT_NAME] = Dpt_EditingDpt->ShrtName,
|
[Nam_SHRT_NAME] = Dpt_EditingDpt->ShrtName,
|
||||||
|
@ -924,19 +920,11 @@ void Dpt_ReceiveFormNewDpt (void)
|
||||||
{
|
{
|
||||||
if (Dpt_EditingDpt->WWW[0])
|
if (Dpt_EditingDpt->WWW[0])
|
||||||
{
|
{
|
||||||
/***** If name of department was in database... *****/
|
/***** If name of department was not in database... *****/
|
||||||
for (ShrtOrFullName = Nam_SHRT_NAME, Exists = false;
|
if (!Nam_CheckIfNameExists (Dpt_DB_CheckIfDepartmentNameExists,Names,
|
||||||
ShrtOrFullName <= Nam_FULL_NAME && !Exists;
|
-1L,
|
||||||
ShrtOrFullName++)
|
-1L, // Unused
|
||||||
if (Dpt_DB_CheckIfDepartmentNameExists (Nam_FldShrtOrFullName[ShrtOrFullName],
|
0)) // Unused
|
||||||
Names[ShrtOrFullName],-1L))
|
|
||||||
{
|
|
||||||
Ale_CreateAlert (Ale_WARNING,NULL,
|
|
||||||
Txt_The_department_X_already_exists,
|
|
||||||
Names[ShrtOrFullName]);
|
|
||||||
Exists = true;
|
|
||||||
}
|
|
||||||
if (!Exists) // Add new department to database
|
|
||||||
{
|
{
|
||||||
Dpt_DB_CreateDepartment (Dpt_EditingDpt);
|
Dpt_DB_CreateDepartment (Dpt_EditingDpt);
|
||||||
Ale_CreateAlert (Ale_SUCCESS,NULL,Txt_Created_new_department_X,
|
Ale_CreateAlert (Ale_SUCCESS,NULL,Txt_Created_new_department_X,
|
||||||
|
|
|
@ -151,7 +151,9 @@ unsigned Dpt_DB_GetDepartmentDataByCod (MYSQL_RES **mysql_res,long DptCod)
|
||||||
/******************* Check if the name of department exists ******************/
|
/******************* Check if the name of department exists ******************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
bool Dpt_DB_CheckIfDepartmentNameExists (const char *FldName,const char *Name,long DptCod)
|
bool Dpt_DB_CheckIfDepartmentNameExists (const char *FldName,const char *Name,long Cod,
|
||||||
|
__attribute__((unused)) long PrtCod,
|
||||||
|
__attribute__((unused)) unsigned Year)
|
||||||
{
|
{
|
||||||
return
|
return
|
||||||
DB_QueryEXISTS ("can not check if the department name already existed",
|
DB_QueryEXISTS ("can not check if the department name already existed",
|
||||||
|
@ -161,7 +163,7 @@ bool Dpt_DB_CheckIfDepartmentNameExists (const char *FldName,const char *Name,lo
|
||||||
" WHERE %s='%s'"
|
" WHERE %s='%s'"
|
||||||
" AND DptCod<>%ld)",
|
" AND DptCod<>%ld)",
|
||||||
FldName,Name,
|
FldName,Name,
|
||||||
DptCod);
|
Cod);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
|
@ -41,7 +41,9 @@ void Dpt_DB_CreateDepartment (const struct Dpt_Department *Dpt);
|
||||||
unsigned Dpt_DB_GetListDepartments (MYSQL_RES **mysql_res,
|
unsigned Dpt_DB_GetListDepartments (MYSQL_RES **mysql_res,
|
||||||
long InsCod,Dpt_Order_t SelectedOrder);
|
long InsCod,Dpt_Order_t SelectedOrder);
|
||||||
unsigned Dpt_DB_GetDepartmentDataByCod (MYSQL_RES **mysql_res,long DptCod);
|
unsigned Dpt_DB_GetDepartmentDataByCod (MYSQL_RES **mysql_res,long DptCod);
|
||||||
bool Dpt_DB_CheckIfDepartmentNameExists (const char *FldName,const char *Name,long DptCod);
|
bool Dpt_DB_CheckIfDepartmentNameExists (const char *FldName,const char *Name,long Cod,
|
||||||
|
__attribute__((unused)) long PrtCod,
|
||||||
|
__attribute__((unused)) unsigned Year);
|
||||||
unsigned Dpt_DB_GetNumDepartmentsInInstitution (long InsCod);
|
unsigned Dpt_DB_GetNumDepartmentsInInstitution (long InsCod);
|
||||||
unsigned Dpt_DB_GetNumTchsCurrentInsInDepartment (long DptCod);
|
unsigned Dpt_DB_GetNumTchsCurrentInsInDepartment (long DptCod);
|
||||||
|
|
||||||
|
|
138
swad_text.c
138
swad_text.c
|
@ -46840,29 +46840,6 @@ const char *Txt_The_banner_X_has_been_renamed_as_Y = // Warning: it is very impo
|
||||||
"The banner <strong>%s</strong> has been renamed as <strong>%s</strong>."; // Çeviri lazim!
|
"The banner <strong>%s</strong> has been renamed as <strong>%s</strong>."; // Çeviri lazim!
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
const char *Txt_The_building_X_already_exists = // Warning: it is very important to include %s in the following sentences
|
|
||||||
#if L==1 // ca
|
|
||||||
"L'edifici <strong>%s</strong> ja existeix.";
|
|
||||||
#elif L==2 // de
|
|
||||||
"Das Gebäude <strong>%s</strong> wurde bereits eingegeben.";
|
|
||||||
#elif L==3 // en
|
|
||||||
"The building <strong>%s</strong> already exists.";
|
|
||||||
#elif L==4 // es
|
|
||||||
"El edificio <strong>%s</strong> ya existe.";
|
|
||||||
#elif L==5 // fr
|
|
||||||
"Le bâtiment <strong>%s</strong> existe déjà.";
|
|
||||||
#elif L==6 // gn
|
|
||||||
"El edificio <strong>%s</strong> ya existe."; // Okoteve traducción
|
|
||||||
#elif L==7 // it
|
|
||||||
"L'edificio <strong>%s</strong> già esiste.";
|
|
||||||
#elif L==8 // pl
|
|
||||||
"Budynek <strong>%s</strong> już istnieje.";
|
|
||||||
#elif L==9 // pt
|
|
||||||
"O edifício <strong>%s</strong> já existe.";
|
|
||||||
#elif L==10 // tr
|
|
||||||
"The building <strong>%s</strong> already exists."; // Çeviri lazim!
|
|
||||||
#endif
|
|
||||||
|
|
||||||
const char *Txt_The_building_X_has_been_renamed_as_Y = // Warning: it is very important to include two %s in the following sentences
|
const char *Txt_The_building_X_has_been_renamed_as_Y = // Warning: it is very important to include two %s in the following sentences
|
||||||
#if L==1 // ca
|
#if L==1 // ca
|
||||||
"L'edifici <strong>%s</strong> ha passat a anomenar-se <strong>%s</strong>.";
|
"L'edifici <strong>%s</strong> ha passat a anomenar-se <strong>%s</strong>.";
|
||||||
|
@ -47001,29 +46978,6 @@ const char *Txt_The_capacity_of_room_X_is_now_Y = // Warning: it is very importa
|
||||||
"The capacity of room <strong>%s</strong> is now <strong>%u</strong>."; // Çeviri lazim!
|
"The capacity of room <strong>%s</strong> is now <strong>%u</strong>."; // Çeviri lazim!
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
const char *Txt_The_center_X_already_exists = // Warning: it is very important to include %s in the following sentences
|
|
||||||
#if L==1 // ca
|
|
||||||
"El centre <strong>%s</strong> ja existeix.";
|
|
||||||
#elif L==2 // de
|
|
||||||
"Das Zentrum <strong>%s</strong> existiert bereits.";
|
|
||||||
#elif L==3 // en
|
|
||||||
"The center <strong>%s</strong> already exists.";
|
|
||||||
#elif L==4 // es
|
|
||||||
"El centro <strong>%s</strong> ya existe.";
|
|
||||||
#elif L==5 // fr
|
|
||||||
"Le centre <strong>%s</strong> existe déjà.";
|
|
||||||
#elif L==6 // gn
|
|
||||||
"El centro <strong>%s</strong> ya existe."; // Okoteve traducción
|
|
||||||
#elif L==7 // it
|
|
||||||
"Il centro <strong>%s</strong> già esiste.";
|
|
||||||
#elif L==8 // pl
|
|
||||||
"Centrum <strong>%s</strong> już istnieje.";
|
|
||||||
#elif L==9 // pt
|
|
||||||
"O centro <strong>%s</strong> já existe.";
|
|
||||||
#elif L==10 // tr
|
|
||||||
"The center <strong>%s</strong> already exists."; // Çeviri lazim!
|
|
||||||
#endif
|
|
||||||
|
|
||||||
const char *Txt_The_center_X_has_been_moved_to_the_institution_Y = // Warning: it is very important to include two %s in the following sentences
|
const char *Txt_The_center_X_has_been_moved_to_the_institution_Y = // Warning: it is very important to include two %s in the following sentences
|
||||||
#if L==1 // ca
|
#if L==1 // ca
|
||||||
"El centre <strong>%s</strong> s'ha traslladat"
|
"El centre <strong>%s</strong> s'ha traslladat"
|
||||||
|
@ -47360,52 +47314,6 @@ const char *Txt_The_country_of_the_institution_X_has_changed_to_Y = // Warning:
|
||||||
" has changed to <strong>%s</strong>."; // Çeviri lazim!
|
" has changed to <strong>%s</strong>."; // Çeviri lazim!
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
const char *Txt_The_course_X_already_exists = // Warning: it is very important to include %s in the following sentences
|
|
||||||
#if L==1 // ca
|
|
||||||
"L´assignatura <strong>%s</strong> ja existeix.";
|
|
||||||
#elif L==2 // de
|
|
||||||
"Die Kurs <strong>%s</strong> wurde bereits eingegeben.";
|
|
||||||
#elif L==3 // en
|
|
||||||
"The course <strong>%s</strong> already exists.";
|
|
||||||
#elif L==4 // es
|
|
||||||
"La asignatura <strong>%s</strong> ya existe.";
|
|
||||||
#elif L==5 // fr
|
|
||||||
"La matière <strong>%s</strong> existe déjà.";
|
|
||||||
#elif L==6 // gn
|
|
||||||
"La asignatura <strong>%s</strong> ya existe."; // Okoteve traducción
|
|
||||||
#elif L==7 // it
|
|
||||||
"Il corso <strong>%s</strong> già esiste.";
|
|
||||||
#elif L==8 // pl
|
|
||||||
"Kurs <strong>%s</strong> już istnieje.";
|
|
||||||
#elif L==9 // pt
|
|
||||||
"A disciplina <strong>%s</strong> já existe.";
|
|
||||||
#elif L==10 // tr
|
|
||||||
"The course <strong>%s</strong> already exists."; // Çeviri lazim!
|
|
||||||
#endif
|
|
||||||
|
|
||||||
const char *Txt_The_course_X_already_exists_in_year_Y = // Warning: it is very important to include two %s in the following sentences
|
|
||||||
#if L==1 // ca
|
|
||||||
"L'assignatura <strong>%s</strong> ja existeix a l'any/semestre %s.";
|
|
||||||
#elif L==2 // de
|
|
||||||
"Die Kurs <strong>%s</strong> wurde bereits in Studienjahr/Semester %s eingegeben.";
|
|
||||||
#elif L==3 // en
|
|
||||||
"The course <strong>%s</strong> already exists in year/semester %s.";
|
|
||||||
#elif L==4 // es
|
|
||||||
"La asignatura <strong>%s</strong> ya existe en el año/semestre %s.";
|
|
||||||
#elif L==5 // fr
|
|
||||||
"La matière <strong>%s</strong> existe déjà en année/semestre %s.";
|
|
||||||
#elif L==6 // gn
|
|
||||||
"La asignatura <strong>%s</strong> ya existe en el año/semestre %s."; // Okoteve traducción
|
|
||||||
#elif L==7 // it
|
|
||||||
"Il corso <strong>%s</strong> esiste già nell'anno/semester %s.";
|
|
||||||
#elif L==8 // pl
|
|
||||||
"Kurs <strong>%s</strong> istnieje już na roku/semestrze %s.";
|
|
||||||
#elif L==9 // pt
|
|
||||||
"A disciplina <strong>%s</strong> já existe no ano/semestre %s.";
|
|
||||||
#elif L==10 // tr
|
|
||||||
"The course <strong>%s</strong> already exists in year/semester %s."; // Çeviri lazim!
|
|
||||||
#endif
|
|
||||||
|
|
||||||
const char *Txt_The_course_X_has_been_moved_to_the_degree_Y = // Warning: it is very important to include two %s in the following sentences
|
const char *Txt_The_course_X_has_been_moved_to_the_degree_Y = // Warning: it is very important to include two %s in the following sentences
|
||||||
#if L==1 // ca
|
#if L==1 // ca
|
||||||
"L'assignatura <strong>%s</strong>"
|
"L'assignatura <strong>%s</strong>"
|
||||||
|
@ -47541,29 +47449,6 @@ const char *Txt_The_date_time_of_opening_of_groups_has_changed =
|
||||||
"The date/time of opening of groups has changed."; // Çeviri lazim!
|
"The date/time of opening of groups has changed."; // Çeviri lazim!
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
const char *Txt_The_degree_X_already_exists = // Warning: it is very important to include %s in the following sentences
|
|
||||||
#if L==1 // ca
|
|
||||||
"La titulació <strong>%s</strong> ja existeix.";
|
|
||||||
#elif L==2 // de
|
|
||||||
"Der Studiengang <strong>%s</strong> wurde bereits eingegeben.";
|
|
||||||
#elif L==3 // en
|
|
||||||
"The degree <strong>%s</strong> already exists.";
|
|
||||||
#elif L==4 // es
|
|
||||||
"La titulación <strong>%s</strong> ya existe.";
|
|
||||||
#elif L==5 // fr
|
|
||||||
"L'étude <strong>%s</strong> existe déjà.";
|
|
||||||
#elif L==6 // gn
|
|
||||||
"La titulación <strong>%s</strong> ya existe."; // Okoteve traducción
|
|
||||||
#elif L==7 // it
|
|
||||||
"La laurea <strong>%s</strong> già esiste.";
|
|
||||||
#elif L==8 // pl
|
|
||||||
"Stopień <strong>%s</strong> już istnieje.";
|
|
||||||
#elif L==9 // pt
|
|
||||||
"O grau <strong>%s</strong> já existe.";
|
|
||||||
#elif L==10 // tr
|
|
||||||
"The degree <strong>%s</strong> already exists."; // Çeviri lazim!
|
|
||||||
#endif
|
|
||||||
|
|
||||||
const char *Txt_The_degree_X_has_been_moved_to_the_center_Y = // Warning: it is very important to include two %s in the following sentences
|
const char *Txt_The_degree_X_has_been_moved_to_the_center_Y = // Warning: it is very important to include two %s in the following sentences
|
||||||
#if L==1 // ca
|
#if L==1 // ca
|
||||||
"La titulació <strong>%s</strong> s'ha traslladat"
|
"La titulació <strong>%s</strong> s'ha traslladat"
|
||||||
|
@ -47630,29 +47515,6 @@ const char *Txt_The_degree_X_has_been_renamed_as_Y = // Warning: it is very impo
|
||||||
" has been renamed as <strong>%s</strong>."; // Çeviri lazim!
|
" has been renamed as <strong>%s</strong>."; // Çeviri lazim!
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
const char *Txt_The_department_X_already_exists = // Warning: it is very important to include %s in the following sentences
|
|
||||||
#if L==1 // ca
|
|
||||||
"El departament <strong>%s</strong> ja existeix.";
|
|
||||||
#elif L==2 // de
|
|
||||||
"Die Abteilung <strong>%s</strong> wurde bereits eingegeben.";
|
|
||||||
#elif L==3 // en
|
|
||||||
"The department <strong>%s</strong> already exists.";
|
|
||||||
#elif L==4 // es
|
|
||||||
"El departamento <strong>%s</strong> ya existe.";
|
|
||||||
#elif L==5 // fr
|
|
||||||
"The department <strong>%s</strong> already exists."; // Besoin de traduction
|
|
||||||
#elif L==6 // gn
|
|
||||||
"El departamento <strong>%s</strong> ya existe."; // Okoteve traducción
|
|
||||||
#elif L==7 // it
|
|
||||||
"IL dipartimento <strong>%s</strong> esiste già.";
|
|
||||||
#elif L==8 // pl
|
|
||||||
"The department <strong>%s</strong> already exists."; // Potrzebujesz tlumaczenie
|
|
||||||
#elif L==9 // pt
|
|
||||||
"O departamento <strong>%s</strong> já existe.";
|
|
||||||
#elif L==10 // tr
|
|
||||||
"The department <strong>%s</strong> already exists."; // Çeviri lazim!
|
|
||||||
#endif
|
|
||||||
|
|
||||||
const char *Txt_The_department_X_has_been_renamed_as_Y = // Warning: it is very important to include two %s in the following sentences
|
const char *Txt_The_department_X_has_been_renamed_as_Y = // Warning: it is very important to include two %s in the following sentences
|
||||||
#if L==1 // ca
|
#if L==1 // ca
|
||||||
"El departament <strong>%s</strong>"
|
"El departament <strong>%s</strong>"
|
||||||
|
|
Loading…
Reference in New Issue