mirror of https://github.com/acanas/swad-core.git
Version19.210.4
This commit is contained in:
parent
b197ba44df
commit
85c3748a08
|
@ -544,10 +544,11 @@ enscript -2 --landscape --color --file-align=2 --highlight --line-numbers -o - *
|
|||
En OpenSWAD:
|
||||
ps2pdf source.ps destination.pdf
|
||||
*/
|
||||
#define Log_PLATFORM_VERSION "SWAD 19.210.3 (2020-05-03)"
|
||||
#define Log_PLATFORM_VERSION "SWAD 19.210.4 (2020-05-05)"
|
||||
#define CSS_FILE "swad19.193.1.css"
|
||||
#define JS_FILE "swad19.193.1.js"
|
||||
/*
|
||||
Version 19.210.4: May 05, 2020 Fixed bug searching courses. (301103 lines)
|
||||
Version 19.210.3: May 03, 2020 All figures cacheable are cached everytime they are calculated. (301089 lines)
|
||||
Version 19.210.2: May 03, 2020 More figures cached. (301125 lines)
|
||||
Version 19.210.1: May 03, 2020 More figures cached. (301129 lines)
|
||||
|
|
|
@ -2630,6 +2630,7 @@ void Crs_GetAndWriteCrssOfAUsr (const struct UsrData *UsrDat,Rol_Role_t Role)
|
|||
HTM_TH (1,1,"CM",Txt_Year_OF_A_DEGREE);
|
||||
HTM_TH (1,1,"LM",Txt_Course);
|
||||
HTM_TH (1,1,"RM",Txt_ROLES_PLURAL_BRIEF_Abc[Rol_TCH]);
|
||||
HTM_TH (1,1,"RM",Txt_ROLES_PLURAL_BRIEF_Abc[Rol_NET]);
|
||||
HTM_TH (1,1,"RM",Txt_ROLES_PLURAL_BRIEF_Abc[Rol_STD]);
|
||||
|
||||
HTM_TR_End ();
|
||||
|
@ -2689,6 +2690,7 @@ void Crs_ListCrssFound (MYSQL_RES **mysql_res,unsigned NumCrss)
|
|||
HTM_TH (1,1,"CM",Txt_Year_OF_A_DEGREE);
|
||||
HTM_TH (1,1,"LM",Txt_Course);
|
||||
HTM_TH (1,1,"RM",Txt_ROLES_PLURAL_BRIEF_Abc[Rol_TCH]);
|
||||
HTM_TH (1,1,"RM",Txt_ROLES_PLURAL_BRIEF_Abc[Rol_NET]);
|
||||
HTM_TH (1,1,"RM",Txt_ROLES_PLURAL_BRIEF_Abc[Rol_STD]);
|
||||
|
||||
HTM_TR_End ();
|
||||
|
@ -2724,23 +2726,24 @@ static void Crs_WriteRowCrsData (unsigned NumCrs,MYSQL_ROW row,bool WriteColumnA
|
|||
extern const char *Txt_YEAR_OF_DEGREE[1 + Deg_MAX_YEARS_PER_DEGREE];
|
||||
struct Degree Deg;
|
||||
long CrsCod;
|
||||
unsigned NumTchs;
|
||||
unsigned NumStds;
|
||||
unsigned NumNETs;
|
||||
unsigned NumTchs;
|
||||
unsigned NumUsrs;
|
||||
const char *ClassTxt;
|
||||
const char *ClassLink;
|
||||
const char *BgColor;
|
||||
bool Accepted;
|
||||
static unsigned RowEvenOdd = 1;
|
||||
|
||||
/*
|
||||
SELECT degrees.DegCod 0
|
||||
courses.CrsCod 1
|
||||
degrees.ShortName 2
|
||||
degrees.FullName 3
|
||||
courses.Year 4
|
||||
courses.FullName 5
|
||||
centres.ShortName 6
|
||||
crs_usr.Accepted 7 (only if WriteColumnAccepted == true)
|
||||
SELECT degrees.DegCod row[0]
|
||||
courses.CrsCod row[1]
|
||||
degrees.ShortName row[2]
|
||||
degrees.FullName row[3]
|
||||
courses.Year row[4]
|
||||
courses.FullName row[5]
|
||||
centres.ShortName row[6]
|
||||
crs_usr.Accepted row[7] (only if WriteColumnAccepted == true)
|
||||
*/
|
||||
|
||||
/***** Get degree code (row[0]) *****/
|
||||
|
@ -2754,12 +2757,11 @@ static void Crs_WriteRowCrsData (unsigned NumCrs,MYSQL_ROW row,bool WriteColumnA
|
|||
Lay_ShowErrorAndExit ("Wrong code of course.");
|
||||
|
||||
/***** Get number of teachers and students in this course *****/
|
||||
NumTchs = Usr_GetNumUsrsInCrss (Hie_CRS,CrsCod,
|
||||
1 << Rol_NET |
|
||||
1 << Rol_TCH);
|
||||
NumStds = Usr_GetNumUsrsInCrss (Hie_CRS,CrsCod,
|
||||
1 << Rol_STD);
|
||||
if (NumTchs + NumStds)
|
||||
NumStds = Usr_GetNumUsrsInCrss (Hie_CRS,CrsCod,1 << Rol_STD);
|
||||
NumNETs = Usr_GetNumUsrsInCrss (Hie_CRS,CrsCod,1 << Rol_NET);
|
||||
NumTchs = Usr_GetNumUsrsInCrss (Hie_CRS,CrsCod,1 << Rol_TCH);
|
||||
NumUsrs = NumStds + NumNETs + NumTchs;
|
||||
if (NumUsrs)
|
||||
{
|
||||
ClassTxt = "DAT_N";
|
||||
ClassLink = "BT_LINK LT DAT_N";
|
||||
|
@ -2827,6 +2829,11 @@ static void Crs_WriteRowCrsData (unsigned NumCrs,MYSQL_ROW row,bool WriteColumnA
|
|||
HTM_Unsigned (NumTchs);
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** Write number of non-editing teachers in course *****/
|
||||
HTM_TD_Begin ("class=\"%s RT %s\"",ClassTxt,BgColor);
|
||||
HTM_Unsigned (NumNETs);
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** Write number of students in course *****/
|
||||
HTM_TD_Begin ("class=\"%s RT %s\"",ClassTxt,BgColor);
|
||||
HTM_Unsigned (NumStds);
|
||||
|
|
|
@ -607,18 +607,24 @@ static unsigned Sch_SearchCoursesInDB (const char *RangeQuery)
|
|||
if (Sch_BuildSearchQuery (SearchQuery,"courses.FullName",NULL,NULL))
|
||||
{
|
||||
/***** Query database and list courses found *****/
|
||||
NumCrss = (unsigned) DB_QuerySELECT (&mysql_res,"can not get courses",
|
||||
"SELECT degrees.DegCod,courses.CrsCod,degrees.ShortName,degrees.FullName,"
|
||||
"courses.Year,courses.FullName,centres.ShortName"
|
||||
" FROM courses,degrees,centres,institutions,countries"
|
||||
" WHERE %s"
|
||||
" AND courses.DegCod=degrees.DegCod"
|
||||
" AND degrees.CtrCod=centres.CtrCod"
|
||||
" AND centres.InsCod=institutions.InsCod"
|
||||
" AND institutions.CtyCod=countries.CtyCod"
|
||||
"%s"
|
||||
" ORDER BY courses.FullName,institutions.FullName,degrees.FullName,courses.Year",
|
||||
SearchQuery,RangeQuery);
|
||||
NumCrss = (unsigned)
|
||||
DB_QuerySELECT (&mysql_res,"can not get courses",
|
||||
"SELECT degrees.DegCod," // row[0]
|
||||
"courses.CrsCod," // row[1]
|
||||
"degrees.ShortName," // row[2]
|
||||
"degrees.FullName," // row[3]
|
||||
"courses.Year," // row[4]
|
||||
"courses.FullName," // row[5]
|
||||
"centres.ShortName" // row[6]
|
||||
" FROM courses,degrees,centres,institutions,countries"
|
||||
" WHERE %s"
|
||||
" AND courses.DegCod=degrees.DegCod"
|
||||
" AND degrees.CtrCod=centres.CtrCod"
|
||||
" AND centres.InsCod=institutions.InsCod"
|
||||
" AND institutions.CtyCod=countries.CtyCod"
|
||||
"%s"
|
||||
" ORDER BY courses.FullName,institutions.FullName,degrees.FullName,courses.Year",
|
||||
SearchQuery,RangeQuery);
|
||||
Crs_ListCrssFound (&mysql_res,NumCrss);
|
||||
return NumCrss;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue