mirror of https://github.com/acanas/swad-core.git
Version19.135
This commit is contained in:
parent
f298e97581
commit
390dc4be6c
|
@ -1037,6 +1037,7 @@ CREATE TABLE IF NOT EXISTS prg_grp (
|
||||||
CREATE TABLE IF NOT EXISTS prg_items (
|
CREATE TABLE IF NOT EXISTS prg_items (
|
||||||
ItmCod INT NOT NULL AUTO_INCREMENT,
|
ItmCod INT NOT NULL AUTO_INCREMENT,
|
||||||
ItmInd INT NOT NULL DEFAULT 0,
|
ItmInd INT NOT NULL DEFAULT 0,
|
||||||
|
Level INT NOT NULL DEFAULT 1,
|
||||||
CrsCod INT NOT NULL DEFAULT -1,
|
CrsCod INT NOT NULL DEFAULT -1,
|
||||||
Hidden ENUM('N','Y') NOT NULL DEFAULT 'N',
|
Hidden ENUM('N','Y') NOT NULL DEFAULT 'N',
|
||||||
UsrCod INT NOT NULL,
|
UsrCod INT NOT NULL,
|
||||||
|
|
|
@ -5093,7 +5093,7 @@ int swad__getMatches (struct soap *soap,
|
||||||
Length);
|
Length);
|
||||||
|
|
||||||
/* Get current question index (row[5]) */
|
/* Get current question index (row[5]) */
|
||||||
getMatchesOut->matchesArray.__ptr[NumMatch].questionIndex = (int) Gam_GetQstIndFromStr (row[5]);
|
getMatchesOut->matchesArray.__ptr[NumMatch].questionIndex = (int) Str_ConvertStrToUnsigned (row[5]);
|
||||||
|
|
||||||
/* Get list of groups for this match */
|
/* Get list of groups for this match */
|
||||||
API_GetListGrpsInGameFromDB (soap,
|
API_GetListGrpsInGameFromDB (soap,
|
||||||
|
|
|
@ -408,6 +408,8 @@ const struct Act_Actions Act_Actions[Act_NUM_ACTIONS] =
|
||||||
[ActShoPrgItm ] = {1830,-1,TabUnk,ActSeePrg ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Prg_ShowPrgItem ,NULL},
|
[ActShoPrgItm ] = {1830,-1,TabUnk,ActSeePrg ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Prg_ShowPrgItem ,NULL},
|
||||||
[ActUp_PrgItm ] = {1831,-1,TabUnk,ActSeePrg ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Prg_MoveUpPrgItem ,NULL},
|
[ActUp_PrgItm ] = {1831,-1,TabUnk,ActSeePrg ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Prg_MoveUpPrgItem ,NULL},
|
||||||
[ActDwnPrgItm ] = {1832,-1,TabUnk,ActSeePrg ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Prg_MoveDownPrgItem ,NULL},
|
[ActDwnPrgItm ] = {1832,-1,TabUnk,ActSeePrg ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Prg_MoveDownPrgItem ,NULL},
|
||||||
|
[ActRgtPrgItm ] = {1833,-1,TabUnk,ActSeePrg ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Prg_MoveRightPrgItem ,NULL},
|
||||||
|
[ActLftPrgItm ] = {1834,-1,TabUnk,ActSeePrg ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Prg_MoveLeftPrgItem ,NULL},
|
||||||
|
|
||||||
[ActEdiTchGui ] = { 785,-1,TabUnk,ActSeeTchGui ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Inf_FormsToSelSendInfo ,NULL},
|
[ActEdiTchGui ] = { 785,-1,TabUnk,ActSeeTchGui ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Inf_FormsToSelSendInfo ,NULL},
|
||||||
|
|
||||||
|
@ -3560,6 +3562,8 @@ Act_Action_t Act_FromActCodToAction[1 + Act_MAX_ACTION_COD] = // Do not reuse un
|
||||||
ActShoPrgItm, // #1830
|
ActShoPrgItm, // #1830
|
||||||
ActUp_PrgItm, // #1832
|
ActUp_PrgItm, // #1832
|
||||||
ActDwnPrgItm, // #1833
|
ActDwnPrgItm, // #1833
|
||||||
|
ActRgtPrgItm, // #1833
|
||||||
|
ActLftPrgItm, // #1834
|
||||||
};
|
};
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
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
|
typedef signed int Act_Action_t; // Must be a signed type, because -1 is used to indicate obsolete action
|
||||||
|
|
||||||
#define Act_MAX_ACTION_COD 1832
|
#define Act_MAX_ACTION_COD 1834
|
||||||
|
|
||||||
#define Act_MAX_OPTIONS_IN_MENU_PER_TAB 13
|
#define Act_MAX_OPTIONS_IN_MENU_PER_TAB 13
|
||||||
|
|
||||||
|
@ -394,107 +394,109 @@ typedef signed int Act_Action_t; // Must be a signed type, because -1 is used to
|
||||||
#define ActShoPrgItm (ActChgCrsSta + 23)
|
#define ActShoPrgItm (ActChgCrsSta + 23)
|
||||||
#define ActUp_PrgItm (ActChgCrsSta + 24)
|
#define ActUp_PrgItm (ActChgCrsSta + 24)
|
||||||
#define ActDwnPrgItm (ActChgCrsSta + 25)
|
#define ActDwnPrgItm (ActChgCrsSta + 25)
|
||||||
#define ActEdiTchGui (ActChgCrsSta + 26)
|
#define ActRgtPrgItm (ActChgCrsSta + 26)
|
||||||
#define ActSeeSylLec (ActChgCrsSta + 27)
|
#define ActLftPrgItm (ActChgCrsSta + 27)
|
||||||
#define ActSeeSylPra (ActChgCrsSta + 28)
|
#define ActEdiTchGui (ActChgCrsSta + 28)
|
||||||
#define ActEdiSylLec (ActChgCrsSta + 29)
|
#define ActSeeSylLec (ActChgCrsSta + 29)
|
||||||
#define ActEdiSylPra (ActChgCrsSta + 30)
|
#define ActSeeSylPra (ActChgCrsSta + 30)
|
||||||
#define ActDelItmSylLec (ActChgCrsSta + 31)
|
#define ActEdiSylLec (ActChgCrsSta + 31)
|
||||||
#define ActDelItmSylPra (ActChgCrsSta + 32)
|
#define ActEdiSylPra (ActChgCrsSta + 32)
|
||||||
#define ActUp_IteSylLec (ActChgCrsSta + 33)
|
#define ActDelItmSylLec (ActChgCrsSta + 33)
|
||||||
#define ActUp_IteSylPra (ActChgCrsSta + 34)
|
#define ActDelItmSylPra (ActChgCrsSta + 34)
|
||||||
#define ActDwnIteSylLec (ActChgCrsSta + 35)
|
#define ActUp_IteSylLec (ActChgCrsSta + 35)
|
||||||
#define ActDwnIteSylPra (ActChgCrsSta + 36)
|
#define ActUp_IteSylPra (ActChgCrsSta + 36)
|
||||||
#define ActRgtIteSylLec (ActChgCrsSta + 37)
|
#define ActDwnIteSylLec (ActChgCrsSta + 37)
|
||||||
#define ActRgtIteSylPra (ActChgCrsSta + 38)
|
#define ActDwnIteSylPra (ActChgCrsSta + 38)
|
||||||
#define ActLftIteSylLec (ActChgCrsSta + 39)
|
#define ActRgtIteSylLec (ActChgCrsSta + 39)
|
||||||
#define ActLftIteSylPra (ActChgCrsSta + 40)
|
#define ActRgtIteSylPra (ActChgCrsSta + 40)
|
||||||
#define ActInsIteSylLec (ActChgCrsSta + 41)
|
#define ActLftIteSylLec (ActChgCrsSta + 41)
|
||||||
#define ActInsIteSylPra (ActChgCrsSta + 42)
|
#define ActLftIteSylPra (ActChgCrsSta + 42)
|
||||||
#define ActModIteSylLec (ActChgCrsSta + 43)
|
#define ActInsIteSylLec (ActChgCrsSta + 43)
|
||||||
#define ActModIteSylPra (ActChgCrsSta + 44)
|
#define ActInsIteSylPra (ActChgCrsSta + 44)
|
||||||
|
#define ActModIteSylLec (ActChgCrsSta + 45)
|
||||||
|
#define ActModIteSylPra (ActChgCrsSta + 46)
|
||||||
|
|
||||||
#define ActEdiBib (ActChgCrsSta + 45)
|
#define ActEdiBib (ActChgCrsSta + 47)
|
||||||
#define ActEdiFAQ (ActChgCrsSta + 46)
|
#define ActEdiFAQ (ActChgCrsSta + 48)
|
||||||
#define ActEdiCrsLnk (ActChgCrsSta + 47)
|
#define ActEdiCrsLnk (ActChgCrsSta + 49)
|
||||||
|
|
||||||
#define ActChgFrcReaCrsInf (ActChgCrsSta + 48)
|
#define ActChgFrcReaCrsInf (ActChgCrsSta + 50)
|
||||||
#define ActChgFrcReaTchGui (ActChgCrsSta + 49)
|
#define ActChgFrcReaTchGui (ActChgCrsSta + 51)
|
||||||
#define ActChgFrcReaSylLec (ActChgCrsSta + 50)
|
#define ActChgFrcReaSylLec (ActChgCrsSta + 52)
|
||||||
#define ActChgFrcReaSylPra (ActChgCrsSta + 51)
|
#define ActChgFrcReaSylPra (ActChgCrsSta + 53)
|
||||||
#define ActChgFrcReaBib (ActChgCrsSta + 52)
|
#define ActChgFrcReaBib (ActChgCrsSta + 54)
|
||||||
#define ActChgFrcReaFAQ (ActChgCrsSta + 53)
|
#define ActChgFrcReaFAQ (ActChgCrsSta + 55)
|
||||||
#define ActChgFrcReaCrsLnk (ActChgCrsSta + 54)
|
#define ActChgFrcReaCrsLnk (ActChgCrsSta + 56)
|
||||||
|
|
||||||
#define ActChgHavReaCrsInf (ActChgCrsSta + 55)
|
#define ActChgHavReaCrsInf (ActChgCrsSta + 57)
|
||||||
#define ActChgHavReaTchGui (ActChgCrsSta + 56)
|
#define ActChgHavReaTchGui (ActChgCrsSta + 58)
|
||||||
#define ActChgHavReaSylLec (ActChgCrsSta + 57)
|
#define ActChgHavReaSylLec (ActChgCrsSta + 59)
|
||||||
#define ActChgHavReaSylPra (ActChgCrsSta + 58)
|
#define ActChgHavReaSylPra (ActChgCrsSta + 60)
|
||||||
#define ActChgHavReaBib (ActChgCrsSta + 59)
|
#define ActChgHavReaBib (ActChgCrsSta + 61)
|
||||||
#define ActChgHavReaFAQ (ActChgCrsSta + 60)
|
#define ActChgHavReaFAQ (ActChgCrsSta + 62)
|
||||||
#define ActChgHavReaCrsLnk (ActChgCrsSta + 61)
|
#define ActChgHavReaCrsLnk (ActChgCrsSta + 63)
|
||||||
|
|
||||||
#define ActSelInfSrcCrsInf (ActChgCrsSta + 62)
|
#define ActSelInfSrcCrsInf (ActChgCrsSta + 64)
|
||||||
#define ActSelInfSrcTchGui (ActChgCrsSta + 63)
|
#define ActSelInfSrcTchGui (ActChgCrsSta + 65)
|
||||||
#define ActSelInfSrcSylLec (ActChgCrsSta + 64)
|
#define ActSelInfSrcSylLec (ActChgCrsSta + 66)
|
||||||
#define ActSelInfSrcSylPra (ActChgCrsSta + 65)
|
#define ActSelInfSrcSylPra (ActChgCrsSta + 67)
|
||||||
#define ActSelInfSrcBib (ActChgCrsSta + 66)
|
#define ActSelInfSrcBib (ActChgCrsSta + 68)
|
||||||
#define ActSelInfSrcFAQ (ActChgCrsSta + 67)
|
#define ActSelInfSrcFAQ (ActChgCrsSta + 69)
|
||||||
#define ActSelInfSrcCrsLnk (ActChgCrsSta + 68)
|
#define ActSelInfSrcCrsLnk (ActChgCrsSta + 70)
|
||||||
#define ActRcvURLCrsInf (ActChgCrsSta + 69)
|
#define ActRcvURLCrsInf (ActChgCrsSta + 71)
|
||||||
#define ActRcvURLTchGui (ActChgCrsSta + 70)
|
#define ActRcvURLTchGui (ActChgCrsSta + 72)
|
||||||
#define ActRcvURLSylLec (ActChgCrsSta + 71)
|
#define ActRcvURLSylLec (ActChgCrsSta + 73)
|
||||||
#define ActRcvURLSylPra (ActChgCrsSta + 72)
|
#define ActRcvURLSylPra (ActChgCrsSta + 74)
|
||||||
#define ActRcvURLBib (ActChgCrsSta + 73)
|
#define ActRcvURLBib (ActChgCrsSta + 75)
|
||||||
#define ActRcvURLFAQ (ActChgCrsSta + 74)
|
#define ActRcvURLFAQ (ActChgCrsSta + 76)
|
||||||
#define ActRcvURLCrsLnk (ActChgCrsSta + 75)
|
#define ActRcvURLCrsLnk (ActChgCrsSta + 77)
|
||||||
#define ActRcvPagCrsInf (ActChgCrsSta + 76)
|
#define ActRcvPagCrsInf (ActChgCrsSta + 78)
|
||||||
#define ActRcvPagTchGui (ActChgCrsSta + 77)
|
#define ActRcvPagTchGui (ActChgCrsSta + 79)
|
||||||
#define ActRcvPagSylLec (ActChgCrsSta + 78)
|
#define ActRcvPagSylLec (ActChgCrsSta + 80)
|
||||||
#define ActRcvPagSylPra (ActChgCrsSta + 79)
|
#define ActRcvPagSylPra (ActChgCrsSta + 81)
|
||||||
#define ActRcvPagBib (ActChgCrsSta + 80)
|
#define ActRcvPagBib (ActChgCrsSta + 82)
|
||||||
#define ActRcvPagFAQ (ActChgCrsSta + 81)
|
#define ActRcvPagFAQ (ActChgCrsSta + 83)
|
||||||
#define ActRcvPagCrsLnk (ActChgCrsSta + 82)
|
#define ActRcvPagCrsLnk (ActChgCrsSta + 84)
|
||||||
#define ActEditorCrsInf (ActChgCrsSta + 83)
|
#define ActEditorCrsInf (ActChgCrsSta + 85)
|
||||||
#define ActEditorTchGui (ActChgCrsSta + 84)
|
#define ActEditorTchGui (ActChgCrsSta + 86)
|
||||||
#define ActEditorSylLec (ActChgCrsSta + 85)
|
#define ActEditorSylLec (ActChgCrsSta + 87)
|
||||||
#define ActEditorSylPra (ActChgCrsSta + 86)
|
#define ActEditorSylPra (ActChgCrsSta + 88)
|
||||||
#define ActEditorBib (ActChgCrsSta + 87)
|
#define ActEditorBib (ActChgCrsSta + 89)
|
||||||
#define ActEditorFAQ (ActChgCrsSta + 88)
|
#define ActEditorFAQ (ActChgCrsSta + 90)
|
||||||
#define ActEditorCrsLnk (ActChgCrsSta + 89)
|
#define ActEditorCrsLnk (ActChgCrsSta + 91)
|
||||||
#define ActPlaTxtEdiCrsInf (ActChgCrsSta + 90)
|
#define ActPlaTxtEdiCrsInf (ActChgCrsSta + 92)
|
||||||
#define ActPlaTxtEdiTchGui (ActChgCrsSta + 91)
|
#define ActPlaTxtEdiTchGui (ActChgCrsSta + 93)
|
||||||
#define ActPlaTxtEdiSylLec (ActChgCrsSta + 92)
|
#define ActPlaTxtEdiSylLec (ActChgCrsSta + 94)
|
||||||
#define ActPlaTxtEdiSylPra (ActChgCrsSta + 93)
|
#define ActPlaTxtEdiSylPra (ActChgCrsSta + 95)
|
||||||
#define ActPlaTxtEdiBib (ActChgCrsSta + 94)
|
#define ActPlaTxtEdiBib (ActChgCrsSta + 96)
|
||||||
#define ActPlaTxtEdiFAQ (ActChgCrsSta + 95)
|
#define ActPlaTxtEdiFAQ (ActChgCrsSta + 97)
|
||||||
#define ActPlaTxtEdiCrsLnk (ActChgCrsSta + 96)
|
#define ActPlaTxtEdiCrsLnk (ActChgCrsSta + 98)
|
||||||
#define ActRchTxtEdiCrsInf (ActChgCrsSta + 97)
|
#define ActRchTxtEdiCrsInf (ActChgCrsSta + 99)
|
||||||
#define ActRchTxtEdiTchGui (ActChgCrsSta + 98)
|
#define ActRchTxtEdiTchGui (ActChgCrsSta + 100)
|
||||||
#define ActRchTxtEdiSylLec (ActChgCrsSta + 99)
|
#define ActRchTxtEdiSylLec (ActChgCrsSta + 101)
|
||||||
#define ActRchTxtEdiSylPra (ActChgCrsSta + 100)
|
#define ActRchTxtEdiSylPra (ActChgCrsSta + 102)
|
||||||
#define ActRchTxtEdiBib (ActChgCrsSta + 101)
|
#define ActRchTxtEdiBib (ActChgCrsSta + 103)
|
||||||
#define ActRchTxtEdiFAQ (ActChgCrsSta + 102)
|
#define ActRchTxtEdiFAQ (ActChgCrsSta + 104)
|
||||||
#define ActRchTxtEdiCrsLnk (ActChgCrsSta + 103)
|
#define ActRchTxtEdiCrsLnk (ActChgCrsSta + 105)
|
||||||
#define ActRcvPlaTxtCrsInf (ActChgCrsSta + 104)
|
#define ActRcvPlaTxtCrsInf (ActChgCrsSta + 106)
|
||||||
#define ActRcvPlaTxtTchGui (ActChgCrsSta + 105)
|
#define ActRcvPlaTxtTchGui (ActChgCrsSta + 107)
|
||||||
#define ActRcvPlaTxtSylLec (ActChgCrsSta + 106)
|
#define ActRcvPlaTxtSylLec (ActChgCrsSta + 108)
|
||||||
#define ActRcvPlaTxtSylPra (ActChgCrsSta + 107)
|
#define ActRcvPlaTxtSylPra (ActChgCrsSta + 109)
|
||||||
#define ActRcvPlaTxtBib (ActChgCrsSta + 108)
|
#define ActRcvPlaTxtBib (ActChgCrsSta + 110)
|
||||||
#define ActRcvPlaTxtFAQ (ActChgCrsSta + 109)
|
#define ActRcvPlaTxtFAQ (ActChgCrsSta + 111)
|
||||||
#define ActRcvPlaTxtCrsLnk (ActChgCrsSta + 110)
|
#define ActRcvPlaTxtCrsLnk (ActChgCrsSta + 112)
|
||||||
#define ActRcvRchTxtCrsInf (ActChgCrsSta + 111)
|
#define ActRcvRchTxtCrsInf (ActChgCrsSta + 113)
|
||||||
#define ActRcvRchTxtTchGui (ActChgCrsSta + 112)
|
#define ActRcvRchTxtTchGui (ActChgCrsSta + 114)
|
||||||
#define ActRcvRchTxtSylLec (ActChgCrsSta + 113)
|
#define ActRcvRchTxtSylLec (ActChgCrsSta + 115)
|
||||||
#define ActRcvRchTxtSylPra (ActChgCrsSta + 114)
|
#define ActRcvRchTxtSylPra (ActChgCrsSta + 116)
|
||||||
#define ActRcvRchTxtBib (ActChgCrsSta + 115)
|
#define ActRcvRchTxtBib (ActChgCrsSta + 117)
|
||||||
#define ActRcvRchTxtFAQ (ActChgCrsSta + 116)
|
#define ActRcvRchTxtFAQ (ActChgCrsSta + 118)
|
||||||
#define ActRcvRchTxtCrsLnk (ActChgCrsSta + 117)
|
#define ActRcvRchTxtCrsLnk (ActChgCrsSta + 119)
|
||||||
|
|
||||||
#define ActPrnCrsTT (ActChgCrsSta + 118)
|
#define ActPrnCrsTT (ActChgCrsSta + 120)
|
||||||
#define ActEdiCrsTT (ActChgCrsSta + 119)
|
#define ActEdiCrsTT (ActChgCrsSta + 121)
|
||||||
#define ActChgCrsTT (ActChgCrsSta + 120)
|
#define ActChgCrsTT (ActChgCrsSta + 122)
|
||||||
#define ActChgCrsTT1stDay (ActChgCrsSta + 121)
|
#define ActChgCrsTT1stDay (ActChgCrsSta + 123)
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/***************************** Assessment tab ********************************/
|
/***************************** Assessment tab ********************************/
|
||||||
|
|
|
@ -497,7 +497,7 @@ enscript -2 --landscape --color --file-align=2 --highlight --line-numbers -o - *
|
||||||
En OpenSWAD:
|
En OpenSWAD:
|
||||||
ps2pdf source.ps destination.pdf
|
ps2pdf source.ps destination.pdf
|
||||||
*/
|
*/
|
||||||
#define Log_PLATFORM_VERSION "SWAD 19.134.4 (2020-02-26)"
|
#define Log_PLATFORM_VERSION "SWAD 19.135 (2020-02-27)"
|
||||||
#define CSS_FILE "swad19.133.1.css"
|
#define CSS_FILE "swad19.133.1.css"
|
||||||
#define JS_FILE "swad19.91.1.js"
|
#define JS_FILE "swad19.91.1.js"
|
||||||
/*
|
/*
|
||||||
|
@ -523,6 +523,10 @@ Param
|
||||||
// TODO: Miguel Damas: por defecto, marcar "Permitir que los profesores..." en los test (que ya esté marcado en lugar de desmarcado)
|
// 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: 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
|
||||||
|
|
||||||
|
Version 19.135: Feb 27, 2020 Buttons in course program to indent items. Not finished. (282097 lines)
|
||||||
|
1 change necessary in database:
|
||||||
|
ALTER TABLE prg_items ADD COLUMN Level INT NOT NULL DEFAULT 1 AFTER ItmInd;
|
||||||
|
|
||||||
Version 19.134.4: Feb 26, 2020 Changes in course program. (281992 lines)
|
Version 19.134.4: Feb 26, 2020 Changes in course program. (281992 lines)
|
||||||
Version 19.134.3: Feb 26, 2020 Heading of course program table removed. (282008 lines)
|
Version 19.134.3: Feb 26, 2020 Heading of course program table removed. (282008 lines)
|
||||||
Version 19.134.2: Feb 26, 2020 Fixed bug in syllabus editor. (282021 lines)
|
Version 19.134.2: Feb 26, 2020 Fixed bug in syllabus editor. (282021 lines)
|
||||||
|
|
|
@ -2212,6 +2212,7 @@ mysql> DESCRIBE prg_items;
|
||||||
+-----------+---------------+------+-----+---------+----------------+
|
+-----------+---------------+------+-----+---------+----------------+
|
||||||
| ItmCod | int(11) | NO | PRI | NULL | auto_increment |
|
| ItmCod | int(11) | NO | PRI | NULL | auto_increment |
|
||||||
| ItmInd | int(11) | NO | | 0 | |
|
| ItmInd | int(11) | NO | | 0 | |
|
||||||
|
| Level | int(11) | NO | | 1 | |
|
||||||
| CrsCod | int(11) | NO | MUL | -1 | |
|
| CrsCod | int(11) | NO | MUL | -1 | |
|
||||||
| Hidden | enum('N','Y') | NO | | N | |
|
| Hidden | enum('N','Y') | NO | | N | |
|
||||||
| UsrCod | int(11) | NO | | NULL | |
|
| UsrCod | int(11) | NO | | NULL | |
|
||||||
|
@ -2220,11 +2221,12 @@ mysql> DESCRIBE prg_items;
|
||||||
| Title | varchar(2047) | NO | | NULL | |
|
| Title | varchar(2047) | NO | | NULL | |
|
||||||
| Txt | text | NO | | NULL | |
|
| Txt | text | NO | | NULL | |
|
||||||
+-----------+---------------+------+-----+---------+----------------+
|
+-----------+---------------+------+-----+---------+----------------+
|
||||||
9 rows in set (0.01 sec)
|
10 rows in set (0.00 sec)
|
||||||
*/
|
*/
|
||||||
DB_CreateTable ("CREATE TABLE IF NOT EXISTS prg_items ("
|
DB_CreateTable ("CREATE TABLE IF NOT EXISTS prg_items ("
|
||||||
"ItmCod INT NOT NULL AUTO_INCREMENT,"
|
"ItmCod INT NOT NULL AUTO_INCREMENT,"
|
||||||
"ItmInd INT NOT NULL DEFAULT 0,"
|
"ItmInd INT NOT NULL DEFAULT 0,"
|
||||||
|
"Level INT NOT NULL DEFAULT 1,"
|
||||||
"CrsCod INT NOT NULL DEFAULT -1,"
|
"CrsCod INT NOT NULL DEFAULT -1,"
|
||||||
"Hidden ENUM('N','Y') NOT NULL DEFAULT 'N',"
|
"Hidden ENUM('N','Y') NOT NULL DEFAULT 'N',"
|
||||||
"UsrCod INT NOT NULL,"
|
"UsrCod INT NOT NULL,"
|
||||||
|
|
15
swad_game.c
15
swad_game.c
|
@ -1629,19 +1629,6 @@ unsigned Gam_GetParamQstInd (void)
|
||||||
return (unsigned) QstInd;
|
return (unsigned) QstInd;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
|
||||||
/******************* Get parameter with index of question ********************/
|
|
||||||
/*****************************************************************************/
|
|
||||||
|
|
||||||
unsigned Gam_GetQstIndFromStr (const char *UnsignedStr)
|
|
||||||
{
|
|
||||||
long QstInd;
|
|
||||||
|
|
||||||
QstInd = Str_ConvertStrCodToLongCod (UnsignedStr);
|
|
||||||
return (QstInd > 0) ? (unsigned) QstInd :
|
|
||||||
0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/********************** Remove answers of a game question ********************/
|
/********************** Remove answers of a game question ********************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
@ -1893,7 +1880,7 @@ static void Gam_ListOneOrMoreQuestionsForEdition (long GamCod,unsigned NumQsts,
|
||||||
Tst_QstConstructor ();
|
Tst_QstConstructor ();
|
||||||
|
|
||||||
/* Get question index (row[0]) */
|
/* Get question index (row[0]) */
|
||||||
QstInd = Gam_GetQstIndFromStr (row[0]);
|
QstInd = Str_ConvertStrToUnsigned (row[0]);
|
||||||
snprintf (StrQstInd,sizeof (StrQstInd),
|
snprintf (StrQstInd,sizeof (StrQstInd),
|
||||||
"%u",
|
"%u",
|
||||||
QstInd);
|
QstInd);
|
||||||
|
|
|
@ -121,7 +121,6 @@ void Gam_ListTstQuestionsToSelect (void);
|
||||||
|
|
||||||
void Gam_PutParamQstInd (unsigned QstInd);
|
void Gam_PutParamQstInd (unsigned QstInd);
|
||||||
unsigned Gam_GetParamQstInd (void);
|
unsigned Gam_GetParamQstInd (void);
|
||||||
unsigned Gam_GetQstIndFromStr (const char *UnsignedStr);
|
|
||||||
long Gam_GetQstCodFromQstInd (long GamCod,unsigned QstInd);
|
long Gam_GetQstCodFromQstInd (long GamCod,unsigned QstInd);
|
||||||
unsigned Gam_GetPrevQuestionIndexInGame (long GamCod,unsigned QstInd);
|
unsigned Gam_GetPrevQuestionIndexInGame (long GamCod,unsigned QstInd);
|
||||||
unsigned Gam_GetNextQuestionIndexInGame (long GamCod,unsigned QstInd);
|
unsigned Gam_GetNextQuestionIndexInGame (long GamCod,unsigned QstInd);
|
||||||
|
|
|
@ -909,7 +909,7 @@ static void Mch_GetMatchDataFromRow (MYSQL_RES *mysql_res,
|
||||||
row[12] ShowUsrResults
|
row[12] ShowUsrResults
|
||||||
*/
|
*/
|
||||||
/* Current question index (row[6]) */
|
/* Current question index (row[6]) */
|
||||||
Match->Status.QstInd = Gam_GetQstIndFromStr (row[6]);
|
Match->Status.QstInd = Str_ConvertStrToUnsigned (row[6]);
|
||||||
|
|
||||||
/* Current question code (row[7]) */
|
/* Current question code (row[7]) */
|
||||||
Match->Status.QstCod = Str_ConvertStrCodToLongCod (row[7]);
|
Match->Status.QstCod = Str_ConvertStrCodToLongCod (row[7]);
|
||||||
|
|
170
swad_program.c
170
swad_program.c
|
@ -78,12 +78,10 @@ static void Prg_PutIconsListItems (void);
|
||||||
static void Prg_PutIconToCreateNewItem (void);
|
static void Prg_PutIconToCreateNewItem (void);
|
||||||
static void Prg_PutButtonToCreateNewItem (void);
|
static void Prg_PutButtonToCreateNewItem (void);
|
||||||
static void Prg_ParamsWhichGroupsToShow (void);
|
static void Prg_ParamsWhichGroupsToShow (void);
|
||||||
static void Prg_ShowOneItem (long ItmCod,
|
static void Prg_ShowOneItem (long ItmCod,unsigned MaxItmInd,bool PrintView);
|
||||||
unsigned ItmInd,unsigned MaxItmInd,
|
|
||||||
bool PrintView);
|
|
||||||
|
|
||||||
static void Prg_PutFormsToRemEditOnePrgItem (const struct ProgramItem *Item,
|
static void Prg_PutFormsToRemEditOnePrgItem (const struct ProgramItem *Item,
|
||||||
unsigned ItmInd,unsigned MaxItmInd,
|
unsigned MaxItmInd,
|
||||||
const char *Anchor);
|
const char *Anchor);
|
||||||
|
|
||||||
static void Prg_SetCurrentItmCod (long ItmCod);
|
static void Prg_SetCurrentItmCod (long ItmCod);
|
||||||
|
@ -97,7 +95,6 @@ static unsigned Prg_GetParamItmInd (void);
|
||||||
static void Prg_GetDataOfItem (struct ProgramItem *Item,
|
static void Prg_GetDataOfItem (struct ProgramItem *Item,
|
||||||
MYSQL_RES **mysql_res,
|
MYSQL_RES **mysql_res,
|
||||||
unsigned long NumRows);
|
unsigned long NumRows);
|
||||||
static unsigned Prg_GetItmIndFromStr (const char *UnsignedStr);
|
|
||||||
static void Prg_ResetItem (struct ProgramItem *Item);
|
static void Prg_ResetItem (struct ProgramItem *Item);
|
||||||
static void Prg_GetPrgItemTxtFromDB (long ItmCod,char Txt[Cns_MAX_BYTES_TEXT + 1]);
|
static void Prg_GetPrgItemTxtFromDB (long ItmCod,char Txt[Cns_MAX_BYTES_TEXT + 1]);
|
||||||
static void Prg_PutParamItmCod (long ItmCod);
|
static void Prg_PutParamItmCod (long ItmCod);
|
||||||
|
@ -180,7 +177,7 @@ static void Prg_ShowAllItems (void)
|
||||||
NumItem <= Pagination.LastItemVisible;
|
NumItem <= Pagination.LastItemVisible;
|
||||||
NumItem++)
|
NumItem++)
|
||||||
Prg_ShowOneItem (Gbl.Prg.LstItmCods[NumItem - 1],
|
Prg_ShowOneItem (Gbl.Prg.LstItmCods[NumItem - 1],
|
||||||
NumItem,Gbl.Prg.Num,
|
Gbl.Prg.Num,
|
||||||
false); // Not print view
|
false); // Not print view
|
||||||
|
|
||||||
/***** End table *****/
|
/***** End table *****/
|
||||||
|
@ -274,9 +271,7 @@ static void Prg_ParamsWhichGroupsToShow (void)
|
||||||
/************************** Show one program item ****************************/
|
/************************** Show one program item ****************************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
static void Prg_ShowOneItem (long ItmCod,
|
static void Prg_ShowOneItem (long ItmCod,unsigned MaxItmInd,bool PrintView)
|
||||||
unsigned ItmInd,unsigned MaxItmInd,
|
|
||||||
bool PrintView)
|
|
||||||
{
|
{
|
||||||
char *Anchor = NULL;
|
char *Anchor = NULL;
|
||||||
static unsigned UniqueId = 0;
|
static unsigned UniqueId = 0;
|
||||||
|
@ -299,9 +294,7 @@ static void Prg_ShowOneItem (long ItmCod,
|
||||||
if (!PrintView)
|
if (!PrintView)
|
||||||
{
|
{
|
||||||
HTM_TD_Begin ("rowspan=\"2\" class=\"LT COLOR%u\"",Gbl.RowEvenOdd);
|
HTM_TD_Begin ("rowspan=\"2\" class=\"LT COLOR%u\"",Gbl.RowEvenOdd);
|
||||||
Prg_PutFormsToRemEditOnePrgItem (&Item,
|
Prg_PutFormsToRemEditOnePrgItem (&Item,MaxItmInd,Anchor);
|
||||||
ItmInd,MaxItmInd,
|
|
||||||
Anchor);
|
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -386,12 +379,15 @@ static void Prg_ShowOneItem (long ItmCod,
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
static void Prg_PutFormsToRemEditOnePrgItem (const struct ProgramItem *Item,
|
static void Prg_PutFormsToRemEditOnePrgItem (const struct ProgramItem *Item,
|
||||||
unsigned ItmInd,unsigned MaxItmInd,
|
unsigned MaxItmInd,
|
||||||
const char *Anchor)
|
const char *Anchor)
|
||||||
{
|
{
|
||||||
extern const char *Txt_Move_up_X;
|
extern const char *Txt_Move_up_X;
|
||||||
extern const char *Txt_Move_down_X;
|
extern const char *Txt_Move_down_X;
|
||||||
|
extern const char *Txt_Increase_level_of_X;
|
||||||
|
extern const char *Txt_Decrease_level_of_X;
|
||||||
extern const char *Txt_Movement_not_allowed;
|
extern const char *Txt_Movement_not_allowed;
|
||||||
|
static unsigned LastLevel = 0;
|
||||||
char StrItemIndex[Cns_MAX_DECIMAL_DIGITS_UINT + 1];
|
char StrItemIndex[Cns_MAX_DECIMAL_DIGITS_UINT + 1];
|
||||||
|
|
||||||
Prg_SetCurrentItmCod (Item->ItmCod); // Used as parameter in contextual links
|
Prg_SetCurrentItmCod (Item->ItmCod); // Used as parameter in contextual links
|
||||||
|
@ -400,7 +396,7 @@ static void Prg_PutFormsToRemEditOnePrgItem (const struct ProgramItem *Item,
|
||||||
/***** Initialize item index string *****/
|
/***** Initialize item index string *****/
|
||||||
snprintf (StrItemIndex,sizeof (StrItemIndex),
|
snprintf (StrItemIndex,sizeof (StrItemIndex),
|
||||||
"%u",
|
"%u",
|
||||||
ItmInd);
|
Item->ItmInd);
|
||||||
|
|
||||||
switch (Gbl.Usrs.Me.Role.Logged)
|
switch (Gbl.Usrs.Me.Role.Logged)
|
||||||
{
|
{
|
||||||
|
@ -418,8 +414,10 @@ static void Prg_PutFormsToRemEditOnePrgItem (const struct ProgramItem *Item,
|
||||||
/***** Put form to edit program item *****/
|
/***** Put form to edit program item *****/
|
||||||
Ico_PutContextualIconToEdit (ActEdiOnePrgItm,Prg_PutParams);
|
Ico_PutContextualIconToEdit (ActEdiOnePrgItm,Prg_PutParams);
|
||||||
|
|
||||||
|
HTM_BR ();
|
||||||
|
|
||||||
/***** Put icon to move up the item *****/
|
/***** Put icon to move up the item *****/
|
||||||
if (ItmInd > 1)
|
if (Item->ItmInd > 1)
|
||||||
{
|
{
|
||||||
Lay_PutContextualLinkOnlyIcon (ActUp_PrgItm,NULL,Prg_PutParams,
|
Lay_PutContextualLinkOnlyIcon (ActUp_PrgItm,NULL,Prg_PutParams,
|
||||||
"arrow-up.svg",
|
"arrow-up.svg",
|
||||||
|
@ -431,7 +429,7 @@ static void Prg_PutFormsToRemEditOnePrgItem (const struct ProgramItem *Item,
|
||||||
Ico_PutIconOff ("arrow-up.svg",Txt_Movement_not_allowed);
|
Ico_PutIconOff ("arrow-up.svg",Txt_Movement_not_allowed);
|
||||||
|
|
||||||
/***** Put icon to move down the item *****/
|
/***** Put icon to move down the item *****/
|
||||||
if (ItmInd < MaxItmInd)
|
if (Item->ItmInd < MaxItmInd)
|
||||||
{
|
{
|
||||||
Lay_PutContextualLinkOnlyIcon (ActDwnPrgItm,NULL,Prg_PutParams,
|
Lay_PutContextualLinkOnlyIcon (ActDwnPrgItm,NULL,Prg_PutParams,
|
||||||
"arrow-down.svg",
|
"arrow-down.svg",
|
||||||
|
@ -441,6 +439,34 @@ static void Prg_PutFormsToRemEditOnePrgItem (const struct ProgramItem *Item,
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
Ico_PutIconOff ("arrow-down.svg",Txt_Movement_not_allowed);
|
Ico_PutIconOff ("arrow-down.svg",Txt_Movement_not_allowed);
|
||||||
|
|
||||||
|
HTM_BR ();
|
||||||
|
|
||||||
|
/***** Icon to increase the level of an item *****/
|
||||||
|
if (Item->Level > 1)
|
||||||
|
{
|
||||||
|
Lay_PutContextualLinkOnlyIcon (ActRgtPrgItm,NULL,Prg_PutParams,
|
||||||
|
"arrow-left.svg",
|
||||||
|
Str_BuildStringStr (Txt_Increase_level_of_X,
|
||||||
|
StrItemIndex));
|
||||||
|
Str_FreeString ();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
Ico_PutIconOff ("arrow-left.svg",Txt_Movement_not_allowed);
|
||||||
|
|
||||||
|
/***** Icon to decrease level item *****/
|
||||||
|
if (Item->Level < LastLevel + 1)
|
||||||
|
{
|
||||||
|
Lay_PutContextualLinkOnlyIcon (ActLftPrgItm,NULL,Prg_PutParams,
|
||||||
|
"arrow-right.svg",
|
||||||
|
Str_BuildStringStr (Txt_Decrease_level_of_X,
|
||||||
|
StrItemIndex));
|
||||||
|
Str_FreeString ();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
Ico_PutIconOff ("arrow-right.svg",Txt_Movement_not_allowed);
|
||||||
|
|
||||||
|
LastLevel = Item->Level;
|
||||||
break;
|
break;
|
||||||
case Rol_STD:
|
case Rol_STD:
|
||||||
case Rol_NET:
|
case Rol_NET:
|
||||||
|
@ -610,12 +636,13 @@ void Prg_GetDataOfItemByCod (struct ProgramItem *Item)
|
||||||
NumRows = DB_QuerySELECT (&mysql_res,"can not get program item data",
|
NumRows = DB_QuerySELECT (&mysql_res,"can not get program item data",
|
||||||
"SELECT ItmCod," // row[0]
|
"SELECT ItmCod," // row[0]
|
||||||
"ItmInd," // row[1]
|
"ItmInd," // row[1]
|
||||||
"Hidden," // row[2]
|
"Level," // row[2]
|
||||||
"UsrCod," // row[3]
|
"Hidden," // row[3]
|
||||||
"UNIX_TIMESTAMP(StartTime)," // row[4]
|
"UsrCod," // row[4]
|
||||||
"UNIX_TIMESTAMP(EndTime)," // row[5]
|
"UNIX_TIMESTAMP(StartTime)," // row[5]
|
||||||
"NOW() BETWEEN StartTime AND EndTime," // row[6]
|
"UNIX_TIMESTAMP(EndTime)," // row[6]
|
||||||
"Title" // row[7]
|
"NOW() BETWEEN StartTime AND EndTime," // row[7]
|
||||||
|
"Title" // row[8]
|
||||||
" FROM prg_items"
|
" FROM prg_items"
|
||||||
" WHERE ItmCod=%ld AND CrsCod=%ld",
|
" WHERE ItmCod=%ld AND CrsCod=%ld",
|
||||||
Item->ItmCod,Gbl.Hierarchy.Crs.CrsCod);
|
Item->ItmCod,Gbl.Hierarchy.Crs.CrsCod);
|
||||||
|
@ -649,37 +676,41 @@ static void Prg_GetDataOfItem (struct ProgramItem *Item,
|
||||||
/*
|
/*
|
||||||
ItmCod row[0]
|
ItmCod row[0]
|
||||||
ItmInd row[1]
|
ItmInd row[1]
|
||||||
Hidden row[2]
|
Level row[2]
|
||||||
UsrCod row[3]
|
Hidden row[3]
|
||||||
UNIX_TIMESTAMP(StartTime) row[4]
|
UsrCod row[4]
|
||||||
UNIX_TIMESTAMP(EndTime) row[5]
|
UNIX_TIMESTAMP(StartTime) row[5]
|
||||||
NOW() BETWEEN StartTime AND EndTime row[6]
|
UNIX_TIMESTAMP(EndTime) row[6]
|
||||||
Title row[7]
|
NOW() BETWEEN StartTime AND EndTime row[7]
|
||||||
|
Title row[8]
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Get code of the program item (row[0]) */
|
/* Get code of the program item (row[0]) */
|
||||||
Item->ItmCod = Str_ConvertStrCodToLongCod (row[0]);
|
Item->ItmCod = Str_ConvertStrCodToLongCod (row[0]);
|
||||||
|
|
||||||
/* Get index of the program item (row[1]) */
|
/* Get index of the program item (row[1]) */
|
||||||
Item->ItmInd = Prg_GetItmIndFromStr (row[1]);
|
Item->ItmInd = Str_ConvertStrToUnsigned (row[1]);
|
||||||
|
|
||||||
/* Get whether the program item is hidden or not (row[2]) */
|
/* Get level of the program item (row[2]) */
|
||||||
Item->Hidden = (row[2][0] == 'Y');
|
Item->Level = Str_ConvertStrToUnsigned (row[2]);
|
||||||
|
|
||||||
/* Get author of the program item (row[3]) */
|
/* Get whether the program item is hidden or not (row[3]) */
|
||||||
Item->UsrCod = Str_ConvertStrCodToLongCod (row[3]);
|
Item->Hidden = (row[3][0] == 'Y');
|
||||||
|
|
||||||
/* Get start date (row[4] holds the start UTC time) */
|
/* Get author of the program item (row[4]) */
|
||||||
Item->TimeUTC[Dat_START_TIME] = Dat_GetUNIXTimeFromStr (row[4]);
|
Item->UsrCod = Str_ConvertStrCodToLongCod (row[4]);
|
||||||
|
|
||||||
/* Get end date (row[5] holds the end UTC time) */
|
/* Get start date (row[5] holds the start UTC time) */
|
||||||
Item->TimeUTC[Dat_END_TIME ] = Dat_GetUNIXTimeFromStr (row[5]);
|
Item->TimeUTC[Dat_START_TIME] = Dat_GetUNIXTimeFromStr (row[5]);
|
||||||
|
|
||||||
/* Get whether the program item is open or closed (row(6)) */
|
/* Get end date (row[6] holds the end UTC time) */
|
||||||
Item->Open = (row[6][0] == '1');
|
Item->TimeUTC[Dat_END_TIME ] = Dat_GetUNIXTimeFromStr (row[6]);
|
||||||
|
|
||||||
/* Get the title of the program item (row[7]) */
|
/* Get whether the program item is open or closed (row(7)) */
|
||||||
Str_Copy (Item->Title,row[7],
|
Item->Open = (row[7][0] == '1');
|
||||||
|
|
||||||
|
/* Get the title of the program item (row[8]) */
|
||||||
|
Str_Copy (Item->Title,row[8],
|
||||||
Prg_MAX_BYTES_PROGRAM_ITEM_TITLE);
|
Prg_MAX_BYTES_PROGRAM_ITEM_TITLE);
|
||||||
|
|
||||||
/* Can I do this program item? */
|
/* Can I do this program item? */
|
||||||
|
@ -690,19 +721,6 @@ static void Prg_GetDataOfItem (struct ProgramItem *Item,
|
||||||
DB_FreeMySQLResult (mysql_res);
|
DB_FreeMySQLResult (mysql_res);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
|
||||||
/******************* Get parameter with index of question ********************/
|
|
||||||
/*****************************************************************************/
|
|
||||||
|
|
||||||
static unsigned Prg_GetItmIndFromStr (const char *UnsignedStr)
|
|
||||||
{
|
|
||||||
long QstInd;
|
|
||||||
|
|
||||||
QstInd = Str_ConvertStrCodToLongCod (UnsignedStr);
|
|
||||||
return (QstInd > 0) ? (unsigned) QstInd :
|
|
||||||
0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/************************ Clear all program item data ************************/
|
/************************ Clear all program item data ************************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
@ -711,6 +729,7 @@ static void Prg_ResetItem (struct ProgramItem *Item)
|
||||||
{
|
{
|
||||||
Item->ItmCod = -1L;
|
Item->ItmCod = -1L;
|
||||||
Item->ItmInd = 0;
|
Item->ItmInd = 0;
|
||||||
|
Item->Level = 1;
|
||||||
Item->Hidden = false;
|
Item->Hidden = false;
|
||||||
Item->UsrCod = -1L;
|
Item->UsrCod = -1L;
|
||||||
Item->TimeUTC[Dat_START_TIME] =
|
Item->TimeUTC[Dat_START_TIME] =
|
||||||
|
@ -999,6 +1018,49 @@ void Prg_MoveDownPrgItem (void)
|
||||||
Prg_SeeCourseProgram ();
|
Prg_SeeCourseProgram ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
/**** Move right (increase level) position of an item in a course program ****/
|
||||||
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
void Prg_MoveRightPrgItem (void)
|
||||||
|
{
|
||||||
|
struct ProgramItem Item;
|
||||||
|
|
||||||
|
/***** Get program item code *****/
|
||||||
|
if ((Item.ItmCod = Prg_GetParamItmCod ()) == -1L)
|
||||||
|
Lay_ShowErrorAndExit ("Code of program item is missing.");
|
||||||
|
|
||||||
|
/***** Get data of the program item from database *****/
|
||||||
|
Prg_GetDataOfItemByCod (&Item);
|
||||||
|
|
||||||
|
/***** Move right item (increase level) *****/
|
||||||
|
// TODO: Implement
|
||||||
|
|
||||||
|
/***** Show program items again *****/
|
||||||
|
Prg_SeeCourseProgram ();
|
||||||
|
}
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
/**** Move left (decrease level) position of an item in a course program *****/
|
||||||
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
void Prg_MoveLeftPrgItem (void)
|
||||||
|
{
|
||||||
|
struct ProgramItem Item;
|
||||||
|
|
||||||
|
/***** Get program item code *****/
|
||||||
|
if ((Item.ItmCod = Prg_GetParamItmCod ()) == -1L)
|
||||||
|
Lay_ShowErrorAndExit ("Code of program item is missing.");
|
||||||
|
|
||||||
|
/***** Get data of the program item from database *****/
|
||||||
|
Prg_GetDataOfItemByCod (&Item);
|
||||||
|
|
||||||
|
/***** Move left item (decrease level) *****/
|
||||||
|
// TODO: Implement
|
||||||
|
|
||||||
|
/***** Show program items again *****/
|
||||||
|
Prg_SeeCourseProgram ();
|
||||||
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/**************** Get maximum item index in a course program *****************/
|
/**************** Get maximum item index in a course program *****************/
|
||||||
|
|
|
@ -43,6 +43,7 @@ struct ProgramItem
|
||||||
{
|
{
|
||||||
long ItmCod;
|
long ItmCod;
|
||||||
unsigned ItmInd;
|
unsigned ItmInd;
|
||||||
|
unsigned Level;
|
||||||
bool Hidden;
|
bool Hidden;
|
||||||
long UsrCod;
|
long UsrCod;
|
||||||
time_t TimeUTC[Dat_NUM_START_END_TIME];
|
time_t TimeUTC[Dat_NUM_START_END_TIME];
|
||||||
|
@ -68,12 +69,17 @@ void Prg_GetDataOfItemByCod (struct ProgramItem *PrgItem);
|
||||||
void Prg_FreeListItems (void);
|
void Prg_FreeListItems (void);
|
||||||
|
|
||||||
long Prg_GetParamItemCode (void);
|
long Prg_GetParamItemCode (void);
|
||||||
|
|
||||||
void Prg_ReqRemPrgItem (void);
|
void Prg_ReqRemPrgItem (void);
|
||||||
void Prg_RemovePrgItem (void);
|
void Prg_RemovePrgItem (void);
|
||||||
void Prg_HidePrgItem (void);
|
void Prg_HidePrgItem (void);
|
||||||
void Prg_ShowPrgItem (void);
|
void Prg_ShowPrgItem (void);
|
||||||
|
|
||||||
void Prg_MoveUpPrgItem (void);
|
void Prg_MoveUpPrgItem (void);
|
||||||
void Prg_MoveDownPrgItem (void);
|
void Prg_MoveDownPrgItem (void);
|
||||||
|
void Prg_MoveRightPrgItem (void);
|
||||||
|
void Prg_MoveLeftPrgItem (void);
|
||||||
|
|
||||||
void Prg_RecFormPrgItem (void);
|
void Prg_RecFormPrgItem (void);
|
||||||
bool Prg_CheckIfItemIsAssociatedToGrp (long PrgItmCod,long GrpCod);
|
bool Prg_CheckIfItemIsAssociatedToGrp (long PrgItmCod,long GrpCod);
|
||||||
void Prg_RemoveGroup (long GrpCod);
|
void Prg_RemoveGroup (long GrpCod);
|
||||||
|
|
|
@ -2416,6 +2416,19 @@ long Str_ConvertStrCodToLongCod (const char *Str)
|
||||||
return Code;
|
return Code;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
/******************* Get parameter with index of question ********************/
|
||||||
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
unsigned Str_ConvertStrToUnsigned (const char *UnsignedStr)
|
||||||
|
{
|
||||||
|
long LongNum = Str_ConvertStrCodToLongCod (UnsignedStr);
|
||||||
|
|
||||||
|
return (LongNum >= 0 &&
|
||||||
|
LongNum <= UINT_MAX) ? (unsigned) LongNum :
|
||||||
|
0;
|
||||||
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/**** Compute length of root (all except extension) of the name of a file ****/
|
/**** Compute length of root (all except extension) of the name of a file ****/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
|
@ -115,7 +115,10 @@ void Str_GetNextStringUntilSeparator (const char **StrSrc,char *StrDst,size_t Ma
|
||||||
void Str_GetNextStringUntilComma (const char **StrSrc,char *StrDst,size_t MaxLength);
|
void Str_GetNextStringUntilComma (const char **StrSrc,char *StrDst,size_t MaxLength);
|
||||||
void Str_ReplaceSeveralSpacesForOne (char *Str);
|
void Str_ReplaceSeveralSpacesForOne (char *Str);
|
||||||
void Str_CopyStrChangingSpaces (const char *StringWithSpaces,char *StringWithoutSpaces,unsigned MaxLength);
|
void Str_CopyStrChangingSpaces (const char *StringWithSpaces,char *StringWithoutSpaces,unsigned MaxLength);
|
||||||
|
|
||||||
long Str_ConvertStrCodToLongCod (const char *Str);
|
long Str_ConvertStrCodToLongCod (const char *Str);
|
||||||
|
unsigned Str_ConvertStrToUnsigned (const char *UnsignedStr);
|
||||||
|
|
||||||
size_t Str_GetLengthRootFileName (const char *FileName);
|
size_t Str_GetLengthRootFileName (const char *FileName);
|
||||||
void Str_SplitFullPathIntoPathAndFileName (const char FullPath[PATH_MAX + 1],
|
void Str_SplitFullPathIntoPathAndFileName (const char FullPath[PATH_MAX + 1],
|
||||||
char PathWithoutFileName[PATH_MAX + 1],
|
char PathWithoutFileName[PATH_MAX + 1],
|
||||||
|
|
|
@ -369,7 +369,7 @@ void Syl_LoadListItemsSyllabusIntoMemory (long CrsCod)
|
||||||
/***** Return to the start of the list *****/
|
/***** Return to the start of the list *****/
|
||||||
fseek (Gbl.F.XML,PostBeginList,SEEK_SET);
|
fseek (Gbl.F.XML,PostBeginList,SEEK_SET);
|
||||||
|
|
||||||
for (N = 1;
|
for (N = 1;
|
||||||
N <= Syl_MAX_LEVELS_SYLLABUS;
|
N <= Syl_MAX_LEVELS_SYLLABUS;
|
||||||
N++)
|
N++)
|
||||||
CodItem[N] = 0;
|
CodItem[N] = 0;
|
||||||
|
|
|
@ -4995,6 +4995,48 @@ const char *Txt_Actions[Act_NUM_ACTIONS] =
|
||||||
"" // Potrzebujesz tlumaczenie
|
"" // Potrzebujesz tlumaczenie
|
||||||
#elif L==9 // pt
|
#elif L==9 // pt
|
||||||
"" // Precisa de tradução
|
"" // Precisa de tradução
|
||||||
|
#endif
|
||||||
|
,
|
||||||
|
[ActRgtPrgItm] =
|
||||||
|
#if L==1 // ca
|
||||||
|
"" // Necessita traducció
|
||||||
|
#elif L==2 // de
|
||||||
|
"" // Need Übersetzung
|
||||||
|
#elif L==3 // en
|
||||||
|
"Move right program item"
|
||||||
|
#elif L==4 // es
|
||||||
|
"Mover a la derecha í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
|
||||||
|
,
|
||||||
|
[ActLftPrgItm] =
|
||||||
|
#if L==1 // ca
|
||||||
|
"" // Necessita traducció
|
||||||
|
#elif L==2 // de
|
||||||
|
"" // Need Übersetzung
|
||||||
|
#elif L==3 // en
|
||||||
|
"Move left program item"
|
||||||
|
#elif L==4 // es
|
||||||
|
"Mover a la izquierda í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
|
#endif
|
||||||
,
|
,
|
||||||
[ActSeeTchGui] =
|
[ActSeeTchGui] =
|
||||||
|
|
Loading…
Reference in New Issue