diff --git a/sql/swad.sql b/sql/swad.sql index 545f524a0..624f0584c 100644 --- a/sql/swad.sql +++ b/sql/swad.sql @@ -943,6 +943,7 @@ CREATE TABLE IF NOT EXISTS prj_usr ( CREATE TABLE IF NOT EXISTS projects ( PrjCod INT NOT NULL AUTO_INCREMENT, CrsCod INT NOT NULL DEFAULT -1, + DptCod INT NOT NULL DEFAULT -1, Hidden ENUM('N','Y') NOT NULL DEFAULT 'N', Preassigned ENUM('N','Y') NOT NULL DEFAULT 'N', StartTime DATETIME NOT NULL, @@ -953,7 +954,8 @@ CREATE TABLE IF NOT EXISTS projects ( Materials TEXT NOT NULL, URL VARCHAR(255) NOT NULL, UNIQUE INDEX(PrjCod), - INDEX(CrsCod,Hidden)); + INDEX(CrsCod,Hidden), + INDEX(CrsCod,DptCod)); -- -- Table sessions: stores the information of open sessions -- diff --git a/swad_changelog.h b/swad_changelog.h index e4612b2ff..47a3af5cc 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -252,13 +252,19 @@ /****************************** Public constants *****************************/ /*****************************************************************************/ -#define Log_PLATFORM_VERSION "SWAD 17.5.3 (2017-09-21)" +#define Log_PLATFORM_VERSION "SWAD 17.5.5 (2017-09-21)" #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.5.5: Sep 21, 2017 Changes in listing and edition of projects. (230318 lines) + Version 17.5.4: Sep 21, 2017 Added field in projects for department. (230304 lines) + 2 changes necessary in database: +ALTER TABLE projects ADD COLUMN DptCod INT NOT NULL DEFAULT -1 NOT NULL AFTER CrsCod; +ALTER TABLE projects ADD INDEX(CrsCod,DptCod); + Version 17.5.3: Sep 21, 2017 Changes in listing of projects. (230301 lines) Version 17.5.2: Sep 21, 2017 Do not display users when creating a new project. (230270 lines) Version 17.5.1: Sep 21, 2017 Fixed bug when removing a project. (230267 lines) @@ -275,13 +281,6 @@ INSERT INTO actions (ActCod,Language,Obsolete,Txt) VALUES ('1687','es','N','A&nt INSERT INTO actions (ActCod,Language,Obsolete,Txt) VALUES ('1688','es','N','Añadir tutor a proyecto'); INSERT INTO actions (ActCod,Language,Obsolete,Txt) VALUES ('1689','es','N','Añadir revisor a proyecto'); - NEW. ActReqAddStdPrj Request adding a student to a project - NEW. ActReqAddTutPrj Request adding a tutor to a project - NEW. ActReqAddRevPrj Request adding a reviewer to a project - NEW. ActAddStdPrj Add a student to a project - NEW. ActAddTutPrj Add a tutor to a project - NEW. ActAddRevPrj Add a reviewer to a project - Version 17.3.13: Sep 20, 2017 Links to add users to a project. Not finished. (230058 lines) Version 17.3.12: Sep 20, 2017 Code refactoring in listing of projects. (229977 lines) Version 17.3.11: Sep 20, 2017 Code refactoring in listing of projects. (229981 lines) diff --git a/swad_database.c b/swad_database.c index 07c57120f..1929d55af 100644 --- a/swad_database.c +++ b/swad_database.c @@ -2011,6 +2011,7 @@ mysql> DESCRIBE projects; +-------------+---------------+------+-----+---------+----------------+ | PrjCod | int(11) | NO | PRI | NULL | auto_increment | | CrsCod | int(11) | NO | MUL | -1 | | +| DptCod | int(11) | NO | | -1 | | | Hidden | enum('N','Y') | NO | | N | | | Preassigned | enum('N','Y') | NO | | N | | | StartTime | datetime | NO | | NULL | | @@ -2021,11 +2022,12 @@ mysql> DESCRIBE projects; | Materials | text | NO | | NULL | | | URL | varchar(255) | NO | | NULL | | +-------------+---------------+------+-----+---------+----------------+ -11 rows in set (0,00 sec) +12 rows in set (0,00 sec) */ DB_CreateTable ("CREATE TABLE IF NOT EXISTS projects (" "PrjCod INT NOT NULL AUTO_INCREMENT," "CrsCod INT NOT NULL DEFAULT -1," + "DptCod INT NOT NULL DEFAULT -1," "Hidden ENUM('N','Y') NOT NULL DEFAULT 'N'," "Preassigned ENUM('N','Y') NOT NULL DEFAULT 'N'," "StartTime DATETIME NOT NULL," @@ -2036,7 +2038,8 @@ mysql> DESCRIBE projects; "Materials TEXT NOT NULL," // Cns_MAX_BYTES_TEXT "URL VARCHAR(255) NOT NULL," // Cns_MAX_BYTES_WWW "UNIQUE INDEX(PrjCod)," - "INDEX(CrsCod,Hidden))"); + "INDEX(CrsCod,Hidden)," + "INDEX(CrsCod,DptCod))"); /***** Table sessions *****/ /* diff --git a/swad_project.c b/swad_project.c index a672bec94..427cec4b5 100644 --- a/swad_project.c +++ b/swad_project.c @@ -466,10 +466,6 @@ static void Prj_ShowOneProject (struct Project *Prj,Prj_ProjectView_t ProjectVie Prj_ShowOneProjectTxtRow (Prj,ProjectView, Txt_Required_materials,Prj->Materials); - /* Project tutors */ - Prj_ShowOneProjectUsrsRow (Prj,ProjectView, - Txt_Tutors,Prj_ROLE_TUT); - /* Preassigned? */ fprintf (Gbl.F.Out,"