From 855e07ea6e19572be6a98013bbb72a0e637e5979 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonio=20Ca=C3=B1as=20Vargas?= Date: Mon, 18 Sep 2017 01:06:51 +0200 Subject: [PATCH] Version 17.2.4 --- sql/swad.sql | 1 + swad_changelog.h | 7 ++++++- swad_database.c | 4 +++- swad_project.c | 16 ++++++++++++++++ swad_project.h | 1 + 5 files changed, 27 insertions(+), 2 deletions(-) diff --git a/sql/swad.sql b/sql/swad.sql index c98b1ddeb..7fa58e357 100644 --- a/sql/swad.sql +++ b/sql/swad.sql @@ -949,6 +949,7 @@ CREATE TABLE IF NOT EXISTS projects ( Title VARCHAR(2047) NOT NULL, Preassigned ENUM('N','Y') NOT NULL DEFAULT 'N', Txt TEXT NOT NULL, + URL VARCHAR(255) NOT NULL, UNIQUE INDEX(PrjCod), INDEX(CrsCod,Hidden)); -- diff --git a/swad_changelog.h b/swad_changelog.h index e454f7241..4cb3bfb34 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -252,13 +252,17 @@ /****************************** Public constants *****************************/ /*****************************************************************************/ -#define Log_PLATFORM_VERSION "SWAD 17.2.3 (2017-09-17)" +#define Log_PLATFORM_VERSION "SWAD 17.2.4 (2017-09-18)" #define CSS_FILE "swad17.0.css" #define JS_FILE "swad16.206.3.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 17.2.4: Sep 18, 2017 New field URL in projects. (229929 lines) + 1 change necessary in database: +ALTER TABLE projects ADD COLUMN URL VARCHAR(255) NOT NULL AFTER Txt; + Version 17.2.3: Sep 17, 2017 New option for projects. Not finished. (229906 lines) 3 changes necessary in database: ALTER TABLE projects DROP COLUMN NumNotif; @@ -266,6 +270,7 @@ ALTER TABLE projects DROP COLUMN Folder; ALTER TABLE projects ADD COLUMN Preassigned ENUM('N','Y') NOT NULL DEFAULT 'N' AFTER Title; Copy the following icons to icon public directory: sudo cp icon/usr64x64.png /var/www/html/swad/icon/ +sudo cp icon/usr_off64x64.png /var/www/html/swad/icon/ Version 17.2.2: Sep 17, 2017 New option for projects. Not finished. (229964 lines) Version 17.2.1: Sep 17, 2017 New option for projects. Not finished. (229884 lines) diff --git a/swad_database.c b/swad_database.c index 1ad8030d8..c4ce1fe28 100644 --- a/swad_database.c +++ b/swad_database.c @@ -2016,8 +2016,9 @@ mysql> DESCRIBE projects; | Title | varchar(2047) | NO | | NULL | | | Preassigned | enum('N','Y') | NO | | N | | | Txt | text | NO | | NULL | | +| URL | varchar(255) | NO | | NULL | | +-------------+---------------+------+-----+---------+----------------+ -9 rows in set (0,00 sec) +10 rows in set (0,00 sec) */ DB_CreateTable ("CREATE TABLE IF NOT EXISTS projects (" "PrjCod INT NOT NULL AUTO_INCREMENT," @@ -2029,6 +2030,7 @@ mysql> DESCRIBE projects; "Title VARCHAR(2047) NOT NULL," // Prj_MAX_CHARS_PROJECT_TITLE "Preassigned ENUM('N','Y') NOT NULL DEFAULT 'N'," "Txt TEXT NOT NULL," // Cns_MAX_BYTES_TEXT + "URL VARCHAR(255) NOT NULL," // Cns_MAX_BYTES_WWW "UNIQUE INDEX(PrjCod)," "INDEX(CrsCod,Hidden))"); diff --git a/swad_project.c b/swad_project.c index bd5324235..a36b2ed90 100644 --- a/swad_project.c +++ b/swad_project.c @@ -971,6 +971,7 @@ void Prj_RequestCreatOrEditPrj (void) extern const char *Txt_No; extern const char *Txt_Yes; extern const char *Txt_Description; + extern const char *Txt_URL; extern const char *Txt_Create_project; extern const char *Txt_Save; struct Project Prj; @@ -995,6 +996,7 @@ void Prj_RequestCreatOrEditPrj (void) Prj.Open = true; Prj.Title[0] = '\0'; Prj.Preassigned = Prj_NOT_PREASSIGNED; + Prj.URL[0] = '\0'; Prj.IBelongToCrsOrGrps = false; } else @@ -1083,6 +1085,20 @@ void Prj_RequestCreatOrEditPrj (void) "" ""); + /***** URL for additional info *****/ + fprintf (Gbl.F.Out,"" + "" + "" + "" + "" + "" + "" + "", + The_ClassForm[Gbl.Prefs.Theme], + Txt_URL, + Cns_MAX_CHARS_WWW,Prj.URL); + /***** Groups *****/ Prj_ShowLstGrpsToEditProject (Prj.PrjCod); diff --git a/swad_project.h b/swad_project.h index 0ff8662cc..2334ea0be 100644 --- a/swad_project.h +++ b/swad_project.h @@ -55,6 +55,7 @@ struct Project bool Open; char Title[Prj_MAX_BYTES_PROJECT_TITLE + 1]; Prj_Preassigned_t Preassigned; + char URL[Cns_MAX_BYTES_WWW + 1]; bool IBelongToCrsOrGrps; // I can do this assignment // (it is associated to no groups // or, if associated to groups,