mirror of
https://github.com/acanas/swad-core.git
synced 2024-06-18 14:35:46 +02:00
Version 15.249.3
This commit is contained in:
parent
b630d06d71
commit
7e8954cdc8
|
@ -135,13 +135,14 @@
|
|||
/****************************** Public constants *****************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
#define Log_PLATFORM_VERSION "SWAD 15.249.2 (2016-09-08)"
|
||||
#define Log_PLATFORM_VERSION "SWAD 15.249.3 (2016-09-08)"
|
||||
#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 15.249.3: Sep 08, 2016 Fixed bug related with search of users. (203983 lines)
|
||||
Version 15.249.2: Sep 08, 2016 Shared record card and details of user's profile are shown in uswer's usage report. (203978 lines)
|
||||
Version 15.249.1: Sep 08, 2016 Removed lines with NULL values in swad_text.c. (203977 lines)
|
||||
Version 15.249: Sep 08, 2016 New option Statistics > Report. Not implemented. (204341 lines)
|
||||
|
|
|
@ -3006,6 +3006,7 @@ void Crs_GetAndWriteCrssOfAUsr (const struct UsrData *UsrDat,Rol_Role_t Role)
|
|||
extern const char *Txt_Course;
|
||||
extern const char *Txt_Teachers_ABBREVIATION;
|
||||
extern const char *Txt_Students_ABBREVIATION;
|
||||
char SubQuery[32];
|
||||
char Query[1024];
|
||||
MYSQL_RES *mysql_res;
|
||||
MYSQL_ROW row;
|
||||
|
@ -3013,16 +3014,19 @@ void Crs_GetAndWriteCrssOfAUsr (const struct UsrData *UsrDat,Rol_Role_t Role)
|
|||
unsigned NumCrs;
|
||||
|
||||
/***** Get courses of a user from database *****/
|
||||
if (Role == Rol_UNKNOWN)
|
||||
SubQuery[0] = '\0'; // Role == Rol_UNKNOWN ==> any role
|
||||
else
|
||||
sprintf (SubQuery," AND crs_usr.Role='%u'",(unsigned) Role);
|
||||
sprintf (Query,"SELECT degrees.DegCod,courses.CrsCod,degrees.ShortName,degrees.FullName,"
|
||||
"courses.Year,courses.FullName,centres.ShortName,crs_usr.Accepted"
|
||||
" FROM crs_usr,courses,degrees,centres"
|
||||
" WHERE crs_usr.UsrCod='%ld'"
|
||||
" AND crs_usr.Role='%u'"
|
||||
" WHERE crs_usr.UsrCod='%ld'%s"
|
||||
" AND crs_usr.CrsCod=courses.CrsCod"
|
||||
" AND courses.DegCod=degrees.DegCod"
|
||||
" AND degrees.CtrCod=centres.CtrCod"
|
||||
" ORDER BY degrees.FullName,courses.Year,courses.FullName",
|
||||
UsrDat->UsrCod,(unsigned) Role);
|
||||
UsrDat->UsrCod,SubQuery);
|
||||
|
||||
/***** List the courses (one row per course) *****/
|
||||
if ((NumCrss = (unsigned) DB_QuerySELECT (Query,&mysql_res,"can not get courses of a user")))
|
||||
|
|
Loading…
Reference in New Issue
Block a user