mirror of https://github.com/acanas/swad-core.git
Version 15.250.9
This commit is contained in:
parent
0fcbf27fde
commit
7fbcd67746
|
@ -135,13 +135,14 @@
|
||||||
/****************************** Public constants *****************************/
|
/****************************** Public constants *****************************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
#define Log_PLATFORM_VERSION "SWAD 15.250.8 (2016-09-11)"
|
#define Log_PLATFORM_VERSION "SWAD 15.250.9 (2016-09-11)"
|
||||||
#define CSS_FILE "swad15.229.css"
|
#define CSS_FILE "swad15.229.css"
|
||||||
#define JS_FILE "swad15.238.1.js"
|
#define JS_FILE "swad15.238.1.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 15.250.9: Sep 11, 2016 Number of courses in user's usage report. (204307 lines)
|
||||||
Version 15.250.8: Sep 11, 2016 Number of messages sent in user's usage report. (204278 lines)
|
Version 15.250.8: Sep 11, 2016 Number of messages sent in user's usage report. (204278 lines)
|
||||||
Version 15.250.7: Sep 11, 2016 Number of posts in forums in user's usage report. (204235 lines)
|
Version 15.250.7: Sep 11, 2016 Number of posts in forums in user's usage report. (204235 lines)
|
||||||
Version 15.250.6: Sep 11, 2016 Number of downloads in user's usage report. (204207 lines)
|
Version 15.250.6: Sep 11, 2016 Number of downloads in user's usage report. (204207 lines)
|
||||||
|
|
|
@ -3037,7 +3037,7 @@ void Crs_GetAndWriteCrssOfAUsr (const struct UsrData *UsrDat,Rol_Role_t Role)
|
||||||
/* Heading row */
|
/* Heading row */
|
||||||
sprintf (Gbl.Title,Txt_USER_in_COURSE,Txt_ROLES_SINGUL_Abc[Role][UsrDat->Sex]);
|
sprintf (Gbl.Title,Txt_USER_in_COURSE,Txt_ROLES_SINGUL_Abc[Role][UsrDat->Sex]);
|
||||||
fprintf (Gbl.F.Out,"<tr>"
|
fprintf (Gbl.F.Out,"<tr>"
|
||||||
"<th colspan=\"7\" class=\"LEFT_MIDDLE\">%s</th>"
|
"<th colspan=\"7\" class=\"LEFT_MIDDLE\">%s:</th>"
|
||||||
"</tr>"
|
"</tr>"
|
||||||
"<tr>"
|
"<tr>"
|
||||||
"<th class=\"BM\"></th>"
|
"<th class=\"BM\"></th>"
|
||||||
|
|
|
@ -341,9 +341,9 @@ void Prf_ChangeProfileVisibility (void)
|
||||||
void Prf_ShowDetailsUserProfile (const struct UsrData *UsrDat)
|
void Prf_ShowDetailsUserProfile (const struct UsrData *UsrDat)
|
||||||
{
|
{
|
||||||
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];
|
||||||
|
extern const char *Txt_courses_ABBREVIATION;
|
||||||
extern const char *Txt_teachers_ABBREVIATION;
|
extern const char *Txt_teachers_ABBREVIATION;
|
||||||
extern const char *Txt_students_ABBREVIATION;
|
extern const char *Txt_students_ABBREVIATION;
|
||||||
extern const char *Txt_courses_ABBREVIATION;
|
|
||||||
extern const char *Txt_Files_uploaded;
|
extern const char *Txt_Files_uploaded;
|
||||||
extern const char *Txt_file;
|
extern const char *Txt_file;
|
||||||
extern const char *Txt_files;
|
extern const char *Txt_files;
|
||||||
|
@ -378,14 +378,14 @@ void Prf_ShowDetailsUserProfile (const struct UsrData *UsrDat)
|
||||||
/***** Number of courses in which the user is teacher *****/
|
/***** Number of courses in which the user is teacher *****/
|
||||||
NumCrssUsrIsTeacher = Usr_GetNumCrssOfUsrWithARole (UsrDat->UsrCod,Rol_TEACHER);
|
NumCrssUsrIsTeacher = Usr_GetNumCrssOfUsrWithARole (UsrDat->UsrCod,Rol_TEACHER);
|
||||||
fprintf (Gbl.F.Out,"<li title=\"%s\" class=\"PRF_FIG_LI\""
|
fprintf (Gbl.F.Out,"<li title=\"%s\" class=\"PRF_FIG_LI\""
|
||||||
" style=\"background-image:url('%s/tch64x64.gif');\" />"
|
" style=\"background-image:url('%s/tch64x64.gif');\">"
|
||||||
"%u %s ",
|
"%u %s",
|
||||||
Txt_ROLES_SINGUL_Abc[Rol_TEACHER][UsrDat->Sex],
|
Txt_ROLES_SINGUL_Abc[Rol_TEACHER][UsrDat->Sex],
|
||||||
Gbl.Prefs.IconsURL,
|
Gbl.Prefs.IconsURL,
|
||||||
NumCrssUsrIsTeacher,
|
NumCrssUsrIsTeacher,
|
||||||
Txt_courses_ABBREVIATION);
|
Txt_courses_ABBREVIATION);
|
||||||
if (NumCrssUsrIsTeacher)
|
if (NumCrssUsrIsTeacher)
|
||||||
fprintf (Gbl.F.Out,"(%u %s/%u %s)",
|
fprintf (Gbl.F.Out," (%u %s/%u %s)",
|
||||||
Usr_GetNumUsrsInCrssOfAUsr (UsrDat->UsrCod,Rol_TEACHER,Rol_TEACHER),
|
Usr_GetNumUsrsInCrssOfAUsr (UsrDat->UsrCod,Rol_TEACHER,Rol_TEACHER),
|
||||||
Txt_teachers_ABBREVIATION,
|
Txt_teachers_ABBREVIATION,
|
||||||
Usr_GetNumUsrsInCrssOfAUsr (UsrDat->UsrCod,Rol_TEACHER,Rol_STUDENT),
|
Usr_GetNumUsrsInCrssOfAUsr (UsrDat->UsrCod,Rol_TEACHER,Rol_STUDENT),
|
||||||
|
@ -395,14 +395,14 @@ void Prf_ShowDetailsUserProfile (const struct UsrData *UsrDat)
|
||||||
/***** Number of courses in which the user is student *****/
|
/***** Number of courses in which the user is student *****/
|
||||||
NumCrssUsrIsStudent = Usr_GetNumCrssOfUsrWithARole (UsrDat->UsrCod,Rol_STUDENT);
|
NumCrssUsrIsStudent = Usr_GetNumCrssOfUsrWithARole (UsrDat->UsrCod,Rol_STUDENT);
|
||||||
fprintf (Gbl.F.Out,"<li title=\"%s\" class=\"PRF_FIG_LI\""
|
fprintf (Gbl.F.Out,"<li title=\"%s\" class=\"PRF_FIG_LI\""
|
||||||
" style=\"background-image:url('%s/std64x64.gif');\" />"
|
" style=\"background-image:url('%s/std64x64.gif');\">"
|
||||||
"%u %s ",
|
"%u %s",
|
||||||
Txt_ROLES_SINGUL_Abc[Rol_STUDENT][UsrDat->Sex],
|
Txt_ROLES_SINGUL_Abc[Rol_STUDENT][UsrDat->Sex],
|
||||||
Gbl.Prefs.IconsURL,
|
Gbl.Prefs.IconsURL,
|
||||||
NumCrssUsrIsStudent,
|
NumCrssUsrIsStudent,
|
||||||
Txt_courses_ABBREVIATION);
|
Txt_courses_ABBREVIATION);
|
||||||
if (NumCrssUsrIsStudent)
|
if (NumCrssUsrIsStudent)
|
||||||
fprintf (Gbl.F.Out,"(%u %s/%u %s)",
|
fprintf (Gbl.F.Out," (%u %s/%u %s)",
|
||||||
Usr_GetNumUsrsInCrssOfAUsr (UsrDat->UsrCod,Rol_STUDENT,Rol_TEACHER),
|
Usr_GetNumUsrsInCrssOfAUsr (UsrDat->UsrCod,Rol_STUDENT,Rol_TEACHER),
|
||||||
Txt_teachers_ABBREVIATION,
|
Txt_teachers_ABBREVIATION,
|
||||||
Usr_GetNumUsrsInCrssOfAUsr (UsrDat->UsrCod,Rol_STUDENT,Rol_STUDENT),
|
Usr_GetNumUsrsInCrssOfAUsr (UsrDat->UsrCod,Rol_STUDENT,Rol_STUDENT),
|
||||||
|
@ -415,7 +415,7 @@ void Prf_ShowDetailsUserProfile (const struct UsrData *UsrDat)
|
||||||
else
|
else
|
||||||
NumPublicFiles = 0;
|
NumPublicFiles = 0;
|
||||||
fprintf (Gbl.F.Out,"<li title=\"%s\" class=\"PRF_FIG_LI\""
|
fprintf (Gbl.F.Out,"<li title=\"%s\" class=\"PRF_FIG_LI\""
|
||||||
" style=\"background-image:url('%s/file64x64.gif');\" />"
|
" style=\"background-image:url('%s/file64x64.gif');\">"
|
||||||
"%u %s (%u %s)"
|
"%u %s (%u %s)"
|
||||||
"</li>",
|
"</li>",
|
||||||
Txt_Files_uploaded,
|
Txt_Files_uploaded,
|
||||||
|
@ -430,7 +430,7 @@ void Prf_ShowDetailsUserProfile (const struct UsrData *UsrDat)
|
||||||
|
|
||||||
/* Time since first click */
|
/* Time since first click */
|
||||||
fprintf (Gbl.F.Out,"<li title=\"%s\" class=\"PRF_FIG_LI\""
|
fprintf (Gbl.F.Out,"<li title=\"%s\" class=\"PRF_FIG_LI\""
|
||||||
" style=\"background-image:url('%s/clock64x64.gif');\" />",
|
" style=\"background-image:url('%s/clock64x64.gif');\">",
|
||||||
Txt_From_TIME,
|
Txt_From_TIME,
|
||||||
Gbl.Prefs.IconsURL);
|
Gbl.Prefs.IconsURL);
|
||||||
if (UsrFigures.FirstClickTimeUTC)
|
if (UsrFigures.FirstClickTimeUTC)
|
||||||
|
@ -468,7 +468,7 @@ void Prf_ShowDetailsUserProfile (const struct UsrData *UsrDat)
|
||||||
{
|
{
|
||||||
/* Number of clicks */
|
/* Number of clicks */
|
||||||
fprintf (Gbl.F.Out,"<li title=\"%s\" class=\"PRF_FIG_LI\""
|
fprintf (Gbl.F.Out,"<li title=\"%s\" class=\"PRF_FIG_LI\""
|
||||||
" style=\"background-image:url('%s/click64x64.gif');\" />",
|
" style=\"background-image:url('%s/click64x64.gif');\">",
|
||||||
Txt_Clicks,
|
Txt_Clicks,
|
||||||
Gbl.Prefs.IconsURL);
|
Gbl.Prefs.IconsURL);
|
||||||
|
|
||||||
|
@ -496,7 +496,7 @@ void Prf_ShowDetailsUserProfile (const struct UsrData *UsrDat)
|
||||||
|
|
||||||
/***** Number of file views *****/
|
/***** Number of file views *****/
|
||||||
fprintf (Gbl.F.Out,"<li title=\"%s\" class=\"PRF_FIG_LI\""
|
fprintf (Gbl.F.Out,"<li title=\"%s\" class=\"PRF_FIG_LI\""
|
||||||
" style=\"background-image:url('%s/download64x64.png');\" />",
|
" style=\"background-image:url('%s/download64x64.png');\">",
|
||||||
Txt_Downloads,
|
Txt_Downloads,
|
||||||
Gbl.Prefs.IconsURL);
|
Gbl.Prefs.IconsURL);
|
||||||
if (UsrFigures.NumFileViews >= 0)
|
if (UsrFigures.NumFileViews >= 0)
|
||||||
|
@ -522,7 +522,7 @@ void Prf_ShowDetailsUserProfile (const struct UsrData *UsrDat)
|
||||||
|
|
||||||
/***** Number of posts in forums *****/
|
/***** Number of posts in forums *****/
|
||||||
fprintf (Gbl.F.Out,"<li title=\"%s\" class=\"PRF_FIG_LI\""
|
fprintf (Gbl.F.Out,"<li title=\"%s\" class=\"PRF_FIG_LI\""
|
||||||
" style=\"background-image:url('%s/forum64x64.gif');\" />",
|
" style=\"background-image:url('%s/forum64x64.gif');\">",
|
||||||
Txt_Forums,
|
Txt_Forums,
|
||||||
Gbl.Prefs.IconsURL);
|
Gbl.Prefs.IconsURL);
|
||||||
if (UsrFigures.NumForPst >= 0)
|
if (UsrFigures.NumForPst >= 0)
|
||||||
|
@ -549,7 +549,7 @@ void Prf_ShowDetailsUserProfile (const struct UsrData *UsrDat)
|
||||||
|
|
||||||
/***** Number of messages sent *****/
|
/***** Number of messages sent *****/
|
||||||
fprintf (Gbl.F.Out,"<li title=\"%s\" class=\"PRF_FIG_LI\""
|
fprintf (Gbl.F.Out,"<li title=\"%s\" class=\"PRF_FIG_LI\""
|
||||||
" style=\"background-image:url('%s/msg64x64.gif');\" />",
|
" style=\"background-image:url('%s/msg64x64.gif');\">",
|
||||||
Txt_Messages,
|
Txt_Messages,
|
||||||
Gbl.Prefs.IconsURL);
|
Gbl.Prefs.IconsURL);
|
||||||
if (UsrFigures.NumMsgSnt >= 0)
|
if (UsrFigures.NumMsgSnt >= 0)
|
||||||
|
|
|
@ -107,6 +107,11 @@ static void Rep_ShowOrPrintMyUsageReport (Rep_SeeOrPrint_t SeeOrPrint)
|
||||||
extern const char *Txt_Messages_sent;
|
extern const char *Txt_Messages_sent;
|
||||||
extern const char *Txt_message;
|
extern const char *Txt_message;
|
||||||
extern const char *Txt_messages;
|
extern const char *Txt_messages;
|
||||||
|
extern const char *Txt_USER_in_COURSE;
|
||||||
|
extern const char *Txt_ROLES_SINGUL_Abc[Rol_NUM_ROLES][Usr_NUM_SEXS];
|
||||||
|
extern const char *Txt_courses;
|
||||||
|
extern const char *Txt_teachers_ABBREVIATION;
|
||||||
|
extern const char *Txt_students_ABBREVIATION;
|
||||||
unsigned NumID;
|
unsigned NumID;
|
||||||
char CtyName[Cty_MAX_BYTES_COUNTRY_NAME+1];
|
char CtyName[Cty_MAX_BYTES_COUNTRY_NAME+1];
|
||||||
struct Institution Ins;
|
struct Institution Ins;
|
||||||
|
@ -114,6 +119,8 @@ static void Rep_ShowOrPrintMyUsageReport (Rep_SeeOrPrint_t SeeOrPrint)
|
||||||
struct tm FirstClickTime;
|
struct tm FirstClickTime;
|
||||||
unsigned NumFiles;
|
unsigned NumFiles;
|
||||||
unsigned NumPublicFiles;
|
unsigned NumPublicFiles;
|
||||||
|
Rol_Role_t Role;
|
||||||
|
unsigned NumCrss;
|
||||||
|
|
||||||
/***** Start frame and table *****/
|
/***** Start frame and table *****/
|
||||||
Lay_StartRoundFrame ("100%",Txt_Report_of_use_of_the_platform,
|
Lay_StartRoundFrame ("100%",Txt_Report_of_use_of_the_platform,
|
||||||
|
@ -122,7 +129,7 @@ static void Rep_ShowOrPrintMyUsageReport (Rep_SeeOrPrint_t SeeOrPrint)
|
||||||
fprintf (Gbl.F.Out,"<ul class=\"LEFT_MIDDLE\">");
|
fprintf (Gbl.F.Out,"<ul class=\"LEFT_MIDDLE\">");
|
||||||
|
|
||||||
/***** User's name *****/
|
/***** User's name *****/
|
||||||
fprintf (Gbl.F.Out,"<li>%s: %s</li>",
|
fprintf (Gbl.F.Out,"<li>%s: <strong>%s</strong></li>",
|
||||||
Txt_User[Gbl.Usrs.Me.UsrDat.Sex],
|
Txt_User[Gbl.Usrs.Me.UsrDat.Sex],
|
||||||
Gbl.Usrs.Me.UsrDat.FullName);
|
Gbl.Usrs.Me.UsrDat.FullName);
|
||||||
|
|
||||||
|
@ -197,7 +204,7 @@ static void Rep_ShowOrPrintMyUsageReport (Rep_SeeOrPrint_t SeeOrPrint)
|
||||||
fprintf (Gbl.F.Out," (");
|
fprintf (Gbl.F.Out," (");
|
||||||
Str_WriteFloatNum ((float) UsrFigures.NumClicks /
|
Str_WriteFloatNum ((float) UsrFigures.NumClicks /
|
||||||
(float) UsrFigures.NumDays);
|
(float) UsrFigures.NumDays);
|
||||||
fprintf (Gbl.F.Out,"/%s)",Txt_day);
|
fprintf (Gbl.F.Out," / %s)",Txt_day);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else // Number of clicks is unknown
|
else // Number of clicks is unknown
|
||||||
|
@ -231,7 +238,7 @@ static void Rep_ShowOrPrintMyUsageReport (Rep_SeeOrPrint_t SeeOrPrint)
|
||||||
fprintf (Gbl.F.Out," (");
|
fprintf (Gbl.F.Out," (");
|
||||||
Str_WriteFloatNum ((float) UsrFigures.NumFileViews /
|
Str_WriteFloatNum ((float) UsrFigures.NumFileViews /
|
||||||
(float) UsrFigures.NumDays);
|
(float) UsrFigures.NumDays);
|
||||||
fprintf (Gbl.F.Out,"/%s)",Txt_day);
|
fprintf (Gbl.F.Out," / %s)",Txt_day);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else // Number of file views is unknown
|
else // Number of file views is unknown
|
||||||
|
@ -251,7 +258,7 @@ static void Rep_ShowOrPrintMyUsageReport (Rep_SeeOrPrint_t SeeOrPrint)
|
||||||
fprintf (Gbl.F.Out," (");
|
fprintf (Gbl.F.Out," (");
|
||||||
Str_WriteFloatNum ((float) UsrFigures.NumForPst /
|
Str_WriteFloatNum ((float) UsrFigures.NumForPst /
|
||||||
(float) UsrFigures.NumDays);
|
(float) UsrFigures.NumDays);
|
||||||
fprintf (Gbl.F.Out,"/%s)",Txt_day);
|
fprintf (Gbl.F.Out," / %s)",Txt_day);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else // Number of forum posts is unknown
|
else // Number of forum posts is unknown
|
||||||
|
@ -271,13 +278,35 @@ static void Rep_ShowOrPrintMyUsageReport (Rep_SeeOrPrint_t SeeOrPrint)
|
||||||
fprintf (Gbl.F.Out," (");
|
fprintf (Gbl.F.Out," (");
|
||||||
Str_WriteFloatNum ((float) UsrFigures.NumMsgSnt /
|
Str_WriteFloatNum ((float) UsrFigures.NumMsgSnt /
|
||||||
(float) UsrFigures.NumDays);
|
(float) UsrFigures.NumDays);
|
||||||
fprintf (Gbl.F.Out,"/%s)",Txt_day);
|
fprintf (Gbl.F.Out," / %s)",Txt_day);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else // Number of messages sent is unknown
|
else // Number of messages sent is unknown
|
||||||
fprintf (Gbl.F.Out,"?");
|
fprintf (Gbl.F.Out,"?");
|
||||||
fprintf (Gbl.F.Out,"</li>");
|
fprintf (Gbl.F.Out,"</li>");
|
||||||
|
|
||||||
|
/***** Number of courses in which the user is student/teacher *****/
|
||||||
|
for (Role = Rol_STUDENT;
|
||||||
|
Role <= Rol_TEACHER;
|
||||||
|
Role++)
|
||||||
|
{
|
||||||
|
NumCrss = Usr_GetNumCrssOfUsrWithARole (Gbl.Usrs.Me.UsrDat.UsrCod,Role);
|
||||||
|
sprintf (Gbl.Title,Txt_USER_in_COURSE,Txt_ROLES_SINGUL_Abc[Role][Gbl.Usrs.Me.UsrDat.Sex]);
|
||||||
|
fprintf (Gbl.F.Out,"<li>%s: %u %s",
|
||||||
|
Gbl.Title,
|
||||||
|
NumCrss,
|
||||||
|
Txt_courses);
|
||||||
|
if (NumCrss)
|
||||||
|
{
|
||||||
|
fprintf (Gbl.F.Out," (%u %s / %u %s)",
|
||||||
|
Usr_GetNumUsrsInCrssOfAUsr (Gbl.Usrs.Me.UsrDat.UsrCod,Rol_TEACHER,Rol_TEACHER),
|
||||||
|
Txt_teachers_ABBREVIATION,
|
||||||
|
Usr_GetNumUsrsInCrssOfAUsr (Gbl.Usrs.Me.UsrDat.UsrCod,Rol_TEACHER,Rol_STUDENT),
|
||||||
|
Txt_students_ABBREVIATION);
|
||||||
|
}
|
||||||
|
fprintf (Gbl.F.Out,"</li>");
|
||||||
|
}
|
||||||
|
|
||||||
fprintf (Gbl.F.Out,"</ul>");
|
fprintf (Gbl.F.Out,"</ul>");
|
||||||
|
|
||||||
/***** Show details of user's profile *****/
|
/***** Show details of user's profile *****/
|
||||||
|
|
18
swad_text.c
18
swad_text.c
|
@ -49093,23 +49093,23 @@ const char *Txt_User_ID =
|
||||||
|
|
||||||
const char *Txt_USER_in_COURSE = // Warning: it is very important to include %s in the following sentences
|
const char *Txt_USER_in_COURSE = // Warning: it is very important to include %s in the following sentences
|
||||||
#if L==1
|
#if L==1
|
||||||
"%s en:";
|
"%s en";
|
||||||
#elif L==2
|
#elif L==2
|
||||||
"%s im:";
|
"%s im";
|
||||||
#elif L==3
|
#elif L==3
|
||||||
"%s in:";
|
"%s in";
|
||||||
#elif L==4
|
#elif L==4
|
||||||
"%s en:";
|
"%s en";
|
||||||
#elif L==5
|
#elif L==5
|
||||||
"%s dans:";
|
"%s dans";
|
||||||
#elif L==6
|
#elif L==6
|
||||||
"%s en:"; // Okoteve traducción
|
"%s en"; // Okoteve traducción
|
||||||
#elif L==7
|
#elif L==7
|
||||||
"%s in:";
|
"%s in";
|
||||||
#elif L==8
|
#elif L==8
|
||||||
"%s w:";
|
"%s w";
|
||||||
#elif L==9
|
#elif L==9
|
||||||
"%s em:";
|
"%s em";
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
const char *Txt_User_not_found_or_you_do_not_have_permission_ =
|
const char *Txt_User_not_found_or_you_do_not_have_permission_ =
|
||||||
|
|
Loading…
Reference in New Issue