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