mirror of https://github.com/acanas/swad-core.git
Version 22.45: Oct 13, 2022 Review of projects (not finished).
This commit is contained in:
parent
c708e089e4
commit
9dad60355a
|
@ -1123,7 +1123,7 @@ function updateDivHiddenComments (form,Params) {
|
|||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/********** Update fav or share area in social timeline using AJAX ***********/
|
||||
/************** Update lock/unlock area in project using AJAX ****************/
|
||||
/*****************************************************************************/
|
||||
|
||||
// This function is called when user submit a form just inside a parent div
|
||||
|
@ -1151,7 +1151,7 @@ function updateDivLockUnlockProject (form,Params) {
|
|||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/************** Update lock/unlock area in project using AJAX ****************/
|
||||
/********** Update fav or share area in social timeline using AJAX ***********/
|
||||
/*****************************************************************************/
|
||||
|
||||
// This function is called when user submit a form inside two parent divs
|
||||
|
|
|
@ -637,6 +637,7 @@ const struct Act_Actions Act_Actions[Act_NUM_ACTIONS] =
|
|||
[ActUnhPrj ] = {1683,-1,TabUnk,ActSeePrj ,0x230,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Prj_UnhideProject ,NULL},
|
||||
[ActLckPrj ] = {1773,-1,TabUnk,ActSeePrj ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_AJAX_NORMAL,NULL ,Prj_LockProjectEdition ,NULL},
|
||||
[ActUnlPrj ] = {1774,-1,TabUnk,ActSeePrj ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_AJAX_NORMAL,NULL ,Prj_UnloProjectEdition ,NULL},
|
||||
[ActChgPrjRev ] = {1950,-1,TabUnk,ActSeePrj ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Prj_ChangeReviewStatus ,NULL},
|
||||
[ActReqAddStdPrj ] = {1684,-1,TabUnk,ActSeePrj ,0x230,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Prj_ReqAddStds ,NULL},
|
||||
[ActReqAddTutPrj ] = {1685,-1,TabUnk,ActSeePrj ,0x230,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Prj_ReqAddTuts ,NULL},
|
||||
[ActReqAddEvlPrj ] = {1686,-1,TabUnk,ActSeePrj ,0x230,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Prj_ReqAddEvls ,NULL},
|
||||
|
@ -3819,6 +3820,7 @@ Act_Action_t Act_FromActCodToAction[1 + Act_MAX_ACTION_COD] = // Do not reuse un
|
|||
ActConEdiPrgItm, // #1947
|
||||
ActReqLnkPrj, // #1948
|
||||
ActSeeOnePrj, // #1949
|
||||
ActChgPrjRev, // #1950
|
||||
};
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
395
swad_action.h
395
swad_action.h
|
@ -65,7 +65,7 @@ typedef enum
|
|||
|
||||
typedef signed int Act_Action_t; // Must be a signed type, because -1 is used to indicate obsolete action
|
||||
|
||||
#define Act_MAX_ACTION_COD 1949
|
||||
#define Act_MAX_ACTION_COD 1950
|
||||
|
||||
#define Act_MAX_OPTIONS_IN_MENU_PER_TAB 13
|
||||
|
||||
|
@ -587,225 +587,226 @@ typedef signed int Act_Action_t; // Must be a signed type, because -1 is used to
|
|||
#define ActUnhPrj (ActChgCrsTT1stDay + 49)
|
||||
#define ActLckPrj (ActChgCrsTT1stDay + 50)
|
||||
#define ActUnlPrj (ActChgCrsTT1stDay + 51)
|
||||
#define ActReqAddStdPrj (ActChgCrsTT1stDay + 52)
|
||||
#define ActReqAddTutPrj (ActChgCrsTT1stDay + 53)
|
||||
#define ActReqAddEvlPrj (ActChgCrsTT1stDay + 54)
|
||||
#define ActAddStdPrj (ActChgCrsTT1stDay + 55)
|
||||
#define ActAddTutPrj (ActChgCrsTT1stDay + 56)
|
||||
#define ActAddEvlPrj (ActChgCrsTT1stDay + 57)
|
||||
#define ActReqRemStdPrj (ActChgCrsTT1stDay + 58)
|
||||
#define ActReqRemTutPrj (ActChgCrsTT1stDay + 59)
|
||||
#define ActReqRemEvlPrj (ActChgCrsTT1stDay + 60)
|
||||
#define ActRemStdPrj (ActChgCrsTT1stDay + 61)
|
||||
#define ActRemTutPrj (ActChgCrsTT1stDay + 62)
|
||||
#define ActRemEvlPrj (ActChgCrsTT1stDay + 63)
|
||||
#define ActReqLnkPrj (ActChgCrsTT1stDay + 64)
|
||||
#define ActChgPrjRev (ActChgCrsTT1stDay + 52)
|
||||
#define ActReqAddStdPrj (ActChgCrsTT1stDay + 53)
|
||||
#define ActReqAddTutPrj (ActChgCrsTT1stDay + 54)
|
||||
#define ActReqAddEvlPrj (ActChgCrsTT1stDay + 55)
|
||||
#define ActAddStdPrj (ActChgCrsTT1stDay + 56)
|
||||
#define ActAddTutPrj (ActChgCrsTT1stDay + 57)
|
||||
#define ActAddEvlPrj (ActChgCrsTT1stDay + 58)
|
||||
#define ActReqRemStdPrj (ActChgCrsTT1stDay + 59)
|
||||
#define ActReqRemTutPrj (ActChgCrsTT1stDay + 60)
|
||||
#define ActReqRemEvlPrj (ActChgCrsTT1stDay + 61)
|
||||
#define ActRemStdPrj (ActChgCrsTT1stDay + 62)
|
||||
#define ActRemTutPrj (ActChgCrsTT1stDay + 63)
|
||||
#define ActRemEvlPrj (ActChgCrsTT1stDay + 64)
|
||||
#define ActReqLnkPrj (ActChgCrsTT1stDay + 65)
|
||||
|
||||
#define ActAdmDocPrj (ActChgCrsTT1stDay + 65)
|
||||
#define ActReqRemFilDocPrj (ActChgCrsTT1stDay + 66)
|
||||
#define ActRemFilDocPrj (ActChgCrsTT1stDay + 67)
|
||||
#define ActRemFolDocPrj (ActChgCrsTT1stDay + 68)
|
||||
#define ActCopDocPrj (ActChgCrsTT1stDay + 69)
|
||||
#define ActPasDocPrj (ActChgCrsTT1stDay + 70)
|
||||
#define ActRemTreDocPrj (ActChgCrsTT1stDay + 71)
|
||||
#define ActFrmCreDocPrj (ActChgCrsTT1stDay + 72)
|
||||
#define ActCreFolDocPrj (ActChgCrsTT1stDay + 73)
|
||||
#define ActCreLnkDocPrj (ActChgCrsTT1stDay + 74)
|
||||
#define ActRenFolDocPrj (ActChgCrsTT1stDay + 75)
|
||||
#define ActRcvFilDocPrjDZ (ActChgCrsTT1stDay + 76)
|
||||
#define ActRcvFilDocPrjCla (ActChgCrsTT1stDay + 77)
|
||||
#define ActExpDocPrj (ActChgCrsTT1stDay + 78)
|
||||
#define ActConDocPrj (ActChgCrsTT1stDay + 79)
|
||||
#define ActZIPDocPrj (ActChgCrsTT1stDay + 80)
|
||||
#define ActReqDatDocPrj (ActChgCrsTT1stDay + 81)
|
||||
#define ActChgDatDocPrj (ActChgCrsTT1stDay + 82)
|
||||
#define ActDowDocPrj (ActChgCrsTT1stDay + 83)
|
||||
#define ActAdmDocPrj (ActChgCrsTT1stDay + 66)
|
||||
#define ActReqRemFilDocPrj (ActChgCrsTT1stDay + 67)
|
||||
#define ActRemFilDocPrj (ActChgCrsTT1stDay + 68)
|
||||
#define ActRemFolDocPrj (ActChgCrsTT1stDay + 69)
|
||||
#define ActCopDocPrj (ActChgCrsTT1stDay + 70)
|
||||
#define ActPasDocPrj (ActChgCrsTT1stDay + 71)
|
||||
#define ActRemTreDocPrj (ActChgCrsTT1stDay + 72)
|
||||
#define ActFrmCreDocPrj (ActChgCrsTT1stDay + 73)
|
||||
#define ActCreFolDocPrj (ActChgCrsTT1stDay + 74)
|
||||
#define ActCreLnkDocPrj (ActChgCrsTT1stDay + 75)
|
||||
#define ActRenFolDocPrj (ActChgCrsTT1stDay + 76)
|
||||
#define ActRcvFilDocPrjDZ (ActChgCrsTT1stDay + 77)
|
||||
#define ActRcvFilDocPrjCla (ActChgCrsTT1stDay + 78)
|
||||
#define ActExpDocPrj (ActChgCrsTT1stDay + 79)
|
||||
#define ActConDocPrj (ActChgCrsTT1stDay + 80)
|
||||
#define ActZIPDocPrj (ActChgCrsTT1stDay + 81)
|
||||
#define ActReqDatDocPrj (ActChgCrsTT1stDay + 82)
|
||||
#define ActChgDatDocPrj (ActChgCrsTT1stDay + 83)
|
||||
#define ActDowDocPrj (ActChgCrsTT1stDay + 84)
|
||||
|
||||
#define ActAdmAssPrj (ActChgCrsTT1stDay + 84)
|
||||
#define ActReqRemFilAssPrj (ActChgCrsTT1stDay + 85)
|
||||
#define ActRemFilAssPrj (ActChgCrsTT1stDay + 86)
|
||||
#define ActRemFolAssPrj (ActChgCrsTT1stDay + 87)
|
||||
#define ActCopAssPrj (ActChgCrsTT1stDay + 88)
|
||||
#define ActPasAssPrj (ActChgCrsTT1stDay + 89)
|
||||
#define ActRemTreAssPrj (ActChgCrsTT1stDay + 90)
|
||||
#define ActFrmCreAssPrj (ActChgCrsTT1stDay + 91)
|
||||
#define ActCreFolAssPrj (ActChgCrsTT1stDay + 92)
|
||||
#define ActCreLnkAssPrj (ActChgCrsTT1stDay + 93)
|
||||
#define ActRenFolAssPrj (ActChgCrsTT1stDay + 94)
|
||||
#define ActRcvFilAssPrjDZ (ActChgCrsTT1stDay + 95)
|
||||
#define ActRcvFilAssPrjCla (ActChgCrsTT1stDay + 96)
|
||||
#define ActExpAssPrj (ActChgCrsTT1stDay + 97)
|
||||
#define ActConAssPrj (ActChgCrsTT1stDay + 98)
|
||||
#define ActZIPAssPrj (ActChgCrsTT1stDay + 99)
|
||||
#define ActReqDatAssPrj (ActChgCrsTT1stDay + 100)
|
||||
#define ActChgDatAssPrj (ActChgCrsTT1stDay + 101)
|
||||
#define ActDowAssPrj (ActChgCrsTT1stDay + 102)
|
||||
#define ActAdmAssPrj (ActChgCrsTT1stDay + 85)
|
||||
#define ActReqRemFilAssPrj (ActChgCrsTT1stDay + 86)
|
||||
#define ActRemFilAssPrj (ActChgCrsTT1stDay + 87)
|
||||
#define ActRemFolAssPrj (ActChgCrsTT1stDay + 88)
|
||||
#define ActCopAssPrj (ActChgCrsTT1stDay + 89)
|
||||
#define ActPasAssPrj (ActChgCrsTT1stDay + 90)
|
||||
#define ActRemTreAssPrj (ActChgCrsTT1stDay + 91)
|
||||
#define ActFrmCreAssPrj (ActChgCrsTT1stDay + 92)
|
||||
#define ActCreFolAssPrj (ActChgCrsTT1stDay + 93)
|
||||
#define ActCreLnkAssPrj (ActChgCrsTT1stDay + 94)
|
||||
#define ActRenFolAssPrj (ActChgCrsTT1stDay + 95)
|
||||
#define ActRcvFilAssPrjDZ (ActChgCrsTT1stDay + 96)
|
||||
#define ActRcvFilAssPrjCla (ActChgCrsTT1stDay + 97)
|
||||
#define ActExpAssPrj (ActChgCrsTT1stDay + 98)
|
||||
#define ActConAssPrj (ActChgCrsTT1stDay + 99)
|
||||
#define ActZIPAssPrj (ActChgCrsTT1stDay + 100)
|
||||
#define ActReqDatAssPrj (ActChgCrsTT1stDay + 101)
|
||||
#define ActChgDatAssPrj (ActChgCrsTT1stDay + 102)
|
||||
#define ActDowAssPrj (ActChgCrsTT1stDay + 103)
|
||||
|
||||
#define ActSeeOneCfe (ActChgCrsTT1stDay + 103)
|
||||
#define ActSeeDatCfe (ActChgCrsTT1stDay + 104)
|
||||
#define ActEdiCfe (ActChgCrsTT1stDay + 105)
|
||||
#define ActRcvCfe (ActChgCrsTT1stDay + 106)
|
||||
#define ActPrnCfe (ActChgCrsTT1stDay + 107)
|
||||
#define ActReqRemCfe (ActChgCrsTT1stDay + 108)
|
||||
#define ActRemCfe (ActChgCrsTT1stDay + 109)
|
||||
#define ActHidCfe (ActChgCrsTT1stDay + 110)
|
||||
#define ActUnhCfe (ActChgCrsTT1stDay + 111)
|
||||
#define ActReqLnkCfe (ActChgCrsTT1stDay + 112)
|
||||
#define ActSeeOneCfe (ActChgCrsTT1stDay + 104)
|
||||
#define ActSeeDatCfe (ActChgCrsTT1stDay + 105)
|
||||
#define ActEdiCfe (ActChgCrsTT1stDay + 106)
|
||||
#define ActRcvCfe (ActChgCrsTT1stDay + 107)
|
||||
#define ActPrnCfe (ActChgCrsTT1stDay + 108)
|
||||
#define ActReqRemCfe (ActChgCrsTT1stDay + 109)
|
||||
#define ActRemCfe (ActChgCrsTT1stDay + 110)
|
||||
#define ActHidCfe (ActChgCrsTT1stDay + 111)
|
||||
#define ActUnhCfe (ActChgCrsTT1stDay + 112)
|
||||
#define ActReqLnkCfe (ActChgCrsTT1stDay + 113)
|
||||
|
||||
#define ActEdiOneTstQst (ActChgCrsTT1stDay + 113)
|
||||
#define ActReqImpTstQst (ActChgCrsTT1stDay + 114)
|
||||
#define ActImpTstQst (ActChgCrsTT1stDay + 115)
|
||||
#define ActLstTstQst (ActChgCrsTT1stDay + 116)
|
||||
#define ActRcvTstQst (ActChgCrsTT1stDay + 117)
|
||||
#define ActReqRemSevTstQst (ActChgCrsTT1stDay + 118)
|
||||
#define ActRemSevTstQst (ActChgCrsTT1stDay + 119)
|
||||
#define ActReqRemOneTstQst (ActChgCrsTT1stDay + 120)
|
||||
#define ActRemOneTstQst (ActChgCrsTT1stDay + 121)
|
||||
#define ActChgShfTstQst (ActChgCrsTT1stDay + 122)
|
||||
#define ActEdiOneTstQst (ActChgCrsTT1stDay + 114)
|
||||
#define ActReqImpTstQst (ActChgCrsTT1stDay + 115)
|
||||
#define ActImpTstQst (ActChgCrsTT1stDay + 116)
|
||||
#define ActLstTstQst (ActChgCrsTT1stDay + 117)
|
||||
#define ActRcvTstQst (ActChgCrsTT1stDay + 118)
|
||||
#define ActReqRemSevTstQst (ActChgCrsTT1stDay + 119)
|
||||
#define ActRemSevTstQst (ActChgCrsTT1stDay + 120)
|
||||
#define ActReqRemOneTstQst (ActChgCrsTT1stDay + 121)
|
||||
#define ActRemOneTstQst (ActChgCrsTT1stDay + 122)
|
||||
#define ActChgShfTstQst (ActChgCrsTT1stDay + 123)
|
||||
|
||||
#define ActEdiTag (ActChgCrsTT1stDay + 123)
|
||||
#define ActEnaTag (ActChgCrsTT1stDay + 124)
|
||||
#define ActDisTag (ActChgCrsTT1stDay + 125)
|
||||
#define ActRenTag (ActChgCrsTT1stDay + 126)
|
||||
#define ActEdiTag (ActChgCrsTT1stDay + 124)
|
||||
#define ActEnaTag (ActChgCrsTT1stDay + 125)
|
||||
#define ActDisTag (ActChgCrsTT1stDay + 126)
|
||||
#define ActRenTag (ActChgCrsTT1stDay + 127)
|
||||
|
||||
#define ActSeeTst (ActChgCrsTT1stDay + 127)
|
||||
#define ActReqAssTst (ActChgCrsTT1stDay + 128)
|
||||
#define ActAssTst (ActChgCrsTT1stDay + 129)
|
||||
#define ActCfgTst (ActChgCrsTT1stDay + 130)
|
||||
#define ActRcvCfgTst (ActChgCrsTT1stDay + 131)
|
||||
#define ActSeeTst (ActChgCrsTT1stDay + 128)
|
||||
#define ActReqAssTst (ActChgCrsTT1stDay + 129)
|
||||
#define ActAssTst (ActChgCrsTT1stDay + 130)
|
||||
#define ActCfgTst (ActChgCrsTT1stDay + 131)
|
||||
#define ActRcvCfgTst (ActChgCrsTT1stDay + 132)
|
||||
|
||||
#define ActReqSeeMyTstRes (ActChgCrsTT1stDay + 132)
|
||||
#define ActSeeMyTstResCrs (ActChgCrsTT1stDay + 133)
|
||||
#define ActSeeOneTstResMe (ActChgCrsTT1stDay + 134)
|
||||
#define ActReqSeeUsrTstRes (ActChgCrsTT1stDay + 135)
|
||||
#define ActSeeUsrTstResCrs (ActChgCrsTT1stDay + 136)
|
||||
#define ActSeeOneTstResOth (ActChgCrsTT1stDay + 137)
|
||||
#define ActReqSeeMyTstRes (ActChgCrsTT1stDay + 133)
|
||||
#define ActSeeMyTstResCrs (ActChgCrsTT1stDay + 134)
|
||||
#define ActSeeOneTstResMe (ActChgCrsTT1stDay + 135)
|
||||
#define ActReqSeeUsrTstRes (ActChgCrsTT1stDay + 136)
|
||||
#define ActSeeUsrTstResCrs (ActChgCrsTT1stDay + 137)
|
||||
#define ActSeeOneTstResOth (ActChgCrsTT1stDay + 138)
|
||||
|
||||
#define ActSeeExa (ActChgCrsTT1stDay + 138)
|
||||
#define ActSeeExa (ActChgCrsTT1stDay + 139)
|
||||
|
||||
#define ActFrmNewExa (ActChgCrsTT1stDay + 139)
|
||||
#define ActEdiOneExa (ActChgCrsTT1stDay + 140)
|
||||
#define ActNewExa (ActChgCrsTT1stDay + 141)
|
||||
#define ActChgExa (ActChgCrsTT1stDay + 142)
|
||||
#define ActReqRemExa (ActChgCrsTT1stDay + 143)
|
||||
#define ActRemExa (ActChgCrsTT1stDay + 144)
|
||||
#define ActHidExa (ActChgCrsTT1stDay + 145)
|
||||
#define ActUnhExa (ActChgCrsTT1stDay + 146)
|
||||
#define ActReqLnkExa (ActChgCrsTT1stDay + 147)
|
||||
#define ActFrmNewExa (ActChgCrsTT1stDay + 140)
|
||||
#define ActEdiOneExa (ActChgCrsTT1stDay + 141)
|
||||
#define ActNewExa (ActChgCrsTT1stDay + 142)
|
||||
#define ActChgExa (ActChgCrsTT1stDay + 143)
|
||||
#define ActReqRemExa (ActChgCrsTT1stDay + 144)
|
||||
#define ActRemExa (ActChgCrsTT1stDay + 145)
|
||||
#define ActHidExa (ActChgCrsTT1stDay + 146)
|
||||
#define ActUnhExa (ActChgCrsTT1stDay + 147)
|
||||
#define ActReqLnkExa (ActChgCrsTT1stDay + 148)
|
||||
|
||||
#define ActFrmNewExaSet (ActChgCrsTT1stDay + 148)
|
||||
#define ActNewExaSet (ActChgCrsTT1stDay + 149)
|
||||
#define ActReqRemExaSet (ActChgCrsTT1stDay + 150)
|
||||
#define ActRemExaSet (ActChgCrsTT1stDay + 151)
|
||||
#define ActUp_ExaSet (ActChgCrsTT1stDay + 152)
|
||||
#define ActDwnExaSet (ActChgCrsTT1stDay + 153)
|
||||
#define ActChgTitExaSet (ActChgCrsTT1stDay + 154)
|
||||
#define ActChgNumQstExaSet (ActChgCrsTT1stDay + 155)
|
||||
#define ActFrmNewExaSet (ActChgCrsTT1stDay + 149)
|
||||
#define ActNewExaSet (ActChgCrsTT1stDay + 150)
|
||||
#define ActReqRemExaSet (ActChgCrsTT1stDay + 151)
|
||||
#define ActRemExaSet (ActChgCrsTT1stDay + 152)
|
||||
#define ActUp_ExaSet (ActChgCrsTT1stDay + 153)
|
||||
#define ActDwnExaSet (ActChgCrsTT1stDay + 154)
|
||||
#define ActChgTitExaSet (ActChgCrsTT1stDay + 155)
|
||||
#define ActChgNumQstExaSet (ActChgCrsTT1stDay + 156)
|
||||
|
||||
#define ActReqAddQstExaSet (ActChgCrsTT1stDay + 156)
|
||||
#define ActLstTstQstForSet (ActChgCrsTT1stDay + 157)
|
||||
#define ActAddQstToExa (ActChgCrsTT1stDay + 158)
|
||||
#define ActReqRemSetQst (ActChgCrsTT1stDay + 159)
|
||||
#define ActRemExaQst (ActChgCrsTT1stDay + 160)
|
||||
#define ActValSetQst (ActChgCrsTT1stDay + 161)
|
||||
#define ActInvSetQst (ActChgCrsTT1stDay + 162)
|
||||
#define ActReqAddQstExaSet (ActChgCrsTT1stDay + 157)
|
||||
#define ActLstTstQstForSet (ActChgCrsTT1stDay + 158)
|
||||
#define ActAddQstToExa (ActChgCrsTT1stDay + 159)
|
||||
#define ActReqRemSetQst (ActChgCrsTT1stDay + 160)
|
||||
#define ActRemExaQst (ActChgCrsTT1stDay + 161)
|
||||
#define ActValSetQst (ActChgCrsTT1stDay + 162)
|
||||
#define ActInvSetQst (ActChgCrsTT1stDay + 163)
|
||||
|
||||
#define ActReqNewExaSes (ActChgCrsTT1stDay + 163)
|
||||
#define ActEdiOneExaSes (ActChgCrsTT1stDay + 164)
|
||||
#define ActNewExaSes (ActChgCrsTT1stDay + 165)
|
||||
#define ActChgExaSes (ActChgCrsTT1stDay + 166)
|
||||
#define ActReqRemExaSes (ActChgCrsTT1stDay + 167)
|
||||
#define ActRemExaSes (ActChgCrsTT1stDay + 168)
|
||||
#define ActHidExaSes (ActChgCrsTT1stDay + 169)
|
||||
#define ActUnhExaSes (ActChgCrsTT1stDay + 170)
|
||||
#define ActReqNewExaSes (ActChgCrsTT1stDay + 164)
|
||||
#define ActEdiOneExaSes (ActChgCrsTT1stDay + 165)
|
||||
#define ActNewExaSes (ActChgCrsTT1stDay + 166)
|
||||
#define ActChgExaSes (ActChgCrsTT1stDay + 167)
|
||||
#define ActReqRemExaSes (ActChgCrsTT1stDay + 168)
|
||||
#define ActRemExaSes (ActChgCrsTT1stDay + 169)
|
||||
#define ActHidExaSes (ActChgCrsTT1stDay + 170)
|
||||
#define ActUnhExaSes (ActChgCrsTT1stDay + 171)
|
||||
|
||||
#define ActSeeExaPrn (ActChgCrsTT1stDay + 171)
|
||||
#define ActAnsExaPrn (ActChgCrsTT1stDay + 172)
|
||||
#define ActEndExaPrn (ActChgCrsTT1stDay + 173)
|
||||
#define ActSeeExaPrn (ActChgCrsTT1stDay + 172)
|
||||
#define ActAnsExaPrn (ActChgCrsTT1stDay + 173)
|
||||
#define ActEndExaPrn (ActChgCrsTT1stDay + 174)
|
||||
|
||||
#define ActSeeMyExaResCrs (ActChgCrsTT1stDay + 174)
|
||||
#define ActSeeMyExaResExa (ActChgCrsTT1stDay + 175)
|
||||
#define ActSeeMyExaResSes (ActChgCrsTT1stDay + 176)
|
||||
#define ActSeeOneExaResMe (ActChgCrsTT1stDay + 177)
|
||||
#define ActReqSeeUsrExaRes (ActChgCrsTT1stDay + 178)
|
||||
#define ActSeeUsrExaResCrs (ActChgCrsTT1stDay + 179)
|
||||
#define ActSeeUsrExaResExa (ActChgCrsTT1stDay + 180)
|
||||
#define ActSeeUsrExaResSes (ActChgCrsTT1stDay + 181)
|
||||
#define ActSeeOneExaResOth (ActChgCrsTT1stDay + 182)
|
||||
#define ActChgVisExaRes (ActChgCrsTT1stDay + 183)
|
||||
#define ActSeeMyExaResCrs (ActChgCrsTT1stDay + 175)
|
||||
#define ActSeeMyExaResExa (ActChgCrsTT1stDay + 176)
|
||||
#define ActSeeMyExaResSes (ActChgCrsTT1stDay + 177)
|
||||
#define ActSeeOneExaResMe (ActChgCrsTT1stDay + 178)
|
||||
#define ActReqSeeUsrExaRes (ActChgCrsTT1stDay + 179)
|
||||
#define ActSeeUsrExaResCrs (ActChgCrsTT1stDay + 180)
|
||||
#define ActSeeUsrExaResExa (ActChgCrsTT1stDay + 181)
|
||||
#define ActSeeUsrExaResSes (ActChgCrsTT1stDay + 182)
|
||||
#define ActSeeOneExaResOth (ActChgCrsTT1stDay + 183)
|
||||
#define ActChgVisExaRes (ActChgCrsTT1stDay + 184)
|
||||
|
||||
#define ActSeeGam (ActChgCrsTT1stDay + 184)
|
||||
#define ActReqRemMch (ActChgCrsTT1stDay + 185)
|
||||
#define ActRemMch (ActChgCrsTT1stDay + 186)
|
||||
#define ActEdiMch (ActChgCrsTT1stDay + 187)
|
||||
#define ActChgMch (ActChgCrsTT1stDay + 188)
|
||||
#define ActReqNewMch (ActChgCrsTT1stDay + 189)
|
||||
#define ActNewMch (ActChgCrsTT1stDay + 190)
|
||||
#define ActResMch (ActChgCrsTT1stDay + 191)
|
||||
#define ActBckMch (ActChgCrsTT1stDay + 192)
|
||||
#define ActPlyPauMch (ActChgCrsTT1stDay + 193)
|
||||
#define ActFwdMch (ActChgCrsTT1stDay + 194)
|
||||
#define ActChgNumColMch (ActChgCrsTT1stDay + 195)
|
||||
#define ActChgVisResMchQst (ActChgCrsTT1stDay + 196)
|
||||
#define ActMchCntDwn (ActChgCrsTT1stDay + 197)
|
||||
#define ActRefMchTch (ActChgCrsTT1stDay + 198)
|
||||
#define ActSeeGam (ActChgCrsTT1stDay + 185)
|
||||
#define ActReqRemMch (ActChgCrsTT1stDay + 186)
|
||||
#define ActRemMch (ActChgCrsTT1stDay + 187)
|
||||
#define ActEdiMch (ActChgCrsTT1stDay + 188)
|
||||
#define ActChgMch (ActChgCrsTT1stDay + 189)
|
||||
#define ActReqNewMch (ActChgCrsTT1stDay + 190)
|
||||
#define ActNewMch (ActChgCrsTT1stDay + 191)
|
||||
#define ActResMch (ActChgCrsTT1stDay + 192)
|
||||
#define ActBckMch (ActChgCrsTT1stDay + 193)
|
||||
#define ActPlyPauMch (ActChgCrsTT1stDay + 194)
|
||||
#define ActFwdMch (ActChgCrsTT1stDay + 195)
|
||||
#define ActChgNumColMch (ActChgCrsTT1stDay + 196)
|
||||
#define ActChgVisResMchQst (ActChgCrsTT1stDay + 197)
|
||||
#define ActMchCntDwn (ActChgCrsTT1stDay + 198)
|
||||
#define ActRefMchTch (ActChgCrsTT1stDay + 199)
|
||||
|
||||
#define ActJoiMch (ActChgCrsTT1stDay + 199)
|
||||
#define ActSeeMchAnsQstStd (ActChgCrsTT1stDay + 200)
|
||||
#define ActRemMchAnsQstStd (ActChgCrsTT1stDay + 201)
|
||||
#define ActAnsMchQstStd (ActChgCrsTT1stDay + 202)
|
||||
#define ActRefMchStd (ActChgCrsTT1stDay + 203)
|
||||
#define ActJoiMch (ActChgCrsTT1stDay + 200)
|
||||
#define ActSeeMchAnsQstStd (ActChgCrsTT1stDay + 201)
|
||||
#define ActRemMchAnsQstStd (ActChgCrsTT1stDay + 202)
|
||||
#define ActAnsMchQstStd (ActChgCrsTT1stDay + 203)
|
||||
#define ActRefMchStd (ActChgCrsTT1stDay + 204)
|
||||
|
||||
#define ActSeeMyMchResCrs (ActChgCrsTT1stDay + 204)
|
||||
#define ActSeeMyMchResGam (ActChgCrsTT1stDay + 205)
|
||||
#define ActSeeMyMchResMch (ActChgCrsTT1stDay + 206)
|
||||
#define ActSeeOneMchResMe (ActChgCrsTT1stDay + 207)
|
||||
#define ActSeeMyMchResCrs (ActChgCrsTT1stDay + 205)
|
||||
#define ActSeeMyMchResGam (ActChgCrsTT1stDay + 206)
|
||||
#define ActSeeMyMchResMch (ActChgCrsTT1stDay + 207)
|
||||
#define ActSeeOneMchResMe (ActChgCrsTT1stDay + 208)
|
||||
|
||||
#define ActReqSeeUsrMchRes (ActChgCrsTT1stDay + 208)
|
||||
#define ActSeeUsrMchResCrs (ActChgCrsTT1stDay + 209)
|
||||
#define ActSeeUsrMchResGam (ActChgCrsTT1stDay + 210)
|
||||
#define ActSeeUsrMchResMch (ActChgCrsTT1stDay + 211)
|
||||
#define ActSeeOneMchResOth (ActChgCrsTT1stDay + 212)
|
||||
#define ActReqSeeUsrMchRes (ActChgCrsTT1stDay + 209)
|
||||
#define ActSeeUsrMchResCrs (ActChgCrsTT1stDay + 210)
|
||||
#define ActSeeUsrMchResGam (ActChgCrsTT1stDay + 211)
|
||||
#define ActSeeUsrMchResMch (ActChgCrsTT1stDay + 212)
|
||||
#define ActSeeOneMchResOth (ActChgCrsTT1stDay + 213)
|
||||
|
||||
#define ActChgVisResMchUsr (ActChgCrsTT1stDay + 213)
|
||||
#define ActChgVisResMchUsr (ActChgCrsTT1stDay + 214)
|
||||
|
||||
#define ActLstOneGam (ActChgCrsTT1stDay + 214)
|
||||
#define ActLstOneGam (ActChgCrsTT1stDay + 215)
|
||||
|
||||
#define ActFrmNewGam (ActChgCrsTT1stDay + 215)
|
||||
#define ActEdiOneGam (ActChgCrsTT1stDay + 216)
|
||||
#define ActNewGam (ActChgCrsTT1stDay + 217)
|
||||
#define ActChgGam (ActChgCrsTT1stDay + 218)
|
||||
#define ActReqRemGam (ActChgCrsTT1stDay + 219)
|
||||
#define ActRemGam (ActChgCrsTT1stDay + 220)
|
||||
#define ActHidGam (ActChgCrsTT1stDay + 221)
|
||||
#define ActUnhGam (ActChgCrsTT1stDay + 222)
|
||||
#define ActAddOneGamQst (ActChgCrsTT1stDay + 223)
|
||||
#define ActGamLstTstQst (ActChgCrsTT1stDay + 224)
|
||||
#define ActAddTstQstToGam (ActChgCrsTT1stDay + 225)
|
||||
#define ActReqRemGamQst (ActChgCrsTT1stDay + 226)
|
||||
#define ActRemGamQst (ActChgCrsTT1stDay + 227)
|
||||
#define ActUp_GamQst (ActChgCrsTT1stDay + 228)
|
||||
#define ActDwnGamQst (ActChgCrsTT1stDay + 229)
|
||||
#define ActReqLnkGam (ActChgCrsTT1stDay + 230)
|
||||
#define ActFrmNewGam (ActChgCrsTT1stDay + 216)
|
||||
#define ActEdiOneGam (ActChgCrsTT1stDay + 217)
|
||||
#define ActNewGam (ActChgCrsTT1stDay + 218)
|
||||
#define ActChgGam (ActChgCrsTT1stDay + 219)
|
||||
#define ActReqRemGam (ActChgCrsTT1stDay + 220)
|
||||
#define ActRemGam (ActChgCrsTT1stDay + 221)
|
||||
#define ActHidGam (ActChgCrsTT1stDay + 222)
|
||||
#define ActUnhGam (ActChgCrsTT1stDay + 223)
|
||||
#define ActAddOneGamQst (ActChgCrsTT1stDay + 224)
|
||||
#define ActGamLstTstQst (ActChgCrsTT1stDay + 225)
|
||||
#define ActAddTstQstToGam (ActChgCrsTT1stDay + 226)
|
||||
#define ActReqRemGamQst (ActChgCrsTT1stDay + 227)
|
||||
#define ActRemGamQst (ActChgCrsTT1stDay + 228)
|
||||
#define ActUp_GamQst (ActChgCrsTT1stDay + 229)
|
||||
#define ActDwnGamQst (ActChgCrsTT1stDay + 230)
|
||||
#define ActReqLnkGam (ActChgCrsTT1stDay + 231)
|
||||
|
||||
#define ActSeeSvy (ActChgCrsTT1stDay + 231)
|
||||
#define ActAnsSvy (ActChgCrsTT1stDay + 232)
|
||||
#define ActFrmNewSvy (ActChgCrsTT1stDay + 233)
|
||||
#define ActEdiOneSvy (ActChgCrsTT1stDay + 234)
|
||||
#define ActNewSvy (ActChgCrsTT1stDay + 235)
|
||||
#define ActChgSvy (ActChgCrsTT1stDay + 236)
|
||||
#define ActReqRemSvy (ActChgCrsTT1stDay + 237)
|
||||
#define ActRemSvy (ActChgCrsTT1stDay + 238)
|
||||
#define ActReqRstSvy (ActChgCrsTT1stDay + 239)
|
||||
#define ActRstSvy (ActChgCrsTT1stDay + 240)
|
||||
#define ActHidSvy (ActChgCrsTT1stDay + 241)
|
||||
#define ActUnhSvy (ActChgCrsTT1stDay + 242)
|
||||
#define ActReqLnkSvy (ActChgCrsTT1stDay + 243)
|
||||
#define ActSeeSvy (ActChgCrsTT1stDay + 232)
|
||||
#define ActAnsSvy (ActChgCrsTT1stDay + 233)
|
||||
#define ActFrmNewSvy (ActChgCrsTT1stDay + 234)
|
||||
#define ActEdiOneSvy (ActChgCrsTT1stDay + 235)
|
||||
#define ActNewSvy (ActChgCrsTT1stDay + 236)
|
||||
#define ActChgSvy (ActChgCrsTT1stDay + 237)
|
||||
#define ActReqRemSvy (ActChgCrsTT1stDay + 238)
|
||||
#define ActRemSvy (ActChgCrsTT1stDay + 239)
|
||||
#define ActReqRstSvy (ActChgCrsTT1stDay + 240)
|
||||
#define ActRstSvy (ActChgCrsTT1stDay + 241)
|
||||
#define ActHidSvy (ActChgCrsTT1stDay + 242)
|
||||
#define ActUnhSvy (ActChgCrsTT1stDay + 243)
|
||||
#define ActReqLnkSvy (ActChgCrsTT1stDay + 244)
|
||||
|
||||
#define ActEdiOneSvyQst (ActChgCrsTT1stDay + 244)
|
||||
#define ActRcvSvyQst (ActChgCrsTT1stDay + 245)
|
||||
#define ActReqRemSvyQst (ActChgCrsTT1stDay + 246)
|
||||
#define ActRemSvyQst (ActChgCrsTT1stDay + 247)
|
||||
#define ActEdiOneSvyQst (ActChgCrsTT1stDay + 245)
|
||||
#define ActRcvSvyQst (ActChgCrsTT1stDay + 246)
|
||||
#define ActReqRemSvyQst (ActChgCrsTT1stDay + 247)
|
||||
#define ActRemSvyQst (ActChgCrsTT1stDay + 248)
|
||||
|
||||
/*****************************************************************************/
|
||||
/******************************** Files tab **********************************/
|
||||
|
|
|
@ -606,10 +606,11 @@ TODO: Fix bug: error al enviar un mensaje a dos recipientes, error on duplicate
|
|||
|
||||
TODO: Attach pdf files in multimedia.
|
||||
*/
|
||||
#define Log_PLATFORM_VERSION "SWAD 22.44.3 (2022-10-12)"
|
||||
#define Log_PLATFORM_VERSION "SWAD 22.45 (2022-10-13)"
|
||||
#define CSS_FILE "swad22.40.css"
|
||||
#define JS_FILE "swad21.100.js"
|
||||
/*
|
||||
Version 22.45: Oct 13, 2022 Review of projects (not finished). (333137 lines)
|
||||
Version 22.44.3: Oct 12, 2022 Code refactoring in projects. (333015 lines)
|
||||
Version 22.44.2: Oct 12, 2022 Code refactoring in projects. (333001 lines)
|
||||
Version 22.44.1: Oct 12, 2022 Code refactoring in projects. (332985 lines)
|
||||
|
|
157
swad_project.c
157
swad_project.c
|
@ -202,12 +202,17 @@ static void Prj_ShowProjectRow (struct Prj_Projects *Projects,
|
|||
static void Prj_ShowProjectFirstRow (struct Prj_Projects *Projects,
|
||||
const char *ClassData,
|
||||
const struct Prj_Faults *Faults,
|
||||
unsigned NumIndex,unsigned UniqueId);
|
||||
unsigned NumIndex,unsigned UniqueId,
|
||||
const char *Anchor);
|
||||
static void Prj_ShowProjectDepartment (const struct Prj_Projects *Projects,
|
||||
const char *ClassData);
|
||||
static void Prj_ShowProjectReviewStatus (const struct Prj_Projects *Projects,
|
||||
static void Prj_ShowProjectReviewStatus (struct Prj_Projects *Projects,
|
||||
const char *ClassLabel,
|
||||
const char *ClassData);
|
||||
const char *ClassData,
|
||||
const char *Anchor);
|
||||
static void Prj_FormChangeReviewStatus (struct Prj_Projects *Projects,
|
||||
const char *Anchor);
|
||||
static bool Prj_CheckIfICanReviewProjects (void);
|
||||
static void Prj_ShowProjectAssigned (const struct Prj_Projects *Projects,
|
||||
const char *ClassLabel,
|
||||
const char *ClassData,
|
||||
|
@ -293,6 +298,9 @@ static void Prj_PutIconsToLockUnlockAllProjects (struct Prj_Projects *Projects);
|
|||
static void Prj_FormLockUnlock (const struct Prj_Project *Prj);
|
||||
static void Prj_PutIconOffLockedUnlocked (const struct Prj_Project *Prj);
|
||||
|
||||
//---------------------------- Review status ----------------------------------
|
||||
static Prj_ReviewStatus_t Prj_GetHiddenParamReviewStatus (void);
|
||||
|
||||
/*****************************************************************************/
|
||||
/******* Set/get project code (used to pass parameter to file browser) *******/
|
||||
/*****************************************************************************/
|
||||
|
@ -1375,20 +1383,24 @@ static void Prj_ShowProjectRow (struct Prj_Projects *Projects,
|
|||
extern const char *Txt_Required_materials;
|
||||
struct Prj_Faults Faults;
|
||||
static unsigned UniqueId = 0;
|
||||
char *Anchor = NULL;
|
||||
const char *ClassLabel = (Projects->Prj.Hidden == Prj_HIDDEN) ? "ASG_LABEL_LIGHT" :
|
||||
"ASG_LABEL";
|
||||
const char *ClassData = (Projects->Prj.Hidden == Prj_HIDDEN) ? "DAT_LIGHT" :
|
||||
"DAT";
|
||||
|
||||
/***** Set anchor string *****/
|
||||
Frm_SetAnchorStr (Projects->Prj.PrjCod,&Anchor);
|
||||
|
||||
/***** Check project faults *****/
|
||||
Prj_CheckIfPrjIsFaulty (Projects->Prj.PrjCod,&Faults);
|
||||
|
||||
/***** First row with main data (dates, title...) *****/
|
||||
UniqueId++;
|
||||
Prj_ShowProjectFirstRow (Projects,ClassData,&Faults,NumIndex,UniqueId);
|
||||
Prj_ShowProjectFirstRow (Projects,ClassData,&Faults,NumIndex,UniqueId,Anchor);
|
||||
|
||||
/***** Review status *****/
|
||||
Prj_ShowProjectReviewStatus (Projects,ClassLabel,ClassData);
|
||||
Prj_ShowProjectReviewStatus (Projects,ClassLabel,ClassData,Anchor);
|
||||
|
||||
/***** Assigned? *****/
|
||||
Prj_ShowProjectAssigned (Projects,ClassLabel,ClassData,&Faults);
|
||||
|
@ -1426,6 +1438,9 @@ static void Prj_ShowProjectRow (struct Prj_Projects *Projects,
|
|||
|
||||
/* Link to view more info about the project */
|
||||
Prj_ShowProjectURL (Projects,ClassLabel,ClassData,"prj_url_",UniqueId);
|
||||
|
||||
/***** Free anchor string *****/
|
||||
Frm_FreeAnchorStr (Anchor);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -1435,18 +1450,15 @@ static void Prj_ShowProjectRow (struct Prj_Projects *Projects,
|
|||
static void Prj_ShowProjectFirstRow (struct Prj_Projects *Projects,
|
||||
const char *ClassData,
|
||||
const struct Prj_Faults *Faults,
|
||||
unsigned NumIndex,unsigned UniqueId)
|
||||
unsigned NumIndex,unsigned UniqueId,
|
||||
const char *Anchor)
|
||||
{
|
||||
extern const char *Txt_Actions[Act_NUM_ACTIONS];
|
||||
char *Id;
|
||||
Act_Action_t NextAction;
|
||||
char *Anchor = NULL;
|
||||
const char *ClassDate = (Projects->Prj.Hidden == Prj_HIDDEN) ? "DATE_BLUE_LIGHT" :
|
||||
"DATE_BLUE";
|
||||
|
||||
/***** Set anchor string *****/
|
||||
Frm_SetAnchorStr (Projects->Prj.PrjCod,&Anchor);
|
||||
|
||||
/***** Write first row of data of this project *****/
|
||||
HTM_TR_Begin (NULL);
|
||||
|
||||
|
@ -1564,9 +1576,6 @@ static void Prj_ShowProjectFirstRow (struct Prj_Projects *Projects,
|
|||
Prj_ShowProjectDepartment (Projects,ClassData);
|
||||
|
||||
HTM_TR_End ();
|
||||
|
||||
/***** Free anchor string *****/
|
||||
Frm_FreeAnchorStr (Anchor);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -1612,9 +1621,10 @@ static void Prj_ShowProjectDepartment (const struct Prj_Projects *Projects,
|
|||
/********* When listing a project, show one row with review status ***********/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void Prj_ShowProjectReviewStatus (const struct Prj_Projects *Projects,
|
||||
static void Prj_ShowProjectReviewStatus (struct Prj_Projects *Projects,
|
||||
const char *ClassLabel,
|
||||
const char *ClassData)
|
||||
const char *ClassData,
|
||||
const char *Anchor)
|
||||
{
|
||||
extern const char *Txt_Review;
|
||||
extern const char *Txt_PROJECT_REVIEW_SINGUL[Prj_NUM_REVIEW_STATUS];
|
||||
|
@ -1646,20 +1656,76 @@ static void Prj_ShowProjectReviewStatus (const struct Prj_Projects *Projects,
|
|||
ClassData,The_GetSuffix ());
|
||||
break;
|
||||
}
|
||||
|
||||
if (Prj_CheckIfICanReviewProjects ())
|
||||
/* Form to change review status */
|
||||
Prj_FormChangeReviewStatus (Projects,Anchor);
|
||||
else
|
||||
HTM_TxtF ("%s ",Txt_PROJECT_REVIEW_SINGUL[Projects->Prj.Review.Status]);
|
||||
Ico_PutIconOff (ReviewIcon[Projects->Prj.Review.Status].Icon,
|
||||
ReviewIcon[Projects->Prj.Review.Status].Color,
|
||||
Txt_PROJECT_REVIEW_SINGUL[Projects->Prj.Review.Status]);
|
||||
|
||||
/*
|
||||
if (Faults.WrongAssigned)
|
||||
Prj_PutWarningIcon ();
|
||||
*/
|
||||
Ico_PutIconOff (ReviewIcon[Projects->Prj.Review.Status].Icon,
|
||||
ReviewIcon[Projects->Prj.Review.Status].Color,
|
||||
Txt_PROJECT_REVIEW_SINGUL[Projects->Prj.Review.Status]);
|
||||
|
||||
HTM_TD_End ();
|
||||
|
||||
HTM_TR_End ();
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/******************** Form to lock/unlock project edition ********************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void Prj_FormChangeReviewStatus (struct Prj_Projects *Projects,
|
||||
const char *Anchor)
|
||||
{
|
||||
extern const char *Txt_PROJECT_REVIEW_SINGUL[Prj_NUM_REVIEW_STATUS];
|
||||
Prj_ReviewStatus_t ReviewStatus;
|
||||
unsigned ReviewStatusUnsigned;
|
||||
|
||||
/***** Form to change review status and text *****/
|
||||
Frm_BeginFormAnchor (ActChgPrjRev,Anchor);
|
||||
Prj_PutCurrentParams (Projects);
|
||||
|
||||
/* Selector for review status */
|
||||
HTM_SELECT_Begin (HTM_SUBMIT_ON_CHANGE,
|
||||
"id=\"ReviewStatus\" name=\"ReviewStatus\""
|
||||
" class=\"INPUT_%s\"",
|
||||
The_GetSuffix ());
|
||||
for (ReviewStatus = (Prj_ReviewStatus_t) 0;
|
||||
ReviewStatus <= (Prj_ReviewStatus_t) (Prj_NUM_REVIEW_STATUS - 1);
|
||||
ReviewStatus++)
|
||||
{
|
||||
ReviewStatusUnsigned = (unsigned) ReviewStatus;
|
||||
HTM_OPTION (HTM_Type_UNSIGNED,&ReviewStatusUnsigned,
|
||||
ReviewStatus == Projects->Prj.Review.Status,false,
|
||||
"%s",Txt_PROJECT_REVIEW_SINGUL[ReviewStatus]);
|
||||
}
|
||||
HTM_SELECT_End ();
|
||||
|
||||
// Btn_PutConfirmButtonInline ("Cambiar");
|
||||
Frm_EndForm ();
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/**************************** Can I review projects? *************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static bool Prj_CheckIfICanReviewProjects (void)
|
||||
{
|
||||
static bool ICanReviewProjects[Rol_NUM_ROLES] =
|
||||
{
|
||||
[Rol_TCH ] = true,
|
||||
[Rol_SYS_ADM] = true,
|
||||
};
|
||||
|
||||
return ICanReviewProjects[Gbl.Usrs.Me.Role.Logged];
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/******** When listing a project, show one row with assigned status **********/
|
||||
/*****************************************************************************/
|
||||
|
@ -4388,6 +4454,61 @@ void Prj_UnloProjectEdition (void)
|
|||
Prj_FreeMemProject (&Projects.Prj);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/********************** Change review status of a project ********************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Prj_ChangeReviewStatus (void)
|
||||
{
|
||||
struct Prj_Projects Projects;
|
||||
|
||||
/***** Reset projects *****/
|
||||
Prj_ResetProjects (&Projects);
|
||||
|
||||
/***** Allocate memory for the project *****/
|
||||
Prj_AllocMemProject (&Projects.Prj);
|
||||
|
||||
/***** Get parameters *****/
|
||||
Prj_GetParams (&Projects);
|
||||
if ((Projects.Prj.PrjCod = Prj_GetParamPrjCod ()) < 0)
|
||||
Err_WrongProjectExit ();
|
||||
|
||||
/***** Get data of the project from database *****/
|
||||
Prj_GetDataOfProjectByCod (&Projects.Prj);
|
||||
|
||||
/***** Hide project *****/
|
||||
if (Prj_CheckIfICanReviewProjects ())
|
||||
{
|
||||
Projects.Prj.Review.Status = Prj_GetHiddenParamReviewStatus ();
|
||||
Projects.Prj.Review.Txt[0] = '\0'; // TODO: Get from parameter
|
||||
Prj_DB_UpdateReview (&Projects.Prj);
|
||||
/*
|
||||
Ale_ShowAlert (Ale_INFO,"Recibida nueva revisión del proyecto = %u.",
|
||||
(unsigned) Projects.Prj.Review.Status); */
|
||||
}
|
||||
else
|
||||
Err_NoPermissionExit ();
|
||||
|
||||
/***** Free memory of the project *****/
|
||||
Prj_FreeMemProject (&Projects.Prj);
|
||||
|
||||
/***** Show projects again *****/
|
||||
Prj_ShowProjects (&Projects);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/********************** Get parameter with review status *********************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static Prj_ReviewStatus_t Prj_GetHiddenParamReviewStatus (void)
|
||||
{
|
||||
return (Prj_ReviewStatus_t)
|
||||
Par_GetParToUnsignedLong ("ReviewStatus",
|
||||
0,
|
||||
Prj_NUM_REVIEW_STATUS - 1,
|
||||
(unsigned long) Prj_REVIEW_STATUS_DEFAULT);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/********************** Remove all projects in a course **********************/
|
||||
/*****************************************************************************/
|
||||
|
|
|
@ -269,6 +269,8 @@ void Prj_UnloSelectedPrjsEdition (void);
|
|||
void Prj_LockProjectEdition (void);
|
||||
void Prj_UnloProjectEdition (void);
|
||||
|
||||
void Prj_ChangeReviewStatus (void);
|
||||
|
||||
void Prj_RemoveCrsProjects (long CrsCod);
|
||||
void Prj_RemoveUsrFromProjects (long UsrCod);
|
||||
|
||||
|
|
|
@ -215,6 +215,25 @@ void Prj_DB_HideOrUnhideProject (long PrjCod,bool Hide)
|
|||
Gbl.Hierarchy.Crs.CrsCod);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/******************* Update review of an existing project ********************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Prj_DB_UpdateReview (const struct Prj_Project *Prj)
|
||||
{
|
||||
DB_QueryUPDATE ("can not update project review",
|
||||
"UPDATE prj_projects"
|
||||
" SET ReviewStatus='%s',"
|
||||
"ReviewTime=NOW(),"
|
||||
"ReviewTxt='%s'"
|
||||
" WHERE PrjCod=%ld"
|
||||
" AND CrsCod=%ld", // Extra check
|
||||
Prj_ReviewStatus_DB[Prj->Review.Status],
|
||||
Prj->Review.Txt,
|
||||
Prj->PrjCod,
|
||||
Gbl.Hierarchy.Crs.CrsCod);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/******************************** Get projects *******************************/
|
||||
/*****************************************************************************/
|
||||
|
|
|
@ -40,6 +40,7 @@ long Prj_DB_CreateProject (const struct Prj_Project *Prj);
|
|||
void Prj_DB_UpdateProject (const struct Prj_Project *Prj);
|
||||
void Prj_DB_AddUsrToPrj (long PrjCod,Prj_RoleInProject_t RoleInProject,long UsrCod);
|
||||
void Prj_DB_HideOrUnhideProject (long PrjCod,bool Hide);
|
||||
void Prj_DB_UpdateReview (const struct Prj_Project *Prj);
|
||||
|
||||
unsigned Prj_DB_GetListProjects (MYSQL_RES **mysql_res,
|
||||
const struct Prj_Projects *Projects,
|
||||
|
|
Loading…
Reference in New Issue