mirror of
https://github.com/acanas/swad-core.git
synced 2024-06-01 14:25:27 +02:00
Version 16.15
This commit is contained in:
parent
fc5338de66
commit
a175012444
|
@ -11637,5 +11637,9 @@ SELECT COUNT(*) FROM msg_content LEFT JOIN msg_snt ON (msg_content.MsgCod=msg_sn
|
||||||
SELECT SQL_NO_CACHE YEAR(CONVERT_TZ(ClickTime,@@session.time_zone,'Europe/Berlin')) AS Year,COUNT(*) FROM log_full WHERE ClickTime>=FROM_UNIXTIME('0') AND UsrCod='1' GROUP BY Year DESC;
|
SELECT SQL_NO_CACHE YEAR(CONVERT_TZ(ClickTime,@@session.time_zone,'Europe/Berlin')) AS Year,COUNT(*) FROM log_full WHERE ClickTime>=FROM_UNIXTIME('0') AND UsrCod='1' GROUP BY Year DESC;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
----- SWAD 16.15 (2016/10/06) -----
|
||||||
|
|
||||||
|
CREATE TABLE IF NOT EXISTS usr_report (RepCod INT NOT NULL AUTO_INCREMENT,UsrCod INT NOT NULL,ReportTime DATETIME NOT NULL,UniqueDirL CHAR(2) NOT NULL,UniqueDirR CHAR(41) NOT NULL,Filename VARCHAR(255) NOT NULL,Permalink VARCHAR(255) NOT NULL,UNIQUE INDEX(RepCod),INDEX(UsrCod));
|
||||||
|
|
||||||
|
|
||||||
|
|
13
sql/swad.sql
13
sql/swad.sql
|
@ -1321,6 +1321,19 @@ CREATE TABLE IF NOT EXISTS usr_nicknames (
|
||||||
UNIQUE INDEX(UsrCod,Nickname),
|
UNIQUE INDEX(UsrCod,Nickname),
|
||||||
UNIQUE INDEX(Nickname));
|
UNIQUE INDEX(Nickname));
|
||||||
--
|
--
|
||||||
|
-- Table usr_report: stores users' usage reports
|
||||||
|
--
|
||||||
|
CREATE TABLE IF NOT EXISTS usr_report (
|
||||||
|
RepCod INT NOT NULL AUTO_INCREMENT,
|
||||||
|
UsrCod INT NOT NULL,
|
||||||
|
ReportTime DATETIME NOT NULL,
|
||||||
|
UniqueDirL CHAR(2) NOT NULL,
|
||||||
|
UniqueDirR CHAR(41) NOT NULL,
|
||||||
|
Filename VARCHAR(255) NOT NULL,
|
||||||
|
Permalink VARCHAR(255) NOT NULL,
|
||||||
|
UNIQUE INDEX(RepCod),
|
||||||
|
INDEX(UsrCod));
|
||||||
|
--
|
||||||
-- Table usr_webs: stores users' web and social networks
|
-- Table usr_webs: stores users' web and social networks
|
||||||
--
|
--
|
||||||
CREATE TABLE IF NOT EXISTS usr_webs (
|
CREATE TABLE IF NOT EXISTS usr_webs (
|
||||||
|
|
|
@ -146,13 +146,14 @@
|
||||||
/****************************** Public constants *****************************/
|
/****************************** Public constants *****************************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
#define Log_PLATFORM_VERSION "SWAD 16.14 (2016-10-06)"
|
#define Log_PLATFORM_VERSION "SWAD 16.15 (2016-10-06)"
|
||||||
#define CSS_FILE "swad15.229.css"
|
#define CSS_FILE "swad15.229.css"
|
||||||
#define JS_FILE "swad15.238.1.js"
|
#define JS_FILE "swad15.238.1.js"
|
||||||
|
|
||||||
// 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 sql/swad*.sql | tail -1
|
// nl swad*.c swad*.h css/swad*.css py/swad*.py js/swad*.js soap/swad*.h sql/swad*.sql | tail -1
|
||||||
/*
|
/*
|
||||||
|
Version 16.15: Oct 06, 2016 New database table to store user's usage reports. (205896 lines)
|
||||||
Version 16.14: Oct 06, 2016 By default, teachers see (do not edit) documents. Now they must click on small edit icon to edit. (205875 lines)
|
Version 16.14: Oct 06, 2016 By default, teachers see (do not edit) documents. Now they must click on small edit icon to edit. (205875 lines)
|
||||||
Version 16.13.2: Oct 05, 2016 User's usage report is open to any logged user. (205907 lines)
|
Version 16.13.2: Oct 05, 2016 User's usage report is open to any logged user. (205907 lines)
|
||||||
Version 16.13.1: Oct 04, 2016 Changes in user's usage report. (205906 lines)
|
Version 16.13.1: Oct 04, 2016 Changes in user's usage report. (205906 lines)
|
||||||
|
|
|
@ -2782,6 +2782,33 @@ mysql> DESCRIBE usr_nicknames;
|
||||||
"UNIQUE INDEX(UsrCod,Nickname),"
|
"UNIQUE INDEX(UsrCod,Nickname),"
|
||||||
"UNIQUE INDEX(Nickname))");
|
"UNIQUE INDEX(Nickname))");
|
||||||
|
|
||||||
|
/***** Table usr_report *****/
|
||||||
|
/*
|
||||||
|
mysql> DESCRIBE usr_report;
|
||||||
|
+------------+--------------+------+-----+---------+----------------+
|
||||||
|
| Field | Type | Null | Key | Default | Extra |
|
||||||
|
+------------+--------------+------+-----+---------+----------------+
|
||||||
|
| RepCod | int(11) | NO | PRI | NULL | auto_increment |
|
||||||
|
| UsrCod | int(11) | NO | MUL | NULL | |
|
||||||
|
| ReportTime | datetime | NO | | NULL | |
|
||||||
|
| UniqueDirL | char(2) | NO | | NULL | |
|
||||||
|
| UniqueDirR | char(41) | NO | | NULL | |
|
||||||
|
| Filename | varchar(255) | NO | | NULL | |
|
||||||
|
| Permalink | varchar(255) | NO | | NULL | |
|
||||||
|
+------------+--------------+------+-----+---------+----------------+
|
||||||
|
7 rows in set (0,00 sec)
|
||||||
|
*/
|
||||||
|
DB_CreateTable ("CREATE TABLE IF NOT EXISTS usr_report ("
|
||||||
|
"RepCod INT NOT NULL AUTO_INCREMENT,"
|
||||||
|
"UsrCod INT NOT NULL,"
|
||||||
|
"ReportTime DATETIME NOT NULL,"
|
||||||
|
"UniqueDirL CHAR(2) NOT NULL," // 2 leftmost chars from a unique 43 chars base64url codified from a unique SHA-256 string
|
||||||
|
"UniqueDirR CHAR(41) NOT NULL," // 41 rightmost chars from a unique 43 chars base64url codified from a unique SHA-256 string
|
||||||
|
"Filename VARCHAR(255) NOT NULL," // Report filename
|
||||||
|
"Permalink VARCHAR(255) NOT NULL," // Full URL (permalink)
|
||||||
|
"UNIQUE INDEX(RepCod),"
|
||||||
|
"INDEX(UsrCod))");
|
||||||
|
|
||||||
/***** Table usr_webs *****/
|
/***** Table usr_webs *****/
|
||||||
/*
|
/*
|
||||||
mysql> DESCRIBE usr_webs;
|
mysql> DESCRIBE usr_webs;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user