Version20.4

This commit is contained in:
acanas 2020-10-13 22:34:31 +02:00
parent 4ff49c5aea
commit f8d8833d35
41 changed files with 297 additions and 318 deletions

View File

@ -749,6 +749,7 @@ const struct Act_Actions Act_Actions[Act_NUM_ACTIONS] =
[ActReqRemMch ] = {1783,-1,TabUnk,ActSeeAllGam ,0x230,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Mch_RequestRemoveMatch ,NULL}, [ActReqRemMch ] = {1783,-1,TabUnk,ActSeeAllGam ,0x230,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Mch_RequestRemoveMatch ,NULL},
[ActRemMch ] = {1784,-1,TabUnk,ActSeeAllGam ,0x230,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Mch_RemoveMatch ,NULL}, [ActRemMch ] = {1784,-1,TabUnk,ActSeeAllGam ,0x230,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Mch_RemoveMatch ,NULL},
[ActEdiMch ] = {1913,-1,TabUnk,ActSeeAllGam ,0x230,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Mch_EditMatch ,NULL},
[ActReqNewMch ] = {1670,-1,TabUnk,ActSeeAllGam ,0x230,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Gam_RequestNewMatch ,NULL}, [ActReqNewMch ] = {1670,-1,TabUnk,ActSeeAllGam ,0x230,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Gam_RequestNewMatch ,NULL},
[ActNewMch ] = {1671,-1,TabUnk,ActSeeAllGam ,0x230,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_NEW_TAB,Mch_CreateNewMatchTch ,Mch_ResumeMatch ,NULL}, [ActNewMch ] = {1671,-1,TabUnk,ActSeeAllGam ,0x230,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_NEW_TAB,Mch_CreateNewMatchTch ,Mch_ResumeMatch ,NULL},
[ActResMch ] = {1785,-1,TabUnk,ActSeeAllGam ,0x230,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_NEW_TAB,Mch_GetMatchBeingPlayed ,Mch_ResumeMatch ,NULL}, [ActResMch ] = {1785,-1,TabUnk,ActSeeAllGam ,0x230,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_NEW_TAB,Mch_GetMatchBeingPlayed ,Mch_ResumeMatch ,NULL},
@ -3728,6 +3729,7 @@ Act_Action_t Act_FromActCodToAction[1 + Act_MAX_ACTION_COD] = // Do not reuse un
ActInvSetQst, // #1910 ActInvSetQst, // #1910
ActChgRooMAC, // #1911 ActChgRooMAC, // #1911
ActLstOneGam, // #1912 ActLstOneGam, // #1912
ActEdiMch, // #1913
}; };
/*****************************************************************************/ /*****************************************************************************/

View File

@ -64,7 +64,7 @@ typedef enum
typedef signed int Act_Action_t; // Must be a signed type, because -1 is used to indicate obsolete action typedef signed int Act_Action_t; // Must be a signed type, because -1 is used to indicate obsolete action
#define Act_MAX_ACTION_COD 1912 #define Act_MAX_ACTION_COD 1913
#define Act_MAX_OPTIONS_IN_MENU_PER_TAB 13 #define Act_MAX_OPTIONS_IN_MENU_PER_TAB 13
@ -711,70 +711,71 @@ typedef signed int Act_Action_t; // Must be a signed type, because -1 is used to
#define ActSeeGam (ActChgCrsTT1stDay + 178) #define ActSeeGam (ActChgCrsTT1stDay + 178)
#define ActReqRemMch (ActChgCrsTT1stDay + 179) #define ActReqRemMch (ActChgCrsTT1stDay + 179)
#define ActRemMch (ActChgCrsTT1stDay + 180) #define ActRemMch (ActChgCrsTT1stDay + 180)
#define ActReqNewMch (ActChgCrsTT1stDay + 181) #define ActEdiMch (ActChgCrsTT1stDay + 181)
#define ActNewMch (ActChgCrsTT1stDay + 182) #define ActReqNewMch (ActChgCrsTT1stDay + 182)
#define ActResMch (ActChgCrsTT1stDay + 183) #define ActNewMch (ActChgCrsTT1stDay + 183)
#define ActBckMch (ActChgCrsTT1stDay + 184) #define ActResMch (ActChgCrsTT1stDay + 184)
#define ActPlyPauMch (ActChgCrsTT1stDay + 185) #define ActBckMch (ActChgCrsTT1stDay + 185)
#define ActFwdMch (ActChgCrsTT1stDay + 186) #define ActPlyPauMch (ActChgCrsTT1stDay + 186)
#define ActChgNumColMch (ActChgCrsTT1stDay + 187) #define ActFwdMch (ActChgCrsTT1stDay + 187)
#define ActChgVisResMchQst (ActChgCrsTT1stDay + 188) #define ActChgNumColMch (ActChgCrsTT1stDay + 188)
#define ActMchCntDwn (ActChgCrsTT1stDay + 189) #define ActChgVisResMchQst (ActChgCrsTT1stDay + 189)
#define ActRefMchTch (ActChgCrsTT1stDay + 190) #define ActMchCntDwn (ActChgCrsTT1stDay + 190)
#define ActRefMchTch (ActChgCrsTT1stDay + 191)
#define ActJoiMch (ActChgCrsTT1stDay + 191) #define ActJoiMch (ActChgCrsTT1stDay + 192)
#define ActSeeMchAnsQstStd (ActChgCrsTT1stDay + 192) #define ActSeeMchAnsQstStd (ActChgCrsTT1stDay + 193)
#define ActRemMchAnsQstStd (ActChgCrsTT1stDay + 193) #define ActRemMchAnsQstStd (ActChgCrsTT1stDay + 194)
#define ActAnsMchQstStd (ActChgCrsTT1stDay + 194) #define ActAnsMchQstStd (ActChgCrsTT1stDay + 195)
#define ActRefMchStd (ActChgCrsTT1stDay + 195) #define ActRefMchStd (ActChgCrsTT1stDay + 196)
#define ActSeeMyMchResCrs (ActChgCrsTT1stDay + 196) #define ActSeeMyMchResCrs (ActChgCrsTT1stDay + 197)
#define ActSeeMyMchResGam (ActChgCrsTT1stDay + 197) #define ActSeeMyMchResGam (ActChgCrsTT1stDay + 198)
#define ActSeeMyMchResMch (ActChgCrsTT1stDay + 198) #define ActSeeMyMchResMch (ActChgCrsTT1stDay + 199)
#define ActSeeOneMchResMe (ActChgCrsTT1stDay + 199) #define ActSeeOneMchResMe (ActChgCrsTT1stDay + 200)
#define ActReqSeeUsrMchRes (ActChgCrsTT1stDay + 200) #define ActReqSeeUsrMchRes (ActChgCrsTT1stDay + 201)
#define ActSeeUsrMchResCrs (ActChgCrsTT1stDay + 201) #define ActSeeUsrMchResCrs (ActChgCrsTT1stDay + 202)
#define ActSeeUsrMchResGam (ActChgCrsTT1stDay + 202) #define ActSeeUsrMchResGam (ActChgCrsTT1stDay + 203)
#define ActSeeUsrMchResMch (ActChgCrsTT1stDay + 203) #define ActSeeUsrMchResMch (ActChgCrsTT1stDay + 204)
#define ActSeeOneMchResOth (ActChgCrsTT1stDay + 204) #define ActSeeOneMchResOth (ActChgCrsTT1stDay + 205)
#define ActChgVisResMchUsr (ActChgCrsTT1stDay + 205) #define ActChgVisResMchUsr (ActChgCrsTT1stDay + 206)
#define ActLstOneGam (ActChgCrsTT1stDay + 206) #define ActLstOneGam (ActChgCrsTT1stDay + 207)
#define ActFrmNewGam (ActChgCrsTT1stDay + 207) #define ActFrmNewGam (ActChgCrsTT1stDay + 208)
#define ActEdiOneGam (ActChgCrsTT1stDay + 208) #define ActEdiOneGam (ActChgCrsTT1stDay + 209)
#define ActNewGam (ActChgCrsTT1stDay + 209) #define ActNewGam (ActChgCrsTT1stDay + 210)
#define ActChgGam (ActChgCrsTT1stDay + 210) #define ActChgGam (ActChgCrsTT1stDay + 211)
#define ActReqRemGam (ActChgCrsTT1stDay + 211) #define ActReqRemGam (ActChgCrsTT1stDay + 212)
#define ActRemGam (ActChgCrsTT1stDay + 212) #define ActRemGam (ActChgCrsTT1stDay + 213)
#define ActHidGam (ActChgCrsTT1stDay + 213) #define ActHidGam (ActChgCrsTT1stDay + 214)
#define ActShoGam (ActChgCrsTT1stDay + 214) #define ActShoGam (ActChgCrsTT1stDay + 215)
#define ActAddOneGamQst (ActChgCrsTT1stDay + 215) #define ActAddOneGamQst (ActChgCrsTT1stDay + 216)
#define ActGamLstTstQst (ActChgCrsTT1stDay + 216) #define ActGamLstTstQst (ActChgCrsTT1stDay + 217)
#define ActAddTstQstToGam (ActChgCrsTT1stDay + 217) #define ActAddTstQstToGam (ActChgCrsTT1stDay + 218)
#define ActReqRemGamQst (ActChgCrsTT1stDay + 218) #define ActReqRemGamQst (ActChgCrsTT1stDay + 219)
#define ActRemGamQst (ActChgCrsTT1stDay + 219) #define ActRemGamQst (ActChgCrsTT1stDay + 220)
#define ActUp_GamQst (ActChgCrsTT1stDay + 220) #define ActUp_GamQst (ActChgCrsTT1stDay + 221)
#define ActDwnGamQst (ActChgCrsTT1stDay + 221) #define ActDwnGamQst (ActChgCrsTT1stDay + 222)
#define ActSeeSvy (ActChgCrsTT1stDay + 222) #define ActSeeSvy (ActChgCrsTT1stDay + 223)
#define ActAnsSvy (ActChgCrsTT1stDay + 223) #define ActAnsSvy (ActChgCrsTT1stDay + 224)
#define ActFrmNewSvy (ActChgCrsTT1stDay + 224) #define ActFrmNewSvy (ActChgCrsTT1stDay + 225)
#define ActEdiOneSvy (ActChgCrsTT1stDay + 225) #define ActEdiOneSvy (ActChgCrsTT1stDay + 226)
#define ActNewSvy (ActChgCrsTT1stDay + 226) #define ActNewSvy (ActChgCrsTT1stDay + 227)
#define ActChgSvy (ActChgCrsTT1stDay + 227) #define ActChgSvy (ActChgCrsTT1stDay + 228)
#define ActReqRemSvy (ActChgCrsTT1stDay + 228) #define ActReqRemSvy (ActChgCrsTT1stDay + 229)
#define ActRemSvy (ActChgCrsTT1stDay + 229) #define ActRemSvy (ActChgCrsTT1stDay + 230)
#define ActReqRstSvy (ActChgCrsTT1stDay + 230) #define ActReqRstSvy (ActChgCrsTT1stDay + 231)
#define ActRstSvy (ActChgCrsTT1stDay + 231) #define ActRstSvy (ActChgCrsTT1stDay + 232)
#define ActHidSvy (ActChgCrsTT1stDay + 232) #define ActHidSvy (ActChgCrsTT1stDay + 233)
#define ActShoSvy (ActChgCrsTT1stDay + 233) #define ActShoSvy (ActChgCrsTT1stDay + 234)
#define ActEdiOneSvyQst (ActChgCrsTT1stDay + 234) #define ActEdiOneSvyQst (ActChgCrsTT1stDay + 235)
#define ActRcvSvyQst (ActChgCrsTT1stDay + 235) #define ActRcvSvyQst (ActChgCrsTT1stDay + 236)
#define ActReqRemSvyQst (ActChgCrsTT1stDay + 236) #define ActReqRemSvyQst (ActChgCrsTT1stDay + 237)
#define ActRemSvyQst (ActChgCrsTT1stDay + 237) #define ActRemSvyQst (ActChgCrsTT1stDay + 238)
/*****************************************************************************/ /*****************************************************************************/
/******************************** Files tab **********************************/ /******************************** Files tab **********************************/

View File

