mirror of https://github.com/acanas/swad-core.git
Version19.167
This commit is contained in:
parent
cda9e90d06
commit
7cb4c962fc
|
@ -911,7 +911,7 @@ int swad__loginByUserPasswordKey (struct soap *soap,
|
|||
" AND usr_data.Password='%s'",
|
||||
UsrIDNickOrEmail,userPassword);
|
||||
}
|
||||
else if (Mai_CheckIfEmailIsValid (Gbl.Usrs.Me.UsrIdLogin)) // 2: It's an email
|
||||
else if (Mai_CheckIfEmailIsValid (UsrIDNickOrEmail)) // 2: It's an email
|
||||
{
|
||||
/* User has typed an email */
|
||||
// TODO: Get only if email confirmed?
|
||||
|
|
|
@ -298,8 +298,7 @@ static void Asg_PutIconsListAssignments (void *Assignments)
|
|||
Asg_PutIconToCreateNewAsg (Assignments);
|
||||
|
||||
/***** Put icon to show a figure *****/
|
||||
Gbl.Figures.FigureType = Fig_ASSIGNMENTS;
|
||||
Fig_PutIconToShowFigure ();
|
||||
Fig_PutIconToShowFigure (Fig_ASSIGNMENTS);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
|
@ -98,11 +98,8 @@ void Cal_PutIconsToSelectFirstDayOfWeek (void)
|
|||
static void Cal_PutIconsFirstDayOfWeek (void *Args)
|
||||
{
|
||||
if (Args)
|
||||
{
|
||||
/***** Put icon to show a figure *****/
|
||||
Gbl.Figures.FigureType = Fig_FIRST_DAY_OF_WEEK;
|
||||
Fig_PutIconToShowFigure ();
|
||||
}
|
||||
Fig_PutIconToShowFigure (Fig_FIRST_DAY_OF_WEEK);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
|
@ -333,8 +333,7 @@ static void Ctr_PutIconsListingCentres (void *Args)
|
|||
Plc_PutIconToViewPlaces ();
|
||||
|
||||
/***** Put icon to show a figure *****/
|
||||
Gbl.Figures.FigureType = Fig_HIERARCHY;
|
||||
Fig_PutIconToShowFigure ();
|
||||
Fig_PutIconToShowFigure (Fig_HIERARCHY);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -515,8 +514,7 @@ static void Ctr_PutIconsEditingCentres (void *Args)
|
|||
Plc_PutIconToViewPlaces ();
|
||||
|
||||
/***** Put icon to show a figure *****/
|
||||
Gbl.Figures.FigureType = Fig_HIERARCHY;
|
||||
Fig_PutIconToShowFigure ();
|
||||
Fig_PutIconToShowFigure (Fig_HIERARCHY);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -497,14 +497,25 @@ enscript -2 --landscape --color --file-align=2 --highlight --line-numbers -o - *
|
|||
En OpenSWAD:
|
||||
ps2pdf source.ps destination.pdf
|
||||
*/
|
||||
#define Log_PLATFORM_VERSION "SWAD 19.166 (2020-04-06)"
|
||||
#define Log_PLATFORM_VERSION "SWAD 19.167 (2020-04-06)"
|
||||
#define CSS_FILE "swad19.146.css"
|
||||
#define JS_FILE "swad19.153.js"
|
||||
/*
|
||||
*
|
||||
Call parameters:
|
||||
userID: string (DNI/passport, @nickname or email of the user).
|
||||
// TODO: Geolocalización:
|
||||
|
||||
|
||||
Función API sendCurrentLocation...
|
||||
Parámetros: string con ubicación (ej. "Aula 0.1")
|
||||
Parámetros a enviar a la función:
|
||||
1. Código único de ubicación (número)
|
||||
Almacenaría esa ubicación en una tabla
|
||||
- Código usuario
|
||||
- Código de ubicación (sacado de la tabla de ubicaciones)
|
||||
- Fecha-hora
|
||||
|
||||
Haría falta una función API que envíe el histórico reciente de ubicaciones de un usuario
|
||||
|
||||
Poblar base de datos:
|
||||
En Usuarios > Ubicación aparecería un botón pequeño de "Añadir ubicación".
|
||||
|
@ -516,6 +527,15 @@ Si es as
|
|||
Función API newLocation...
|
||||
Paramétros: MAC, string con ubicación (ej. "Aula 0.1")
|
||||
|
||||
|
||||
Función API getLocations
|
||||
1. Añadir tipo de ubicación
|
||||
2. Añadir lista desplegable de MAC asociadas a una ubicación
|
||||
3. API: getLocations (como parámetro se pasa la MAC)
|
||||
- que devolveria las filas de la tabla de ubicaciones asociadas a esa MAC
|
||||
|
||||
|
||||
|
||||
// TODO: Laura García: "Ahora estoy utilizando la plataforma SWAD más que nunca, evidentemente, debido a las circunstancias, e incluso les he hecho un examencillo a los alumnos utilizando los test de autoevaluación.
|
||||
Pero quería preguntarte un par de cosas:
|
||||
- lo primero es si se pueden borrar los test realizados por cualquier usuario, incluido profesores. Yo misma he hecho un montón para simular el examen, y ya me están sobrando.
|
||||
|
@ -528,6 +548,10 @@ Param
|
|||
// TODO: Oresti Baños: cambiar ojos por candados en descriptores para prohibir/permitir y dejar los ojos para poder elegir descriptores
|
||||
// TODO: Integrar pull requests con traducciones del alemán del usuario eruedin en GitHub
|
||||
|
||||
// TODO: Bug en SWADroid: loginByUserPasswordKey falla cuando se le pasa como parámetro un DNI
|
||||
|
||||
Version 19.167: Apr 06, 2020 Code refactoring in figures. (284772 lines)
|
||||
Version 19.166.1: Apr 06, 2020 Fixed bug in API function loginByUserPasswordKey, reported by Javier Bueno López. (? lines)
|
||||
Version 19.166: Apr 06, 2020 Code refactoring in banners. (284805 lines)
|
||||
Version 19.165: Apr 06, 2020 Code refactoring in attendance events. (284743 lines)
|
||||
Version 19.164: Apr 05, 2020 Code refactoring in assignments and pagination. (284644 lines)
|
||||
|
|
|
@ -105,11 +105,8 @@ void Coo_EditMyPrefsOnCookies (void)
|
|||
static void Coo_PutIconsCookies (void *Args)
|
||||
{
|
||||
if (Args)
|
||||
{
|
||||
/***** Put icon to show a figure *****/
|
||||
Gbl.Figures.FigureType = Fig_COOKIES;
|
||||
Fig_PutIconToShowFigure ();
|
||||
}
|
||||
Fig_PutIconToShowFigure (Fig_COOKIES);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
|
@ -467,8 +467,7 @@ static void Cty_PutIconsListingCountries (void *Args)
|
|||
Cty_PutIconToEditCountries ();
|
||||
|
||||
/***** Put icon to show a figure *****/
|
||||
Gbl.Figures.FigureType = Fig_HIERARCHY;
|
||||
Fig_PutIconToShowFigure ();
|
||||
Fig_PutIconToShowFigure (Fig_HIERARCHY);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -711,8 +710,7 @@ static void Cty_PutIconsEditingCountries (void *Args)
|
|||
Cty_PutIconToViewCountries ();
|
||||
|
||||
/***** Put icon to show a figure *****/
|
||||
Gbl.Figures.FigureType = Fig_HIERARCHY;
|
||||
Fig_PutIconToShowFigure ();
|
||||
Fig_PutIconToShowFigure (Fig_HIERARCHY);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -862,8 +862,7 @@ static void Crs_PutIconsListCourses (void *Args)
|
|||
Crs_PutIconToEditCourses ();
|
||||
|
||||
/***** Put icon to show a figure *****/
|
||||
Gbl.Figures.FigureType = Fig_HIERARCHY;
|
||||
Fig_PutIconToShowFigure ();
|
||||
Fig_PutIconToShowFigure (Fig_HIERARCHY);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1053,8 +1052,7 @@ static void Crs_PutIconsEditingCourses (void *Args)
|
|||
Crs_PutIconToViewCourses ();
|
||||
|
||||
/***** Put icon to show a figure *****/
|
||||
Gbl.Figures.FigureType = Fig_HIERARCHY;
|
||||
Fig_PutIconToShowFigure ();
|
||||
Fig_PutIconToShowFigure (Fig_HIERARCHY);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -150,11 +150,8 @@ void Dat_PutBoxToSelectDateFormat (void)
|
|||
static void Dat_PutIconsDateFormat (void *Args)
|
||||
{
|
||||
if (Args)
|
||||
{
|
||||
/***** Put icon to show a figure *****/
|
||||
Gbl.Figures.FigureType = Fig_DATE_FORMAT;
|
||||
Fig_PutIconToShowFigure ();
|
||||
}
|
||||
Fig_PutIconToShowFigure (Fig_DATE_FORMAT);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
|
@ -827,8 +827,7 @@ static void Deg_PutIconsListingDegrees (void *Args)
|
|||
DT_PutIconToViewDegreeTypes ();
|
||||
|
||||
/***** Put icon to show a figure *****/
|
||||
Gbl.Figures.FigureType = Fig_HIERARCHY;
|
||||
Fig_PutIconToShowFigure ();
|
||||
Fig_PutIconToShowFigure (Fig_HIERARCHY);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1002,8 +1001,7 @@ static void Deg_PutIconsEditingDegrees (void *Args)
|
|||
DT_PutIconToViewDegreeTypes ();
|
||||
|
||||
/***** Put icon to show a figure *****/
|
||||
Gbl.Figures.FigureType = Fig_HIERARCHY;
|
||||
Fig_PutIconToShowFigure ();
|
||||
Fig_PutIconToShowFigure (Fig_HIERARCHY);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -70,7 +70,9 @@ static void DT_SeeDegreeTypes (Act_Action_t NextAction,Hie_Level_t Scope,
|
|||
DT_Order_t DefaultOrder);
|
||||
static DT_Order_t DT_GetParamDegTypOrder (DT_Order_t DefaultOrder);
|
||||
|
||||
static void DT_ListDegreeTypes (Act_Action_t NextAction,DT_Order_t SelectedOrder);
|
||||
static void DT_ListDegreeTypes (Act_Action_t NextAction,
|
||||
Hie_Level_t Scope,
|
||||
DT_Order_t SelectedOrder);
|
||||
|
||||
static void DT_EditDegreeTypesInternal (void);
|
||||
static void DT_PutIconsEditingDegreeTypes (void *Args);
|
||||
|
@ -82,7 +84,9 @@ static void DT_ListDegreeTypesForEdition (void);
|
|||
|
||||
static void DT_PutFormToCreateDegreeType (void);
|
||||
|
||||
static void DT_PutHeadDegreeTypesForSeeing (Act_Action_t NextAction,DT_Order_t SelectedOrder);
|
||||
static void DT_PutHeadDegreeTypesForSeeing (Act_Action_t NextAction,
|
||||
Hie_Level_t Scope,
|
||||
DT_Order_t SelectedOrder);
|
||||
static void DT_PutHeadDegreeTypesForEdition (void);
|
||||
static void DT_CreateDegreeType (struct DegreeType *DegTyp);
|
||||
|
||||
|
@ -154,7 +158,7 @@ static void DT_SeeDegreeTypes (Act_Action_t NextAction,Hie_Level_t Scope,
|
|||
DT_GetListDegreeTypes (Scope,SelectedOrder);
|
||||
|
||||
/***** List degree types *****/
|
||||
DT_ListDegreeTypes (NextAction,SelectedOrder);
|
||||
DT_ListDegreeTypes (NextAction,Scope,SelectedOrder);
|
||||
|
||||
/***** Free list of degree types *****/
|
||||
DT_FreeListDegreeTypes ();
|
||||
|
@ -179,7 +183,9 @@ static DT_Order_t DT_GetParamDegTypOrder (DT_Order_t DefaultOrder)
|
|||
// - centre tab => NextAction = ActSeeDegTyp
|
||||
// - statistic tab => NextAction = ActSeeUseGbl
|
||||
|
||||
static void DT_ListDegreeTypes (Act_Action_t NextAction,DT_Order_t SelectedOrder)
|
||||
static void DT_ListDegreeTypes (Act_Action_t NextAction,
|
||||
Hie_Level_t Scope,
|
||||
DT_Order_t SelectedOrder)
|
||||
{
|
||||
extern const char *Hlp_CENTRE_DegreeTypes;
|
||||
extern const char *Hlp_ANALYTICS_Figures_types_of_degree;
|
||||
|
@ -209,7 +215,7 @@ static void DT_ListDegreeTypes (Act_Action_t NextAction,DT_Order_t SelectedOrder
|
|||
{
|
||||
/***** Write heading *****/
|
||||
HTM_TABLE_BeginWideMarginPadding (2);
|
||||
DT_PutHeadDegreeTypesForSeeing (NextAction,SelectedOrder);
|
||||
DT_PutHeadDegreeTypesForSeeing (NextAction,Scope,SelectedOrder);
|
||||
|
||||
/***** List current degree types for seeing *****/
|
||||
DT_ListDegreeTypesForSeeing ();
|
||||
|
@ -291,8 +297,7 @@ static void DT_PutIconsEditingDegreeTypes (void *Args)
|
|||
Deg_PutIconToViewDegrees ();
|
||||
|
||||
/***** Put icon to show a figure *****/
|
||||
Gbl.Figures.FigureType = Fig_DEGREE_TYPES;
|
||||
Fig_PutIconToShowFigure ();
|
||||
Fig_PutIconToShowFigure (Fig_DEGREE_TYPES);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -366,8 +371,7 @@ static void DT_PutIconsListingDegTypes (void *Args)
|
|||
Deg_PutIconToViewDegrees ();
|
||||
|
||||
/***** Put icon to show a figure *****/
|
||||
Gbl.Figures.FigureType = Fig_DEGREE_TYPES;
|
||||
Fig_PutIconToShowFigure ();
|
||||
Fig_PutIconToShowFigure (Fig_DEGREE_TYPES);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -506,11 +510,14 @@ static void DT_PutFormToCreateDegreeType (void)
|
|||
/***************** Write header with fields of a degree type *****************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void DT_PutHeadDegreeTypesForSeeing (Act_Action_t NextAction,DT_Order_t SelectedOrder)
|
||||
static void DT_PutHeadDegreeTypesForSeeing (Act_Action_t NextAction,
|
||||
Hie_Level_t Scope,
|
||||
DT_Order_t SelectedOrder)
|
||||
{
|
||||
extern const char *Txt_DEGREE_TYPES_HELP_ORDER[DT_NUM_ORDERS];
|
||||
extern const char *Txt_DEGREE_TYPES_ORDER[DT_NUM_ORDERS];
|
||||
DT_Order_t Order;
|
||||
struct Fig_Figures Figures;
|
||||
|
||||
HTM_TR_Begin (NULL);
|
||||
HTM_TH_Empty (1);
|
||||
|
@ -524,7 +531,11 @@ static void DT_PutHeadDegreeTypesForSeeing (Act_Action_t NextAction,DT_Order_t S
|
|||
/* Begin form to change order */
|
||||
Frm_StartForm (NextAction);
|
||||
if (NextAction == ActSeeUseGbl)
|
||||
Fig_PutHiddenParamFigures (&Gbl);
|
||||
{
|
||||
Figures.Scope = Scope;
|
||||
Figures.FigureType = Fig_DEGREE_TYPES;
|
||||
Fig_PutHiddenParamFigures (&Figures);
|
||||
}
|
||||
Par_PutHiddenParamUnsigned (NULL,"Order",(unsigned) Order);
|
||||
|
||||
/* Link with the head of this column */
|
||||
|
|
|
@ -83,13 +83,18 @@ struct Fig_FiguresForum
|
|||
unsigned NumUsrsToBeNotifiedByEMail;
|
||||
};
|
||||
|
||||
/*****************************************************************************/
|
||||
/***************************** Private variables *****************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
/*****************************************************************************/
|
||||
/****************************** Private prototypes ***************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void Fig_PutParamsToShowFigure (void *Args);
|
||||
static void Fig_PutHiddenParamFigureType (void);
|
||||
static void Fig_PutHiddenParamScopeFig (void);
|
||||
static void Fig_ReqShowFigure (Fig_FigureType_t SelectedFigureType);
|
||||
|
||||
static void Fig_PutHiddenParamFigureType (Fig_FigureType_t FigureType);
|
||||
static void Fig_PutHiddenParamScopeFig (Hie_Level_t ScopeFig);
|
||||
|
||||
static void Fig_GetAndShowHierarchyStats (void);
|
||||
static void Fig_WriteHeadHierarchy (void);
|
||||
|
@ -190,6 +195,11 @@ unsigned Fig_GetNumUsrsWhoChoseAnOption (const char *SubQuery);
|
|||
/*****************************************************************************/
|
||||
|
||||
void Fig_ReqShowFigures (void)
|
||||
{
|
||||
Fig_ReqShowFigure (Fig_FIGURE_TYPE_DEF);
|
||||
}
|
||||
|
||||
static void Fig_ReqShowFigure (Fig_FigureType_t SelectedFigureType)
|
||||
{
|
||||
extern const char *Hlp_ANALYTICS_Figures;
|
||||
extern const char *The_ClassFormInBox[The_NUM_THEMES];
|
||||
|
@ -198,7 +208,7 @@ void Fig_ReqShowFigures (void)
|
|||
extern const char *Txt_Statistic;
|
||||
extern const char *Txt_FIGURE_TYPES[Fig_NUM_FIGURES];
|
||||
extern const char *Txt_Show_statistic;
|
||||
Fig_FigureType_t FigureType;
|
||||
Fig_FigureType_t FigType;
|
||||
unsigned FigureTypeUnsigned;
|
||||
|
||||
/***** Form to show statistic *****/
|
||||
|
@ -229,14 +239,14 @@ void Fig_ReqShowFigures (void)
|
|||
HTM_TxtColonNBSP (Txt_Statistic);
|
||||
HTM_SELECT_Begin (false,
|
||||
"name=\"FigureType\"");
|
||||
for (FigureType = (Fig_FigureType_t) 0;
|
||||
FigureType <= (Fig_FigureType_t) (Fig_NUM_FIGURES - 1);
|
||||
FigureType++)
|
||||
for (FigType = (Fig_FigureType_t) 0;
|
||||
FigType <= (Fig_FigureType_t) (Fig_NUM_FIGURES - 1);
|
||||
FigType++)
|
||||
{
|
||||
FigureTypeUnsigned = (unsigned) FigureType;
|
||||
FigureTypeUnsigned = (unsigned) FigType;
|
||||
HTM_OPTION (HTM_Type_UNSIGNED,&FigureTypeUnsigned,
|
||||
FigureType == Gbl.Figures.FigureType,false,
|
||||
"%s",Txt_FIGURE_TYPES[FigureType]);
|
||||
FigType == SelectedFigureType,false,
|
||||
"%s",Txt_FIGURE_TYPES[FigType]);
|
||||
}
|
||||
HTM_SELECT_End ();
|
||||
HTM_LABEL_End ();
|
||||
|
@ -251,14 +261,21 @@ void Fig_ReqShowFigures (void)
|
|||
/*****************************************************************************/
|
||||
/************************* Put icon to show a figure *************************/
|
||||
/*****************************************************************************/
|
||||
// Gbl.Figures.FigureType must be set to the desired figure before calling this function
|
||||
|
||||
void Fig_PutIconToShowFigure (void)
|
||||
void Fig_PutIconToShowFigure (Fig_FigureType_t FigureType)
|
||||
{
|
||||
extern const char *Txt_Show_statistic;
|
||||
struct Fig_Figures Figures;
|
||||
|
||||
/***** Set default scope (used only if Gbl.Scope.Current is unknown) *****/
|
||||
Gbl.Scope.Default = Hie_CRS;
|
||||
Sco_AdjustScope ();
|
||||
|
||||
/***** Put icon to show figure *****/
|
||||
Figures.Scope = Gbl.Scope.Current;
|
||||
Figures.FigureType = FigureType;
|
||||
Lay_PutContextualLinkOnlyIcon (ActSeeUseGbl,NULL,
|
||||
Fig_PutParamsToShowFigure,&Gbl,
|
||||
Fig_PutHiddenParamFigures,&Figures,
|
||||
"chart-pie.svg",
|
||||
Txt_Show_statistic);
|
||||
}
|
||||
|
@ -266,30 +283,13 @@ void Fig_PutIconToShowFigure (void)
|
|||
/*****************************************************************************/
|
||||
/************* Put hidden parameters for figures (statistics) ****************/
|
||||
/*****************************************************************************/
|
||||
// Gbl.Figures.FigureType must be set to the desired figure before calling this function
|
||||
|
||||
static void Fig_PutParamsToShowFigure (void *Args)
|
||||
void Fig_PutHiddenParamFigures (void *Figures)
|
||||
{
|
||||
if (Args)
|
||||
if (Figures)
|
||||
{
|
||||
/***** Set default scope (used only if Gbl.Scope.Current is unknown) *****/
|
||||
Gbl.Scope.Default = Hie_CRS;
|
||||
Sco_AdjustScope ();
|
||||
|
||||
Fig_PutHiddenParamFigures (&Gbl);
|
||||
}
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/************* Put hidden parameters for figures (statistics) ****************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Fig_PutHiddenParamFigures (void *Args)
|
||||
{
|
||||
if (Args)
|
||||
{
|
||||
Fig_PutHiddenParamScopeFig ();
|
||||
Fig_PutHiddenParamFigureType ();
|
||||
Fig_PutHiddenParamScopeFig (((struct Fig_Figures *) Figures)->Scope);
|
||||
Fig_PutHiddenParamFigureType (((struct Fig_Figures *) Figures)->FigureType);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -297,18 +297,18 @@ void Fig_PutHiddenParamFigures (void *Args)
|
|||
/********* Put hidden parameter for the type of figure (statistic) ***********/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void Fig_PutHiddenParamFigureType (void)
|
||||
static void Fig_PutHiddenParamFigureType (Fig_FigureType_t FigureType)
|
||||
{
|
||||
Par_PutHiddenParamUnsigned (NULL,"FigureType",(unsigned) Gbl.Figures.FigureType);
|
||||
Par_PutHiddenParamUnsigned (NULL,"FigureType",(unsigned) FigureType);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/********* Put hidden parameter for the type of figure (statistic) ***********/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void Fig_PutHiddenParamScopeFig (void)
|
||||
static void Fig_PutHiddenParamScopeFig (Hie_Level_t ScopeFig)
|
||||
{
|
||||
Sco_PutParamScope ("ScopeFig",Gbl.Scope.Current);
|
||||
Sco_PutParamScope ("ScopeFig",ScopeFig);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -326,7 +326,7 @@ void Fig_ShowFigures (void)
|
|||
[Fig_DEGREE_TYPES ] = Fig_GetAndShowDegreeTypesStats,
|
||||
[Fig_FOLDERS_AND_FILES] = Fig_GetAndShowFileBrowsersStats,
|
||||
[Fig_OER ] = Fig_GetAndShowOERsStats,
|
||||
[Fig_COURSE_PROGRAMS ] = Fig_GetAndShowCourseProgramStats,
|
||||
[Fig_COURSE_PROGRAMS ] = Fig_GetAndShowCourseProgramStats,
|
||||
[Fig_ASSIGNMENTS ] = Fig_GetAndShowAssignmentsStats,
|
||||
[Fig_PROJECTS ] = Fig_GetAndShowProjectsStats,
|
||||
[Fig_TESTS ] = Fig_GetAndShowTestsStats,
|
||||
|
@ -349,19 +349,20 @@ void Fig_ShowFigures (void)
|
|||
[Fig_PRIVACY ] = Fig_GetAndShowNumUsrsPerPrivacy,
|
||||
[Fig_COOKIES ] = Fig_GetAndShowNumUsrsPerCookies,
|
||||
};
|
||||
Fig_FigureType_t SelectedFigureType;
|
||||
|
||||
/***** Get the type of figure ******/
|
||||
Gbl.Figures.FigureType = (Fig_FigureType_t)
|
||||
Par_GetParToUnsignedLong ("FigureType",
|
||||
0,
|
||||
Fig_NUM_FIGURES - 1,
|
||||
(unsigned long) Fig_FIGURE_TYPE_DEF);
|
||||
SelectedFigureType = (Fig_FigureType_t)
|
||||
Par_GetParToUnsignedLong ("FigureType",
|
||||
0,
|
||||
Fig_NUM_FIGURES - 1,
|
||||
(unsigned long) Fig_FIGURE_TYPE_DEF);
|
||||
|
||||
/***** Show again the form to see use of the platform *****/
|
||||
Fig_ReqShowFigures ();
|
||||
Fig_ReqShowFigure (SelectedFigureType);
|
||||
|
||||
/***** Show the stat of use selected by user *****/
|
||||
Fig_Function[Gbl.Figures.FigureType] ();
|
||||
Fig_Function[SelectedFigureType] ();
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -1032,6 +1033,7 @@ static void Fig_GetAndShowInstitutionsStats (void)
|
|||
{
|
||||
extern const char *Hlp_ANALYTICS_Figures_institutions;
|
||||
extern const char *Txt_Institutions;
|
||||
struct Fig_Figures Figures;
|
||||
|
||||
/***** Begin box *****/
|
||||
Box_BoxBegin (NULL,Txt_Institutions,
|
||||
|
@ -1040,7 +1042,9 @@ static void Fig_GetAndShowInstitutionsStats (void)
|
|||
|
||||
/***** Form to select type of list used to display degree photos *****/
|
||||
Usr_GetAndUpdatePrefsAboutUsrList ();
|
||||
Usr_ShowFormsToSelectUsrListType (Fig_PutHiddenParamFigures,&Gbl);
|
||||
Figures.Scope = Gbl.Scope.Current;
|
||||
Figures.FigureType = Fig_INSTITS;
|
||||
Usr_ShowFormsToSelectUsrListType (Fig_PutHiddenParamFigures,&Figures);
|
||||
|
||||
/***** Institutions ordered by number of centres *****/
|
||||
Fig_GetAndShowInssOrderedByNumCtrs ();
|
||||
|
|
|
@ -27,6 +27,8 @@
|
|||
/********************************* Headers ***********************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
#include "swad_hierarchy.h"
|
||||
|
||||
/*****************************************************************************/
|
||||
/************************** Public types and constants ***********************/
|
||||
/*****************************************************************************/
|
||||
|
@ -68,13 +70,19 @@ typedef enum
|
|||
|
||||
#define Fig_NUM_STAT_CRS_FILE_ZONES 12
|
||||
|
||||
struct Fig_Figures
|
||||
{
|
||||
Hie_Level_t Scope;
|
||||
Fig_FigureType_t FigureType;
|
||||
};
|
||||
|
||||
/*****************************************************************************/
|
||||
/***************************** Public prototypes *****************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Fig_ReqShowFigures (void);
|
||||
void Fig_PutIconToShowFigure (void);
|
||||
void Fig_PutHiddenParamFigures (void *Args);
|
||||
void Fig_PutIconToShowFigure (Fig_FigureType_t FigureType);
|
||||
void Fig_PutHiddenParamFigures (void *Figures);
|
||||
void Fig_ShowFigures (void);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -3762,10 +3762,7 @@ static void Brw_PutIconsFileBrowser (void *Args)
|
|||
static void Brw_PutIconShowFigure (void *Args)
|
||||
{
|
||||
if (Args)
|
||||
{
|
||||
Gbl.Figures.FigureType = Fig_FOLDERS_AND_FILES;
|
||||
Fig_PutIconToShowFigure ();
|
||||
}
|
||||
Fig_PutIconToShowFigure (Fig_FOLDERS_AND_FILES);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
|
@ -427,8 +427,7 @@ static void Fol_PutIconsWhoToFollow (void *Args)
|
|||
Fol_PutIconToUpdateWhoToFollow ();
|
||||
|
||||
/***** Put icon to show a figure *****/
|
||||
Gbl.Figures.FigureType = Fig_FOLLOW;
|
||||
Fig_PutIconToShowFigure ();
|
||||
Fig_PutIconToShowFigure (Fig_FOLLOW);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1716,11 +1716,8 @@ static void For_ShowForumList (void)
|
|||
static void For_PutIconsForums (void *Args)
|
||||
{
|
||||
if (Args)
|
||||
{
|
||||
/***** Put icon to show a figure *****/
|
||||
Gbl.Figures.FigureType = Fig_FORUMS;
|
||||
Fig_PutIconToShowFigure ();
|
||||
}
|
||||
Fig_PutIconToShowFigure (Fig_FORUMS);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
|
@ -342,8 +342,7 @@ static void Gam_PutIconsListGames (void *Args)
|
|||
}
|
||||
|
||||
/***** Put icon to show a figure *****/
|
||||
Gbl.Figures.FigureType = Fig_GAMES;
|
||||
Fig_PutIconToShowFigure ();
|
||||
Fig_PutIconToShowFigure (Fig_GAMES);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -332,7 +332,6 @@ void Gbl_InitializeGlobals (void)
|
|||
Gbl.Stat.Role = Sta_ROLE_DEFAULT;
|
||||
Gbl.Stat.NumAction = Sta_NUM_ACTION_DEFAULT;
|
||||
Gbl.Stat.RowsPerPage = Sta_DEF_ROWS_PER_PAGE;
|
||||
Gbl.Figures.FigureType = Fig_FIGURE_TYPE_DEF;
|
||||
|
||||
Gbl.Scope.Current = Hie_CRS;
|
||||
|
||||
|
|
|
@ -633,10 +633,6 @@ struct Globals
|
|||
Dat_StartEndTime_t SelectedOrder;
|
||||
unsigned CurrentPage;
|
||||
} Svys;
|
||||
struct
|
||||
{
|
||||
Fig_FigureType_t FigureType;
|
||||
} Figures;
|
||||
struct
|
||||
{
|
||||
Sta_ClicksGroupedBy_t ClicksGroupedBy;
|
||||
|
|
|
@ -150,11 +150,8 @@ void Ico_PutIconsToSelectIconSet (void)
|
|||
static void Ico_PutIconsIconSet (void *Args)
|
||||
{
|
||||
if (Args)
|
||||
{
|
||||
/***** Put icon to show a figure *****/
|
||||
Gbl.Figures.FigureType = Fig_ICON_SETS;
|
||||
Fig_PutIconToShowFigure ();
|
||||
}
|
||||
Fig_PutIconToShowFigure (Fig_ICON_SETS);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
|
@ -358,8 +358,7 @@ static void Ins_PutIconsListingInstitutions (void *Args)
|
|||
Ins_PutIconToEditInstitutions ();
|
||||
|
||||
/***** Put icon to show a figure *****/
|
||||
Gbl.Figures.FigureType = Fig_INSTITS;
|
||||
Fig_PutIconToShowFigure ();
|
||||
Fig_PutIconToShowFigure (Fig_INSTITS);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -595,8 +594,7 @@ static void Ins_PutIconsEditingInstitutions (void *Args)
|
|||
Ins_PutIconToViewInstitutions ();
|
||||
|
||||
/***** Put icon to show a figure *****/
|
||||
Gbl.Figures.FigureType = Fig_INSTITS;
|
||||
Fig_PutIconToShowFigure ();
|
||||
Fig_PutIconToShowFigure (Fig_INSTITS);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -104,11 +104,8 @@ void Lan_PutBoxToSelectLanguage (void)
|
|||
static void Lan_PutIconsLanguage (void *Args)
|
||||
{
|
||||
if (Args)
|
||||
{
|
||||
/***** Put icon to show a figure *****/
|
||||
Gbl.Figures.FigureType = Fig_LANGUAGES;
|
||||
Fig_PutIconToShowFigure ();
|
||||
}
|
||||
Fig_PutIconToShowFigure (Fig_LANGUAGES);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
|
@ -304,11 +304,8 @@ void Mnu_PutIconsToSelectMenu (void)
|
|||
static void Mnu_PutIconsMenu (void *Args)
|
||||
{
|
||||
if (Args)
|
||||
{
|
||||
/***** Put icon to show a figure *****/
|
||||
Gbl.Figures.FigureType = Fig_MENUS;
|
||||
Fig_PutIconToShowFigure ();
|
||||
}
|
||||
Fig_PutIconToShowFigure (Fig_MENUS);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
|
@ -2528,8 +2528,7 @@ static void Msg_PutIconsListMsgs (void *Args)
|
|||
Msg_PutHiddenParamsMsgsFilters,&Gbl);
|
||||
|
||||
/***** Put icon to show a figure *****/
|
||||
Gbl.Figures.FigureType = Fig_MESSAGES;
|
||||
Fig_PutIconToShowFigure ();
|
||||
Fig_PutIconToShowFigure (Fig_MESSAGES);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -367,11 +367,8 @@ void Net_ShowFormMyWebsAndSocialNets (void)
|
|||
static void Net_PutIconsWebsSocialNetworks (void *Args)
|
||||
{
|
||||
if (Args)
|
||||
{
|
||||
/***** Put icon to show a figure *****/
|
||||
Gbl.Figures.FigureType = Fig_SOCIAL_NETWORKS;
|
||||
Fig_PutIconToShowFigure ();
|
||||
}
|
||||
Fig_PutIconToShowFigure (Fig_SOCIAL_NETWORKS);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
|
@ -520,8 +520,7 @@ static void Not_PutIconsListNotices (void *Args)
|
|||
Not_PutIconToAddNewNotice ();
|
||||
|
||||
/***** Put icon to show a figure *****/
|
||||
Gbl.Figures.FigureType = Fig_NOTICES;
|
||||
Fig_PutIconToShowFigure ();
|
||||
Fig_PutIconToShowFigure (Fig_NOTICES);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -618,11 +618,8 @@ void Ntf_ShowMyNotifications (void)
|
|||
static void Ntf_PutIconsNotif (void *Args)
|
||||
{
|
||||
if (Args)
|
||||
{
|
||||
/***** Put icon to show a figure *****/
|
||||
Gbl.Figures.FigureType = Fig_NOTIFY_EVENTS;
|
||||
Fig_PutIconToShowFigure ();
|
||||
}
|
||||
Fig_PutIconToShowFigure (Fig_NOTIFY_EVENTS);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
|
@ -139,11 +139,8 @@ void Pri_EditMyPrivacy (void)
|
|||
static void Pri_PutIconsPrivacy (void *Args)
|
||||
{
|
||||
if (Args)
|
||||
{
|
||||
/***** Put icon to show a figure *****/
|
||||
Gbl.Figures.FigureType = Fig_PRIVACY;
|
||||
Fig_PutIconToShowFigure ();
|
||||
}
|
||||
Fig_PutIconToShowFigure (Fig_PRIVACY);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
|
@ -376,8 +376,7 @@ static void Prg_PutIconsListItems (void *Args)
|
|||
Prg_PutIconToCreateNewItem ();
|
||||
|
||||
/***** Put icon to show a figure *****/
|
||||
Gbl.Figures.FigureType = Fig_COURSE_PROGRAMS;
|
||||
Fig_PutIconToShowFigure ();
|
||||
Fig_PutIconToShowFigure (Fig_COURSE_PROGRAMS);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1021,8 +1021,7 @@ static void Prj_PutIconsListProjects (void *Args)
|
|||
NULL,NULL);
|
||||
|
||||
/***** Put icon to show a figure *****/
|
||||
Gbl.Figures.FigureType = Fig_PROJECTS;
|
||||
Fig_PutIconToShowFigure ();
|
||||
Fig_PutIconToShowFigure (Fig_PROJECTS);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -280,11 +280,8 @@ static void Set_PutIconsToSelectSideCols (void)
|
|||
static void Set_PutIconsSideColumns (void *Args)
|
||||
{
|
||||
if (Args)
|
||||
{
|
||||
/***** Put icon to show a figure *****/
|
||||
Gbl.Figures.FigureType = Fig_SIDE_COLUMNS;
|
||||
Fig_PutIconToShowFigure ();
|
||||
}
|
||||
Fig_PutIconToShowFigure (Fig_SIDE_COLUMNS);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
|
@ -337,8 +337,7 @@ static void Svy_PutIconsListSurveys (void *Args)
|
|||
Svy_PutIconToCreateNewSvy ();
|
||||
|
||||
/***** Put icon to show a figure *****/
|
||||
Gbl.Figures.FigureType = Fig_SURVEYS;
|
||||
Fig_PutIconToShowFigure ();
|
||||
Fig_PutIconToShowFigure (Fig_SURVEYS);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1428,8 +1428,7 @@ static void Tst_PutIconsTests (void *TestPtr)
|
|||
}
|
||||
|
||||
/***** Put icon to show a figure *****/
|
||||
Gbl.Figures.FigureType = Fig_TESTS;
|
||||
Fig_PutIconToShowFigure ();
|
||||
Fig_PutIconToShowFigure (Fig_TESTS);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -350,11 +350,8 @@ void The_PutIconsToSelectTheme (void)
|
|||
static void The_PutIconsTheme (void *Args)
|
||||
{
|
||||
if (Args)
|
||||
{
|
||||
/***** Put icon to show a figure *****/
|
||||
Gbl.Figures.FigureType = Fig_THEMES;
|
||||
Fig_PutIconToShowFigure ();
|
||||
}
|
||||
Fig_PutIconToShowFigure (Fig_THEMES);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
|
@ -1163,11 +1163,8 @@ static void TL_ShowTimeline (char *Query,
|
|||
static void TL_PutIconsTimeline (void *Args)
|
||||
{
|
||||
if (Args)
|
||||
{
|
||||
/***** Put icon to show a figure *****/
|
||||
Gbl.Figures.FigureType = Fig_TIMELINE;
|
||||
Fig_PutIconToShowFigure ();
|
||||
}
|
||||
Fig_PutIconToShowFigure (Fig_TIMELINE);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
|
@ -8783,8 +8783,7 @@ static void Usr_PutIconsListGsts (void *Args)
|
|||
}
|
||||
|
||||
/***** Put icon to show a figure *****/
|
||||
Gbl.Figures.FigureType = Fig_USERS;
|
||||
Fig_PutIconToShowFigure ();
|
||||
Fig_PutIconToShowFigure (Fig_USERS);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -8812,8 +8811,7 @@ static void Usr_PutIconsListStds (void *Args)
|
|||
}
|
||||
|
||||
/***** Put icon to show a figure *****/
|
||||
Gbl.Figures.FigureType = Fig_USERS;
|
||||
Fig_PutIconToShowFigure ();
|
||||
Fig_PutIconToShowFigure (Fig_USERS);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -8841,8 +8839,7 @@ static void Usr_PutIconsListTchs (void *Args)
|
|||
}
|
||||
|
||||
/***** Put icon to show a figure *****/
|
||||
Gbl.Figures.FigureType = Fig_USERS;
|
||||
Fig_PutIconToShowFigure ();
|
||||
Fig_PutIconToShowFigure (Fig_USERS);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue