Version 18.37

This commit is contained in:
Antonio Cañas Vargas 2019-02-12 14:46:14 +01:00
parent aa850dc3f1
commit e730a4f4b1
40 changed files with 5789 additions and 5605 deletions

View File

@ -35,8 +35,8 @@ OBJS = swad_account.o swad_action.o swad_agenda.o swad_alert.o \
swad_database.o swad_date.o swad_degree.o swad_degree_type.o \
swad_department.o swad_duplicate.o \
swad_enrolment.o swad_exam.o \
swad_file.o swad_file_browser.o swad_file_extension.o swad_file_MIME.o \
swad_follow.o swad_form.o swad_forum.o \
swad_figure.o swad_file.o swad_file_browser.o swad_file_extension.o \
swad_file_MIME.o swad_follow.o swad_form.o swad_forum.o \
swad_game.o swad_global.o swad_group.o \
swad_help.o swad_hierarchy.o swad_holiday.o \
swad_icon.o swad_ID.o swad_image.o swad_indicator.o swad_info.o \

View File

@ -46,6 +46,7 @@
#include "swad_duplicate.h"
#include "swad_exam.h"
#include "swad_enrolment.h"
#include "swad_figure.h"
#include "swad_follow.h"
#include "swad_game.h"
#include "swad_global.h"
@ -3089,7 +3090,7 @@ struct Act_Actions Act_Actions[Act_NUM_ACTIONS] =
// TabAna ******************************************************************
// Actions in menu:
/* ActReqUseGbl */{ 761, 0,TabAna,ActReqUseGbl ,0x3F8,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Sta_ReqShowFigures ,"chart-pie" },
/* ActReqUseGbl */{ 761, 0,TabAna,ActReqUseGbl ,0x3F8,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Fig_ReqShowFigures ,"chart-pie" },
/* ActSeePhoDeg */{ 447, 1,TabAna,ActSeePhoDeg ,0x3F8,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Pho_ShowPhotoDegree ,"graduation-cap" },
/* ActReqStaCrs */{ 767, 2,TabAna,ActReqStaCrs ,0x3F8,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Ind_ReqIndicatorsCourses ,"tasks" },
/* ActReqAccGbl */{ 591, 3,TabAna,ActReqAccGbl ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_BRW_1ST_TAB,Sta_SetIniEndDates ,Sta_AskShowGblHits ,"chart-line" },
@ -3097,7 +3098,7 @@ struct Act_Actions Act_Actions[Act_NUM_ACTIONS] =
/* ActMFUAct */{ 993, 5,TabAna,ActMFUAct ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,MFU_ShowMyMFUActions ,"heart" },
// Actions not in menu:
/* ActSeeUseGbl */{ 84,-1,TabUnk,ActReqUseGbl ,0x3F8,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Sta_ShowFigures ,NULL},
/* ActSeeUseGbl */{ 84,-1,TabUnk,ActReqUseGbl ,0x3F8,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Fig_ShowFigures ,NULL},
/* ActPrnPhoDeg */{ 448,-1,TabUnk,ActSeePhoDeg ,0x3F8,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,Act_CONT_NORM,Act_BRW_NEW_TAB,NULL ,Pho_PrintPhotoDegree ,NULL},
/* ActCalPhoDeg */{ 444,-1,TabUnk,ActSeePhoDeg ,0x3F8,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Pho_CalcPhotoDegree ,NULL},
/* ActSeeAccGbl */{ 79,-1,TabUnk,ActReqAccGbl ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Sta_SeeGblAccesses ,NULL},

View File

@ -33,6 +33,7 @@
#include "swad_assignment.h"
#include "swad_box.h"
#include "swad_database.h"
#include "swad_figure.h"
#include "swad_form.h"
#include "swad_global.h"
#include "swad_group.h"
@ -256,8 +257,8 @@ static void Asg_PutIconsListAssignments (void)
Asg_PutIconToCreateNewAsg ();
/***** Put icon to show a figure *****/
Gbl.Stat.FigureType = Sta_ASSIGNMENTS;
Sta_PutIconToShowFigure ();
Gbl.Figures.FigureType = Fig_ASSIGNMENTS;
Fig_PutIconToShowFigure ();
}
/*****************************************************************************/

View File

@ -100,8 +100,8 @@ void Cal_PutIconsToSelectFirstDayOfWeek (void)
static void Cal_PutIconsFirstDayOfWeek (void)
{
/***** Put icon to show a figure *****/
Gbl.Stat.FigureType = Sta_FIRST_DAY_OF_WEEK;
Sta_PutIconToShowFigure ();
Gbl.Figures.FigureType = Fig_FIRST_DAY_OF_WEEK;
Fig_PutIconToShowFigure ();
}
/*****************************************************************************/

View File

@ -854,8 +854,8 @@ static void Ctr_PutIconsListingCentres (void)
Plc_PutIconToViewPlaces ();
/***** Put icon to show a figure *****/
Gbl.Stat.FigureType = Sta_HIERARCHY;
Sta_PutIconToShowFigure ();
Gbl.Figures.FigureType = Fig_HIERARCHY;
Fig_PutIconToShowFigure ();
}
/*****************************************************************************/
@ -1028,8 +1028,8 @@ static void Ctr_PutIconsEditingCentres (void)
Plc_PutIconToViewPlaces ();
/***** Put icon to show a figure *****/
Gbl.Stat.FigureType = Sta_HIERARCHY;
Sta_PutIconToShowFigure ();
Gbl.Figures.FigureType = Fig_HIERARCHY;
Fig_PutIconToShowFigure ();
}
void Ctr_PutIconToViewCentres (void)