@ -907,7 +907,7 @@ static void Agd_PutFormsToRemEditOneEvent (struct Agd_Agenda *Agenda,
Agenda->AgdCodToEdit = AgdEvent->AgdCod; // Used as parameter in contextual links Agenda->AgdCodToEdit = AgdEvent->AgdCod; // Used as parameter in contextual links
/***** Put form to remove event *****/ /***** Put form to remove event *****/
Ico_PutContextualIconToRemove (ActReqRemEvtMyAgd, Ico_PutContextualIconToRemove (ActReqRemEvtMyAgd,NULL,
Agd_PutCurrentParamsMyAgenda,Agenda); Agd_PutCurrentParamsMyAgenda,Agenda);
/***** Put form to hide/show event *****/ /***** Put form to hide/show event *****/

View File

@ -307,7 +307,7 @@ static void Ann_DrawAnAnnouncement (long AnnCod,Ann_Status_t Status,
if (ICanEdit) if (ICanEdit)
{ {
/***** Put form to remove announcement *****/ /***** Put form to remove announcement *****/
Ico_PutContextualIconToRemove (ActRemAnn, Ico_PutContextualIconToRemove (ActRemAnn,NULL,
Ann_PutParams,&AnnCod); Ann_PutParams,&AnnCod);
/***** Put form to change the status of the announcement *****/ /***** Put form to change the status of the announcement *****/

View File

@ -610,7 +610,7 @@ static void Asg_PutFormsToRemEditOneAsg (const struct Asg_Assignment *Asg,
case Rol_TCH: case Rol_TCH:
case Rol_SYS_ADM: case Rol_SYS_ADM:
/***** Put form to remove assignment *****/ /***** Put form to remove assignment *****/
Ico_PutContextualIconToRemove (ActReqRemAsg, Ico_PutContextualIconToRemove (ActReqRemAsg,NULL,
Asg_PutParams,&Assignments); Asg_PutParams,&Assignments);
/***** Put form to hide/show assignment *****/ /***** Put form to hide/show assignment *****/

View File

@ -605,7 +605,7 @@ static void Att_PutFormsToRemEditOneAttEvent (struct Att_Events *Events,
Events->AttCod = Event->AttCod; Events->AttCod = Event->AttCod;
/***** Put form to remove attendance event *****/ /***** Put form to remove attendance event *****/
Ico_PutContextualIconToRemove (ActReqRemAtt, Ico_PutContextualIconToRemove (ActReqRemAtt,NULL,
Att_PutParams,Events); Att_PutParams,Events);
/***** Put form to hide/show attendance event *****/ /***** Put form to hide/show attendance event *****/

View File

@ -467,7 +467,7 @@ static void Ban_ListBannersForEdition (struct Ban_Banners *Banners)
HTM_TR_Begin (NULL); HTM_TR_Begin (NULL);
HTM_TD_Begin ("class=\"BM\""); HTM_TD_Begin ("class=\"BM\"");
Ico_PutContextualIconToRemove (ActRemBan, Ico_PutContextualIconToRemove (ActRemBan,NULL,
Ban_PutParamBanCodToEdit,&Banners->BanCodToEdit); Ban_PutParamBanCodToEdit,&Banners->BanCodToEdit);
HTM_TD_End (); HTM_TD_End ();

View File

@ -69,7 +69,7 @@ static void Bld_PutIconsEditingBuildings (__attribute__((unused)) void *Args);
static void Bld_EditBuildingsInternal (void); static void Bld_EditBuildingsInternal (void);
static void Bld_ListBuildingsForEdition (const struct Bld_Buildings *Buildings); static void Bld_ListBuildingsForEdition (const struct Bld_Buildings *Buildings);
static void Bld_PutParamBldCod (long BldCod); static void Bld_PutParamBldCod (void *BldCod);
static void Bld_RenameBuilding (Cns_ShrtOrFullName_t ShrtOrFullName); static void Bld_RenameBuilding (Cns_ShrtOrFullName_t ShrtOrFullName);
static bool Bld_CheckIfBuildingNameExists (const char *FieldName,const char *Name,long BldCod); static bool Bld_CheckIfBuildingNameExists (const char *FieldName,const char *Name,long BldCod);
@ -491,10 +491,8 @@ static void Bld_ListBuildingsForEdition (const struct Bld_Buildings *Buildings)
/* Put icon to remove building */ /* Put icon to remove building */
HTM_TD_Begin ("class=\"BM\""); HTM_TD_Begin ("class=\"BM\"");
Frm_StartForm (ActRemBld); Ico_PutContextualIconToRemove (ActRemBld,NULL,
Bld_PutParamBldCod (Building->BldCod); Bld_PutParamBldCod,&Building->BldCod);
Ico_PutIconRemove ();
Frm_EndForm ();
HTM_TD_End (); HTM_TD_End ();
/* Building code */ /* Building code */
@ -507,7 +505,7 @@ static void Bld_ListBuildingsForEdition (const struct Bld_Buildings *Buildings)
/* Building short name */ /* Building short name */
HTM_TD_Begin ("class=\"LM\""); HTM_TD_Begin ("class=\"LM\"");
Frm_StartFormAnchor (ActRenBldSho,Anchor); Frm_StartFormAnchor (ActRenBldSho,Anchor);
Bld_PutParamBldCod (Building->BldCod); Bld_PutParamBldCod (&Building->BldCod);
HTM_INPUT_TEXT ("ShortName",Bld_MAX_CHARS_SHRT_NAME,Building->ShrtName, HTM_INPUT_TEXT ("ShortName",Bld_MAX_CHARS_SHRT_NAME,Building->ShrtName,
HTM_SUBMIT_ON_CHANGE, HTM_SUBMIT_ON_CHANGE,
"size=\"10\" class=\"INPUT_SHORT_NAME\""); "size=\"10\" class=\"INPUT_SHORT_NAME\"");
@ -517,7 +515,7 @@ static void Bld_ListBuildingsForEdition (const struct Bld_Buildings *Buildings)
/* Building full name */ /* Building full name */
HTM_TD_Begin ("class=\"LM\""); HTM_TD_Begin ("class=\"LM\"");
Frm_StartFormAnchor (ActRenBldFul,Anchor); Frm_StartFormAnchor (ActRenBldFul,Anchor);
Bld_PutParamBldCod (Building->BldCod); Bld_PutParamBldCod (&Building->BldCod);
HTM_INPUT_TEXT ("FullName",Bld_MAX_CHARS_FULL_NAME,Building->FullName, HTM_INPUT_TEXT ("FullName",Bld_MAX_CHARS_FULL_NAME,Building->FullName,
HTM_SUBMIT_ON_CHANGE, HTM_SUBMIT_ON_CHANGE,
"size=\"20\" class=\"INPUT_FULL_NAME\""); "size=\"20\" class=\"INPUT_FULL_NAME\"");
@ -527,7 +525,7 @@ static void Bld_ListBuildingsForEdition (const struct Bld_Buildings *Buildings)
/* Building location */ /* Building location */
HTM_TD_Begin ("class=\"LM\""); HTM_TD_Begin ("class=\"LM\"");
Frm_StartFormAnchor (ActRenBldLoc,Anchor); Frm_StartFormAnchor (ActRenBldLoc,Anchor);
Bld_PutParamBldCod (Building->BldCod); Bld_PutParamBldCod (&Building->BldCod);
HTM_INPUT_TEXT ("Location",Bld_MAX_CHARS_LOCATION,Building->Location, HTM_INPUT_TEXT ("Location",Bld_MAX_CHARS_LOCATION,Building->Location,
HTM_SUBMIT_ON_CHANGE, HTM_SUBMIT_ON_CHANGE,
"size=\"15\" class=\"INPUT_FULL_NAME\""); "size=\"15\" class=\"INPUT_FULL_NAME\"");
@ -545,9 +543,10 @@ static void Bld_ListBuildingsForEdition (const struct Bld_Buildings *Buildings)
/******************* Write parameter with code of building *******************/ /******************* Write parameter with code of building *******************/
/*****************************************************************************/ /*****************************************************************************/
static void Bld_PutParamBldCod (long BldCod) static void Bld_PutParamBldCod (void *BldCod)
{ {
Par_PutHiddenParamLong (NULL,"BldCod",BldCod); if (BldCod)
Par_PutHiddenParamLong (NULL,"BldCod",*((long *) BldCod));
} }
/*****************************************************************************/ /*****************************************************************************/

View File

@ -85,7 +85,7 @@ static bool Ctr_CheckIfICanEditACentre (struct Centre *Ctr);
static Ctr_StatusTxt_t Ctr_GetStatusTxtFromStatusBits (Ctr_Status_t Status); static Ctr_StatusTxt_t Ctr_GetStatusTxtFromStatusBits (Ctr_Status_t Status);
static Ctr_Status_t Ctr_GetStatusBitsFromStatusTxt (Ctr_StatusTxt_t StatusTxt); static Ctr_Status_t Ctr_GetStatusBitsFromStatusTxt (Ctr_StatusTxt_t StatusTxt);
static void Ctr_PutParamOtherCtrCod (long CtrCod); static void Ctr_PutParamOtherCtrCod (void *CtrCod);
static void Ctr_UpdateInsNameDB (long CtrCod,const char *FieldName,const char *NewCtrName); static void Ctr_UpdateInsNameDB (long CtrCod,const char *FieldName,const char *NewCtrName);
@ -979,12 +979,8 @@ static void Ctr_ListCentresForEdition (const struct Plc_Places *Places)
NumUsrsInCrssOfCtr) // Centre has users NumUsrsInCrssOfCtr) // Centre has users
Ico_PutIconRemovalNotAllowed (); Ico_PutIconRemovalNotAllowed ();
else // I can remove centre else // I can remove centre
{ Ico_PutContextualIconToRemove (ActRemCtr,NULL,
Frm_StartForm (ActRemCtr); Ctr_PutParamOtherCtrCod,&Ctr->CtrCod);
Ctr_PutParamOtherCtrCod (Ctr->CtrCod);
Ico_PutIconRemove ();
Frm_EndForm ();
}
HTM_TD_End (); HTM_TD_End ();
/* Centre code */ /* Centre code */
@ -1002,7 +998,7 @@ static void Ctr_ListCentresForEdition (const struct Plc_Places *Places)
if (ICanEdit) if (ICanEdit)
{ {
Frm_StartForm (ActChgCtrPlc); Frm_StartForm (ActChgCtrPlc);
Ctr_PutParamOtherCtrCod (Ctr->CtrCod); Ctr_PutParamOtherCtrCod (&Ctr->CtrCod);
HTM_SELECT_Begin (HTM_SUBMIT_ON_CHANGE, HTM_SELECT_Begin (HTM_SUBMIT_ON_CHANGE,
"name=\"PlcCod\" class=\"PLC_SEL\""); "name=\"PlcCod\" class=\"PLC_SEL\"");
HTM_OPTION (HTM_Type_STRING,"0", HTM_OPTION (HTM_Type_STRING,"0",
@ -1030,7 +1026,7 @@ static void Ctr_ListCentresForEdition (const struct Plc_Places *Places)
if (ICanEdit) if (ICanEdit)
{ {
Frm_StartForm (ActRenCtrSho); Frm_StartForm (ActRenCtrSho);
Ctr_PutParamOtherCtrCod (Ctr->CtrCod); Ctr_PutParamOtherCtrCod (&Ctr->CtrCod);
HTM_INPUT_TEXT ("ShortName",Hie_MAX_CHARS_SHRT_NAME,Ctr->ShrtName, HTM_INPUT_TEXT ("ShortName",Hie_MAX_CHARS_SHRT_NAME,Ctr->ShrtName,
HTM_SUBMIT_ON_CHANGE, HTM_SUBMIT_ON_CHANGE,
"class=\"INPUT_SHORT_NAME\""); "class=\"INPUT_SHORT_NAME\"");
@ -1045,7 +1041,7 @@ static void Ctr_ListCentresForEdition (const struct Plc_Places *Places)
if (ICanEdit) if (ICanEdit)
{ {
Frm_StartForm (ActRenCtrFul); Frm_StartForm (ActRenCtrFul);
Ctr_PutParamOtherCtrCod (Ctr->CtrCod); Ctr_PutParamOtherCtrCod (&Ctr->CtrCod);
HTM_INPUT_TEXT ("FullName",Hie_MAX_CHARS_FULL_NAME,Ctr->FullName, HTM_INPUT_TEXT ("FullName",Hie_MAX_CHARS_FULL_NAME,Ctr->FullName,
HTM_SUBMIT_ON_CHANGE, HTM_SUBMIT_ON_CHANGE,
"class=\"INPUT_FULL_NAME\""); "class=\"INPUT_FULL_NAME\"");
@ -1060,7 +1056,7 @@ static void Ctr_ListCentresForEdition (const struct Plc_Places *Places)
if (ICanEdit) if (ICanEdit)
{ {
Frm_StartForm (ActChgCtrWWW); Frm_StartForm (ActChgCtrWWW);
Ctr_PutParamOtherCtrCod (Ctr->CtrCod); Ctr_PutParamOtherCtrCod (&Ctr->CtrCod);
HTM_INPUT_URL ("WWW",Ctr->WWW,HTM_SUBMIT_ON_CHANGE, HTM_INPUT_URL ("WWW",Ctr->WWW,HTM_SUBMIT_ON_CHANGE,
"class=\"INPUT_WWW_NARROW\" required=\"required\""); "class=\"INPUT_WWW_NARROW\" required=\"required\"");
Frm_EndForm (); Frm_EndForm ();
@ -1107,7 +1103,7 @@ static void Ctr_ListCentresForEdition (const struct Plc_Places *Places)
StatusTxt == Ctr_STATUS_PENDING) StatusTxt == Ctr_STATUS_PENDING)
{ {
Frm_StartForm (ActChgCtrSta); Frm_StartForm (ActChgCtrSta);
Ctr_PutParamOtherCtrCod (Ctr->CtrCod); Ctr_PutParamOtherCtrCod (&Ctr->CtrCod);
HTM_SELECT_Begin (HTM_SUBMIT_ON_CHANGE, HTM_SELECT_Begin (HTM_SUBMIT_ON_CHANGE,
"name=\"Status\" class=\"INPUT_STATUS\""); "name=\"Status\" class=\"INPUT_STATUS\"");
@ -1201,9 +1197,10 @@ void Ctr_PutParamCtrCod (long CtrCod)
/***************** Write parameter with code of other centre *****************/ /***************** Write parameter with code of other centre *****************/
/*****************************************************************************/ /*****************************************************************************/
static void Ctr_PutParamOtherCtrCod (long CtrCod) static void Ctr_PutParamOtherCtrCod (void *CtrCod)
{ {
Par_PutHiddenParamLong (NULL,"OthCtrCod",CtrCod); if (CtrCod)
Par_PutHiddenParamLong (NULL,"OthCtrCod",*((long *) CtrCod));
} }
/*****************************************************************************/ /*****************************************************************************/

View File

@ -555,7 +555,7 @@ enscript -2 --landscape --color --file-align=2 --highlight --line-numbers -o - *
En OpenSWAD: En OpenSWAD:
ps2pdf source.ps destination.pdf ps2pdf source.ps destination.pdf
*/ */
#define Log_PLATFORM_VERSION "SWAD 20.3.1 (2020-10-13)" #define Log_PLATFORM_VERSION "SWAD 20.4 (2020-10-13)"
#define CSS_FILE "swad20.1.1.css" #define CSS_FILE "swad20.1.1.css"
#define JS_FILE "swad19.254.js" #define JS_FILE "swad19.254.js"
/* /*
@ -581,6 +581,8 @@ TODO: En los resultados de una partida, cuando la pregunta ha sido modificada, n
TODO: Poder editar las partidas, al menos el título, y si es posible, también los grupos. TODO: Poder editar las partidas, al menos el título, y si es posible, también los grupos.
Version 20.4: Oct 13, 2020 Code refactoring in remove icon.
New action to edit a match. Not finished. (304517 lines)
Version 20.3.1: Oct 13, 2020 Code refactoring in file browser. (? lines) Version 20.3.1: Oct 13, 2020 Code refactoring in file browser. (? lines)
Version 20.3: Sep 30, 2020 Non-editing teachers can list questions in a game. (304528 lines) Version 20.3: Sep 30, 2020 Non-editing teachers can list questions in a game. (304528 lines)
Version 20.2.2: Sep 27, 2020 Fixed bug in exam. (304448 lines) Version 20.2.2: Sep 27, 2020 Fixed bug in exam. (304448 lines)

View File

@ -79,7 +79,7 @@ static void Cty_PutIconsEditingCountries (__attribute__((unused)) void *Args);
static void Cty_PutIconToViewCountries (void); static void Cty_PutIconToViewCountries (void);
static void Cty_ListCountriesForEdition (void); static void Cty_ListCountriesForEdition (void);
static void Cty_PutParamOtherCtyCod (long CtyCod); static void Cty_PutParamOtherCtyCod (void *CtyCod);
static long Cty_GetParamOtherCtyCod (void); static long Cty_GetParamOtherCtyCod (void);
static bool Cty_CheckIfNumericCountryCodeExists (long CtyCod); static bool Cty_CheckIfNumericCountryCodeExists (long CtyCod);
@ -1227,12 +1227,8 @@ static void Cty_ListCountriesForEdition (void)
// Deletion forbidden // Deletion forbidden
Ico_PutIconRemovalNotAllowed (); Ico_PutIconRemovalNotAllowed ();
else else
{ Ico_PutContextualIconToRemove (ActRemCty,NULL,
Frm_StartForm (ActRemCty); Cty_PutParamOtherCtyCod,&Cty->CtyCod);
Cty_PutParamOtherCtyCod (Cty->CtyCod);
Ico_PutIconRemove ();
Frm_EndForm ();
}
HTM_TD_End (); HTM_TD_End ();
/* Numerical country code (ISO 3166-1) */ /* Numerical country code (ISO 3166-1) */
@ -1274,7 +1270,7 @@ static void Cty_ListCountriesForEdition (void)
/* Name */ /* Name */
HTM_TD_Begin ("class=\"LT\""); HTM_TD_Begin ("class=\"LT\"");
Frm_StartForm (ActRenCty); Frm_StartForm (ActRenCty);
Cty_PutParamOtherCtyCod (Cty->CtyCod); Cty_PutParamOtherCtyCod (&Cty->CtyCod);
Par_PutHiddenParamUnsigned (NULL,"Lan",(unsigned) Lan); Par_PutHiddenParamUnsigned (NULL,"Lan",(unsigned) Lan);
HTM_INPUT_TEXT ("Name",Cty_MAX_CHARS_NAME,Cty->Name[Lan], HTM_INPUT_TEXT ("Name",Cty_MAX_CHARS_NAME,Cty->Name[Lan],
HTM_SUBMIT_ON_CHANGE, HTM_SUBMIT_ON_CHANGE,
@ -1285,7 +1281,7 @@ static void Cty_ListCountriesForEdition (void)
/* WWW */ /* WWW */
HTM_TD_Begin ("class=\"LT\""); HTM_TD_Begin ("class=\"LT\"");
Frm_StartForm (ActChgCtyWWW); Frm_StartForm (ActChgCtyWWW);
Cty_PutParamOtherCtyCod (Cty->CtyCod); Cty_PutParamOtherCtyCod (&Cty->CtyCod);
Par_PutHiddenParamUnsigned (NULL,"Lan",(unsigned) Lan); Par_PutHiddenParamUnsigned (NULL,"Lan",(unsigned) Lan);
HTM_INPUT_URL ("WWW",Cty->WWW[Lan],HTM_SUBMIT_ON_CHANGE, HTM_INPUT_URL ("WWW",Cty->WWW[Lan],HTM_SUBMIT_ON_CHANGE,
"class=\"INPUT_WWW_NARROW\" required=\"required\""); "class=\"INPUT_WWW_NARROW\" required=\"required\"");
@ -1313,9 +1309,10 @@ void Cty_PutParamCtyCod (long CtyCod)
/******************** Write parameter with code of country *******************/ /******************** Write parameter with code of country *******************/
/*****************************************************************************/ /*****************************************************************************/
static void Cty_PutParamOtherCtyCod (long CtyCod) static void Cty_PutParamOtherCtyCod (void *CtyCod)
{ {
Par_PutHiddenParamLong (NULL,"OthCtyCod",CtyCod); if (CtyCod)
Par_PutHiddenParamLong (NULL,"OthCtyCod",*((long *) CtyCod));
} }
/*****************************************************************************/ /*****************************************************************************/

View File

@ -115,7 +115,7 @@ static void Crs_PutButtonToRegisterInCrs (void);
static void Crs_PutIconToSearchCourses (__attribute__((unused)) void *Args); static void Crs_PutIconToSearchCourses (__attribute__((unused)) void *Args);
static void Crs_PutParamOtherCrsCod (long CrsCod); static void Crs_PutParamOtherCrsCod (void *CrsCod);
static long Crs_GetAndCheckParamOtherCrsCod (long MinCodAllowed); static long Crs_GetAndCheckParamOtherCrsCod (long MinCodAllowed);
static void Crs_WriteRowCrsData (unsigned NumCrs,MYSQL_ROW row,bool WriteColumnAccepted); static void Crs_WriteRowCrsData (unsigned NumCrs,MYSQL_ROW row,bool WriteColumnAccepted);
@ -1233,12 +1233,8 @@ static void Crs_ListCoursesOfAYearForEdition (unsigned Year)
!ICanEdit) !ICanEdit)
Ico_PutIconRemovalNotAllowed (); Ico_PutIconRemovalNotAllowed ();
else // Crs->NumUsrs == 0 && ICanEdit else // Crs->NumUsrs == 0 && ICanEdit
{ Ico_PutContextualIconToRemove (ActRemCrs,NULL,
Frm_StartForm (ActRemCrs); Crs_PutParamOtherCrsCod,&Crs->CrsCod);
Crs_PutParamOtherCrsCod (Crs->CrsCod);
Ico_PutIconRemove ();
Frm_EndForm ();
}
HTM_TD_End (); HTM_TD_End ();
/* Course code */ /* Course code */
@ -1251,7 +1247,7 @@ static void Crs_ListCoursesOfAYearForEdition (unsigned Year)
if (ICanEdit) if (ICanEdit)
{ {
Frm_StartForm (ActChgInsCrsCod); Frm_StartForm (ActChgInsCrsCod);
Crs_PutParamOtherCrsCod (Crs->CrsCod); Crs_PutParamOtherCrsCod (&Crs->CrsCod);
HTM_INPUT_TEXT ("InsCrsCod",Crs_MAX_CHARS_INSTITUTIONAL_CRS_COD, HTM_INPUT_TEXT ("InsCrsCod",Crs_MAX_CHARS_INSTITUTIONAL_CRS_COD,
Crs->InstitutionalCrsCod,HTM_SUBMIT_ON_CHANGE, Crs->InstitutionalCrsCod,HTM_SUBMIT_ON_CHANGE,
"class=\"INPUT_INS_CODE\""); "class=\"INPUT_INS_CODE\"");
@ -1266,7 +1262,7 @@ static void Crs_ListCoursesOfAYearForEdition (unsigned Year)
if (ICanEdit) if (ICanEdit)
{ {
Frm_StartForm (ActChgCrsYea); Frm_StartForm (ActChgCrsYea);
Crs_PutParamOtherCrsCod (Crs->CrsCod); Crs_PutParamOtherCrsCod (&Crs->CrsCod);
HTM_SELECT_Begin (HTM_SUBMIT_ON_CHANGE, HTM_SELECT_Begin (HTM_SUBMIT_ON_CHANGE,
"name=\"OthCrsYear\" class=\"HIE_SEL_NARROW\""); "name=\"OthCrsYear\" class=\"HIE_SEL_NARROW\"");
for (YearAux = 0; for (YearAux = 0;
@ -1287,7 +1283,7 @@ static void Crs_ListCoursesOfAYearForEdition (unsigned Year)
if (ICanEdit) if (ICanEdit)
{ {
Frm_StartForm (ActRenCrsSho); Frm_StartForm (ActRenCrsSho);
Crs_PutParamOtherCrsCod (Crs->CrsCod); Crs_PutParamOtherCrsCod (&Crs->CrsCod);
HTM_INPUT_TEXT ("ShortName",Hie_MAX_CHARS_SHRT_NAME,Crs->ShrtName, HTM_INPUT_TEXT ("ShortName",Hie_MAX_CHARS_SHRT_NAME,Crs->ShrtName,
HTM_SUBMIT_ON_CHANGE, HTM_SUBMIT_ON_CHANGE,
"class=\"INPUT_SHORT_NAME\""); "class=\"INPUT_SHORT_NAME\"");
@ -1302,7 +1298,7 @@ static void Crs_ListCoursesOfAYearForEdition (unsigned Year)
if (ICanEdit) if (ICanEdit)
{ {
Frm_StartForm (ActRenCrsFul); Frm_StartForm (ActRenCrsFul);
Crs_PutParamOtherCrsCod (Crs->CrsCod); Crs_PutParamOtherCrsCod (&Crs->CrsCod);
HTM_INPUT_TEXT ("FullName",Hie_MAX_CHARS_FULL_NAME,Crs->FullName, HTM_INPUT_TEXT ("FullName",Hie_MAX_CHARS_FULL_NAME,Crs->FullName,
HTM_SUBMIT_ON_CHANGE, HTM_SUBMIT_ON_CHANGE,
"class=\"INPUT_FULL_NAME\""); "class=\"INPUT_FULL_NAME\"");
@ -1337,7 +1333,7 @@ static void Crs_ListCoursesOfAYearForEdition (unsigned Year)
StatusTxt == Crs_STATUS_PENDING) StatusTxt == Crs_STATUS_PENDING)
{ {
Frm_StartForm (ActChgCrsSta); Frm_StartForm (ActChgCrsSta);
Crs_PutParamOtherCrsCod (Crs->CrsCod); Crs_PutParamOtherCrsCod (&Crs->CrsCod);
HTM_SELECT_Begin (HTM_SUBMIT_ON_CHANGE, HTM_SELECT_Begin (HTM_SUBMIT_ON_CHANGE,
"name=\"Status\" class=\"INPUT_STATUS\""); "name=\"Status\" class=\"INPUT_STATUS\"");
@ -2539,9 +2535,10 @@ void Crs_PutParamCrsCod (long CrsCod)
/******************** Write parameter with code of course ********************/ /******************** Write parameter with code of course ********************/
/*****************************************************************************/ /*****************************************************************************/
static void Crs_PutParamOtherCrsCod (long CrsCod) static void Crs_PutParamOtherCrsCod (void *CrsCod)
{ {
Par_PutHiddenParamLong (NULL,"OthCrsCod",CrsCod); if (CrsCod)
Par_PutHiddenParamLong (NULL,"OthCrsCod",*((long *) CrsCod));
} }
/*****************************************************************************/ /*****************************************************************************/

View File

@ -92,7 +92,7 @@ static void Deg_EditDegreesInternal (void);
static void Deg_PutIconsEditingDegrees (__attribute__((unused)) void *Args); static void Deg_PutIconsEditingDegrees (__attribute__((unused)) void *Args);
static void Deg_ReceiveFormRequestOrCreateDeg (unsigned Status); static void Deg_ReceiveFormRequestOrCreateDeg (unsigned Status);
static void Deg_PutParamOtherDegCod (long DegCod); static void Deg_PutParamOtherDegCod (void *DegCod);
static void Deg_GetDataOfDegreeFromRow (struct Degree *Deg,MYSQL_ROW row); static void Deg_GetDataOfDegreeFromRow (struct Degree *Deg,MYSQL_ROW row);
@ -378,12 +378,8 @@ static void Deg_ListDegreesForEdition (void)
NumUsrsInCrssOfDeg) NumUsrsInCrssOfDeg)
Ico_PutIconRemovalNotAllowed (); Ico_PutIconRemovalNotAllowed ();
else else
{ Ico_PutContextualIconToRemove (ActRemDeg,NULL,
Frm_StartForm (ActRemDeg); Deg_PutParamOtherDegCod,&Deg->DegCod);
Deg_PutParamOtherDegCod (Deg->DegCod);
Ico_PutIconRemove ();
Frm_EndForm ();
}
HTM_TD_End (); HTM_TD_End ();
/* Degree code */ /* Degree code */
@ -401,7 +397,7 @@ static void Deg_ListDegreesForEdition (void)
if (ICanEdit) if (ICanEdit)
{ {
Frm_StartForm (ActRenDegSho); Frm_StartForm (ActRenDegSho);
Deg_PutParamOtherDegCod (Deg->DegCod); Deg_PutParamOtherDegCod (&Deg->DegCod);
HTM_INPUT_TEXT ("ShortName",Hie_MAX_CHARS_SHRT_NAME,Deg->ShrtName, HTM_INPUT_TEXT ("ShortName",Hie_MAX_CHARS_SHRT_NAME,Deg->ShrtName,
HTM_SUBMIT_ON_CHANGE, HTM_SUBMIT_ON_CHANGE,
"class=\"INPUT_SHORT_NAME\""); "class=\"INPUT_SHORT_NAME\"");
@ -416,7 +412,7 @@ static void Deg_ListDegreesForEdition (void)
if (ICanEdit) if (ICanEdit)
{ {
Frm_StartForm (ActRenDegFul); Frm_StartForm (ActRenDegFul);
Deg_PutParamOtherDegCod (Deg->DegCod); Deg_PutParamOtherDegCod (&Deg->DegCod);
HTM_INPUT_TEXT ("FullName",Hie_MAX_CHARS_FULL_NAME,Deg->FullName, HTM_INPUT_TEXT ("FullName",Hie_MAX_CHARS_FULL_NAME,Deg->FullName,
HTM_SUBMIT_ON_CHANGE, HTM_SUBMIT_ON_CHANGE,
"class=\"INPUT_FULL_NAME\""); "class=\"INPUT_FULL_NAME\"");
@ -431,7 +427,7 @@ static void Deg_ListDegreesForEdition (void)
if (ICanEdit) if (ICanEdit)
{ {
Frm_StartForm (ActChgDegTyp); Frm_StartForm (ActChgDegTyp);
Deg_PutParamOtherDegCod (Deg->DegCod); Deg_PutParamOtherDegCod (&Deg->DegCod);
HTM_SELECT_Begin (HTM_SUBMIT_ON_CHANGE, HTM_SELECT_Begin (HTM_SUBMIT_ON_CHANGE,
"name=\"OthDegTypCod\" class=\"HIE_SEL_NARROW\""); "name=\"OthDegTypCod\" class=\"HIE_SEL_NARROW\"");
for (NumDegTyp = 0; for (NumDegTyp = 0;
@ -460,7 +456,7 @@ static void Deg_ListDegreesForEdition (void)
if (ICanEdit) if (ICanEdit)
{ {
Frm_StartForm (ActChgDegWWW); Frm_StartForm (ActChgDegWWW);
Deg_PutParamOtherDegCod (Deg->DegCod); Deg_PutParamOtherDegCod (&Deg->DegCod);
HTM_INPUT_URL ("WWW",Deg->WWW,HTM_SUBMIT_ON_CHANGE, HTM_INPUT_URL ("WWW",Deg->WWW,HTM_SUBMIT_ON_CHANGE,
"class=\"INPUT_WWW_NARROW\" required=\"required\""); "class=\"INPUT_WWW_NARROW\" required=\"required\"");
Frm_EndForm (); Frm_EndForm ();
@ -502,7 +498,7 @@ static void Deg_ListDegreesForEdition (void)
StatusTxt == Deg_STATUS_PENDING) StatusTxt == Deg_STATUS_PENDING)
{ {
Frm_StartForm (ActChgDegSta); Frm_StartForm (ActChgDegSta);
Deg_PutParamOtherDegCod (Deg->DegCod); Deg_PutParamOtherDegCod (&Deg->DegCod);
HTM_SELECT_Begin (HTM_SUBMIT_ON_CHANGE, HTM_SELECT_Begin (HTM_SUBMIT_ON_CHANGE,
"name=\"Status\" class=\"INPUT_STATUS\""); "name=\"Status\" class=\"INPUT_STATUS\"");
StatusUnsigned = (unsigned) Deg_GetStatusBitsFromStatusTxt (Deg_STATUS_PENDING); StatusUnsigned = (unsigned) Deg_GetStatusBitsFromStatusTxt (Deg_STATUS_PENDING);
@ -1301,9 +1297,10 @@ void Deg_PutParamDegCod (long DegCod)
/******************** Write parameter with code of degree ********************/ /******************** Write parameter with code of degree ********************/
/*****************************************************************************/ /*****************************************************************************/
static void Deg_PutParamOtherDegCod (long DegCod) static void Deg_PutParamOtherDegCod (void *DegCod)
{ {
Par_PutHiddenParamLong (NULL,"OthDegCod",DegCod); if (DegCod)
Par_PutHiddenParamLong (NULL,"OthDegCod",*((long *) DegCod));
} }
/*****************************************************************************/ /*****************************************************************************/

View File

@ -91,7 +91,7 @@ static void DT_PutHeadDegreeTypesForSeeing (Act_Action_t NextAction,
static void DT_PutHeadDegreeTypesForEdition (void); static void DT_PutHeadDegreeTypesForEdition (void);
static void DT_CreateDegreeType (struct DegreeType *DegTyp); static void DT_CreateDegreeType (struct DegreeType *DegTyp);
static void DT_PutParamOtherDegTypCod (long DegTypCod); static void DT_PutParamOtherDegTypCod (void *DegTypCod);
static unsigned DT_CountNumDegsOfType (long DegTypCod); static unsigned DT_CountNumDegsOfType (long DegTypCod);
static void DT_RemoveDegreeTypeCompletely (long DegTypCod); static void DT_RemoveDegreeTypeCompletely (long DegTypCod);
@ -406,12 +406,8 @@ static void DT_ListDegreeTypesForEdition (void)
if (Gbl.DegTypes.Lst[NumDegTyp].NumDegs) // Degree type has degrees => deletion forbidden if (Gbl.DegTypes.Lst[NumDegTyp].NumDegs) // Degree type has degrees => deletion forbidden
Ico_PutIconRemovalNotAllowed (); Ico_PutIconRemovalNotAllowed ();
else else
{ Ico_PutContextualIconToRemove (ActRemDegTyp,NULL,
Frm_StartForm (ActRemDegTyp); DT_PutParamOtherDegTypCod,&Gbl.DegTypes.Lst[NumDegTyp].DegTypCod);
DT_PutParamOtherDegTypCod (Gbl.DegTypes.Lst[NumDegTyp].DegTypCod);
Ico_PutIconRemove ();
Frm_EndForm ();
}
HTM_TD_End (); HTM_TD_End ();
/* Degree type code */ /* Degree type code */
@ -422,7 +418,7 @@ static void DT_ListDegreeTypesForEdition (void)
/* Name of degree type */ /* Name of degree type */
HTM_TD_Begin ("class=\"LM\""); HTM_TD_Begin ("class=\"LM\"");
Frm_StartForm (ActRenDegTyp); Frm_StartForm (ActRenDegTyp);
DT_PutParamOtherDegTypCod (Gbl.DegTypes.Lst[NumDegTyp].DegTypCod); DT_PutParamOtherDegTypCod (&Gbl.DegTypes.Lst[NumDegTyp].DegTypCod);
HTM_INPUT_TEXT ("DegTypName",Deg_MAX_CHARS_DEGREE_TYPE_NAME, HTM_INPUT_TEXT ("DegTypName",Deg_MAX_CHARS_DEGREE_TYPE_NAME,
Gbl.DegTypes.Lst[NumDegTyp].DegTypName, Gbl.DegTypes.Lst[NumDegTyp].DegTypName,
HTM_SUBMIT_ON_CHANGE, HTM_SUBMIT_ON_CHANGE,
@ -821,9 +817,10 @@ void DT_RemoveDegreeType (void)
/***************** Write parameter with code of degree type ******************/ /***************** Write parameter with code of degree type ******************/
/*****************************************************************************/ /*****************************************************************************/
static void DT_PutParamOtherDegTypCod (long DegTypCod) static void DT_PutParamOtherDegTypCod (void *DegTypCod)
{ {
Par_PutHiddenParamLong (NULL,"OthDegTypCod",DegTypCod); if (DegTypCod)
Par_PutHiddenParamLong (NULL,"OthDegTypCod",*((long *) DegTypCod));
} }
/*****************************************************************************/ /*****************************************************************************/

View File

@ -696,7 +696,7 @@ static void Exa_PutIconsToRemEditOneExam (struct Exa_Exams *Exams,
Exams->ExaCod = Exam->ExaCod; Exams->ExaCod = Exam->ExaCod;
/***** Icon to remove exam *****/ /***** Icon to remove exam *****/
Ico_PutContextualIconToRemove (ActReqRemExa, Ico_PutContextualIconToRemove (ActReqRemExa,NULL,
Exa_PutParams,Exams); Exa_PutParams,Exams);
/***** Icon to unhide/hide exam *****/ /***** Icon to unhide/hide exam *****/

View File

@ -1639,7 +1639,7 @@ static void ExaAnn_PutIconsExamAnn (void *ExamAnns)
Gbl.Usrs.Me.Role.Logged == Rol_SYS_ADM) Gbl.Usrs.Me.Role.Logged == Rol_SYS_ADM)
{ {
/***** Link to remove this exam announcement *****/ /***** Link to remove this exam announcement *****/
Ico_PutContextualIconToRemove (ActReqRemExaAnn, Ico_PutContextualIconToRemove (ActReqRemExaAnn,NULL,
ExaAnn_PutParamExaCodToEdit,&((struct ExaAnn_ExamAnnouncements *) ExamAnns)->ExaCod); ExaAnn_PutParamExaCodToEdit,&((struct ExaAnn_ExamAnnouncements *) ExamAnns)->ExaCod);
/***** Put form to hide/show exam announement *****/ /***** Put form to hide/show exam announement *****/

View File

@ -541,10 +541,8 @@ static void ExaSes_ListOneOrMoreSessionsIcons (struct Exa_Exams *Exams,
Exams->SesCod = Session->SesCod; Exams->SesCod = Session->SesCod;
/***** Icon to remove the exam session *****/ /***** Icon to remove the exam session *****/
Frm_StartForm (ActReqRemExaSes); Ico_PutContextualIconToRemove (ActReqRemExaSes,NULL,
ExaSes_PutParamsEdit (Exams); ExaSes_PutParamsEdit,Exams);
Ico_PutIconRemove ();
Frm_EndForm ();
/***** Icon to hide/unhide the exam session *****/ /***** Icon to hide/unhide the exam session *****/
if (Session->Hidden) if (Session->Hidden)

View File

@ -1111,12 +1111,8 @@ static void ExaSet_ListOneOrMoreSetsForEdition (struct Exa_Exams *Exams,
/* Put icon to remove the set */ /* Put icon to remove the set */
if (ICanEditSets) if (ICanEditSets)
{ Ico_PutContextualIconToRemove (ActReqRemExaSet,NULL,
Frm_StartForm (ActReqRemExaSet); ExaSet_PutParamsOneSet,Exams);
ExaSet_PutParamsOneSet (Exams);
Ico_PutIconRemove ();
Frm_EndForm ();
}
else else
Ico_PutIconRemovalNotAllowed (); Ico_PutIconRemovalNotAllowed ();
@ -1339,12 +1335,8 @@ static void ExaSet_ListOneOrMoreQuestionsForEdition (struct Exa_Exams *Exams,
/* Put icon to remove the question */ /* Put icon to remove the question */
if (ICanEditQuestions) if (ICanEditQuestions)
{ Ico_PutContextualIconToRemove (ActReqRemSetQst,NULL,
Frm_StartForm (ActReqRemSetQst); ExaSet_PutParamsOneQst,Exams);
ExaSet_PutParamsOneQst (Exams);
Ico_PutIconRemove ();
Frm_EndForm ();
}
else else
Ico_PutIconRemovalNotAllowed (); Ico_PutIconRemovalNotAllowed ();

View File

@ -2332,7 +2332,7 @@ static void Brw_PutParamsFileBrowser (const char *PathInTree,const char *FilFolL
{ {
if (Brw_GetIfGroupFileBrowser ()) // This file browser needs specify a group if (Brw_GetIfGroupFileBrowser ()) // This file browser needs specify a group
/***** Group code *****/ /***** Group code *****/
Grp_PutParamGrpCod (Gbl.Crs.Grps.GrpCod); Grp_PutParamGrpCod (&Gbl.Crs.Grps.GrpCod);
else if (Brw_GetIfProjectFileBrowser ()) // This file browser needs specify a project else if (Brw_GetIfProjectFileBrowser ()) // This file browser needs specify a project
/***** Project code *****/ /***** Project code *****/
Prj_PutParamPrjCod (Prj_GetPrjCod ()); Prj_PutParamPrjCod (Prj_GetPrjCod ());
@ -4984,7 +4984,7 @@ static void Brw_PutCheckboxFullTree (void)
static void Brw_PutParamsFullTree (void) static void Brw_PutParamsFullTree (void)
{ {
if (Brw_GetIfGroupFileBrowser ()) if (Brw_GetIfGroupFileBrowser ())
Grp_PutParamGrpCod (Gbl.Crs.Grps.GrpCod); Grp_PutParamGrpCod (&Gbl.Crs.Grps.GrpCod);
else if (Brw_GetIfProjectFileBrowser ()) // This file browser needs specify a project else if (Brw_GetIfProjectFileBrowser ()) // This file browser needs specify a project
Prj_PutParamPrjCod (Prj_GetPrjCod ()); Prj_PutParamPrjCod (Prj_GetPrjCod ());
else if (Brw_GetIfCrsAssigWorksFileBrowser ()) else if (Brw_GetIfCrsAssigWorksFileBrowser ())
@ -5795,12 +5795,12 @@ static void Brw_PutIconRemove (void)
case Brw_IS_FILE: case Brw_IS_FILE:
case Brw_IS_LINK: case Brw_IS_LINK:
/***** Form to remove a file or link *****/ /***** Form to remove a file or link *****/
Ico_PutContextualIconToRemove (Brw_ActAskRemoveFile[Gbl.FileBrowser.Type], Ico_PutContextualIconToRemove (Brw_ActAskRemoveFile[Gbl.FileBrowser.Type],NULL,
Brw_PutImplicitParamsFileBrowser,&Gbl.FileBrowser.FilFolLnk); Brw_PutImplicitParamsFileBrowser,&Gbl.FileBrowser.FilFolLnk);
break; break;
case Brw_IS_FOLDER: case Brw_IS_FOLDER:
/***** Form to remove a folder *****/ /***** Form to remove a folder *****/
Ico_PutContextualIconToRemove (Brw_ActRemoveFolder[Gbl.FileBrowser.Type], Ico_PutContextualIconToRemove (Brw_ActRemoveFolder[Gbl.FileBrowser.Type],NULL,
Brw_PutImplicitParamsFileBrowser,&Gbl.FileBrowser.FilFolLnk); Brw_PutImplicitParamsFileBrowser,&Gbl.FileBrowser.FilFolLnk);
break; break;
default: default:
@ -12109,7 +12109,7 @@ static void Brw_WriteRowDocData (unsigned long *NumDocsNotHidden,MYSQL_ROW row)
Frm_StartFormGoTo (Action); Frm_StartFormGoTo (Action);
Crs_PutParamCrsCod (CrsCod); // Go to course Crs_PutParamCrsCod (CrsCod); // Go to course
if (GrpCod > 0) if (GrpCod > 0)
Grp_PutParamGrpCod (GrpCod); Grp_PutParamGrpCod (&GrpCod);
} }
else if (DegCod > 0) else if (DegCod > 0)
{ {

View File

@ -748,7 +748,7 @@ static void Gam_PutFormsToRemEditOneGame (struct Gam_Games *Games,
const char *Anchor) const char *Anchor)
{ {
/***** Put icon to remove game *****/ /***** Put icon to remove game *****/
Ico_PutContextualIconToRemove (ActReqRemGam, Ico_PutContextualIconToRemove (ActReqRemGam,NULL,
Gam_PutParams,Games); Gam_PutParams,Games);
/***** Put icon to unhide/hide game *****/ /***** Put icon to unhide/hide game *****/

View File

@ -151,16 +151,14 @@ static void Grp_CreateGroupType (void);
static void Grp_CreateGroup (void); static void Grp_CreateGroup (void);
static void Grp_AskConfirmRemGrpTypWithGrps (unsigned NumGrps); static void Grp_AskConfirmRemGrpTypWithGrps (unsigned NumGrps);
static void Grp_PutParamRemGrpTyp (void *GrpTypCod);
static void Grp_AskConfirmRemGrp (void); static void Grp_AskConfirmRemGrp (void);
static void Grp_PutParamRemGrp (void *GrpCod);
static void Grp_RemoveGroupTypeCompletely (void); static void Grp_RemoveGroupTypeCompletely (void);
static void Grp_RemoveGroupCompletely (void); static void Grp_RemoveGroupCompletely (void);
static void Grp_WriteMaxStds (char Str[Cns_MAX_DECIMAL_DIGITS_UINT + 1],unsigned MaxStudents); static void Grp_WriteMaxStds (char Str[Cns_MAX_DECIMAL_DIGITS_UINT + 1],unsigned MaxStudents);
static long Grp_GetParamGrpTypCod (void); static long Grp_GetParamGrpTypCod (void);
static long Grp_GetParamGrpCod (void); static long Grp_GetParamGrpCod (void);
static void Grp_PutParamGrpTypCod (long GrpTypCod); static void Grp_PutParamGrpTypCod (void *GrpTypCod);
/*****************************************************************************/ /*****************************************************************************/
/******************* Write the names of the selected groups ******************/ /******************* Write the names of the selected groups ******************/
@ -1321,16 +1319,14 @@ static void Grp_ListGroupTypesForEdition (void)
/* Put icon to remove group type */ /* Put icon to remove group type */
HTM_TD_Begin ("class=\"BM\""); HTM_TD_Begin ("class=\"BM\"");
Frm_StartFormAnchor (ActReqRemGrpTyp,Grp_GROUP_TYPES_SECTION_ID); Ico_PutContextualIconToRemove (ActReqRemGrpTyp,Grp_GROUP_TYPES_SECTION_ID,
Grp_PutParamGrpTypCod (Gbl.Crs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp].GrpTypCod); Grp_PutParamGrpTypCod,&Gbl.Crs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp].GrpTypCod);
Ico_PutIconRemove ();
Frm_EndForm ();
HTM_TD_End (); HTM_TD_End ();
/* Name of group type */ /* Name of group type */
HTM_TD_Begin ("class=\"LM\""); HTM_TD_Begin ("class=\"LM\"");
Frm_StartFormAnchor (ActRenGrpTyp,Grp_GROUP_TYPES_SECTION_ID); Frm_StartFormAnchor (ActRenGrpTyp,Grp_GROUP_TYPES_SECTION_ID);
Grp_PutParamGrpTypCod (Gbl.Crs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp].GrpTypCod); Grp_PutParamGrpTypCod (&Gbl.Crs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp].GrpTypCod);
HTM_INPUT_TEXT ("GrpTypName",Grp_MAX_CHARS_GROUP_TYPE_NAME, HTM_INPUT_TEXT ("GrpTypName",Grp_MAX_CHARS_GROUP_TYPE_NAME,
Gbl.Crs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp].GrpTypName, Gbl.Crs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp].GrpTypName,
HTM_SUBMIT_ON_CHANGE, HTM_SUBMIT_ON_CHANGE,
@ -1341,7 +1337,7 @@ static void Grp_ListGroupTypesForEdition (void)
/* Is it mandatory to register in any group? */ /* Is it mandatory to register in any group? */
HTM_TD_Begin ("class=\"CM\""); HTM_TD_Begin ("class=\"CM\"");
Frm_StartFormAnchor (ActChgMdtGrpTyp,Grp_GROUP_TYPES_SECTION_ID); Frm_StartFormAnchor (ActChgMdtGrpTyp,Grp_GROUP_TYPES_SECTION_ID);
Grp_PutParamGrpTypCod (Gbl.Crs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp].GrpTypCod); Grp_PutParamGrpTypCod (&Gbl.Crs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp].GrpTypCod);
HTM_SELECT_Begin (HTM_SUBMIT_ON_CHANGE, HTM_SELECT_Begin (HTM_SUBMIT_ON_CHANGE,
"name=\"MandatoryEnrolment\"" "name=\"MandatoryEnrolment\""
" style=\"width:150px;\""); " style=\"width:150px;\"");
@ -1358,7 +1354,7 @@ static void Grp_ListGroupTypesForEdition (void)
/* Is it possible to register in multiple groups? */ /* Is it possible to register in multiple groups? */
HTM_TD_Begin ("class=\"CM\""); HTM_TD_Begin ("class=\"CM\"");
Frm_StartFormAnchor (ActChgMulGrpTyp,Grp_GROUP_TYPES_SECTION_ID); Frm_StartFormAnchor (ActChgMulGrpTyp,Grp_GROUP_TYPES_SECTION_ID);
Grp_PutParamGrpTypCod (Gbl.Crs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp].GrpTypCod); Grp_PutParamGrpTypCod (&Gbl.Crs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp].GrpTypCod);
HTM_SELECT_Begin (HTM_SUBMIT_ON_CHANGE, HTM_SELECT_Begin (HTM_SUBMIT_ON_CHANGE,
"name=\"MultipleEnrolment\"" "name=\"MultipleEnrolment\""
" style=\"width:150px;\""); " style=\"width:150px;\"");
@ -1375,7 +1371,7 @@ static void Grp_ListGroupTypesForEdition (void)
/* Open time */ /* Open time */
HTM_TD_Begin ("class=\"LM\""); HTM_TD_Begin ("class=\"LM\"");
Frm_StartFormAnchor (ActChgTimGrpTyp,Grp_GROUP_TYPES_SECTION_ID); Frm_StartFormAnchor (ActChgTimGrpTyp,Grp_GROUP_TYPES_SECTION_ID);
Grp_PutParamGrpTypCod (Gbl.Crs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp].GrpTypCod); Grp_PutParamGrpTypCod (&Gbl.Crs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp].GrpTypCod);
HTM_TABLE_BeginCenterPadding (2); HTM_TABLE_BeginCenterPadding (2);
HTM_TR_Begin (NULL); HTM_TR_Begin (NULL);
@ -1518,10 +1514,8 @@ static void Grp_ListGroupsForEdition (const struct Roo_Rooms *Rooms)
/***** Icon to remove group *****/ /***** Icon to remove group *****/
HTM_TD_Begin ("class=\"BM\""); HTM_TD_Begin ("class=\"BM\"");
Frm_StartFormAnchor (ActReqRemGrp,Grp_GROUPS_SECTION_ID); Ico_PutContextualIconToRemove (ActReqRemGrp,Grp_GROUPS_SECTION_ID,
Grp_PutParamGrpCod (Grp->GrpCod); Grp_PutParamGrpCod,&Grp->GrpCod);
Ico_PutIconRemove ();
Frm_EndForm ();
HTM_TD_End (); HTM_TD_End ();
/***** Icon to open/close group *****/ /***** Icon to open/close group *****/
@ -1529,7 +1523,7 @@ static void Grp_ListGroupsForEdition (const struct Roo_Rooms *Rooms)
Frm_StartFormAnchor (Grp->Open ? ActCloGrp : Frm_StartFormAnchor (Grp->Open ? ActCloGrp :
ActOpeGrp, ActOpeGrp,
Grp_GROUPS_SECTION_ID); Grp_GROUPS_SECTION_ID);
Grp_PutParamGrpCod (Grp->GrpCod); Grp_PutParamGrpCod (&Grp->GrpCod);
Ico_PutIconLink (Grp->Open ? "unlock.svg" : Ico_PutIconLink (Grp->Open ? "unlock.svg" :
"lock.svg", "lock.svg",
Str_BuildStringStr (Grp->Open ? Txt_Group_X_open_click_to_close_it : Str_BuildStringStr (Grp->Open ? Txt_Group_X_open_click_to_close_it :
@ -1544,7 +1538,7 @@ static void Grp_ListGroupsForEdition (const struct Roo_Rooms *Rooms)
Frm_StartFormAnchor (Grp->FileZones ? ActDisFilZonGrp : Frm_StartFormAnchor (Grp->FileZones ? ActDisFilZonGrp :
ActEnaFilZonGrp, ActEnaFilZonGrp,
Grp_GROUPS_SECTION_ID); Grp_GROUPS_SECTION_ID);
Grp_PutParamGrpCod (Grp->GrpCod); Grp_PutParamGrpCod (&Grp->GrpCod);
Ico_PutIconLink (Grp->FileZones ? "folder-open-green.svg" : Ico_PutIconLink (Grp->FileZones ? "folder-open-green.svg" :
"folder-red.svg", "folder-red.svg",
Str_BuildStringStr (Grp->FileZones ? Txt_File_zones_of_the_group_X_enabled_click_to_disable_them : Str_BuildStringStr (Grp->FileZones ? Txt_File_zones_of_the_group_X_enabled_click_to_disable_them :
@ -1558,7 +1552,7 @@ static void Grp_ListGroupsForEdition (const struct Roo_Rooms *Rooms)
/* Start selector */ /* Start selector */
HTM_TD_Begin ("class=\"CM\""); HTM_TD_Begin ("class=\"CM\"");
Frm_StartFormAnchor (ActChgGrpTyp,Grp_GROUPS_SECTION_ID); Frm_StartFormAnchor (ActChgGrpTyp,Grp_GROUPS_SECTION_ID);
Grp_PutParamGrpCod (Grp->GrpCod); Grp_PutParamGrpCod (&Grp->GrpCod);
HTM_SELECT_Begin (HTM_SUBMIT_ON_CHANGE, HTM_SELECT_Begin (HTM_SUBMIT_ON_CHANGE,
"name=\"GrpTypCod\" style=\"width:100px;\""); "name=\"GrpTypCod\" style=\"width:100px;\"");
@ -1581,7 +1575,7 @@ static void Grp_ListGroupsForEdition (const struct Roo_Rooms *Rooms)
/***** Group name *****/ /***** Group name *****/
HTM_TD_Begin ("class=\"CM\""); HTM_TD_Begin ("class=\"CM\"");
Frm_StartFormAnchor (ActRenGrp,Grp_GROUPS_SECTION_ID); Frm_StartFormAnchor (ActRenGrp,Grp_GROUPS_SECTION_ID);
Grp_PutParamGrpCod (Grp->GrpCod); Grp_PutParamGrpCod (&Grp->GrpCod);
HTM_INPUT_TEXT ("GrpName",Grp_MAX_CHARS_GROUP_NAME,Grp->GrpName, HTM_INPUT_TEXT ("GrpName",Grp_MAX_CHARS_GROUP_NAME,Grp->GrpName,
HTM_SUBMIT_ON_CHANGE, HTM_SUBMIT_ON_CHANGE,
"size=\"20\""); "size=\"20\"");
@ -1592,7 +1586,7 @@ static void Grp_ListGroupsForEdition (const struct Roo_Rooms *Rooms)
/* Start selector */ /* Start selector */
HTM_TD_Begin ("class=\"CM\""); HTM_TD_Begin ("class=\"CM\"");
Frm_StartFormAnchor (ActChgGrpRoo,Grp_GROUPS_SECTION_ID); Frm_StartFormAnchor (ActChgGrpRoo,Grp_GROUPS_SECTION_ID);
Grp_PutParamGrpCod (Grp->GrpCod); Grp_PutParamGrpCod (&Grp->GrpCod);
HTM_SELECT_Begin (HTM_SUBMIT_ON_CHANGE, HTM_SELECT_Begin (HTM_SUBMIT_ON_CHANGE,
"name=\"RooCod\" style=\"width:100px;\""); "name=\"RooCod\" style=\"width:100px;\"");
@ -1632,7 +1626,7 @@ static void Grp_ListGroupsForEdition (const struct Roo_Rooms *Rooms)
/***** Maximum number of students of the group (row[3]) *****/ /***** Maximum number of students of the group (row[3]) *****/
HTM_TD_Begin ("class=\"CM\""); HTM_TD_Begin ("class=\"CM\"");
Frm_StartFormAnchor (ActChgMaxStdGrp,Grp_GROUPS_SECTION_ID); Frm_StartFormAnchor (ActChgMaxStdGrp,Grp_GROUPS_SECTION_ID);
Grp_PutParamGrpCod (Grp->GrpCod); Grp_PutParamGrpCod (&Grp->GrpCod);
Grp_WriteMaxStds (StrMaxStudents,Grp->MaxStudents); Grp_WriteMaxStds (StrMaxStudents,Grp->MaxStudents);
HTM_INPUT_TEXT ("MaxStudents",Cns_MAX_DECIMAL_DIGITS_UINT,StrMaxStudents, HTM_INPUT_TEXT ("MaxStudents",Cns_MAX_DECIMAL_DIGITS_UINT,StrMaxStudents,
HTM_SUBMIT_ON_CHANGE, HTM_SUBMIT_ON_CHANGE,
@ -3999,13 +3993,13 @@ static void Grp_AskConfirmRemGrpTypWithGrps (unsigned NumGrps)
/***** Show question and button to remove type of group *****/ /***** Show question and button to remove type of group *****/
if (NumGrps == 1) if (NumGrps == 1)
Ale_ShowAlertAndButton (ActRemGrpTyp,Grp_GROUP_TYPES_SECTION_ID,NULL, Ale_ShowAlertAndButton (ActRemGrpTyp,Grp_GROUP_TYPES_SECTION_ID,NULL,
Grp_PutParamRemGrpTyp,&Gbl.Crs.Grps.GrpTyp.GrpTypCod, Grp_PutParamGrpTypCod,&Gbl.Crs.Grps.GrpTyp.GrpTypCod,
Btn_REMOVE_BUTTON,Txt_Remove_type_of_group, Btn_REMOVE_BUTTON,Txt_Remove_type_of_group,
Ale_QUESTION,Txt_Do_you_really_want_to_remove_the_type_of_group_X_1_group_, Ale_QUESTION,Txt_Do_you_really_want_to_remove_the_type_of_group_X_1_group_,
Gbl.Crs.Grps.GrpTyp.GrpTypName); Gbl.Crs.Grps.GrpTyp.GrpTypName);
else else
Ale_ShowAlertAndButton (ActRemGrpTyp,Grp_GROUP_TYPES_SECTION_ID,NULL, Ale_ShowAlertAndButton (ActRemGrpTyp,Grp_GROUP_TYPES_SECTION_ID,NULL,
Grp_PutParamRemGrpTyp,&Gbl.Crs.Grps.GrpTyp.GrpTypCod, Grp_PutParamGrpTypCod,&Gbl.Crs.Grps.GrpTyp.GrpTypCod,
Btn_REMOVE_BUTTON,Txt_Remove_type_of_group, Btn_REMOVE_BUTTON,Txt_Remove_type_of_group,
Ale_QUESTION,Txt_Do_you_really_want_to_remove_the_type_of_group_X_Y_groups_, Ale_QUESTION,Txt_Do_you_really_want_to_remove_the_type_of_group_X_Y_groups_,
Gbl.Crs.Grps.GrpTyp.GrpTypName,NumGrps); Gbl.Crs.Grps.GrpTyp.GrpTypName,NumGrps);
@ -4015,16 +4009,6 @@ static void Grp_AskConfirmRemGrpTypWithGrps (unsigned NumGrps)
Grp_ReqEditGroupsInternal2 (Ale_INFO,NULL); Grp_ReqEditGroupsInternal2 (Ale_INFO,NULL);
} }
/*****************************************************************************/
/**************** Put parameter to remove a type of group ********************/
/*****************************************************************************/
static void Grp_PutParamRemGrpTyp (void *GrpTypCod)
{
if (GrpTypCod)
Grp_PutParamGrpTypCod (*((long *) GrpTypCod));
}
/*****************************************************************************/ /*****************************************************************************/
/******************* Ask for confirmation to remove a group ******************/ /******************* Ask for confirmation to remove a group ******************/
/*****************************************************************************/ /*****************************************************************************/
@ -4052,19 +4036,19 @@ static void Grp_AskConfirmRemGrp (void)
/***** Show question and button to remove group *****/ /***** Show question and button to remove group *****/
if (NumStds == 0) if (NumStds == 0)
Ale_ShowAlertAndButton (ActRemGrp,Grp_GROUPS_SECTION_ID,NULL, Ale_ShowAlertAndButton (ActRemGrp,Grp_GROUPS_SECTION_ID,NULL,
Grp_PutParamRemGrp,&Gbl.Crs.Grps.GrpCod, Grp_PutParamGrpCod,&Gbl.Crs.Grps.GrpCod,
Btn_REMOVE_BUTTON,Txt_Remove_group, Btn_REMOVE_BUTTON,Txt_Remove_group,
Ale_QUESTION,Txt_Do_you_really_want_to_remove_the_group_X, Ale_QUESTION,Txt_Do_you_really_want_to_remove_the_group_X,
GrpDat.GrpName); GrpDat.GrpName);
else if (NumStds == 1) else if (NumStds == 1)
Ale_ShowAlertAndButton (ActRemGrp,Grp_GROUPS_SECTION_ID,NULL, Ale_ShowAlertAndButton (ActRemGrp,Grp_GROUPS_SECTION_ID,NULL,
Grp_PutParamRemGrp,&Gbl.Crs.Grps.GrpCod, Grp_PutParamGrpCod,&Gbl.Crs.Grps.GrpCod,
Btn_REMOVE_BUTTON,Txt_Remove_group, Btn_REMOVE_BUTTON,Txt_Remove_group,
Ale_QUESTION,Txt_Do_you_really_want_to_remove_the_group_X_1_student_, Ale_QUESTION,Txt_Do_you_really_want_to_remove_the_group_X_1_student_,
GrpDat.GrpName); GrpDat.GrpName);
else else
Ale_ShowAlertAndButton (ActRemGrp,Grp_GROUPS_SECTION_ID,NULL, Ale_ShowAlertAndButton (ActRemGrp,Grp_GROUPS_SECTION_ID,NULL,
Grp_PutParamRemGrp,&Gbl.Crs.Grps.GrpCod, Grp_PutParamGrpCod,&Gbl.Crs.Grps.GrpCod,
Btn_REMOVE_BUTTON,Txt_Remove_group, Btn_REMOVE_BUTTON,Txt_Remove_group,
Ale_QUESTION,Txt_Do_you_really_want_to_remove_the_group_X_Y_students_, Ale_QUESTION,Txt_Do_you_really_want_to_remove_the_group_X_Y_students_,
GrpDat.GrpName,NumStds); GrpDat.GrpName,NumStds);
@ -4073,16 +4057,6 @@ static void Grp_AskConfirmRemGrp (void)
Grp_ReqEditGroupsInternal2 (Ale_INFO,NULL); Grp_ReqEditGroupsInternal2 (Ale_INFO,NULL);
} }
/*****************************************************************************/
/*********************** Put parameter to remove a group *********************/
/*****************************************************************************/
static void Grp_PutParamRemGrp (void *GrpCod)
{
if (GrpCod)
Grp_PutParamGrpCod (*((long *) GrpCod));
}
/*****************************************************************************/ /*****************************************************************************/
/**************************** Remove a group type ****************************/ /**************************** Remove a group type ****************************/
/*****************************************************************************/ /*****************************************************************************/
@ -4882,18 +4856,20 @@ static long Grp_GetParamGrpCod (void)
/****************** Write parameter with code of group type ******************/ /****************** Write parameter with code of group type ******************/
/*****************************************************************************/ /*****************************************************************************/
static void Grp_PutParamGrpTypCod (long GrpTypCod) static void Grp_PutParamGrpTypCod (void *GrpTypCod)
{ {
Par_PutHiddenParamLong (NULL,"GrpTypCod",GrpTypCod); if (GrpTypCod)
Par_PutHiddenParamLong (NULL,"GrpTypCod",*((long *) GrpTypCod));
} }
/*****************************************************************************/ /*****************************************************************************/
/********************* Write parameter with code of group ********************/ /********************* Write parameter with code of group ********************/
/*****************************************************************************/ /*****************************************************************************/
void Grp_PutParamGrpCod (long GrpCod) void Grp_PutParamGrpCod (void *GrpCod)
{ {
Par_PutHiddenParamLong (NULL,"GrpCod",GrpCod); if (GrpCod)
Par_PutHiddenParamLong (NULL,"GrpCod",*((long *) GrpCod));
} }
/*****************************************************************************/ /*****************************************************************************/

View File

@ -229,7 +229,7 @@ void Grp_ChangeMaxStdsGrp (void);
unsigned Grp_ConvertToNumMaxStdsGrp (const char *StrMaxStudents); unsigned Grp_ConvertToNumMaxStdsGrp (const char *StrMaxStudents);
void Grp_RenameGroupType (void); void Grp_RenameGroupType (void);
void Grp_RenameGroup (void); void Grp_RenameGroup (void);
void Grp_PutParamGrpCod (long GrpCod); void Grp_PutParamGrpCod (void *GrpCod);
void Grp_GetLstCodsGrpWanted (struct ListCodGrps *LstGrpsWanted); void Grp_GetLstCodsGrpWanted (struct ListCodGrps *LstGrpsWanted);
void Grp_FreeListCodGrp (struct ListCodGrps *LstGrps); void Grp_FreeListCodGrp (struct ListCodGrps *LstGrps);
void Grp_PutParamAllGroups (void); void Grp_PutParamAllGroups (void);

View File

@ -74,7 +74,7 @@ static Hld_HolidayType_t Hld_GetParamHldType (void);
static Hld_HolidayType_t Hld_GetTypeOfHoliday (const char *UnsignedStr); static Hld_HolidayType_t Hld_GetTypeOfHoliday (const char *UnsignedStr);
static void Hld_ListHolidaysForEdition (const struct Hld_Holidays *Holidays, static void Hld_ListHolidaysForEdition (const struct Hld_Holidays *Holidays,
const struct Plc_Places *Places); const struct Plc_Places *Places);
static void Hld_PutParamHldCod (long HldCod); static void Hld_PutParamHldCod (void *HldCod);
static void Hld_ChangeDate (Hld_StartOrEndDate_t StartOrEndDate); static void Hld_ChangeDate (Hld_StartOrEndDate_t StartOrEndDate);
static void Hld_PutFormToCreateHoliday (const struct Plc_Places *Places); static void Hld_PutFormToCreateHoliday (const struct Plc_Places *Places);
static void Hld_PutHeadHolidays (void); static void Hld_PutHeadHolidays (void);
@ -602,10 +602,8 @@ static void Hld_ListHolidaysForEdition (const struct Hld_Holidays *Holidays,
/* Put icon to remove holiday */ /* Put icon to remove holiday */
HTM_TD_Begin ("class=\"BM\""); HTM_TD_Begin ("class=\"BM\"");
Frm_StartForm (ActRemHld); Ico_PutContextualIconToRemove (ActRemHld,NULL,
Hld_PutParamHldCod (Hld->HldCod); Hld_PutParamHldCod,&Hld->HldCod);
Ico_PutIconRemove ();
Frm_EndForm ();
HTM_TD_End (); HTM_TD_End ();
/* Holiday code */ /* Holiday code */
@ -616,7 +614,7 @@ static void Hld_ListHolidaysForEdition (const struct Hld_Holidays *Holidays,
/* Holiday place */ /* Holiday place */
HTM_TD_Begin ("class=\"CM\""); HTM_TD_Begin ("class=\"CM\"");
Frm_StartForm (ActChgHldPlc); Frm_StartForm (ActChgHldPlc);
Hld_PutParamHldCod (Hld->HldCod); Hld_PutParamHldCod (&Hld->HldCod);
HTM_SELECT_Begin (HTM_SUBMIT_ON_CHANGE, HTM_SELECT_Begin (HTM_SUBMIT_ON_CHANGE,
"name=\"PlcCod\" class=\"PLC_SEL\""); "name=\"PlcCod\" class=\"PLC_SEL\"");
HTM_OPTION (HTM_Type_STRING,"-1",Hld->PlcCod <= 0,false, HTM_OPTION (HTM_Type_STRING,"-1",Hld->PlcCod <= 0,false,
@ -634,7 +632,7 @@ static void Hld_ListHolidaysForEdition (const struct Hld_Holidays *Holidays,
/* Holiday type */ /* Holiday type */
HTM_TD_Begin ("class=\"CM\""); HTM_TD_Begin ("class=\"CM\"");
Frm_StartForm (ActChgHldTyp); Frm_StartForm (ActChgHldTyp);
Hld_PutParamHldCod (Hld->HldCod); Hld_PutParamHldCod (&Hld->HldCod);
HTM_SELECT_Begin (HTM_SUBMIT_ON_CHANGE, HTM_SELECT_Begin (HTM_SUBMIT_ON_CHANGE,
"name=\"HldTyp\" style=\"width:62px;\""); "name=\"HldTyp\" style=\"width:62px;\"");
for (HolidayType = (Hld_HolidayType_t) 0; for (HolidayType = (Hld_HolidayType_t) 0;
@ -653,7 +651,7 @@ static void Hld_ListHolidaysForEdition (const struct Hld_Holidays *Holidays,
/* Holiday date / Non school period start date */ /* Holiday date / Non school period start date */
HTM_TD_Begin ("class=\"CM\""); HTM_TD_Begin ("class=\"CM\"");
Frm_StartForm (ActChgHldStrDat); Frm_StartForm (ActChgHldStrDat);
Hld_PutParamHldCod (Hld->HldCod); Hld_PutParamHldCod (&Hld->HldCod);
Dat_WriteFormDate (Gbl.Now.Date.Year - 1, Dat_WriteFormDate (Gbl.Now.Date.Year - 1,
Gbl.Now.Date.Year + 1, Gbl.Now.Date.Year + 1,
"Start", "Start",
@ -665,7 +663,7 @@ static void Hld_ListHolidaysForEdition (const struct Hld_Holidays *Holidays,
/* Non school period end date */ /* Non school period end date */
HTM_TD_Begin ("class=\"CM\""); HTM_TD_Begin ("class=\"CM\"");
Frm_StartForm (ActChgHldEndDat); Frm_StartForm (ActChgHldEndDat);
Hld_PutParamHldCod (Hld->HldCod); Hld_PutParamHldCod (&Hld->HldCod);
Dat_WriteFormDate (Gbl.Now.Date.Year - 1, Dat_WriteFormDate (Gbl.Now.Date.Year - 1,
Gbl.Now.Date.Year + 1, Gbl.Now.Date.Year + 1,
"End", "End",
@ -677,7 +675,7 @@ static void Hld_ListHolidaysForEdition (const struct Hld_Holidays *Holidays,
/* Holiday name */ /* Holiday name */
HTM_TD_Begin ("class=\"CM\""); HTM_TD_Begin ("class=\"CM\"");
Frm_StartForm (ActRenHld); Frm_StartForm (ActRenHld);
Hld_PutParamHldCod (Hld->HldCod); Hld_PutParamHldCod (&Hld->HldCod);
HTM_INPUT_TEXT ("Name",Hld_MAX_CHARS_HOLIDAY_NAME,Hld->Name, HTM_INPUT_TEXT ("Name",Hld_MAX_CHARS_HOLIDAY_NAME,Hld->Name,
HTM_SUBMIT_ON_CHANGE, HTM_SUBMIT_ON_CHANGE,
"size=\"20\""); "size=\"20\"");
@ -694,9 +692,10 @@ static void Hld_ListHolidaysForEdition (const struct Hld_Holidays *Holidays,
/******************** Write parameter with code of holiday *******************/ /******************** Write parameter with code of holiday *******************/
/*****************************************************************************/ /*****************************************************************************/
static void Hld_PutParamHldCod (long HldCod) static void Hld_PutParamHldCod (void *HldCod)
{ {
Par_PutHiddenParamLong (NULL,"HldCod",HldCod); if (HldCod)
Par_PutHiddenParamLong (NULL,"HldCod",*((long *) HldCod));
} }
/*****************************************************************************/ /*****************************************************************************/

View File

@ -228,12 +228,12 @@ void Ico_PutContextualIconToAdd (Act_Action_t NextAction,const char *Anchor,
Txt); Txt);
} }
void Ico_PutContextualIconToRemove (Act_Action_t NextAction, void Ico_PutContextualIconToRemove (Act_Action_t NextAction,const char *Anchor,
void (*FuncParams) (void *Args),void *Args) void (*FuncParams) (void *Args),void *Args)
{ {
extern const char *Txt_Remove; extern const char *Txt_Remove;
Lay_PutContextualLinkOnlyIcon (NextAction,NULL, Lay_PutContextualLinkOnlyIcon (NextAction,Anchor,
FuncParams,Args, FuncParams,Args,
"trash.svg", "trash.svg",
Txt_Remove); Txt_Remove);

View File

@ -58,7 +58,7 @@ Ico_IconSet_t Ico_GetIconSetFromStr (const char *Str);
void Ico_PutContextualIconToAdd (Act_Action_t NextAction,const char *Anchor, void Ico_PutContextualIconToAdd (Act_Action_t NextAction,const char *Anchor,
void (*FuncParams) (void *Args),void *Args, void (*FuncParams) (void *Args),void *Args,
const char *Txt); const char *Txt);
void Ico_PutContextualIconToRemove (Act_Action_t NextAction, void Ico_PutContextualIconToRemove (Act_Action_t NextAction,const char *Anchor,
void (*FuncParams) (void *Args),void *Args); void (*FuncParams) (void *Args),void *Args);
void Ico_PutContextualIconToEdit (Act_Action_t NextAction,const char *Anchor, void Ico_PutContextualIconToEdit (Act_Action_t NextAction,const char *Anchor,
void (*FuncParams) (void *Args),void *Args); void (*FuncParams) (void *Args),void *Args);

View File

@ -90,7 +90,7 @@ static bool Ins_CheckIfICanEdit (struct Instit *Ins);
static Ins_StatusTxt_t Ins_GetStatusTxtFromStatusBits (Ins_Status_t Status); static Ins_StatusTxt_t Ins_GetStatusTxtFromStatusBits (Ins_Status_t Status);
static Ins_Status_t Ins_GetStatusBitsFromStatusTxt (Ins_StatusTxt_t StatusTxt); static Ins_Status_t Ins_GetStatusBitsFromStatusTxt (Ins_StatusTxt_t StatusTxt);
static void Ins_PutParamOtherInsCod (long InsCod); static void Ins_PutParamOtherInsCod (void *InsCod);
static long Ins_GetParamOtherInsCod (void); static long Ins_GetParamOtherInsCod (void);
static void Ins_UpdateInsNameDB (long InsCod,const char *FieldName,const char *NewInsName); static void Ins_UpdateInsNameDB (long InsCod,const char *FieldName,const char *NewInsName);
@ -1119,12 +1119,8 @@ static void Ins_ListInstitutionsForEdition (void)
// Institution has centres or users ==> deletion forbidden // Institution has centres or users ==> deletion forbidden
Ico_PutIconRemovalNotAllowed (); Ico_PutIconRemovalNotAllowed ();
else else
{ Ico_PutContextualIconToRemove (ActRemIns,NULL,
Frm_StartForm (ActRemIns); Ins_PutParamOtherInsCod,&Ins->InsCod);
Ins_PutParamOtherInsCod (Ins->InsCod);
Ico_PutIconRemove ();
Frm_EndForm ();
}
HTM_TD_End (); HTM_TD_End ();
/* Institution code */ /* Institution code */
@ -1142,7 +1138,7 @@ static void Ins_ListInstitutionsForEdition (void)
if (ICanEdit) if (ICanEdit)
{ {
Frm_StartForm (ActRenInsSho); Frm_StartForm (ActRenInsSho);
Ins_PutParamOtherInsCod (Ins->InsCod); Ins_PutParamOtherInsCod (&Ins->InsCod);
HTM_INPUT_TEXT ("ShortName",Hie_MAX_CHARS_SHRT_NAME,Ins->ShrtName, HTM_INPUT_TEXT ("ShortName",Hie_MAX_CHARS_SHRT_NAME,Ins->ShrtName,
HTM_SUBMIT_ON_CHANGE, HTM_SUBMIT_ON_CHANGE,
"class=\"INPUT_SHORT_NAME\""); "class=\"INPUT_SHORT_NAME\"");
@ -1157,7 +1153,7 @@ static void Ins_ListInstitutionsForEdition (void)
if (ICanEdit) if (ICanEdit)
{ {
Frm_StartForm (ActRenInsFul); Frm_StartForm (ActRenInsFul);
Ins_PutParamOtherInsCod (Ins->InsCod); Ins_PutParamOtherInsCod (&Ins->InsCod);
HTM_INPUT_TEXT ("FullName",Hie_MAX_CHARS_FULL_NAME,Ins->FullName, HTM_INPUT_TEXT ("FullName",Hie_MAX_CHARS_FULL_NAME,Ins->FullName,
HTM_SUBMIT_ON_CHANGE, HTM_SUBMIT_ON_CHANGE,
"class=\"INPUT_FULL_NAME\""); "class=\"INPUT_FULL_NAME\"");
@ -1172,7 +1168,7 @@ static void Ins_ListInstitutionsForEdition (void)
if (ICanEdit) if (ICanEdit)
{ {
Frm_StartForm (ActChgInsWWW); Frm_StartForm (ActChgInsWWW);
Ins_PutParamOtherInsCod (Ins->InsCod); Ins_PutParamOtherInsCod (&Ins->InsCod);
HTM_INPUT_URL ("WWW",Ins->WWW,HTM_SUBMIT_ON_CHANGE, HTM_INPUT_URL ("WWW",Ins->WWW,HTM_SUBMIT_ON_CHANGE,
"class=\"INPUT_WWW_NARROW\" required=\"required\""); "class=\"INPUT_WWW_NARROW\" required=\"required\"");
Frm_EndForm (); Frm_EndForm ();
@ -1219,7 +1215,7 @@ static void Ins_ListInstitutionsForEdition (void)
StatusTxt == Ins_STATUS_PENDING) StatusTxt == Ins_STATUS_PENDING)
{ {
Frm_StartForm (ActChgInsSta); Frm_StartForm (ActChgInsSta);
Ins_PutParamOtherInsCod (Ins->InsCod); Ins_PutParamOtherInsCod (&Ins->InsCod);
HTM_SELECT_Begin (HTM_SUBMIT_ON_CHANGE, HTM_SELECT_Begin (HTM_SUBMIT_ON_CHANGE,
"name=\"Status\" class=\"INPUT_STATUS\""); "name=\"Status\" class=\"INPUT_STATUS\"");
StatusUnsigned = (unsigned) Ins_GetStatusBitsFromStatusTxt (Ins_STATUS_PENDING); StatusUnsigned = (unsigned) Ins_GetStatusBitsFromStatusTxt (Ins_STATUS_PENDING);
@ -1320,9 +1316,10 @@ void Ins_PutParamInsCod (long InsCod)
/***************** Write parameter with code of institution ******************/ /***************** Write parameter with code of institution ******************/
/*****************************************************************************/ /*****************************************************************************/
static void Ins_PutParamOtherInsCod (long InsCod) static void Ins_PutParamOtherInsCod (void *InsCod)
{ {
Par_PutHiddenParamLong (NULL,"OthInsCod",InsCod); if (InsCod)
Par_PutHiddenParamLong (NULL,"OthInsCod",*((long *) InsCod));
} }
/*****************************************************************************/ /*****************************************************************************/

View File

@ -72,7 +72,7 @@ static void Lnk_EditLinksInternal (void);
static void Lnk_PutIconsEditingLinks (__attribute__((unused)) void *Args); static void Lnk_PutIconsEditingLinks (__attribute__((unused)) void *Args);
static void Lnk_ListLinksForEdition (void); static void Lnk_ListLinksForEdition (void);
static void Lnk_PutParamLnkCod (long LnkCod); static void Lnk_PutParamLnkCod (void *LnkCod);
static void Lnk_RenameLink (Cns_ShrtOrFullName_t ShrtOrFullName); static void Lnk_RenameLink (Cns_ShrtOrFullName_t ShrtOrFullName);
static bool Lnk_CheckIfLinkNameExists (const char *FieldName,const char *Name,long LnkCod); static bool Lnk_CheckIfLinkNameExists (const char *FieldName,const char *Name,long LnkCod);
@ -428,10 +428,8 @@ static void Lnk_ListLinksForEdition (void)
/* Put icon to remove link */ /* Put icon to remove link */
HTM_TD_Begin ("class=\"BM\""); HTM_TD_Begin ("class=\"BM\"");
Frm_StartForm (ActRemLnk); Ico_PutContextualIconToRemove (ActRemLnk,NULL,
Lnk_PutParamLnkCod (Lnk->LnkCod); Lnk_PutParamLnkCod,&Lnk->LnkCod);
Ico_PutIconRemove ();
Frm_EndForm ();
HTM_TD_End (); HTM_TD_End ();
/* Link code */ /* Link code */
@ -442,7 +440,7 @@ static void Lnk_ListLinksForEdition (void)
/* Link short name */ /* Link short name */
HTM_TD_Begin ("class=\"CM\""); HTM_TD_Begin ("class=\"CM\"");
Frm_StartForm (ActRenLnkSho); Frm_StartForm (ActRenLnkSho);
Lnk_PutParamLnkCod (Lnk->LnkCod); Lnk_PutParamLnkCod (&Lnk->LnkCod);
HTM_INPUT_TEXT ("ShortName",Lnk_MAX_CHARS_LINK_SHRT_NAME,Lnk->ShrtName, HTM_INPUT_TEXT ("ShortName",Lnk_MAX_CHARS_LINK_SHRT_NAME,Lnk->ShrtName,
HTM_SUBMIT_ON_CHANGE, HTM_SUBMIT_ON_CHANGE,
"class=\"INPUT_SHORT_NAME\" required=\"required\""); "class=\"INPUT_SHORT_NAME\" required=\"required\"");
@ -452,7 +450,7 @@ static void Lnk_ListLinksForEdition (void)
/* Link full name */ /* Link full name */
HTM_TD_Begin ("class=\"CM\""); HTM_TD_Begin ("class=\"CM\"");
Frm_StartForm (ActRenLnkFul); Frm_StartForm (ActRenLnkFul);
Lnk_PutParamLnkCod (Lnk->LnkCod); Lnk_PutParamLnkCod (&Lnk->LnkCod);
HTM_INPUT_TEXT ("FullName",Lnk_MAX_CHARS_LINK_FULL_NAME,Lnk->FullName, HTM_INPUT_TEXT ("FullName",Lnk_MAX_CHARS_LINK_FULL_NAME,Lnk->FullName,
HTM_SUBMIT_ON_CHANGE, HTM_SUBMIT_ON_CHANGE,
"class=\"INPUT_FULL_NAME\" required=\"required\""); "class=\"INPUT_FULL_NAME\" required=\"required\"");
@ -462,7 +460,7 @@ static void Lnk_ListLinksForEdition (void)
/* Link WWW */ /* Link WWW */
HTM_TD_Begin ("class=\"CM\""); HTM_TD_Begin ("class=\"CM\"");
Frm_StartForm (ActChgLnkWWW); Frm_StartForm (ActChgLnkWWW);
Lnk_PutParamLnkCod (Lnk->LnkCod); Lnk_PutParamLnkCod (&Lnk->LnkCod);
HTM_INPUT_URL ("WWW",Lnk->WWW,HTM_SUBMIT_ON_CHANGE, HTM_INPUT_URL ("WWW",Lnk->WWW,HTM_SUBMIT_ON_CHANGE,
"class=\"INPUT_WWW_NARROW\" required=\"required\""); "class=\"INPUT_WWW_NARROW\" required=\"required\"");
Frm_EndForm (); Frm_EndForm ();
@ -479,9 +477,10 @@ static void Lnk_ListLinksForEdition (void)
/******************** Write parameter with code of link **********************/ /******************** Write parameter with code of link **********************/
/*****************************************************************************/ /*****************************************************************************/
static void Lnk_PutParamLnkCod (long LnkCod) static void Lnk_PutParamLnkCod (void *LnkCod)
{ {
Par_PutHiddenParamLong (NULL,"LnkCod",LnkCod); if (LnkCod)
Par_PutHiddenParamLong (NULL,"LnkCod",*((long *) LnkCod));
} }
/*****************************************************************************/ /*****************************************************************************/

View File

@ -78,7 +78,7 @@ static void Mai_GetMailDomain (const char *Email,char MailDomain[Cns_MAX_BYTES_E
static bool Mai_CheckIfMailDomainIsAllowedForNotif (const char MailDomain[Cns_MAX_BYTES_EMAIL_ADDRESS + 1]); static bool Mai_CheckIfMailDomainIsAllowedForNotif (const char MailDomain[Cns_MAX_BYTES_EMAIL_ADDRESS + 1]);
static void Mai_ListMailDomainsForEdition (void); static void Mai_ListMailDomainsForEdition (void);
static void Mai_PutParamMaiCod (long MaiCod); static void Mai_PutParamMaiCod (void *MaiCod);
static void Mai_RenameMailDomain (Cns_ShrtOrFullName_t ShrtOrFullName); static void Mai_RenameMailDomain (Cns_ShrtOrFullName_t ShrtOrFullName);
static bool Mai_CheckIfMailDomainNameExists (const char *FieldName,const char *Name,long MaiCod); static bool Mai_CheckIfMailDomainNameExists (const char *FieldName,const char *Name,long MaiCod);
@ -498,10 +498,8 @@ static void Mai_ListMailDomainsForEdition (void)
/* Put icon to remove mail */ /* Put icon to remove mail */
HTM_TD_Begin ("class=\"BM\""); HTM_TD_Begin ("class=\"BM\"");
Frm_StartForm (ActRemMai); Ico_PutContextualIconToRemove (ActRemMai,NULL,
Mai_PutParamMaiCod (Mai->MaiCod); Mai_PutParamMaiCod,&Mai->MaiCod);
Ico_PutIconRemove ();
Frm_EndForm ();
HTM_TD_End (); HTM_TD_End ();
/* Mail code */ /* Mail code */
@ -512,7 +510,7 @@ static void Mai_ListMailDomainsForEdition (void)
/* Mail domain */ /* Mail domain */
HTM_TD_Begin ("class=\"CM\""); HTM_TD_Begin ("class=\"CM\"");
Frm_StartForm (ActRenMaiSho); Frm_StartForm (ActRenMaiSho);
Mai_PutParamMaiCod (Mai->MaiCod); Mai_PutParamMaiCod (&Mai->MaiCod);
HTM_INPUT_TEXT ("Domain",Cns_MAX_CHARS_EMAIL_ADDRESS,Mai->Domain, HTM_INPUT_TEXT ("Domain",Cns_MAX_CHARS_EMAIL_ADDRESS,Mai->Domain,
HTM_SUBMIT_ON_CHANGE, HTM_SUBMIT_ON_CHANGE,
"size=\"15\""); "size=\"15\"");
@ -522,7 +520,7 @@ static void Mai_ListMailDomainsForEdition (void)
/* Mail domain info */ /* Mail domain info */
HTM_TD_Begin ("class=\"CM\""); HTM_TD_Begin ("class=\"CM\"");
Frm_StartForm (ActRenMaiFul); Frm_StartForm (ActRenMaiFul);
Mai_PutParamMaiCod (Mai->MaiCod); Mai_PutParamMaiCod (&Mai->MaiCod);
HTM_INPUT_TEXT ("Info",Mai_MAX_CHARS_MAIL_INFO,Mai->Info, HTM_INPUT_TEXT ("Info",Mai_MAX_CHARS_MAIL_INFO,Mai->Info,
HTM_SUBMIT_ON_CHANGE, HTM_SUBMIT_ON_CHANGE,
"size=\"40\""); "size=\"40\"");
@ -545,9 +543,10 @@ static void Mai_ListMailDomainsForEdition (void)
/******************** Write parameter with code of mail **********************/ /******************** Write parameter with code of mail **********************/
/*****************************************************************************/ /*****************************************************************************/
static void Mai_PutParamMaiCod (long MaiCod) static void Mai_PutParamMaiCod (void *MaiCod)
{ {
Par_PutHiddenParamLong (NULL,"MaiCod",MaiCod); if (MaiCod)
Par_PutHiddenParamLong (NULL,"MaiCod",*((long *) MaiCod));
} }
/*****************************************************************************/ /*****************************************************************************/

View File

@ -625,15 +625,18 @@ static void Mch_ListOneOrMoreMatchesIcons (struct Gam_Games *Games,
{ {
HTM_TD_Begin ("class=\"BT%u\"",Gbl.RowEvenOdd); HTM_TD_Begin ("class=\"BT%u\"",Gbl.RowEvenOdd);
/***** Put icon to remove the match *****/
if (Mch_CheckIfICanEditThisMatch (Match)) if (Mch_CheckIfICanEditThisMatch (Match))
{ {
Games->GamCod = Match->GamCod; Games->GamCod = Match->GamCod;
Games->MchCod = Match->MchCod; Games->MchCod = Match->MchCod;
Frm_StartForm (ActReqRemMch);
Mch_PutParamsEdit (Games); /***** Put icon to remove the match *****/
Ico_PutIconRemove (); Ico_PutContextualIconToRemove (ActReqRemMch,NULL,
Frm_EndForm (); Mch_PutParamsEdit,Games);
/***** Put icon to edit the match *****/
Ico_PutContextualIconToEdit (ActEdiMch,NULL,
Mch_PutParamsEdit,Games);
} }
else else
Ico_PutIconRemovalNotAllowed (); Ico_PutIconRemovalNotAllowed ();
@ -1278,6 +1281,40 @@ static void Mch_RemoveMatchesMadeByUsrInCrsFromTable (long UsrCod,long CrsCod,co
UsrCod); UsrCod);
} }
/*****************************************************************************/
/************************ Edit a match (game instance) ***********************/
/*****************************************************************************/
void Mch_EditMatch (void)
{
struct Gam_Games Games;
struct Gam_Game Game;
struct Mch_Match Match;
/***** Reset games context *****/
Gam_ResetGames (&Games);
/***** Reset game and match *****/
Gam_ResetGame (&Game);
Mch_ResetMatch (&Match);
/***** Get and check parameters *****/
Mch_GetAndCheckParameters (&Games,&Game,&Match);
/***** Check if I can edit this match *****/
if (!Mch_CheckIfICanEditThisMatch (&Match))
Lay_NoPermissionExit ();
/***** Write message *****/
Ale_ShowAlert (Ale_SUCCESS,"Editando partida %s",
Match.Title);
/***** Show current game *****/
Gam_ShowOnlyOneGame (&Games,&Game,
false, // Do not list game questions
false); // Do not put form to start new match
}
/*****************************************************************************/ /*****************************************************************************/
/*********************** Params used to edit a match *************************/ /*********************** Params used to edit a match *************************/
/*****************************************************************************/ /*****************************************************************************/

View File

@ -103,6 +103,8 @@ void Mch_RemoveMatchesInCourseFromAllTables (long CrsCod);
void Mch_RemoveMatchesMadeByUsrInAllCrss (long UsrCod); void Mch_RemoveMatchesMadeByUsrInAllCrss (long UsrCod);
void Mch_RemoveMatchesMadeByUsrInCrs (long UsrCod,long CrsCod); void Mch_RemoveMatchesMadeByUsrInCrs (long UsrCod,long CrsCod);
void Mch_EditMatch (void);
void Mch_PutParamsEdit (void *Games); void Mch_PutParamsEdit (void *Games);
void Mch_GetAndCheckParameters (struct Gam_Games *Games, void Mch_GetAndCheckParameters (struct Gam_Games *Games,
struct Gam_Game *Game, struct Gam_Game *Game,

View File

@ -2696,7 +2696,7 @@ static void Msg_PutIconsListMsgs (void *Messages)
{ {
case Msg_RECEIVED: case Msg_RECEIVED:
case Msg_SENT: case Msg_SENT:
Ico_PutContextualIconToRemove (ActionReqDelAllMsg[((struct Msg_Messages *) Messages)->TypeOfMessages], Ico_PutContextualIconToRemove (ActionReqDelAllMsg[((struct Msg_Messages *) Messages)->TypeOfMessages],NULL,
Msg_PutHiddenParamsMsgsFilters,Messages); Msg_PutHiddenParamsMsgsFilters,Messages);
break; break;
default: default:
@ -3186,7 +3186,7 @@ static void Msg_ShowASentOrReceivedMessage (struct Msg_Messages *Messages,
/***** Form to delete message *****/ /***** Form to delete message *****/
HTM_BR (); HTM_BR ();
Messages->MsgCod = MsgCod; // Message to be deleted Messages->MsgCod = MsgCod; // Message to be deleted
Ico_PutContextualIconToRemove (ActionDelMsg[Messages->TypeOfMessages], Ico_PutContextualIconToRemove (ActionDelMsg[Messages->TypeOfMessages],NULL,
Msg_PutHiddenParamsOneMsg,Messages); Msg_PutHiddenParamsOneMsg,Messages);
HTM_TD_End (); HTM_TD_End ();

View File

@ -671,7 +671,7 @@ static void Not_DrawANotice (Not_Listing_t TypeNoticesListing,
if (Not_CheckIfICanEditNotices ()) if (Not_CheckIfICanEditNotices ())
{ {
/***** Put form to remove announcement *****/ /***** Put form to remove announcement *****/
Ico_PutContextualIconToRemove (ActReqRemNot, Ico_PutContextualIconToRemove (ActReqRemNot,NULL,
Not_PutParams,&NotCod); Not_PutParams,&NotCod);
/***** Put form to change the status of the notice *****/ /***** Put form to change the status of the notice *****/

View File

@ -715,7 +715,7 @@ static bool Ntf_StartFormGoToAction (Ntf_NotifyEvent_t NotifyEvent,
} }
Frm_StartForm (Action); Frm_StartForm (Action);
if (GrpCod > 0) if (GrpCod > 0)
Grp_PutParamGrpCod (GrpCod); Grp_PutParamGrpCod (&GrpCod);
Brw_PutHiddenParamFilCod (FileMetadata.FilCod); Brw_PutHiddenParamFilCod (FileMetadata.FilCod);
} }
break; break;

View File

@ -71,7 +71,7 @@ static void Plc_EditPlacesInternal (void);
static void Plc_PutIconsEditingPlaces (__attribute__((unused)) void *Args); static void Plc_PutIconsEditingPlaces (__attribute__((unused)) void *Args);
static void Plc_ListPlacesForEdition (const struct Plc_Places *Places); static void Plc_ListPlacesForEdition (const struct Plc_Places *Places);
static void Plc_PutParamPlcCod (long PlcCod); static void Plc_PutParamPlcCod (void *PlcCod);
static void Plc_RenamePlace (Cns_ShrtOrFullName_t ShrtOrFullName); static void Plc_RenamePlace (Cns_ShrtOrFullName_t ShrtOrFullName);
static bool Plc_CheckIfPlaceNameExists (const char *FieldName,const char *Name,long PlcCod); static bool Plc_CheckIfPlaceNameExists (const char *FieldName,const char *Name,long PlcCod);
@ -556,12 +556,8 @@ static void Plc_ListPlacesForEdition (const struct Plc_Places *Places)
if (Plc->NumCtrs) // Place has centres ==> deletion forbidden if (Plc->NumCtrs) // Place has centres ==> deletion forbidden
Ico_PutIconRemovalNotAllowed (); Ico_PutIconRemovalNotAllowed ();
else else
{ Ico_PutContextualIconToRemove (ActRemPlc,NULL,
Frm_StartForm (ActRemPlc); Plc_PutParamPlcCod,&Plc->PlcCod);
Plc_PutParamPlcCod (Plc->PlcCod);
Ico_PutIconRemove ();
Frm_EndForm ();
}
HTM_TD_End (); HTM_TD_End ();
/* Place code */ /* Place code */
@ -572,7 +568,7 @@ static void Plc_ListPlacesForEdition (const struct Plc_Places *Places)
/* Place short name */ /* Place short name */
HTM_TD_Begin ("class=\"CM\""); HTM_TD_Begin ("class=\"CM\"");
Frm_StartForm (ActRenPlcSho); Frm_StartForm (ActRenPlcSho);
Plc_PutParamPlcCod (Plc->PlcCod); Plc_PutParamPlcCod (&Plc->PlcCod);
HTM_INPUT_TEXT ("ShortName",Plc_MAX_CHARS_PLACE_SHRT_NAME,Plc->ShrtName, HTM_INPUT_TEXT ("ShortName",Plc_MAX_CHARS_PLACE_SHRT_NAME,Plc->ShrtName,
HTM_SUBMIT_ON_CHANGE, HTM_SUBMIT_ON_CHANGE,
"class=\"INPUT_SHORT_NAME\""); "class=\"INPUT_SHORT_NAME\"");
@ -582,7 +578,7 @@ static void Plc_ListPlacesForEdition (const struct Plc_Places *Places)
/* Place full name */ /* Place full name */
HTM_TD_Begin ("class=\"CM\""); HTM_TD_Begin ("class=\"CM\"");
Frm_StartForm (ActRenPlcFul); Frm_StartForm (ActRenPlcFul);
Plc_PutParamPlcCod (Plc->PlcCod); Plc_PutParamPlcCod (&Plc->PlcCod);
HTM_INPUT_TEXT ("FullName",Plc_MAX_CHARS_PLACE_FULL_NAME,Plc->FullName, HTM_INPUT_TEXT ("FullName",Plc_MAX_CHARS_PLACE_FULL_NAME,Plc->FullName,
HTM_SUBMIT_ON_CHANGE, HTM_SUBMIT_ON_CHANGE,
"class=\"INPUT_FULL_NAME\""); "class=\"INPUT_FULL_NAME\"");
@ -605,9 +601,10 @@ static void Plc_ListPlacesForEdition (const struct Plc_Places *Places)
/******************** Write parameter with code of place *********************/ /******************** Write parameter with code of place *********************/
/*****************************************************************************/ /*****************************************************************************/
static void Plc_PutParamPlcCod (long PlcCod) static void Plc_PutParamPlcCod (void *PlcCod)
{ {
Par_PutHiddenParamLong (NULL,"PlcCod",PlcCod); if (PlcCod)
Par_PutHiddenParamLong (NULL,"PlcCod",*((long *) PlcCod));
} }
/*****************************************************************************/ /*****************************************************************************/

View File

@ -74,7 +74,7 @@ static struct Plugin *Plg_EditingPlg = NULL; // Static variable to keep the plug
static void Plg_PutIconToEditPlugins (__attribute__((unused)) void *Args); static void Plg_PutIconToEditPlugins (__attribute__((unused)) void *Args);
static void Plg_EditPluginsInternal (void); static void Plg_EditPluginsInternal (void);
static void Plg_ListPluginsForEdition (void); static void Plg_ListPluginsForEdition (void);
static void Plg_PutParamPlgCod (long PlgCod); static void Plg_PutParamPlgCod (void *PlgCod);
static void Plg_GetListPlugins (void); static void Plg_GetListPlugins (void);
static void Plg_PutFormToCreatePlugin (void); static void Plg_PutFormToCreatePlugin (void);
static void Plg_PutHeadPlugins (void); static void Plg_PutHeadPlugins (void);
@ -402,10 +402,8 @@ static void Plg_ListPluginsForEdition (void)
/* Put icon to remove plugin */ /* Put icon to remove plugin */
HTM_TD_Begin ("class=\"BM\""); HTM_TD_Begin ("class=\"BM\"");
Frm_StartForm (ActRemPlg); Ico_PutContextualIconToRemove (ActRemPlg,NULL,
Plg_PutParamPlgCod (Plg->PlgCod); Plg_PutParamPlgCod,&Plg->PlgCod);
Ico_PutIconRemove ();
Frm_EndForm ();
HTM_TD_End (); HTM_TD_End ();
/* Plugin code */ /* Plugin code */
@ -426,7 +424,7 @@ static void Plg_ListPluginsForEdition (void)
/* Plugin name */ /* Plugin name */
HTM_TD_Begin ("class=\"CM\""); HTM_TD_Begin ("class=\"CM\"");
Frm_StartForm (ActRenPlg); Frm_StartForm (ActRenPlg);
Plg_PutParamPlgCod (Plg->PlgCod); Plg_PutParamPlgCod (&Plg->PlgCod);
HTM_INPUT_TEXT ("Name",Plg_MAX_CHARS_PLUGIN_NAME,Plg->Name, HTM_INPUT_TEXT ("Name",Plg_MAX_CHARS_PLUGIN_NAME,Plg->Name,
HTM_SUBMIT_ON_CHANGE, HTM_SUBMIT_ON_CHANGE,
"size=\"10\""); "size=\"10\"");
@ -436,7 +434,7 @@ static void Plg_ListPluginsForEdition (void)
/* Plugin description */ /* Plugin description */
HTM_TD_Begin ("class=\"CM\""); HTM_TD_Begin ("class=\"CM\"");
Frm_StartForm (ActChgPlgDes); Frm_StartForm (ActChgPlgDes);
Plg_PutParamPlgCod (Plg->PlgCod); Plg_PutParamPlgCod (&Plg->PlgCod);
HTM_INPUT_TEXT ("Description",Plg_MAX_CHARS_PLUGIN_DESCRIPTION,Plg->Description, HTM_INPUT_TEXT ("Description",Plg_MAX_CHARS_PLUGIN_DESCRIPTION,Plg->Description,
HTM_SUBMIT_ON_CHANGE, HTM_SUBMIT_ON_CHANGE,
"size=\"30\""); "size=\"30\"");
@ -446,7 +444,7 @@ static void Plg_ListPluginsForEdition (void)
/* Plugin logo */ /* Plugin logo */
HTM_TD_Begin ("class=\"CM\""); HTM_TD_Begin ("class=\"CM\"");
Frm_StartForm (ActChgPlgLog); Frm_StartForm (ActChgPlgLog);
Plg_PutParamPlgCod (Plg->PlgCod); Plg_PutParamPlgCod (&Plg->PlgCod);
HTM_INPUT_TEXT ("Logo",Plg_MAX_CHARS_PLUGIN_LOGO,Plg->Logo, HTM_INPUT_TEXT ("Logo",Plg_MAX_CHARS_PLUGIN_LOGO,Plg->Logo,
HTM_SUBMIT_ON_CHANGE, HTM_SUBMIT_ON_CHANGE,
"size=\"4\""); "size=\"4\"");
@ -456,7 +454,7 @@ static void Plg_ListPluginsForEdition (void)
/* Plugin application key */ /* Plugin application key */
HTM_TD_Begin ("class=\"CM\""); HTM_TD_Begin ("class=\"CM\"");
Frm_StartForm (ActChgPlgAppKey); Frm_StartForm (ActChgPlgAppKey);
Plg_PutParamPlgCod (Plg->PlgCod); Plg_PutParamPlgCod (&Plg->PlgCod);
HTM_INPUT_TEXT ("AppKey",Plg_MAX_CHARS_PLUGIN_APP_KEY,Plg->AppKey, HTM_INPUT_TEXT ("AppKey",Plg_MAX_CHARS_PLUGIN_APP_KEY,Plg->AppKey,
HTM_SUBMIT_ON_CHANGE, HTM_SUBMIT_ON_CHANGE,
"size=\"16\""); "size=\"16\"");
@ -466,7 +464,7 @@ static void Plg_ListPluginsForEdition (void)
/* Plugin URL */ /* Plugin URL */
HTM_TD_Begin ("class=\"CM\""); HTM_TD_Begin ("class=\"CM\"");
Frm_StartForm (ActChgPlgURL); Frm_StartForm (ActChgPlgURL);
Plg_PutParamPlgCod (Plg->PlgCod); Plg_PutParamPlgCod (&Plg->PlgCod);
HTM_INPUT_URL ("URL",Plg->URL,HTM_SUBMIT_ON_CHANGE, HTM_INPUT_URL ("URL",Plg->URL,HTM_SUBMIT_ON_CHANGE,
"size=\"15\""); "size=\"15\"");
Frm_EndForm (); Frm_EndForm ();
@ -475,7 +473,7 @@ static void Plg_ListPluginsForEdition (void)
/* Plugin IP */ /* Plugin IP */
HTM_TD_Begin ("class=\"CM\""); HTM_TD_Begin ("class=\"CM\"");
Frm_StartForm (ActChgPlgIP); Frm_StartForm (ActChgPlgIP);
Plg_PutParamPlgCod (Plg->PlgCod); Plg_PutParamPlgCod (&Plg->PlgCod);
HTM_INPUT_TEXT ("IP",Cns_MAX_CHARS_IP,Plg->IP,HTM_SUBMIT_ON_CHANGE, HTM_INPUT_TEXT ("IP",Cns_MAX_CHARS_IP,Plg->IP,HTM_SUBMIT_ON_CHANGE,
"size=\"10\""); "size=\"10\"");
Frm_EndForm (); Frm_EndForm ();
@ -493,9 +491,10 @@ static void Plg_ListPluginsForEdition (void)
/******************* Write parameter with code of plugin *********************/ /******************* Write parameter with code of plugin *********************/
/*****************************************************************************/ /*****************************************************************************/
static void Plg_PutParamPlgCod (long PlgCod) static void Plg_PutParamPlgCod (void *PlgCod)
{ {
Par_PutHiddenParamLong (NULL,"PlgCod",PlgCod); if (PlgCod)
Par_PutHiddenParamLong (NULL,"PlgCod",*((long *) PlgCod));
} }
/*****************************************************************************/ /*****************************************************************************/

View File

@ -787,7 +787,7 @@ static void Prg_PutFormsToRemEditOneItem (unsigned NumItem,
case Rol_TCH: case Rol_TCH:
case Rol_SYS_ADM: case Rol_SYS_ADM:
/***** Put form to remove program item *****/ /***** Put form to remove program item *****/
Ico_PutContextualIconToRemove (ActReqRemPrgItm, Ico_PutContextualIconToRemove (ActReqRemPrgItm,NULL,
Prg_PutParams,&Item->Hierarchy.ItmCod); Prg_PutParams,&Item->Hierarchy.ItmCod);
/***** Put form to hide/show program item *****/ /***** Put form to hide/show program item *****/

View File

@ -2752,7 +2752,7 @@ static void Prj_PutFormsToRemEditOnePrj (struct Prj_Projects *Projects,
if (Prj_CheckIfICanEditProject (Prj)) if (Prj_CheckIfICanEditProject (Prj))
{ {
/***** Put form to remove project *****/ /***** Put form to remove project *****/
Ico_PutContextualIconToRemove (ActReqRemPrj, Ico_PutContextualIconToRemove (ActReqRemPrj,NULL,
Prj_PutCurrentParams,Projects); Prj_PutCurrentParams,Projects);
/***** Put form to hide/show project *****/ /***** Put form to hide/show project *****/

View File

@ -143,7 +143,7 @@ static void Roo_PutSelectorBuilding (long BldCod,
HTM_SubmitOnChange_t SubmitOnChange); HTM_SubmitOnChange_t SubmitOnChange);
static void Roo_PutSelectorType (Roo_RoomType_t RoomType, static void Roo_PutSelectorType (Roo_RoomType_t RoomType,
HTM_SubmitOnChange_t SubmitOnChange); HTM_SubmitOnChange_t SubmitOnChange);
static void Roo_PutParamRooCod (long RooCod); static void Roo_PutParamRooCod (void *RooCod);
static int Roo_GetParamFloor (void); static int Roo_GetParamFloor (void);
static Roo_RoomType_t Roo_GetParamType (void); static Roo_RoomType_t Roo_GetParamType (void);
@ -797,10 +797,8 @@ static void Roo_ListRoomsForEdition (const struct Bld_Buildings *Buildings,
/* Put icon to remove room */ /* Put icon to remove room */
HTM_TD_Begin ("class=\"BT\""); HTM_TD_Begin ("class=\"BT\"");
Frm_StartForm (ActRemRoo); Ico_PutContextualIconToRemove (ActRemRoo,NULL,
Roo_PutParamRooCod (Room->RooCod); Roo_PutParamRooCod,&Room->RooCod);
Ico_PutIconRemove ();
Frm_EndForm ();
HTM_TD_End (); HTM_TD_End ();
/* Room code */ /* Room code */
@ -813,7 +811,7 @@ static void Roo_ListRoomsForEdition (const struct Bld_Buildings *Buildings,
/* Building */ /* Building */
HTM_TD_Begin ("class=\"CT\""); HTM_TD_Begin ("class=\"CT\"");
Frm_StartFormAnchor (ActChgRooBld,Anchor); Frm_StartFormAnchor (ActChgRooBld,Anchor);
Roo_PutParamRooCod (Room->RooCod); Roo_PutParamRooCod (&Room->RooCod);
Roo_PutSelectorBuilding (Room->BldCod,Buildings, Roo_PutSelectorBuilding (Room->BldCod,Buildings,
HTM_SUBMIT_ON_CHANGE); HTM_SUBMIT_ON_CHANGE);
Frm_EndForm (); Frm_EndForm ();
@ -822,7 +820,7 @@ static void Roo_ListRoomsForEdition (const struct Bld_Buildings *Buildings,
/* Floor */ /* Floor */
HTM_TD_Begin ("class=\"LT\""); HTM_TD_Begin ("class=\"LT\"");
Frm_StartFormAnchor (ActChgRooFlo,Anchor); Frm_StartFormAnchor (ActChgRooFlo,Anchor);
Roo_PutParamRooCod (Room->RooCod); Roo_PutParamRooCod (&Room->RooCod);
HTM_INPUT_LONG ("Floor",(long) INT_MIN,(long) INT_MAX,(long) Room->Floor, HTM_INPUT_LONG ("Floor",(long) INT_MIN,(long) INT_MAX,(long) Room->Floor,
HTM_SUBMIT_ON_CHANGE,false, HTM_SUBMIT_ON_CHANGE,false,
"class=\"INPUT_LONG\""); "class=\"INPUT_LONG\"");
@ -832,7 +830,7 @@ static void Roo_ListRoomsForEdition (const struct Bld_Buildings *Buildings,
/* Room type */ /* Room type */
HTM_TD_Begin ("class=\"CT\""); HTM_TD_Begin ("class=\"CT\"");
Frm_StartFormAnchor (ActChgRooTyp,Anchor); Frm_StartFormAnchor (ActChgRooTyp,Anchor);
Roo_PutParamRooCod (Room->RooCod); Roo_PutParamRooCod (&Room->RooCod);
Roo_PutSelectorType (Room->Type, Roo_PutSelectorType (Room->Type,
HTM_SUBMIT_ON_CHANGE); HTM_SUBMIT_ON_CHANGE);
Frm_EndForm (); Frm_EndForm ();
@ -841,7 +839,7 @@ static void Roo_ListRoomsForEdition (const struct Bld_Buildings *Buildings,
/* Room short name */ /* Room short name */
HTM_TD_Begin ("class=\"LT\""); HTM_TD_Begin ("class=\"LT\"");
Frm_StartFormAnchor (ActRenRooSho,Anchor); Frm_StartFormAnchor (ActRenRooSho,Anchor);
Roo_PutParamRooCod (Room->RooCod); Roo_PutParamRooCod (&Room->RooCod);
HTM_INPUT_TEXT ("ShortName",Roo_MAX_CHARS_SHRT_NAME,Room->ShrtName, HTM_INPUT_TEXT ("ShortName",Roo_MAX_CHARS_SHRT_NAME,Room->ShrtName,
HTM_SUBMIT_ON_CHANGE, HTM_SUBMIT_ON_CHANGE,
"size=\"10\" class=\"INPUT_SHORT_NAME\""); "size=\"10\" class=\"INPUT_SHORT_NAME\"");
@ -851,7 +849,7 @@ static void Roo_ListRoomsForEdition (const struct Bld_Buildings *Buildings,
/* Room full name */ /* Room full name */
HTM_TD_Begin ("class=\"LT\""); HTM_TD_Begin ("class=\"LT\"");
Frm_StartFormAnchor (ActRenRooFul,Anchor); Frm_StartFormAnchor (ActRenRooFul,Anchor);
Roo_PutParamRooCod (Room->RooCod); Roo_PutParamRooCod (&Room->RooCod);
HTM_INPUT_TEXT ("FullName",Roo_MAX_CHARS_FULL_NAME,Room->FullName, HTM_INPUT_TEXT ("FullName",Roo_MAX_CHARS_FULL_NAME,Room->FullName,
HTM_SUBMIT_ON_CHANGE, HTM_SUBMIT_ON_CHANGE,
"size=\"20\" class=\"INPUT_FULL_NAME\""); "size=\"20\" class=\"INPUT_FULL_NAME\"");
@ -861,7 +859,7 @@ static void Roo_ListRoomsForEdition (const struct Bld_Buildings *Buildings,
/* Seating capacity */ /* Seating capacity */
HTM_TD_Begin ("class=\"LT\""); HTM_TD_Begin ("class=\"LT\"");
Frm_StartFormAnchor (ActChgRooMaxUsr,Anchor); Frm_StartFormAnchor (ActChgRooMaxUsr,Anchor);
Roo_PutParamRooCod (Room->RooCod); Roo_PutParamRooCod (&Room->RooCod);
Roo_WriteCapacity (StrCapacity,Room->Capacity); Roo_WriteCapacity (StrCapacity,Room->Capacity);
HTM_INPUT_TEXT ("Capacity",Cns_MAX_DECIMAL_DIGITS_UINT,StrCapacity, HTM_INPUT_TEXT ("Capacity",Cns_MAX_DECIMAL_DIGITS_UINT,StrCapacity,
HTM_SUBMIT_ON_CHANGE, HTM_SUBMIT_ON_CHANGE,
@ -949,9 +947,10 @@ static void Roo_PutSelectorType (Roo_RoomType_t RoomType,
/********************* Write parameter with code of room *********************/ /********************* Write parameter with code of room *********************/
/*****************************************************************************/ /*****************************************************************************/
static void Roo_PutParamRooCod (long RooCod) static void Roo_PutParamRooCod (void *RooCod)
{ {
Par_PutHiddenParamLong (NULL,"RooCod",RooCod); if (RooCod)
Par_PutHiddenParamLong (NULL,"RooCod",*((long *) RooCod));
} }
/*****************************************************************************/ /*****************************************************************************/

View File

@ -883,7 +883,7 @@ static void Svy_PutFormsToRemEditOneSvy (struct Svy_Surveys *Surveys,
Surveys->SvyCod = Svy->SvyCod; // Used as parameters in contextual links Surveys->SvyCod = Svy->SvyCod; // Used as parameters in contextual links
/***** Put form to remove survey *****/ /***** Put form to remove survey *****/
Ico_PutContextualIconToRemove (ActReqRemSvy, Ico_PutContextualIconToRemove (ActReqRemSvy,NULL,
Svy_PutParams,Surveys); Svy_PutParams,Surveys);
/***** Put form to reset survey *****/ /***** Put form to reset survey *****/
@ -3613,7 +3613,7 @@ static void Svy_DrawBarNumUsrs (unsigned NumUsrs,unsigned MaxUsrs)
static void Svy_PutIconToRemoveOneQst (void *Surveys) static void Svy_PutIconToRemoveOneQst (void *Surveys)
{ {
Ico_PutContextualIconToRemove (ActReqRemSvyQst, Ico_PutContextualIconToRemove (ActReqRemSvyQst,NULL,
Svy_PutParamsRemoveOneQst,Surveys); Svy_PutParamsRemoveOneQst,Surveys);
} }

View File

@ -638,13 +638,9 @@ static void Syl_ShowRowSyllabus (struct Syl_Syllabus *Syllabus,unsigned NumItem,
if (Syl_LstItemsSyllabus.Lst[NumItem].HasChildren) if (Syl_LstItemsSyllabus.Lst[NumItem].HasChildren)
Ico_PutIconRemovalNotAllowed (); Ico_PutIconRemovalNotAllowed ();
else else
{ Ico_PutContextualIconToRemove (Gbl.Crs.Info.Type == Inf_LECTURES ? ActDelItmSylLec :
Frm_StartForm (Gbl.Crs.Info.Type == Inf_LECTURES ? ActDelItmSylLec : ActDelItmSylPra,NULL,
ActDelItmSylPra); Syl_PutParamNumItem,&Syllabus->ParamNumItem);
Syl_PutParamNumItem (&Syllabus->ParamNumItem);
Ico_PutIconRemove ();
Frm_EndForm ();
}
HTM_TD_End (); HTM_TD_End ();
/***** Icon to get up an item *****/ /***** Icon to get up an item *****/

View File

@ -1253,7 +1253,7 @@ static void Tst_PutIconsEditBankQsts (void *Test)
case ActReqRemOneTstQst: // Request removal of a question case ActReqRemOneTstQst: // Request removal of a question
case ActRemOneTstQst: // Remove a question case ActRemOneTstQst: // Remove a question
case ActChgShfTstQst: // Change shuffle of a question case ActChgShfTstQst: // Change shuffle of a question
Ico_PutContextualIconToRemove (ActReqRemSevTstQst, Ico_PutContextualIconToRemove (ActReqRemSevTstQst,NULL,
Tst_PutParamsRemoveSelectedQsts,Test); Tst_PutParamsRemoveSelectedQsts,Test);
break; break;
default: default:
@ -4822,7 +4822,7 @@ void Tst_RemoveSelectedQsts (void)
static void Tst_PutIconToRemoveOneQst (void *QstCod) static void Tst_PutIconToRemoveOneQst (void *QstCod)
{ {
Ico_PutContextualIconToRemove (ActReqRemOneTstQst, Ico_PutContextualIconToRemove (ActReqRemOneTstQst,NULL,
Tst_PutParamsRemoveOnlyThisQst,QstCod); Tst_PutParamsRemoveOnlyThisQst,QstCod);
} }