mirror of https://github.com/acanas/swad-core.git
Version 17.9
This commit is contained in:
parent
be9274aee0
commit
b3fb8ad5e2
|
@ -453,6 +453,7 @@ Assessment:
|
|||
311. ActHidAsg Hide assignment
|
||||
312. ActShoAsg Show assignment
|
||||
|
||||
NEW. ActSeeTblAllPrj Show all projects in a table
|
||||
NEW. ActFrmNewPrj Form to create a new project
|
||||
NEW. ActEdiOnePrj Edit one project
|
||||
NEW. ActPrnOnePrj Print one project
|
||||
|
@ -1956,6 +1957,7 @@ struct Act_Actions Act_Actions[Act_NUM_ACTIONS] =
|
|||
/* ActHidAsg */{ 964,-1,TabUnk,ActSeeAsg ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Asg_HideAssignment ,NULL},
|
||||
/* ActShoAsg */{ 965,-1,TabUnk,ActSeeAsg ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Asg_ShowAssignment ,NULL},
|
||||
|
||||
/* ActSeeTblAllPrj */{1696,-1,TabUnk,ActSeePrj ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_NEW_TAB,NULL ,Prj_ShowTableAllProjects ,NULL},
|
||||
/* ActFrmNewPrj */{1675,-1,TabUnk,ActSeePrj ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Prj_RequestCreatePrj ,NULL},
|
||||
/* ActEdiOnePrj */{1676,-1,TabUnk,ActSeePrj ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Prj_RequestEditPrj ,NULL},
|
||||
/* ActPrnOnePrj */{1677,-1,TabUnk,ActSeePrj ,0x3F8,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_NEW_TAB,NULL ,Prj_PrintOneProject ,NULL},
|
||||
|
@ -4799,6 +4801,7 @@ Act_Action_t Act_FromActCodToAction[1 + Act_MAX_ACTION_COD] = // Do not reuse un
|
|||
ActRemStdPrj, // #1693
|
||||
ActRemTutPrj, // #1694
|
||||
ActRemEvaPrj, // #1695
|
||||
ActSeeTblAllPrj, // #1696
|
||||
};
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
187
swad_action.h
187
swad_action.h
|
@ -58,9 +58,9 @@ typedef enum
|
|||
|
||||
typedef signed int Act_Action_t; // Must be a signed type, because -1 is used to indicate obsolete action
|
||||
|
||||
#define Act_NUM_ACTIONS (1 + 9 + 43 + 17 + 47 + 33 + 24 + 115 + 118 + 416 + 165 + 172 + 42 + 14 + 97)
|
||||
#define Act_NUM_ACTIONS (1 + 9 + 43 + 17 + 47 + 33 + 24 + 115 + 119 + 416 + 165 + 172 + 42 + 14 + 97)
|
||||
|
||||
#define Act_MAX_ACTION_COD 1695
|
||||
#define Act_MAX_ACTION_COD 1696
|
||||
|
||||
#define Act_MAX_OPTIONS_IN_MENU_PER_TAB 12
|
||||
|
||||
|
@ -463,102 +463,103 @@ typedef signed int Act_Action_t; // Must be a signed type, because -1 is used to
|
|||
#define ActHidAsg (ActChgCalCrs1stDay + 26)
|
||||
#define ActShoAsg (ActChgCalCrs1stDay + 27)
|
||||
|
||||
#define ActFrmNewPrj (ActChgCalCrs1stDay + 28)
|
||||
#define ActEdiOnePrj (ActChgCalCrs1stDay + 29)
|
||||
#define ActPrnOnePrj (ActChgCalCrs1stDay + 30)
|
||||
#define ActNewPrj (ActChgCalCrs1stDay + 31)
|
||||
#define ActChgPrj (ActChgCalCrs1stDay + 32)
|
||||
#define ActReqRemPrj (ActChgCalCrs1stDay + 33)
|
||||
#define ActRemPrj (ActChgCalCrs1stDay + 34)
|
||||
#define ActHidPrj (ActChgCalCrs1stDay + 35)
|
||||
#define ActShoPrj (ActChgCalCrs1stDay + 36)
|
||||
#define ActReqAddStdPrj (ActChgCalCrs1stDay + 37)
|
||||
#define ActReqAddTutPrj (ActChgCalCrs1stDay + 38)
|
||||
#define ActReqAddEvaPrj (ActChgCalCrs1stDay + 39)
|
||||
#define ActAddStdPrj (ActChgCalCrs1stDay + 40)
|
||||
#define ActAddTutPrj (ActChgCalCrs1stDay + 41)
|
||||
#define ActAddEvaPrj (ActChgCalCrs1stDay + 42)
|
||||
#define ActReqRemStdPrj (ActChgCalCrs1stDay + 43)
|
||||
#define ActReqRemTutPrj (ActChgCalCrs1stDay + 44)
|
||||
#define ActReqRemEvaPrj (ActChgCalCrs1stDay + 45)
|
||||
#define ActRemStdPrj (ActChgCalCrs1stDay + 46)
|
||||
#define ActRemTutPrj (ActChgCalCrs1stDay + 47)
|
||||
#define ActRemEvaPrj (ActChgCalCrs1stDay + 48)
|
||||
#define ActSeeTblAllPrj (ActChgCalCrs1stDay + 28)
|
||||
#define ActFrmNewPrj (ActChgCalCrs1stDay + 29)
|
||||
#define ActEdiOnePrj (ActChgCalCrs1stDay + 30)
|
||||
#define ActPrnOnePrj (ActChgCalCrs1stDay + 31)
|
||||
#define ActNewPrj (ActChgCalCrs1stDay + 32)
|
||||
#define ActChgPrj (ActChgCalCrs1stDay + 33)
|
||||
#define ActReqRemPrj (ActChgCalCrs1stDay + 34)
|
||||
#define ActRemPrj (ActChgCalCrs1stDay + 35)
|
||||
#define ActHidPrj (ActChgCalCrs1stDay + 36)
|
||||
#define ActShoPrj (ActChgCalCrs1stDay + 37)
|
||||
#define ActReqAddStdPrj (ActChgCalCrs1stDay + 38)
|
||||
#define ActReqAddTutPrj (ActChgCalCrs1stDay + 39)
|
||||
#define ActReqAddEvaPrj (ActChgCalCrs1stDay + 40)
|
||||
#define ActAddStdPrj (ActChgCalCrs1stDay + 41)
|
||||
#define ActAddTutPrj (ActChgCalCrs1stDay + 42)
|
||||
#define ActAddEvaPrj (ActChgCalCrs1stDay + 43)
|
||||
#define ActReqRemStdPrj (ActChgCalCrs1stDay + 44)
|
||||
#define ActReqRemTutPrj (ActChgCalCrs1stDay + 45)
|
||||
#define ActReqRemEvaPrj (ActChgCalCrs1stDay + 46)
|
||||
#define ActRemStdPrj (ActChgCalCrs1stDay + 47)
|
||||
#define ActRemTutPrj (ActChgCalCrs1stDay + 48)
|
||||
#define ActRemEvaPrj (ActChgCalCrs1stDay + 49)
|
||||
|
||||
#define ActSeeTst (ActChgCalCrs1stDay + 49)
|
||||
#define ActAssTst (ActChgCalCrs1stDay + 50)
|
||||
#define ActEdiTstQst (ActChgCalCrs1stDay + 51)
|
||||
#define ActEdiOneTstQst (ActChgCalCrs1stDay + 52)
|
||||
#define ActReqImpTstQst (ActChgCalCrs1stDay + 53)
|
||||
#define ActImpTstQst (ActChgCalCrs1stDay + 54)
|
||||
#define ActLstTstQst (ActChgCalCrs1stDay + 55)
|
||||
#define ActRcvTstQst (ActChgCalCrs1stDay + 56)
|
||||
#define ActReqRemTstQst (ActChgCalCrs1stDay + 57)
|
||||
#define ActRemTstQst (ActChgCalCrs1stDay + 58)
|
||||
#define ActShfTstQst (ActChgCalCrs1stDay + 59)
|
||||
#define ActCfgTst (ActChgCalCrs1stDay + 60)
|
||||
#define ActEnableTag (ActChgCalCrs1stDay + 61)
|
||||
#define ActDisableTag (ActChgCalCrs1stDay + 62)
|
||||
#define ActRenTag (ActChgCalCrs1stDay + 63)
|
||||
#define ActRcvCfgTst (ActChgCalCrs1stDay + 64)
|
||||
#define ActSeeTst (ActChgCalCrs1stDay + 50)
|
||||
#define ActAssTst (ActChgCalCrs1stDay + 51)
|
||||
#define ActEdiTstQst (ActChgCalCrs1stDay + 52)
|
||||
#define ActEdiOneTstQst (ActChgCalCrs1stDay + 53)
|
||||
#define ActReqImpTstQst (ActChgCalCrs1stDay + 54)
|
||||
#define ActImpTstQst (ActChgCalCrs1stDay + 55)
|
||||
#define ActLstTstQst (ActChgCalCrs1stDay + 56)
|
||||
#define ActRcvTstQst (ActChgCalCrs1stDay + 57)
|
||||
#define ActReqRemTstQst (ActChgCalCrs1stDay + 58)
|
||||
#define ActRemTstQst (ActChgCalCrs1stDay + 59)
|
||||
#define ActShfTstQst (ActChgCalCrs1stDay + 60)
|
||||
#define ActCfgTst (ActChgCalCrs1stDay + 61)
|
||||
#define ActEnableTag (ActChgCalCrs1stDay + 62)
|
||||
#define ActDisableTag (ActChgCalCrs1stDay + 63)
|
||||
#define ActRenTag (ActChgCalCrs1stDay + 64)
|
||||
#define ActRcvCfgTst (ActChgCalCrs1stDay + 65)
|
||||
|
||||
#define ActReqSeeMyTstRes (ActChgCalCrs1stDay + 65)
|
||||
#define ActSeeMyTstRes (ActChgCalCrs1stDay + 66)
|
||||
#define ActSeeOneTstResMe (ActChgCalCrs1stDay + 67)
|
||||
#define ActReqSeeUsrTstRes (ActChgCalCrs1stDay + 68)
|
||||
#define ActSeeUsrTstRes (ActChgCalCrs1stDay + 69)
|
||||
#define ActSeeOneTstResOth (ActChgCalCrs1stDay + 70)
|
||||
#define ActReqSeeMyTstRes (ActChgCalCrs1stDay + 66)
|
||||
#define ActSeeMyTstRes (ActChgCalCrs1stDay + 67)
|
||||
#define ActSeeOneTstResMe (ActChgCalCrs1stDay + 68)
|
||||
#define ActReqSeeUsrTstRes (ActChgCalCrs1stDay + 69)
|
||||
#define ActSeeUsrTstRes (ActChgCalCrs1stDay + 70)
|
||||
#define ActSeeOneTstResOth (ActChgCalCrs1stDay + 71)
|
||||
|
||||
#define ActSeeOneGam (ActChgCalCrs1stDay + 71)
|
||||
#define ActPlyGam (ActChgCalCrs1stDay + 72)
|
||||
#define ActPlyGam1stQst (ActChgCalCrs1stDay + 73)
|
||||
#define ActPlyGamNxtQst (ActChgCalCrs1stDay + 74)
|
||||
#define ActPlyGamAns (ActChgCalCrs1stDay + 75)
|
||||
#define ActAnsGam (ActChgCalCrs1stDay + 76)
|
||||
#define ActFrmNewGam (ActChgCalCrs1stDay + 77)
|
||||
#define ActEdiOneGam (ActChgCalCrs1stDay + 78)
|
||||
#define ActNewGam (ActChgCalCrs1stDay + 79)
|
||||
#define ActChgGam (ActChgCalCrs1stDay + 80)
|
||||
#define ActReqRemGam (ActChgCalCrs1stDay + 81)
|
||||
#define ActRemGam (ActChgCalCrs1stDay + 82)
|
||||
#define ActReqRstGam (ActChgCalCrs1stDay + 83)
|
||||
#define ActRstGam (ActChgCalCrs1stDay + 84)
|
||||
#define ActHidGam (ActChgCalCrs1stDay + 85)
|
||||
#define ActShoGam (ActChgCalCrs1stDay + 86)
|
||||
#define ActAddOneGamQst (ActChgCalCrs1stDay + 87)
|
||||
#define ActGamLstTstQst (ActChgCalCrs1stDay + 88)
|
||||
#define ActAddTstQstToGam (ActChgCalCrs1stDay + 89)
|
||||
#define ActReqRemGamQst (ActChgCalCrs1stDay + 90)
|
||||
#define ActRemGamQst (ActChgCalCrs1stDay + 91)
|
||||
#define ActUp_GamQst (ActChgCalCrs1stDay + 92)
|
||||
#define ActDwnGamQst (ActChgCalCrs1stDay + 93)
|
||||
#define ActSeeOneGam (ActChgCalCrs1stDay + 72)
|
||||
#define ActPlyGam (ActChgCalCrs1stDay + 73)
|
||||
#define ActPlyGam1stQst (ActChgCalCrs1stDay + 74)
|
||||
#define ActPlyGamNxtQst (ActChgCalCrs1stDay + 75)
|
||||
#define ActPlyGamAns (ActChgCalCrs1stDay + 76)
|
||||
#define ActAnsGam (ActChgCalCrs1stDay + 77)
|
||||
#define ActFrmNewGam (ActChgCalCrs1stDay + 78)
|
||||
#define ActEdiOneGam (ActChgCalCrs1stDay + 79)
|
||||
#define ActNewGam (ActChgCalCrs1stDay + 80)
|
||||
#define ActChgGam (ActChgCalCrs1stDay + 81)
|
||||
#define ActReqRemGam (ActChgCalCrs1stDay + 82)
|
||||
#define ActRemGam (ActChgCalCrs1stDay + 83)
|
||||
#define ActReqRstGam (ActChgCalCrs1stDay + 84)
|
||||
#define ActRstGam (ActChgCalCrs1stDay + 85)
|
||||
#define ActHidGam (ActChgCalCrs1stDay + 86)
|
||||
#define ActShoGam (ActChgCalCrs1stDay + 87)
|
||||
#define ActAddOneGamQst (ActChgCalCrs1stDay + 88)
|
||||
#define ActGamLstTstQst (ActChgCalCrs1stDay + 89)
|
||||
#define ActAddTstQstToGam (ActChgCalCrs1stDay + 90)
|
||||
#define ActReqRemGamQst (ActChgCalCrs1stDay + 91)
|
||||
#define ActRemGamQst (ActChgCalCrs1stDay + 92)
|
||||
#define ActUp_GamQst (ActChgCalCrs1stDay + 93)
|
||||
#define ActDwnGamQst (ActChgCalCrs1stDay + 94)
|
||||
|
||||
#define ActSeeOneSvy (ActChgCalCrs1stDay + 94)
|
||||
#define ActAnsSvy (ActChgCalCrs1stDay + 95)
|
||||
#define ActFrmNewSvy (ActChgCalCrs1stDay + 96)
|
||||
#define ActEdiOneSvy (ActChgCalCrs1stDay + 97)
|
||||
#define ActNewSvy (ActChgCalCrs1stDay + 98)
|
||||
#define ActChgSvy (ActChgCalCrs1stDay + 99)
|
||||
#define ActReqRemSvy (ActChgCalCrs1stDay + 100)
|
||||
#define ActRemSvy (ActChgCalCrs1stDay + 101)
|
||||
#define ActReqRstSvy (ActChgCalCrs1stDay + 102)
|
||||
#define ActRstSvy (ActChgCalCrs1stDay + 103)
|
||||
#define ActHidSvy (ActChgCalCrs1stDay + 104)
|
||||
#define ActShoSvy (ActChgCalCrs1stDay + 105)
|
||||
#define ActEdiOneSvyQst (ActChgCalCrs1stDay + 106)
|
||||
#define ActRcvSvyQst (ActChgCalCrs1stDay + 107)
|
||||
#define ActReqRemSvyQst (ActChgCalCrs1stDay + 108)
|
||||
#define ActRemSvyQst (ActChgCalCrs1stDay + 109)
|
||||
#define ActSeeOneSvy (ActChgCalCrs1stDay + 95)
|
||||
#define ActAnsSvy (ActChgCalCrs1stDay + 96)
|
||||
#define ActFrmNewSvy (ActChgCalCrs1stDay + 97)
|
||||
#define ActEdiOneSvy (ActChgCalCrs1stDay + 98)
|
||||
#define ActNewSvy (ActChgCalCrs1stDay + 99)
|
||||
#define ActChgSvy (ActChgCalCrs1stDay + 100)
|
||||
#define ActReqRemSvy (ActChgCalCrs1stDay + 101)
|
||||
#define ActRemSvy (ActChgCalCrs1stDay + 102)
|
||||
#define ActReqRstSvy (ActChgCalCrs1stDay + 103)
|
||||
#define ActRstSvy (ActChgCalCrs1stDay + 104)
|
||||
#define ActHidSvy (ActChgCalCrs1stDay + 105)
|
||||
#define ActShoSvy (ActChgCalCrs1stDay + 106)
|
||||
#define ActEdiOneSvyQst (ActChgCalCrs1stDay + 107)
|
||||
#define ActRcvSvyQst (ActChgCalCrs1stDay + 108)
|
||||
#define ActReqRemSvyQst (ActChgCalCrs1stDay + 109)
|
||||
#define ActRemSvyQst (ActChgCalCrs1stDay + 110)
|
||||
|
||||
#define ActSeeOneExaAnn (ActChgCalCrs1stDay + 110)
|
||||
#define ActSeeDatExaAnn (ActChgCalCrs1stDay + 111)
|
||||
#define ActEdiExaAnn (ActChgCalCrs1stDay + 112)
|
||||
#define ActRcvExaAnn (ActChgCalCrs1stDay + 113)
|
||||
#define ActPrnExaAnn (ActChgCalCrs1stDay + 114)
|
||||
#define ActReqRemExaAnn (ActChgCalCrs1stDay + 115)
|
||||
#define ActRemExaAnn (ActChgCalCrs1stDay + 116)
|
||||
#define ActHidExaAnn (ActChgCalCrs1stDay + 117)
|
||||
#define ActShoExaAnn (ActChgCalCrs1stDay + 118)
|
||||
#define ActSeeOneExaAnn (ActChgCalCrs1stDay + 111)
|
||||
#define ActSeeDatExaAnn (ActChgCalCrs1stDay + 112)
|
||||
#define ActEdiExaAnn (ActChgCalCrs1stDay + 113)
|
||||
#define ActRcvExaAnn (ActChgCalCrs1stDay + 114)
|
||||
#define ActPrnExaAnn (ActChgCalCrs1stDay + 115)
|
||||
#define ActReqRemExaAnn (ActChgCalCrs1stDay + 116)
|
||||
#define ActRemExaAnn (ActChgCalCrs1stDay + 117)
|
||||
#define ActHidExaAnn (ActChgCalCrs1stDay + 118)
|
||||
#define ActShoExaAnn (ActChgCalCrs1stDay + 119)
|
||||
|
||||
/*****************************************************************************/
|
||||
/******************************** Files tab **********************************/
|
||||
|
|
|
@ -252,13 +252,17 @@
|
|||
/****************************** Public constants *****************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
#define Log_PLATFORM_VERSION "SWAD 17.8.1 (2017-09-23)"
|
||||
#define Log_PLATFORM_VERSION "SWAD 17.9 (2017-09-24)"
|
||||
#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.9: Sep 24, 2017 Action to show all projects in a table. (231151 lines)
|
||||
1 change necessary in database:
|
||||
INSERT INTO actions (ActCod,Language,Obsolete,Txt) VALUES ('1696','es','N','Ver tabla proyectos');
|
||||
|
||||
Version 17.8.1: Sep 23, 2017 Icon to show all projects in a table. (230980 lines)
|
||||
Version 17.8: Sep 23, 2017 Projects can be ordered by start, end, title and department. (230963 lines)
|
||||
Version 17.7.1: Sep 23, 2017 Changes in listing of projects. (230764 lines)
|
||||
|
@ -346,16 +350,16 @@ sudo cp icon/usr_off64x64.png /var/www/html/swad/icon/
|
|||
12 changes necessary in database:
|
||||
CREATE TABLE IF NOT EXISTS projects (PrjCod INT NOT NULL AUTO_INCREMENT,CrsCod INT NOT NULL DEFAULT -1,Hidden ENUM('N','Y') NOT NULL DEFAULT 'N',NumNotif INT NOT NULL DEFAULT 0,UsrCod INT NOT NULL,StartTime DATETIME NOT NULL,EndTime DATETIME NOT NULL,Title VARCHAR(2047) NOT NULL,Folder VARBINARY(255) NOT NULL,Txt TEXT NOT NULL,UNIQUE INDEX(PrjCod),INDEX(CrsCod,Hidden));
|
||||
CREATE TABLE IF NOT EXISTS prj_grp (PrjCod INT NOT NULL,GrpCod INT NOT NULL,UNIQUE INDEX(PrjCod,GrpCod));
|
||||
INSERT INTO actions (ActCod,Language,Obsolete,Txt) VALUES ('1674','es','N','Mostrar respuestas de pregunta juego');
|
||||
INSERT INTO actions (ActCod,Language,Obsolete,Txt) VALUES ('1675','es','N','Mostrar respuestas de pregunta juego');
|
||||
INSERT INTO actions (ActCod,Language,Obsolete,Txt) VALUES ('1676','es','N','Mostrar respuestas de pregunta juego');
|
||||
INSERT INTO actions (ActCod,Language,Obsolete,Txt) VALUES ('1677','es','N','Mostrar respuestas de pregunta juego');
|
||||
INSERT INTO actions (ActCod,Language,Obsolete,Txt) VALUES ('1678','es','N','Mostrar respuestas de pregunta juego');
|
||||
INSERT INTO actions (ActCod,Language,Obsolete,Txt) VALUES ('1679','es','N','Mostrar respuestas de pregunta juego');
|
||||
INSERT INTO actions (ActCod,Language,Obsolete,Txt) VALUES ('1680','es','N','Mostrar respuestas de pregunta juego');
|
||||
INSERT INTO actions (ActCod,Language,Obsolete,Txt) VALUES ('1681','es','N','Mostrar respuestas de pregunta juego');
|
||||
INSERT INTO actions (ActCod,Language,Obsolete,Txt) VALUES ('1682','es','N','Mostrar respuestas de pregunta juego');
|
||||
INSERT INTO actions (ActCod,Language,Obsolete,Txt) VALUES ('1683','es','N','Mostrar respuestas de pregunta juego');
|
||||
INSERT INTO actions (ActCod,Language,Obsolete,Txt) VALUES ('1674','es','N','Ver proyectos');
|
||||
INSERT INTO actions (ActCod,Language,Obsolete,Txt) VALUES ('1675','es','N','Solicitar creación proyecto');
|
||||
INSERT INTO actions (ActCod,Language,Obsolete,Txt) VALUES ('1676','es','N','Solicitar edición proyecto');
|
||||
INSERT INTO actions (ActCod,Language,Obsolete,Txt) VALUES ('1677','es','N','Imprimir proyecto');
|
||||
INSERT INTO actions (ActCod,Language,Obsolete,Txt) VALUES ('1678','es','N','Crear proyecto');
|
||||
INSERT INTO actions (ActCod,Language,Obsolete,Txt) VALUES ('1679','es','N','Modificar proyecto');
|
||||
INSERT INTO actions (ActCod,Language,Obsolete,Txt) VALUES ('1680','es','N','Solicitar elim. proyecto');
|
||||
INSERT INTO actions (ActCod,Language,Obsolete,Txt) VALUES ('1681','es','N','Eliminar proyecto');
|
||||
INSERT INTO actions (ActCod,Language,Obsolete,Txt) VALUES ('1682','es','N','Ocultar proyecto');
|
||||
INSERT INTO actions (ActCod,Language,Obsolete,Txt) VALUES ('1683','es','N','Mostrar actividad');
|
||||
|
||||
Version 17.1: Sep 15, 2017 New module swad_project. Not finished. (229123 lines)
|
||||
Copy the following icons to icon public directory:
|
||||
|
|
|
@ -465,12 +465,11 @@ static void Lay_WriteScripts (void)
|
|||
/***** Script for MathJax *****/
|
||||
Lay_WriteScriptMathJax ();
|
||||
|
||||
/***** Scripts used only in main window *****/
|
||||
if (Act_Actions[Gbl.Action.Act].BrowserWindow == Act_BRW_1ST_TAB)
|
||||
{
|
||||
/***** Write script with init function executed after loading page *****/
|
||||
Lay_WriteScriptInit ();
|
||||
|
||||
/***** Write script to set parameters needed by AJAX *****/
|
||||
Lay_WriteScriptParamsAJAX ();
|
||||
}
|
||||
|
||||
/***** Prepare script to draw months *****/
|
||||
if ((Gbl.Prefs.SideCols & Lay_SHOW_LEFT_COLUMN) || // Left column visible
|
||||
|
|
231
swad_project.c
231
swad_project.c
|
@ -74,16 +74,23 @@ static void Prj_PutIconToCreateNewPrj (void);
|
|||
static void Prj_PutButtonToCreateNewPrj (void);
|
||||
static void Prj_PutIconToShowAllData (void);
|
||||
static void Prj_ShowOneProject (struct Project *Prj,Prj_ProjectView_t ProjectView);
|
||||
static void Prj_ShowTableAllProjectsOneRow (struct Project *Prj);
|
||||
static void Prj_ShowOneProjectDepartment (const struct Project *Prj,
|
||||
Prj_ProjectView_t ProjectView);
|
||||
static void Prj_ShowOneProjectTxtRow (struct Project *Prj,
|
||||
static void Prj_ShowTableAllProjectsDepartment (const struct Project *Prj);
|
||||
static void Prj_ShowOneProjectTxtField (struct Project *Prj,
|
||||
Prj_ProjectView_t ProjectView,
|
||||
const char *Label,char *TxtField);
|
||||
static void Prj_ShowOneProjectUsrsRow (const struct Project *Prj,
|
||||
static void Prj_ShowTableAllProjectsTxtField (struct Project *Prj,
|
||||
char *TxtField);
|
||||
static void Prj_ShowOneProjectUsrs (const struct Project *Prj,
|
||||
Prj_ProjectView_t ProjectView,
|
||||
const char *Label,Prj_RoleInProject_t RoleInProject);
|
||||
static void Prj_ShowTableAllProjectsUsrs (const struct Project *Prj,
|
||||
Prj_RoleInProject_t RoleInProject);
|
||||
static void Prj_WriteUsrs (long PrjCod,Prj_ProjectView_t ProjectView,
|
||||
Prj_RoleInProject_t RoleInProject);
|
||||
|
||||
static void Prj_ReqAnotherUsrID (Prj_RoleInProject_t RoleInProject);
|
||||
static void Prj_AddUsrToProject (Prj_RoleInProject_t RoleInProject);
|
||||
static void Prj_ReqRemUsrFromPrj (Prj_RoleInProject_t RoleInProject);
|
||||
|
@ -110,7 +117,7 @@ static void Prj_CreateProject (struct Project *Prj);
|
|||
static void Prj_UpdateProject (struct Project *Prj);
|
||||
|
||||
/*****************************************************************************/
|
||||
/************************** List all the projects ****************************/
|
||||
/***************************** List all projects *****************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Prj_SeeProjects (void)
|
||||
|
@ -124,7 +131,47 @@ void Prj_SeeProjects (void)
|
|||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/************************** Show all the projects ****************************/
|
||||
/************************ Show all projects in a table ***********************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Prj_ShowTableAllProjects (void)
|
||||
{
|
||||
extern const char *Txt_No_projects;
|
||||
unsigned NumPrj;
|
||||
struct Project Prj;
|
||||
|
||||
/***** Get list of projects *****/
|
||||
Prj_GetListProjects ();
|
||||
|
||||
if (Gbl.Prjs.Num)
|
||||
{
|
||||
/***** Allocate memory for the project *****/
|
||||
Prj_AllocMemProject (&Prj);
|
||||
|
||||
/***** Table head *****/
|
||||
Tbl_StartTableWide (2);
|
||||
|
||||
/***** Write all the projects *****/
|
||||
for (NumPrj = 0;
|
||||
NumPrj <= Gbl.Prjs.Num;
|
||||
NumPrj++)
|
||||
{
|
||||
Prj.PrjCod = Gbl.Prjs.LstPrjCods[NumPrj];
|
||||
Prj_ShowTableAllProjectsOneRow (&Prj);
|
||||
}
|
||||
|
||||
/***** End table *****/
|
||||
Tbl_EndTable ();
|
||||
|
||||
/***** Free memory of the project *****/
|
||||
Prj_FreeMemProject (&Prj);
|
||||
}
|
||||
else // No projects created
|
||||
Ale_ShowAlert (Ale_INFO,Txt_No_projects);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/***************************** Show the projects *****************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void Prj_ShowAllProjects (void)
|
||||
|
@ -309,7 +356,7 @@ static void Prj_PutIconToShowAllData (void)
|
|||
{
|
||||
extern const char *Txt_Show_all_data_in_a_table;
|
||||
|
||||
Lay_PutContextualLink (ActSeePrj,NULL,Prj_PutParams,
|
||||
Lay_PutContextualLink (ActSeeTblAllPrj,NULL,Prj_PutParams,
|
||||
"table64x64.gif",
|
||||
Txt_Show_all_data_in_a_table,NULL,
|
||||
NULL);
|
||||
|
@ -436,15 +483,15 @@ static void Prj_ShowOneProject (struct Project *Prj,Prj_ProjectView_t ProjectVie
|
|||
|
||||
/***** Write rows of data of this project *****/
|
||||
/* Description of the project */
|
||||
Prj_ShowOneProjectTxtRow (Prj,ProjectView,
|
||||
Prj_ShowOneProjectTxtField (Prj,ProjectView,
|
||||
Txt_Description,Prj->Description);
|
||||
|
||||
/* Required knowledge to carry out the project */
|
||||
Prj_ShowOneProjectTxtRow (Prj,ProjectView,
|
||||
Prj_ShowOneProjectTxtField (Prj,ProjectView,
|
||||
Txt_Required_knowledge,Prj->Knowledge);
|
||||
|
||||
/* Required materials to carry out the project */
|
||||
Prj_ShowOneProjectTxtRow (Prj,ProjectView,
|
||||
Prj_ShowOneProjectTxtField (Prj,ProjectView,
|
||||
Txt_Required_materials,Prj->Materials);
|
||||
|
||||
/* Preassigned? */
|
||||
|
@ -474,12 +521,113 @@ static void Prj_ShowOneProject (struct Project *Prj,Prj_ProjectView_t ProjectVie
|
|||
for (RoleInProject = Prj_ROLE_STD;
|
||||
RoleInProject <= Prj_ROLE_EVA;
|
||||
RoleInProject++)
|
||||
Prj_ShowOneProjectUsrsRow (Prj,ProjectView,
|
||||
Prj_ShowOneProjectUsrs (Prj,ProjectView,
|
||||
Txt_PROJECT_ROLES_PLURAL_Abc[RoleInProject],RoleInProject);
|
||||
|
||||
Gbl.RowEvenOdd = 1 - Gbl.RowEvenOdd;
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/***************** Show one row of table with all projects *******************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void Prj_ShowTableAllProjectsOneRow (struct Project *Prj)
|
||||
{
|
||||
extern const char *Txt_Today;
|
||||
extern const char *Txt_Yes;
|
||||
extern const char *Txt_No;
|
||||
extern const char *Txt_Description;
|
||||
extern const char *Txt_Required_knowledge;
|
||||
extern const char *Txt_Required_materials;
|
||||
extern const char *Txt_Preassigned_QUESTION;
|
||||
extern const char *Txt_PROJECT_ROLES_PLURAL_Abc[Prj_NUM_ROLES_IN_PROJECT];
|
||||
Prj_RoleInProject_t RoleInProject;
|
||||
static unsigned UniqueId = 0;
|
||||
|
||||
/***** Get data of this project *****/
|
||||
Prj_GetDataOfProjectByCod (Prj);
|
||||
|
||||
/***** Start row *****/
|
||||
fprintf (Gbl.F.Out,"<tr>");
|
||||
|
||||
/***** Start date/time *****/
|
||||
UniqueId++;
|
||||
fprintf (Gbl.F.Out,"<td id=\"asg_date_start_%u\" class=\"LEFT_TOP COLOR%u %s\">"
|
||||
"<script type=\"text/javascript\">"
|
||||
"writeLocalDateHMSFromUTC('asg_date_start_%u',%ld,"
|
||||
"%u,'<br />','%s',true,true,0x7);"
|
||||
"</script>"
|
||||
"</td>",
|
||||
UniqueId,
|
||||
Gbl.RowEvenOdd,
|
||||
Prj->Hidden ? (Prj->Open ? "DATE_GREEN_LIGHT" :
|
||||
"DATE_RED_LIGHT") :
|
||||
(Prj->Open ? "DATE_GREEN" :
|
||||
"DATE_RED"),
|
||||
UniqueId,Prj->TimeUTC[Dat_START_TIME],
|
||||
(unsigned) Gbl.Prefs.DateFormat,Txt_Today);
|
||||
|
||||
/***** End date/time *****/
|
||||
UniqueId++;
|
||||
fprintf (Gbl.F.Out,"<td id=\"asg_date_end_%u\" class=\"LEFT_TOP COLOR%u %s\">"
|
||||
"<script type=\"text/javascript\">"
|
||||
"writeLocalDateHMSFromUTC('asg_date_end_%u',%ld,"
|
||||
"%u,'<br />','%s',false,true,0x7);"
|
||||
"</script>"
|
||||
"</td>",
|
||||
UniqueId,
|
||||
Gbl.RowEvenOdd,
|
||||
Prj->Hidden ? (Prj->Open ? "DATE_GREEN_LIGHT" :
|
||||
"DATE_RED_LIGHT") :
|
||||
(Prj->Open ? "DATE_GREEN" :
|
||||
"DATE_RED"),
|
||||
UniqueId,Prj->TimeUTC[Dat_END_TIME],
|
||||
(unsigned) Gbl.Prefs.DateFormat,Txt_Today);
|
||||
|
||||
/***** Project title *****/
|
||||
fprintf (Gbl.F.Out,"<td class=\"LEFT_TOP COLOR%u %s\">"
|
||||
"%s"
|
||||
"</td>",
|
||||
Gbl.RowEvenOdd,
|
||||
Prj->Hidden ? "DAT_LIGHT" :
|
||||
"DAT_N",
|
||||
Prj->Title);
|
||||
|
||||
/* Department */
|
||||
Prj_ShowTableAllProjectsDepartment (Prj);
|
||||
|
||||
/***** Write rows of data of this project *****/
|
||||
/* Description of the project */
|
||||
Prj_ShowTableAllProjectsTxtField (Prj,Prj->Description);
|
||||
|
||||
/* Required knowledge to carry out the project */
|
||||
Prj_ShowTableAllProjectsTxtField (Prj,Prj->Knowledge);
|
||||
|
||||
/* Required materials to carry out the project */
|
||||
Prj_ShowTableAllProjectsTxtField (Prj,Prj->Materials);
|
||||
|
||||
/* Preassigned? */
|
||||
fprintf (Gbl.F.Out,"<td class=\"LEFT_TOP COLOR%u %s\">"
|
||||
"%s"
|
||||
"</td>",
|
||||
Gbl.RowEvenOdd,
|
||||
Prj->Hidden ? "DAT_LIGHT" :
|
||||
"DAT",
|
||||
(Prj->Preassigned == Prj_PREASSIGNED) ? Txt_Yes :
|
||||
Txt_No);
|
||||
|
||||
/* Project members */
|
||||
for (RoleInProject = Prj_ROLE_STD;
|
||||
RoleInProject <= Prj_ROLE_EVA;
|
||||
RoleInProject++)
|
||||
Prj_ShowTableAllProjectsUsrs (Prj,RoleInProject);
|
||||
|
||||
/***** End row *****/
|
||||
fprintf (Gbl.F.Out,"</tr>");
|
||||
|
||||
Gbl.RowEvenOdd = 1 - Gbl.RowEvenOdd;
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/****************** Show department associated to project ********************/
|
||||
/*****************************************************************************/
|
||||
|
@ -497,12 +645,12 @@ static void Prj_ShowOneProjectDepartment (const struct Project *Prj,
|
|||
/***** Show department *****/
|
||||
PutLink = (ProjectView == Prj_LIST_PROJECTS && Dpt.WWW[0]);
|
||||
|
||||
fprintf (Gbl.F.Out,"<td class=\"%s LEFT_TOP",
|
||||
Prj->Hidden ? "DAT_LIGHT" :
|
||||
"DAT_N");
|
||||
fprintf (Gbl.F.Out,"<td class=\"LEFT_TOP");
|
||||
if (ProjectView == Prj_LIST_PROJECTS)
|
||||
fprintf (Gbl.F.Out," COLOR%u",Gbl.RowEvenOdd);
|
||||
fprintf (Gbl.F.Out,"\">");
|
||||
fprintf (Gbl.F.Out," %s\">",
|
||||
Prj->Hidden ? "DAT_LIGHT" :
|
||||
"DAT_N");
|
||||
if (PutLink)
|
||||
fprintf (Gbl.F.Out,"<a href=\"%s\" target=\"_blank\""
|
||||
" class=\"%s\">",
|
||||
|
@ -516,11 +664,29 @@ static void Prj_ShowOneProjectDepartment (const struct Project *Prj,
|
|||
"</tr>");
|
||||
}
|
||||
|
||||
static void Prj_ShowTableAllProjectsDepartment (const struct Project *Prj)
|
||||
{
|
||||
struct Department Dpt;
|
||||
|
||||
/***** Get data of department *****/
|
||||
Dpt.DptCod = Prj->DptCod;
|
||||
Dpt_GetDataOfDepartmentByCod (&Dpt);
|
||||
|
||||
/***** Show department *****/
|
||||
fprintf (Gbl.F.Out,"<td class=\"LEFT_TOP COLOR%u %s\">"
|
||||
"%s"
|
||||
"</td>",
|
||||
Gbl.RowEvenOdd,
|
||||
Prj->Hidden ? "DAT_LIGHT" :
|
||||
"DAT",
|
||||
Dpt.FullName);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/************************ Show text row about a project **********************/
|
||||
/********************** Show text field about a project **********************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void Prj_ShowOneProjectTxtRow (struct Project *Prj,
|
||||
static void Prj_ShowOneProjectTxtField (struct Project *Prj,
|
||||
Prj_ProjectView_t ProjectView,
|
||||
const char *Label,char *TxtField)
|
||||
{
|
||||
|
@ -529,7 +695,7 @@ static void Prj_ShowOneProjectTxtRow (struct Project *Prj,
|
|||
TxtField,Cns_MAX_BYTES_TEXT,false); // Convert from HTML to recpectful HTML
|
||||
Str_InsertLinks (TxtField,Cns_MAX_BYTES_TEXT,60); // Insert links
|
||||
|
||||
/***** Row with label and text *****/
|
||||
/***** Write row with label and text *****/
|
||||
fprintf (Gbl.F.Out,"<tr>"
|
||||
"<td colspan=\"2\" class=\"RIGHT_TOP");
|
||||
if (ProjectView == Prj_LIST_PROJECTS)
|
||||
|
@ -552,11 +718,28 @@ static void Prj_ShowOneProjectTxtRow (struct Project *Prj,
|
|||
TxtField);
|
||||
}
|
||||
|
||||
static void Prj_ShowTableAllProjectsTxtField (struct Project *Prj,
|
||||
char *TxtField)
|
||||
{
|
||||
/***** Change format *****/
|
||||
Str_ChangeFormat (Str_FROM_HTML,Str_TO_RIGOROUS_HTML,
|
||||
TxtField,Cns_MAX_BYTES_TEXT,false); // Convert from HTML to recpectful HTML
|
||||
|
||||
/***** Write text *****/
|
||||
fprintf (Gbl.F.Out,"<td colspan=\"2\" class=\"LEFT_TOP COLOR%u %s\">"
|
||||
"%s"
|
||||
"</td>",
|
||||
Gbl.RowEvenOdd,
|
||||
Prj->Hidden ? "DAT_LIGHT" :
|
||||
"DAT",
|
||||
TxtField);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/************************* Show users row in a project ***********************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void Prj_ShowOneProjectUsrsRow (const struct Project *Prj,
|
||||
static void Prj_ShowOneProjectUsrs (const struct Project *Prj,
|
||||
Prj_ProjectView_t ProjectView,
|
||||
const char *Label,Prj_RoleInProject_t RoleInProject)
|
||||
{
|
||||
|
@ -595,6 +778,18 @@ static void Prj_ShowOneProjectUsrsRow (const struct Project *Prj,
|
|||
"</tr>");
|
||||
}
|
||||
|
||||
static void Prj_ShowTableAllProjectsUsrs (const struct Project *Prj,
|
||||
Prj_RoleInProject_t RoleInProject)
|
||||
{
|
||||
/***** Listing of users *****/
|
||||
fprintf (Gbl.F.Out,"<td class=\"LEFT_TOP COLOR%u %s\">",
|
||||
Gbl.RowEvenOdd,
|
||||
Prj->Hidden ? "DAT_LIGHT" :
|
||||
"DAT");
|
||||
Prj_WriteUsrs (Prj->PrjCod,Prj_LIST_PROJECTS,RoleInProject);
|
||||
fprintf (Gbl.F.Out,"</td>");
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/*************** Write list of users with a role in a project ****************/
|
||||
/*****************************************************************************/
|
||||
|
@ -1773,7 +1968,7 @@ static void Prj_RequestCreatOrEditPrj (long PrjCod)
|
|||
for (RoleInProject = Prj_ROLE_STD;
|
||||
RoleInProject <= Prj_ROLE_EVA;
|
||||
RoleInProject++)
|
||||
Prj_ShowOneProjectUsrsRow (&Prj,Prj_EDIT_ONE_PROJECT,
|
||||
Prj_ShowOneProjectUsrs (&Prj,Prj_EDIT_ONE_PROJECT,
|
||||
Txt_PROJECT_ROLES_PLURAL_Abc[RoleInProject],RoleInProject);
|
||||
Box_EndBoxTable ();
|
||||
}
|
||||
|
|
|
@ -87,6 +87,7 @@ typedef enum
|
|||
/*****************************************************************************/
|
||||
|
||||
void Prj_SeeProjects (void);
|
||||
void Prj_ShowTableAllProjects (void);
|
||||
void Prj_PrintOneProject (void);
|
||||
|
||||
void Prj_ReqAddStd (void);
|
||||
|
|
Loading…
Reference in New Issue