mirror of https://github.com/acanas/swad-core.git
Version 23.67.3: Mar 09, 2024 Changes in global hits.
This commit is contained in:
parent
cfae1a689d
commit
fdd2d2b550
|
@ -187,7 +187,6 @@ void MFU_WriteBigMFUActions (struct MFU_ListMFUActions *ListMFUActions)
|
||||||
{
|
{
|
||||||
extern const char *Hlp_ANALYTICS_Frequent;
|
extern const char *Hlp_ANALYTICS_Frequent;
|
||||||
extern const char *Txt_My_frequent_actions;
|
extern const char *Txt_My_frequent_actions;
|
||||||
extern const char *Txt_TABS_TXT[Tab_NUM_TABS];
|
|
||||||
unsigned NumAct;
|
unsigned NumAct;
|
||||||
Act_Action_t Action;
|
Act_Action_t Action;
|
||||||
const char *Title;
|
const char *Title;
|
||||||
|
@ -214,7 +213,7 @@ void MFU_WriteBigMFUActions (struct MFU_ListMFUActions *ListMFUActions)
|
||||||
if ((Title = Act_GetTitleAction (Action)) != NULL)
|
if ((Title = Act_GetTitleAction (Action)) != NULL)
|
||||||
{
|
{
|
||||||
/* Action string */
|
/* Action string */
|
||||||
Str_Copy (TabStr,Txt_TABS_TXT[Act_GetTab (Act_GetSuperAction (Action))],
|
Str_Copy (TabStr,Tab_GetTxt (Act_GetTab (Act_GetSuperAction (Action))),
|
||||||
sizeof (TabStr) - 1);
|
sizeof (TabStr) - 1);
|
||||||
Str_Copy (MenuStr,Title,sizeof (MenuStr) - 1);
|
Str_Copy (MenuStr,Title,sizeof (MenuStr) - 1);
|
||||||
snprintf (TabMenuStr,sizeof (TabMenuStr),"%s > %s",TabStr,MenuStr);
|
snprintf (TabMenuStr,sizeof (TabMenuStr),"%s > %s",TabStr,MenuStr);
|
||||||
|
@ -249,7 +248,6 @@ void MFU_WriteBigMFUActions (struct MFU_ListMFUActions *ListMFUActions)
|
||||||
void MFU_WriteSmallMFUActions (struct MFU_ListMFUActions *ListMFUActions)
|
void MFU_WriteSmallMFUActions (struct MFU_ListMFUActions *ListMFUActions)
|
||||||
{
|
{
|
||||||
extern const char *Txt_Frequent_ACTIONS;
|
extern const char *Txt_Frequent_ACTIONS;
|
||||||
extern const char *Txt_TABS_TXT[Tab_NUM_TABS];
|
|
||||||
unsigned NumAct;
|
unsigned NumAct;
|
||||||
Act_Action_t Action;
|
Act_Action_t Action;
|
||||||
const char *Title;
|
const char *Title;
|
||||||
|
@ -273,7 +271,7 @@ void MFU_WriteSmallMFUActions (struct MFU_ListMFUActions *ListMFUActions)
|
||||||
if ((Title = Act_GetTitleAction (Action)) != NULL)
|
if ((Title = Act_GetTitleAction (Action)) != NULL)
|
||||||
{
|
{
|
||||||
/* Action string */
|
/* Action string */
|
||||||
Str_Copy (TabStr,Txt_TABS_TXT[Act_GetTab (Act_GetSuperAction (Action))],
|
Str_Copy (TabStr,Tab_GetTxt (Act_GetTab (Act_GetSuperAction (Action))),
|
||||||
sizeof (TabStr) - 1);
|
sizeof (TabStr) - 1);
|
||||||
Str_Copy (MenuStr,Title,sizeof (MenuStr) - 1);
|
Str_Copy (MenuStr,Title,sizeof (MenuStr) - 1);
|
||||||
snprintf (TabMenuStr,sizeof (TabMenuStr),"%s > %s",TabStr,MenuStr);
|
snprintf (TabMenuStr,sizeof (TabMenuStr),"%s > %s",TabStr,MenuStr);
|
||||||
|
|
|
@ -1805,7 +1805,7 @@ const struct Act_Actions ActLst_Actions[ActLst_NUM_ACTIONS] =
|
||||||
[ActSeeAccCrs ] = { 119,-1,TabUnk,ActReqAccGbl ,0x230,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Sta_SeeCrsAccesses ,NULL},
|
[ActSeeAccCrs ] = { 119,-1,TabUnk,ActReqAccGbl ,0x230,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Sta_SeeCrsAccesses ,NULL},
|
||||||
|
|
||||||
[ActLstClk ] = { 989,-1,TabUnk,ActReqAccGbl ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Log_ShowLastClicks ,NULL},
|
[ActLstClk ] = { 989,-1,TabUnk,ActReqAccGbl ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Log_ShowLastClicks ,NULL},
|
||||||
[ActRefLstClk ] = { 994,-1,TabUnk,ActRefLstClk ,0x3F8,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,Act_CONT_NORM,Act_AJAX_RFRESH,NULL ,Lay_RefreshLastClicks ,NULL},
|
[ActRefLstClk ] = { 994,-1,TabUnk,ActReqAccGbl ,0x3F8,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,Act_CONT_NORM,Act_AJAX_RFRESH,NULL ,Lay_RefreshLastClicks ,NULL},
|
||||||
|
|
||||||
[ActSeeMyUsgRep ] = {1582,-1,TabUnk,ActReqMyUsgRep ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Rep_ShowMyUsageReport ,NULL},
|
[ActSeeMyUsgRep ] = {1582,-1,TabUnk,ActReqMyUsgRep ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Rep_ShowMyUsageReport ,NULL},
|
||||||
|
|
||||||
|
|
|
@ -633,10 +633,11 @@ Me sale este error, no s
|
||||||
"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.67.2 (2024-03-09)"
|
#define Log_PLATFORM_VERSION "SWAD 23.67.3 (2024-03-09)"
|
||||||
#define CSS_FILE "swad23.67.2.css"
|
#define CSS_FILE "swad23.67.2.css"
|
||||||
#define JS_FILE "swad23.53.6.js"
|
#define JS_FILE "swad23.53.6.js"
|
||||||
/*
|
/*
|
||||||
|
Version 23.67.3: Mar 09, 2024 Changes in global hits. (335454 lines)
|
||||||
Version 23.67.2: Mar 09, 2024 Changes in layout. Fixed missing texts in actions. (335424 lines)
|
Version 23.67.2: Mar 09, 2024 Changes in layout. Fixed missing texts in actions. (335424 lines)
|
||||||
Version 23.67.1: Mar 08, 2024 Fixed issue in layout. (335308 lines)
|
Version 23.67.1: Mar 08, 2024 Fixed issue in layout. (335308 lines)
|
||||||
Version 23.67: Mar 08, 2024 Fixed bug in selection of groups related to attendance. Reported by Antonio Manuel Fernández Pérez.
|
Version 23.67: Mar 08, 2024 Fixed bug in selection of groups related to attendance. Reported by Antonio Manuel Fernández Pérez.
|
||||||
|
|
|
@ -347,16 +347,15 @@ static void Mai_GetMailDomain (const char *Email,
|
||||||
void Mai_WriteWarningEmailNotifications (void)
|
void Mai_WriteWarningEmailNotifications (void)
|
||||||
{
|
{
|
||||||
extern const char *Txt_You_can_only_receive_email_notifications_if_;
|
extern const char *Txt_You_can_only_receive_email_notifications_if_;
|
||||||
extern const char *Txt_TABS_TXT[Tab_NUM_TABS];
|
|
||||||
extern const char *Txt_MENU_TITLE[Tab_NUM_TABS][Act_MAX_OPTIONS_IN_MENU_PER_TAB];
|
extern const char *Txt_MENU_TITLE[Tab_NUM_TABS][Act_MAX_OPTIONS_IN_MENU_PER_TAB];
|
||||||
extern const char *Txt_Domains;
|
extern const char *Txt_Domains;
|
||||||
Tab_Tab_t TabMyAccount = Act_GetTab (ActFrmMyAcc );
|
Tab_Tab_t TabMyAccount = Act_GetTab (ActFrmMyAcc);
|
||||||
Tab_Tab_t TabMailDomains = Act_GetTab (ActSeeMai);
|
Tab_Tab_t TabMailDomains = Act_GetTab (ActSeeMai);
|
||||||
|
|
||||||
Ale_ShowAlert (Ale_WARNING,Txt_You_can_only_receive_email_notifications_if_,
|
Ale_ShowAlert (Ale_WARNING,Txt_You_can_only_receive_email_notifications_if_,
|
||||||
Txt_TABS_TXT [TabMyAccount ],
|
Tab_GetTxt (TabMyAccount),
|
||||||
Txt_MENU_TITLE[TabMyAccount ][Act_GetIndexInMenu (ActFrmMyAcc)],
|
Txt_MENU_TITLE[TabMyAccount ][Act_GetIndexInMenu (ActFrmMyAcc)],
|
||||||
Txt_TABS_TXT [TabMailDomains],
|
Tab_GetTxt (TabMailDomains),
|
||||||
Txt_MENU_TITLE[TabMailDomains][Act_GetIndexInMenu (ActSeeMai )],
|
Txt_MENU_TITLE[TabMailDomains][Act_GetIndexInMenu (ActSeeMai )],
|
||||||
Txt_Domains);
|
Txt_Domains);
|
||||||
}
|
}
|
||||||
|
|
|
@ -711,7 +711,6 @@ static void Rep_WriteSectionGlobalHits (struct Rep_Report *Report)
|
||||||
static void Rep_WriteSectionHitsPerAction (struct Rep_Report *Report)
|
static void Rep_WriteSectionHitsPerAction (struct Rep_Report *Report)
|
||||||
{
|
{
|
||||||
extern const char *Txt_Hits_per_action;
|
extern const char *Txt_Hits_per_action;
|
||||||
extern const char *Txt_TABS_TXT[Tab_NUM_TABS];
|
|
||||||
extern const char *Txt_Other_actions;
|
extern const char *Txt_Other_actions;
|
||||||
MYSQL_RES *mysql_res;
|
MYSQL_RES *mysql_res;
|
||||||
MYSQL_ROW row;
|
MYSQL_ROW row;
|
||||||
|
@ -719,7 +718,7 @@ static void Rep_WriteSectionHitsPerAction (struct Rep_Report *Report)
|
||||||
unsigned NumHit;
|
unsigned NumHit;
|
||||||
long ActCod;
|
long ActCod;
|
||||||
Act_Action_t Action;
|
Act_Action_t Action;
|
||||||
Tab_Tab_t Tab;
|
const char *TabTxt;
|
||||||
unsigned long NumClicks;
|
unsigned long NumClicks;
|
||||||
|
|
||||||
/***** Begin section *****/
|
/***** Begin section *****/
|
||||||
|
@ -760,9 +759,9 @@ static void Rep_WriteSectionHitsPerAction (struct Rep_Report *Report)
|
||||||
{
|
{
|
||||||
if ((Action = Act_GetActionFromActCod (ActCod)) >= 0)
|
if ((Action = Act_GetActionFromActCod (ActCod)) >= 0)
|
||||||
{
|
{
|
||||||
Tab = Act_GetTab (Act_GetSuperAction (Action));
|
TabTxt = Tab_GetTxt (Act_GetTab (Act_GetSuperAction (Action)));
|
||||||
if (Txt_TABS_TXT[Tab])
|
if (TabTxt)
|
||||||
fprintf (Rep_File,"%s > ",Txt_TABS_TXT[Tab]);
|
fprintf (Rep_File,"%s > ",TabTxt);
|
||||||
}
|
}
|
||||||
|
|
||||||
fprintf (Rep_File,"%s",Act_GetActionText (Action));
|
fprintf (Rep_File,"%s",Act_GetActionText (Action));
|
||||||
|
|
227
swad_statistic.c
227
swad_statistic.c
|
@ -103,8 +103,10 @@ static const unsigned Sta_CellPadding[Sta_NUM_CLICKS_GROUPED_BY] =
|
||||||
static void Sta_PutFormCrsHits (struct Sta_Stats *Stats);
|
static void Sta_PutFormCrsHits (struct Sta_Stats *Stats);
|
||||||
static void Sta_PutFormGblHits (struct Sta_Stats *Stats);
|
static void Sta_PutFormGblHits (struct Sta_Stats *Stats);
|
||||||
|
|
||||||
static void Sta_WriteSelectorCountType (const struct Sta_Stats *Stats);
|
static void Sta_WriteSelectorRoles (const struct Sta_Stats *Stats);
|
||||||
static void Sta_WriteSelectorAction (const struct Sta_Stats *Stats);
|
static void Sta_WriteSelectorAction (const struct Sta_Stats *Stats);
|
||||||
|
static void Sta_WriteSelectorScope (void);
|
||||||
|
static void Sta_WriteSelectorCountType (const struct Sta_Stats *Stats);
|
||||||
static void Sta_ShowHits (Sta_GlobalOrCourseAccesses_t GlobalOrCourse);
|
static void Sta_ShowHits (Sta_GlobalOrCourseAccesses_t GlobalOrCourse);
|
||||||
static void Sta_ShowDetailedAccessesList (const struct Sta_Stats *Stats,
|
static void Sta_ShowDetailedAccessesList (const struct Sta_Stats *Stats,
|
||||||
unsigned NumHits,
|
unsigned NumHits,
|
||||||
|
@ -471,9 +473,6 @@ static void Sta_PutFormGblHits (struct Sta_Stats *Stats)
|
||||||
{
|
{
|
||||||
extern const char *Hlp_ANALYTICS_Visits_global_visits;
|
extern const char *Hlp_ANALYTICS_Visits_global_visits;
|
||||||
extern const char *Txt_Statistics_of_all_visits;
|
extern const char *Txt_Statistics_of_all_visits;
|
||||||
extern const char *Txt_Users;
|
|
||||||
extern const char *Txt_ROLE_STATS[Sta_NUM_ROLES_STAT];
|
|
||||||
extern const char *Txt_Scope;
|
|
||||||
extern const char *Txt_Show;
|
extern const char *Txt_Show;
|
||||||
extern const char *Txt_distributed_by;
|
extern const char *Txt_distributed_by;
|
||||||
extern const char *Txt_STAT_CLICKS_GROUPED_BY[Sta_NUM_CLICKS_GROUPED_BY];
|
extern const char *Txt_STAT_CLICKS_GROUPED_BY[Sta_NUM_CLICKS_GROUPED_BY];
|
||||||
|
@ -483,8 +482,6 @@ static void Sta_PutFormGblHits (struct Sta_Stats *Stats)
|
||||||
[Dat_STR_TIME] = Dat_HMS_TO_000000,
|
[Dat_STR_TIME] = Dat_HMS_TO_000000,
|
||||||
[Dat_END_TIME] = Dat_HMS_TO_235959
|
[Dat_END_TIME] = Dat_HMS_TO_235959
|
||||||
};
|
};
|
||||||
Sta_Role_t RoleStat;
|
|
||||||
unsigned RoleStatUnsigned;
|
|
||||||
Sta_ClicksGroupedBy_t ClicksGroupedBy;
|
Sta_ClicksGroupedBy_t ClicksGroupedBy;
|
||||||
unsigned ClicksGroupedByUnsigned;
|
unsigned ClicksGroupedByUnsigned;
|
||||||
|
|
||||||
|
@ -505,55 +502,13 @@ static void Sta_PutFormGblHits (struct Sta_Stats *Stats)
|
||||||
Dat_PutFormStartEndClientLocalDateTimesWithYesterdayToday (SetHMS);
|
Dat_PutFormStartEndClientLocalDateTimesWithYesterdayToday (SetHMS);
|
||||||
|
|
||||||
/***** Users' roles whose accesses we want to see *****/
|
/***** Users' roles whose accesses we want to see *****/
|
||||||
HTM_TR_Begin (NULL);
|
Sta_WriteSelectorRoles (Stats);
|
||||||
|
|
||||||
/* Label */
|
|
||||||
Frm_LabelColumn ("Frm_C1 RT","Role",Txt_Users);
|
|
||||||
|
|
||||||
/* Data */
|
|
||||||
HTM_TD_Begin ("class=\"Frm_C2 LT\"");
|
|
||||||
HTM_SELECT_Begin (HTM_DONT_SUBMIT_ON_CHANGE,NULL,
|
|
||||||
"id=\"Role\" name=\"Role\""
|
|
||||||
" class=\"Frm_C2_INPUT INPUT_%s\"",
|
|
||||||
The_GetSuffix ());
|
|
||||||
for (RoleStat = (Sta_Role_t) 0;
|
|
||||||
RoleStat <= (Sta_Role_t) (Sta_NUM_ROLES_STAT - 1);
|
|
||||||
RoleStat++)
|
|
||||||
{
|
|
||||||
RoleStatUnsigned = (unsigned) RoleStat;
|
|
||||||
HTM_OPTION (HTM_Type_UNSIGNED,&RoleStatUnsigned,
|
|
||||||
RoleStat == Stats->Role ? HTM_OPTION_SELECTED :
|
|
||||||
HTM_OPTION_UNSELECTED,
|
|
||||||
HTM_OPTION_ENABLED,
|
|
||||||
"%s",Txt_ROLE_STATS[RoleStat]);
|
|
||||||
}
|
|
||||||
HTM_SELECT_End ();
|
|
||||||
HTM_TD_End ();
|
|
||||||
|
|
||||||
HTM_TR_End ();
|
|
||||||
|
|
||||||
/***** Selection of action *****/
|
/***** Selection of action *****/
|
||||||
Sta_WriteSelectorAction (Stats);
|
Sta_WriteSelectorAction (Stats);
|
||||||
|
|
||||||
/***** Clicks made from anywhere, current center, current degree or current course *****/
|
/***** Clicks made from anywhere, current center, current degree or current course *****/
|
||||||
HTM_TR_Begin (NULL);
|
Sta_WriteSelectorScope ();
|
||||||
|
|
||||||
/* Label */
|
|
||||||
Frm_LabelColumn ("Frm_C1 RT","ScopeSta",Txt_Scope);
|
|
||||||
|
|
||||||
/* Data */
|
|
||||||
HTM_TD_Begin ("class=\"Frm_C2 LT\"");
|
|
||||||
Gbl.Scope.Allowed = 1 << Hie_SYS |
|
|
||||||
1 << Hie_CTY |
|
|
||||||
1 << Hie_INS |
|
|
||||||
1 << Hie_CTR |
|
|
||||||
1 << Hie_DEG |
|
|
||||||
1 << Hie_CRS;
|
|
||||||
Sco_GetScope ("ScopeSta",Hie_SYS);
|
|
||||||
Sco_PutSelectorScope ("ScopeSta",HTM_DONT_SUBMIT_ON_CHANGE);
|
|
||||||
HTM_TD_End ();
|
|
||||||
|
|
||||||
HTM_TR_End ();
|
|
||||||
|
|
||||||
/***** Count type for the statistic *****/
|
/***** Count type for the statistic *****/
|
||||||
HTM_TR_Begin (NULL);
|
HTM_TR_Begin (NULL);
|
||||||
|
@ -647,6 +602,130 @@ void Sta_PutLinkToGlobalHits (void)
|
||||||
Txt_Global_visits,NULL);
|
Txt_Global_visits,NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
/******* Put selectors for users' roles whose accesses we want to see ********/
|
||||||
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
static void Sta_WriteSelectorRoles (const struct Sta_Stats *Stats)
|
||||||
|
{
|
||||||
|
extern const char *Txt_Users;
|
||||||
|
extern const char *Txt_ROLE_STATS[Sta_NUM_ROLES_STAT];
|
||||||
|
Sta_Role_t RoleStat;
|
||||||
|
unsigned RoleStatUnsigned;
|
||||||
|
|
||||||
|
HTM_TR_Begin (NULL);
|
||||||
|
|
||||||
|
/* Label */
|
||||||
|
Frm_LabelColumn ("Frm_C1 RT","Role",Txt_Users);
|
||||||
|
|
||||||
|
/* Data */
|
||||||
|
HTM_TD_Begin ("class=\"Frm_C2 LT\"");
|
||||||
|
HTM_SELECT_Begin (HTM_DONT_SUBMIT_ON_CHANGE,NULL,
|
||||||
|
"id=\"Role\" name=\"Role\""
|
||||||
|
" class=\"Frm_C2_INPUT INPUT_%s\"",
|
||||||
|
The_GetSuffix ());
|
||||||
|
for (RoleStat = (Sta_Role_t) 0;
|
||||||
|
RoleStat <= (Sta_Role_t) (Sta_NUM_ROLES_STAT - 1);
|
||||||
|
RoleStat++)
|
||||||
|
{
|
||||||
|
RoleStatUnsigned = (unsigned) RoleStat;
|
||||||
|
HTM_OPTION (HTM_Type_UNSIGNED,&RoleStatUnsigned,
|
||||||
|
RoleStat == Stats->Role ? HTM_OPTION_SELECTED :
|
||||||
|
HTM_OPTION_UNSELECTED,
|
||||||
|
HTM_OPTION_ENABLED,
|
||||||
|
"%s",Txt_ROLE_STATS[RoleStat]);
|
||||||
|
}
|
||||||
|
HTM_SELECT_End ();
|
||||||
|
HTM_TD_End ();
|
||||||
|
|
||||||
|
HTM_TR_End ();
|
||||||
|
}
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
/******************** Put selector for type of action ************************/
|
||||||
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
static void Sta_WriteSelectorAction (const struct Sta_Stats *Stats)
|
||||||
|
{
|
||||||
|
extern const char *Txt_Action;
|
||||||
|
extern const char *Txt_Any_action;
|
||||||
|
Act_Action_t Action;
|
||||||
|
Tab_Tab_t Tab;
|
||||||
|
unsigned ActionUnsigned;
|
||||||
|
|
||||||
|
/***** Action *****/
|
||||||
|
HTM_TR_Begin (NULL);
|
||||||
|
|
||||||
|
/* Label */
|
||||||
|
Frm_LabelColumn ("Frm_C1 RT","StatAct",Txt_Action);
|
||||||
|
|
||||||
|
HTM_TD_Begin ("class=\"Frm_C2 LT\"");
|
||||||
|
HTM_SELECT_Begin (HTM_DONT_SUBMIT_ON_CHANGE,NULL,
|
||||||
|
"id=\"StatAct\" name=\"StatAct\""
|
||||||
|
" class=\"Frm_C2_INPUT INPUT_%s\"",
|
||||||
|
The_GetSuffix ());
|
||||||
|
HTM_OPTION (HTM_Type_STRING,"0",
|
||||||
|
Stats->NumAction == 0 ? HTM_OPTION_SELECTED :
|
||||||
|
HTM_OPTION_UNSELECTED,
|
||||||
|
HTM_OPTION_ENABLED,
|
||||||
|
"%s",Txt_Any_action);
|
||||||
|
for (Action = (Act_Action_t) 1;
|
||||||
|
Action <= (Act_Action_t) (ActLst_NUM_ACTIONS - 1);
|
||||||
|
Action++)
|
||||||
|
{
|
||||||
|
ActionUnsigned = (unsigned) Action;
|
||||||
|
Tab = Act_GetTab (Action);
|
||||||
|
if (Tab == TabUnk)
|
||||||
|
HTM_OPTION (HTM_Type_UNSIGNED,&ActionUnsigned,
|
||||||
|
Action == Stats->NumAction ? HTM_OPTION_SELECTED :
|
||||||
|
HTM_OPTION_UNSELECTED,
|
||||||
|
HTM_OPTION_ENABLED,
|
||||||
|
"%u: %s",
|
||||||
|
(unsigned) Action,Act_GetActionText (Action));
|
||||||
|
else
|
||||||
|
HTM_OPTION (HTM_Type_UNSIGNED,&ActionUnsigned,
|
||||||
|
Action == Stats->NumAction ? HTM_OPTION_SELECTED :
|
||||||
|
HTM_OPTION_UNSELECTED,
|
||||||
|
HTM_OPTION_ENABLED,
|
||||||
|
"%u: %s > %s > %s",
|
||||||
|
(unsigned) Action,Tab_GetTxt (Tab),
|
||||||
|
Act_GetTitleAction (Action),
|
||||||
|
Act_GetActionText (Action));
|
||||||
|
}
|
||||||
|
HTM_SELECT_End ();
|
||||||
|
HTM_TD_End ();
|
||||||
|
|
||||||
|
HTM_TR_End ();
|
||||||
|
}
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
/************************* Put selector for scope ****************************/
|
||||||
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
static void Sta_WriteSelectorScope (void)
|
||||||
|
{
|
||||||
|
extern const char *Txt_Scope;
|
||||||
|
|
||||||
|
HTM_TR_Begin (NULL);
|
||||||
|
|
||||||
|
/* Label */
|
||||||
|
Frm_LabelColumn ("Frm_C1 RT","ScopeSta",Txt_Scope);
|
||||||
|
|
||||||
|
/* Data */
|
||||||
|
HTM_TD_Begin ("class=\"Frm_C2 LT\"");
|
||||||
|
Gbl.Scope.Allowed = 1 << Hie_SYS |
|
||||||
|
1 << Hie_CTY |
|
||||||
|
1 << Hie_INS |
|
||||||
|
1 << Hie_CTR |
|
||||||
|
1 << Hie_DEG |
|
||||||
|
1 << Hie_CRS;
|
||||||
|
Sco_GetScope ("ScopeSta",Hie_SYS);
|
||||||
|
Sco_PutSelectorScope ("ScopeSta",HTM_DONT_SUBMIT_ON_CHANGE);
|
||||||
|
HTM_TD_End ();
|
||||||
|
|
||||||
|
HTM_TR_End ();
|
||||||
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/****** Put selectors for type of access count and for degree or course ******/
|
/****** Put selectors for type of access count and for degree or course ******/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
@ -676,54 +755,6 @@ static void Sta_WriteSelectorCountType (const struct Sta_Stats *Stats)
|
||||||
HTM_SELECT_End ();
|
HTM_SELECT_End ();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
|
||||||
/******************** Put selector for type of action ************************/
|
|
||||||
/*****************************************************************************/
|
|
||||||
|
|
||||||
static void Sta_WriteSelectorAction (const struct Sta_Stats *Stats)
|
|
||||||
{
|
|
||||||
extern const char *Txt_Action;
|
|
||||||
extern const char *Txt_Any_action;
|
|
||||||
extern const char *Txt_TABS_TXT[Tab_NUM_TABS];
|
|
||||||
Act_Action_t Action;
|
|
||||||
unsigned ActionUnsigned;
|
|
||||||
Tab_Tab_t Tab;
|
|
||||||
|
|
||||||
/***** Action *****/
|
|
||||||
HTM_TR_Begin (NULL);
|
|
||||||
|
|
||||||
/* Label */
|
|
||||||
Frm_LabelColumn ("Frm_C1 RT","StatAct",Txt_Action);
|
|
||||||
|
|
||||||
HTM_TD_Begin ("class=\"Frm_C2 LT\"");
|
|
||||||
HTM_SELECT_Begin (HTM_DONT_SUBMIT_ON_CHANGE,NULL,
|
|
||||||
"id=\"StatAct\" name=\"StatAct\""
|
|
||||||
" class=\"Frm_C2_INPUT INPUT_%s\"",
|
|
||||||
The_GetSuffix ());
|
|
||||||
HTM_OPTION (HTM_Type_STRING,"0",
|
|
||||||
Stats->NumAction == 0 ? HTM_OPTION_SELECTED :
|
|
||||||
HTM_OPTION_UNSELECTED,
|
|
||||||
HTM_OPTION_ENABLED,
|
|
||||||
"%s",Txt_Any_action);
|
|
||||||
for (Action = (Act_Action_t) 1;
|
|
||||||
Action <= (Act_Action_t) (ActLst_NUM_ACTIONS - 1);
|
|
||||||
Action++)
|
|
||||||
{
|
|
||||||
Tab = Act_GetTab (Act_GetSuperAction (Action));
|
|
||||||
ActionUnsigned = (unsigned) Action;
|
|
||||||
HTM_OPTION (HTM_Type_UNSIGNED,&ActionUnsigned,
|
|
||||||
Action == Stats->NumAction ? HTM_OPTION_SELECTED :
|
|
||||||
HTM_OPTION_UNSELECTED,
|
|
||||||
HTM_OPTION_ENABLED,
|
|
||||||
"%u: %s > %s",
|
|
||||||
(unsigned) Action,Txt_TABS_TXT[Tab],Act_GetActionText (Action));
|
|
||||||
}
|
|
||||||
HTM_SELECT_End ();
|
|
||||||
HTM_TD_End ();
|
|
||||||
|
|
||||||
HTM_TR_End ();
|
|
||||||
}
|
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/******************** Compute and show access statistics *********************/
|
/******************** Compute and show access statistics *********************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
27
swad_tab.c
27
swad_tab.c
|
@ -53,9 +53,8 @@ static const char *Tab_GetIcon (Tab_Tab_t Tab);
|
||||||
void Tab_DrawTabs (void)
|
void Tab_DrawTabs (void)
|
||||||
{
|
{
|
||||||
extern const char *Ico_IconSetId[Ico_NUM_ICON_SETS];
|
extern const char *Ico_IconSetId[Ico_NUM_ICON_SETS];
|
||||||
extern const char *Txt_TABS_TXT[Tab_NUM_TABS];
|
|
||||||
extern const char *Txt_TABS_TXT[Tab_NUM_TABS];
|
|
||||||
Tab_Tab_t NumTab;
|
Tab_Tab_t NumTab;
|
||||||
|
const char *TabTxt;
|
||||||
bool ICanViewTab;
|
bool ICanViewTab;
|
||||||
char URLIconSet[PATH_MAX + 1];
|
char URLIconSet[PATH_MAX + 1];
|
||||||
static const char *ClassIcoTab[Ico_NUM_ICON_SETS] =
|
static const char *ClassIcoTab[Ico_NUM_ICON_SETS] =
|
||||||
|
@ -85,6 +84,8 @@ void Tab_DrawTabs (void)
|
||||||
|
|
||||||
if (ICanViewTab) // Don't show the first hidden tabs
|
if (ICanViewTab) // Don't show the first hidden tabs
|
||||||
{
|
{
|
||||||
|
TabTxt = Tab_GetTxt (NumTab);
|
||||||
|
|
||||||
/* Form, icon (at top) and text (at bottom) of the tab */
|
/* Form, icon (at top) and text (at bottom) of the tab */
|
||||||
HTM_LI_Begin ("class=\"%s%s\"",
|
HTM_LI_Begin ("class=\"%s%s\"",
|
||||||
NumTab == Gbl.Action.Tab ? "TAB_ON TAB_ON_" :
|
NumTab == Gbl.Action.Tab ? "TAB_ON TAB_ON_" :
|
||||||
|
@ -98,22 +99,21 @@ void Tab_DrawTabs (void)
|
||||||
|
|
||||||
Frm_BeginForm (ActMnu);
|
Frm_BeginForm (ActMnu);
|
||||||
Par_PutParUnsigned (NULL,"NxtTab",(unsigned) NumTab);
|
Par_PutParUnsigned (NULL,"NxtTab",(unsigned) NumTab);
|
||||||
HTM_BUTTON_Submit_Begin (Txt_TABS_TXT[NumTab],
|
HTM_BUTTON_Submit_Begin (TabTxt,"class=\"BT_LINK\"");
|
||||||
"class=\"BT_LINK\"");
|
|
||||||
snprintf (URLIconSet,sizeof (URLIconSet),"%s/%s",
|
snprintf (URLIconSet,sizeof (URLIconSet),"%s/%s",
|
||||||
Cfg_URL_ICON_SETS_PUBLIC,Ico_IconSetId[Gbl.Prefs.IconSet]);
|
Cfg_URL_ICON_SETS_PUBLIC,Ico_IconSetId[Gbl.Prefs.IconSet]);
|
||||||
if (ClassIcoTab[Gbl.Prefs.IconSet])
|
if (ClassIcoTab[Gbl.Prefs.IconSet])
|
||||||
HTM_IMG (URLIconSet,Tab_GetIcon (NumTab),Txt_TABS_TXT[NumTab],
|
HTM_IMG (URLIconSet,Tab_GetIcon (NumTab),TabTxt,
|
||||||
"class=\"TAB_ICO %s_%s\"",
|
"class=\"TAB_ICO %s_%s\"",
|
||||||
ClassIcoTab[Gbl.Prefs.IconSet],The_GetSuffix ());
|
ClassIcoTab[Gbl.Prefs.IconSet],The_GetSuffix ());
|
||||||
else
|
else
|
||||||
HTM_IMG (URLIconSet,Tab_GetIcon (NumTab),Txt_TABS_TXT[NumTab],
|
HTM_IMG (URLIconSet,Tab_GetIcon (NumTab),TabTxt,
|
||||||
"class=\"TAB_ICO\"");
|
"class=\"TAB_ICO\"");
|
||||||
HTM_DIV_Begin ("class=\"TAB_TXT TAB_%s_TXT_%s\"",
|
HTM_DIV_Begin ("class=\"TAB_TXT TAB_%s_TXT_%s\"",
|
||||||
NumTab == Gbl.Action.Tab ? "ON" :
|
NumTab == Gbl.Action.Tab ? "ON" :
|
||||||
"OFF",
|
"OFF",
|
||||||
The_GetSuffix ());
|
The_GetSuffix ());
|
||||||
HTM_Txt (Txt_TABS_TXT[NumTab]);
|
HTM_Txt (TabTxt);
|
||||||
HTM_DIV_End ();
|
HTM_DIV_End ();
|
||||||
HTM_BUTTON_End ();
|
HTM_BUTTON_End ();
|
||||||
Frm_EndForm ();
|
Frm_EndForm ();
|
||||||
|
@ -163,7 +163,7 @@ static bool Tab_CheckIfICanViewTab (Tab_Tab_t Tab)
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/********************** Get icon associated to an action *********************/
|
/************************ Get icon associated to a tab ***********************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
static const char *Tab_GetIcon (Tab_Tab_t NumTab)
|
static const char *Tab_GetIcon (Tab_Tab_t NumTab)
|
||||||
|
@ -193,6 +193,17 @@ static const char *Tab_GetIcon (Tab_Tab_t NumTab)
|
||||||
return Ico_GetIcon (Tab_TabIcons[NumTab]);
|
return Ico_GetIcon (Tab_TabIcons[NumTab]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
/************************ Get text associated to a tab ***********************/
|
||||||
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
const char *Tab_GetTxt (Tab_Tab_t NumTab)
|
||||||
|
{
|
||||||
|
extern const char *Txt_TABS_TXT[Tab_NUM_TABS];
|
||||||
|
|
||||||
|
return Txt_TABS_TXT[NumTab];
|
||||||
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/*************** Set current tab depending on current action *****************/
|
/*************** Set current tab depending on current action *****************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
|
@ -57,6 +57,8 @@ typedef enum
|
||||||
|
|
||||||
void Tab_DrawTabs (void);
|
void Tab_DrawTabs (void);
|
||||||
|
|
||||||
|
const char *Tab_GetTxt (Tab_Tab_t NumTab);
|
||||||
|
|
||||||
void Tab_SetCurrentTab (void);
|
void Tab_SetCurrentTab (void);
|
||||||
void Tab_DisableIncompatibleTabs (void);
|
void Tab_DisableIncompatibleTabs (void);
|
||||||
|
|
||||||
|
|
|
@ -33420,11 +33420,11 @@ const char *Txt_Actions[ActLst_NUM_ACTIONS] =
|
||||||
#elif L==3 // en
|
#elif L==3 // en
|
||||||
"Refresh the last clicks in real time"
|
"Refresh the last clicks in real time"
|
||||||
#elif L==4 // es
|
#elif L==4 // es
|
||||||
"Refrescar los &ucute;ltimos clics en tiempo real"
|
"Refrescar los últimos clics en tiempo real"
|
||||||
#elif L==5 // fr
|
#elif L==5 // fr
|
||||||
"Refresh the last clicks in real time" // Besoin de traduction
|
"Refresh the last clicks in real time" // Besoin de traduction
|
||||||
#elif L==6 // gn
|
#elif L==6 // gn
|
||||||
"Refrescar los &ucute;ltimos clics en tiempo real" // Okoteve traducción
|
"Refrescar los últimos clics en tiempo real" // Okoteve traducción
|
||||||
#elif L==7 // it
|
#elif L==7 // it
|
||||||
"Refresh the last clicks in real time" // Bisogno di traduzione
|
"Refresh the last clicks in real time" // Bisogno di traduzione
|
||||||
#elif L==8 // pl
|
#elif L==8 // pl
|
||||||
|
|
Loading…
Reference in New Issue