diff --git a/swad_action_list.c b/swad_action_list.c index 4c35b477..5fd04419 100644 --- a/swad_action_list.c +++ b/swad_action_list.c @@ -615,7 +615,8 @@ const struct Act_Actions ActLst_Actions[ActLst_NUM_ACTIONS] = [ActReqLnkAsg ] = {1943,-1,TabUnk,ActSeeAllAsg ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,AsgRsc_GetLinkToAssignment ,NULL}, [ActCfgPrj ] = {1803,-1,TabUnk,ActSeeAllPrj ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,PrjCfg_ShowFormConfig ,NULL}, - [ActRcvCfgPrj ] = {1804,-1,TabUnk,ActSeeAllPrj ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,PrjCfg_ReceiveConfig ,NULL}, + [ActChgNETCanCrePrj ] = {1804,-1,TabUnk,ActSeeAllPrj ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,PrjCfg_ChangeNETCanCreate ,NULL}, + [ActChgRubPrj ] = {1977,-1,TabUnk,ActSeeAllPrj ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,PrjCfg_ChangeRubricsOfType ,NULL}, [ActReqUsrPrj ] = {1805,-1,TabUnk,ActSeeAllPrj ,0x238,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Prj_ListUsrsToSelect ,NULL}, [ActSeeTblAllPrj ] = {1696,-1,TabUnk,ActSeeAllPrj ,0x238,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_NEW_TAB,NULL ,Prj_ShowTableSelectedPrjs ,NULL}, [ActReqLckAllPrj ] = {1775,-1,TabUnk,ActSeeAllPrj ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Prj_ReqLockSelectedPrjsEdition ,NULL}, @@ -3698,7 +3699,7 @@ Act_Action_t ActLst_FromActCodToAction[1 + ActLst_MAX_ACTION_COD] = // Do not re ActChgVisResMchUsr, // #1801 ActChgNumColMch, // #1802 ActCfgPrj, // #1803 - ActRcvCfgPrj, // #1804 + ActChgNETCanCrePrj, // #1804 ActReqUsrPrj, // #1805 ActShoHidComGblTL, // #1806 ActShoHidComUsrTL, // #1807 @@ -3871,4 +3872,5 @@ Act_Action_t ActLst_FromActCodToAction[1 + ActLst_MAX_ACTION_COD] = // Do not re ActChgPrjSco, // #1974 ActChgTstQst, // #1975 ActChgSvyQst, // #1976 + ActChgRubPrj, // #1977 }; diff --git a/swad_action_list.h b/swad_action_list.h index ca46c7be..ef5ed6ea 100644 --- a/swad_action_list.h +++ b/swad_action_list.h @@ -541,249 +541,250 @@ #define ActReqLnkAsg (ActChgCrsTT1stDay + 19) #define ActCfgPrj (ActChgCrsTT1stDay + 20) -#define ActRcvCfgPrj (ActChgCrsTT1stDay + 21) -#define ActReqUsrPrj (ActChgCrsTT1stDay + 22) -#define ActSeeTblAllPrj (ActChgCrsTT1stDay + 23) -#define ActReqLckAllPrj (ActChgCrsTT1stDay + 24) -#define ActReqUnlAllPrj (ActChgCrsTT1stDay + 25) -#define ActLckAllPrj (ActChgCrsTT1stDay + 26) -#define ActUnlAllPrj (ActChgCrsTT1stDay + 27) -#define ActFrmNewPrj (ActChgCrsTT1stDay + 28) -#define ActEdiOnePrj (ActChgCrsTT1stDay + 29) -#define ActSeeOnePrj (ActChgCrsTT1stDay + 30) -#define ActPrnOnePrj (ActChgCrsTT1stDay + 31) -#define ActNewPrj (ActChgCrsTT1stDay + 32) -#define ActChgPrj (ActChgCrsTT1stDay + 33) -#define ActReqRemPrj (ActChgCrsTT1stDay + 34) -#define ActRemPrj (ActChgCrsTT1stDay + 35) -#define ActHidPrj (ActChgCrsTT1stDay + 36) -#define ActUnhPrj (ActChgCrsTT1stDay + 37) -#define ActLckPrj (ActChgCrsTT1stDay + 38) -#define ActUnlPrj (ActChgCrsTT1stDay + 39) -#define ActChgPrjRev (ActChgCrsTT1stDay + 40) -#define ActReqAddStdPrj (ActChgCrsTT1stDay + 41) -#define ActReqAddTutPrj (ActChgCrsTT1stDay + 42) -#define ActReqAddEvlPrj (ActChgCrsTT1stDay + 43) -#define ActAddStdPrj (ActChgCrsTT1stDay + 44) -#define ActAddTutPrj (ActChgCrsTT1stDay + 45) -#define ActAddEvlPrj (ActChgCrsTT1stDay + 46) -#define ActReqRemStdPrj (ActChgCrsTT1stDay + 47) -#define ActReqRemTutPrj (ActChgCrsTT1stDay + 48) -#define ActReqRemEvlPrj (ActChgCrsTT1stDay + 49) -#define ActRemStdPrj (ActChgCrsTT1stDay + 50) -#define ActRemTutPrj (ActChgCrsTT1stDay + 51) -#define ActRemEvlPrj (ActChgCrsTT1stDay + 52) -#define ActChgPrjSco (ActChgCrsTT1stDay + 53) -#define ActReqLnkPrj (ActChgCrsTT1stDay + 54) +#define ActChgNETCanCrePrj (ActChgCrsTT1stDay + 21) +#define ActChgRubPrj (ActChgCrsTT1stDay + 22) +#define ActReqUsrPrj (ActChgCrsTT1stDay + 23) +#define ActSeeTblAllPrj (ActChgCrsTT1stDay + 24) +#define ActReqLckAllPrj (ActChgCrsTT1stDay + 25) +#define ActReqUnlAllPrj (ActChgCrsTT1stDay + 26) +#define ActLckAllPrj (ActChgCrsTT1stDay + 27) +#define ActUnlAllPrj (ActChgCrsTT1stDay + 28) +#define ActFrmNewPrj (ActChgCrsTT1stDay + 29) +#define ActEdiOnePrj (ActChgCrsTT1stDay + 30) +#define ActSeeOnePrj (ActChgCrsTT1stDay + 31) +#define ActPrnOnePrj (ActChgCrsTT1stDay + 32) +#define ActNewPrj (ActChgCrsTT1stDay + 33) +#define ActChgPrj (ActChgCrsTT1stDay + 34) +#define ActReqRemPrj (ActChgCrsTT1stDay + 35) +#define ActRemPrj (ActChgCrsTT1stDay + 36) +#define ActHidPrj (ActChgCrsTT1stDay + 37) +#define ActUnhPrj (ActChgCrsTT1stDay + 38) +#define ActLckPrj (ActChgCrsTT1stDay + 39) +#define ActUnlPrj (ActChgCrsTT1stDay + 40) +#define ActChgPrjRev (ActChgCrsTT1stDay + 41) +#define ActReqAddStdPrj (ActChgCrsTT1stDay + 42) +#define ActReqAddTutPrj (ActChgCrsTT1stDay + 43) +#define ActReqAddEvlPrj (ActChgCrsTT1stDay + 44) +#define ActAddStdPrj (ActChgCrsTT1stDay + 45) +#define ActAddTutPrj (ActChgCrsTT1stDay + 46) +#define ActAddEvlPrj (ActChgCrsTT1stDay + 47) +#define ActReqRemStdPrj (ActChgCrsTT1stDay + 48) +#define ActReqRemTutPrj (ActChgCrsTT1stDay + 49) +#define ActReqRemEvlPrj (ActChgCrsTT1stDay + 50) +#define ActRemStdPrj (ActChgCrsTT1stDay + 51) +#define ActRemTutPrj (ActChgCrsTT1stDay + 52) +#define ActRemEvlPrj (ActChgCrsTT1stDay + 53) +#define ActChgPrjSco (ActChgCrsTT1stDay + 54) +#define ActReqLnkPrj (ActChgCrsTT1stDay + 55) -#define ActAdmDocPrj (ActChgCrsTT1stDay + 55) -#define ActReqRemFilDocPrj (ActChgCrsTT1stDay + 56) -#define ActRemFilDocPrj (ActChgCrsTT1stDay + 57) -#define ActRemFolDocPrj (ActChgCrsTT1stDay + 58) -#define ActCopDocPrj (ActChgCrsTT1stDay + 59) -#define ActPasDocPrj (ActChgCrsTT1stDay + 60) -#define ActRemTreDocPrj (ActChgCrsTT1stDay + 61) -#define ActFrmCreDocPrj (ActChgCrsTT1stDay + 62) -#define ActCreFolDocPrj (ActChgCrsTT1stDay + 63) -#define ActCreLnkDocPrj (ActChgCrsTT1stDay + 64) -#define ActRenFolDocPrj (ActChgCrsTT1stDay + 65) -#define ActRcvFilDocPrjDZ (ActChgCrsTT1stDay + 66) -#define ActRcvFilDocPrjCla (ActChgCrsTT1stDay + 67) -#define ActExpDocPrj (ActChgCrsTT1stDay + 68) -#define ActConDocPrj (ActChgCrsTT1stDay + 69) -#define ActZIPDocPrj (ActChgCrsTT1stDay + 70) -#define ActReqDatDocPrj (ActChgCrsTT1stDay + 71) -#define ActChgDatDocPrj (ActChgCrsTT1stDay + 72) -#define ActDowDocPrj (ActChgCrsTT1stDay + 73) +#define ActAdmDocPrj (ActChgCrsTT1stDay + 56) +#define ActReqRemFilDocPrj (ActChgCrsTT1stDay + 57) +#define ActRemFilDocPrj (ActChgCrsTT1stDay + 58) +#define ActRemFolDocPrj (ActChgCrsTT1stDay + 59) +#define ActCopDocPrj (ActChgCrsTT1stDay + 60) +#define ActPasDocPrj (ActChgCrsTT1stDay + 61) +#define ActRemTreDocPrj (ActChgCrsTT1stDay + 62) +#define ActFrmCreDocPrj (ActChgCrsTT1stDay + 63) +#define ActCreFolDocPrj (ActChgCrsTT1stDay + 64) +#define ActCreLnkDocPrj (ActChgCrsTT1stDay + 65) +#define ActRenFolDocPrj (ActChgCrsTT1stDay + 66) +#define ActRcvFilDocPrjDZ (ActChgCrsTT1stDay + 67) +#define ActRcvFilDocPrjCla (ActChgCrsTT1stDay + 68) +#define ActExpDocPrj (ActChgCrsTT1stDay + 69) +#define ActConDocPrj (ActChgCrsTT1stDay + 70) +#define ActZIPDocPrj (ActChgCrsTT1stDay + 71) +#define ActReqDatDocPrj (ActChgCrsTT1stDay + 72) +#define ActChgDatDocPrj (ActChgCrsTT1stDay + 73) +#define ActDowDocPrj (ActChgCrsTT1stDay + 74) -#define ActAdmAssPrj (ActChgCrsTT1stDay + 74) -#define ActReqRemFilAssPrj (ActChgCrsTT1stDay + 75) -#define ActRemFilAssPrj (ActChgCrsTT1stDay + 76) -#define ActRemFolAssPrj (ActChgCrsTT1stDay + 77) -#define ActCopAssPrj (ActChgCrsTT1stDay + 78) -#define ActPasAssPrj (ActChgCrsTT1stDay + 79) -#define ActRemTreAssPrj (ActChgCrsTT1stDay + 80) -#define ActFrmCreAssPrj (ActChgCrsTT1stDay + 81) -#define ActCreFolAssPrj (ActChgCrsTT1stDay + 82) -#define ActCreLnkAssPrj (ActChgCrsTT1stDay + 83) -#define ActRenFolAssPrj (ActChgCrsTT1stDay + 84) -#define ActRcvFilAssPrjDZ (ActChgCrsTT1stDay + 85) -#define ActRcvFilAssPrjCla (ActChgCrsTT1stDay + 86) -#define ActExpAssPrj (ActChgCrsTT1stDay + 87) -#define ActConAssPrj (ActChgCrsTT1stDay + 88) -#define ActZIPAssPrj (ActChgCrsTT1stDay + 89) -#define ActReqDatAssPrj (ActChgCrsTT1stDay + 90) -#define ActChgDatAssPrj (ActChgCrsTT1stDay + 91) -#define ActDowAssPrj (ActChgCrsTT1stDay + 92) +#define ActAdmAssPrj (ActChgCrsTT1stDay + 75) +#define ActReqRemFilAssPrj (ActChgCrsTT1stDay + 76) +#define ActRemFilAssPrj (ActChgCrsTT1stDay + 77) +#define ActRemFolAssPrj (ActChgCrsTT1stDay + 78) +#define ActCopAssPrj (ActChgCrsTT1stDay + 79) +#define ActPasAssPrj (ActChgCrsTT1stDay + 80) +#define ActRemTreAssPrj (ActChgCrsTT1stDay + 81) +#define ActFrmCreAssPrj (ActChgCrsTT1stDay + 82) +#define ActCreFolAssPrj (ActChgCrsTT1stDay + 83) +#define ActCreLnkAssPrj (ActChgCrsTT1stDay + 84) +#define ActRenFolAssPrj (ActChgCrsTT1stDay + 85) +#define ActRcvFilAssPrjDZ (ActChgCrsTT1stDay + 86) +#define ActRcvFilAssPrjCla (ActChgCrsTT1stDay + 87) +#define ActExpAssPrj (ActChgCrsTT1stDay + 88) +#define ActConAssPrj (ActChgCrsTT1stDay + 89) +#define ActZIPAssPrj (ActChgCrsTT1stDay + 90) +#define ActReqDatAssPrj (ActChgCrsTT1stDay + 91) +#define ActChgDatAssPrj (ActChgCrsTT1stDay + 92) +#define ActDowAssPrj (ActChgCrsTT1stDay + 93) -#define ActSeeOneCfe (ActChgCrsTT1stDay + 93) -#define ActSeeDatCfe (ActChgCrsTT1stDay + 94) -#define ActEdiCfe (ActChgCrsTT1stDay + 95) -#define ActRcvCfe (ActChgCrsTT1stDay + 96) -#define ActPrnCfe (ActChgCrsTT1stDay + 97) -#define ActReqRemCfe (ActChgCrsTT1stDay + 98) -#define ActRemCfe (ActChgCrsTT1stDay + 99) -#define ActHidCfe (ActChgCrsTT1stDay + 100) -#define ActUnhCfe (ActChgCrsTT1stDay + 101) -#define ActReqLnkCfe (ActChgCrsTT1stDay + 102) +#define ActSeeOneCfe (ActChgCrsTT1stDay + 94) +#define ActSeeDatCfe (ActChgCrsTT1stDay + 95) +#define ActEdiCfe (ActChgCrsTT1stDay + 96) +#define ActRcvCfe (ActChgCrsTT1stDay + 97) +#define ActPrnCfe (ActChgCrsTT1stDay + 98) +#define ActReqRemCfe (ActChgCrsTT1stDay + 99) +#define ActRemCfe (ActChgCrsTT1stDay + 100) +#define ActHidCfe (ActChgCrsTT1stDay + 101) +#define ActUnhCfe (ActChgCrsTT1stDay + 102) +#define ActReqLnkCfe (ActChgCrsTT1stDay + 103) -#define ActEdiOneTstQst (ActChgCrsTT1stDay + 103) -#define ActReqImpTstQst (ActChgCrsTT1stDay + 104) -#define ActImpTstQst (ActChgCrsTT1stDay + 105) -#define ActLstTstQst (ActChgCrsTT1stDay + 106) -#define ActNewTstQst (ActChgCrsTT1stDay + 107) -#define ActChgTstQst (ActChgCrsTT1stDay + 108) -#define ActReqRemSevTstQst (ActChgCrsTT1stDay + 109) -#define ActRemSevTstQst (ActChgCrsTT1stDay + 110) -#define ActReqRemOneTstQst (ActChgCrsTT1stDay + 111) -#define ActRemOneTstQst (ActChgCrsTT1stDay + 112) -#define ActChgShfTstQst (ActChgCrsTT1stDay + 113) +#define ActEdiOneTstQst (ActChgCrsTT1stDay + 104) +#define ActReqImpTstQst (ActChgCrsTT1stDay + 105) +#define ActImpTstQst (ActChgCrsTT1stDay + 106) +#define ActLstTstQst (ActChgCrsTT1stDay + 107) +#define ActNewTstQst (ActChgCrsTT1stDay + 108) +#define ActChgTstQst (ActChgCrsTT1stDay + 109) +#define ActReqRemSevTstQst (ActChgCrsTT1stDay + 110) +#define ActRemSevTstQst (ActChgCrsTT1stDay + 111) +#define ActReqRemOneTstQst (ActChgCrsTT1stDay + 112) +#define ActRemOneTstQst (ActChgCrsTT1stDay + 113) +#define ActChgShfTstQst (ActChgCrsTT1stDay + 114) -#define ActEdiTag (ActChgCrsTT1stDay + 114) -#define ActEnaTag (ActChgCrsTT1stDay + 115) -#define ActDisTag (ActChgCrsTT1stDay + 116) -#define ActRenTag (ActChgCrsTT1stDay + 117) +#define ActEdiTag (ActChgCrsTT1stDay + 115) +#define ActEnaTag (ActChgCrsTT1stDay + 116) +#define ActDisTag (ActChgCrsTT1stDay + 117) +#define ActRenTag (ActChgCrsTT1stDay + 118) -#define ActSeeTst (ActChgCrsTT1stDay + 118) -#define ActReqAssTst (ActChgCrsTT1stDay + 119) -#define ActAssTst (ActChgCrsTT1stDay + 120) -#define ActCfgTst (ActChgCrsTT1stDay + 121) -#define ActRcvCfgTst (ActChgCrsTT1stDay + 122) +#define ActSeeTst (ActChgCrsTT1stDay + 119) +#define ActReqAssTst (ActChgCrsTT1stDay + 120) +#define ActAssTst (ActChgCrsTT1stDay + 121) +#define ActCfgTst (ActChgCrsTT1stDay + 122) +#define ActRcvCfgTst (ActChgCrsTT1stDay + 123) -#define ActReqSeeMyTstRes (ActChgCrsTT1stDay + 123) -#define ActSeeMyTstResCrs (ActChgCrsTT1stDay + 124) -#define ActSeeOneTstResMe (ActChgCrsTT1stDay + 125) -#define ActReqSeeUsrTstRes (ActChgCrsTT1stDay + 126) -#define ActSeeUsrTstResCrs (ActChgCrsTT1stDay + 127) -#define ActSeeOneTstResOth (ActChgCrsTT1stDay + 128) +#define ActReqSeeMyTstRes (ActChgCrsTT1stDay + 124) +#define ActSeeMyTstResCrs (ActChgCrsTT1stDay + 125) +#define ActSeeOneTstResMe (ActChgCrsTT1stDay + 126) +#define ActReqSeeUsrTstRes (ActChgCrsTT1stDay + 127) +#define ActSeeUsrTstResCrs (ActChgCrsTT1stDay + 128) +#define ActSeeOneTstResOth (ActChgCrsTT1stDay + 129) -#define ActSeeOneExa (ActChgCrsTT1stDay + 129) +#define ActSeeOneExa (ActChgCrsTT1stDay + 130) -#define ActFrmNewExa (ActChgCrsTT1stDay + 130) -#define ActEdiOneExa (ActChgCrsTT1stDay + 131) -#define ActNewExa (ActChgCrsTT1stDay + 132) -#define ActChgExa (ActChgCrsTT1stDay + 133) -#define ActReqRemExa (ActChgCrsTT1stDay + 134) -#define ActRemExa (ActChgCrsTT1stDay + 135) -#define ActHidExa (ActChgCrsTT1stDay + 136) -#define ActUnhExa (ActChgCrsTT1stDay + 137) -#define ActReqLnkExa (ActChgCrsTT1stDay + 138) +#define ActFrmNewExa (ActChgCrsTT1stDay + 131) +#define ActEdiOneExa (ActChgCrsTT1stDay + 132) +#define ActNewExa (ActChgCrsTT1stDay + 133) +#define ActChgExa (ActChgCrsTT1stDay + 134) +#define ActReqRemExa (ActChgCrsTT1stDay + 135) +#define ActRemExa (ActChgCrsTT1stDay + 136) +#define ActHidExa (ActChgCrsTT1stDay + 137) +#define ActUnhExa (ActChgCrsTT1stDay + 138) +#define ActReqLnkExa (ActChgCrsTT1stDay + 139) -#define ActNewExaSet (ActChgCrsTT1stDay + 139) -#define ActReqRemExaSet (ActChgCrsTT1stDay + 140) -#define ActRemExaSet (ActChgCrsTT1stDay + 141) -#define ActUp_ExaSet (ActChgCrsTT1stDay + 142) -#define ActDwnExaSet (ActChgCrsTT1stDay + 143) -#define ActChgTitExaSet (ActChgCrsTT1stDay + 144) -#define ActChgNumQstExaSet (ActChgCrsTT1stDay + 145) +#define ActNewExaSet (ActChgCrsTT1stDay + 140) +#define ActReqRemExaSet (ActChgCrsTT1stDay + 141) +#define ActRemExaSet (ActChgCrsTT1stDay + 142) +#define ActUp_ExaSet (ActChgCrsTT1stDay + 143) +#define ActDwnExaSet (ActChgCrsTT1stDay + 144) +#define ActChgTitExaSet (ActChgCrsTT1stDay + 145) +#define ActChgNumQstExaSet (ActChgCrsTT1stDay + 146) -#define ActReqAddQstExaSet (ActChgCrsTT1stDay + 146) -#define ActLstTstQstForSet (ActChgCrsTT1stDay + 147) -#define ActAddQstToExa (ActChgCrsTT1stDay + 148) -#define ActReqRemSetQst (ActChgCrsTT1stDay + 149) -#define ActRemExaQst (ActChgCrsTT1stDay + 150) -#define ActValSetQst (ActChgCrsTT1stDay + 151) -#define ActInvSetQst (ActChgCrsTT1stDay + 152) +#define ActReqAddQstExaSet (ActChgCrsTT1stDay + 147) +#define ActLstTstQstForSet (ActChgCrsTT1stDay + 148) +#define ActAddQstToExa (ActChgCrsTT1stDay + 149) +#define ActReqRemSetQst (ActChgCrsTT1stDay + 150) +#define ActRemExaQst (ActChgCrsTT1stDay + 151) +#define ActValSetQst (ActChgCrsTT1stDay + 152) +#define ActInvSetQst (ActChgCrsTT1stDay + 153) -#define ActReqNewExaSes (ActChgCrsTT1stDay + 153) -#define ActEdiOneExaSes (ActChgCrsTT1stDay + 154) -#define ActNewExaSes (ActChgCrsTT1stDay + 155) -#define ActChgExaSes (ActChgCrsTT1stDay + 156) -#define ActReqRemExaSes (ActChgCrsTT1stDay + 157) -#define ActRemExaSes (ActChgCrsTT1stDay + 158) -#define ActHidExaSes (ActChgCrsTT1stDay + 159) -#define ActUnhExaSes (ActChgCrsTT1stDay + 160) +#define ActReqNewExaSes (ActChgCrsTT1stDay + 154) +#define ActEdiOneExaSes (ActChgCrsTT1stDay + 155) +#define ActNewExaSes (ActChgCrsTT1stDay + 156) +#define ActChgExaSes (ActChgCrsTT1stDay + 157) +#define ActReqRemExaSes (ActChgCrsTT1stDay + 158) +#define ActRemExaSes (ActChgCrsTT1stDay + 159) +#define ActHidExaSes (ActChgCrsTT1stDay + 160) +#define ActUnhExaSes (ActChgCrsTT1stDay + 161) -#define ActSeeExaPrn (ActChgCrsTT1stDay + 161) -#define ActAnsExaPrn (ActChgCrsTT1stDay + 162) -#define ActEndExaPrn (ActChgCrsTT1stDay + 163) +#define ActSeeExaPrn (ActChgCrsTT1stDay + 162) +#define ActAnsExaPrn (ActChgCrsTT1stDay + 163) +#define ActEndExaPrn (ActChgCrsTT1stDay + 164) -#define ActSeeMyExaResCrs (ActChgCrsTT1stDay + 164) -#define ActSeeMyExaResExa (ActChgCrsTT1stDay + 165) -#define ActSeeMyExaResSes (ActChgCrsTT1stDay + 166) -#define ActSeeOneExaResMe (ActChgCrsTT1stDay + 167) -#define ActReqSeeUsrExaRes (ActChgCrsTT1stDay + 168) -#define ActSeeUsrExaResCrs (ActChgCrsTT1stDay + 169) -#define ActSeeUsrExaResExa (ActChgCrsTT1stDay + 170) -#define ActSeeUsrExaResSes (ActChgCrsTT1stDay + 171) -#define ActSeeOneExaResOth (ActChgCrsTT1stDay + 172) -#define ActChgVisExaRes (ActChgCrsTT1stDay + 173) +#define ActSeeMyExaResCrs (ActChgCrsTT1stDay + 165) +#define ActSeeMyExaResExa (ActChgCrsTT1stDay + 166) +#define ActSeeMyExaResSes (ActChgCrsTT1stDay + 167) +#define ActSeeOneExaResMe (ActChgCrsTT1stDay + 168) +#define ActReqSeeUsrExaRes (ActChgCrsTT1stDay + 169) +#define ActSeeUsrExaResCrs (ActChgCrsTT1stDay + 170) +#define ActSeeUsrExaResExa (ActChgCrsTT1stDay + 171) +#define ActSeeUsrExaResSes (ActChgCrsTT1stDay + 172) +#define ActSeeOneExaResOth (ActChgCrsTT1stDay + 173) +#define ActChgVisExaRes (ActChgCrsTT1stDay + 174) -#define ActSeeOneGam (ActChgCrsTT1stDay + 174) -#define ActReqRemMch (ActChgCrsTT1stDay + 175) -#define ActRemMch (ActChgCrsTT1stDay + 176) -#define ActEdiMch (ActChgCrsTT1stDay + 177) -#define ActChgMch (ActChgCrsTT1stDay + 178) -#define ActReqNewMch (ActChgCrsTT1stDay + 179) -#define ActNewMch (ActChgCrsTT1stDay + 180) -#define ActResMch (ActChgCrsTT1stDay + 181) -#define ActBckMch (ActChgCrsTT1stDay + 182) -#define ActPlyPauMch (ActChgCrsTT1stDay + 183) -#define ActFwdMch (ActChgCrsTT1stDay + 184) -#define ActChgNumColMch (ActChgCrsTT1stDay + 185) -#define ActChgVisResMchQst (ActChgCrsTT1stDay + 186) -#define ActMchCntDwn (ActChgCrsTT1stDay + 187) -#define ActRefMchTch (ActChgCrsTT1stDay + 188) +#define ActSeeOneGam (ActChgCrsTT1stDay + 175) +#define ActReqRemMch (ActChgCrsTT1stDay + 176) +#define ActRemMch (ActChgCrsTT1stDay + 177) +#define ActEdiMch (ActChgCrsTT1stDay + 178) +#define ActChgMch (ActChgCrsTT1stDay + 179) +#define ActReqNewMch (ActChgCrsTT1stDay + 180) +#define ActNewMch (ActChgCrsTT1stDay + 181) +#define ActResMch (ActChgCrsTT1stDay + 182) +#define ActBckMch (ActChgCrsTT1stDay + 183) +#define ActPlyPauMch (ActChgCrsTT1stDay + 184) +#define ActFwdMch (ActChgCrsTT1stDay + 185) +#define ActChgNumColMch (ActChgCrsTT1stDay + 186) +#define ActChgVisResMchQst (ActChgCrsTT1stDay + 187) +#define ActMchCntDwn (ActChgCrsTT1stDay + 188) +#define ActRefMchTch (ActChgCrsTT1stDay + 189) -#define ActJoiMch (ActChgCrsTT1stDay + 189) -#define ActSeeMchAnsQstStd (ActChgCrsTT1stDay + 190) -#define ActRemMchAnsQstStd (ActChgCrsTT1stDay + 191) -#define ActAnsMchQstStd (ActChgCrsTT1stDay + 192) -#define ActRefMchStd (ActChgCrsTT1stDay + 193) +#define ActJoiMch (ActChgCrsTT1stDay + 190) +#define ActSeeMchAnsQstStd (ActChgCrsTT1stDay + 191) +#define ActRemMchAnsQstStd (ActChgCrsTT1stDay + 192) +#define ActAnsMchQstStd (ActChgCrsTT1stDay + 193) +#define ActRefMchStd (ActChgCrsTT1stDay + 194) -#define ActSeeMyMchResCrs (ActChgCrsTT1stDay + 194) -#define ActSeeMyMchResGam (ActChgCrsTT1stDay + 195) -#define ActSeeMyMchResMch (ActChgCrsTT1stDay + 196) -#define ActSeeOneMchResMe (ActChgCrsTT1stDay + 197) +#define ActSeeMyMchResCrs (ActChgCrsTT1stDay + 195) +#define ActSeeMyMchResGam (ActChgCrsTT1stDay + 196) +#define ActSeeMyMchResMch (ActChgCrsTT1stDay + 197) +#define ActSeeOneMchResMe (ActChgCrsTT1stDay + 198) -#define ActReqSeeUsrMchRes (ActChgCrsTT1stDay + 198) -#define ActSeeUsrMchResCrs (ActChgCrsTT1stDay + 199) -#define ActSeeUsrMchResGam (ActChgCrsTT1stDay + 200) -#define ActSeeUsrMchResMch (ActChgCrsTT1stDay + 201) -#define ActSeeOneMchResOth (ActChgCrsTT1stDay + 202) +#define ActReqSeeUsrMchRes (ActChgCrsTT1stDay + 199) +#define ActSeeUsrMchResCrs (ActChgCrsTT1stDay + 200) +#define ActSeeUsrMchResGam (ActChgCrsTT1stDay + 201) +#define ActSeeUsrMchResMch (ActChgCrsTT1stDay + 202) +#define ActSeeOneMchResOth (ActChgCrsTT1stDay + 203) -#define ActChgVisResMchUsr (ActChgCrsTT1stDay + 203) +#define ActChgVisResMchUsr (ActChgCrsTT1stDay + 204) -#define ActLstOneGam (ActChgCrsTT1stDay + 204) +#define ActLstOneGam (ActChgCrsTT1stDay + 205) -#define ActFrmNewGam (ActChgCrsTT1stDay + 205) -#define ActEdiOneGam (ActChgCrsTT1stDay + 206) -#define ActNewGam (ActChgCrsTT1stDay + 207) -#define ActChgGam (ActChgCrsTT1stDay + 208) -#define ActReqRemGam (ActChgCrsTT1stDay + 209) -#define ActRemGam (ActChgCrsTT1stDay + 210) -#define ActHidGam (ActChgCrsTT1stDay + 211) -#define ActUnhGam (ActChgCrsTT1stDay + 212) -#define ActAddOneGamQst (ActChgCrsTT1stDay + 213) -#define ActGamLstTstQst (ActChgCrsTT1stDay + 214) -#define ActAddTstQstToGam (ActChgCrsTT1stDay + 215) -#define ActReqRemGamQst (ActChgCrsTT1stDay + 216) -#define ActRemGamQst (ActChgCrsTT1stDay + 217) -#define ActUp_GamQst (ActChgCrsTT1stDay + 218) -#define ActDwnGamQst (ActChgCrsTT1stDay + 219) -#define ActReqLnkGam (ActChgCrsTT1stDay + 220) +#define ActFrmNewGam (ActChgCrsTT1stDay + 206) +#define ActEdiOneGam (ActChgCrsTT1stDay + 207) +#define ActNewGam (ActChgCrsTT1stDay + 208) +#define ActChgGam (ActChgCrsTT1stDay + 209) +#define ActReqRemGam (ActChgCrsTT1stDay + 210) +#define ActRemGam (ActChgCrsTT1stDay + 211) +#define ActHidGam (ActChgCrsTT1stDay + 212) +#define ActUnhGam (ActChgCrsTT1stDay + 213) +#define ActAddOneGamQst (ActChgCrsTT1stDay + 214) +#define ActGamLstTstQst (ActChgCrsTT1stDay + 215) +#define ActAddTstQstToGam (ActChgCrsTT1stDay + 216) +#define ActReqRemGamQst (ActChgCrsTT1stDay + 217) +#define ActRemGamQst (ActChgCrsTT1stDay + 218) +#define ActUp_GamQst (ActChgCrsTT1stDay + 219) +#define ActDwnGamQst (ActChgCrsTT1stDay + 220) +#define ActReqLnkGam (ActChgCrsTT1stDay + 221) -#define ActSeeOneRub (ActChgCrsTT1stDay + 221) -#define ActFrmNewRub (ActChgCrsTT1stDay + 222) -#define ActEdiOneRub (ActChgCrsTT1stDay + 223) -#define ActNewRub (ActChgCrsTT1stDay + 224) -#define ActChgRub (ActChgCrsTT1stDay + 225) -#define ActReqRemRub (ActChgCrsTT1stDay + 226) -#define ActRemRub (ActChgCrsTT1stDay + 227) -#define ActReqLnkRub (ActChgCrsTT1stDay + 228) +#define ActSeeOneRub (ActChgCrsTT1stDay + 222) +#define ActFrmNewRub (ActChgCrsTT1stDay + 223) +#define ActEdiOneRub (ActChgCrsTT1stDay + 224) +#define ActNewRub (ActChgCrsTT1stDay + 225) +#define ActChgRub (ActChgCrsTT1stDay + 226) +#define ActReqRemRub (ActChgCrsTT1stDay + 227) +#define ActRemRub (ActChgCrsTT1stDay + 228) +#define ActReqLnkRub (ActChgCrsTT1stDay + 229) -#define ActSeeRscCli_InRub (ActChgCrsTT1stDay + 229) -#define ActRemRscCli_InRub (ActChgCrsTT1stDay + 230) -#define ActNewRubCri (ActChgCrsTT1stDay + 231) -#define ActReqRemRubCri (ActChgCrsTT1stDay + 232) -#define ActRemRubCri (ActChgCrsTT1stDay + 233) -#define ActUp_RubCri (ActChgCrsTT1stDay + 234) -#define ActDwnRubCri (ActChgCrsTT1stDay + 235) -#define ActChgTitRubCri (ActChgCrsTT1stDay + 236) -#define ActChgLnkRubCri (ActChgCrsTT1stDay + 237) -#define ActChgMinRubCri (ActChgCrsTT1stDay + 238) -#define ActChgMaxRubCri (ActChgCrsTT1stDay + 239) -#define ActChgWeiRubCri (ActChgCrsTT1stDay + 240) +#define ActSeeRscCli_InRub (ActChgCrsTT1stDay + 230) +#define ActRemRscCli_InRub (ActChgCrsTT1stDay + 231) +#define ActNewRubCri (ActChgCrsTT1stDay + 232) +#define ActReqRemRubCri (ActChgCrsTT1stDay + 233) +#define ActRemRubCri (ActChgCrsTT1stDay + 234) +#define ActUp_RubCri (ActChgCrsTT1stDay + 235) +#define ActDwnRubCri (ActChgCrsTT1stDay + 236) +#define ActChgTitRubCri (ActChgCrsTT1stDay + 237) +#define ActChgLnkRubCri (ActChgCrsTT1stDay + 238) +#define ActChgMinRubCri (ActChgCrsTT1stDay + 239) +#define ActChgMaxRubCri (ActChgCrsTT1stDay + 240) +#define ActChgWeiRubCri (ActChgCrsTT1stDay + 241) /*****************************************************************************/ /******************************** Files tab **********************************/ @@ -1780,7 +1781,7 @@ #define ActLst_NUM_ACTIONS (ActChgMyTT1stDay + 1) -#define ActLst_MAX_ACTION_COD 1976 +#define ActLst_MAX_ACTION_COD 1977 #define ActLst_DEFAULT_ACTION_AFTER_LOGIN ActSeeGblTL diff --git a/swad_changelog.h b/swad_changelog.h index ecfd4893..f7317dd5 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -629,11 +629,12 @@ TODO: Emilce Barrera Mesa: Podr TODO: Emilce Barrera Mesa: Mis estudiantes presentan muchas dificultades a la hora de poner la foto porque la plataforma es muy exigente respecto al fondo de la imagen. */ -#define Log_PLATFORM_VERSION "SWAD 22.110.3 (2023-05-15)" +#define Log_PLATFORM_VERSION "SWAD 22.111 (2023-05-17)" #define CSS_FILE "swad22.107.36.css" #define JS_FILE "swad22.49.js" /* - Version 22.110.3: May 15, 2023 Changes in rubrics. (? lines) + Version 22.111: May 17, 2023 A project can have more than one rubric in each category. (336691 lines) + Version 22.110.3: May 15, 2023 Changes in rubrics. (336550 lines) Version 22.110.2: May 15, 2023 Changes in rubrics. (336507 lines) Version 22.110.1: May 14, 2023 Changes in project rubrics. (336462 lines) Version 22.110: May 12, 2023 Code refactoring confirming removal. (336445 lines) diff --git a/swad_project.c b/swad_project.c index c07d8e58..fe8e7417 100644 --- a/swad_project.c +++ b/swad_project.c @@ -313,8 +313,10 @@ static Prj_ReviewStatus_t Prj_GetParReviewStatus (void); //------------------------------- Rubrics ------------------------------------- static void Prj_ShowRubrics (struct Prj_Projects *Projects); -static bool Prj_CheckIfICanViewRubric (long PrjCod,PrjCfg_Rubric_t WhichRubric); -static bool Prj_CheckIfICanFillRubric (long PrjCod,PrjCfg_Rubric_t WhichRubric); +static void Prj_ShowRubricsOfType (struct Prj_Projects *Projects, + PrjCfg_RubricType_t RubricType); +static bool Prj_CheckIfICanViewRubric (long PrjCod,PrjCfg_RubricType_t WhichRubric); +static bool Prj_CheckIfICanFillRubric (long PrjCod,PrjCfg_RubricType_t WhichRubric); /*****************************************************************************/ /******* Set/get project code (used to pass parameter to file browser) *******/ @@ -4489,9 +4491,7 @@ static Prj_ReviewStatus_t Prj_GetParReviewStatus (void) static void Prj_ShowRubrics (struct Prj_Projects *Projects) { extern const char *Txt_Assessment; - extern const char *Txt_PROJECT_RUBRIC[PrjCfg_NUM_RUBRICS]; - struct Rub_Rubric Rubric; - PrjCfg_Rubric_t WhichRubric; + PrjCfg_RubricType_t RubricType; /***** Begin fieldset *****/ HTM_FIELDSET_Begin (NULL); @@ -4500,25 +4500,12 @@ static void Prj_ShowRubrics (struct Prj_Projects *Projects) /***** Begin table *****/ HTM_TABLE_BeginWideMarginPadding (5); - /***** Rubrics *****/ - for (WhichRubric = (PrjCfg_Rubric_t) 1; - WhichRubric <= (PrjCfg_Rubric_t) (PrjCfg_NUM_RUBRICS - 1); - WhichRubric++) - if (Prj_CheckIfICanViewRubric (Projects->Prj.PrjCod,WhichRubric)) - { - /***** Get rubric data *****/ - Rub_RubricConstructor (&Rubric); - Rubric.RubCod = Projects->Config.RubCod[WhichRubric]; - Rub_GetRubricDataByCod (&Rubric); - - /***** Show this rubric ready to fill it *****/ - Rub_ShowRubricInProject (Projects,&Rubric, - Txt_PROJECT_RUBRIC[WhichRubric], - Prj_CheckIfICanFillRubric (Projects->Prj.PrjCod,WhichRubric)); - - /***** Free memory used for rubric *****/ - Rub_RubricDestructor (&Rubric); - } + /***** Show rubrics of each type ready to fill them *****/ + for (RubricType = (PrjCfg_RubricType_t) 1; + RubricType <= (PrjCfg_RubricType_t) (PrjCfg_NUM_RUBRIC_TYPES - 1); + RubricType++) + if (Prj_CheckIfICanViewRubric (Projects->Prj.PrjCod,RubricType)) + Prj_ShowRubricsOfType (Projects,RubricType); /***** End table *****/ HTM_TABLE_End (); @@ -4527,11 +4514,81 @@ static void Prj_ShowRubrics (struct Prj_Projects *Projects) HTM_FIELDSET_End (); } +/*****************************************************************************/ +/************************ Show one rubric in a project ***********************/ +/*****************************************************************************/ + +static void Prj_ShowRubricsOfType (struct Prj_Projects *Projects, + PrjCfg_RubricType_t RubricType) + { + extern const char *Txt_PROJECT_RUBRIC[PrjCfg_NUM_RUBRIC_TYPES]; + MYSQL_RES *mysql_res; + unsigned NumRubricsThisType; + unsigned NumRubThisType; + struct Rub_Rubric Rubric; + bool ICanFill = Prj_CheckIfICanFillRubric (Projects->Prj.PrjCod,RubricType); + + /***** Get project rubrics for current course from database *****/ + NumRubricsThisType = Prj_DB_GetRubricsOfType (&mysql_res,RubricType); + + /***** Show each rubric *****/ + for (NumRubThisType = 0; + NumRubThisType < NumRubricsThisType; + NumRubThisType++) + { + /***** Get rubric data *****/ + Rub_RubricConstructor (&Rubric); + Rubric.RubCod = DB_GetNextCode (mysql_res); + Rub_GetRubricDataByCod (&Rubric); + + /***** Show rubric ready to fill them *****/ + /* Begin first row of this rubric */ + HTM_TR_Begin (NULL); + + /* Rubric title */ + HTM_TD_Begin ("colspan=\"8\" class=\"LT ASG_TITLE_%s %s\"", + The_GetSuffix (),The_GetColorRows ()); + HTM_TxtColonNBSP (Txt_PROJECT_RUBRIC[RubricType]); + HTM_Txt (Rubric.Title); + HTM_TD_End (); + + /* End 1st row of this rubric */ + HTM_TR_End (); + + /* Begin 2nd row of this rubric */ + HTM_TR_Begin (NULL); + + /* Text of the rubric */ + HTM_TD_Begin ("colspan=\"8\" class=\"LT PAR DAT_%s %s\"", + The_GetSuffix (),The_GetColorRows ()); + Str_ChangeFormat (Str_FROM_HTML,Str_TO_RIGOROUS_HTML, + Rubric.Txt,Cns_MAX_BYTES_TEXT,false); // Convert from HTML to rigorous HTML + ALn_InsertLinks (Rubric.Txt,Cns_MAX_BYTES_TEXT,60); // Insert links + HTM_Txt (Rubric.Txt); + HTM_TD_End (); + + /* End 2nd row of this rubric */ + HTM_TR_End (); + + /* Change color for rubric criteria */ + The_ChangeRowColor (); + + /* Write criteria of this rubric */ + RubCri_ListCriteriaInProject (Projects,Rubric.RubCod,ICanFill); + + /* Change color for next rubric */ + The_ChangeRowColor (); + + /***** Free memory used for rubric *****/ + Rub_RubricDestructor (&Rubric); + } + } + /*****************************************************************************/ /************************* Who can view/fill rubrics *************************/ /*****************************************************************************/ -static bool Prj_CheckIfICanViewRubric (long PrjCod,PrjCfg_Rubric_t WhichRubric) +static bool Prj_CheckIfICanViewRubric (long PrjCod,PrjCfg_RubricType_t WhichRubric) { switch (Gbl.Usrs.Me.Role.Logged) { @@ -4558,7 +4615,7 @@ static bool Prj_CheckIfICanViewRubric (long PrjCod,PrjCfg_Rubric_t WhichRubric) return false; } -static bool Prj_CheckIfICanFillRubric (long PrjCod,PrjCfg_Rubric_t WhichRubric) +static bool Prj_CheckIfICanFillRubric (long PrjCod,PrjCfg_RubricType_t WhichRubric) { switch (Gbl.Usrs.Me.Role.Logged) { @@ -4594,7 +4651,7 @@ void Prj_ChangeCriterionScore (void) long CriCod; double Score; long RubCod; - PrjCfg_Rubric_t WhichRubric; + PrjCfg_RubricType_t WhichRubric; /***** Allocate memory for the project *****/ Prj_AllocMemProject (&Prj); diff --git a/swad_project_config.c b/swad_project_config.c index f9ffcfb7..a56420bd 100644 --- a/swad_project_config.c +++ b/swad_project_config.c @@ -31,26 +31,17 @@ #include "swad_alert.h" #include "swad_box.h" #include "swad_database.h" +#include "swad_error.h" #include "swad_form.h" #include "swad_global.h" #include "swad_parameter.h" +#include "swad_parameter_code.h" #include "swad_project.h" #include "swad_project_config.h" #include "swad_project_database.h" #include "swad_rubric.h" #include "swad_rubric_database.h" -/*****************************************************************************/ -/**************************** Private constants ******************************/ -/*****************************************************************************/ - -static const char *PrjCfg_RubricIDs[PrjCfg_NUM_RUBRICS] = - { - [PrjCfg_RUBRIC_TUT] = "rub_tut", - [PrjCfg_RUBRIC_EVL] = "rub_evl", - [PrjCfg_RUBRIC_GBL] = "rub_gbl", - }; - /*****************************************************************************/ /************** External global variables from others modules ****************/ /*****************************************************************************/ @@ -62,15 +53,14 @@ extern struct Globals Gbl; /*****************************************************************************/ static void PrjCfg_ShowFormNETCanCreate (const struct PrjCfg_Config *Config); -static void PrjCfg_ShowFormRubrics (const struct PrjCfg_Config *Config); -static void PrjCfg_ShowFormRubric (const struct PrjCfg_Config *Config, - const struct Rub_Rubrics *Rubrics, - PrjCfg_Rubric_t WhichRubric); +static void PrjCfg_ShowFormsRubrics (void); +static void PrjCfg_ShowFormsRubricsOfType (const struct Rub_Rubrics *Rubrics, + PrjCfg_RubricType_t RubricType); static void PrjCfg_GetConfigDataFromRow (MYSQL_RES *mysql_res, struct PrjCfg_Config *Config); -static void PrjCfg_GetRubricDataFromRow (MYSQL_RES *mysql_res, - struct PrjCfg_Config *Config); +static void PrjCfg_GetListRubCods (const struct Rub_Rubrics *Rubrics, + struct PrgCfg_ListRubCods *ListRubCods); static bool PrjCfg_GetIfNETCanCreateFromForm (void); /*****************************************************************************/ @@ -80,30 +70,10 @@ static bool PrjCfg_GetIfNETCanCreateFromForm (void); void PrjCfg_GetConfig (struct PrjCfg_Config *Config) { MYSQL_RES *mysql_res; - unsigned NumRubrics; - unsigned NumRub; - PrjCfg_Rubric_t WhichRubric; - /***** Get configuration of projects for current course from database *****/ Config->NETCanCreate = PrjCfg_NET_CAN_CREATE_DEFAULT; if (Prj_DB_GetConfig (&mysql_res)) PrjCfg_GetConfigDataFromRow (mysql_res,Config); - - /***** Free structure that stores the query result *****/ - DB_FreeMySQLResult (&mysql_res); - - /***** Get project rubrics for current course from database *****/ - for (WhichRubric = (PrjCfg_Rubric_t) 1; - WhichRubric <= (PrjCfg_Rubric_t) (PrjCfg_NUM_RUBRICS - 1); - WhichRubric++) - Config->RubCod[WhichRubric] = -1L; - NumRubrics = Prj_DB_GetRubrics (&mysql_res); - for (NumRub = 0; - NumRub < NumRubrics; - NumRub++) - PrjCfg_GetRubricDataFromRow (mysql_res,Config); - - /***** Free structure that stores the query result *****/ DB_FreeMySQLResult (&mysql_res); } @@ -132,7 +102,6 @@ void PrjCfg_ShowFormConfig (void) extern const char *Txt_Configure_projects; extern const char *Txt_Actions[ActLst_NUM_ACTIONS]; extern const char *Txt_Rubrics; - extern const char *Txt_Save_changes; struct Prj_Projects Projects; /***** Reset projects *****/ @@ -143,39 +112,32 @@ void PrjCfg_ShowFormConfig (void) Prj_PutIconsListProjects,&Projects, Hlp_ASSESSMENT_Projects,Box_NOT_CLOSABLE); - /***** Begin form *****/ - Frm_BeginForm (ActRcvCfgPrj); - - /***** Projects are editable by non-editing teachers? *****/ + /***** Projects are editable by non-editing teachers? *****/ + Frm_BeginForm (ActChgNETCanCrePrj); HTM_FIELDSET_Begin (NULL); HTM_LEGEND (Txt_Actions[ActChgPrj]); PrjCfg_ShowFormNETCanCreate (&Projects.Config); HTM_FIELDSET_End (); - - /***** Rubrics *****/ - HTM_FIELDSET_Begin (NULL); - HTM_LEGEND (Txt_Rubrics); - PrjCfg_ShowFormRubrics (&Projects.Config); - HTM_FIELDSET_End (); - - /***** Send button *****/ - Btn_PutConfirmButton (Txt_Save_changes); - - /***** End form *****/ Frm_EndForm (); + /***** Rubrics *****/ + HTM_FIELDSET_Begin (NULL); + HTM_LEGEND (Txt_Rubrics); + PrjCfg_ShowFormsRubrics (); + HTM_FIELDSET_End (); + /***** End box *****/ Box_BoxEnd (); } /*****************************************************************************/ -/************ Show form to edit rubrics associated to projects ***************/ +/************ Show forms to edit rubrics associated to projects **************/ /*****************************************************************************/ -static void PrjCfg_ShowFormRubrics (const struct PrjCfg_Config *Config) +static void PrjCfg_ShowFormsRubrics (void) { struct Rub_Rubrics Rubrics; - PrjCfg_Rubric_t WhichRubric; + PrjCfg_RubricType_t RubricType; /***** Reset rubrics context *****/ Rub_ResetRubrics (&Rubrics); @@ -185,10 +147,10 @@ static void PrjCfg_ShowFormRubrics (const struct PrjCfg_Config *Config) /***** Rubric selectors *****/ HTM_TABLE_BeginCenterPadding (2); - for (WhichRubric = (PrjCfg_Rubric_t) 1; - WhichRubric <= (PrjCfg_Rubric_t) (PrjCfg_NUM_RUBRICS - 1); - WhichRubric++) - PrjCfg_ShowFormRubric (Config,&Rubrics,WhichRubric); + for (RubricType = (PrjCfg_RubricType_t) 1; + RubricType <= (PrjCfg_RubricType_t) (PrjCfg_NUM_RUBRIC_TYPES - 1); + RubricType++) + PrjCfg_ShowFormsRubricsOfType (&Rubrics,RubricType); HTM_TABLE_End (); /***** Free list of rubrics *****/ @@ -196,56 +158,108 @@ static void PrjCfg_ShowFormRubrics (const struct PrjCfg_Config *Config) } /*****************************************************************************/ -/******** Show form to edit one of the rubrics associated to projects ********/ +/*** Show form to choose the rubrics of a given type associated to projects **/ /*****************************************************************************/ -static void PrjCfg_ShowFormRubric (const struct PrjCfg_Config *Config, - const struct Rub_Rubrics *Rubrics, - PrjCfg_Rubric_t WhichRubric) +static void PrjCfg_ShowFormsRubricsOfType (const struct Rub_Rubrics *Rubrics, + PrjCfg_RubricType_t RubricType) { - extern const char *Txt_PROJECT_RUBRIC[PrjCfg_NUM_RUBRICS]; + extern const char *Par_CodeStr[]; + extern const char *Prj_DB_RubricType[PrjCfg_NUM_RUBRIC_TYPES]; + extern const char *Txt_PROJECT_RUBRIC[PrjCfg_NUM_RUBRIC_TYPES]; extern const char *Txt_no_rubric; - unsigned NumRub; + extern const char *Txt_add_rubric; + MYSQL_RES *mysql_res; + unsigned NumRubricsThisType; + unsigned NumRubThisType; + unsigned NumRubThisCrs; + long RubCodThisType; char Title[Rub_MAX_BYTES_TITLE + 1]; - long RubCodInConfig = Config->RubCod[WhichRubric]; + + /***** Get project rubrics for current course from database *****/ + NumRubricsThisType = Prj_DB_GetRubricsOfType (&mysql_res,RubricType); /***** Row with form for rubric *****/ HTM_TR_Begin (NULL); /* Label */ - HTM_TD_Begin ("class=\"RM FORM_IN_%s\"",The_GetSuffix ()); - HTM_TxtColon (Txt_PROJECT_RUBRIC[WhichRubric]); + HTM_TD_Begin ("class=\"RT FORM_IN_%s\"",The_GetSuffix ()); + HTM_TxtColon (Txt_PROJECT_RUBRIC[RubricType]); HTM_TD_End (); - /* Selector of rubrics */ - HTM_TD_Begin ("class=\"LM\""); - HTM_SELECT_Begin (HTM_DONT_SUBMIT_ON_CHANGE,NULL, - "id=\"%s\" name=\"%s\" class=\"PrjCfg_RUBRIC_SEL\"", - PrjCfg_RubricIDs[WhichRubric], - PrjCfg_RubricIDs[WhichRubric]); + /* Selectors of rubrics */ + HTM_TD_Begin ("class=\"LT\""); - /* First option to indicate that no rubric is selected */ - HTM_OPTION (HTM_Type_STRING,"-1", - RubCodInConfig <= 0, // Selected? - HTM_OPTION_ENABLED, - "[%s]",Txt_no_rubric); + Frm_BeginForm (ActChgRubPrj); + Par_PutParString (NULL,"RubricType",Prj_DB_RubricType[RubricType]); - /* One option for each rubric in this course */ - for (NumRub = 0; - NumRub < Rubrics->Num; - NumRub++) + /* One selector for each rubric */ + for (NumRubThisType = 0; + NumRubThisType < NumRubricsThisType; + NumRubThisType++) { - Rub_DB_GetRubricTitle (Rubrics->Lst[NumRub],Title,Rub_MAX_BYTES_TITLE); - HTM_OPTION (HTM_Type_LONG,&Rubrics->Lst[NumRub], - Rubrics->Lst[NumRub] == RubCodInConfig, // Selected? - HTM_OPTION_ENABLED, - "%s",Title); + RubCodThisType = DB_GetNextCode (mysql_res); + + HTM_SELECT_Begin (HTM_SUBMIT_ON_CHANGE,NULL, + "name=\"%s\" class=\"PrjCfg_RUBRIC_SEL\"", + Par_CodeStr[ParCod_Rub]); + /* First option to indicate that no rubric is selected */ + HTM_OPTION (HTM_Type_STRING,"-1", + false, // Selected? + HTM_OPTION_ENABLED, + "[%s]",Txt_no_rubric); + + /* One option for each rubric in this course */ + for (NumRubThisCrs = 0; + NumRubThisCrs < Rubrics->Num; + NumRubThisCrs++) + { + Rub_DB_GetRubricTitle (Rubrics->Lst[NumRubThisCrs],Title,Rub_MAX_BYTES_TITLE); + HTM_OPTION (HTM_Type_LONG,&Rubrics->Lst[NumRubThisCrs], + Rubrics->Lst[NumRubThisCrs] == RubCodThisType, // Selected? + HTM_OPTION_ENABLED, + "%s",Title); + } + + HTM_SELECT_End (); + HTM_BR (); } - HTM_SELECT_End (); - HTM_TD_End (); + /* One extra selector to add a new rubric, + only if not all available rubrics are selected */ + if (NumRubricsThisType < Rubrics->Num) + { + HTM_SELECT_Begin (HTM_SUBMIT_ON_CHANGE,NULL, + "name=\"%s\" class=\"PrjCfg_RUBRIC_SEL\"", + Par_CodeStr[ParCod_Rub]); + /* First option to indicate that no rubric is selected */ + HTM_OPTION (HTM_Type_STRING,"-1", + true, // Selected? + HTM_OPTION_DISABLED, + "[%s]",Txt_add_rubric); + + /* One option for each rubric in this course */ + for (NumRubThisCrs = 0; + NumRubThisCrs < Rubrics->Num; + NumRubThisCrs++) + { + Rub_DB_GetRubricTitle (Rubrics->Lst[NumRubThisCrs],Title,Rub_MAX_BYTES_TITLE); + HTM_OPTION (HTM_Type_LONG,&Rubrics->Lst[NumRubThisCrs], + false, // Selected? + HTM_OPTION_ENABLED, + "%s",Title); + } + + HTM_SELECT_End (); + } + + Frm_EndForm (); + HTM_TD_End (); HTM_TR_End (); + + /***** Free structure that stores the query result *****/ + DB_FreeMySQLResult (&mysql_res); } /*****************************************************************************/ @@ -266,44 +280,21 @@ static void PrjCfg_GetConfigDataFromRow (MYSQL_RES *mysql_res, Config->NETCanCreate = (row[0][0] == 'Y'); } -/*****************************************************************************/ -/****************** Get project rubric from a database row *******************/ -/*****************************************************************************/ - -static void PrjCfg_GetRubricDataFromRow (MYSQL_RES *mysql_res, - struct PrjCfg_Config *Config) - { - MYSQL_ROW row; - PrjCfg_Rubric_t WhichRubric; - - /***** Get row *****/ - row = mysql_fetch_row (mysql_res); - /* - row[0] Type - row[1] RubCod - */ - /***** Get rubric type (row[0]) *****/ - WhichRubric = PrjCfg_GetRubricFromString (row[0]); - - /***** Get rubric code (row[1]) *****/ - Config->RubCod[WhichRubric] = Str_ConvertStrCodToLongCod (row[1]); - } - /*****************************************************************************/ /********************** Convert from string to type **************************/ /*****************************************************************************/ -PrjCfg_Rubric_t PrjCfg_GetRubricFromString (const char *Str) +PrjCfg_RubricType_t PrjCfg_GetRubricFromString (const char *Str) { - extern const char *Prj_DB_WhichRubric[PrjCfg_NUM_RUBRICS]; - PrjCfg_Rubric_t WhichRubric; + extern const char *Prj_DB_RubricType[PrjCfg_NUM_RUBRIC_TYPES]; + PrjCfg_RubricType_t RubricType; /***** Compare string with all string types *****/ - for (WhichRubric = (PrjCfg_Rubric_t) 1; - WhichRubric <= (PrjCfg_Rubric_t) (PrjCfg_NUM_RUBRICS - 1); - WhichRubric++) - if (!strcmp (Prj_DB_WhichRubric[WhichRubric],Str)) - return WhichRubric; + for (RubricType = (PrjCfg_RubricType_t) 1; + RubricType <= (PrjCfg_RubricType_t) (PrjCfg_NUM_RUBRIC_TYPES - 1); + RubricType++) + if (!strcmp (Prj_DB_RubricType[RubricType],Str)) + return RubricType; return PrjCfg_RUBRIC_ERR; } @@ -317,7 +308,7 @@ static void PrjCfg_ShowFormNETCanCreate (const struct PrjCfg_Config *Config) extern const char *Txt_Non_editing_teachers_can_create_new_projects; HTM_LABEL_Begin ("class=\"LT DAT_%s\"",The_GetSuffix ()); - HTM_INPUT_CHECKBOX ("NETCanCreate",HTM_DONT_SUBMIT_ON_CHANGE, + HTM_INPUT_CHECKBOX ("NETCanCreate",HTM_SUBMIT_ON_CHANGE, "id=\"NETCanCreate\" value=\"Y\"%s", Config->NETCanCreate ? " checked=\"checked\"" : ""); @@ -326,14 +317,13 @@ static void PrjCfg_ShowFormNETCanCreate (const struct PrjCfg_Config *Config) } /*****************************************************************************/ -/************ Receive configuration of projects for current course ***********/ +/********* Change whether non-editing teachers can create projects ***********/ /*****************************************************************************/ -void PrjCfg_ReceiveConfig (void) +void PrjCfg_ChangeNETCanCreate (void) { extern const char *Txt_The_configuration_of_the_projects_has_been_updated; struct Prj_Projects Projects; - PrjCfg_Rubric_t WhichRubric; /***** Reset projects *****/ Prj_ResetPrjsAndReadConfig (&Projects); @@ -341,15 +331,8 @@ void PrjCfg_ReceiveConfig (void) /***** Get non-editing teachers can create new projects or not *****/ Projects.Config.NETCanCreate = PrjCfg_GetIfNETCanCreateFromForm (); - /***** Get rubric codes *****/ - for (WhichRubric = (PrjCfg_Rubric_t) 1; - WhichRubric <= (PrjCfg_Rubric_t) (PrjCfg_NUM_RUBRICS - 1); - WhichRubric++) - Projects.Config.RubCod[WhichRubric] = Par_GetParLong (PrjCfg_RubricIDs[WhichRubric]); - /***** Update database *****/ - Prj_DB_UpdateConfig (&Projects); - Prj_DB_UpdateRubrics (&Projects); + Prj_DB_UpdateNETCanCreate (&Projects); /***** Show confirmation message *****/ Ale_ShowAlert (Ale_SUCCESS,Txt_The_configuration_of_the_projects_has_been_updated); @@ -358,6 +341,100 @@ void PrjCfg_ReceiveConfig (void) PrjCfg_ShowFormConfig (); } +/*****************************************************************************/ +/************************ Change rubrics of a type ***************************/ +/*****************************************************************************/ + +void PrjCfg_ChangeRubricsOfType (void) + { + extern const char *Txt_The_configuration_of_the_projects_has_been_updated; + struct Prj_Projects Projects; + struct Rub_Rubrics Rubrics; + PrjCfg_RubricType_t RubricType; + struct PrgCfg_ListRubCods ListRubCods; + char StrType[32]; + + /***** Reset rubrics context *****/ + Rub_ResetRubrics (&Rubrics); + + /***** Get list of rubrics *****/ + Rub_GetListRubrics (&Rubrics); + + /***** Reset projects *****/ + Prj_ResetPrjsAndReadConfig (&Projects); + + /***** Get parameter with the type of rubric *****/ + Par_GetParText ("RubricType",StrType,sizeof (StrType) - 1); + RubricType = PrjCfg_GetRubricFromString (StrType); + + /***** Get multiple parameter with rubric codes of this type *****/ + PrjCfg_GetListRubCods (&Rubrics,&ListRubCods); + + /***** Update database *****/ + Prj_DB_UpdateRubrics (&Projects,RubricType,&ListRubCods); + + /***** Show confirmation message *****/ + Ale_ShowAlert (Ale_SUCCESS,Txt_The_configuration_of_the_projects_has_been_updated); + + /***** Show again the form to configure projects *****/ + PrjCfg_ShowFormConfig (); + } + +/*****************************************************************************/ +/******************* Get list of rubric codes of a type **********************/ +/*****************************************************************************/ + +static void PrjCfg_GetListRubCods (const struct Rub_Rubrics *Rubrics, + struct PrgCfg_ListRubCods *ListRubCods) + { + extern const char *Par_CodeStr[]; + char *ParLstRubCods; + const char *Ptr; + char LongStr[Cns_MAX_DECIMAL_DIGITS_LONG + 1]; + unsigned NumRub; + unsigned MaxSizeListRubCods; + + /***** Reset number of rubrics specified *****/ + ListRubCods->NumRubrics = 0; + if (Rubrics->Num) // If course has rubrics + { + /***** Allocate memory for the list of rubric codes specified *****/ + MaxSizeListRubCods = ((Cns_MAX_DECIMAL_DIGITS_LONG + 1) * Rubrics->Num) - 1; + if ((ParLstRubCods = malloc (MaxSizeListRubCods + 1)) == NULL) + Err_NotEnoughMemoryExit (); + + /***** Get parameter with list of groups to list *****/ + Par_GetParMultiToText (Par_CodeStr[ParCod_Rub],ParLstRubCods,MaxSizeListRubCods); + if (ParLstRubCods[0]) + { + /***** Count number of rubric codes from ParLstRubCods *****/ + for (Ptr = ParLstRubCods, NumRub = 0; + *Ptr; + NumRub++) + Par_GetNextStrUntilSeparParMult (&Ptr,LongStr,Cns_MAX_DECIMAL_DIGITS_LONG); + ListRubCods->NumRubrics = NumRub; + + if (ListRubCods->NumRubrics) // If rubrics specified... + { + /***** Create a list of rubric codes from ParLstRubCods *****/ + if ((ListRubCods->RubCods = calloc (ListRubCods->NumRubrics, + sizeof (*ListRubCods->RubCods))) == NULL) + Err_NotEnoughMemoryExit (); + for (Ptr = ParLstRubCods, NumRub = 0; + *Ptr; + NumRub++) + { + Par_GetNextStrUntilSeparParMult (&Ptr,LongStr,Cns_MAX_DECIMAL_DIGITS_LONG); + ListRubCods->RubCods[NumRub] = Str_ConvertStrCodToLongCod (LongStr); + } + } + } + + /***** Free memory used for the list of groups to show *****/ + free (ParLstRubCods); + } + } + /*****************************************************************************/ /****** Get if projects are creatable by non-editing teachers from form *******/ /*****************************************************************************/ diff --git a/swad_project_config.h b/swad_project_config.h index 5b16c56e..25a22f9d 100644 --- a/swad_project_config.h +++ b/swad_project_config.h @@ -35,19 +35,24 @@ #define PrjCfg_NET_CAN_CREATE_DEFAULT true -#define PrjCfg_NUM_RUBRICS 4 +#define PrjCfg_NUM_RUBRIC_TYPES 4 typedef enum { PrjCfg_RUBRIC_ERR = 0, PrjCfg_RUBRIC_TUT = 1, PrjCfg_RUBRIC_EVL = 2, PrjCfg_RUBRIC_GBL = 3, - } PrjCfg_Rubric_t; + } PrjCfg_RubricType_t; struct PrjCfg_Config { bool NETCanCreate; - long RubCod[PrjCfg_NUM_RUBRICS]; + }; + +struct PrgCfg_ListRubCods + { + long *RubCods; + unsigned NumRubrics; }; /*****************************************************************************/ @@ -58,7 +63,8 @@ void PrjCfg_GetConfig (struct PrjCfg_Config *Config); bool PrjCfg_CheckIfICanConfig (void); void PrjCfg_ShowFormConfig (void); -PrjCfg_Rubric_t PrjCfg_GetRubricFromString (const char *Str); -void PrjCfg_ReceiveConfig (void); +PrjCfg_RubricType_t PrjCfg_GetRubricFromString (const char *Str); +void PrjCfg_ChangeNETCanCreate (void); +void PrjCfg_ChangeRubricsOfType (void); #endif diff --git a/swad_project_database.c b/swad_project_database.c index ff99d565..0095aecb 100644 --- a/swad_project_database.c +++ b/swad_project_database.c @@ -45,7 +45,7 @@ extern struct Globals Gbl; /*****************************************************************************/ /***** Enum field in database for type of rubric *****/ -const char *Prj_DB_WhichRubric[PrjCfg_NUM_RUBRICS] = +const char *Prj_DB_RubricType[PrjCfg_NUM_RUBRIC_TYPES] = { [PrjCfg_RUBRIC_TUT] = "tut", [PrjCfg_RUBRIC_EVL] = "evl", @@ -980,10 +980,10 @@ void Prj_DB_RemoveCrsPrjs (long CrsCod) } /*****************************************************************************/ -/************ Update configuration of projects for current course ************/ +/********** Update whether non-editing teachers can create projects **********/ /*****************************************************************************/ -void Prj_DB_UpdateConfig (const struct Prj_Projects *Projects) +void Prj_DB_UpdateNETCanCreate (const struct Prj_Projects *Projects) { DB_QueryREPLACE ("can not save configuration of projects", "REPLACE INTO prj_config" @@ -999,21 +999,32 @@ void Prj_DB_UpdateConfig (const struct Prj_Projects *Projects) /********* Update rubrics associated to projects for current course **********/ /*****************************************************************************/ -void Prj_DB_UpdateRubrics (const struct Prj_Projects *Projects) +void Prj_DB_UpdateRubrics (const struct Prj_Projects *Projects, + PrjCfg_RubricType_t RubricType, + const struct PrgCfg_ListRubCods *ListRubCods) { - PrjCfg_Rubric_t WhichRubric; + unsigned RubCod; - for (WhichRubric = (PrjCfg_Rubric_t) 1; - WhichRubric <= (PrjCfg_Rubric_t) (PrjCfg_NUM_RUBRICS - 1); - WhichRubric++) + /***** Delete all rubric codes of this type *****/ + DB_QueryDELETE ("can not save configuration of projects", + "DELETE FROM prj_rubrics" + " WHERE CrsCod=%ld" + " AND Type='%s'", + Gbl.Hierarchy.Crs.CrsCod, + Prj_DB_RubricType[RubricType]); + + /***** Insert specified rubric codes of this type *****/ + for (RubCod = 0; + RubCod <= ListRubCods->NumRubrics; + RubCod++) DB_QueryREPLACE ("can not save configuration of projects", "REPLACE INTO prj_rubrics" " (CrsCod,Type,RubCod)" " VALUES" " (%ld,'%s',%ld)", Gbl.Hierarchy.Crs.CrsCod, - Prj_DB_WhichRubric[WhichRubric], - Projects->Config.RubCod[WhichRubric]); + Prj_DB_RubricType[RubricType], + ListRubCods->RubCods[RubCod]); } /*****************************************************************************/ @@ -1034,22 +1045,27 @@ unsigned Prj_DB_GetConfig (MYSQL_RES **mysql_res) /******************* Get project rubrics for current course ******************/ /*****************************************************************************/ -unsigned Prj_DB_GetRubrics (MYSQL_RES **mysql_res) +unsigned Prj_DB_GetRubricsOfType (MYSQL_RES **mysql_res, + PrjCfg_RubricType_t RubricType) { return (unsigned) DB_QuerySELECT (mysql_res,"can not get project rubrics", - "SELECT Type," // row[0] - "RubCod" // row[1] - " FROM prj_rubrics" - " WHERE CrsCod=%ld", - Gbl.Hierarchy.Crs.CrsCod); + "SELECT prj_rubrics.RubCod" // row[0] + " FROM prj_rubrics," + "rub_rubrics" + " WHERE prj_rubrics.CrsCod=%ld" + " AND prj_rubrics.Type='%s'" + " AND prj_rubrics.RubCod=rub_rubrics.RubCod" + " ORDER BY rub_rubrics.Title", + Gbl.Hierarchy.Crs.CrsCod, + Prj_DB_RubricType[RubricType]); } /*****************************************************************************/ /*** Get type of project rubric in the current course given a rubric code ****/ /*****************************************************************************/ -PrjCfg_Rubric_t Prj_DB_GetWichRubricFromRubCod (long RubCod) +PrjCfg_RubricType_t Prj_DB_GetWichRubricFromRubCod (long RubCod) { char StrTypeDB[32]; diff --git a/swad_project_database.h b/swad_project_database.h index b3c13b55..450b51a3 100644 --- a/swad_project_database.h +++ b/swad_project_database.h @@ -69,10 +69,13 @@ void Prj_DB_RemoveCrsPrjs (long CrsCod); //----------------------------- Configuration --------------------------------- -void Prj_DB_UpdateConfig (const struct Prj_Projects *Projects); -void Prj_DB_UpdateRubrics (const struct Prj_Projects *Projects); +void Prj_DB_UpdateNETCanCreate (const struct Prj_Projects *Projects); +void Prj_DB_UpdateRubrics (const struct Prj_Projects *Projects, + PrjCfg_RubricType_t RubricType, + const struct PrgCfg_ListRubCods *ListRubCods); unsigned Prj_DB_GetConfig (MYSQL_RES **mysql_res); -unsigned Prj_DB_GetRubrics (MYSQL_RES **mysql_res); -PrjCfg_Rubric_t Prj_DB_GetWichRubricFromRubCod (long RubCod); +unsigned Prj_DB_GetRubricsOfType (MYSQL_RES **mysql_res, + PrjCfg_RubricType_t RubricType); +PrjCfg_RubricType_t Prj_DB_GetWichRubricFromRubCod (long RubCod); #endif diff --git a/swad_rubric.c b/swad_rubric.c index 8f673dd0..6a646420 100644 --- a/swad_rubric.c +++ b/swad_rubric.c @@ -450,55 +450,6 @@ void Rub_ShowRubricMainData (struct Rub_Rubrics *Rubrics, The_ChangeRowColor (); } -/*****************************************************************************/ -/************************ Show one rubric in a project ***********************/ -/*****************************************************************************/ - -void Rub_ShowRubricInProject (struct Prj_Projects *Projects, - struct Rub_Rubric *Rubric, - const char *WhichRubricTxt, - bool ICanFill) - { - extern const char *Txt_Rubric; - - /***** Begin first row of this rubric *****/ - HTM_TR_Begin (NULL); - - /***** Rubric title *****/ - HTM_TD_Begin ("colspan=\"8\" class=\"LT ASG_TITLE_%s %s\"", - The_GetSuffix (),The_GetColorRows ()); - HTM_TxtColonNBSP (WhichRubricTxt); - HTM_Txt (Rubric->Title); - HTM_TD_End (); - - /***** End 1st row of this rubric *****/ - HTM_TR_End (); - - /***** Begin 2nd row of this rubric *****/ - HTM_TR_Begin (NULL); - - /***** Text of the rubric *****/ - HTM_TD_Begin ("colspan=\"8\" class=\"LT PAR DAT_%s %s\"", - The_GetSuffix (),The_GetColorRows ()); - Str_ChangeFormat (Str_FROM_HTML,Str_TO_RIGOROUS_HTML, - Rubric->Txt,Cns_MAX_BYTES_TEXT,false); // Convert from HTML to rigorous HTML - ALn_InsertLinks (Rubric->Txt,Cns_MAX_BYTES_TEXT,60); // Insert links - HTM_Txt (Rubric->Txt); - HTM_TD_End (); - - /***** End 2nd row of this rubric *****/ - HTM_TR_End (); - - /***** Change color for rubric criteria *****/ - The_ChangeRowColor (); - - /***** Write criteria of this rubric *****/ - RubCri_ListCriteriaInProject (Projects,Rubric->RubCod,ICanFill); - - /***** Change color for next rubric *****/ - The_ChangeRowColor (); - } - /*****************************************************************************/ /*************** Put icons when viewing or editing one rubric ****************/ /*****************************************************************************/ diff --git a/swad_rubric.h b/swad_rubric.h index f74d4baa..de35bea5 100644 --- a/swad_rubric.h +++ b/swad_rubric.h @@ -53,10 +53,6 @@ void Rub_SeeOneRubric (void); void Rub_ShowOnlyOneRubric (struct Rub_Rubrics *Rubrics); void Rub_ShowRubricMainData (struct Rub_Rubrics *Rubrics, bool ShowOnlyThisRubric); -void Rub_ShowRubricInProject (struct Prj_Projects *Projects, - struct Rub_Rubric *Rubric, - const char *WhichRubricTxt, - bool ICanFill); void Rub_SetCurrentRubCod (long GamCod); void Rub_PutPars (void *Rubrics); diff --git a/swad_text.c b/swad_text.c index 3494bc43..0bdfa2cb 100644 --- a/swad_text.c +++ b/swad_text.c @@ -1086,6 +1086,29 @@ const char *Txt_Add_questions = "Soru ekle"; #endif +const char *Txt_add_rubric = +#if L==1 // ca + "afegir rúbrica"; +#elif L==2 // de + "Rubrik hinzufügen"; +#elif L==3 // en + "add rubric"; +#elif L==4 // es + "añadir rúbrica"; +#elif L==5 // fr + "ajouter rubrique"; +#elif L==6 // gn + "omoĩve rúbrica"; +#elif L==7 // it + "aggiungi rubrica"; +#elif L==8 // pl + "dodaj rubrykę"; +#elif L==9 // pt + "adicionar rubrica"; +#elif L==10 // tr + "değerlendirme listesi ekle"; +#endif + const char *Txt_Add_this_ID = #if L==1 // ca "Afegir aquest ID"; @@ -24986,6 +25009,7 @@ const char *Txt_No_results = #elif L==10 // tr "No results."; // Çeviri lazim! #endif + const char *Txt_no_rubric = #if L==1 // ca "sense rúbrica"; @@ -31454,7 +31478,7 @@ const char *Txt_PROJECT_ROLES_PLURAL_abc[Prj_NUM_ROLES_IN_PROJECT] = #endif }; -const char *Txt_PROJECT_RUBRIC[PrjCfg_NUM_RUBRICS] = +const char *Txt_PROJECT_RUBRIC[PrjCfg_NUM_RUBRIC_TYPES] = { [PrjCfg_RUBRIC_TUT] = #if L==1 // ca diff --git a/swad_text_action.c b/swad_text_action.c index 85eb1ca7..57b53cfb 100644 --- a/swad_text_action.c +++ b/swad_text_action.c @@ -9400,27 +9400,50 @@ const char *Txt_Actions[ActLst_NUM_ACTIONS] = "Tüm projeleri yapılandırın" #endif , - [ActRcvCfgPrj] = + [ActChgRubPrj] = #if L==1 // ca - "Canviar configuració de tots els projectes" + "Canviar rúbriques associades a projectes" #elif L==2 // de - "Ändern Sie die Einstellungen für alle Projekte" + "Ändern Sie die mit Projekten verknüpften Rubriken" #elif L==3 // en - "Change configuration of all projects" + "Change rubrics associated to projects" #elif L==4 // es - "Cambiar configuración de todos los proyectos" + "Cambiar rúbricas asociadas a proyectos" #elif L==5 // fr - "Modifier la configuration de tous les projets" + "Modifier les rubriques associées aux projets" #elif L==6 // gn - "Emoambue ñemboheko opaite tembiaporãme >ilde;uarã" + "Omoambue rúbrica ojoajúva umi proyecto rehe" #elif L==7 // it - "Modificare la configurazione di tutti i progetti" + "Modificare le rubriche associate ai progetti" #elif L==8 // pl - "Zmień konfigurację wszystkich projektów" + "Zmień rubryki powiązane z projektami" #elif L==9 // pt - "Alterar a configuração de todos os projetos" + "Alterar rubricas associadas a projetos" #elif L==10 // tr - "Tüm projelerin konfigürasyonunu değiştir" + "Projelerle ilişkili değerlendirme listelerini değiştirin" +#endif + , + [ActChgNETCanCrePrj] = +#if L==1 // ca + "Canviar si els professors no editors poden crear projectes" +#elif L==2 // de + "Ändern Sie, ob Lehrer, die keine Redakteure sind, Projekte erstellen können" +#elif L==3 // en + "Change whether non-editor teachers can create projects" +#elif L==4 // es + "Cambiar si los profesores no editores pueden crear proyectos" +#elif L==5 // fr + "Modifier si les enseignants non éditeurs peuvent créer des projets" +#elif L==6 // gn + "Emoambue ikatúpa umi mbo'ehára ndaha'éiva editor omoheñói proyecto" +#elif L==7 // it + "Modificare se gli insegnanti non editori possono creare progetti" +#elif L==8 // pl + "Zmień czy nauczyciele nieedytujący mogą tworzyć projekty" +#elif L==9 // pt + "Alterar se professores não editores podem criar projetos" +#elif L==10 // tr + "Düzenleyici olmayan öğretmenlerin proje oluşturup oluşturamayacağını değiştirin" #endif , [ActReqUsrPrj] =