mirror of
https://github.com/acanas/swad-core.git
synced 2024-06-06 16:55:22 +02:00
Version 15.221.3
This commit is contained in:
parent
927e2a74e9
commit
ff58b1ce86
|
@ -134,14 +134,15 @@
|
|||
/****************************** Public constants *****************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
#define Log_PLATFORM_VERSION "SWAD 15.221.2 (2016-06-08)"
|
||||
#define Log_PLATFORM_VERSION "SWAD 15.221.3 (2016-06-08)"
|
||||
#define CSS_FILE "swad15.218.css"
|
||||
#define JS_FILE "swad15.216.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.221.2: Jun 08, 2016 Fix bug in calculation of number of files in groups of a course.
|
||||
Version 15.221.3: Jun 08, 2016 Fix bug in calculation of number of files in groups of a course. (202146 lines)
|
||||
Version 15.221.2: Jun 08, 2016 Fix bug in calculation of number of files in groups of a course. (202149 lines)
|
||||
Version 15.221.1: Jun 08, 2016 Fix bug in form of indicators.
|
||||
Speed up database queries to get course info when getting indicators. (? lines)
|
||||
Version 15.221: Jun 08, 2016 Single (radio) selection of number of indicators changed to multiple (checkbox) selection. (202028 lines)
|
||||
|
|
|
@ -1411,14 +1411,14 @@ static unsigned long Ind_GetNumFilesInDocumZonesOfCrsFromDB (long CrsCod)
|
|||
char Query[1024];
|
||||
MYSQL_RES *mysql_res;
|
||||
MYSQL_ROW row;
|
||||
unsigned long NumFiles = 0UL;
|
||||
unsigned long NumFiles;
|
||||
|
||||
/***** Get number of files in document zones of a course from database *****/
|
||||
sprintf (Query,"SELECT"
|
||||
" (SELECT SUM(NumFiles)"
|
||||
" (SELECT COALESCE(SUM(NumFiles),0)"
|
||||
" FROM file_browser_size"
|
||||
" WHERE FileBrowser='%u' AND Cod='%ld') +"
|
||||
" (SELECT SUM(file_browser_size.NumFiles)"
|
||||
" (SELECT COALESCE(SUM(file_browser_size.NumFiles),0)"
|
||||
" FROM crs_grp_types,crs_grp,file_browser_size"
|
||||
" WHERE crs_grp_types.CrsCod='%ld'"
|
||||
" AND crs_grp_types.GrpTypCod=crs_grp.GrpTypCod"
|
||||
|
@ -1434,9 +1434,8 @@ static unsigned long Ind_GetNumFilesInDocumZonesOfCrsFromDB (long CrsCod)
|
|||
row = mysql_fetch_row (mysql_res);
|
||||
|
||||
/***** Get number of files (row[0]) *****/
|
||||
if (row[0])
|
||||
if (sscanf (row[0],"%lu",&NumFiles) != 1)
|
||||
Lay_ShowErrorAndExit ("Error when getting the number of files.");
|
||||
if (sscanf (row[0],"%lu",&NumFiles) != 1)
|
||||
Lay_ShowErrorAndExit ("Error when getting the number of files.");
|
||||
|
||||
/***** Free structure that stores the query result *****/
|
||||
DB_FreeMySQLResult (&mysql_res);
|
||||
|
@ -1454,14 +1453,14 @@ static unsigned long Ind_GetNumFilesInShareZonesOfCrsFromDB (long CrsCod)
|
|||
char Query[1024];
|
||||
MYSQL_RES *mysql_res;
|
||||
MYSQL_ROW row;
|
||||
unsigned long NumFiles = 0UL;
|
||||
unsigned long NumFiles;
|
||||
|
||||
/***** Get number of files in document zones of a course from database *****/
|
||||
sprintf (Query,"SELECT"
|
||||
" (SELECT SUM(NumFiles)"
|
||||
" (SELECT COALESCE(SUM(NumFiles),0)"
|
||||
" FROM file_browser_size"
|
||||
" WHERE FileBrowser='%u' AND Cod='%ld') +"
|
||||
" (SELECT SUM(file_browser_size.NumFiles)"
|
||||
" (SELECT COALESCE(SUM(file_browser_size.NumFiles),0)"
|
||||
" FROM crs_grp_types,crs_grp,file_browser_size"
|
||||
" WHERE crs_grp_types.CrsCod='%ld'"
|
||||
" AND crs_grp_types.GrpTypCod=crs_grp.GrpTypCod"
|
||||
|
@ -1477,9 +1476,8 @@ static unsigned long Ind_GetNumFilesInShareZonesOfCrsFromDB (long CrsCod)
|
|||
row = mysql_fetch_row (mysql_res);
|
||||
|
||||
/***** Get number of files (row[0]) *****/
|
||||
if (row[0])
|
||||
if (sscanf (row[0],"%lu",&NumFiles) != 1)
|
||||
Lay_ShowErrorAndExit ("Error when getting the number of files.");
|
||||
if (sscanf (row[0],"%lu",&NumFiles) != 1)
|
||||
Lay_ShowErrorAndExit ("Error when getting the number of files.");
|
||||
|
||||
/***** Free structure that stores the query result *****/
|
||||
DB_FreeMySQLResult (&mysql_res);
|
||||
|
@ -1497,10 +1495,10 @@ static unsigned long Ind_GetNumFilesInAssigZonesOfCrsFromDB (long CrsCod)
|
|||
char Query[256];
|
||||
MYSQL_RES *mysql_res;
|
||||
MYSQL_ROW row;
|
||||
unsigned long NumFiles = 0UL;
|
||||
unsigned long NumFiles;
|
||||
|
||||
/***** Get number of files in document zones of a course from database *****/
|
||||
sprintf (Query,"SELECT SUM(NumFiles)"
|
||||
sprintf (Query,"SELECT COALESCE(SUM(NumFiles),0)"
|
||||
" FROM file_browser_size"
|
||||
" WHERE FileBrowser='%u' AND Cod='%ld'",
|
||||
(unsigned) Brw_FileBrowserForDB_files[Brw_ADMI_ASSIG_USR],
|
||||
|
@ -1511,9 +1509,8 @@ static unsigned long Ind_GetNumFilesInAssigZonesOfCrsFromDB (long CrsCod)
|
|||
row = mysql_fetch_row (mysql_res);
|
||||
|
||||
/***** Get number of files (row[0]) *****/
|
||||
if (row[0])
|
||||
if (sscanf (row[0],"%lu",&NumFiles) != 1)
|
||||
Lay_ShowErrorAndExit ("Error when getting the number of files.");
|
||||
if (sscanf (row[0],"%lu",&NumFiles) != 1)
|
||||
Lay_ShowErrorAndExit ("Error when getting the number of files.");
|
||||
|
||||
/***** Free structure that stores the query result *****/
|
||||
DB_FreeMySQLResult (&mysql_res);
|
||||
|
@ -1531,10 +1528,10 @@ static unsigned long Ind_GetNumFilesInWorksZonesOfCrsFromDB (long CrsCod)
|
|||
char Query[256];
|
||||
MYSQL_RES *mysql_res;
|
||||
MYSQL_ROW row;
|
||||
unsigned long NumFiles = 0UL;
|
||||
unsigned long NumFiles;
|
||||
|
||||
/***** Get number of files in document zones of a course from database *****/
|
||||
sprintf (Query,"SELECT SUM(NumFiles)"
|
||||
sprintf (Query,"SELECT COALESCE(SUM(NumFiles),0)"
|
||||
" FROM file_browser_size"
|
||||
" WHERE FileBrowser='%u' AND Cod='%ld'",
|
||||
(unsigned) Brw_FileBrowserForDB_files[Brw_ADMI_WORKS_USR],
|
||||
|
@ -1545,9 +1542,8 @@ static unsigned long Ind_GetNumFilesInWorksZonesOfCrsFromDB (long CrsCod)
|
|||
row = mysql_fetch_row (mysql_res);
|
||||
|
||||
/***** Get number of files (row[0]) *****/
|
||||
if (row[0])
|
||||
if (sscanf (row[0],"%lu",&NumFiles) != 1)
|
||||
Lay_ShowErrorAndExit ("Error when getting the number of files.");
|
||||
if (sscanf (row[0],"%lu",&NumFiles) != 1)
|
||||
Lay_ShowErrorAndExit ("Error when getting the number of files.");
|
||||
|
||||
/***** Free structure that stores the query result *****/
|
||||
DB_FreeMySQLResult (&mysql_res);
|
||||
|
|
Loading…
Reference in New Issue
Block a user