View File

@ -380,10 +380,12 @@ En OpenSWAD:
ps2pdf source.ps destination.pdf
*/
#define Log_PLATFORM_VERSION "SWAD 18.35.2 (2019-02-12)"
#define Log_PLATFORM_VERSION "SWAD 18.37 (2019-02-12)"
#define CSS_FILE "swad18.33.css"
#define JS_FILE "swad18.32.1.js"
/*
Version 18.37: Feb 12, 2019 New layout for figure about folders and files. (238913 lines)
Version 18.36: Feb 12, 2019 New module swad_figure for global big figures (stats). (238839 lines)
Version 18.35.2: Feb 12, 2019 Code refactoring in hierarchy stats. (238761 lines)
Version 18.35.1: Feb 12, 2019 Code refactoring in hierarchy stats. (238894 lines)
Version 18.35: Feb 12, 2019 New layout of hierarchy stats. (239132 lines)

View File

@ -87,7 +87,7 @@ void Con_ShowConnectedUsrs (void)
if (Gbl.Usrs.Me.Logged)
{
fprintf (Gbl.F.Out,"<div class=\"CONTEXT_MENU\">");
Con_PutLinkToLastClicks ();
Sta_PutLinkToLastClicks ();
fprintf (Gbl.F.Out,"</div>");
}

View File

@ -765,8 +765,8 @@ static void Cty_PutIconsListingCountries (void)
Cty_PutIconToEditCountries ();
/***** Put icon to show a figure *****/
Gbl.Stat.FigureType = Sta_HIERARCHY;
Sta_PutIconToShowFigure ();
Gbl.Figures.FigureType = Fig_HIERARCHY;
Fig_PutIconToShowFigure ();
}
/*****************************************************************************/
@ -989,8 +989,8 @@ static void Cty_PutIconsEditingCountries (void)
Cty_PutIconToViewCountries ();
/***** Put icon to show a figure *****/
Gbl.Stat.FigureType = Sta_HIERARCHY;
Sta_PutIconToShowFigure ();
Gbl.Figures.FigureType = Fig_HIERARCHY;
Fig_PutIconToShowFigure ();
}
/*****************************************************************************/

View File

@ -1199,8 +1199,8 @@ static void Crs_PutIconsListCourses (void)
Crs_PutIconToEditCourses ();
/***** Put icon to show a figure *****/
Gbl.Stat.FigureType = Sta_HIERARCHY;
Sta_PutIconToShowFigure ();
Gbl.Figures.FigureType = Fig_HIERARCHY;
Fig_PutIconToShowFigure ();
}
/*****************************************************************************/
@ -1376,8 +1376,8 @@ static void Crs_PutIconsEditingCourses (void)
Crs_PutIconToViewCourses ();
/***** Put icon to show a figure *****/
Gbl.Stat.FigureType = Sta_HIERARCHY;
Sta_PutIconToShowFigure ();
Gbl.Figures.FigureType = Fig_HIERARCHY;
Fig_PutIconToShowFigure ();
}
/*****************************************************************************/

View File

@ -150,8 +150,8 @@ void Dat_PutBoxToSelectDateFormat (void)
static void Dat_PutIconsDateFormat (void)
{
/***** Put icon to show a figure *****/
Gbl.Stat.FigureType = Sta_DATE_FORMAT;
Sta_PutIconToShowFigure ();
Gbl.Figures.FigureType = Fig_DATE_FORMAT;
Fig_PutIconToShowFigure ();
}
/*****************************************************************************/

View File

@ -1240,8 +1240,8 @@ static void Deg_PutIconsListingDegrees (void)
DT_PutIconToViewDegreeTypes ();
/***** Put icon to show a figure *****/
Gbl.Stat.FigureType = Sta_HIERARCHY;
Sta_PutIconToShowFigure ();
Gbl.Figures.FigureType = Fig_HIERARCHY;
Fig_PutIconToShowFigure ();
}
/*****************************************************************************/
@ -1406,8 +1406,8 @@ static void Deg_PutIconsEditingDegrees (void)
DT_PutIconToViewDegreeTypes ();
/***** Put icon to show a figure *****/
Gbl.Stat.FigureType = Sta_HIERARCHY;
Sta_PutIconToShowFigure ();
Gbl.Figures.FigureType = Fig_HIERARCHY;
Fig_PutIconToShowFigure ();
}
/*****************************************************************************/

View File

@ -276,8 +276,8 @@ static void DT_PutIconsEditingDegreeTypes (void)
Deg_PutIconToViewDegrees ();
/***** Put icon to show a figure *****/
Gbl.Stat.FigureType = Sta_DEGREE_TYPES;
Sta_PutIconToShowFigure ();
Gbl.Figures.FigureType = Fig_DEGREE_TYPES;
Fig_PutIconToShowFigure ();
}
/*****************************************************************************/
@ -348,8 +348,8 @@ static void DT_PutIconsListingDegTypes (void)
Deg_PutIconToViewDegrees ();
/***** Put icon to show a figure *****/
Gbl.Stat.FigureType = Sta_DEGREE_TYPES;
Sta_PutIconToShowFigure ();
Gbl.Figures.FigureType = Fig_DEGREE_TYPES;
Fig_PutIconToShowFigure ();
}
/*****************************************************************************/
@ -507,7 +507,7 @@ static void DT_PutHeadDegreeTypesForSeeing (Act_Action_t NextAction,DT_Order_t S
/* Start form to change order */
Frm_StartForm (NextAction);
if (NextAction == ActSeeUseGbl)
Sta_PutHiddenParamFigures ();
Fig_PutHiddenParamFigures ();
Par_PutHiddenParamUnsigned ("Order",(unsigned) Order);
/* Link with the head of this column */

5552
swad_figure.c Normal file

File diff suppressed because it is too large Load Diff

80
swad_figure.h Normal file
View File

@ -0,0 +1,80 @@
// swad_figure.h: figures (global stats)
#ifndef _SWAD_FIG
#define _SWAD_FIG
/*
SWAD (Shared Workspace At a Distance in Spanish),
is a web platform developed at the University of Granada (Spain),
and used to support university teaching.
This file is part of SWAD core.
Copyright (C) 1999-2019 Antonio Cañas Vargas
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/*****************************************************************************/
/********************************* Headers ***********************************/
/*****************************************************************************/
// #include "swad_user.h"
/*****************************************************************************/
/************************** Public types and constants ***********************/
/*****************************************************************************/
#define Fig_NUM_FIGURES 27
typedef enum
{
Fig_USERS, // Number of users
Fig_USERS_RANKING, // Users' ranking
Fig_HIERARCHY, // Number of countries, institutions, centres, degrees and courses
Fig_INSTITS, // Number of users in each institution
Fig_DEGREE_TYPES, // Number of degrees in each type of degree
Fig_FOLDERS_AND_FILES, // Number of folders and files
Fig_OER, // Number of OERs (Open Educational Resources)
Fig_ASSIGNMENTS, // Number of assignments
Fig_PROJECTS, // Number of projects
Fig_TESTS, // Number of test questions
Fig_GAMES, // Number of games
Fig_SURVEYS, // Number of surveys
Fig_SOCIAL_ACTIVITY, // Number of social notes
Fig_FOLLOW, // Number of following and followers
Fig_FORUMS, // Number of forums, threads and posts
Fig_NOTIFY_EVENTS, // Number of users per notify event
Fig_NOTICES, // Number of notices
Fig_MESSAGES, // Number of users' (sent and received) messages
Fig_SOCIAL_NETWORKS, // Number of users in social networks
Fig_LANGUAGES, // Number of users per language
Fig_FIRST_DAY_OF_WEEK, // Number of users per first day of week
Fig_DATE_FORMAT, // Number of users per date format
Fig_ICON_SETS, // Number of users per icon set
Fig_MENUS, // Number of users per menu
Fig_THEMES, // Number of users per theme
Fig_SIDE_COLUMNS, // Number of users per layout of columns
Fig_PRIVACY, // Number of users per privacity
} Fig_FigureType_t;
#define Fig_FIGURE_TYPE_DEF Fig_USERS
#define Fig_NUM_STAT_CRS_FILE_ZONES 12
/*****************************************************************************/
/***************************** Public prototypes *****************************/
/*****************************************************************************/
void Fig_ReqShowFigures (void);
void Fig_PutIconToShowFigure (void);
void Fig_PutHiddenParamFigures (void);
void Fig_ShowFigures (void);
#endif

View File

@ -3791,8 +3791,8 @@ static void Brw_PutIconsFileBrowser (void)
static void Brw_PutIconShowFigure (void)
{
Gbl.Stat.FigureType = Sta_FOLDERS_AND_FILES;
Sta_PutIconToShowFigure ();
Gbl.Figures.FigureType = Fig_FOLDERS_AND_FILES;
Fig_PutIconToShowFigure ();
}
/*****************************************************************************/

View File

@ -415,8 +415,8 @@ static void Fol_PutIconsWhoToFollow (void)
Fol_PutIconToUpdateWhoToFollow ();
/***** Put icon to show a figure *****/
Gbl.Stat.FigureType = Sta_FOLLOW;
Sta_PutIconToShowFigure ();
Gbl.Figures.FigureType = Fig_FOLLOW;
Fig_PutIconToShowFigure ();
}
/*****************************************************************************/

View File

@ -1741,8 +1741,8 @@ static void For_ShowForumList (void)
static void For_PutIconsForums (void)
{
/***** Put icon to show a figure *****/
Gbl.Stat.FigureType = Sta_FORUMS;
Sta_PutIconToShowFigure ();
Gbl.Figures.FigureType = Fig_FORUMS;
Fig_PutIconToShowFigure ();
}
/*****************************************************************************/

View File

@ -331,8 +331,8 @@ static void Gam_PutIconsListGames (void)
Gam_PutIconToCreateNewGame ();
/***** Put icon to show a figure *****/
Gbl.Stat.FigureType = Sta_GAMES;
Sta_PutIconToShowFigure ();
Gbl.Figures.FigureType = Fig_GAMES;
Fig_PutIconToShowFigure ();
}
/*****************************************************************************/

View File

@ -410,7 +410,7 @@ 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.Stat.FigureType = Sta_FIGURE_TYPE_DEF;
Gbl.Figures.FigureType = Fig_FIGURE_TYPE_DEF;
Gbl.Scope.Current = Sco_SCOPE_CRS;

View File

