mirror of https://github.com/acanas/swad-core.git
Compare commits
3 Commits
f3d16e64c3
...
4d2b5debae
Author | SHA1 | Date |
---|---|---|
acanas | 4d2b5debae | |
acanas | de62eb7e5e | |
acanas | 12c503501e |
|
@ -491,44 +491,24 @@ const struct Act_Actions ActLst_Actions[ActLst_NUM_ACTIONS] =
|
|||
|
||||
// Syllabus
|
||||
[ActSeeSyl ] = {1242, 3,TabCrs,ActSeeSyl ,0x3F8,0x3C7, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_1ST_TAB,NULL ,Inf_ShowInfo },
|
||||
[ActSeeSylLec ] = { 28,-1,TabUnk,ActSeeSyl ,0x3F8,0x3C7, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_1ST_TAB,NULL ,Inf_ShowInfo },
|
||||
[ActSeeSylPra ] = { 20,-1,TabUnk,ActSeeSyl ,0x3F8,0x3C7, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_1ST_TAB,NULL ,Inf_ShowInfo },
|
||||
[ActEdiSylLec ] = { 44,-1,TabUnk,ActSeeSyl ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_1ST_TAB,NULL ,Inf_FormsToSelSendInfo },
|
||||
[ActEdiSylPra ] = { 74,-1,TabUnk,ActSeeSyl ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_1ST_TAB,NULL ,Inf_FormsToSelSendInfo },
|
||||
[ActDelItmSylLec ] = { 218,-1,TabUnk,ActSeeSyl ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_1ST_TAB,NULL ,Syl_RemoveItemSyllabus },
|
||||
[ActDelItmSylPra ] = { 183,-1,TabUnk,ActSeeSyl ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_1ST_TAB,NULL ,Syl_RemoveItemSyllabus },
|
||||
[ActUp_IteSylLec ] = { 221,-1,TabUnk,ActSeeSyl ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_1ST_TAB,NULL ,Syl_UpItemSyllabus },
|
||||
[ActUp_IteSylPra ] = { 213,-1,TabUnk,ActSeeSyl ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_1ST_TAB,NULL ,Syl_UpItemSyllabus },
|
||||
[ActDwnIteSylLec ] = { 220,-1,TabUnk,ActSeeSyl ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_1ST_TAB,NULL ,Syl_DownItemSyllabus },
|
||||
[ActDwnIteSylPra ] = { 212,-1,TabUnk,ActSeeSyl ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_1ST_TAB,NULL ,Syl_DownItemSyllabus },
|
||||
[ActRgtIteSylLec ] = { 223,-1,TabUnk,ActSeeSyl ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_1ST_TAB,NULL ,Syl_RightItemSyllabus },
|
||||
[ActRgtIteSylPra ] = { 215,-1,TabUnk,ActSeeSyl ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_1ST_TAB,NULL ,Syl_RightItemSyllabus },
|
||||
[ActLftIteSylLec ] = { 222,-1,TabUnk,ActSeeSyl ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_1ST_TAB,NULL ,Syl_LeftItemSyllabus },
|
||||
[ActLftIteSylPra ] = { 214,-1,TabUnk,ActSeeSyl ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_1ST_TAB,NULL ,Syl_LeftItemSyllabus },
|
||||
[ActInsIteSylLec ] = { 217,-1,TabUnk,ActSeeSyl ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_1ST_TAB,NULL ,Syl_InsertItemSyllabus },
|
||||
[ActInsIteSylPra ] = { 181,-1,TabUnk,ActSeeSyl ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_1ST_TAB,NULL ,Syl_InsertItemSyllabus },
|
||||
[ActModIteSylLec ] = { 211,-1,TabUnk,ActSeeSyl ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_1ST_TAB,NULL ,Syl_ModifyItemSyllabus },
|
||||
[ActModIteSylPra ] = { 216,-1,TabUnk,ActSeeSyl ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_1ST_TAB,NULL ,Syl_ModifyItemSyllabus },
|
||||
[ActChgFrcReaSylLec ] = { 871,-1,TabUnk,ActSeeSyl ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_1ST_TAB,NULL ,Inf_ChangeForceReadInfo },
|
||||
[ActChgFrcReaSylPra ] = { 872,-1,TabUnk,ActSeeSyl ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_1ST_TAB,NULL ,Inf_ChangeForceReadInfo },
|
||||
[ActChgHavReaSylLec ] = { 880,-1,TabUnk,ActSeeSyl ,0x008, 0, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_1ST_TAB,NULL ,Inf_ChangeIHaveReadInfo },
|
||||
[ActChgHavReaSylPra ] = { 887,-1,TabUnk,ActSeeSyl ,0x008, 0, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_1ST_TAB,NULL ,Inf_ChangeIHaveReadInfo },
|
||||
[ActSelInfSrcSylLec ] = { 378,-1,TabUnk,ActSeeSyl ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_1ST_TAB,NULL ,Inf_SetInfoSrc },
|
||||
[ActSelInfSrcSylPra ] = { 382,-1,TabUnk,ActSeeSyl ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_1ST_TAB,NULL ,Inf_SetInfoSrc },
|
||||
[ActRcvURLSylLec ] = { 403,-1,TabUnk,ActSeeSyl ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_1ST_TAB,NULL ,Inf_ReceiveURLInfo },
|
||||
[ActRcvURLSylPra ] = { 402,-1,TabUnk,ActSeeSyl ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_1ST_TAB,NULL ,Inf_ReceiveURLInfo },
|
||||
[ActRcvPagSylLec ] = { 381,-1,TabUnk,ActSeeSyl ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_DATA,Act_1ST_TAB,NULL ,Inf_ReceivePagInfo },
|
||||
[ActRcvPagSylPra ] = { 383,-1,TabUnk,ActSeeSyl ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_DATA,Act_1ST_TAB,NULL ,Inf_ReceivePagInfo },
|
||||
[ActEditorSylLec ] = { 372,-1,TabUnk,ActSeeSyl ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_1ST_TAB,NULL ,Syl_EditSyllabus },
|
||||
[ActEditorSylPra ] = { 371,-1,TabUnk,ActSeeSyl ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_1ST_TAB,NULL ,Syl_EditSyllabus },
|
||||
[ActPlaTxtEdiSylLec ] = { 379,-1,TabUnk,ActSeeSyl ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_1ST_TAB,NULL ,Inf_EditPlainTxtInfo },
|
||||
[ActPlaTxtEdiSylPra ] = { 389,-1,TabUnk,ActSeeSyl ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_1ST_TAB,NULL ,Inf_EditPlainTxtInfo },
|
||||
[ActRchTxtEdiSylLec ] = {1095,-1,TabUnk,ActSeeSyl ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_1ST_TAB,NULL ,Inf_EditRichTxtInfo },
|
||||
[ActRchTxtEdiSylPra ] = {1096,-1,TabUnk,ActSeeSyl ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_1ST_TAB,NULL ,Inf_EditRichTxtInfo },
|
||||
[ActRcvPlaTxtSylLec ] = { 394,-1,TabUnk,ActSeeSyl ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_1ST_TAB,NULL ,Inf_RecAndChangePlainTxtInfo },
|
||||
[ActRcvPlaTxtSylPra ] = { 396,-1,TabUnk,ActSeeSyl ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_1ST_TAB,NULL ,Inf_RecAndChangePlainTxtInfo },
|
||||
[ActRcvRchTxtSylLec ] = {1103,-1,TabUnk,ActSeeSyl ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_1ST_TAB,NULL ,Inf_RecAndChangeRichTxtInfo },
|
||||
[ActRcvRchTxtSylPra ] = {1104,-1,TabUnk,ActSeeSyl ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_1ST_TAB,NULL ,Inf_RecAndChangeRichTxtInfo },
|
||||
[ActEdiSyl ] = { 44,-1,TabUnk,ActSeeSyl ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_1ST_TAB,NULL ,Inf_FormsToSelSendInfo },
|
||||
[ActDelItmSyl ] = { 218,-1,TabUnk,ActSeeSyl ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_1ST_TAB,NULL ,Syl_RemoveItemSyllabus },
|
||||
[ActUp_IteSyl ] = { 221,-1,TabUnk,ActSeeSyl ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_1ST_TAB,NULL ,Syl_UpItemSyllabus },
|
||||
[ActDwnIteSyl ] = { 220,-1,TabUnk,ActSeeSyl ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_1ST_TAB,NULL ,Syl_DownItemSyllabus },
|
||||
[ActRgtIteSyl ] = { 223,-1,TabUnk,ActSeeSyl ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_1ST_TAB,NULL ,Syl_RightItemSyllabus },
|
||||
[ActLftIteSyl ] = { 222,-1,TabUnk,ActSeeSyl ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_1ST_TAB,NULL ,Syl_LeftItemSyllabus },
|
||||
[ActInsIteSyl ] = { 217,-1,TabUnk,ActSeeSyl ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_1ST_TAB,NULL ,Syl_InsertItemSyllabus },
|
||||
[ActModIteSyl ] = { 211,-1,TabUnk,ActSeeSyl ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_1ST_TAB,NULL ,Syl_ModifyItemSyllabus },
|
||||
[ActChgFrcReaSyl ] = { 871,-1,TabUnk,ActSeeSyl ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_1ST_TAB,NULL ,Inf_ChangeForceReadInfo },
|
||||
[ActChgHavReaSyl ] = { 880,-1,TabUnk,ActSeeSyl ,0x008, 0, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_1ST_TAB,NULL ,Inf_ChangeIHaveReadInfo },
|
||||
[ActSelInfSrcSyl ] = { 378,-1,TabUnk,ActSeeSyl ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_1ST_TAB,NULL ,Inf_SetInfoSrc },
|
||||
[ActRcvURLSyl ] = { 403,-1,TabUnk,ActSeeSyl ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_1ST_TAB,NULL ,Inf_ReceiveURLInfo },
|
||||
[ActRcvPagSyl ] = { 381,-1,TabUnk,ActSeeSyl ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_DATA,Act_1ST_TAB,NULL ,Inf_ReceivePagInfo },
|
||||
[ActEditorSyl ] = { 372,-1,TabUnk,ActSeeSyl ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_1ST_TAB,NULL ,Syl_EditSyllabus },
|
||||
[ActPlaTxtEdiSyl ] = { 379,-1,TabUnk,ActSeeSyl ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_1ST_TAB,NULL ,Inf_EditPlainTxtInfo },
|
||||
[ActRchTxtEdiSyl ] = {1095,-1,TabUnk,ActSeeSyl ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_1ST_TAB,NULL ,Inf_EditRichTxtInfo },
|
||||
[ActRcvPlaTxtSyl ] = { 394,-1,TabUnk,ActSeeSyl ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_1ST_TAB,NULL ,Inf_RecAndChangePlainTxtInfo },
|
||||
[ActRcvRchTxtSyl ] = {1103,-1,TabUnk,ActSeeSyl ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_1ST_TAB,NULL ,Inf_RecAndChangeRichTxtInfo },
|
||||
|
||||
// Bibliography
|
||||
[ActSeeBib ] = { 32, 4,TabCrs,ActSeeBib ,0x3F8,0x3C7, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_1ST_TAB,NULL ,Inf_ShowInfo },
|
||||
|
@ -1851,7 +1831,7 @@ Act_Action_t ActLst_FromActCodToAction[1 + ActLst_MAX_ACTION_COD] = // Do not re
|
|||
ActSeeAdmMrk, // #17
|
||||
ActUnk, // #18 (obsolete action)
|
||||
ActUnk, // #19 (obsolete action)
|
||||
ActSeeSylPra, // #20
|
||||
ActUnk, // #20 (obsolete action)
|
||||
ActUnk, // #21 (obsolete action)
|
||||
ActSeeRecSevTch, // #22
|
||||
ActAdmBrf, // #23
|
||||
|
@ -1859,7 +1839,7 @@ Act_Action_t ActLst_FromActCodToAction[1 + ActLst_MAX_ACTION_COD] = // Do not re
|
|||
ActSeeCrsTT, // #25
|
||||
ActReqMsgUsr, // #26
|
||||
ActRcvMsgUsr, // #27
|
||||
ActSeeSylLec, // #28
|
||||
ActUnk, // #28 (obsolete action)
|
||||
ActSeeTst, // #29
|
||||
ActReqMyPho, // #30
|
||||
ActUnk, // #31 (obsolete action)
|
||||
|
@ -1875,7 +1855,7 @@ Act_Action_t ActLst_FromActCodToAction[1 + ActLst_MAX_ACTION_COD] = // Do not re
|
|||
ActUnk, // #41 (obsolete action)
|
||||
ActLstStdAll, // #42
|
||||
ActUnk, // #43 (obsolete action)
|
||||
ActEdiSylLec, // #44
|
||||
ActEdiSyl, // #44
|
||||
ActEdiCrsTT, // #45
|
||||
ActUnk, // #46 (obsolete action)
|
||||
ActUnk, // #47 (obsolete action)
|
||||
|
@ -1905,7 +1885,7 @@ Act_Action_t ActLst_FromActCodToAction[1 + ActLst_MAX_ACTION_COD] = // Do not re
|
|||
ActUnk, // #71 (obsolete action)
|
||||
ActUnk, // #72 (obsolete action)
|
||||
ActRemNot, // #73
|
||||
ActEdiSylPra, // #74
|
||||
ActUnk, // #74 (obsolete action)
|
||||
ActUnk, // #75 (obsolete action)
|
||||
ActEdiBib, // #76
|
||||
ActUnk, // #77 (obsolete action)
|
||||
|
@ -2012,9 +1992,9 @@ Act_Action_t ActLst_FromActCodToAction[1 + ActLst_MAX_ACTION_COD] = // Do not re
|
|||
ActUnk, // #178 (obsolete action)
|
||||
ActPrnCfe, // #179
|
||||
ActUnk, // #180 (obsolete action)
|
||||
ActInsIteSylPra, // #181
|
||||
ActUnk, // #181 (obsolete action)
|
||||
ActRcvURLCrsLnk, // #182
|
||||
ActDelItmSylPra, // #183
|
||||
ActUnk, // #183 (obsolete action)
|
||||
ActRcvPagAss, // #184
|
||||
ActRcvPagBib, // #185
|
||||
ActUnk, // #186 (obsolete action)
|
||||
|
@ -2042,19 +2022,19 @@ Act_Action_t ActLst_FromActCodToAction[1 + ActLst_MAX_ACTION_COD] = // Do not re
|
|||
ActRenFolWrkCrs, // #208
|
||||
ActRemFilWrkCrs, // #209
|
||||
ActRemFolWrkCrs, // #210
|
||||
ActModIteSylLec, // #211
|
||||
ActDwnIteSylPra, // #212
|
||||
ActUp_IteSylPra, // #213
|
||||
ActLftIteSylPra, // #214
|
||||
ActRgtIteSylPra, // #215
|
||||
ActModIteSylPra, // #216
|
||||
ActInsIteSylLec, // #217
|
||||
ActDelItmSylLec, // #218
|
||||
ActModIteSyl, // #211
|
||||
ActUnk, // #212 (obsolete action)
|
||||
ActUnk, // #213 (obsolete action)
|
||||
ActUnk, // #214 (obsolete action)
|
||||
ActUnk, // #215 (obsolete action)
|
||||
ActUnk, // #216 (obsolete action)
|
||||
ActInsIteSyl, // #217
|
||||
ActDelItmSyl, // #218
|
||||
ActRcvPagFAQ, // #219
|
||||
ActDwnIteSylLec, // #220
|
||||
ActUp_IteSylLec, // #221
|
||||
ActLftIteSylLec, // #222
|
||||
ActRgtIteSylLec, // #223
|
||||
ActDwnIteSyl, // #220
|
||||
ActUp_IteSyl, // #221
|
||||
ActLftIteSyl, // #222
|
||||
ActRgtIteSyl, // #223
|
||||
ActRcvURLBib, // #224
|
||||
ActUnk, // #225 (obsolete action)
|
||||
ActUnk, // #226 (obsolete action)
|
||||
|
@ -2202,39 +2182,39 @@ Act_Action_t ActLst_FromActCodToAction[1 + ActLst_MAX_ACTION_COD] = // Do not re
|
|||
ActUnk, // #368 (obsolete action)
|
||||
ActUnk, // #369 (obsolete action)
|
||||
ActSelInfSrcBib, // #370
|
||||
ActEditorSylPra, // #371
|
||||
ActEditorSylLec, // #372
|
||||
ActUnk, // #371 (obsolete action)
|
||||
ActEditorSyl, // #372
|
||||
ActUnk, // #373 (obsolete action)
|
||||
ActUnk, // #374 (obsolete action)
|
||||
ActUnk, // #375 (obsolete action)
|
||||
ActEditorBib, // #376
|
||||
ActPlaTxtEdiBib, // #377
|
||||
ActSelInfSrcSylLec, // #378
|
||||
ActPlaTxtEdiSylLec, // #379
|
||||
ActSelInfSrcSyl, // #378
|
||||
ActPlaTxtEdiSyl, // #379
|
||||
ActSelInfSrcFAQ, // #380
|
||||
ActRcvPagSylLec, // #381
|
||||
ActSelInfSrcSylPra, // #382
|
||||
ActRcvPagSylPra, // #383
|
||||
ActRcvPagSyl, // #381
|
||||
ActUnk, // #382 (obsolete action)
|
||||
ActUnk, // #383 (obsolete action)
|
||||
ActSelInfSrcAss, // #384
|
||||
ActSelInfSrcCrsLnk, // #385
|
||||
ActEditorAss, // #386
|
||||
ActPlaTxtEdiAss, // #387
|
||||
ActEditorCrsLnk, // #388
|
||||
ActPlaTxtEdiSylPra, // #389
|
||||
ActUnk, // #389 (obsolete action)
|
||||
ActUnk, // #390 (obsolete action)
|
||||
ActUnk, // #391 (obsolete action)
|
||||
ActUnk, // #392 (obsolete action)
|
||||
ActUnk, // #393 (obsolete action)
|
||||
ActRcvPlaTxtSylLec, // #394
|
||||
ActRcvPlaTxtSyl, // #394
|
||||
ActUnk, // #395 (obsolete action)
|
||||
ActRcvPlaTxtSylPra, // #396
|
||||
ActUnk, // #396 (obsolete action)
|
||||
ActRcvPlaTxtAss, // #397
|
||||
ActRcvPlaTxtBib, // #398
|
||||
ActUnk, // #399 (obsolete action)
|
||||
ActPlaTxtEdiCrsLnk, // #400
|
||||
ActRcvPlaTxtCrsLnk, // #401
|
||||
ActRcvURLSylPra, // #402
|
||||
ActRcvURLSylLec, // #403
|
||||
ActUnk, // #402 (obsolete action)
|
||||
ActRcvURLSyl, // #403
|
||||
ActEditorFAQ, // #404
|
||||
ActPlaTxtEdiFAQ, // #405
|
||||
ActRcvPlaTxtFAQ, // #406
|
||||
|
@ -2702,8 +2682,8 @@ Act_Action_t ActLst_FromActCodToAction[1 + ActLst_MAX_ACTION_COD] = // Do not re
|
|||
ActDelThrForCrsUsr, // #868
|
||||
ActReqDelThrCrsTch, // #869
|
||||
ActChgFrcReaTchGui, // #870
|
||||
ActChgFrcReaSylLec, // #871
|
||||
ActChgFrcReaSylPra, // #872
|
||||
ActChgFrcReaSyl, // #871
|
||||
ActUnk, // #872 (obsolete action)
|
||||
ActChgFrcReaBib, // #873
|
||||
ActChgFrcReaFAQ, // #874
|
||||
ActChgFrcReaCrsLnk, // #875
|
||||
|
@ -2711,14 +2691,14 @@ Act_Action_t ActLst_FromActCodToAction[1 + ActLst_MAX_ACTION_COD] = // Do not re
|
|||
ActChgFrcReaCrsInf, // #877
|
||||
ActChgHavReaCrsInf, // #878
|
||||
ActChgHavReaFAQ, // #879
|
||||
ActChgHavReaSylLec, // #880
|
||||
ActChgHavReaSyl, // #880
|
||||
ActReqDelThrSWAUsr, // #881
|
||||
ActDelThrForSWAUsr, // #882
|
||||
ActChgFrcReaAss, // #883
|
||||
ActChgHavReaBib, // #884
|
||||
ActChgHavReaCrsLnk, // #885
|
||||
ActChgHavReaTchGui, // #886
|
||||
ActChgHavReaSylPra, // #887
|
||||
ActUnk, // #887 (obsolete action)
|
||||
ActChgPlgDes, // #888
|
||||
ActRemPlg, // #889
|
||||
ActCutThrForSWAUsr, // #890
|
||||
|
@ -2926,16 +2906,16 @@ Act_Action_t ActLst_FromActCodToAction[1 + ActLst_MAX_ACTION_COD] = // Do not re
|
|||
ActChgIco, // #1092
|
||||
ActRchTxtEdiCrsInf, // #1093
|
||||
ActRchTxtEdiTchGui, // #1094
|
||||
ActRchTxtEdiSylLec, // #1095
|
||||
ActRchTxtEdiSylPra, // #1096
|
||||
ActRchTxtEdiSyl, // #1095
|
||||
ActUnk, // #1096 (obsolete action)
|
||||
ActRchTxtEdiBib, // #1097
|
||||
ActRchTxtEdiFAQ, // #1098
|
||||
ActRchTxtEdiCrsLnk, // #1099
|
||||
ActRchTxtEdiAss, // #1100
|
||||
ActRcvRchTxtCrsInf, // #1101
|
||||
ActRcvRchTxtTchGui, // #1102
|
||||
ActRcvRchTxtSylLec, // #1103
|
||||
ActRcvRchTxtSylPra, // #1104
|
||||
ActRcvRchTxtSyl, // #1103
|
||||
ActUnk, // #1104 (obsolete action)
|
||||
ActRcvRchTxtBib, // #1105
|
||||
ActRcvRchTxtFAQ, // #1106
|
||||
ActRcvRchTxtCrsLnk, // #1107
|
||||
|
@ -3569,9 +3549,9 @@ Act_Action_t ActLst_FromActCodToAction[1 + ActLst_MAX_ACTION_COD] = // Do not re
|
|||
ActFrmAccOth, // #1735
|
||||
ActFrmAccStd, // #1736
|
||||
ActFrmAccTch, // #1737
|
||||
ActRemNicOth, // #1738
|
||||
ActRemNicStd, // #1739
|
||||
ActRemNicTch, // #1740
|
||||
ActRemNicOth, // #1738
|
||||
ActRemNicStd, // #1739
|
||||
ActRemNicTch, // #1740
|
||||
ActChgNicOth, // #1741
|
||||
ActChgNicStd, // #1742
|
||||
ActChgNicTch, // #1743
|
||||
|
|
|
@ -431,44 +431,24 @@ typedef enum
|
|||
// Syllabus ----------------------------------------------------------------
|
||||
|
||||
ActSeeSyl,
|
||||
ActSeeSylLec,
|
||||
ActSeeSylPra,
|
||||
ActEdiSylLec,
|
||||
ActEdiSylPra,
|
||||
ActDelItmSylLec,
|
||||
ActDelItmSylPra,
|
||||
ActUp_IteSylLec,
|
||||
ActUp_IteSylPra,
|
||||
ActDwnIteSylLec,
|
||||
ActDwnIteSylPra,
|
||||
ActRgtIteSylLec,
|
||||
ActRgtIteSylPra,
|
||||
ActLftIteSylLec,
|
||||
ActLftIteSylPra,
|
||||
ActInsIteSylLec,
|
||||
ActInsIteSylPra,
|
||||
ActModIteSylLec,
|
||||
ActModIteSylPra,
|
||||
ActChgFrcReaSylLec,
|
||||
ActChgFrcReaSylPra,
|
||||
ActChgHavReaSylLec,
|
||||
ActChgHavReaSylPra,
|
||||
ActSelInfSrcSylLec,
|
||||
ActSelInfSrcSylPra,
|
||||
ActRcvURLSylLec,
|
||||
ActRcvURLSylPra,
|
||||
ActRcvPagSylLec,
|
||||
ActRcvPagSylPra,
|
||||
ActEditorSylLec,
|
||||
ActEditorSylPra,
|
||||
ActPlaTxtEdiSylLec,
|
||||
ActPlaTxtEdiSylPra,
|
||||
ActRchTxtEdiSylLec,
|
||||
ActRchTxtEdiSylPra,
|
||||
ActRcvPlaTxtSylLec,
|
||||
ActRcvPlaTxtSylPra,
|
||||
ActRcvRchTxtSylLec,
|
||||
ActRcvRchTxtSylPra,
|
||||
ActEdiSyl,
|
||||
ActDelItmSyl,
|
||||
ActUp_IteSyl,
|
||||
ActDwnIteSyl,
|
||||
ActRgtIteSyl,
|
||||
ActLftIteSyl,
|
||||
ActInsIteSyl,
|
||||
ActModIteSyl,
|
||||
ActChgFrcReaSyl,
|
||||
ActChgHavReaSyl,
|
||||
ActSelInfSrcSyl,
|
||||
ActRcvURLSyl,
|
||||
ActRcvPagSyl,
|
||||
ActEditorSyl,
|
||||
ActPlaTxtEdiSyl,
|
||||
ActRchTxtEdiSyl,
|
||||
ActRcvPlaTxtSyl,
|
||||
ActRcvRchTxtSyl,
|
||||
|
||||
// Bibliography ------------------------------------------------------------
|
||||
|
||||
|
|
|
@ -1127,7 +1127,7 @@ static void Brw_WriteSubtitleOfFileBrowser (void);
|
|||
static void Brw_InitHiddenLevels (void);
|
||||
|
||||
static void Brw_PutCheckboxFullTree (void);
|
||||
static void Brw_PutParsFullTree (void);
|
||||
static void Brw_PutParsFullTree (__attribute__((unused)) void *Args);
|
||||
static bool Brw_GetFullTreeFromForm (void);
|
||||
|
||||
static void Brw_GetAndUpdateDateLastAccFileBrowser (void);
|
||||
|
@ -3587,13 +3587,13 @@ static void Brw_PutCheckboxFullTree (void)
|
|||
extern const char *Txt_Show_all_files;
|
||||
|
||||
Lay_PutContextualCheckbox (Brw_ActSeeAdm[Gbl.FileBrowser.Type],
|
||||
Brw_PutParsFullTree,
|
||||
Brw_PutParsFullTree,NULL,
|
||||
"FullTree",
|
||||
Gbl.FileBrowser.FullTree,false,
|
||||
Txt_Show_all_files,Txt_Show_all_files);
|
||||
}
|
||||
|
||||
static void Brw_PutParsFullTree (void)
|
||||
static void Brw_PutParsFullTree (__attribute__((unused)) void *Args)
|
||||
{
|
||||
if (Brw_TypeIsGrpBrw[Gbl.FileBrowser.Type])
|
||||
ParCod_PutPar (ParCod_Grp,Gbl.Crs.Grps.GrpCod);
|
||||
|
|
|
@ -633,10 +633,13 @@ Me sale este error, no s
|
|||
"can npt create received message (duplicated entry '243218-2160773' for key 'UsrCod_MsgCod')
|
||||
*/
|
||||
|
||||
#define Log_PLATFORM_VERSION "SWAD 23.70 (2024-03-19)"
|
||||
#define Log_PLATFORM_VERSION "SWAD 23.71 (2024-03-20)"
|
||||
#define CSS_FILE "swad23.67.2.css"
|
||||
#define JS_FILE "swad23.53.6.js"
|
||||
/*
|
||||
Version 23.71: Mar 20, 2024 Actions for syllabus unified for lectures and practicals. (334868 lines)
|
||||
Version 23.70.2: Mar 19, 2024 Changes in course info. (335353 lines)
|
||||
Version 23.70.1: Mar 19, 2024 Bug fixing in syllabus. (335429 lines)
|
||||
Version 23.70: Mar 19, 2024 Code refactoring and bug fixing in syllabus. (335413 lines)
|
||||
Version 23.69: Mar 14, 2024 Actions defined as enum type. (335591 lines)
|
||||
Version 23.68.1: Mar 14, 2024 Code refactoring in menu icons. (335591 lines)
|
||||
|
|
447
swad_info.c
447
swad_info.c
|
@ -83,8 +83,8 @@ static const Act_Action_t Inf_ActionsInfo[Inf_NUM_SOURCES][Inf_NUM_TYPES] =
|
|||
|
||||
[Inf_EDITOR ][Inf_INTRODUCTION ] = ActEditorCrsInf,
|
||||
[Inf_EDITOR ][Inf_TEACHING_GUIDE] = ActEditorTchGui,
|
||||
[Inf_EDITOR ][Inf_LECTURES ] = ActEditorSylLec,
|
||||
[Inf_EDITOR ][Inf_PRACTICALS ] = ActEditorSylPra,
|
||||
[Inf_EDITOR ][Inf_LECTURES ] = ActEditorSyl,
|
||||
[Inf_EDITOR ][Inf_PRACTICALS ] = ActEditorSyl,
|
||||
[Inf_EDITOR ][Inf_BIBLIOGRAPHY ] = ActEditorBib,
|
||||
[Inf_EDITOR ][Inf_FAQ ] = ActEditorFAQ,
|
||||
[Inf_EDITOR ][Inf_LINKS ] = ActEditorCrsLnk,
|
||||
|
@ -92,8 +92,8 @@ static const Act_Action_t Inf_ActionsInfo[Inf_NUM_SOURCES][Inf_NUM_TYPES] =
|
|||
|
||||
[Inf_PLAIN_TEXT][Inf_INTRODUCTION ] = ActPlaTxtEdiCrsInf,
|
||||
[Inf_PLAIN_TEXT][Inf_TEACHING_GUIDE] = ActPlaTxtEdiTchGui,
|
||||
[Inf_PLAIN_TEXT][Inf_LECTURES ] = ActPlaTxtEdiSylLec,
|
||||
[Inf_PLAIN_TEXT][Inf_PRACTICALS ] = ActPlaTxtEdiSylPra,
|
||||
[Inf_PLAIN_TEXT][Inf_LECTURES ] = ActPlaTxtEdiSyl,
|
||||
[Inf_PLAIN_TEXT][Inf_PRACTICALS ] = ActPlaTxtEdiSyl,
|
||||
[Inf_PLAIN_TEXT][Inf_BIBLIOGRAPHY ] = ActPlaTxtEdiBib,
|
||||
[Inf_PLAIN_TEXT][Inf_FAQ ] = ActPlaTxtEdiFAQ,
|
||||
[Inf_PLAIN_TEXT][Inf_LINKS ] = ActPlaTxtEdiCrsLnk,
|
||||
|
@ -101,8 +101,8 @@ static const Act_Action_t Inf_ActionsInfo[Inf_NUM_SOURCES][Inf_NUM_TYPES] =
|
|||
|
||||
[Inf_RICH_TEXT ][Inf_INTRODUCTION ] = ActRchTxtEdiCrsInf,
|
||||
[Inf_RICH_TEXT ][Inf_TEACHING_GUIDE] = ActRchTxtEdiTchGui,
|
||||
[Inf_RICH_TEXT ][Inf_LECTURES ] = ActRchTxtEdiSylLec,
|
||||
[Inf_RICH_TEXT ][Inf_PRACTICALS ] = ActRchTxtEdiSylPra,
|
||||
[Inf_RICH_TEXT ][Inf_LECTURES ] = ActRchTxtEdiSyl,
|
||||
[Inf_RICH_TEXT ][Inf_PRACTICALS ] = ActRchTxtEdiSyl,
|
||||
[Inf_RICH_TEXT ][Inf_BIBLIOGRAPHY ] = ActRchTxtEdiBib,
|
||||
[Inf_RICH_TEXT ][Inf_FAQ ] = ActRchTxtEdiFAQ,
|
||||
[Inf_RICH_TEXT ][Inf_LINKS ] = ActRchTxtEdiCrsLnk,
|
||||
|
@ -110,8 +110,8 @@ static const Act_Action_t Inf_ActionsInfo[Inf_NUM_SOURCES][Inf_NUM_TYPES] =
|
|||
|
||||
[Inf_PAGE ][Inf_INTRODUCTION ] = ActRcvPagCrsInf,
|
||||
[Inf_PAGE ][Inf_TEACHING_GUIDE] = ActRcvPagTchGui,
|
||||
[Inf_PAGE ][Inf_LECTURES ] = ActRcvPagSylLec,
|
||||
[Inf_PAGE ][Inf_PRACTICALS ] = ActRcvPagSylPra,
|
||||
[Inf_PAGE ][Inf_LECTURES ] = ActRcvPagSyl,
|
||||
[Inf_PAGE ][Inf_PRACTICALS ] = ActRcvPagSyl,
|
||||
[Inf_PAGE ][Inf_BIBLIOGRAPHY ] = ActRcvPagBib,
|
||||
[Inf_PAGE ][Inf_FAQ ] = ActRcvPagFAQ,
|
||||
[Inf_PAGE ][Inf_LINKS ] = ActRcvPagCrsLnk,
|
||||
|
@ -119,8 +119,8 @@ static const Act_Action_t Inf_ActionsInfo[Inf_NUM_SOURCES][Inf_NUM_TYPES] =
|
|||
|
||||
[Inf_URL ][Inf_INTRODUCTION ] = ActRcvURLCrsInf,
|
||||
[Inf_URL ][Inf_TEACHING_GUIDE] = ActRcvURLTchGui,
|
||||
[Inf_URL ][Inf_LECTURES ] = ActRcvURLSylLec,
|
||||
[Inf_URL ][Inf_PRACTICALS ] = ActRcvURLSylPra,
|
||||
[Inf_URL ][Inf_LECTURES ] = ActRcvURLSyl,
|
||||
[Inf_URL ][Inf_PRACTICALS ] = ActRcvURLSyl,
|
||||
[Inf_URL ][Inf_BIBLIOGRAPHY ] = ActRcvURLBib,
|
||||
[Inf_URL ][Inf_FAQ ] = ActRcvURLFAQ,
|
||||
[Inf_URL ][Inf_LINKS ] = ActRcvURLCrsLnk,
|
||||
|
@ -242,58 +242,60 @@ void Inf_ShowInfo (void)
|
|||
break;
|
||||
}
|
||||
|
||||
/****** Form to select syllabus *****/
|
||||
Syl_PutFormWhichSyllabus (Syllabus.WhichSyllabus);
|
||||
/***** Begin box *****/
|
||||
Box_BoxBegin (Txt_INFO_TITLE[Gbl.Crs.Info.Type],
|
||||
ICanEdit ? Inf_PutIconToEditInfo :
|
||||
NULL,
|
||||
ICanEdit ? &Gbl.Crs.Info.Type :
|
||||
NULL,
|
||||
Help[Gbl.Crs.Info.Type],Box_NOT_CLOSABLE);
|
||||
|
||||
switch (FromDB.Src)
|
||||
{
|
||||
case Inf_NONE:
|
||||
ShowWarningNoInfo = true;
|
||||
break;
|
||||
case Inf_EDITOR:
|
||||
switch (Gbl.Crs.Info.Type)
|
||||
{
|
||||
case Inf_LECTURES:
|
||||
case Inf_PRACTICALS:
|
||||
ShowWarningNoInfo = !Syl_CheckAndShowSyllabus (&Syllabus);
|
||||
break;
|
||||
case Inf_INTRODUCTION:
|
||||
case Inf_TEACHING_GUIDE:
|
||||
case Inf_BIBLIOGRAPHY:
|
||||
case Inf_FAQ:
|
||||
case Inf_LINKS:
|
||||
case Inf_ASSESSMENT:
|
||||
ShowWarningNoInfo = true;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case Inf_PLAIN_TEXT:
|
||||
ShowWarningNoInfo = !Inf_CheckAndShowPlainTxt ();
|
||||
break;
|
||||
case Inf_RICH_TEXT:
|
||||
ShowWarningNoInfo = !Inf_CheckAndShowRichTxt ();
|
||||
break;
|
||||
case Inf_PAGE:
|
||||
/***** Open file with web page *****/
|
||||
ShowWarningNoInfo = !Inf_CheckAndShowPage ();
|
||||
break;
|
||||
case Inf_URL:
|
||||
/***** Check if file with URL exists *****/
|
||||
ShowWarningNoInfo = !Inf_CheckAndShowURL ();
|
||||
break;
|
||||
}
|
||||
/****** Form to select syllabus *****/
|
||||
Syl_PutFormWhichSyllabus (Syllabus.WhichSyllabus);
|
||||
|
||||
if (ShowWarningNoInfo)
|
||||
{
|
||||
Box_BoxBegin (Txt_INFO_TITLE[Gbl.Crs.Info.Type],
|
||||
ICanEdit ? Inf_PutIconToEditInfo :
|
||||
NULL,
|
||||
ICanEdit ? &Gbl.Crs.Info.Type :
|
||||
NULL,
|
||||
Help[Gbl.Crs.Info.Type],Box_NOT_CLOSABLE);
|
||||
switch (FromDB.Src)
|
||||
{
|
||||
case Inf_NONE:
|
||||
ShowWarningNoInfo = true;
|
||||
break;
|
||||
case Inf_EDITOR:
|
||||
switch (Gbl.Crs.Info.Type)
|
||||
{
|
||||
case Inf_LECTURES:
|
||||
case Inf_PRACTICALS:
|
||||
ShowWarningNoInfo = !Syl_CheckAndShowSyllabus (&Syllabus);
|
||||
break;
|
||||
case Inf_INTRODUCTION:
|
||||
case Inf_TEACHING_GUIDE:
|
||||
case Inf_BIBLIOGRAPHY:
|
||||
case Inf_FAQ:
|
||||
case Inf_LINKS:
|
||||
case Inf_ASSESSMENT:
|
||||
ShowWarningNoInfo = true;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case Inf_PLAIN_TEXT:
|
||||
ShowWarningNoInfo = !Inf_CheckAndShowPlainTxt ();
|
||||
break;
|
||||
case Inf_RICH_TEXT:
|
||||
ShowWarningNoInfo = !Inf_CheckAndShowRichTxt ();
|
||||
break;
|
||||
case Inf_PAGE:
|
||||
/***** Open file with web page *****/
|
||||
ShowWarningNoInfo = !Inf_CheckAndShowPage ();
|
||||
break;
|
||||
case Inf_URL:
|
||||
/***** Check if file with URL exists *****/
|
||||
ShowWarningNoInfo = !Inf_CheckAndShowURL ();
|
||||
break;
|
||||
}
|
||||
|
||||
if (ShowWarningNoInfo)
|
||||
Ale_ShowAlert (Ale_INFO,Txt_No_information);
|
||||
Box_BoxEnd ();
|
||||
}
|
||||
|
||||
/***** End box *****/
|
||||
Box_BoxEnd ();
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -312,8 +314,8 @@ static void Inf_PutIconToViewInfo (void *Type)
|
|||
{
|
||||
[Inf_INTRODUCTION ] = {ActSeeCrsInf,NULL,NULL},
|
||||
[Inf_TEACHING_GUIDE] = {ActSeeTchGui,NULL,NULL},
|
||||
[Inf_LECTURES ] = {ActSeeSylLec,Syl_PutParWhichSyllabus,&Syl_WhichSyllabus[Syl_LECTURES ]},
|
||||
[Inf_PRACTICALS ] = {ActSeeSylPra,Syl_PutParWhichSyllabus,&Syl_WhichSyllabus[Syl_PRACTICALS]},
|
||||
[Inf_LECTURES ] = {ActSeeSyl ,Syl_PutParWhichSyllabus,&Syl_WhichSyllabus[Syl_LECTURES ]},
|
||||
[Inf_PRACTICALS ] = {ActSeeSyl ,Syl_PutParWhichSyllabus,&Syl_WhichSyllabus[Syl_PRACTICALS]},
|
||||
[Inf_BIBLIOGRAPHY ] = {ActSeeBib ,NULL,NULL},
|
||||
[Inf_FAQ ] = {ActSeeFAQ ,NULL,NULL},
|
||||
[Inf_LINKS ] = {ActSeeCrsLnk,NULL,NULL},
|
||||
|
@ -338,8 +340,8 @@ void Inf_PutIconToEditInfo (void *Type)
|
|||
{
|
||||
[Inf_INTRODUCTION ] = {ActEdiCrsInf,NULL,NULL},
|
||||
[Inf_TEACHING_GUIDE] = {ActEdiTchGui,NULL,NULL},
|
||||
[Inf_LECTURES ] = {ActEdiSylLec,Syl_PutParWhichSyllabus,&Syl_WhichSyllabus[Syl_LECTURES ]},
|
||||
[Inf_PRACTICALS ] = {ActEdiSylPra,Syl_PutParWhichSyllabus,&Syl_WhichSyllabus[Syl_PRACTICALS]},
|
||||
[Inf_LECTURES ] = {ActEdiSyl ,Syl_PutParWhichSyllabus,&Syl_WhichSyllabus[Syl_LECTURES ]},
|
||||
[Inf_PRACTICALS ] = {ActEdiSyl ,Syl_PutParWhichSyllabus,&Syl_WhichSyllabus[Syl_PRACTICALS]},
|
||||
[Inf_BIBLIOGRAPHY ] = {ActEdiBib ,NULL,NULL},
|
||||
[Inf_FAQ ] = {ActEdiFAQ ,NULL,NULL},
|
||||
[Inf_LINKS ] = {ActEdiCrsLnk,NULL,NULL},
|
||||
|
@ -358,21 +360,28 @@ void Inf_PutIconToEditInfo (void *Type)
|
|||
|
||||
static void Inf_PutCheckboxForceStdsToReadInfo (bool MustBeRead,bool Disabled)
|
||||
{
|
||||
extern Syl_WhichSyllabus_t Syl_WhichSyllabus[Syl_NUM_WHICH_SYLLABUS];
|
||||
extern const char *Txt_Force_students_to_read_this_information;
|
||||
static const Act_Action_t Inf_ActionsChangeForceReadInfo[Inf_NUM_TYPES] =
|
||||
static struct
|
||||
{
|
||||
[Inf_INTRODUCTION ] = ActChgFrcReaCrsInf,
|
||||
[Inf_TEACHING_GUIDE] = ActChgFrcReaTchGui,
|
||||
[Inf_LECTURES ] = ActChgFrcReaSylLec,
|
||||
[Inf_PRACTICALS ] = ActChgFrcReaSylPra,
|
||||
[Inf_BIBLIOGRAPHY ] = ActChgFrcReaBib,
|
||||
[Inf_FAQ ] = ActChgFrcReaFAQ,
|
||||
[Inf_LINKS ] = ActChgFrcReaCrsLnk,
|
||||
[Inf_ASSESSMENT ] = ActChgFrcReaAss,
|
||||
const Act_Action_t NextAction;
|
||||
void (*FuncPars) (void *Args);
|
||||
void *Args;
|
||||
} Inf_Actions[Inf_NUM_TYPES] =
|
||||
{
|
||||
[Inf_INTRODUCTION ] = {ActChgFrcReaCrsInf,NULL,NULL},
|
||||
[Inf_TEACHING_GUIDE] = {ActChgFrcReaTchGui,NULL,NULL},
|
||||
[Inf_LECTURES ] = {ActChgFrcReaSyl ,Syl_PutParWhichSyllabus,&Syl_WhichSyllabus[Syl_LECTURES ]},
|
||||
[Inf_PRACTICALS ] = {ActChgFrcReaSyl ,Syl_PutParWhichSyllabus,&Syl_WhichSyllabus[Syl_PRACTICALS]},
|
||||
[Inf_BIBLIOGRAPHY ] = {ActChgFrcReaBib ,NULL,NULL},
|
||||
[Inf_FAQ ] = {ActChgFrcReaFAQ ,NULL,NULL},
|
||||
[Inf_LINKS ] = {ActChgFrcReaCrsLnk,NULL,NULL},
|
||||
[Inf_ASSESSMENT ] = {ActChgFrcReaAss ,NULL,NULL},
|
||||
};
|
||||
|
||||
Lay_PutContextualCheckbox (Inf_ActionsChangeForceReadInfo[Gbl.Crs.Info.Type],
|
||||
NULL,
|
||||
Lay_PutContextualCheckbox (Inf_Actions[Gbl.Crs.Info.Type].NextAction,
|
||||
Inf_Actions[Gbl.Crs.Info.Type].FuncPars,
|
||||
Inf_Actions[Gbl.Crs.Info.Type].Args,
|
||||
"MustBeRead",
|
||||
MustBeRead,Disabled,
|
||||
Txt_Force_students_to_read_this_information,
|
||||
|
@ -385,22 +394,29 @@ static void Inf_PutCheckboxForceStdsToReadInfo (bool MustBeRead,bool Disabled)
|
|||
|
||||
static void Inf_PutCheckboxConfirmIHaveReadInfo (void)
|
||||
{
|
||||
extern Syl_WhichSyllabus_t Syl_WhichSyllabus[Syl_NUM_WHICH_SYLLABUS];
|
||||
extern const char *Txt_I_have_read_this_information;
|
||||
static const Act_Action_t Inf_ActionsIHaveReadInfo[Inf_NUM_TYPES] =
|
||||
static struct
|
||||
{
|
||||
[Inf_INTRODUCTION ] = ActChgHavReaCrsInf,
|
||||
[Inf_TEACHING_GUIDE] = ActChgHavReaTchGui,
|
||||
[Inf_LECTURES ] = ActChgHavReaSylLec,
|
||||
[Inf_PRACTICALS ] = ActChgHavReaSylPra,
|
||||
[Inf_BIBLIOGRAPHY ] = ActChgHavReaBib,
|
||||
[Inf_FAQ ] = ActChgHavReaFAQ,
|
||||
[Inf_LINKS ] = ActChgHavReaCrsLnk,
|
||||
[Inf_ASSESSMENT ] = ActChgHavReaAss,
|
||||
const Act_Action_t NextAction;
|
||||
void (*FuncPars) (void *Args);
|
||||
void *Args;
|
||||
} Inf_Actions[Inf_NUM_TYPES] =
|
||||
{
|
||||
[Inf_INTRODUCTION ] = {ActChgHavReaCrsInf,NULL,NULL},
|
||||
[Inf_TEACHING_GUIDE] = {ActChgHavReaTchGui,NULL,NULL},
|
||||
[Inf_LECTURES ] = {ActChgHavReaSyl ,Syl_PutParWhichSyllabus,&Syl_WhichSyllabus[Syl_LECTURES ]},
|
||||
[Inf_PRACTICALS ] = {ActChgHavReaSyl ,Syl_PutParWhichSyllabus,&Syl_WhichSyllabus[Syl_PRACTICALS]},
|
||||
[Inf_BIBLIOGRAPHY ] = {ActChgHavReaBib ,NULL,NULL},
|
||||
[Inf_FAQ ] = {ActChgHavReaFAQ ,NULL,NULL},
|
||||
[Inf_LINKS ] = {ActChgHavReaCrsLnk,NULL,NULL},
|
||||
[Inf_ASSESSMENT ] = {ActChgHavReaAss ,NULL,NULL},
|
||||
};
|
||||
bool IHaveRead = Inf_DB_CheckIfIHaveReadInfo ();
|
||||
|
||||
Lay_PutContextualCheckbox (Inf_ActionsIHaveReadInfo[Gbl.Crs.Info.Type],
|
||||
NULL,
|
||||
Lay_PutContextualCheckbox (Inf_Actions[Gbl.Crs.Info.Type].NextAction,
|
||||
Inf_Actions[Gbl.Crs.Info.Type].FuncPars,
|
||||
Inf_Actions[Gbl.Crs.Info.Type].Args,
|
||||
"IHaveRead",
|
||||
IHaveRead,false,
|
||||
Txt_I_have_read_this_information,
|
||||
|
@ -465,8 +481,8 @@ void Inf_WriteMsgYouMustReadInfo (void)
|
|||
{
|
||||
[Inf_INTRODUCTION ] = {ActSeeCrsInf,NULL,NULL},
|
||||
[Inf_TEACHING_GUIDE] = {ActSeeTchGui,NULL,NULL},
|
||||
[Inf_LECTURES ] = {ActSeeSylLec,Syl_PutParWhichSyllabus,&Syl_WhichSyllabus[Syl_LECTURES ]},
|
||||
[Inf_PRACTICALS ] = {ActSeeSylPra,Syl_PutParWhichSyllabus,&Syl_WhichSyllabus[Syl_PRACTICALS]},
|
||||
[Inf_LECTURES ] = {ActSeeSyl ,Syl_PutParWhichSyllabus,&Syl_WhichSyllabus[Syl_LECTURES ]},
|
||||
[Inf_PRACTICALS ] = {ActSeeSyl ,Syl_PutParWhichSyllabus,&Syl_WhichSyllabus[Syl_PRACTICALS]},
|
||||
[Inf_BIBLIOGRAPHY ] = {ActSeeBib ,NULL,NULL},
|
||||
[Inf_FAQ ] = {ActSeeFAQ ,NULL,NULL},
|
||||
[Inf_LINKS ] = {ActSeeCrsLnk,NULL,NULL},
|
||||
|
@ -780,38 +796,13 @@ void Inf_WriteURLIntoTxtBuffer (char TxtBuffer[Cns_MAX_BYTES_WWW + 1])
|
|||
static void Inf_ShowPage (const char *URL)
|
||||
{
|
||||
extern const char *Txt_View_in_a_new_window;
|
||||
extern const char *Txt_INFO_TITLE[Inf_NUM_TYPES];
|
||||
bool ICanEdit = (Gbl.Usrs.Me.Role.Logged == Rol_TCH ||
|
||||
Gbl.Usrs.Me.Role.Logged == Rol_SYS_ADM);
|
||||
const char *Help[Inf_NUM_TYPES] =
|
||||
{
|
||||
[Inf_INTRODUCTION ] = Hlp_COURSE_Information_textual_information,
|
||||
[Inf_TEACHING_GUIDE] = Hlp_COURSE_Guide,
|
||||
[Inf_LECTURES ] = Hlp_COURSE_Syllabus,
|
||||
[Inf_PRACTICALS ] = Hlp_COURSE_Syllabus,
|
||||
[Inf_BIBLIOGRAPHY ] = Hlp_COURSE_Bibliography,
|
||||
[Inf_FAQ ] = Hlp_COURSE_FAQ,
|
||||
[Inf_LINKS ] = Hlp_COURSE_Links,
|
||||
[Inf_ASSESSMENT ] = Hlp_COURSE_Assessment,
|
||||
};
|
||||
|
||||
/***** Begin box *****/
|
||||
Box_BoxBegin (Txt_INFO_TITLE[Gbl.Crs.Info.Type],
|
||||
ICanEdit ? Inf_PutIconToEditInfo :
|
||||
NULL,
|
||||
ICanEdit ? &Gbl.Crs.Info.Type :
|
||||
NULL,
|
||||
Help[Gbl.Crs.Info.Type],Box_NOT_CLOSABLE);
|
||||
|
||||
/***** Link to view in a new window *****/
|
||||
HTM_A_Begin ("href=\"%s\" target=\"_blank\" class=\"FORM_OUT_%s BOLD\"",
|
||||
URL,The_GetSuffix ());
|
||||
Ico_PutIconTextLink ("expand-arrows-alt.svg",Ico_BLACK,
|
||||
Txt_View_in_a_new_window);
|
||||
HTM_A_End ();
|
||||
|
||||
/***** End box *****/
|
||||
Box_BoxEnd ();
|
||||
/***** Link to view in a new window *****/
|
||||
HTM_A_Begin ("href=\"%s\" target=\"_blank\" class=\"FORM_OUT_%s BOLD\"",
|
||||
URL,The_GetSuffix ());
|
||||
Ico_PutIconTextLink ("expand-arrows-alt.svg",Ico_BLACK,
|
||||
Txt_View_in_a_new_window);
|
||||
HTM_A_End ();
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -853,8 +844,8 @@ void Inf_FormsToSelSendInfo (void)
|
|||
{
|
||||
[Inf_INTRODUCTION ] = ActSelInfSrcCrsInf,
|
||||
[Inf_TEACHING_GUIDE] = ActSelInfSrcTchGui,
|
||||
[Inf_LECTURES ] = ActSelInfSrcSylLec,
|
||||
[Inf_PRACTICALS ] = ActSelInfSrcSylPra,
|
||||
[Inf_LECTURES ] = ActSelInfSrcSyl,
|
||||
[Inf_PRACTICALS ] = ActSelInfSrcSyl,
|
||||
[Inf_BIBLIOGRAPHY ] = ActSelInfSrcBib,
|
||||
[Inf_FAQ ] = ActSelInfSrcFAQ,
|
||||
[Inf_LINKS ] = ActSelInfSrcCrsLnk,
|
||||
|
@ -1350,19 +1341,6 @@ static bool Inf_CheckAndShowPlainTxt (void)
|
|||
{
|
||||
extern const char *Txt_INFO_TITLE[Inf_NUM_TYPES];
|
||||
char TxtHTML[Cns_MAX_BYTES_LONG_TEXT + 1];
|
||||
bool ICanEdit = (Gbl.Usrs.Me.Role.Logged == Rol_TCH ||
|
||||
Gbl.Usrs.Me.Role.Logged == Rol_SYS_ADM);
|
||||
const char *Help[Inf_NUM_TYPES] =
|
||||
{
|
||||
[Inf_INTRODUCTION ] = Hlp_COURSE_Information_textual_information,
|
||||
[Inf_TEACHING_GUIDE] = Hlp_COURSE_Guide,
|
||||
[Inf_LECTURES ] = Hlp_COURSE_Syllabus,
|
||||
[Inf_PRACTICALS ] = Hlp_COURSE_Syllabus,
|
||||
[Inf_BIBLIOGRAPHY ] = Hlp_COURSE_Bibliography,
|
||||
[Inf_FAQ ] = Hlp_COURSE_FAQ,
|
||||
[Inf_LINKS ] = Hlp_COURSE_Links,
|
||||
[Inf_ASSESSMENT ] = Hlp_COURSE_Assessment,
|
||||
};
|
||||
|
||||
/***** Get info text from database *****/
|
||||
Inf_GetInfoTxtFromDB (Gbl.Hierarchy.Node[Hie_CRS].HieCod,Gbl.Crs.Info.Type,
|
||||
|
@ -1370,33 +1348,22 @@ static bool Inf_CheckAndShowPlainTxt (void)
|
|||
|
||||
if (TxtHTML[0])
|
||||
{
|
||||
/***** Begin box *****/
|
||||
Box_BoxBegin (Txt_INFO_TITLE[Gbl.Crs.Info.Type],
|
||||
ICanEdit ? Inf_PutIconToEditInfo :
|
||||
NULL,
|
||||
ICanEdit ? &Gbl.Crs.Info.Type :
|
||||
NULL,
|
||||
Help[Gbl.Crs.Info.Type],Box_NOT_CLOSABLE);
|
||||
if (Gbl.Crs.Info.Type == Inf_INTRODUCTION ||
|
||||
Gbl.Crs.Info.Type == Inf_TEACHING_GUIDE)
|
||||
Lay_WriteHeaderClassPhoto (Vie_VIEW);
|
||||
|
||||
if (Gbl.Crs.Info.Type == Inf_INTRODUCTION ||
|
||||
Gbl.Crs.Info.Type == Inf_TEACHING_GUIDE)
|
||||
Lay_WriteHeaderClassPhoto (Vie_VIEW);
|
||||
HTM_DIV_Begin ("class=\"LM DAT_%s\"",The_GetSuffix ());
|
||||
|
||||
HTM_DIV_Begin ("class=\"LM DAT_%s\"",The_GetSuffix ());
|
||||
/***** Convert to respectful HTML and insert links *****/
|
||||
Str_ChangeFormat (Str_FROM_HTML,Str_TO_RIGOROUS_HTML,
|
||||
TxtHTML,Cns_MAX_BYTES_LONG_TEXT,
|
||||
Str_DONT_REMOVE_SPACES);
|
||||
ALn_InsertLinks (TxtHTML,Cns_MAX_BYTES_LONG_TEXT,60); // Insert links
|
||||
|
||||
/***** Convert to respectful HTML and insert links *****/
|
||||
Str_ChangeFormat (Str_FROM_HTML,Str_TO_RIGOROUS_HTML,
|
||||
TxtHTML,Cns_MAX_BYTES_LONG_TEXT,
|
||||
Str_DONT_REMOVE_SPACES);
|
||||
ALn_InsertLinks (TxtHTML,Cns_MAX_BYTES_LONG_TEXT,60); // Insert links
|
||||
/***** Write text *****/
|
||||
HTM_Txt (TxtHTML);
|
||||
|
||||
/***** Write text *****/
|
||||
HTM_Txt (TxtHTML);
|
||||
|
||||
HTM_DIV_End ();
|
||||
|
||||
/***** End box *****/
|
||||
Box_BoxEnd ();
|
||||
HTM_DIV_End ();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -1439,19 +1406,6 @@ static bool Inf_CheckAndShowRichTxt (void)
|
|||
char MathJaxURL[PATH_MAX + 1];
|
||||
char Command[512 + PATH_MAX * 3]; // Command to call the program of preprocessing of photos
|
||||
int ReturnCode;
|
||||
bool ICanEdit = (Gbl.Usrs.Me.Role.Logged == Rol_TCH ||
|
||||
Gbl.Usrs.Me.Role.Logged == Rol_SYS_ADM);
|
||||
const char *Help[Inf_NUM_TYPES] =
|
||||
{
|
||||
[Inf_INTRODUCTION ] = Hlp_COURSE_Information_textual_information,
|
||||
[Inf_TEACHING_GUIDE] = Hlp_COURSE_Guide,
|
||||
[Inf_LECTURES ] = Hlp_COURSE_Syllabus,
|
||||
[Inf_PRACTICALS ] = Hlp_COURSE_Syllabus,
|
||||
[Inf_BIBLIOGRAPHY ] = Hlp_COURSE_Bibliography,
|
||||
[Inf_FAQ ] = Hlp_COURSE_FAQ,
|
||||
[Inf_LINKS ] = Hlp_COURSE_Links,
|
||||
[Inf_ASSESSMENT ] = Hlp_COURSE_Assessment,
|
||||
};
|
||||
|
||||
/***** Get info text from database *****/
|
||||
Inf_GetInfoTxtFromDB (Gbl.Hierarchy.Node[Hie_CRS].HieCod,Gbl.Crs.Info.Type,
|
||||
|
@ -1459,96 +1413,85 @@ static bool Inf_CheckAndShowRichTxt (void)
|
|||
|
||||
if (TxtMD[0])
|
||||
{
|
||||
/***** Begin box *****/
|
||||
Box_BoxBegin (Txt_INFO_TITLE[Gbl.Crs.Info.Type],
|
||||
ICanEdit ? Inf_PutIconToEditInfo :
|
||||
NULL,
|
||||
ICanEdit ? &Gbl.Crs.Info.Type :
|
||||
NULL,
|
||||
Help[Gbl.Crs.Info.Type],Box_NOT_CLOSABLE);
|
||||
if (Gbl.Crs.Info.Type == Inf_INTRODUCTION ||
|
||||
Gbl.Crs.Info.Type == Inf_TEACHING_GUIDE)
|
||||
Lay_WriteHeaderClassPhoto (Vie_VIEW);
|
||||
|
||||
if (Gbl.Crs.Info.Type == Inf_INTRODUCTION ||
|
||||
Gbl.Crs.Info.Type == Inf_TEACHING_GUIDE)
|
||||
Lay_WriteHeaderClassPhoto (Vie_VIEW);
|
||||
HTM_DIV_Begin ("id=\"crs_info\" class=\"LM CRS_INFO_%s\"",
|
||||
The_GetSuffix ());
|
||||
|
||||
HTM_DIV_Begin ("id=\"crs_info\" class=\"LM CRS_INFO_%s\"",
|
||||
The_GetSuffix ());
|
||||
/***** Store text into a temporary .md file in HTML output directory *****/
|
||||
// TODO: change to another directory?
|
||||
/* Create a unique name for the .md file */
|
||||
UniqueNameEncrypted = Cry_GetUniqueNameEncrypted ();
|
||||
snprintf (PathFileMD,sizeof (PathFileMD),"%s/%s.md",
|
||||
Cfg_PATH_OUT_PRIVATE,UniqueNameEncrypted);
|
||||
snprintf (PathFileHTML,sizeof (PathFileHTML),"%s/%s.md.html", // Do not use only .html because that is the output temporary file
|
||||
Cfg_PATH_OUT_PRIVATE,UniqueNameEncrypted);
|
||||
|
||||
/***** Store text into a temporary .md file in HTML output directory *****/
|
||||
// TODO: change to another directory?
|
||||
/* Create a unique name for the .md file */
|
||||
UniqueNameEncrypted = Cry_GetUniqueNameEncrypted ();
|
||||
snprintf (PathFileMD,sizeof (PathFileMD),"%s/%s.md",
|
||||
Cfg_PATH_OUT_PRIVATE,UniqueNameEncrypted);
|
||||
snprintf (PathFileHTML,sizeof (PathFileHTML),"%s/%s.md.html", // Do not use only .html because that is the output temporary file
|
||||
Cfg_PATH_OUT_PRIVATE,UniqueNameEncrypted);
|
||||
/* Open Markdown file for writing */
|
||||
if ((FileMD = fopen (PathFileMD,"wb")) == NULL)
|
||||
Err_ShowErrorAndExit ("Can not create temporary Markdown file.");
|
||||
|
||||
/* Open Markdown file for writing */
|
||||
if ((FileMD = fopen (PathFileMD,"wb")) == NULL)
|
||||
Err_ShowErrorAndExit ("Can not create temporary Markdown file.");
|
||||
/* Write text into Markdown file */
|
||||
fprintf (FileMD,"%s",TxtMD);
|
||||
|
||||
/* Write text into Markdown file */
|
||||
fprintf (FileMD,"%s",TxtMD);
|
||||
/* Close Markdown file */
|
||||
fclose (FileMD);
|
||||
|
||||
/* Close Markdown file */
|
||||
fclose (FileMD);
|
||||
/***** Convert from Markdown to HTML *****/
|
||||
/* MathJax 2.5.1
|
||||
#ifdef Cfg_MATHJAX_LOCAL
|
||||
// Use the local copy of MathJax
|
||||
snprintf (MathJaxURL,sizeof (MathJaxURL),
|
||||
"=%s/MathJax/MathJax.js?config=TeX-AMS-MML_HTMLorMML",
|
||||
Cfg_URL_SWAD_PUBLIC);
|
||||
#else
|
||||
// Use the MathJax Content Delivery Network (CDN)
|
||||
MathJaxURL[0] = '\0';
|
||||
#endif
|
||||
*/
|
||||
/* MathJax 3.0.1 */
|
||||
#ifdef Cfg_MATHJAX_LOCAL
|
||||
// Use the local copy of MathJax
|
||||
snprintf (MathJaxURL,sizeof (MathJaxURL),"=%s/mathjax/tex-chtml.js",
|
||||
Cfg_URL_SWAD_PUBLIC);
|
||||
#else
|
||||
// Use the MathJax Content Delivery Network (CDN)
|
||||
MathJaxURL[0] = '\0';
|
||||
#endif
|
||||
// --ascii uses only ascii characters in output
|
||||
// (uses numerical entities instead of UTF-8)
|
||||
// is mandatory in order to convert (with iconv) the UTF-8 output of pandoc to WINDOWS-1252
|
||||
snprintf (Command,sizeof (Command),
|
||||
"iconv -f WINDOWS-1252 -t UTF-8 %s"
|
||||
" | "
|
||||
"pandoc --ascii --mathjax%s -f markdown_github+tex_math_dollars -t html5"
|
||||
" | "
|
||||
"iconv -f UTF-8 -t WINDOWS-1252 -o %s",
|
||||
PathFileMD,
|
||||
MathJaxURL,
|
||||
PathFileHTML);
|
||||
ReturnCode = system (Command);
|
||||
if (ReturnCode == -1)
|
||||
Err_ShowErrorAndExit ("Error when running command to convert from Markdown to HTML.");
|
||||
|
||||
/***** Convert from Markdown to HTML *****/
|
||||
/* MathJax 2.5.1
|
||||
#ifdef Cfg_MATHJAX_LOCAL
|
||||
// Use the local copy of MathJax
|
||||
snprintf (MathJaxURL,sizeof (MathJaxURL),
|
||||
"=%s/MathJax/MathJax.js?config=TeX-AMS-MML_HTMLorMML",
|
||||
Cfg_URL_SWAD_PUBLIC);
|
||||
#else
|
||||
// Use the MathJax Content Delivery Network (CDN)
|
||||
MathJaxURL[0] = '\0';
|
||||
#endif
|
||||
*/
|
||||
/* MathJax 3.0.1 */
|
||||
#ifdef Cfg_MATHJAX_LOCAL
|
||||
// Use the local copy of MathJax
|
||||
snprintf (MathJaxURL,sizeof (MathJaxURL),"=%s/mathjax/tex-chtml.js",
|
||||
Cfg_URL_SWAD_PUBLIC);
|
||||
#else
|
||||
// Use the MathJax Content Delivery Network (CDN)
|
||||
MathJaxURL[0] = '\0';
|
||||
#endif
|
||||
// --ascii uses only ascii characters in output
|
||||
// (uses numerical entities instead of UTF-8)
|
||||
// is mandatory in order to convert (with iconv) the UTF-8 output of pandoc to WINDOWS-1252
|
||||
snprintf (Command,sizeof (Command),
|
||||
"iconv -f WINDOWS-1252 -t UTF-8 %s"
|
||||
" | "
|
||||
"pandoc --ascii --mathjax%s -f markdown_github+tex_math_dollars -t html5"
|
||||
" | "
|
||||
"iconv -f UTF-8 -t WINDOWS-1252 -o %s",
|
||||
PathFileMD,
|
||||
MathJaxURL,
|
||||
PathFileHTML);
|
||||
ReturnCode = system (Command);
|
||||
if (ReturnCode == -1)
|
||||
Err_ShowErrorAndExit ("Error when running command to convert from Markdown to HTML.");
|
||||
/***** Remove Markdown file *****/
|
||||
unlink (PathFileMD);
|
||||
|
||||
/***** Remove Markdown file *****/
|
||||
unlink (PathFileMD);
|
||||
/***** Copy HTML file just created to HTML output *****/
|
||||
/* Open temporary HTML file for reading */
|
||||
if ((FileHTML = fopen (PathFileHTML,"rb")) == NULL)
|
||||
Err_ShowErrorAndExit ("Can not open temporary HTML file.");
|
||||
|
||||
/***** Copy HTML file just created to HTML output *****/
|
||||
/* Open temporary HTML file for reading */
|
||||
if ((FileHTML = fopen (PathFileHTML,"rb")) == NULL)
|
||||
Err_ShowErrorAndExit ("Can not open temporary HTML file.");
|
||||
/* Copy from temporary HTML file to output file */
|
||||
Fil_FastCopyOfOpenFiles (FileHTML,Fil_GetOutputFile ());
|
||||
|
||||
/* Copy from temporary HTML file to output file */
|
||||
Fil_FastCopyOfOpenFiles (FileHTML,Fil_GetOutputFile ());
|
||||
/* Close and remove temporary HTML file */
|
||||
fclose (FileHTML);
|
||||
unlink (PathFileHTML);
|
||||
|
||||
/* Close and remove temporary HTML file */
|
||||
fclose (FileHTML);
|
||||
unlink (PathFileHTML);
|
||||
|
||||
HTM_DIV_End ();
|
||||
|
||||
/***** End box *****/
|
||||
Box_BoxEnd ();
|
||||
HTM_DIV_End ();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -1576,8 +1519,8 @@ void Inf_EditPlainTxtInfo (void)
|
|||
{
|
||||
[Inf_INTRODUCTION ] = {ActRcvPlaTxtCrsInf,NULL,NULL},
|
||||
[Inf_TEACHING_GUIDE] = {ActRcvPlaTxtTchGui,NULL,NULL},
|
||||
[Inf_LECTURES ] = {ActRcvPlaTxtSylLec,Syl_PutParWhichSyllabus,&Syl_WhichSyllabus[Syl_LECTURES ]},
|
||||
[Inf_PRACTICALS ] = {ActRcvPlaTxtSylPra,Syl_PutParWhichSyllabus,&Syl_WhichSyllabus[Syl_PRACTICALS]},
|
||||
[Inf_LECTURES ] = {ActRcvPlaTxtSyl ,Syl_PutParWhichSyllabus,&Syl_WhichSyllabus[Syl_LECTURES ]},
|
||||
[Inf_PRACTICALS ] = {ActRcvPlaTxtSyl ,Syl_PutParWhichSyllabus,&Syl_WhichSyllabus[Syl_PRACTICALS]},
|
||||
[Inf_BIBLIOGRAPHY ] = {ActRcvPlaTxtBib ,NULL,NULL},
|
||||
[Inf_FAQ ] = {ActRcvPlaTxtFAQ ,NULL,NULL},
|
||||
[Inf_LINKS ] = {ActRcvPlaTxtCrsLnk,NULL,NULL},
|
||||
|
@ -1651,8 +1594,8 @@ void Inf_EditRichTxtInfo (void)
|
|||
{
|
||||
[Inf_INTRODUCTION ] = {ActRcvRchTxtCrsInf,NULL,NULL},
|
||||
[Inf_TEACHING_GUIDE] = {ActRcvRchTxtTchGui,NULL,NULL},
|
||||
[Inf_LECTURES ] = {ActRcvRchTxtSylLec,Syl_PutParWhichSyllabus,&Syl_WhichSyllabus[Syl_LECTURES ]},
|
||||
[Inf_PRACTICALS ] = {ActRcvRchTxtSylPra,Syl_PutParWhichSyllabus,&Syl_WhichSyllabus[Syl_PRACTICALS]},
|
||||
[Inf_LECTURES ] = {ActRcvRchTxtSyl ,Syl_PutParWhichSyllabus,&Syl_WhichSyllabus[Syl_LECTURES ]},
|
||||
[Inf_PRACTICALS ] = {ActRcvRchTxtSyl ,Syl_PutParWhichSyllabus,&Syl_WhichSyllabus[Syl_PRACTICALS]},
|
||||
[Inf_BIBLIOGRAPHY ] = {ActRcvRchTxtBib ,NULL,NULL},
|
||||
[Inf_FAQ ] = {ActRcvRchTxtFAQ ,NULL,NULL},
|
||||
[Inf_LINKS ] = {ActRcvRchTxtCrsLnk,NULL,NULL},
|
||||
|
|
|
@ -1267,7 +1267,7 @@ void Lay_PutContextualLinkIconText (Act_Action_t NextAction,const char *Anchor,
|
|||
/*****************************************************************************/
|
||||
|
||||
void Lay_PutContextualCheckbox (Act_Action_t NextAction,
|
||||
void (*FuncPars) (void),
|
||||
void (*FuncPars) (void *Args),void *Args,
|
||||
const char *CheckboxName,
|
||||
bool Checked,bool Disabled,
|
||||
const char *Title,const char *Text)
|
||||
|
@ -1280,7 +1280,7 @@ void Lay_PutContextualCheckbox (Act_Action_t NextAction,
|
|||
/***** Begin form *****/
|
||||
Frm_BeginForm (NextAction);
|
||||
if (FuncPars)
|
||||
FuncPars ();
|
||||
FuncPars (Args);
|
||||
|
||||
/***** Begin container *****/
|
||||
HTM_DIV_Begin ("class=\"CONTEXT_OPT %s FORM_OUT_%s BOLD\" title=\"%s\"",
|
||||
|
|
|
@ -79,7 +79,7 @@ void Lay_PutContextualLinkIconText (Act_Action_t NextAction,const char *Anchor,
|
|||
const char *Icon,Ico_Color_t Color,
|
||||
const char *Text,const char *OnSubmit);
|
||||
void Lay_PutContextualCheckbox (Act_Action_t NextAction,
|
||||
void (*FuncPars) (void),
|
||||
void (*FuncPars) (void *Args),void *Args,
|
||||
const char *CheckboxName,
|
||||
bool Checked,bool Disabled,
|
||||
const char *Title,const char *Text);
|
||||
|
|
|
@ -413,7 +413,8 @@ static void Ntf_PutContextualLinks (bool AllNotifications,
|
|||
Mnu_ContextMenuBegin ();
|
||||
|
||||
/***** Show all notifications *****/
|
||||
Lay_PutContextualCheckbox (ActSeeNtf,NULL,
|
||||
Lay_PutContextualCheckbox (ActSeeNtf,
|
||||
NULL,NULL,
|
||||
"All",
|
||||
AllNotifications,false,
|
||||
Txt_Show_all_notifications,
|
||||
|
|
|
@ -122,8 +122,8 @@ static void Rec_ShowLinkToPrintPreviewOfRecords (void);
|
|||
static void Rec_GetParRecordsPerPage (void);
|
||||
static void Rec_WriteFormShowOfficeHoursOneTch (bool ShowOfficeHours);
|
||||
static void Rec_WriteFormShowOfficeHoursSeveralTchs (bool ShowOfficeHours);
|
||||
static void Rec_PutParsShowOfficeHoursOneTch (void);
|
||||
static void Rec_PutParsShowOfficeHoursSeveralTchs (void);
|
||||
static void Rec_PutParsShowOfficeHoursOneTch (__attribute__((unused)) void *Args);
|
||||
static void Rec_PutParsShowOfficeHoursSeveralTchs (__attribute__((unused)) void *Args);
|
||||
static bool Rec_GetParShowOfficeHours (void);
|
||||
static void Rec_ShowCrsRecord (Rec_CourseRecordViewType_t TypeOfView,
|
||||
struct Usr_Data *UsrDat,const char *Anchor);
|
||||
|
@ -1437,7 +1437,7 @@ static void Rec_WriteFormShowOfficeHoursOneTch (bool ShowOfficeHours)
|
|||
extern const char *Txt_Show_tutoring_hours;
|
||||
|
||||
Lay_PutContextualCheckbox (ActSeeRecOneTch,
|
||||
Rec_PutParsShowOfficeHoursOneTch,
|
||||
Rec_PutParsShowOfficeHoursOneTch,NULL,
|
||||
"ShowOfficeHours",
|
||||
ShowOfficeHours,false,
|
||||
Txt_Show_tutoring_hours,
|
||||
|
@ -1449,20 +1449,20 @@ static void Rec_WriteFormShowOfficeHoursSeveralTchs (bool ShowOfficeHours)
|
|||
extern const char *Txt_Show_tutoring_hours;
|
||||
|
||||
Lay_PutContextualCheckbox (ActSeeRecSevTch,
|
||||
Rec_PutParsShowOfficeHoursSeveralTchs,
|
||||
Rec_PutParsShowOfficeHoursSeveralTchs,NULL,
|
||||
"ShowOfficeHours",
|
||||
ShowOfficeHours,false,
|
||||
Txt_Show_tutoring_hours,
|
||||
Txt_Show_tutoring_hours);
|
||||
}
|
||||
|
||||
static void Rec_PutParsShowOfficeHoursOneTch (void)
|
||||
static void Rec_PutParsShowOfficeHoursOneTch (__attribute__((unused)) void *Args)
|
||||
{
|
||||
Usr_PutParOtherUsrCodEncrypted (Gbl.Usrs.Other.UsrDat.EnUsrCod);
|
||||
Par_PutParChar ("ParamOfficeHours",'Y');
|
||||
}
|
||||
|
||||
static void Rec_PutParsShowOfficeHoursSeveralTchs (void)
|
||||
static void Rec_PutParsShowOfficeHoursSeveralTchs (__attribute__((unused)) void *Args)
|
||||
{
|
||||
Usr_PutParSelectedUsrsCods (&Gbl.Usrs.Selected);
|
||||
Par_PutParChar ("ParamOfficeHours",'Y');
|
||||
|
|
189
swad_syllabus.c
189
swad_syllabus.c
|
@ -258,24 +258,19 @@ bool Syl_CheckSyllabus (struct Syl_Syllabus *Syllabus,long CrsCod)
|
|||
|
||||
bool Syl_CheckAndShowSyllabus (struct Syl_Syllabus *Syllabus)
|
||||
{
|
||||
/***** Get syllabus type *****/
|
||||
Syllabus->WhichSyllabus = Syl_GetParWhichSyllabus ();
|
||||
Gbl.Crs.Info.Type = (Syllabus->WhichSyllabus == Syl_LECTURES ? Inf_LECTURES :
|
||||
Inf_PRACTICALS);
|
||||
|
||||
/***** Load syllabus from XML file to memory *****/
|
||||
Syl_LoadListItemsSyllabusIntoMemory (Syllabus,Gbl.Hierarchy.Node[Hie_CRS].HieCod);
|
||||
|
||||
switch (Gbl.Action.Act)
|
||||
{
|
||||
case ActEditorSylLec: case ActEditorSylPra:
|
||||
case ActDelItmSylLec: case ActDelItmSylPra:
|
||||
case ActUp_IteSylLec: case ActUp_IteSylPra:
|
||||
case ActDwnIteSylLec: case ActDwnIteSylPra:
|
||||
case ActRgtIteSylLec: case ActRgtIteSylPra:
|
||||
case ActLftIteSylLec: case ActLftIteSylPra:
|
||||
case ActInsIteSylLec: case ActInsIteSylPra:
|
||||
case ActModIteSylLec: case ActModIteSylPra:
|
||||
case ActEditorSyl:
|
||||
case ActDelItmSyl:
|
||||
case ActUp_IteSyl:
|
||||
case ActDwnIteSyl:
|
||||
case ActRgtIteSyl:
|
||||
case ActLftIteSyl:
|
||||
case ActInsIteSyl:
|
||||
case ActModIteSyl:
|
||||
Syllabus->ViewType = Vie_EDIT;
|
||||
break;
|
||||
default:
|
||||
|
@ -301,13 +296,28 @@ bool Syl_CheckAndShowSyllabus (struct Syl_Syllabus *Syllabus)
|
|||
|
||||
void Syl_EditSyllabus (void)
|
||||
{
|
||||
extern const char *Hlp_COURSE_Syllabus_edit;
|
||||
extern const char *Txt_INFO_TITLE[Inf_NUM_TYPES];
|
||||
struct Syl_Syllabus Syllabus;
|
||||
|
||||
/***** Reset syllabus context *****/
|
||||
Syl_ResetSyllabus (&Syllabus);
|
||||
|
||||
/***** Edit syllabus *****/
|
||||
Syl_CheckAndShowSyllabus (&Syllabus);
|
||||
/***** Get syllabus type *****/
|
||||
Syllabus.WhichSyllabus = Syl_GetParWhichSyllabus ();
|
||||
Gbl.Crs.Info.Type = (Syllabus.WhichSyllabus == Syl_LECTURES ? Inf_LECTURES :
|
||||
Inf_PRACTICALS);
|
||||
|
||||
/***** Begin box *****/
|
||||
Box_BoxBegin (Txt_INFO_TITLE[Gbl.Crs.Info.Type],
|
||||
NULL,NULL,
|
||||
Hlp_COURSE_Syllabus_edit,Box_NOT_CLOSABLE);
|
||||
|
||||
/***** Edit syllabus *****/
|
||||
Syl_CheckAndShowSyllabus (&Syllabus);
|
||||
|
||||
/***** End box *****/
|
||||
Box_BoxEnd ();
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -483,17 +493,11 @@ int Syl_ReadLevelItemSyllabus (FILE *XML)
|
|||
|
||||
static void Syl_ShowSyllabus (struct Syl_Syllabus *Syllabus)
|
||||
{
|
||||
extern const char *Txt_INFO_TITLE[Inf_NUM_TYPES];
|
||||
extern const char *Hlp_COURSE_Syllabus_edit;
|
||||
extern const char *Hlp_COURSE_Syllabus;
|
||||
extern const char *Txt_INFO_TITLE[Inf_NUM_TYPES];
|
||||
extern const char *Txt_Done;
|
||||
unsigned NumItem;
|
||||
int Col;
|
||||
static const char **HelpLink[Vie_NUM_VIEW_TYPES] =
|
||||
{
|
||||
[Vie_VIEW] = &Hlp_COURSE_Syllabus,
|
||||
[Vie_EDIT] = &Hlp_COURSE_Syllabus_edit,
|
||||
};
|
||||
static int NumButtons[Vie_NUM_VIEW_TYPES] =
|
||||
{
|
||||
[Vie_VIEW] = 0,
|
||||
|
@ -503,81 +507,67 @@ static void Syl_ShowSyllabus (struct Syl_Syllabus *Syllabus)
|
|||
{
|
||||
[Inf_INTRODUCTION ] = ActSeeCrsInf,
|
||||
[Inf_TEACHING_GUIDE] = ActSeeTchGui,
|
||||
[Inf_LECTURES ] = ActSeeSylLec,
|
||||
[Inf_PRACTICALS ] = ActSeeSylPra,
|
||||
[Inf_LECTURES ] = ActSeeSyl,
|
||||
[Inf_PRACTICALS ] = ActSeeSyl,
|
||||
[Inf_BIBLIOGRAPHY ] = ActSeeBib,
|
||||
[Inf_FAQ ] = ActSeeFAQ,
|
||||
[Inf_LINKS ] = ActSeeCrsLnk,
|
||||
[Inf_ASSESSMENT ] = ActSeeAss,
|
||||
};
|
||||
bool ShowRowInsertNewItem = (Gbl.Action.Act == ActInsIteSylLec || Gbl.Action.Act == ActInsIteSylPra ||
|
||||
Gbl.Action.Act == ActModIteSylLec || Gbl.Action.Act == ActModIteSylPra ||
|
||||
Gbl.Action.Act == ActRgtIteSylLec || Gbl.Action.Act == ActRgtIteSylPra ||
|
||||
Gbl.Action.Act == ActLftIteSylLec || Gbl.Action.Act == ActLftIteSylPra);
|
||||
bool ICanEdit = Gbl.Usrs.Me.Role.Logged == Rol_TCH ||
|
||||
Gbl.Usrs.Me.Role.Logged == Rol_SYS_ADM;
|
||||
bool PutIconToEdit = Syllabus->ViewType == Vie_VIEW && ICanEdit;
|
||||
bool ShowRowInsertNewItem = (Gbl.Action.Act == ActInsIteSyl ||
|
||||
Gbl.Action.Act == ActModIteSyl ||
|
||||
Gbl.Action.Act == ActRgtIteSyl ||
|
||||
Gbl.Action.Act == ActLftIteSyl);
|
||||
|
||||
/***** Begin box *****/
|
||||
Box_BoxBegin (Txt_INFO_TITLE[Gbl.Crs.Info.Type],
|
||||
PutIconToEdit ? Inf_PutIconToEditInfo :
|
||||
NULL,
|
||||
PutIconToEdit ? &Gbl.Crs.Info.Type :
|
||||
NULL,
|
||||
*HelpLink[Syllabus->ViewType],Box_NOT_CLOSABLE);
|
||||
/***** Begin table *****/
|
||||
HTM_TABLE_BeginWide ();
|
||||
|
||||
/***** Begin table *****/
|
||||
HTM_TABLE_BeginWide ();
|
||||
/***** Set width of columns of the table *****/
|
||||
HTM_Txt ("<colgroup>");
|
||||
for (Col = 0;
|
||||
Col < NumButtons[Syllabus->ViewType];
|
||||
Col++)
|
||||
HTM_Txt ("<col width=\"12\" />");
|
||||
for (Col = 1;
|
||||
Col <= Syl_LstItemsSyllabus.NumLevels;
|
||||
Col++)
|
||||
HTM_TxtF ("<col width=\"%d\" />",Col * Syl_WIDTH_NUM_SYLLABUS);
|
||||
HTM_Txt ("<col width=\"*\" />");
|
||||
HTM_Txt ("</colgroup>");
|
||||
|
||||
/***** Set width of columns of the table *****/
|
||||
HTM_Txt ("<colgroup>");
|
||||
for (Col = 0;
|
||||
Col < NumButtons[Syllabus->ViewType];
|
||||
Col++)
|
||||
HTM_Txt ("<col width=\"12\" />");
|
||||
for (Col = 1;
|
||||
Col <= Syl_LstItemsSyllabus.NumLevels;
|
||||
Col++)
|
||||
HTM_TxtF ("<col width=\"%d\" />",Col * Syl_WIDTH_NUM_SYLLABUS);
|
||||
HTM_Txt ("<col width=\"*\" />");
|
||||
HTM_Txt ("</colgroup>");
|
||||
if (Syl_LstItemsSyllabus.NumItems)
|
||||
/***** Loop writing all items of the syllabus *****/
|
||||
for (NumItem = 0;
|
||||
NumItem < Syl_LstItemsSyllabus.NumItems;
|
||||
NumItem++)
|
||||
{
|
||||
Syl_ShowRowSyllabus (Syllabus,NumItem,
|
||||
Syl_LstItemsSyllabus.Lst[NumItem].Level,
|
||||
Syl_LstItemsSyllabus.Lst[NumItem].CodItem,
|
||||
Syl_LstItemsSyllabus.Lst[NumItem].Text,false);
|
||||
if (ShowRowInsertNewItem && NumItem == Syllabus->NumItem)
|
||||
// Mostrar a new row where se puede insert a new item
|
||||
Syl_ShowRowSyllabus (Syllabus,NumItem + 1,
|
||||
Syl_LstItemsSyllabus.Lst[NumItem].Level,NULL,
|
||||
"",true);
|
||||
}
|
||||
else if (Syllabus->ViewType == Vie_EDIT)
|
||||
/***** If the syllabus is empty ==>
|
||||
show form to add a iten to the end *****/
|
||||
Syl_ShowRowSyllabus (Syllabus,0,
|
||||
1,Syl_LstItemsSyllabus.Lst[0].CodItem,"",true);
|
||||
|
||||
if (Syl_LstItemsSyllabus.NumItems)
|
||||
/***** Loop writing all items of the syllabus *****/
|
||||
for (NumItem = 0;
|
||||
NumItem < Syl_LstItemsSyllabus.NumItems;
|
||||
NumItem++)
|
||||
{
|
||||
Syl_ShowRowSyllabus (Syllabus,NumItem,
|
||||
Syl_LstItemsSyllabus.Lst[NumItem].Level,
|
||||
Syl_LstItemsSyllabus.Lst[NumItem].CodItem,
|
||||
Syl_LstItemsSyllabus.Lst[NumItem].Text,false);
|
||||
if (ShowRowInsertNewItem && NumItem == Syllabus->NumItem)
|
||||
// Mostrar a new row where se puede insert a new item
|
||||
Syl_ShowRowSyllabus (Syllabus,NumItem + 1,
|
||||
Syl_LstItemsSyllabus.Lst[NumItem].Level,NULL,
|
||||
"",true);
|
||||
}
|
||||
else if (Syllabus->ViewType == Vie_EDIT)
|
||||
/***** If the syllabus is empty ==>
|
||||
show form to add a iten to the end *****/
|
||||
Syl_ShowRowSyllabus (Syllabus,0,
|
||||
1,Syl_LstItemsSyllabus.Lst[0].CodItem,"",true);
|
||||
/***** End table *****/
|
||||
HTM_TABLE_End ();
|
||||
|
||||
/***** End table *****/
|
||||
HTM_TABLE_End ();
|
||||
|
||||
/***** Button to view *****/
|
||||
if (Syllabus->ViewType == Vie_EDIT)
|
||||
{
|
||||
Frm_BeginForm (Inf_Actions[Gbl.Crs.Info.Type]);
|
||||
Syl_PutParWhichSyllabus (&Syllabus->WhichSyllabus);
|
||||
Btn_PutConfirmButton (Txt_Done);
|
||||
Frm_EndForm ();
|
||||
}
|
||||
|
||||
/***** End box *****/
|
||||
Box_BoxEnd ();
|
||||
/***** Button to view *****/
|
||||
if (Syllabus->ViewType == Vie_EDIT)
|
||||
{
|
||||
Frm_BeginForm (Inf_Actions[Gbl.Crs.Info.Type]);
|
||||
Syl_PutParWhichSyllabus (&Syllabus->WhichSyllabus);
|
||||
Btn_PutConfirmButton (Txt_Done);
|
||||
Frm_EndForm ();
|
||||
}
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -647,8 +637,7 @@ static void Syl_ShowRowSyllabus (struct Syl_Syllabus *Syllabus,unsigned NumItem,
|
|||
if (Syl_LstItemsSyllabus.Lst[NumItem].HasChildren)
|
||||
Ico_PutIconRemovalNotAllowed ();
|
||||
else
|
||||
Ico_PutContextualIconToRemove (Gbl.Crs.Info.Type == Inf_LECTURES ? ActDelItmSylLec :
|
||||
ActDelItmSylPra,NULL,
|
||||
Ico_PutContextualIconToRemove (ActDelItmSyl,NULL,
|
||||
Syl_PutParsSyllabus,Syllabus);
|
||||
HTM_TD_End ();
|
||||
|
||||
|
@ -656,9 +645,7 @@ static void Syl_ShowRowSyllabus (struct Syl_Syllabus *Syllabus,unsigned NumItem,
|
|||
Syl_CalculateUpSubtreeSyllabus (&Subtree,NumItem);
|
||||
HTM_TD_Begin ("class=\"BM %s\"",The_GetColorRows ());
|
||||
if (Subtree.MovAllowed)
|
||||
Lay_PutContextualLinkOnlyIcon (Gbl.Crs.Info.Type == Inf_LECTURES ? ActUp_IteSylLec :
|
||||
ActUp_IteSylPra,
|
||||
NULL,
|
||||
Lay_PutContextualLinkOnlyIcon (ActUp_IteSyl,NULL,
|
||||
Syl_PutParsSyllabus,Syllabus,
|
||||
"arrow-up.svg",Ico_BLACK);
|
||||
else
|
||||
|
@ -670,9 +657,7 @@ static void Syl_ShowRowSyllabus (struct Syl_Syllabus *Syllabus,unsigned NumItem,
|
|||
Syl_CalculateDownSubtreeSyllabus (&Subtree,NumItem);
|
||||
HTM_TD_Begin ("class=\"BM %s\"",The_GetColorRows ());
|
||||
if (Subtree.MovAllowed)
|
||||
Lay_PutContextualLinkOnlyIcon (Gbl.Crs.Info.Type == Inf_LECTURES ? ActDwnIteSylLec :
|
||||
ActDwnIteSylPra,
|
||||
NULL,
|
||||
Lay_PutContextualLinkOnlyIcon (ActDwnIteSyl,NULL,
|
||||
Syl_PutParsSyllabus,Syllabus,
|
||||
"arrow-down.svg",Ico_BLACK);
|
||||
else
|
||||
|
@ -683,9 +668,7 @@ static void Syl_ShowRowSyllabus (struct Syl_Syllabus *Syllabus,unsigned NumItem,
|
|||
/***** Icon to increase the level of an item *****/
|
||||
HTM_TD_Begin ("class=\"BM %s\"",The_GetColorRows ());
|
||||
if (Level > 1)
|
||||
Lay_PutContextualLinkOnlyIcon (Gbl.Crs.Info.Type == Inf_LECTURES ? ActRgtIteSylLec :
|
||||
ActRgtIteSylPra,
|
||||
NULL,
|
||||
Lay_PutContextualLinkOnlyIcon (ActRgtIteSyl,NULL,
|
||||
Syl_PutParsSyllabus,Syllabus,
|
||||
"arrow-left.svg",Ico_BLACK);
|
||||
else
|
||||
|
@ -697,9 +680,7 @@ static void Syl_ShowRowSyllabus (struct Syl_Syllabus *Syllabus,unsigned NumItem,
|
|||
HTM_TD_Begin ("class=\"BM %s\"",The_GetColorRows ());
|
||||
if (Level < LastLevel + 1 &&
|
||||
Level < Syl_MAX_LEVELS_SYLLABUS)
|
||||
Lay_PutContextualLinkOnlyIcon (Gbl.Crs.Info.Type == Inf_LECTURES ? ActLftIteSylLec :
|
||||
ActLftIteSylPra,
|
||||
NULL,
|
||||
Lay_PutContextualLinkOnlyIcon (ActLftIteSyl,NULL,
|
||||
Syl_PutParsSyllabus,Syllabus,
|
||||
"arrow-right.svg",Ico_BLACK);
|
||||
else
|
||||
|
@ -833,10 +814,8 @@ static void Syl_PutFormItemSyllabus (struct Syl_Syllabus *Syllabus,
|
|||
HTM_TD_Begin ("colspan=\"%d\" class=\"LM %s\"",
|
||||
Syl_LstItemsSyllabus.NumLevels - Level + 1,
|
||||
The_GetColorRows ());
|
||||
Frm_BeginForm (NewItem ? (Gbl.Crs.Info.Type == Inf_LECTURES ? ActInsIteSylLec :
|
||||
ActInsIteSylPra) :
|
||||
(Gbl.Crs.Info.Type == Inf_LECTURES ? ActModIteSylLec :
|
||||
ActModIteSylPra));
|
||||
Frm_BeginForm (NewItem ? ActInsIteSyl :
|
||||
ActModIteSyl);
|
||||
Syllabus->ParNumItem = NumItem;
|
||||
Syl_PutParsSyllabus (Syllabus);
|
||||
HTM_INPUT_TEXT ("Txt",Syl_MAX_CHARS_TEXT_ITEM,Text,
|
||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue