mirror of https://github.com/acanas/swad-core.git
Version 23.17.1: Sep 25, 2023 Fixed bug in hierarchy.
This commit is contained in:
parent
541d5d61b9
commit
2c3f4ee574
|
@ -632,10 +632,11 @@ TODO: Francisco Javier Fern
|
||||||
Me sale este error, no sé si por no recordar yo la sintaxis apropiada para mandar a varios destinatarios. ¿No era así?
|
Me sale este error, no sé si por no recordar yo la sintaxis apropiada para mandar a varios destinatarios. ¿No era así?
|
||||||
"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.17 (2023-09-25)"
|
#define Log_PLATFORM_VERSION "SWAD 23.17.1 (2023-09-25)"
|
||||||
#define CSS_FILE "swad23.16.1.css"
|
#define CSS_FILE "swad23.16.1.css"
|
||||||
#define JS_FILE "swad22.49.js"
|
#define JS_FILE "swad22.49.js"
|
||||||
/*
|
/*
|
||||||
|
Version 23.17.1: Sep 25, 2023 Fixed bug in hierarchy. (336654 lines)
|
||||||
Version 23.17: Sep 25, 2023 Code refactoring in hierarchy. (336655 lines)
|
Version 23.17: Sep 25, 2023 Code refactoring in hierarchy. (336655 lines)
|
||||||
Version 23.16.1: Sep 25, 2023 Fixed CSS issues. (336778 lines)
|
Version 23.16.1: Sep 25, 2023 Fixed CSS issues. (336778 lines)
|
||||||
Version 23.16: Sep 22, 2023 Code refactoring in hierarchy and cache. (336775 lines)
|
Version 23.16: Sep 22, 2023 Code refactoring in hierarchy and cache. (336775 lines)
|
||||||
|
|
|
@ -1077,20 +1077,18 @@ static void Hie_GetAndShowHierarchyWith (Hie_Level_t LevelGrandChildren)
|
||||||
Hie_Level_t LevelChildren;
|
Hie_Level_t LevelChildren;
|
||||||
|
|
||||||
/***** Get number of elements with courses *****/
|
/***** Get number of elements with courses *****/
|
||||||
|
// For each level country, institution, center, degree and course...
|
||||||
for (LevelChildren = Hie_CTY;
|
for (LevelChildren = Hie_CTY;
|
||||||
LevelChildren <= Hie_CRS;
|
LevelChildren <= Hie_CRS;
|
||||||
LevelChildren++)
|
LevelChildren++)
|
||||||
if (LevelChildren < LevelGrandChildren)
|
if (LevelChildren >= LevelGrandChildren) // Example: don't show number of centers with institutions
|
||||||
{
|
|
||||||
if (LevelChildren <= Gbl.Scope.Current)
|
|
||||||
NumNodes[LevelChildren] = 1;
|
|
||||||
else // Level >= Gbl.Scope.Curremt + 1
|
|
||||||
NumNodes[LevelChildren] = (int) Hie_GetCachedNumNodesInHieLvlWith (LevelChildren, // Child
|
|
||||||
Gbl.Scope.Current, // Parent
|
|
||||||
LevelGrandChildren); // Grand child
|
|
||||||
}
|
|
||||||
else // Level >= LevelGrandChildren
|
|
||||||
NumNodes[LevelChildren] = -1;
|
NumNodes[LevelChildren] = -1;
|
||||||
|
else if (LevelChildren < Gbl.Scope.Current) // Example: if scope is center (4) =>
|
||||||
|
NumNodes[LevelChildren] = 1; // number of countries/instit./centers in center is 1
|
||||||
|
else
|
||||||
|
NumNodes[LevelChildren] = (int) Hie_GetCachedNumNodesInHieLvlWith (LevelChildren, // Child
|
||||||
|
Gbl.Scope.Current, // Parent
|
||||||
|
LevelGrandChildren);// Grand child
|
||||||
|
|
||||||
/***** Write number of elements with courses *****/
|
/***** Write number of elements with courses *****/
|
||||||
Hie_ShowHierarchyRow (Txt_With_,*Txt[LevelGrandChildren],"DAT",NumNodes);
|
Hie_ShowHierarchyRow (Txt_With_,*Txt[LevelGrandChildren],"DAT",NumNodes);
|
||||||
|
@ -1218,7 +1216,7 @@ unsigned Hie_GetCachedNumNodesInHieLvlWith (Hie_Level_t LevelChildren,
|
||||||
{
|
{
|
||||||
static FigCch_FigureCached_t Figure[Hie_NUM_LEVELS][Hie_NUM_LEVELS] =
|
static FigCch_FigureCached_t Figure[Hie_NUM_LEVELS][Hie_NUM_LEVELS] =
|
||||||
{
|
{
|
||||||
// Child Grandchild
|
// Child / Grandchild
|
||||||
[Hie_CTY][Hie_INS] = FigCch_NUM_CTYS_WITH_INSS,
|
[Hie_CTY][Hie_INS] = FigCch_NUM_CTYS_WITH_INSS,
|
||||||
[Hie_CTY][Hie_CTR] = FigCch_NUM_CTYS_WITH_CTRS,
|
[Hie_CTY][Hie_CTR] = FigCch_NUM_CTYS_WITH_CTRS,
|
||||||
[Hie_CTY][Hie_DEG] = FigCch_NUM_CTYS_WITH_DEGS,
|
[Hie_CTY][Hie_DEG] = FigCch_NUM_CTYS_WITH_DEGS,
|
||||||
|
@ -1235,7 +1233,7 @@ unsigned Hie_GetCachedNumNodesInHieLvlWith (Hie_Level_t LevelChildren,
|
||||||
};
|
};
|
||||||
static unsigned (*FunctionGetFigure[Hie_NUM_LEVELS][Hie_NUM_LEVELS]) (Hie_Level_t Level,long HieCod) =
|
static unsigned (*FunctionGetFigure[Hie_NUM_LEVELS][Hie_NUM_LEVELS]) (Hie_Level_t Level,long HieCod) =
|
||||||
{
|
{
|
||||||
// Child Grandchild
|
// Child / Grandchild
|
||||||
[Hie_CTY][Hie_INS] = Cty_DB_GetNumCtysWithInss,
|
[Hie_CTY][Hie_INS] = Cty_DB_GetNumCtysWithInss,
|
||||||
[Hie_CTY][Hie_CTR] = Cty_DB_GetNumCtysWithCtrs,
|
[Hie_CTY][Hie_CTR] = Cty_DB_GetNumCtysWithCtrs,
|
||||||
[Hie_CTY][Hie_DEG] = Cty_DB_GetNumCtysWithDegs,
|
[Hie_CTY][Hie_DEG] = Cty_DB_GetNumCtysWithDegs,
|
||||||
|
|
|
@ -38,13 +38,13 @@ void Hie_DB_BuildSubquery (char SubQuery[128],Hie_Level_t Level,long HieCod)
|
||||||
{
|
{
|
||||||
static const char *Format[Hie_NUM_LEVELS] =
|
static const char *Format[Hie_NUM_LEVELS] =
|
||||||
{
|
{
|
||||||
[Hie_UNK] = "", // Unknown
|
[Hie_UNK] = "", // Unknown
|
||||||
[Hie_SYS] = "", // System
|
[Hie_SYS] = "", // System
|
||||||
[Hie_CTY] = "ins_instits.CtyCod=%ld AND ", // Country
|
[Hie_CTY] = "ins_instits.CtyCod=%ld AND ", // Country
|
||||||
[Hie_INS] = "ctr_centers.InsCod=%ld AND ", // Institution
|
[Hie_INS] = "ctr_centers.InsCod=%ld AND ", // Institution
|
||||||
[Hie_CTR] = "deg_degrees.CtrCod=%ld AND ", // Center
|
[Hie_CTR] = "deg_degrees.CtrCod=%ld AND ", // Center
|
||||||
[Hie_DEG] = "crs_courses.DegCod=%ld AND ", // Degree
|
[Hie_DEG] = "crs_courses.DegCod=%ld AND ", // Degree
|
||||||
[Hie_CRS] = "crs_users.CrsCod=%ld AND ", // Course
|
[Hie_CRS] = "crs_users.CrsCod=%ld AND ", // Course
|
||||||
};
|
};
|
||||||
|
|
||||||
if (HieCod > 0)
|
if (HieCod > 0)
|
||||||
|
|
Loading…
Reference in New Issue