@ -48,6 +48,7 @@
#include "swad_degree_type.h"
#include "swad_enrolment.h"
#include "swad_exam.h"
#include "swad_figure.h"
#include "swad_file.h"
#include "swad_file_browser.h"
#include "swad_forum.h"
@ -752,10 +753,13 @@ struct Globals
long SvyQstCodToEdit; // Used as parameter in contextual links
unsigned CurrentPage;
} Svys;
struct
{
Fig_FigureType_t FigureType;
} Figures;
struct
{
Sta_ClicksGroupedBy_t ClicksGroupedBy;
Sta_FigureType_t FigureType;
Sta_Role_t Role;
Sta_CountType_t CountType;
Act_Action_t NumAction;

View File

@ -148,8 +148,8 @@ void Ico_PutIconsToSelectIconSet (void)
static void Ico_PutIconsIconSet (void)
{
/***** Put icon to show a figure *****/
Gbl.Stat.FigureType = Sta_ICON_SETS;
Sta_PutIconToShowFigure ();
Gbl.Figures.FigureType = Fig_ICON_SETS;
Fig_PutIconToShowFigure ();
}
/*****************************************************************************/

View File

@ -742,8 +742,8 @@ static void Ins_PutIconsListingInstitutions (void)
Ins_PutIconToEditInstitutions ();
/***** Put icon to show a figure *****/
Gbl.Stat.FigureType = Sta_INSTITS;
Sta_PutIconToShowFigure ();
Gbl.Figures.FigureType = Fig_INSTITS;
Fig_PutIconToShowFigure ();
}
/*****************************************************************************/
@ -970,8 +970,8 @@ static void Ins_PutIconsEditingInstitutions (void)
Ins_PutIconToViewInstitutions ();
/***** Put icon to show a figure *****/
Gbl.Stat.FigureType = Sta_INSTITS;
Sta_PutIconToShowFigure ();
Gbl.Figures.FigureType = Fig_INSTITS;
Fig_PutIconToShowFigure ();
}
/*****************************************************************************/

View File

@ -104,8 +104,8 @@ void Lan_PutBoxToSelectLanguage (void)
static void Lan_PutIconsLanguage (void)
{
/***** Put icon to show a figure *****/
Gbl.Stat.FigureType = Sta_LANGUAGES;
Sta_PutIconToShowFigure ();
Gbl.Figures.FigureType = Fig_LANGUAGES;
Fig_PutIconToShowFigure ();
}
/*****************************************************************************/

View File

@ -441,8 +441,8 @@ void Mnu_PutIconsToSelectMenu (void)
static void Mnu_PutIconsMenu (void)
{
/***** Put icon to show a figure *****/
Gbl.Stat.FigureType = Sta_MENUS;
Sta_PutIconToShowFigure ();
Gbl.Figures.FigureType = Fig_MENUS;
Fig_PutIconToShowFigure ();
}
/*****************************************************************************/

View File

@ -2497,8 +2497,8 @@ static void Msg_PutIconsListMsgs (void)
Msg_PutHiddenParamsMsgsFilters);
/***** Put icon to show a figure *****/
Gbl.Stat.FigureType = Sta_MESSAGES;
Sta_PutIconToShowFigure ();
Gbl.Figures.FigureType = Fig_MESSAGES;
Fig_PutIconToShowFigure ();
}
/*****************************************************************************/

View File

@ -364,8 +364,8 @@ void Net_ShowFormMyWebsAndSocialNets (void)
static void Net_PutIconsWebsSocialNetworks (void)
{
/***** Put icon to show a figure *****/
Gbl.Stat.FigureType = Sta_SOCIAL_NETWORKS;
Sta_PutIconToShowFigure ();
Gbl.Figures.FigureType = Fig_SOCIAL_NETWORKS;
Fig_PutIconToShowFigure ();
}
/*****************************************************************************/
@ -424,7 +424,7 @@ static void Net_GetMyWebsAndSocialNetsFromForm (void)
void Net_ShowWebAndSocialNetworksStats (void)
{
extern const char *Hlp_ANALYTICS_Figures_webs_social_networks;
extern const char *Txt_STAT_USE_STAT_TYPES[Sta_NUM_FIGURES];
extern const char *Txt_FIGURE_TYPES[Fig_NUM_FIGURES];
extern const char *Txt_Web_social_network;
extern const char *Txt_No_of_users;
extern const char *Txt_PERCENT_of_users;
@ -537,7 +537,7 @@ void Net_ShowWebAndSocialNetworksStats (void)
}
/***** Start box and table *****/
Box_StartBoxTable (NULL,Txt_STAT_USE_STAT_TYPES[Sta_SOCIAL_NETWORKS],NULL,
Box_StartBoxTable (NULL,Txt_FIGURE_TYPES[Fig_SOCIAL_NETWORKS],NULL,
Hlp_ANALYTICS_Figures_webs_social_networks,Box_NOT_CLOSABLE,2);
/***** Write heading *****/

View File

@ -509,8 +509,8 @@ static void Not_PutIconsListNotices (void)
Not_PutIconToAddNewNotice ();
/***** Put icon to show a figure *****/
Gbl.Stat.FigureType = Sta_NOTICES;
Sta_PutIconToShowFigure ();
Gbl.Figures.FigureType = Fig_NOTICES;
Fig_PutIconToShowFigure ();
}
/*****************************************************************************/

View File

@ -647,8 +647,8 @@ void Ntf_ShowMyNotifications (void)
static void Ntf_PutIconsNotif (void)
{
/***** Put icon to show a figure *****/
Gbl.Stat.FigureType = Sta_NOTIFY_EVENTS;
Sta_PutIconToShowFigure ();
Gbl.Figures.FigureType = Fig_NOTIFY_EVENTS;
Fig_PutIconToShowFigure ();
}
/*****************************************************************************/

View File

