mirror of
https://github.com/acanas/swad-core.git
synced 2024-09-20 00:02:42 +02:00
Version19.134
This commit is contained in:
parent
9a496ec5fa
commit
2156852d42
|
@ -1028,14 +1028,15 @@ CREATE TABLE IF NOT EXISTS plugins (
|
|||
-- Table prg_grp: stores the groups associated to each program item
|
||||
--
|
||||
CREATE TABLE IF NOT EXISTS prg_grp (
|
||||
PrgIteCod INT NOT NULL,
|
||||
ItmCod INT NOT NULL,
|
||||
GrpCod INT NOT NULL,
|
||||
UNIQUE INDEX(PrgIteCod,GrpCod));
|
||||
UNIQUE INDEX(ItmCod,GrpCod));
|
||||
--
|
||||
-- Table prg_items: stores the items of the course program
|
||||
--
|
||||
CREATE TABLE IF NOT EXISTS prg_items (
|
||||
PrgIteCod INT NOT NULL AUTO_INCREMENT,
|
||||
ItmCod INT NOT NULL AUTO_INCREMENT,
|
||||
ItmInd INT NOT NULL DEFAULT 0,
|
||||
CrsCod INT NOT NULL DEFAULT -1,
|
||||
Hidden ENUM('N','Y') NOT NULL DEFAULT 'N',
|
||||
UsrCod INT NOT NULL,
|
||||
|
@ -1043,7 +1044,7 @@ CREATE TABLE IF NOT EXISTS prg_items (
|
|||
EndTime DATETIME NOT NULL,
|
||||
Title VARCHAR(2047) NOT NULL,
|
||||
Txt TEXT NOT NULL,
|
||||
UNIQUE INDEX(PrgIteCod),
|
||||
UNIQUE INDEX(ItmCod),
|
||||
INDEX(CrsCod,Hidden));
|
||||
--
|
||||
-- Table prj_config: stores the configuration of projects for each course
|
||||
|
|
|
@ -406,6 +406,8 @@ const struct Act_Actions Act_Actions[Act_NUM_ACTIONS] =
|
|||
[ActRemPrgIte ] = {1828,-1,TabUnk,ActSeePrg ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Prg_RemovePrgItem ,NULL},
|
||||
[ActHidPrgIte ] = {1829,-1,TabUnk,ActSeePrg ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Prg_HidePrgItem ,NULL},
|
||||
[ActShoPrgIte ] = {1830,-1,TabUnk,ActSeePrg ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Prg_ShowPrgItem ,NULL},
|
||||
[ActUp_PrgIte ] = {1831,-1,TabUnk,ActSeePrg ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Prg_MoveUpPrgItem ,NULL},
|
||||
[ActDwnPrgIte ] = {1832,-1,TabUnk,ActSeePrg ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Prg_MoveDownPrgItem ,NULL},
|
||||
|
||||
[ActEdiTchGui ] = { 785,-1,TabUnk,ActSeeTchGui ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Inf_FormsToSelSendInfo ,NULL},
|
||||
|
||||
|
@ -3556,6 +3558,8 @@ Act_Action_t Act_FromActCodToAction[1 + Act_MAX_ACTION_COD] = // Do not reuse un
|
|||
ActRemPrgIte, // #1828
|
||||
ActHidPrgIte, // #1829
|
||||
ActShoPrgIte, // #1830
|
||||
ActUp_PrgIte, // #1832
|
||||
ActDwnPrgIte, // #1833
|
||||
};
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
196
swad_action.h
196
swad_action.h
|
@ -64,7 +64,7 @@ typedef enum
|
|||
|
||||
typedef signed int Act_Action_t; // Must be a signed type, because -1 is used to indicate obsolete action
|
||||
|
||||
#define Act_MAX_ACTION_COD 1830
|
||||
#define Act_MAX_ACTION_COD 1832
|
||||
|
||||
#define Act_MAX_OPTIONS_IN_MENU_PER_TAB 13
|
||||
|
||||
|
@ -392,107 +392,109 @@ typedef signed int Act_Action_t; // Must be a signed type, because -1 is used to
|
|||
#define ActRemPrgIte (ActChgCrsSta + 21)
|
||||
#define ActHidPrgIte (ActChgCrsSta + 22)
|
||||
#define ActShoPrgIte (ActChgCrsSta + 23)
|
||||
#define ActEdiTchGui (ActChgCrsSta + 24)
|
||||
#define ActSeeSylLec (ActChgCrsSta + 25)
|
||||
#define ActSeeSylPra (ActChgCrsSta + 26)
|
||||
#define ActEdiSylLec (ActChgCrsSta + 27)
|
||||
#define ActEdiSylPra (ActChgCrsSta + 28)
|
||||
#define ActDelItmSylLec (ActChgCrsSta + 29)
|
||||
#define ActDelItmSylPra (ActChgCrsSta + 30)
|
||||
#define ActUp_IteSylLec (ActChgCrsSta + 31)
|
||||
#define ActUp_IteSylPra (ActChgCrsSta + 32)
|
||||
#define ActDwnIteSylLec (ActChgCrsSta + 33)
|
||||
#define ActDwnIteSylPra (ActChgCrsSta + 34)
|
||||
#define ActRgtIteSylLec (ActChgCrsSta + 35)
|
||||
#define ActRgtIteSylPra (ActChgCrsSta + 36)
|
||||
#define ActLftIteSylLec (ActChgCrsSta + 37)
|
||||
#define ActLftIteSylPra (ActChgCrsSta + 38)
|
||||
#define ActInsIteSylLec (ActChgCrsSta + 39)
|
||||
#define ActInsIteSylPra (ActChgCrsSta + 40)
|
||||
#define ActModIteSylLec (ActChgCrsSta + 41)
|
||||
#define ActModIteSylPra (ActChgCrsSta + 42)
|
||||
#define ActUp_PrgIte (ActChgCrsSta + 24)
|
||||
#define ActDwnPrgIte (ActChgCrsSta + 25)
|
||||
#define ActEdiTchGui (ActChgCrsSta + 26)
|
||||
#define ActSeeSylLec (ActChgCrsSta + 27)
|
||||
#define ActSeeSylPra (ActChgCrsSta + 28)
|
||||
#define ActEdiSylLec (ActChgCrsSta + 29)
|
||||
#define ActEdiSylPra (ActChgCrsSta + 30)
|
||||
#define ActDelItmSylLec (ActChgCrsSta + 31)
|
||||
#define ActDelItmSylPra (ActChgCrsSta + 32)
|
||||
#define ActUp_IteSylLec (ActChgCrsSta + 33)
|
||||
#define ActUp_IteSylPra (ActChgCrsSta + 34)
|
||||
#define ActDwnIteSylLec (ActChgCrsSta + 35)
|
||||
#define ActDwnIteSylPra (ActChgCrsSta + 36)
|
||||
#define ActRgtIteSylLec (ActChgCrsSta + 37)
|
||||
#define ActRgtIteSylPra (ActChgCrsSta + 38)
|
||||
#define ActLftIteSylLec (ActChgCrsSta + 39)
|
||||
#define ActLftIteSylPra (ActChgCrsSta + 40)
|
||||
#define ActInsIteSylLec (ActChgCrsSta + 41)
|
||||
#define ActInsIteSylPra (ActChgCrsSta + 42)
|
||||
#define ActModIteSylLec (ActChgCrsSta + 43)
|
||||
#define ActModIteSylPra (ActChgCrsSta + 44)
|
||||
|
||||
#define ActEdiBib (ActChgCrsSta + 43)
|
||||
#define ActEdiFAQ (ActChgCrsSta + 44)
|
||||
#define ActEdiCrsLnk (ActChgCrsSta + 45)
|
||||
#define ActEdiBib (ActChgCrsSta + 45)
|
||||
#define ActEdiFAQ (ActChgCrsSta + 46)
|
||||
#define ActEdiCrsLnk (ActChgCrsSta + 47)
|
||||
|
||||
#define ActChgFrcReaCrsInf (ActChgCrsSta + 46)
|
||||
#define ActChgFrcReaTchGui (ActChgCrsSta + 47)
|
||||
#define ActChgFrcReaSylLec (ActChgCrsSta + 48)
|
||||
#define ActChgFrcReaSylPra (ActChgCrsSta + 49)
|
||||
#define ActChgFrcReaBib (ActChgCrsSta + 50)
|
||||
#define ActChgFrcReaFAQ (ActChgCrsSta + 51)
|
||||
#define ActChgFrcReaCrsLnk (ActChgCrsSta + 52)
|
||||
#define ActChgFrcReaCrsInf (ActChgCrsSta + 48)
|
||||
#define ActChgFrcReaTchGui (ActChgCrsSta + 49)
|
||||
#define ActChgFrcReaSylLec (ActChgCrsSta + 50)
|
||||
#define ActChgFrcReaSylPra (ActChgCrsSta + 51)
|
||||
#define ActChgFrcReaBib (ActChgCrsSta + 52)
|
||||
#define ActChgFrcReaFAQ (ActChgCrsSta + 53)
|
||||
#define ActChgFrcReaCrsLnk (ActChgCrsSta + 54)
|
||||
|
||||
#define ActChgHavReaCrsInf (ActChgCrsSta + 53)
|
||||
#define ActChgHavReaTchGui (ActChgCrsSta + 54)
|
||||
#define ActChgHavReaSylLec (ActChgCrsSta + 55)
|
||||
#define ActChgHavReaSylPra (ActChgCrsSta + 56)
|
||||
#define ActChgHavReaBib (ActChgCrsSta + 57)
|
||||
#define ActChgHavReaFAQ (ActChgCrsSta + 58)
|
||||
#define ActChgHavReaCrsLnk (ActChgCrsSta + 59)
|
||||
#define ActChgHavReaCrsInf (ActChgCrsSta + 55)
|
||||
#define ActChgHavReaTchGui (ActChgCrsSta + 56)
|
||||
#define ActChgHavReaSylLec (ActChgCrsSta + 57)
|
||||
#define ActChgHavReaSylPra (ActChgCrsSta + 58)
|
||||
#define ActChgHavReaBib (ActChgCrsSta + 59)
|
||||
#define ActChgHavReaFAQ (ActChgCrsSta + 60)
|
||||
#define ActChgHavReaCrsLnk (ActChgCrsSta + 61)
|
||||
|
||||
#define ActSelInfSrcCrsInf (ActChgCrsSta + 60)
|
||||
#define ActSelInfSrcTchGui (ActChgCrsSta + 61)
|
||||
#define ActSelInfSrcSylLec (ActChgCrsSta + 62)
|
||||
#define ActSelInfSrcSylPra (ActChgCrsSta + 63)
|
||||
#define ActSelInfSrcBib (ActChgCrsSta + 64)
|
||||
#define ActSelInfSrcFAQ (ActChgCrsSta + 65)
|
||||
#define ActSelInfSrcCrsLnk (ActChgCrsSta + 66)
|
||||
#define ActRcvURLCrsInf (ActChgCrsSta + 67)
|
||||
#define ActRcvURLTchGui (ActChgCrsSta + 68)
|
||||
#define ActRcvURLSylLec (ActChgCrsSta + 69)
|
||||
#define ActRcvURLSylPra (ActChgCrsSta + 70)
|
||||
#define ActRcvURLBib (ActChgCrsSta + 71)
|
||||
#define ActRcvURLFAQ (ActChgCrsSta + 72)
|
||||
#define ActRcvURLCrsLnk (ActChgCrsSta + 73)
|
||||
#define ActRcvPagCrsInf (ActChgCrsSta + 74)
|
||||
#define ActRcvPagTchGui (ActChgCrsSta + 75)
|
||||
#define ActRcvPagSylLec (ActChgCrsSta + 76)
|
||||
#define ActRcvPagSylPra (ActChgCrsSta + 77)
|
||||
#define ActRcvPagBib (ActChgCrsSta + 78)
|
||||
#define ActRcvPagFAQ (ActChgCrsSta + 79)
|
||||
#define ActRcvPagCrsLnk (ActChgCrsSta + 80)
|
||||
#define ActEditorCrsInf (ActChgCrsSta + 81)
|
||||
#define ActEditorTchGui (ActChgCrsSta + 82)
|
||||
#define ActEditorSylLec (ActChgCrsSta + 83)
|
||||
#define ActEditorSylPra (ActChgCrsSta + 84)
|
||||
#define ActEditorBib (ActChgCrsSta + 85)
|
||||
#define ActEditorFAQ (ActChgCrsSta + 86)
|
||||
#define ActEditorCrsLnk (ActChgCrsSta + 87)
|
||||
#define ActPlaTxtEdiCrsInf (ActChgCrsSta + 88)
|
||||
#define ActPlaTxtEdiTchGui (ActChgCrsSta + 89)
|
||||
#define ActPlaTxtEdiSylLec (ActChgCrsSta + 90)
|
||||
#define ActPlaTxtEdiSylPra (ActChgCrsSta + 91)
|
||||
#define ActPlaTxtEdiBib (ActChgCrsSta + 92)
|
||||
#define ActPlaTxtEdiFAQ (ActChgCrsSta + 93)
|
||||
#define ActPlaTxtEdiCrsLnk (ActChgCrsSta + 94)
|
||||
#define ActRchTxtEdiCrsInf (ActChgCrsSta + 95)
|
||||
#define ActRchTxtEdiTchGui (ActChgCrsSta + 96)
|
||||
#define ActRchTxtEdiSylLec (ActChgCrsSta + 97)
|
||||
#define ActRchTxtEdiSylPra (ActChgCrsSta + 98)
|
||||
#define ActRchTxtEdiBib (ActChgCrsSta + 99)
|
||||
#define ActRchTxtEdiFAQ (ActChgCrsSta + 100)
|
||||
#define ActRchTxtEdiCrsLnk (ActChgCrsSta + 101)
|
||||
#define ActRcvPlaTxtCrsInf (ActChgCrsSta + 102)
|
||||
#define ActRcvPlaTxtTchGui (ActChgCrsSta + 103)
|
||||
#define ActRcvPlaTxtSylLec (ActChgCrsSta + 104)
|
||||
#define ActRcvPlaTxtSylPra (ActChgCrsSta + 105)
|
||||
#define ActRcvPlaTxtBib (ActChgCrsSta + 106)
|
||||
#define ActRcvPlaTxtFAQ (ActChgCrsSta + 107)
|
||||
#define ActRcvPlaTxtCrsLnk (ActChgCrsSta + 108)
|
||||
#define ActRcvRchTxtCrsInf (ActChgCrsSta + 109)
|
||||
#define ActRcvRchTxtTchGui (ActChgCrsSta + 110)
|
||||
#define ActRcvRchTxtSylLec (ActChgCrsSta + 111)
|
||||
#define ActRcvRchTxtSylPra (ActChgCrsSta + 112)
|
||||
#define ActRcvRchTxtBib (ActChgCrsSta + 113)
|
||||
#define ActRcvRchTxtFAQ (ActChgCrsSta + 114)
|
||||
#define ActRcvRchTxtCrsLnk (ActChgCrsSta + 115)
|
||||
#define ActSelInfSrcCrsInf (ActChgCrsSta + 62)
|
||||
#define ActSelInfSrcTchGui (ActChgCrsSta + 63)
|
||||
#define ActSelInfSrcSylLec (ActChgCrsSta + 64)
|
||||
#define ActSelInfSrcSylPra (ActChgCrsSta + 65)
|
||||
#define ActSelInfSrcBib (ActChgCrsSta + 66)
|
||||
#define ActSelInfSrcFAQ (ActChgCrsSta + 67)
|
||||
#define ActSelInfSrcCrsLnk (ActChgCrsSta + 68)
|
||||
#define ActRcvURLCrsInf (ActChgCrsSta + 69)
|
||||
#define ActRcvURLTchGui (ActChgCrsSta + 70)
|
||||
#define ActRcvURLSylLec (ActChgCrsSta + 71)
|
||||
#define ActRcvURLSylPra (ActChgCrsSta + 72)
|
||||
#define ActRcvURLBib (ActChgCrsSta + 73)
|
||||
#define ActRcvURLFAQ (ActChgCrsSta + 74)
|
||||
#define ActRcvURLCrsLnk (ActChgCrsSta + 75)
|
||||
#define ActRcvPagCrsInf (ActChgCrsSta + 76)
|
||||
#define ActRcvPagTchGui (ActChgCrsSta + 77)
|
||||
#define ActRcvPagSylLec (ActChgCrsSta + 78)
|
||||
#define ActRcvPagSylPra (ActChgCrsSta + 79)
|
||||
#define ActRcvPagBib (ActChgCrsSta + 80)
|
||||
#define ActRcvPagFAQ (ActChgCrsSta + 81)
|
||||
#define ActRcvPagCrsLnk (ActChgCrsSta + 82)
|
||||
#define ActEditorCrsInf (ActChgCrsSta + 83)
|
||||
#define ActEditorTchGui (ActChgCrsSta + 84)
|
||||
#define ActEditorSylLec (ActChgCrsSta + 85)
|
||||
#define ActEditorSylPra (ActChgCrsSta + 86)
|
||||
#define ActEditorBib (ActChgCrsSta + 87)
|
||||
#define ActEditorFAQ (ActChgCrsSta + 88)
|
||||
#define ActEditorCrsLnk (ActChgCrsSta + 89)
|
||||
#define ActPlaTxtEdiCrsInf (ActChgCrsSta + 90)
|
||||
#define ActPlaTxtEdiTchGui (ActChgCrsSta + 91)
|
||||
#define ActPlaTxtEdiSylLec (ActChgCrsSta + 92)
|
||||
#define ActPlaTxtEdiSylPra (ActChgCrsSta + 93)
|
||||
#define ActPlaTxtEdiBib (ActChgCrsSta + 94)
|
||||
#define ActPlaTxtEdiFAQ (ActChgCrsSta + 95)
|
||||
#define ActPlaTxtEdiCrsLnk (ActChgCrsSta + 96)
|
||||
#define ActRchTxtEdiCrsInf (ActChgCrsSta + 97)
|
||||
#define ActRchTxtEdiTchGui (ActChgCrsSta + 98)
|
||||
#define ActRchTxtEdiSylLec (ActChgCrsSta + 99)
|
||||
#define ActRchTxtEdiSylPra (ActChgCrsSta + 100)
|
||||
#define ActRchTxtEdiBib (ActChgCrsSta + 101)
|
||||
#define ActRchTxtEdiFAQ (ActChgCrsSta + 102)
|
||||
#define ActRchTxtEdiCrsLnk (ActChgCrsSta + 103)
|
||||
#define ActRcvPlaTxtCrsInf (ActChgCrsSta + 104)
|
||||
#define ActRcvPlaTxtTchGui (ActChgCrsSta + 105)
|
||||
#define ActRcvPlaTxtSylLec (ActChgCrsSta + 106)
|
||||
#define ActRcvPlaTxtSylPra (ActChgCrsSta + 107)
|
||||
#define ActRcvPlaTxtBib (ActChgCrsSta + 108)
|
||||
#define ActRcvPlaTxtFAQ (ActChgCrsSta + 109)
|
||||
#define ActRcvPlaTxtCrsLnk (ActChgCrsSta + 110)
|
||||
#define ActRcvRchTxtCrsInf (ActChgCrsSta + 111)
|
||||
#define ActRcvRchTxtTchGui (ActChgCrsSta + 112)
|
||||
#define ActRcvRchTxtSylLec (ActChgCrsSta + 113)
|
||||
#define ActRcvRchTxtSylPra (ActChgCrsSta + 114)
|
||||
#define ActRcvRchTxtBib (ActChgCrsSta + 115)
|
||||
#define ActRcvRchTxtFAQ (ActChgCrsSta + 116)
|
||||
#define ActRcvRchTxtCrsLnk (ActChgCrsSta + 117)
|
||||
|
||||
#define ActPrnCrsTT (ActChgCrsSta + 116)
|
||||
#define ActEdiCrsTT (ActChgCrsSta + 117)
|
||||
#define ActChgCrsTT (ActChgCrsSta + 118)
|
||||
#define ActChgCrsTT1stDay (ActChgCrsSta + 119)
|
||||
#define ActPrnCrsTT (ActChgCrsSta + 118)
|
||||
#define ActEdiCrsTT (ActChgCrsSta + 119)
|
||||
#define ActChgCrsTT (ActChgCrsSta + 120)
|
||||
#define ActChgCrsTT1stDay (ActChgCrsSta + 121)
|
||||
|
||||
/*****************************************************************************/
|
||||
/***************************** Assessment tab ********************************/
|
||||
|
|
|
@ -497,7 +497,7 @@ enscript -2 --landscape --color --file-align=2 --highlight --line-numbers -o - *
|
|||
En OpenSWAD:
|
||||
ps2pdf source.ps destination.pdf
|
||||
*/
|
||||
#define Log_PLATFORM_VERSION "SWAD 19.133.1 (2020-02-25)"
|
||||
#define Log_PLATFORM_VERSION "SWAD 19.134 (2020-02-26)"
|
||||
#define CSS_FILE "swad19.133.1.css"
|
||||
#define JS_FILE "swad19.91.1.js"
|
||||
/*
|
||||
|
@ -522,6 +522,16 @@ Param
|
|||
// TODO: En la lista de conectados central, poner el logo de la institución a la que pertenece el usuario
|
||||
// TODO: Miguel Damas: por defecto, marcar "Permitir que los profesores..." en los test (que ya esté marcado en lugar de desmarcado)
|
||||
// TODO: Si el alumno ha marcado "Permitir que los profesores...", entonces pedir confirmación al pulsar el botón azul, para evitar que se envíe por error antes de tiempo
|
||||
// TODO: Order program items on indexes
|
||||
|
||||
Version 19.134: Feb 26, 2020 Move up and down a course program item. Not finished. (281991 lines)
|
||||
5 changes necessary in database:
|
||||
ALTER TABLE prg_items CHANGE COLUMN PrgIteCod ItmCod INT NOT NULL AUTO_INCREMENT;
|
||||
ALTER TABLE prg_items ADD COLUMN ItmInd INT NOT NULL DEFAULT 0 AFTER ItmCod;
|
||||
ALTER TABLE prg_grp CHANGE COLUMN PrgIteCod ItmCod INT NOT NULL;
|
||||
Only if you use MyISAM:
|
||||
ALTER TABLE prg_items ENGINE=MyISAM;
|
||||
ALTER TABLE prg_grp ENGINE=MyISAM;
|
||||
|
||||
Version 19.133.1: Feb 25, 2020 Changes in layout of tabs. (281610 lines)
|
||||
Version 19.133: Feb 25, 2020 Removed icon to print a course program item.
|
||||
|
|
|
@ -2191,18 +2191,18 @@ mysql> DESCRIBE plugins;
|
|||
/***** Table prg_grp *****/
|
||||
/*
|
||||
mysql> DESCRIBE prg_grp;
|
||||
+-----------+---------+------+-----+---------+-------+
|
||||
| Field | Type | Null | Key | Default | Extra |
|
||||
+-----------+---------+------+-----+---------+-------+
|
||||
| PrgIteCod | int(11) | NO | PRI | NULL | |
|
||||
| GrpCod | int(11) | NO | PRI | NULL | |
|
||||
+-----------+---------+------+-----+---------+-------+
|
||||
2 rows in set (0.06 sec)
|
||||
+--------+---------+------+-----+---------+-------+
|
||||
| Field | Type | Null | Key | Default | Extra |
|
||||
+--------+---------+------+-----+---------+-------+
|
||||
| ItmCod | int(11) | NO | PRI | NULL | |
|
||||
| GrpCod | int(11) | NO | PRI | NULL | |
|
||||
+--------+---------+------+-----+---------+-------+
|
||||
2 rows in set (0.00 sec)
|
||||
*/
|
||||
DB_CreateTable ("CREATE TABLE IF NOT EXISTS prg_grp ("
|
||||
"PrgIteCod INT NOT NULL,"
|
||||
"ItmCod INT NOT NULL,"
|
||||
"GrpCod INT NOT NULL,"
|
||||
"UNIQUE INDEX(PrgIteCod,GrpCod))");
|
||||
"UNIQUE INDEX(ItmCod,GrpCod))");
|
||||
|
||||
/***** Table prg_items *****/
|
||||
/*
|
||||
|
@ -2210,7 +2210,8 @@ mysql> DESCRIBE prg_items;
|
|||
+-----------+---------------+------+-----+---------+----------------+
|
||||
| Field | Type | Null | Key | Default | Extra |
|
||||
+-----------+---------------+------+-----+---------+----------------+
|
||||
| PrgIteCod | int(11) | NO | PRI | NULL | auto_increment |
|
||||
| ItmCod | int(11) | NO | PRI | NULL | auto_increment |
|
||||
| ItmInd | int(11) | NO | | 0 | |
|
||||
| CrsCod | int(11) | NO | MUL | -1 | |
|
||||
| Hidden | enum('N','Y') | NO | | N | |
|
||||
| UsrCod | int(11) | NO | | NULL | |
|
||||
|
@ -2219,10 +2220,11 @@ mysql> DESCRIBE prg_items;
|
|||
| Title | varchar(2047) | NO | | NULL | |
|
||||
| Txt | text | NO | | NULL | |
|
||||
+-----------+---------------+------+-----+---------+----------------+
|
||||
8 rows in set (0.01 sec)
|
||||
9 rows in set (0.01 sec)
|
||||
*/
|
||||
DB_CreateTable ("CREATE TABLE IF NOT EXISTS prg_items ("
|
||||
"PrgIteCod INT NOT NULL AUTO_INCREMENT,"
|
||||
"ItmCod INT NOT NULL AUTO_INCREMENT,"
|
||||
"ItmInd INT NOT NULL DEFAULT 0,"
|
||||
"CrsCod INT NOT NULL DEFAULT -1,"
|
||||
"Hidden ENUM('N','Y') NOT NULL DEFAULT 'N',"
|
||||
"UsrCod INT NOT NULL,"
|
||||
|
@ -2230,7 +2232,7 @@ mysql> DESCRIBE prg_items;
|
|||
"EndTime DATETIME NOT NULL,"
|
||||
"Title VARCHAR(2047) NOT NULL," // Prg_MAX_BYTES_PROGRAM_ITEM_TITLE
|
||||
"Txt TEXT NOT NULL," // Cns_MAX_BYTES_TEXT
|
||||
"UNIQUE INDEX(PrgIteCod),"
|
||||
"UNIQUE INDEX(ItmCod),"
|
||||
"INDEX(CrsCod,Hidden))");
|
||||
|
||||
/***** Table prj_config *****/
|
||||
|
|
|
@ -2956,8 +2956,8 @@ static void Fig_GetAndShowCourseProgramStats (void) // TODO: Change function fro
|
|||
double NumPrgItemsPerCourse = 0.0;
|
||||
|
||||
/***** Get the number of program items from this location *****/
|
||||
if ((NumPrgItems = Prg_GetNumPrgItems (Gbl.Scope.Current)))
|
||||
if ((NumCoursesWithPrgItems = Prg_GetNumCoursesWithPrgItems (Gbl.Scope.Current)) != 0)
|
||||
if ((NumPrgItems = Prg_GetNumItems (Gbl.Scope.Current)))
|
||||
if ((NumCoursesWithPrgItems = Prg_GetNumCoursesWithItems (Gbl.Scope.Current)) != 0)
|
||||
NumPrgItemsPerCourse = (double) NumPrgItems /
|
||||
(double) NumCoursesWithPrgItems;
|
||||
|
||||
|
|
63
swad_game.c
63
swad_game.c
|
@ -125,6 +125,8 @@ static void Gam_WriteAuthor (struct Game *Game);
|
|||
static void Gam_PutFormsToRemEditOneGame (const struct Game *Game,
|
||||
const char *Anchor);
|
||||
|
||||
static long Gam_GetCurrentGamCod (void);
|
||||
static void Gam_PutParamsOneQst (void);
|
||||
static void Gam_PutParamCurrentGamCod (void);
|
||||
static void Gam_PutHiddenParamOrder (void);
|
||||
static void Gam_GetParamOrder (void);
|
||||
|
@ -156,15 +158,11 @@ static void Gam_AllocateListSelectedQuestions (void);
|
|||
static void Gam_FreeListsSelectedQuestions (void);
|
||||
static unsigned Gam_CountNumQuestionsInList (void);
|
||||
|
||||
static void Gam_PutParamsOneQst (void);
|
||||
|
||||
static void Gam_ExchangeQuestions (long GamCod,
|
||||
unsigned QstIndTop,unsigned QstIndBottom);
|
||||
|
||||
static bool Gam_CheckIfEditable (const struct Game *Game);
|
||||
|
||||
static long Gam_GetCurrentGamCod (void);
|
||||
|
||||
/*****************************************************************************/
|
||||
/***************************** List all games ********************************/
|
||||
/*****************************************************************************/
|
||||
|
@ -653,6 +651,30 @@ static void Gam_PutFormsToRemEditOneGame (const struct Game *Game,
|
|||
Ico_PutContextualIconToEdit (ActEdiOneGam,Gam_PutParams);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/**************** Access to variable used to pass parameter ******************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Gam_SetCurrentGamCod (long GamCod)
|
||||
{
|
||||
Gam_CurrentGamCod = GamCod;
|
||||
}
|
||||
|
||||
static long Gam_GetCurrentGamCod (void)
|
||||
{
|
||||
return Gam_CurrentGamCod;
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/**************** Put parameter to move/remove one question ******************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void Gam_PutParamsOneQst (void)
|
||||
{
|
||||
Gam_PutParams ();
|
||||
Gam_PutParamQstInd (Gam_CurrentQstInd);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/*********************** Params used to edit a game **************************/
|
||||
/*****************************************************************************/
|
||||
|
@ -1651,7 +1673,7 @@ long Gam_GetQstCodFromQstInd (long GamCod,unsigned QstInd)
|
|||
"SELECT QstCod FROM gam_questions"
|
||||
" WHERE GamCod=%ld AND QstInd=%u",
|
||||
GamCod,QstInd))
|
||||
Lay_ShowErrorAndExit ("Error: wrong question code.");
|
||||
Lay_ShowErrorAndExit ("Error: wrong question index.");
|
||||
|
||||
/***** Get question code (row[0]) *****/
|
||||
row = mysql_fetch_row (mysql_res);
|
||||
|
@ -1678,7 +1700,9 @@ static unsigned Gam_GetMaxQuestionIndexInGame (long GamCod)
|
|||
|
||||
/***** Get maximum question index in a game from database *****/
|
||||
DB_QuerySELECT (&mysql_res,"can not get last question index",
|
||||
"SELECT MAX(QstInd) FROM gam_questions WHERE GamCod=%ld",
|
||||
"SELECT MAX(QstInd)"
|
||||
" FROM gam_questions"
|
||||
" WHERE GamCod=%ld",
|
||||
GamCod);
|
||||
row = mysql_fetch_row (mysql_res);
|
||||
if (row[0]) // There are questions
|
||||
|
@ -1735,7 +1759,7 @@ unsigned Gam_GetNextQuestionIndexInGame (long GamCod,unsigned QstInd)
|
|||
{
|
||||
MYSQL_RES *mysql_res;
|
||||
MYSQL_ROW row;
|
||||
unsigned NextQstInd = Mch_AFTER_LAST_QUESTION; // End of questions has been reached
|
||||
unsigned NextQstInd = 0;
|
||||
|
||||
/***** Get next question index in a game from database *****/
|
||||
// Although indexes are always continuous...
|
||||
|
@ -2127,16 +2151,6 @@ static unsigned Gam_CountNumQuestionsInList (void)
|
|||
return NumQuestions;
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/**************** Put parameter to move/remove one question ******************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void Gam_PutParamsOneQst (void)
|
||||
{
|
||||
Gam_PutParams ();
|
||||
Gam_PutParamQstInd (Gam_CurrentQstInd);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/********************** Request the removal of a question ********************/
|
||||
/*****************************************************************************/
|
||||
|
@ -2393,7 +2407,6 @@ static void Gam_ExchangeQuestions (long GamCod,
|
|||
"UNLOCK TABLES");
|
||||
}
|
||||
|
||||
|
||||
/*****************************************************************************/
|
||||
/*********** Get number of matches and check is edition is possible **********/
|
||||
/*****************************************************************************/
|
||||
|
@ -2727,20 +2740,6 @@ void Gam_ShowTstTagsPresentInAGame (long GamCod)
|
|||
DB_FreeMySQLResult (&mysql_res);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/**************** Access to variable used to pass parameter ******************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Gam_SetCurrentGamCod (long GamCod)
|
||||
{
|
||||
Gam_CurrentGamCod = GamCod;
|
||||
}
|
||||
|
||||
static long Gam_GetCurrentGamCod (void)
|
||||
{
|
||||
return Gam_CurrentGamCod;
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/*************** Get maximum score of a game from database *******************/
|
||||
/*****************************************************************************/
|
||||
|
|
|
@ -93,6 +93,7 @@ void Gam_ShowOnlyOneGameEnd (void);
|
|||
void Gam_PutHiddenParamGameOrder (void);
|
||||
void Gam_RequestCreatOrEditGame (void);
|
||||
|
||||
void Gam_SetCurrentGamCod (long GamCod);
|
||||
void Gam_PutParams (void);
|
||||
void Gam_PutParamGameCod (long GamCod);
|
||||
long Gam_GetParamGameCod (void);
|
||||
|
@ -142,8 +143,6 @@ double Gam_GetNumQstsPerCrsGame (Hie_Level_t Scope);
|
|||
|
||||
void Gam_ShowTstTagsPresentInAGame (long GamCod);
|
||||
|
||||
void Gam_SetCurrentGamCod (long GamCod);
|
||||
|
||||
void Gam_GetScoreRange (long GamCod,double *MinScore,double *MaxScore);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -299,7 +299,7 @@ void Gbl_InitializeGlobals (void)
|
|||
|
||||
Gbl.Prg.LstIsRead = false; // List is not read
|
||||
Gbl.Prg.Num = 0;
|
||||
Gbl.Prg.LstPrgIteCods = NULL;
|
||||
Gbl.Prg.LstItmCods = NULL;
|
||||
Gbl.Prg.SelectedOrder = Prg_ORDER_DEFAULT;
|
||||
|
||||
Gbl.Asgs.LstIsRead = false; // List is not read
|
||||
|
|
|
@ -541,10 +541,10 @@ struct Globals
|
|||
struct
|
||||
{
|
||||
bool LstIsRead; // Is the list already read from database, or it needs to be read?
|
||||
unsigned Num; // Number of schedule items
|
||||
long *LstPrgIteCods; // List of schedule items codes
|
||||
unsigned Num; // Number of items
|
||||
long *LstItmCods; // List of items codes
|
||||
Dat_StartEndTime_t SelectedOrder;
|
||||
long PrgIteCodToEdit; // Used as parameter in contextual links
|
||||
// long ItmCodToEdit; // Used as parameter in contextual links
|
||||
unsigned CurrentPage;
|
||||
} Prg;
|
||||
struct
|
||||
|
|
|
@ -42,6 +42,7 @@
|
|||
#include "swad_match.h"
|
||||
#include "swad_notification.h"
|
||||
#include "swad_parameter.h"
|
||||
#include "swad_program.h"
|
||||
#include "swad_project.h"
|
||||
#include "swad_setting.h"
|
||||
|
||||
|
@ -1688,9 +1689,12 @@ void Grp_ListGrpsToEditAsgAttSvyMch (struct GroupType *GrpTyp,long Cod,
|
|||
IBelongToThisGroup = Grp_CheckIfGrpIsInList (Grp->GrpCod,&LstGrpsIBelong);
|
||||
|
||||
AssociatedToGrp = false;
|
||||
if (Cod > 0) // Cod == -1L means new assignment or survey
|
||||
if (Cod > 0) // Cod == -1L means new item, assignment, event, survey or match
|
||||
switch (Grp_AsgAttOrSvy)
|
||||
{
|
||||
case Grp_PROGRAM_ITEM:
|
||||
AssociatedToGrp = Prg_CheckIfItemIsAssociatedToGrp (Cod,Grp->GrpCod);
|
||||
break;
|
||||
case Grp_ASSIGNMENT:
|
||||
AssociatedToGrp = Asg_CheckIfAsgIsAssociatedToGrp (Cod,Grp->GrpCod);
|
||||
break;
|
||||
|
|
|
@ -134,6 +134,7 @@ typedef enum
|
|||
|
||||
typedef enum
|
||||
{
|
||||
Grp_PROGRAM_ITEM,
|
||||
Grp_ASSIGNMENT,
|
||||
Grp_ATT_EVENT,
|
||||
Grp_SURVEY,
|
||||
|
|
981
swad_program.c
981
swad_program.c
File diff suppressed because it is too large
Load Diff
|
@ -41,7 +41,8 @@
|
|||
|
||||
struct ProgramItem
|
||||
{
|
||||
long PrgIteCod;
|
||||
long ItmCod;
|
||||
unsigned ItmInd;
|
||||
bool Hidden;
|
||||
long UsrCod;
|
||||
time_t TimeUTC[Dat_NUM_START_END_TIME];
|
||||
|
@ -64,26 +65,24 @@ void Prg_SeeCourseProgram (void);
|
|||
void Prg_PutHiddenParamPrgOrder (void);
|
||||
void Prg_RequestCreatOrEditPrgItem (void);
|
||||
void Prg_GetListPrgItems (void);
|
||||
void Prg_GetDataOfPrgItemByCod (struct ProgramItem *PrgItem);
|
||||
void Prg_FreeListPrgItems (void);
|
||||
void Prg_GetDataOfItemByCod (struct ProgramItem *PrgItem);
|
||||
void Prg_FreeListItems (void);
|
||||
|
||||
void Prg_GetNotifPrgItem (char SummaryStr[Ntf_MAX_BYTES_SUMMARY + 1],
|
||||
char **ContentStr,
|
||||
long PrgIteCod,bool GetContent);
|
||||
|
||||
long Prg_GetParamPrgItemCod (void);
|
||||
long Prg_GetParamItemCode (void);
|
||||
void Prg_ReqRemPrgItem (void);
|
||||
void Prg_RemovePrgItem (void);
|
||||
void Prg_HidePrgItem (void);
|
||||
void Prg_ShowPrgItem (void);
|
||||
void Prg_MoveUpPrgItem (void);
|
||||
void Prg_MoveDownPrgItem (void);
|
||||
void Prg_RecFormPrgItem (void);
|
||||
bool Prg_CheckIfPrgItemIsAssociatedToGrp (long PrgIteCod,long GrpCod);
|
||||
bool Prg_CheckIfItemIsAssociatedToGrp (long PrgIteCod,long GrpCod);
|
||||
void Prg_RemoveGroup (long GrpCod);
|
||||
void Prg_RemoveGroupsOfType (long GrpTypCod);
|
||||
void Prg_RemoveCrsPrgItems (long CrsCod);
|
||||
unsigned Prg_GetNumPrgItemsInCrs(long CrsCod);
|
||||
void Prg_RemoveCrsItems (long CrsCod);
|
||||
unsigned Prg_GetNumItemsInCrsProgram(long CrsCod);
|
||||
|
||||
unsigned Prg_GetNumCoursesWithPrgItems (Hie_Level_t Scope);
|
||||
unsigned Prg_GetNumPrgItems (Hie_Level_t Scope);
|
||||
unsigned Prg_GetNumCoursesWithItems (Hie_Level_t Scope);
|
||||
unsigned Prg_GetNumItems (Hie_Level_t Scope);
|
||||
|
||||
#endif
|
||||
|
|
71
swad_text.c
71
swad_text.c
|
@ -17234,23 +17234,44 @@ const char *Txt_Item =
|
|||
#if L==1 // ca
|
||||
"Ítem";
|
||||
#elif L==2 // de
|
||||
"Artikel";
|
||||
"Programmelement";
|
||||
#elif L==3 // en
|
||||
"Item";
|
||||
#elif L==4 // es
|
||||
"Ítem";
|
||||
#elif L==5 // fr
|
||||
"Article";
|
||||
"Élément";
|
||||
#elif L==6 // gn
|
||||
"Ítem"; // Okoteve traducción
|
||||
#elif L==7 // it
|
||||
"Articolo";
|
||||
"Elemento";
|
||||
#elif L==8 // pl
|
||||
"Pozycja";
|
||||
#elif L==9 // pt
|
||||
"Item";
|
||||
#endif
|
||||
|
||||
const char *Txt_Item_X_removed = // Warning: it is very important to include %s in the following sentences
|
||||
#if L==1 // ca
|
||||
"Ítem <strong>%s</strong> eliminat.";
|
||||
#elif L==2 // de
|
||||
"Programmelement <strong>%s</strong> entfernt.";
|
||||
#elif L==3 // en
|
||||
"Item <strong>s</strong> removed.";
|
||||
#elif L==4 // es
|
||||
"Ítem <strong>%s</strong> eliminado.";
|
||||
#elif L==5 // fr
|
||||
"Élément <strong>%s</strong> supprimé.";
|
||||
#elif L==6 // gn
|
||||
"Ítem <strong>%s</strong> eliminado."; // Okoteve traducción
|
||||
#elif L==7 // it
|
||||
"Elemento <strong>%s</strong> rimosso.";
|
||||
#elif L==8 // pl
|
||||
"Pozycja <strong>%s</strong> usuniete.";
|
||||
#elif L==9 // pt
|
||||
"Item <strong>%s</strong> removido.";
|
||||
#endif
|
||||
|
||||
const char *Txt_Its_me =
|
||||
#if L==1 // ca
|
||||
"Sóc jo!";
|
||||
|
@ -47757,6 +47778,48 @@ const char *Txt_The_properties_of_file_X_have_been_saved = // Warning: it is ver
|
|||
"As propriedades do arquivo %s foram salvas.";
|
||||
#endif
|
||||
|
||||
const char *Txt_The_item_has_been_moved_down =
|
||||
#if L==1 // ca
|
||||
"El ítem ha estat moguda cap avall.";
|
||||
#elif L==2 // de
|
||||
"Der Programmelement wurde nach unten bewegt.";
|
||||
#elif L==3 // en
|
||||
"The item has been moved down.";
|
||||
#elif L==4 // es
|
||||
"El ítem se ha movido hacia abajo.";
|
||||
#elif L==5 // fr
|
||||
"L'élément a été déplacé vers le bas.";
|
||||
#elif L==6 // gn
|
||||
"El ítem se ha movido hacia abajo."; // Okoteve traducción
|
||||
#elif L==7 // it
|
||||
"Il elemento è stato abbattuto.";
|
||||
#elif L==8 // pl
|
||||
"Pozycja zostało przeniesione.";
|
||||
#elif L==9 // pt
|
||||
"O item foi movido para baixo.";
|
||||
#endif
|
||||
|
||||
const char *Txt_The_item_has_been_moved_up =
|
||||
#if L==1 // ca
|
||||
"El ítem ha estat moguda cap amunt.";
|
||||
#elif L==2 // de
|
||||
"Der Programmelement wurde nach oben verschoben.";
|
||||
#elif L==3 // en
|
||||
"The item has been moved up.";
|
||||
#elif L==4 // es
|
||||
"El ítem se ha movido hacia arriba.";
|
||||
#elif L==5 // fr
|
||||
"L'élément a été déplacé vers le haut.";
|
||||
#elif L==6 // gn
|
||||
"El ítem se ha movido hacia arriba."; // Okoteve traducción
|
||||
#elif L==7 // it
|
||||
"Il elemento è stato spostato.";
|
||||
#elif L==8 // pl
|
||||
"Pozycja zostało poruszone.";
|
||||
#elif L==9 // pt
|
||||
"O item foi movido para cima.";
|
||||
#endif
|
||||
|
||||
const char *Txt_The_question_has_been_moved_down =
|
||||
#if L==1 // ca
|
||||
"La pregunta ha estat moguda cap avall.";
|
||||
|
@ -47769,7 +47832,7 @@ const char *Txt_The_question_has_been_moved_down =
|
|||
#elif L==5 // fr
|
||||
"La question a été déplacée vers le bas.";
|
||||
#elif L==6 // gn
|
||||
"La pregunta se ha movido hacia arriba."; // Okoteve traducción
|
||||
"La pregunta se ha movido hacia abajo."; // Okoteve traducción
|
||||
#elif L==7 // it
|
||||
"La questione è stata abbattuta.";
|
||||
#elif L==8 // pl
|
||||
|
|
|
@ -4953,6 +4953,48 @@ const char *Txt_Actions[Act_NUM_ACTIONS] =
|
|||
"" // Potrzebujesz tlumaczenie
|
||||
#elif L==9 // pt
|
||||
"" // Precisa de tradução
|
||||
#endif
|
||||
,
|
||||
[ActUp_PrgIte] =
|
||||
#if L==1 // ca
|
||||
"" // Necessita traducció
|
||||
#elif L==2 // de
|
||||
"" // Need Übersetzung
|
||||
#elif L==3 // en
|
||||
"Move up program item"
|
||||
#elif L==4 // es
|
||||
"Subir ítem del programa"
|
||||
#elif L==5 // fr
|
||||
"" // Besoin de traduction
|
||||
#elif L==6 // gn
|
||||
"" // Okoteve traducción
|
||||
#elif L==7 // it
|
||||
"" // Bisogno di traduzione
|
||||
#elif L==8 // pl
|
||||
"" // Potrzebujesz tlumaczenie
|
||||
#elif L==9 // pt
|
||||
"" // Precisa de tradução
|
||||
#endif
|
||||
,
|
||||
[ActDwnPrgIte] =
|
||||
#if L==1 // ca
|
||||
"" // Necessita traducció
|
||||
#elif L==2 // de
|
||||
"" // Need Übersetzung
|
||||
#elif L==3 // en
|
||||
"Move down program item"
|
||||
#elif L==4 // es
|
||||
"Bajar ítem del programa"
|
||||
#elif L==5 // fr
|
||||
"" // Besoin de traduction
|
||||
#elif L==6 // gn
|
||||
"" // Okoteve traducción
|
||||
#elif L==7 // it
|
||||
"" // Bisogno di traduzione
|
||||
#elif L==8 // pl
|
||||
"" // Potrzebujesz tlumaczenie
|
||||
#elif L==9 // pt
|
||||
"" // Precisa de tradução
|
||||
#endif
|
||||
,
|
||||
[ActSeeTchGui] =
|
||||
|
@ -5444,7 +5486,7 @@ const char *Txt_Actions[Act_NUM_ACTIONS] =
|
|||
#elif L==2 // de
|
||||
"" // Need Übersetzung
|
||||
#elif L==3 // en
|
||||
"Bajar the posición of a subtree of the syllabus of practicals"
|
||||
"Bajar the position of a subtree of the syllabus of practicals"
|
||||
#elif L==4 // es
|
||||
""
|
||||
#elif L==5 // fr
|
||||
|
|
Loading…
Reference in New Issue
Block a user