mirror of
https://github.com/acanas/swad-core.git
synced 2024-06-01 06:15:31 +02:00
Version 20.51.5: Mar 18, 2021 File-browser-size database table renamed.
This commit is contained in:
parent
ce8a273648
commit
eb3a037556
|
@ -173,9 +173,9 @@ CREATE TABLE IF NOT EXISTS brw_last (
|
||||||
LastClick DATETIME NOT NULL,
|
LastClick DATETIME NOT NULL,
|
||||||
UNIQUE INDEX(UsrCod,FileBrowser,Cod));
|
UNIQUE INDEX(UsrCod,FileBrowser,Cod));
|
||||||
--
|
--
|
||||||
-- Table file_browser_size: stores the sizes of the file zones
|
-- Table brw_sizes: stores the sizes of the file zones
|
||||||
--
|
--
|
||||||
CREATE TABLE IF NOT EXISTS file_browser_size (
|
CREATE TABLE IF NOT EXISTS brw_sizes (
|
||||||
FileBrowser TINYINT NOT NULL,
|
FileBrowser TINYINT NOT NULL,
|
||||||
Cod INT NOT NULL DEFAULT -1,
|
Cod INT NOT NULL DEFAULT -1,
|
||||||
ZoneUsrCod INT NOT NULL DEFAULT -1,
|
ZoneUsrCod INT NOT NULL DEFAULT -1,
|
||||||
|
|
|
@ -600,13 +600,17 @@ TODO: Salvador Romero Cort
|
||||||
|
|
||||||
TODO: FIX BUG, URGENT! En las fechas como parámetro Dat_WriteParamsIniEndDates(), por ejemplo al cambiar el color de la gráfica de accesos por día y hora, no se respeta la zona horaria.
|
TODO: FIX BUG, URGENT! En las fechas como parámetro Dat_WriteParamsIniEndDates(), por ejemplo al cambiar el color de la gráfica de accesos por día y hora, no se respeta la zona horaria.
|
||||||
*/
|
*/
|
||||||
#define Log_PLATFORM_VERSION "SWAD 20.51.4 (2021-03-18)"
|
#define Log_PLATFORM_VERSION "SWAD 20.51.5 (2021-03-18)"
|
||||||
#define CSS_FILE "swad20.45.css"
|
#define CSS_FILE "swad20.45.css"
|
||||||
#define JS_FILE "swad20.6.2.js"
|
#define JS_FILE "swad20.6.2.js"
|
||||||
/*
|
/*
|
||||||
TODO: Rename CENTRE to CENTER in help wiki.
|
TODO: Rename CENTRE to CENTER in help wiki.
|
||||||
TODO: Rename ASSESSMENT.Announcements to ASSESSMENT.Calls_for_exams
|
TODO: Rename ASSESSMENT.Announcements to ASSESSMENT.Calls_for_exams
|
||||||
|
|
||||||
|
Version 20.51.5: Mar 18, 2021 File-browser-size database table renamed. (307563 lines)
|
||||||
|
1 change necessary in database:
|
||||||
|
RENAME TABLE file_browser_size TO brw_sizes;
|
||||||
|
|
||||||
Version 20.51.4: Mar 18, 2021 File-browser-last database table renamed. (307563 lines)
|
Version 20.51.4: Mar 18, 2021 File-browser-last database table renamed. (307563 lines)
|
||||||
1 change necessary in database:
|
1 change necessary in database:
|
||||||
RENAME TABLE file_browser_last TO brw_last;
|
RENAME TABLE file_browser_last TO brw_last;
|
||||||
|
|
|
@ -455,9 +455,9 @@ mysql> DESCRIBE brw_last;
|
||||||
"LastClick DATETIME NOT NULL,"
|
"LastClick DATETIME NOT NULL,"
|
||||||
"UNIQUE INDEX(UsrCod,FileBrowser,Cod))");
|
"UNIQUE INDEX(UsrCod,FileBrowser,Cod))");
|
||||||
|
|
||||||
/***** Table file_browser_size *****/
|
/***** Table brw_sizes *****/
|
||||||
/*
|
/*
|
||||||
mysql> DESCRIBE file_browser_size;
|
mysql> DESCRIBE brw_sizes;
|
||||||
+-------------+------------+------+-----+---------+-------+
|
+-------------+------------+------+-----+---------+-------+
|
||||||
| Field | Type | Null | Key | Default | Extra |
|
| Field | Type | Null | Key | Default | Extra |
|
||||||
+-------------+------------+------+-----+---------+-------+
|
+-------------+------------+------+-----+---------+-------+
|
||||||
|
@ -471,7 +471,7 @@ mysql> DESCRIBE file_browser_size;
|
||||||
+-------------+------------+------+-----+---------+-------+
|
+-------------+------------+------+-----+---------+-------+
|
||||||
7 rows in set (0.00 sec)
|
7 rows in set (0.00 sec)
|
||||||
*/
|
*/
|
||||||
DB_CreateTable ("CREATE TABLE IF NOT EXISTS file_browser_size ("
|
DB_CreateTable ("CREATE TABLE IF NOT EXISTS brw_sizes ("
|
||||||
"FileBrowser TINYINT NOT NULL,"
|
"FileBrowser TINYINT NOT NULL,"
|
||||||
"Cod INT NOT NULL DEFAULT -1,"
|
"Cod INT NOT NULL DEFAULT -1,"
|
||||||
"ZoneUsrCod INT NOT NULL DEFAULT -1,"
|
"ZoneUsrCod INT NOT NULL DEFAULT -1,"
|
||||||
|
|
1090
swad_figure.c
1090
swad_figure.c
File diff suppressed because it is too large
Load Diff
|
@ -91,7 +91,7 @@ struct Brw_NumObjects
|
||||||
/***************************** Public constants ******************************/
|
/***************************** Public constants ******************************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
// Browsers types for database "files" and "file_browser_size" tables
|
// Browsers types for database "files" and "brw_sizes" tables
|
||||||
const Brw_FileBrowser_t Brw_FileBrowserForDB_files[Brw_NUM_TYPES_FILE_BROWSER] =
|
const Brw_FileBrowser_t Brw_FileBrowserForDB_files[Brw_NUM_TYPES_FILE_BROWSER] =
|
||||||
{
|
{
|
||||||
[Brw_UNKNOWN ] = Brw_UNKNOWN,
|
[Brw_UNKNOWN ] = Brw_UNKNOWN,
|
||||||
|
@ -4151,7 +4151,7 @@ static void Brw_StoreSizeOfFileTreeInDB (void)
|
||||||
|
|
||||||
/***** Update size of the file browser in database *****/
|
/***** Update size of the file browser in database *****/
|
||||||
DB_QueryREPLACE ("can not store the size of a file browser",
|
DB_QueryREPLACE ("can not store the size of a file browser",
|
||||||
"REPLACE INTO file_browser_size"
|
"REPLACE INTO brw_sizes"
|
||||||
" (FileBrowser,Cod,ZoneUsrCod,"
|
" (FileBrowser,Cod,ZoneUsrCod,"
|
||||||
"NumLevels,NumFolders,NumFiles,TotalSize)"
|
"NumLevels,NumFolders,NumFiles,TotalSize)"
|
||||||
" VALUES"
|
" VALUES"
|
||||||
|
@ -4216,7 +4216,7 @@ void Brw_RemoveInsFilesFromDB (long InsCod)
|
||||||
/***** Remove from database the entries that store
|
/***** Remove from database the entries that store
|
||||||
the sizes of the file zones *****/
|
the sizes of the file zones *****/
|
||||||
DB_QueryDELETE ("can not remove sizes of file zones of an institution",
|
DB_QueryDELETE ("can not remove sizes of file zones of an institution",
|
||||||
"DELETE FROM file_browser_size"
|
"DELETE FROM brw_sizes"
|
||||||
" WHERE FileBrowser IN (%u,%u)"
|
" WHERE FileBrowser IN (%u,%u)"
|
||||||
" AND Cod=%ld",
|
" AND Cod=%ld",
|
||||||
(unsigned) Brw_ADMI_DOC_INS,
|
(unsigned) Brw_ADMI_DOC_INS,
|
||||||
|
@ -4280,7 +4280,7 @@ void Brw_RemoveCtrFilesFromDB (long CtrCod)
|
||||||
|
|
||||||
/***** Remove from database the entries that store the sizes of the file zones *****/
|
/***** Remove from database the entries that store the sizes of the file zones *****/
|
||||||
DB_QueryDELETE ("can not remove sizes of file zones of a center",
|
DB_QueryDELETE ("can not remove sizes of file zones of a center",
|
||||||
"DELETE FROM file_browser_size"
|
"DELETE FROM brw_sizes"
|
||||||
" WHERE FileBrowser IN (%u,%u)"
|
" WHERE FileBrowser IN (%u,%u)"
|
||||||
" AND Cod=%ld",
|
" AND Cod=%ld",
|
||||||
(unsigned) Brw_ADMI_DOC_CTR,
|
(unsigned) Brw_ADMI_DOC_CTR,
|
||||||
|
@ -4343,7 +4343,7 @@ void Brw_RemoveDegFilesFromDB (long DegCod)
|
||||||
|
|
||||||
/***** Remove from database the entries that store the sizes of the file zones *****/
|
/***** Remove from database the entries that store the sizes of the file zones *****/
|
||||||
DB_QueryDELETE ("can not remove sizes of file zones of a degree",
|
DB_QueryDELETE ("can not remove sizes of file zones of a degree",
|
||||||
"DELETE FROM file_browser_size"
|
"DELETE FROM brw_sizes"
|
||||||
" WHERE FileBrowser IN (%u,%u)"
|
" WHERE FileBrowser IN (%u,%u)"
|
||||||
" AND Cod=%ld",
|
" AND Cod=%ld",
|
||||||
(unsigned) Brw_ADMI_DOC_DEG,
|
(unsigned) Brw_ADMI_DOC_DEG,
|
||||||
|
@ -4549,7 +4549,7 @@ void Brw_RemoveCrsFilesFromDB (long CrsCod)
|
||||||
/***** Remove from database the entries that store the sizes of the file zones *****/
|
/***** Remove from database the entries that store the sizes of the file zones *****/
|
||||||
/* Remove from course file zones */
|
/* Remove from course file zones */
|
||||||
DB_QueryDELETE ("can not remove sizes of file zones of a course",
|
DB_QueryDELETE ("can not remove sizes of file zones of a course",
|
||||||
"DELETE FROM file_browser_size"
|
"DELETE FROM brw_sizes"
|
||||||
" WHERE FileBrowser IN (%u,%u,%u,%u,%u,%u)"
|
" WHERE FileBrowser IN (%u,%u,%u,%u,%u,%u)"
|
||||||
" AND Cod=%ld",
|
" AND Cod=%ld",
|
||||||
(unsigned) Brw_ADMI_DOC_CRS,
|
(unsigned) Brw_ADMI_DOC_CRS,
|
||||||
|
@ -4562,7 +4562,7 @@ void Brw_RemoveCrsFilesFromDB (long CrsCod)
|
||||||
|
|
||||||
/* Remove from group file zones */
|
/* Remove from group file zones */
|
||||||
DB_QueryDELETE ("can not remove sizes of file zones of a course",
|
DB_QueryDELETE ("can not remove sizes of file zones of a course",
|
||||||
"DELETE FROM file_browser_size"
|
"DELETE FROM brw_sizes"
|
||||||
" WHERE FileBrowser IN (%u,%u,%u,%u)"
|
" WHERE FileBrowser IN (%u,%u,%u,%u)"
|
||||||
" AND Cod IN %s",
|
" AND Cod IN %s",
|
||||||
(unsigned) Brw_ADMI_DOC_GRP,
|
(unsigned) Brw_ADMI_DOC_GRP,
|
||||||
|
@ -4573,7 +4573,7 @@ void Brw_RemoveCrsFilesFromDB (long CrsCod)
|
||||||
|
|
||||||
/* Remove from project file zones */
|
/* Remove from project file zones */
|
||||||
DB_QueryDELETE ("can not remove sizes of file zones of a course",
|
DB_QueryDELETE ("can not remove sizes of file zones of a course",
|
||||||
"DELETE FROM file_browser_size"
|
"DELETE FROM brw_sizes"
|
||||||
" WHERE FileBrowser IN (%u,%u)"
|
" WHERE FileBrowser IN (%u,%u)"
|
||||||
" AND Cod IN %s",
|
" AND Cod IN %s",
|
||||||
(unsigned) Brw_ADMI_DOC_PRJ,
|
(unsigned) Brw_ADMI_DOC_PRJ,
|
||||||
|
@ -4680,7 +4680,7 @@ void Brw_RemoveGrpFilesFromDB (long GrpCod)
|
||||||
|
|
||||||
/***** Remove from database the entries that store the sizes of the file zones *****/
|
/***** Remove from database the entries that store the sizes of the file zones *****/
|
||||||
DB_QueryDELETE ("can not remove sizes of file zones of a group",
|
DB_QueryDELETE ("can not remove sizes of file zones of a group",
|
||||||
"DELETE FROM file_browser_size"
|
"DELETE FROM brw_sizes"
|
||||||
" WHERE FileBrowser IN (%u,%u,%u,%u)"
|
" WHERE FileBrowser IN (%u,%u,%u,%u)"
|
||||||
" AND Cod=%ld",
|
" AND Cod=%ld",
|
||||||
(unsigned) Brw_ADMI_DOC_GRP,
|
(unsigned) Brw_ADMI_DOC_GRP,
|
||||||
|
@ -4748,7 +4748,7 @@ void Brw_RemovePrjFilesFromDB (long PrjCod)
|
||||||
|
|
||||||
/***** Remove from database the entries that store the sizes of the file zones *****/
|
/***** Remove from database the entries that store the sizes of the file zones *****/
|
||||||
DB_QueryDELETE ("can not remove sizes of file zones of a project",
|
DB_QueryDELETE ("can not remove sizes of file zones of a project",
|
||||||
"DELETE FROM file_browser_size"
|
"DELETE FROM brw_sizes"
|
||||||
" WHERE FileBrowser IN (%u,%u)"
|
" WHERE FileBrowser IN (%u,%u)"
|
||||||
" AND Cod=%ld",
|
" AND Cod=%ld",
|
||||||
(unsigned) Brw_ADMI_DOC_PRJ,
|
(unsigned) Brw_ADMI_DOC_PRJ,
|
||||||
|
@ -4909,7 +4909,7 @@ void Brw_RemoveWrkFilesFromDB (long CrsCod,long UsrCod)
|
||||||
|
|
||||||
/***** Remove from database the entries that store the sizes of the file zones *****/
|
/***** Remove from database the entries that store the sizes of the file zones *****/
|
||||||
DB_QueryDELETE ("can not remove file browser sizes",
|
DB_QueryDELETE ("can not remove file browser sizes",
|
||||||
"DELETE FROM file_browser_size"
|
"DELETE FROM brw_sizes"
|
||||||
" WHERE FileBrowser IN (%u,%u)"
|
" WHERE FileBrowser IN (%u,%u)"
|
||||||
" AND Cod=%ld"
|
" AND Cod=%ld"
|
||||||
" AND ZoneUsrCod=%ld",
|
" AND ZoneUsrCod=%ld",
|
||||||
|
@ -4965,7 +4965,7 @@ void Brw_RemoveUsrFilesFromDB (long UsrCod)
|
||||||
|
|
||||||
/***** Remove from database the entries that store the sizes of the file zones *****/
|
/***** Remove from database the entries that store the sizes of the file zones *****/
|
||||||
DB_QueryDELETE ("can not remove sizes of user's file zones",
|
DB_QueryDELETE ("can not remove sizes of user's file zones",
|
||||||
"DELETE FROM file_browser_size"
|
"DELETE FROM brw_sizes"
|
||||||
" WHERE ZoneUsrCod=%ld",
|
" WHERE ZoneUsrCod=%ld",
|
||||||
UsrCod);
|
UsrCod);
|
||||||
|
|
||||||
|
|
|
@ -1491,14 +1491,16 @@ static unsigned long Ind_GetNumFilesInDocumZonesOfCrsFromDB (long CrsCod)
|
||||||
DB_QuerySELECT (&mysql_res,"can not get the number of files",
|
DB_QuerySELECT (&mysql_res,"can not get the number of files",
|
||||||
"SELECT"
|
"SELECT"
|
||||||
" (SELECT COALESCE(SUM(NumFiles),0)"
|
" (SELECT COALESCE(SUM(NumFiles),0)"
|
||||||
" FROM file_browser_size"
|
" FROM brw_sizes"
|
||||||
" WHERE FileBrowser=%u AND Cod=%ld) +"
|
" WHERE FileBrowser=%u AND Cod=%ld) +"
|
||||||
" (SELECT COALESCE(SUM(file_browser_size.NumFiles),0)"
|
" (SELECT COALESCE(SUM(brw_sizes.NumFiles),0)"
|
||||||
" FROM crs_grp_types,crs_grp,file_browser_size"
|
" FROM crs_grp_types,"
|
||||||
" WHERE crs_grp_types.CrsCod=%ld"
|
"crs_grp,"
|
||||||
" AND crs_grp_types.GrpTypCod=crs_grp.GrpTypCod"
|
"brw_sizes"
|
||||||
" AND file_browser_size.FileBrowser=%u"
|
" WHERE crs_grp_types.CrsCod=%ld"
|
||||||
" AND file_browser_size.Cod=crs_grp.GrpCod)",
|
" AND crs_grp_types.GrpTypCod=crs_grp.GrpTypCod"
|
||||||
|
" AND brw_sizes.FileBrowser=%u"
|
||||||
|
" AND brw_sizes.Cod=crs_grp.GrpCod)",
|
||||||
(unsigned) Brw_FileBrowserForDB_files[Brw_ADMI_DOC_CRS],
|
(unsigned) Brw_FileBrowserForDB_files[Brw_ADMI_DOC_CRS],
|
||||||
CrsCod,
|
CrsCod,
|
||||||
CrsCod,
|
CrsCod,
|
||||||
|
@ -1532,14 +1534,16 @@ static unsigned long Ind_GetNumFilesInShareZonesOfCrsFromDB (long CrsCod)
|
||||||
DB_QuerySELECT (&mysql_res,"can not get the number of files",
|
DB_QuerySELECT (&mysql_res,"can not get the number of files",
|
||||||
"SELECT"
|
"SELECT"
|
||||||
" (SELECT COALESCE(SUM(NumFiles),0)"
|
" (SELECT COALESCE(SUM(NumFiles),0)"
|
||||||
" FROM file_browser_size"
|
" FROM brw_sizes"
|
||||||
" WHERE FileBrowser=%u AND Cod=%ld) +"
|
" WHERE FileBrowser=%u AND Cod=%ld) +"
|
||||||
" (SELECT COALESCE(SUM(file_browser_size.NumFiles),0)"
|
" (SELECT COALESCE(SUM(brw_sizes.NumFiles),0)"
|
||||||
" FROM crs_grp_types,crs_grp,file_browser_size"
|
" FROM crs_grp_types,"
|
||||||
" WHERE crs_grp_types.CrsCod=%ld"
|
"crs_grp,"
|
||||||
" AND crs_grp_types.GrpTypCod=crs_grp.GrpTypCod"
|
"brw_sizes"
|
||||||
" AND file_browser_size.FileBrowser=%u"
|
" WHERE crs_grp_types.CrsCod=%ld"
|
||||||
" AND file_browser_size.Cod=crs_grp.GrpCod)",
|
" AND crs_grp_types.GrpTypCod=crs_grp.GrpTypCod"
|
||||||
|
" AND brw_sizes.FileBrowser=%u"
|
||||||
|
" AND brw_sizes.Cod=crs_grp.GrpCod)",
|
||||||
(unsigned) Brw_FileBrowserForDB_files[Brw_ADMI_SHR_CRS],
|
(unsigned) Brw_FileBrowserForDB_files[Brw_ADMI_SHR_CRS],
|
||||||
CrsCod,
|
CrsCod,
|
||||||
CrsCod,
|
CrsCod,
|
||||||
|
@ -1572,8 +1576,9 @@ static unsigned long Ind_GetNumFilesInAssigZonesOfCrsFromDB (long CrsCod)
|
||||||
/***** Get number of files in document zones of a course from database *****/
|
/***** Get number of files in document zones of a course from database *****/
|
||||||
DB_QuerySELECT (&mysql_res,"can not get the number of files",
|
DB_QuerySELECT (&mysql_res,"can not get the number of files",
|
||||||
"SELECT COALESCE(SUM(NumFiles),0)"
|
"SELECT COALESCE(SUM(NumFiles),0)"
|
||||||
" FROM file_browser_size"
|
" FROM brw_sizes"
|
||||||
" WHERE FileBrowser=%u AND Cod=%ld",
|
" WHERE FileBrowser=%u"
|
||||||
|
" AND Cod=%ld",
|
||||||
(unsigned) Brw_FileBrowserForDB_files[Brw_ADMI_ASG_USR],
|
(unsigned) Brw_FileBrowserForDB_files[Brw_ADMI_ASG_USR],
|
||||||
CrsCod);
|
CrsCod);
|
||||||
|
|
||||||
|
@ -1604,8 +1609,9 @@ static unsigned long Ind_GetNumFilesInWorksZonesOfCrsFromDB (long CrsCod)
|
||||||
/***** Get number of files in document zones of a course from database *****/
|
/***** Get number of files in document zones of a course from database *****/
|
||||||
DB_QuerySELECT (&mysql_res,"can not get the number of files",
|
DB_QuerySELECT (&mysql_res,"can not get the number of files",
|
||||||
"SELECT COALESCE(SUM(NumFiles),0)"
|
"SELECT COALESCE(SUM(NumFiles),0)"
|
||||||
" FROM file_browser_size"
|
" FROM brw_sizes"
|
||||||
" WHERE FileBrowser=%u AND Cod=%ld",
|
" WHERE FileBrowser=%u"
|
||||||
|
" AND Cod=%ld",
|
||||||
(unsigned) Brw_FileBrowserForDB_files[Brw_ADMI_WRK_USR],
|
(unsigned) Brw_FileBrowserForDB_files[Brw_ADMI_WRK_USR],
|
||||||
CrsCod);
|
CrsCod);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user