@ -264,8 +264,8 @@ static void Pre_PutIconsToSelectSideCols (void)
static void Pre_PutIconsSideColumns (void)
{
/***** Put icon to show a figure *****/
Gbl.Stat.FigureType = Sta_SIDE_COLUMNS;
Sta_PutIconToShowFigure ();
Gbl.Figures.FigureType = Fig_SIDE_COLUMNS;
Fig_PutIconToShowFigure ();
}
/*****************************************************************************/

View File

@ -135,8 +135,8 @@ void Pri_EditMyPrivacy (void)
static void Pri_PutIconsPrivacy (void)
{
/***** Put icon to show a figure *****/
Gbl.Stat.FigureType = Sta_PRIVACY;
Sta_PutIconToShowFigure ();
Gbl.Figures.FigureType = Fig_PRIVACY;
Fig_PutIconToShowFigure ();
}
/*****************************************************************************/

View File

@ -759,7 +759,7 @@ static void Prf_ShowRanking (unsigned long Rank,unsigned long NumUsrs)
/***** Rank in form to go to ranking *****/
Frm_StartForm (ActSeeUseGbl);
Sco_PutParamScope ("ScopeSta",Sco_SCOPE_SYS);
Par_PutHiddenParamUnsigned ("FigureType",(unsigned) Sta_USERS_RANKING);
Par_PutHiddenParamUnsigned ("FigureType",(unsigned) Fig_USERS_RANKING);
Frm_LinkFormSubmit (Gbl.Title,The_ClassForm[Gbl.Prefs.Theme],NULL);
fprintf (Gbl.F.Out,"#%lu</a>",Rank);
Frm_EndForm ();

View File

@ -793,8 +793,8 @@ static void Prj_PutIconsListProjects (void)
Prj_PutIconToShowAllData ();
/***** Put icon to show a figure *****/
Gbl.Stat.FigureType = Sta_PROJECTS;
Sta_PutIconToShowFigure ();
Gbl.Figures.FigureType = Fig_PROJECTS;
Fig_PutIconToShowFigure ();
}
/*****************************************************************************/

View File

@ -1011,8 +1011,8 @@ static void Soc_ShowTimeline (char *Query,
static void Soc_PutIconsTimeline (void)
{
/***** Put icon to show a figure *****/
Gbl.Stat.FigureType = Sta_SOCIAL_ACTIVITY;
Sta_PutIconToShowFigure ();
Gbl.Figures.FigureType = Fig_SOCIAL_ACTIVITY;
Fig_PutIconToShowFigure ();
}
/*****************************************************************************/

File diff suppressed because it is too large Load Diff

View File

@ -106,39 +106,6 @@ typedef enum
} Sta_ClicksGroupedBy_t;
#define Sta_CLICKS_GROUPED_BY_DEFAULT Sta_CLICKS_CRS_PER_USR
#define Sta_NUM_FIGURES 27
typedef enum
{
Sta_USERS, // Number of users
Sta_USERS_RANKING, // Users' ranking
Sta_HIERARCHY, // Number of countries, institutions, centres, degrees and courses
Sta_INSTITS, // Number of users in each institution
Sta_DEGREE_TYPES, // Number of degrees in each type of degree
Sta_FOLDERS_AND_FILES, // Number of folders and files
Sta_OER, // Number of OERs (Open Educational Resources)
Sta_ASSIGNMENTS, // Number of assignments
Sta_PROJECTS, // Number of projects
Sta_TESTS, // Number of test questions
Sta_GAMES, // Number of games
Sta_SURVEYS, // Number of surveys
Sta_SOCIAL_ACTIVITY, // Number of social notes
Sta_FOLLOW, // Number of following and followers
Sta_FORUMS, // Number of forums, threads and posts
Sta_NOTIFY_EVENTS, // Number of users per notify event
Sta_NOTICES, // Number of notices
Sta_MESSAGES, // Number of users' (sent and received) messages
Sta_SOCIAL_NETWORKS, // Number of users in social networks
Sta_LANGUAGES, // Number of users per language
Sta_FIRST_DAY_OF_WEEK, // Number of users per first day of week
Sta_DATE_FORMAT, // Number of users per date format
Sta_ICON_SETS, // Number of users per icon set
Sta_MENUS, // Number of users per menu
Sta_THEMES, // Number of users per theme
Sta_SIDE_COLUMNS, // Number of users per layout of columns
Sta_PRIVACY, // Number of users per privacity
} Sta_FigureType_t;
#define Sta_FIGURE_TYPE_DEF Sta_USERS
#define Sta_MIN_ROWS_PER_PAGE 10
#define Sta_MAX_ROWS_PER_PAGE (Sta_MIN_ROWS_PER_PAGE * 10000)
#define Sta_DEF_ROWS_PER_PAGE (Sta_MIN_ROWS_PER_PAGE * 5)
@ -152,8 +119,6 @@ typedef enum
} Sta_ColorType_t;
#define Sta_COLOR_TYPE_DEF Sta_COLOR
#define Sta_NUM_STAT_CRS_FILE_ZONES 11
struct Sta_Hits
{
float Num;
@ -179,17 +144,12 @@ void Sta_ComputeMaxAndTotalHits (struct Sta_Hits *Hits,
MYSQL_RES *mysql_res,unsigned Field,
unsigned Divisor);
void Sta_ReqShowFigures (void);
void Sta_PutIconToShowFigure (void);
void Sta_PutHiddenParamFigures (void);
void Sta_ShowFigures (void);
void Sta_ComputeTimeToGeneratePage (void);
void Sta_ComputeTimeToSendPage (void);
void Sta_WriteTimeToGenerateAndSendPage (void);
void Sta_WriteTime (char Str[Dat_MAX_BYTES_TIME],long TimeInMicroseconds);
void Con_PutLinkToLastClicks (void);
void Sta_PutLinkToLastClicks (void);
void Sta_ShowLastClicks (void);
void Sta_GetAndShowLastClicks (void);

View File

@ -333,8 +333,8 @@ static void Svy_PutIconsListSurveys (void)
Svy_PutIconToCreateNewSvy ();
/***** Put icon to show a figure *****/
Gbl.Stat.FigureType = Sta_SURVEYS;
Sta_PutIconToShowFigure ();
Gbl.Figures.FigureType = Fig_SURVEYS;
Fig_PutIconToShowFigure ();
}
/*****************************************************************************/

View File

@ -1448,8 +1448,8 @@ static void Tst_PutIconsTests (void)
}
/***** Put icon to show a figure *****/
Gbl.Stat.FigureType = Sta_TESTS;
Sta_PutIconToShowFigure ();
Gbl.Figures.FigureType = Fig_TESTS;
Fig_PutIconToShowFigure ();
}
/*****************************************************************************/

View File

@ -67,6 +67,7 @@
#include "swad_degree.h"
#include "swad_degree_type.h"
#include "swad_department.h"
#include "swad_figure.h"
#include "swad_file_browser.h"
#include "swad_forum.h"
#include "swad_holiday.h"
@ -6605,27 +6606,6 @@ const char *Txt_Creating_database_tables_if_they_do_not_exist =
"Criando tabelas da base de dados, se elas n&atilde;o existirem&hellip;";
#endif
const char *Txt_crs = // Abbreviation of "course" (three characters + dot)
#if L==1 // ca
"asg."; // Necessita traduccio
#elif L==2 // de
"Ver.";
#elif L==3 // en
"crs.";
#elif L==4 // es
"asg.";
#elif L==5 // fr
"mat.";
#elif L==6 // gn
"mbo'esyry";
#elif L==7 // it
"crs.";
#elif L==8 // pl
"Oczywiscie.";
#elif L==9 // pt
"crs.";
#endif
const char *Txt_Current_email =
#if L==1 // ca
"Correu actual";
@ -40346,7 +40326,7 @@ const char *Txt_STAT_COLOR_TYPES[Sta_NUM_COLOR_TYPES] =
#endif
};
const char *Txt_STAT_COURSE_FILE_ZONES[Sta_NUM_STAT_CRS_FILE_ZONES] = // Use &nbsp; instead of space
const char *Txt_STAT_COURSE_FILE_ZONES[Fig_NUM_STAT_CRS_FILE_ZONES] = // Use &nbsp; instead of space
{
#if L==1 // ca // Brw_ADMI_DOC_CRS
"Documents&nbsp;(ass.)"
@ -40566,6 +40546,26 @@ const char *Txt_STAT_COURSE_FILE_ZONES[Sta_NUM_STAT_CRS_FILE_ZONES] = // Use &nb
"Ca&lstrok;kowity"
#elif L==9 // pt
"Total"
#endif
,
#if L==1 // ca // Brw_ADMI_BRF_USR
"Maletins"
#elif L==2 // de
"Aktentasche"
#elif L==3 // en
"Briefcases"
#elif L==4 // es
"Maletines"
#elif L==5 // fr
"Porte-documents"
#elif L==6 // gn
"Maletines" // Okoteve traducción
#elif L==7 // it
"Penna USB"
#elif L==8 // pl
"Briefcases" // Potrzebujesz tlumaczenie
#elif L==9 // pt
"Pasta"
#endif
};
@ -40941,9 +40941,9 @@ const char *Txt_STAT_TYPE_COUNT_SMALL[Sta_NUM_COUNT_TYPES] =
#endif
};
const char *Txt_STAT_USE_STAT_TYPES[Sta_NUM_FIGURES] =
const char *Txt_FIGURE_TYPES[Fig_NUM_FIGURES] =
{
#if L==1 // ca // Sta_USERS
#if L==1 // ca // Fig_USERS
"Usuaris"
#elif L==2 // de
"Benutzer"
@ -40963,7 +40963,7 @@ const char *Txt_STAT_USE_STAT_TYPES[Sta_NUM_FIGURES] =
"Utilizadores"
#endif
,
#if L==1 // ca // Sta_USERS_RANKING
#if L==1 // ca // Fig_USERS_RANKING
"R&agrave;nquing"
#elif L==2 // de
"Rang"
@ -40983,7 +40983,7 @@ const char *Txt_STAT_USE_STAT_TYPES[Sta_NUM_FIGURES] =
"Posi&ccedil;&atilde;o"
#endif
,
#if L==1 // ca // Sta_HIERARCHY
#if L==1 // ca // Fig_HIERARCHY
"Jerarquia"
#elif L==2 // de
"Hierarchie"
@ -41003,7 +41003,7 @@ const char *Txt_STAT_USE_STAT_TYPES[Sta_NUM_FIGURES] =
"Hierarquia"
#endif
,
#if L==1 // ca // Sta_INSTITS
#if L==1 // ca // Fig_INSTITS
"Institucions"
#elif L==2 // de
"Hochschulen"
@ -41023,7 +41023,7 @@ const char *Txt_STAT_USE_STAT_TYPES[Sta_NUM_FIGURES] =
"Institu&ccedil;&otilde;es"
#endif
,
#if L==1 // ca // Sta_DEGREE_TYPES
#if L==1 // ca // Fig_DEGREE_TYPES
"Tipus de titulaci&oacute;"
#elif L==2 // de
"Abschlussart"
@ -41043,7 +41043,7 @@ const char *Txt_STAT_USE_STAT_TYPES[Sta_NUM_FIGURES] =
"Tipos de grau"
#endif
,
#if L==1 // ca // Sta_FOLDERS_AND_FILES
#if L==1 // ca // Fig_FOLDERS_AND_FILES
"Carpetes i fitxers"
#elif L==2 // de
"Verzeichnisse und Dateien"
@ -41063,7 +41063,7 @@ const char *Txt_STAT_USE_STAT_TYPES[Sta_NUM_FIGURES] =
"Diret&oacute;rios e arquivos"
#endif
,
#if L==1 // ca // Sta_OER
#if L==1 // ca // Fig_OER
"Recursos Educatius Oberts (OER)"
#elif L==2 // de
"Open Educational Resources (OER)"
@ -41083,7 +41083,7 @@ const char *Txt_STAT_USE_STAT_TYPES[Sta_NUM_FIGURES] =
"Recursos Educacionais Abertos (OER)"
#endif
,
#if L==1 // ca // Sta_ASSIGNMENTS
#if L==1 // ca // Fig_ASSIGNMENTS
"Activitats"
#elif L==2 // de
"Aufgaben"
@ -41103,7 +41103,7 @@ const char *Txt_STAT_USE_STAT_TYPES[Sta_NUM_FIGURES] =
"Atividades"
#endif
,
#if L==1 // ca // Sta_PROJECTS
#if L==1 // ca // Fig_PROJECTS
"Projectes"
#elif L==2 // de
"Projekte"
@ -41123,7 +41123,7 @@ const char *Txt_STAT_USE_STAT_TYPES[Sta_NUM_FIGURES] =
"Projetos"
#endif
,
#if L==1 // ca // Sta_TESTS
#if L==1 // ca // Fig_TESTS
"Tests"
#elif L==2 // de
"Tests"
@ -41143,7 +41143,7 @@ const char *Txt_STAT_USE_STAT_TYPES[Sta_NUM_FIGURES] =
"Testes"
#endif
,
#if L==1 // ca // Sta_GAMES
#if L==1 // ca // Fig_GAMES
"Jocs"
#elif L==2 // de
"Spiele"
@ -41163,7 +41163,7 @@ const char *Txt_STAT_USE_STAT_TYPES[Sta_NUM_FIGURES] =
"Jogos"
#endif
,
#if L==1 // ca // Sta_SURVEYS
#if L==1 // ca // Fig_SURVEYS
"Enquestes"
#elif L==2 // de
"Umfragen"
@ -41183,7 +41183,7 @@ const char *Txt_STAT_USE_STAT_TYPES[Sta_NUM_FIGURES] =
"Inqu&eacute;ritos"
#endif
,
#if L==1 // ca // Sta_SOCIAL_ACTIVITY
#if L==1 // ca // Fig_SOCIAL_ACTIVITY
"Timeline"
#elif L==2 // de
"Timeline"
@ -41203,7 +41203,7 @@ const char *Txt_STAT_USE_STAT_TYPES[Sta_NUM_FIGURES] =
"Timeline"
#endif
,
#if L==1 // ca // Sta_FOLLOW
#if L==1 // ca // Fig_FOLLOW
"Seguits / Seguidors"
#elif L==2 // de
"Gefolgt / Anh&auml;nger"
@ -41223,7 +41223,7 @@ const char *Txt_STAT_USE_STAT_TYPES[Sta_NUM_FIGURES] =
"Seguidos / Seguidores"
#endif
,
#if L==1 // ca // Sta_FORUMS
#if L==1 // ca // Fig_FORUMS
"F&ograve;rums"
#elif L==2 // de
"Foren"
@ -41243,7 +41243,7 @@ const char *Txt_STAT_USE_STAT_TYPES[Sta_NUM_FIGURES] =
"F&oacute;runs"
#endif
,
#if L==1 // ca // Sta_NOTIFY_EVENTS
#if L==1 // ca // Fig_NOTIFY_EVENTS
"Notificacions enviades per correu"
#elif L==2 // de
"Anmeldungen per E-Mail gesendet"
@ -41263,7 +41263,7 @@ const char *Txt_STAT_USE_STAT_TYPES[Sta_NUM_FIGURES] =
"Notifica&ccedil;&otilde;es enviadas por email"
#endif
,
#if L==1 // ca // Sta_NOTICES
#if L==1 // ca // Fig_NOTICES
"Avisos"
#elif L==2 // de
"Ank&uuml;ndigungen"
@ -41283,7 +41283,7 @@ const char *Txt_STAT_USE_STAT_TYPES[Sta_NUM_FIGURES] =
"Avisos"
#endif
,
#if L==1 // ca // Sta_MESSAGES
#if L==1 // ca // Fig_MESSAGES
"Missatges"
#elif L==2 // de
"Nachrichten"
@ -41303,7 +41303,7 @@ const char *Txt_STAT_USE_STAT_TYPES[Sta_NUM_FIGURES] =
"Mensagens"
#endif
,
#if L==1 // ca // Sta_SOCIAL_NETWORKS
#if L==1 // ca // Fig_SOCIAL_NETWORKS
"Webs / xarxes socials"
#elif L==2 // de
"Webs / Social Networks"
@ -41323,7 +41323,7 @@ const char *Txt_STAT_USE_STAT_TYPES[Sta_NUM_FIGURES] =
"Webs / redes sociais"
#endif
,
#if L==1 // ca // Sta_LANGUAGES
#if L==1 // ca // Fig_LANGUAGES
"Idioma"
#elif L==2 // de
"Sprache"
@ -41343,7 +41343,7 @@ const char *Txt_STAT_USE_STAT_TYPES[Sta_NUM_FIGURES] =
"Lingua"
#endif
,
#if L==1 // ca // Sta_FIRST_DAY_OF_WEEK
#if L==1 // ca // Fig_FIRST_DAY_OF_WEEK
"Calendari"
#elif L==2 // de
"Kalender"
@ -41363,7 +41363,7 @@ const char *Txt_STAT_USE_STAT_TYPES[Sta_NUM_FIGURES] =
"Calend&aacute;rio"
#endif
,
#if L==1 // ca // Sta_DATE_FORMAT
#if L==1 // ca // Fig_DATE_FORMAT
"Dates"
#elif L==2 // de
"Datum"
@ -41383,7 +41383,7 @@ const char *Txt_STAT_USE_STAT_TYPES[Sta_NUM_FIGURES] =
"Datas"
#endif
,
#if L==1 // ca // Sta_ICON_SETS
#if L==1 // ca // Fig_ICON_SETS
"Icones"
#elif L==2 // de
"Symbole"
@ -41403,7 +41403,7 @@ const char *Txt_STAT_USE_STAT_TYPES[Sta_NUM_FIGURES] =
"&Iacute;cones"
#endif
,
#if L==1 // ca // Sta_MENUS
#if L==1 // ca // Fig_MENUS
"Men&uacute;"
#elif L==2 // de
"Men&uuml;"
@ -41423,7 +41423,7 @@ const char *Txt_STAT_USE_STAT_TYPES[Sta_NUM_FIGURES] =
"Menu"
#endif
,
#if L==1 // ca // Sta_THEMES
#if L==1 // ca // Fig_THEMES
"Tema (colors)"
#elif L==2 // de
"Skin"
@ -41443,7 +41443,7 @@ const char *Txt_STAT_USE_STAT_TYPES[Sta_NUM_FIGURES] =
"Skin"
#endif
,
#if L==1 // ca // Sta_SIDE_COLUMNS
#if L==1 // ca // Fig_SIDE_COLUMNS
"Columnes"
#elif L==2 // de
"Spalten"
@ -41463,7 +41463,7 @@ const char *Txt_STAT_USE_STAT_TYPES[Sta_NUM_FIGURES] =
"Colunas"
#endif
,
#if L==1 // ca // Sta_PRIVACY
#if L==1 // ca // Fig_PRIVACY
"Privacitat"
#elif L==2 // de
"Geheimhaltung"
@ -52143,27 +52143,6 @@ const char *Txt_users_with_no_group =
"utilizadores com nenhum grupo";
#endif
const char *Txt_usr = // Abbreviation of user (three characters + dot)
#if L==1 // ca
"usr."; // Necessita traduccio
#elif L==2 // de
"Ben.";
#elif L==3 // en
"usr.";
#elif L==4 // es
"usr.";
#elif L==5 // fr
"uti.";
#elif L==6 // gn
"usr."; // Okoteve traducción
#elif L==7 // it
"ute.";
#elif L==8 // pl
"usr."; // Potrzebujesz tlumaczenie
#elif L==9 // pt
"uti.";
#endif
const char *Txt_USR_LIST_TYPES[Usr_NUM_USR_LIST_TYPES] =
{
"" // Usr_LIST_UNKNOWN

View File

@ -258,8 +258,8 @@ void The_PutIconsToSelectTheme (void)
static void The_PutIconsTheme (void)
{
/***** Put icon to show a figure *****/
Gbl.Stat.FigureType = Sta_THEMES;
Sta_PutIconToShowFigure ();
Gbl.Figures.FigureType = Fig_THEMES;
Fig_PutIconToShowFigure ();
}
/*****************************************************************************/

View File

@ -6008,7 +6008,7 @@ void Usr_PutExtraParamsUsrList (Act_Action_t NextAction)
case ActSeeUseGbl:
/* Used in selector of "Class photo"/"List"
in STATS > Figures > Institutions */
Sta_PutHiddenParamFigures ();
Fig_PutHiddenParamFigures ();
break;
case ActSeePhoDeg:
Pho_PutHiddenParamTypeOfAvg ();
@ -8024,8 +8024,8 @@ static void Usr_PutIconsListGsts (void)
}
/***** Put icon to show a figure *****/
Gbl.Stat.FigureType = Sta_USERS;
Sta_PutIconToShowFigure ();
Gbl.Figures.FigureType = Fig_USERS;
Fig_PutIconToShowFigure ();
}
/*****************************************************************************/
@ -8050,8 +8050,8 @@ static void Usr_PutIconsListStds (void)
}
/***** Put icon to show a figure *****/
Gbl.Stat.FigureType = Sta_USERS;
Sta_PutIconToShowFigure ();
Gbl.Figures.FigureType = Fig_USERS;
Fig_PutIconToShowFigure ();
}
/*****************************************************************************/
@ -8076,8 +8076,8 @@ static void Usr_PutIconsListTchs (void)
}
/***** Put icon to show a figure *****/
Gbl.Stat.FigureType = Sta_USERS;
Sta_PutIconToShowFigure ();
Gbl.Figures.FigureType = Fig_USERS;
Fig_PutIconToShowFigure ();
}
/*****************************************************************************/