mirror of https://github.com/acanas/swad-core.git
Version 17.5.5
This commit is contained in:
parent
4528a48fe6
commit
5db8a17783
|
@ -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
|
||||
--
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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 *****/
|
||||
/*
|
||||
|
|
|
@ -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,"<tr>"
|
||||
"<td colspan=\"2\" class=\"RIGHT_TOP");
|
||||
|
@ -500,6 +496,10 @@ static void Prj_ShowOneProject (struct Project *Prj,Prj_ProjectView_t ProjectVie
|
|||
(Prj->Preassigned == Prj_PREASSIGNED) ? Txt_Yes :
|
||||
Txt_No);
|
||||
|
||||
/* Project tutors */
|
||||
Prj_ShowOneProjectUsrsRow (Prj,ProjectView,
|
||||
Txt_Tutors,Prj_ROLE_TUT);
|
||||
|
||||
/* Project students */
|
||||
Prj_ShowOneProjectUsrsRow (Prj,ProjectView,
|
||||
Txt_ROLES_PLURAL_Abc[Rol_STD][Usr_SEX_UNKNOWN],Prj_ROLE_STD);
|
||||
|
@ -552,22 +552,35 @@ static void Prj_ShowOneProjectUsrsRow (const struct Project *Prj,
|
|||
const char *Label,Prj_RoleInProject_t RoleInProject)
|
||||
{
|
||||
/***** Row with label and listing of users *****/
|
||||
fprintf (Gbl.F.Out,"<tr>"
|
||||
"<td colspan=\"2\" class=\"RIGHT_TOP");
|
||||
if (ProjectView == Prj_LIST_PROJECTS)
|
||||
fprintf (Gbl.F.Out," COLOR%u",Gbl.RowEvenOdd);
|
||||
fprintf (Gbl.F.Out," %s\">"
|
||||
"%s:"
|
||||
"</td>"
|
||||
"<td colspan=\"2\" class=\"LEFT_TOP",
|
||||
Prj->Hidden ? "ASG_LABEL_LIGHT" :
|
||||
"ASG_LABEL",
|
||||
Label);
|
||||
if (ProjectView == Prj_LIST_PROJECTS)
|
||||
fprintf (Gbl.F.Out," COLOR%u",Gbl.RowEvenOdd);
|
||||
fprintf (Gbl.F.Out," %s\">",
|
||||
Prj->Hidden ? "DAT_LIGHT" :
|
||||
"DAT");
|
||||
fprintf (Gbl.F.Out,"<tr>");
|
||||
switch (ProjectView)
|
||||
{
|
||||
case Prj_LIST_PROJECTS:
|
||||
fprintf (Gbl.F.Out,"<td colspan=\"2\" class=\"RIGHT_TOP COLOR%u %s\">%s:</td>"
|
||||
"<td colspan=\"2\" class=\"LEFT_TOP COLOR%u %s\">",
|
||||
Gbl.RowEvenOdd,
|
||||
Prj->Hidden ? "ASG_LABEL_LIGHT" :
|
||||
"ASG_LABEL",
|
||||
Label,
|
||||
Gbl.RowEvenOdd,
|
||||
Prj->Hidden ? "DAT_LIGHT" :
|
||||
"DAT");
|
||||
break;
|
||||
case Prj_PRINT_ONE_PROJECT:
|
||||
fprintf (Gbl.F.Out,"<td colspan=\"2\" class=\"RIGHT_TOP %s\">%s:</td>"
|
||||
"<td colspan=\"2\" class=\"LEFT_TOP %s\">",
|
||||
Prj->Hidden ? "ASG_LABEL_LIGHT" :
|
||||
"ASG_LABEL",
|
||||
Label,
|
||||
Prj->Hidden ? "DAT_LIGHT" :
|
||||
"DAT");
|
||||
break;
|
||||
case Prj_EDIT_ONE_PROJECT:
|
||||
fprintf (Gbl.F.Out,"<td class=\"RIGHT_TOP ASG_LABEL\">%s:</td>"
|
||||
"<td colspan=\"2\" class=\"LEFT_TOP DAT\">",
|
||||
Label);
|
||||
break;
|
||||
}
|
||||
Prj_WriteUsrs (Prj->PrjCod,ProjectView,RoleInProject);
|
||||
fprintf (Gbl.F.Out,"</td>"
|
||||
"</tr>");
|
||||
|
|
Loading…
Reference in New Issue