mirror of
https://github.com/acanas/swad-core.git
synced 2024-06-18 06:25:42 +02:00
Version 14.70.1
This commit is contained in:
parent
bf1af71937
commit
3087cdd85b
|
@ -39,11 +39,12 @@
|
||||||
/****************************** Public constants *****************************/
|
/****************************** Public constants *****************************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
#define Log_PLATFORM_VERSION "SWAD 14.70 (2015/01/26)"
|
#define Log_PLATFORM_VERSION "SWAD 14.70.1 (2015/01/27)"
|
||||||
|
|
||||||
// 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 | tail -1
|
// nl swad*.c swad*.h css/swad*.css py/swad*.py js/swad*.js soap/swad*.h | tail -1
|
||||||
/*
|
/*
|
||||||
|
Version 14.70.1: Jan 27, 2015 Fixed bug when removing a user from a course. (176187 lines)
|
||||||
Version 14.70: Jan 26, 2015 Fixed bugs in statistics about sizes of file browsers.
|
Version 14.70: Jan 26, 2015 Fixed bugs in statistics about sizes of file browsers.
|
||||||
Statistics about sizes of group zones.
|
Statistics about sizes of group zones.
|
||||||
New scope (country) in statistics about sizes of file browsers. (176181 lines)
|
New scope (country) in statistics about sizes of file browsers. (176181 lines)
|
||||||
|
|
|
@ -28,8 +28,8 @@
|
||||||
/** Uncomment one of the following installations of SWAD or create your own **/
|
/** Uncomment one of the following installations of SWAD or create your own **/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
#define LOCALHOST_UBUNTU // Comment this line if not applicable
|
//#define LOCALHOST_UBUNTU // Comment this line if not applicable
|
||||||
//#define OPENSWAD_ORG // Comment this line if not applicable
|
#define OPENSWAD_ORG // Comment this line if not applicable
|
||||||
//#define SWAD_UGR_ES // Comment this line if not applicable
|
//#define SWAD_UGR_ES // Comment this line if not applicable
|
||||||
//#define WWW_CEVUNA_UNA_PY // Comment this line if not applicable
|
//#define WWW_CEVUNA_UNA_PY // Comment this line if not applicable
|
||||||
|
|
||||||
|
|
|
@ -993,15 +993,14 @@ mysql> DESCRIBE file_browser_size;
|
||||||
| Field | Type | Null | Key | Default | Extra |
|
| Field | Type | Null | Key | Default | Extra |
|
||||||
+-------------+------------+------+-----+---------+-------+
|
+-------------+------------+------+-----+---------+-------+
|
||||||
| FileBrowser | tinyint(4) | NO | PRI | NULL | |
|
| FileBrowser | tinyint(4) | NO | PRI | NULL | |
|
||||||
| CrsCod | int(11) | NO | PRI | -1 | |
|
| Cod | int(11) | NO | PRI | -1 | |
|
||||||
| GrpCod | int(11) | NO | PRI | -1 | |
|
| ZoneUsrCod | int(11) | NO | PRI | -1 | |
|
||||||
| UsrCod | int(11) | NO | PRI | -1 | |
|
|
||||||
| NumLevels | int(11) | NO | | NULL | |
|
| NumLevels | int(11) | NO | | NULL | |
|
||||||
| NumFolders | int(11) | NO | | NULL | |
|
| NumFolders | int(11) | NO | | NULL | |
|
||||||
| NumFiles | int(11) | NO | | NULL | |
|
| NumFiles | int(11) | NO | | NULL | |
|
||||||
| TotalSize | bigint(20) | NO | | NULL | |
|
| TotalSize | bigint(20) | NO | | NULL | |
|
||||||
+-------------+------------+------+-----+---------+-------+
|
+-------------+------------+------+-----+---------+-------+
|
||||||
8 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 file_browser_size ("
|
||||||
"FileBrowser TINYINT NOT NULL,"
|
"FileBrowser TINYINT NOT NULL,"
|
||||||
|
|
|
@ -3843,7 +3843,10 @@ void Brw_RemoveSomeInfoAboutCrsUsrFilesFromDB (long CrsCod,long UsrCod)
|
||||||
" AND Cod='%ld')"
|
" AND Cod='%ld')"
|
||||||
" OR "
|
" OR "
|
||||||
"(FileBrowser IN ('%u','%u','%u')"
|
"(FileBrowser IN ('%u','%u','%u')"
|
||||||
" AND Cod IN (SELECT GrpCod FROM crs_grp WHERE CrsCod='%ld'))"
|
" AND Cod IN"
|
||||||
|
" (SELECT crs_grp.GrpCod FROM crs_grp_types,crs_grp"
|
||||||
|
" WHERE crs_grp_types.CrsCod='%ld'"
|
||||||
|
" AND crs_grp_types.GrpTypCod=crs_grp.GrpTypCod))"
|
||||||
")",
|
")",
|
||||||
UsrCod,
|
UsrCod,
|
||||||
(unsigned) Brw_ADMI_DOCUM_CRS,
|
(unsigned) Brw_ADMI_DOCUM_CRS,
|
||||||
|
@ -3867,7 +3870,10 @@ void Brw_RemoveSomeInfoAboutCrsUsrFilesFromDB (long CrsCod,long UsrCod)
|
||||||
" AND Cod='%ld')"
|
" AND Cod='%ld')"
|
||||||
" OR "
|
" OR "
|
||||||
"(FileBrowser IN ('%u','%u','%u')"
|
"(FileBrowser IN ('%u','%u','%u')"
|
||||||
" AND Cod IN (SELECT GrpCod FROM crs_grp WHERE CrsCod='%ld'))"
|
" AND Cod IN"
|
||||||
|
" (SELECT crs_grp.GrpCod FROM crs_grp_types,crs_grp"
|
||||||
|
" WHERE crs_grp_types.CrsCod='%ld'"
|
||||||
|
" AND crs_grp_types.GrpTypCod=crs_grp.GrpTypCod))"
|
||||||
")",
|
")",
|
||||||
UsrCod,
|
UsrCod,
|
||||||
(unsigned) Brw_ADMI_DOCUM_CRS,
|
(unsigned) Brw_ADMI_DOCUM_CRS,
|
||||||
|
@ -3893,7 +3899,10 @@ void Brw_RemoveSomeInfoAboutCrsUsrFilesFromDB (long CrsCod,long UsrCod)
|
||||||
" AND Cod='%ld')"
|
" AND Cod='%ld')"
|
||||||
" OR "
|
" OR "
|
||||||
"(FileBrowser IN ('%u','%u','%u')"
|
"(FileBrowser IN ('%u','%u','%u')"
|
||||||
" AND Cod IN (SELECT GrpCod FROM crs_grp WHERE CrsCod='%ld'))"
|
" AND Cod IN"
|
||||||
|
" (SELECT crs_grp.GrpCod FROM crs_grp_types,crs_grp"
|
||||||
|
" WHERE crs_grp_types.CrsCod='%ld'"
|
||||||
|
" AND crs_grp_types.GrpTypCod=crs_grp.GrpTypCod))"
|
||||||
")",
|
")",
|
||||||
UsrCod,
|
UsrCod,
|
||||||
(unsigned) Brw_ADMI_DOCUM_CRS,
|
(unsigned) Brw_ADMI_DOCUM_CRS,
|
||||||
|
@ -3944,16 +3953,6 @@ void Brw_RemoveWrkFilesFromDB (long CrsCod,long UsrCod)
|
||||||
CrsCod,UsrCod);
|
CrsCod,UsrCod);
|
||||||
DB_QueryDELETE (Query,"can not remove clipboards");
|
DB_QueryDELETE (Query,"can not remove clipboards");
|
||||||
|
|
||||||
/***** Remove from database the entries that store the last time users visited file zones *****/
|
|
||||||
// Assignments and works are stored as one in file_browser_last...
|
|
||||||
// ...because a user views them at the same time
|
|
||||||
sprintf (Query,"DELETE FROM file_browser_last"
|
|
||||||
" WHERE FileBrowser='%u'"
|
|
||||||
" AND Cod='%ld' AND ZoneUsrCod='%ld'",
|
|
||||||
(unsigned) Brw_ADMI_ASSIG_USR,
|
|
||||||
CrsCod,UsrCod);
|
|
||||||
DB_QueryDELETE (Query,"can not remove file last visits");
|
|
||||||
|
|
||||||
/***** 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 *****/
|
||||||
sprintf (Query,"DELETE FROM file_browser_size"
|
sprintf (Query,"DELETE FROM file_browser_size"
|
||||||
" WHERE FileBrowser IN ('%u','%u')"
|
" WHERE FileBrowser IN ('%u','%u')"
|
||||||
|
|
11
swad_group.c
11
swad_group.c
|
@ -2548,7 +2548,10 @@ unsigned long Grp_GetGrpsOfType (long GrpTypCod,MYSQL_RES **mysql_res)
|
||||||
|
|
||||||
/***** Get groups of a type from database *****/
|
/***** Get groups of a type from database *****/
|
||||||
sprintf (Query,"SELECT GrpCod,GrpName,MaxStudents,Open,FileZones"
|
sprintf (Query,"SELECT GrpCod,GrpName,MaxStudents,Open,FileZones"
|
||||||
" FROM crs_grp WHERE GrpTypCod='%ld' ORDER BY GrpName",GrpTypCod);
|
" FROM crs_grp"
|
||||||
|
" WHERE GrpTypCod='%ld'"
|
||||||
|
" ORDER BY GrpName",
|
||||||
|
GrpTypCod);
|
||||||
return DB_QuerySELECT (Query,mysql_res,"can not get groups of a type");
|
return DB_QuerySELECT (Query,mysql_res,"can not get groups of a type");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2911,7 +2914,8 @@ static void Grp_GetLstCodGrpsUsrBelongs (long CrsCod,long GrpTypCod,
|
||||||
/***** Get groups which a user belong to from database *****/
|
/***** Get groups which a user belong to from database *****/
|
||||||
if (CrsCod < 0) // Query the groups from all the user's courses
|
if (CrsCod < 0) // Query the groups from all the user's courses
|
||||||
sprintf (Query,"SELECT GrpCod FROM crs_grp_usr"
|
sprintf (Query,"SELECT GrpCod FROM crs_grp_usr"
|
||||||
" WHERE UsrCod='%ld'",UsrCod); // Groups will be unordered
|
" WHERE UsrCod='%ld'", // Groups will be unordered
|
||||||
|
UsrCod);
|
||||||
else if (GrpTypCod < 0) // Query the groups of any type in the course
|
else if (GrpTypCod < 0) // Query the groups of any type in the course
|
||||||
sprintf (Query,"SELECT crs_grp.GrpCod FROM crs_grp_types,crs_grp,crs_grp_usr"
|
sprintf (Query,"SELECT crs_grp.GrpCod FROM crs_grp_types,crs_grp,crs_grp_usr"
|
||||||
" WHERE crs_grp_types.CrsCod='%ld' AND crs_grp_types.GrpTypCod=crs_grp.GrpTypCod"
|
" WHERE crs_grp_types.CrsCod='%ld' AND crs_grp_types.GrpTypCod=crs_grp.GrpTypCod"
|
||||||
|
@ -3399,7 +3403,8 @@ static void Grp_RemoveGroupTypeCompletely (void)
|
||||||
|
|
||||||
/***** Change all groups of this type in course timetable *****/
|
/***** Change all groups of this type in course timetable *****/
|
||||||
sprintf (Query,"UPDATE timetable_crs SET GrpCod='-1'"
|
sprintf (Query,"UPDATE timetable_crs SET GrpCod='-1'"
|
||||||
" WHERE GrpCod IN (SELECT GrpCod FROM crs_grp WHERE GrpTypCod='%ld')",
|
" WHERE GrpCod IN"
|
||||||
|
" (SELECT GrpCod FROM crs_grp WHERE GrpTypCod='%ld')",
|
||||||
Gbl.CurrentCrs.Grps.GrpTyp.GrpTypCod);
|
Gbl.CurrentCrs.Grps.GrpTyp.GrpTypCod);
|
||||||
DB_QueryUPDATE (Query,"can not update all groups of a type in course timetable");
|
DB_QueryUPDATE (Query,"can not update all groups of a type in course timetable");
|
||||||
|
|
||||||
|
|
|
@ -501,8 +501,10 @@ static unsigned Imp_GetAndListImpGrpsAndStdsFromDB (bool ItsAFormToRegRemStds)
|
||||||
unsigned NumStds,NumStd;
|
unsigned NumStds,NumStd;
|
||||||
|
|
||||||
/***** Get data of imported groups from database *****/
|
/***** Get data of imported groups from database *****/
|
||||||
sprintf (Query,"SELECT GrpCod,ExternalCrsCod,DegName,CrsName,GrpName,GrpType FROM imported_groups"
|
sprintf (Query,"SELECT GrpCod,ExternalCrsCod,DegName,CrsName,GrpName,GrpType"
|
||||||
" WHERE SessionId='%s' ORDER BY DegName,CrsName,GrpName,GrpType",
|
" FROM imported_groups"
|
||||||
|
" WHERE SessionId='%s'"
|
||||||
|
" ORDER BY DegName,CrsName,GrpName,GrpType",
|
||||||
Gbl.Session.Id);
|
Gbl.Session.Id);
|
||||||
NumGrps = (unsigned) DB_QuerySELECT (Query,&mysql_res_grp,"can not get imported groups");
|
NumGrps = (unsigned) DB_QuerySELECT (Query,&mysql_res_grp,"can not get imported groups");
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user