mirror of
https://github.com/acanas/swad-core.git
synced 2024-05-28 20:43:27 +02:00
Version 17.2.1
This commit is contained in:
parent
06ba4b2d99
commit
e8fa04ae43
|
@ -252,13 +252,14 @@
|
||||||
/****************************** Public constants *****************************/
|
/****************************** Public constants *****************************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
#define Log_PLATFORM_VERSION "SWAD 17.2 (2017-09-17)"
|
#define Log_PLATFORM_VERSION "SWAD 17.2.1 (2017-09-17)"
|
||||||
#define CSS_FILE "swad17.0.css"
|
#define CSS_FILE "swad17.0.css"
|
||||||
#define JS_FILE "swad16.206.3.js"
|
#define JS_FILE "swad16.206.3.js"
|
||||||
|
|
||||||
// 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
|
||||||
/*
|
/*
|
||||||
|
Version 17.2.1: Sep 17, 2017 New option for projects. Not finished. (229884 lines)
|
||||||
Version 17.2: Sep 17, 2017 New option for projects. Not finished. (229575 lines)
|
Version 17.2: Sep 17, 2017 New option for projects. Not finished. (229575 lines)
|
||||||
12 changes necessary in database:
|
12 changes necessary in database:
|
||||||
CREATE TABLE IF NOT EXISTS projects (PrjCod INT NOT NULL AUTO_INCREMENT,CrsCod INT NOT NULL DEFAULT -1,Hidden ENUM('N','Y') NOT NULL DEFAULT 'N',NumNotif INT NOT NULL DEFAULT 0,UsrCod INT NOT NULL,StartTime DATETIME NOT NULL,EndTime DATETIME NOT NULL,Title VARCHAR(2047) NOT NULL,Folder VARBINARY(255) NOT NULL,Txt TEXT NOT NULL,UNIQUE INDEX(PrjCod),INDEX(CrsCod,Hidden));
|
CREATE TABLE IF NOT EXISTS projects (PrjCod INT NOT NULL AUTO_INCREMENT,CrsCod INT NOT NULL DEFAULT -1,Hidden ENUM('N','Y') NOT NULL DEFAULT 'N',NumNotif INT NOT NULL DEFAULT 0,UsrCod INT NOT NULL,StartTime DATETIME NOT NULL,EndTime DATETIME NOT NULL,Title VARCHAR(2047) NOT NULL,Folder VARBINARY(255) NOT NULL,Txt TEXT NOT NULL,UNIQUE INDEX(PrjCod),INDEX(CrsCod,Hidden));
|
||||||
|
|
14
swad_game.c
14
swad_game.c
|
@ -326,7 +326,7 @@ static void Gam_PutIconsListGames (void)
|
||||||
Gam_PutIconToCreateNewGame ();
|
Gam_PutIconToCreateNewGame ();
|
||||||
|
|
||||||
/***** Put icon to show a figure *****/
|
/***** Put icon to show a figure *****/
|
||||||
Gbl.Stat.FigureType = Sta_SURVEYS;
|
Gbl.Stat.FigureType = Sta_GAMES;
|
||||||
Sta_PutIconToShowFigure ();
|
Sta_PutIconToShowFigure ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3821,10 +3821,9 @@ static unsigned Gam_GetNumUsrsWhoHaveAnsweredGame (long GamCod)
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/********************* Get number of courses with games **********************/
|
/********************* Get number of courses with games **********************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
// Returns the number of courses with games for courses
|
// Returns the number of courses with games in this location
|
||||||
// in this location (all the platform, current degree or current course)
|
|
||||||
|
|
||||||
unsigned Gam_GetNumCoursesWithCrsGames (Sco_Scope_t Scope)
|
unsigned Gam_GetNumCoursesWithGames (Sco_Scope_t Scope)
|
||||||
{
|
{
|
||||||
extern const char *Sco_ScopeDB[Sco_NUM_SCOPES];
|
extern const char *Sco_ScopeDB[Sco_NUM_SCOPES];
|
||||||
char Query[1024];
|
char Query[1024];
|
||||||
|
@ -3908,12 +3907,11 @@ unsigned Gam_GetNumCoursesWithCrsGames (Sco_Scope_t Scope)
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/********************* Get number of games for courses ***********************/
|
/**************************** Get number of games ****************************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
// Returns the number of games for courses
|
// Returns the number of games in this location
|
||||||
// in this location (all the platform, current degree or current course)
|
|
||||||
|
|
||||||
unsigned Gam_GetNumCrsGames (Sco_Scope_t Scope)
|
unsigned Gam_GetNumGames (Sco_Scope_t Scope)
|
||||||
{
|
{
|
||||||
extern const char *Sco_ScopeDB[Sco_NUM_SCOPES];
|
extern const char *Sco_ScopeDB[Sco_NUM_SCOPES];
|
||||||
char Query[1024];
|
char Query[1024];
|
||||||
|
|
|
@ -128,8 +128,8 @@ void Gam_ReceiveGameAnswers (void);
|
||||||
void Gam_PlayGameNextQuestion (void);
|
void Gam_PlayGameNextQuestion (void);
|
||||||
void Gam_PlayGameShowAnswers (void);
|
void Gam_PlayGameShowAnswers (void);
|
||||||
|
|
||||||
unsigned Gam_GetNumCoursesWithCrsGames (Sco_Scope_t Scope);
|
unsigned Gam_GetNumCoursesWithGames (Sco_Scope_t Scope);
|
||||||
unsigned Gam_GetNumCrsGames (Sco_Scope_t Scope);
|
unsigned Gam_GetNumGames (Sco_Scope_t Scope);
|
||||||
float Gam_GetNumQstsPerCrsGame (Sco_Scope_t Scope);
|
float Gam_GetNumQstsPerCrsGame (Sco_Scope_t Scope);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -2532,6 +2532,27 @@ const char *Hlp_STATS_Figures_assignments =
|
||||||
"STATS.Figures.en#assignments";
|
"STATS.Figures.en#assignments";
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
const char *Hlp_STATS_Figures_projects =
|
||||||
|
#if L==1
|
||||||
|
"STATS.Figures.es#proyectos";
|
||||||
|
#elif L==2
|
||||||
|
"STATS.Figures.en#projects";
|
||||||
|
#elif L==3
|
||||||
|
"STATS.Figures.en#projects";
|
||||||
|
#elif L==4
|
||||||
|
"STATS.Figures.es#proyectos";
|
||||||
|
#elif L==5
|
||||||
|
"STATS.Figures.en#projects";
|
||||||
|
#elif L==6
|
||||||
|
"STATS.Figures.es#proyectos";
|
||||||
|
#elif L==7
|
||||||
|
"STATS.Figures.en#projects";
|
||||||
|
#elif L==8
|
||||||
|
"STATS.Figures.en#projects";
|
||||||
|
#elif L==9
|
||||||
|
"STATS.Figures.en#projects";
|
||||||
|
#endif
|
||||||
|
|
||||||
const char *Hlp_STATS_Figures_tests =
|
const char *Hlp_STATS_Figures_tests =
|
||||||
#if L==1
|
#if L==1
|
||||||
"STATS.Figures.es#tests";
|
"STATS.Figures.es#tests";
|
||||||
|
@ -2553,6 +2574,48 @@ const char *Hlp_STATS_Figures_tests =
|
||||||
"STATS.Figures.en#tests";
|
"STATS.Figures.en#tests";
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
const char *Hlp_STATS_Figures_games =
|
||||||
|
#if L==1
|
||||||
|
"STATS.Figures.es#juegos";
|
||||||
|
#elif L==2
|
||||||
|
"STATS.Figures.en#games";
|
||||||
|
#elif L==3
|
||||||
|
"STATS.Figures.en#games";
|
||||||
|
#elif L==4
|
||||||
|
"STATS.Figures.es#juegos";
|
||||||
|
#elif L==5
|
||||||
|
"STATS.Figures.en#games";
|
||||||
|
#elif L==6
|
||||||
|
"STATS.Figures.es#juegos";
|
||||||
|
#elif L==7
|
||||||
|
"STATS.Figures.en#games";
|
||||||
|
#elif L==8
|
||||||
|
"STATS.Figures.en#games";
|
||||||
|
#elif L==9
|
||||||
|
"STATS.Figures.en#games";
|
||||||
|
#endif
|
||||||
|
|
||||||
|
const char *Hlp_STATS_Figures_surveys =
|
||||||
|
#if L==1
|
||||||
|
"STATS.Figures.es#encuestas";
|
||||||
|
#elif L==2
|
||||||
|
"STATS.Figures.en#surveys";
|
||||||
|
#elif L==3
|
||||||
|
"STATS.Figures.en#surveys";
|
||||||
|
#elif L==4
|
||||||
|
"STATS.Figures.es#encuestas";
|
||||||
|
#elif L==5
|
||||||
|
"STATS.Figures.en#surveys";
|
||||||
|
#elif L==6
|
||||||
|
"STATS.Figures.es#encuestas";
|
||||||
|
#elif L==7
|
||||||
|
"STATS.Figures.en#surveys";
|
||||||
|
#elif L==8
|
||||||
|
"STATS.Figures.en#surveys";
|
||||||
|
#elif L==9
|
||||||
|
"STATS.Figures.en#surveys";
|
||||||
|
#endif
|
||||||
|
|
||||||
const char *Hlp_STATS_Figures_timeline =
|
const char *Hlp_STATS_Figures_timeline =
|
||||||
#if L==1
|
#if L==1
|
||||||
"STATS.Figures.es#timeline";
|
"STATS.Figures.es#timeline";
|
||||||
|
@ -2679,27 +2742,6 @@ const char *Hlp_STATS_Figures_messages =
|
||||||
"STATS.Figures.en#messages";
|
"STATS.Figures.en#messages";
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
const char *Hlp_STATS_Figures_surveys =
|
|
||||||
#if L==1
|
|
||||||
"STATS.Figures.es#encuestas";
|
|
||||||
#elif L==2
|
|
||||||
"STATS.Figures.en#surveys";
|
|
||||||
#elif L==3
|
|
||||||
"STATS.Figures.en#surveys";
|
|
||||||
#elif L==4
|
|
||||||
"STATS.Figures.es#encuestas";
|
|
||||||
#elif L==5
|
|
||||||
"STATS.Figures.en#surveys";
|
|
||||||
#elif L==6
|
|
||||||
"STATS.Figures.es#encuestas";
|
|
||||||
#elif L==7
|
|
||||||
"STATS.Figures.en#surveys";
|
|
||||||
#elif L==8
|
|
||||||
"STATS.Figures.en#surveys";
|
|
||||||
#elif L==9
|
|
||||||
"STATS.Figures.en#surveys";
|
|
||||||
#endif
|
|
||||||
|
|
||||||
const char *Hlp_STATS_Figures_webs_social_networks =
|
const char *Hlp_STATS_Figures_webs_social_networks =
|
||||||
#if L==1
|
#if L==1
|
||||||
"STATS.Figures.es#webs--redes-sociales";
|
"STATS.Figures.es#webs--redes-sociales";
|
||||||
|
|
|
@ -260,7 +260,7 @@ static void Prj_PutIconsListProjects (void)
|
||||||
Prj_PutIconToCreateNewPrj ();
|
Prj_PutIconToCreateNewPrj ();
|
||||||
|
|
||||||
/***** Put icon to show a figure *****/
|
/***** Put icon to show a figure *****/
|
||||||
Gbl.Stat.FigureType = Sta_ASSIGNMENTS;
|
Gbl.Stat.FigureType = Sta_PROJECTS;
|
||||||
Sta_PutIconToShowFigure ();
|
Sta_PutIconToShowFigure ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
146
swad_statistic.c
146
swad_statistic.c
|
@ -41,6 +41,7 @@
|
||||||
#include "swad_file_browser.h"
|
#include "swad_file_browser.h"
|
||||||
#include "swad_follow.h"
|
#include "swad_follow.h"
|
||||||
#include "swad_forum.h"
|
#include "swad_forum.h"
|
||||||
|
#include "swad_game.h"
|
||||||
#include "swad_global.h"
|
#include "swad_global.h"
|
||||||
#include "swad_ID.h"
|
#include "swad_ID.h"
|
||||||
#include "swad_logo.h"
|
#include "swad_logo.h"
|
||||||
|
@ -49,6 +50,7 @@
|
||||||
#include "swad_notification.h"
|
#include "swad_notification.h"
|
||||||
#include "swad_parameter.h"
|
#include "swad_parameter.h"
|
||||||
#include "swad_profile.h"
|
#include "swad_profile.h"
|
||||||
|
#include "swad_project.h"
|
||||||
#include "swad_social.h"
|
#include "swad_social.h"
|
||||||
#include "swad_statistic.h"
|
#include "swad_statistic.h"
|
||||||
#include "swad_tab.h"
|
#include "swad_tab.h"
|
||||||
|
@ -220,7 +222,9 @@ static void Sta_GetAndShowOERsStats (void);
|
||||||
static void Sta_GetNumberOfOERsFromDB (Sco_Scope_t Scope,Brw_License_t License,unsigned long NumFiles[2]);
|
static void Sta_GetNumberOfOERsFromDB (Sco_Scope_t Scope,Brw_License_t License,unsigned long NumFiles[2]);
|
||||||
|
|
||||||
static void Sta_GetAndShowAssignmentsStats (void);
|
static void Sta_GetAndShowAssignmentsStats (void);
|
||||||
|
static void Sta_GetAndShowProjectsStats (void);
|
||||||
static void Sta_GetAndShowTestsStats (void);
|
static void Sta_GetAndShowTestsStats (void);
|
||||||
|
static void Sta_GetAndShowGamesStats (void);
|
||||||
|
|
||||||
static void Sta_GetAndShowSocialActivityStats (void);
|
static void Sta_GetAndShowSocialActivityStats (void);
|
||||||
static void Sta_GetAndShowFollowStats (void);
|
static void Sta_GetAndShowFollowStats (void);
|
||||||
|
@ -4030,14 +4034,16 @@ void Sta_ShowFigures (void)
|
||||||
Sta_GetAndShowFileBrowsersStats, // Sta_FOLDERS_AND_FILES
|
Sta_GetAndShowFileBrowsersStats, // Sta_FOLDERS_AND_FILES
|
||||||
Sta_GetAndShowOERsStats, // Sta_OER
|
Sta_GetAndShowOERsStats, // Sta_OER
|
||||||
Sta_GetAndShowAssignmentsStats, // Sta_ASSIGNMENTS
|
Sta_GetAndShowAssignmentsStats, // Sta_ASSIGNMENTS
|
||||||
|
Sta_GetAndShowProjectsStats, // Sta_PROJECTS
|
||||||
Sta_GetAndShowTestsStats, // Sta_TESTS
|
Sta_GetAndShowTestsStats, // Sta_TESTS
|
||||||
|
Sta_GetAndShowGamesStats, // Sta_GAMES
|
||||||
|
Sta_GetAndShowSurveysStats, // Sta_SURVEYS
|
||||||
Sta_GetAndShowSocialActivityStats, // Sta_SOCIAL_ACTIVITY
|
Sta_GetAndShowSocialActivityStats, // Sta_SOCIAL_ACTIVITY
|
||||||
Sta_GetAndShowFollowStats, // Sta_FOLLOW
|
Sta_GetAndShowFollowStats, // Sta_FOLLOW
|
||||||
Sta_GetAndShowForumStats, // Sta_FORUMS
|
Sta_GetAndShowForumStats, // Sta_FORUMS
|
||||||
Sta_GetAndShowNumUsrsPerNotifyEvent, // Sta_NOTIFY_EVENTS
|
Sta_GetAndShowNumUsrsPerNotifyEvent, // Sta_NOTIFY_EVENTS
|
||||||
Sta_GetAndShowNoticesStats, // Sta_NOTICES
|
Sta_GetAndShowNoticesStats, // Sta_NOTICES
|
||||||
Sta_GetAndShowMsgsStats, // Sta_MESSAGES
|
Sta_GetAndShowMsgsStats, // Sta_MESSAGES
|
||||||
Sta_GetAndShowSurveysStats, // Sta_SURVEYS
|
|
||||||
Net_ShowWebAndSocialNetworksStats, // Sta_SOCIAL_NETWORKS
|
Net_ShowWebAndSocialNetworksStats, // Sta_SOCIAL_NETWORKS
|
||||||
Sta_GetAndShowNumUsrsPerLanguage, // Sta_LANGUAGES
|
Sta_GetAndShowNumUsrsPerLanguage, // Sta_LANGUAGES
|
||||||
Sta_GetAndShowNumUsrsPerFirstDayOfWeek, // Sta_FIRST_DAY_OF_WEEK
|
Sta_GetAndShowNumUsrsPerFirstDayOfWeek, // Sta_FIRST_DAY_OF_WEEK
|
||||||
|
@ -6727,8 +6733,7 @@ static void Sta_GetAndShowAssignmentsStats (void)
|
||||||
unsigned NumCoursesWithAssignments = 0;
|
unsigned NumCoursesWithAssignments = 0;
|
||||||
float NumAssignmentsPerCourse = 0.0;
|
float NumAssignmentsPerCourse = 0.0;
|
||||||
|
|
||||||
/***** Get the number of assignments from this location
|
/***** Get the number of assignments from this location *****/
|
||||||
(all the platform, current degree or current course) *****/
|
|
||||||
if ((NumAssignments = Asg_GetNumAssignments (Gbl.Scope.Current,&NumNotif)))
|
if ((NumAssignments = Asg_GetNumAssignments (Gbl.Scope.Current,&NumNotif)))
|
||||||
if ((NumCoursesWithAssignments = Asg_GetNumCoursesWithAssignments (Gbl.Scope.Current)) != 0)
|
if ((NumCoursesWithAssignments = Asg_GetNumCoursesWithAssignments (Gbl.Scope.Current)) != 0)
|
||||||
NumAssignmentsPerCourse = (float) NumAssignments / (float) NumCoursesWithAssignments;
|
NumAssignmentsPerCourse = (float) NumAssignments / (float) NumCoursesWithAssignments;
|
||||||
|
@ -6781,6 +6786,66 @@ static void Sta_GetAndShowAssignmentsStats (void)
|
||||||
Box_EndBoxTable ();
|
Box_EndBoxTable ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
/************************* Show stats about projects *************************/
|
||||||
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
static void Sta_GetAndShowProjectsStats (void)
|
||||||
|
{
|
||||||
|
extern const char *Hlp_STATS_Figures_projects;
|
||||||
|
extern const char *Txt_STAT_USE_STAT_TYPES[Sta_NUM_FIGURES];
|
||||||
|
extern const char *Txt_Number_of_BR_projects;
|
||||||
|
extern const char *Txt_Number_of_BR_courses_with_BR_projects;
|
||||||
|
extern const char *Txt_Average_number_BR_of_projects_BR_per_course;
|
||||||
|
unsigned NumProjects;
|
||||||
|
unsigned NumCoursesWithProjects = 0;
|
||||||
|
float NumProjectsPerCourse = 0.0;
|
||||||
|
|
||||||
|
/***** Get the number of projects from this location *****/
|
||||||
|
if ((NumProjects = Prj_GetNumProjects (Gbl.Scope.Current)))
|
||||||
|
if ((NumCoursesWithProjects = Prj_GetNumCoursesWithProjects (Gbl.Scope.Current)) != 0)
|
||||||
|
NumProjectsPerCourse = (float) NumProjects / (float) NumCoursesWithProjects;
|
||||||
|
|
||||||
|
/***** Start box and table *****/
|
||||||
|
Box_StartBoxTable (NULL,Txt_STAT_USE_STAT_TYPES[Sta_PROJECTS],NULL,
|
||||||
|
Hlp_STATS_Figures_projects,Box_NOT_CLOSABLE,2);
|
||||||
|
|
||||||
|
/***** Write table heading *****/
|
||||||
|
fprintf (Gbl.F.Out,"<tr>"
|
||||||
|
"<th class=\"RIGHT_MIDDLE\">"
|
||||||
|
"%s"
|
||||||
|
"</th>"
|
||||||
|
"<th class=\"RIGHT_MIDDLE\">"
|
||||||
|
"%s"
|
||||||
|
"</th>"
|
||||||
|
"<th class=\"RIGHT_MIDDLE\">"
|
||||||
|
"%s"
|
||||||
|
"</th>"
|
||||||
|
"</tr>",
|
||||||
|
Txt_Number_of_BR_projects,
|
||||||
|
Txt_Number_of_BR_courses_with_BR_projects,
|
||||||
|
Txt_Average_number_BR_of_projects_BR_per_course);
|
||||||
|
|
||||||
|
/***** Write number of projects *****/
|
||||||
|
fprintf (Gbl.F.Out,"<tr>"
|
||||||
|
"<td class=\"DAT RIGHT_MIDDLE\">"
|
||||||
|
"%u"
|
||||||
|
"</td>"
|
||||||
|
"<td class=\"DAT RIGHT_MIDDLE\">"
|
||||||
|
"%u"
|
||||||
|
"</td>"
|
||||||
|
"<td class=\"DAT RIGHT_MIDDLE\">"
|
||||||
|
"%.2f"
|
||||||
|
"</td>"
|
||||||
|
"</tr>",
|
||||||
|
NumProjects,
|
||||||
|
NumCoursesWithProjects,
|
||||||
|
NumProjectsPerCourse);
|
||||||
|
|
||||||
|
/***** End table and box *****/
|
||||||
|
Box_EndBoxTable ();
|
||||||
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/********************** Show stats about test questions **********************/
|
/********************** Show stats about test questions **********************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
@ -6851,8 +6916,7 @@ static void Sta_GetAndShowTestsStats (void)
|
||||||
AnsType < Tst_NUM_ANS_TYPES;
|
AnsType < Tst_NUM_ANS_TYPES;
|
||||||
AnsType++)
|
AnsType++)
|
||||||
{
|
{
|
||||||
/***** Get the stats about test questions from this location
|
/***** Get the stats about test questions from this location *****/
|
||||||
(all the platform, current degree or current course) *****/
|
|
||||||
Tst_GetTestStats (AnsType,&Stats);
|
Tst_GetTestStats (AnsType,&Stats);
|
||||||
|
|
||||||
/***** Write number of assignments *****/
|
/***** Write number of assignments *****/
|
||||||
|
@ -6899,8 +6963,7 @@ static void Sta_GetAndShowTestsStats (void)
|
||||||
Stats.AvgScorePerQuestion);
|
Stats.AvgScorePerQuestion);
|
||||||
}
|
}
|
||||||
|
|
||||||
/***** Get the stats about test questions from this location
|
/***** Get the stats about test questions from this location *****/
|
||||||
(all the platform, current degree or current course) *****/
|
|
||||||
Tst_GetTestStats (Tst_ANS_ALL,&Stats);
|
Tst_GetTestStats (Tst_ANS_ALL,&Stats);
|
||||||
|
|
||||||
/***** Write number of assignments *****/
|
/***** Write number of assignments *****/
|
||||||
|
@ -6950,6 +7013,67 @@ static void Sta_GetAndShowTestsStats (void)
|
||||||
Box_EndBoxTable ();
|
Box_EndBoxTable ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
/*************************** Show stats about games **************************/
|
||||||
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
static void Sta_GetAndShowGamesStats (void)
|
||||||
|
{
|
||||||
|
extern const char *Hlp_STATS_Figures_games;
|
||||||
|
extern const char *Txt_STAT_USE_STAT_TYPES[Sta_NUM_FIGURES];
|
||||||
|
extern const char *Txt_Number_of_BR_games;
|
||||||
|
extern const char *Txt_Number_of_BR_courses_with_BR_games;
|
||||||
|
extern const char *Txt_Average_number_BR_of_games_BR_per_course;
|
||||||
|
unsigned NumGames;
|
||||||
|
unsigned NumNotif;
|
||||||
|
unsigned NumCoursesWithGames = 0;
|
||||||
|
float NumGamesPerCourse = 0.0;
|
||||||
|
|
||||||
|
/***** Get the number of games from this location *****/
|
||||||
|
if ((NumGames = Gam_GetNumGames (Gbl.Scope.Current)))
|
||||||
|
if ((NumCoursesWithGames = Gam_GetNumCoursesWithGames (Gbl.Scope.Current)) != 0)
|
||||||
|
NumGamesPerCourse = (float) NumGames / (float) NumCoursesWithGames;
|
||||||
|
|
||||||
|
/***** Start box and table *****/
|
||||||
|
Box_StartBoxTable (NULL,Txt_STAT_USE_STAT_TYPES[Sta_GAMES],NULL,
|
||||||
|
Hlp_STATS_Figures_games,Box_NOT_CLOSABLE,2);
|
||||||
|
|
||||||
|
/***** Write table heading *****/
|
||||||
|
fprintf (Gbl.F.Out,"<tr>"
|
||||||
|
"<th class=\"RIGHT_MIDDLE\">"
|
||||||
|
"%s"
|
||||||
|
"</th>"
|
||||||
|
"<th class=\"RIGHT_MIDDLE\">"
|
||||||
|
"%s"
|
||||||
|
"</th>"
|
||||||
|
"<th class=\"RIGHT_MIDDLE\">"
|
||||||
|
"%s"
|
||||||
|
"</th>"
|
||||||
|
"</tr>",
|
||||||
|
Txt_Number_of_BR_games,
|
||||||
|
Txt_Number_of_BR_courses_with_BR_games,
|
||||||
|
Txt_Average_number_BR_of_games_BR_per_course);
|
||||||
|
|
||||||
|
/***** Write number of games *****/
|
||||||
|
fprintf (Gbl.F.Out,"<tr>"
|
||||||
|
"<td class=\"DAT RIGHT_MIDDLE\">"
|
||||||
|
"%u"
|
||||||
|
"</td>"
|
||||||
|
"<td class=\"DAT RIGHT_MIDDLE\">"
|
||||||
|
"%u"
|
||||||
|
"</td>"
|
||||||
|
"<td class=\"DAT RIGHT_MIDDLE\">"
|
||||||
|
"%.2f"
|
||||||
|
"</td>"
|
||||||
|
"</tr>",
|
||||||
|
NumGames,
|
||||||
|
NumCoursesWithGames,
|
||||||
|
NumGamesPerCourse);
|
||||||
|
|
||||||
|
/***** End table and box *****/
|
||||||
|
Box_EndBoxTable ();
|
||||||
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/******************** Get and show number of social notes ********************/
|
/******************** Get and show number of social notes ********************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
@ -8210,8 +8334,7 @@ static void Sta_GetAndShowNoticesStats (void)
|
||||||
unsigned NumNotif;
|
unsigned NumNotif;
|
||||||
unsigned NumTotalNotifications = 0;
|
unsigned NumTotalNotifications = 0;
|
||||||
|
|
||||||
/***** Get the number of notices active and obsolete
|
/***** Get the number of notices active and obsolete *****/
|
||||||
from this location (all the platform, current degree or current course) *****/
|
|
||||||
for (NoticeStatus = (Not_Status_t) 0;
|
for (NoticeStatus = (Not_Status_t) 0;
|
||||||
NoticeStatus < Not_NUM_STATUS;
|
NoticeStatus < Not_NUM_STATUS;
|
||||||
NoticeStatus++)
|
NoticeStatus++)
|
||||||
|
@ -8299,7 +8422,7 @@ static void Sta_GetAndShowMsgsStats (void)
|
||||||
unsigned NumMsgsReceivedNotDeleted,NumMsgsReceivedAndDeleted;
|
unsigned NumMsgsReceivedNotDeleted,NumMsgsReceivedAndDeleted;
|
||||||
unsigned NumMsgsReceivedAndNotified;
|
unsigned NumMsgsReceivedAndNotified;
|
||||||
|
|
||||||
/***** Get the number of unique messages sent from this location (all the platform, current degree or current course) *****/
|
/***** Get the number of unique messages sent from this location *****/
|
||||||
NumMsgsSentNotDeleted = Msg_GetNumMsgsSent (Gbl.Scope.Current,Msg_STATUS_ALL );
|
NumMsgsSentNotDeleted = Msg_GetNumMsgsSent (Gbl.Scope.Current,Msg_STATUS_ALL );
|
||||||
NumMsgsSentDeleted = Msg_GetNumMsgsSent (Gbl.Scope.Current,Msg_STATUS_DELETED );
|
NumMsgsSentDeleted = Msg_GetNumMsgsSent (Gbl.Scope.Current,Msg_STATUS_DELETED );
|
||||||
|
|
||||||
|
@ -8403,8 +8526,7 @@ static void Sta_GetAndShowSurveysStats (void)
|
||||||
float NumSurveysPerCourse = 0.0;
|
float NumSurveysPerCourse = 0.0;
|
||||||
float NumQstsPerSurvey = 0.0;
|
float NumQstsPerSurvey = 0.0;
|
||||||
|
|
||||||
/***** Get the number of surveys and the average number of questions per survey from this location
|
/***** Get the number of surveys and the average number of questions per survey from this location *****/
|
||||||
(all the platform, current degree or current course) *****/
|
|
||||||
if ((NumSurveys = Svy_GetNumCrsSurveys (Gbl.Scope.Current,&NumNotif)))
|
if ((NumSurveys = Svy_GetNumCrsSurveys (Gbl.Scope.Current,&NumNotif)))
|
||||||
{
|
{
|
||||||
if ((NumCoursesWithSurveys = Svy_GetNumCoursesWithCrsSurveys (Gbl.Scope.Current)) != 0)
|
if ((NumCoursesWithSurveys = Svy_GetNumCoursesWithCrsSurveys (Gbl.Scope.Current)) != 0)
|
||||||
|
|
|
@ -104,7 +104,7 @@ typedef enum
|
||||||
} Sta_ClicksGroupedBy_t;
|
} Sta_ClicksGroupedBy_t;
|
||||||
#define Sta_CLICKS_GROUPED_BY_DEFAULT Sta_CLICKS_CRS_PER_USR
|
#define Sta_CLICKS_GROUPED_BY_DEFAULT Sta_CLICKS_CRS_PER_USR
|
||||||
|
|
||||||
#define Sta_NUM_FIGURES 25
|
#define Sta_NUM_FIGURES 27
|
||||||
typedef enum
|
typedef enum
|
||||||
{
|
{
|
||||||
Sta_USERS, // Number of users
|
Sta_USERS, // Number of users
|
||||||
|
@ -115,14 +115,16 @@ typedef enum
|
||||||
Sta_FOLDERS_AND_FILES, // Number of folders and files
|
Sta_FOLDERS_AND_FILES, // Number of folders and files
|
||||||
Sta_OER, // Number of OERs (Open Educational Resources)
|
Sta_OER, // Number of OERs (Open Educational Resources)
|
||||||
Sta_ASSIGNMENTS, // Number of assignments
|
Sta_ASSIGNMENTS, // Number of assignments
|
||||||
|
Sta_PROJECTS, // Number of projects
|
||||||
Sta_TESTS, // Number of test questions
|
Sta_TESTS, // Number of test questions
|
||||||
|
Sta_GAMES, // Number of games
|
||||||
|
Sta_SURVEYS, // Number of surveys
|
||||||
Sta_SOCIAL_ACTIVITY, // Number of social notes
|
Sta_SOCIAL_ACTIVITY, // Number of social notes
|
||||||
Sta_FOLLOW, // Number of following and followers
|
Sta_FOLLOW, // Number of following and followers
|
||||||
Sta_FORUMS, // Number of forums, threads and posts
|
Sta_FORUMS, // Number of forums, threads and posts
|
||||||
Sta_NOTIFY_EVENTS, // Number of users per notify event
|
Sta_NOTIFY_EVENTS, // Number of users per notify event
|
||||||
Sta_NOTICES, // Number of notices
|
Sta_NOTICES, // Number of notices
|
||||||
Sta_MESSAGES, // Number of users' (sent and received) messages
|
Sta_MESSAGES, // Number of users' (sent and received) messages
|
||||||
Sta_SURVEYS, // Number of surveys
|
|
||||||
Sta_SOCIAL_NETWORKS, // Number of users in social networks
|
Sta_SOCIAL_NETWORKS, // Number of users in social networks
|
||||||
Sta_LANGUAGES, // Number of users per language
|
Sta_LANGUAGES, // Number of users per language
|
||||||
Sta_FIRST_DAY_OF_WEEK, // Number of users per first day of week
|
Sta_FIRST_DAY_OF_WEEK, // Number of users per first day of week
|
||||||
|
|
212
swad_text.c
212
swad_text.c
|
@ -3540,6 +3540,48 @@ const char *Txt_Average_number_BR_of_ASSIG_BR_per_course =
|
||||||
"Nº medio<br />de atividades<br />por disciplina";
|
"Nº medio<br />de atividades<br />por disciplina";
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
const char *Txt_Average_number_BR_of_games_BR_per_course =
|
||||||
|
#if L==1
|
||||||
|
"Nombre mitj´<br />de jocs<br />per assignatura";
|
||||||
|
#elif L==2
|
||||||
|
"Durchschnittliche Anzahl<br />von Spiele<br />pro Kurs";
|
||||||
|
#elif L==3
|
||||||
|
"Average number<br />of games<br />per course";
|
||||||
|
#elif L==4
|
||||||
|
"Nº medio<br />de juegos<br />por asignatura";
|
||||||
|
#elif L==5
|
||||||
|
"Nombre moyen<br />de jeux<br />par matière";
|
||||||
|
#elif L==6
|
||||||
|
"Nº medio<br />de juegos<br />por asignatura"; // Okoteve traducción
|
||||||
|
#elif L==7
|
||||||
|
"Numero medio<br />di giochi<br />per corso";
|
||||||
|
#elif L==8
|
||||||
|
"Średnia liczba<br />gry<br />na kurs";
|
||||||
|
#elif L==9
|
||||||
|
"Nº medio<br />de jogos<br />por disciplina";
|
||||||
|
#endif
|
||||||
|
|
||||||
|
const char *Txt_Average_number_BR_of_projects_BR_per_course =
|
||||||
|
#if L==1
|
||||||
|
"Nombre mitj´<br />de projectes<br />per assignatura";
|
||||||
|
#elif L==2
|
||||||
|
"Durchschnittliche Anzahl<br />von Projekte<br />pro Kurs";
|
||||||
|
#elif L==3
|
||||||
|
"Average number<br />of projects<br />per course";
|
||||||
|
#elif L==4
|
||||||
|
"Nº medio<br />de proyectos<br />por asignatura";
|
||||||
|
#elif L==5
|
||||||
|
"Nombre moyen<br />de projets<br />par matière";
|
||||||
|
#elif L==6
|
||||||
|
"Nº medio<br />de proyectos<br />por asignatura"; // Okoteve traducción
|
||||||
|
#elif L==7
|
||||||
|
"Numero medio<br />di progetti<br />per corso";
|
||||||
|
#elif L==8
|
||||||
|
"Średnia liczba<br />projekty<br />na kurs";
|
||||||
|
#elif L==9
|
||||||
|
"Nº medio<br />de projetos<br />por disciplina";
|
||||||
|
#endif
|
||||||
|
|
||||||
const char *Txt_Average_number_BR_of_questions_BR_per_survey =
|
const char *Txt_Average_number_BR_of_questions_BR_per_survey =
|
||||||
#if L==1
|
#if L==1
|
||||||
"Nombre mitj´<br />de preguntes<br />per enquesta";
|
"Nombre mitj´<br />de preguntes<br />per enquesta";
|
||||||
|
@ -27990,6 +28032,48 @@ const char *Txt_Number_of_BR_courses_with_BR_exportable_BR_test_BR_questions =
|
||||||
"Nº de<br />disciplinas<br />com questões<br />de test<br />exportáveis";
|
"Nº de<br />disciplinas<br />com questões<br />de test<br />exportáveis";
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
const char *Txt_Number_of_BR_courses_with_BR_games =
|
||||||
|
#if L==1
|
||||||
|
"Nombre<br />d'assignatures<br />amb jocs";
|
||||||
|
#elif L==2
|
||||||
|
"Anzahl der<br />Kursen<br />mit Spiele";
|
||||||
|
#elif L==3
|
||||||
|
"Number of<br />courses with<br />games";
|
||||||
|
#elif L==4
|
||||||
|
"Nº de<br />asignaturas<br />con juegos";
|
||||||
|
#elif L==5
|
||||||
|
"Nombre de<br />matières<br />avec jeux";
|
||||||
|
#elif L==6
|
||||||
|
"Nº de<br />asignaturas<br />con juegos"; // Okoteve traducción
|
||||||
|
#elif L==7
|
||||||
|
"Numero di<br />corsi con<br />giochi";
|
||||||
|
#elif L==8
|
||||||
|
"Liczba<br />kursów z<br />gry";
|
||||||
|
#elif L==9
|
||||||
|
"Nº de<br />disciplinas<br />com jogos";
|
||||||
|
#endif
|
||||||
|
|
||||||
|
const char *Txt_Number_of_BR_courses_with_BR_projects =
|
||||||
|
#if L==1
|
||||||
|
"Nombre<br />d'assignatures<br />amb projectes";
|
||||||
|
#elif L==2
|
||||||
|
"Anzahl der<br />Kursen<br />mit Projekte";
|
||||||
|
#elif L==3
|
||||||
|
"Number of<br />courses with<br />projects";
|
||||||
|
#elif L==4
|
||||||
|
"Nº de<br />asignaturas<br />con proyectos";
|
||||||
|
#elif L==5
|
||||||
|
"Nombre de<br />matières<br />avec projets";
|
||||||
|
#elif L==6
|
||||||
|
"Nº de<br />asignaturas<br />con proyectos"; // Okoteve traducción
|
||||||
|
#elif L==7
|
||||||
|
"Numero di<br />corsi con<br />progetti";
|
||||||
|
#elif L==8
|
||||||
|
"Liczba<br />kursów z<br />projekty";
|
||||||
|
#elif L==9
|
||||||
|
"Nº de<br />disciplinas<br />com projetos";
|
||||||
|
#endif
|
||||||
|
|
||||||
const char *Txt_Number_of_BR_courses_BR_with_test_BR_questions =
|
const char *Txt_Number_of_BR_courses_BR_with_test_BR_questions =
|
||||||
#if L==1
|
#if L==1
|
||||||
"Nombre<br />d'assignatures<br />amb preguntes<br />de test";
|
"Nombre<br />d'assignatures<br />amb preguntes<br />de test";
|
||||||
|
@ -28034,7 +28118,7 @@ const char *Txt_Number_of_BR_courses_with_BR_surveys =
|
||||||
|
|
||||||
const char *Txt_Number_of_BR_events =
|
const char *Txt_Number_of_BR_events =
|
||||||
#if L==1
|
#if L==1
|
||||||
"Nº de<br />eventos"; // Necessita traduccio
|
"Nº d'<br />esdeveniments.";
|
||||||
#elif L==2
|
#elif L==2
|
||||||
"Anzahl der<br />Ereignisse";
|
"Anzahl der<br />Ereignisse";
|
||||||
#elif L==3
|
#elif L==3
|
||||||
|
@ -28074,6 +28158,27 @@ const char *Txt_Number_of_BR_emails =
|
||||||
"Número de<br />emails";
|
"Número de<br />emails";
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
const char *Txt_Number_of_BR_games =
|
||||||
|
#if L==1
|
||||||
|
"Nombre<br />de jocs.";
|
||||||
|
#elif L==2
|
||||||
|
"Anzahl der<br />Spiele";
|
||||||
|
#elif L==3
|
||||||
|
"Number of<br />games";
|
||||||
|
#elif L==4
|
||||||
|
"Nº de<br />juegos";
|
||||||
|
#elif L==5
|
||||||
|
"Nombre<br />de jeux";
|
||||||
|
#elif L==6
|
||||||
|
"Nº de<br />juegos"; // Okoteve traducción
|
||||||
|
#elif L==7
|
||||||
|
"Numero di<br />giochi";
|
||||||
|
#elif L==8
|
||||||
|
"Liczba<br />gier.";
|
||||||
|
#elif L==9
|
||||||
|
"Número de<br />jogos";
|
||||||
|
#endif
|
||||||
|
|
||||||
const char *Txt_Number_of_BR_notifications =
|
const char *Txt_Number_of_BR_notifications =
|
||||||
#if L==1
|
#if L==1
|
||||||
"Nombre de<br />notificacions";
|
"Nombre de<br />notificacions";
|
||||||
|
@ -28095,6 +28200,27 @@ const char *Txt_Number_of_BR_notifications =
|
||||||
"Número de<br />notificações";
|
"Número de<br />notificações";
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
const char *Txt_Number_of_BR_projects =
|
||||||
|
#if L==1
|
||||||
|
"Nombre<br />de projectes.";
|
||||||
|
#elif L==2
|
||||||
|
"Anzahl der<br />Projekte";
|
||||||
|
#elif L==3
|
||||||
|
"Number of<br />projects";
|
||||||
|
#elif L==4
|
||||||
|
"Nº de<br />proyectos";
|
||||||
|
#elif L==5
|
||||||
|
"Nombre<br />de projets";
|
||||||
|
#elif L==6
|
||||||
|
"Nº de<br />proyectos"; // Okoteve traducción
|
||||||
|
#elif L==7
|
||||||
|
"Numero di<br />progetti";
|
||||||
|
#elif L==8
|
||||||
|
"Liczba<br />projektów.";
|
||||||
|
#elif L==9
|
||||||
|
"Número de<br />projetos";
|
||||||
|
#endif
|
||||||
|
|
||||||
const char *Txt_Number_of_students =
|
const char *Txt_Number_of_students =
|
||||||
#if L==1
|
#if L==1
|
||||||
"Nombre d'estudiants";
|
"Nombre d'estudiants";
|
||||||
|
@ -40637,11 +40763,31 @@ const char *Txt_STAT_USE_STAT_TYPES[Sta_NUM_FIGURES] =
|
||||||
#elif L==7
|
#elif L==7
|
||||||
"Attività"
|
"Attività"
|
||||||
#elif L==8
|
#elif L==8
|
||||||
"Assignments" // Potrzebujesz tlumaczenie
|
"Zadania"
|
||||||
#elif L==9
|
#elif L==9
|
||||||
"Atividades"
|
"Atividades"
|
||||||
#endif
|
#endif
|
||||||
,
|
,
|
||||||
|
#if L==1 // Sta_PROJECTS
|
||||||
|
"Projectes"
|
||||||
|
#elif L==2
|
||||||
|
"Projekte"
|
||||||
|
#elif L==3
|
||||||
|
"Projects"
|
||||||
|
#elif L==4
|
||||||
|
"Proyectos"
|
||||||
|
#elif L==5
|
||||||
|
"Projets"
|
||||||
|
#elif L==6
|
||||||
|
"Proyectos" // Okoteve traducción
|
||||||
|
#elif L==7
|
||||||
|
"Progetti"
|
||||||
|
#elif L==8
|
||||||
|
"Projekty"
|
||||||
|
#elif L==9
|
||||||
|
"Projetos"
|
||||||
|
#endif
|
||||||
|
,
|
||||||
#if L==1 // Sta_TESTS
|
#if L==1 // Sta_TESTS
|
||||||
"Tests"
|
"Tests"
|
||||||
#elif L==2
|
#elif L==2
|
||||||
|
@ -40657,11 +40803,51 @@ const char *Txt_STAT_USE_STAT_TYPES[Sta_NUM_FIGURES] =
|
||||||
#elif L==7
|
#elif L==7
|
||||||
"Test"
|
"Test"
|
||||||
#elif L==8
|
#elif L==8
|
||||||
"Tests" // Potrzebujesz tlumaczenie
|
"Testy"
|
||||||
#elif L==9
|
#elif L==9
|
||||||
"Testes"
|
"Testes"
|
||||||
#endif
|
#endif
|
||||||
,
|
,
|
||||||
|
#if L==1 // Sta_GAMES
|
||||||
|
"Jocs"
|
||||||
|
#elif L==2
|
||||||
|
"Spiele"
|
||||||
|
#elif L==3
|
||||||
|
"Games"
|
||||||
|
#elif L==4
|
||||||
|
"Juegos"
|
||||||
|
#elif L==5
|
||||||
|
"Jeux"
|
||||||
|
#elif L==6
|
||||||
|
"Juegos" // Okoteve traducción
|
||||||
|
#elif L==7
|
||||||
|
"Giochi"
|
||||||
|
#elif L==8
|
||||||
|
"Gry"
|
||||||
|
#elif L==9
|
||||||
|
"Jogos"
|
||||||
|
#endif
|
||||||
|
,
|
||||||
|
#if L==1 // Sta_SURVEYS
|
||||||
|
"Enquestes"
|
||||||
|
#elif L==2
|
||||||
|
"Umfragen"
|
||||||
|
#elif L==3
|
||||||
|
"Surveys"
|
||||||
|
#elif L==4
|
||||||
|
"Encuestas"
|
||||||
|
#elif L==5
|
||||||
|
"Sondages"
|
||||||
|
#elif L==6
|
||||||
|
"Encuestas" // Okoteve traducción
|
||||||
|
#elif L==7
|
||||||
|
"Sondaggi"
|
||||||
|
#elif L==8
|
||||||
|
"Badania"
|
||||||
|
#elif L==9
|
||||||
|
"Inquéritos"
|
||||||
|
#endif
|
||||||
|
,
|
||||||
#if L==1 // Sta_SOCIAL_ACTIVITY
|
#if L==1 // Sta_SOCIAL_ACTIVITY
|
||||||
"Timeline"
|
"Timeline"
|
||||||
#elif L==2
|
#elif L==2
|
||||||
|
@ -40782,26 +40968,6 @@ const char *Txt_STAT_USE_STAT_TYPES[Sta_NUM_FIGURES] =
|
||||||
"Mensagens"
|
"Mensagens"
|
||||||
#endif
|
#endif
|
||||||
,
|
,
|
||||||
#if L==1 // Sta_SURVEYS
|
|
||||||
"Enquestes"
|
|
||||||
#elif L==2
|
|
||||||
"Umfragen"
|
|
||||||
#elif L==3
|
|
||||||
"Surveys"
|
|
||||||
#elif L==4
|
|
||||||
"Encuestas"
|
|
||||||
#elif L==5
|
|
||||||
"Sondages"
|
|
||||||
#elif L==6
|
|
||||||
"Encuestas" // Okoteve traducción
|
|
||||||
#elif L==7
|
|
||||||
"Sondaggi"
|
|
||||||
#elif L==8
|
|
||||||
"Badania"
|
|
||||||
#elif L==9
|
|
||||||
"Inquéritos"
|
|
||||||
#endif
|
|
||||||
,
|
|
||||||
#if L==1 // Sta_SOCIAL_NETWORKS
|
#if L==1 // Sta_SOCIAL_NETWORKS
|
||||||
"Webs / xarxes socials"
|
"Webs / xarxes socials"
|
||||||
#elif L==2
|
#elif L==2
|
||||||
|
|
Loading…
Reference in New Issue
Block a user