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í?
|
||||
"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 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.16.1: Sep 25, 2023 Fixed CSS issues. (336778 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;
|
||||
|
||||
/***** Get number of elements with courses *****/
|
||||
// For each level country, institution, center, degree and course...
|
||||
for (LevelChildren = Hie_CTY;
|
||||
LevelChildren <= Hie_CRS;
|
||||
LevelChildren++)
|
||||
if (LevelChildren < LevelGrandChildren)
|
||||
{
|
||||
if (LevelChildren <= Gbl.Scope.Current)
|
||||
NumNodes[LevelChildren] = 1;
|
||||
else // Level >= Gbl.Scope.Curremt + 1
|
||||
if (LevelChildren >= LevelGrandChildren) // Example: don't show number of centers with institutions
|
||||
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
|
||||
}
|
||||
else // Level >= LevelGrandChildren
|
||||
NumNodes[LevelChildren] = -1;
|
||||
LevelGrandChildren);// Grand child
|
||||
|
||||
/***** Write number of elements with courses *****/
|
||||
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] =
|
||||
{
|
||||
// Child Grandchild
|
||||
// Child / Grandchild
|
||||
[Hie_CTY][Hie_INS] = FigCch_NUM_CTYS_WITH_INSS,
|
||||
[Hie_CTY][Hie_CTR] = FigCch_NUM_CTYS_WITH_CTRS,
|
||||
[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) =
|
||||
{
|
||||
// Child Grandchild
|
||||
// Child / Grandchild
|
||||
[Hie_CTY][Hie_INS] = Cty_DB_GetNumCtysWithInss,
|
||||
[Hie_CTY][Hie_CTR] = Cty_DB_GetNumCtysWithCtrs,
|
||||
[Hie_CTY][Hie_DEG] = Cty_DB_GetNumCtysWithDegs,
|
||||
|
|
Loading…
Reference in New Issue