mirror of
https://github.com/acanas/swad-core.git
synced 2024-05-31 22:05:23 +02:00
Version19.112.16
This commit is contained in:
parent
3cc0c2c779
commit
c1c5b80044
|
@ -3062,7 +3062,7 @@ int swad__getNotifications (struct soap *soap,
|
||||||
|
|
||||||
/* Get institution (row[4]) */
|
/* Get institution (row[4]) */
|
||||||
Ins.InsCod = Str_ConvertStrCodToLongCod (row[4]);
|
Ins.InsCod = Str_ConvertStrCodToLongCod (row[4]);
|
||||||
Ins_GetDataOfInstitutionByCod (&Ins,Ins_GET_BASIC_DATA);
|
Ins_GetDataOfInstitutionByCod (&Ins);
|
||||||
|
|
||||||
/* Get centre (row[5]) */
|
/* Get centre (row[5]) */
|
||||||
Ctr.CtrCod = Str_ConvertStrCodToLongCod (row[5]);
|
Ctr.CtrCod = Str_ConvertStrCodToLongCod (row[5]);
|
||||||
|
|
|
@ -1843,14 +1843,31 @@ unsigned Ctr_GetNumCtrsInCty (long CtyCod)
|
||||||
/**************** Get number of centres in an institution ********************/
|
/**************** Get number of centres in an institution ********************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
void Ctr_FlushCacheNumCtrsInIns (void)
|
||||||
|
{
|
||||||
|
Gbl.Cache.NumCtrsInIns.InsCod = -1L;
|
||||||
|
Gbl.Cache.NumCtrsInIns.NumCtrs = 0;
|
||||||
|
}
|
||||||
|
|
||||||
unsigned Ctr_GetNumCtrsInIns (long InsCod)
|
unsigned Ctr_GetNumCtrsInIns (long InsCod)
|
||||||
{
|
{
|
||||||
/***** Get number of centres of an institution from database *****/
|
/***** 1. Fast check: Trivial case *****/
|
||||||
return
|
if (InsCod <= 0)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
/***** 2. Fast check: If cached... *****/
|
||||||
|
if (InsCod == Gbl.Cache.NumCtrsInIns.InsCod)
|
||||||
|
return Gbl.Cache.NumCtrsInIns.NumCtrs;
|
||||||
|
|
||||||
|
/***** 3. Slow: number of centres in an institution from database *****/
|
||||||
|
Gbl.Cache.NumCtrsInIns.InsCod = InsCod;
|
||||||
|
Gbl.Cache.NumCtrsInIns.NumCtrs =
|
||||||
(unsigned) DB_QueryCOUNT ("can not get number of centres in an institution",
|
(unsigned) DB_QueryCOUNT ("can not get number of centres in an institution",
|
||||||
"SELECT COUNT(*) FROM centres"
|
"SELECT COUNT(*) FROM centres"
|
||||||
" WHERE InsCod=%ld",
|
" WHERE InsCod=%ld",
|
||||||
InsCod);
|
InsCod);
|
||||||
|
|
||||||
|
return Gbl.Cache.NumCtrsInIns.NumCtrs;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
|
@ -122,6 +122,7 @@ void Ctr_RecFormNewCtr (void);
|
||||||
|
|
||||||
unsigned Ctr_GetNumCtrsTotal (void);
|
unsigned Ctr_GetNumCtrsTotal (void);
|
||||||
unsigned Ctr_GetNumCtrsInCty (long CtyCod);
|
unsigned Ctr_GetNumCtrsInCty (long CtyCod);
|
||||||
|
void Ctr_FlushCacheNumCtrsInIns (void);
|
||||||
unsigned Ctr_GetNumCtrsInIns (long InsCod);
|
unsigned Ctr_GetNumCtrsInIns (long InsCod);
|
||||||
unsigned Ctr_GetNumCtrsInPlc (long PlcCod);
|
unsigned Ctr_GetNumCtrsInPlc (long PlcCod);
|
||||||
unsigned Ctr_GetNumCtrsWithDegs (const char *SubQuery);
|
unsigned Ctr_GetNumCtrsWithDegs (const char *SubQuery);
|
||||||
|
|
|
@ -583,7 +583,7 @@ static void CtrCfg_Institution (bool PrintView,bool PutForm)
|
||||||
if (PutForm)
|
if (PutForm)
|
||||||
{
|
{
|
||||||
/* Get list of institutions of the current country */
|
/* Get list of institutions of the current country */
|
||||||
Ins_GetListInstitutions (Gbl.Hierarchy.Cty.CtyCod,Ins_GET_BASIC_DATA);
|
Ins_GetListInstitutions (Gbl.Hierarchy.Cty.CtyCod);
|
||||||
|
|
||||||
/* Put form to select institution */
|
/* Put form to select institution */
|
||||||
Frm_StartForm (ActChgCtrInsCfg);
|
Frm_StartForm (ActChgCtrInsCfg);
|
||||||
|
@ -1061,7 +1061,7 @@ void CtrCfg_ChangeCtrIns (void)
|
||||||
if (NewIns.InsCod != Gbl.Hierarchy.Ctr.InsCod)
|
if (NewIns.InsCod != Gbl.Hierarchy.Ctr.InsCod)
|
||||||
{
|
{
|
||||||
/***** Get data of new institution *****/
|
/***** Get data of new institution *****/
|
||||||
Ins_GetDataOfInstitutionByCod (&NewIns,Ins_GET_BASIC_DATA);
|
Ins_GetDataOfInstitutionByCod (&NewIns);
|
||||||
|
|
||||||
/***** Check if it already exists a centre with the same name in the new institution *****/
|
/***** Check if it already exists a centre with the same name in the new institution *****/
|
||||||
if (Ctr_CheckIfCtrNameExistsInIns ("ShortName",
|
if (Ctr_CheckIfCtrNameExistsInIns ("ShortName",
|
||||||
|
|
|
@ -492,7 +492,7 @@ enscript -2 --landscape --color --file-align=2 --highlight --line-numbers -o - *
|
||||||
En OpenSWAD:
|
En OpenSWAD:
|
||||||
ps2pdf source.ps destination.pdf
|
ps2pdf source.ps destination.pdf
|
||||||
*/
|
*/
|
||||||
#define Log_PLATFORM_VERSION "SWAD 19.112.15 (2020-01-06)"
|
#define Log_PLATFORM_VERSION "SWAD 19.112.16 (2020-01-06)"
|
||||||
#define CSS_FILE "swad19.112.css"
|
#define CSS_FILE "swad19.112.css"
|
||||||
#define JS_FILE "swad19.91.1.js"
|
#define JS_FILE "swad19.91.1.js"
|
||||||
/*
|
/*
|
||||||
|
@ -501,7 +501,9 @@ ps2pdf source.ps destination.pdf
|
||||||
// TODO: No se puede entrar con DNI '1' suponiendo que no tenga password ¿por qué?
|
// TODO: No se puede entrar con DNI '1' suponiendo que no tenga password ¿por qué?
|
||||||
// TODO: Mapas más estrechos en móvil
|
// TODO: Mapas más estrechos en móvil
|
||||||
// TODO: Quitar todos los EXTRA_DATA.
|
// TODO: Quitar todos los EXTRA_DATA.
|
||||||
|
Optimize Ins_GetNumInssInCty
|
||||||
|
|
||||||
|
Version 19.112.16:Jan 06, 2020 Optimization in number of centres in an institution. (? lines)
|
||||||
Version 19.112.15:Jan 06, 2020 Optimization in number of degrees in an institution. (278567 lines)
|
Version 19.112.15:Jan 06, 2020 Optimization in number of degrees in an institution. (278567 lines)
|
||||||
Version 19.112.14:Jan 06, 2020 Optimization in number of courses in an institution. (278555 lines)
|
Version 19.112.14:Jan 06, 2020 Optimization in number of courses in an institution. (278555 lines)
|
||||||
Version 19.112.13:Jan 06, 2020 Optimization in number of departments in an institution. (278535 lines)
|
Version 19.112.13:Jan 06, 2020 Optimization in number of departments in an institution. (278535 lines)
|
||||||
|
|
|
@ -335,7 +335,7 @@ static void CtyCfg_Map (void)
|
||||||
|
|
||||||
/* Get data of institution */
|
/* Get data of institution */
|
||||||
Ins.InsCod = Ctr.InsCod;
|
Ins.InsCod = Ctr.InsCod;
|
||||||
Ins_GetDataOfInstitutionByCod (&Ins,Ins_GET_BASIC_DATA);
|
Ins_GetDataOfInstitutionByCod (&Ins);
|
||||||
|
|
||||||
/* Add marker */
|
/* Add marker */
|
||||||
Map_AddMarker (&Ctr.Coord);
|
Map_AddMarker (&Ctr.Coord);
|
||||||
|
|
|
@ -241,7 +241,7 @@ static void Crs_WriteListMyCoursesToSelectOne (void)
|
||||||
|
|
||||||
/***** Get data of this institution *****/
|
/***** Get data of this institution *****/
|
||||||
Ins.InsCod = Str_ConvertStrCodToLongCod (row[0]);
|
Ins.InsCod = Str_ConvertStrCodToLongCod (row[0]);
|
||||||
if (!Ins_GetDataOfInstitutionByCod (&Ins,Ins_GET_BASIC_DATA))
|
if (!Ins_GetDataOfInstitutionByCod (&Ins))
|
||||||
Lay_ShowErrorAndExit ("Institution not found.");
|
Lay_ShowErrorAndExit ("Institution not found.");
|
||||||
|
|
||||||
/***** Write link to institution *****/
|
/***** Write link to institution *****/
|
||||||
|
|
|
@ -260,7 +260,7 @@ static void Dpt_EditDepartmentsInternal (void)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
/***** Get list of institutions *****/
|
/***** Get list of institutions *****/
|
||||||
Ins_GetListInstitutions (Gbl.Hierarchy.Cty.CtyCod,Ins_GET_BASIC_DATA);
|
Ins_GetListInstitutions (Gbl.Hierarchy.Cty.CtyCod);
|
||||||
|
|
||||||
/***** Get list of departments *****/
|
/***** Get list of departments *****/
|
||||||
Dpt_GetListDepartments (Gbl.Hierarchy.Ins.InsCod);
|
Dpt_GetListDepartments (Gbl.Hierarchy.Ins.InsCod);
|
||||||
|
@ -510,7 +510,7 @@ static void Dpt_ListDepartmentsForEdition (void)
|
||||||
|
|
||||||
/* Get data of institution of this department */
|
/* Get data of institution of this department */
|
||||||
Ins.InsCod = Dpt->InsCod;
|
Ins.InsCod = Dpt->InsCod;
|
||||||
Ins_GetDataOfInstitutionByCod (&Ins,Ins_GET_BASIC_DATA);
|
Ins_GetDataOfInstitutionByCod (&Ins);
|
||||||
|
|
||||||
HTM_TR_Begin (NULL);
|
HTM_TR_Begin (NULL);
|
||||||
|
|
||||||
|
|
|
@ -978,7 +978,7 @@ static void Exa_ShowExamAnnouncement (long ExaCod,
|
||||||
|
|
||||||
/***** Get data of institution of this degree *****/
|
/***** Get data of institution of this degree *****/
|
||||||
Ins.InsCod = Gbl.Hierarchy.Ins.InsCod;
|
Ins.InsCod = Gbl.Hierarchy.Ins.InsCod;
|
||||||
Ins_GetDataOfInstitutionByCod (&Ins,Ins_GET_BASIC_DATA);
|
Ins_GetDataOfInstitutionByCod (&Ins);
|
||||||
|
|
||||||
/***** Build anchor string *****/
|
/***** Build anchor string *****/
|
||||||
Frm_SetAnchorStr (ExaCod,&Anchor);
|
Frm_SetAnchorStr (ExaCod,&Anchor);
|
||||||
|
@ -1615,7 +1615,7 @@ static void Exa_GetNotifContentExamAnnouncement (char **ContentStr)
|
||||||
|
|
||||||
/***** Get data of institution *****/
|
/***** Get data of institution *****/
|
||||||
Ins.InsCod = Deg_GetInsCodOfDegreeByCod (Deg.DegCod);
|
Ins.InsCod = Deg_GetInsCodOfDegreeByCod (Deg.DegCod);
|
||||||
Ins_GetDataOfInstitutionByCod (&Ins,Ins_GET_BASIC_DATA);
|
Ins_GetDataOfInstitutionByCod (&Ins);
|
||||||
|
|
||||||
/***** Convert struct date to a date string *****/
|
/***** Convert struct date to a date string *****/
|
||||||
Dat_ConvDateToDateStr (&Gbl.ExamAnns.ExaDat.ExamDate,StrExamDate);
|
Dat_ConvDateToDateStr (&Gbl.ExamAnns.ExaDat.ExamDate,StrExamDate);
|
||||||
|
|
|
@ -1515,7 +1515,7 @@ static unsigned Fig_GetInsAndStat (struct Instit *Ins,MYSQL_RES *mysql_res)
|
||||||
|
|
||||||
/***** Get data of this institution (row[0]) *****/
|
/***** Get data of this institution (row[0]) *****/
|
||||||
Ins->InsCod = Str_ConvertStrCodToLongCod (row[0]);
|
Ins->InsCod = Str_ConvertStrCodToLongCod (row[0]);
|
||||||
if (!Ins_GetDataOfInstitutionByCod (Ins,Ins_GET_BASIC_DATA))
|
if (!Ins_GetDataOfInstitutionByCod (Ins))
|
||||||
Lay_ShowErrorAndExit ("Institution not found.");
|
Lay_ShowErrorAndExit ("Institution not found.");
|
||||||
|
|
||||||
/***** Get statistic (row[1]) *****/
|
/***** Get statistic (row[1]) *****/
|
||||||
|
|
|
@ -6850,7 +6850,7 @@ static void Brw_WriteCurrentClipboard (void)
|
||||||
{
|
{
|
||||||
case Brw_ADMI_DOC_INS:
|
case Brw_ADMI_DOC_INS:
|
||||||
Ins.InsCod = Gbl.FileBrowser.Clipboard.Cod;
|
Ins.InsCod = Gbl.FileBrowser.Clipboard.Cod;
|
||||||
Ins_GetDataOfInstitutionByCod (&Ins,Ins_GET_BASIC_DATA);
|
Ins_GetDataOfInstitutionByCod (&Ins);
|
||||||
snprintf (TxtClipboardZone,sizeof (TxtClipboardZone),
|
snprintf (TxtClipboardZone,sizeof (TxtClipboardZone),
|
||||||
"%s, %s <strong>%s</strong>",
|
"%s, %s <strong>%s</strong>",
|
||||||
Txt_documents_management_area,
|
Txt_documents_management_area,
|
||||||
|
@ -6858,7 +6858,7 @@ static void Brw_WriteCurrentClipboard (void)
|
||||||
break;
|
break;
|
||||||
case Brw_ADMI_SHR_INS:
|
case Brw_ADMI_SHR_INS:
|
||||||
Ins.InsCod = Gbl.FileBrowser.Clipboard.Cod;
|
Ins.InsCod = Gbl.FileBrowser.Clipboard.Cod;
|
||||||
Ins_GetDataOfInstitutionByCod (&Ins,Ins_GET_BASIC_DATA);
|
Ins_GetDataOfInstitutionByCod (&Ins);
|
||||||
snprintf (TxtClipboardZone,sizeof (TxtClipboardZone),
|
snprintf (TxtClipboardZone,sizeof (TxtClipboardZone),
|
||||||
"%s, %s <strong>%s</strong>",
|
"%s, %s <strong>%s</strong>",
|
||||||
Txt_shared_files_area,
|
Txt_shared_files_area,
|
||||||
|
@ -7865,7 +7865,7 @@ static void Brw_PasteClipboard (void)
|
||||||
case Brw_ADMI_DOC_INS:
|
case Brw_ADMI_DOC_INS:
|
||||||
case Brw_ADMI_SHR_INS:
|
case Brw_ADMI_SHR_INS:
|
||||||
Ins.InsCod = Gbl.FileBrowser.Clipboard.Cod;
|
Ins.InsCod = Gbl.FileBrowser.Clipboard.Cod;
|
||||||
if (Ins_GetDataOfInstitutionByCod (&Ins,Ins_GET_BASIC_DATA))
|
if (Ins_GetDataOfInstitutionByCod (&Ins))
|
||||||
snprintf (PathOrg,sizeof (PathOrg),
|
snprintf (PathOrg,sizeof (PathOrg),
|
||||||
"%s/%02u/%u/%s",
|
"%s/%02u/%u/%s",
|
||||||
Cfg_PATH_INS_PRIVATE,
|
Cfg_PATH_INS_PRIVATE,
|
||||||
|
|
|
@ -2159,14 +2159,14 @@ void For_SetForumName (struct Forum *Forum,
|
||||||
break;
|
break;
|
||||||
case For_FORUM_INSTIT_USRS:
|
case For_FORUM_INSTIT_USRS:
|
||||||
Ins.InsCod = Forum->Location;
|
Ins.InsCod = Forum->Location;
|
||||||
if (!Ins_GetDataOfInstitutionByCod (&Ins,Ins_GET_BASIC_DATA))
|
if (!Ins_GetDataOfInstitutionByCod (&Ins))
|
||||||
Lay_ShowErrorAndExit ("Institution not found.");
|
Lay_ShowErrorAndExit ("Institution not found.");
|
||||||
Str_Copy (ForumName,Ins.ShrtName,
|
Str_Copy (ForumName,Ins.ShrtName,
|
||||||
For_MAX_BYTES_FORUM_NAME);
|
For_MAX_BYTES_FORUM_NAME);
|
||||||
break;
|
break;
|
||||||
case For_FORUM_INSTIT_TCHS:
|
case For_FORUM_INSTIT_TCHS:
|
||||||
Ins.InsCod = Forum->Location;
|
Ins.InsCod = Forum->Location;
|
||||||
if (!Ins_GetDataOfInstitutionByCod (&Ins,Ins_GET_BASIC_DATA))
|
if (!Ins_GetDataOfInstitutionByCod (&Ins))
|
||||||
Lay_ShowErrorAndExit ("Institution not found.");
|
Lay_ShowErrorAndExit ("Institution not found.");
|
||||||
snprintf (ForumName,For_MAX_BYTES_FORUM_NAME + 1,
|
snprintf (ForumName,For_MAX_BYTES_FORUM_NAME + 1,
|
||||||
"%s%s",Ins.ShrtName,
|
"%s%s",Ins.ShrtName,
|
||||||
|
|
|
@ -217,11 +217,20 @@ void Gbl_InitializeGlobals (void)
|
||||||
/***** Reset current hierarchy *****/
|
/***** Reset current hierarchy *****/
|
||||||
Hie_ResetHierarchy ();
|
Hie_ResetHierarchy ();
|
||||||
|
|
||||||
|
Gbl.Hierarchy.Sys.Ctys.Num = 0;
|
||||||
|
Gbl.Hierarchy.Sys.Ctys.Lst = NULL;
|
||||||
|
Gbl.Hierarchy.Sys.Ctys.SelectedOrder = Cty_ORDER_DEFAULT;
|
||||||
|
|
||||||
|
Gbl.Hierarchy.Cty.Inss.Num = 0;
|
||||||
|
Gbl.Hierarchy.Cty.Inss.Lst = NULL;
|
||||||
|
Gbl.Hierarchy.Cty.Inss.SelectedOrder = Ins_ORDER_DEFAULT;
|
||||||
|
|
||||||
Gbl.Hierarchy.Ins.ShrtName[0] = '\0';
|
Gbl.Hierarchy.Ins.ShrtName[0] = '\0';
|
||||||
Gbl.Hierarchy.Ins.FullName[0] = '\0';
|
Gbl.Hierarchy.Ins.FullName[0] = '\0';
|
||||||
Gbl.Hierarchy.Ins.WWW[0] = '\0';
|
Gbl.Hierarchy.Ins.WWW[0] = '\0';
|
||||||
Gbl.Hierarchy.Ins.Ctrs.Num = 0;
|
Gbl.Hierarchy.Ins.Ctrs.Num = 0;
|
||||||
Gbl.Hierarchy.Ins.Ctrs.Lst = NULL;
|
Gbl.Hierarchy.Ins.Ctrs.Lst = NULL;
|
||||||
|
Gbl.Hierarchy.Ins.Ctrs.SelectedOrder = Ctr_ORDER_DEFAULT;
|
||||||
|
|
||||||
Gbl.Hierarchy.Ctr.ShrtName[0] = '\0';
|
Gbl.Hierarchy.Ctr.ShrtName[0] = '\0';
|
||||||
Gbl.Hierarchy.Ctr.FullName[0] = '\0';
|
Gbl.Hierarchy.Ctr.FullName[0] = '\0';
|
||||||
|
@ -231,20 +240,6 @@ void Gbl_InitializeGlobals (void)
|
||||||
Gbl.Hierarchy.Deg.ShrtName[0] = Gbl.Hierarchy.Deg.FullName[0] = '\0';
|
Gbl.Hierarchy.Deg.ShrtName[0] = Gbl.Hierarchy.Deg.FullName[0] = '\0';
|
||||||
|
|
||||||
Gbl.Hierarchy.Crs.ShrtName[0] = Gbl.Hierarchy.Crs.FullName[0] = '\0';
|
Gbl.Hierarchy.Crs.ShrtName[0] = Gbl.Hierarchy.Crs.FullName[0] = '\0';
|
||||||
Gbl.Crs.Info.ShowMsgMustBeRead = 0;
|
|
||||||
Gbl.Crs.Notices.HighlightNotCod = -1L; // No notice highlighted
|
|
||||||
|
|
||||||
Gbl.Hierarchy.Cty.Inss.Num = 0;
|
|
||||||
Gbl.Hierarchy.Cty.Inss.Lst = NULL;
|
|
||||||
Gbl.Hierarchy.Cty.Inss.SelectedOrder = Ins_ORDER_DEFAULT;
|
|
||||||
|
|
||||||
Gbl.Hierarchy.Sys.Ctys.Num = 0;
|
|
||||||
Gbl.Hierarchy.Sys.Ctys.Lst = NULL;
|
|
||||||
Gbl.Hierarchy.Sys.Ctys.SelectedOrder = Cty_ORDER_DEFAULT;
|
|
||||||
|
|
||||||
Gbl.Hierarchy.Ins.Ctrs.Num = 0;
|
|
||||||
Gbl.Hierarchy.Ins.Ctrs.Lst = NULL;
|
|
||||||
Gbl.Hierarchy.Ins.Ctrs.SelectedOrder = Ctr_ORDER_DEFAULT;
|
|
||||||
|
|
||||||
Gbl.Dpts.Num = 0;
|
Gbl.Dpts.Num = 0;
|
||||||
Gbl.Dpts.Lst = NULL;
|
Gbl.Dpts.Lst = NULL;
|
||||||
|
@ -262,6 +257,8 @@ void Gbl_InitializeGlobals (void)
|
||||||
Gbl.DegTypes.Num = 0;
|
Gbl.DegTypes.Num = 0;
|
||||||
Gbl.DegTypes.Lst = NULL;
|
Gbl.DegTypes.Lst = NULL;
|
||||||
|
|
||||||
|
Gbl.Crs.Info.ShowMsgMustBeRead = 0;
|
||||||
|
Gbl.Crs.Notices.HighlightNotCod = -1L; // No notice highlighted
|
||||||
Gbl.Crs.Grps.NumGrps = 0;
|
Gbl.Crs.Grps.NumGrps = 0;
|
||||||
Gbl.Crs.Grps.WhichGrps = Grp_WHICH_GROUPS_DEFAULT;
|
Gbl.Crs.Grps.WhichGrps = Grp_WHICH_GROUPS_DEFAULT;
|
||||||
Gbl.Crs.Grps.GrpTypes.LstGrpTypes = NULL;
|
Gbl.Crs.Grps.GrpTypes.LstGrpTypes = NULL;
|
||||||
|
@ -280,13 +277,9 @@ void Gbl_InitializeGlobals (void)
|
||||||
Gbl.Crs.Grps.LstGrpsSel.GrpCods = NULL;
|
Gbl.Crs.Grps.LstGrpsSel.GrpCods = NULL;
|
||||||
Gbl.Crs.Grps.LstGrpsSel.NumGrps = 0;
|
Gbl.Crs.Grps.LstGrpsSel.NumGrps = 0;
|
||||||
Gbl.Crs.Grps.LstGrpsSel.NestedCalls = 0;
|
Gbl.Crs.Grps.LstGrpsSel.NestedCalls = 0;
|
||||||
|
|
||||||
Gbl.Usrs.ClassPhoto.AllGroups = true;
|
|
||||||
|
|
||||||
Gbl.Crs.Records.Field.Name[0] = '\0';
|
Gbl.Crs.Records.Field.Name[0] = '\0';
|
||||||
Gbl.Crs.Records.Field.NumLines = Rec_MIN_LINES_IN_EDITION_FIELD;
|
Gbl.Crs.Records.Field.NumLines = Rec_MIN_LINES_IN_EDITION_FIELD;
|
||||||
Gbl.Crs.Records.Field.Visibility = Rec_HIDDEN_FIELD;
|
Gbl.Crs.Records.Field.Visibility = Rec_HIDDEN_FIELD;
|
||||||
|
|
||||||
Gbl.Crs.Records.LstFields.Lst = NULL;
|
Gbl.Crs.Records.LstFields.Lst = NULL;
|
||||||
Gbl.Crs.Records.LstFields.Num = 0;
|
Gbl.Crs.Records.LstFields.Num = 0;
|
||||||
Gbl.Crs.Records.LstFields.NestedCalls = 0;
|
Gbl.Crs.Records.LstFields.NestedCalls = 0;
|
||||||
|
@ -342,6 +335,7 @@ void Gbl_InitializeGlobals (void)
|
||||||
Gbl.Usrs.Listing.RecsPerPag = Rec_DEF_RECORDS_PER_PAGE;
|
Gbl.Usrs.Listing.RecsPerPag = Rec_DEF_RECORDS_PER_PAGE;
|
||||||
Gbl.Usrs.Listing.WithPhotos = Usr_LIST_WITH_PHOTOS_DEF;
|
Gbl.Usrs.Listing.WithPhotos = Usr_LIST_WITH_PHOTOS_DEF;
|
||||||
|
|
||||||
|
Gbl.Usrs.ClassPhoto.AllGroups = true;
|
||||||
Gbl.Usrs.ClassPhoto.Cols = Usr_CLASS_PHOTO_COLS_DEF;
|
Gbl.Usrs.ClassPhoto.Cols = Usr_CLASS_PHOTO_COLS_DEF;
|
||||||
|
|
||||||
/* Statistics */
|
/* Statistics */
|
||||||
|
@ -413,6 +407,8 @@ void Gbl_InitializeGlobals (void)
|
||||||
Ins_FlushCacheShortNameOfInstitution ();
|
Ins_FlushCacheShortNameOfInstitution ();
|
||||||
Ins_FlushCacheFullNameAndCtyOfInstitution ();
|
Ins_FlushCacheFullNameAndCtyOfInstitution ();
|
||||||
Dpt_FlushCacheNumDptsInIns ();
|
Dpt_FlushCacheNumDptsInIns ();
|
||||||
|
Ctr_FlushCacheNumCtrsInIns ();
|
||||||
|
Deg_FlushCacheNumDegsInIns ();
|
||||||
Deg_FlushCacheNumDegsInCtr ();
|
Deg_FlushCacheNumDegsInCtr ();
|
||||||
Crs_FlushCacheNumCrssInIns ();
|
Crs_FlushCacheNumCrssInIns ();
|
||||||
Crs_FlushCacheNumCrssInCtr ();
|
Crs_FlushCacheNumCrssInCtr ();
|
||||||
|
|
|
@ -777,6 +777,11 @@ struct Globals
|
||||||
long InsCod;
|
long InsCod;
|
||||||
unsigned NumDpts;
|
unsigned NumDpts;
|
||||||
} NumDptsInIns;
|
} NumDptsInIns;
|
||||||
|
struct
|
||||||
|
{
|
||||||
|
long InsCod;
|
||||||
|
unsigned NumCtrs;
|
||||||
|
} NumCtrsInIns;
|
||||||
struct
|
struct
|
||||||
{
|
{
|
||||||
long InsCod;
|
long InsCod;
|
||||||
|
|
|
@ -555,8 +555,7 @@ void Hie_InitHierarchy (void)
|
||||||
/***** If institution code is available, get institution data *****/
|
/***** If institution code is available, get institution data *****/
|
||||||
if (Gbl.Hierarchy.Ins.InsCod > 0)
|
if (Gbl.Hierarchy.Ins.InsCod > 0)
|
||||||
{
|
{
|
||||||
if (Ins_GetDataOfInstitutionByCod (&Gbl.Hierarchy.Ins, // Institution found
|
if (Ins_GetDataOfInstitutionByCod (&Gbl.Hierarchy.Ins)) // Institution found
|
||||||
Ins_GET_EXTRA_DATA)) // Get extra data because they may be needed later
|
|
||||||
Gbl.Hierarchy.Cty.CtyCod = Gbl.Hierarchy.Ins.CtyCod;
|
Gbl.Hierarchy.Cty.CtyCod = Gbl.Hierarchy.Ins.CtyCod;
|
||||||
else
|
else
|
||||||
Hie_ResetHierarchy ();
|
Hie_ResetHierarchy ();
|
||||||
|
@ -736,7 +735,7 @@ void Hie_GetAndWriteInsCtrDegAdminBy (long UsrCod,unsigned ColSpan)
|
||||||
if (Ins.InsCod > 0)
|
if (Ins.InsCod > 0)
|
||||||
{
|
{
|
||||||
/* Get data of institution */
|
/* Get data of institution */
|
||||||
Ins_GetDataOfInstitutionByCod (&Ins,Ins_GET_BASIC_DATA);
|
Ins_GetDataOfInstitutionByCod (&Ins);
|
||||||
|
|
||||||
/* Write institution logo and name */
|
/* Write institution logo and name */
|
||||||
Ins_DrawInstitutionLogoAndNameWithLink (&Ins,ActSeeInsInf,
|
Ins_DrawInstitutionLogoAndNameWithLink (&Ins,ActSeeInsInf,
|
||||||
|
|
|
@ -175,7 +175,7 @@ void Ins_SeeInsWithPendingCtrs (void)
|
||||||
Gbl.ColorRows[Gbl.RowEvenOdd];
|
Gbl.ColorRows[Gbl.RowEvenOdd];
|
||||||
|
|
||||||
/* Get data of institution */
|
/* Get data of institution */
|
||||||
Ins_GetDataOfInstitutionByCod (&Ins,Ins_GET_BASIC_DATA);
|
Ins_GetDataOfInstitutionByCod (&Ins);
|
||||||
|
|
||||||
/* Institution logo and name */
|
/* Institution logo and name */
|
||||||
HTM_TR_Begin (NULL);
|
HTM_TR_Begin (NULL);
|
||||||
|
@ -265,7 +265,7 @@ void Ins_ShowInssOfCurrentCty (void)
|
||||||
Ins_GetParamInsOrder ();
|
Ins_GetParamInsOrder ();
|
||||||
|
|
||||||
/***** Get list of institutions *****/
|
/***** Get list of institutions *****/
|
||||||
Ins_GetListInstitutions (Gbl.Hierarchy.Cty.CtyCod,Ins_GET_EXTRA_DATA);
|
Ins_GetListInstitutions (Gbl.Hierarchy.Cty.CtyCod);
|
||||||
|
|
||||||
/***** Write menu to select country *****/
|
/***** Write menu to select country *****/
|
||||||
Hie_WriteMenuHierarchy ();
|
Hie_WriteMenuHierarchy ();
|
||||||
|
@ -407,7 +407,7 @@ static void Ins_ListOneInstitutionForSeeing (struct Instit *Ins,unsigned NumIns)
|
||||||
|
|
||||||
/* Number of centres in this institution */
|
/* Number of centres in this institution */
|
||||||
HTM_TD_Begin ("class=\"%s RM %s\"",TxtClassNormal,BgColor);
|
HTM_TD_Begin ("class=\"%s RM %s\"",TxtClassNormal,BgColor);
|
||||||
HTM_Unsigned (Ins->Ctrs.Num);
|
HTM_Unsigned (Ctr_GetNumCtrsInIns (Ins->InsCod));
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
|
|
||||||
/* Number of degrees in this institution */
|
/* Number of degrees in this institution */
|
||||||
|
@ -533,7 +533,7 @@ static void Ins_EditInstitutionsInternal (void)
|
||||||
extern const char *Txt_Institutions_of_COUNTRY_X;
|
extern const char *Txt_Institutions_of_COUNTRY_X;
|
||||||
|
|
||||||
/***** Get list of institutions *****/
|
/***** Get list of institutions *****/
|
||||||
Ins_GetListInstitutions (Gbl.Hierarchy.Cty.CtyCod,Ins_GET_EXTRA_DATA);
|
Ins_GetListInstitutions (Gbl.Hierarchy.Cty.CtyCod);
|
||||||
|
|
||||||
/***** Write menu to select country *****/
|
/***** Write menu to select country *****/
|
||||||
Hie_WriteMenuHierarchy ();
|
Hie_WriteMenuHierarchy ();
|
||||||
|
@ -549,7 +549,7 @@ static void Ins_EditInstitutionsInternal (void)
|
||||||
Ins_PutFormToCreateInstitution ();
|
Ins_PutFormToCreateInstitution ();
|
||||||
|
|
||||||
/***** Forms to edit current institutions *****/
|
/***** Forms to edit current institutions *****/
|
||||||
if (Gbl.Hierarchy.Cty.Inss.Num)
|
if (Ins_GetNumInssInCty (Gbl.Hierarchy.Cty.CtyCod))
|
||||||
Ins_ListInstitutionsForEdition ();
|
Ins_ListInstitutionsForEdition ();
|
||||||
|
|
||||||
/***** End box *****/
|
/***** End box *****/
|
||||||
|
@ -591,7 +591,7 @@ static void Ins_PutIconToViewInstitutions (void)
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
// If CtyCod <= 0, get all institutions
|
// If CtyCod <= 0, get all institutions
|
||||||
|
|
||||||
void Ins_GetListInstitutions (long CtyCod,Ins_GetExtraData_t GetExtraData)
|
void Ins_GetListInstitutions (long CtyCod)
|
||||||
{
|
{
|
||||||
MYSQL_RES *mysql_res;
|
MYSQL_RES *mysql_res;
|
||||||
MYSQL_ROW row;
|
MYSQL_ROW row;
|
||||||
|
@ -693,18 +693,6 @@ void Ins_GetListInstitutions (long CtyCod,Ins_GetExtraData_t GetExtraData)
|
||||||
/* Get the URL of the institution (row[6]) */
|
/* Get the URL of the institution (row[6]) */
|
||||||
Str_Copy (Ins->WWW,row[6],
|
Str_Copy (Ins->WWW,row[6],
|
||||||
Cns_MAX_BYTES_WWW);
|
Cns_MAX_BYTES_WWW);
|
||||||
|
|
||||||
/* Get extra data */
|
|
||||||
switch (GetExtraData)
|
|
||||||
{
|
|
||||||
case Ins_GET_BASIC_DATA:
|
|
||||||
Ins->Ctrs.Num = 0;
|
|
||||||
break;
|
|
||||||
case Ins_GET_EXTRA_DATA:
|
|
||||||
/* Get number of centres in this institution */
|
|
||||||
Ins->Ctrs.Num = Ctr_GetNumCtrsInIns (Ins->InsCod);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -736,8 +724,7 @@ void Ins_WriteInstitutionNameAndCty (long InsCod)
|
||||||
/************************* Get data of an institution ************************/
|
/************************* Get data of an institution ************************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
bool Ins_GetDataOfInstitutionByCod (struct Instit *Ins,
|
bool Ins_GetDataOfInstitutionByCod (struct Instit *Ins)
|
||||||
Ins_GetExtraData_t GetExtraData)
|
|
||||||
{
|
{
|
||||||
MYSQL_RES *mysql_res;
|
MYSQL_RES *mysql_res;
|
||||||
MYSQL_ROW row;
|
MYSQL_ROW row;
|
||||||
|
@ -751,6 +738,9 @@ bool Ins_GetDataOfInstitutionByCod (struct Instit *Ins,
|
||||||
Ins->FullName[0] =
|
Ins->FullName[0] =
|
||||||
Ins->WWW[0] = '\0';
|
Ins->WWW[0] = '\0';
|
||||||
Ins->Ctrs.Num = 0;
|
Ins->Ctrs.Num = 0;
|
||||||
|
Ins->Ctrs.Lst = NULL;
|
||||||
|
Ins->Ctrs.SelectedOrder = Ctr_ORDER_DEFAULT;
|
||||||
|
|
||||||
|
|
||||||
/***** Check if institution code is correct *****/
|
/***** Check if institution code is correct *****/
|
||||||
if (Ins->InsCod > 0)
|
if (Ins->InsCod > 0)
|
||||||
|
@ -786,11 +776,6 @@ bool Ins_GetDataOfInstitutionByCod (struct Instit *Ins,
|
||||||
Str_Copy (Ins->WWW,row[5],
|
Str_Copy (Ins->WWW,row[5],
|
||||||
Cns_MAX_BYTES_WWW);
|
Cns_MAX_BYTES_WWW);
|
||||||
|
|
||||||
/* Get extra data */
|
|
||||||
if (GetExtraData == Ins_GET_EXTRA_DATA)
|
|
||||||
/* Get number of centres in this institution */
|
|
||||||
Ins->Ctrs.Num = Ctr_GetNumCtrsInIns (Ins->InsCod);
|
|
||||||
|
|
||||||
/* Set return value */
|
/* Set return value */
|
||||||
InsFound = true;
|
InsFound = true;
|
||||||
}
|
}
|
||||||
|
@ -1022,6 +1007,7 @@ static void Ins_ListInstitutionsForEdition (void)
|
||||||
char WWW[Cns_MAX_BYTES_WWW + 1];
|
char WWW[Cns_MAX_BYTES_WWW + 1];
|
||||||
struct UsrData UsrDat;
|
struct UsrData UsrDat;
|
||||||
bool ICanEdit;
|
bool ICanEdit;
|
||||||
|
unsigned NumCtrss;
|
||||||
unsigned NumUsrsInCrssOfIns;
|
unsigned NumUsrsInCrssOfIns;
|
||||||
unsigned NumUsrsWhoClaimToBelongToIns;
|
unsigned NumUsrsWhoClaimToBelongToIns;
|
||||||
Ins_StatusTxt_t StatusTxt;
|
Ins_StatusTxt_t StatusTxt;
|
||||||
|
@ -1042,6 +1028,7 @@ static void Ins_ListInstitutionsForEdition (void)
|
||||||
Ins = &Gbl.Hierarchy.Cty.Inss.Lst[NumIns];
|
Ins = &Gbl.Hierarchy.Cty.Inss.Lst[NumIns];
|
||||||
|
|
||||||
ICanEdit = Ins_CheckIfICanEdit (Ins);
|
ICanEdit = Ins_CheckIfICanEdit (Ins);
|
||||||
|
NumCtrss = Ctr_GetNumCtrsInIns (Ins->InsCod);
|
||||||
NumUsrsInCrssOfIns = Usr_GetNumUsrsInCrssOfIns (Rol_UNK,Ins->InsCod); // Here Rol_UNK means "all users"
|
NumUsrsInCrssOfIns = Usr_GetNumUsrsInCrssOfIns (Rol_UNK,Ins->InsCod); // Here Rol_UNK means "all users"
|
||||||
NumUsrsWhoClaimToBelongToIns = Usr_GetNumUsrsWhoClaimToBelongToIns (Ins->InsCod);
|
NumUsrsWhoClaimToBelongToIns = Usr_GetNumUsrsWhoClaimToBelongToIns (Ins->InsCod);
|
||||||
|
|
||||||
|
@ -1050,7 +1037,7 @@ static void Ins_ListInstitutionsForEdition (void)
|
||||||
/* Put icon to remove institution */
|
/* Put icon to remove institution */
|
||||||
HTM_TD_Begin ("class=\"BM\"");
|
HTM_TD_Begin ("class=\"BM\"");
|
||||||
if (!ICanEdit ||
|
if (!ICanEdit ||
|
||||||
Ins->Ctrs.Num || // Institution has centres
|
NumCtrss || // Institution has centres
|
||||||
NumUsrsInCrssOfIns || // Institution has users
|
NumUsrsInCrssOfIns || // Institution has users
|
||||||
NumUsrsWhoClaimToBelongToIns) // Institution has users
|
NumUsrsWhoClaimToBelongToIns) // Institution has users
|
||||||
// Institution has centres or users ==> deletion forbidden
|
// Institution has centres or users ==> deletion forbidden
|
||||||
|
@ -1133,7 +1120,7 @@ static void Ins_ListInstitutionsForEdition (void)
|
||||||
|
|
||||||
/* Number of centres */
|
/* Number of centres */
|
||||||
HTM_TD_Begin ("class=\"DAT RM\"");
|
HTM_TD_Begin ("class=\"DAT RM\"");
|
||||||
HTM_Unsigned (Ins->Ctrs.Num);
|
HTM_Unsigned (NumCtrss);
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
|
|
||||||
/* Number of users in courses of this institution */
|
/* Number of users in courses of this institution */
|
||||||
|
@ -1298,12 +1285,12 @@ void Ins_RemoveInstitution (void)
|
||||||
Ins_EditingIns->InsCod = Ins_GetAndCheckParamOtherInsCod (1);
|
Ins_EditingIns->InsCod = Ins_GetAndCheckParamOtherInsCod (1);
|
||||||
|
|
||||||
/***** Get data of the institution from database *****/
|
/***** Get data of the institution from database *****/
|
||||||
Ins_GetDataOfInstitutionByCod (Ins_EditingIns,Ins_GET_EXTRA_DATA);
|
Ins_GetDataOfInstitutionByCod (Ins_EditingIns);
|
||||||
|
|
||||||
/***** Check if this institution has users *****/
|
/***** Check if this institution has users *****/
|
||||||
if (!Ins_CheckIfICanEdit (Ins_EditingIns))
|
if (!Ins_CheckIfICanEdit (Ins_EditingIns))
|
||||||
Lay_NoPermissionExit ();
|
Lay_NoPermissionExit ();
|
||||||
else if (Ins_EditingIns->Ctrs.Num)
|
else if (Ctr_GetNumCtrsInIns (Ins_EditingIns->InsCod))
|
||||||
// Institution has centres ==> don't remove
|
// Institution has centres ==> don't remove
|
||||||
Ale_CreateAlert (Ale_WARNING,NULL,
|
Ale_CreateAlert (Ale_WARNING,NULL,
|
||||||
Txt_To_remove_an_institution_you_must_first_remove_all_centres_and_users_in_the_institution);
|
Txt_To_remove_an_institution_you_must_first_remove_all_centres_and_users_in_the_institution);
|
||||||
|
@ -1343,6 +1330,8 @@ void Ins_RemoveInstitution (void)
|
||||||
Ins_FlushCacheShortNameOfInstitution ();
|
Ins_FlushCacheShortNameOfInstitution ();
|
||||||
Ins_FlushCacheFullNameAndCtyOfInstitution ();
|
Ins_FlushCacheFullNameAndCtyOfInstitution ();
|
||||||
Dpt_FlushCacheNumDptsInIns ();
|
Dpt_FlushCacheNumDptsInIns ();
|
||||||
|
Ctr_FlushCacheNumCtrsInIns ();
|
||||||
|
Deg_FlushCacheNumDegsInIns ();
|
||||||
Crs_FlushCacheNumCrssInIns ();
|
Crs_FlushCacheNumCrssInIns ();
|
||||||
Usr_FlushCacheNumUsrsWhoClaimToBelongToIns ();
|
Usr_FlushCacheNumUsrsWhoClaimToBelongToIns ();
|
||||||
Usr_FlushCacheNumUsrsInCrssOfIns ();
|
Usr_FlushCacheNumUsrsInCrssOfIns ();
|
||||||
|
@ -1415,7 +1404,7 @@ void Ins_RenameInstitution (struct Instit *Ins,Cns_ShrtOrFullName_t ShrtOrFullNa
|
||||||
Par_GetParToText (ParamName,NewInsName,MaxBytes);
|
Par_GetParToText (ParamName,NewInsName,MaxBytes);
|
||||||
|
|
||||||
/***** Get from the database the old names of the institution *****/
|
/***** Get from the database the old names of the institution *****/
|
||||||
Ins_GetDataOfInstitutionByCod (Ins,Ins_GET_BASIC_DATA);
|
Ins_GetDataOfInstitutionByCod (Ins);
|
||||||
|
|
||||||
/***** Check if new name is empty *****/
|
/***** Check if new name is empty *****/
|
||||||
if (NewInsName[0])
|
if (NewInsName[0])
|
||||||
|
@ -1507,7 +1496,7 @@ void Ins_ChangeInsWWW (void)
|
||||||
Par_GetParToText ("WWW",NewWWW,Cns_MAX_BYTES_WWW);
|
Par_GetParToText ("WWW",NewWWW,Cns_MAX_BYTES_WWW);
|
||||||
|
|
||||||
/***** Get data of institution *****/
|
/***** Get data of institution *****/
|
||||||
Ins_GetDataOfInstitutionByCod (Ins_EditingIns,Ins_GET_BASIC_DATA);
|
Ins_GetDataOfInstitutionByCod (Ins_EditingIns);
|
||||||
|
|
||||||
/***** Check if new WWW is empty *****/
|
/***** Check if new WWW is empty *****/
|
||||||
if (NewWWW[0])
|
if (NewWWW[0])
|
||||||
|
@ -1568,7 +1557,7 @@ void Ins_ChangeInsStatus (void)
|
||||||
Status = Ins_GetStatusBitsFromStatusTxt (StatusTxt); // New status
|
Status = Ins_GetStatusBitsFromStatusTxt (StatusTxt); // New status
|
||||||
|
|
||||||
/***** Get data of institution *****/
|
/***** Get data of institution *****/
|
||||||
Ins_GetDataOfInstitutionByCod (Ins_EditingIns,Ins_GET_BASIC_DATA);
|
Ins_GetDataOfInstitutionByCod (Ins_EditingIns);
|
||||||
|
|
||||||
/***** Update status in table of institutions *****/
|
/***** Update status in table of institutions *****/
|
||||||
DB_QueryUPDATE ("can not update the status of an institution",
|
DB_QueryUPDATE ("can not update the status of an institution",
|
||||||
|
@ -1987,7 +1976,7 @@ void Ins_ListInssFound (MYSQL_RES **mysql_res,unsigned NumInss)
|
||||||
Ins.InsCod = Str_ConvertStrCodToLongCod (row[0]);
|
Ins.InsCod = Str_ConvertStrCodToLongCod (row[0]);
|
||||||
|
|
||||||
/* Get data of institution */
|
/* Get data of institution */
|
||||||
Ins_GetDataOfInstitutionByCod (&Ins,Ins_GET_EXTRA_DATA);
|
Ins_GetDataOfInstitutionByCod (&Ins);
|
||||||
|
|
||||||
/* Write data of this institution */
|
/* Write data of this institution */
|
||||||
Ins_ListOneInstitutionForSeeing (&Ins,NumIns);
|
Ins_ListOneInstitutionForSeeing (&Ins,NumIns);
|
||||||
|
|
|
@ -99,11 +99,10 @@ void Ins_DrawInstitutionLogoAndNameWithLink (struct Instit *Ins,Act_Action_t Act
|
||||||
|
|
||||||
void Ins_ShowInssOfCurrentCty (void);
|
void Ins_ShowInssOfCurrentCty (void);
|
||||||
void Ins_EditInstitutions (void);
|
void Ins_EditInstitutions (void);
|
||||||
void Ins_GetListInstitutions (long CtyCod,Ins_GetExtraData_t GetExtraData);
|
void Ins_GetListInstitutions (long CtyCod);
|
||||||
|
|
||||||
void Ins_WriteInstitutionNameAndCty (long InsCod);
|
void Ins_WriteInstitutionNameAndCty (long InsCod);
|
||||||
bool Ins_GetDataOfInstitutionByCod (struct Instit *Ins,
|
bool Ins_GetDataOfInstitutionByCod (struct Instit *Ins);
|
||||||
Ins_GetExtraData_t GetExtraData);
|
|
||||||
void Ins_FlushCacheShortNameOfInstitution (void);
|
void Ins_FlushCacheShortNameOfInstitution (void);
|
||||||
void Ins_GetShortNameOfInstitution (struct Instit *Ins);
|
void Ins_GetShortNameOfInstitution (struct Instit *Ins);
|
||||||
void Ins_FlushCacheFullNameAndCtyOfInstitution (void);
|
void Ins_FlushCacheFullNameAndCtyOfInstitution (void);
|
||||||
|
|
|
@ -1553,7 +1553,7 @@ void Lay_WriteHeaderClassPhoto (bool PrintView,bool DrawingClassPhoto,
|
||||||
|
|
||||||
/***** Get data of institution *****/
|
/***** Get data of institution *****/
|
||||||
Ins.InsCod = InsCod;
|
Ins.InsCod = InsCod;
|
||||||
Ins_GetDataOfInstitutionByCod (&Ins,Ins_GET_BASIC_DATA);
|
Ins_GetDataOfInstitutionByCod (&Ins);
|
||||||
|
|
||||||
/***** Get data of degree *****/
|
/***** Get data of degree *****/
|
||||||
Deg.DegCod = DegCod;
|
Deg.DegCod = DegCod;
|
||||||
|
|
|
@ -403,7 +403,7 @@ void Ntf_ShowMyNotifications (void)
|
||||||
|
|
||||||
/* Get institution code (row[2]) */
|
/* Get institution code (row[2]) */
|
||||||
Ins.InsCod = Str_ConvertStrCodToLongCod (row[2]);
|
Ins.InsCod = Str_ConvertStrCodToLongCod (row[2]);
|
||||||
Ins_GetDataOfInstitutionByCod (&Ins,Ins_GET_BASIC_DATA);
|
Ins_GetDataOfInstitutionByCod (&Ins);
|
||||||
|
|
||||||
/* Get centre code (row[3]) */
|
/* Get centre code (row[3]) */
|
||||||
Ctr.CtrCod = Str_ConvertStrCodToLongCod (row[3]);
|
Ctr.CtrCod = Str_ConvertStrCodToLongCod (row[3]);
|
||||||
|
@ -1650,7 +1650,7 @@ static void Ntf_SendPendingNotifByEMailToOneUsr (struct UsrData *ToUsrDat,unsign
|
||||||
|
|
||||||
/* Get institution code (row[2]) */
|
/* Get institution code (row[2]) */
|
||||||
Ins.InsCod = Str_ConvertStrCodToLongCod (row[2]);
|
Ins.InsCod = Str_ConvertStrCodToLongCod (row[2]);
|
||||||
Ins_GetDataOfInstitutionByCod (&Ins,Ins_GET_BASIC_DATA);
|
Ins_GetDataOfInstitutionByCod (&Ins);
|
||||||
|
|
||||||
/* Get centre code (row[3]) */
|
/* Get centre code (row[3]) */
|
||||||
Ctr.CtrCod = Str_ConvertStrCodToLongCod (row[3]);
|
Ctr.CtrCod = Str_ConvertStrCodToLongCod (row[3]);
|
||||||
|
|
|
@ -2199,7 +2199,7 @@ void Rec_ShowSharedUsrRecord (Rec_SharedRecordViewType_t TypeOfView,
|
||||||
|
|
||||||
Ins.InsCod = UsrDat->InsCod;
|
Ins.InsCod = UsrDat->InsCod;
|
||||||
if (Ins.InsCod > 0)
|
if (Ins.InsCod > 0)
|
||||||
Ins_GetDataOfInstitutionByCod (&Ins,Ins_GET_BASIC_DATA);
|
Ins_GetDataOfInstitutionByCod (&Ins);
|
||||||
|
|
||||||
/***** Begin box and table *****/
|
/***** Begin box and table *****/
|
||||||
sprintf (StrRecordWidth,"%upx",Rec_RECORD_WIDTH);
|
sprintf (StrRecordWidth,"%upx",Rec_RECORD_WIDTH);
|
||||||
|
@ -3994,7 +3994,7 @@ static void Rec_ShowFormMyInsCtrDpt (bool IAmATeacher)
|
||||||
/* Get list of institutions in this country */
|
/* Get list of institutions in this country */
|
||||||
Ins_FreeListInstitutions ();
|
Ins_FreeListInstitutions ();
|
||||||
if (Gbl.Usrs.Me.UsrDat.InsCtyCod > 0)
|
if (Gbl.Usrs.Me.UsrDat.InsCtyCod > 0)
|
||||||
Ins_GetListInstitutions (Gbl.Usrs.Me.UsrDat.InsCtyCod,Ins_GET_BASIC_DATA);
|
Ins_GetListInstitutions (Gbl.Usrs.Me.UsrDat.InsCtyCod);
|
||||||
|
|
||||||
/* Begin form to select institution */
|
/* Begin form to select institution */
|
||||||
Frm_StartFormAnchor (ActChgMyIns,Rec_MY_INS_CTR_DPT_ID);
|
Frm_StartFormAnchor (ActChgMyIns,Rec_MY_INS_CTR_DPT_ID);
|
||||||
|
@ -4172,7 +4172,7 @@ void Rec_UpdateMyInstitution (void)
|
||||||
/* Get country of institution */
|
/* Get country of institution */
|
||||||
if (Ins.InsCod > 0)
|
if (Ins.InsCod > 0)
|
||||||
{
|
{
|
||||||
Ins_GetDataOfInstitutionByCod (&Ins,Ins_GET_BASIC_DATA);
|
Ins_GetDataOfInstitutionByCod (&Ins);
|
||||||
if (Gbl.Usrs.Me.UsrDat.InsCtyCod != Ins.CtyCod)
|
if (Gbl.Usrs.Me.UsrDat.InsCtyCod != Ins.CtyCod)
|
||||||
Gbl.Usrs.Me.UsrDat.InsCtyCod = Ins.CtyCod;
|
Gbl.Usrs.Me.UsrDat.InsCtyCod = Ins.CtyCod;
|
||||||
}
|
}
|
||||||
|
|
|
@ -563,7 +563,7 @@ static void Rep_WriteSectionUsrInfo (void)
|
||||||
|
|
||||||
/***** User's institution *****/
|
/***** User's institution *****/
|
||||||
Ins.InsCod = Gbl.Usrs.Me.UsrDat.InsCod;
|
Ins.InsCod = Gbl.Usrs.Me.UsrDat.InsCod;
|
||||||
Ins_GetDataOfInstitutionByCod (&Ins,Ins_GET_BASIC_DATA);
|
Ins_GetDataOfInstitutionByCod (&Ins);
|
||||||
fprintf (Gbl.F.Rep,"<li>%s: %s</li>",
|
fprintf (Gbl.F.Rep,"<li>%s: %s</li>",
|
||||||
Txt_Institution,
|
Txt_Institution,
|
||||||
Ins.FullName);
|
Ins.FullName);
|
||||||
|
|
|
@ -3368,7 +3368,7 @@ static void Sta_WriteInstitution (long InsCod)
|
||||||
{
|
{
|
||||||
/***** Get data of institution *****/
|
/***** Get data of institution *****/
|
||||||
Ins.InsCod = InsCod;
|
Ins.InsCod = InsCod;
|
||||||
Ins_GetDataOfInstitutionByCod (&Ins,Ins_GET_BASIC_DATA);
|
Ins_GetDataOfInstitutionByCod (&Ins);
|
||||||
|
|
||||||
/***** Title in cell *****/
|
/***** Title in cell *****/
|
||||||
HTM_TD_Begin ("class=\"LOG LM\" title=\"%s\"",Ins.FullName);
|
HTM_TD_Begin ("class=\"LOG LM\" title=\"%s\"",Ins.FullName);
|
||||||
|
|
|
@ -1611,7 +1611,7 @@ static void TL_WriteNote (const struct TL_Note *SocNot,
|
||||||
case TL_NOTE_INS_SHA_PUB_FILE:
|
case TL_NOTE_INS_SHA_PUB_FILE:
|
||||||
/* Get institution data */
|
/* Get institution data */
|
||||||
Ins.InsCod = SocNot->HieCod;
|
Ins.InsCod = SocNot->HieCod;
|
||||||
Ins_GetDataOfInstitutionByCod (&Ins,Ins_GET_BASIC_DATA);
|
Ins_GetDataOfInstitutionByCod (&Ins);
|
||||||
break;
|
break;
|
||||||
case TL_NOTE_CTR_DOC_PUB_FILE:
|
case TL_NOTE_CTR_DOC_PUB_FILE:
|
||||||
case TL_NOTE_CTR_SHA_PUB_FILE:
|
case TL_NOTE_CTR_SHA_PUB_FILE:
|
||||||
|
|
10
swad_user.c
10
swad_user.c
|
@ -3716,7 +3716,7 @@ void Usr_WriteRowUsrMainData (unsigned NumUsr,struct UsrData *UsrDat,
|
||||||
|
|
||||||
/***** Write rest of main user's data *****/
|
/***** Write rest of main user's data *****/
|
||||||
Ins.InsCod = UsrDat->InsCod;
|
Ins.InsCod = UsrDat->InsCod;
|
||||||
Ins_GetDataOfInstitutionByCod (&Ins,Ins_GET_BASIC_DATA);
|
Ins_GetDataOfInstitutionByCod (&Ins);
|
||||||
Usr_WriteMainUsrDataExceptUsrID (UsrDat,BgColor);
|
Usr_WriteMainUsrDataExceptUsrID (UsrDat,BgColor);
|
||||||
HTM_TD_Begin ("class=\"LM %s\"",BgColor);
|
HTM_TD_Begin ("class=\"LM %s\"",BgColor);
|
||||||
Ins_DrawInstitutionLogoWithLink (&Ins,25);
|
Ins_DrawInstitutionLogoWithLink (&Ins,25);
|
||||||
|
@ -3760,7 +3760,7 @@ static void Usr_WriteRowGstAllData (struct UsrData *UsrDat)
|
||||||
|
|
||||||
/***** Write rest of guest's main data *****/
|
/***** Write rest of guest's main data *****/
|
||||||
Ins.InsCod = UsrDat->InsCod;
|
Ins.InsCod = UsrDat->InsCod;
|
||||||
Ins_GetDataOfInstitutionByCod (&Ins,Ins_GET_BASIC_DATA);
|
Ins_GetDataOfInstitutionByCod (&Ins);
|
||||||
Usr_WriteMainUsrDataExceptUsrID (UsrDat,Gbl.ColorRows[Gbl.RowEvenOdd]);
|
Usr_WriteMainUsrDataExceptUsrID (UsrDat,Gbl.ColorRows[Gbl.RowEvenOdd]);
|
||||||
Usr_WriteEmail (UsrDat,Gbl.ColorRows[Gbl.RowEvenOdd]);
|
Usr_WriteEmail (UsrDat,Gbl.ColorRows[Gbl.RowEvenOdd]);
|
||||||
Usr_WriteUsrData (Gbl.ColorRows[Gbl.RowEvenOdd],
|
Usr_WriteUsrData (Gbl.ColorRows[Gbl.RowEvenOdd],
|
||||||
|
@ -3864,7 +3864,7 @@ static void Usr_WriteRowStdAllData (struct UsrData *UsrDat,char *GroupNames)
|
||||||
|
|
||||||
/***** Write rest of main student's data *****/
|
/***** Write rest of main student's data *****/
|
||||||
Ins.InsCod = UsrDat->InsCod;
|
Ins.InsCod = UsrDat->InsCod;
|
||||||
Ins_GetDataOfInstitutionByCod (&Ins,Ins_GET_BASIC_DATA);
|
Ins_GetDataOfInstitutionByCod (&Ins);
|
||||||
Usr_WriteMainUsrDataExceptUsrID (UsrDat,Gbl.ColorRows[Gbl.RowEvenOdd]);
|
Usr_WriteMainUsrDataExceptUsrID (UsrDat,Gbl.ColorRows[Gbl.RowEvenOdd]);
|
||||||
Usr_WriteEmail (UsrDat,Gbl.ColorRows[Gbl.RowEvenOdd]);
|
Usr_WriteEmail (UsrDat,Gbl.ColorRows[Gbl.RowEvenOdd]);
|
||||||
Usr_WriteUsrData (Gbl.ColorRows[Gbl.RowEvenOdd],
|
Usr_WriteUsrData (Gbl.ColorRows[Gbl.RowEvenOdd],
|
||||||
|
@ -3983,7 +3983,7 @@ static void Usr_WriteRowTchAllData (struct UsrData *UsrDat)
|
||||||
|
|
||||||
/***** Write rest of main teacher's data *****/
|
/***** Write rest of main teacher's data *****/
|
||||||
Ins.InsCod = UsrDat->InsCod;
|
Ins.InsCod = UsrDat->InsCod;
|
||||||
Ins_GetDataOfInstitutionByCod (&Ins,Ins_GET_BASIC_DATA);
|
Ins_GetDataOfInstitutionByCod (&Ins);
|
||||||
Usr_WriteMainUsrDataExceptUsrID (UsrDat,Gbl.ColorRows[Gbl.RowEvenOdd]);
|
Usr_WriteMainUsrDataExceptUsrID (UsrDat,Gbl.ColorRows[Gbl.RowEvenOdd]);
|
||||||
Usr_WriteEmail (UsrDat,Gbl.ColorRows[Gbl.RowEvenOdd]);
|
Usr_WriteEmail (UsrDat,Gbl.ColorRows[Gbl.RowEvenOdd]);
|
||||||
Usr_WriteUsrData (Gbl.ColorRows[Gbl.RowEvenOdd],
|
Usr_WriteUsrData (Gbl.ColorRows[Gbl.RowEvenOdd],
|
||||||
|
@ -4061,7 +4061,7 @@ static void Usr_WriteRowAdmData (unsigned NumUsr,struct UsrData *UsrDat)
|
||||||
|
|
||||||
/***** Write rest of main administrator's data *****/
|
/***** Write rest of main administrator's data *****/
|
||||||
Ins.InsCod = UsrDat->InsCod;
|
Ins.InsCod = UsrDat->InsCod;
|
||||||
Ins_GetDataOfInstitutionByCod (&Ins,Ins_GET_BASIC_DATA);
|
Ins_GetDataOfInstitutionByCod (&Ins);
|
||||||
Usr_WriteMainUsrDataExceptUsrID (UsrDat,Gbl.ColorRows[Gbl.RowEvenOdd]);
|
Usr_WriteMainUsrDataExceptUsrID (UsrDat,Gbl.ColorRows[Gbl.RowEvenOdd]);
|
||||||
|
|
||||||
HTM_TD_Begin ("class=\"LM %s\"",Gbl.ColorRows[Gbl.RowEvenOdd]);
|
HTM_TD_Begin ("class=\"LM %s\"",Gbl.ColorRows[Gbl.RowEvenOdd]);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user