Version 15.1

This commit is contained in:
Antonio Cañas Vargas 2015-09-25 01:48:00 +02:00
parent 99f7094a17
commit dd4b269a1e
8 changed files with 343 additions and 288 deletions

View File

@ -432,11 +432,13 @@ function enableDisableContAns(Elem,IsDisabled) {
} }
// Selection of statistics of current course ****/ // Selection of statistics of current course ****/
function enableRowsPage () { function enableDetailedClicks () {
document.getElementById('CountType').disabled = true; document.getElementById('CountType').disabled = true;
document.getElementById('GroupedBy').disabled = true;
document.getElementById('RowsPage').disabled = false; document.getElementById('RowsPage').disabled = false;
} }
function disableRowsPage () { function disableDetailedClicks () {
document.getElementById('CountType').disabled = false; document.getElementById('CountType').disabled = false;
document.getElementById('GroupedBy').disabled = false;
document.getElementById('RowsPage').disabled = true; document.getElementById('RowsPage').disabled = true;
} }

View File

@ -98,11 +98,14 @@
/****************************** Public constants *****************************/ /****************************** Public constants *****************************/
/*****************************************************************************/ /*****************************************************************************/
#define Log_PLATFORM_VERSION "SWAD 15.0.3 (2015/09/24)" #define Log_PLATFORM_VERSION "SWAD 15.1 (2015/09/25)"
// Number of lines (includes comments but not blank lines) has been got with the following command: // Number of lines (includes comments but not blank lines) has been got with the following command:
// nl swad*.c swad*.h css/swad*.css py/swad*.py js/swad*.js soap/swad*.h sql/swad*.sql | tail -1 // nl swad*.c swad*.h css/swad*.css py/swad*.py js/swad*.js soap/swad*.h sql/swad*.sql | tail -1
/* /*
BUG: Stats from country: "Wrong scope"
Version 15.1: Sep 25, 2015 Changes in layout of statistics of clicks. (185058 lines)
Version 15.0.3: Sep 24, 2015 Fixed bug when printing country information. (185013 lines) Version 15.0.3: Sep 24, 2015 Fixed bug when printing country information. (185013 lines)
Version 15.0.2: Sep 24, 2015 New layout in preferences. (185011 lines) Version 15.0.2: Sep 24, 2015 New layout in preferences. (185011 lines)
Version 15.0.1: Sep 23, 2015 Fix bugs in size of background images. (185006 lines) Version 15.0.1: Sep 23, 2015 Fix bugs in size of background images. (185006 lines)

View File

@ -400,12 +400,12 @@ void Gbl_InitializeGlobals (void)
Gbl.DateRange.DateEnd.Month = Gbl.Now.Date.Month; Gbl.DateRange.DateEnd.Month = Gbl.Now.Date.Month;
Gbl.DateRange.DateEnd.Day = Gbl.Now.Date.Day; Gbl.DateRange.DateEnd.Day = Gbl.Now.Date.Day;
Gbl.Stat.ClicksStatType = Sta_ACC_CRS_PER_USR; Gbl.Stat.ClicksGroupedBy = Sta_CLICKS_CRS_PER_USR;
Gbl.Stat.CountType = Sta_TOTAL_CLICKS; Gbl.Stat.CountType = Sta_TOTAL_CLICKS;
Gbl.Stat.Role = Sta_IDENTIFIED_USRS; Gbl.Stat.Role = Sta_IDENTIFIED_USRS;
Gbl.Stat.NumAction = ActAll; Gbl.Stat.NumAction = ActAll;
Gbl.Stat.RowsPerPage = 50; Gbl.Stat.RowsPerPage = 50;
Gbl.Stat.UseStatType = Sta_USERS; Gbl.Stat.UseStatType = Sta_USERS;
Gbl.Scope.Current = Sco_SCOPE_CRS; Gbl.Scope.Current = Sco_SCOPE_CRS;

View File

@ -653,8 +653,8 @@ struct Globals
} Svys; } Svys;
struct struct
{ {
Sta_ClicksStatType_t ClicksStatType; Sta_ClicksGroupedBy_t ClicksGroupedBy;
Sta_UseStatType_t UseStatType; Sta_FigureType_t UseStatType;
Sta_Role_t Role; Sta_Role_t Role;
Sta_CountType_t CountType; Sta_CountType_t CountType;
Act_Action_t NumAction; Act_Action_t NumAction;

View File

@ -360,7 +360,7 @@ static void Net_GetMyWebsAndSocialNetsFromForm (void)
void Net_ShowWebAndSocialNetworksStats (void) void Net_ShowWebAndSocialNetworksStats (void)
{ {
extern const char *Txt_STAT_USE_STAT_TYPES[Sta_NUM_TYPES_USE_STATS]; extern const char *Txt_STAT_USE_STAT_TYPES[Sta_NUM_FIGURES];
extern const char *Txt_Web_social_network; extern const char *Txt_Web_social_network;
extern const char *Txt_No_of_users; extern const char *Txt_No_of_users;
extern const char *Txt_PERCENT_of_users; extern const char *Txt_PERCENT_of_users;

View File

@ -395,14 +395,17 @@ static void Sta_PutFormToRequestAccessesCrs (void)
void Sta_AskSeeCrsAccesses (void) void Sta_AskSeeCrsAccesses (void)
{ {
extern const char *The_ClassForm[The_NUM_THEMES]; extern const char *The_ClassForm[The_NUM_THEMES];
extern const char *Txt_Statistics_of_access;
extern const char *Txt_Users;
extern const char *Txt_Show;
extern const char *Txt_distributed_by; extern const char *Txt_distributed_by;
extern const char *Txt_STAT_CLICK_STAT_TYPES[Sta_NUM_TYPES_CLICK_STATS]; extern const char *Txt_STAT_CLICKS_GROUPED_BY[Sta_NUM_CLICKS_GROUPED_BY];
extern const char *Txt_results_per_page; extern const char *Txt_results_per_page;
extern const char *Txt_Show_visits; extern const char *Txt_Show_visits;
extern const char *Txt_No_teachers_or_students_found; extern const char *Txt_No_teachers_or_students_found;
static unsigned long RowsPerPage[] = {10,20,30,40,50,100,500,1000,5000,10000,50000,100000}; static unsigned long RowsPerPage[] = {10,20,30,40,50,100,500,1000,5000,10000,50000,100000};
#define NUM_OPTIONS_ROWS_PER_PAGE (sizeof (RowsPerPage) / sizeof (RowsPerPage[0])) #define NUM_OPTIONS_ROWS_PER_PAGE (sizeof (RowsPerPage) / sizeof (RowsPerPage[0]))
Sta_ClicksStatType_t ClicksStatType; Sta_ClicksGroupedBy_t ClicksGroupedBy;
unsigned long i; unsigned long i;
/***** Get and update type of list, number of columns in class photo and preference about view photos *****/ /***** Get and update type of list, number of columns in class photo and preference about view photos *****/
@ -432,20 +435,22 @@ void Sta_AskSeeCrsAccesses (void)
Par_PutHiddenParamLong ("FirstRow",0); Par_PutHiddenParamLong ("FirstRow",0);
Par_PutHiddenParamLong ("LastRow",0); Par_PutHiddenParamLong ("LastRow",0);
/***** Draw two class photographs with the users: one for teachers of the course and another one for students *****/ /***** Start frame *****/
/* Start the table */ Lay_StartRoundFrameTable (NULL,2,Txt_Statistics_of_access);
fprintf (Gbl.F.Out,"<table style=\"margin:0 auto; border-spacing:6px;\">"
"<tr>"
"<td colspan=\"2\" class=\"LEFT_MIDDLE\">");
Lay_StartRoundFrameTable (NULL,0,NULL);
/* Put list of users to select some users */ /***** Put list of users to select some of them *****/
fprintf (Gbl.F.Out,"<tr>"
"<td class=\"%s RIGHT_TOP\">"
"%s:"
"</td>"
"<td class=\"%s LEFT_TOP\">"
"<table>",
The_ClassForm[Gbl.Prefs.Theme],Txt_Users,
The_ClassForm[Gbl.Prefs.Theme]);
Usr_ListUsersToSelect (Rol_TEACHER); Usr_ListUsersToSelect (Rol_TEACHER);
Usr_ListUsersToSelect (Rol_STUDENT); Usr_ListUsersToSelect (Rol_STUDENT);
fprintf (Gbl.F.Out,"</table>"
/* End the table */ "</td>"
Lay_EndRoundFrameTable ();
fprintf (Gbl.F.Out,"</td>"
"</tr>"); "</tr>");
/***** Initial and final dates of the search *****/ /***** Initial and final dates of the search *****/
@ -454,49 +459,57 @@ void Sta_AskSeeCrsAccesses (void)
/***** Selection of action *****/ /***** Selection of action *****/
Sta_WriteSelectorAction (); Sta_WriteSelectorAction ();
/***** Selection of count type (number of pages generated, accesses per user, etc.) *****/ /***** Option a) Listing of clicks distributed by some metric *****/
fprintf (Gbl.F.Out,"<tr>"
"<td class=\"%s RIGHT_TOP\">"
"%s:"
"</td>"
"<td class=\"%s LEFT_TOP\">",
The_ClassForm[Gbl.Prefs.Theme],Txt_Show,
The_ClassForm[Gbl.Prefs.Theme]);
if ((Gbl.Stat.ClicksGroupedBy < Sta_CLICKS_CRS_PER_USR ||
Gbl.Stat.ClicksGroupedBy > Sta_CLICKS_CRS_PER_ACTION) &&
Gbl.Stat.ClicksGroupedBy != Sta_CLICKS_CRS_DETAILED_LIST)
Gbl.Stat.ClicksGroupedBy = Sta_CLICKS_CRS_PER_USR;
fprintf (Gbl.F.Out,"<input type=\"radio\" name=\"GroupedOrDetailed\" value=\"%u\"",
(unsigned) Sta_CLICKS_GROUPED);
if (Gbl.Stat.ClicksGroupedBy != Sta_CLICKS_CRS_DETAILED_LIST)
fprintf (Gbl.F.Out," checked=\"checked\"");
fprintf (Gbl.F.Out," onclick=\"disableDetailedClicks()\" />");
/* Selection of count type (number of pages generated, accesses per user, etc.) */
Sta_WriteSelectorCountType (); Sta_WriteSelectorCountType ();
/***** Type of statistic *****/ fprintf (Gbl.F.Out," %s <select id=\"GroupedBy\" name=\"GroupedBy\">",
fprintf (Gbl.F.Out,"<tr>" Txt_distributed_by);
"<td class=\"%s RIGHT_TOP\">" for (ClicksGroupedBy = Sta_CLICKS_CRS_PER_USR;
"%s:" ClicksGroupedBy <= Sta_CLICKS_CRS_PER_ACTION;
"</td>" ClicksGroupedBy++)
"<td class=\"DAT LEFT_TOP\">",
The_ClassForm[Gbl.Prefs.Theme],Txt_distributed_by);
if ((Gbl.Stat.ClicksStatType < Sta_ACC_CRS_PER_USR ||
Gbl.Stat.ClicksStatType > Sta_ACC_CRS_PER_ACTION) &&
Gbl.Stat.ClicksStatType != Sta_ACC_CRS_LISTING)
Gbl.Stat.ClicksStatType = Sta_ACC_CRS_PER_USR;
for (ClicksStatType = Sta_ACC_CRS_PER_USR;
ClicksStatType <= Sta_ACC_CRS_PER_ACTION;
ClicksStatType++)
{ {
fprintf (Gbl.F.Out,"<input type=\"radio\" name=\"ClickStatType\" value=\"%u\"", fprintf (Gbl.F.Out,"<option value=\"%u\"",
(unsigned) ClicksStatType); (unsigned) ClicksGroupedBy);
if (ClicksStatType == Gbl.Stat.ClicksStatType) if (ClicksGroupedBy == Gbl.Stat.ClicksGroupedBy)
fprintf (Gbl.F.Out," checked=\"checked\""); fprintf (Gbl.F.Out," selected=\"selected\"");
fprintf (Gbl.F.Out," onclick=\"disableRowsPage()\" />%s<br />", fprintf (Gbl.F.Out,">%s",Txt_STAT_CLICKS_GROUPED_BY[ClicksGroupedBy]);
Txt_STAT_CLICK_STAT_TYPES[ClicksStatType]);
} }
fprintf (Gbl.F.Out,"</td>" fprintf (Gbl.F.Out,"</select>"
"</tr>"); "<br />");
/* Listing of clicks to this course */ /***** Option b) Listing of detailed clicks to this course *****/
fprintf (Gbl.F.Out,"<tr>" fprintf (Gbl.F.Out,"<input type=\"radio\" name=\"GroupedOrDetailed\" value=\"%u\"",
"<td colspan=\"2\" class=\"%s CENTER_MIDDLE\">" (unsigned) Sta_CLICKS_DETAILED);
"<input type=\"radio\" name=\"ClickStatType\" value=\"%u\"", if (Gbl.Stat.ClicksGroupedBy == Sta_CLICKS_CRS_DETAILED_LIST)
The_ClassForm[Gbl.Prefs.Theme],(unsigned) Sta_ACC_CRS_LISTING);
if (Gbl.Stat.ClicksStatType == Sta_ACC_CRS_LISTING)
fprintf (Gbl.F.Out," checked=\"checked\""); fprintf (Gbl.F.Out," checked=\"checked\"");
fprintf (Gbl.F.Out," onclick=\"enableRowsPage()\" />%s", fprintf (Gbl.F.Out," onclick=\"enableDetailedClicks()\" />%s",
Txt_STAT_CLICK_STAT_TYPES[Sta_ACC_CRS_LISTING]); Txt_STAT_CLICKS_GROUPED_BY[Sta_CLICKS_CRS_DETAILED_LIST]);
/* Number of rows per page */ /* Number of rows per page */
// To use getElementById in Firefox, it's necessary to have the id attribute // To use getElementById in Firefox, it's necessary to have the id attribute
fprintf (Gbl.F.Out," (%s: <select id=\"RowsPage\" name=\"RowsPage\"", fprintf (Gbl.F.Out," (%s: <select id=\"RowsPage\" name=\"RowsPage\"",
Txt_results_per_page); Txt_results_per_page);
if (Gbl.Stat.ClicksStatType != Sta_ACC_CRS_LISTING) if (Gbl.Stat.ClicksGroupedBy != Sta_CLICKS_CRS_DETAILED_LIST)
fprintf (Gbl.F.Out," disabled=\"disabled\""); fprintf (Gbl.F.Out," disabled=\"disabled\"");
fprintf (Gbl.F.Out,">"); fprintf (Gbl.F.Out,">");
for (i = 0; for (i = 0;
@ -510,11 +523,10 @@ void Sta_AskSeeCrsAccesses (void)
} }
fprintf (Gbl.F.Out,"</select>)" fprintf (Gbl.F.Out,"</select>)"
"</td>" "</td>"
"</tr>" "</tr>");
"</table>");
/***** Submit button *****/ /***** End frame *****/
Lay_PutConfirmButton (Txt_Show_visits); Lay_EndRoundFrameTableWithButton (Lay_CONFIRM_BUTTON,Txt_Show_visits);
/***** End form *****/ /***** End form *****/
Act_FormEnd (); Act_FormEnd ();
@ -541,14 +553,16 @@ void Sta_AskSeeCrsAccesses (void)
void Sta_AskSeeGblAccesses (void) void Sta_AskSeeGblAccesses (void)
{ {
extern const char *The_ClassForm[The_NUM_THEMES]; extern const char *The_ClassForm[The_NUM_THEMES];
extern const char *Txt_Statistics_of_access;
extern const char *Txt_Users; extern const char *Txt_Users;
extern const char *Txt_ROLE_STATS[Sta_NUM_ROLES_STAT]; extern const char *Txt_ROLE_STATS[Sta_NUM_ROLES_STAT];
extern const char *Txt_Scope; extern const char *Txt_Scope;
extern const char *Txt_Show;
extern const char *Txt_distributed_by; extern const char *Txt_distributed_by;
extern const char *Txt_STAT_CLICK_STAT_TYPES[Sta_NUM_TYPES_CLICK_STATS]; extern const char *Txt_STAT_CLICKS_GROUPED_BY[Sta_NUM_CLICKS_GROUPED_BY];
extern const char *Txt_Show_visits; extern const char *Txt_Show_visits;
Sta_Role_t RoleStat; Sta_Role_t RoleStat;
Sta_ClicksStatType_t ClicksStatType; Sta_ClicksGroupedBy_t ClicksGroupedBy;
/***** Put form to go to test edition and configuration *****/ /***** Put form to go to test edition and configuration *****/
if (Gbl.CurrentCrs.Crs.CrsCod > 0 && // Course selected if (Gbl.CurrentCrs.Crs.CrsCod > 0 && // Course selected
@ -563,7 +577,9 @@ void Sta_AskSeeGblAccesses (void)
/***** Start form *****/ /***** Start form *****/
Act_FormStart (ActSeeAccGbl); Act_FormStart (ActSeeAccGbl);
fprintf (Gbl.F.Out,"<table class=\"CELLS_PAD_2\" style=\"margin:0 auto;\">");
/***** Start frame *****/
Lay_StartRoundFrameTable (NULL,2,Txt_Statistics_of_access);
/***** Start and end dates for the search *****/ /***** Start and end dates for the search *****/
Dat_WriteFormIniEndDates (); Dat_WriteFormIniEndDates ();
@ -612,35 +628,39 @@ void Sta_AskSeeGblAccesses (void)
"</tr>"); "</tr>");
/***** Count type for the statistic *****/ /***** Count type for the statistic *****/
Sta_WriteSelectorCountType ();
/***** Type of statistic *****/
fprintf (Gbl.F.Out,"<tr>" fprintf (Gbl.F.Out,"<tr>"
"<td class=\"%s RIGHT_TOP\">" "<td class=\"%s RIGHT_TOP\">"
"%s:" "%s:"
"</td>" "</td>"
"<td class=\"DAT LEFT_TOP\">", "<td class=\"%s LEFT_TOP\">",
The_ClassForm[Gbl.Prefs.Theme],Txt_distributed_by); The_ClassForm[Gbl.Prefs.Theme],Txt_Show,
if (Gbl.Stat.ClicksStatType < Sta_ACC_GBL_PER_DAYS || The_ClassForm[Gbl.Prefs.Theme]);
Gbl.Stat.ClicksStatType > Sta_ACC_GBL_PER_COURSE) Sta_WriteSelectorCountType ();
Gbl.Stat.ClicksStatType = Sta_ACC_GBL_PER_DAYS;
for (ClicksStatType = Sta_ACC_GBL_PER_DAYS;
ClicksStatType <= Sta_ACC_GBL_PER_COURSE;
ClicksStatType++)
{
fprintf (Gbl.F.Out,"<input type=\"radio\" name=\"ClickStatType\" value=\"%u\"",
(unsigned) ClicksStatType);
if (ClicksStatType == Gbl.Stat.ClicksStatType)
fprintf (Gbl.F.Out," checked=\"checked\"");
fprintf (Gbl.F.Out," />%s<br />",
Txt_STAT_CLICK_STAT_TYPES[ClicksStatType]);
}
fprintf (Gbl.F.Out,"</td>"
"</tr>"
"</table>");
/***** Submit button *****/ /***** Type of statistic *****/
Lay_PutConfirmButton (Txt_Show_visits); fprintf (Gbl.F.Out," %s ",Txt_distributed_by);
if (Gbl.Stat.ClicksGroupedBy < Sta_CLICKS_GBL_PER_DAYS ||
Gbl.Stat.ClicksGroupedBy > Sta_CLICKS_GBL_PER_COURSE)
Gbl.Stat.ClicksGroupedBy = Sta_CLICKS_GBL_PER_DAYS;
fprintf (Gbl.F.Out,"<select name=\"GroupedBy\">");
for (ClicksGroupedBy = Sta_CLICKS_GBL_PER_DAYS;
ClicksGroupedBy <= Sta_CLICKS_GBL_PER_COURSE;
ClicksGroupedBy++)
{
fprintf (Gbl.F.Out,"<option value=\"%u\"",
(unsigned) ClicksGroupedBy);
if (ClicksGroupedBy == Gbl.Stat.ClicksGroupedBy)
fprintf (Gbl.F.Out," selected=\"selected\"");
fprintf (Gbl.F.Out,">%s",Txt_STAT_CLICKS_GROUPED_BY[ClicksGroupedBy]);
}
fprintf (Gbl.F.Out,"</select>"
"</td>"
"</tr>");
/***** End frame *****/
Lay_EndRoundFrameTableWithButton (Lay_CONFIRM_BUTTON,Txt_Show_visits);
/***** End form *****/ /***** End form *****/
Act_FormEnd (); Act_FormEnd ();
@ -652,21 +672,13 @@ void Sta_AskSeeGblAccesses (void)
static void Sta_WriteSelectorCountType (void) static void Sta_WriteSelectorCountType (void)
{ {
extern const char *The_ClassForm[The_NUM_THEMES]; extern const char *Txt_STAT_TYPE_COUNT_SMALL[Sta_NUM_COUNT_TYPES];
extern const char *Txt_Show;
extern const char *Txt_STAT_TYPE_COUNT_SMALL[Sta_NUM_STAT_COUNT_TYPES];
Sta_CountType_t StatCountType; Sta_CountType_t StatCountType;
/**** Count type *****/ /**** Count type *****/
fprintf (Gbl.F.Out,"<tr>" fprintf (Gbl.F.Out,"<select id=\"CountType\" name=\"CountType\">");
"<td class=\"%s RIGHT_TOP\">"
"%s:"
"</td>"
"<td class=\"LEFT_TOP\">"
"<select name=\"CountType\" id=\"CountType\">",
The_ClassForm[Gbl.Prefs.Theme],Txt_Show);
for (StatCountType = (Sta_CountType_t) 0; for (StatCountType = (Sta_CountType_t) 0;
StatCountType < Sta_NUM_STAT_COUNT_TYPES; StatCountType < Sta_NUM_COUNT_TYPES;
StatCountType++) StatCountType++)
{ {
fprintf (Gbl.F.Out,"<option value=\"%u\"",(unsigned) StatCountType); fprintf (Gbl.F.Out,"<option value=\"%u\"",(unsigned) StatCountType);
@ -674,9 +686,7 @@ static void Sta_WriteSelectorCountType (void)
fprintf (Gbl.F.Out," selected=\"selected\""); fprintf (Gbl.F.Out," selected=\"selected\"");
fprintf (Gbl.F.Out,">%s",Txt_STAT_TYPE_COUNT_SMALL[StatCountType]); fprintf (Gbl.F.Out,">%s",Txt_STAT_TYPE_COUNT_SMALL[StatCountType]);
} }
fprintf (Gbl.F.Out,"</select>" fprintf (Gbl.F.Out,"</select>");
"</td>"
"</tr>");
} }
/*****************************************************************************/ /*****************************************************************************/
@ -782,9 +792,9 @@ static bool Sta_SeeAccesses (void)
extern const char *Txt_ROLE_STATS[Sta_NUM_ROLES_STAT]; extern const char *Txt_ROLE_STATS[Sta_NUM_ROLES_STAT];
extern const char *Txt_Action; extern const char *Txt_Action;
extern const char *Txt_The_graph_shows_the_NUMBER; extern const char *Txt_The_graph_shows_the_NUMBER;
extern const char *Txt_STAT_TYPE_COUNT_SMALL[Sta_NUM_STAT_COUNT_TYPES]; extern const char *Txt_STAT_TYPE_COUNT_SMALL[Sta_NUM_COUNT_TYPES];
extern const char *Txt_distributed_by; extern const char *Txt_distributed_by;
extern const char *Txt_STAT_CLICK_STAT_TYPES[Sta_NUM_TYPES_CLICK_STATS]; extern const char *Txt_STAT_CLICKS_GROUPED_BY[Sta_NUM_CLICKS_GROUPED_BY];
extern const char *Txt_You_must_select_one_ore_more_users; extern const char *Txt_You_must_select_one_ore_more_users;
extern const char *Txt_There_is_no_knowing_how_many_users_not_logged_have_accessed; extern const char *Txt_There_is_no_knowing_how_many_users_not_logged_have_accessed;
extern const char *Txt_The_date_range_must_be_less_than_or_equal_to_X_days; extern const char *Txt_The_date_range_must_be_less_than_or_equal_to_X_days;
@ -804,6 +814,7 @@ static bool Sta_SeeAccesses (void)
char UnsignedStr[10+1]; char UnsignedStr[10+1];
unsigned UnsignedNum; unsigned UnsignedNum;
const char *LogTable; const char *LogTable;
Sta_ClicksDetailedOrGrouped_t DetailedOrGrouped = Sta_CLICKS_GROUPED;
struct UsrData UsrDat; struct UsrData UsrDat;
unsigned NumUsr = 0; unsigned NumUsr = 0;
const char *Ptr; const char *Ptr;
@ -824,20 +835,30 @@ static bool Sta_SeeAccesses (void)
"log"; "log";
/***** Get the type of stat of clicks ******/ /***** Get the type of stat of clicks ******/
Par_GetParToText ("ClickStatType",UnsignedStr,10); Par_GetParToText ("GroupedOrDetailed",UnsignedStr,10);
if (sscanf (UnsignedStr,"%u",&UnsignedNum) != 1) if (sscanf (UnsignedStr,"%u",&UnsignedNum) == 1)
Lay_ShowErrorAndExit ("Type of query of accesses is missing."); if (UnsignedNum < Sta_NUM_CLICKS_DETAILED_OR_GROUPED)
if (UnsignedNum >= Sta_NUM_TYPES_CLICK_STATS) DetailedOrGrouped = (Sta_ClicksDetailedOrGrouped_t) UnsignedNum;
Lay_ShowErrorAndExit ("Type of query of accesses is missing.");
Gbl.Stat.ClicksStatType = (Sta_ClicksStatType_t) UnsignedNum; if (DetailedOrGrouped == Sta_CLICKS_DETAILED)
Gbl.Stat.ClicksGroupedBy = Sta_CLICKS_CRS_DETAILED_LIST;
else // DetailedOrGrouped == Sta_CLICKS_GROUPED
{
Par_GetParToText ("GroupedBy",UnsignedStr,10);
if (sscanf (UnsignedStr,"%u",&UnsignedNum) != 1)
Lay_ShowErrorAndExit ("Type of grouping is missing.");
if (UnsignedNum >= Sta_NUM_CLICKS_GROUPED_BY)
Lay_ShowErrorAndExit ("Type of grouping is missing.");
Gbl.Stat.ClicksGroupedBy = (Sta_ClicksGroupedBy_t) UnsignedNum;
}
/***** Get the type of count of clicks *****/ /***** Get the type of count of clicks *****/
if (Gbl.Stat.ClicksStatType != Sta_ACC_CRS_LISTING) if (Gbl.Stat.ClicksGroupedBy != Sta_CLICKS_CRS_DETAILED_LIST)
{ {
Par_GetParToText ("CountType",UnsignedStr,10); Par_GetParToText ("CountType",UnsignedStr,10);
if (sscanf (UnsignedStr,"%u",&UnsignedNum) != 1) if (sscanf (UnsignedStr,"%u",&UnsignedNum) != 1)
Lay_ShowErrorAndExit ("Type of count is missing."); Lay_ShowErrorAndExit ("Type of count is missing.");
if (UnsignedNum >= Sta_NUM_STAT_COUNT_TYPES) if (UnsignedNum >= Sta_NUM_COUNT_TYPES)
Lay_ShowErrorAndExit ("Type of count is missing."); Lay_ShowErrorAndExit ("Type of count is missing.");
Gbl.Stat.CountType = (Sta_CountType_t) UnsignedNum; Gbl.Stat.CountType = (Sta_CountType_t) UnsignedNum;
} }
@ -850,20 +871,20 @@ static bool Sta_SeeAccesses (void)
Lay_ShowErrorAndExit ("Action is missing."); Lay_ShowErrorAndExit ("Action is missing.");
Gbl.Stat.NumAction = (Act_Action_t) UnsignedNum; Gbl.Stat.NumAction = (Act_Action_t) UnsignedNum;
switch (Gbl.Stat.ClicksStatType) switch (Gbl.Stat.ClicksGroupedBy)
{ {
case Sta_ACC_GBL_PER_DAYS: case Sta_CLICKS_GBL_PER_DAYS:
case Sta_ACC_GBL_PER_DAYS_AND_HOUR: case Sta_CLICKS_GBL_PER_DAYS_AND_HOUR:
case Sta_ACC_GBL_PER_WEEKS: case Sta_CLICKS_GBL_PER_WEEKS:
case Sta_ACC_GBL_PER_MONTHS: case Sta_CLICKS_GBL_PER_MONTHS:
case Sta_ACC_GBL_PER_HOUR: case Sta_CLICKS_GBL_PER_HOUR:
case Sta_ACC_GBL_PER_MINUTE: case Sta_CLICKS_GBL_PER_MINUTE:
case Sta_ACC_GBL_PER_ACTION: case Sta_CLICKS_GBL_PER_ACTION:
case Sta_ACC_GBL_PER_PLUGIN: case Sta_CLICKS_GBL_PER_PLUGIN:
case Sta_ACC_GBL_PER_Svc_FUNCTION: case Sta_CLICKS_GBL_PER_WEB_SERVICE_FUNCTION:
case Sta_ACC_GBL_PER_BANNER: case Sta_CLICKS_GBL_PER_BANNER:
case Sta_ACC_GBL_PER_DEGREE: case Sta_CLICKS_GBL_PER_DEGREE:
case Sta_ACC_GBL_PER_COURSE: case Sta_CLICKS_GBL_PER_COURSE:
StatsGlobalOrCourse = STAT_GLOBAL; StatsGlobalOrCourse = STAT_GLOBAL;
break; break;
default: default:
@ -873,7 +894,7 @@ static bool Sta_SeeAccesses (void)
if (Gbl.CurrentAct == ActSeeAccCrs) if (Gbl.CurrentAct == ActSeeAccCrs)
{ {
if (Gbl.Stat.ClicksStatType == Sta_ACC_CRS_LISTING) if (Gbl.Stat.ClicksGroupedBy == Sta_CLICKS_CRS_DETAILED_LIST)
{ {
/****** Get the number of the first row to show ******/ /****** Get the number of the first row to show ******/
Par_GetParToText ("FirstRow",UnsignedStr,10); Par_GetParToText ("FirstRow",UnsignedStr,10);
@ -966,71 +987,71 @@ static bool Sta_SeeAccesses (void)
/***** Select clicks from the table of log *****/ /***** Select clicks from the table of log *****/
/* Start the query */ /* Start the query */
switch (Gbl.Stat.ClicksStatType) switch (Gbl.Stat.ClicksGroupedBy)
{ {
case Sta_ACC_CRS_LISTING: case Sta_CLICKS_CRS_DETAILED_LIST:
sprintf (Query,"SELECT SQL_NO_CACHE LogCod,UsrCod,Role,DATE_FORMAT(ClickTime,'%%Y%%m%%d%%H%%i%%S') AS F,ActCod FROM %s", sprintf (Query,"SELECT SQL_NO_CACHE LogCod,UsrCod,Role,DATE_FORMAT(ClickTime,'%%Y%%m%%d%%H%%i%%S') AS F,ActCod FROM %s",
LogTable); LogTable);
break; break;
case Sta_ACC_CRS_PER_USR: case Sta_CLICKS_CRS_PER_USR:
sprintf (Query,"SELECT SQL_NO_CACHE UsrCod,%s AS Num FROM %s", sprintf (Query,"SELECT SQL_NO_CACHE UsrCod,%s AS Num FROM %s",
StrQueryCountType,LogTable); StrQueryCountType,LogTable);
break; break;
case Sta_ACC_CRS_PER_DAYS: case Sta_CLICKS_CRS_PER_DAYS:
case Sta_ACC_GBL_PER_DAYS: case Sta_CLICKS_GBL_PER_DAYS:
sprintf (Query,"SELECT SQL_NO_CACHE DATE_FORMAT(ClickTime,'%%Y%%m%%d') AS Day,%s FROM %s", sprintf (Query,"SELECT SQL_NO_CACHE DATE_FORMAT(ClickTime,'%%Y%%m%%d') AS Day,%s FROM %s",
StrQueryCountType,LogTable); StrQueryCountType,LogTable);
break; break;
case Sta_ACC_CRS_PER_DAYS_AND_HOUR: case Sta_CLICKS_CRS_PER_DAYS_AND_HOUR:
case Sta_ACC_GBL_PER_DAYS_AND_HOUR: case Sta_CLICKS_GBL_PER_DAYS_AND_HOUR:
sprintf (Query,"SELECT SQL_NO_CACHE DATE_FORMAT(ClickTime,'%%Y%%m%%d') AS Day,DATE_FORMAT(ClickTime,'%%H') AS Hour,%s FROM %s", sprintf (Query,"SELECT SQL_NO_CACHE DATE_FORMAT(ClickTime,'%%Y%%m%%d') AS Day,DATE_FORMAT(ClickTime,'%%H') AS Hour,%s FROM %s",
StrQueryCountType,LogTable); StrQueryCountType,LogTable);
break; break;
case Sta_ACC_CRS_PER_WEEKS: case Sta_CLICKS_CRS_PER_WEEKS:
case Sta_ACC_GBL_PER_WEEKS: case Sta_CLICKS_GBL_PER_WEEKS:
/* With %v the weeks always are counted from monday to sunday. /* With %v the weeks always are counted from monday to sunday.
01/01/2006 was sunday => it's counted in the week 52 of 2005, that goes from 26/12/2005 (monday) to 01/01/2006 (sunday). 01/01/2006 was sunday => it's counted in the week 52 of 2005, that goes from 26/12/2005 (monday) to 01/01/2006 (sunday).
The week 1 of 2006 goes from 02/01/2006 (monday) to 08/01/2006 (sunday) */ The week 1 of 2006 goes from 02/01/2006 (monday) to 08/01/2006 (sunday) */
sprintf (Query,"SELECT SQL_NO_CACHE DATE_FORMAT(ClickTime,'%%x%%v') AS Week,%s FROM %s", sprintf (Query,"SELECT SQL_NO_CACHE DATE_FORMAT(ClickTime,'%%x%%v') AS Week,%s FROM %s",
StrQueryCountType,LogTable); StrQueryCountType,LogTable);
break; break;
case Sta_ACC_CRS_PER_MONTHS: case Sta_CLICKS_CRS_PER_MONTHS:
case Sta_ACC_GBL_PER_MONTHS: case Sta_CLICKS_GBL_PER_MONTHS:
sprintf (Query,"SELECT SQL_NO_CACHE DATE_FORMAT(ClickTime,'%%Y%%m') AS Month,%s FROM %s", sprintf (Query,"SELECT SQL_NO_CACHE DATE_FORMAT(ClickTime,'%%Y%%m') AS Month,%s FROM %s",
StrQueryCountType,LogTable); StrQueryCountType,LogTable);
break; break;
case Sta_ACC_CRS_PER_HOUR: case Sta_CLICKS_CRS_PER_HOUR:
case Sta_ACC_GBL_PER_HOUR: case Sta_CLICKS_GBL_PER_HOUR:
sprintf (Query,"SELECT SQL_NO_CACHE DATE_FORMAT(ClickTime,'%%H') AS Hour,%s FROM %s", sprintf (Query,"SELECT SQL_NO_CACHE DATE_FORMAT(ClickTime,'%%H') AS Hour,%s FROM %s",
StrQueryCountType,LogTable); StrQueryCountType,LogTable);
break; break;
case Sta_ACC_CRS_PER_MINUTE: case Sta_CLICKS_CRS_PER_MINUTE:
case Sta_ACC_GBL_PER_MINUTE: case Sta_CLICKS_GBL_PER_MINUTE:
sprintf (Query,"SELECT SQL_NO_CACHE DATE_FORMAT(ClickTime,'%%H%%i') AS Minute,%s FROM %s", sprintf (Query,"SELECT SQL_NO_CACHE DATE_FORMAT(ClickTime,'%%H%%i') AS Minute,%s FROM %s",
StrQueryCountType,LogTable); StrQueryCountType,LogTable);
break; break;
case Sta_ACC_CRS_PER_ACTION: case Sta_CLICKS_CRS_PER_ACTION:
case Sta_ACC_GBL_PER_ACTION: case Sta_CLICKS_GBL_PER_ACTION:
sprintf (Query,"SELECT SQL_NO_CACHE ActCod,%s AS Num FROM %s", sprintf (Query,"SELECT SQL_NO_CACHE ActCod,%s AS Num FROM %s",
StrQueryCountType,LogTable); StrQueryCountType,LogTable);
break; break;
case Sta_ACC_GBL_PER_PLUGIN: case Sta_CLICKS_GBL_PER_PLUGIN:
sprintf (Query,"SELECT SQL_NO_CACHE log_ws.PlgCod,%s AS Num FROM %s,log_ws", sprintf (Query,"SELECT SQL_NO_CACHE log_ws.PlgCod,%s AS Num FROM %s,log_ws",
StrQueryCountType,LogTable); StrQueryCountType,LogTable);
break; break;
case Sta_ACC_GBL_PER_Svc_FUNCTION: case Sta_CLICKS_GBL_PER_WEB_SERVICE_FUNCTION:
sprintf (Query,"SELECT SQL_NO_CACHE log_ws.FunCod,%s AS Num FROM %s,log_ws", sprintf (Query,"SELECT SQL_NO_CACHE log_ws.FunCod,%s AS Num FROM %s,log_ws",
StrQueryCountType,LogTable); StrQueryCountType,LogTable);
break; break;
case Sta_ACC_GBL_PER_BANNER: case Sta_CLICKS_GBL_PER_BANNER:
sprintf (Query,"SELECT SQL_NO_CACHE log_banners.BanCod,%s AS Num FROM %s,log_banners", sprintf (Query,"SELECT SQL_NO_CACHE log_banners.BanCod,%s AS Num FROM %s,log_banners",
StrQueryCountType,LogTable); StrQueryCountType,LogTable);
break; break;
case Sta_ACC_GBL_PER_DEGREE: case Sta_CLICKS_GBL_PER_DEGREE:
sprintf (Query,"SELECT SQL_NO_CACHE DegCod,%s AS Num FROM %s", sprintf (Query,"SELECT SQL_NO_CACHE DegCod,%s AS Num FROM %s",
StrQueryCountType,LogTable); StrQueryCountType,LogTable);
break; break;
case Sta_ACC_GBL_PER_COURSE: case Sta_CLICKS_GBL_PER_COURSE:
sprintf (Query,"SELECT SQL_NO_CACHE CrsCod,%s AS Num FROM %s", sprintf (Query,"SELECT SQL_NO_CACHE CrsCod,%s AS Num FROM %s",
StrQueryCountType,LogTable); StrQueryCountType,LogTable);
break; break;
@ -1147,15 +1168,15 @@ static bool Sta_SeeAccesses (void)
} }
strcat (Query,StrRole); strcat (Query,StrRole);
switch (Gbl.Stat.ClicksStatType) switch (Gbl.Stat.ClicksGroupedBy)
{ {
case Sta_ACC_GBL_PER_PLUGIN: case Sta_CLICKS_GBL_PER_PLUGIN:
case Sta_ACC_GBL_PER_Svc_FUNCTION: case Sta_CLICKS_GBL_PER_WEB_SERVICE_FUNCTION:
sprintf (QueryAux," AND %s.LogCod=log_ws.LogCod", sprintf (QueryAux," AND %s.LogCod=log_ws.LogCod",
LogTable); LogTable);
strcat (Query,QueryAux); strcat (Query,QueryAux);
break; break;
case Sta_ACC_GBL_PER_BANNER: case Sta_CLICKS_GBL_PER_BANNER:
sprintf (QueryAux," AND %s.LogCod=log_banners.LogCod", sprintf (QueryAux," AND %s.LogCod=log_banners.LogCod",
LogTable); LogTable);
strcat (Query,QueryAux); strcat (Query,QueryAux);
@ -1201,58 +1222,58 @@ static bool Sta_SeeAccesses (void)
} }
/* End the query */ /* End the query */
switch (Gbl.Stat.ClicksStatType) switch (Gbl.Stat.ClicksGroupedBy)
{ {
case Sta_ACC_CRS_LISTING: case Sta_CLICKS_CRS_DETAILED_LIST:
strcat (Query," ORDER BY F"); strcat (Query," ORDER BY F");
break; break;
case Sta_ACC_CRS_PER_USR: case Sta_CLICKS_CRS_PER_USR:
sprintf (QueryAux," GROUP BY %s.UsrCod ORDER BY Num DESC",LogTable); sprintf (QueryAux," GROUP BY %s.UsrCod ORDER BY Num DESC",LogTable);
strcat (Query,QueryAux); strcat (Query,QueryAux);
break; break;
case Sta_ACC_CRS_PER_DAYS: case Sta_CLICKS_CRS_PER_DAYS:
case Sta_ACC_GBL_PER_DAYS: case Sta_CLICKS_GBL_PER_DAYS:
strcat (Query," GROUP BY Day DESC"); strcat (Query," GROUP BY Day DESC");
break; break;
case Sta_ACC_CRS_PER_DAYS_AND_HOUR: case Sta_CLICKS_CRS_PER_DAYS_AND_HOUR:
case Sta_ACC_GBL_PER_DAYS_AND_HOUR: case Sta_CLICKS_GBL_PER_DAYS_AND_HOUR:
strcat (Query," GROUP BY Day DESC,Hour"); strcat (Query," GROUP BY Day DESC,Hour");
break; break;
case Sta_ACC_CRS_PER_WEEKS: case Sta_CLICKS_CRS_PER_WEEKS:
case Sta_ACC_GBL_PER_WEEKS: case Sta_CLICKS_GBL_PER_WEEKS:
strcat (Query," GROUP BY Week DESC"); strcat (Query," GROUP BY Week DESC");
break; break;
case Sta_ACC_CRS_PER_MONTHS: case Sta_CLICKS_CRS_PER_MONTHS:
case Sta_ACC_GBL_PER_MONTHS: case Sta_CLICKS_GBL_PER_MONTHS:
strcat (Query," GROUP BY Month DESC"); strcat (Query," GROUP BY Month DESC");
break; break;
case Sta_ACC_CRS_PER_HOUR: case Sta_CLICKS_CRS_PER_HOUR:
case Sta_ACC_GBL_PER_HOUR: case Sta_CLICKS_GBL_PER_HOUR:
strcat (Query," GROUP BY Hour"); strcat (Query," GROUP BY Hour");
break; break;
case Sta_ACC_CRS_PER_MINUTE: case Sta_CLICKS_CRS_PER_MINUTE:
case Sta_ACC_GBL_PER_MINUTE: case Sta_CLICKS_GBL_PER_MINUTE:
strcat (Query," GROUP BY Minute"); strcat (Query," GROUP BY Minute");
break; break;
case Sta_ACC_CRS_PER_ACTION: case Sta_CLICKS_CRS_PER_ACTION:
case Sta_ACC_GBL_PER_ACTION: case Sta_CLICKS_GBL_PER_ACTION:
sprintf (QueryAux," GROUP BY %s.ActCod ORDER BY Num DESC",LogTable); sprintf (QueryAux," GROUP BY %s.ActCod ORDER BY Num DESC",LogTable);
strcat (Query,QueryAux); strcat (Query,QueryAux);
break; break;
case Sta_ACC_GBL_PER_PLUGIN: case Sta_CLICKS_GBL_PER_PLUGIN:
strcat (Query," GROUP BY log_ws.PlgCod ORDER BY Num DESC"); strcat (Query," GROUP BY log_ws.PlgCod ORDER BY Num DESC");
break; break;
case Sta_ACC_GBL_PER_Svc_FUNCTION: case Sta_CLICKS_GBL_PER_WEB_SERVICE_FUNCTION:
strcat (Query," GROUP BY log_ws.FunCod ORDER BY Num DESC"); strcat (Query," GROUP BY log_ws.FunCod ORDER BY Num DESC");
break; break;
case Sta_ACC_GBL_PER_BANNER: case Sta_CLICKS_GBL_PER_BANNER:
strcat (Query," GROUP BY log_banners.BanCod ORDER BY Num DESC"); strcat (Query," GROUP BY log_banners.BanCod ORDER BY Num DESC");
break; break;
case Sta_ACC_GBL_PER_DEGREE: case Sta_CLICKS_GBL_PER_DEGREE:
sprintf (QueryAux," GROUP BY %s.DegCod ORDER BY Num DESC",LogTable); sprintf (QueryAux," GROUP BY %s.DegCod ORDER BY Num DESC",LogTable);
strcat (Query,QueryAux); strcat (Query,QueryAux);
break; break;
case Sta_ACC_GBL_PER_COURSE: case Sta_CLICKS_GBL_PER_COURSE:
sprintf (QueryAux," GROUP BY %s.CrsCod ORDER BY Num DESC",LogTable); sprintf (QueryAux," GROUP BY %s.CrsCod ORDER BY Num DESC",LogTable);
strcat (Query,QueryAux); strcat (Query,QueryAux);
break; break;
@ -1270,7 +1291,7 @@ static bool Sta_SeeAccesses (void)
Lay_ShowAlert (Lay_INFO,Txt_There_are_no_accesses_with_the_selected_search_criteria); Lay_ShowAlert (Lay_INFO,Txt_There_are_no_accesses_with_the_selected_search_criteria);
else else
{ {
if (Gbl.Stat.ClicksStatType == Sta_ACC_CRS_LISTING) if (Gbl.Stat.ClicksGroupedBy == Sta_CLICKS_CRS_DETAILED_LIST)
{ {
sprintf (Gbl.Message,Txt_List_of_detailed_clicks_in_the_course_X, sprintf (Gbl.Message,Txt_List_of_detailed_clicks_in_the_course_X,
Gbl.CurrentCrs.Crs.FullName); Gbl.CurrentCrs.Crs.FullName);
@ -1279,16 +1300,16 @@ static bool Sta_SeeAccesses (void)
} }
else else
{ {
switch (Gbl.Stat.ClicksStatType) switch (Gbl.Stat.ClicksGroupedBy)
{ {
case Sta_ACC_CRS_PER_USR: case Sta_CLICKS_CRS_PER_USR:
case Sta_ACC_CRS_PER_DAYS: case Sta_CLICKS_CRS_PER_DAYS:
case Sta_ACC_CRS_PER_DAYS_AND_HOUR: case Sta_CLICKS_CRS_PER_DAYS_AND_HOUR:
case Sta_ACC_CRS_PER_WEEKS: case Sta_CLICKS_CRS_PER_WEEKS:
case Sta_ACC_CRS_PER_MONTHS: case Sta_CLICKS_CRS_PER_MONTHS:
case Sta_ACC_CRS_PER_HOUR: case Sta_CLICKS_CRS_PER_HOUR:
case Sta_ACC_CRS_PER_MINUTE: case Sta_CLICKS_CRS_PER_MINUTE:
case Sta_ACC_CRS_PER_ACTION: case Sta_CLICKS_CRS_PER_ACTION:
sprintf (Gbl.Message,Txt_Statistics_of_visits_to_the_course_X, sprintf (Gbl.Message,Txt_Statistics_of_visits_to_the_course_X,
Gbl.CurrentCrs.Crs.FullName); Gbl.CurrentCrs.Crs.FullName);
Lay_WriteTitle (Gbl.Message); Lay_WriteTitle (Gbl.Message);
@ -1343,64 +1364,64 @@ static bool Sta_SeeAccesses (void)
Txt_The_graph_shows_the_NUMBER, Txt_The_graph_shows_the_NUMBER,
Txt_STAT_TYPE_COUNT_SMALL[Gbl.Stat.CountType], Txt_STAT_TYPE_COUNT_SMALL[Gbl.Stat.CountType],
Txt_distributed_by, Txt_distributed_by,
Txt_STAT_CLICK_STAT_TYPES[Gbl.Stat.ClicksStatType]); Txt_STAT_CLICKS_GROUPED_BY[Gbl.Stat.ClicksGroupedBy]);
Lay_WriteTitle (Gbl.Message); Lay_WriteTitle (Gbl.Message);
} }
/***** Put the table with the clicks *****/ /***** Put the table with the clicks *****/
/* Write start of table frame */ /* Write start of table frame */
Lay_StartRoundFrameTable ((Gbl.Stat.ClicksStatType == Sta_ACC_CRS_LISTING) ? "95%" : Lay_StartRoundFrameTable ((Gbl.Stat.ClicksGroupedBy == Sta_CLICKS_CRS_DETAILED_LIST) ? "95%" :
NULL, NULL,
0,NULL); 0,NULL);
switch (Gbl.Stat.ClicksStatType) switch (Gbl.Stat.ClicksGroupedBy)
{ {
case Sta_ACC_CRS_LISTING: case Sta_CLICKS_CRS_DETAILED_LIST:
Sta_ShowDetailedAccessesList (NumRows,mysql_res); Sta_ShowDetailedAccessesList (NumRows,mysql_res);
break; break;
case Sta_ACC_CRS_PER_USR: case Sta_CLICKS_CRS_PER_USR:
Sta_ShowNumAccessesPerUsr (NumRows,mysql_res); Sta_ShowNumAccessesPerUsr (NumRows,mysql_res);
break; break;
case Sta_ACC_CRS_PER_DAYS: case Sta_CLICKS_CRS_PER_DAYS:
case Sta_ACC_GBL_PER_DAYS: case Sta_CLICKS_GBL_PER_DAYS:
Sta_ShowNumAccessesPerDays (NumRows,mysql_res); Sta_ShowNumAccessesPerDays (NumRows,mysql_res);
break; break;
case Sta_ACC_CRS_PER_DAYS_AND_HOUR: case Sta_CLICKS_CRS_PER_DAYS_AND_HOUR:
case Sta_ACC_GBL_PER_DAYS_AND_HOUR: case Sta_CLICKS_GBL_PER_DAYS_AND_HOUR:
Sta_ShowDistrAccessesPerDaysAndHour (NumRows,mysql_res); Sta_ShowDistrAccessesPerDaysAndHour (NumRows,mysql_res);
break; break;
case Sta_ACC_CRS_PER_WEEKS: case Sta_CLICKS_CRS_PER_WEEKS:
case Sta_ACC_GBL_PER_WEEKS: case Sta_CLICKS_GBL_PER_WEEKS:
Sta_ShowNumAccessesPerWeeks (NumRows,mysql_res); Sta_ShowNumAccessesPerWeeks (NumRows,mysql_res);
break; break;
case Sta_ACC_CRS_PER_MONTHS: case Sta_CLICKS_CRS_PER_MONTHS:
case Sta_ACC_GBL_PER_MONTHS: case Sta_CLICKS_GBL_PER_MONTHS:
Sta_ShowNumAccessesPerMonths (NumRows,mysql_res); Sta_ShowNumAccessesPerMonths (NumRows,mysql_res);
break; break;
case Sta_ACC_CRS_PER_HOUR: case Sta_CLICKS_CRS_PER_HOUR:
case Sta_ACC_GBL_PER_HOUR: case Sta_CLICKS_GBL_PER_HOUR:
Sta_ShowNumAccessesPerHour (NumRows,mysql_res); Sta_ShowNumAccessesPerHour (NumRows,mysql_res);
break; break;
case Sta_ACC_CRS_PER_MINUTE: case Sta_CLICKS_CRS_PER_MINUTE:
case Sta_ACC_GBL_PER_MINUTE: case Sta_CLICKS_GBL_PER_MINUTE:
Sta_ShowAverageAccessesPerMinute (NumRows,mysql_res); Sta_ShowAverageAccessesPerMinute (NumRows,mysql_res);
break; break;
case Sta_ACC_CRS_PER_ACTION: case Sta_CLICKS_CRS_PER_ACTION:
case Sta_ACC_GBL_PER_ACTION: case Sta_CLICKS_GBL_PER_ACTION:
Sta_ShowNumAccessesPerAction (NumRows,mysql_res); Sta_ShowNumAccessesPerAction (NumRows,mysql_res);
break; break;
case Sta_ACC_GBL_PER_PLUGIN: case Sta_CLICKS_GBL_PER_PLUGIN:
Sta_ShowNumAccessesPerPlugin (NumRows,mysql_res); Sta_ShowNumAccessesPerPlugin (NumRows,mysql_res);
break; break;
case Sta_ACC_GBL_PER_Svc_FUNCTION: case Sta_CLICKS_GBL_PER_WEB_SERVICE_FUNCTION:
Sta_ShowNumAccessesPerWSFunction (NumRows,mysql_res); Sta_ShowNumAccessesPerWSFunction (NumRows,mysql_res);
break; break;
case Sta_ACC_GBL_PER_BANNER: case Sta_CLICKS_GBL_PER_BANNER:
Sta_ShowNumAccessesPerBanner (NumRows,mysql_res); Sta_ShowNumAccessesPerBanner (NumRows,mysql_res);
break; break;
case Sta_ACC_GBL_PER_DEGREE: case Sta_CLICKS_GBL_PER_DEGREE:
Sta_ShowNumAccessesPerDegree (NumRows,mysql_res); Sta_ShowNumAccessesPerDegree (NumRows,mysql_res);
break; break;
case Sta_ACC_GBL_PER_COURSE: case Sta_CLICKS_GBL_PER_COURSE:
Sta_ShowNumAccessesPerCourse (NumRows,mysql_res); Sta_ShowNumAccessesPerCourse (NumRows,mysql_res);
break; break;
} }
@ -1500,7 +1521,7 @@ static void Sta_ShowDetailedAccessesList (unsigned long NumRows,MYSQL_RES *mysql
{ {
Act_FormStart (ActSeeAccCrs); Act_FormStart (ActSeeAccCrs);
Sta_WriteParamsDatesSeeAccesses (); Sta_WriteParamsDatesSeeAccesses ();
Par_PutHiddenParamUnsigned ("ClickStatType",(unsigned) Sta_ACC_CRS_LISTING); Par_PutHiddenParamUnsigned ("GroupedBy",(unsigned) Sta_CLICKS_CRS_DETAILED_LIST);
Par_PutHiddenParamUnsigned ("StatAct",(unsigned) Gbl.Stat.NumAction); Par_PutHiddenParamUnsigned ("StatAct",(unsigned) Gbl.Stat.NumAction);
Par_PutHiddenParamLong ("FirstRow",FirstRow-Gbl.Stat.RowsPerPage); Par_PutHiddenParamLong ("FirstRow",FirstRow-Gbl.Stat.RowsPerPage);
Par_PutHiddenParamLong ("LastRow",FirstRow-1); Par_PutHiddenParamLong ("LastRow",FirstRow-1);
@ -1535,7 +1556,7 @@ static void Sta_ShowDetailedAccessesList (unsigned long NumRows,MYSQL_RES *mysql
{ {
Act_FormStart (ActSeeAccCrs); Act_FormStart (ActSeeAccCrs);
Sta_WriteParamsDatesSeeAccesses (); Sta_WriteParamsDatesSeeAccesses ();
Par_PutHiddenParamUnsigned ("ClickStatType",(unsigned) Sta_ACC_CRS_LISTING); Par_PutHiddenParamUnsigned ("GroupedBy",(unsigned) Sta_CLICKS_CRS_DETAILED_LIST);
Par_PutHiddenParamUnsigned ("StatAct",(unsigned) Gbl.Stat.NumAction); Par_PutHiddenParamUnsigned ("StatAct",(unsigned) Gbl.Stat.NumAction);
Par_PutHiddenParamUnsigned ("FirstRow",(unsigned) (LastRow+1)); Par_PutHiddenParamUnsigned ("FirstRow",(unsigned) (LastRow+1));
Par_PutHiddenParamUnsigned ("LastRow",(unsigned) (LastRow+Gbl.Stat.RowsPerPage)); Par_PutHiddenParamUnsigned ("LastRow",(unsigned) (LastRow+Gbl.Stat.RowsPerPage));
@ -1708,7 +1729,7 @@ static void Sta_ShowNumAccessesPerUsr (unsigned long NumRows,MYSQL_RES *mysql_re
extern const char *Txt_ID; extern const char *Txt_ID;
extern const char *Txt_Name; extern const char *Txt_Name;
extern const char *Txt_Type; extern const char *Txt_Type;
extern const char *Txt_STAT_TYPE_COUNT_CAPS[Sta_NUM_STAT_COUNT_TYPES]; extern const char *Txt_STAT_TYPE_COUNT_CAPS[Sta_NUM_COUNT_TYPES];
extern const char *Txt_ROLES_SINGUL_Abc[Rol_NUM_ROLES][Usr_NUM_SEXS]; extern const char *Txt_ROLES_SINGUL_Abc[Rol_NUM_ROLES][Usr_NUM_SEXS];
MYSQL_ROW row; MYSQL_ROW row;
unsigned long NumRow; unsigned long NumRow;
@ -1836,7 +1857,7 @@ static void Sta_ShowNumAccessesPerDays (unsigned long NumRows,MYSQL_RES *mysql_r
{ {
extern const char *Txt_Date; extern const char *Txt_Date;
extern const char *Txt_Day; extern const char *Txt_Day;
extern const char *Txt_STAT_TYPE_COUNT_CAPS[Sta_NUM_STAT_COUNT_TYPES]; extern const char *Txt_STAT_TYPE_COUNT_CAPS[Sta_NUM_COUNT_TYPES];
extern const char *Txt_DAYS_SMALL[7]; extern const char *Txt_DAYS_SMALL[7];
unsigned long NumRow; unsigned long NumRow;
struct Date ReadDate,LastDate,Date; struct Date ReadDate,LastDate,Date;
@ -1981,7 +2002,7 @@ static void Sta_ShowDistrAccessesPerDaysAndHour (unsigned long NumRows,MYSQL_RES
extern const char *Txt_STAT_COLOR_TYPES[Sta_NUM_COLOR_TYPES]; extern const char *Txt_STAT_COLOR_TYPES[Sta_NUM_COLOR_TYPES];
extern const char *Txt_Date; extern const char *Txt_Date;
extern const char *Txt_Day; extern const char *Txt_Day;
extern const char *Txt_STAT_TYPE_COUNT_CAPS[Sta_NUM_STAT_COUNT_TYPES]; extern const char *Txt_STAT_TYPE_COUNT_CAPS[Sta_NUM_COUNT_TYPES];
extern const char *Txt_DAYS_SMALL[7]; extern const char *Txt_DAYS_SMALL[7];
Sta_ColorType_t ColorType,SelectedColorType; Sta_ColorType_t ColorType,SelectedColorType;
unsigned long NumRow; unsigned long NumRow;
@ -2002,7 +2023,7 @@ static void Sta_ShowDistrAccessesPerDaysAndHour (unsigned long NumRows,MYSQL_RES
Act_FormStart (Gbl.CurrentAct); Act_FormStart (Gbl.CurrentAct);
Sta_WriteParamsDatesSeeAccesses (); Sta_WriteParamsDatesSeeAccesses ();
Par_PutHiddenParamUnsigned ("ClickStatType",(unsigned) Gbl.Stat.ClicksStatType); Par_PutHiddenParamUnsigned ("GroupedBy",(unsigned) Gbl.Stat.ClicksGroupedBy);
Par_PutHiddenParamUnsigned ("CountType",(unsigned) Gbl.Stat.CountType); Par_PutHiddenParamUnsigned ("CountType",(unsigned) Gbl.Stat.CountType);
Par_PutHiddenParamUnsigned ("StatAct",(unsigned) Gbl.Stat.NumAction); Par_PutHiddenParamUnsigned ("StatAct",(unsigned) Gbl.Stat.NumAction);
if (Gbl.CurrentAct == ActSeeAccCrs) if (Gbl.CurrentAct == ActSeeAccCrs)
@ -2419,7 +2440,7 @@ static void Sta_SetColor (Sta_ColorType_t ColorType,float NumPagesGenerated,floa
static void Sta_ShowNumAccessesPerWeeks (unsigned long NumRows,MYSQL_RES *mysql_res) static void Sta_ShowNumAccessesPerWeeks (unsigned long NumRows,MYSQL_RES *mysql_res)
{ {
extern const char *Txt_Week; extern const char *Txt_Week;
extern const char *Txt_STAT_TYPE_COUNT_CAPS[Sta_NUM_STAT_COUNT_TYPES]; extern const char *Txt_STAT_TYPE_COUNT_CAPS[Sta_NUM_COUNT_TYPES];
unsigned long NumRow; unsigned long NumRow;
struct Date ReadDate,LastDate,Date; struct Date ReadDate,LastDate,Date;
unsigned W,NumWeeksBetweenLastDateAndCurrentDate; unsigned W,NumWeeksBetweenLastDateAndCurrentDate;
@ -2525,7 +2546,7 @@ static void Sta_ShowNumAccessesPerWeeks (unsigned long NumRows,MYSQL_RES *mysql_
static void Sta_ShowNumAccessesPerMonths (unsigned long NumRows,MYSQL_RES *mysql_res) static void Sta_ShowNumAccessesPerMonths (unsigned long NumRows,MYSQL_RES *mysql_res)
{ {
extern const char *Txt_Month; extern const char *Txt_Month;
extern const char *Txt_STAT_TYPE_COUNT_CAPS[Sta_NUM_STAT_COUNT_TYPES]; extern const char *Txt_STAT_TYPE_COUNT_CAPS[Sta_NUM_COUNT_TYPES];
unsigned long NumRow; unsigned long NumRow;
struct Date ReadDate,LastDate,Date; struct Date ReadDate,LastDate,Date;
unsigned M,NumMesesEntreLastDateYAct; unsigned M,NumMesesEntreLastDateYAct;
@ -2943,7 +2964,7 @@ static void Sta_WriteAccessMinute (unsigned Minute,float NumPagesGenerated,float
static void Sta_ShowNumAccessesPerAction (unsigned long NumRows,MYSQL_RES *mysql_res) static void Sta_ShowNumAccessesPerAction (unsigned long NumRows,MYSQL_RES *mysql_res)
{ {
extern const char *Txt_Action; extern const char *Txt_Action;
extern const char *Txt_STAT_TYPE_COUNT_CAPS[Sta_NUM_STAT_COUNT_TYPES]; extern const char *Txt_STAT_TYPE_COUNT_CAPS[Sta_NUM_COUNT_TYPES];
unsigned long NumRow; unsigned long NumRow;
float NumPagesGenerated; float NumPagesGenerated;
float MaxPagesGenerated = 0.0; float MaxPagesGenerated = 0.0;
@ -3014,7 +3035,7 @@ static void Sta_ShowNumAccessesPerAction (unsigned long NumRows,MYSQL_RES *mysql
static void Sta_ShowNumAccessesPerPlugin (unsigned long NumRows,MYSQL_RES *mysql_res) static void Sta_ShowNumAccessesPerPlugin (unsigned long NumRows,MYSQL_RES *mysql_res)
{ {
extern const char *Txt_Plugin; extern const char *Txt_Plugin;
extern const char *Txt_STAT_TYPE_COUNT_CAPS[Sta_NUM_STAT_COUNT_TYPES]; extern const char *Txt_STAT_TYPE_COUNT_CAPS[Sta_NUM_COUNT_TYPES];
unsigned long NumRow; unsigned long NumRow;
float NumPagesGenerated; float NumPagesGenerated;
float MaxPagesGenerated = 0.0; float MaxPagesGenerated = 0.0;
@ -3080,7 +3101,7 @@ static void Sta_ShowNumAccessesPerPlugin (unsigned long NumRows,MYSQL_RES *mysql
static void Sta_ShowNumAccessesPerWSFunction (unsigned long NumRows,MYSQL_RES *mysql_res) static void Sta_ShowNumAccessesPerWSFunction (unsigned long NumRows,MYSQL_RES *mysql_res)
{ {
extern const char *Txt_Function; extern const char *Txt_Function;
extern const char *Txt_STAT_TYPE_COUNT_CAPS[Sta_NUM_STAT_COUNT_TYPES]; extern const char *Txt_STAT_TYPE_COUNT_CAPS[Sta_NUM_COUNT_TYPES];
unsigned long NumRow; unsigned long NumRow;
float NumPagesGenerated; float NumPagesGenerated;
float MaxPagesGenerated = 0.0; float MaxPagesGenerated = 0.0;
@ -3144,7 +3165,7 @@ static void Sta_ShowNumAccessesPerWSFunction (unsigned long NumRows,MYSQL_RES *m
static void Sta_ShowNumAccessesPerBanner (unsigned long NumRows,MYSQL_RES *mysql_res) static void Sta_ShowNumAccessesPerBanner (unsigned long NumRows,MYSQL_RES *mysql_res)
{ {
extern const char *Txt_Banner; extern const char *Txt_Banner;
extern const char *Txt_STAT_TYPE_COUNT_CAPS[Sta_NUM_STAT_COUNT_TYPES]; extern const char *Txt_STAT_TYPE_COUNT_CAPS[Sta_NUM_COUNT_TYPES];
unsigned long NumRow; unsigned long NumRow;
float NumClicks; float NumClicks;
float MaxClicks = 0.0; float MaxClicks = 0.0;
@ -3219,7 +3240,7 @@ static void Sta_ShowNumAccessesPerDegree (unsigned long NumRows,MYSQL_RES *mysql
{ {
extern const char *Txt_No_INDEX; extern const char *Txt_No_INDEX;
extern const char *Txt_Degree; extern const char *Txt_Degree;
extern const char *Txt_STAT_TYPE_COUNT_CAPS[Sta_NUM_STAT_COUNT_TYPES]; extern const char *Txt_STAT_TYPE_COUNT_CAPS[Sta_NUM_COUNT_TYPES];
unsigned long NumRow,Ranking; unsigned long NumRow,Ranking;
float NumPagesGenerated; float NumPagesGenerated;
float MaxPagesGenerated = 0.0; float MaxPagesGenerated = 0.0;
@ -3297,7 +3318,7 @@ static void Sta_ShowNumAccessesPerCourse (unsigned long NumRows,MYSQL_RES *mysql
extern const char *Txt_Degree; extern const char *Txt_Degree;
extern const char *Txt_Year_OF_A_DEGREE; extern const char *Txt_Year_OF_A_DEGREE;
extern const char *Txt_Course; extern const char *Txt_Course;
extern const char *Txt_STAT_TYPE_COUNT_CAPS[Sta_NUM_STAT_COUNT_TYPES]; extern const char *Txt_STAT_TYPE_COUNT_CAPS[Sta_NUM_COUNT_TYPES];
extern const char *Txt_Go_to_X; extern const char *Txt_Go_to_X;
extern const char *Txt_YEAR_OF_DEGREE[1+Deg_MAX_YEARS_PER_DEGREE]; // Declaration in swad_degree.c extern const char *Txt_YEAR_OF_DEGREE[1+Deg_MAX_YEARS_PER_DEGREE]; // Declaration in swad_degree.c
unsigned long NumRow; unsigned long NumRow;
@ -3522,9 +3543,9 @@ void Sta_ReqUseOfPlatform (void)
extern const char *The_ClassForm[The_NUM_THEMES]; extern const char *The_ClassForm[The_NUM_THEMES];
extern const char *Txt_Scope; extern const char *Txt_Scope;
extern const char *Txt_Statistic; extern const char *Txt_Statistic;
extern const char *Txt_STAT_USE_STAT_TYPES[Sta_NUM_TYPES_USE_STATS]; extern const char *Txt_STAT_USE_STAT_TYPES[Sta_NUM_FIGURES];
extern const char *Txt_Show_statistic; extern const char *Txt_Show_statistic;
Sta_UseStatType_t UseStatType; Sta_FigureType_t UseStatType;
/***** Start form *****/ /***** Start form *****/
fprintf (Gbl.F.Out,"<div class=\"CENTER_MIDDLE\"" fprintf (Gbl.F.Out,"<div class=\"CENTER_MIDDLE\""
@ -3549,8 +3570,8 @@ void Sta_ReqUseOfPlatform (void)
fprintf (Gbl.F.Out,"<br />" fprintf (Gbl.F.Out,"<br />"
"%s: <select name=\"UseStatType\">", "%s: <select name=\"UseStatType\">",
Txt_Statistic); Txt_Statistic);
for (UseStatType = (Sta_UseStatType_t) 0; for (UseStatType = (Sta_FigureType_t) 0;
UseStatType < Sta_NUM_TYPES_USE_STATS; UseStatType < Sta_NUM_FIGURES;
UseStatType++) UseStatType++)
{ {
fprintf (Gbl.F.Out,"<option value=\"%u\"", fprintf (Gbl.F.Out,"<option value=\"%u\"",
@ -3586,9 +3607,9 @@ void Sta_ShowUseOfPlatform (void)
Par_GetParToText ("UseStatType",UnsignedStr,10); Par_GetParToText ("UseStatType",UnsignedStr,10);
if (sscanf (UnsignedStr,"%u",&UnsignedNum) != 1) if (sscanf (UnsignedStr,"%u",&UnsignedNum) != 1)
Lay_ShowErrorAndExit ("Type of stat is missing."); Lay_ShowErrorAndExit ("Type of stat is missing.");
if (UnsignedNum >= Sta_NUM_TYPES_USE_STATS) if (UnsignedNum >= Sta_NUM_FIGURES)
Lay_ShowErrorAndExit ("Type of stat is missing."); Lay_ShowErrorAndExit ("Type of stat is missing.");
Gbl.Stat.UseStatType = (Sta_UseStatType_t) UnsignedNum; Gbl.Stat.UseStatType = (Sta_FigureType_t) UnsignedNum;
/***** Show again the form to see use of the platform *****/ /***** Show again the form to see use of the platform *****/
Sta_ReqUseOfPlatform (); Sta_ReqUseOfPlatform ();
@ -3690,7 +3711,7 @@ void Sta_ShowUseOfPlatform (void)
static void Sta_GetAndShowUsersStats (void) static void Sta_GetAndShowUsersStats (void)
{ {
extern const char *Txt_STAT_USE_STAT_TYPES[Sta_NUM_TYPES_USE_STATS]; extern const char *Txt_STAT_USE_STAT_TYPES[Sta_NUM_FIGURES];
extern const char *Txt_Users; extern const char *Txt_Users;
extern const char *Txt_No_of_users; extern const char *Txt_No_of_users;
extern const char *Txt_Average_number_of_courses_to_which_a_user_belongs; extern const char *Txt_Average_number_of_courses_to_which_a_user_belongs;
@ -3730,7 +3751,7 @@ static void Sta_GetAndShowUsersStats (void)
static void Sta_GetAndShowUsersRanking (void) static void Sta_GetAndShowUsersRanking (void)
{ {
extern const char *Txt_STAT_USE_STAT_TYPES[Sta_NUM_TYPES_USE_STATS]; extern const char *Txt_STAT_USE_STAT_TYPES[Sta_NUM_FIGURES];
extern const char *Txt_Clicks; extern const char *Txt_Clicks;
extern const char *Txt_Clicks_per_day; extern const char *Txt_Clicks_per_day;
extern const char *Txt_Downloads; extern const char *Txt_Downloads;
@ -3800,7 +3821,7 @@ static void Sta_GetAndShowUsersRanking (void)
static void Sta_GetAndShowHierarchyStats (void) static void Sta_GetAndShowHierarchyStats (void)
{ {
extern const char *Txt_STAT_USE_STAT_TYPES[Sta_NUM_TYPES_USE_STATS]; extern const char *Txt_STAT_USE_STAT_TYPES[Sta_NUM_FIGURES];
Lay_StartRoundFrameTable (NULL,2,Txt_STAT_USE_STAT_TYPES[Sta_HIERARCHY]); Lay_StartRoundFrameTable (NULL,2,Txt_STAT_USE_STAT_TYPES[Sta_HIERARCHY]);
Sta_WriteHeadDegsCrssInSWAD (); Sta_WriteHeadDegsCrssInSWAD ();
@ -4919,7 +4940,7 @@ unsigned Sta_GetTotalNumberOfUsers (Sco_Scope_t Scope,Rol_Role_t Role)
static void Sta_GetAndShowFileBrowsersStats (void) static void Sta_GetAndShowFileBrowsersStats (void)
{ {
extern const char *Txt_STAT_USE_STAT_TYPES[Sta_NUM_TYPES_USE_STATS]; extern const char *Txt_STAT_USE_STAT_TYPES[Sta_NUM_FIGURES];
extern const char *Txt_STAT_COURSE_FILE_ZONES[]; extern const char *Txt_STAT_COURSE_FILE_ZONES[];
extern const char *Txt_Virtual_pendrives; extern const char *Txt_Virtual_pendrives;
static const Brw_FileBrowser_t StatCrsFileZones[Sta_NUM_STAT_CRS_FILE_ZONES] = static const Brw_FileBrowser_t StatCrsFileZones[Sta_NUM_STAT_CRS_FILE_ZONES] =
@ -5764,7 +5785,7 @@ static void Sta_GetSizeOfFileZoneFromDB (Sco_Scope_t Scope,
static void Sta_GetAndShowOERsStats (void) static void Sta_GetAndShowOERsStats (void)
{ {
extern const char *Txt_STAT_USE_STAT_TYPES[Sta_NUM_TYPES_USE_STATS]; extern const char *Txt_STAT_USE_STAT_TYPES[Sta_NUM_FIGURES];
extern const char *Txt_License; extern const char *Txt_License;
extern const char *Txt_No_of_private_files; extern const char *Txt_No_of_private_files;
extern const char *Txt_No_of_public_files; extern const char *Txt_No_of_public_files;
@ -5941,7 +5962,7 @@ static void Sta_GetNumberOfOERsFromDB (Sco_Scope_t Scope,Brw_License_t License,u
static void Sta_GetAndShowAssignmentsStats (void) static void Sta_GetAndShowAssignmentsStats (void)
{ {
extern const char *Txt_STAT_USE_STAT_TYPES[Sta_NUM_TYPES_USE_STATS]; extern const char *Txt_STAT_USE_STAT_TYPES[Sta_NUM_FIGURES];
extern const char *Txt_Number_of_BR_assignments; extern const char *Txt_Number_of_BR_assignments;
extern const char *Txt_Number_of_BR_courses_with_BR_assignments; extern const char *Txt_Number_of_BR_courses_with_BR_assignments;
extern const char *Txt_Average_number_BR_of_ASSIG_BR_per_course; extern const char *Txt_Average_number_BR_of_ASSIG_BR_per_course;
@ -6010,7 +6031,7 @@ static void Sta_GetAndShowAssignmentsStats (void)
static void Sta_GetAndShowTestsStats (void) static void Sta_GetAndShowTestsStats (void)
{ {
extern const char *Txt_STAT_USE_STAT_TYPES[Sta_NUM_TYPES_USE_STATS]; extern const char *Txt_STAT_USE_STAT_TYPES[Sta_NUM_FIGURES];
extern const char *Txt_Type_of_BR_answers; extern const char *Txt_Type_of_BR_answers;
extern const char *Txt_Number_of_BR_courses_BR_with_test_BR_questions; extern const char *Txt_Number_of_BR_courses_BR_with_test_BR_questions;
extern const char *Txt_Number_of_BR_courses_with_BR_exportable_BR_test_BR_questions; extern const char *Txt_Number_of_BR_courses_with_BR_exportable_BR_test_BR_questions;
@ -6177,7 +6198,7 @@ static void Sta_GetAndShowTestsStats (void)
static void Sta_GetAndShowNumUsrsPerNotifyEvent (void) static void Sta_GetAndShowNumUsrsPerNotifyEvent (void)
{ {
extern const char *Txt_STAT_USE_STAT_TYPES[Sta_NUM_TYPES_USE_STATS]; extern const char *Txt_STAT_USE_STAT_TYPES[Sta_NUM_FIGURES];
extern const char *Txt_Event; extern const char *Txt_Event;
extern const char *Txt_NOTIFY_EVENTS_PLURAL[Ntf_NUM_NOTIFY_EVENTS]; extern const char *Txt_NOTIFY_EVENTS_PLURAL[Ntf_NUM_NOTIFY_EVENTS];
extern const char *Txt_No_of_users; extern const char *Txt_No_of_users;
@ -6504,7 +6525,7 @@ static void Sta_GetAndShowNumUsrsPerNotifyEvent (void)
static void Sta_GetAndShowNoticesStats (void) static void Sta_GetAndShowNoticesStats (void)
{ {
extern const char *Txt_STAT_USE_STAT_TYPES[Sta_NUM_TYPES_USE_STATS]; extern const char *Txt_STAT_USE_STAT_TYPES[Sta_NUM_FIGURES];
extern const char *Txt_NOTICE_Active_BR_notices; extern const char *Txt_NOTICE_Active_BR_notices;
extern const char *Txt_NOTICE_Obsolete_BR_notices; extern const char *Txt_NOTICE_Obsolete_BR_notices;
extern const char *Txt_NOTICE_Deleted_BR_notices; extern const char *Txt_NOTICE_Deleted_BR_notices;
@ -6592,7 +6613,7 @@ static void Sta_GetAndShowNoticesStats (void)
static void Sta_GetAndShowMsgsStats (void) static void Sta_GetAndShowMsgsStats (void)
{ {
extern const char *Txt_STAT_USE_STAT_TYPES[Sta_NUM_TYPES_USE_STATS]; extern const char *Txt_STAT_USE_STAT_TYPES[Sta_NUM_FIGURES];
extern const char *Txt_Messages; extern const char *Txt_Messages;
extern const char *Txt_MSGS_Not_deleted; extern const char *Txt_MSGS_Not_deleted;
extern const char *Txt_MSGS_Deleted; extern const char *Txt_MSGS_Deleted;
@ -6694,7 +6715,7 @@ static void Sta_GetAndShowMsgsStats (void)
static void Sta_GetAndShowForumStats (void) static void Sta_GetAndShowForumStats (void)
{ {
extern const char *Txt_STAT_USE_STAT_TYPES[Sta_NUM_TYPES_USE_STATS]; extern const char *Txt_STAT_USE_STAT_TYPES[Sta_NUM_FIGURES];
extern const char *Txt_Scope; extern const char *Txt_Scope;
extern const char *Txt_Forums; extern const char *Txt_Forums;
extern const char *Txt_No_of_forums; extern const char *Txt_No_of_forums;
@ -7045,7 +7066,7 @@ static void Sta_WriteForumTotalStats (struct Sta_StatsForum *StatsForum)
static void Sta_GetAndShowSurveysStats (void) static void Sta_GetAndShowSurveysStats (void)
{ {
extern const char *Txt_STAT_USE_STAT_TYPES[Sta_NUM_TYPES_USE_STATS]; extern const char *Txt_STAT_USE_STAT_TYPES[Sta_NUM_FIGURES];
extern const char *Txt_Number_of_BR_surveys; extern const char *Txt_Number_of_BR_surveys;
extern const char *Txt_Number_of_BR_courses_with_BR_surveys; extern const char *Txt_Number_of_BR_courses_with_BR_surveys;
extern const char *Txt_Average_number_BR_of_surveys_BR_per_course; extern const char *Txt_Average_number_BR_of_surveys_BR_per_course;
@ -7129,7 +7150,7 @@ static void Sta_GetAndShowNumUsrsPerPrivacy (void)
{ {
extern const char *Txt_Photo; extern const char *Txt_Photo;
extern const char *Txt_Public_profile; extern const char *Txt_Public_profile;
extern const char *Txt_STAT_USE_STAT_TYPES[Sta_NUM_TYPES_USE_STATS]; extern const char *Txt_STAT_USE_STAT_TYPES[Sta_NUM_FIGURES];
Lay_StartRoundFrameTable (NULL,2,Txt_STAT_USE_STAT_TYPES[Sta_PRIVACY]); Lay_StartRoundFrameTable (NULL,2,Txt_STAT_USE_STAT_TYPES[Sta_PRIVACY]);
@ -7285,7 +7306,7 @@ static void Sta_GetAndShowNumUsrsPerPrivacyForAnObject (const char *TxtObject,co
static void Sta_GetAndShowNumUsrsPerLanguage (void) static void Sta_GetAndShowNumUsrsPerLanguage (void)
{ {
extern const char *Txt_STAT_USE_STAT_TYPES[Sta_NUM_TYPES_USE_STATS]; extern const char *Txt_STAT_USE_STAT_TYPES[Sta_NUM_FIGURES];
extern const char *Txt_Language; extern const char *Txt_Language;
extern const char *Txt_STR_LANG_ID[Txt_NUM_LANGUAGES]; extern const char *Txt_STR_LANG_ID[Txt_NUM_LANGUAGES];
extern const char *Txt_STR_LANG_NAME[Txt_NUM_LANGUAGES]; extern const char *Txt_STR_LANG_NAME[Txt_NUM_LANGUAGES];
@ -7422,7 +7443,7 @@ static void Sta_GetAndShowNumUsrsPerLanguage (void)
static void Sta_GetAndShowNumUsrsPerLayout (void) static void Sta_GetAndShowNumUsrsPerLayout (void)
{ {
extern const char *Lay_LayoutIcons[Lay_NUM_LAYOUTS]; extern const char *Lay_LayoutIcons[Lay_NUM_LAYOUTS];
extern const char *Txt_STAT_USE_STAT_TYPES[Sta_NUM_TYPES_USE_STATS]; extern const char *Txt_STAT_USE_STAT_TYPES[Sta_NUM_FIGURES];
extern const char *Txt_Layout; extern const char *Txt_Layout;
extern const char *Txt_No_of_users; extern const char *Txt_No_of_users;
extern const char *Txt_PERCENT_of_users; extern const char *Txt_PERCENT_of_users;
@ -7559,7 +7580,7 @@ static void Sta_GetAndShowNumUsrsPerTheme (void)
{ {
extern const char *The_ThemeId[The_NUM_THEMES]; extern const char *The_ThemeId[The_NUM_THEMES];
extern const char *The_ThemeNames[The_NUM_THEMES]; extern const char *The_ThemeNames[The_NUM_THEMES];
extern const char *Txt_STAT_USE_STAT_TYPES[Sta_NUM_TYPES_USE_STATS]; extern const char *Txt_STAT_USE_STAT_TYPES[Sta_NUM_FIGURES];
extern const char *Txt_Theme_SKIN; extern const char *Txt_Theme_SKIN;
extern const char *Txt_No_of_users; extern const char *Txt_No_of_users;
extern const char *Txt_PERCENT_of_users; extern const char *Txt_PERCENT_of_users;
@ -7695,7 +7716,7 @@ static void Sta_GetAndShowNumUsrsPerIconSet (void)
{ {
extern const char *Ico_IconSetId[Ico_NUM_ICON_SETS]; extern const char *Ico_IconSetId[Ico_NUM_ICON_SETS];
extern const char *Ico_IconSetNames[Ico_NUM_ICON_SETS]; extern const char *Ico_IconSetNames[Ico_NUM_ICON_SETS];
extern const char *Txt_STAT_USE_STAT_TYPES[Sta_NUM_TYPES_USE_STATS]; extern const char *Txt_STAT_USE_STAT_TYPES[Sta_NUM_FIGURES];
extern const char *Txt_Icons; extern const char *Txt_Icons;
extern const char *Txt_No_of_users; extern const char *Txt_No_of_users;
extern const char *Txt_PERCENT_of_users; extern const char *Txt_PERCENT_of_users;
@ -7832,7 +7853,7 @@ static void Sta_GetAndShowNumUsrsPerIconSet (void)
static void Sta_GetAndShowNumUsrsPerMenu (void) static void Sta_GetAndShowNumUsrsPerMenu (void)
{ {
extern const char *Mnu_MenuIcons[Mnu_NUM_MENUS]; extern const char *Mnu_MenuIcons[Mnu_NUM_MENUS];
extern const char *Txt_STAT_USE_STAT_TYPES[Sta_NUM_TYPES_USE_STATS]; extern const char *Txt_STAT_USE_STAT_TYPES[Sta_NUM_FIGURES];
extern const char *Txt_Menu; extern const char *Txt_Menu;
extern const char *Txt_No_of_users; extern const char *Txt_No_of_users;
extern const char *Txt_PERCENT_of_users; extern const char *Txt_PERCENT_of_users;
@ -7967,7 +7988,7 @@ static void Sta_GetAndShowNumUsrsPerMenu (void)
static void Sta_GetAndShowNumUsrsPerSideColumns (void) static void Sta_GetAndShowNumUsrsPerSideColumns (void)
{ {
extern const char *Txt_STAT_USE_STAT_TYPES[Sta_NUM_TYPES_USE_STATS]; extern const char *Txt_STAT_USE_STAT_TYPES[Sta_NUM_FIGURES];
extern const char *Txt_Columns; extern const char *Txt_Columns;
extern const char *Txt_No_of_users; extern const char *Txt_No_of_users;
extern const char *Txt_PERCENT_of_users; extern const char *Txt_PERCENT_of_users;

View File

@ -49,7 +49,7 @@ typedef enum
Sta_ME = 10, Sta_ME = 10,
} Sta_Role_t; } Sta_Role_t;
#define Sta_NUM_STAT_COUNT_TYPES 5 #define Sta_NUM_COUNT_TYPES 5
typedef enum typedef enum
{ {
Sta_TOTAL_CLICKS = 0, Sta_TOTAL_CLICKS = 0,
@ -59,34 +59,42 @@ typedef enum
Sta_SEND_TIME = 4, Sta_SEND_TIME = 4,
} Sta_CountType_t; } Sta_CountType_t;
#define Sta_NUM_TYPES_CLICK_STATS 21 #define Sta_NUM_CLICKS_DETAILED_OR_GROUPED 2
typedef enum typedef enum
{ {
Sta_ACC_CRS_LISTING = 0, Sta_CLICKS_DETAILED = 0,
Sta_ACC_CRS_PER_USR = 1, Sta_CLICKS_GROUPED = 1,
Sta_ACC_CRS_PER_DAYS = 2, } Sta_ClicksDetailedOrGrouped_t;
Sta_ACC_CRS_PER_DAYS_AND_HOUR = 3,
Sta_ACC_CRS_PER_WEEKS = 4,
Sta_ACC_CRS_PER_MONTHS = 5,
Sta_ACC_CRS_PER_HOUR = 6,
Sta_ACC_CRS_PER_MINUTE = 7,
Sta_ACC_CRS_PER_ACTION = 8,
Sta_ACC_GBL_PER_DAYS = 9, #define Sta_NUM_CLICKS_GROUPED_BY 21
Sta_ACC_GBL_PER_DAYS_AND_HOUR = 10, typedef enum
Sta_ACC_GBL_PER_WEEKS = 11, {
Sta_ACC_GBL_PER_MONTHS = 12, Sta_CLICKS_CRS_DETAILED_LIST = 0,
Sta_ACC_GBL_PER_HOUR = 13,
Sta_ACC_GBL_PER_MINUTE = 14,
Sta_ACC_GBL_PER_ACTION = 15,
Sta_ACC_GBL_PER_PLUGIN = 16,
Sta_ACC_GBL_PER_Svc_FUNCTION = 17,
Sta_ACC_GBL_PER_BANNER = 18,
Sta_ACC_GBL_PER_DEGREE = 19,
Sta_ACC_GBL_PER_COURSE = 20,
} Sta_ClicksStatType_t;
#define Sta_NUM_TYPES_USE_STATS 21 Sta_CLICKS_CRS_PER_USR = 1,
Sta_CLICKS_CRS_PER_DAYS = 2,
Sta_CLICKS_CRS_PER_DAYS_AND_HOUR = 3,
Sta_CLICKS_CRS_PER_WEEKS = 4,
Sta_CLICKS_CRS_PER_MONTHS = 5,
Sta_CLICKS_CRS_PER_HOUR = 6,
Sta_CLICKS_CRS_PER_MINUTE = 7,
Sta_CLICKS_CRS_PER_ACTION = 8,
Sta_CLICKS_GBL_PER_DAYS = 9,
Sta_CLICKS_GBL_PER_DAYS_AND_HOUR = 10,
Sta_CLICKS_GBL_PER_WEEKS = 11,
Sta_CLICKS_GBL_PER_MONTHS = 12,
Sta_CLICKS_GBL_PER_HOUR = 13,
Sta_CLICKS_GBL_PER_MINUTE = 14,
Sta_CLICKS_GBL_PER_ACTION = 15,
Sta_CLICKS_GBL_PER_PLUGIN = 16,
Sta_CLICKS_GBL_PER_WEB_SERVICE_FUNCTION = 17,
Sta_CLICKS_GBL_PER_BANNER = 18,
Sta_CLICKS_GBL_PER_DEGREE = 19,
Sta_CLICKS_GBL_PER_COURSE = 20,
} Sta_ClicksGroupedBy_t;
#define Sta_NUM_FIGURES 21
typedef enum typedef enum
{ {
Sta_USERS, // Number of users Sta_USERS, // Number of users
@ -110,7 +118,7 @@ typedef enum
Sta_ICON_SETS, // Number of users per icon set Sta_ICON_SETS, // Number of users per icon set
Sta_MENUS, // Number of users per menu Sta_MENUS, // Number of users per menu
Sta_SIDE_COLUMNS, // Number of users per layout of columns Sta_SIDE_COLUMNS, // Number of users per layout of columns
} Sta_UseStatType_t; } Sta_FigureType_t;
#define Sta_NUM_COLOR_TYPES 3 #define Sta_NUM_COLOR_TYPES 3
typedef enum typedef enum

View File

@ -19970,7 +19970,7 @@ const char *Txt_MENU_SUBTITLE[Tab_NUM_TABS][Act_MAX_OPTIONS_IN_MENU_PER_TAB] =
#elif L==1 #elif L==1
"Zugriffsstatistik auf die Plattform" "Zugriffsstatistik auf die Plattform"
#elif L==2 #elif L==2
"Access statistics to the platform" "Statistics of access to the platform"
#elif L==3 #elif L==3
"Estad&iacute;sticas de acceso a la plataforma" "Estad&iacute;sticas de acceso a la plataforma"
#elif L==4 #elif L==4
@ -34966,26 +34966,26 @@ const char *Txt_Start_date =
"Data de in&iacute;cio"; "Data de in&iacute;cio";
#endif #endif
const char *Txt_STAT_CLICK_STAT_TYPES[Sta_NUM_TYPES_CLICK_STATS] = const char *Txt_STAT_CLICKS_GROUPED_BY[Sta_NUM_CLICKS_GROUPED_BY] =
{ {
#if L==0 #if L==0
"Mostra clics detallats" "clics detallats"
#elif L==1 #elif L==1
"Zeige detaillierte Klicks" "detaillierte Klicks"
#elif L==2 #elif L==2
"Show detailed clicks" "detailed clicks"
#elif L==3 #elif L==3
"Mostrar clics detallados" "clics detallados"
#elif L==4 #elif L==4
"Afficher clics d&eacute;taill&eacute;es" "clics d&eacute;taill&eacute;es"
#elif L==5 #elif L==5
"Mostrar clics detallados" // Okoteve traducción "clics detallados" // Okoteve traducción
#elif L==6 #elif L==6
"Visualizza dettagli di scatto" "dettagli di scatto"
#elif L==7 #elif L==7
"Poka&zdot; szczeg&oacute;&lstrok;owe klikni&eogon;&cacute;" "szczeg&oacute;&lstrok;owe klikni&eogon;&cacute;"
#elif L==8 #elif L==8
"Mostrar detalhadamente cliques" "detalhadamente cliques"
#endif #endif
, ,
#if L==0 #if L==0
@ -35801,7 +35801,7 @@ const char *Txt_STAT_DEGREE_PHOTO_ORDER[Pho_NUM_HOW_ORDER_DEGREES] =
#endif #endif
}; };
const char *Txt_STAT_TYPE_COUNT_CAPS[Sta_NUM_STAT_COUNT_TYPES] = const char *Txt_STAT_TYPE_COUNT_CAPS[Sta_NUM_COUNT_TYPES] =
{ {
#if L==0 #if L==0
"N&ordm; total de clics" // Necessita traduccio "N&ordm; total de clics" // Necessita traduccio
@ -35904,7 +35904,7 @@ const char *Txt_STAT_TYPE_COUNT_CAPS[Sta_NUM_STAT_COUNT_TYPES] =
#endif #endif
}; };
const char *Txt_STAT_TYPE_COUNT_SMALL[Sta_NUM_STAT_COUNT_TYPES] = const char *Txt_STAT_TYPE_COUNT_SMALL[Sta_NUM_COUNT_TYPES] =
{ {
#if L==0 #if L==0
"n&ordm; total de clics" // Necessita traduccio "n&ordm; total de clics" // Necessita traduccio
@ -36007,7 +36007,7 @@ const char *Txt_STAT_TYPE_COUNT_SMALL[Sta_NUM_STAT_COUNT_TYPES] =
#endif #endif
}; };
const char *Txt_STAT_USE_STAT_TYPES[Sta_NUM_TYPES_USE_STATS] = const char *Txt_STAT_USE_STAT_TYPES[Sta_NUM_FIGURES] =
{ {
#if L==0 // Sta_USERS #if L==0 // Sta_USERS
"Usuaris" "Usuaris"
@ -36451,6 +36451,27 @@ const char *Txt_Statistic =
"Estat&iacute;sticas"; "Estat&iacute;sticas";
#endif #endif
const char *Txt_Statistics_of_access =
#if L==0
"Estad&iacute;stiques d'accesso";
#elif L==1
"Zugriffsstatistik";
#elif L==2
"Statistics of access";
#elif L==3
"Estad&iacute;sticas de acceso";
#elif L==4
"Statistiques de connexion";
#elif L==5
"Estad&iacute;sticas de acceso"; // Okoteve traducción
#elif L==6
"Statistiche di accesso";
#elif L==7
"Statystyki dost&eogon;p";
#elif L==8
"Estat&iacute;sticas de acesso";
#endif
const char *Txt_Statistics_of_all_visits = const char *Txt_Statistics_of_all_visits =
#if L==0 #if L==0
"Estad&iacute;stica de todos los accesos"; // Necessita traduccio "Estad&iacute;stica de todos los accesos"; // Necessita traduccio