mirror of
https://github.com/acanas/swad-core.git
synced 2024-06-10 10:45:23 +02:00
Version19.207
This commit is contained in:
parent
e4185feac6
commit
88285fb61b
|
@ -1049,7 +1049,10 @@ void Acc_CompletelyEliminateAccount (struct UsrData *UsrDat,
|
||||||
/***** Remove user from possible duplicate users *****/
|
/***** Remove user from possible duplicate users *****/
|
||||||
Dup_RemoveUsrFromDuplicated (UsrDat->UsrCod);
|
Dup_RemoveUsrFromDuplicated (UsrDat->UsrCod);
|
||||||
|
|
||||||
/***** Remove user from the table of courses and users *****/
|
/***** Remove user from the tables of courses and users *****/
|
||||||
|
DB_QueryDELETE ("can not remove a user from all courses",
|
||||||
|
"DELETE FROM crs_usr_last WHERE UsrCod=%ld",
|
||||||
|
UsrDat->UsrCod);
|
||||||
DB_QueryDELETE ("can not remove a user from all courses",
|
DB_QueryDELETE ("can not remove a user from all courses",
|
||||||
"DELETE FROM crs_usr WHERE UsrCod=%ld",
|
"DELETE FROM crs_usr WHERE UsrCod=%ld",
|
||||||
UsrDat->UsrCod);
|
UsrDat->UsrCod);
|
||||||
|
|
|
@ -544,10 +544,41 @@ enscript -2 --landscape --color --file-align=2 --highlight --line-numbers -o - *
|
||||||
En OpenSWAD:
|
En OpenSWAD:
|
||||||
ps2pdf source.ps destination.pdf
|
ps2pdf source.ps destination.pdf
|
||||||
*/
|
*/
|
||||||
#define Log_PLATFORM_VERSION "SWAD 19.206.2 (2020-04-29)"
|
#define Log_PLATFORM_VERSION "SWAD 19.207 (2020-04-29)"
|
||||||
#define CSS_FILE "swad19.193.1.css"
|
#define CSS_FILE "swad19.193.1.css"
|
||||||
#define JS_FILE "swad19.193.1.js"
|
#define JS_FILE "swad19.193.1.js"
|
||||||
/*
|
/*
|
||||||
|
Version 19.207: Apr 30, 2020 Table with inscriptions of users in courses is splitted into two tables for speed. (300323 lines)
|
||||||
|
8 changes necessary in database:
|
||||||
|
RENAME TABLE crs_usr_old TO crs_usr_old_backup_delete_me;
|
||||||
|
CREATE TABLE crs_usr_backup_delete_me AS SELECT * FROM crs_usr;
|
||||||
|
CREATE TABLE crs_usr_last AS SELECT * FROM crs_usr;
|
||||||
|
ALTER TABLE crs_usr_last DROP COLUMN Role;
|
||||||
|
ALTER TABLE crs_usr_last DROP COLUMN Accepted;
|
||||||
|
ALTER TABLE crs_usr_last ADD UNIQUE INDEX(CrsCod,UsrCod);
|
||||||
|
ALTER TABLE crs_usr_last ADD UNIQUE INDEX(UsrCod,CrsCod);
|
||||||
|
ALTER TABLE crs_usr DROP COLUMN LastDowGrpCod, DROP COLUMN LastComGrpCod, DROP COLUMN LastAssGrpCod, DROP COLUMN NumAccTst, DROP COLUMN LastAccTst, DROP COLUMN NumQstsLastTst, DROP COLUMN UsrListType, DROP COLUMN ColsClassPhoto, DROP COLUMN ListWithPhotos;
|
||||||
|
If you want to use MyISAM:
|
||||||
|
ALTER TABLE crs_usr_last ENGINE=MyISAM;
|
||||||
|
OPTIMIZE TABLE crs_usr_last;
|
||||||
|
OPTIMIZE TABLE crs_usr;
|
||||||
|
|
||||||
|
Version 19.206.3: Apr 30, 2020 Added indexes on database table. (300244 lines)
|
||||||
|
10 changes necessary in database:
|
||||||
|
RENAME TABLE crs_usr TO crs_usr_old;
|
||||||
|
CREATE TABLE crs_usr AS SELECT * FROM crs_usr_old;
|
||||||
|
ALTER TABLE crs_usr ADD UNIQUE INDEX(CrsCod,UsrCod);
|
||||||
|
ALTER TABLE crs_usr ADD UNIQUE INDEX(CrsCod,UsrCod,Role);
|
||||||
|
ALTER TABLE crs_usr ADD UNIQUE INDEX(UsrCod,CrsCod);
|
||||||
|
ALTER TABLE crs_usr ADD UNIQUE INDEX(UsrCod,CrsCod,Role);
|
||||||
|
ALTER TABLE crs_usr ADD UNIQUE INDEX(Role,CrsCod,UsrCod);
|
||||||
|
ALTER TABLE crs_usr ADD UNIQUE INDEX(Role,UsrCod,CrsCod);
|
||||||
|
ALTER TABLE crs_usr ADD INDEX(CrsCod,Role);
|
||||||
|
ALTER TABLE crs_usr ADD INDEX(UsrCod,Role);
|
||||||
|
If you want to use MyISAM:
|
||||||
|
ALTER TABLE crs_usr ENGINE=MyISAM;
|
||||||
|
OPTIMIZE TABLE crs_usr;
|
||||||
|
|
||||||
Version 19.206.2: Apr 29, 2020 Teachers and administrators can not be seen by non logged users. (300244 lines)
|
Version 19.206.2: Apr 29, 2020 Teachers and administrators can not be seen by non logged users. (300244 lines)
|
||||||
Version 19.206.1: Apr 29, 2020 Changes in phones. (300243 lines)
|
Version 19.206.1: Apr 29, 2020 Changes in phones. (300243 lines)
|
||||||
Version 19.206: Apr 29, 2020 Removed addresses in user's data. (300259 lines)
|
Version 19.206: Apr 29, 2020 Removed addresses in user's data. (300259 lines)
|
||||||
|
@ -613,6 +644,7 @@ ALTER TABLE exa_sets ADD COLUMN Title VARCHAR(2047) NOT NULL AFTER NumQstsToExam
|
||||||
1 change necessary in database:
|
1 change necessary in database:
|
||||||
CREATE TABLE IF NOT EXISTS exa_sets (SetCod INT NOT NULL AUTO_INCREMENT,ExaCod INT NOT NULL,SetInd INT NOT NULL DEFAULT 0,UNIQUE INDEX(SetCod),INDEX(ExaCod,SetInd));
|
CREATE TABLE IF NOT EXISTS exa_sets (SetCod INT NOT NULL AUTO_INCREMENT,ExaCod INT NOT NULL,SetInd INT NOT NULL DEFAULT 0,UNIQUE INDEX(SetCod),INDEX(ExaCod,SetInd));
|
||||||
|
|
||||||
|
---------------------------------------
|
||||||
Version 19.193.5: Apr 23, 2020 Fixed bug in exam events. (297871 lines)
|
Version 19.193.5: Apr 23, 2020 Fixed bug in exam events. (297871 lines)
|
||||||
Version 19.193.4: Apr 23, 2020 Fixed bugs in exams, exam events, games and matches. (297860 lines)
|
Version 19.193.4: Apr 23, 2020 Fixed bugs in exams, exam events, games and matches. (297860 lines)
|
||||||
Version 19.193.3: Apr 23, 2020 Added new MIME type, reported by Jesús Garrido Manrique.
|
Version 19.193.3: Apr 23, 2020 Added new MIME type, reported by Jesús Garrido Manrique.
|
||||||
|
|
|
@ -1930,6 +1930,9 @@ static void Crs_EmptyCourseCompletely (long CrsCod)
|
||||||
CrsCod);
|
CrsCod);
|
||||||
|
|
||||||
/***** Remove possible users remaining in the course (teachers) *****/
|
/***** Remove possible users remaining in the course (teachers) *****/
|
||||||
|
DB_QueryDELETE ("can not remove users from a course",
|
||||||
|
"DELETE FROM crs_usr_last WHERE CrsCod=%ld",
|
||||||
|
CrsCod);
|
||||||
DB_QueryDELETE ("can not remove users from a course",
|
DB_QueryDELETE ("can not remove users from a course",
|
||||||
"DELETE FROM crs_usr WHERE CrsCod=%ld",
|
"DELETE FROM crs_usr WHERE CrsCod=%ld",
|
||||||
CrsCod);
|
CrsCod);
|
||||||
|
|
|
@ -871,6 +871,40 @@ mysql> DESCRIBE crs_usr;
|
||||||
"UsrCod INT NOT NULL,"
|
"UsrCod INT NOT NULL,"
|
||||||
"Role TINYINT NOT NULL DEFAULT 0,"
|
"Role TINYINT NOT NULL DEFAULT 0,"
|
||||||
"Accepted ENUM('N','Y') NOT NULL DEFAULT 'N',"
|
"Accepted ENUM('N','Y') NOT NULL DEFAULT 'N',"
|
||||||
|
"UNIQUE INDEX(CrsCod,UsrCod),"
|
||||||
|
"UNIQUE INDEX(CrsCod,UsrCod,Role),"
|
||||||
|
"UNIQUE INDEX(UsrCod,CrsCod),"
|
||||||
|
"UNIQUE INDEX(UsrCod,CrsCod,Role),"
|
||||||
|
"UNIQUE INDEX(Role,CrsCod,UsrCod),"
|
||||||
|
"UNIQUE INDEX(Role,UsrCod,CrsCod),"
|
||||||
|
"INDEX(CrsCod,Role),"
|
||||||
|
"INDEX(UsrCod,Role))");
|
||||||
|
|
||||||
|
/***** Table crs_usr_last *****/
|
||||||
|
/*
|
||||||
|
mysql> DESCRIBE crs_usr_last;
|
||||||
|
+----------------+---------------------------+------+-----+------------+-------+
|
||||||
|
| Field | Type | Null | Key | Default | Extra |
|
||||||
|
+----------------+---------------------------+------+-----+------------+-------+
|
||||||
|
| CrsCod | int(11) | NO | PRI | -1 | |
|
||||||
|
| UsrCod | int(11) | NO | PRI | NULL | |
|
||||||
|
| Role | tinyint(4) | NO | PRI | 0 | |
|
||||||
|
| Accepted | enum('N','Y') | NO | | N | |
|
||||||
|
| LastDowGrpCod | int(11) | NO | | -1 | |
|
||||||
|
| LastComGrpCod | int(11) | NO | | -1 | |
|
||||||
|
| LastAssGrpCod | int(11) | NO | | -1 | |
|
||||||
|
| NumAccTst | int(11) | NO | | 0 | |
|
||||||
|
| LastAccTst | datetime | NO | | NULL | |
|
||||||
|
| NumQstsLastTst | int(11) | NO | | 0 | |
|
||||||
|
| UsrListType | enum('classphoto','list') | NO | | classphoto | |
|
||||||
|
| ColsClassPhoto | tinyint(4) | NO | | NULL | |
|
||||||
|
| ListWithPhotos | enum('N','Y') | NO | | Y | |
|
||||||
|
+----------------+---------------------------+------+-----+------------+-------+
|
||||||
|
13 rows in set (0.00 sec)
|
||||||
|
*/
|
||||||
|
DB_CreateTable ("CREATE TABLE IF NOT EXISTS crs_usr_last ("
|
||||||
|
"CrsCod INT NOT NULL DEFAULT -1,"
|
||||||
|
"UsrCod INT NOT NULL,"
|
||||||
"LastDowGrpCod INT NOT NULL DEFAULT -1,"
|
"LastDowGrpCod INT NOT NULL DEFAULT -1,"
|
||||||
"LastComGrpCod INT NOT NULL DEFAULT -1,"
|
"LastComGrpCod INT NOT NULL DEFAULT -1,"
|
||||||
"LastAssGrpCod INT NOT NULL DEFAULT -1,"
|
"LastAssGrpCod INT NOT NULL DEFAULT -1,"
|
||||||
|
@ -880,10 +914,8 @@ mysql> DESCRIBE crs_usr;
|
||||||
"UsrListType ENUM('classphoto','list') NOT NULL DEFAULT 'classphoto',"
|
"UsrListType ENUM('classphoto','list') NOT NULL DEFAULT 'classphoto',"
|
||||||
"ColsClassPhoto TINYINT NOT NULL,"
|
"ColsClassPhoto TINYINT NOT NULL,"
|
||||||
"ListWithPhotos ENUM('N','Y') NOT NULL DEFAULT 'Y',"
|
"ListWithPhotos ENUM('N','Y') NOT NULL DEFAULT 'Y',"
|
||||||
"UNIQUE INDEX(CrsCod,UsrCod,Role),"
|
"UNIQUE INDEX(CrsCod,UsrCod),"
|
||||||
"UNIQUE INDEX(UsrCod,CrsCod,Role),"
|
"UNIQUE INDEX(UsrCod,CrsCod))");
|
||||||
"INDEX(CrsCod,Role),"
|
|
||||||
"INDEX(UsrCod,Role))");
|
|
||||||
|
|
||||||
/***** Table crs_usr_requests *****/
|
/***** Table crs_usr_requests *****/
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -290,18 +290,26 @@ void Enr_RegisterUsrInCurrentCrs (struct UsrData *UsrDat,Rol_Role_t NewRole,
|
||||||
/***** Register user in current course in database *****/
|
/***** Register user in current course in database *****/
|
||||||
DB_QueryINSERT ("can not register user in course",
|
DB_QueryINSERT ("can not register user in course",
|
||||||
"INSERT INTO crs_usr"
|
"INSERT INTO crs_usr"
|
||||||
" (CrsCod,UsrCod,Role,Accepted,"
|
" (CrsCod,UsrCod,Role,Accepted)"
|
||||||
|
" VALUES"
|
||||||
|
" (%ld,%ld,%u,'%c')",
|
||||||
|
Gbl.Hierarchy.Crs.CrsCod,UsrDat->UsrCod,(unsigned) NewRole,
|
||||||
|
KeepOrSetAccepted == Enr_SET_ACCEPTED_TO_TRUE ? 'Y' :
|
||||||
|
'N');
|
||||||
|
|
||||||
|
/***** Register last prefs in current course in database *****/
|
||||||
|
DB_QueryINSERT ("can not register user in course",
|
||||||
|
"INSERT INTO crs_usr_last"
|
||||||
|
" (CrsCod,UsrCod,"
|
||||||
"LastDowGrpCod,LastComGrpCod,LastAssGrpCod,"
|
"LastDowGrpCod,LastComGrpCod,LastAssGrpCod,"
|
||||||
"NumAccTst,LastAccTst,NumQstsLastTst,"
|
"NumAccTst,LastAccTst,NumQstsLastTst,"
|
||||||
"UsrListType,ColsClassPhoto,ListWithPhotos)"
|
"UsrListType,ColsClassPhoto,ListWithPhotos)"
|
||||||
" VALUES"
|
" VALUES"
|
||||||
" (%ld,%ld,%u,'%c',"
|
" (%ld,%ld,"
|
||||||
"-1,-1,-1,"
|
"-1,-1,-1,"
|
||||||
"0,FROM_UNIXTIME(%ld),0,"
|
"0,FROM_UNIXTIME(%ld),0,"
|
||||||
"'%s',%u,'%c')",
|
"'%s',%u,'%c')",
|
||||||
Gbl.Hierarchy.Crs.CrsCod,UsrDat->UsrCod,(unsigned) NewRole,
|
Gbl.Hierarchy.Crs.CrsCod,UsrDat->UsrCod,
|
||||||
KeepOrSetAccepted == Enr_SET_ACCEPTED_TO_TRUE ? 'Y' :
|
|
||||||
'N',
|
|
||||||
(long) (time_t) 0, // The user never accessed to tests in this course
|
(long) (time_t) 0, // The user never accessed to tests in this course
|
||||||
Usr_StringsUsrListTypeInDB[Usr_SHOW_USRS_TYPE_DEFAULT],
|
Usr_StringsUsrListTypeInDB[Usr_SHOW_USRS_TYPE_DEFAULT],
|
||||||
Usr_CLASS_PHOTO_COLS_DEF,
|
Usr_CLASS_PHOTO_COLS_DEF,
|
||||||
|
@ -4126,7 +4134,11 @@ static void Enr_EffectivelyRemUsrFromCrs (struct UsrData *UsrDat,
|
||||||
except notifications about new messages *****/
|
except notifications about new messages *****/
|
||||||
Ntf_MarkNotifInCrsAsRemoved (UsrDat->UsrCod,Crs->CrsCod);
|
Ntf_MarkNotifInCrsAsRemoved (UsrDat->UsrCod,Crs->CrsCod);
|
||||||
|
|
||||||
/***** Remove user from the table of courses-users *****/
|
/***** Remove user from the tables of courses-users *****/
|
||||||
|
DB_QueryDELETE ("can not remove a user from a course",
|
||||||
|
"DELETE FROM crs_usr_last"
|
||||||
|
" WHERE CrsCod=%ld AND UsrCod=%ld",
|
||||||
|
Crs->CrsCod,UsrDat->UsrCod);
|
||||||
DB_QueryDELETE ("can not remove a user from a course",
|
DB_QueryDELETE ("can not remove a user from a course",
|
||||||
"DELETE FROM crs_usr"
|
"DELETE FROM crs_usr"
|
||||||
" WHERE CrsCod=%ld AND UsrCod=%ld",
|
" WHERE CrsCod=%ld AND UsrCod=%ld",
|
||||||
|
|
|
@ -3921,7 +3921,7 @@ static void Brw_UpdateGrpLastAccZone (const char *FieldNameDB,long GrpCod)
|
||||||
{
|
{
|
||||||
/***** Update the group of my last access to a common zone *****/
|
/***** Update the group of my last access to a common zone *****/
|
||||||
DB_QueryUPDATE ("can not update the group of the last access to a file browser",
|
DB_QueryUPDATE ("can not update the group of the last access to a file browser",
|
||||||
"UPDATE crs_usr SET %s=%ld"
|
"UPDATE crs_usr_last SET %s=%ld"
|
||||||
" WHERE CrsCod=%ld AND UsrCod=%ld",
|
" WHERE CrsCod=%ld AND UsrCod=%ld",
|
||||||
FieldNameDB,GrpCod,
|
FieldNameDB,GrpCod,
|
||||||
Gbl.Hierarchy.Crs.CrsCod,Gbl.Usrs.Me.UsrDat.UsrCod);
|
Gbl.Hierarchy.Crs.CrsCod,Gbl.Usrs.Me.UsrDat.UsrCod);
|
||||||
|
@ -5249,7 +5249,7 @@ static long Brw_GetGrpLastAccZone (const char *FieldNameDB)
|
||||||
NumRows = DB_QuerySELECT (&mysql_res,"can not get the group"
|
NumRows = DB_QuerySELECT (&mysql_res,"can not get the group"
|
||||||
" of your last access"
|
" of your last access"
|
||||||
" to a file browser",
|
" to a file browser",
|
||||||
"SELECT %s FROM crs_usr"
|
"SELECT %s FROM crs_usr_last"
|
||||||
" WHERE CrsCod=%ld AND UsrCod=%ld",
|
" WHERE CrsCod=%ld AND UsrCod=%ld",
|
||||||
FieldNameDB,
|
FieldNameDB,
|
||||||
Gbl.Hierarchy.Crs.CrsCod,
|
Gbl.Hierarchy.Crs.CrsCod,
|
||||||
|
|
|
@ -979,6 +979,7 @@ static void Grp_LockTables (void)
|
||||||
"crs_grp WRITE,"
|
"crs_grp WRITE,"
|
||||||
"crs_grp_usr WRITE,"
|
"crs_grp_usr WRITE,"
|
||||||
"crs_usr READ,"
|
"crs_usr READ,"
|
||||||
|
"crs_usr_last READ,"
|
||||||
"rooms READ");
|
"rooms READ");
|
||||||
Gbl.DB.LockedTables = true;
|
Gbl.DB.LockedTables = true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -87,10 +87,10 @@ int main (void)
|
||||||
"<head><title>%s</title></head>"
|
"<head><title>%s</title></head>"
|
||||||
"<body><br /><br /><br /><br />"
|
"<body><br /><br /><br /><br />"
|
||||||
"<h1 class=\"CM\">"
|
"<h1 class=\"CM\">"
|
||||||
"%s está parado por mantenimiento durante unos minutos."
|
"%s está parado un momento por mantenimiento."
|
||||||
"</h1>"
|
"</h1>"
|
||||||
"<h2 class=\"CM\">"
|
"<h2 class=\"CM\">"
|
||||||
"Intente acceder más tarde, por favor."
|
"Intente acceder pasados unos minutos, por favor."
|
||||||
"</h2>"
|
"</h2>"
|
||||||
"</body>"
|
"</body>"
|
||||||
"</html>",
|
"</html>",
|
||||||
|
|
|
@ -704,7 +704,7 @@ static bool Tst_CheckIfNextTstAllowed (void)
|
||||||
"SELECT UNIX_TIMESTAMP(LastAccTst+INTERVAL (NumQstsLastTst*%lu) SECOND)-"
|
"SELECT UNIX_TIMESTAMP(LastAccTst+INTERVAL (NumQstsLastTst*%lu) SECOND)-"
|
||||||
"UNIX_TIMESTAMP()," // row[0]
|
"UNIX_TIMESTAMP()," // row[0]
|
||||||
"UNIX_TIMESTAMP(LastAccTst+INTERVAL (NumQstsLastTst*%lu) SECOND)" // row[1]
|
"UNIX_TIMESTAMP(LastAccTst+INTERVAL (NumQstsLastTst*%lu) SECOND)" // row[1]
|
||||||
" FROM crs_usr"
|
" FROM crs_usr_last"
|
||||||
" WHERE CrsCod=%ld AND UsrCod=%ld",
|
" WHERE CrsCod=%ld AND UsrCod=%ld",
|
||||||
TstCfg_GetConfigMinTimeNxtTstPerQst (),
|
TstCfg_GetConfigMinTimeNxtTstPerQst (),
|
||||||
TstCfg_GetConfigMinTimeNxtTstPerQst (),
|
TstCfg_GetConfigMinTimeNxtTstPerQst (),
|
||||||
|
@ -757,7 +757,7 @@ static unsigned Tst_GetNumExamsGeneratedByMe (void)
|
||||||
/***** Get number of test exams generated by me from database *****/
|
/***** Get number of test exams generated by me from database *****/
|
||||||
NumRows = DB_QuerySELECT (&mysql_res,"can not get number of test exams generated",
|
NumRows = DB_QuerySELECT (&mysql_res,"can not get number of test exams generated",
|
||||||
"SELECT NumAccTst" // row[0]
|
"SELECT NumAccTst" // row[0]
|
||||||
" FROM crs_usr"
|
" FROM crs_usr_last"
|
||||||
" WHERE CrsCod=%ld AND UsrCod=%ld",
|
" WHERE CrsCod=%ld AND UsrCod=%ld",
|
||||||
Gbl.Hierarchy.Crs.CrsCod,
|
Gbl.Hierarchy.Crs.CrsCod,
|
||||||
Gbl.Usrs.Me.UsrDat.UsrCod);
|
Gbl.Usrs.Me.UsrDat.UsrCod);
|
||||||
|
@ -1169,7 +1169,7 @@ static void Tst_IncreaseMyNumAccessTst (void)
|
||||||
|
|
||||||
/***** Update my number of accesses to test in this course *****/
|
/***** Update my number of accesses to test in this course *****/
|
||||||
DB_QueryUPDATE ("can not update the number of accesses to test",
|
DB_QueryUPDATE ("can not update the number of accesses to test",
|
||||||
"UPDATE crs_usr SET NumAccTst=NumAccTst+1"
|
"UPDATE crs_usr_last SET NumAccTst=NumAccTst+1"
|
||||||
" WHERE CrsCod=%ld AND UsrCod=%ld",
|
" WHERE CrsCod=%ld AND UsrCod=%ld",
|
||||||
Gbl.Hierarchy.Crs.CrsCod,Gbl.Usrs.Me.UsrDat.UsrCod);
|
Gbl.Hierarchy.Crs.CrsCod,Gbl.Usrs.Me.UsrDat.UsrCod);
|
||||||
}
|
}
|
||||||
|
@ -1182,7 +1182,7 @@ static void Tst_UpdateLastAccTst (unsigned NumQsts)
|
||||||
{
|
{
|
||||||
/***** Update date-time and number of questions of this test *****/
|
/***** Update date-time and number of questions of this test *****/
|
||||||
DB_QueryUPDATE ("can not update time and number of questions of this test",
|
DB_QueryUPDATE ("can not update time and number of questions of this test",
|
||||||
"UPDATE crs_usr SET LastAccTst=NOW(),NumQstsLastTst=%u"
|
"UPDATE crs_usr_last SET LastAccTst=NOW(),NumQstsLastTst=%u"
|
||||||
" WHERE CrsCod=%ld AND UsrCod=%ld",
|
" WHERE CrsCod=%ld AND UsrCod=%ld",
|
||||||
NumQsts,
|
NumQsts,
|
||||||
Gbl.Hierarchy.Crs.CrsCod,
|
Gbl.Hierarchy.Crs.CrsCod,
|
||||||
|
|
12
swad_user.c
12
swad_user.c
|
@ -7598,7 +7598,7 @@ static void Usr_GetMyUsrListTypeFromDB (void)
|
||||||
|
|
||||||
/***** Get type of listing of users from database *****/
|
/***** Get type of listing of users from database *****/
|
||||||
NumRows = DB_QuerySELECT (&mysql_res,"can not get type of listing of users",
|
NumRows = DB_QuerySELECT (&mysql_res,"can not get type of listing of users",
|
||||||
"SELECT UsrListType FROM crs_usr"
|
"SELECT UsrListType FROM crs_usr_last"
|
||||||
" WHERE CrsCod=%ld AND UsrCod=%ld",
|
" WHERE CrsCod=%ld AND UsrCod=%ld",
|
||||||
Gbl.Hierarchy.Crs.CrsCod,
|
Gbl.Hierarchy.Crs.CrsCod,
|
||||||
Gbl.Usrs.Me.UsrDat.UsrCod);
|
Gbl.Usrs.Me.UsrDat.UsrCod);
|
||||||
|
@ -7637,7 +7637,7 @@ static void Usr_UpdateMyUsrListTypeInDB (void)
|
||||||
{
|
{
|
||||||
/***** Update type of users listing *****/
|
/***** Update type of users listing *****/
|
||||||
DB_QueryUPDATE ("can not update type of listing",
|
DB_QueryUPDATE ("can not update type of listing",
|
||||||
"UPDATE crs_usr SET UsrListType='%s'"
|
"UPDATE crs_usr_last SET UsrListType='%s'"
|
||||||
" WHERE CrsCod=%ld AND UsrCod=%ld",
|
" WHERE CrsCod=%ld AND UsrCod=%ld",
|
||||||
Usr_StringsUsrListTypeInDB[Gbl.Usrs.Me.ListType],
|
Usr_StringsUsrListTypeInDB[Gbl.Usrs.Me.ListType],
|
||||||
Gbl.Hierarchy.Crs.CrsCod,Gbl.Usrs.Me.UsrDat.UsrCod);
|
Gbl.Hierarchy.Crs.CrsCod,Gbl.Usrs.Me.UsrDat.UsrCod);
|
||||||
|
@ -7702,7 +7702,7 @@ static void Usr_GetMyColsClassPhotoFromDB (void)
|
||||||
/***** Get number of columns in class photo from database *****/
|
/***** Get number of columns in class photo from database *****/
|
||||||
NumRows = DB_QuerySELECT (&mysql_res,"can not get number of columns"
|
NumRows = DB_QuerySELECT (&mysql_res,"can not get number of columns"
|
||||||
" in class photo",
|
" in class photo",
|
||||||
"SELECT ColsClassPhoto FROM crs_usr"
|
"SELECT ColsClassPhoto FROM crs_usr_last"
|
||||||
" WHERE CrsCod=%ld AND UsrCod=%ld",
|
" WHERE CrsCod=%ld AND UsrCod=%ld",
|
||||||
Gbl.Hierarchy.Crs.CrsCod,
|
Gbl.Hierarchy.Crs.CrsCod,
|
||||||
Gbl.Usrs.Me.UsrDat.UsrCod);
|
Gbl.Usrs.Me.UsrDat.UsrCod);
|
||||||
|
@ -7736,7 +7736,7 @@ static void Usr_UpdateMyColsClassPhotoInDB (void)
|
||||||
Gbl.Hierarchy.Level == Hie_CRS) // Course selected
|
Gbl.Hierarchy.Level == Hie_CRS) // Course selected
|
||||||
/***** Update number of colums in class photo for current course *****/
|
/***** Update number of colums in class photo for current course *****/
|
||||||
DB_QueryUPDATE ("can not update number of columns in class photo",
|
DB_QueryUPDATE ("can not update number of columns in class photo",
|
||||||
"UPDATE crs_usr SET ColsClassPhoto=%u"
|
"UPDATE crs_usr_last SET ColsClassPhoto=%u"
|
||||||
" WHERE CrsCod=%ld AND UsrCod=%ld",
|
" WHERE CrsCod=%ld AND UsrCod=%ld",
|
||||||
Gbl.Usrs.ClassPhoto.Cols,
|
Gbl.Usrs.ClassPhoto.Cols,
|
||||||
Gbl.Hierarchy.Crs.CrsCod,Gbl.Usrs.Me.UsrDat.UsrCod);
|
Gbl.Hierarchy.Crs.CrsCod,Gbl.Usrs.Me.UsrDat.UsrCod);
|
||||||
|
@ -7806,7 +7806,7 @@ void Usr_GetMyPrefAboutListWithPhotosFromDB (void)
|
||||||
/***** Get if listing of users must show photos from database *****/
|
/***** Get if listing of users must show photos from database *****/
|
||||||
NumRows = DB_QuerySELECT (&mysql_res,"can not check if listing of users"
|
NumRows = DB_QuerySELECT (&mysql_res,"can not check if listing of users"
|
||||||
" must show photos",
|
" must show photos",
|
||||||
"SELECT ListWithPhotos FROM crs_usr"
|
"SELECT ListWithPhotos FROM crs_usr_last"
|
||||||
" WHERE CrsCod=%ld AND UsrCod=%ld",
|
" WHERE CrsCod=%ld AND UsrCod=%ld",
|
||||||
Gbl.Hierarchy.Crs.CrsCod,
|
Gbl.Hierarchy.Crs.CrsCod,
|
||||||
Gbl.Usrs.Me.UsrDat.UsrCod);
|
Gbl.Usrs.Me.UsrDat.UsrCod);
|
||||||
|
@ -7837,7 +7837,7 @@ static void Usr_UpdateMyPrefAboutListWithPhotosPhotoInDB (void)
|
||||||
Gbl.Hierarchy.Level == Hie_CRS) // Course selected
|
Gbl.Hierarchy.Level == Hie_CRS) // Course selected
|
||||||
/***** Update number of colums in class photo for current course *****/
|
/***** Update number of colums in class photo for current course *****/
|
||||||
DB_QueryUPDATE ("can not update your preference about photos in listing",
|
DB_QueryUPDATE ("can not update your preference about photos in listing",
|
||||||
"UPDATE crs_usr SET ListWithPhotos='%c'"
|
"UPDATE crs_usr_last SET ListWithPhotos='%c'"
|
||||||
" WHERE CrsCod=%ld AND UsrCod=%ld",
|
" WHERE CrsCod=%ld AND UsrCod=%ld",
|
||||||
Gbl.Usrs.Listing.WithPhotos ? 'Y' :
|
Gbl.Usrs.Listing.WithPhotos ? 'Y' :
|
||||||
'N',
|
'N',
|
||||||
|
|
Loading…
Reference in New Issue
Block a user