Version 16.8.1

This commit is contained in:
Antonio Cañas Vargas 2016-10-03 13:29:05 +02:00
parent 238d9e84ac
commit 778f119c61
3 changed files with 40 additions and 11 deletions

View File

@ -143,13 +143,14 @@
/****************************** Public constants *****************************/
/*****************************************************************************/
#define Log_PLATFORM_VERSION "SWAD 16.8 (2016-10-03)"
#define Log_PLATFORM_VERSION "SWAD 16.8.1 (2016-10-03)"
#define CSS_FILE "swad15.229.css"
#define JS_FILE "swad15.238.1.js"
// 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
/*
Version 16.8.1: Oct 03, 2016 Do not show courses with a few clicks in user's usage report. (205747 lines)
Version 16.8: Oct 03, 2016 New option to view user's usage report. (205720 lines)
1 change necessary in database:
INSERT INTO actions (ActCod,Language,Obsolete,Txt) VALUES ('1586','es','N','Solicitar mi informe de uso');

View File

@ -42,7 +42,9 @@
/***************************** Private constants *****************************/
/*****************************************************************************/
#define Rep_MIN_CLICKS_CRS 100 // Minimum number of clicks to show a course in historic log
#define Rep_MAX_BAR_WIDTH 80 // Maximum width of graphic bar
// #define Rep_BLOCK "═" // HTML code for a block in graphic bar
// #define Rep_BLOCK "▒" // HTML code for a block in graphic bar
// #define Rep_BLOCK "█" // HTML code for a block in graphic bar
@ -564,13 +566,16 @@ static void Rep_WriteSectionHistoricCourses (struct UsrFigures *UsrFigures,
{
extern const char *Txt_Courses;
extern const char *Txt_historical_log;
extern const char *Txt_Only_courses_with_more_than_X_clicks_are_shown;
Rol_Role_t Role;
/***** Start of section *****/
fprintf (Gbl.F.Out,"<section>"
"<h3>%s (%s)</h3>"
"<ul>",
"<h3>%s (%s)</h3>",
Txt_Courses,Txt_historical_log);
fprintf (Gbl.F.Out,Txt_Only_courses_with_more_than_X_clicks_are_shown,
Rep_MIN_CLICKS_CRS);
fprintf (Gbl.F.Out,"<ul>");
/***** Number of courses in which the user clicked as student/teacher *****/
for (Role = Rol_STUDENT;
@ -593,7 +598,7 @@ static void Rep_WriteSectionHistoricCourses (struct UsrFigures *UsrFigures,
static unsigned long Rep_GetMaxHitsPerYear (time_t FirstClickTimeUTC)
{
char Query[1024];
char Query[512];
MYSQL_RES *mysql_res;
MYSQL_ROW row;
unsigned long MaxHitsPerYear = 0;
@ -638,7 +643,7 @@ static void Rep_GetAndWriteCurrentCrssOfAUsr (const struct UsrData *UsrDat,Rol_R
extern const char *Txt_courses;
extern const char *Txt_teachers_ABBREVIATION;
extern const char *Txt_students_ABBREVIATION;
char Query[1024];
char Query[512];
MYSQL_RES *mysql_res;
MYSQL_ROW row;
unsigned NumCrss;
@ -715,7 +720,7 @@ static void Rep_GetAndWriteHistoricCrssOfAUsr (const struct UsrData *UsrDat,Rol_
{
extern const char *Txt_Hits_as_a_USER;
extern const char *Txt_ROLES_SINGUL_abc[Rol_NUM_ROLES][Usr_NUM_SEXS];
char Query[1024];
char Query[256];
MYSQL_RES *mysql_res;
MYSQL_ROW row;
unsigned NumCrss;
@ -723,12 +728,14 @@ static void Rep_GetAndWriteHistoricCrssOfAUsr (const struct UsrData *UsrDat,Rol_
long CrsCod;
/***** Get courses of a user from database *****/
sprintf (Query,"SELECT CrsCod,"
"COUNT(*) AS N"
sprintf (Query,"SELECT CrsCod,COUNT(*) AS N"
" FROM log_full"
" WHERE UsrCod='%ld' AND Role='%u'"
" GROUP BY CrsCod ORDER BY N DESC",
UsrDat->UsrCod,(unsigned) Role);
" GROUP BY CrsCod"
" HAVING N>'%u'"
" ORDER BY N DESC",
UsrDat->UsrCod,(unsigned) Role,
Rep_MIN_CLICKS_CRS);
/***** List the courses (one row per course) *****/
if ((NumCrss = (unsigned) DB_QuerySELECT (Query,&mysql_res,"can not get courses of a user")))
@ -837,7 +844,7 @@ static void Rep_ShowMyHitsPerYear (bool AnyCourse,long CrsCod,Rol_Role_t Role,
struct tm *tm_FirstClickTime,
unsigned long MaxHitsPerYear)
{
char Query[1024];
char Query[512];
char SubQueryCrs[128];
char SubQueryRol[128];
MYSQL_RES *mysql_res;

View File

@ -27046,6 +27046,27 @@ const char *Txt_Online_tutoring =
"Tutoria on-line";
#endif
const char *Txt_Only_courses_with_more_than_X_clicks_are_shown =
#if L==1
"Nom&eacute;s es mostren les assignatures amb m&eacute;s de %u clics.";
#elif L==2
"Nur Kurse mit mehr als %u Klicks angezeigt.";
#elif L==3
"Only courses with more than %u clicks are shown.";
#elif L==4
"Solo se muestran las asignaturas con m&aacute;s de %u clics.";
#elif L==5
"Seuls les cours avec plus de %u clics sont pr&eacute;sent&eacute;s.";
#elif L==6
"Solo se muestran las asignaturas con m&aacute;s de %u clics."; // Okoteve traducción
#elif L==7
"Solo i corsi con pi&ugrave; di %u scatti sono mostrati.";
#elif L==8
"Tylko kursy z ponad 100 klikni&eogon;&cacute; s&aogon; pokazane.";
#elif L==9
"Somente disciplinas com mais de %u cliques s&atilde;o mostradas.";
#endif
const char *Txt_only_if_the_scope_is_X = // Warning: it is very important to include %s in the following sentences
#if L==1
"nom&eacute;s si l'&agrave;mbit &eacute;s %s";