mirror of https://github.com/acanas/swad-core.git
Version20.4
This commit is contained in:
parent
4ff49c5aea
commit
f8d8833d35
|
@ -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},
|
||||
[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},
|
||||
[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},
|
||||
|
@ -3728,6 +3729,7 @@ Act_Action_t Act_FromActCodToAction[1 + Act_MAX_ACTION_COD] = // Do not reuse un
|
|||
ActInvSetQst, // #1910
|
||||
ActChgRooMAC, // #1911
|
||||
ActLstOneGam, // #1912
|
||||
ActEdiMch, // #1913
|
||||
};
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
117
swad_action.h
117
swad_action.h
|
@ -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
|
||||
|
||||
#define Act_MAX_ACTION_COD 1912
|
||||
#define Act_MAX_ACTION_COD 1913
|
||||
|
||||
#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 ActReqRemMch (ActChgCrsTT1stDay + 179)
|
||||
#define ActRemMch (ActChgCrsTT1stDay + 180)
|
||||
#define ActReqNewMch (ActChgCrsTT1stDay + 181)
|
||||
#define ActNewMch (ActChgCrsTT1stDay + 182)
|
||||
#define ActResMch (ActChgCrsTT1stDay + 183)
|
||||
#define ActBckMch (ActChgCrsTT1stDay + 184)
|
||||
#define ActPlyPauMch (ActChgCrsTT1stDay + 185)
|
||||
#define ActFwdMch (ActChgCrsTT1stDay + 186)
|
||||
#define ActChgNumColMch (ActChgCrsTT1stDay + 187)
|
||||
#define ActChgVisResMchQst (ActChgCrsTT1stDay + 188)
|
||||
#define ActMchCntDwn (ActChgCrsTT1stDay + 189)
|
||||
#define ActRefMchTch (ActChgCrsTT1stDay + 190)
|
||||
#define ActEdiMch (ActChgCrsTT1stDay + 181)
|
||||
#define ActReqNewMch (ActChgCrsTT1stDay + 182)
|
||||
#define ActNewMch (ActChgCrsTT1stDay + 183)
|
||||
#define ActResMch (ActChgCrsTT1stDay + 184)
|
||||
#define ActBckMch (ActChgCrsTT1stDay + 185)
|
||||
#define ActPlyPauMch (ActChgCrsTT1stDay + 186)
|
||||
#define ActFwdMch (ActChgCrsTT1stDay + 187)
|
||||
#define ActChgNumColMch (ActChgCrsTT1stDay + 188)
|
||||
#define ActChgVisResMchQst (ActChgCrsTT1stDay + 189)
|
||||
#define ActMchCntDwn (ActChgCrsTT1stDay + 190)
|
||||
#define ActRefMchTch (ActChgCrsTT1stDay + 191)
|
||||
|
||||
#define ActJoiMch (ActChgCrsTT1stDay + 191)
|
||||
#define ActSeeMchAnsQstStd (ActChgCrsTT1stDay + 192)
|
||||
#define ActRemMchAnsQstStd (ActChgCrsTT1stDay + 193)
|
||||
#define ActAnsMchQstStd (ActChgCrsTT1stDay + 194)
|
||||
#define ActRefMchStd (ActChgCrsTT1stDay + 195)
|
||||
#define ActJoiMch (ActChgCrsTT1stDay + 192)
|
||||
#define ActSeeMchAnsQstStd (ActChgCrsTT1stDay + 193)
|
||||
#define ActRemMchAnsQstStd (ActChgCrsTT1stDay + 194)
|
||||
#define ActAnsMchQstStd (ActChgCrsTT1stDay + 195)
|
||||
#define ActRefMchStd (ActChgCrsTT1stDay + 196)
|
||||
|
||||
#define ActSeeMyMchResCrs (ActChgCrsTT1stDay + 196)
|
||||
#define ActSeeMyMchResGam (ActChgCrsTT1stDay + 197)
|
||||
#define ActSeeMyMchResMch (ActChgCrsTT1stDay + 198)
|
||||
#define ActSeeOneMchResMe (ActChgCrsTT1stDay + 199)
|
||||
#define ActSeeMyMchResCrs (ActChgCrsTT1stDay + 197)
|
||||
#define ActSeeMyMchResGam (ActChgCrsTT1stDay + 198)
|
||||
#define ActSeeMyMchResMch (ActChgCrsTT1stDay + 199)
|
||||
#define ActSeeOneMchResMe (ActChgCrsTT1stDay + 200)
|
||||
|
||||
#define ActReqSeeUsrMchRes (ActChgCrsTT1stDay + 200)
|
||||
#define ActSeeUsrMchResCrs (ActChgCrsTT1stDay + 201)
|
||||
#define ActSeeUsrMchResGam (ActChgCrsTT1stDay + 202)
|
||||
#define ActSeeUsrMchResMch (ActChgCrsTT1stDay + 203)
|
||||
#define ActSeeOneMchResOth (ActChgCrsTT1stDay + 204)
|
||||
#define ActReqSeeUsrMchRes (ActChgCrsTT1stDay + 201)
|
||||
#define ActSeeUsrMchResCrs (ActChgCrsTT1stDay + 202)
|
||||
#define ActSeeUsrMchResGam (ActChgCrsTT1stDay + 203)
|
||||
#define ActSeeUsrMchResMch (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 ActEdiOneGam (ActChgCrsTT1stDay + 208)
|
||||
#define ActNewGam (ActChgCrsTT1stDay + 209)
|
||||
#define ActChgGam (ActChgCrsTT1stDay + 210)
|
||||
#define ActReqRemGam (ActChgCrsTT1stDay + 211)
|
||||
#define ActRemGam (ActChgCrsTT1stDay + 212)
|
||||
#define ActHidGam (ActChgCrsTT1stDay + 213)
|
||||
#define ActShoGam (ActChgCrsTT1stDay + 214)
|
||||
#define ActAddOneGamQst (ActChgCrsTT1stDay + 215)
|
||||
#define ActGamLstTstQst (ActChgCrsTT1stDay + 216)
|
||||
#define ActAddTstQstToGam (ActChgCrsTT1stDay + 217)
|
||||
#define ActReqRemGamQst (ActChgCrsTT1stDay + 218)
|
||||
#define ActRemGamQst (ActChgCrsTT1stDay + 219)
|
||||
#define ActUp_GamQst (ActChgCrsTT1stDay + 220)
|
||||
#define ActDwnGamQst (ActChgCrsTT1stDay + 221)
|
||||
#define ActFrmNewGam (ActChgCrsTT1stDay + 208)
|
||||
#define ActEdiOneGam (ActChgCrsTT1stDay + 209)
|
||||
#define ActNewGam (ActChgCrsTT1stDay + 210)
|
||||
#define ActChgGam (ActChgCrsTT1stDay + 211)
|
||||
#define ActReqRemGam (ActChgCrsTT1stDay + 212)
|
||||
#define ActRemGam (ActChgCrsTT1stDay + 213)
|
||||
#define ActHidGam (ActChgCrsTT1stDay + 214)
|
||||
#define ActShoGam (ActChgCrsTT1stDay + 215)
|
||||
#define ActAddOneGamQst (ActChgCrsTT1stDay + 216)
|
||||
#define ActGamLstTstQst (ActChgCrsTT1stDay + 217)
|
||||
#define ActAddTstQstToGam (ActChgCrsTT1stDay + 218)
|
||||
#define ActReqRemGamQst (ActChgCrsTT1stDay + 219)
|
||||
#define ActRemGamQst (ActChgCrsTT1stDay + 220)
|
||||
#define ActUp_GamQst (ActChgCrsTT1stDay + 221)
|
||||
#define ActDwnGamQst (ActChgCrsTT1stDay + 222)
|
||||
|
||||
#define ActSeeSvy (ActChgCrsTT1stDay + 222)
|
||||
#define ActAnsSvy (ActChgCrsTT1stDay + 223)
|
||||
#define ActFrmNewSvy (ActChgCrsTT1stDay + 224)
|
||||
#define ActEdiOneSvy (ActChgCrsTT1stDay + 225)
|
||||
#define ActNewSvy (ActChgCrsTT1stDay + 226)
|
||||
#define ActChgSvy (ActChgCrsTT1stDay + 227)
|
||||
#define ActReqRemSvy (ActChgCrsTT1stDay + 228)
|
||||
#define ActRemSvy (ActChgCrsTT1stDay + 229)
|
||||
#define ActReqRstSvy (ActChgCrsTT1stDay + 230)
|
||||
#define ActRstSvy (ActChgCrsTT1stDay + 231)
|
||||
#define ActHidSvy (ActChgCrsTT1stDay + 232)
|
||||
#define ActShoSvy (ActChgCrsTT1stDay + 233)
|
||||
#define ActEdiOneSvyQst (ActChgCrsTT1stDay + 234)
|
||||
#define ActRcvSvyQst (ActChgCrsTT1stDay + 235)
|
||||
#define ActReqRemSvyQst (ActChgCrsTT1stDay + 236)
|
||||
#define ActRemSvyQst (ActChgCrsTT1stDay + 237)
|
||||
#define ActSeeSvy (ActChgCrsTT1stDay + 223)
|
||||
#define ActAnsSvy (ActChgCrsTT1stDay + 224)
|
||||
#define ActFrmNewSvy (ActChgCrsTT1stDay + 225)
|
||||
#define ActEdiOneSvy (ActChgCrsTT1stDay + 226)
|
||||
#define ActNewSvy (ActChgCrsTT1stDay + 227)
|
||||
#define ActChgSvy (ActChgCrsTT1stDay + 228)
|
||||
#define ActReqRemSvy (ActChgCrsTT1stDay + 229)
|
||||
#define ActRemSvy (ActChgCrsTT1stDay + 230)
|
||||
#define ActReqRstSvy (ActChgCrsTT1stDay + 231)
|
||||
#define ActRstSvy (ActChgCrsTT1stDay + 232)
|
||||
#define ActHidSvy (ActChgCrsTT1stDay + 233)
|
||||
#define ActShoSvy (ActChgCrsTT1stDay + 234)
|
||||
#define ActEdiOneSvyQst (ActChgCrsTT1stDay + 235)
|
||||
#define ActRcvSvyQst (ActChgCrsTT1stDay + 236)
|
||||
#define ActReqRemSvyQst (ActChgCrsTT1stDay + 237)
|
||||
#define ActRemSvyQst (ActChgCrsTT1stDay + 238)
|
||||
|
||||
/*****************************************************************************/
|
||||
/******************************** Files tab **********************************/
|
||||
|
|
|
@ -907,7 +907,7 @@ static void Agd_PutFormsToRemEditOneEvent (struct Agd_Agenda *Agenda,
|
|||
Agenda->AgdCodToEdit = AgdEvent->AgdCod; // Used as parameter in contextual links
|
||||
|
||||
/***** Put form to remove event *****/
|
||||
Ico_PutContextualIconToRemove (ActReqRemEvtMyAgd,
|
||||
Ico_PutContextualIconToRemove (ActReqRemEvtMyAgd,NULL,
|
||||
Agd_PutCurrentParamsMyAgenda,Agenda);
|
||||
|
||||
/***** Put form to hide/show event *****/
|
||||
|
|
|
@ -307,7 +307,7 @@ static void Ann_DrawAnAnnouncement (long AnnCod,Ann_Status_t Status,
|
|||
if (ICanEdit)
|
||||
{
|
||||
/***** Put form to remove announcement *****/
|
||||
Ico_PutContextualIconToRemove (ActRemAnn,
|
||||
Ico_PutContextualIconToRemove (ActRemAnn,NULL,
|
||||
Ann_PutParams,&AnnCod);
|
||||
|
||||
/***** Put form to change the status of the announcement *****/
|
||||
|
|
|
@ -610,7 +610,7 @@ static void Asg_PutFormsToRemEditOneAsg (const struct Asg_Assignment *Asg,
|
|||
case Rol_TCH:
|
||||
case Rol_SYS_ADM:
|
||||
/***** Put form to remove assignment *****/
|
||||
Ico_PutContextualIconToRemove (ActReqRemAsg,
|
||||
Ico_PutContextualIconToRemove (ActReqRemAsg,NULL,
|
||||
Asg_PutParams,&Assignments);
|
||||
|
||||
/***** Put form to hide/show assignment *****/
|
||||
|
|
|
@ -605,7 +605,7 @@ static void Att_PutFormsToRemEditOneAttEvent (struct Att_Events *Events,
|
|||
Events->AttCod = Event->AttCod;
|
||||
|
||||
/***** Put form to remove attendance event *****/
|
||||
Ico_PutContextualIconToRemove (ActReqRemAtt,
|
||||
Ico_PutContextualIconToRemove (ActReqRemAtt,NULL,
|
||||
Att_PutParams,Events);
|
||||
|
||||
/***** Put form to hide/show attendance event *****/
|
||||
|
|
|
@ -467,7 +467,7 @@ static void Ban_ListBannersForEdition (struct Ban_Banners *Banners)
|
|||
HTM_TR_Begin (NULL);
|
||||
|
||||
HTM_TD_Begin ("class=\"BM\"");
|
||||
Ico_PutContextualIconToRemove (ActRemBan,
|
||||
Ico_PutContextualIconToRemove (ActRemBan,NULL,
|
||||
Ban_PutParamBanCodToEdit,&Banners->BanCodToEdit);
|
||||
HTM_TD_End ();
|
||||
|
||||
|
|
|
@ -69,7 +69,7 @@ static void Bld_PutIconsEditingBuildings (__attribute__((unused)) void *Args);
|
|||
static void Bld_EditBuildingsInternal (void);
|
||||
|
||||
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 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 */
|
||||
HTM_TD_Begin ("class=\"BM\"");
|
||||
Frm_StartForm (ActRemBld);
|
||||
Bld_PutParamBldCod (Building->BldCod);
|
||||
Ico_PutIconRemove ();
|
||||
Frm_EndForm ();
|
||||
Ico_PutContextualIconToRemove (ActRemBld,NULL,
|
||||
Bld_PutParamBldCod,&Building->BldCod);
|
||||
HTM_TD_End ();
|
||||
|
||||
/* Building code */
|
||||
|
@ -507,7 +505,7 @@ static void Bld_ListBuildingsForEdition (const struct Bld_Buildings *Buildings)
|
|||
/* Building short name */
|
||||
HTM_TD_Begin ("class=\"LM\"");
|
||||
Frm_StartFormAnchor (ActRenBldSho,Anchor);
|
||||
Bld_PutParamBldCod (Building->BldCod);
|
||||
Bld_PutParamBldCod (&Building->BldCod);
|
||||
HTM_INPUT_TEXT ("ShortName",Bld_MAX_CHARS_SHRT_NAME,Building->ShrtName,
|
||||
HTM_SUBMIT_ON_CHANGE,
|
||||
"size=\"10\" class=\"INPUT_SHORT_NAME\"");
|
||||
|
@ -517,7 +515,7 @@ static void Bld_ListBuildingsForEdition (const struct Bld_Buildings *Buildings)
|
|||
/* Building full name */
|
||||
HTM_TD_Begin ("class=\"LM\"");
|
||||
Frm_StartFormAnchor (ActRenBldFul,Anchor);
|
||||
Bld_PutParamBldCod (Building->BldCod);
|
||||
Bld_PutParamBldCod (&Building->BldCod);
|
||||
HTM_INPUT_TEXT ("FullName",Bld_MAX_CHARS_FULL_NAME,Building->FullName,
|
||||
HTM_SUBMIT_ON_CHANGE,
|
||||
"size=\"20\" class=\"INPUT_FULL_NAME\"");
|
||||
|
@ -527,7 +525,7 @@ static void Bld_ListBuildingsForEdition (const struct Bld_Buildings *Buildings)
|
|||
/* Building location */
|
||||
HTM_TD_Begin ("class=\"LM\"");
|
||||
Frm_StartFormAnchor (ActRenBldLoc,Anchor);
|
||||
Bld_PutParamBldCod (Building->BldCod);
|
||||
Bld_PutParamBldCod (&Building->BldCod);
|
||||
HTM_INPUT_TEXT ("Location",Bld_MAX_CHARS_LOCATION,Building->Location,
|
||||
HTM_SUBMIT_ON_CHANGE,
|
||||
"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 *******************/
|
||||
/*****************************************************************************/
|
||||
|
||||
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));
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
|
@ -85,7 +85,7 @@ static bool Ctr_CheckIfICanEditACentre (struct Centre *Ctr);
|
|||
static Ctr_StatusTxt_t Ctr_GetStatusTxtFromStatusBits (Ctr_Status_t Status);
|
||||
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);
|
||||
|
||||
|
@ -979,12 +979,8 @@ static void Ctr_ListCentresForEdition (const struct Plc_Places *Places)
|
|||
NumUsrsInCrssOfCtr) // Centre has users
|
||||
Ico_PutIconRemovalNotAllowed ();
|
||||
else // I can remove centre
|
||||
{
|
||||
Frm_StartForm (ActRemCtr);
|
||||
Ctr_PutParamOtherCtrCod (Ctr->CtrCod);
|
||||
Ico_PutIconRemove ();
|
||||
Frm_EndForm ();
|
||||
}
|
||||
Ico_PutContextualIconToRemove (ActRemCtr,NULL,
|
||||
Ctr_PutParamOtherCtrCod,&Ctr->CtrCod);
|
||||
HTM_TD_End ();
|
||||
|
||||
/* Centre code */
|
||||
|
@ -1002,7 +998,7 @@ static void Ctr_ListCentresForEdition (const struct Plc_Places *Places)
|
|||
if (ICanEdit)
|
||||
{
|
||||
Frm_StartForm (ActChgCtrPlc);
|
||||
Ctr_PutParamOtherCtrCod (Ctr->CtrCod);
|
||||
Ctr_PutParamOtherCtrCod (&Ctr->CtrCod);
|
||||
HTM_SELECT_Begin (HTM_SUBMIT_ON_CHANGE,
|
||||
"name=\"PlcCod\" class=\"PLC_SEL\"");
|
||||
HTM_OPTION (HTM_Type_STRING,"0",
|
||||
|
@ -1030,7 +1026,7 @@ static void Ctr_ListCentresForEdition (const struct Plc_Places *Places)
|
|||
if (ICanEdit)
|
||||
{
|
||||
Frm_StartForm (ActRenCtrSho);
|
||||
Ctr_PutParamOtherCtrCod (Ctr->CtrCod);
|
||||
Ctr_PutParamOtherCtrCod (&Ctr->CtrCod);
|
||||
HTM_INPUT_TEXT ("ShortName",Hie_MAX_CHARS_SHRT_NAME,Ctr->ShrtName,
|
||||
HTM_SUBMIT_ON_CHANGE,
|
||||
"class=\"INPUT_SHORT_NAME\"");
|
||||
|
@ -1045,7 +1041,7 @@ static void Ctr_ListCentresForEdition (const struct Plc_Places *Places)
|
|||
if (ICanEdit)
|
||||
{
|
||||
Frm_StartForm (ActRenCtrFul);
|
||||
Ctr_PutParamOtherCtrCod (Ctr->CtrCod);
|
||||
Ctr_PutParamOtherCtrCod (&Ctr->CtrCod);
|
||||
HTM_INPUT_TEXT ("FullName",Hie_MAX_CHARS_FULL_NAME,Ctr->FullName,
|
||||
HTM_SUBMIT_ON_CHANGE,
|
||||
"class=\"INPUT_FULL_NAME\"");
|
||||
|
@ -1060,7 +1056,7 @@ static void Ctr_ListCentresForEdition (const struct Plc_Places *Places)
|
|||
if (ICanEdit)
|
||||
{
|
||||
Frm_StartForm (ActChgCtrWWW);
|
||||
Ctr_PutParamOtherCtrCod (Ctr->CtrCod);
|
||||
Ctr_PutParamOtherCtrCod (&Ctr->CtrCod);
|
||||
HTM_INPUT_URL ("WWW",Ctr->WWW,HTM_SUBMIT_ON_CHANGE,
|
||||
"class=\"INPUT_WWW_NARROW\" required=\"required\"");
|
||||
Frm_EndForm ();
|
||||
|
@ -1107,7 +1103,7 @@ static void Ctr_ListCentresForEdition (const struct Plc_Places *Places)
|
|||
StatusTxt == Ctr_STATUS_PENDING)
|
||||
{
|
||||
Frm_StartForm (ActChgCtrSta);
|
||||
Ctr_PutParamOtherCtrCod (Ctr->CtrCod);
|
||||
Ctr_PutParamOtherCtrCod (&Ctr->CtrCod);
|
||||
HTM_SELECT_Begin (HTM_SUBMIT_ON_CHANGE,
|
||||
"name=\"Status\" class=\"INPUT_STATUS\"");
|
||||
|
||||
|
@ -1201,9 +1197,10 @@ void Ctr_PutParamCtrCod (long CtrCod)
|
|||
/***************** 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));
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
|
@ -555,7 +555,7 @@ enscript -2 --landscape --color --file-align=2 --highlight --line-numbers -o - *
|
|||
En OpenSWAD:
|
||||
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 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.
|
||||
|
||||
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: 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)
|
||||
|
|
|
@ -79,7 +79,7 @@ static void Cty_PutIconsEditingCountries (__attribute__((unused)) void *Args);
|
|||
static void Cty_PutIconToViewCountries (void);
|
||||
|
||||
static void Cty_ListCountriesForEdition (void);
|
||||
static void Cty_PutParamOtherCtyCod (long CtyCod);
|
||||
static void Cty_PutParamOtherCtyCod (void *CtyCod);
|
||||
static long Cty_GetParamOtherCtyCod (void);
|
||||
|
||||
static bool Cty_CheckIfNumericCountryCodeExists (long CtyCod);
|
||||
|
@ -1227,12 +1227,8 @@ static void Cty_ListCountriesForEdition (void)
|
|||
// Deletion forbidden
|
||||
Ico_PutIconRemovalNotAllowed ();
|
||||
else
|
||||
{
|
||||
Frm_StartForm (ActRemCty);
|
||||
Cty_PutParamOtherCtyCod (Cty->CtyCod);
|
||||
Ico_PutIconRemove ();
|
||||
Frm_EndForm ();
|
||||
}
|
||||
Ico_PutContextualIconToRemove (ActRemCty,NULL,
|
||||
Cty_PutParamOtherCtyCod,&Cty->CtyCod);
|
||||
HTM_TD_End ();
|
||||
|
||||
/* Numerical country code (ISO 3166-1) */
|
||||
|
@ -1274,7 +1270,7 @@ static void Cty_ListCountriesForEdition (void)
|
|||
/* Name */
|
||||
HTM_TD_Begin ("class=\"LT\"");
|
||||
Frm_StartForm (ActRenCty);
|
||||
Cty_PutParamOtherCtyCod (Cty->CtyCod);
|
||||
Cty_PutParamOtherCtyCod (&Cty->CtyCod);
|
||||
Par_PutHiddenParamUnsigned (NULL,"Lan",(unsigned) Lan);
|
||||
HTM_INPUT_TEXT ("Name",Cty_MAX_CHARS_NAME,Cty->Name[Lan],
|
||||
HTM_SUBMIT_ON_CHANGE,
|
||||
|
@ -1285,7 +1281,7 @@ static void Cty_ListCountriesForEdition (void)
|
|||
/* WWW */
|
||||
HTM_TD_Begin ("class=\"LT\"");
|
||||
Frm_StartForm (ActChgCtyWWW);
|
||||
Cty_PutParamOtherCtyCod (Cty->CtyCod);
|
||||
Cty_PutParamOtherCtyCod (&Cty->CtyCod);
|
||||
Par_PutHiddenParamUnsigned (NULL,"Lan",(unsigned) Lan);
|
||||
HTM_INPUT_URL ("WWW",Cty->WWW[Lan],HTM_SUBMIT_ON_CHANGE,
|
||||
"class=\"INPUT_WWW_NARROW\" required=\"required\"");
|
||||
|
@ -1313,9 +1309,10 @@ void Cty_PutParamCtyCod (long CtyCod)
|
|||
/******************** 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));
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
|
@ -115,7 +115,7 @@ static void Crs_PutButtonToRegisterInCrs (void);
|
|||
|
||||
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 void Crs_WriteRowCrsData (unsigned NumCrs,MYSQL_ROW row,bool WriteColumnAccepted);
|
||||
|
@ -1233,12 +1233,8 @@ static void Crs_ListCoursesOfAYearForEdition (unsigned Year)
|
|||
!ICanEdit)
|
||||
Ico_PutIconRemovalNotAllowed ();
|
||||
else // Crs->NumUsrs == 0 && ICanEdit
|
||||
{
|
||||
Frm_StartForm (ActRemCrs);
|
||||
Crs_PutParamOtherCrsCod (Crs->CrsCod);
|
||||
Ico_PutIconRemove ();
|
||||
Frm_EndForm ();
|
||||
}
|
||||
Ico_PutContextualIconToRemove (ActRemCrs,NULL,
|
||||
Crs_PutParamOtherCrsCod,&Crs->CrsCod);
|
||||
HTM_TD_End ();
|
||||
|
||||
/* Course code */
|
||||
|
@ -1251,7 +1247,7 @@ static void Crs_ListCoursesOfAYearForEdition (unsigned Year)
|
|||
if (ICanEdit)
|
||||
{
|
||||
Frm_StartForm (ActChgInsCrsCod);
|
||||
Crs_PutParamOtherCrsCod (Crs->CrsCod);
|
||||
Crs_PutParamOtherCrsCod (&Crs->CrsCod);
|
||||
HTM_INPUT_TEXT ("InsCrsCod",Crs_MAX_CHARS_INSTITUTIONAL_CRS_COD,
|
||||
Crs->InstitutionalCrsCod,HTM_SUBMIT_ON_CHANGE,
|
||||
"class=\"INPUT_INS_CODE\"");
|
||||
|
@ -1266,7 +1262,7 @@ static void Crs_ListCoursesOfAYearForEdition (unsigned Year)
|
|||
if (ICanEdit)
|
||||
{
|
||||
Frm_StartForm (ActChgCrsYea);
|
||||
Crs_PutParamOtherCrsCod (Crs->CrsCod);
|
||||
Crs_PutParamOtherCrsCod (&Crs->CrsCod);
|
||||
HTM_SELECT_Begin (HTM_SUBMIT_ON_CHANGE,
|
||||
"name=\"OthCrsYear\" class=\"HIE_SEL_NARROW\"");
|
||||
for (YearAux = 0;
|
||||
|
@ -1287,7 +1283,7 @@ static void Crs_ListCoursesOfAYearForEdition (unsigned Year)
|
|||
if (ICanEdit)
|
||||
{
|
||||
Frm_StartForm (ActRenCrsSho);
|
||||
Crs_PutParamOtherCrsCod (Crs->CrsCod);
|
||||
Crs_PutParamOtherCrsCod (&Crs->CrsCod);
|
||||
HTM_INPUT_TEXT ("ShortName",Hie_MAX_CHARS_SHRT_NAME,Crs->ShrtName,
|
||||
HTM_SUBMIT_ON_CHANGE,
|
||||
"class=\"INPUT_SHORT_NAME\"");
|
||||
|
@ -1302,7 +1298,7 @@ static void Crs_ListCoursesOfAYearForEdition (unsigned Year)
|
|||
if (ICanEdit)
|
||||
{
|
||||
Frm_StartForm (ActRenCrsFul);
|
||||
Crs_PutParamOtherCrsCod (Crs->CrsCod);
|
||||
Crs_PutParamOtherCrsCod (&Crs->CrsCod);
|
||||
HTM_INPUT_TEXT ("FullName",Hie_MAX_CHARS_FULL_NAME,Crs->FullName,
|
||||
HTM_SUBMIT_ON_CHANGE,
|
||||
"class=\"INPUT_FULL_NAME\"");
|
||||
|
@ -1337,7 +1333,7 @@ static void Crs_ListCoursesOfAYearForEdition (unsigned Year)
|
|||
StatusTxt == Crs_STATUS_PENDING)
|
||||
{
|
||||
Frm_StartForm (ActChgCrsSta);
|
||||
Crs_PutParamOtherCrsCod (Crs->CrsCod);
|
||||
Crs_PutParamOtherCrsCod (&Crs->CrsCod);
|
||||
HTM_SELECT_Begin (HTM_SUBMIT_ON_CHANGE,
|
||||
"name=\"Status\" class=\"INPUT_STATUS\"");
|
||||
|
||||
|
@ -2539,9 +2535,10 @@ void Crs_PutParamCrsCod (long CrsCod)
|
|||
/******************** 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));
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
|
@ -92,7 +92,7 @@ static void Deg_EditDegreesInternal (void);
|
|||
static void Deg_PutIconsEditingDegrees (__attribute__((unused)) void *Args);
|
||||
|
||||
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);
|
||||
|
||||
|
@ -378,12 +378,8 @@ static void Deg_ListDegreesForEdition (void)
|
|||
NumUsrsInCrssOfDeg)
|
||||
Ico_PutIconRemovalNotAllowed ();
|
||||
else
|
||||
{
|
||||
Frm_StartForm (ActRemDeg);
|
||||
Deg_PutParamOtherDegCod (Deg->DegCod);
|
||||
Ico_PutIconRemove ();
|
||||
Frm_EndForm ();
|
||||
}
|
||||
Ico_PutContextualIconToRemove (ActRemDeg,NULL,
|
||||
Deg_PutParamOtherDegCod,&Deg->DegCod);
|
||||
HTM_TD_End ();
|
||||
|
||||
/* Degree code */
|
||||
|
@ -401,7 +397,7 @@ static void Deg_ListDegreesForEdition (void)
|
|||
if (ICanEdit)
|
||||
{
|
||||
Frm_StartForm (ActRenDegSho);
|
||||
Deg_PutParamOtherDegCod (Deg->DegCod);
|
||||
Deg_PutParamOtherDegCod (&Deg->DegCod);
|
||||
HTM_INPUT_TEXT ("ShortName",Hie_MAX_CHARS_SHRT_NAME,Deg->ShrtName,
|
||||
HTM_SUBMIT_ON_CHANGE,
|
||||
"class=\"INPUT_SHORT_NAME\"");
|
||||
|
@ -416,7 +412,7 @@ static void Deg_ListDegreesForEdition (void)
|
|||
if (ICanEdit)
|
||||
{
|
||||
Frm_StartForm (ActRenDegFul);
|
||||
Deg_PutParamOtherDegCod (Deg->DegCod);
|
||||
Deg_PutParamOtherDegCod (&Deg->DegCod);
|
||||
HTM_INPUT_TEXT ("FullName",Hie_MAX_CHARS_FULL_NAME,Deg->FullName,
|
||||
HTM_SUBMIT_ON_CHANGE,
|
||||
"class=\"INPUT_FULL_NAME\"");
|
||||
|
@ -431,7 +427,7 @@ static void Deg_ListDegreesForEdition (void)
|
|||
if (ICanEdit)
|
||||
{
|
||||
Frm_StartForm (ActChgDegTyp);
|
||||
Deg_PutParamOtherDegCod (Deg->DegCod);
|
||||
Deg_PutParamOtherDegCod (&Deg->DegCod);
|
||||
HTM_SELECT_Begin (HTM_SUBMIT_ON_CHANGE,
|
||||
"name=\"OthDegTypCod\" class=\"HIE_SEL_NARROW\"");
|
||||
for (NumDegTyp = 0;
|
||||
|
@ -460,7 +456,7 @@ static void Deg_ListDegreesForEdition (void)
|
|||
if (ICanEdit)
|
||||
{
|
||||
Frm_StartForm (ActChgDegWWW);
|
||||
Deg_PutParamOtherDegCod (Deg->DegCod);
|
||||
Deg_PutParamOtherDegCod (&Deg->DegCod);
|
||||
HTM_INPUT_URL ("WWW",Deg->WWW,HTM_SUBMIT_ON_CHANGE,
|
||||
"class=\"INPUT_WWW_NARROW\" required=\"required\"");
|
||||
Frm_EndForm ();
|
||||
|
@ -502,7 +498,7 @@ static void Deg_ListDegreesForEdition (void)
|
|||
StatusTxt == Deg_STATUS_PENDING)
|
||||
{
|
||||
Frm_StartForm (ActChgDegSta);
|
||||
Deg_PutParamOtherDegCod (Deg->DegCod);
|
||||
Deg_PutParamOtherDegCod (&Deg->DegCod);
|
||||
HTM_SELECT_Begin (HTM_SUBMIT_ON_CHANGE,
|
||||
"name=\"Status\" class=\"INPUT_STATUS\"");
|
||||
StatusUnsigned = (unsigned) Deg_GetStatusBitsFromStatusTxt (Deg_STATUS_PENDING);
|
||||
|
@ -1301,9 +1297,10 @@ void Deg_PutParamDegCod (long DegCod)
|
|||
/******************** 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));
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
|
@ -91,7 +91,7 @@ static void DT_PutHeadDegreeTypesForSeeing (Act_Action_t NextAction,
|
|||
static void DT_PutHeadDegreeTypesForEdition (void);
|
||||
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 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
|
||||
Ico_PutIconRemovalNotAllowed ();
|
||||
else
|
||||
{
|
||||
Frm_StartForm (ActRemDegTyp);
|
||||
DT_PutParamOtherDegTypCod (Gbl.DegTypes.Lst[NumDegTyp].DegTypCod);
|
||||
Ico_PutIconRemove ();
|
||||
Frm_EndForm ();
|
||||
}
|
||||
Ico_PutContextualIconToRemove (ActRemDegTyp,NULL,
|
||||
DT_PutParamOtherDegTypCod,&Gbl.DegTypes.Lst[NumDegTyp].DegTypCod);
|
||||
HTM_TD_End ();
|
||||
|
||||
/* Degree type code */
|
||||
|
@ -422,7 +418,7 @@ static void DT_ListDegreeTypesForEdition (void)
|
|||
/* Name of degree type */
|
||||
HTM_TD_Begin ("class=\"LM\"");
|
||||
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,
|
||||
Gbl.DegTypes.Lst[NumDegTyp].DegTypName,
|
||||
HTM_SUBMIT_ON_CHANGE,
|
||||
|
@ -821,9 +817,10 @@ void DT_RemoveDegreeType (void)
|
|||
/***************** 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));
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
|
@ -696,7 +696,7 @@ static void Exa_PutIconsToRemEditOneExam (struct Exa_Exams *Exams,
|
|||
Exams->ExaCod = Exam->ExaCod;
|
||||
|
||||
/***** Icon to remove exam *****/
|
||||
Ico_PutContextualIconToRemove (ActReqRemExa,
|
||||
Ico_PutContextualIconToRemove (ActReqRemExa,NULL,
|
||||
Exa_PutParams,Exams);
|
||||
|
||||
/***** Icon to unhide/hide exam *****/
|
||||
|
|
|
@ -1639,7 +1639,7 @@ static void ExaAnn_PutIconsExamAnn (void *ExamAnns)
|
|||
Gbl.Usrs.Me.Role.Logged == Rol_SYS_ADM)
|
||||
{
|
||||
/***** Link to remove this exam announcement *****/
|
||||
Ico_PutContextualIconToRemove (ActReqRemExaAnn,
|
||||
Ico_PutContextualIconToRemove (ActReqRemExaAnn,NULL,
|
||||
ExaAnn_PutParamExaCodToEdit,&((struct ExaAnn_ExamAnnouncements *) ExamAnns)->ExaCod);
|
||||
|
||||
/***** Put form to hide/show exam announement *****/
|
||||
|
|
|
@ -541,10 +541,8 @@ static void ExaSes_ListOneOrMoreSessionsIcons (struct Exa_Exams *Exams,
|
|||
Exams->SesCod = Session->SesCod;
|
||||
|
||||
/***** Icon to remove the exam session *****/
|
||||
Frm_StartForm (ActReqRemExaSes);
|
||||
ExaSes_PutParamsEdit (Exams);
|
||||
Ico_PutIconRemove ();
|
||||
Frm_EndForm ();
|
||||
Ico_PutContextualIconToRemove (ActReqRemExaSes,NULL,
|
||||
ExaSes_PutParamsEdit,Exams);
|
||||
|
||||
/***** Icon to hide/unhide the exam session *****/
|
||||
if (Session->Hidden)
|
||||
|
|
|
@ -1111,12 +1111,8 @@ static void ExaSet_ListOneOrMoreSetsForEdition (struct Exa_Exams *Exams,
|
|||
|
||||
/* Put icon to remove the set */
|
||||
if (ICanEditSets)
|
||||
{
|
||||
Frm_StartForm (ActReqRemExaSet);
|
||||
ExaSet_PutParamsOneSet (Exams);
|
||||
Ico_PutIconRemove ();
|
||||
Frm_EndForm ();
|
||||
}
|
||||
Ico_PutContextualIconToRemove (ActReqRemExaSet,NULL,
|
||||
ExaSet_PutParamsOneSet,Exams);
|
||||
else
|
||||
Ico_PutIconRemovalNotAllowed ();
|
||||
|
||||
|
@ -1339,12 +1335,8 @@ static void ExaSet_ListOneOrMoreQuestionsForEdition (struct Exa_Exams *Exams,
|
|||
|
||||
/* Put icon to remove the question */
|
||||
if (ICanEditQuestions)
|
||||
{
|
||||
Frm_StartForm (ActReqRemSetQst);
|
||||
ExaSet_PutParamsOneQst (Exams);
|
||||
Ico_PutIconRemove ();
|
||||
Frm_EndForm ();
|
||||
}
|
||||
Ico_PutContextualIconToRemove (ActReqRemSetQst,NULL,
|
||||
ExaSet_PutParamsOneQst,Exams);
|
||||
else
|
||||
Ico_PutIconRemovalNotAllowed ();
|
||||
|
||||
|
|
|
@ -2332,7 +2332,7 @@ static void Brw_PutParamsFileBrowser (const char *PathInTree,const char *FilFolL
|
|||
{
|
||||
if (Brw_GetIfGroupFileBrowser ()) // This file browser needs specify a group
|
||||
/***** 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
|
||||
/***** Project code *****/
|
||||
Prj_PutParamPrjCod (Prj_GetPrjCod ());
|
||||
|
@ -4984,7 +4984,7 @@ static void Brw_PutCheckboxFullTree (void)
|
|||
static void Brw_PutParamsFullTree (void)
|
||||
{
|
||||
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
|
||||
Prj_PutParamPrjCod (Prj_GetPrjCod ());
|
||||
else if (Brw_GetIfCrsAssigWorksFileBrowser ())
|
||||
|
@ -5795,12 +5795,12 @@ static void Brw_PutIconRemove (void)
|
|||
case Brw_IS_FILE:
|
||||
case Brw_IS_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);
|
||||
break;
|
||||
case Brw_IS_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);
|
||||
break;
|
||||
default:
|
||||
|
@ -12109,7 +12109,7 @@ static void Brw_WriteRowDocData (unsigned long *NumDocsNotHidden,MYSQL_ROW row)
|
|||
Frm_StartFormGoTo (Action);
|
||||
Crs_PutParamCrsCod (CrsCod); // Go to course
|
||||
if (GrpCod > 0)
|
||||
Grp_PutParamGrpCod (GrpCod);
|
||||
Grp_PutParamGrpCod (&GrpCod);
|
||||
}
|
||||
else if (DegCod > 0)
|
||||
{
|
||||
|
|
|
@ -748,7 +748,7 @@ static void Gam_PutFormsToRemEditOneGame (struct Gam_Games *Games,
|
|||
const char *Anchor)
|
||||
{
|
||||
/***** Put icon to remove game *****/
|
||||
Ico_PutContextualIconToRemove (ActReqRemGam,
|
||||
Ico_PutContextualIconToRemove (ActReqRemGam,NULL,
|
||||
Gam_PutParams,Games);
|
||||
|
||||
/***** Put icon to unhide/hide game *****/
|
||||
|
|
76
swad_group.c
76
swad_group.c
|
@ -151,16 +151,14 @@ static void Grp_CreateGroupType (void);
|
|||
static void Grp_CreateGroup (void);
|
||||
|
||||
static void Grp_AskConfirmRemGrpTypWithGrps (unsigned NumGrps);
|
||||
static void Grp_PutParamRemGrpTyp (void *GrpTypCod);
|
||||
static void Grp_AskConfirmRemGrp (void);
|
||||
static void Grp_PutParamRemGrp (void *GrpCod);
|
||||
static void Grp_RemoveGroupTypeCompletely (void);
|
||||
static void Grp_RemoveGroupCompletely (void);
|
||||
|
||||
static void Grp_WriteMaxStds (char Str[Cns_MAX_DECIMAL_DIGITS_UINT + 1],unsigned MaxStudents);
|
||||
static long Grp_GetParamGrpTypCod (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 ******************/
|
||||
|
@ -1321,16 +1319,14 @@ static void Grp_ListGroupTypesForEdition (void)
|
|||
|
||||
/* Put icon to remove group type */
|
||||
HTM_TD_Begin ("class=\"BM\"");
|
||||
Frm_StartFormAnchor (ActReqRemGrpTyp,Grp_GROUP_TYPES_SECTION_ID);
|
||||
Grp_PutParamGrpTypCod (Gbl.Crs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp].GrpTypCod);
|
||||
Ico_PutIconRemove ();
|
||||
Frm_EndForm ();
|
||||
Ico_PutContextualIconToRemove (ActReqRemGrpTyp,Grp_GROUP_TYPES_SECTION_ID,
|
||||
Grp_PutParamGrpTypCod,&Gbl.Crs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp].GrpTypCod);
|
||||
HTM_TD_End ();
|
||||
|
||||
/* Name of group type */
|
||||
HTM_TD_Begin ("class=\"LM\"");
|
||||
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,
|
||||
Gbl.Crs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp].GrpTypName,
|
||||
HTM_SUBMIT_ON_CHANGE,
|
||||
|
@ -1341,7 +1337,7 @@ static void Grp_ListGroupTypesForEdition (void)
|
|||
/* Is it mandatory to register in any group? */
|
||||
HTM_TD_Begin ("class=\"CM\"");
|
||||
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,
|
||||
"name=\"MandatoryEnrolment\""
|
||||
" style=\"width:150px;\"");
|
||||
|
@ -1358,7 +1354,7 @@ static void Grp_ListGroupTypesForEdition (void)
|
|||
/* Is it possible to register in multiple groups? */
|
||||
HTM_TD_Begin ("class=\"CM\"");
|
||||
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,
|
||||
"name=\"MultipleEnrolment\""
|
||||
" style=\"width:150px;\"");
|
||||
|
@ -1375,7 +1371,7 @@ static void Grp_ListGroupTypesForEdition (void)
|
|||
/* Open time */
|
||||
HTM_TD_Begin ("class=\"LM\"");
|
||||
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_TR_Begin (NULL);
|
||||
|
||||
|
@ -1518,10 +1514,8 @@ static void Grp_ListGroupsForEdition (const struct Roo_Rooms *Rooms)
|
|||
|
||||
/***** Icon to remove group *****/
|
||||
HTM_TD_Begin ("class=\"BM\"");
|
||||
Frm_StartFormAnchor (ActReqRemGrp,Grp_GROUPS_SECTION_ID);
|
||||
Grp_PutParamGrpCod (Grp->GrpCod);
|
||||
Ico_PutIconRemove ();
|
||||
Frm_EndForm ();
|
||||
Ico_PutContextualIconToRemove (ActReqRemGrp,Grp_GROUPS_SECTION_ID,
|
||||
Grp_PutParamGrpCod,&Grp->GrpCod);
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** Icon to open/close group *****/
|
||||
|
@ -1529,7 +1523,7 @@ static void Grp_ListGroupsForEdition (const struct Roo_Rooms *Rooms)
|
|||
Frm_StartFormAnchor (Grp->Open ? ActCloGrp :
|
||||
ActOpeGrp,
|
||||
Grp_GROUPS_SECTION_ID);
|
||||
Grp_PutParamGrpCod (Grp->GrpCod);
|
||||
Grp_PutParamGrpCod (&Grp->GrpCod);
|
||||
Ico_PutIconLink (Grp->Open ? "unlock.svg" :
|
||||
"lock.svg",
|
||||
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 :
|
||||
ActEnaFilZonGrp,
|
||||
Grp_GROUPS_SECTION_ID);
|
||||
Grp_PutParamGrpCod (Grp->GrpCod);
|
||||
Grp_PutParamGrpCod (&Grp->GrpCod);
|
||||
Ico_PutIconLink (Grp->FileZones ? "folder-open-green.svg" :
|
||||
"folder-red.svg",
|
||||
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 */
|
||||
HTM_TD_Begin ("class=\"CM\"");
|
||||
Frm_StartFormAnchor (ActChgGrpTyp,Grp_GROUPS_SECTION_ID);
|
||||
Grp_PutParamGrpCod (Grp->GrpCod);
|
||||
Grp_PutParamGrpCod (&Grp->GrpCod);
|
||||
HTM_SELECT_Begin (HTM_SUBMIT_ON_CHANGE,
|
||||
"name=\"GrpTypCod\" style=\"width:100px;\"");
|
||||
|
||||
|
@ -1581,7 +1575,7 @@ static void Grp_ListGroupsForEdition (const struct Roo_Rooms *Rooms)
|
|||
/***** Group name *****/
|
||||
HTM_TD_Begin ("class=\"CM\"");
|
||||
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_SUBMIT_ON_CHANGE,
|
||||
"size=\"20\"");
|
||||
|
@ -1592,7 +1586,7 @@ static void Grp_ListGroupsForEdition (const struct Roo_Rooms *Rooms)
|
|||
/* Start selector */
|
||||
HTM_TD_Begin ("class=\"CM\"");
|
||||
Frm_StartFormAnchor (ActChgGrpRoo,Grp_GROUPS_SECTION_ID);
|
||||
Grp_PutParamGrpCod (Grp->GrpCod);
|
||||
Grp_PutParamGrpCod (&Grp->GrpCod);
|
||||
HTM_SELECT_Begin (HTM_SUBMIT_ON_CHANGE,
|
||||
"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]) *****/
|
||||
HTM_TD_Begin ("class=\"CM\"");
|
||||
Frm_StartFormAnchor (ActChgMaxStdGrp,Grp_GROUPS_SECTION_ID);
|
||||
Grp_PutParamGrpCod (Grp->GrpCod);
|
||||
Grp_PutParamGrpCod (&Grp->GrpCod);
|
||||
Grp_WriteMaxStds (StrMaxStudents,Grp->MaxStudents);
|
||||
HTM_INPUT_TEXT ("MaxStudents",Cns_MAX_DECIMAL_DIGITS_UINT,StrMaxStudents,
|
||||
HTM_SUBMIT_ON_CHANGE,
|
||||
|
@ -3999,13 +3993,13 @@ static void Grp_AskConfirmRemGrpTypWithGrps (unsigned NumGrps)
|
|||
/***** Show question and button to remove type of group *****/
|
||||
if (NumGrps == 1)
|
||||
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,
|
||||
Ale_QUESTION,Txt_Do_you_really_want_to_remove_the_type_of_group_X_1_group_,
|
||||
Gbl.Crs.Grps.GrpTyp.GrpTypName);
|
||||
else
|
||||
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,
|
||||
Ale_QUESTION,Txt_Do_you_really_want_to_remove_the_type_of_group_X_Y_groups_,
|
||||
Gbl.Crs.Grps.GrpTyp.GrpTypName,NumGrps);
|
||||
|
@ -4015,16 +4009,6 @@ static void Grp_AskConfirmRemGrpTypWithGrps (unsigned NumGrps)
|
|||
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 ******************/
|
||||
/*****************************************************************************/
|
||||
|
@ -4052,19 +4036,19 @@ static void Grp_AskConfirmRemGrp (void)
|
|||
/***** Show question and button to remove group *****/
|
||||
if (NumStds == 0)
|
||||
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,
|
||||
Ale_QUESTION,Txt_Do_you_really_want_to_remove_the_group_X,
|
||||
GrpDat.GrpName);
|
||||
else if (NumStds == 1)
|
||||
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,
|
||||
Ale_QUESTION,Txt_Do_you_really_want_to_remove_the_group_X_1_student_,
|
||||
GrpDat.GrpName);
|
||||
else
|
||||
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,
|
||||
Ale_QUESTION,Txt_Do_you_really_want_to_remove_the_group_X_Y_students_,
|
||||
GrpDat.GrpName,NumStds);
|
||||
|
@ -4073,16 +4057,6 @@ static void Grp_AskConfirmRemGrp (void)
|
|||
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 ****************************/
|
||||
/*****************************************************************************/
|
||||
|
@ -4882,18 +4856,20 @@ static long Grp_GetParamGrpCod (void)
|
|||
/****************** 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 ********************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Grp_PutParamGrpCod (long GrpCod)
|
||||
void Grp_PutParamGrpCod (void *GrpCod)
|
||||
{
|
||||
Par_PutHiddenParamLong (NULL,"GrpCod",GrpCod);
|
||||
if (GrpCod)
|
||||
Par_PutHiddenParamLong (NULL,"GrpCod",*((long *) GrpCod));
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
|
@ -229,7 +229,7 @@ void Grp_ChangeMaxStdsGrp (void);
|
|||
unsigned Grp_ConvertToNumMaxStdsGrp (const char *StrMaxStudents);
|
||||
void Grp_RenameGroupType (void);
|
||||
void Grp_RenameGroup (void);
|
||||
void Grp_PutParamGrpCod (long GrpCod);
|
||||
void Grp_PutParamGrpCod (void *GrpCod);
|
||||
void Grp_GetLstCodsGrpWanted (struct ListCodGrps *LstGrpsWanted);
|
||||
void Grp_FreeListCodGrp (struct ListCodGrps *LstGrps);
|
||||
void Grp_PutParamAllGroups (void);
|
||||
|
|
|
@ -74,7 +74,7 @@ static Hld_HolidayType_t Hld_GetParamHldType (void);
|
|||
static Hld_HolidayType_t Hld_GetTypeOfHoliday (const char *UnsignedStr);
|
||||
static void Hld_ListHolidaysForEdition (const struct Hld_Holidays *Holidays,
|
||||
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_PutFormToCreateHoliday (const struct Plc_Places *Places);
|
||||
static void Hld_PutHeadHolidays (void);
|
||||
|
@ -602,10 +602,8 @@ static void Hld_ListHolidaysForEdition (const struct Hld_Holidays *Holidays,
|
|||
|
||||
/* Put icon to remove holiday */
|
||||
HTM_TD_Begin ("class=\"BM\"");
|
||||
Frm_StartForm (ActRemHld);
|
||||
Hld_PutParamHldCod (Hld->HldCod);
|
||||
Ico_PutIconRemove ();
|
||||
Frm_EndForm ();
|
||||
Ico_PutContextualIconToRemove (ActRemHld,NULL,
|
||||
Hld_PutParamHldCod,&Hld->HldCod);
|
||||
HTM_TD_End ();
|
||||
|
||||
/* Holiday code */
|
||||
|
@ -616,7 +614,7 @@ static void Hld_ListHolidaysForEdition (const struct Hld_Holidays *Holidays,
|
|||
/* Holiday place */
|
||||
HTM_TD_Begin ("class=\"CM\"");
|
||||
Frm_StartForm (ActChgHldPlc);
|
||||
Hld_PutParamHldCod (Hld->HldCod);
|
||||
Hld_PutParamHldCod (&Hld->HldCod);
|
||||
HTM_SELECT_Begin (HTM_SUBMIT_ON_CHANGE,
|
||||
"name=\"PlcCod\" class=\"PLC_SEL\"");
|
||||
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 */
|
||||
HTM_TD_Begin ("class=\"CM\"");
|
||||
Frm_StartForm (ActChgHldTyp);
|
||||
Hld_PutParamHldCod (Hld->HldCod);
|
||||
Hld_PutParamHldCod (&Hld->HldCod);
|
||||
HTM_SELECT_Begin (HTM_SUBMIT_ON_CHANGE,
|
||||
"name=\"HldTyp\" style=\"width:62px;\"");
|
||||
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 */
|
||||
HTM_TD_Begin ("class=\"CM\"");
|
||||
Frm_StartForm (ActChgHldStrDat);
|
||||
Hld_PutParamHldCod (Hld->HldCod);
|
||||
Hld_PutParamHldCod (&Hld->HldCod);
|
||||
Dat_WriteFormDate (Gbl.Now.Date.Year - 1,
|
||||
Gbl.Now.Date.Year + 1,
|
||||
"Start",
|
||||
|
@ -665,7 +663,7 @@ static void Hld_ListHolidaysForEdition (const struct Hld_Holidays *Holidays,
|
|||
/* Non school period end date */
|
||||
HTM_TD_Begin ("class=\"CM\"");
|
||||
Frm_StartForm (ActChgHldEndDat);
|
||||
Hld_PutParamHldCod (Hld->HldCod);
|
||||
Hld_PutParamHldCod (&Hld->HldCod);
|
||||
Dat_WriteFormDate (Gbl.Now.Date.Year - 1,
|
||||
Gbl.Now.Date.Year + 1,
|
||||
"End",
|
||||
|
@ -677,7 +675,7 @@ static void Hld_ListHolidaysForEdition (const struct Hld_Holidays *Holidays,
|
|||
/* Holiday name */
|
||||
HTM_TD_Begin ("class=\"CM\"");
|
||||
Frm_StartForm (ActRenHld);
|
||||
Hld_PutParamHldCod (Hld->HldCod);
|
||||
Hld_PutParamHldCod (&Hld->HldCod);
|
||||
HTM_INPUT_TEXT ("Name",Hld_MAX_CHARS_HOLIDAY_NAME,Hld->Name,
|
||||
HTM_SUBMIT_ON_CHANGE,
|
||||
"size=\"20\"");
|
||||
|
@ -694,9 +692,10 @@ static void Hld_ListHolidaysForEdition (const struct Hld_Holidays *Holidays,
|
|||
/******************** 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));
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
|
@ -228,12 +228,12 @@ void Ico_PutContextualIconToAdd (Act_Action_t NextAction,const char *Anchor,
|
|||
Txt);
|
||||
}
|
||||
|
||||
void Ico_PutContextualIconToRemove (Act_Action_t NextAction,
|
||||
void Ico_PutContextualIconToRemove (Act_Action_t NextAction,const char *Anchor,
|
||||
void (*FuncParams) (void *Args),void *Args)
|
||||
{
|
||||
extern const char *Txt_Remove;
|
||||
|
||||
Lay_PutContextualLinkOnlyIcon (NextAction,NULL,
|
||||
Lay_PutContextualLinkOnlyIcon (NextAction,Anchor,
|
||||
FuncParams,Args,
|
||||
"trash.svg",
|
||||
Txt_Remove);
|
||||
|
|
|
@ -58,7 +58,7 @@ Ico_IconSet_t Ico_GetIconSetFromStr (const char *Str);
|
|||
void Ico_PutContextualIconToAdd (Act_Action_t NextAction,const char *Anchor,
|
||||
void (*FuncParams) (void *Args),void *Args,
|
||||
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 Ico_PutContextualIconToEdit (Act_Action_t NextAction,const char *Anchor,
|
||||
void (*FuncParams) (void *Args),void *Args);
|
||||
|
|
|
@ -90,7 +90,7 @@ static bool Ins_CheckIfICanEdit (struct Instit *Ins);
|
|||
static Ins_StatusTxt_t Ins_GetStatusTxtFromStatusBits (Ins_Status_t Status);
|
||||
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 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
|
||||
Ico_PutIconRemovalNotAllowed ();
|
||||
else
|
||||
{
|
||||
Frm_StartForm (ActRemIns);
|
||||
Ins_PutParamOtherInsCod (Ins->InsCod);
|
||||
Ico_PutIconRemove ();
|
||||
Frm_EndForm ();
|
||||
}
|
||||
Ico_PutContextualIconToRemove (ActRemIns,NULL,
|
||||
Ins_PutParamOtherInsCod,&Ins->InsCod);
|
||||
HTM_TD_End ();
|
||||
|
||||
/* Institution code */
|
||||
|
@ -1142,7 +1138,7 @@ static void Ins_ListInstitutionsForEdition (void)
|
|||
if (ICanEdit)
|
||||
{
|
||||
Frm_StartForm (ActRenInsSho);
|
||||
Ins_PutParamOtherInsCod (Ins->InsCod);
|
||||
Ins_PutParamOtherInsCod (&Ins->InsCod);
|
||||
HTM_INPUT_TEXT ("ShortName",Hie_MAX_CHARS_SHRT_NAME,Ins->ShrtName,
|
||||
HTM_SUBMIT_ON_CHANGE,
|
||||
"class=\"INPUT_SHORT_NAME\"");
|
||||
|
@ -1157,7 +1153,7 @@ static void Ins_ListInstitutionsForEdition (void)
|
|||
if (ICanEdit)
|
||||
{
|
||||
Frm_StartForm (ActRenInsFul);
|
||||
Ins_PutParamOtherInsCod (Ins->InsCod);
|
||||
Ins_PutParamOtherInsCod (&Ins->InsCod);
|
||||
HTM_INPUT_TEXT ("FullName",Hie_MAX_CHARS_FULL_NAME,Ins->FullName,
|
||||
HTM_SUBMIT_ON_CHANGE,
|
||||
"class=\"INPUT_FULL_NAME\"");
|
||||
|
@ -1172,7 +1168,7 @@ static void Ins_ListInstitutionsForEdition (void)
|
|||
if (ICanEdit)
|
||||
{
|
||||
Frm_StartForm (ActChgInsWWW);
|
||||
Ins_PutParamOtherInsCod (Ins->InsCod);
|
||||
Ins_PutParamOtherInsCod (&Ins->InsCod);
|
||||
HTM_INPUT_URL ("WWW",Ins->WWW,HTM_SUBMIT_ON_CHANGE,
|
||||
"class=\"INPUT_WWW_NARROW\" required=\"required\"");
|
||||
Frm_EndForm ();
|
||||
|
@ -1219,7 +1215,7 @@ static void Ins_ListInstitutionsForEdition (void)
|
|||
StatusTxt == Ins_STATUS_PENDING)
|
||||
{
|
||||
Frm_StartForm (ActChgInsSta);
|
||||
Ins_PutParamOtherInsCod (Ins->InsCod);
|
||||
Ins_PutParamOtherInsCod (&Ins->InsCod);
|
||||
HTM_SELECT_Begin (HTM_SUBMIT_ON_CHANGE,
|
||||
"name=\"Status\" class=\"INPUT_STATUS\"");
|
||||
StatusUnsigned = (unsigned) Ins_GetStatusBitsFromStatusTxt (Ins_STATUS_PENDING);
|
||||
|
@ -1320,9 +1316,10 @@ void Ins_PutParamInsCod (long InsCod)
|
|||
/***************** 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));
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
19
swad_link.c
19
swad_link.c
|
@ -72,7 +72,7 @@ static void Lnk_EditLinksInternal (void);
|
|||
static void Lnk_PutIconsEditingLinks (__attribute__((unused)) void *Args);
|
||||
|
||||
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 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 */
|
||||
HTM_TD_Begin ("class=\"BM\"");
|
||||
Frm_StartForm (ActRemLnk);
|
||||
Lnk_PutParamLnkCod (Lnk->LnkCod);
|
||||
Ico_PutIconRemove ();
|
||||
Frm_EndForm ();
|
||||
Ico_PutContextualIconToRemove (ActRemLnk,NULL,
|
||||
Lnk_PutParamLnkCod,&Lnk->LnkCod);
|
||||
HTM_TD_End ();
|
||||
|
||||
/* Link code */
|
||||
|
@ -442,7 +440,7 @@ static void Lnk_ListLinksForEdition (void)
|
|||
/* Link short name */
|
||||
HTM_TD_Begin ("class=\"CM\"");
|
||||
Frm_StartForm (ActRenLnkSho);
|
||||
Lnk_PutParamLnkCod (Lnk->LnkCod);
|
||||
Lnk_PutParamLnkCod (&Lnk->LnkCod);
|
||||
HTM_INPUT_TEXT ("ShortName",Lnk_MAX_CHARS_LINK_SHRT_NAME,Lnk->ShrtName,
|
||||
HTM_SUBMIT_ON_CHANGE,
|
||||
"class=\"INPUT_SHORT_NAME\" required=\"required\"");
|
||||
|
@ -452,7 +450,7 @@ static void Lnk_ListLinksForEdition (void)
|
|||
/* Link full name */
|
||||
HTM_TD_Begin ("class=\"CM\"");
|
||||
Frm_StartForm (ActRenLnkFul);
|
||||
Lnk_PutParamLnkCod (Lnk->LnkCod);
|
||||
Lnk_PutParamLnkCod (&Lnk->LnkCod);
|
||||
HTM_INPUT_TEXT ("FullName",Lnk_MAX_CHARS_LINK_FULL_NAME,Lnk->FullName,
|
||||
HTM_SUBMIT_ON_CHANGE,
|
||||
"class=\"INPUT_FULL_NAME\" required=\"required\"");
|
||||
|
@ -462,7 +460,7 @@ static void Lnk_ListLinksForEdition (void)
|
|||
/* Link WWW */
|
||||
HTM_TD_Begin ("class=\"CM\"");
|
||||
Frm_StartForm (ActChgLnkWWW);
|
||||
Lnk_PutParamLnkCod (Lnk->LnkCod);
|
||||
Lnk_PutParamLnkCod (&Lnk->LnkCod);
|
||||
HTM_INPUT_URL ("WWW",Lnk->WWW,HTM_SUBMIT_ON_CHANGE,
|
||||
"class=\"INPUT_WWW_NARROW\" required=\"required\"");
|
||||
Frm_EndForm ();
|
||||
|
@ -479,9 +477,10 @@ static void Lnk_ListLinksForEdition (void)
|
|||
/******************** 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));
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
17
swad_mail.c
17
swad_mail.c
|
@ -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 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 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 */
|
||||
HTM_TD_Begin ("class=\"BM\"");
|
||||
Frm_StartForm (ActRemMai);
|
||||
Mai_PutParamMaiCod (Mai->MaiCod);
|
||||
Ico_PutIconRemove ();
|
||||
Frm_EndForm ();
|
||||
Ico_PutContextualIconToRemove (ActRemMai,NULL,
|
||||
Mai_PutParamMaiCod,&Mai->MaiCod);
|
||||
HTM_TD_End ();
|
||||
|
||||
/* Mail code */
|
||||
|
@ -512,7 +510,7 @@ static void Mai_ListMailDomainsForEdition (void)
|
|||
/* Mail domain */
|
||||
HTM_TD_Begin ("class=\"CM\"");
|
||||
Frm_StartForm (ActRenMaiSho);
|
||||
Mai_PutParamMaiCod (Mai->MaiCod);
|
||||
Mai_PutParamMaiCod (&Mai->MaiCod);
|
||||
HTM_INPUT_TEXT ("Domain",Cns_MAX_CHARS_EMAIL_ADDRESS,Mai->Domain,
|
||||
HTM_SUBMIT_ON_CHANGE,
|
||||
"size=\"15\"");
|
||||
|
@ -522,7 +520,7 @@ static void Mai_ListMailDomainsForEdition (void)
|
|||
/* Mail domain info */
|
||||
HTM_TD_Begin ("class=\"CM\"");
|
||||
Frm_StartForm (ActRenMaiFul);
|
||||
Mai_PutParamMaiCod (Mai->MaiCod);
|
||||
Mai_PutParamMaiCod (&Mai->MaiCod);
|
||||
HTM_INPUT_TEXT ("Info",Mai_MAX_CHARS_MAIL_INFO,Mai->Info,
|
||||
HTM_SUBMIT_ON_CHANGE,
|
||||
"size=\"40\"");
|
||||
|
@ -545,9 +543,10 @@ static void Mai_ListMailDomainsForEdition (void)
|
|||
/******************** 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));
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
47
swad_match.c
47
swad_match.c
|
@ -625,15 +625,18 @@ static void Mch_ListOneOrMoreMatchesIcons (struct Gam_Games *Games,
|
|||
{
|
||||
HTM_TD_Begin ("class=\"BT%u\"",Gbl.RowEvenOdd);
|
||||
|
||||
/***** Put icon to remove the match *****/
|
||||
if (Mch_CheckIfICanEditThisMatch (Match))
|
||||
{
|
||||
Games->GamCod = Match->GamCod;
|
||||
Games->MchCod = Match->MchCod;
|
||||
Frm_StartForm (ActReqRemMch);
|
||||
Mch_PutParamsEdit (Games);
|
||||
Ico_PutIconRemove ();
|
||||
Frm_EndForm ();
|
||||
|
||||
/***** Put icon to remove the match *****/
|
||||
Ico_PutContextualIconToRemove (ActReqRemMch,NULL,
|
||||
Mch_PutParamsEdit,Games);
|
||||
|
||||
/***** Put icon to edit the match *****/
|
||||
Ico_PutContextualIconToEdit (ActEdiMch,NULL,
|
||||
Mch_PutParamsEdit,Games);
|
||||
}
|
||||
else
|
||||
Ico_PutIconRemovalNotAllowed ();
|
||||
|
@ -1278,6 +1281,40 @@ static void Mch_RemoveMatchesMadeByUsrInCrsFromTable (long UsrCod,long CrsCod,co
|
|||
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 *************************/
|
||||
/*****************************************************************************/
|
||||
|
|
|
@ -103,6 +103,8 @@ void Mch_RemoveMatchesInCourseFromAllTables (long CrsCod);
|
|||
void Mch_RemoveMatchesMadeByUsrInAllCrss (long UsrCod);
|
||||
void Mch_RemoveMatchesMadeByUsrInCrs (long UsrCod,long CrsCod);
|
||||
|
||||
void Mch_EditMatch (void);
|
||||
|
||||
void Mch_PutParamsEdit (void *Games);
|
||||
void Mch_GetAndCheckParameters (struct Gam_Games *Games,
|
||||
struct Gam_Game *Game,
|
||||
|
|
|
@ -2696,7 +2696,7 @@ static void Msg_PutIconsListMsgs (void *Messages)
|
|||
{
|
||||
case Msg_RECEIVED:
|
||||
case Msg_SENT:
|
||||
Ico_PutContextualIconToRemove (ActionReqDelAllMsg[((struct Msg_Messages *) Messages)->TypeOfMessages],
|
||||
Ico_PutContextualIconToRemove (ActionReqDelAllMsg[((struct Msg_Messages *) Messages)->TypeOfMessages],NULL,
|
||||
Msg_PutHiddenParamsMsgsFilters,Messages);
|
||||
break;
|
||||
default:
|
||||
|
@ -3186,7 +3186,7 @@ static void Msg_ShowASentOrReceivedMessage (struct Msg_Messages *Messages,
|
|||
/***** Form to delete message *****/
|
||||
HTM_BR ();
|
||||
Messages->MsgCod = MsgCod; // Message to be deleted
|
||||
Ico_PutContextualIconToRemove (ActionDelMsg[Messages->TypeOfMessages],
|
||||
Ico_PutContextualIconToRemove (ActionDelMsg[Messages->TypeOfMessages],NULL,
|
||||
Msg_PutHiddenParamsOneMsg,Messages);
|
||||
HTM_TD_End ();
|
||||
|
||||
|
|
|
@ -671,7 +671,7 @@ static void Not_DrawANotice (Not_Listing_t TypeNoticesListing,
|
|||
if (Not_CheckIfICanEditNotices ())
|
||||
{
|
||||
/***** Put form to remove announcement *****/
|
||||
Ico_PutContextualIconToRemove (ActReqRemNot,
|
||||
Ico_PutContextualIconToRemove (ActReqRemNot,NULL,
|
||||
Not_PutParams,&NotCod);
|
||||
|
||||
/***** Put form to change the status of the notice *****/
|
||||
|
|
|
@ -715,7 +715,7 @@ static bool Ntf_StartFormGoToAction (Ntf_NotifyEvent_t NotifyEvent,
|
|||
}
|
||||
Frm_StartForm (Action);
|
||||
if (GrpCod > 0)
|
||||
Grp_PutParamGrpCod (GrpCod);
|
||||
Grp_PutParamGrpCod (&GrpCod);
|
||||
Brw_PutHiddenParamFilCod (FileMetadata.FilCod);
|
||||
}
|
||||
break;
|
||||
|
|
19
swad_place.c
19
swad_place.c
|
@ -71,7 +71,7 @@ static void Plc_EditPlacesInternal (void);
|
|||
static void Plc_PutIconsEditingPlaces (__attribute__((unused)) void *Args);
|
||||
|
||||
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 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
|
||||
Ico_PutIconRemovalNotAllowed ();
|
||||
else
|
||||
{
|
||||
Frm_StartForm (ActRemPlc);
|
||||
Plc_PutParamPlcCod (Plc->PlcCod);
|
||||
Ico_PutIconRemove ();
|
||||
Frm_EndForm ();
|
||||
}
|
||||
Ico_PutContextualIconToRemove (ActRemPlc,NULL,
|
||||
Plc_PutParamPlcCod,&Plc->PlcCod);
|
||||
HTM_TD_End ();
|
||||
|
||||
/* Place code */
|
||||
|
@ -572,7 +568,7 @@ static void Plc_ListPlacesForEdition (const struct Plc_Places *Places)
|
|||
/* Place short name */
|
||||
HTM_TD_Begin ("class=\"CM\"");
|
||||
Frm_StartForm (ActRenPlcSho);
|
||||
Plc_PutParamPlcCod (Plc->PlcCod);
|
||||
Plc_PutParamPlcCod (&Plc->PlcCod);
|
||||
HTM_INPUT_TEXT ("ShortName",Plc_MAX_CHARS_PLACE_SHRT_NAME,Plc->ShrtName,
|
||||
HTM_SUBMIT_ON_CHANGE,
|
||||
"class=\"INPUT_SHORT_NAME\"");
|
||||
|
@ -582,7 +578,7 @@ static void Plc_ListPlacesForEdition (const struct Plc_Places *Places)
|
|||
/* Place full name */
|
||||
HTM_TD_Begin ("class=\"CM\"");
|
||||
Frm_StartForm (ActRenPlcFul);
|
||||
Plc_PutParamPlcCod (Plc->PlcCod);
|
||||
Plc_PutParamPlcCod (&Plc->PlcCod);
|
||||
HTM_INPUT_TEXT ("FullName",Plc_MAX_CHARS_PLACE_FULL_NAME,Plc->FullName,
|
||||
HTM_SUBMIT_ON_CHANGE,
|
||||
"class=\"INPUT_FULL_NAME\"");
|
||||
|
@ -605,9 +601,10 @@ static void Plc_ListPlacesForEdition (const struct Plc_Places *Places)
|
|||
/******************** 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));
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
|
@ -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_EditPluginsInternal (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_PutFormToCreatePlugin (void);
|
||||
static void Plg_PutHeadPlugins (void);
|
||||
|
@ -402,10 +402,8 @@ static void Plg_ListPluginsForEdition (void)
|
|||
|
||||
/* Put icon to remove plugin */
|
||||
HTM_TD_Begin ("class=\"BM\"");
|
||||
Frm_StartForm (ActRemPlg);
|
||||
Plg_PutParamPlgCod (Plg->PlgCod);
|
||||
Ico_PutIconRemove ();
|
||||
Frm_EndForm ();
|
||||
Ico_PutContextualIconToRemove (ActRemPlg,NULL,
|
||||
Plg_PutParamPlgCod,&Plg->PlgCod);
|
||||
HTM_TD_End ();
|
||||
|
||||
/* Plugin code */
|
||||
|
@ -426,7 +424,7 @@ static void Plg_ListPluginsForEdition (void)
|
|||
/* Plugin name */
|
||||
HTM_TD_Begin ("class=\"CM\"");
|
||||
Frm_StartForm (ActRenPlg);
|
||||
Plg_PutParamPlgCod (Plg->PlgCod);
|
||||
Plg_PutParamPlgCod (&Plg->PlgCod);
|
||||
HTM_INPUT_TEXT ("Name",Plg_MAX_CHARS_PLUGIN_NAME,Plg->Name,
|
||||
HTM_SUBMIT_ON_CHANGE,
|
||||
"size=\"10\"");
|
||||
|
@ -436,7 +434,7 @@ static void Plg_ListPluginsForEdition (void)
|
|||
/* Plugin description */
|
||||
HTM_TD_Begin ("class=\"CM\"");
|
||||
Frm_StartForm (ActChgPlgDes);
|
||||
Plg_PutParamPlgCod (Plg->PlgCod);
|
||||
Plg_PutParamPlgCod (&Plg->PlgCod);
|
||||
HTM_INPUT_TEXT ("Description",Plg_MAX_CHARS_PLUGIN_DESCRIPTION,Plg->Description,
|
||||
HTM_SUBMIT_ON_CHANGE,
|
||||
"size=\"30\"");
|
||||
|
@ -446,7 +444,7 @@ static void Plg_ListPluginsForEdition (void)
|
|||
/* Plugin logo */
|
||||
HTM_TD_Begin ("class=\"CM\"");
|
||||
Frm_StartForm (ActChgPlgLog);
|
||||
Plg_PutParamPlgCod (Plg->PlgCod);
|
||||
Plg_PutParamPlgCod (&Plg->PlgCod);
|
||||
HTM_INPUT_TEXT ("Logo",Plg_MAX_CHARS_PLUGIN_LOGO,Plg->Logo,
|
||||
HTM_SUBMIT_ON_CHANGE,
|
||||
"size=\"4\"");
|
||||
|
@ -456,7 +454,7 @@ static void Plg_ListPluginsForEdition (void)
|
|||
/* Plugin application key */
|
||||
HTM_TD_Begin ("class=\"CM\"");
|
||||
Frm_StartForm (ActChgPlgAppKey);
|
||||
Plg_PutParamPlgCod (Plg->PlgCod);
|
||||
Plg_PutParamPlgCod (&Plg->PlgCod);
|
||||
HTM_INPUT_TEXT ("AppKey",Plg_MAX_CHARS_PLUGIN_APP_KEY,Plg->AppKey,
|
||||
HTM_SUBMIT_ON_CHANGE,
|
||||
"size=\"16\"");
|
||||
|
@ -466,7 +464,7 @@ static void Plg_ListPluginsForEdition (void)
|
|||
/* Plugin URL */
|
||||
HTM_TD_Begin ("class=\"CM\"");
|
||||
Frm_StartForm (ActChgPlgURL);
|
||||
Plg_PutParamPlgCod (Plg->PlgCod);
|
||||
Plg_PutParamPlgCod (&Plg->PlgCod);
|
||||
HTM_INPUT_URL ("URL",Plg->URL,HTM_SUBMIT_ON_CHANGE,
|
||||
"size=\"15\"");
|
||||
Frm_EndForm ();
|
||||
|
@ -475,7 +473,7 @@ static void Plg_ListPluginsForEdition (void)
|
|||
/* Plugin IP */
|
||||
HTM_TD_Begin ("class=\"CM\"");
|
||||
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,
|
||||
"size=\"10\"");
|
||||
Frm_EndForm ();
|
||||
|
@ -493,9 +491,10 @@ static void Plg_ListPluginsForEdition (void)
|
|||
/******************* 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));
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
|
@ -787,7 +787,7 @@ static void Prg_PutFormsToRemEditOneItem (unsigned NumItem,
|
|||
case Rol_TCH:
|
||||
case Rol_SYS_ADM:
|
||||
/***** Put form to remove program item *****/
|
||||
Ico_PutContextualIconToRemove (ActReqRemPrgItm,
|
||||
Ico_PutContextualIconToRemove (ActReqRemPrgItm,NULL,
|
||||
Prg_PutParams,&Item->Hierarchy.ItmCod);
|
||||
|
||||
/***** Put form to hide/show program item *****/
|
||||
|
|
|
@ -2752,7 +2752,7 @@ static void Prj_PutFormsToRemEditOnePrj (struct Prj_Projects *Projects,
|
|||
if (Prj_CheckIfICanEditProject (Prj))
|
||||
{
|
||||
/***** Put form to remove project *****/
|
||||
Ico_PutContextualIconToRemove (ActReqRemPrj,
|
||||
Ico_PutContextualIconToRemove (ActReqRemPrj,NULL,
|
||||
Prj_PutCurrentParams,Projects);
|
||||
|
||||
/***** Put form to hide/show project *****/
|
||||
|
|
25
swad_room.c
25
swad_room.c
|
@ -143,7 +143,7 @@ static void Roo_PutSelectorBuilding (long BldCod,
|
|||
HTM_SubmitOnChange_t SubmitOnChange);
|
||||
static void Roo_PutSelectorType (Roo_RoomType_t RoomType,
|
||||
HTM_SubmitOnChange_t SubmitOnChange);
|
||||
static void Roo_PutParamRooCod (long RooCod);
|
||||
static void Roo_PutParamRooCod (void *RooCod);
|
||||
static int Roo_GetParamFloor (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 */
|
||||
HTM_TD_Begin ("class=\"BT\"");
|
||||
Frm_StartForm (ActRemRoo);
|
||||
Roo_PutParamRooCod (Room->RooCod);
|
||||
Ico_PutIconRemove ();
|
||||
Frm_EndForm ();
|
||||
Ico_PutContextualIconToRemove (ActRemRoo,NULL,
|
||||
Roo_PutParamRooCod,&Room->RooCod);
|
||||
HTM_TD_End ();
|
||||
|
||||
/* Room code */
|
||||
|
@ -813,7 +811,7 @@ static void Roo_ListRoomsForEdition (const struct Bld_Buildings *Buildings,
|
|||
/* Building */
|
||||
HTM_TD_Begin ("class=\"CT\"");
|
||||
Frm_StartFormAnchor (ActChgRooBld,Anchor);
|
||||
Roo_PutParamRooCod (Room->RooCod);
|
||||
Roo_PutParamRooCod (&Room->RooCod);
|
||||
Roo_PutSelectorBuilding (Room->BldCod,Buildings,
|
||||
HTM_SUBMIT_ON_CHANGE);
|
||||
Frm_EndForm ();
|
||||
|
@ -822,7 +820,7 @@ static void Roo_ListRoomsForEdition (const struct Bld_Buildings *Buildings,
|
|||
/* Floor */
|
||||
HTM_TD_Begin ("class=\"LT\"");
|
||||
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_SUBMIT_ON_CHANGE,false,
|
||||
"class=\"INPUT_LONG\"");
|
||||
|
@ -832,7 +830,7 @@ static void Roo_ListRoomsForEdition (const struct Bld_Buildings *Buildings,
|
|||
/* Room type */
|
||||
HTM_TD_Begin ("class=\"CT\"");
|
||||
Frm_StartFormAnchor (ActChgRooTyp,Anchor);
|
||||
Roo_PutParamRooCod (Room->RooCod);
|
||||
Roo_PutParamRooCod (&Room->RooCod);
|
||||
Roo_PutSelectorType (Room->Type,
|
||||
HTM_SUBMIT_ON_CHANGE);
|
||||
Frm_EndForm ();
|
||||
|
@ -841,7 +839,7 @@ static void Roo_ListRoomsForEdition (const struct Bld_Buildings *Buildings,
|
|||
/* Room short name */
|
||||
HTM_TD_Begin ("class=\"LT\"");
|
||||
Frm_StartFormAnchor (ActRenRooSho,Anchor);
|
||||
Roo_PutParamRooCod (Room->RooCod);
|
||||
Roo_PutParamRooCod (&Room->RooCod);
|
||||
HTM_INPUT_TEXT ("ShortName",Roo_MAX_CHARS_SHRT_NAME,Room->ShrtName,
|
||||
HTM_SUBMIT_ON_CHANGE,
|
||||
"size=\"10\" class=\"INPUT_SHORT_NAME\"");
|
||||
|
@ -851,7 +849,7 @@ static void Roo_ListRoomsForEdition (const struct Bld_Buildings *Buildings,
|
|||
/* Room full name */
|
||||
HTM_TD_Begin ("class=\"LT\"");
|
||||
Frm_StartFormAnchor (ActRenRooFul,Anchor);
|
||||
Roo_PutParamRooCod (Room->RooCod);
|
||||
Roo_PutParamRooCod (&Room->RooCod);
|
||||
HTM_INPUT_TEXT ("FullName",Roo_MAX_CHARS_FULL_NAME,Room->FullName,
|
||||
HTM_SUBMIT_ON_CHANGE,
|
||||
"size=\"20\" class=\"INPUT_FULL_NAME\"");
|
||||
|
@ -861,7 +859,7 @@ static void Roo_ListRoomsForEdition (const struct Bld_Buildings *Buildings,
|
|||
/* Seating capacity */
|
||||
HTM_TD_Begin ("class=\"LT\"");
|
||||
Frm_StartFormAnchor (ActChgRooMaxUsr,Anchor);
|
||||
Roo_PutParamRooCod (Room->RooCod);
|
||||
Roo_PutParamRooCod (&Room->RooCod);
|
||||
Roo_WriteCapacity (StrCapacity,Room->Capacity);
|
||||
HTM_INPUT_TEXT ("Capacity",Cns_MAX_DECIMAL_DIGITS_UINT,StrCapacity,
|
||||
HTM_SUBMIT_ON_CHANGE,
|
||||
|
@ -949,9 +947,10 @@ static void Roo_PutSelectorType (Roo_RoomType_t RoomType,
|
|||
/********************* 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));
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
|
@ -883,7 +883,7 @@ static void Svy_PutFormsToRemEditOneSvy (struct Svy_Surveys *Surveys,
|
|||
Surveys->SvyCod = Svy->SvyCod; // Used as parameters in contextual links
|
||||
|
||||
/***** Put form to remove survey *****/
|
||||
Ico_PutContextualIconToRemove (ActReqRemSvy,
|
||||
Ico_PutContextualIconToRemove (ActReqRemSvy,NULL,
|
||||
Svy_PutParams,Surveys);
|
||||
|
||||
/***** Put form to reset survey *****/
|
||||
|
@ -3613,7 +3613,7 @@ static void Svy_DrawBarNumUsrs (unsigned NumUsrs,unsigned MaxUsrs)
|
|||
|
||||
static void Svy_PutIconToRemoveOneQst (void *Surveys)
|
||||
{
|
||||
Ico_PutContextualIconToRemove (ActReqRemSvyQst,
|
||||
Ico_PutContextualIconToRemove (ActReqRemSvyQst,NULL,
|
||||
Svy_PutParamsRemoveOneQst,Surveys);
|
||||
}
|
||||
|
||||
|
|
|
@ -638,13 +638,9 @@ static void Syl_ShowRowSyllabus (struct Syl_Syllabus *Syllabus,unsigned NumItem,
|
|||
if (Syl_LstItemsSyllabus.Lst[NumItem].HasChildren)
|
||||
Ico_PutIconRemovalNotAllowed ();
|
||||
else
|
||||
{
|
||||
Frm_StartForm (Gbl.Crs.Info.Type == Inf_LECTURES ? ActDelItmSylLec :
|
||||
ActDelItmSylPra);
|
||||
Syl_PutParamNumItem (&Syllabus->ParamNumItem);
|
||||
Ico_PutIconRemove ();
|
||||
Frm_EndForm ();
|
||||
}
|
||||
Ico_PutContextualIconToRemove (Gbl.Crs.Info.Type == Inf_LECTURES ? ActDelItmSylLec :
|
||||
ActDelItmSylPra,NULL,
|
||||
Syl_PutParamNumItem,&Syllabus->ParamNumItem);
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** Icon to get up an item *****/
|
||||
|
|
|
@ -1253,7 +1253,7 @@ static void Tst_PutIconsEditBankQsts (void *Test)
|
|||
case ActReqRemOneTstQst: // Request removal of a question
|
||||
case ActRemOneTstQst: // Remove a question
|
||||
case ActChgShfTstQst: // Change shuffle of a question
|
||||
Ico_PutContextualIconToRemove (ActReqRemSevTstQst,
|
||||
Ico_PutContextualIconToRemove (ActReqRemSevTstQst,NULL,
|
||||
Tst_PutParamsRemoveSelectedQsts,Test);
|
||||
break;
|
||||
default:
|
||||
|
@ -4822,7 +4822,7 @@ void Tst_RemoveSelectedQsts (void)
|
|||
|
||||
static void Tst_PutIconToRemoveOneQst (void *QstCod)
|
||||
{
|
||||
Ico_PutContextualIconToRemove (ActReqRemOneTstQst,
|
||||
Ico_PutContextualIconToRemove (ActReqRemOneTstQst,NULL,
|
||||
Tst_PutParamsRemoveOnlyThisQst,QstCod);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue