mirror of https://github.com/acanas/swad-core.git
Version 22.69: Mar 07, 2023 Code refactoring in parameters. Not finished.
This commit is contained in:
parent
f40674ed95
commit
87fcfd1ab8
20
swad_ID.c
20
swad_ID.c
|
@ -218,7 +218,7 @@ unsigned ID_GetListUsrCodsFromUsrID (struct Usr_Data *UsrDat,
|
|||
|
||||
void ID_PutParamOtherUsrIDPlain (void)
|
||||
{
|
||||
Par_PutHiddenParamString (NULL,"OtherUsrID",
|
||||
Par_PutParString (NULL,"OtherUsrID",
|
||||
(Gbl.Usrs.Other.UsrDat.IDs.Num &&
|
||||
Gbl.Usrs.Other.UsrDat.IDs.List) ? Gbl.Usrs.Other.UsrDat.IDs.List[0].ID :
|
||||
"");
|
||||
|
@ -234,7 +234,7 @@ void ID_GetParamOtherUsrIDPlain (void)
|
|||
ID_ReallocateListIDs (&Gbl.Usrs.Other.UsrDat,1);
|
||||
|
||||
/***** Get parameter *****/
|
||||
Par_GetParToText ("OtherUsrID",Gbl.Usrs.Other.UsrDat.IDs.List[0].ID,
|
||||
Par_GetParText ("OtherUsrID",Gbl.Usrs.Other.UsrDat.IDs.List[0].ID,
|
||||
ID_MAX_BYTES_USR_ID);
|
||||
// Users' IDs are always stored internally in capitals and without leading zeros
|
||||
Str_RemoveLeadingZeros (Gbl.Usrs.Other.UsrDat.IDs.List[0].ID);
|
||||
|
@ -411,7 +411,7 @@ static void ID_PutLinkToConfirmID (struct Usr_Data *UsrDat,unsigned NumID,
|
|||
Frm_BeginFormAnchor (NextAction[UsrDat->Roles.InCurrentCrs],Anchor);
|
||||
if (Gbl.Action.Original != ActUnk)
|
||||
{
|
||||
Par_PutHiddenParamLong (NULL,"OriginalActCod",
|
||||
Par_PutParLong (NULL,"OriginalActCod",
|
||||
Act_GetActCod (Gbl.Action.Original)); // Original action, used to know where we came from
|
||||
switch (Gbl.Action.Original)
|
||||
{
|
||||
|
@ -425,7 +425,7 @@ static void ID_PutLinkToConfirmID (struct Usr_Data *UsrDat,unsigned NumID,
|
|||
}
|
||||
}
|
||||
Usr_PutParamUsrCodEncrypted (UsrDat->EnUsrCod);
|
||||
Par_PutHiddenParamString (NULL,"UsrID",UsrDat->IDs.List[NumID].ID);
|
||||
Par_PutParString (NULL,"UsrID",UsrDat->IDs.List[NumID].ID);
|
||||
|
||||
/***** Put link *****/
|
||||
HTM_BUTTON_Submit_Begin (Txt_Confirm_ID,
|
||||
|
@ -652,7 +652,7 @@ static void ID_ShowFormChangeUsrID (bool ItsMe,bool IShouldFillInID)
|
|||
static void ID_PutParamsRemoveMyID (void *ID)
|
||||
{
|
||||
if (ID)
|
||||
Par_PutHiddenParamString (NULL,"UsrID",(char *) ID);
|
||||
Par_PutParString (NULL,"UsrID",(char *) ID);
|
||||
}
|
||||
|
||||
static void ID_PutParamsRemoveOtherID (void *ID)
|
||||
|
@ -660,7 +660,7 @@ static void ID_PutParamsRemoveOtherID (void *ID)
|
|||
if (ID)
|
||||
{
|
||||
Usr_PutParamUsrCodEncrypted (Gbl.Usrs.Other.UsrDat.EnUsrCod);
|
||||
Par_PutHiddenParamString (NULL,"UsrID",(char *) ID);
|
||||
Par_PutParString (NULL,"UsrID",(char *) ID);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -723,7 +723,7 @@ static void ID_RemoveUsrID (const struct Usr_Data *UsrDat,bool ItsMe)
|
|||
if (Usr_ICanEditOtherUsr (UsrDat))
|
||||
{
|
||||
/***** Get user's ID from form *****/
|
||||
Par_GetParToText ("UsrID",UsrID,ID_MAX_BYTES_USR_ID);
|
||||
Par_GetParText ("UsrID",UsrID,ID_MAX_BYTES_USR_ID);
|
||||
// Users' IDs are always stored internally in capitals and without leading zeros
|
||||
Str_RemoveLeadingZeros (UsrID);
|
||||
Str_ConvertToUpperText (UsrID);
|
||||
|
@ -818,7 +818,7 @@ static void ID_NewUsrID (const struct Usr_Data *UsrDat,bool ItsMe)
|
|||
if (Usr_ICanEditOtherUsr (UsrDat))
|
||||
{
|
||||
/***** Get new user's ID from form *****/
|
||||
Par_GetParToText ("NewID",NewID,ID_MAX_BYTES_USR_ID);
|
||||
Par_GetParText ("NewID",NewID,ID_MAX_BYTES_USR_ID);
|
||||
// Users' IDs are always stored internally in capitals and without leading zeros
|
||||
Str_RemoveLeadingZeros (NewID);
|
||||
Str_ConvertToUpperText (NewID);
|
||||
|
@ -892,7 +892,7 @@ void ID_ConfirmOtherUsrID (void)
|
|||
unsigned NumIDFound = 0; // Initialized to avoid warning
|
||||
|
||||
/***** Get where we came from *****/
|
||||
OriginalActCod = Par_GetParToLong ("OriginalActCod");
|
||||
OriginalActCod = Par_GetParLong ("OriginalActCod");
|
||||
Gbl.Action.Original = Act_GetActionFromActCod (OriginalActCod);
|
||||
|
||||
/***** Get other user's code from form and get user's data *****/
|
||||
|
@ -913,7 +913,7 @@ void ID_ConfirmOtherUsrID (void)
|
|||
if (ICanConfirm)
|
||||
{
|
||||
/***** Get user's ID from form *****/
|
||||
Par_GetParToText ("UsrID",UsrID,ID_MAX_BYTES_USR_ID);
|
||||
Par_GetParText ("UsrID",UsrID,ID_MAX_BYTES_USR_ID);
|
||||
// Users' IDs are always stored internally in capitals and without leading zeros
|
||||
Str_RemoveLeadingZeros (UsrID);
|
||||
Str_ConvertToUpperText (UsrID);
|
||||
|
|
|
@ -63,8 +63,8 @@ static void MAC_PutParams (void *Args)
|
|||
{
|
||||
if (Args)
|
||||
{
|
||||
Par_PutHiddenParamLong (NULL,"Cod",((struct MAC_Params *) Args)->Cod);
|
||||
Par_PutHiddenParamString (NULL,"MAC",((struct MAC_Params *) Args)->MACstr);
|
||||
Par_PutParLong (NULL,"Cod",((struct MAC_Params *) Args)->Cod);
|
||||
Par_PutParString (NULL,"MAC",((struct MAC_Params *) Args)->MACstr);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -174,7 +174,7 @@ unsigned long long MAC_GetMACnumFromForm (const char *ParamName)
|
|||
unsigned long long MACnum;
|
||||
|
||||
/***** Get parameter *****/
|
||||
Par_GetParToText (ParamName,MACstr,MAC_LENGTH_MAC_ADDRESS * Str_MAX_BYTES_PER_CHAR);
|
||||
Par_GetParText (ParamName,MACstr,MAC_LENGTH_MAC_ADDRESS * Str_MAX_BYTES_PER_CHAR);
|
||||
|
||||
if (MACstr[0]) // Not empty
|
||||
{
|
||||
|
|
|
@ -71,7 +71,7 @@ void QR_PutLinkToPrintQRCode (Act_Action_t Action,
|
|||
|
||||
void QR_PutParamQRString (void *QRString)
|
||||
{
|
||||
Par_PutHiddenParamString (NULL,"QRString",QRString);
|
||||
Par_PutParString (NULL,"QRString",QRString);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -83,7 +83,7 @@ void QR_PrintQRCode (void)
|
|||
char QRString[Cns_MAX_BYTES_WWW + 1];
|
||||
|
||||
/***** Get QR string *****/
|
||||
Par_GetParToText ("QRString",QRString,Cns_MAX_BYTES_WWW);
|
||||
Par_GetParText ("QRString",QRString,Cns_MAX_BYTES_WWW);
|
||||
|
||||
/***** Show QR code *****/
|
||||
QR_ImageQRCode (QRString);
|
||||
|
|
|
@ -208,7 +208,7 @@ void Acc_CheckIfEmptyAccountExists (void)
|
|||
Mnu_ContextMenuEnd ();
|
||||
|
||||
/***** Get new user's ID from form *****/
|
||||
Par_GetParToText ("ID",ID,ID_MAX_BYTES_USR_ID);
|
||||
Par_GetParText ("ID",ID,ID_MAX_BYTES_USR_ID);
|
||||
// Users' IDs are always stored internally in capitals and without leading zeros
|
||||
Str_RemoveLeadingZeros (ID);
|
||||
Str_ConvertToUpperText (ID);
|
||||
|
@ -581,7 +581,7 @@ void Acc_PutLinkToRemoveMyAccount (__attribute__((unused)) void *Args)
|
|||
static void Acc_PutParamsToRemoveMyAccount (void *EncryptedUsrCod)
|
||||
{
|
||||
Usr_PutParamMyUsrCodEncrypted (EncryptedUsrCod);
|
||||
Par_PutHiddenParamUnsigned (NULL,"RegRemAction",
|
||||
Par_PutParUnsigned (NULL,"RegRemAction",
|
||||
(unsigned) Enr_ELIMINATE_ONE_USR_FROM_PLATFORM);
|
||||
}
|
||||
|
||||
|
@ -654,7 +654,7 @@ static bool Acc_GetParamsNewAccount (char NewNickWithoutArr[Nck_MAX_BYTES_NICK_W
|
|||
bool Error = false;
|
||||
|
||||
/***** Step 1/3: Get new nickname from form *****/
|
||||
Par_GetParToText ("NewNick",NewNick,sizeof (NewNick) - 1);
|
||||
Par_GetParText ("NewNick",NewNick,sizeof (NewNick) - 1);
|
||||
|
||||
/* Remove arrobas at the beginning */
|
||||
Str_RemoveLeadingArrobas (NewNick);
|
||||
|
@ -683,7 +683,7 @@ static bool Acc_GetParamsNewAccount (char NewNickWithoutArr[Nck_MAX_BYTES_NICK_W
|
|||
}
|
||||
|
||||
/***** Step 2/3: Get new email from form *****/
|
||||
Par_GetParToText ("NewEmail",NewEmail,Cns_MAX_BYTES_EMAIL_ADDRESS);
|
||||
Par_GetParText ("NewEmail",NewEmail,Cns_MAX_BYTES_EMAIL_ADDRESS);
|
||||
|
||||
if (Mai_CheckIfEmailIsValid (NewEmail)) // New email is valid
|
||||
{
|
||||
|
@ -704,7 +704,7 @@ static bool Acc_GetParamsNewAccount (char NewNickWithoutArr[Nck_MAX_BYTES_NICK_W
|
|||
}
|
||||
|
||||
/***** Step 3/3: Get new password from form *****/
|
||||
Par_GetParToText ("Paswd",NewPlainPassword,Pwd_MAX_BYTES_PLAIN_PASSWORD);
|
||||
Par_GetParText ("Paswd",NewPlainPassword,Pwd_MAX_BYTES_PLAIN_PASSWORD);
|
||||
Cry_EncryptSHA512Base64 (NewPlainPassword,NewEncryptedPassword);
|
||||
if (!Pwd_SlowCheckIfPasswordIsGood (NewPlainPassword,NewEncryptedPassword,-1L)) // New password is good?
|
||||
{
|
||||
|
|
|
@ -154,7 +154,7 @@ void Agd_PutParamAgd (void)
|
|||
char NickWithArr[Nck_MAX_BYTES_NICK_WITH_ARROBA + 1];
|
||||
|
||||
snprintf (NickWithArr,sizeof (NickWithArr),"@%s",Gbl.Usrs.Other.UsrDat.Nickname);
|
||||
Par_PutHiddenParamString (NULL,"agd",NickWithArr);
|
||||
Par_PutParString (NULL,"agd",NickWithArr);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -321,17 +321,17 @@ static void Agd_ShowFormToSelHiddenVisiblEvents (const struct Agd_Agenda *Agenda
|
|||
|
||||
static void Agd_PutHiddenParamPast__FutureEvents (unsigned Past__FutureEvents)
|
||||
{
|
||||
Par_PutHiddenParamUnsigned (NULL,ParamPast__FutureName,Past__FutureEvents);
|
||||
Par_PutParUnsigned (NULL,ParamPast__FutureName,Past__FutureEvents);
|
||||
}
|
||||
|
||||
static void Agd_PutHiddenParamPrivatPublicEvents (unsigned PrivatPublicEvents)
|
||||
{
|
||||
Par_PutHiddenParamUnsigned (NULL,ParamPrivatPublicName,PrivatPublicEvents);
|
||||
Par_PutParUnsigned (NULL,ParamPrivatPublicName,PrivatPublicEvents);
|
||||
}
|
||||
|
||||
static void Agd_PutHiddenParamHiddenVisiblEvents (unsigned HiddenVisiblEvents)
|
||||
{
|
||||
Par_PutHiddenParamUnsigned (NULL,ParamHiddenVisiblName,HiddenVisiblEvents);
|
||||
Par_PutParUnsigned (NULL,ParamHiddenVisiblName,HiddenVisiblEvents);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -340,7 +340,7 @@ static void Agd_PutHiddenParamHiddenVisiblEvents (unsigned HiddenVisiblEvents)
|
|||
|
||||
static unsigned Agd_GetParamsPast__FutureEvents (void)
|
||||
{
|
||||
return (unsigned) Par_GetParToUnsignedLong (ParamPast__FutureName,
|
||||
return (unsigned) Par_GetParUnsignedLong (ParamPast__FutureName,
|
||||
0,
|
||||
(1 << Agd_PAST___EVENTS) |
|
||||
(1 << Agd_FUTURE_EVENTS),
|
||||
|
@ -350,7 +350,7 @@ static unsigned Agd_GetParamsPast__FutureEvents (void)
|
|||
|
||||
static unsigned Agd_GetParamsPrivatPublicEvents (void)
|
||||
{
|
||||
return (unsigned) Par_GetParToUnsignedLong (ParamPrivatPublicName,
|
||||
return (unsigned) Par_GetParUnsignedLong (ParamPrivatPublicName,
|
||||
0,
|
||||
(1 << Agd_PRIVAT_EVENTS) |
|
||||
(1 << Agd_PUBLIC_EVENTS),
|
||||
|
@ -360,7 +360,7 @@ static unsigned Agd_GetParamsPrivatPublicEvents (void)
|
|||
|
||||
static unsigned Agd_GetParamsHiddenVisiblEvents (void)
|
||||
{
|
||||
return (unsigned) Par_GetParToUnsignedLong (ParamHiddenVisiblName,
|
||||
return (unsigned) Par_GetParUnsignedLong (ParamHiddenVisiblName,
|
||||
0,
|
||||
(1 << Agd_HIDDEN_EVENTS) |
|
||||
(1 << Agd_VISIBL_EVENTS),
|
||||
|
@ -958,12 +958,12 @@ void Agd_PutParamsMyAgenda (unsigned Past__FutureEvents,
|
|||
Agd_PutHiddenParamHiddenVisiblEvents (HiddenVisiblEvents);
|
||||
|
||||
if (Order != Agd_ORDER_DEFAULT)
|
||||
Par_PutHiddenParamOrder ((unsigned) Order);
|
||||
Par_PutParOrder ((unsigned) Order);
|
||||
|
||||
if (NumPage > 1)
|
||||
Pag_PutHiddenParamPagNum (Pag_MY_AGENDA,NumPage);
|
||||
|
||||
Par_PutParCod (Par_AgdCod,AgdCodToEdit);
|
||||
Par_PutParCode (Par_AgdCod,AgdCodToEdit);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -998,7 +998,7 @@ static void Agd_GetParams (struct Agd_Agenda *Agenda,
|
|||
void Agd_PutHiddenParamEventsOrder (Dat_StartEndTime_t SelectedOrder)
|
||||
{
|
||||
if (SelectedOrder != Agd_ORDER_DEFAULT)
|
||||
Par_PutHiddenParamOrder ((unsigned) SelectedOrder);
|
||||
Par_PutParOrder ((unsigned) SelectedOrder);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -1012,7 +1012,7 @@ static void Agd_GetParamEventOrder (struct Agd_Agenda *Agenda)
|
|||
if (!AlreadyGot)
|
||||
{
|
||||
Agenda->SelectedOrder = (Dat_StartEndTime_t)
|
||||
Par_GetParToUnsignedLong ("Order",
|
||||
Par_GetParUnsignedLong ("Order",
|
||||
0,
|
||||
Dat_NUM_START_END_TIME - 1,
|
||||
(unsigned long) Agd_ORDER_DEFAULT);
|
||||
|
@ -1536,13 +1536,13 @@ void Agd_ReceiveFormEvent (void)
|
|||
AgdEvent.TimeUTC[Dat_END_TIME] = Dat_GetTimeUTCFromForm (Dat_END_TIME);
|
||||
|
||||
/***** Get event location *****/
|
||||
Par_GetParToText ("Location",AgdEvent.Location,Agd_MAX_BYTES_LOCATION);
|
||||
Par_GetParText ("Location",AgdEvent.Location,Agd_MAX_BYTES_LOCATION);
|
||||
|
||||
/***** Get event title *****/
|
||||
Par_GetParToText ("Event",AgdEvent.Event,Agd_MAX_BYTES_EVENT);
|
||||
Par_GetParText ("Event",AgdEvent.Event,Agd_MAX_BYTES_EVENT);
|
||||
|
||||
/***** Get event description *****/
|
||||
Par_GetParToHTML ("Txt",EventTxt,Cns_MAX_BYTES_TEXT); // Store in HTML format (not rigorous)
|
||||
Par_GetParHTML ("Txt",EventTxt,Cns_MAX_BYTES_TEXT); // Store in HTML format (not rigorous)
|
||||
|
||||
/***** Adjust dates *****/
|
||||
if (AgdEvent.TimeUTC[Dat_STR_TIME] == 0)
|
||||
|
|
|
@ -304,7 +304,7 @@ static void Ann_DrawAnAnnouncement (long AnnCod,Ann_Status_t Status,
|
|||
|
||||
static void Ann_PutParams (void *AnnCod)
|
||||
{
|
||||
Par_PutParCod (Par_AnnCod,*((long *) AnnCod));
|
||||
Par_PutParCode (Par_AnnCod,*((long *) AnnCod));
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -400,7 +400,7 @@ void Ann_ReceiveAnnouncement (void)
|
|||
|
||||
/***** Get data from form *****/
|
||||
/* Get the subject of the announcement */
|
||||
Par_GetParToHTML ("Subject",Subject,Cns_MAX_BYTES_SUBJECT);
|
||||
Par_GetParHTML ("Subject",Subject,Cns_MAX_BYTES_SUBJECT);
|
||||
|
||||
/* Get the content of the announcement */
|
||||
Par_GetParAndChangeFormat ("Content",Content,Cns_MAX_BYTES_TEXT,
|
||||
|
|
|
@ -246,7 +246,7 @@ static void Asg_PutHead (struct Asg_Assignments *Assignments,
|
|||
WhichGroups = Grp_GetParamWhichGroups ();
|
||||
Grp_PutParamWhichGroups (&WhichGroups);
|
||||
Pag_PutHiddenParamPagNum (Pag_ASSIGNMENTS,Assignments->CurrentPage);
|
||||
Par_PutHiddenParamOrder ((unsigned) Order);
|
||||
Par_PutParOrder ((unsigned) Order);
|
||||
|
||||
/* Begin link to select order */
|
||||
HTM_BUTTON_Submit_Begin (Txt_START_END_TIME_HELP[Order],
|
||||
|
@ -358,7 +358,7 @@ static void Asg_ParamsWhichGroupsToShow (void *Assignments)
|
|||
{
|
||||
if (Assignments)
|
||||
{
|
||||
Par_PutHiddenParamOrder ((unsigned) ((struct Asg_Assignments *) Assignments)->SelectedOrder);
|
||||
Par_PutParOrder ((unsigned) ((struct Asg_Assignments *) Assignments)->SelectedOrder);
|
||||
Pag_PutHiddenParamPagNum (Pag_ASSIGNMENTS,
|
||||
((struct Asg_Assignments *) Assignments)->CurrentPage);
|
||||
}
|
||||
|
@ -711,7 +711,7 @@ static void Asg_WriteAssignmentFolder (struct Asg_Assignment *Asg,bool PrintView
|
|||
Dat_StartEndTime_t Asg_GetParamAsgOrder (void)
|
||||
{
|
||||
return (Dat_StartEndTime_t)
|
||||
Par_GetParToUnsignedLong ("Order",
|
||||
Par_GetParUnsignedLong ("Order",
|
||||
0,
|
||||
Dat_NUM_START_END_TIME - 1,
|
||||
(unsigned long) Asg_ORDER_DEFAULT);
|
||||
|
@ -774,8 +774,8 @@ static void Asg_PutParams (void *Assignments)
|
|||
|
||||
if (Assignments)
|
||||
{
|
||||
Par_PutParCod (Par_AsgCod,((struct Asg_Assignments *) Assignments)->Asg.AsgCod);
|
||||
Par_PutHiddenParamOrder ((unsigned) ((struct Asg_Assignments *) Assignments)->SelectedOrder);
|
||||
Par_PutParCode (Par_AsgCod,((struct Asg_Assignments *) Assignments)->Asg.AsgCod);
|
||||
Par_PutParOrder ((unsigned) ((struct Asg_Assignments *) Assignments)->SelectedOrder);
|
||||
WhichGroups = Grp_GetParamWhichGroups ();
|
||||
Grp_PutParamWhichGroups (&WhichGroups);
|
||||
Pag_PutHiddenParamPagNum (Pag_ASSIGNMENTS,((struct Asg_Assignments *) Assignments)->CurrentPage);
|
||||
|
@ -1419,15 +1419,15 @@ void Asg_ReceiveFormAssignment (void)
|
|||
Assignments.Asg.TimeUTC[Dat_END_TIME] = Dat_GetTimeUTCFromForm (Dat_END_TIME);
|
||||
|
||||
/***** Get assignment title *****/
|
||||
Par_GetParToText ("Title",Assignments.Asg.Title,Asg_MAX_BYTES_ASSIGNMENT_TITLE);
|
||||
Par_GetParText ("Title",Assignments.Asg.Title,Asg_MAX_BYTES_ASSIGNMENT_TITLE);
|
||||
|
||||
/***** Get folder name where to send works of the assignment *****/
|
||||
Par_GetParToText ("Folder",Assignments.Asg.Folder,Brw_MAX_BYTES_FOLDER);
|
||||
Par_GetParText ("Folder",Assignments.Asg.Folder,Brw_MAX_BYTES_FOLDER);
|
||||
Assignments.Asg.SendWork = (Assignments.Asg.Folder[0]) ? Asg_SEND_WORK :
|
||||
Asg_DO_NOT_SEND_WORK;
|
||||
|
||||
/***** Get assignment text *****/
|
||||
Par_GetParToHTML ("Txt",Description,Cns_MAX_BYTES_TEXT); // Store in HTML format (not rigorous)
|
||||
Par_GetParHTML ("Txt",Description,Cns_MAX_BYTES_TEXT); // Store in HTML format (not rigorous)
|
||||
|
||||
/***** Adjust dates *****/
|
||||
if (Assignments.Asg.TimeUTC[Dat_STR_TIME] == 0)
|
||||
|
|
|
@ -95,7 +95,7 @@ void AsgRsc_WriteAssignmentInCrsProgram (long AsgCod,bool PutFormToGo,
|
|||
NextAction = (AsgCod > 0) ? ActSeeOneAsg : // Assignment specified
|
||||
ActSeeAsg; // All assignments
|
||||
Frm_BeginForm (NextAction);
|
||||
Par_PutParCod (Par_AsgCod,AsgCod);
|
||||
Par_PutParCode (Par_AsgCod,AsgCod);
|
||||
// TODO: In the listing of assignments, the page is always the first.
|
||||
// The page should be that corresponding to the selected assignment.
|
||||
HTM_BUTTON_Submit_Begin (Txt_Actions[NextAction],
|
||||
|
|
|
@ -264,7 +264,7 @@ static void Att_ShowAllAttEvents (struct Att_Events *Events)
|
|||
WhichGroups = Grp_GetParamWhichGroups ();
|
||||
Grp_PutParamWhichGroups (&WhichGroups);
|
||||
Pag_PutHiddenParamPagNum (Pag_ATT_EVENTS,Events->CurrentPage);
|
||||
Par_PutHiddenParamOrder ((unsigned) Order);
|
||||
Par_PutParOrder ((unsigned) Order);
|
||||
|
||||
HTM_BUTTON_Submit_Begin (Txt_START_END_TIME_HELP[Order],
|
||||
"class=\"BT_LINK\"");
|
||||
|
@ -330,7 +330,7 @@ static void Att_ParamsWhichGroupsToShow (void *Events)
|
|||
{
|
||||
if (Events)
|
||||
{
|
||||
Par_PutHiddenParamOrder ((unsigned) ((struct Att_Events *) Events)->SelectedOrder);
|
||||
Par_PutParOrder ((unsigned) ((struct Att_Events *) Events)->SelectedOrder);
|
||||
Pag_PutHiddenParamPagNum (Pag_ATT_EVENTS,((struct Att_Events *) Events)->CurrentPage);
|
||||
}
|
||||
}
|
||||
|
@ -419,7 +419,7 @@ static void Att_PutParamsToCreateNewAttEvent (void *Events)
|
|||
|
||||
if (Events)
|
||||
{
|
||||
Par_PutHiddenParamOrder ((unsigned) ((struct Att_Events *) Events)->SelectedOrder);
|
||||
Par_PutParOrder ((unsigned) ((struct Att_Events *) Events)->SelectedOrder);
|
||||
WhichGroups = Grp_GetParamWhichGroups ();
|
||||
Grp_PutParamWhichGroups (&WhichGroups);
|
||||
Pag_PutHiddenParamPagNum (Pag_ATT_EVENTS,((struct Att_Events *) Events)->CurrentPage);
|
||||
|
@ -436,7 +436,7 @@ static void Att_PutParamsToListUsrsAttendance (void *Events)
|
|||
|
||||
if (Events)
|
||||
{
|
||||
Par_PutHiddenParamOrder ((unsigned) ((struct Att_Events *) Events)->SelectedOrder);
|
||||
Par_PutParOrder ((unsigned) ((struct Att_Events *) Events)->SelectedOrder);
|
||||
WhichGroups = Grp_GetParamWhichGroups ();
|
||||
Grp_PutParamWhichGroups (&WhichGroups);
|
||||
Pag_PutHiddenParamPagNum (Pag_ATT_EVENTS,((struct Att_Events *) Events)->CurrentPage);
|
||||
|
@ -584,7 +584,7 @@ static void Att_WriteAttEventAuthor (struct Att_Event *Event)
|
|||
static Dat_StartEndTime_t Att_GetParamAttOrder (void)
|
||||
{
|
||||
return (Dat_StartEndTime_t)
|
||||
Par_GetParToUnsignedLong ("Order",
|
||||
Par_GetParUnsignedLong ("Order",
|
||||
0,
|
||||
Dat_NUM_START_END_TIME - 1,
|
||||
(unsigned long) Att_ORDER_DEFAULT);
|
||||
|
@ -651,8 +651,8 @@ static void Att_PutParams (void *Events)
|
|||
|
||||
if (Events)
|
||||
{
|
||||
Par_PutParCod (Par_AttCod,((struct Att_Events *) Events)->Event.AttCod);
|
||||
Par_PutHiddenParamOrder ((unsigned) ((struct Att_Events *) Events)->SelectedOrder);
|
||||
Par_PutParCode (Par_AttCod,((struct Att_Events *) Events)->Event.AttCod);
|
||||
Par_PutParOrder ((unsigned) ((struct Att_Events *) Events)->SelectedOrder);
|
||||
WhichGroups = Grp_GetParamWhichGroups ();
|
||||
Grp_PutParamWhichGroups (&WhichGroups);
|
||||
Pag_PutHiddenParamPagNum (Pag_ATT_EVENTS,((struct Att_Events *) Events)->CurrentPage);
|
||||
|
@ -820,7 +820,7 @@ static void Att_FreeListAttEvents (struct Att_Events *Events)
|
|||
static void Att_PutParamSelectedAttCod (void *Events)
|
||||
{
|
||||
if (Events)
|
||||
Par_PutParCod (Par_AttCod,((struct Att_Events *) Events)->Event.AttCod);
|
||||
Par_PutParCode (Par_AttCod,((struct Att_Events *) Events)->Event.AttCod);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -1010,9 +1010,9 @@ void Att_RequestCreatOrEditAttEvent (void)
|
|||
else
|
||||
{
|
||||
Frm_BeginForm (ActChgAtt);
|
||||
Par_PutParCod (Par_AttCod,Events.Event.AttCod);
|
||||
Par_PutParCode (Par_AttCod,Events.Event.AttCod);
|
||||
}
|
||||
Par_PutHiddenParamOrder ((unsigned) Events.SelectedOrder);
|
||||
Par_PutParOrder ((unsigned) Events.SelectedOrder);
|
||||
WhichGroups = Grp_GetParamWhichGroups ();
|
||||
Grp_PutParamWhichGroups (&WhichGroups);
|
||||
Pag_PutHiddenParamPagNum (Pag_ATT_EVENTS,Events.CurrentPage);
|
||||
|
@ -1203,13 +1203,13 @@ void Att_ReceiveFormAttEvent (void)
|
|||
ReceivedAtt.TimeUTC[Dat_END_TIME] = Dat_GetTimeUTCFromForm (Dat_END_TIME);
|
||||
|
||||
/***** Get boolean parameter that indicates if teacher's comments are visible by students *****/
|
||||
ReceivedAtt.CommentTchVisible = Par_GetParToBool ("ComTchVisible");
|
||||
ReceivedAtt.CommentTchVisible = Par_GetParBool ("ComTchVisible");
|
||||
|
||||
/***** Get attendance event title *****/
|
||||
Par_GetParToText ("Title",ReceivedAtt.Title,Att_MAX_BYTES_ATTENDANCE_EVENT_TITLE);
|
||||
Par_GetParText ("Title",ReceivedAtt.Title,Att_MAX_BYTES_ATTENDANCE_EVENT_TITLE);
|
||||
|
||||
/***** Get attendance event description *****/
|
||||
Par_GetParToHTML ("Txt",Description,Cns_MAX_BYTES_TEXT); // Store in HTML format (not rigorous)
|
||||
Par_GetParHTML ("Txt",Description,Cns_MAX_BYTES_TEXT); // Store in HTML format (not rigorous)
|
||||
|
||||
/***** Adjust dates *****/
|
||||
if (ReceivedAtt.TimeUTC[Dat_STR_TIME] == 0)
|
||||
|
@ -1537,7 +1537,7 @@ static void Att_ListAttOnlyMeAsStudent (struct Att_Event *Event)
|
|||
if (Event->Open)
|
||||
{
|
||||
Frm_BeginForm (ActRecAttMe);
|
||||
Par_PutParCod (Par_AttCod,Event->AttCod);
|
||||
Par_PutParCode (Par_AttCod,Event->AttCod);
|
||||
}
|
||||
|
||||
/***** List students (only me) *****/
|
||||
|
@ -1617,7 +1617,7 @@ static void Att_ListAttStudents (struct Att_Events *Events)
|
|||
|
||||
/* Begin form */
|
||||
Frm_BeginForm (ActRecAttStd);
|
||||
Par_PutParCod (Par_AttCod,Events->Event.AttCod);
|
||||
Par_PutParCode (Par_AttCod,Events->Event.AttCod);
|
||||
Grp_PutParamsCodGrps ();
|
||||
|
||||
/* Begin table */
|
||||
|
@ -1851,7 +1851,7 @@ static void Att_PutLinkAttEvent (struct Att_Event *Event,
|
|||
{
|
||||
/***** Begin form *****/
|
||||
Frm_BeginForm (ActSeeOneAtt);
|
||||
Par_PutParCod (Par_AttCod,Event->AttCod);
|
||||
Par_PutParCode (Par_AttCod,Event->AttCod);
|
||||
Att_PutParamsCodGrps (Event->AttCod);
|
||||
|
||||
/***** Link to view attendance event *****/
|
||||
|
@ -1908,13 +1908,13 @@ void Att_PutParamsCodGrps (long AttCod)
|
|||
Str_Concat (GrpCods,row[0],MaxLengthGrpCods);
|
||||
}
|
||||
|
||||
Par_PutHiddenParamString (NULL,"GrpCods",GrpCods);
|
||||
Par_PutParString (NULL,"GrpCods",GrpCods);
|
||||
free (GrpCods);
|
||||
}
|
||||
else
|
||||
/***** Write the boolean parameter that indicates
|
||||
if all groups should be listed *****/
|
||||
Par_PutHiddenParamChar ("AllGroups",'Y');
|
||||
Par_PutParChar ("AllGroups",'Y');
|
||||
|
||||
/***** Free structure that stores the query result *****/
|
||||
if (Gbl.Crs.Grps.NumGrps)
|
||||
|
@ -1948,7 +1948,7 @@ void Att_RegisterMeAsStdInAttEvent (void)
|
|||
CommentStd,CommentTch);
|
||||
if (asprintf (&ParamName,"CommentStd%s",Gbl.Usrs.Me.UsrDat.EnUsrCod) < 0)
|
||||
Err_NotEnoughMemoryExit ();
|
||||
Par_GetParToHTML (ParamName,CommentStd,Cns_MAX_BYTES_TEXT);
|
||||
Par_GetParHTML (ParamName,CommentStd,Cns_MAX_BYTES_TEXT);
|
||||
free (ParamName);
|
||||
|
||||
if (Present ||
|
||||
|
@ -2067,7 +2067,7 @@ void Att_RegisterStudentsInAttEvent (void)
|
|||
if (asprintf (&ParamName,"CommentTch%s",
|
||||
Gbl.Usrs.LstUsrs[Rol_STD].Lst[NumUsr].EnUsrCod) < 0)
|
||||
Err_NotEnoughMemoryExit ();
|
||||
Par_GetParToHTML (ParamName,CommentTch,Cns_MAX_BYTES_TEXT);
|
||||
Par_GetParHTML (ParamName,CommentTch,Cns_MAX_BYTES_TEXT);
|
||||
free (ParamName);
|
||||
|
||||
Present = !Gbl.Usrs.LstUsrs[Rol_STD].Lst[NumUsr].Remove;
|
||||
|
@ -2266,7 +2266,7 @@ static void Att_ListOrPrintMyAttendanceCrs (Att_TypeOfView_t TypeOfView)
|
|||
Att_GetListAttEvents (&Events,Att_OLDEST_FIRST);
|
||||
|
||||
/***** Get boolean parameter that indicates if details must be shown *****/
|
||||
Events.ShowDetails = Par_GetParToBool ("ShowDetails");
|
||||
Events.ShowDetails = Par_GetParBool ("ShowDetails");
|
||||
|
||||
/***** Get list of groups selected ******/
|
||||
Grp_GetParCodsSeveralGrpsToShowUsrs ();
|
||||
|
@ -2371,7 +2371,7 @@ static void Att_ListOrPrintUsrsAttendanceCrs (void *TypeOfView)
|
|||
|
||||
/***** Get parameters *****/
|
||||
/* Get boolean parameter that indicates if details must be shown */
|
||||
Events.ShowDetails = Par_GetParToBool ("ShowDetails");
|
||||
Events.ShowDetails = Par_GetParBool ("ShowDetails");
|
||||
|
||||
/* Get list of groups selected */
|
||||
Grp_GetParCodsSeveralGrpsToShowUsrs ();
|
||||
|
@ -2581,10 +2581,10 @@ static void Att_PutFormToPrintMyListParams (void *Events)
|
|||
if (Events)
|
||||
{
|
||||
if (((struct Att_Events *) Events)->ShowDetails)
|
||||
Par_PutHiddenParamChar ("ShowDetails",'Y');
|
||||
Par_PutParChar ("ShowDetails",'Y');
|
||||
if (((struct Att_Events *) Events)->StrAttCodsSelected)
|
||||
if (((struct Att_Events *) Events)->StrAttCodsSelected[0])
|
||||
Par_PutHiddenParamString (NULL,"AttCods",((struct Att_Events *) Events)->StrAttCodsSelected);
|
||||
Par_PutParString (NULL,"AttCods",((struct Att_Events *) Events)->StrAttCodsSelected);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2611,12 +2611,12 @@ static void Att_PutParamsToPrintStdsList (void *Events)
|
|||
if (Events)
|
||||
{
|
||||
if (((struct Att_Events *) Events)->ShowDetails)
|
||||
Par_PutHiddenParamChar ("ShowDetails",'Y');
|
||||
Par_PutParChar ("ShowDetails",'Y');
|
||||
Grp_PutParamsCodGrps ();
|
||||
Usr_PutHiddenParSelectedUsrsCods (&Gbl.Usrs.Selected);
|
||||
if (((struct Att_Events *) Events)->StrAttCodsSelected)
|
||||
if (((struct Att_Events *) Events)->StrAttCodsSelected[0])
|
||||
Par_PutHiddenParamString (NULL,"AttCods",((struct Att_Events *) Events)->StrAttCodsSelected);
|
||||
Par_PutParString (NULL,"AttCods",((struct Att_Events *) Events)->StrAttCodsSelected);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2631,12 +2631,12 @@ static void Att_PutButtonToShowDetails (const struct Att_Events *Events)
|
|||
/***** Button to show more details *****/
|
||||
/* Begin form */
|
||||
Frm_BeginFormAnchor (Gbl.Action.Act,Att_ATTENDANCE_DETAILS_ID);
|
||||
Par_PutHiddenParamChar ("ShowDetails",'Y');
|
||||
Par_PutParChar ("ShowDetails",'Y');
|
||||
Grp_PutParamsCodGrps ();
|
||||
Usr_PutHiddenParSelectedUsrsCods (&Gbl.Usrs.Selected);
|
||||
if (Events->StrAttCodsSelected)
|
||||
if (Events->StrAttCodsSelected[0])
|
||||
Par_PutHiddenParamString (NULL,"AttCods",Events->StrAttCodsSelected);
|
||||
Par_PutParString (NULL,"AttCods",Events->StrAttCodsSelected);
|
||||
|
||||
/* Button */
|
||||
Btn_PutConfirmButton (Txt_Show_more_details);
|
||||
|
|
|
@ -81,7 +81,7 @@ void AttRsc_WriteAttEventInCrsProgram (long AttCod,bool PutFormToGo,
|
|||
NextAction = (AttCod > 0) ? ActSeeOneAtt : // Attendance events specified
|
||||
ActSeeAtt; // All attendance events
|
||||
Frm_BeginForm (NextAction);
|
||||
Par_PutParCod (Par_AttCod,AttCod);
|
||||
Par_PutParCode (Par_AttCod,AttCod);
|
||||
Att_PutParamsCodGrps (AttCod);
|
||||
HTM_BUTTON_Submit_Begin (Txt_Actions[NextAction],
|
||||
"class=\"LM BT_LINK PRG_LNK_%s\"",
|
||||
|
|
|
@ -508,7 +508,7 @@ static void Ban_ListBannersForEdition (struct Ban_Banners *Banners)
|
|||
static void Ban_PutParamBanCodToEdit (void *BanCod)
|
||||
{
|
||||
if (BanCod)
|
||||
Par_PutParCod (Par_BanCod,*((long *) BanCod));
|
||||
Par_PutParCode (Par_BanCod,*((long *) BanCod));
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -652,7 +652,7 @@ static void Ban_RenameBanner (struct Ban_Banner *Ban,
|
|||
Ban->BanCod = Par_GetAndCheckParCode (Par_BanCod);
|
||||
|
||||
/* Get the new name for the banner */
|
||||
Par_GetParToText (ParamName,NewBanName,MaxBytes);
|
||||
Par_GetParText (ParamName,NewBanName,MaxBytes);
|
||||
|
||||
/***** Get banner data from the database *****/
|
||||
Ban_GetDataOfBannerByCod (Ban);
|
||||
|
@ -710,7 +710,7 @@ void Ban_ChangeBannerImg (void)
|
|||
Ban->BanCod = Par_GetAndCheckParCode (Par_BanCod);
|
||||
|
||||
/* Get the new WWW for the banner */
|
||||
Par_GetParToText ("Img",NewImg,Ban_MAX_BYTES_IMAGE);
|
||||
Par_GetParText ("Img",NewImg,Ban_MAX_BYTES_IMAGE);
|
||||
|
||||
/***** Get banner data from the database *****/
|
||||
Ban_GetDataOfBannerByCod (Ban);
|
||||
|
@ -752,7 +752,7 @@ void Ban_ChangeBannerWWW (void)
|
|||
Ban->BanCod = Par_GetAndCheckParCode (Par_BanCod);
|
||||
|
||||
/* Get the new WWW for the banner */
|
||||
Par_GetParToText ("WWW",NewWWW,Cns_MAX_BYTES_WWW);
|
||||
Par_GetParText ("WWW",NewWWW,Cns_MAX_BYTES_WWW);
|
||||
|
||||
/***** Get banner data from the database *****/
|
||||
Ban_GetDataOfBannerByCod (Ban);
|
||||
|
@ -918,10 +918,10 @@ void Ban_ReceiveFormNewBanner (void)
|
|||
Ban_ResetBanner (Ban);
|
||||
|
||||
/***** Get parameters from form *****/
|
||||
Par_GetParToText ("ShortName",Ban->ShrtName,Ban_MAX_BYTES_SHRT_NAME);
|
||||
Par_GetParToText ("FullName" ,Ban->FullName,Ban_MAX_BYTES_FULL_NAME);
|
||||
Par_GetParToText ("Img" ,Ban->Img ,Ban_MAX_BYTES_IMAGE);
|
||||
Par_GetParToText ("WWW" ,Ban->WWW ,Cns_MAX_BYTES_WWW);
|
||||
Par_GetParText ("ShortName",Ban->ShrtName,Ban_MAX_BYTES_SHRT_NAME);
|
||||
Par_GetParText ("FullName" ,Ban->FullName,Ban_MAX_BYTES_FULL_NAME);
|
||||
Par_GetParText ("Img" ,Ban->Img ,Ban_MAX_BYTES_IMAGE);
|
||||
Par_GetParText ("WWW" ,Ban->WWW ,Cns_MAX_BYTES_WWW);
|
||||
|
||||
if (Ban->ShrtName[0] &&
|
||||
Ban->FullName[0]) // If there's a banner name
|
||||
|
@ -981,8 +981,8 @@ void Ban_WriteMenuWithBanners (void)
|
|||
|
||||
/* Begin form */
|
||||
Frm_BeginForm (ActClkBan);
|
||||
Par_PutParCod (Par_BanCod,Banners.Lst[NumBan].BanCod);
|
||||
Par_PutHiddenParamString (NULL,"URL",Banners.Lst[NumBan].WWW);
|
||||
Par_PutParCode (Par_BanCod,Banners.Lst[NumBan].BanCod);
|
||||
Par_PutParString (NULL,"URL",Banners.Lst[NumBan].WWW);
|
||||
|
||||
/* Banner image */
|
||||
HTM_INPUT_IMAGE (Cfg_URL_BANNER_PUBLIC,Banners.Lst[NumBan].Img,
|
||||
|
|
|
@ -1909,7 +1909,7 @@ void Brw_GetParAndInitFileBrowser (void)
|
|||
|
||||
case ActCreFolBrf: case ActRenFolBrf:
|
||||
/* Get the name of the new folder */
|
||||
Par_GetParToText ("NewFolderName",Gbl.FileBrowser.NewFilFolLnkName,NAME_MAX);
|
||||
Par_GetParText ("NewFolderName",Gbl.FileBrowser.NewFilFolLnkName,NAME_MAX);
|
||||
break;
|
||||
case ActCreLnkDocIns:
|
||||
case ActCreLnkShaIns:
|
||||
|
@ -1927,7 +1927,7 @@ void Brw_GetParAndInitFileBrowser (void)
|
|||
case ActCreLnkDocPrj:
|
||||
case ActCreLnkBrf:
|
||||
/* Get the name of the new link */
|
||||
Par_GetParToText ("NewLinkName",Gbl.FileBrowser.NewFilFolLnkName,NAME_MAX);
|
||||
Par_GetParText ("NewLinkName",Gbl.FileBrowser.NewFilFolLnkName,NAME_MAX);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
@ -2109,10 +2109,10 @@ void Brw_PutParamsFileBrowser (const char *PathInTree,const char *FilFolLnkName,
|
|||
|
||||
/***** Path and file *****/
|
||||
if (PathInTree)
|
||||
Par_PutHiddenParamString (NULL,"Path",PathInTree);
|
||||
Par_PutParString (NULL,"Path",PathInTree);
|
||||
if (FilFolLnkName)
|
||||
Par_PutHiddenParamString (NULL,Brw_FileTypeParamName[FileType],FilFolLnkName);
|
||||
Par_PutParCod (Par_FilCod,FilCod);
|
||||
Par_PutParString (NULL,Brw_FileTypeParamName[FileType],FilFolLnkName);
|
||||
Par_PutParCode (Par_FilCod,FilCod);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -2129,7 +2129,7 @@ static void Brw_GetParamsPathInTreeAndFileName (void)
|
|||
/***** Get the path inside the tree
|
||||
(this path does not include
|
||||
the name of the file or folder at the end) *****/
|
||||
Par_GetParToText ("Path",Gbl.FileBrowser.FilFolLnk.Path,PATH_MAX);
|
||||
Par_GetParText ("Path",Gbl.FileBrowser.FilFolLnk.Path,PATH_MAX);
|
||||
|
||||
/* Check if path contains ".." */
|
||||
if (strstr (Gbl.FileBrowser.FilFolLnk.Path,"..")) // ".." is not allowed in path
|
||||
|
@ -3671,7 +3671,7 @@ void Brw_PutHiddenParamFullTreeIfSelected (void *FullTree)
|
|||
{
|
||||
if (FullTree)
|
||||
if (*((bool *) FullTree)) // Put hidden parameter only if full tree selected
|
||||
Par_PutHiddenParamChar ("FullTree",'Y');
|
||||
Par_PutParChar ("FullTree",'Y');
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -3680,7 +3680,7 @@ void Brw_PutHiddenParamFullTreeIfSelected (void *FullTree)
|
|||
|
||||
static bool Brw_GetFullTreeFromForm (void)
|
||||
{
|
||||
return Par_GetParToBool ("FullTree");
|
||||
return Par_GetParBool ("FullTree");
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -6497,8 +6497,8 @@ static void Brw_PutFormToUploadFilesUsingDropzone (const char *FileNameToShow)
|
|||
Cfg_URL_SWAD_CGI,
|
||||
Lan_STR_LANG_ID[Gbl.Prefs.Language],
|
||||
Cfg_URL_ICON_PUBLIC);
|
||||
Par_PutHiddenParamLong (NULL,"act",Act_GetActCod (Brw_ActUploadFileDropzone[Gbl.FileBrowser.Type]));
|
||||
Par_PutHiddenParamString (NULL,"ses",Gbl.Session.Id);
|
||||
Par_PutParLong (NULL,"act",Act_GetActCod (Brw_ActUploadFileDropzone[Gbl.FileBrowser.Type]));
|
||||
Par_PutParString (NULL,"ses",Gbl.Session.Id);
|
||||
Brw_PutImplicitParamsFileBrowser (&Gbl.FileBrowser.FilFolLnk);
|
||||
|
||||
HTM_DIV_Begin ("class=\"dz-message\"");
|
||||
|
@ -7144,7 +7144,7 @@ void Brw_RecLinkFileBrowser (void)
|
|||
if (Brw_CheckIfICanCreateIntoFolder (Gbl.FileBrowser.Level))
|
||||
{
|
||||
/***** Create a new file to store URL ****/
|
||||
Par_GetParToText ("NewLinkURL",URL,PATH_MAX);
|
||||
Par_GetParText ("NewLinkURL",URL,PATH_MAX);
|
||||
if ((LengthURL = strlen (URL)))
|
||||
{
|
||||
if (Gbl.FileBrowser.NewFilFolLnkName[0])
|
||||
|
@ -8387,7 +8387,7 @@ void Brw_ChgFileMetadata (void)
|
|||
|
||||
static bool Brw_GetParamPublicFile (void)
|
||||
{
|
||||
return Par_GetParToBool ("PublicFile");
|
||||
return Par_GetParBool ("PublicFile");
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -8397,7 +8397,7 @@ static bool Brw_GetParamPublicFile (void)
|
|||
static Brw_License_t Brw_GetParLicense (void)
|
||||
{
|
||||
return (Brw_License_t)
|
||||
Par_GetParToUnsignedLong ("License",
|
||||
Par_GetParUnsignedLong ("License",
|
||||
0,
|
||||
Brw_NUM_LICENSES - 1,
|
||||
(unsigned long) Brw_LICENSE_UNKNOWN);
|
||||
|
@ -9873,7 +9873,7 @@ void Brw_RemoveOldFilesBriefcase (void)
|
|||
{
|
||||
/***** Get parameter with number of months without access *****/
|
||||
Months = (unsigned)
|
||||
Par_GetParToUnsignedLong ("Months",
|
||||
Par_GetParUnsignedLong ("Months",
|
||||
Brw_MIN_MONTHS_TO_REMOVE_OLD_FILES,
|
||||
Brw_MAX_MONTHS_IN_BRIEFCASE,
|
||||
Brw_DEF_MONTHS_TO_REMOVE_OLD_FILES);
|
||||
|
|
|
@ -129,7 +129,7 @@ void Bld_SeeBuildings (void)
|
|||
{
|
||||
HTM_TH_Begin (HTM_HEAD_LEFT);
|
||||
Frm_BeginForm (ActSeeBld);
|
||||
Par_PutHiddenParamUnsigned (NULL,"Order",(unsigned) Order);
|
||||
Par_PutParUnsigned (NULL,"Order",(unsigned) Order);
|
||||
HTM_BUTTON_Submit_Begin (Txt_BUILDINGS_HELP_ORDER[Order],
|
||||
"class=\"BT_LINK\"");
|
||||
if (Order == Buildings.SelectedOrder)
|
||||
|
@ -195,7 +195,7 @@ void Bld_SeeBuildings (void)
|
|||
|
||||
static Bld_Order_t Bld_GetParamBuildingOrder (void)
|
||||
{
|
||||
return (Bld_Order_t) Par_GetParToUnsignedLong ("Order",
|
||||
return (Bld_Order_t) Par_GetParUnsignedLong ("Order",
|
||||
0,
|
||||
Bld_NUM_ORDERS - 1,
|
||||
(unsigned long) Bld_ORDER_DEFAULT);
|
||||
|
@ -489,7 +489,7 @@ static void Bld_ListBuildingsForEdition (const struct Bld_Buildings *Buildings)
|
|||
static void Bld_PutParamBldCod (void *BldCod)
|
||||
{
|
||||
if (BldCod)
|
||||
Par_PutParCod (Par_BldCod,*((long *) BldCod));
|
||||
Par_PutParCode (Par_BldCod,*((long *) BldCod));
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -583,7 +583,7 @@ static void Bld_RenameBuilding (Cns_ShrtOrFullName_t ShrtOrFullName)
|
|||
Bld_EditingBuilding->BldCod = Par_GetAndCheckParCode (Par_BldCod);
|
||||
|
||||
/* Get the new name for the building */
|
||||
Par_GetParToText (ParamName,NewClaName,MaxBytes);
|
||||
Par_GetParText (ParamName,NewClaName,MaxBytes);
|
||||
|
||||
/***** Get from the database the old names of the building *****/
|
||||
Bld_GetDataOfBuildingByCod (Bld_EditingBuilding);
|
||||
|
@ -640,7 +640,7 @@ void Bld_ChangeBuildingLocation (void)
|
|||
Bld_EditingBuilding->BldCod = Par_GetAndCheckParCode (Par_BldCod);
|
||||
|
||||
/* Get the new location for the building */
|
||||
Par_GetParToText ("Location",NewLocation,Bld_MAX_BYTES_LOCATION);
|
||||
Par_GetParText ("Location",NewLocation,Bld_MAX_BYTES_LOCATION);
|
||||
|
||||
/***** Get from the database the old location of the building *****/
|
||||
Bld_GetDataOfBuildingByCod (Bld_EditingBuilding);
|
||||
|
@ -782,13 +782,13 @@ void Bld_ReceiveFormNewBuilding (void)
|
|||
|
||||
/***** Get parameters from form *****/
|
||||
/* Get building short name */
|
||||
Par_GetParToText ("ShortName",Bld_EditingBuilding->ShrtName,Bld_MAX_BYTES_SHRT_NAME);
|
||||
Par_GetParText ("ShortName",Bld_EditingBuilding->ShrtName,Bld_MAX_BYTES_SHRT_NAME);
|
||||
|
||||
/* Get building full name */
|
||||
Par_GetParToText ("FullName",Bld_EditingBuilding->FullName,Bld_MAX_BYTES_FULL_NAME);
|
||||
Par_GetParText ("FullName",Bld_EditingBuilding->FullName,Bld_MAX_BYTES_FULL_NAME);
|
||||
|
||||
/* Get building location */
|
||||
Par_GetParToText ("Location",Bld_EditingBuilding->Location,Bld_MAX_BYTES_LOCATION);
|
||||
Par_GetParText ("Location",Bld_EditingBuilding->Location,Bld_MAX_BYTES_LOCATION);
|
||||
|
||||
if (Bld_EditingBuilding->ShrtName[0] &&
|
||||
Bld_EditingBuilding->FullName[0]) // If there's a building name
|
||||
|
|
|
@ -131,7 +131,7 @@ void Cal_ShowFormToSelFirstDayOfWeek (Act_Action_t Action,
|
|||
{
|
||||
Set_BeginPref (FirstDayOfWeek == Gbl.Prefs.FirstDayOfWeek);
|
||||
Frm_BeginForm (Action);
|
||||
Par_PutHiddenParamUnsigned (NULL,"FirstDayOfWeek",FirstDayOfWeek);
|
||||
Par_PutParUnsigned (NULL,"FirstDayOfWeek",FirstDayOfWeek);
|
||||
if (FuncParams) // Extra parameters depending on the action
|
||||
FuncParams (Args);
|
||||
snprintf (Icon,sizeof (Icon),"first-day-of-week-%u.png",FirstDayOfWeek);
|
||||
|
@ -172,7 +172,7 @@ static unsigned Cal_GetParamFirstDayOfWeek (void)
|
|||
unsigned FirstDayOfWeek;
|
||||
|
||||
FirstDayOfWeek = (unsigned)
|
||||
Par_GetParToUnsignedLong ("FirstDayOfWeek",
|
||||
Par_GetParUnsignedLong ("FirstDayOfWeek",
|
||||
0,
|
||||
6,
|
||||
Cal_FIRST_DAY_OF_WEEK_DEFAULT);
|
||||
|
|
|
@ -172,7 +172,7 @@ static long Cfe_GetParamsCallsForExams (struct Cfe_CallsForExams *CallsForExams)
|
|||
ExaCod = Par_GetAndCheckParCode (Par_ExaCod);
|
||||
|
||||
/***** Get the name of the course (it is allowed to be different from the official name of the course) *****/
|
||||
Par_GetParToText ("CrsName",CallsForExams->CallForExam.CrsFullName,Cns_HIERARCHY_MAX_BYTES_FULL_NAME);
|
||||
Par_GetParText ("CrsName",CallsForExams->CallForExam.CrsFullName,Cns_HIERARCHY_MAX_BYTES_FULL_NAME);
|
||||
// If the parameter is not present or is empty, initialize the string to the full name of the current course
|
||||
if (!CallsForExams->CallForExam.CrsFullName[0])
|
||||
Str_Copy (CallsForExams->CallForExam.CrsFullName,Gbl.Hierarchy.Crs.FullName,
|
||||
|
@ -180,13 +180,13 @@ static long Cfe_GetParamsCallsForExams (struct Cfe_CallsForExams *CallsForExams)
|
|||
|
||||
/***** Get the year *****/
|
||||
CallsForExams->CallForExam.Year = (unsigned)
|
||||
Par_GetParToUnsignedLong ("Year",
|
||||
Par_GetParUnsignedLong ("Year",
|
||||
0, // N.A.
|
||||
Deg_MAX_YEARS_PER_DEGREE,
|
||||
(unsigned long) Gbl.Hierarchy.Crs.Year);
|
||||
|
||||
/***** Get the type of call for exam *****/
|
||||
Par_GetParToText ("ExamSession",CallsForExams->CallForExam.Session,Cfe_MAX_BYTES_SESSION);
|
||||
Par_GetParText ("ExamSession",CallsForExams->CallForExam.Session,Cfe_MAX_BYTES_SESSION);
|
||||
|
||||
/***** Get the date of the exam *****/
|
||||
Dat_GetDateFromForm ("ExamDay","ExamMonth","ExamYear",
|
||||
|
@ -203,27 +203,27 @@ static long Cfe_GetParamsCallsForExams (struct Cfe_CallsForExams *CallsForExams)
|
|||
}
|
||||
|
||||
/***** Get the hour of the exam *****/
|
||||
CallsForExams->CallForExam.StartTime.Hour = (unsigned) Par_GetParToUnsignedLong ("ExamHour",
|
||||
CallsForExams->CallForExam.StartTime.Hour = (unsigned) Par_GetParUnsignedLong ("ExamHour",
|
||||
0,23,0);
|
||||
CallsForExams->CallForExam.StartTime.Minute = (unsigned) Par_GetParToUnsignedLong ("ExamMinute",
|
||||
CallsForExams->CallForExam.StartTime.Minute = (unsigned) Par_GetParUnsignedLong ("ExamMinute",
|
||||
0,59,0);
|
||||
|
||||
/***** Get the duration of the exam *****/
|
||||
CallsForExams->CallForExam.Duration.Hour = (unsigned) Par_GetParToUnsignedLong ("DurationHour",
|
||||
CallsForExams->CallForExam.Duration.Hour = (unsigned) Par_GetParUnsignedLong ("DurationHour",
|
||||
0,23,0);
|
||||
CallsForExams->CallForExam.Duration.Minute = (unsigned) Par_GetParToUnsignedLong ("DurationMinute",
|
||||
CallsForExams->CallForExam.Duration.Minute = (unsigned) Par_GetParUnsignedLong ("DurationMinute",
|
||||
0,59,0);
|
||||
|
||||
/***** Get the place where the exam will happen, the modality of exam,
|
||||
the structure of exam, the mandatory documentation, the mandatory material,
|
||||
the allowed material and other information *****/
|
||||
Par_GetParToHTML ("Place" ,CallsForExams->CallForExam.Place ,Cns_MAX_BYTES_TEXT);
|
||||
Par_GetParToHTML ("ExamMode" ,CallsForExams->CallForExam.Mode ,Cns_MAX_BYTES_TEXT);
|
||||
Par_GetParToHTML ("Structure" ,CallsForExams->CallForExam.Structure ,Cns_MAX_BYTES_TEXT);
|
||||
Par_GetParToHTML ("DocRequired",CallsForExams->CallForExam.DocRequired,Cns_MAX_BYTES_TEXT);
|
||||
Par_GetParToHTML ("MatRequired",CallsForExams->CallForExam.MatRequired,Cns_MAX_BYTES_TEXT);
|
||||
Par_GetParToHTML ("MatAllowed" ,CallsForExams->CallForExam.MatAllowed ,Cns_MAX_BYTES_TEXT);
|
||||
Par_GetParToHTML ("OtherInfo" ,CallsForExams->CallForExam.OtherInfo ,Cns_MAX_BYTES_TEXT);
|
||||
Par_GetParHTML ("Place" ,CallsForExams->CallForExam.Place ,Cns_MAX_BYTES_TEXT);
|
||||
Par_GetParHTML ("ExamMode" ,CallsForExams->CallForExam.Mode ,Cns_MAX_BYTES_TEXT);
|
||||
Par_GetParHTML ("Structure" ,CallsForExams->CallForExam.Structure ,Cns_MAX_BYTES_TEXT);
|
||||
Par_GetParHTML ("DocRequired",CallsForExams->CallForExam.DocRequired,Cns_MAX_BYTES_TEXT);
|
||||
Par_GetParHTML ("MatRequired",CallsForExams->CallForExam.MatRequired,Cns_MAX_BYTES_TEXT);
|
||||
Par_GetParHTML ("MatAllowed" ,CallsForExams->CallForExam.MatAllowed ,Cns_MAX_BYTES_TEXT);
|
||||
Par_GetParHTML ("OtherInfo" ,CallsForExams->CallForExam.OtherInfo ,Cns_MAX_BYTES_TEXT);
|
||||
|
||||
return ExaCod;
|
||||
}
|
||||
|
@ -598,7 +598,7 @@ static void Cfe_GetDateToHighlight (struct Cfe_CallsForExams *CallsForExams)
|
|||
{
|
||||
/***** Get the date (in YYYYMMDD format)
|
||||
of the calls for exams to highlight *****/
|
||||
Par_GetParToText ("Date",CallsForExams->HighlightDate,4 + 2 + 2);
|
||||
Par_GetParText ("Date",CallsForExams->HighlightDate,4 + 2 + 2);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -958,7 +958,7 @@ static void Cfe_ShowCallForExam (struct Cfe_CallsForExams *CallsForExams,
|
|||
{
|
||||
/***** Begin form *****/
|
||||
Frm_BeginFormAnchor (ActRcvCfe,Anchor);
|
||||
Par_PutParCod (Par_ExaCod,ExaCod);
|
||||
Par_PutParCode (Par_ExaCod,ExaCod);
|
||||
}
|
||||
|
||||
/***** Begin table *****/
|
||||
|
@ -1547,7 +1547,7 @@ bool Cfe_CheckIfICanEditCallsForExams (void)
|
|||
static void Cfe_PutParamExaCodToEdit (void *ExaCod)
|
||||
{
|
||||
if (ExaCod)
|
||||
Par_PutParCod (Par_ExaCod,*((long *) ExaCod));
|
||||
Par_PutParCode (Par_ExaCod,*((long *) ExaCod));
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
|
@ -91,7 +91,7 @@ void CfeRsc_WriteCallForExamInCrsProgram (long ExaCod,bool PutFormToGo,
|
|||
NextAction = (ExaCod > 0) ? ActSeeOneCfe : // Call for exam specified
|
||||
ActSeeAllCfe; // All calls for exams
|
||||
Frm_BeginFormAnchor (NextAction,Anchor);
|
||||
Par_PutParCod (Par_ExaCod,ExaCod);
|
||||
Par_PutParCode (Par_ExaCod,ExaCod);
|
||||
HTM_BUTTON_Submit_Begin (Txt_Actions[NextAction],
|
||||
"class=\"LM BT_LINK PRG_LNK_%s\"",
|
||||
The_GetSuffix ());
|
||||
|
|
|
@ -416,7 +416,7 @@ static void Ctr_ListOneCenterForSeeing (struct Ctr_Center *Ctr,unsigned NumCtr)
|
|||
static void Ctr_GetParamCtrOrder (void)
|
||||
{
|
||||
Gbl.Hierarchy.Ctrs.SelectedOrder = (Ctr_Order_t)
|
||||
Par_GetParToUnsignedLong ("Order",
|
||||
Par_GetParUnsignedLong ("Order",
|
||||
0,
|
||||
Ctr_NUM_ORDERS - 1,
|
||||
(unsigned long) Ctr_ORDER_DEFAULT);
|
||||
|
@ -958,7 +958,7 @@ static bool Ctr_CheckIfICanEditACenter (struct Ctr_Center *Ctr)
|
|||
|
||||
void Ctr_PutParamCtrCod (long CtrCod)
|
||||
{
|
||||
Par_PutHiddenParamLong (NULL,"ctr",CtrCod);
|
||||
Par_PutParLong (NULL,"ctr",CtrCod);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -975,7 +975,7 @@ void Ctr_RemoveCenter (void)
|
|||
Ctr_EditingCenterConstructor ();
|
||||
|
||||
/***** Get center code *****/
|
||||
Ctr_EditingCtr->CtrCod = Hie_GetAndCheckParamOtherHieCod (1);
|
||||
Ctr_EditingCtr->CtrCod = Par_GetAndCheckParCode (Par_OthHieCod);
|
||||
|
||||
/***** Get data of the center from database *****/
|
||||
Ctr_GetDataOfCenterByCod (Ctr_EditingCtr);
|
||||
|
@ -1047,7 +1047,7 @@ void Ctr_ChangeCtrPlc (void)
|
|||
Ctr_EditingCenterConstructor ();
|
||||
|
||||
/***** Get center code *****/
|
||||
Ctr_EditingCtr->CtrCod = Hie_GetAndCheckParamOtherHieCod (1);
|
||||
Ctr_EditingCtr->CtrCod = Par_GetAndCheckParCode (Par_OthHieCod);
|
||||
|
||||
/***** Get parameter with place code *****/
|
||||
NewPlcCod = Plc_GetParamPlcCod ();
|
||||
|
@ -1075,7 +1075,7 @@ void Ctr_RenameCenterShort (void)
|
|||
Ctr_EditingCenterConstructor ();
|
||||
|
||||
/***** Rename center *****/
|
||||
Ctr_EditingCtr->CtrCod = Hie_GetAndCheckParamOtherHieCod (1);
|
||||
Ctr_EditingCtr->CtrCod = Par_GetAndCheckParCode (Par_OthHieCod);
|
||||
Ctr_RenameCenter (Ctr_EditingCtr,Cns_SHRT_NAME);
|
||||
}
|
||||
|
||||
|
@ -1085,7 +1085,7 @@ void Ctr_RenameCenterFull (void)
|
|||
Ctr_EditingCenterConstructor ();
|
||||
|
||||
/***** Rename center *****/
|
||||
Ctr_EditingCtr->CtrCod = Hie_GetAndCheckParamOtherHieCod (1);
|
||||
Ctr_EditingCtr->CtrCod = Par_GetAndCheckParCode (Par_OthHieCod);
|
||||
Ctr_RenameCenter (Ctr_EditingCtr,Cns_FULL_NAME);
|
||||
}
|
||||
|
||||
|
@ -1122,7 +1122,7 @@ void Ctr_RenameCenter (struct Ctr_Center *Ctr,Cns_ShrtOrFullName_t ShrtOrFullNam
|
|||
|
||||
/***** Get parameters from form *****/
|
||||
/* Get the new name for the center */
|
||||
Par_GetParToText (ParamName,NewCtrName,MaxBytes);
|
||||
Par_GetParText (ParamName,NewCtrName,MaxBytes);
|
||||
|
||||
/***** Get from the database the old names of the center *****/
|
||||
Ctr_GetDataOfCenterByCod (Ctr);
|
||||
|
@ -1174,10 +1174,10 @@ void Ctr_ChangeCtrWWW (void)
|
|||
Ctr_EditingCenterConstructor ();
|
||||
|
||||
/***** Get the code of the center *****/
|
||||
Ctr_EditingCtr->CtrCod = Hie_GetAndCheckParamOtherHieCod (1);
|
||||
Ctr_EditingCtr->CtrCod = Par_GetAndCheckParCode (Par_OthHieCod);
|
||||
|
||||
/***** Get the new WWW for the center *****/
|
||||
Par_GetParToText ("WWW",NewWWW,Cns_MAX_BYTES_WWW);
|
||||
Par_GetParText ("WWW",NewWWW,Cns_MAX_BYTES_WWW);
|
||||
|
||||
/***** Get data of center *****/
|
||||
Ctr_GetDataOfCenterByCod (Ctr_EditingCtr);
|
||||
|
@ -1213,7 +1213,7 @@ void Ctr_ChangeCtrStatus (void)
|
|||
|
||||
/***** Get parameters from form *****/
|
||||
/* Get center code */
|
||||
Ctr_EditingCtr->CtrCod = Hie_GetAndCheckParamOtherHieCod (1);
|
||||
Ctr_EditingCtr->CtrCod = Par_GetAndCheckParCode (Par_OthHieCod);
|
||||
|
||||
/* Get parameter with status */
|
||||
Status = Hie_GetParamStatus (); // New status
|
||||
|
@ -1427,7 +1427,7 @@ static void Ctr_PutHeadCentersForSeeing (bool OrderSelectable)
|
|||
if (OrderSelectable)
|
||||
{
|
||||
Frm_BeginForm (ActSeeCtr);
|
||||
Par_PutHiddenParamUnsigned (NULL,"Order",(unsigned) Order);
|
||||
Par_PutParUnsigned (NULL,"Order",(unsigned) Order);
|
||||
HTM_BUTTON_Submit_Begin (Txt_CENTERS_HELP_ORDER[Order],
|
||||
"class=\"BT_LINK\"");
|
||||
if (Order == Gbl.Hierarchy.Ctrs.SelectedOrder)
|
||||
|
@ -1539,11 +1539,11 @@ static void Ctr_ReceiveFormRequestOrCreateCtr (Hie_Status_t Status)
|
|||
Err_WrongPlaceExit ();
|
||||
|
||||
/* Get center short name and full name */
|
||||
Par_GetParToText ("ShortName",Ctr_EditingCtr->ShrtName,Cns_HIERARCHY_MAX_BYTES_SHRT_NAME);
|
||||
Par_GetParToText ("FullName" ,Ctr_EditingCtr->FullName,Cns_HIERARCHY_MAX_BYTES_FULL_NAME);
|
||||
Par_GetParText ("ShortName",Ctr_EditingCtr->ShrtName,Cns_HIERARCHY_MAX_BYTES_SHRT_NAME);
|
||||
Par_GetParText ("FullName" ,Ctr_EditingCtr->FullName,Cns_HIERARCHY_MAX_BYTES_FULL_NAME);
|
||||
|
||||
/* Get center WWW */
|
||||
Par_GetParToText ("WWW",Ctr_EditingCtr->WWW,Cns_MAX_BYTES_WWW);
|
||||
Par_GetParText ("WWW",Ctr_EditingCtr->WWW,Cns_MAX_BYTES_WWW);
|
||||
|
||||
if (Ctr_EditingCtr->ShrtName[0] &&
|
||||
Ctr_EditingCtr->FullName[0]) // If there's a center name
|
||||
|
|
|
@ -987,7 +987,7 @@ void CtrCfg_ChangeCtrPhotoAttr (void)
|
|||
|
||||
/***** Get parameters from form *****/
|
||||
/* Get the new photo attribution for the center */
|
||||
Par_GetParToText ("Attribution",NewPhotoAttribution,Med_MAX_BYTES_ATTRIBUTION);
|
||||
Par_GetParText ("Attribution",NewPhotoAttribution,Med_MAX_BYTES_ATTRIBUTION);
|
||||
|
||||
/***** Update the table changing old attribution by new attribution *****/
|
||||
Ctr_DB_UpdateCtrPhotoAttribution (Gbl.Hierarchy.Ctr.CtrCod,NewPhotoAttribution);
|
||||
|
@ -1097,7 +1097,7 @@ void CtrCfg_ChangeCtrLatitude (void)
|
|||
double NewLatitude;
|
||||
|
||||
/***** Get latitude *****/
|
||||
Par_GetParToText ("Latitude",LatitudeStr,sizeof (LatitudeStr) - 1);
|
||||
Par_GetParText ("Latitude",LatitudeStr,sizeof (LatitudeStr) - 1);
|
||||
NewLatitude = Map_GetLatitudeFromStr (LatitudeStr);
|
||||
|
||||
/***** Update database changing old latitude by new latitude *****/
|
||||
|
@ -1118,7 +1118,7 @@ void CtrCfg_ChangeCtrLongitude (void)
|
|||
double NewLongitude;
|
||||
|
||||
/***** Get longitude *****/
|
||||
Par_GetParToText ("Longitude",LongitudeStr,sizeof (LongitudeStr) - 1);
|
||||
Par_GetParText ("Longitude",LongitudeStr,sizeof (LongitudeStr) - 1);
|
||||
NewLongitude = Map_GetLongitudeFromStr (LongitudeStr);
|
||||
|
||||
/***** Update database changing old longitude by new longitude *****/
|
||||
|
@ -1139,7 +1139,7 @@ void CtrCfg_ChangeCtrAltitude (void)
|
|||
double NewAltitude;
|
||||
|
||||
/***** Get altitude *****/
|
||||
Par_GetParToText ("Altitude",AltitudeStr,sizeof (AltitudeStr) - 1);
|
||||
Par_GetParText ("Altitude",AltitudeStr,sizeof (AltitudeStr) - 1);
|
||||
NewAltitude = Map_GetAltitudeFromStr (AltitudeStr);
|
||||
|
||||
/***** Update database changing old altitude by new altitude *****/
|
||||
|
@ -1161,7 +1161,7 @@ void CtrCfg_ChangeCtrWWW (void)
|
|||
|
||||
/***** Get parameters from form *****/
|
||||
/* Get the new WWW for the center */
|
||||
Par_GetParToText ("WWW",NewWWW,Cns_MAX_BYTES_WWW);
|
||||
Par_GetParText ("WWW",NewWWW,Cns_MAX_BYTES_WWW);
|
||||
|
||||
/***** Check if new WWW is empty *****/
|
||||
if (NewWWW[0])
|
||||
|
|
|
@ -629,10 +629,11 @@ TODO: Emilce Barrera Mesa: Podr
|
|||
TODO: Emilce Barrera Mesa: Mis estudiantes presentan muchas dificultades a la hora de poner la foto porque la plataforma es muy exigente respecto al fondo de la imagen.
|
||||
|
||||
*/
|
||||
#define Log_PLATFORM_VERSION "SWAD 22.68 (2023-03-06)"
|
||||
#define Log_PLATFORM_VERSION "SWAD 22.69 (2023-03-07)"
|
||||
#define CSS_FILE "swad22.57.1.css"
|
||||
#define JS_FILE "swad22.49.js"
|
||||
/*
|
||||
Version 22.69: Mar 07, 2023 Code refactoring in parameters. Not finished. (336866 lines)
|
||||
Version 22.68: Mar 06, 2023 Code refactoring in parameters. Not finished. (336887 lines)
|
||||
Version 22.67.1: Mar 06, 2023 Code refactoring in dates. (337124 lines)
|
||||
Version 22.67: Mar 04, 2023 Code refactoring in parameters. Not finished. (337118 lines)
|
||||
|
|
12
swad_chat.c
12
swad_chat.c
|
@ -350,9 +350,9 @@ static void Cht_WriteLinkToChat2 (const char *RoomCode,const char *RoomFullName)
|
|||
|
||||
void Cht_WriteParamsRoomCodeAndNames (const char *RoomCode,const char *RoomShrtName,const char *RoomFullName)
|
||||
{
|
||||
Par_PutHiddenParamString (NULL,"RoomCode",RoomCode);
|
||||
Par_PutHiddenParamString (NULL,"RoomShrtName",RoomShrtName);
|
||||
Par_PutHiddenParamString (NULL,"RoomFullName",RoomFullName);
|
||||
Par_PutParString (NULL,"RoomCode",RoomCode);
|
||||
Par_PutParString (NULL,"RoomShrtName",RoomShrtName);
|
||||
Par_PutParString (NULL,"RoomFullName",RoomFullName);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -390,11 +390,11 @@ void Cht_OpenChatWindow (void)
|
|||
FILE *FileOut = Fil_GetOutputFile ();
|
||||
|
||||
/***** Get the code and the nombre of the room *****/
|
||||
Par_GetParToText ("RoomCode",RoomCode,Cht_MAX_BYTES_ROOM_CODE);
|
||||
Par_GetParText ("RoomCode",RoomCode,Cht_MAX_BYTES_ROOM_CODE);
|
||||
|
||||
Par_GetParToText ("RoomShrtName",RoomShrtName,Cht_MAX_BYTES_ROOM_SHRT_NAME);
|
||||
Par_GetParText ("RoomShrtName",RoomShrtName,Cht_MAX_BYTES_ROOM_SHRT_NAME);
|
||||
|
||||
Par_GetParToText ("RoomFullName",RoomFullName,Cht_MAX_BYTES_ROOM_FULL_NAME);
|
||||
Par_GetParText ("RoomFullName",RoomFullName,Cht_MAX_BYTES_ROOM_FULL_NAME);
|
||||
|
||||
if (!RoomCode[0] || !RoomShrtName[0] || !RoomFullName[0])
|
||||
Err_ShowErrorAndExit ("Wrong code or name of chat room.");
|
||||
|
|
|
@ -125,7 +125,7 @@ static void Coo_PutIconsCookies (__attribute__((unused)) void *Args)
|
|||
void Coo_ChangeMyPrefsCookies (void)
|
||||
{
|
||||
/***** Get param with preference about third party cookies *****/
|
||||
Gbl.Usrs.Me.UsrDat.Prefs.AcceptCookies = Par_GetParToBool ("cookies");
|
||||
Gbl.Usrs.Me.UsrDat.Prefs.AcceptCookies = Par_GetParBool ("cookies");
|
||||
|
||||
/***** Store preference in database *****/
|
||||
if (Gbl.Usrs.Me.Logged)
|
||||
|
|
|
@ -369,7 +369,7 @@ static void Cty_PutHeadCountriesForSeeing (bool OrderSelectable)
|
|||
if (OrderSelectable)
|
||||
{
|
||||
Frm_BeginForm (ActSeeCty);
|
||||
Par_PutHiddenParamUnsigned (NULL,"Order",(unsigned) Order);
|
||||
Par_PutParUnsigned (NULL,"Order",(unsigned) Order);
|
||||
HTM_BUTTON_Submit_Begin (Txt_COUNTRIES_HELP_ORDER[Order],
|
||||
"class=\"BT_LINK\"");
|
||||
if (Order == Gbl.Hierarchy.Ctys.SelectedOrder)
|
||||
|
@ -657,7 +657,7 @@ void Cty_WriteScriptGoogleGeochart (void)
|
|||
static void Cty_GetParamCtyOrder (void)
|
||||
{
|
||||
Gbl.Hierarchy.Ctys.SelectedOrder = (Cty_Order_t)
|
||||
Par_GetParToUnsignedLong ("Order",
|
||||
Par_GetParUnsignedLong ("Order",
|
||||
0,
|
||||
Cty_NUM_ORDERS - 1,
|
||||
(unsigned long) Cty_ORDER_DEFAULT);
|
||||
|
@ -1136,7 +1136,7 @@ static void Cty_ListCountriesForEdition (void)
|
|||
HTM_TD_Begin ("class=\"LT\"");
|
||||
Frm_BeginForm (ActRenCty);
|
||||
Cty_PutParamOtherCtyCod (&Cty->CtyCod);
|
||||
Par_PutHiddenParamUnsigned (NULL,"Lan",(unsigned) Lan);
|
||||
Par_PutParUnsigned (NULL,"Lan",(unsigned) Lan);
|
||||
HTM_INPUT_TEXT ("Name",Cty_MAX_CHARS_NAME,Cty->Name[Lan],
|
||||
HTM_SUBMIT_ON_CHANGE,
|
||||
"size=\"15\" class=\"INPUT_%s\"",
|
||||
|
@ -1148,7 +1148,7 @@ static void Cty_ListCountriesForEdition (void)
|
|||
HTM_TD_Begin ("class=\"LT\"");
|
||||
Frm_BeginForm (ActChgCtyWWW);
|
||||
Cty_PutParamOtherCtyCod (&Cty->CtyCod);
|
||||
Par_PutHiddenParamUnsigned (NULL,"Lan",(unsigned) Lan);
|
||||
Par_PutParUnsigned (NULL,"Lan",(unsigned) Lan);
|
||||
HTM_INPUT_URL ("WWW",Cty->WWW[Lan],HTM_SUBMIT_ON_CHANGE,
|
||||
"class=\"INPUT_WWW_NARROW INPUT_%s\""
|
||||
" required=\"required\"",
|
||||
|
@ -1170,7 +1170,7 @@ static void Cty_ListCountriesForEdition (void)
|
|||
|
||||
void Cty_PutParamCtyCod (long CtyCod)
|
||||
{
|
||||
Par_PutHiddenParamLong (NULL,"cty",CtyCod);
|
||||
Par_PutParLong (NULL,"cty",CtyCod);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -1180,7 +1180,7 @@ void Cty_PutParamCtyCod (long CtyCod)
|
|||
static void Cty_PutParamOtherCtyCod (void *CtyCod)
|
||||
{
|
||||
if (CtyCod)
|
||||
Par_PutParCod (Par_OthCtyCod,*((long *) CtyCod));
|
||||
Par_PutParCode (Par_OthCtyCod,*((long *) CtyCod));
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -1263,7 +1263,7 @@ void Cty_RenameCountry (void)
|
|||
Language = Lan_GetParamLanguage ();
|
||||
|
||||
/***** Get the new name for the country *****/
|
||||
Par_GetParToText ("Name",NewCtyName,Cty_MAX_BYTES_NAME);
|
||||
Par_GetParText ("Name",NewCtyName,Cty_MAX_BYTES_NAME);
|
||||
|
||||
/***** Get from the database the data of the country *****/
|
||||
Cty_GetDataOfCountryByCod (Cty_EditingCty);
|
||||
|
@ -1342,7 +1342,7 @@ void Cty_ChangeCtyWWW (void)
|
|||
Language = Lan_GetParamLanguage ();
|
||||
|
||||
/***** Get the new WWW for the country *****/
|
||||
Par_GetParToText ("WWW",NewWWW,Cns_MAX_BYTES_WWW);
|
||||
Par_GetParText ("WWW",NewWWW,Cns_MAX_BYTES_WWW);
|
||||
|
||||
/***** Get from the database the data of the country *****/
|
||||
Cty_GetDataOfCountryByCod (Cty_EditingCty);
|
||||
|
@ -1582,7 +1582,7 @@ void Cty_ReceiveFormNewCountry (void)
|
|||
else // Numeric code correct
|
||||
{
|
||||
/* Get alphabetic-2 country code */
|
||||
Par_GetParToText ("Alpha2",Cty_EditingCty->Alpha2,2);
|
||||
Par_GetParText ("Alpha2",Cty_EditingCty->Alpha2,2);
|
||||
Str_ConvertToUpperText (Cty_EditingCty->Alpha2);
|
||||
for (i = 0;
|
||||
i < 2 && CreateCountry;
|
||||
|
@ -1612,7 +1612,7 @@ void Cty_ReceiveFormNewCountry (void)
|
|||
Lan++)
|
||||
{
|
||||
snprintf (ParamName,sizeof (ParamName),"Name_%s",Lan_STR_LANG_ID[Lan]);
|
||||
Par_GetParToText (ParamName,Cty_EditingCty->Name[Lan],Cty_MAX_BYTES_NAME);
|
||||
Par_GetParText (ParamName,Cty_EditingCty->Name[Lan],Cty_MAX_BYTES_NAME);
|
||||
|
||||
if (Cty_EditingCty->Name[Lan][0]) // If there's a country name
|
||||
{
|
||||
|
@ -1635,7 +1635,7 @@ void Cty_ReceiveFormNewCountry (void)
|
|||
}
|
||||
|
||||
snprintf (ParamName,sizeof (ParamName),"WWW_%s",Lan_STR_LANG_ID[Lan]);
|
||||
Par_GetParToText (ParamName,Cty_EditingCty->WWW[Lan],Cns_MAX_BYTES_WWW);
|
||||
Par_GetParText (ParamName,Cty_EditingCty->WWW[Lan],Cns_MAX_BYTES_WWW);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -593,7 +593,7 @@ void CtyCfg_ChangeCtyMapAttr (void)
|
|||
|
||||
/***** Get parameters from form *****/
|
||||
/* Get the new map attribution for the country */
|
||||
Par_GetParToText ("Attribution",NewMapAttribution,Med_MAX_BYTES_ATTRIBUTION);
|
||||
Par_GetParText ("Attribution",NewMapAttribution,Med_MAX_BYTES_ATTRIBUTION);
|
||||
|
||||
/***** Change old attribution by new attribution in database *****/
|
||||
Cty_DB_UpdateCtyMapAttr (NewMapAttribution);
|
||||
|
|
|
@ -1555,17 +1555,17 @@ static void Crs_GetParamsNewCourse (struct Crs_Course *Crs)
|
|||
|
||||
/***** Get parameters of the course from form *****/
|
||||
/* Get institutional code */
|
||||
Par_GetParToText ("InsCrsCod",Crs->InstitutionalCrsCod,Crs_MAX_BYTES_INSTITUTIONAL_CRS_COD);
|
||||
Par_GetParText ("InsCrsCod",Crs->InstitutionalCrsCod,Crs_MAX_BYTES_INSTITUTIONAL_CRS_COD);
|
||||
|
||||
/* Get year */
|
||||
Par_GetParToText ("OthCrsYear",YearStr,2);
|
||||
Par_GetParText ("OthCrsYear",YearStr,2);
|
||||
Crs->Year = Deg_ConvStrToYear (YearStr);
|
||||
|
||||
/* Get course short name */
|
||||
Par_GetParToText ("ShortName",Crs->ShrtName,Cns_HIERARCHY_MAX_BYTES_SHRT_NAME);
|
||||
Par_GetParText ("ShortName",Crs->ShrtName,Cns_HIERARCHY_MAX_BYTES_SHRT_NAME);
|
||||
|
||||
/* Get course full name */
|
||||
Par_GetParToText ("FullName",Crs->FullName,Cns_HIERARCHY_MAX_BYTES_FULL_NAME);
|
||||
Par_GetParText ("FullName",Crs->FullName,Cns_HIERARCHY_MAX_BYTES_FULL_NAME);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -1581,7 +1581,7 @@ void Crs_RemoveCourse (void)
|
|||
Crs_EditingCourseConstructor ();
|
||||
|
||||
/***** Get course code *****/
|
||||
Crs_EditingCrs->CrsCod = Hie_GetAndCheckParamOtherHieCod (1);
|
||||
Crs_EditingCrs->CrsCod = Par_GetAndCheckParCode (Par_OthHieCod);
|
||||
|
||||
/***** Get data of the course from database *****/
|
||||
Crs_GetDataOfCourseByCod (Crs_EditingCrs);
|
||||
|
@ -1816,10 +1816,10 @@ void Crs_ChangeInsCrsCod (void)
|
|||
|
||||
/***** Get parameters from form *****/
|
||||
/* Get course code */
|
||||
Crs_EditingCrs->CrsCod = Hie_GetAndCheckParamOtherHieCod (1);
|
||||
Crs_EditingCrs->CrsCod = Par_GetAndCheckParCode (Par_OthHieCod);
|
||||
|
||||
/* Get institutional code */
|
||||
Par_GetParToText ("InsCrsCod",NewInstitutionalCrsCod,Crs_MAX_BYTES_INSTITUTIONAL_CRS_COD);
|
||||
Par_GetParText ("InsCrsCod",NewInstitutionalCrsCod,Crs_MAX_BYTES_INSTITUTIONAL_CRS_COD);
|
||||
|
||||
/* Get data of the course */
|
||||
Crs_GetDataOfCourseByCod (Crs_EditingCrs);
|
||||
|
@ -1862,10 +1862,10 @@ void Crs_ChangeCrsYear (void)
|
|||
|
||||
/***** Get parameters from form *****/
|
||||
/* Get course code */
|
||||
Crs_EditingCrs->CrsCod = Hie_GetAndCheckParamOtherHieCod (1);
|
||||
Crs_EditingCrs->CrsCod = Par_GetAndCheckParCode (Par_OthHieCod);
|
||||
|
||||
/* Get parameter with year */
|
||||
Par_GetParToText ("OthCrsYear",YearStr,2);
|
||||
Par_GetParText ("OthCrsYear",YearStr,2);
|
||||
NewYear = Deg_ConvStrToYear (YearStr);
|
||||
|
||||
Crs_GetDataOfCourseByCod (Crs_EditingCrs);
|
||||
|
@ -1945,7 +1945,7 @@ void Crs_RenameCourseShort (void)
|
|||
Crs_EditingCourseConstructor ();
|
||||
|
||||
/***** Rename course *****/
|
||||
Crs_EditingCrs->CrsCod = Hie_GetAndCheckParamOtherHieCod (1);
|
||||
Crs_EditingCrs->CrsCod = Par_GetAndCheckParCode (Par_OthHieCod);
|
||||
Crs_RenameCourse (Crs_EditingCrs,Cns_SHRT_NAME);
|
||||
}
|
||||
|
||||
|
@ -1955,7 +1955,7 @@ void Crs_RenameCourseFull (void)
|
|||
Crs_EditingCourseConstructor ();
|
||||
|
||||
/***** Rename course *****/
|
||||
Crs_EditingCrs->CrsCod = Hie_GetAndCheckParamOtherHieCod (1);
|
||||
Crs_EditingCrs->CrsCod = Par_GetAndCheckParCode (Par_OthHieCod);
|
||||
Crs_RenameCourse (Crs_EditingCrs,Cns_FULL_NAME);
|
||||
}
|
||||
|
||||
|
@ -1992,7 +1992,7 @@ void Crs_RenameCourse (struct Crs_Course *Crs,Cns_ShrtOrFullName_t ShrtOrFullNam
|
|||
|
||||
/***** Get parameters from form *****/
|
||||
/* Get the new name for the course */
|
||||
Par_GetParToText (ParamName,NewCrsName,MaxBytes);
|
||||
Par_GetParText (ParamName,NewCrsName,MaxBytes);
|
||||
|
||||
/***** Get from the database the data of the degree *****/
|
||||
Crs_GetDataOfCourseByCod (Crs);
|
||||
|
@ -2051,7 +2051,7 @@ void Crs_ChangeCrsStatus (void)
|
|||
|
||||
/***** Get parameters from form *****/
|
||||
/* Get course code */
|
||||
Crs_EditingCrs->CrsCod = Hie_GetAndCheckParamOtherHieCod (1);
|
||||
Crs_EditingCrs->CrsCod = Par_GetAndCheckParCode (Par_OthHieCod);
|
||||
|
||||
/* Get parameter with status */
|
||||
Status = Hie_GetParamStatus (); // New status
|
||||
|
@ -2237,7 +2237,7 @@ void Crs_PutIconToSelectMyCourses (__attribute__((unused)) void *Args)
|
|||
|
||||
void Crs_PutParamCrsCod (long CrsCod)
|
||||
{
|
||||
Par_PutHiddenParamLong (NULL,"crs",CrsCod);
|
||||
Par_PutParLong (NULL,"crs",CrsCod);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -2598,7 +2598,7 @@ void Crs_RemoveOldCrss (void)
|
|||
|
||||
/***** Get parameter with number of months without access *****/
|
||||
MonthsWithoutAccess = (unsigned)
|
||||
Par_GetParToUnsignedLong ("Months",
|
||||
Par_GetParUnsignedLong ("Months",
|
||||
Crs_MIN_MONTHS_WITHOUT_ACCESS_TO_REMOVE_OLD_CRSS,
|
||||
Crs_MAX_MONTHS_WITHOUT_ACCESS_TO_REMOVE_OLD_CRSS,
|
||||
UINT_MAX);
|
||||
|
|
|
@ -543,7 +543,7 @@ void CrsCfg_ChangeCrsYear (void)
|
|||
unsigned NewYear;
|
||||
|
||||
/***** Get parameter with year/semester *****/
|
||||
Par_GetParToText ("OthCrsYear",YearStr,2);
|
||||
Par_GetParText ("OthCrsYear",YearStr,2);
|
||||
NewYear = Deg_ConvStrToYear (YearStr);
|
||||
|
||||
if (NewYear <= Deg_MAX_YEARS_PER_DEGREE) // If year is valid
|
||||
|
@ -589,7 +589,7 @@ void CrsCfg_ChangeInsCrsCod (void)
|
|||
char NewInstitutionalCrsCod[Crs_MAX_BYTES_INSTITUTIONAL_CRS_COD + 1];
|
||||
|
||||
/***** Get institutional code from form *****/
|
||||
Par_GetParToText ("InsCrsCod",NewInstitutionalCrsCod,Crs_MAX_BYTES_INSTITUTIONAL_CRS_COD);
|
||||
Par_GetParText ("InsCrsCod",NewInstitutionalCrsCod,Crs_MAX_BYTES_INSTITUTIONAL_CRS_COD);
|
||||
|
||||
/***** Change the institutional course code *****/
|
||||
if (strcmp (NewInstitutionalCrsCod,Gbl.Hierarchy.Crs.InstitutionalCrsCod))
|
||||
|
|
24
swad_date.c
24
swad_date.c
|
@ -388,7 +388,7 @@ void Dat_ChangeDateFormat (void)
|
|||
|
||||
static Dat_Format_t Dat_GetParamDateFormat (void)
|
||||
{
|
||||
return (Dat_Format_t) Par_GetParToUnsignedLong ("DateFormat",
|
||||
return (Dat_Format_t) Par_GetParUnsignedLong ("DateFormat",
|
||||
0L,
|
||||
(unsigned long) (Dat_NUM_OPTIONS_FORMAT - 1),
|
||||
(unsigned long) Dat_FORMAT_DEFAULT);
|
||||
|
@ -925,7 +925,7 @@ void Dat_WriteFormClientLocalDateTimeFromTimeUTC (const char *Id,
|
|||
/***** Hidden field with UTC time (seconds since 1970) used to send time *****/
|
||||
if (asprintf (&IdTimeUTC,"%sTimeUTC",Id) < 0)
|
||||
Err_NotEnoughMemoryExit ();
|
||||
Par_PutHiddenParamLong (IdTimeUTC,Dat_ParamTimeUTCName[StartEndTime],(long) TimeUTC);
|
||||
Par_PutParLong (IdTimeUTC,Dat_ParamTimeUTCName[StartEndTime],(long) TimeUTC);
|
||||
free (IdTimeUTC);
|
||||
|
||||
/***** Script to set selectors to local date and time from UTC time *****/
|
||||
|
@ -947,7 +947,7 @@ void Dat_WriteFormClientLocalDateTimeFromTimeUTC (const char *Id,
|
|||
|
||||
time_t Dat_GetTimeUTCFromForm (Dat_StartEndTime_t StartEndTime)
|
||||
{
|
||||
return Par_GetParToLong (Dat_ParamTimeUTCName[StartEndTime]);
|
||||
return Par_GetParLong (Dat_ParamTimeUTCName[StartEndTime]);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -958,8 +958,8 @@ time_t Dat_GetTimeUTCFromForm (Dat_StartEndTime_t StartEndTime)
|
|||
|
||||
void Dat_PutHiddenParBrowserTZDiff (void)
|
||||
{
|
||||
Par_PutHiddenParamString ("BrowserTZName","BrowserTZName","");
|
||||
Par_PutHiddenParamLong ("BrowserTZDiff","BrowserTZDiff",0);
|
||||
Par_PutParString ("BrowserTZName","BrowserTZName","");
|
||||
Par_PutParLong ("BrowserTZDiff","BrowserTZDiff",0);
|
||||
HTM_SCRIPT_Begin (NULL,NULL);
|
||||
HTM_TxtF ("setTZname('BrowserTZName');"
|
||||
"setTZ('BrowserTZDiff');");
|
||||
|
@ -988,7 +988,7 @@ void Dat_GetBrowserTimeZone (char BrowserTimeZone[Dat_MAX_BYTES_TIME_ZONE + 1])
|
|||
// The return value is an IANA zone info key (aka the Olson time zone database).
|
||||
// https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
|
||||
// For example, if browser is in Madrid(Spain) timezone, "Europe/Berlin" will be returned.
|
||||
Par_GetParToText ("BrowserTZName",BrowserTimeZone,Dat_MAX_BYTES_TIME_ZONE);
|
||||
Par_GetParText ("BrowserTZName",BrowserTimeZone,Dat_MAX_BYTES_TIME_ZONE);
|
||||
|
||||
/* Check if client time zone is usable with CONVERT_TZ */
|
||||
if (BrowserTimeZone[0])
|
||||
|
@ -1014,7 +1014,7 @@ void Dat_GetBrowserTimeZone (char BrowserTimeZone[Dat_MAX_BYTES_TIME_ZONE + 1])
|
|||
// We get client TZ difference using JavaScript getTimezoneOffset() method
|
||||
// getTimezoneOffset() returns UTC-time - browser-local-time, in minutes.
|
||||
// For example, if browser time zone is GMT+2, -120 will be returned.
|
||||
Par_GetParToText ("BrowserTZDiff",IntStr,Cns_MAX_DECIMAL_DIGITS_INT);
|
||||
Par_GetParText ("BrowserTZDiff",IntStr,Cns_MAX_DECIMAL_DIGITS_INT);
|
||||
if (sscanf (IntStr,"%d",&ClientUTCMinusLocal) != 1)
|
||||
ClientUTCMinusLocal = 0;
|
||||
|
||||
|
@ -1164,13 +1164,13 @@ void Dat_GetDateFromForm (const char *ParamNameDay,const char *ParamNameMonth,co
|
|||
unsigned *Day,unsigned *Month,unsigned *Year)
|
||||
{
|
||||
/**** Get day ****/
|
||||
*Day = (unsigned) Par_GetParToUnsignedLong (ParamNameDay ,1,31,0);
|
||||
*Day = (unsigned) Par_GetParUnsignedLong (ParamNameDay ,1,31,0);
|
||||
|
||||
/**** Get month ****/
|
||||
*Month = (unsigned) Par_GetParToUnsignedLong (ParamNameMonth,1,12,0);
|
||||
*Month = (unsigned) Par_GetParUnsignedLong (ParamNameMonth,1,12,0);
|
||||
|
||||
/**** Get year ****/
|
||||
*Year = (unsigned) Par_GetParToUnsignedLong (ParamNameYear ,0,UINT_MAX,0);
|
||||
*Year = (unsigned) Par_GetParUnsignedLong (ParamNameYear ,0,UINT_MAX,0);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -1201,8 +1201,8 @@ void Dat_SetIniEndDatesToRecentWeeks (void)
|
|||
|
||||
void Dat_WriteParamsIniEndDates (void)
|
||||
{
|
||||
Par_PutHiddenParamUnsigned (NULL,Dat_ParamTimeUTCName[Dat_STR_TIME],Dat_Time.Range.TimeUTC[Dat_STR_TIME]);
|
||||
Par_PutHiddenParamUnsigned (NULL,Dat_ParamTimeUTCName[Dat_END_TIME],Dat_Time.Range.TimeUTC[Dat_END_TIME]);
|
||||
Par_PutParUnsigned (NULL,Dat_ParamTimeUTCName[Dat_STR_TIME],Dat_Time.Range.TimeUTC[Dat_STR_TIME]);
|
||||
Par_PutParUnsigned (NULL,Dat_ParamTimeUTCName[Dat_END_TIME],Dat_Time.Range.TimeUTC[Dat_END_TIME]);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
|
@ -1091,14 +1091,14 @@ static void Deg_ReceiveFormRequestOrCreateDeg (Hie_Status_t Status)
|
|||
Deg_EditingDeg->CtrCod = Gbl.Hierarchy.Ctr.CtrCod;
|
||||
|
||||
/* Get degree short name and full name */
|
||||
Par_GetParToText ("ShortName",Deg_EditingDeg->ShrtName,Cns_HIERARCHY_MAX_BYTES_SHRT_NAME);
|
||||
Par_GetParToText ("FullName" ,Deg_EditingDeg->FullName,Cns_HIERARCHY_MAX_BYTES_FULL_NAME);
|
||||
Par_GetParText ("ShortName",Deg_EditingDeg->ShrtName,Cns_HIERARCHY_MAX_BYTES_SHRT_NAME);
|
||||
Par_GetParText ("FullName" ,Deg_EditingDeg->FullName,Cns_HIERARCHY_MAX_BYTES_FULL_NAME);
|
||||
|
||||
/* Get degree type */
|
||||
Deg_EditingDeg->DegTypCod = Par_GetAndCheckParCode (Par_OthDegTypCod);
|
||||
|
||||
/* Get degree WWW */
|
||||
Par_GetParToText ("WWW",Deg_EditingDeg->WWW,Cns_MAX_BYTES_WWW);
|
||||
Par_GetParText ("WWW",Deg_EditingDeg->WWW,Cns_MAX_BYTES_WWW);
|
||||
|
||||
if (Deg_EditingDeg->ShrtName[0] &&
|
||||
Deg_EditingDeg->FullName[0]) // If there's a degree name
|
||||
|
@ -1144,7 +1144,7 @@ void Deg_RemoveDegree (void)
|
|||
Deg_EditingDegreeConstructor ();
|
||||
|
||||
/***** Get degree code *****/
|
||||
Deg_EditingDeg->DegCod = Hie_GetAndCheckParamOtherHieCod (1L);
|
||||
Deg_EditingDeg->DegCod = Par_GetAndCheckParCode (Par_OthHieCod);
|
||||
|
||||
/***** Get data of degree *****/
|
||||
Deg_GetDataOfDegreeByCod (Deg_EditingDeg);
|
||||
|
@ -1173,7 +1173,7 @@ void Deg_RemoveDegree (void)
|
|||
|
||||
void Deg_PutParamDegCod (long DegCod)
|
||||
{
|
||||
Par_PutHiddenParamLong (NULL,"deg",DegCod);
|
||||
Par_PutParLong (NULL,"deg",DegCod);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -1312,7 +1312,7 @@ void Deg_RenameDegreeShort (void)
|
|||
Deg_EditingDegreeConstructor ();
|
||||
|
||||
/***** Rename degree *****/
|
||||
Deg_EditingDeg->DegCod = Hie_GetAndCheckParamOtherHieCod (1L);
|
||||
Deg_EditingDeg->DegCod = Par_GetAndCheckParCode (Par_OthHieCod);
|
||||
Deg_RenameDegree (Deg_EditingDeg,Cns_SHRT_NAME);
|
||||
}
|
||||
|
||||
|
@ -1322,7 +1322,7 @@ void Deg_RenameDegreeFull (void)
|
|||
Deg_EditingDegreeConstructor ();
|
||||
|
||||
/***** Rename degree *****/
|
||||
Deg_EditingDeg->DegCod = Hie_GetAndCheckParamOtherHieCod (1L);
|
||||
Deg_EditingDeg->DegCod = Par_GetAndCheckParCode (Par_OthHieCod);
|
||||
Deg_RenameDegree (Deg_EditingDeg,Cns_FULL_NAME);
|
||||
}
|
||||
|
||||
|
@ -1359,7 +1359,7 @@ void Deg_RenameDegree (struct Deg_Degree *Deg,Cns_ShrtOrFullName_t ShrtOrFullNam
|
|||
|
||||
/***** Get parameters from form *****/
|
||||
/* Get the new name for the degree */
|
||||
Par_GetParToText (ParamName,NewDegName,MaxBytes);
|
||||
Par_GetParText (ParamName,NewDegName,MaxBytes);
|
||||
|
||||
/***** Get data of degree *****/
|
||||
Deg_GetDataOfDegreeByCod (Deg);
|
||||
|
@ -1412,7 +1412,7 @@ void Deg_ChangeDegreeType (void)
|
|||
|
||||
/***** Get parameters from form *****/
|
||||
/* Get degree code */
|
||||
Deg_EditingDeg->DegCod = Hie_GetAndCheckParamOtherHieCod (1L);
|
||||
Deg_EditingDeg->DegCod = Par_GetAndCheckParCode (Par_OthHieCod);
|
||||
|
||||
/* Get the new degree type */
|
||||
NewDegTypCod = Par_GetAndCheckParCode (Par_OthDegTypCod);
|
||||
|
@ -1445,10 +1445,10 @@ void Deg_ChangeDegWWW (void)
|
|||
|
||||
/***** Get parameters from form *****/
|
||||
/* Get the code of the degree */
|
||||
Deg_EditingDeg->DegCod = Hie_GetAndCheckParamOtherHieCod (1L);
|
||||
Deg_EditingDeg->DegCod = Par_GetAndCheckParCode (Par_OthHieCod);
|
||||
|
||||
/* Get the new WWW for the degree */
|
||||
Par_GetParToText ("WWW",NewWWW,Cns_MAX_BYTES_WWW);
|
||||
Par_GetParText ("WWW",NewWWW,Cns_MAX_BYTES_WWW);
|
||||
|
||||
/***** Get data of degree *****/
|
||||
Deg_GetDataOfDegreeByCod (Deg_EditingDeg);
|
||||
|
@ -1484,7 +1484,7 @@ void Deg_ChangeDegStatus (void)
|
|||
|
||||
/***** Get parameters from form *****/
|
||||
/* Get degree code */
|
||||
Deg_EditingDeg->DegCod = Hie_GetAndCheckParamOtherHieCod (1L);
|
||||
Deg_EditingDeg->DegCod = Par_GetAndCheckParCode (Par_OthHieCod);
|
||||
|
||||
/* Get parameter with status */
|
||||
Status = Hie_GetParamStatus (); // New status
|
||||
|
|
|
@ -422,7 +422,7 @@ void DegCfg_ChangeDegWWW (void)
|
|||
|
||||
/***** Get parameters from form *****/
|
||||
/* Get the new WWW for the degree */
|
||||
Par_GetParToText ("WWW",NewWWW,Cns_MAX_BYTES_WWW);
|
||||
Par_GetParText ("WWW",NewWWW,Cns_MAX_BYTES_WWW);
|
||||
|
||||
/***** Check if new WWW is empty *****/
|
||||
if (NewWWW[0])
|
||||
|
|
|
@ -170,7 +170,7 @@ static void DegTyp_SeeDegreeTypes (Act_Action_t NextAction,HieLvl_Level_t Scope,
|
|||
|
||||
static DegTyp_Order_t DegTyp_GetParamDegTypOrder (DegTyp_Order_t DefaultOrder)
|
||||
{
|
||||
return (DegTyp_Order_t) Par_GetParToUnsignedLong ("Order",
|
||||
return (DegTyp_Order_t) Par_GetParUnsignedLong ("Order",
|
||||
0,
|
||||
DegTyp_NUM_ORDERS - 1,
|
||||
(unsigned long) DefaultOrder);
|
||||
|
@ -545,7 +545,7 @@ static void DegTyp_PutHeadDegreeTypesForSeeing (Act_Action_t NextAction,
|
|||
Figures.FigureType = Fig_DEGREE_TYPES;
|
||||
Fig_PutHiddenParamFigures (&Figures);
|
||||
}
|
||||
Par_PutHiddenParamUnsigned (NULL,"Order",(unsigned) Order);
|
||||
Par_PutParUnsigned (NULL,"Order",(unsigned) Order);
|
||||
|
||||
/* Link with the head of this column */
|
||||
HTM_BUTTON_Submit_Begin (Txt_DEGREE_TYPES_HELP_ORDER[Order],
|
||||
|
@ -665,7 +665,7 @@ void DegTyp_ReceiveFormNewDegreeType (void)
|
|||
|
||||
/***** Get parameters from form *****/
|
||||
/* Get the name of degree type */
|
||||
Par_GetParToText ("DegTypName",DegTyp_EditingDegTyp->DegTypName,DegTyp_MAX_BYTES_DEGREE_TYPE_NAME);
|
||||
Par_GetParText ("DegTypName",DegTyp_EditingDegTyp->DegTypName,DegTyp_MAX_BYTES_DEGREE_TYPE_NAME);
|
||||
|
||||
if (DegTyp_EditingDegTyp->DegTypName[0]) // If there's a degree type name
|
||||
{
|
||||
|
@ -729,7 +729,7 @@ void DegTyp_RemoveDegreeType (void)
|
|||
static void DegTyp_PutParamOtherDegTypCod (void *DegTypCod)
|
||||
{
|
||||
if (DegTypCod)
|
||||
Par_PutParCod (Par_OthDegTypCod,*((long *) DegTypCod));
|
||||
Par_PutParCode (Par_OthDegTypCod,*((long *) DegTypCod));
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -813,7 +813,7 @@ void DegTyp_RenameDegreeType (void)
|
|||
DegTyp_EditingDegTyp->DegTypCod = Par_GetAndCheckParCode (Par_OthDegTypCod);
|
||||
|
||||
/* Get the new name for the degree type */
|
||||
Par_GetParToText ("DegTypName",NewNameDegTyp,DegTyp_MAX_BYTES_DEGREE_TYPE_NAME);
|
||||
Par_GetParText ("DegTypName",NewNameDegTyp,DegTyp_MAX_BYTES_DEGREE_TYPE_NAME);
|
||||
|
||||
/***** Get from the database the old name of the degree type *****/
|
||||
if (!DegTyp_GetDataOfDegreeTypeByCod (DegTyp_EditingDegTyp))
|
||||
|
|
|
@ -150,7 +150,7 @@ void Dpt_SeeDepts (void)
|
|||
HTM_TH_Begin (Align[Order]);
|
||||
|
||||
Frm_BeginForm (ActSeeDpt);
|
||||
Par_PutHiddenParamUnsigned (NULL,"Order",(unsigned) Order);
|
||||
Par_PutParUnsigned (NULL,"Order",(unsigned) Order);
|
||||
HTM_BUTTON_Submit_Begin (Txt_DEPARTMENTS_HELP_ORDER[Order],
|
||||
"class=\"BT_LINK\"");
|
||||
if (Order == Departments.SelectedOrder)
|
||||
|
@ -239,7 +239,7 @@ void Dpt_SeeDepts (void)
|
|||
|
||||
static Dpt_Order_t Dpt_GetParamDptOrder (void)
|
||||
{
|
||||
return (Dpt_Order_t) Par_GetParToUnsignedLong ("Order",
|
||||
return (Dpt_Order_t) Par_GetParUnsignedLong ("Order",
|
||||
0,
|
||||
Dpt_NUM_ORDERS - 1,
|
||||
(unsigned long) Dpt_ORDER_DEFAULT);
|
||||
|
@ -559,7 +559,7 @@ static void Dpt_PutParamDptCod (void *DptCod)
|
|||
extern const char *Par_CodeStr[];
|
||||
|
||||
if (DptCod)
|
||||
Par_PutHiddenParamLong (NULL,Par_CodeStr[Par_DptCod],*((long *) DptCod));
|
||||
Par_PutParLong (NULL,Par_CodeStr[Par_DptCod],*((long *) DptCod));
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -688,7 +688,7 @@ static void Dpt_RenameDepartment (Cns_ShrtOrFullName_t ShrtOrFullName)
|
|||
Dpt_EditingDpt->DptCod = Par_GetAndCheckParCode (Par_DptCod);
|
||||
|
||||
/* Get the new name for the department */
|
||||
Par_GetParToText (ParamName,NewDptName,MaxBytes);
|
||||
Par_GetParText (ParamName,NewDptName,MaxBytes);
|
||||
|
||||
/***** Get from the database the old names of the department *****/
|
||||
Dpt_GetDataOfDepartmentByCod (Dpt_EditingDpt);
|
||||
|
@ -744,7 +744,7 @@ void Dpt_ChangeDptWWW (void)
|
|||
Dpt_EditingDpt->DptCod = Par_GetAndCheckParCode (Par_DptCod);
|
||||
|
||||
/* Get the new WWW for the department */
|
||||
Par_GetParToText ("WWW",NewWWW,Cns_MAX_BYTES_WWW);
|
||||
Par_GetParText ("WWW",NewWWW,Cns_MAX_BYTES_WWW);
|
||||
|
||||
/***** Get data of the department from database *****/
|
||||
Dpt_GetDataOfDepartmentByCod (Dpt_EditingDpt);
|
||||
|
@ -909,13 +909,13 @@ void Dpt_ReceiveFormNewDpt (void)
|
|||
Dpt_EditingDpt->InsCod = Par_GetAndCheckParCode (Par_OthInsCod);
|
||||
|
||||
/* Get department short name */
|
||||
Par_GetParToText ("ShortName",Dpt_EditingDpt->ShrtName,Cns_HIERARCHY_MAX_BYTES_SHRT_NAME);
|
||||
Par_GetParText ("ShortName",Dpt_EditingDpt->ShrtName,Cns_HIERARCHY_MAX_BYTES_SHRT_NAME);
|
||||
|
||||
/* Get department full name */
|
||||
Par_GetParToText ("FullName",Dpt_EditingDpt->FullName,Cns_HIERARCHY_MAX_BYTES_FULL_NAME);
|
||||
Par_GetParText ("FullName",Dpt_EditingDpt->FullName,Cns_HIERARCHY_MAX_BYTES_FULL_NAME);
|
||||
|
||||
/* Get department WWW */
|
||||
Par_GetParToText ("WWW",Dpt_EditingDpt->WWW,Cns_MAX_BYTES_WWW);
|
||||
Par_GetParText ("WWW",Dpt_EditingDpt->WWW,Cns_MAX_BYTES_WWW);
|
||||
|
||||
if (Dpt_EditingDpt->ShrtName[0] &&
|
||||
Dpt_EditingDpt->FullName[0]) // If there's a department name
|
||||
|
|
|
@ -367,7 +367,7 @@ static void Dup_PutButtonToEliminateUsrAccount (const struct Usr_Data *UsrDat)
|
|||
|
||||
Frm_BeginForm (ActUpdOth);
|
||||
Usr_PutParamUsrCodEncrypted (UsrDat->EnUsrCod);
|
||||
Par_PutHiddenParamUnsigned (NULL,"RegRemAction",(unsigned) Enr_ELIMINATE_ONE_USR_FROM_PLATFORM);
|
||||
Par_PutParUnsigned (NULL,"RegRemAction",(unsigned) Enr_ELIMINATE_ONE_USR_FROM_PLATFORM);
|
||||
Btn_PutRemoveButtonInline (Txt_Eliminate_user_account);
|
||||
Frm_EndForm ();
|
||||
}
|
||||
|
|
|
@ -712,7 +712,7 @@ void Enr_RemoveOldUsrs (void)
|
|||
|
||||
/***** Get parameter with number of months without access *****/
|
||||
MonthsWithoutAccess = (unsigned)
|
||||
Par_GetParToUnsignedLong ("Months",
|
||||
Par_GetParUnsignedLong ("Months",
|
||||
Usr_MIN_MONTHS_WITHOUT_ACCESS_TO_REMOVE_OLD_USRS,
|
||||
Usr_MAX_MONTHS_WITHOUT_ACCESS_TO_REMOVE_OLD_USRS,
|
||||
(unsigned long) UINT_MAX);
|
||||
|
@ -943,7 +943,7 @@ static void Enr_ReceiveFormUsrsCrs (Rol_Role_t Role)
|
|||
WhatToDo.RegisterUsrs = false;
|
||||
|
||||
RegRemUsrsAction = (Enr_RegRemUsrsAction_t)
|
||||
Par_GetParToUnsignedLong ("RegRemAction",
|
||||
Par_GetParUnsignedLong ("RegRemAction",
|
||||
0,
|
||||
Enr_NUM_REG_REM_USRS_ACTIONS - 1,
|
||||
(unsigned long) Enr_REG_REM_USRS_UNKNOWN_ACTION);
|
||||
|
@ -1020,7 +1020,7 @@ static void Enr_ReceiveFormUsrsCrs (Rol_Role_t Role)
|
|||
/***** Get list of users' IDs *****/
|
||||
if ((ListUsrsIDs = malloc (ID_MAX_BYTES_LIST_USRS_IDS + 1)) == NULL)
|
||||
Err_NotEnoughMemoryExit ();
|
||||
Par_GetParToText ("UsrsIDs",ListUsrsIDs,ID_MAX_BYTES_LIST_USRS_IDS);
|
||||
Par_GetParText ("UsrsIDs",ListUsrsIDs,ID_MAX_BYTES_LIST_USRS_IDS);
|
||||
|
||||
/***** Initialize structure with user's data *****/
|
||||
Usr_UsrDataConstructor (&UsrDat);
|
||||
|
@ -1821,7 +1821,7 @@ void Enr_SignUpInCrs (void)
|
|||
{
|
||||
/***** Get new role from record form *****/
|
||||
RoleFromForm = (Rol_Role_t)
|
||||
Par_GetParToUnsignedLong ("Role",
|
||||
Par_GetParUnsignedLong ("Role",
|
||||
0,
|
||||
Rol_NUM_ROLES - 1,
|
||||
(unsigned long) Rol_UNK);
|
||||
|
@ -2863,7 +2863,7 @@ void Enr_ModifyUsr1 (void)
|
|||
|
||||
/***** Get the action to do *****/
|
||||
Gbl.Usrs.RegRemAction = (Enr_RegRemOneUsrAction_t)
|
||||
Par_GetParToUnsignedLong ("RegRemAction",
|
||||
Par_GetParUnsignedLong ("RegRemAction",
|
||||
0,
|
||||
Enr_REG_REM_ONE_USR_NUM_ACTIONS - 1,
|
||||
(unsigned long) Enr_REG_REM_ONE_USR_UNKNOWN_ACTION);
|
||||
|
|
16
swad_exam.c
16
swad_exam.c
|
@ -258,7 +258,7 @@ void Exa_ListAllExams (struct Exa_Exams *Exams)
|
|||
/* Form to change order */
|
||||
Frm_BeginForm (ActSeeAllExa);
|
||||
Pag_PutHiddenParamPagNum (Pag_EXAMS,Exams->CurrentPage);
|
||||
Par_PutHiddenParamUnsigned (NULL,"Order",(unsigned) Order);
|
||||
Par_PutParUnsigned (NULL,"Order",(unsigned) Order);
|
||||
HTM_BUTTON_Submit_Begin (Txt_EXAMS_ORDER_HELP[Order],
|
||||
"class=\"BT_LINK\"");
|
||||
if (Order == Exams->SelectedOrder)
|
||||
|
@ -656,7 +656,7 @@ static void Exa_WriteAuthor (struct Exa_Exam *Exam)
|
|||
|
||||
static void Exa_PutHiddenParamExamOrder (Exa_Order_t SelectedOrder)
|
||||
{
|
||||
Par_PutHiddenParamUnsigned (NULL,"Order",(unsigned) SelectedOrder);
|
||||
Par_PutParUnsigned (NULL,"Order",(unsigned) SelectedOrder);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -716,7 +716,7 @@ void Exa_PutParams (void *Exams)
|
|||
|
||||
if (Exams)
|
||||
{
|
||||
Par_PutParCod (Par_ExaCod,((struct Exa_Exams *) Exams)->Exam.ExaCod);
|
||||
Par_PutParCode (Par_ExaCod,((struct Exa_Exams *) Exams)->Exam.ExaCod);
|
||||
Exa_PutHiddenParamOrder (((struct Exa_Exams *) Exams)->SelectedOrder);
|
||||
WhichGroups = Grp_GetParamWhichGroups ();
|
||||
Grp_PutParamWhichGroups (&WhichGroups);
|
||||
|
@ -751,7 +751,7 @@ void Exa_GetParams (struct Exa_Exams *Exams,bool CheckExaCod)
|
|||
static void Exa_PutHiddenParamOrder (Exa_Order_t SelectedOrder)
|
||||
{
|
||||
if (SelectedOrder != Exa_ORDER_DEFAULT)
|
||||
Par_PutHiddenParamUnsigned (NULL,"Order",(unsigned) SelectedOrder);
|
||||
Par_PutParUnsigned (NULL,"Order",(unsigned) SelectedOrder);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -760,7 +760,7 @@ static void Exa_PutHiddenParamOrder (Exa_Order_t SelectedOrder)
|
|||
|
||||
static Exa_Order_t Exa_GetParamOrder (void)
|
||||
{
|
||||
return (Exa_Order_t) Par_GetParToUnsignedLong ("Order",
|
||||
return (Exa_Order_t) Par_GetParUnsignedLong ("Order",
|
||||
0,
|
||||
Exa_NUM_ORDERS - 1,
|
||||
(unsigned long) Exa_ORDER_DEFAULT);
|
||||
|
@ -1452,10 +1452,10 @@ static void Exa_ReceiveExamFieldsFromForm (struct Exa_Exam *Exam,
|
|||
char MaxGradeStr[64];
|
||||
|
||||
/***** Get exam title *****/
|
||||
Par_GetParToText ("Title",Exam->Title,Exa_MAX_BYTES_TITLE);
|
||||
Par_GetParText ("Title",Exam->Title,Exa_MAX_BYTES_TITLE);
|
||||
|
||||
/***** Get maximum grade *****/
|
||||
Par_GetParToText ("MaxGrade",MaxGradeStr,sizeof (MaxGradeStr) - 1);
|
||||
Par_GetParText ("MaxGrade",MaxGradeStr,sizeof (MaxGradeStr) - 1);
|
||||
Exam->MaxGrade = Str_GetDoubleFromStr (MaxGradeStr);
|
||||
if (Exam->MaxGrade < 0.0) // Only positive values allowed
|
||||
Exam->MaxGrade = 0.0;
|
||||
|
@ -1464,7 +1464,7 @@ static void Exa_ReceiveExamFieldsFromForm (struct Exa_Exam *Exam,
|
|||
Exam->Visibility = TstVis_GetVisibilityFromForm ();
|
||||
|
||||
/***** Get exam text *****/
|
||||
Par_GetParToHTML ("Txt",Txt,Cns_MAX_BYTES_TEXT); // Store in HTML format (not rigorous)
|
||||
Par_GetParHTML ("Txt",Txt,Cns_MAX_BYTES_TEXT); // Store in HTML format (not rigorous)
|
||||
}
|
||||
|
||||
static bool Exa_CheckExamFieldsReceivedFromForm (const struct Exa_Exam *Exam)
|
||||
|
|
|
@ -1049,7 +1049,7 @@ void ExaPrn_ReceivePrintAnswer (void)
|
|||
static void ExaPrn_GetAnswerFromForm (struct ExaPrn_Print *Print,unsigned QstInd)
|
||||
{
|
||||
/***** Get answers selected by user for this question *****/
|
||||
Par_GetParToText ("Ans",Print->PrintedQuestions[QstInd].StrAnswers,
|
||||
Par_GetParText ("Ans",Print->PrintedQuestions[QstInd].StrAnswers,
|
||||
Qst_MAX_BYTES_ANSWERS_ONE_QST); /* If answer type == T/F ==> " ", "T", "F"; if choice ==> "0", "2",... */
|
||||
}
|
||||
|
||||
|
@ -1061,7 +1061,7 @@ static unsigned ExaPrn_GetParamQstInd (void)
|
|||
{
|
||||
long QstInd;
|
||||
|
||||
if ((QstInd = Par_GetParToLong ("QstInd")) < 0) // In exams, question index should be 0, 1, 2, 3...
|
||||
if ((QstInd = Par_GetParLong ("QstInd")) < 0) // In exams, question index should be 0, 1, 2, 3...
|
||||
Err_WrongQuestionIndexExit ();
|
||||
|
||||
return (unsigned) QstInd;
|
||||
|
|
|
@ -85,7 +85,7 @@ void ExaRsc_WriteExamInCrsProgram (long ExaCod,bool PutFormToGo,
|
|||
NextAction = (ExaCod > 0) ? ActSeeExa : // Exam specified
|
||||
ActSeeAllExa; // All exams
|
||||
Frm_BeginForm (NextAction);
|
||||
Par_PutParCod (Par_ExaCod,ExaCod);
|
||||
Par_PutParCode (Par_ExaCod,ExaCod);
|
||||
HTM_BUTTON_Submit_Begin (Txt_Actions[NextAction],
|
||||
"class=\"LM BT_LINK PRG_LNK_%s\"",
|
||||
The_GetSuffix ());
|
||||
|
|
|
@ -521,7 +521,7 @@ static void ExaSes_ListOneOrMoreSessionsTitleGrps (struct Exa_Exams *Exams,
|
|||
{
|
||||
Frm_BeginForm (ActSeeExaPrn);
|
||||
Exa_PutParams (Exams);
|
||||
Par_PutParCod (Par_SesCod,Session->SesCod);
|
||||
Par_PutParCode (Par_SesCod,Session->SesCod);
|
||||
HTM_BUTTON_Submit_Begin (Gbl.Usrs.Me.Role.Logged == Rol_STD ? Txt_Play :
|
||||
Txt_Resume,
|
||||
"class=\"LT BT_LINK %s_%s\"",
|
||||
|
@ -926,7 +926,7 @@ void ExaSes_PutParamsEdit (void *Exams)
|
|||
if (Exams)
|
||||
{
|
||||
Exa_PutParams (Exams);
|
||||
Par_PutParCod (Par_SesCod,((struct Exa_Exams *) Exams)->SesCod);
|
||||
Par_PutParCode (Par_SesCod,((struct Exa_Exams *) Exams)->SesCod);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -978,9 +978,9 @@ static void ExaSes_PutFormSession (const struct ExaSes_Session *Session)
|
|||
/***** Begin form *****/
|
||||
Frm_BeginForm (ItsANewSession ? ActNewExaSes : // New session
|
||||
ActChgExaSes); // Existing session
|
||||
Par_PutParCod (Par_ExaCod,Session->ExaCod);
|
||||
Par_PutParCode (Par_ExaCod,Session->ExaCod);
|
||||
if (!ItsANewSession) // Existing session
|
||||
Par_PutParCod (Par_SesCod,Session->SesCod);
|
||||
Par_PutParCode (Par_SesCod,Session->SesCod);
|
||||
|
||||
/***** Begin box and table *****/
|
||||
Box_BoxTableBegin (NULL,ItsANewSession ? Txt_New_session :
|
||||
|
@ -1194,7 +1194,7 @@ void ExaSes_ReceiveFormSession (void)
|
|||
|
||||
/***** Get parameters from form *****/
|
||||
/* Get session title */
|
||||
Par_GetParToText ("Title",Session.Title,ExaSes_MAX_BYTES_TITLE);
|
||||
Par_GetParText ("Title",Session.Title,ExaSes_MAX_BYTES_TITLE);
|
||||
|
||||
/* Get start/end date-times */
|
||||
Session.TimeUTC[Dat_STR_TIME] = Dat_GetTimeUTCFromForm (Dat_STR_TIME);
|
||||
|
|
|
@ -313,10 +313,10 @@ void ExaSet_ReceiveFormSet (void)
|
|||
static void ExaSet_ReceiveSetFieldsFromForm (struct ExaSet_Set *Set)
|
||||
{
|
||||
/***** Get set title *****/
|
||||
Par_GetParToText ("Title",Set->Title,ExaSet_MAX_BYTES_TITLE);
|
||||
Par_GetParText ("Title",Set->Title,ExaSet_MAX_BYTES_TITLE);
|
||||
|
||||
/***** Get number of questions in set to appear in exam print *****/
|
||||
Set->NumQstsToPrint = (unsigned) Par_GetParToUnsignedLong ("NumQstsToPrint",
|
||||
Set->NumQstsToPrint = (unsigned) Par_GetParUnsignedLong ("NumQstsToPrint",
|
||||
0,
|
||||
UINT_MAX,
|
||||
0);
|
||||
|
@ -381,7 +381,7 @@ void ExaSet_ChangeSetTitle (void)
|
|||
Err_NoPermissionExit ();
|
||||
|
||||
/***** Receive new title from form *****/
|
||||
Par_GetParToText ("Title",NewTitle,ExaSet_MAX_BYTES_TITLE);
|
||||
Par_GetParText ("Title",NewTitle,ExaSet_MAX_BYTES_TITLE);
|
||||
|
||||
/***** Check if title should be changed *****/
|
||||
if (ExaSet_CheckSetTitleReceivedFromForm (&Set,NewTitle))
|
||||
|
@ -425,7 +425,7 @@ void ExaSet_ChangeNumQstsToExam (void)
|
|||
Err_NoPermissionExit ();
|
||||
|
||||
/***** Get number of questions in set to appear in exam print *****/
|
||||
NumQstsToPrint = (unsigned) Par_GetParToUnsignedLong ("NumQstsToPrint",
|
||||
NumQstsToPrint = (unsigned) Par_GetParUnsignedLong ("NumQstsToPrint",
|
||||
0,
|
||||
UINT_MAX,
|
||||
0);
|
||||
|
@ -585,7 +585,7 @@ void ExaSet_ListQstsToAddToSet (void)
|
|||
|
||||
static void ExaSet_PutParamSetCod (long SetCod)
|
||||
{
|
||||
Par_PutHiddenParamUnsigned (NULL,"SetCod",SetCod);
|
||||
Par_PutParUnsigned (NULL,"SetCod",SetCod);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
|
@ -176,7 +176,7 @@ void Fig_PutHiddenParamFigures (void *Figures)
|
|||
|
||||
static void Fig_PutHiddenParamFigureType (Fig_FigureType_t FigureType)
|
||||
{
|
||||
Par_PutHiddenParamUnsigned (NULL,"FigureType",(unsigned) FigureType);
|
||||
Par_PutParUnsigned (NULL,"FigureType",(unsigned) FigureType);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -234,7 +234,7 @@ void Fig_ShowFigures (void)
|
|||
|
||||
/***** Get the type of figure ******/
|
||||
SelectedFigureType = (Fig_FigureType_t)
|
||||
Par_GetParToUnsignedLong ("FigureType",
|
||||
Par_GetParUnsignedLong ("FigureType",
|
||||
0,
|
||||
Fig_NUM_FIGURES - 1,
|
||||
(unsigned long) Fig_FIGURE_TYPE_DEF);
|
||||
|
|
20
swad_forum.c
20
swad_forum.c
|
@ -1139,10 +1139,10 @@ void For_PutAllHiddenParamsForum (unsigned NumPageThreads,
|
|||
Pag_PutHiddenParamPagNum (Pag_THREADS_FORUM,NumPageThreads);
|
||||
Pag_PutHiddenParamPagNum (Pag_POSTS_FORUM,NumPagePosts);
|
||||
For_PutParamForumSet (ForumSet);
|
||||
Par_PutHiddenParamOrder ((unsigned) Order);
|
||||
Par_PutParOrder ((unsigned) Order);
|
||||
For_PutParamForumLocation (Location);
|
||||
Par_PutParCod (Par_ThrCod,ThrCod);
|
||||
Par_PutParCod (Par_PstCod,PstCod);
|
||||
Par_PutParCode (Par_ThrCod,ThrCod);
|
||||
Par_PutParCode (Par_PstCod,PstCod);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -1151,7 +1151,7 @@ void For_PutAllHiddenParamsForum (unsigned NumPageThreads,
|
|||
|
||||
static void For_PutParamForumSet (For_ForumSet_t ForumSet)
|
||||
{
|
||||
Par_PutHiddenParamUnsigned (NULL,"ForumSet",(unsigned) ForumSet);
|
||||
Par_PutParUnsigned (NULL,"ForumSet",(unsigned) ForumSet);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -1164,7 +1164,7 @@ static void For_PutParamForumLocation (long Location)
|
|||
if (Location > 0)
|
||||
/***** Put a hidden parameter with the
|
||||
institution, center, degree or course of the forum *****/
|
||||
Par_PutHiddenParamLong (NULL,"Location",Location);
|
||||
Par_PutParLong (NULL,"Location",Location);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -1390,7 +1390,7 @@ static void For_PutFormWhichForums (const struct For_Forums *Forums)
|
|||
- all my forums
|
||||
- only the forums of current institution/degree/course *****/
|
||||
Frm_BeginForm (ActSeeFor);
|
||||
Par_PutHiddenParamOrder ((unsigned) Forums->ThreadsOrder);
|
||||
Par_PutParOrder ((unsigned) Forums->ThreadsOrder);
|
||||
HTM_DIV_Begin ("class=\"SEL_BELOW_TITLE DAT_%s\"",The_GetSuffix ());
|
||||
HTM_UL_Begin (NULL);
|
||||
|
||||
|
@ -2431,7 +2431,7 @@ void For_GetParamsForums (struct For_Forums *Forums)
|
|||
case For_FORUM_DEGREE_TCHS:
|
||||
case For_FORUM_COURSE_USRS:
|
||||
case For_FORUM_COURSE_TCHS:
|
||||
Forums->Forum.Location = Par_GetParToLong ("Location");
|
||||
Forums->Forum.Location = Par_GetParLong ("Location");
|
||||
break;
|
||||
default:
|
||||
Forums->Forum.Location = -1L;
|
||||
|
@ -2447,14 +2447,14 @@ void For_GetParamsForums (struct For_Forums *Forums)
|
|||
|
||||
/***** Get which forums I want to see *****/
|
||||
Forums->ForumSet = (For_ForumSet_t)
|
||||
Par_GetParToUnsignedLong ("ForumSet",
|
||||
Par_GetParUnsignedLong ("ForumSet",
|
||||
0,
|
||||
For_NUM_FORUM_SETS - 1,
|
||||
(unsigned long) For_DEFAULT_FORUM_SET);
|
||||
|
||||
/***** Get order type *****/
|
||||
Forums->ThreadsOrder = (Dat_StartEndTime_t)
|
||||
Par_GetParToUnsignedLong ("Order",
|
||||
Par_GetParUnsignedLong ("Order",
|
||||
0,
|
||||
Dat_NUM_START_END_TIME - 1,
|
||||
(unsigned long) For_DEFAULT_ORDER);
|
||||
|
@ -2792,7 +2792,7 @@ void For_ReceiveForumPost (void)
|
|||
IsReply = true;
|
||||
|
||||
/***** Get message subject *****/
|
||||
Par_GetParToHTML ("Subject",Subject,Cns_MAX_BYTES_SUBJECT);
|
||||
Par_GetParHTML ("Subject",Subject,Cns_MAX_BYTES_SUBJECT);
|
||||
|
||||
/***** Get message body *****/
|
||||
Par_GetParAndChangeFormat ("Content",Content,Cns_MAX_BYTES_LONG_TEXT,
|
||||
|
|
20
swad_game.c
20
swad_game.c
|
@ -279,7 +279,7 @@ void Gam_ListAllGames (struct Gam_Games *Games)
|
|||
/* Form to change order */
|
||||
Frm_BeginForm (ActSeeAllGam);
|
||||
Pag_PutHiddenParamPagNum (Pag_GAMES,Games->CurrentPage);
|
||||
Par_PutHiddenParamUnsigned (NULL,"Order",(unsigned) Order);
|
||||
Par_PutParUnsigned (NULL,"Order",(unsigned) Order);
|
||||
|
||||
HTM_BUTTON_Submit_Begin (Txt_GAMES_ORDER_HELP[Order],
|
||||
"class=\"BT_LINK\"");
|
||||
|
@ -706,7 +706,7 @@ static void Gam_WriteAuthor (struct Gam_Game *Game)
|
|||
|
||||
static void Gam_PutHiddenParamGameOrder (Gam_Order_t SelectedOrder)
|
||||
{
|
||||
Par_PutHiddenParamUnsigned (NULL,"Order",(unsigned) SelectedOrder);
|
||||
Par_PutParUnsigned (NULL,"Order",(unsigned) SelectedOrder);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -803,7 +803,7 @@ void Gam_PutParamGamCod (long GamCod)
|
|||
extern const char *Par_CodeStr[];
|
||||
|
||||
if (GamCod > 0)
|
||||
Par_PutHiddenParamLong (NULL,Par_CodeStr[Par_GamCod],GamCod);
|
||||
Par_PutParLong (NULL,Par_CodeStr[Par_GamCod],GamCod);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -827,7 +827,7 @@ long Gam_GetParams (struct Gam_Games *Games)
|
|||
static void Gam_PutHiddenParamOrder (Gam_Order_t SelectedOrder)
|
||||
{
|
||||
if (SelectedOrder != Gam_ORDER_DEFAULT)
|
||||
Par_PutHiddenParamUnsigned (NULL,"Order",(unsigned) SelectedOrder);
|
||||
Par_PutParUnsigned (NULL,"Order",(unsigned) SelectedOrder);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -836,7 +836,7 @@ static void Gam_PutHiddenParamOrder (Gam_Order_t SelectedOrder)
|
|||
|
||||
static Gam_Order_t Gam_GetParamOrder (void)
|
||||
{
|
||||
return (Gam_Order_t) Par_GetParToUnsignedLong ("Order",
|
||||
return (Gam_Order_t) Par_GetParUnsignedLong ("Order",
|
||||
0,
|
||||
Gam_NUM_ORDERS - 1,
|
||||
(unsigned long) Gam_ORDER_DEFAULT);
|
||||
|
@ -1465,10 +1465,10 @@ static void Gam_ReceiveGameFieldsFromForm (struct Gam_Game *Game,
|
|||
char MaxGradeStr[64];
|
||||
|
||||
/***** Get game title *****/
|
||||
Par_GetParToText ("Title",Game->Title,Gam_MAX_BYTES_TITLE);
|
||||
Par_GetParText ("Title",Game->Title,Gam_MAX_BYTES_TITLE);
|
||||
|
||||
/***** Get maximum grade *****/
|
||||
Par_GetParToText ("MaxGrade",MaxGradeStr,sizeof (MaxGradeStr) - 1);
|
||||
Par_GetParText ("MaxGrade",MaxGradeStr,sizeof (MaxGradeStr) - 1);
|
||||
Game->MaxGrade = Str_GetDoubleFromStr (MaxGradeStr);
|
||||
if (Game->MaxGrade < 0.0) // Only positive values allowed
|
||||
Game->MaxGrade = 0.0;
|
||||
|
@ -1477,7 +1477,7 @@ static void Gam_ReceiveGameFieldsFromForm (struct Gam_Game *Game,
|
|||
Game->Visibility = TstVis_GetVisibilityFromForm ();
|
||||
|
||||
/***** Get game text *****/
|
||||
Par_GetParToHTML ("Txt",Txt,Cns_MAX_BYTES_TEXT); // Store in HTML format (not rigorous)
|
||||
Par_GetParHTML ("Txt",Txt,Cns_MAX_BYTES_TEXT); // Store in HTML format (not rigorous)
|
||||
}
|
||||
|
||||
static bool Gam_CheckGameFieldsReceivedFromForm (const struct Gam_Game *Game)
|
||||
|
@ -1602,7 +1602,7 @@ void Gam_ListQstsToAddToGame (void)
|
|||
|
||||
void Gam_PutParamQstInd (unsigned QstInd)
|
||||
{
|
||||
Par_PutHiddenParamUnsigned (NULL,"QstInd",QstInd);
|
||||
Par_PutParUnsigned (NULL,"QstInd",QstInd);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -1613,7 +1613,7 @@ unsigned Gam_GetParamQstInd (void)
|
|||
{
|
||||
long QstInd;
|
||||
|
||||
if ((QstInd = Par_GetParToLong ("QstInd")) <= 0) // In games, question index should be 1, 2, 3...
|
||||
if ((QstInd = Par_GetParLong ("QstInd")) <= 0) // In games, question index should be 1, 2, 3...
|
||||
Err_WrongQuestionIndexExit ();
|
||||
|
||||
return (unsigned) QstInd;
|
||||
|
|
42
swad_group.c
42
swad_group.c
|
@ -472,7 +472,7 @@ void Grp_PutParamsCodGrps (void)
|
|||
char GrpCod[Cns_MAX_DECIMAL_DIGITS_LONG + 1];
|
||||
|
||||
/***** Write the boolean parameter that indicates if all groups must be listed *****/
|
||||
Par_PutHiddenParamChar ("AllGroups",
|
||||
Par_PutParChar ("AllGroups",
|
||||
Gbl.Usrs.ClassPhoto.AllGroups ? 'Y' :
|
||||
'N');
|
||||
|
||||
|
@ -497,7 +497,7 @@ void Grp_PutParamsCodGrps (void)
|
|||
Str_Concat (GrpCods,GrpCod,MaxLengthGrpCods);
|
||||
}
|
||||
|
||||
Par_PutHiddenParamString (NULL,"GrpCods",GrpCods);
|
||||
Par_PutParString (NULL,"GrpCods",GrpCods);
|
||||
free (GrpCods);
|
||||
}
|
||||
}
|
||||
|
@ -515,7 +515,7 @@ void Grp_GetParCodsSeveralGrpsToShowUsrs (void)
|
|||
return;
|
||||
|
||||
/***** Get boolean parameter that indicates if all groups must be listed *****/
|
||||
Gbl.Usrs.ClassPhoto.AllGroups = Par_GetParToBool ("AllGroups");
|
||||
Gbl.Usrs.ClassPhoto.AllGroups = Par_GetParBool ("AllGroups");
|
||||
|
||||
/***** Get parameter with list of groups selected *****/
|
||||
Grp_GetParCodsSeveralGrps ();
|
||||
|
@ -3224,13 +3224,13 @@ void Grp_ReceiveFormNewGrpTyp (void)
|
|||
|
||||
/***** Get parameters from form *****/
|
||||
/* Get the name of group type */
|
||||
Par_GetParToText ("GrpTypName",Gbl.Crs.Grps.GrpTyp.GrpTypName,
|
||||
Par_GetParText ("GrpTypName",Gbl.Crs.Grps.GrpTyp.GrpTypName,
|
||||
Grp_MAX_BYTES_GROUP_TYPE_NAME);
|
||||
|
||||
/* Get whether it is mandatory to regisrer in any group of this type
|
||||
and whether it is possible to register in multiple groups of this type */
|
||||
Gbl.Crs.Grps.GrpTyp.MandatoryEnrolment = Par_GetParToBool ("MandatoryEnrolment");
|
||||
Gbl.Crs.Grps.GrpTyp.MultipleEnrolment = Par_GetParToBool ("MultipleEnrolment");
|
||||
Gbl.Crs.Grps.GrpTyp.MandatoryEnrolment = Par_GetParBool ("MandatoryEnrolment");
|
||||
Gbl.Crs.Grps.GrpTyp.MultipleEnrolment = Par_GetParBool ("MultipleEnrolment");
|
||||
|
||||
/* Get open time */
|
||||
Gbl.Crs.Grps.GrpTyp.OpenTimeUTC = Dat_GetTimeUTCFromForm (Dat_STR_TIME);
|
||||
|
@ -3298,7 +3298,7 @@ void Grp_ReceiveFormNewGrp (void)
|
|||
if ((Gbl.Crs.Grps.GrpTyp.GrpTypCod = Par_GetParCode (Par_GrpTypCod)) > 0) // Group type valid
|
||||
{
|
||||
/* Get group name */
|
||||
Par_GetParToText ("GrpName",Gbl.Crs.Grps.GrpName,
|
||||
Par_GetParText ("GrpName",Gbl.Crs.Grps.GrpName,
|
||||
Grp_MAX_BYTES_GROUP_NAME);
|
||||
|
||||
/* Get room */
|
||||
|
@ -3306,7 +3306,7 @@ void Grp_ReceiveFormNewGrp (void)
|
|||
|
||||
/* Get maximum number of students */
|
||||
Gbl.Crs.Grps.MaxStudents = (unsigned)
|
||||
Par_GetParToUnsignedLong ("MaxStudents",
|
||||
Par_GetParUnsignedLong ("MaxStudents",
|
||||
0,
|
||||
Grp_MAX_STUDENTS_IN_A_GROUP,
|
||||
Grp_NUM_STUDENTS_NOT_LIMITED);
|
||||
|
@ -3820,7 +3820,7 @@ void Grp_ChangeMandatGrpTyp (void)
|
|||
Gbl.Crs.Grps.GrpTyp.GrpTypCod = Par_GetAndCheckParCode (Par_GrpTypCod);
|
||||
|
||||
/* Get the new type of enrolment (mandatory or voluntaria) of this type of group */
|
||||
NewMandatoryEnrolment = Par_GetParToBool ("MandatoryEnrolment");
|
||||
NewMandatoryEnrolment = Par_GetParBool ("MandatoryEnrolment");
|
||||
|
||||
/* Get from the database the name of the type and the old type of enrolment */
|
||||
Grp_GetDataOfGroupTypeByCod (&Gbl.Crs.Grps.GrpTyp);
|
||||
|
@ -3873,7 +3873,7 @@ void Grp_ChangeMultiGrpTyp (void)
|
|||
Gbl.Crs.Grps.GrpTyp.GrpTypCod = Par_GetAndCheckParCode (Par_GrpTypCod);
|
||||
|
||||
/* Get the new type of enrolment (single or multiple) of this type of group */
|
||||
NewMultipleEnrolment = Par_GetParToBool ("MultipleEnrolment");
|
||||
NewMultipleEnrolment = Par_GetParBool ("MultipleEnrolment");
|
||||
|
||||
/* Get from the database the name of the type and the old type of enrolment */
|
||||
Grp_GetDataOfGroupTypeByCod (&Gbl.Crs.Grps.GrpTyp);
|
||||
|
@ -3959,7 +3959,7 @@ void Grp_ChangeMaxStdsGrp (void)
|
|||
|
||||
/* Get the new maximum number of students of the group */
|
||||
NewMaxStds = (unsigned)
|
||||
Par_GetParToUnsignedLong ("MaxStudents",
|
||||
Par_GetParUnsignedLong ("MaxStudents",
|
||||
0,
|
||||
Grp_MAX_STUDENTS_IN_A_GROUP,
|
||||
Grp_NUM_STUDENTS_NOT_LIMITED);
|
||||
|
@ -4046,7 +4046,7 @@ void Grp_RenameGroupType (void)
|
|||
Gbl.Crs.Grps.GrpTyp.GrpTypCod = Par_GetAndCheckParCode (Par_GrpTypCod);
|
||||
|
||||
/* Get the new name for the group type */
|
||||
Par_GetParToText ("GrpTypName",NewNameGrpTyp,Grp_MAX_BYTES_GROUP_TYPE_NAME);
|
||||
Par_GetParText ("GrpTypName",NewNameGrpTyp,Grp_MAX_BYTES_GROUP_TYPE_NAME);
|
||||
|
||||
/***** Get from the database the old name of the group type *****/
|
||||
Grp_GetDataOfGroupTypeByCod (&Gbl.Crs.Grps.GrpTyp);
|
||||
|
@ -4118,7 +4118,7 @@ void Grp_RenameGroup (void)
|
|||
Gbl.Crs.Grps.GrpCod = Par_GetAndCheckParCode (Par_GrpCod);
|
||||
|
||||
/* Get the new name for the group */
|
||||
Par_GetParToText ("GrpName",NewNameGrp,Grp_MAX_BYTES_GROUP_NAME);
|
||||
Par_GetParText ("GrpName",NewNameGrp,Grp_MAX_BYTES_GROUP_NAME);
|
||||
|
||||
/***** Get from the database the type and the old name of the group *****/
|
||||
GrpDat.GrpCod = Gbl.Crs.Grps.GrpCod;
|
||||
|
@ -4177,7 +4177,7 @@ void Grp_RenameGroup (void)
|
|||
static void Grp_PutParamGrpTypCod (void *GrpTypCod)
|
||||
{
|
||||
if (GrpTypCod)
|
||||
Par_PutParCod (Par_GrpTypCod,*((long *) GrpTypCod));
|
||||
Par_PutParCode (Par_GrpTypCod,*((long *) GrpTypCod));
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -4187,7 +4187,7 @@ static void Grp_PutParamGrpTypCod (void *GrpTypCod)
|
|||
void Grp_PutParamGrpCod (void *GrpCod)
|
||||
{
|
||||
if (GrpCod)
|
||||
Par_PutParCod (Par_GrpCod,*((long *) GrpCod));
|
||||
Par_PutParCode (Par_GrpCod,*((long *) GrpCod));
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -4285,7 +4285,7 @@ void Grp_FreeListCodGrp (struct ListCodGrps *LstGrps)
|
|||
|
||||
void Grp_PutParamAllGroups (void)
|
||||
{
|
||||
Par_PutHiddenParamChar ("AllGroups",'Y');
|
||||
Par_PutParChar ("AllGroups",'Y');
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -4295,18 +4295,18 @@ void Grp_PutParamAllGroups (void)
|
|||
void Grp_PutParamWhichGroups (void *WhichGrps)
|
||||
{
|
||||
if (WhichGrps)
|
||||
Par_PutHiddenParamUnsigned (NULL,"WhichGrps",
|
||||
Par_PutParUnsigned (NULL,"WhichGrps",
|
||||
(unsigned) *((Grp_WhichGroups_t *) WhichGrps));
|
||||
}
|
||||
|
||||
void Grp_PutParamWhichGrpsOnlyMyGrps (void)
|
||||
{
|
||||
Par_PutHiddenParamUnsigned (NULL,"WhichGrps",(unsigned) Grp_MY_GROUPS);
|
||||
Par_PutParUnsigned (NULL,"WhichGrps",(unsigned) Grp_MY_GROUPS);
|
||||
}
|
||||
|
||||
void Grp_PutParamWhichGrpsAllGrps (void)
|
||||
{
|
||||
Par_PutHiddenParamUnsigned (NULL,"WhichGrps",(unsigned) Grp_ALL_GROUPS);
|
||||
Par_PutParUnsigned (NULL,"WhichGrps",(unsigned) Grp_ALL_GROUPS);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -4329,7 +4329,7 @@ void Grp_ShowFormToSelWhichGrps (Act_Action_t Action,
|
|||
{
|
||||
Set_BeginPref (WhichGrps == Gbl.Crs.Grps.WhichGrps);
|
||||
Frm_BeginForm (Action);
|
||||
Par_PutHiddenParamUnsigned (NULL,"WhichGrps",(unsigned) WhichGrps);
|
||||
Par_PutParUnsigned (NULL,"WhichGrps",(unsigned) WhichGrps);
|
||||
if (FuncParams) // Extra parameters depending on the action
|
||||
FuncParams (Args);
|
||||
Ico_PutSettingIconLink (WhichGrps == Grp_MY_GROUPS ? "mysitemap.png" :
|
||||
|
@ -4386,7 +4386,7 @@ Grp_WhichGroups_t Grp_GetParamWhichGroups (void)
|
|||
|
||||
/* Get parameter */
|
||||
Gbl.Crs.Grps.WhichGrps = (Grp_WhichGroups_t)
|
||||
Par_GetParToUnsignedLong ("WhichGrps",
|
||||
Par_GetParUnsignedLong ("WhichGrps",
|
||||
0,
|
||||
Grp_NUM_WHICH_GROUPS - 1,
|
||||
(unsigned long) WhichGroupsDefault);
|
||||
|
|
|
@ -214,7 +214,7 @@ void Hie_WriteHierarchyInBreadcrumb (void)
|
|||
HTM_NBSP ();
|
||||
|
||||
Frm_BeginFormGoTo (ActMnu);
|
||||
Par_PutHiddenParamUnsigned (NULL,"NxtTab",(unsigned) TabSys);
|
||||
Par_PutParUnsigned (NULL,"NxtTab",(unsigned) TabSys);
|
||||
HTM_BUTTON_Submit_Begin (Txt_System,"class=\"BT_LINK\"");
|
||||
HTM_Txt (Txt_System);
|
||||
HTM_BUTTON_End ();
|
||||
|
@ -452,7 +452,7 @@ void Hie_WriteBigNameCtyInsCtrDegCrs (void)
|
|||
HTM_DIV_Begin ("id=\"big_name_container\"");
|
||||
|
||||
Frm_BeginForm (ActMnu);
|
||||
Par_PutHiddenParamUnsigned (NULL,"NxtTab",(unsigned) NextTab[Gbl.Hierarchy.Level]);
|
||||
Par_PutParUnsigned (NULL,"NxtTab",(unsigned) NextTab[Gbl.Hierarchy.Level]);
|
||||
HTM_BUTTON_Submit_Begin (ShrtText[Gbl.Hierarchy.Level],
|
||||
"class=\"BT_LINK ICO_HIGHLIGHT\"");
|
||||
|
||||
|
@ -839,7 +839,7 @@ Hie_Status_t Hie_GetParamStatus (void)
|
|||
|
||||
/***** Get parameter with status *****/
|
||||
Status = (Hie_Status_t)
|
||||
Par_GetParToUnsignedLong ("Status",
|
||||
Par_GetParUnsignedLong ("Status",
|
||||
0,
|
||||
(unsigned long) Hie_MAX_STATUS,
|
||||
(unsigned long) Hie_WRONG_STATUS);
|
||||
|
@ -900,22 +900,7 @@ static Hie_Status_t Hie_GetStatusBitsFromStatusTxt (Hie_StatusTxt_t StatusTxt)
|
|||
void Hie_PutParamOtherHieCod (void *HieCod)
|
||||
{
|
||||
if (HieCod)
|
||||
Par_PutHiddenParamLong (NULL,"OthHieCod",*((long *) HieCod));
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/***** Get parameter with code of other institution/center/degree/course *****/
|
||||
/*****************************************************************************/
|
||||
|
||||
long Hie_GetAndCheckParamOtherHieCod (long MinCodAllowed)
|
||||
{
|
||||
long HieCod;
|
||||
|
||||
/***** Get and check parameter with code *****/
|
||||
if ((HieCod = Par_GetParToLong ("OthHieCod")) < MinCodAllowed)
|
||||
Err_WrongHierarchyExit ();
|
||||
|
||||
return HieCod;
|
||||
Par_PutParCode (Par_OthHieCod,*((long *) HieCod));
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
|
@ -70,7 +70,6 @@ void Hie_WriteStatusCellEditable (bool ICanEdit,Hie_Status_t Status,
|
|||
const char *Txt[Hie_NUM_STATUS_TXT]);
|
||||
Hie_Status_t Hie_GetParamStatus (void);
|
||||
void Hie_PutParamOtherHieCod (void *HieCod);
|
||||
long Hie_GetAndCheckParamOtherHieCod (long MinCodAllowed);
|
||||
|
||||
//-------------------------------- Figures ------------------------------------
|
||||
void Hie_GetAndShowHierarchyStats (void);
|
||||
|
|
|
@ -137,7 +137,7 @@ void Hld_SeeHolidays (void)
|
|||
{
|
||||
HTM_TH_Begin (HTM_HEAD_LEFT);
|
||||
Frm_BeginForm (ActSeeHld);
|
||||
Par_PutHiddenParamUnsigned (NULL,"Order",(unsigned) Order);
|
||||
Par_PutParUnsigned (NULL,"Order",(unsigned) Order);
|
||||
HTM_BUTTON_Submit_Begin (Txt_HOLIDAYS_HELP_ORDER[Order],
|
||||
"class=\"BT_LINK\"");
|
||||
if (Order == Holidays.SelectedOrder)
|
||||
|
@ -225,7 +225,7 @@ void Hld_SeeHolidays (void)
|
|||
|
||||
static Hld_Order_t Hld_GetParamHldOrder (void)
|
||||
{
|
||||
return (Hld_Order_t) Par_GetParToUnsignedLong ("Order",
|
||||
return (Hld_Order_t) Par_GetParUnsignedLong ("Order",
|
||||
0,
|
||||
Hld_NUM_ORDERS - 1,
|
||||
(unsigned long) Hld_DEFAULT_ORDER_TYPE);
|
||||
|
@ -458,7 +458,7 @@ static void Hld_GetDataOfHolidayByCod (struct Hld_Holiday *Hld)
|
|||
static Hld_HolidayType_t Hld_GetParamHldType (void)
|
||||
{
|
||||
return (Hld_HolidayType_t)
|
||||
Par_GetParToUnsignedLong ("HldTyp",
|
||||
Par_GetParUnsignedLong ("HldTyp",
|
||||
0,
|
||||
Hld_NUM_TYPES_HOLIDAY - 1,
|
||||
(unsigned long) Hld_HOLIDAY_TYPE_DEFAULT);
|
||||
|
@ -631,17 +631,7 @@ static void Hld_ListHolidaysForEdition (const struct Hld_Holidays *Holidays,
|
|||
static void Hld_PutParamHldCod (void *HldCod)
|
||||
{
|
||||
if (HldCod)
|
||||
Par_PutHiddenParamLong (NULL,"HldCod",*((long *) HldCod));
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/********************* Get parameter with code of holiday ********************/
|
||||
/*****************************************************************************/
|
||||
|
||||
long Hld_GetParamHldCod (void)
|
||||
{
|
||||
/***** Get code of holiday *****/
|
||||
return Par_GetParToLong ("HldCod");
|
||||
Par_PutParCode (Par_HldCod,*((long *) HldCod));
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -656,8 +646,7 @@ void Hld_RemoveHoliday (void)
|
|||
Hld_EditingHolidayConstructor ();
|
||||
|
||||
/***** Get holiday code *****/
|
||||
if ((Hld_EditingHld->HldCod = Hld_GetParamHldCod ()) <= 0)
|
||||
Err_WrongHolidayExit ();
|
||||
Hld_EditingHld->HldCod = Par_GetAndCheckParCode (Par_HldCod);
|
||||
|
||||
/***** Get data of the holiday from database *****/
|
||||
Hld_GetDataOfHolidayByCod (Hld_EditingHld);
|
||||
|
@ -685,8 +674,7 @@ void Hld_ChangeHolidayPlace (void)
|
|||
|
||||
/***** Get parameters from form *****/
|
||||
/* Get the code of the holiday */
|
||||
if ((Hld_EditingHld->HldCod = Hld_GetParamHldCod ()) <= 0)
|
||||
Err_WrongHolidayExit ();
|
||||
Hld_EditingHld->HldCod = Par_GetAndCheckParCode (Par_HldCod);
|
||||
|
||||
/* Get the new place for the holiday */
|
||||
NewPlace.PlcCod = Plc_GetParamPlcCod ();
|
||||
|
@ -721,8 +709,7 @@ void Hld_ChangeHolidayType (void)
|
|||
Hld_EditingHolidayConstructor ();
|
||||
|
||||
/***** Get the code of the holiday *****/
|
||||
if ((Hld_EditingHld->HldCod = Hld_GetParamHldCod ()) <= 0)
|
||||
Err_WrongHolidayExit ();
|
||||
Hld_EditingHld->HldCod = Par_GetAndCheckParCode (Par_HldCod);
|
||||
|
||||
/***** Get from the database the data of the holiday *****/
|
||||
Hld_GetDataOfHolidayByCod (Hld_EditingHld);
|
||||
|
@ -774,8 +761,7 @@ static void Hld_ChangeDate (Hld_StartOrEndDate_t StartOrEndDate)
|
|||
Hld_EditingHolidayConstructor ();
|
||||
|
||||
/***** Get the code of the holiday *****/
|
||||
if ((Hld_EditingHld->HldCod = Hld_GetParamHldCod ()) <= 0)
|
||||
Err_WrongHolidayExit ();
|
||||
Hld_EditingHld->HldCod = Par_GetAndCheckParCode (Par_HldCod);
|
||||
|
||||
/***** Get from the database the data of the holiday *****/
|
||||
Hld_GetDataOfHolidayByCod (Hld_EditingHld);
|
||||
|
@ -839,11 +825,10 @@ void Hld_RenameHoliday (void)
|
|||
|
||||
/***** Get parameters from form *****/
|
||||
/* Get the code of the holiday */
|
||||
if ((Hld_EditingHld->HldCod = Hld_GetParamHldCod ()) <= 0)
|
||||
Err_WrongHolidayExit ();
|
||||
Hld_EditingHld->HldCod = Par_GetAndCheckParCode (Par_HldCod);
|
||||
|
||||
/* Get the new name for the holiday */
|
||||
Par_GetParToText ("Name",NewHldName,Hld_MAX_BYTES_HOLIDAY_NAME);
|
||||
Par_GetParText ("Name",NewHldName,Hld_MAX_BYTES_HOLIDAY_NAME);
|
||||
|
||||
/***** Get from the database the old names of the holiday *****/
|
||||
Hld_GetDataOfHolidayByCod (Hld_EditingHld);
|
||||
|
@ -1073,7 +1058,7 @@ void Hld_ReceiveFormNewHoliday (void)
|
|||
}
|
||||
|
||||
/***** Get holiday name *****/
|
||||
Par_GetParToText ("Name",Hld_EditingHld->Name,Hld_MAX_BYTES_HOLIDAY_NAME);
|
||||
Par_GetParText ("Name",Hld_EditingHld->Name,Hld_MAX_BYTES_HOLIDAY_NAME);
|
||||
|
||||
/***** Create the new holiday or set warning message *****/
|
||||
if (Hld_EditingHld->Name[0]) // If there's a holiday name
|
||||
|
|
|
@ -90,8 +90,6 @@ void Hld_EditHolidays (void);
|
|||
void Hld_GetListHolidays (struct Hld_Holidays *Holidays);
|
||||
void Hld_FreeListHolidays (struct Hld_Holidays *Holidays);
|
||||
|
||||
long Hld_GetParamHldCod (void);
|
||||
|
||||
void Hld_RemoveHoliday (void);
|
||||
void Hld_ChangeHolidayPlace (void);
|
||||
void Hld_ChangeHolidayType (void);
|
||||
|
|
|
@ -152,7 +152,7 @@ void Ico_PutIconsToSelectIconSet (void)
|
|||
{
|
||||
Set_BeginPref (IconSet == Gbl.Prefs.IconSet);
|
||||
Frm_BeginForm (ActChgIco);
|
||||
Par_PutHiddenParamString (NULL,"IconSet",Ico_IconSetId[IconSet]);
|
||||
Par_PutParString (NULL,"IconSet",Ico_IconSetId[IconSet]);
|
||||
snprintf (Icon,sizeof (Icon),"%s/%s/cog.svg",
|
||||
Cfg_ICON_FOLDER_SETS,
|
||||
Ico_IconSetId[IconSet]);
|
||||
|
@ -201,7 +201,7 @@ Ico_IconSet_t Ico_GetParamIconSet (void)
|
|||
char IconSetId[Ico_MAX_BYTES_ICON_SET_ID + 1];
|
||||
Ico_IconSet_t IconSet;
|
||||
|
||||
Par_GetParToText ("IconSet",IconSetId,Ico_MAX_BYTES_ICON_SET_ID);
|
||||
Par_GetParText ("IconSet",IconSetId,Ico_MAX_BYTES_ICON_SET_ID);
|
||||
for (IconSet = (Ico_IconSet_t) 0;
|
||||
IconSet <= (Ico_IconSet_t) (Ico_NUM_ICON_SETS - 1);
|
||||
IconSet++)
|
||||
|
|
|
@ -221,10 +221,10 @@ void Ind_ReqIndicatorsCourses (void)
|
|||
/* Button to show more details */
|
||||
Frm_BeginForm (ActSeeAllStaCrs);
|
||||
Sco_PutParamScope ("ScopeInd",Gbl.Scope.Current);
|
||||
Par_PutParCod (Par_OthDegTypCod,Indicators.DegTypCod);
|
||||
Par_PutParCod (Par_DptCod ,Indicators.DptCod );
|
||||
Par_PutParCode (Par_OthDegTypCod,Indicators.DegTypCod);
|
||||
Par_PutParCode (Par_DptCod ,Indicators.DptCod );
|
||||
if (Indicators.StrIndicatorsSelected[0])
|
||||
Par_PutHiddenParamString (NULL,"Indicators",Indicators.StrIndicatorsSelected);
|
||||
Par_PutParString (NULL,"Indicators",Indicators.StrIndicatorsSelected);
|
||||
Btn_PutConfirmButton (Txt_Show_more_details);
|
||||
Frm_EndForm ();
|
||||
}
|
||||
|
@ -356,7 +356,7 @@ static bool Ind_GetIfShowBigList (struct Ind_Indicators *Indicators,
|
|||
return true; // List is not too big ==> show it
|
||||
|
||||
/***** Get parameter with user's confirmation to see a big list of courses *****/
|
||||
if (!(ShowBigList = Par_GetParToBool ("ShowBigList")))
|
||||
if (!(ShowBigList = Par_GetParBool ("ShowBigList")))
|
||||
Ind_PutButtonToConfirmIWantToSeeBigList (Indicators,NumCrss);
|
||||
|
||||
return ShowBigList;
|
||||
|
@ -387,11 +387,11 @@ static void Ind_PutParamsConfirmIWantToSeeBigList (void *Indicators)
|
|||
if (Indicators)
|
||||
{
|
||||
Sco_PutParamScope ("ScopeInd",Gbl.Scope.Current);
|
||||
Par_PutParCod (Par_OthDegTypCod,((struct Ind_Indicators *) Indicators)->DegTypCod);
|
||||
Par_PutParCod (Par_DptCod ,((struct Ind_Indicators *) Indicators)->DptCod );
|
||||
Par_PutParCode (Par_OthDegTypCod,((struct Ind_Indicators *) Indicators)->DegTypCod);
|
||||
Par_PutParCode (Par_DptCod ,((struct Ind_Indicators *) Indicators)->DptCod );
|
||||
if (((struct Ind_Indicators *) Indicators)->StrIndicatorsSelected[0])
|
||||
Par_PutHiddenParamString (NULL,"Indicators",((struct Ind_Indicators *) Indicators)->StrIndicatorsSelected);
|
||||
Par_PutHiddenParamChar ("ShowBigList",'Y');
|
||||
Par_PutParString (NULL,"Indicators",((struct Ind_Indicators *) Indicators)->StrIndicatorsSelected);
|
||||
Par_PutParChar ("ShowBigList",'Y');
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -607,7 +607,7 @@ void Inf_ChangeIHaveReadInfo (void)
|
|||
|
||||
static bool Inf_GetMustBeReadFromForm (void)
|
||||
{
|
||||
return Par_GetParToBool ("MustBeRead");
|
||||
return Par_GetParBool ("MustBeRead");
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -616,7 +616,7 @@ static bool Inf_GetMustBeReadFromForm (void)
|
|||
|
||||
static bool Inf_GetIfIHaveReadFromForm (void)
|
||||
{
|
||||
return Par_GetParToBool ("IHaveRead");
|
||||
return Par_GetParBool ("IHaveRead");
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -1270,7 +1270,7 @@ Inf_Src_t Inf_GetInfoSrcFromForm (void)
|
|||
/***** Get info source for a specific type of course information
|
||||
(introduction, teaching guide, bibliography, FAQ, links or evaluation) *****/
|
||||
return (Inf_Src_t)
|
||||
Par_GetParToUnsignedLong ("InfoSrc",
|
||||
Par_GetParUnsignedLong ("InfoSrc",
|
||||
0,
|
||||
Inf_NUM_SOURCES - 1,
|
||||
(unsigned long) Inf_NONE);
|
||||
|
@ -1864,7 +1864,7 @@ void Inf_ReceiveURLInfo (void)
|
|||
Inf_AsignInfoType (&Gbl.Crs.Info,&Syllabus);
|
||||
|
||||
/***** Get parameter with URL *****/
|
||||
Par_GetParToText ("InfoSrcURL",Gbl.Crs.Info.URL,Cns_MAX_BYTES_WWW);
|
||||
Par_GetParText ("InfoSrcURL",Gbl.Crs.Info.URL,Cns_MAX_BYTES_WWW);
|
||||
|
||||
/***** Build path to file containing URL *****/
|
||||
Inf_BuildPathURL (Gbl.Hierarchy.Crs.CrsCod,Gbl.Crs.Info.Type,PathFile);
|
||||
|
|
|
@ -481,7 +481,7 @@ static void Ins_PutHeadInstitutionsForSeeing (bool OrderSelectable)
|
|||
if (OrderSelectable)
|
||||
{
|
||||
Frm_BeginForm (ActSeeIns);
|
||||
Par_PutHiddenParamUnsigned (NULL,"Order",(unsigned) Order);
|
||||
Par_PutParUnsigned (NULL,"Order",(unsigned) Order);
|
||||
HTM_BUTTON_Submit_Begin (Txt_INSTITUTIONS_HELP_ORDER[Order],
|
||||
"class=\"BT_LINK\"");
|
||||
if (Order == Gbl.Hierarchy.Inss.SelectedOrder)
|
||||
|
@ -518,7 +518,7 @@ static void Ins_PutHeadInstitutionsForSeeing (bool OrderSelectable)
|
|||
static void Ins_GetParamInsOrder (void)
|
||||
{
|
||||
Gbl.Hierarchy.Inss.SelectedOrder = (Ins_Order_t)
|
||||
Par_GetParToUnsignedLong ("Order",
|
||||
Par_GetParUnsignedLong ("Order",
|
||||
0,
|
||||
Ins_NUM_ORDERS - 1,
|
||||
(unsigned long) Ins_ORDER_DEFAULT);
|
||||
|
@ -1113,7 +1113,7 @@ void Ins_PutParamCurrentInsCod (void *InsCod)
|
|||
|
||||
void Ins_PutParamInsCod (long InsCod)
|
||||
{
|
||||
Par_PutHiddenParamLong (NULL,"ins",InsCod);
|
||||
Par_PutParLong (NULL,"ins",InsCod);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -1130,7 +1130,7 @@ void Ins_RemoveInstitution (void)
|
|||
Ins_EditingInstitutionConstructor ();
|
||||
|
||||
/***** Get institution code *****/
|
||||
Ins_EditingIns->InsCod = Hie_GetAndCheckParamOtherHieCod (1);
|
||||
Ins_EditingIns->InsCod = Par_GetAndCheckParCode (Par_OthHieCod);
|
||||
|
||||
/***** Get data of the institution from database *****/
|
||||
Ins_GetDataOfInstitByCod (Ins_EditingIns);
|
||||
|
@ -1204,7 +1204,7 @@ void Ins_RenameInsShort (void)
|
|||
Ins_EditingInstitutionConstructor ();
|
||||
|
||||
/***** Rename institution *****/
|
||||
Ins_EditingIns->InsCod = Hie_GetAndCheckParamOtherHieCod (1);
|
||||
Ins_EditingIns->InsCod = Par_GetAndCheckParCode (Par_OthHieCod);
|
||||
Ins_RenameInstitution (Ins_EditingIns,Cns_SHRT_NAME);
|
||||
}
|
||||
|
||||
|
@ -1214,7 +1214,7 @@ void Ins_RenameInsFull (void)
|
|||
Ins_EditingInstitutionConstructor ();
|
||||
|
||||
/***** Rename institution *****/
|
||||
Ins_EditingIns->InsCod = Hie_GetAndCheckParamOtherHieCod (1);
|
||||
Ins_EditingIns->InsCod = Par_GetAndCheckParCode (Par_OthHieCod);
|
||||
Ins_RenameInstitution (Ins_EditingIns,Cns_FULL_NAME);
|
||||
}
|
||||
|
||||
|
@ -1250,7 +1250,7 @@ void Ins_RenameInstitution (struct Ins_Instit *Ins,Cns_ShrtOrFullName_t ShrtOrFu
|
|||
}
|
||||
|
||||
/***** Get the new name for the institution from form *****/
|
||||
Par_GetParToText (ParamName,NewInsName,MaxBytes);
|
||||
Par_GetParText (ParamName,NewInsName,MaxBytes);
|
||||
|
||||
/***** Get from the database the old names of the institution *****/
|
||||
Ins_GetDataOfInstitByCod (Ins);
|
||||
|
@ -1317,10 +1317,10 @@ void Ins_ChangeInsWWW (void)
|
|||
|
||||
/***** Get parameters from form *****/
|
||||
/* Get the code of the institution */
|
||||
Ins_EditingIns->InsCod = Hie_GetAndCheckParamOtherHieCod (1);
|
||||
Ins_EditingIns->InsCod = Par_GetAndCheckParCode (Par_OthHieCod);
|
||||
|
||||
/* Get the new WWW for the institution */
|
||||
Par_GetParToText ("WWW",NewWWW,Cns_MAX_BYTES_WWW);
|
||||
Par_GetParText ("WWW",NewWWW,Cns_MAX_BYTES_WWW);
|
||||
|
||||
/***** Get data of institution *****/
|
||||
Ins_GetDataOfInstitByCod (Ins_EditingIns);
|
||||
|
@ -1356,7 +1356,7 @@ void Ins_ChangeInsStatus (void)
|
|||
|
||||
/***** Get parameters from form *****/
|
||||
/* Get institution code */
|
||||
Ins_EditingIns->InsCod = Hie_GetAndCheckParamOtherHieCod (1);
|
||||
Ins_EditingIns->InsCod = Par_GetAndCheckParCode (Par_OthHieCod);
|
||||
|
||||
/* Get parameter with status */
|
||||
Status = Hie_GetParamStatus (); // New status
|
||||
|
@ -1597,13 +1597,13 @@ static void Ins_ReceiveFormRequestOrCreateIns (Hie_Status_t Status)
|
|||
Ins_EditingIns->CtyCod = Gbl.Hierarchy.Cty.CtyCod;
|
||||
|
||||
/* Get institution short name */
|
||||
Par_GetParToText ("ShortName",Ins_EditingIns->ShrtName,Cns_HIERARCHY_MAX_BYTES_SHRT_NAME);
|
||||
Par_GetParText ("ShortName",Ins_EditingIns->ShrtName,Cns_HIERARCHY_MAX_BYTES_SHRT_NAME);
|
||||
|
||||
/* Get institution full name */
|
||||
Par_GetParToText ("FullName",Ins_EditingIns->FullName,Cns_HIERARCHY_MAX_BYTES_FULL_NAME);
|
||||
Par_GetParText ("FullName",Ins_EditingIns->FullName,Cns_HIERARCHY_MAX_BYTES_FULL_NAME);
|
||||
|
||||
/* Get institution WWW */
|
||||
Par_GetParToText ("WWW",Ins_EditingIns->WWW,Cns_MAX_BYTES_WWW);
|
||||
Par_GetParText ("WWW",Ins_EditingIns->WWW,Cns_MAX_BYTES_WWW);
|
||||
|
||||
if (Ins_EditingIns->ShrtName[0] &&
|
||||
Ins_EditingIns->FullName[0]) // If there's a institution name
|
||||
|
|
|
@ -602,7 +602,7 @@ void InsCfg_ChangeInsWWW (void)
|
|||
|
||||
/***** Get parameters from form *****/
|
||||
/* Get the new WWW for the institution */
|
||||
Par_GetParToText ("WWW",NewWWW,Cns_MAX_BYTES_WWW);
|
||||
Par_GetParText ("WWW",NewWWW,Cns_MAX_BYTES_WWW);
|
||||
|
||||
/***** Check if new WWW is empty *****/
|
||||
if (NewWWW[0])
|
||||
|
|
|
@ -179,7 +179,7 @@ void Lan_AskChangeLanguage (void)
|
|||
static void Lan_PutParamLanguage (void *Language)
|
||||
{
|
||||
if (Language)
|
||||
Par_PutHiddenParamUnsigned (NULL,"Lan",(unsigned) *((Lan_Language_t *) Language));
|
||||
Par_PutParUnsigned (NULL,"Lan",(unsigned) *((Lan_Language_t *) Language));
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -222,7 +222,7 @@ Lan_Language_t Lan_GetParamLanguage (void)
|
|||
extern const unsigned Txt_Current_CGI_SWAD_Language;
|
||||
|
||||
return (Lan_Language_t)
|
||||
Par_GetParToUnsignedLong ("Lan",
|
||||
Par_GetParUnsignedLong ("Lan",
|
||||
1,
|
||||
Lan_NUM_LANGUAGES,
|
||||
(unsigned long) Txt_Current_CGI_SWAD_Language);
|
||||
|
|
|
@ -1002,7 +1002,7 @@ static void Lay_WritePageTopHeading (void)
|
|||
|
||||
/* Begin form to go to home page */
|
||||
Frm_BeginFormGoTo (ActMnu);
|
||||
Par_PutHiddenParamUnsigned (NULL,"NxtTab",(unsigned) TabSys);
|
||||
Par_PutParUnsigned (NULL,"NxtTab",(unsigned) TabSys);
|
||||
|
||||
HTM_DIV_Begin ("id=\"head_row_1_logo_small\"");
|
||||
HTM_INPUT_IMAGE (Cfg_URL_ICON_PUBLIC,Cfg_PLATFORM_LOGO_SMALL_FILENAME,
|
||||
|
|
14
swad_link.c
14
swad_link.c
|
@ -479,7 +479,7 @@ static void Lnk_ListLinksForEdition (const struct Lnk_Links *Links)
|
|||
static void Lnk_PutParamLnkCod (void *LnkCod)
|
||||
{
|
||||
if (LnkCod)
|
||||
Par_PutHiddenParamLong (NULL,"LnkCod",*((long *) LnkCod));
|
||||
Par_PutParLong (NULL,"LnkCod",*((long *) LnkCod));
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -489,7 +489,7 @@ static void Lnk_PutParamLnkCod (void *LnkCod)
|
|||
long Lnk_GetParamLnkCod (void)
|
||||
{
|
||||
/***** Get code of link *****/
|
||||
return Par_GetParToLong ("LnkCod");
|
||||
return Par_GetParLong ("LnkCod");
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -582,7 +582,7 @@ static void Lnk_RenameLink (Cns_ShrtOrFullName_t ShrtOrFullName)
|
|||
Err_WrongLinkExit ();
|
||||
|
||||
/* Get the new name for the link */
|
||||
Par_GetParToText (ParamName,NewLnkName,MaxBytes);
|
||||
Par_GetParText (ParamName,NewLnkName,MaxBytes);
|
||||
|
||||
/***** Get link data from the database *****/
|
||||
Lnk_GetDataOfLinkByCod (Lnk_EditingLnk);
|
||||
|
@ -639,7 +639,7 @@ void Lnk_ChangeLinkWWW (void)
|
|||
Err_WrongLinkExit ();
|
||||
|
||||
/* Get the new WWW for the link */
|
||||
Par_GetParToText ("WWW",NewWWW,Cns_MAX_BYTES_WWW);
|
||||
Par_GetParText ("WWW",NewWWW,Cns_MAX_BYTES_WWW);
|
||||
|
||||
/***** Get link data from the database *****/
|
||||
Lnk_GetDataOfLinkByCod (Lnk_EditingLnk);
|
||||
|
@ -777,13 +777,13 @@ void Lnk_ReceiveFormNewLink (void)
|
|||
|
||||
/***** Get parameters from form *****/
|
||||
/* Get link short name */
|
||||
Par_GetParToText ("ShortName",Lnk_EditingLnk->ShrtName,Lnk_MAX_BYTES_LINK_SHRT_NAME);
|
||||
Par_GetParText ("ShortName",Lnk_EditingLnk->ShrtName,Lnk_MAX_BYTES_LINK_SHRT_NAME);
|
||||
|
||||
/* Get link full name */
|
||||
Par_GetParToText ("FullName",Lnk_EditingLnk->FullName,Lnk_MAX_BYTES_LINK_FULL_NAME);
|
||||
Par_GetParText ("FullName",Lnk_EditingLnk->FullName,Lnk_MAX_BYTES_LINK_FULL_NAME);
|
||||
|
||||
/* Get link URL */
|
||||
Par_GetParToText ("WWW",Lnk_EditingLnk->WWW,Cns_MAX_BYTES_WWW);
|
||||
Par_GetParText ("WWW",Lnk_EditingLnk->WWW,Cns_MAX_BYTES_WWW);
|
||||
|
||||
if (Lnk_EditingLnk->ShrtName[0] &&
|
||||
Lnk_EditingLnk->FullName[0]) // If there's a link name
|
||||
|
|
26
swad_mail.c
26
swad_mail.c
|
@ -154,7 +154,7 @@ void Mai_SeeMailDomains (void)
|
|||
HTM_TH_Begin (HTM_HEAD_LEFT);
|
||||
|
||||
Frm_BeginForm (ActSeeMai);
|
||||
Par_PutHiddenParamUnsigned (NULL,"Order",(unsigned) Order);
|
||||
Par_PutParUnsigned (NULL,"Order",(unsigned) Order);
|
||||
HTM_BUTTON_Submit_Begin (Txt_EMAIL_DOMAIN_HELP_ORDER[Order],
|
||||
"class=\"BT_LINK\"");
|
||||
if (Order == Mails.SelectedOrder)
|
||||
|
@ -206,7 +206,7 @@ void Mai_SeeMailDomains (void)
|
|||
static Mai_DomainsOrder_t Mai_GetParamMaiOrder (void)
|
||||
{
|
||||
return (Mai_DomainsOrder_t)
|
||||
Par_GetParToUnsignedLong ("Order",
|
||||
Par_GetParUnsignedLong ("Order",
|
||||
0,
|
||||
Mai_NUM_ORDERS - 1,
|
||||
(unsigned long) Mai_ORDER_DEFAULT);
|
||||
|
@ -509,7 +509,7 @@ static void Mai_ListMailDomainsForEdition (const struct Mai_Mails *Mails)
|
|||
static void Mai_PutParamMaiCod (void *MaiCod)
|
||||
{
|
||||
if (MaiCod)
|
||||
Par_PutHiddenParamLong (NULL,"MaiCod",*((long *) MaiCod));
|
||||
Par_PutParLong (NULL,"MaiCod",*((long *) MaiCod));
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -519,7 +519,7 @@ static void Mai_PutParamMaiCod (void *MaiCod)
|
|||
long Mai_GetParamMaiCod (void)
|
||||
{
|
||||
/***** Get code of mail *****/
|
||||
return Par_GetParToLong ("MaiCod");
|
||||
return Par_GetParLong ("MaiCod");
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -612,7 +612,7 @@ static void Mai_RenameMailDomain (Cns_ShrtOrFullName_t ShrtOrFullName)
|
|||
Err_WrongMailDomainExit ();
|
||||
|
||||
/* Get the new name for the mail */
|
||||
Par_GetParToText (ParamName,NewMaiName,MaxBytes);
|
||||
Par_GetParText (ParamName,NewMaiName,MaxBytes);
|
||||
|
||||
/***** Get from the database the old names of the mail *****/
|
||||
Mai_GetDataOfMailDomainByCod (Mai_EditingMai);
|
||||
|
@ -757,10 +757,10 @@ void Mai_ReceiveFormNewMailDomain (void)
|
|||
|
||||
/***** Get parameters from form *****/
|
||||
/* Get mail short name */
|
||||
Par_GetParToText ("Domain",Mai_EditingMai->Domain,Cns_MAX_BYTES_EMAIL_ADDRESS);
|
||||
Par_GetParText ("Domain",Mai_EditingMai->Domain,Cns_MAX_BYTES_EMAIL_ADDRESS);
|
||||
|
||||
/* Get mail full name */
|
||||
Par_GetParToText ("Info",Mai_EditingMai->Info,Mai_MAX_BYTES_MAIL_INFO);
|
||||
Par_GetParText ("Info",Mai_EditingMai->Info,Mai_MAX_BYTES_MAIL_INFO);
|
||||
|
||||
if (Mai_EditingMai->Domain[0] &&
|
||||
Mai_EditingMai->Info[0]) // If there's a mail name
|
||||
|
@ -1200,7 +1200,7 @@ static void Mai_ShowFormChangeUsrEmail (bool ItsMe,
|
|||
Frm_BeginFormAnchor (NextAction[UsrDat->Roles.InCurrentCrs].New,Mai_EMAIL_SECTION_ID);
|
||||
Usr_PutParamUsrCodEncrypted (UsrDat->EnUsrCod);
|
||||
}
|
||||
Par_PutHiddenParamString (NULL,"NewEmail",row[0]);
|
||||
Par_PutParString (NULL,"NewEmail",row[0]);
|
||||
Btn_PutConfirmButtonInline ((ItsMe && NumEmail == 1) ? Txt_Confirm_email :
|
||||
Txt_Use_this_email);
|
||||
Frm_EndForm ();
|
||||
|
@ -1252,7 +1252,7 @@ static void Mai_ShowFormChangeUsrEmail (bool ItsMe,
|
|||
static void Mai_PutParamsRemoveMyEmail (void *Email)
|
||||
{
|
||||
if (Email)
|
||||
Par_PutHiddenParamString (NULL,"Email",Email);
|
||||
Par_PutParString (NULL,"Email",Email);
|
||||
}
|
||||
|
||||
static void Mai_PutParamsRemoveOtherEmail (void *Email)
|
||||
|
@ -1260,7 +1260,7 @@ static void Mai_PutParamsRemoveOtherEmail (void *Email)
|
|||
if (Email)
|
||||
{
|
||||
Usr_PutParamUsrCodEncrypted (Gbl.Usrs.Other.UsrDat.EnUsrCod);
|
||||
Par_PutHiddenParamString (NULL,"Email",Email);
|
||||
Par_PutParString (NULL,"Email",Email);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1313,7 +1313,7 @@ static void Mai_RemoveEmail (struct Usr_Data *UsrDat)
|
|||
if (Usr_ICanEditOtherUsr (UsrDat))
|
||||
{
|
||||
/***** Get new email from form *****/
|
||||
Par_GetParToText ("Email",Email,Cns_MAX_BYTES_EMAIL_ADDRESS);
|
||||
Par_GetParText ("Email",Email,Cns_MAX_BYTES_EMAIL_ADDRESS);
|
||||
|
||||
/***** Remove one of user's old email addresses *****/
|
||||
Mai_DB_RemoveEmail (UsrDat->UsrCod,Email);
|
||||
|
@ -1384,7 +1384,7 @@ static void Mai_NewUsrEmail (struct Usr_Data *UsrDat,bool ItsMe)
|
|||
if (Usr_ICanEditOtherUsr (UsrDat))
|
||||
{
|
||||
/***** Get new email from form *****/
|
||||
Par_GetParToText ("NewEmail",NewEmail,Cns_MAX_BYTES_EMAIL_ADDRESS);
|
||||
Par_GetParText ("NewEmail",NewEmail,Cns_MAX_BYTES_EMAIL_ADDRESS);
|
||||
|
||||
if (Mai_CheckIfEmailIsValid (NewEmail)) // New email is valid
|
||||
{
|
||||
|
@ -1554,7 +1554,7 @@ void Mai_ConfirmEmail (void)
|
|||
bool KeyIsCorrect;
|
||||
|
||||
/***** Get parameter Key *****/
|
||||
Par_GetParToText ("key",MailKey,Mai_LENGTH_EMAIL_CONFIRM_KEY);
|
||||
Par_GetParText ("key",MailKey,Mai_LENGTH_EMAIL_CONFIRM_KEY);
|
||||
|
||||
/***** Get user's code and email from key *****/
|
||||
if (Mai_DB_GetPendingEmail (&mysql_res,MailKey))
|
||||
|
|
|
@ -202,7 +202,7 @@ static void Mrk_ChangeNumRowsHeaderOrFooter (Brw_HeadOrFoot_t HeaderOrFooter)
|
|||
Brw_GetParAndInitFileBrowser ();
|
||||
|
||||
/***** Get the number of rows of the header or footer of the table of marks *****/
|
||||
Par_GetParToText (Mrk_HeadOrFootStr[HeaderOrFooter],UnsignedStr,Cns_MAX_DECIMAL_DIGITS_UINT);
|
||||
Par_GetParText (Mrk_HeadOrFootStr[HeaderOrFooter],UnsignedStr,Cns_MAX_DECIMAL_DIGITS_UINT);
|
||||
if (sscanf (UnsignedStr,"%u",&NumRows) == 1)
|
||||
{
|
||||
/***** Update properties of marks in the database *****/
|
||||
|
|
32
swad_match.c
32
swad_match.c
|
@ -631,7 +631,7 @@ static void Mch_ListOneOrMoreMatchesTitleGrps (const struct Mch_Match *Match,
|
|||
/***** Match title *****/
|
||||
Frm_BeginForm (Gbl.Usrs.Me.Role.Logged == Rol_STD ? ActJoiMch :
|
||||
ActResMch);
|
||||
Par_PutParCod (Par_MchCod,Match->MchCod);
|
||||
Par_PutParCode (Par_MchCod,Match->MchCod);
|
||||
|
||||
HTM_BUTTON_Submit_Begin (Gbl.Usrs.Me.Role.Logged == Rol_STD ? Txt_Play :
|
||||
Txt_Resume,
|
||||
|
@ -1121,7 +1121,7 @@ void Mch_PutParamsEdit (void *Games)
|
|||
if (Games)
|
||||
{
|
||||
Gam_PutParams (Games);
|
||||
Par_PutParCod (Par_MchCod,((struct Gam_Games *) Games)->MchCod.Current);
|
||||
Par_PutParCode (Par_MchCod,((struct Gam_Games *) Games)->MchCod.Current);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1132,7 +1132,7 @@ void Mch_PutParamsEdit (void *Games)
|
|||
static void Mch_PutParamsPlay (void *MchCod)
|
||||
{
|
||||
if (MchCod)
|
||||
Par_PutParCod (Par_MchCod,*((long *) MchCod));
|
||||
Par_PutParCode (Par_MchCod,*((long *) MchCod));
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -1361,7 +1361,7 @@ void Mch_CreateNewMatch (void)
|
|||
GamCod = Par_GetAndCheckParCode (Par_GamCod);
|
||||
|
||||
/* Get match title */
|
||||
Par_GetParToText ("Title",Title,Mch_MAX_BYTES_TITLE);
|
||||
Par_GetParText ("Title",Title,Mch_MAX_BYTES_TITLE);
|
||||
|
||||
/* Get groups for this match */
|
||||
Grp_GetParCodsSeveralGrps ();
|
||||
|
@ -1398,7 +1398,7 @@ void Mch_ChangeMatch (void)
|
|||
|
||||
/***** Get match title and groups *****/
|
||||
/* Get match title */
|
||||
Par_GetParToText ("Title",Match.Title,Mch_MAX_BYTES_TITLE);
|
||||
Par_GetParText ("Title",Match.Title,Mch_MAX_BYTES_TITLE);
|
||||
|
||||
/* Get groups for this match */
|
||||
Grp_GetParCodsSeveralGrps ();
|
||||
|
@ -1788,7 +1788,7 @@ void Mch_ChangeNumColsMch (void)
|
|||
|
||||
/***** Get number of columns *****/
|
||||
Match.Status.NumCols = (unsigned)
|
||||
Par_GetParToUnsignedLong ("NumCols",
|
||||
Par_GetParUnsignedLong ("NumCols",
|
||||
1,
|
||||
Mch_MAX_COLS,
|
||||
Mch_NUM_COLS_DEFAULT);
|
||||
|
@ -2598,7 +2598,7 @@ static void Mch_ShowFormColumns (const struct Mch_Match *Match)
|
|||
|
||||
/* Begin form */
|
||||
Frm_BeginForm (ActChgNumColMch);
|
||||
Par_PutParCod (Par_MchCod,Match->MchCod); // Current match being played
|
||||
Par_PutParCode (Par_MchCod,Match->MchCod); // Current match being played
|
||||
Mch_PutParamNumCols (NumCols); // Number of columns
|
||||
|
||||
/* Number of columns */
|
||||
|
@ -2626,7 +2626,7 @@ static void Mch_ShowFormColumns (const struct Mch_Match *Match)
|
|||
|
||||
static void Mch_PutParamNumCols (unsigned NumCols) // Number of columns
|
||||
{
|
||||
Par_PutHiddenParamUnsigned (NULL,"NumCols",NumCols);
|
||||
Par_PutParUnsigned (NULL,"NumCols",NumCols);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -2643,7 +2643,7 @@ static void Mch_PutCheckboxResult (const struct Mch_Match *Match)
|
|||
|
||||
/***** Begin form *****/
|
||||
Frm_BeginForm (ActChgVisResMchQst);
|
||||
Par_PutParCod (Par_MchCod,Match->MchCod); // Current match being played
|
||||
Par_PutParCode (Par_MchCod,Match->MchCod); // Current match being played
|
||||
|
||||
/***** Put icon with link *****/
|
||||
HTM_BUTTON_Submit_Begin (Txt_View_results,
|
||||
|
@ -2681,7 +2681,7 @@ static void Mch_PutIfAnswered (const struct Mch_Match *Match,bool Answered)
|
|||
{
|
||||
/* Begin form */
|
||||
Frm_BeginForm (ActSeeMchAnsQstStd);
|
||||
Par_PutParCod (Par_MchCod,Match->MchCod); // Current match being played
|
||||
Par_PutParCode (Par_MchCod,Match->MchCod); // Current match being played
|
||||
|
||||
HTM_BUTTON_Submit_Begin (Txt_View_my_answer,
|
||||
"class=\"BT_LINK DAT_SMALL_GREEN_%s\""
|
||||
|
@ -2726,7 +2726,7 @@ static void Mch_PutIconToRemoveMyAnswer (const struct Mch_Match *Match)
|
|||
|
||||
/***** Begin form *****/
|
||||
Frm_BeginForm (ActRemMchAnsQstStd);
|
||||
Par_PutParCod (Par_MchCod,Match->MchCod); // Current match being played
|
||||
Par_PutParCode (Par_MchCod,Match->MchCod); // Current match being played
|
||||
Gam_PutParamQstInd (Match->Status.QstInd); // Current question index shown
|
||||
|
||||
/***** Put icon with link *****/
|
||||
|
@ -2982,7 +2982,7 @@ static void Mch_ShowQuestionAndAnswersStd (const struct Mch_Match *Match,
|
|||
is necessary in order to be fast
|
||||
and not lose clicks due to refresh */
|
||||
Frm_BeginForm (ActAnsMchQstStd);
|
||||
Par_PutParCod (Par_MchCod,Match->MchCod); // Current match being played
|
||||
Par_PutParCode (Par_MchCod,Match->MchCod); // Current match being played
|
||||
Gam_PutParamQstInd (Match->Status.QstInd); // Current question index shown
|
||||
Mch_PutParamNumOpt (NumOpt); // Number of button
|
||||
|
||||
|
@ -3220,7 +3220,7 @@ static const char *Mch_GetClassBorder (unsigned NumRow)
|
|||
|
||||
static void Mch_PutParamNumOpt (unsigned NumOpt)
|
||||
{
|
||||
Par_PutHiddenParamUnsigned (NULL,"NumOpt",NumOpt);
|
||||
Par_PutParUnsigned (NULL,"NumOpt",NumOpt);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -3231,7 +3231,7 @@ static unsigned Mch_GetParamNumOpt (void)
|
|||
{
|
||||
long NumOpt;
|
||||
|
||||
NumOpt = Par_GetParToLong ("NumOpt");
|
||||
NumOpt = Par_GetParLong ("NumOpt");
|
||||
if (NumOpt < 0)
|
||||
Err_WrongAnswerExit ();
|
||||
|
||||
|
@ -3247,7 +3247,7 @@ static void Mch_PutBigButton (Act_Action_t NextAction,const char *Id,
|
|||
{
|
||||
/***** Begin form *****/
|
||||
Frm_BeginFormId (NextAction,Id);
|
||||
Par_PutParCod (Par_MchCod,MchCod);
|
||||
Par_PutParCode (Par_MchCod,MchCod);
|
||||
|
||||
/***** Put icon with link *****/
|
||||
HTM_DIV_Begin ("class=\"MCH_BIGBUTTON_CONT\"");
|
||||
|
@ -3429,7 +3429,7 @@ void Mch_StartCountdown (void)
|
|||
Mch_ResetMatch (&Match);
|
||||
|
||||
/***** Get countdown parameter ****/
|
||||
NewCountdown = Par_GetParToLong ("Countdown");
|
||||
NewCountdown = Par_GetParLong ("Countdown");
|
||||
|
||||
/***** Remove old players.
|
||||
This function must be called by a teacher
|
||||
|
|
12
swad_media.c
12
swad_media.c
|
@ -430,7 +430,7 @@ void Med_PutMediaUploader (int NumMedia,const char *ClassInput)
|
|||
Hlp_Multimedia,Box_NOT_CLOSABLE);
|
||||
|
||||
/***** Action to perform on media *****/
|
||||
Par_PutHiddenParamUnsigned (NULL,ParamUploadMedia.Action,
|
||||
Par_PutParUnsigned (NULL,ParamUploadMedia.Action,
|
||||
(unsigned) Med_ACTION_NEW_MEDIA);
|
||||
|
||||
/***** Icons *****/
|
||||
|
@ -546,7 +546,7 @@ static void Med_PutHiddenFormTypeMediaUploader (const char UniqueId[Frm_MAX_BYTE
|
|||
/***** Hidden field with form type *****/
|
||||
if (asprintf (&Id,"%s_%s",UniqueId,MediaUploader->ParamSuffix) < 0) // <id>_ParamSuffix
|
||||
Err_NotEnoughMemoryExit ();
|
||||
Par_PutHiddenParamUnsignedDisabled (Id,ParamUploadMedia->FormType,
|
||||
Par_PutParUnsignedDisabled (Id,ParamUploadMedia->FormType,
|
||||
(unsigned) MediaUploader->FormType);
|
||||
free (Id);
|
||||
}
|
||||
|
@ -674,7 +674,7 @@ static Med_Action_t Med_GetMediaActionFromForm (const char *ParamAction)
|
|||
{
|
||||
/***** Get parameter with the action to perform on media *****/
|
||||
return (Med_Action_t)
|
||||
Par_GetParToUnsignedLong (ParamAction,
|
||||
Par_GetParUnsignedLong (ParamAction,
|
||||
0,
|
||||
Med_NUM_ACTIONS - 1,
|
||||
(unsigned long) Med_ACTION_DEFAULT);
|
||||
|
@ -687,7 +687,7 @@ static Med_Action_t Med_GetMediaActionFromForm (const char *ParamAction)
|
|||
static Med_FormType_t Usr_GetFormTypeFromForm (struct ParamUploadMedia *ParamUploadMedia)
|
||||
{
|
||||
return (Med_FormType_t)
|
||||
Par_GetParToUnsignedLong (ParamUploadMedia->FormType,
|
||||
Par_GetParUnsignedLong (ParamUploadMedia->FormType,
|
||||
0,
|
||||
Med_NUM_FORM_TYPES - 1,
|
||||
(unsigned long) Med_FORM_NONE);
|
||||
|
@ -703,7 +703,7 @@ static void Usr_GetURLFromForm (const char *ParamName,struct Med_Media *Media)
|
|||
size_t Length;
|
||||
|
||||
/***** Get media URL from form *****/
|
||||
Par_GetParToText (ParamName,URL,Cns_MAX_BYTES_WWW);
|
||||
Par_GetParText (ParamName,URL,Cns_MAX_BYTES_WWW);
|
||||
/* If the URL coming from the form is empty, keep current media URL unchanged
|
||||
If not empty, copy it to current media URL */
|
||||
if ((Length = strlen (URL)) > 0)
|
||||
|
@ -727,7 +727,7 @@ static void Usr_GetTitleFromForm (const char *ParamName,struct Med_Media *Media)
|
|||
size_t Length;
|
||||
|
||||
/***** Get image/video title from form *****/
|
||||
Par_GetParToText (ParamName,Title,Med_MAX_BYTES_TITLE);
|
||||
Par_GetParText (ParamName,Title,Med_MAX_BYTES_TITLE);
|
||||
/* If the title coming from the form is empty, keep current media title unchanged
|
||||
If not empty, copy it to current media title */
|
||||
if ((Length = strlen (Title)) > 0)
|
||||
|
|
|
@ -320,7 +320,7 @@ void Mnu_PutIconsToSelectMenu (void)
|
|||
{
|
||||
Set_BeginPref (Menu == Gbl.Prefs.Menu);
|
||||
Frm_BeginForm (ActChgMnu);
|
||||
Par_PutHiddenParamUnsigned (NULL,"Menu",(unsigned) Menu);
|
||||
Par_PutParUnsigned (NULL,"Menu",(unsigned) Menu);
|
||||
Ico_PutSettingIconLink (Mnu_MenuIcons[Menu],Ico_BLACK,
|
||||
Txt_MENU_NAMES[Menu]);
|
||||
Frm_EndForm ();
|
||||
|
@ -365,7 +365,7 @@ void Mnu_ChangeMenu (void)
|
|||
Mnu_Menu_t Mnu_GetParamMenu (void)
|
||||
{
|
||||
return (Mnu_Menu_t)
|
||||
Par_GetParToUnsignedLong ("Menu",
|
||||
Par_GetParUnsignedLong ("Menu",
|
||||
0,
|
||||
Mnu_NUM_MENUS - 1,
|
||||
(unsigned long) Mnu_MENU_DEFAULT);
|
||||
|
|
|
@ -203,7 +203,7 @@ void Msg_FormMsgUsrs (void)
|
|||
Msg_ResetMessages (&Messages);
|
||||
|
||||
/***** Get possible hidden subject and content of the message *****/
|
||||
Par_GetParToHTML ("HiddenSubject",Messages.Subject,Cns_MAX_BYTES_SUBJECT);
|
||||
Par_GetParHTML ("HiddenSubject",Messages.Subject,Cns_MAX_BYTES_SUBJECT);
|
||||
Par_GetParAndChangeFormat ("HiddenContent",Content,Cns_MAX_BYTES_LONG_TEXT,
|
||||
Str_TO_TEXT,false);
|
||||
|
||||
|
@ -233,7 +233,7 @@ static void Msg_PutFormMsgUsrs (struct Msg_Messages *Messages,
|
|||
Gbl.Usrs.LstUsrs[Rol_TCH].NumUsrs = 0;
|
||||
|
||||
/***** Get parameter that indicates if the message is a reply to another message *****/
|
||||
if ((Messages->Reply.IsReply = Par_GetParToBool ("IsReply")))
|
||||
if ((Messages->Reply.IsReply = Par_GetParBool ("IsReply")))
|
||||
/* Get original message code */
|
||||
if ((Messages->Reply.OriginalMsgCod = Msg_GetParamMsgCod ()) <= 0)
|
||||
Err_WrongMessageExit ();
|
||||
|
@ -243,7 +243,7 @@ static void Msg_PutFormMsgUsrs (struct Msg_Messages *Messages,
|
|||
/* Get who to show as potential recipients:
|
||||
- only the selected recipient
|
||||
- any user (default) */
|
||||
Messages->ShowOnlyOneRecipient = Par_GetParToBool ("ShowOnlyOneRecipient");
|
||||
Messages->ShowOnlyOneRecipient = Par_GetParBool ("ShowOnlyOneRecipient");
|
||||
else
|
||||
Messages->ShowOnlyOneRecipient = false;
|
||||
|
||||
|
@ -320,14 +320,14 @@ static void Msg_PutFormMsgUsrs (struct Msg_Messages *Messages,
|
|||
Frm_BeginForm (ActRcvMsgUsr);
|
||||
if (Messages->Reply.IsReply)
|
||||
{
|
||||
Par_PutHiddenParamChar ("IsReply",'Y');
|
||||
Par_PutParChar ("IsReply",'Y');
|
||||
Msg_PutHiddenParamMsgCod (Messages->Reply.OriginalMsgCod);
|
||||
}
|
||||
if (Gbl.Usrs.Other.UsrDat.UsrCod > 0)
|
||||
{
|
||||
Usr_PutParamOtherUsrCodEncrypted (Gbl.Usrs.Other.UsrDat.EnUsrCod);
|
||||
if (Messages->ShowOnlyOneRecipient)
|
||||
Par_PutHiddenParamChar ("ShowOnlyOneRecipient",'Y');
|
||||
Par_PutParChar ("ShowOnlyOneRecipient",'Y');
|
||||
}
|
||||
|
||||
/***** Begin table *****/
|
||||
|
@ -430,7 +430,7 @@ static void Msg_PutParamsShowMorePotentialRecipients (void *Messages)
|
|||
{
|
||||
if (((struct Msg_Messages *) Messages)->Reply.IsReply)
|
||||
{
|
||||
Par_PutHiddenParamChar ("IsReply",'Y');
|
||||
Par_PutParChar ("IsReply",'Y');
|
||||
Msg_PutHiddenParamMsgCod (((struct Msg_Messages *) Messages)->Reply.OriginalMsgCod);
|
||||
}
|
||||
if (Gbl.Usrs.Other.UsrDat.UsrCod > 0)
|
||||
|
@ -453,14 +453,14 @@ static void Msg_PutParamsWriteMsg (void *Messages)
|
|||
Msg_PutHiddenParamsSubjectAndContent ();
|
||||
if (((struct Msg_Messages *) Messages)->Reply.IsReply)
|
||||
{
|
||||
Par_PutHiddenParamChar ("IsReply",'Y');
|
||||
Par_PutParChar ("IsReply",'Y');
|
||||
Msg_PutHiddenParamMsgCod (((struct Msg_Messages *) Messages)->Reply.OriginalMsgCod);
|
||||
}
|
||||
if (Gbl.Usrs.Other.UsrDat.UsrCod > 0)
|
||||
{
|
||||
Usr_PutParamOtherUsrCodEncrypted (Gbl.Usrs.Other.UsrDat.EnUsrCod);
|
||||
if (((struct Msg_Messages *) Messages)->ShowOnlyOneRecipient)
|
||||
Par_PutHiddenParamChar ("ShowOnlyOneRecipient",'Y');
|
||||
Par_PutParChar ("ShowOnlyOneRecipient",'Y');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -474,8 +474,8 @@ static void Msg_PutHiddenParamsSubjectAndContent (void)
|
|||
/***** Hidden params to send subject and content.
|
||||
When the user edit the subject or the content,
|
||||
they are copied here. *****/
|
||||
Par_PutHiddenParamString (NULL,"HiddenSubject","");
|
||||
Par_PutHiddenParamString (NULL,"HiddenContent","");
|
||||
Par_PutParString (NULL,"HiddenSubject","");
|
||||
Par_PutParString (NULL,"HiddenContent","");
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -696,7 +696,7 @@ static void Msg_PutHiddenParamAnotherRecipient (const struct Usr_Data *UsrDat)
|
|||
char NickWithArr[Nck_MAX_BYTES_NICK_WITH_ARROBA + 1];
|
||||
|
||||
snprintf (NickWithArr,sizeof (NickWithArr),"@%s",UsrDat->Nickname);
|
||||
Par_PutHiddenParamString (NULL,"OtherRecipients",NickWithArr);
|
||||
Par_PutParString (NULL,"OtherRecipients",NickWithArr);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -707,7 +707,7 @@ static void Msg_PutHiddenParamOtherRecipients (void)
|
|||
{
|
||||
if (Gbl.Usrs.ListOtherRecipients)
|
||||
if (Gbl.Usrs.ListOtherRecipients[0])
|
||||
Par_PutHiddenParamString (NULL,"OtherRecipients",Gbl.Usrs.ListOtherRecipients);
|
||||
Par_PutParString (NULL,"OtherRecipients",Gbl.Usrs.ListOtherRecipients);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -749,14 +749,14 @@ void Msg_RecMsgFromUsr (void)
|
|||
|
||||
/***** Get data from form *****/
|
||||
/* Get subject */
|
||||
Par_GetParToHTML ("Subject",Messages.Subject,Cns_MAX_BYTES_SUBJECT);
|
||||
Par_GetParHTML ("Subject",Messages.Subject,Cns_MAX_BYTES_SUBJECT);
|
||||
|
||||
/* Get body */
|
||||
Par_GetParAndChangeFormat ("Content",Content,Cns_MAX_BYTES_LONG_TEXT,
|
||||
Str_DONT_CHANGE,false);
|
||||
|
||||
/* Get parameter that indicates if the message is a reply to a previous message */
|
||||
if ((IsReply = Par_GetParToBool ("IsReply")))
|
||||
if ((IsReply = Par_GetParBool ("IsReply")))
|
||||
/* Get original message code */
|
||||
if ((OriginalMsgCod = Msg_GetParamMsgCod ()) <= 0)
|
||||
Err_WrongMessageExit ();
|
||||
|
@ -1107,7 +1107,7 @@ static void Msg_GetParamMsgsCrsCod (struct Msg_Messages *Messages)
|
|||
extern const char *Txt_any_course;
|
||||
struct Crs_Course Crs;
|
||||
|
||||
if ((Messages->FilterCrsCod = Par_GetParToLong ("FilterCrsCod")) > 0) // If origin course specified
|
||||
if ((Messages->FilterCrsCod = Par_GetParLong ("FilterCrsCod")) > 0) // If origin course specified
|
||||
{
|
||||
/* Get data of course */
|
||||
Crs.CrsCod = Messages->FilterCrsCod;
|
||||
|
@ -1128,7 +1128,7 @@ static void Msg_GetParamMsgsCrsCod (struct Msg_Messages *Messages)
|
|||
static void Msg_GetParamFilterFromTo (struct Msg_Messages *Messages)
|
||||
{
|
||||
/***** Get "from"/"to" filter *****/
|
||||
Par_GetParToText ("FilterFromTo",Messages->FilterFromTo,
|
||||
Par_GetParText ("FilterFromTo",Messages->FilterFromTo,
|
||||
Usr_MAX_BYTES_FULL_NAME);
|
||||
}
|
||||
|
||||
|
@ -1139,7 +1139,7 @@ static void Msg_GetParamFilterFromTo (struct Msg_Messages *Messages)
|
|||
static void Msg_GetParamFilterContent (struct Msg_Messages *Messages)
|
||||
{
|
||||
/***** Get content filter *****/
|
||||
Par_GetParToText ("FilterContent",Messages->FilterContent,
|
||||
Par_GetParText ("FilterContent",Messages->FilterContent,
|
||||
Msg_MAX_BYTES_FILTER_CONTENT);
|
||||
}
|
||||
|
||||
|
@ -1782,13 +1782,13 @@ void Msg_PutHiddenParamsMsgsFilters (void *Messages)
|
|||
if (Messages)
|
||||
{
|
||||
if (((struct Msg_Messages *) Messages)->FilterCrsCod >= 0)
|
||||
Par_PutHiddenParamLong (NULL,"FilterCrsCod",((struct Msg_Messages *) Messages)->FilterCrsCod);
|
||||
Par_PutParLong (NULL,"FilterCrsCod",((struct Msg_Messages *) Messages)->FilterCrsCod);
|
||||
if (((struct Msg_Messages *) Messages)->FilterFromTo[0])
|
||||
Par_PutHiddenParamString (NULL,"FilterFromTo",((struct Msg_Messages *) Messages)->FilterFromTo);
|
||||
Par_PutParString (NULL,"FilterFromTo",((struct Msg_Messages *) Messages)->FilterFromTo);
|
||||
if (((struct Msg_Messages *) Messages)->FilterContent[0])
|
||||
Par_PutHiddenParamString (NULL,"FilterContent",((struct Msg_Messages *) Messages)->FilterContent);
|
||||
Par_PutParString (NULL,"FilterContent",((struct Msg_Messages *) Messages)->FilterContent);
|
||||
if (((struct Msg_Messages *) Messages)->ShowOnlyUnreadMsgs)
|
||||
Par_PutHiddenParamChar ("OnlyUnreadMsgs",'Y');
|
||||
Par_PutParChar ("OnlyUnreadMsgs",'Y');
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1930,7 +1930,7 @@ static void Msg_ShowFormToShowOnlyUnreadMessages (const struct Msg_Messages *Mes
|
|||
static bool Msg_GetParamOnlyUnreadMsgs (void)
|
||||
{
|
||||
/***** Get parameter to show only unread (received) messages *****/
|
||||
return Par_GetParToBool ("OnlyUnreadMsgs");
|
||||
return Par_GetParBool ("OnlyUnreadMsgs");
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -2430,10 +2430,10 @@ static void Msg_WriteFormToReply (long MsgCod,long CrsCod,bool FromThisCrs,
|
|||
Crs_PutParamCrsCod (CrsCod);
|
||||
}
|
||||
Grp_PutParamAllGroups ();
|
||||
Par_PutHiddenParamChar ("IsReply",'Y');
|
||||
Par_PutParChar ("IsReply",'Y');
|
||||
Msg_PutHiddenParamMsgCod (MsgCod);
|
||||
Usr_PutParamUsrCodEncrypted (UsrDat->EnUsrCod);
|
||||
Par_PutHiddenParamChar ("ShowOnlyOneRecipient",'Y');
|
||||
Par_PutParChar ("ShowOnlyOneRecipient",'Y');
|
||||
|
||||
/****** Link *****/
|
||||
Ico_PutIconLink ("reply.svg",Ico_BLACK,ActReqMsgUsr);
|
||||
|
@ -2568,7 +2568,7 @@ static void Msg_WriteMsgTo (struct Msg_Messages *Messages,long MsgCod)
|
|||
NumRecipients.ToShow = NumRecipients.Known;
|
||||
else // A lot of recipients
|
||||
/***** Get parameter that indicates if I want to see all recipients *****/
|
||||
NumRecipients.ToShow = Par_GetParToBool ("SeeAllRcpts") ? NumRecipients.Known :
|
||||
NumRecipients.ToShow = Par_GetParBool ("SeeAllRcpts") ? NumRecipients.Known :
|
||||
Msg_DEF_RECIPIENTS_TO_SHOW;
|
||||
|
||||
/***** Initialize structure with user's data *****/
|
||||
|
@ -2662,7 +2662,7 @@ static void Msg_WriteMsgTo (struct Msg_Messages *Messages,long MsgCod)
|
|||
Frm_BeginForm (ActionSee[Messages->TypeOfMessages]);
|
||||
Messages->MsgCod = MsgCod; // Message to be expanded with all recipients visible
|
||||
Msg_PutHiddenParamsOneMsg (Messages);
|
||||
Par_PutHiddenParamChar ("SeeAllRcpts",'Y');
|
||||
Par_PutParChar ("SeeAllRcpts",'Y');
|
||||
HTM_BUTTON_Submit_Begin (Txt_View_all_recipients,
|
||||
"class=\"LM BT_LINK\"");
|
||||
HTM_TxtF (Txt_and_X_other_recipients,
|
||||
|
@ -2740,7 +2740,7 @@ void Msg_WriteMsgContent (char Content[Cns_MAX_BYTES_LONG_TEXT + 1],
|
|||
|
||||
void Msg_PutHiddenParamMsgCod (long MsgCod)
|
||||
{
|
||||
Par_PutHiddenParamLong (NULL,"MsgCod",MsgCod);
|
||||
Par_PutParLong (NULL,"MsgCod",MsgCod);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -2750,7 +2750,7 @@ void Msg_PutHiddenParamMsgCod (long MsgCod)
|
|||
static long Msg_GetParamMsgCod (void)
|
||||
{
|
||||
/***** Get code of message *****/
|
||||
return Par_GetParToLong ("MsgCod");
|
||||
return Par_GetParLong ("MsgCod");
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
|
@ -304,7 +304,7 @@ static void Net_GetMyWebsAndSocialNetsFromForm (void)
|
|||
{
|
||||
/***** Get URL from the form *****/
|
||||
snprintf (ParamName,sizeof (ParamName),"URL%u",(unsigned) NumURL);
|
||||
Par_GetParToText (ParamName,URL,Cns_MAX_BYTES_WWW);
|
||||
Par_GetParText (ParamName,URL,Cns_MAX_BYTES_WWW);
|
||||
|
||||
if (URL[0])
|
||||
/***** Insert or replace web / social network *****/
|
||||
|
|
|
@ -271,7 +271,7 @@ static void Nck_ShowFormChangeUsrNickname (bool ItsMe,
|
|||
}
|
||||
|
||||
snprintf (NickWithArr,sizeof (NickWithArr),"@%s",row[0]);
|
||||
Par_PutHiddenParamString (NULL,"NewNick",NickWithArr); // Nickname
|
||||
Par_PutParString (NULL,"NewNick",NickWithArr); // Nickname
|
||||
Btn_PutConfirmButtonInline (Txt_Use_this_nickname);
|
||||
Frm_EndForm ();
|
||||
}
|
||||
|
@ -329,7 +329,7 @@ static void Nck_ShowFormChangeUsrNickname (bool ItsMe,
|
|||
static void Nck_PutParamsRemoveMyNick (void *Nick)
|
||||
{
|
||||
if (Nick)
|
||||
Par_PutHiddenParamString (NULL,"Nick",Nick);
|
||||
Par_PutParString (NULL,"Nick",Nick);
|
||||
}
|
||||
|
||||
static void Nck_PutParamsRemoveOtherNick (void *Nick)
|
||||
|
@ -337,7 +337,7 @@ static void Nck_PutParamsRemoveOtherNick (void *Nick)
|
|||
if (Nick)
|
||||
{
|
||||
Usr_PutParamUsrCodEncrypted (Gbl.Usrs.Other.UsrDat.EnUsrCod);
|
||||
Par_PutHiddenParamString (NULL,"Nick",Nick);
|
||||
Par_PutParString (NULL,"Nick",Nick);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -352,7 +352,7 @@ void Nck_RemoveMyNick (void)
|
|||
char NickWithoutArr[Nck_MAX_BYTES_NICK_WITHOUT_ARROBA + 1];
|
||||
|
||||
/***** Get nickname from form *****/
|
||||
Par_GetParToText ("Nick",NickWithoutArr,
|
||||
Par_GetParText ("Nick",NickWithoutArr,
|
||||
Nck_MAX_BYTES_NICK_WITHOUT_ARROBA);
|
||||
|
||||
if (strcasecmp (NickWithoutArr,Gbl.Usrs.Me.UsrDat.Nickname)) // Only if not my current nickname
|
||||
|
@ -388,7 +388,7 @@ void Nck_RemoveOtherUsrNick (void)
|
|||
if (Usr_ICanEditOtherUsr (&Gbl.Usrs.Other.UsrDat))
|
||||
{
|
||||
/***** Get nickname from form *****/
|
||||
Par_GetParToText ("Nick",NickWithoutArr,
|
||||
Par_GetParText ("Nick",NickWithoutArr,
|
||||
Nck_MAX_BYTES_NICK_WITHOUT_ARROBA);
|
||||
|
||||
/***** Remove one of the old nicknames *****/
|
||||
|
@ -459,7 +459,7 @@ static void Nck_UpdateUsrNick (struct Usr_Data *UsrDat)
|
|||
char NewNick[Nck_MAX_BYTES_NICK_WITH_ARROBA + 1];
|
||||
|
||||
/***** Get new nickname from form *****/
|
||||
Par_GetParToText ("NewNick",NewNick,sizeof (NewNick) - 1);
|
||||
Par_GetParText ("NewNick",NewNick,sizeof (NewNick) - 1);
|
||||
|
||||
if (Nck_CheckIfNickWithArrIsValid (NewNick)) // If new nickname is valid
|
||||
{
|
||||
|
|
|
@ -600,7 +600,7 @@ static void Not_DrawANotice (Not_Listing_t TypeNoticesListing,
|
|||
{
|
||||
/* Form to view full notice */
|
||||
Frm_BeginFormAnchor (ActSeeOneNot,Anchor);
|
||||
Par_PutParCod (Par_NotCod,NotCod);
|
||||
Par_PutParCode (Par_NotCod,NotCod);
|
||||
HTM_BUTTON_Submit_Begin (Txt_See_full_notice,
|
||||
"class=\"RT BT_LINK\"");
|
||||
}
|
||||
|
@ -804,7 +804,7 @@ unsigned Not_GetNumNoticesDeleted (HieLvl_Level_t Scope,unsigned *NumNotif)
|
|||
static void Not_PutParams (void *NotCod)
|
||||
{
|
||||
if (NotCod)
|
||||
Par_PutParCod (Par_NotCod,*((long *) NotCod));
|
||||
Par_PutParCode (Par_NotCod,*((long *) NotCod));
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
|
@ -684,7 +684,7 @@ static void Ntf_WriteFormAllNotifications (bool AllNotifications)
|
|||
|
||||
static bool Ntf_GetAllNotificationsFromForm (void)
|
||||
{
|
||||
return Par_GetParToBool ("All");
|
||||
return Par_GetParBool ("All");
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -714,7 +714,7 @@ static Act_Action_t Ntf_StartFormGoToAction (Ntf_NotifyEvent_t NotifyEvent,
|
|||
/* Begin form */
|
||||
Action = ActSeeOneCfe;
|
||||
Frm_BeginFormAnchor (ActSeeOneCfe,Anchor);
|
||||
Par_PutParCod (Par_ExaCod,Cod);
|
||||
Par_PutParCode (Par_ExaCod,Cod);
|
||||
|
||||
/* Free anchor string */
|
||||
Frm_FreeAnchorStr (Anchor);
|
||||
|
@ -758,8 +758,8 @@ static Act_Action_t Ntf_StartFormGoToAction (Ntf_NotifyEvent_t NotifyEvent,
|
|||
break;
|
||||
}
|
||||
Frm_BeginForm (Action);
|
||||
Par_PutParCod (Par_GrpCod,GrpCod);
|
||||
Par_PutParCod (Par_FilCod,FileMetadata.FilCod);
|
||||
Par_PutParCode (Par_GrpCod,GrpCod);
|
||||
Par_PutParCode (Par_FilCod,FileMetadata.FilCod);
|
||||
}
|
||||
break;
|
||||
case Ntf_EVENT_TML_COMMENT:
|
||||
|
@ -769,7 +769,7 @@ static Act_Action_t Ntf_StartFormGoToAction (Ntf_NotifyEvent_t NotifyEvent,
|
|||
// Cod is the code of the social publishing
|
||||
Action = ActSeeGblTL;
|
||||
Frm_BeginForm (Action);
|
||||
Par_PutParCod (Par_PubCod,Cod);
|
||||
Par_PutParCode (Par_PubCod,Cod);
|
||||
Usr_PutParamUsrCodEncrypted (UsrDat->EnUsrCod);
|
||||
Ntf_PutHiddenParamNotifyEvent (NotifyEvent);
|
||||
break;
|
||||
|
@ -803,7 +803,7 @@ static Act_Action_t Ntf_StartFormGoToAction (Ntf_NotifyEvent_t NotifyEvent,
|
|||
case Ntf_EVENT_NOTICE:
|
||||
Action = ActSeeOneNot;
|
||||
Frm_BeginForm (Action);
|
||||
Par_PutParCod (Par_NotCod,Cod);
|
||||
Par_PutParCode (Par_NotCod,Cod);
|
||||
break;
|
||||
case Ntf_EVENT_MESSAGE:
|
||||
Action = ActExpRcvMsg;
|
||||
|
@ -850,7 +850,7 @@ static Act_Action_t Ntf_StartFormGoToAction (Ntf_NotifyEvent_t NotifyEvent,
|
|||
|
||||
static void Ntf_PutHiddenParamNotifyEvent (Ntf_NotifyEvent_t NotifyEvent)
|
||||
{
|
||||
Par_PutHiddenParamUnsigned (NULL,"NotifyEvent",(unsigned) NotifyEvent);
|
||||
Par_PutParUnsigned (NULL,"NotifyEvent",(unsigned) NotifyEvent);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -860,7 +860,7 @@ static void Ntf_PutHiddenParamNotifyEvent (Ntf_NotifyEvent_t NotifyEvent)
|
|||
Ntf_NotifyEvent_t Ntf_GetParamNotifyEvent (void)
|
||||
{
|
||||
return (Ntf_NotifyEvent_t)
|
||||
Par_GetParToUnsignedLong ("NotifyEvent",
|
||||
Par_GetParUnsignedLong ("NotifyEvent",
|
||||
0,
|
||||
Ntf_NUM_NOTIFY_EVENTS - 1,
|
||||
(unsigned long) Ntf_EVENT_UNKNOWN);
|
||||
|
@ -1628,13 +1628,13 @@ static void Ntf_GetParamsNotifyEvents (void)
|
|||
NotifyEvent <= (Ntf_NotifyEvent_t) (Ntf_NUM_NOTIFY_EVENTS - 1);
|
||||
NotifyEvent++) // 0 is reserved for Ntf_EVENT_UNKNOWN
|
||||
{
|
||||
if ((CreateNotifForThisEvent = Par_GetParToBool (Ntf_ParamNotifMeAboutNotifyEvents[NotifyEvent])))
|
||||
if ((CreateNotifForThisEvent = Par_GetParBool (Ntf_ParamNotifMeAboutNotifyEvents[NotifyEvent])))
|
||||
Gbl.Usrs.Me.UsrDat.NtfEvents.CreateNotif |= (1 << NotifyEvent);
|
||||
|
||||
if (CreateNotifForThisEvent)
|
||||
{
|
||||
Par_GetParToBool (Ntf_ParamEmailMeAboutNotifyEvents[NotifyEvent]);
|
||||
if (Par_GetParToBool (Ntf_ParamEmailMeAboutNotifyEvents[NotifyEvent]))
|
||||
Par_GetParBool (Ntf_ParamEmailMeAboutNotifyEvents[NotifyEvent]);
|
||||
if (Par_GetParBool (Ntf_ParamEmailMeAboutNotifyEvents[NotifyEvent]))
|
||||
Gbl.Usrs.Me.UsrDat.NtfEvents.SendEmail |= (1 << NotifyEvent);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -178,7 +178,7 @@ void Pag_WriteLinksToPages (Pag_WhatPaginate_t WhatPaginate,
|
|||
case Pag_ASSIGNMENTS:
|
||||
Frm_BeginFormAnchor (ActSeeAsg,Pagination->Anchor);
|
||||
Pag_PutHiddenParamPagNum (WhatPaginate,1);
|
||||
Par_PutHiddenParamOrder ((unsigned) ((struct Asg_Assignments *) Context)->SelectedOrder);
|
||||
Par_PutParOrder ((unsigned) ((struct Asg_Assignments *) Context)->SelectedOrder);
|
||||
WhichGroups = Grp_GetParamWhichGroups ();
|
||||
Grp_PutParamWhichGroups (&WhichGroups);
|
||||
break;
|
||||
|
@ -192,14 +192,14 @@ void Pag_WriteLinksToPages (Pag_WhatPaginate_t WhatPaginate,
|
|||
case Pag_EXAMS:
|
||||
Frm_BeginFormAnchor (ActSeeAllExa,Pagination->Anchor);
|
||||
Pag_PutHiddenParamPagNum (WhatPaginate,1);
|
||||
Par_PutHiddenParamOrder ((unsigned) ((struct Exa_Exams *) Context)->SelectedOrder);
|
||||
Par_PutParOrder ((unsigned) ((struct Exa_Exams *) Context)->SelectedOrder);
|
||||
WhichGroups = Grp_GetParamWhichGroups ();
|
||||
Grp_PutParamWhichGroups (&WhichGroups);
|
||||
break;
|
||||
case Pag_GAMES:
|
||||
Frm_BeginFormAnchor (ActSeeAllGam,Pagination->Anchor);
|
||||
Pag_PutHiddenParamPagNum (WhatPaginate,1);
|
||||
Par_PutHiddenParamOrder ((unsigned) ((struct Gam_Games *) Context)->SelectedOrder);
|
||||
Par_PutParOrder ((unsigned) ((struct Gam_Games *) Context)->SelectedOrder);
|
||||
WhichGroups = Grp_GetParamWhichGroups ();
|
||||
Grp_PutParamWhichGroups (&WhichGroups);
|
||||
break;
|
||||
|
@ -210,7 +210,7 @@ void Pag_WriteLinksToPages (Pag_WhatPaginate_t WhatPaginate,
|
|||
case Pag_ATT_EVENTS:
|
||||
Frm_BeginFormAnchor (ActSeeAtt,Pagination->Anchor);
|
||||
Pag_PutHiddenParamPagNum (WhatPaginate,1);
|
||||
Par_PutHiddenParamOrder ((unsigned) ((struct Att_Events *) Context)->SelectedOrder);
|
||||
Par_PutParOrder ((unsigned) ((struct Att_Events *) Context)->SelectedOrder);
|
||||
WhichGroups = Grp_GetParamWhichGroups ();
|
||||
Grp_PutParamWhichGroups (&WhichGroups);
|
||||
break;
|
||||
|
@ -249,7 +249,7 @@ void Pag_WriteLinksToPages (Pag_WhatPaginate_t WhatPaginate,
|
|||
case Pag_SURVEYS:
|
||||
Frm_BeginFormAnchor (ActSeeAllSvy,Pagination->Anchor);
|
||||
Pag_PutHiddenParamPagNum (WhatPaginate,1);
|
||||
Par_PutHiddenParamOrder ((unsigned) ((struct Svy_Surveys *) Context)->SelectedOrder);
|
||||
Par_PutParOrder ((unsigned) ((struct Svy_Surveys *) Context)->SelectedOrder);
|
||||
WhichGroups = Grp_GetParamWhichGroups ();
|
||||
Grp_PutParamWhichGroups (&WhichGroups);
|
||||
break;
|
||||
|
@ -305,7 +305,7 @@ void Pag_WriteLinksToPages (Pag_WhatPaginate_t WhatPaginate,
|
|||
case Pag_ASSIGNMENTS:
|
||||
Frm_BeginFormAnchor (ActSeeAsg,Pagination->Anchor);
|
||||
Pag_PutHiddenParamPagNum (WhatPaginate,1);
|
||||
Par_PutHiddenParamOrder ((unsigned) ((struct Asg_Assignments *) Context)->SelectedOrder);
|
||||
Par_PutParOrder ((unsigned) ((struct Asg_Assignments *) Context)->SelectedOrder);
|
||||
WhichGroups = Grp_GetParamWhichGroups ();
|
||||
Grp_PutParamWhichGroups (&WhichGroups);
|
||||
break;
|
||||
|
@ -319,14 +319,14 @@ void Pag_WriteLinksToPages (Pag_WhatPaginate_t WhatPaginate,
|
|||
case Pag_EXAMS:
|
||||
Frm_BeginFormAnchor (ActSeeAllExa,Pagination->Anchor);
|
||||
Pag_PutHiddenParamPagNum (WhatPaginate,1);
|
||||
Par_PutHiddenParamOrder ((unsigned) ((struct Exa_Exams *) Context)->SelectedOrder);
|
||||
Par_PutParOrder ((unsigned) ((struct Exa_Exams *) Context)->SelectedOrder);
|
||||
WhichGroups = Grp_GetParamWhichGroups ();
|
||||
Grp_PutParamWhichGroups (&WhichGroups);
|
||||
break;
|
||||
case Pag_GAMES:
|
||||
Frm_BeginFormAnchor (ActSeeAllGam,Pagination->Anchor);
|
||||
Pag_PutHiddenParamPagNum (WhatPaginate,1);
|
||||
Par_PutHiddenParamOrder ((unsigned) ((struct Gam_Games *) Context)->SelectedOrder);
|
||||
Par_PutParOrder ((unsigned) ((struct Gam_Games *) Context)->SelectedOrder);
|
||||
WhichGroups = Grp_GetParamWhichGroups ();
|
||||
Grp_PutParamWhichGroups (&WhichGroups);
|
||||
break;
|
||||
|
@ -337,7 +337,7 @@ void Pag_WriteLinksToPages (Pag_WhatPaginate_t WhatPaginate,
|
|||
case Pag_ATT_EVENTS:
|
||||
Frm_BeginFormAnchor (ActSeeAtt,Pagination->Anchor);
|
||||
Pag_PutHiddenParamPagNum (WhatPaginate,1);
|
||||
Par_PutHiddenParamOrder ((unsigned) ((struct Att_Events *) Context)->SelectedOrder);
|
||||
Par_PutParOrder ((unsigned) ((struct Att_Events *) Context)->SelectedOrder);
|
||||
WhichGroups = Grp_GetParamWhichGroups ();
|
||||
Grp_PutParamWhichGroups (&WhichGroups);
|
||||
break;
|
||||
|
@ -376,7 +376,7 @@ void Pag_WriteLinksToPages (Pag_WhatPaginate_t WhatPaginate,
|
|||
case Pag_SURVEYS:
|
||||
Frm_BeginFormAnchor (ActSeeAllSvy,Pagination->Anchor);
|
||||
Pag_PutHiddenParamPagNum (WhatPaginate,1);
|
||||
Par_PutHiddenParamOrder ((unsigned) ((struct Svy_Surveys *) Context)->SelectedOrder);
|
||||
Par_PutParOrder ((unsigned) ((struct Svy_Surveys *) Context)->SelectedOrder);
|
||||
WhichGroups = Grp_GetParamWhichGroups ();
|
||||
Grp_PutParamWhichGroups (&WhichGroups);
|
||||
break;
|
||||
|
@ -425,7 +425,7 @@ void Pag_WriteLinksToPages (Pag_WhatPaginate_t WhatPaginate,
|
|||
case Pag_ASSIGNMENTS:
|
||||
Frm_BeginFormAnchor (ActSeeAsg,Pagination->Anchor);
|
||||
Pag_PutHiddenParamPagNum (WhatPaginate,Pagination->LeftPage);
|
||||
Par_PutHiddenParamOrder ((unsigned) ((struct Asg_Assignments *) Context)->SelectedOrder);
|
||||
Par_PutParOrder ((unsigned) ((struct Asg_Assignments *) Context)->SelectedOrder);
|
||||
WhichGroups = Grp_GetParamWhichGroups ();
|
||||
Grp_PutParamWhichGroups (&WhichGroups);
|
||||
break;
|
||||
|
@ -439,14 +439,14 @@ void Pag_WriteLinksToPages (Pag_WhatPaginate_t WhatPaginate,
|
|||
case Pag_EXAMS:
|
||||
Frm_BeginFormAnchor (ActSeeAllExa,Pagination->Anchor);
|
||||
Pag_PutHiddenParamPagNum (WhatPaginate,Pagination->LeftPage);
|
||||
Par_PutHiddenParamOrder ((unsigned) ((struct Exa_Exams *) Context)->SelectedOrder);
|
||||
Par_PutParOrder ((unsigned) ((struct Exa_Exams *) Context)->SelectedOrder);
|
||||
WhichGroups = Grp_GetParamWhichGroups ();
|
||||
Grp_PutParamWhichGroups (&WhichGroups);
|
||||
break;
|
||||
case Pag_GAMES:
|
||||
Frm_BeginFormAnchor (ActSeeAllGam,Pagination->Anchor);
|
||||
Pag_PutHiddenParamPagNum (WhatPaginate,Pagination->LeftPage);
|
||||
Par_PutHiddenParamOrder ((unsigned) ((struct Gam_Games *) Context)->SelectedOrder);
|
||||
Par_PutParOrder ((unsigned) ((struct Gam_Games *) Context)->SelectedOrder);
|
||||
WhichGroups = Grp_GetParamWhichGroups ();
|
||||
Grp_PutParamWhichGroups (&WhichGroups);
|
||||
break;
|
||||
|
@ -457,7 +457,7 @@ void Pag_WriteLinksToPages (Pag_WhatPaginate_t WhatPaginate,
|
|||
case Pag_ATT_EVENTS:
|
||||
Frm_BeginFormAnchor (ActSeeAtt,Pagination->Anchor);
|
||||
Pag_PutHiddenParamPagNum (WhatPaginate,Pagination->LeftPage);
|
||||
Par_PutHiddenParamOrder ((unsigned) ((struct Att_Events *) Context)->SelectedOrder);
|
||||
Par_PutParOrder ((unsigned) ((struct Att_Events *) Context)->SelectedOrder);
|
||||
WhichGroups = Grp_GetParamWhichGroups ();
|
||||
Grp_PutParamWhichGroups (&WhichGroups);
|
||||
break;
|
||||
|
@ -496,7 +496,7 @@ void Pag_WriteLinksToPages (Pag_WhatPaginate_t WhatPaginate,
|
|||
case Pag_SURVEYS:
|
||||
Frm_BeginFormAnchor (ActSeeAllSvy,Pagination->Anchor);
|
||||
Pag_PutHiddenParamPagNum (WhatPaginate,Pagination->LeftPage);
|
||||
Par_PutHiddenParamOrder ((unsigned) ((struct Svy_Surveys *) Context)->SelectedOrder);
|
||||
Par_PutParOrder ((unsigned) ((struct Svy_Surveys *) Context)->SelectedOrder);
|
||||
WhichGroups = Grp_GetParamWhichGroups ();
|
||||
Grp_PutParamWhichGroups (&WhichGroups);
|
||||
break;
|
||||
|
@ -558,7 +558,7 @@ void Pag_WriteLinksToPages (Pag_WhatPaginate_t WhatPaginate,
|
|||
case Pag_ASSIGNMENTS:
|
||||
Frm_BeginFormAnchor (ActSeeAsg,Pagination->Anchor);
|
||||
Pag_PutHiddenParamPagNum (WhatPaginate,NumPage);
|
||||
Par_PutHiddenParamOrder ((unsigned) ((struct Asg_Assignments *) Context)->SelectedOrder);
|
||||
Par_PutParOrder ((unsigned) ((struct Asg_Assignments *) Context)->SelectedOrder);
|
||||
WhichGroups = Grp_GetParamWhichGroups ();
|
||||
Grp_PutParamWhichGroups (&WhichGroups);
|
||||
break;
|
||||
|
@ -572,14 +572,14 @@ void Pag_WriteLinksToPages (Pag_WhatPaginate_t WhatPaginate,
|
|||
case Pag_EXAMS:
|
||||
Frm_BeginFormAnchor (ActSeeAllExa,Pagination->Anchor);
|
||||
Pag_PutHiddenParamPagNum (WhatPaginate,NumPage);
|
||||
Par_PutHiddenParamOrder ((unsigned) ((struct Exa_Exams *) Context)->SelectedOrder);
|
||||
Par_PutParOrder ((unsigned) ((struct Exa_Exams *) Context)->SelectedOrder);
|
||||
WhichGroups = Grp_GetParamWhichGroups ();
|
||||
Grp_PutParamWhichGroups (&WhichGroups);
|
||||
break;
|
||||
case Pag_GAMES:
|
||||
Frm_BeginFormAnchor (ActSeeAllGam,Pagination->Anchor);
|
||||
Pag_PutHiddenParamPagNum (WhatPaginate,NumPage);
|
||||
Par_PutHiddenParamOrder ((unsigned) ((struct Gam_Games *) Context)->SelectedOrder);
|
||||
Par_PutParOrder ((unsigned) ((struct Gam_Games *) Context)->SelectedOrder);
|
||||
WhichGroups = Grp_GetParamWhichGroups ();
|
||||
Grp_PutParamWhichGroups (&WhichGroups);
|
||||
break;
|
||||
|
@ -590,7 +590,7 @@ void Pag_WriteLinksToPages (Pag_WhatPaginate_t WhatPaginate,
|
|||
case Pag_ATT_EVENTS:
|
||||
Frm_BeginFormAnchor (ActSeeAtt,Pagination->Anchor);
|
||||
Pag_PutHiddenParamPagNum (WhatPaginate,NumPage);
|
||||
Par_PutHiddenParamOrder ((unsigned) ((struct Att_Events *) Context)->SelectedOrder);
|
||||
Par_PutParOrder ((unsigned) ((struct Att_Events *) Context)->SelectedOrder);
|
||||
WhichGroups = Grp_GetParamWhichGroups ();
|
||||
Grp_PutParamWhichGroups (&WhichGroups);
|
||||
break;
|
||||
|
@ -629,7 +629,7 @@ void Pag_WriteLinksToPages (Pag_WhatPaginate_t WhatPaginate,
|
|||
case Pag_SURVEYS:
|
||||
Frm_BeginFormAnchor (ActSeeAllSvy,Pagination->Anchor);
|
||||
Pag_PutHiddenParamPagNum (WhatPaginate,NumPage);
|
||||
Par_PutHiddenParamOrder ((unsigned) ((struct Svy_Surveys *) Context)->SelectedOrder);
|
||||
Par_PutParOrder ((unsigned) ((struct Svy_Surveys *) Context)->SelectedOrder);
|
||||
WhichGroups = Grp_GetParamWhichGroups ();
|
||||
Grp_PutParamWhichGroups (&WhichGroups);
|
||||
break;
|
||||
|
@ -677,7 +677,7 @@ void Pag_WriteLinksToPages (Pag_WhatPaginate_t WhatPaginate,
|
|||
case Pag_ASSIGNMENTS:
|
||||
Frm_BeginFormAnchor (ActSeeAsg,Pagination->Anchor);
|
||||
Pag_PutHiddenParamPagNum (WhatPaginate,Pagination->RightPage);
|
||||
Par_PutHiddenParamOrder ((unsigned) ((struct Asg_Assignments *) Context)->SelectedOrder);
|
||||
Par_PutParOrder ((unsigned) ((struct Asg_Assignments *) Context)->SelectedOrder);
|
||||
WhichGroups = Grp_GetParamWhichGroups ();
|
||||
Grp_PutParamWhichGroups (&WhichGroups);
|
||||
break;
|
||||
|
@ -691,14 +691,14 @@ void Pag_WriteLinksToPages (Pag_WhatPaginate_t WhatPaginate,
|
|||
case Pag_EXAMS:
|
||||
Frm_BeginFormAnchor (ActSeeAllExa,Pagination->Anchor);
|
||||
Pag_PutHiddenParamPagNum (WhatPaginate,Pagination->RightPage);
|
||||
Par_PutHiddenParamOrder ((unsigned) ((struct Exa_Exams *) Context)->SelectedOrder);
|
||||
Par_PutParOrder ((unsigned) ((struct Exa_Exams *) Context)->SelectedOrder);
|
||||
WhichGroups = Grp_GetParamWhichGroups ();
|
||||
Grp_PutParamWhichGroups (&WhichGroups);
|
||||
break;
|
||||
case Pag_GAMES:
|
||||
Frm_BeginFormAnchor (ActSeeAllGam,Pagination->Anchor);
|
||||
Pag_PutHiddenParamPagNum (WhatPaginate,Pagination->RightPage);
|
||||
Par_PutHiddenParamOrder ((unsigned) ((struct Gam_Games *) Context)->SelectedOrder);
|
||||
Par_PutParOrder ((unsigned) ((struct Gam_Games *) Context)->SelectedOrder);
|
||||
WhichGroups = Grp_GetParamWhichGroups ();
|
||||
Grp_PutParamWhichGroups (&WhichGroups);
|
||||
break;
|
||||
|
@ -709,7 +709,7 @@ void Pag_WriteLinksToPages (Pag_WhatPaginate_t WhatPaginate,
|
|||
case Pag_ATT_EVENTS:
|
||||
Frm_BeginFormAnchor (ActSeeAtt,Pagination->Anchor);
|
||||
Pag_PutHiddenParamPagNum (WhatPaginate,Pagination->RightPage);
|
||||
Par_PutHiddenParamOrder ((unsigned) ((struct Att_Events *) Context)->SelectedOrder);
|
||||
Par_PutParOrder ((unsigned) ((struct Att_Events *) Context)->SelectedOrder);
|
||||
WhichGroups = Grp_GetParamWhichGroups ();
|
||||
Grp_PutParamWhichGroups (&WhichGroups);
|
||||
break;
|
||||
|
@ -748,7 +748,7 @@ void Pag_WriteLinksToPages (Pag_WhatPaginate_t WhatPaginate,
|
|||
case Pag_SURVEYS:
|
||||
Frm_BeginFormAnchor (ActSeeAllSvy,Pagination->Anchor);
|
||||
Pag_PutHiddenParamPagNum (WhatPaginate,Pagination->RightPage);
|
||||
Par_PutHiddenParamOrder ((unsigned) ((struct Svy_Surveys *) Context)->SelectedOrder);
|
||||
Par_PutParOrder ((unsigned) ((struct Svy_Surveys *) Context)->SelectedOrder);
|
||||
WhichGroups = Grp_GetParamWhichGroups ();
|
||||
Grp_PutParamWhichGroups (&WhichGroups);
|
||||
break;
|
||||
|
@ -797,7 +797,7 @@ void Pag_WriteLinksToPages (Pag_WhatPaginate_t WhatPaginate,
|
|||
case Pag_ASSIGNMENTS:
|
||||
Frm_BeginFormAnchor (ActSeeAsg,Pagination->Anchor);
|
||||
Pag_PutHiddenParamPagNum (WhatPaginate,Pagination->NumPags);
|
||||
Par_PutHiddenParamOrder ((unsigned) ((struct Asg_Assignments *) Context)->SelectedOrder);
|
||||
Par_PutParOrder ((unsigned) ((struct Asg_Assignments *) Context)->SelectedOrder);
|
||||
WhichGroups = Grp_GetParamWhichGroups ();
|
||||
Grp_PutParamWhichGroups (&WhichGroups);
|
||||
break;
|
||||
|
@ -811,14 +811,14 @@ void Pag_WriteLinksToPages (Pag_WhatPaginate_t WhatPaginate,
|
|||
case Pag_EXAMS:
|
||||
Frm_BeginFormAnchor (ActSeeAllExa,Pagination->Anchor);
|
||||
Pag_PutHiddenParamPagNum (WhatPaginate,Pagination->NumPags);
|
||||
Par_PutHiddenParamOrder ((unsigned) ((struct Exa_Exams *) Context)->SelectedOrder);
|
||||
Par_PutParOrder ((unsigned) ((struct Exa_Exams *) Context)->SelectedOrder);
|
||||
WhichGroups = Grp_GetParamWhichGroups ();
|
||||
Grp_PutParamWhichGroups (&WhichGroups);
|
||||
break;
|
||||
case Pag_GAMES:
|
||||
Frm_BeginFormAnchor (ActSeeAllGam,Pagination->Anchor);
|
||||
Pag_PutHiddenParamPagNum (WhatPaginate,Pagination->NumPags);
|
||||
Par_PutHiddenParamOrder ((unsigned) ((struct Gam_Games *) Context)->SelectedOrder);
|
||||
Par_PutParOrder ((unsigned) ((struct Gam_Games *) Context)->SelectedOrder);
|
||||
WhichGroups = Grp_GetParamWhichGroups ();
|
||||
Grp_PutParamWhichGroups (&WhichGroups);
|
||||
break;
|
||||
|
@ -829,7 +829,7 @@ void Pag_WriteLinksToPages (Pag_WhatPaginate_t WhatPaginate,
|
|||
case Pag_ATT_EVENTS:
|
||||
Frm_BeginFormAnchor (ActSeeAtt,Pagination->Anchor);
|
||||
Pag_PutHiddenParamPagNum (WhatPaginate,Pagination->NumPags);
|
||||
Par_PutHiddenParamOrder ((unsigned) ((struct Att_Events *) Context)->SelectedOrder);
|
||||
Par_PutParOrder ((unsigned) ((struct Att_Events *) Context)->SelectedOrder);
|
||||
WhichGroups = Grp_GetParamWhichGroups ();
|
||||
Grp_PutParamWhichGroups (&WhichGroups);
|
||||
break;
|
||||
|
@ -868,7 +868,7 @@ void Pag_WriteLinksToPages (Pag_WhatPaginate_t WhatPaginate,
|
|||
case Pag_SURVEYS:
|
||||
Frm_BeginFormAnchor (ActSeeAllSvy,Pagination->Anchor);
|
||||
Pag_PutHiddenParamPagNum (WhatPaginate,Pagination->NumPags);
|
||||
Par_PutHiddenParamOrder ((unsigned) ((struct Svy_Surveys *) Context)->SelectedOrder);
|
||||
Par_PutParOrder ((unsigned) ((struct Svy_Surveys *) Context)->SelectedOrder);
|
||||
WhichGroups = Grp_GetParamWhichGroups ();
|
||||
Grp_PutParamWhichGroups (&WhichGroups);
|
||||
break;
|
||||
|
@ -911,7 +911,7 @@ void Pag_WriteLinksToPages (Pag_WhatPaginate_t WhatPaginate,
|
|||
|
||||
void Pag_PutHiddenParamPagNum (Pag_WhatPaginate_t WhatPaginate,unsigned NumPage)
|
||||
{
|
||||
Par_PutHiddenParamUnsigned (NULL,Pag_ParamNumPag[WhatPaginate],NumPage);
|
||||
Par_PutParUnsigned (NULL,Pag_ParamNumPag[WhatPaginate],NumPage);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -923,7 +923,7 @@ unsigned Pag_GetParamPagNum (Pag_WhatPaginate_t WhatPaginate)
|
|||
unsigned CurrentPage;
|
||||
|
||||
/***** Try to get parameter with the number of page *****/
|
||||
CurrentPage = (unsigned) Par_GetParToUnsignedLong (Pag_ParamNumPag[WhatPaginate],
|
||||
CurrentPage = (unsigned) Par_GetParUnsignedLong (Pag_ParamNumPag[WhatPaginate],
|
||||
1,
|
||||
UINT_MAX,
|
||||
0);
|
||||
|
|
|
@ -69,12 +69,14 @@ const char *Par_CodeStr[] =
|
|||
[Par_GamCod ] = "GamCod",
|
||||
[Par_GrpCod ] = "GrpCod",
|
||||
[Par_GrpTypCod ] = "GrpTypCod",
|
||||
[Par_HldCod ] = "HldCod",
|
||||
[Par_MchCod ] = "MchCod",
|
||||
[Par_NotCod ] = "NotCod",
|
||||
[Par_OthCtrCod ] = "OthCtrCod",
|
||||
[Par_OthCtyCod ] = "OthCtyCod",
|
||||
[Par_OthDegCod ] = "OthDegCod",
|
||||
[Par_OthDegTypCod] = "OthDegTypCod",
|
||||
[Par_OthHieCod ] = "OthHieCod",
|
||||
[Par_OthInsCod ] = "OthInsCod",
|
||||
[Par_PstCod ] = "PstCod",
|
||||
[Par_PubCod ] = "PubCod",
|
||||
|
@ -771,7 +773,7 @@ void Par_GetMainParams (void)
|
|||
/***** Get another user's nickname, if exists
|
||||
(this nickname is used to go to another user's profile,
|
||||
not to get the logged user) *****/
|
||||
if (Par_GetParToText ("usr",Nick,sizeof (Nick) - 1))
|
||||
if (Par_GetParText ("usr",Nick,sizeof (Nick) - 1))
|
||||
{
|
||||
if (Nick[0])
|
||||
{
|
||||
|
@ -787,7 +789,7 @@ void Par_GetMainParams (void)
|
|||
Gbl.Action.Act = Gbl.Action.Original = ActSeeOthPubPrf; // Set default action if no other is specified
|
||||
}
|
||||
}
|
||||
else if (Par_GetParToText ("agd",Nick,sizeof (Nick) - 1))
|
||||
else if (Par_GetParText ("agd",Nick,sizeof (Nick) - 1))
|
||||
{
|
||||
if (Nick[0])
|
||||
{
|
||||
|
@ -804,7 +806,7 @@ void Par_GetMainParams (void)
|
|||
}
|
||||
|
||||
/***** Get action to perform *****/
|
||||
ActCod = Par_GetParToLong ("act");
|
||||
ActCod = Par_GetParLong ("act");
|
||||
if (ActCod >= 0 && ActCod <= ActLst_MAX_ACTION_COD)
|
||||
Gbl.Action.Act = Gbl.Action.Original = Act_GetActionFromActCod (ActCod);
|
||||
|
||||
|
@ -826,7 +828,7 @@ void Par_GetMainParams (void)
|
|||
}
|
||||
|
||||
/***** Get session identifier, if exists *****/
|
||||
Par_GetParToText ("ses",Gbl.Session.Id,Cns_BYTES_SESSION_ID);
|
||||
Par_GetParText ("ses",Gbl.Session.Id,Cns_BYTES_SESSION_ID);
|
||||
if (Gbl.Session.Id[0])
|
||||
{
|
||||
/***** Get user's code, password, current degree and current course from stored session *****/
|
||||
|
@ -841,7 +843,7 @@ void Par_GetMainParams (void)
|
|||
else
|
||||
{
|
||||
// Try old parameter "IdSes" (allowed for compatibility, to be removed soon)
|
||||
Par_GetParToText ("IdSes",Gbl.Session.Id,Cns_BYTES_SESSION_ID);
|
||||
Par_GetParText ("IdSes",Gbl.Session.Id,Cns_BYTES_SESSION_ID);
|
||||
if (Gbl.Session.Id[0])
|
||||
{
|
||||
/***** Get user's code, password, current degree and current course from stored session *****/
|
||||
|
@ -874,7 +876,7 @@ void Par_GetMainParams (void)
|
|||
Set_GetSettingsFromIP ();
|
||||
|
||||
/***** Get country if exists (from menu) *****/
|
||||
Par_GetParToText ("cty",LongStr,Cns_MAX_DECIMAL_DIGITS_LONG);
|
||||
Par_GetParText ("cty",LongStr,Cns_MAX_DECIMAL_DIGITS_LONG);
|
||||
if (LongStr[0]) // Parameter "cty" available
|
||||
{
|
||||
Gbl.Hierarchy.Cty.CtyCod = Str_ConvertStrCodToLongCod (LongStr);
|
||||
|
@ -885,7 +887,7 @@ void Par_GetMainParams (void)
|
|||
}
|
||||
|
||||
/***** Get institution if exists (from menu) *****/
|
||||
Par_GetParToText ("ins",LongStr,Cns_MAX_DECIMAL_DIGITS_LONG);
|
||||
Par_GetParText ("ins",LongStr,Cns_MAX_DECIMAL_DIGITS_LONG);
|
||||
if (LongStr[0]) // Parameter "ins" available
|
||||
{
|
||||
Gbl.Hierarchy.Ins.InsCod = Str_ConvertStrCodToLongCod (LongStr);
|
||||
|
@ -895,7 +897,7 @@ void Par_GetMainParams (void)
|
|||
}
|
||||
|
||||
/***** Get center if exists (from menu) *****/
|
||||
Par_GetParToText ("ctr",LongStr,Cns_MAX_DECIMAL_DIGITS_LONG);
|
||||
Par_GetParText ("ctr",LongStr,Cns_MAX_DECIMAL_DIGITS_LONG);
|
||||
if (LongStr[0]) // Parameter "ctr" available
|
||||
{
|
||||
Gbl.Hierarchy.Ctr.CtrCod = Str_ConvertStrCodToLongCod (LongStr);
|
||||
|
@ -904,7 +906,7 @@ void Par_GetMainParams (void)
|
|||
}
|
||||
|
||||
/***** Get numerical degree code if exists (from menu) *****/
|
||||
Par_GetParToText ("deg",LongStr,Cns_MAX_DECIMAL_DIGITS_LONG);
|
||||
Par_GetParText ("deg",LongStr,Cns_MAX_DECIMAL_DIGITS_LONG);
|
||||
if (LongStr[0]) // Parameter "deg" available
|
||||
{
|
||||
Gbl.Hierarchy.Deg.DegCod = Str_ConvertStrCodToLongCod (LongStr);
|
||||
|
@ -912,7 +914,7 @@ void Par_GetMainParams (void)
|
|||
}
|
||||
|
||||
/***** Get numerical course code if exists (from menu) *****/
|
||||
Par_GetParToText ("crs",LongStr,Cns_MAX_DECIMAL_DIGITS_LONG);
|
||||
Par_GetParText ("crs",LongStr,Cns_MAX_DECIMAL_DIGITS_LONG);
|
||||
if (LongStr[0]) // Parameter "crs" available
|
||||
Gbl.Hierarchy.Crs.CrsCod = Str_ConvertStrCodToLongCod (LongStr); // Overwrite CrsCod from session
|
||||
|
||||
|
@ -921,7 +923,7 @@ void Par_GetMainParams (void)
|
|||
if (Gbl.Action.Act == ActMnu)
|
||||
{
|
||||
Gbl.Action.Tab = (Tab_Tab_t)
|
||||
Par_GetParToUnsignedLong ("NxtTab",
|
||||
Par_GetParUnsignedLong ("NxtTab",
|
||||
(unsigned long) TabUnk,
|
||||
Tab_NUM_TABS - 1,
|
||||
(unsigned long) TabUnk);
|
||||
|
@ -936,7 +938,7 @@ void Par_GetMainParams (void)
|
|||
/*****************************************************************************/
|
||||
// Return the number of parameters found
|
||||
|
||||
unsigned Par_GetParToText (const char *ParamName,char *ParamValue,size_t MaxBytes)
|
||||
unsigned Par_GetParText (const char *ParamName,char *ParamValue,size_t MaxBytes)
|
||||
{
|
||||
return Par_GetParAndChangeFormat (ParamName,ParamValue,MaxBytes,
|
||||
Str_TO_TEXT,true);
|
||||
|
@ -946,16 +948,16 @@ unsigned Par_GetParToText (const char *ParamName,char *ParamValue,size_t MaxByte
|
|||
/****************** Get the unsigned value of a parameter ********************/
|
||||
/*****************************************************************************/
|
||||
|
||||
unsigned long Par_GetParToUnsignedLong (const char *ParamName,
|
||||
unsigned long Min,
|
||||
unsigned long Max,
|
||||
unsigned long Default)
|
||||
unsigned long Par_GetParUnsignedLong (const char *ParamName,
|
||||
unsigned long Min,
|
||||
unsigned long Max,
|
||||
unsigned long Default)
|
||||
{
|
||||
char UnsignedLongStr[Cns_MAX_DECIMAL_DIGITS_ULONG + 1];
|
||||
unsigned long UnsignedLongNum;
|
||||
|
||||
/***** Get parameter with unsigned number *****/
|
||||
Par_GetParToText (ParamName,UnsignedLongStr,Cns_MAX_DECIMAL_DIGITS_ULONG);
|
||||
Par_GetParText (ParamName,UnsignedLongStr,Cns_MAX_DECIMAL_DIGITS_ULONG);
|
||||
if (sscanf (UnsignedLongStr,"%lu",&UnsignedLongNum) == 1)
|
||||
if (UnsignedLongNum >= Min && UnsignedLongNum <= Max)
|
||||
return UnsignedLongNum;
|
||||
|
@ -967,12 +969,12 @@ unsigned long Par_GetParToUnsignedLong (const char *ParamName,
|
|||
/******************** Get the long value of a parameter **********************/
|
||||
/*****************************************************************************/
|
||||
|
||||
long Par_GetParToLong (const char *ParamName)
|
||||
long Par_GetParLong (const char *ParamName)
|
||||
{
|
||||
char LongStr[Cns_MAX_DECIMAL_DIGITS_LONG + 1];
|
||||
|
||||
/***** Get parameter with long number *****/
|
||||
Par_GetParToText (ParamName,LongStr,Cns_MAX_DECIMAL_DIGITS_LONG);
|
||||
Par_GetParText (ParamName,LongStr,Cns_MAX_DECIMAL_DIGITS_LONG);
|
||||
return Str_ConvertStrCodToLongCod (LongStr);
|
||||
}
|
||||
|
||||
|
@ -998,19 +1000,19 @@ long Par_GetAndCheckParCodeMin (Par_Code_t ParamCode,long MinCodAllowed)
|
|||
|
||||
long Par_GetParCode (Par_Code_t ParamCode)
|
||||
{
|
||||
return Par_GetParToLong (Par_CodeStr[ParamCode]);
|
||||
return Par_GetParLong (Par_CodeStr[ParamCode]);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/************************** Get a boolean parameter **************************/
|
||||
/************************ Get a boolean Y/N parameter ************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
bool Par_GetParToBool (const char *ParamName)
|
||||
bool Par_GetParBool (const char *ParamName)
|
||||
{
|
||||
char YN[1 + 1];
|
||||
|
||||
/***** Get parameter "Y"/"N" and convert to boolean *****/
|
||||
Par_GetParToText (ParamName,YN,1);
|
||||
Par_GetParText (ParamName,YN,1);
|
||||
return (Str_ConvertToUpperLetter (YN[0]) == 'Y');
|
||||
}
|
||||
|
||||
|
@ -1019,7 +1021,7 @@ bool Par_GetParToBool (const char *ParamName)
|
|||
/*****************************************************************************/
|
||||
// Return the number of parameters found
|
||||
|
||||
unsigned Par_GetParToHTML (const char *ParamName,char *ParamValue,size_t MaxBytes)
|
||||
unsigned Par_GetParHTML (const char *ParamName,char *ParamValue,size_t MaxBytes)
|
||||
{
|
||||
return Par_GetParAndChangeFormat (ParamName,ParamValue,MaxBytes,
|
||||
Str_TO_HTML,true);
|
||||
|
@ -1143,7 +1145,7 @@ void Par_ReplaceSeparatorMultipleByComma (char *Str)
|
|||
/********************** Put an unsigned hidden parameter *********************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Par_PutHiddenParamUnsigned (const char *Id,const char *ParamName,unsigned Value)
|
||||
void Par_PutParUnsigned (const char *Id,const char *ParamName,unsigned Value)
|
||||
{
|
||||
HTM_Txt ("<input type=\"hidden\"");
|
||||
if (Id)
|
||||
|
@ -1152,7 +1154,7 @@ void Par_PutHiddenParamUnsigned (const char *Id,const char *ParamName,unsigned V
|
|||
HTM_TxtF (" name=\"%s\" value=\"%u\" />",ParamName,Value);
|
||||
}
|
||||
|
||||
void Par_PutHiddenParamUnsignedDisabled (const char *Id,const char *ParamName,unsigned Value)
|
||||
void Par_PutParUnsignedDisabled (const char *Id,const char *ParamName,unsigned Value)
|
||||
{
|
||||
HTM_Txt ("<input type=\"hidden\"");
|
||||
if (Id)
|
||||
|
@ -1166,21 +1168,21 @@ void Par_PutHiddenParamUnsignedDisabled (const char *Id,const char *ParamName,un
|
|||
/******************** Put the value of a code parameter **********************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Par_PutParCod (Par_Code_t ParamCode,long Cod)
|
||||
void Par_PutParCode (Par_Code_t ParCod,long Cod)
|
||||
{
|
||||
extern const char *Par_CodeStr[];
|
||||
|
||||
// <0 => not specified => don't write parameter
|
||||
if (Cod >= 0) // 0 => another country, institution, centre...
|
||||
// >0 => a given country, institution, centre...
|
||||
Par_PutHiddenParamLong (NULL,Par_CodeStr[ParamCode],Cod);
|
||||
Par_PutParLong (NULL,Par_CodeStr[ParCod],Cod);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/************************* Put a long hidden parameter ***********************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Par_PutHiddenParamLong (const char *Id,const char *ParamName,long Value)
|
||||
void Par_PutParLong (const char *Id,const char *ParamName,long Value)
|
||||
{
|
||||
HTM_Txt ("<input type=\"hidden\"");
|
||||
if (Id)
|
||||
|
@ -1193,7 +1195,7 @@ void Par_PutHiddenParamLong (const char *Id,const char *ParamName,long Value)
|
|||
/************************* Put a char hidden parameter ***********************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Par_PutHiddenParamChar (const char *ParamName,char Value)
|
||||
void Par_PutParChar (const char *ParamName,char Value)
|
||||
{
|
||||
HTM_TxtF ("<input type=\"hidden\" name=\"%s\" value=\"%c\" />",
|
||||
ParamName,Value);
|
||||
|
@ -1203,8 +1205,7 @@ void Par_PutHiddenParamChar (const char *ParamName,char Value)
|
|||
/************************ Put a string hidden parameter **********************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Par_PutHiddenParamString (const char *Id,const char *ParamName,
|
||||
const char *Value)
|
||||
void Par_PutParString (const char *Id,const char *ParamName,const char *Value)
|
||||
{
|
||||
HTM_Txt ("<input type=\"hidden\"");
|
||||
if (Id)
|
||||
|
@ -1212,16 +1213,16 @@ void Par_PutHiddenParamString (const char *Id,const char *ParamName,
|
|||
HTM_TxtF (" id=\"%s\"",Id);
|
||||
HTM_TxtF (" name=\"%s\" value=\"%s\" />",
|
||||
ParamName,Value ? Value :
|
||||
"");
|
||||
"");
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/********* Put a hidden parameter with the type of order in listing **********/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Par_PutHiddenParamOrder (unsigned SelectedOrder)
|
||||
void Par_PutParOrder (unsigned SelectedOrder)
|
||||
{
|
||||
Par_PutHiddenParamUnsigned (NULL,"Order",SelectedOrder);
|
||||
Par_PutParUnsigned (NULL,"Order",SelectedOrder);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
|
@ -77,12 +77,14 @@ typedef enum
|
|||
Par_GamCod,
|
||||
Par_GrpCod,
|
||||
Par_GrpTypCod,
|
||||
Par_HldCod,
|
||||
Par_MchCod,
|
||||
Par_NotCod,
|
||||
Par_OthCtrCod,
|
||||
Par_OthCtyCod,
|
||||
Par_OthDegCod,
|
||||
Par_OthDegTypCod,
|
||||
Par_OthHieCod,
|
||||
Par_OthInsCod,
|
||||
Par_PstCod,
|
||||
Par_PubCod,
|
||||
|
@ -108,17 +110,18 @@ unsigned Par_GetParameter (Par_ParamType_t ParamType,const char *ParamName,
|
|||
|
||||
void Par_GetMainParams (void);
|
||||
|
||||
unsigned Par_GetParToText (const char *ParamName,char *ParamValue,size_t MaxBytes);
|
||||
unsigned long Par_GetParToUnsignedLong (const char *ParamName,
|
||||
unsigned long Min,
|
||||
unsigned long Max,
|
||||
unsigned long Default);
|
||||
long Par_GetParToLong (const char *ParamName);
|
||||
long Par_GetAndCheckParCode (Par_Code_t ParamCode);
|
||||
long Par_GetAndCheckParCodeMin (Par_Code_t ParamCode,long MinCodAllowed);
|
||||
long Par_GetParCode (Par_Code_t ParamCode);
|
||||
bool Par_GetParToBool (const char *ParamName);
|
||||
unsigned Par_GetParToHTML (const char *ParamName,char *ParamValue,size_t MaxBytes);
|
||||
//------------------------------ Get parameters -------------------------------
|
||||
unsigned Par_GetParText (const char *ParamName,char *ParamValue,size_t MaxBytes);
|
||||
unsigned long Par_GetParUnsignedLong (const char *ParamName,
|
||||
unsigned long Min,
|
||||
unsigned long Max,
|
||||
unsigned long Default);
|
||||
long Par_GetParLong (const char *ParamName);
|
||||
long Par_GetAndCheckParCode (Par_Code_t ParCod);
|
||||
long Par_GetAndCheckParCodeMin (Par_Code_t ParCod,long MinCodAllowed);
|
||||
long Par_GetParCode (Par_Code_t ParCod);
|
||||
bool Par_GetParBool (const char *ParamName);
|
||||
unsigned Par_GetParHTML (const char *ParamName,char *ParamValue,size_t MaxBytes);
|
||||
unsigned Par_GetParMultiToText (const char *ParamName,char *ParamValue,size_t MaxBytes);
|
||||
unsigned Par_GetParAndChangeFormat (const char *ParamName,char *ParamValue,size_t MaxBytes,
|
||||
Str_ChangeTo_t ChangeTo,bool RemoveLeadingAndTrailingSpaces);
|
||||
|
@ -127,14 +130,14 @@ bool Par_GetNextStrUntilSeparParamMult (const char **StrSrc,char *StrDst,size_t
|
|||
bool Par_GetNextStrUntilComma (const char **StrSrc,char *StrDst,size_t LongMax);
|
||||
void Par_ReplaceSeparatorMultipleByComma (char *Str);
|
||||
|
||||
void Par_PutHiddenParamUnsigned (const char *Id,const char *ParamName,unsigned Value);
|
||||
void Par_PutHiddenParamUnsignedDisabled (const char *Id,const char *ParamName,unsigned Value);
|
||||
void Par_PutParCod (Par_Code_t ParamCode,long Cod);
|
||||
void Par_PutHiddenParamLong (const char *Id,const char *ParamName,long Value);
|
||||
void Par_PutHiddenParamChar (const char *ParamName,char Value);
|
||||
void Par_PutHiddenParamString (const char *Id,const char *ParamName,
|
||||
const char *Value);
|
||||
void Par_PutHiddenParamOrder (unsigned SelectedOrder);
|
||||
//------------------------------ Put parameters -------------------------------
|
||||
void Par_PutParUnsigned (const char *Id,const char *ParamName,unsigned Value);
|
||||
void Par_PutParUnsignedDisabled (const char *Id,const char *ParamName,unsigned Value);
|
||||
void Par_PutParCode (Par_Code_t ParCod,long Cod);
|
||||
void Par_PutParLong (const char *Id,const char *ParamName,long Value);
|
||||
void Par_PutParChar (const char *ParamName,char Value);
|
||||
void Par_PutParString (const char *Id,const char *ParamName,const char *Value);
|
||||
void Par_PutParOrder (unsigned SelectedOrder);
|
||||
|
||||
//----------------------------- Client IP address -----------------------------
|
||||
void Par_SetIP (void);
|
||||
|
|
|
@ -90,7 +90,7 @@ static bool Pwd_CheckIfPasswdIsUsrIDorName (const char *PlainPassword);
|
|||
void Pwd_GetParamUsrPwdLogin (void)
|
||||
{
|
||||
/***** Get plain password from form *****/
|
||||
Par_GetParToText ("UsrPwd",Gbl.Usrs.Me.LoginPlainPassword,
|
||||
Par_GetParText ("UsrPwd",Gbl.Usrs.Me.LoginPlainPassword,
|
||||
Pwd_MAX_BYTES_PLAIN_PASSWORD);
|
||||
|
||||
/***** Encrypt password *****/
|
||||
|
@ -153,7 +153,7 @@ void Pwd_UpdateMyPwd (void)
|
|||
char PlainPassword[Pwd_MAX_BYTES_PLAIN_PASSWORD + 1];
|
||||
|
||||
/***** Get plain password from form *****/
|
||||
Par_GetParToText ("UsrPwd",PlainPassword,Pwd_MAX_BYTES_PLAIN_PASSWORD);
|
||||
Par_GetParText ("UsrPwd",PlainPassword,Pwd_MAX_BYTES_PLAIN_PASSWORD);
|
||||
|
||||
/***** Encrypt password *****/
|
||||
Cry_EncryptSHA512Base64 (PlainPassword,Gbl.Usrs.Me.LoginEncryptedPassword);
|
||||
|
@ -197,8 +197,8 @@ static void Pwd_CheckAndUpdateNewPwd (struct Usr_Data *UsrDat)
|
|||
char NewPlainPassword[2][Pwd_MAX_BYTES_PLAIN_PASSWORD + 1];
|
||||
char NewEncryptedPassword[Pwd_BYTES_ENCRYPTED_PASSWORD + 1];
|
||||
|
||||
Par_GetParToText ("Paswd1",NewPlainPassword[0],Pwd_MAX_BYTES_PLAIN_PASSWORD);
|
||||
Par_GetParToText ("Paswd2",NewPlainPassword[1],Pwd_MAX_BYTES_PLAIN_PASSWORD);
|
||||
Par_GetParText ("Paswd1",NewPlainPassword[0],Pwd_MAX_BYTES_PLAIN_PASSWORD);
|
||||
Par_GetParText ("Paswd2",NewPlainPassword[1],Pwd_MAX_BYTES_PLAIN_PASSWORD);
|
||||
|
||||
/***** Check if I have written twice the same password *****/
|
||||
if (strcmp (NewPlainPassword[0],
|
||||
|
@ -242,7 +242,7 @@ void Pwd_PutLinkToSendNewPasswd (void)
|
|||
static void Pwd_PutLinkToSendNewPasswdParams (void *UsrIdLogin)
|
||||
{
|
||||
if (UsrIdLogin)
|
||||
Par_PutHiddenParamString (NULL,"UsrId",(char *) Gbl.Usrs.Me.UsrIdLogin);
|
||||
Par_PutParString (NULL,"UsrId",(char *) Gbl.Usrs.Me.UsrIdLogin);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -814,7 +814,7 @@ bool Pwd_GetConfirmationOnDangerousAction (void)
|
|||
char EncryptedPassword[Pwd_BYTES_ENCRYPTED_PASSWORD + 1];
|
||||
|
||||
/***** Get if consent has been done *****/
|
||||
if (!Par_GetParToBool ("Consent"))
|
||||
if (!Par_GetParBool ("Consent"))
|
||||
{
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_You_have_not_confirmed_the_action);
|
||||
return false;
|
||||
|
@ -822,7 +822,7 @@ bool Pwd_GetConfirmationOnDangerousAction (void)
|
|||
|
||||
/***** Get my password *****/
|
||||
/* Get plain password from form */
|
||||
Par_GetParToText ("OthUsrPwd",PlainPassword,Pwd_MAX_BYTES_PLAIN_PASSWORD);
|
||||
Par_GetParText ("OthUsrPwd",PlainPassword,Pwd_MAX_BYTES_PLAIN_PASSWORD);
|
||||
|
||||
/* Encrypt password */
|
||||
Cry_EncryptSHA512Base64 (PlainPassword,EncryptedPassword);
|
||||
|
|
16
swad_photo.c
16
swad_photo.c
|
@ -689,7 +689,7 @@ static bool Pho_ReceivePhotoAndDetectFaces (bool ItsMe,const struct Usr_Data *Us
|
|||
Frm_BeginFormId (NextAction[Gbl.Usrs.Other.UsrDat.Roles.InCurrentCrs],FormId);
|
||||
Usr_PutParamUsrCodEncrypted (UsrDat->EnUsrCod);
|
||||
}
|
||||
Par_PutHiddenParamString (NULL,"FileName",StrFileName);
|
||||
Par_PutParString (NULL,"FileName",StrFileName);
|
||||
Frm_EndForm ();
|
||||
}
|
||||
else
|
||||
|
@ -834,7 +834,7 @@ static void Pho_UpdatePhoto1 (struct Usr_Data *UsrDat)
|
|||
char PathRelPhoto[PATH_MAX + 1];
|
||||
|
||||
/***** Get the name of the file with the selected face *****/
|
||||
Par_GetParToText ("FileName",Gbl.Usrs.FileNamePhoto,NAME_MAX); // Example of FileNamePhoto: "4924a838630e_016"
|
||||
Par_GetParText ("FileName",Gbl.Usrs.FileNamePhoto,NAME_MAX); // Example of FileNamePhoto: "4924a838630e_016"
|
||||
|
||||
/***** Convert the temporary photo resulting of the processing to the current photo of the user *****/
|
||||
snprintf (PathPhotoTmp,sizeof (PathPhotoTmp),"%s/%s_paso3.jpg",
|
||||
|
@ -1794,7 +1794,7 @@ static void Pho_PutSelectorForTypeOfAvg (const struct Pho_DegPhotos *DegPhotos)
|
|||
|
||||
void Pho_PutHiddenParamTypeOfAvg (Pho_AvgPhotoTypeOfAverage_t TypeOfAverage)
|
||||
{
|
||||
Par_PutHiddenParamUnsigned (NULL,"AvgType",(unsigned) TypeOfAverage);
|
||||
Par_PutParUnsigned (NULL,"AvgType",(unsigned) TypeOfAverage);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -1804,7 +1804,7 @@ void Pho_PutHiddenParamTypeOfAvg (Pho_AvgPhotoTypeOfAverage_t TypeOfAverage)
|
|||
static Pho_AvgPhotoTypeOfAverage_t Pho_GetPhotoAvgTypeFromForm (void)
|
||||
{
|
||||
return (Pho_AvgPhotoTypeOfAverage_t)
|
||||
Par_GetParToUnsignedLong ("AvgType",
|
||||
Par_GetParUnsignedLong ("AvgType",
|
||||
0,
|
||||
Pho_NUM_AVERAGE_PHOTO_TYPES - 1,
|
||||
(unsigned long) Pho_PHOTO_AVG_DEFAULT);
|
||||
|
@ -1859,7 +1859,7 @@ static void Pho_PutSelectorForHowComputePhotoSize (const struct Pho_DegPhotos *D
|
|||
|
||||
void Pho_PutHiddenParamPhotoSize (Pho_HowComputePhotoSize_t HowComputePhotoSize)
|
||||
{
|
||||
Par_PutHiddenParamUnsigned (NULL,"PhotoSize",(unsigned) HowComputePhotoSize);
|
||||
Par_PutParUnsigned (NULL,"PhotoSize",(unsigned) HowComputePhotoSize);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -1869,7 +1869,7 @@ void Pho_PutHiddenParamPhotoSize (Pho_HowComputePhotoSize_t HowComputePhotoSize)
|
|||
static Pho_HowComputePhotoSize_t Pho_GetHowComputePhotoSizeFromForm (void)
|
||||
{
|
||||
return (Pho_HowComputePhotoSize_t)
|
||||
Par_GetParToUnsignedLong ("PhotoSize",
|
||||
Par_GetParUnsignedLong ("PhotoSize",
|
||||
0,
|
||||
Pho_NUM_HOW_COMPUTE_PHOTO_SIZES - 1,
|
||||
(unsigned long) Pho_PHOTO_SIZE_DEFAULT);
|
||||
|
@ -1923,7 +1923,7 @@ static void Pho_PutSelectorForHowOrderDegrees (const struct Pho_DegPhotos *DegPh
|
|||
|
||||
void Pho_PutHiddenParamOrderDegrees (Pho_HowOrderDegrees_t HowOrderDegrees)
|
||||
{
|
||||
Par_PutHiddenParamUnsigned (NULL,"Order",(unsigned) HowOrderDegrees);
|
||||
Par_PutParUnsigned (NULL,"Order",(unsigned) HowOrderDegrees);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -1933,7 +1933,7 @@ void Pho_PutHiddenParamOrderDegrees (Pho_HowOrderDegrees_t HowOrderDegrees)
|
|||
static Pho_HowOrderDegrees_t Pho_GetHowOrderDegreesFromForm (void)
|
||||
{
|
||||
return (Pho_HowOrderDegrees_t)
|
||||
Par_GetParToUnsignedLong ("Order",
|
||||
Par_GetParUnsignedLong ("Order",
|
||||
0,
|
||||
Pho_NUM_HOW_ORDER_DEGREES - 1,
|
||||
(unsigned long) Pho_ORDER_DEFAULT);
|
||||
|
|
|
@ -84,7 +84,7 @@ void PhoSha_PutIconsToSelectPhotoShape (void)
|
|||
{
|
||||
Set_BeginPref (Shape == Gbl.Prefs.PhotoShape);
|
||||
Frm_BeginForm (ActChgUsrPho);
|
||||
Par_PutHiddenParamUnsigned (NULL,"PhotoShape",Shape);
|
||||
Par_PutParUnsigned (NULL,"PhotoShape",Shape);
|
||||
HTM_INPUT_IMAGE (Cfg_URL_ICON_PUBLIC,"user.svg",
|
||||
Txt_PHOTO_SHAPES[Shape],
|
||||
"class=\"%s ICO_%s_%s\"",
|
||||
|
@ -131,7 +131,7 @@ void PhoSha_ChangePhotoShape (void)
|
|||
|
||||
PhoSha_Shape_t PhoSha_GetParamPhotoShape (void)
|
||||
{
|
||||
return (PhoSha_Shape_t) Par_GetParToUnsignedLong ("PhotoShape",
|
||||
return (PhoSha_Shape_t) Par_GetParUnsignedLong ("PhotoShape",
|
||||
(PhoSha_Shape_t) 0,
|
||||
(PhoSha_Shape_t) (PhoSha_NUM_SHAPES - 1),
|
||||
PhoSha_SHAPE_DEFAULT);
|
||||
|
|
14
swad_place.c
14
swad_place.c
|
@ -132,7 +132,7 @@ void Plc_SeePlaces (void)
|
|||
HTM_TH_Begin (HTM_HEAD_LEFT);
|
||||
|
||||
Frm_BeginForm (ActSeePlc);
|
||||
Par_PutHiddenParamUnsigned (NULL,"Order",(unsigned) Order);
|
||||
Par_PutParUnsigned (NULL,"Order",(unsigned) Order);
|
||||
HTM_BUTTON_Submit_Begin (Txt_PLACES_HELP_ORDER[Order],
|
||||
"class=\"BT_LINK\"");
|
||||
if (Order == Places.SelectedOrder)
|
||||
|
@ -233,7 +233,7 @@ void Plc_SeePlaces (void)
|
|||
|
||||
static Plc_Order_t Plc_GetParamPlcOrder (void)
|
||||
{
|
||||
return (Plc_Order_t) Par_GetParToUnsignedLong ("Order",
|
||||
return (Plc_Order_t) Par_GetParUnsignedLong ("Order",
|
||||
0,
|
||||
Plc_NUM_ORDERS - 1,
|
||||
(unsigned long) Plc_ORDER_DEFAULT);
|
||||
|
@ -533,7 +533,7 @@ static void Plc_ListPlacesForEdition (const struct Plc_Places *Places)
|
|||
static void Plc_PutParamPlcCod (void *PlcCod)
|
||||
{
|
||||
if (PlcCod)
|
||||
Par_PutHiddenParamLong (NULL,"PlcCod",*((long *) PlcCod));
|
||||
Par_PutParLong (NULL,"PlcCod",*((long *) PlcCod));
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -543,7 +543,7 @@ static void Plc_PutParamPlcCod (void *PlcCod)
|
|||
long Plc_GetParamPlcCod (void)
|
||||
{
|
||||
/***** Get code of place *****/
|
||||
return Par_GetParToLong ("PlcCod");
|
||||
return Par_GetParLong ("PlcCod");
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -644,7 +644,7 @@ static void Plc_RenamePlace (Cns_ShrtOrFullName_t ShrtOrFullName)
|
|||
Err_WrongPlaceExit ();
|
||||
|
||||
/* Get the new name for the place */
|
||||
Par_GetParToText (ParamName,NewPlcName,MaxBytes);
|
||||
Par_GetParText (ParamName,NewPlcName,MaxBytes);
|
||||
|
||||
/***** Get from the database the old names of the place *****/
|
||||
Plc_GetDataOfPlaceByCod (Plc_EditingPlc);
|
||||
|
@ -795,10 +795,10 @@ void Plc_ReceiveFormNewPlace (void)
|
|||
|
||||
/***** Get parameters from form *****/
|
||||
/* Get place short name */
|
||||
Par_GetParToText ("ShortName",Plc_EditingPlc->ShrtName,Plc_MAX_BYTES_PLACE_SHRT_NAME);
|
||||
Par_GetParText ("ShortName",Plc_EditingPlc->ShrtName,Plc_MAX_BYTES_PLACE_SHRT_NAME);
|
||||
|
||||
/* Get place full name */
|
||||
Par_GetParToText ("FullName",Plc_EditingPlc->FullName,Plc_MAX_BYTES_PLACE_FULL_NAME);
|
||||
Par_GetParText ("FullName",Plc_EditingPlc->FullName,Plc_MAX_BYTES_PLACE_FULL_NAME);
|
||||
|
||||
if (Plc_EditingPlc->ShrtName[0] &&
|
||||
Plc_EditingPlc->FullName[0]) // If there's a place name
|
||||
|
|
|
@ -463,7 +463,7 @@ static void Plg_ListPluginsForEdition (struct Plg_Plugins *Plugins)
|
|||
static void Plg_PutParamPlgCod (void *PlgCod)
|
||||
{
|
||||
if (PlgCod)
|
||||
Par_PutHiddenParamLong (NULL,"PlgCod",*((long *) PlgCod));
|
||||
Par_PutParLong (NULL,"PlgCod",*((long *) PlgCod));
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -473,7 +473,7 @@ static void Plg_PutParamPlgCod (void *PlgCod)
|
|||
long Plg_GetParamPlgCod (void)
|
||||
{
|
||||
/***** Get code of plugin *****/
|
||||
return Par_GetParToLong ("PlgCod");
|
||||
return Par_GetParLong ("PlgCod");
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -523,7 +523,7 @@ void Plg_RenamePlugin (void)
|
|||
Err_WrongPluginExit ();
|
||||
|
||||
/* Get the new name for the plugin */
|
||||
Par_GetParToText ("Name",NewPlgName,Plg_MAX_BYTES_PLUGIN_NAME);
|
||||
Par_GetParText ("Name",NewPlgName,Plg_MAX_BYTES_PLUGIN_NAME);
|
||||
|
||||
/***** Get plugin data from the database *****/
|
||||
Plg_GetDataOfPluginByCod (Plg_EditingPlg);
|
||||
|
@ -580,7 +580,7 @@ void Plg_ChangePlgDescription (void)
|
|||
Err_WrongPluginExit ();
|
||||
|
||||
/* Get the new description for the plugin */
|
||||
Par_GetParToText ("Description",NewDescription,Plg_MAX_BYTES_PLUGIN_DESCRIPTION);
|
||||
Par_GetParText ("Description",NewDescription,Plg_MAX_BYTES_PLUGIN_DESCRIPTION);
|
||||
|
||||
/***** Get plugin data from the database *****/
|
||||
Plg_GetDataOfPluginByCod (Plg_EditingPlg);
|
||||
|
@ -622,7 +622,7 @@ void Plg_ChangePlgLogo (void)
|
|||
Err_WrongPluginExit ();
|
||||
|
||||
/* Get the new logo for the plugin */
|
||||
Par_GetParToText ("Logo",NewLogo,Plg_MAX_BYTES_PLUGIN_LOGO);
|
||||
Par_GetParText ("Logo",NewLogo,Plg_MAX_BYTES_PLUGIN_LOGO);
|
||||
|
||||
/***** Get plugin data from the database *****/
|
||||
Plg_GetDataOfPluginByCod (Plg_EditingPlg);
|
||||
|
@ -664,7 +664,7 @@ void Plg_ChangePlgAppKey (void)
|
|||
Err_WrongPluginExit ();
|
||||
|
||||
/* Get the new logo for the plugin */
|
||||
Par_GetParToText ("AppKey",NewAppKey,Plg_MAX_BYTES_PLUGIN_APP_KEY);
|
||||
Par_GetParText ("AppKey",NewAppKey,Plg_MAX_BYTES_PLUGIN_APP_KEY);
|
||||
|
||||
/***** Get plugin data from the database *****/
|
||||
Plg_GetDataOfPluginByCod (Plg_EditingPlg);
|
||||
|
@ -706,7 +706,7 @@ void Plg_ChangePlgURL (void)
|
|||
Err_WrongPluginExit ();
|
||||
|
||||
/* Get the new URL for the plugin */
|
||||
Par_GetParToText ("URL",NewURL,Cns_MAX_BYTES_WWW);
|
||||
Par_GetParText ("URL",NewURL,Cns_MAX_BYTES_WWW);
|
||||
|
||||
/***** Get plugin data from the database *****/
|
||||
Plg_GetDataOfPluginByCod (Plg_EditingPlg);
|
||||
|
@ -748,7 +748,7 @@ void Plg_ChangePlgIP (void)
|
|||
Err_WrongPluginExit ();
|
||||
|
||||
/* Get the new IP for the plugin */
|
||||
Par_GetParToText ("IP",NewIP,Cns_MAX_BYTES_IP);
|
||||
Par_GetParText ("IP",NewIP,Cns_MAX_BYTES_IP);
|
||||
|
||||
/***** Get plugin data from the database *****/
|
||||
Plg_GetDataOfPluginByCod (Plg_EditingPlg);
|
||||
|
@ -930,12 +930,12 @@ void Plg_ReceiveFormNewPlg (void)
|
|||
|
||||
/***** Get parameters from form *****/
|
||||
/* Get plugin name, description, logo, application key, URL, IP address */
|
||||
Par_GetParToText ("Name" ,Plg_EditingPlg->Name ,Plg_MAX_BYTES_PLUGIN_NAME);
|
||||
Par_GetParToText ("Description",Plg_EditingPlg->Description,Plg_MAX_BYTES_PLUGIN_DESCRIPTION);
|
||||
Par_GetParToText ("Logo" ,Plg_EditingPlg->Logo ,Plg_MAX_BYTES_PLUGIN_LOGO);
|
||||
Par_GetParToText ("AppKey" ,Plg_EditingPlg->AppKey ,Plg_MAX_BYTES_PLUGIN_APP_KEY);
|
||||
Par_GetParToText ("URL" ,Plg_EditingPlg->URL ,Cns_MAX_BYTES_WWW);
|
||||
Par_GetParToText ("IP" ,Plg_EditingPlg->IP ,Cns_MAX_BYTES_IP);
|
||||
Par_GetParText ("Name" ,Plg_EditingPlg->Name ,Plg_MAX_BYTES_PLUGIN_NAME);
|
||||
Par_GetParText ("Description",Plg_EditingPlg->Description,Plg_MAX_BYTES_PLUGIN_DESCRIPTION);
|
||||
Par_GetParText ("Logo" ,Plg_EditingPlg->Logo ,Plg_MAX_BYTES_PLUGIN_LOGO);
|
||||
Par_GetParText ("AppKey" ,Plg_EditingPlg->AppKey ,Plg_MAX_BYTES_PLUGIN_APP_KEY);
|
||||
Par_GetParText ("URL" ,Plg_EditingPlg->URL ,Cns_MAX_BYTES_WWW);
|
||||
Par_GetParText ("IP" ,Plg_EditingPlg->IP ,Cns_MAX_BYTES_IP);
|
||||
|
||||
if (Plg_EditingPlg->Name[0]) // If there's a plugin name
|
||||
{
|
||||
|
|
|
@ -239,7 +239,7 @@ Pri_Visibility_t Pri_GetParamVisibility (const char *ParamName,
|
|||
{
|
||||
Pri_Visibility_t Visibility;
|
||||
|
||||
Visibility = (Pri_Visibility_t) Par_GetParToUnsignedLong (ParamName,
|
||||
Visibility = (Pri_Visibility_t) Par_GetParUnsignedLong (ParamName,
|
||||
0,
|
||||
Pri_NUM_OPTIONS_PRIVACY - 1,
|
||||
(unsigned long) Pri_VISIBILITY_UNKNOWN);
|
||||
|
|
|
@ -856,7 +856,7 @@ static void Prf_ShowRanking (unsigned Rank,unsigned NumUsrs)
|
|||
/***** Rank in form to go to ranking *****/
|
||||
Frm_BeginForm (ActSeeUseGbl);
|
||||
Sco_PutParamScope ("ScopeSta",HieLvl_SYS);
|
||||
Par_PutHiddenParamUnsigned (NULL,"FigureType",(unsigned) Fig_USERS_RANKING);
|
||||
Par_PutParUnsigned (NULL,"FigureType",(unsigned) Fig_USERS_RANKING);
|
||||
if (asprintf (&Title,"#%u %s %u",
|
||||
Rank,Txt_of_PART_OF_A_TOTAL,NumUsrs) < 0)
|
||||
Err_NotEnoughMemoryExit ();
|
||||
|
|
|
@ -1135,27 +1135,27 @@ void Prg_PutParamItmCod (void *ItmCod)
|
|||
{
|
||||
if (ItmCod)
|
||||
if (*((long *) ItmCod) > 0)
|
||||
Par_PutHiddenParamLong (NULL,"ItmCod",*((long *) ItmCod));
|
||||
Par_PutParLong (NULL,"ItmCod",*((long *) ItmCod));
|
||||
}
|
||||
|
||||
void Prg_PutParamRscCod (void *RscCod)
|
||||
{
|
||||
if (RscCod)
|
||||
if (*((long *) RscCod) > 0)
|
||||
Par_PutHiddenParamLong (NULL,"RscCod",*((long *) RscCod));
|
||||
Par_PutParLong (NULL,"RscCod",*((long *) RscCod));
|
||||
}
|
||||
|
||||
void Prg_GetParams (struct Prg_Item *Item)
|
||||
{
|
||||
/***** Try to get item resource *****/
|
||||
Item->Resource.Hierarchy.RscCod = Par_GetParToLong ("RscCod");
|
||||
Item->Resource.Hierarchy.RscCod = Par_GetParLong ("RscCod");
|
||||
|
||||
/***** Get data of the program item from database *****/
|
||||
PrgRsc_GetDataOfResourceByCod (Item);
|
||||
|
||||
if (Item->Hierarchy.ItmCod <= 0) // No resource specified
|
||||
/***** Try to get data of the program item from database *****/
|
||||
Item->Hierarchy.ItmCod = Par_GetParToLong ("ItmCod");
|
||||
Item->Hierarchy.ItmCod = Par_GetParLong ("ItmCod");
|
||||
|
||||
/***** Get data of the program item from database *****/
|
||||
Prg_GetDataOfItemByCod (Item);
|
||||
|
@ -2116,10 +2116,10 @@ void Prg_ReceiveFormChgItem (void)
|
|||
Item.TimeUTC[Dat_END_TIME] = Dat_GetTimeUTCFromForm (Dat_END_TIME);
|
||||
|
||||
/***** Get program item title *****/
|
||||
Par_GetParToText ("Title",Item.Title,Prg_MAX_BYTES_PROGRAM_ITEM_TITLE);
|
||||
Par_GetParText ("Title",Item.Title,Prg_MAX_BYTES_PROGRAM_ITEM_TITLE);
|
||||
|
||||
/***** Get program item text *****/
|
||||
Par_GetParToHTML ("Txt",Description,Cns_MAX_BYTES_TEXT); // Store in HTML format (not rigorous)
|
||||
Par_GetParHTML ("Txt",Description,Cns_MAX_BYTES_TEXT); // Store in HTML format (not rigorous)
|
||||
|
||||
/***** Adjust dates *****/
|
||||
if (Item.TimeUTC[Dat_STR_TIME] == 0)
|
||||
|
@ -2163,10 +2163,10 @@ void Prg_ReceiveFormNewItem (void)
|
|||
NewItem.TimeUTC[Dat_END_TIME] = Dat_GetTimeUTCFromForm (Dat_END_TIME);
|
||||
|
||||
/***** Get program item title *****/
|
||||
Par_GetParToText ("Title",NewItem.Title,Prg_MAX_BYTES_PROGRAM_ITEM_TITLE);
|
||||
Par_GetParText ("Title",NewItem.Title,Prg_MAX_BYTES_PROGRAM_ITEM_TITLE);
|
||||
|
||||
/***** Get program item text *****/
|
||||
Par_GetParToHTML ("Txt",Description,Cns_MAX_BYTES_TEXT); // Store in HTML format (not rigorous)
|
||||
Par_GetParHTML ("Txt",Description,Cns_MAX_BYTES_TEXT); // Store in HTML format (not rigorous)
|
||||
|
||||
/***** Adjust dates *****/
|
||||
if (NewItem.TimeUTC[Dat_STR_TIME] == 0)
|
||||
|
|
|
@ -615,7 +615,7 @@ static void PrgRsc_PutFormsToRemEditOneResource (struct Prg_Item *Item,
|
|||
|
||||
void PrgRsc_PutParamRscCod (long RscCod)
|
||||
{
|
||||
Par_PutHiddenParamLong (NULL,"RscCod",RscCod);
|
||||
Par_PutParLong (NULL,"RscCod",RscCod);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -634,7 +634,7 @@ void PrgRsc_CreateResource (void)
|
|||
Prg_GetParams (&Item);
|
||||
|
||||
/* Get the new title for the new resource */
|
||||
Par_GetParToText ("Title",Item.Resource.Title,PrgRsc_MAX_BYTES_PROGRAM_RESOURCE_TITLE);
|
||||
Par_GetParText ("Title",Item.Resource.Title,PrgRsc_MAX_BYTES_PROGRAM_RESOURCE_TITLE);
|
||||
|
||||
/***** Create resource *****/
|
||||
Item.Resource.Hierarchy.RscCod = Prg_DB_CreateResource (&Item);
|
||||
|
@ -665,7 +665,7 @@ void PrgRsc_RenameResource (void)
|
|||
|
||||
/***** Rename resource *****/
|
||||
/* Get the new title for the resource */
|
||||
Par_GetParToText ("Title",NewTitle,PrgRsc_MAX_BYTES_PROGRAM_RESOURCE_TITLE);
|
||||
Par_GetParText ("Title",NewTitle,PrgRsc_MAX_BYTES_PROGRAM_RESOURCE_TITLE);
|
||||
|
||||
/* Update database changing old title by new title */
|
||||
Prg_DB_UpdateResourceTitle (Item.Hierarchy.ItmCod,Item.Resource.Hierarchy.RscCod,NewTitle);
|
||||
|
@ -1079,7 +1079,7 @@ void PrgRsc_ChangeLink (void)
|
|||
Err_WrongResourceExit ();
|
||||
|
||||
/* Get link type and code */
|
||||
Par_GetParToText ("Link",TypeCod,sizeof (TypeCod) - 1);
|
||||
Par_GetParText ("Link",TypeCod,sizeof (TypeCod) - 1);
|
||||
if (sscanf (TypeCod,"%3s_%ld",TypeStr,&Cod) == 2)
|
||||
{
|
||||
Item.Resource.Link.Type = PrgRsc_GetTypeFromString (TypeStr);
|
||||
|
|
|
@ -951,7 +951,7 @@ void Prj_PutParams (struct Prj_Filter *Filter,
|
|||
|
||||
/***** Put order field *****/
|
||||
if (Order != Prj_ORDER_DEFAULT)
|
||||
Par_PutHiddenParamUnsigned (NULL,"Order",(unsigned) Order);
|
||||
Par_PutParUnsigned (NULL,"Order",(unsigned) Order);
|
||||
|
||||
/***** Put number of page *****/
|
||||
if (NumPage > 1)
|
||||
|
@ -976,27 +976,27 @@ void Prj_PutParams (struct Prj_Filter *Filter,
|
|||
|
||||
static void Prj_PutHiddenParamAssign (unsigned Assign)
|
||||
{
|
||||
Par_PutHiddenParamUnsigned (NULL,Prj_PARAM_FILTER_PRE_NON_NAME,Assign);
|
||||
Par_PutParUnsigned (NULL,Prj_PARAM_FILTER_PRE_NON_NAME,Assign);
|
||||
}
|
||||
|
||||
static void Prj_PutHiddenParamHidden (unsigned Hidden)
|
||||
{
|
||||
Par_PutHiddenParamUnsigned (NULL,Prj_PARAM_FILTER_HID_VIS_NAME,Hidden);
|
||||
Par_PutParUnsigned (NULL,Prj_PARAM_FILTER_HID_VIS_NAME,Hidden);
|
||||
}
|
||||
|
||||
static void Prj_PutHiddenParamFaulti (unsigned Faulti)
|
||||
{
|
||||
Par_PutHiddenParamUnsigned (NULL,Prj_PARAM_FILTER_FAULTIN_NAME,Faulti);
|
||||
Par_PutParUnsigned (NULL,Prj_PARAM_FILTER_FAULTIN_NAME,Faulti);
|
||||
}
|
||||
|
||||
static void Prj_PutHiddenParamReview (unsigned Review)
|
||||
{
|
||||
Par_PutHiddenParamUnsigned (NULL,Prj_PARAM_FILTER_REVIEW_NAME,Review);
|
||||
Par_PutParUnsigned (NULL,Prj_PARAM_FILTER_REVIEW_NAME,Review);
|
||||
}
|
||||
|
||||
static void Prj_PutHiddenParamFilterDptCod (long DptCod)
|
||||
{
|
||||
Par_PutHiddenParamUnsigned (NULL,Prj_PARAM_FILTER_DPT_COD_NAME,DptCod);
|
||||
Par_PutParUnsigned (NULL,Prj_PARAM_FILTER_DPT_COD_NAME,DptCod);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -1005,7 +1005,7 @@ static void Prj_PutHiddenParamFilterDptCod (long DptCod)
|
|||
|
||||
static void Prj_GetHiddenParamPreNon (struct Prj_Projects *Projects)
|
||||
{
|
||||
Projects->Filter.Assign = (unsigned) Par_GetParToUnsignedLong (Prj_PARAM_FILTER_PRE_NON_NAME,
|
||||
Projects->Filter.Assign = (unsigned) Par_GetParUnsignedLong (Prj_PARAM_FILTER_PRE_NON_NAME,
|
||||
0,
|
||||
(1 << Prj_ASSIGNED) |
|
||||
(1 << Prj_NONASSIG),
|
||||
|
@ -1023,7 +1023,7 @@ static Prj_HiddenVisibl_t Prj_GetHiddenParamHidVis (void)
|
|||
case Rol_TCH:
|
||||
case Rol_SYS_ADM:
|
||||
return (Prj_HiddenVisibl_t)
|
||||
Par_GetParToUnsignedLong (Prj_PARAM_FILTER_HID_VIS_NAME,
|
||||
Par_GetParUnsignedLong (Prj_PARAM_FILTER_HID_VIS_NAME,
|
||||
0,
|
||||
(1 << Prj_HIDDEN) |
|
||||
(1 << Prj_VISIBL),
|
||||
|
@ -1038,7 +1038,7 @@ static Prj_HiddenVisibl_t Prj_GetHiddenParamHidVis (void)
|
|||
static unsigned Prj_GetHiddenParamFaulti (void)
|
||||
{
|
||||
return (unsigned)
|
||||
Par_GetParToUnsignedLong (Prj_PARAM_FILTER_FAULTIN_NAME,
|
||||
Par_GetParUnsignedLong (Prj_PARAM_FILTER_FAULTIN_NAME,
|
||||
0,
|
||||
(1 << Prj_FAULTY) |
|
||||
(1 << Prj_FAULTLESS),
|
||||
|
@ -1049,7 +1049,7 @@ static unsigned Prj_GetHiddenParamFaulti (void)
|
|||
static unsigned Prj_GetHiddenParamReview (void)
|
||||
{
|
||||
return (unsigned)
|
||||
Par_GetParToUnsignedLong (Prj_PARAM_FILTER_REVIEW_NAME,
|
||||
Par_GetParUnsignedLong (Prj_PARAM_FILTER_REVIEW_NAME,
|
||||
0,
|
||||
(1 << Prj_UNREVIEWED) |
|
||||
(1 << Prj_UNAPPROVED) |
|
||||
|
@ -1061,7 +1061,7 @@ static unsigned Prj_GetHiddenParamReview (void)
|
|||
|
||||
static long Prj_GetHiddenParamFilterDptCod (void)
|
||||
{
|
||||
return Par_GetParToLong (Prj_PARAM_FILTER_DPT_COD_NAME);
|
||||
return Par_GetParLong (Prj_PARAM_FILTER_DPT_COD_NAME);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -3158,7 +3158,7 @@ static void Prj_RemUsrFromPrj (Prj_RoleInProject_t RoleInPrj)
|
|||
static Prj_Order_t Prj_GetParamPrjOrder (void)
|
||||
{
|
||||
return (Prj_Order_t)
|
||||
Par_GetParToUnsignedLong ("Order",
|
||||
Par_GetParUnsignedLong ("Order",
|
||||
0,
|
||||
Prj_NUM_ORDERS - 1,
|
||||
(unsigned long) Prj_ORDER_DEFAULT);
|
||||
|
@ -3488,7 +3488,7 @@ void Prj_FreeListProjects (struct Prj_Projects *Projects)
|
|||
void Prj_PutParamPrjCod (long PrjCod)
|
||||
{
|
||||
if (PrjCod > 0)
|
||||
Par_PutHiddenParamLong (NULL,"PrjCod",PrjCod);
|
||||
Par_PutParLong (NULL,"PrjCod",PrjCod);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -3498,7 +3498,7 @@ void Prj_PutParamPrjCod (long PrjCod)
|
|||
long Prj_GetParamPrjCod (void)
|
||||
{
|
||||
/***** Get code of project *****/
|
||||
return Par_GetParToLong ("PrjCod");
|
||||
return Par_GetParLong ("PrjCod");
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -4068,36 +4068,36 @@ void Prj_ReceiveFormProject (void)
|
|||
if (ICanEditProject)
|
||||
{
|
||||
/* Get project title */
|
||||
Par_GetParToText ("Title",Projects.Prj.Title,Prj_MAX_BYTES_TITLE);
|
||||
Par_GetParText ("Title",Projects.Prj.Title,Prj_MAX_BYTES_TITLE);
|
||||
|
||||
/* Get department */
|
||||
Projects.Prj.DptCod = Par_GetParToLong (Par_CodeStr[Par_DptCod]);
|
||||
Projects.Prj.DptCod = Par_GetParLong (Par_CodeStr[Par_DptCod]);
|
||||
|
||||
/* Get whether the project is assigned */
|
||||
Projects.Prj.Assigned = (Par_GetParToBool ("Assigned")) ? Prj_ASSIGNED :
|
||||
Projects.Prj.Assigned = (Par_GetParBool ("Assigned")) ? Prj_ASSIGNED :
|
||||
Prj_NONASSIG;
|
||||
|
||||
/* Get number of students */
|
||||
Projects.Prj.NumStds = (unsigned)
|
||||
Par_GetParToUnsignedLong ("NumStds",
|
||||
Par_GetParUnsignedLong ("NumStds",
|
||||
0,
|
||||
UINT_MAX,
|
||||
1);
|
||||
|
||||
/* Get status */
|
||||
Projects.Prj.Proposal = (Prj_Proposal_t)
|
||||
Par_GetParToUnsignedLong ("Proposal",
|
||||
Par_GetParUnsignedLong ("Proposal",
|
||||
0,
|
||||
Prj_NUM_PROPOSAL_TYPES - 1,
|
||||
(unsigned long) Prj_PROPOSAL_DEFAULT);
|
||||
|
||||
/* Get project description, required knowledge and required materials */
|
||||
Par_GetParToHTML ("Description",Projects.Prj.Description,Cns_MAX_BYTES_TEXT); // Store in HTML format (not rigorous)
|
||||
Par_GetParToHTML ("Knowledge" ,Projects.Prj.Knowledge ,Cns_MAX_BYTES_TEXT); // Store in HTML format (not rigorous)
|
||||
Par_GetParToHTML ("Materials" ,Projects.Prj.Materials ,Cns_MAX_BYTES_TEXT); // Store in HTML format (not rigorous)
|
||||
Par_GetParHTML ("Description",Projects.Prj.Description,Cns_MAX_BYTES_TEXT); // Store in HTML format (not rigorous)
|
||||
Par_GetParHTML ("Knowledge" ,Projects.Prj.Knowledge ,Cns_MAX_BYTES_TEXT); // Store in HTML format (not rigorous)
|
||||
Par_GetParHTML ("Materials" ,Projects.Prj.Materials ,Cns_MAX_BYTES_TEXT); // Store in HTML format (not rigorous)
|
||||
|
||||
/* Get degree WWW */
|
||||
Par_GetParToText ("URL",Projects.Prj.URL,Cns_MAX_BYTES_WWW);
|
||||
Par_GetParText ("URL",Projects.Prj.URL,Cns_MAX_BYTES_WWW);
|
||||
|
||||
/***** Check if title is correct *****/
|
||||
if (!Projects.Prj.Title[0]) // If there is not a project title
|
||||
|
@ -4307,7 +4307,7 @@ void Prj_ReceiveConfigPrj (void)
|
|||
|
||||
static bool Prj_GetEditableFromForm (void)
|
||||
{
|
||||
return Par_GetParToBool ("Editable");
|
||||
return Par_GetParBool ("Editable");
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -4641,7 +4641,7 @@ void Prj_ChangeReviewStatus (void)
|
|||
if (Prj_CheckIfICanReviewProjects ())
|
||||
{
|
||||
Projects.Prj.Review.Status = Prj_GetHiddenParamReviewStatus ();
|
||||
Par_GetParToHTML ("ReviewTxt",Projects.Prj.Review.Txt,Cns_MAX_BYTES_TEXT); // Store in HTML format (not rigorous)
|
||||
Par_GetParHTML ("ReviewTxt",Projects.Prj.Review.Txt,Cns_MAX_BYTES_TEXT); // Store in HTML format (not rigorous)
|
||||
Prj_DB_UpdateReview (&Projects.Prj);
|
||||
}
|
||||
else
|
||||
|
@ -4661,7 +4661,7 @@ void Prj_ChangeReviewStatus (void)
|
|||
static Prj_ReviewStatus_t Prj_GetHiddenParamReviewStatus (void)
|
||||
{
|
||||
return (Prj_ReviewStatus_t)
|
||||
Par_GetParToUnsignedLong ("ReviewStatus",
|
||||
Par_GetParUnsignedLong ("ReviewStatus",
|
||||
0,
|
||||
Prj_NUM_REVIEW_STATUS - 1,
|
||||
(unsigned long) Prj_REVIEW_STATUS_DEFAULT);
|
||||
|
|
|
@ -156,7 +156,7 @@ void Qst_ShowFormRequestEditQsts (struct Qst_Questions *Questions)
|
|||
if ((Questions->Tags.Num = Tag_DB_GetAllTagsFromCurrentCrs (&mysql_res)))
|
||||
{
|
||||
Frm_BeginForm (ActLstTstQst);
|
||||
Par_PutHiddenParamUnsigned (NULL,"Order",(unsigned) Qst_DEFAULT_ORDER);
|
||||
Par_PutParUnsigned (NULL,"Order",(unsigned) Qst_DEFAULT_ORDER);
|
||||
|
||||
HTM_TABLE_BeginPadding (2);
|
||||
|
||||
|
@ -931,7 +931,7 @@ void Qst_WriteHeadingRowQuestionsForEdition (struct Qst_Questions *Questions)
|
|||
{
|
||||
Frm_BeginForm (ActLstTstQst);
|
||||
Qst_PutParamsEditQst (Questions);
|
||||
Par_PutHiddenParamUnsigned (NULL,"Order",(unsigned) Order);
|
||||
Par_PutParUnsigned (NULL,"Order",(unsigned) Order);
|
||||
HTM_BUTTON_Submit_Begin (Txt_TST_STR_ORDER_FULL[Order],
|
||||
"class=\"BT_LINK\"");
|
||||
if (Order == Questions->SelectedOrder)
|
||||
|
@ -1021,7 +1021,7 @@ void Qst_WriteQuestionListing (struct Qst_Questions *Questions,unsigned QstInd)
|
|||
{
|
||||
Frm_BeginForm (ActChgShfTstQst);
|
||||
Qst_PutParamsEditQst (Questions);
|
||||
Par_PutHiddenParamUnsigned (NULL,"Order",(unsigned) Questions->SelectedOrder);
|
||||
Par_PutParUnsigned (NULL,"Order",(unsigned) Questions->SelectedOrder);
|
||||
HTM_INPUT_CHECKBOX ("Shuffle",HTM_SUBMIT_ON_CHANGE,
|
||||
"value=\"Y\"%s",
|
||||
Questions->Question.Answer.Shuffle ? " checked=\"checked\"" :
|
||||
|
@ -1369,13 +1369,13 @@ void Qst_PutParamsEditQst (void *Questions)
|
|||
{
|
||||
if (Questions)
|
||||
{
|
||||
Par_PutHiddenParamChar ("AllTags",((struct Qst_Questions *) Questions)->Tags.All ? 'Y' :
|
||||
Par_PutParChar ("AllTags",((struct Qst_Questions *) Questions)->Tags.All ? 'Y' :
|
||||
'N');
|
||||
Par_PutHiddenParamString (NULL,"ChkTag",((struct Qst_Questions *) Questions)->Tags.List ? ((struct Qst_Questions *) Questions)->Tags.List :
|
||||
Par_PutParString (NULL,"ChkTag",((struct Qst_Questions *) Questions)->Tags.List ? ((struct Qst_Questions *) Questions)->Tags.List :
|
||||
"");
|
||||
Par_PutHiddenParamChar ("AllAnsTypes",((struct Qst_Questions *) Questions)->AnswerTypes.All ? 'Y' :
|
||||
Par_PutParChar ("AllAnsTypes",((struct Qst_Questions *) Questions)->AnswerTypes.All ? 'Y' :
|
||||
'N');
|
||||
Par_PutHiddenParamString (NULL,"AnswerType",((struct Qst_Questions *) Questions)->AnswerTypes.List);
|
||||
Par_PutParString (NULL,"AnswerType",((struct Qst_Questions *) Questions)->AnswerTypes.List);
|
||||
|
||||
Qst_PutParamQstCod (&((struct Qst_Questions *) Questions)->Question.QstCod);
|
||||
// if (Test->NumQsts == 1)
|
||||
|
@ -1720,7 +1720,7 @@ void Qst_WriteParamQstCod (unsigned QstInd,long QstCod)
|
|||
char StrAns[3 + Cns_MAX_DECIMAL_DIGITS_UINT + 1]; // "Ansxx...x"
|
||||
|
||||
snprintf (StrAns,sizeof (StrAns),"Qst%010u",QstInd);
|
||||
Par_PutHiddenParamLong (NULL,StrAns,QstCod);
|
||||
Par_PutParLong (NULL,StrAns,QstCod);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -2728,7 +2728,7 @@ void Qst_GetQstFromForm (struct Qst_Question *Question)
|
|||
|
||||
/***** Get answer type *****/
|
||||
Question->Answer.Type = (Qst_AnswerType_t)
|
||||
Par_GetParToUnsignedLong ("AnswerType",
|
||||
Par_GetParUnsignedLong ("AnswerType",
|
||||
0,
|
||||
Qst_NUM_ANS_TYPES - 1,
|
||||
(unsigned long) Qst_ANS_UNKNOWN);
|
||||
|
@ -2741,7 +2741,7 @@ void Qst_GetQstFromForm (struct Qst_Question *Question)
|
|||
NumTag++)
|
||||
{
|
||||
snprintf (TagStr,sizeof (TagStr),"TagTxt%u",NumTag);
|
||||
Par_GetParToText (TagStr,Question->Tags.Txt[NumTag],Tag_MAX_BYTES_TAG);
|
||||
Par_GetParText (TagStr,Question->Tags.Txt[NumTag],Tag_MAX_BYTES_TAG);
|
||||
|
||||
if (Question->Tags.Txt[NumTag][0])
|
||||
{
|
||||
|
@ -2760,10 +2760,10 @@ void Qst_GetQstFromForm (struct Qst_Question *Question)
|
|||
}
|
||||
|
||||
/***** Get question stem *****/
|
||||
Par_GetParToHTML ("Stem",Question->Stem,Cns_MAX_BYTES_TEXT);
|
||||
Par_GetParHTML ("Stem",Question->Stem,Cns_MAX_BYTES_TEXT);
|
||||
|
||||
/***** Get question feedback *****/
|
||||
Par_GetParToHTML ("Feedback",Question->Feedback,Cns_MAX_BYTES_TEXT);
|
||||
Par_GetParHTML ("Feedback",Question->Feedback,Cns_MAX_BYTES_TEXT);
|
||||
|
||||
/***** Get media associated to the stem (action, file and title) *****/
|
||||
Question->Media.Width = Qst_IMAGE_SAVED_MAX_WIDTH;
|
||||
|
@ -2785,7 +2785,7 @@ void Qst_GetQstFromForm (struct Qst_Question *Question)
|
|||
/* Abort on error */
|
||||
Ale_ShowAlertsAndExit ();
|
||||
|
||||
Par_GetParToText ("AnsInt",Question->Answer.Options[0].Text,
|
||||
Par_GetParText ("AnsInt",Question->Answer.Options[0].Text,
|
||||
Cns_MAX_DECIMAL_DIGITS_LONG);
|
||||
break;
|
||||
case Qst_ANS_FLOAT:
|
||||
|
@ -2793,24 +2793,24 @@ void Qst_GetQstFromForm (struct Qst_Question *Question)
|
|||
/* Abort on error */
|
||||
Ale_ShowAlertsAndExit ();
|
||||
|
||||
Par_GetParToText ("AnsFloatMin",Question->Answer.Options[0].Text,
|
||||
Par_GetParText ("AnsFloatMin",Question->Answer.Options[0].Text,
|
||||
Qst_MAX_BYTES_FLOAT_ANSWER);
|
||||
|
||||
if (!Qst_AllocateTextChoiceAnswer (Question,1))
|
||||
/* Abort on error */
|
||||
Ale_ShowAlertsAndExit ();
|
||||
|
||||
Par_GetParToText ("AnsFloatMax",Question->Answer.Options[1].Text,
|
||||
Par_GetParText ("AnsFloatMax",Question->Answer.Options[1].Text,
|
||||
Qst_MAX_BYTES_FLOAT_ANSWER);
|
||||
break;
|
||||
case Qst_ANS_TRUE_FALSE:
|
||||
Par_GetParToText ("AnsTF",TF,1);
|
||||
Par_GetParText ("AnsTF",TF,1);
|
||||
Question->Answer.TF = TF[0];
|
||||
break;
|
||||
case Qst_ANS_UNIQUE_CHOICE:
|
||||
case Qst_ANS_MULTIPLE_CHOICE:
|
||||
/* Get shuffle */
|
||||
Question->Answer.Shuffle = Par_GetParToBool ("Shuffle");
|
||||
Question->Answer.Shuffle = Par_GetParBool ("Shuffle");
|
||||
/* falls through */
|
||||
/* no break */
|
||||
case Qst_ANS_TEXT:
|
||||
|
@ -2825,7 +2825,7 @@ void Qst_GetQstFromForm (struct Qst_Question *Question)
|
|||
|
||||
/* Get answer */
|
||||
snprintf (AnsStr,sizeof (AnsStr),"AnsStr%u",NumOpt);
|
||||
Par_GetParToHTML (AnsStr,Question->Answer.Options[NumOpt].Text,
|
||||
Par_GetParHTML (AnsStr,Question->Answer.Options[NumOpt].Text,
|
||||
Qst_MAX_BYTES_ANSWER_OR_FEEDBACK);
|
||||
if (Question->Answer.Type == Qst_ANS_TEXT)
|
||||
/* In order to compare student answer to stored answer,
|
||||
|
@ -2834,7 +2834,7 @@ void Qst_GetQstFromForm (struct Qst_Question *Question)
|
|||
|
||||
/* Get feedback */
|
||||
snprintf (FbStr,sizeof (FbStr),"FbStr%u",NumOpt);
|
||||
Par_GetParToHTML (FbStr,Question->Answer.Options[NumOpt].Feedback,
|
||||
Par_GetParHTML (FbStr,Question->Answer.Options[NumOpt].Feedback,
|
||||
Qst_MAX_BYTES_ANSWER_OR_FEEDBACK);
|
||||
|
||||
/* Get media associated to the answer (action, file and title) */
|
||||
|
@ -2856,7 +2856,7 @@ void Qst_GetQstFromForm (struct Qst_Question *Question)
|
|||
/* Get the numbers of correct answers */
|
||||
if (Question->Answer.Type == Qst_ANS_UNIQUE_CHOICE)
|
||||
{
|
||||
NumCorrectAns = (unsigned) Par_GetParToUnsignedLong ("AnsUni",
|
||||
NumCorrectAns = (unsigned) Par_GetParUnsignedLong ("AnsUni",
|
||||
0,
|
||||
Qst_MAX_OPTIONS_PER_QUESTION - 1,
|
||||
0);
|
||||
|
@ -3334,7 +3334,7 @@ void Qst_RequestRemoveOneQst (void)
|
|||
|
||||
/* Get a parameter that indicates whether it's necessary
|
||||
to continue listing the rest of questions */
|
||||
EditingOnlyThisQst = Par_GetParToBool ("OnlyThisQst");
|
||||
EditingOnlyThisQst = Par_GetParBool ("OnlyThisQst");
|
||||
|
||||
/* Get other parameters */
|
||||
if (!EditingOnlyThisQst)
|
||||
|
@ -3374,7 +3374,7 @@ void Qst_PutParamsRemoveOnlyThisQst (void *QstCod)
|
|||
if (QstCod)
|
||||
{
|
||||
Qst_PutParamQstCod (QstCod);
|
||||
Par_PutHiddenParamChar ("OnlyThisQst",'Y');
|
||||
Par_PutParChar ("OnlyThisQst",'Y');
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3393,7 +3393,7 @@ void Qst_RemoveOneQst (void)
|
|||
|
||||
/***** Get a parameter that indicates whether it's necessary
|
||||
to continue listing the rest of questions ******/
|
||||
EditingOnlyThisQst = Par_GetParToBool ("OnlyThisQst");
|
||||
EditingOnlyThisQst = Par_GetParBool ("OnlyThisQst");
|
||||
|
||||
/***** Remove test question from database *****/
|
||||
Qst_RemoveOneQstFromDB (Gbl.Hierarchy.Crs.CrsCod,QstCod);
|
||||
|
@ -3445,10 +3445,10 @@ void Qst_ChangeShuffleQst (void)
|
|||
Questions.Question.QstCod = Par_GetAndCheckParCode (Par_QstCod);
|
||||
|
||||
/***** Get a parameter that indicates whether it's necessary to continue listing the rest of questions ******/
|
||||
EditingOnlyThisQst = Par_GetParToBool ("OnlyThisQst");
|
||||
EditingOnlyThisQst = Par_GetParBool ("OnlyThisQst");
|
||||
|
||||
/***** Get a parameter that indicates whether it's possible to shuffle the answers of this question ******/
|
||||
Shuffle = Par_GetParToBool ("Shuffle");
|
||||
Shuffle = Par_GetParBool ("Shuffle");
|
||||
|
||||
/***** Update the question changing the current shuffle *****/
|
||||
Qst_DB_UpdateQstShuffle (Questions.Question.QstCod,Shuffle);
|
||||
|
@ -3478,7 +3478,7 @@ void Qst_PutParamQstCod (void *QstCod) // Should be a pointer to long
|
|||
|
||||
if (QstCod)
|
||||
if (*((long *) QstCod) > 0) // If question exists
|
||||
Par_PutHiddenParamLong (NULL,Par_CodeStr[Par_QstCod],*((long *) QstCod));
|
||||
Par_PutParLong (NULL,Par_CodeStr[Par_QstCod],*((long *) QstCod));
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
|
@ -92,8 +92,8 @@ static void QstImp_PutParamsExportQsts (void *Questions)
|
|||
if (Questions)
|
||||
{
|
||||
Qst_PutParamsEditQst (Questions);
|
||||
Par_PutHiddenParamChar ("OnlyThisQst",'N');
|
||||
Par_PutHiddenParamUnsigned (NULL,"Order",(unsigned) (((struct Qst_Questions *) Questions)->SelectedOrder));
|
||||
Par_PutParChar ("OnlyThisQst",'N');
|
||||
Par_PutParUnsigned (NULL,"Order",(unsigned) (((struct Qst_Questions *) Questions)->SelectedOrder));
|
||||
QstImp_PutCreateXMLParam ();
|
||||
}
|
||||
}
|
||||
|
@ -104,12 +104,12 @@ static void QstImp_PutParamsExportQsts (void *Questions)
|
|||
|
||||
static void QstImp_PutCreateXMLParam (void)
|
||||
{
|
||||
Par_PutHiddenParamChar ("CreateXML",'Y');
|
||||
Par_PutParChar ("CreateXML",'Y');
|
||||
}
|
||||
|
||||
bool QstImp_GetCreateXMLParamFromForm (void)
|
||||
{
|
||||
return Par_GetParToBool ("CreateXML");
|
||||
return Par_GetParBool ("CreateXML");
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
|
@ -442,19 +442,19 @@ void Rec_ReceiveFormField (void)
|
|||
|
||||
/***** Get parameters from the form *****/
|
||||
/* Get the name of the field */
|
||||
Par_GetParToText ("FieldName",Gbl.Crs.Records.Field.Name,
|
||||
Par_GetParText ("FieldName",Gbl.Crs.Records.Field.Name,
|
||||
Rec_MAX_BYTES_NAME_FIELD);
|
||||
|
||||
/* Get the number of lines */
|
||||
Gbl.Crs.Records.Field.NumLines = (unsigned)
|
||||
Par_GetParToUnsignedLong ("NumLines",
|
||||
Par_GetParUnsignedLong ("NumLines",
|
||||
Rec_MIN_LINES_IN_EDITION_FIELD,
|
||||
Rec_MAX_LINES_IN_EDITION_FIELD,
|
||||
Rec_DEF_LINES_IN_EDITION_FIELD);
|
||||
|
||||
/* Get the field visibility by students */
|
||||
Gbl.Crs.Records.Field.Visibility = (Rec_VisibilityRecordFields_t)
|
||||
Par_GetParToUnsignedLong ("Visibility",
|
||||
Par_GetParUnsignedLong ("Visibility",
|
||||
0,
|
||||
Rec_NUM_TYPES_VISIBILITY - 1,
|
||||
(unsigned long) Rec_VISIBILITY_DEFAULT);
|
||||
|
@ -569,7 +569,7 @@ void Rec_ReqRemField (void)
|
|||
long Rec_GetFieldCod (void)
|
||||
{
|
||||
/***** Get the code of the field *****/
|
||||
return Par_GetParToLong ("FieldCod");
|
||||
return Par_GetParLong ("FieldCod");
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -634,7 +634,7 @@ void Rec_RemoveFieldFromDB (void)
|
|||
static void Rec_PutParamFieldCod (void *FieldCod)
|
||||
{
|
||||
if (FieldCod)
|
||||
Par_PutHiddenParamLong (NULL,"FieldCod",*((long *) FieldCod));
|
||||
Par_PutParLong (NULL,"FieldCod",*((long *) FieldCod));
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -702,7 +702,7 @@ void Rec_RenameField (void)
|
|||
Err_WrongRecordFieldExit ();
|
||||
|
||||
/* Get the new group name */
|
||||
Par_GetParToText ("FieldName",NewFieldName,Rec_MAX_BYTES_NAME_FIELD);
|
||||
Par_GetParText ("FieldName",NewFieldName,Rec_MAX_BYTES_NAME_FIELD);
|
||||
|
||||
/***** Get from the database the old field name *****/
|
||||
Rec_GetFieldByCod (Gbl.Crs.Records.Field.FieldCod,
|
||||
|
@ -760,7 +760,7 @@ void Rec_ChangeLinesField (void)
|
|||
|
||||
/* Get the new number of lines */
|
||||
NewNumLines = (unsigned)
|
||||
Par_GetParToUnsignedLong ("NumLines",
|
||||
Par_GetParUnsignedLong ("NumLines",
|
||||
Rec_MIN_LINES_IN_EDITION_FIELD,
|
||||
Rec_MAX_LINES_IN_EDITION_FIELD,
|
||||
Rec_DEF_LINES_IN_EDITION_FIELD);
|
||||
|
@ -805,7 +805,7 @@ void Rec_ChangeVisibilityField (void)
|
|||
|
||||
/* Get the new visibility of the field */
|
||||
NewVisibility = (Rec_VisibilityRecordFields_t)
|
||||
Par_GetParToUnsignedLong ("Visibility",
|
||||
Par_GetParUnsignedLong ("Visibility",
|
||||
0,
|
||||
Rec_NUM_TYPES_VISIBILITY - 1,
|
||||
(unsigned long) Rec_VISIBILITY_DEFAULT);
|
||||
|
@ -1236,8 +1236,8 @@ static void Rec_ShowRecordOneTchCrs (void)
|
|||
Usr_CreateListSelectedUsrsCodsAndFillWithOtherUsr (&Gbl.Usrs.Selected);
|
||||
Usr_PutHiddenParSelectedUsrsCods (&Gbl.Usrs.Selected);
|
||||
Usr_FreeListsSelectedEncryptedUsrsCods (&Gbl.Usrs.Selected);
|
||||
Par_PutHiddenParamChar ("ParamOfficeHours",'Y');
|
||||
Par_PutHiddenParamChar ("ShowOfficeHours",ShowOfficeHours ? 'Y' :
|
||||
Par_PutParChar ("ParamOfficeHours",'Y');
|
||||
Par_PutParChar ("ShowOfficeHours",ShowOfficeHours ? 'Y' :
|
||||
'N');
|
||||
Rec_ShowLinkToPrintPreviewOfRecords ();
|
||||
Frm_EndForm ();
|
||||
|
@ -1324,8 +1324,8 @@ static void Rec_ListRecordsTchs (Rec_SharedRecordViewType_t TypeOfView)
|
|||
/* Print view */
|
||||
Frm_BeginForm (ActPrnRecSevTch);
|
||||
Usr_PutHiddenParSelectedUsrsCods (&Gbl.Usrs.Selected);
|
||||
Par_PutHiddenParamChar ("ParamOfficeHours",'Y');
|
||||
Par_PutHiddenParamChar ("ShowOfficeHours",
|
||||
Par_PutParChar ("ParamOfficeHours",'Y');
|
||||
Par_PutParChar ("ShowOfficeHours",
|
||||
ShowOfficeHours ? 'Y' :
|
||||
'N');
|
||||
Rec_ShowLinkToPrintPreviewOfRecords ();
|
||||
|
@ -1440,7 +1440,7 @@ static void Rec_ShowLinkToPrintPreviewOfRecords (void)
|
|||
static void Rec_GetParamRecordsPerPage (void)
|
||||
{
|
||||
Gbl.Usrs.Listing.RecsPerPag = (unsigned)
|
||||
Par_GetParToUnsignedLong ("RecsPerPag",
|
||||
Par_GetParUnsignedLong ("RecsPerPag",
|
||||
Rec_MIN_RECORDS_PER_PAGE,
|
||||
Rec_MAX_RECORDS_PER_PAGE,
|
||||
Rec_DEF_RECORDS_PER_PAGE);
|
||||
|
@ -1477,13 +1477,13 @@ static void Rec_WriteFormShowOfficeHoursSeveralTchs (bool ShowOfficeHours)
|
|||
static void Rec_PutParamsShowOfficeHoursOneTch (void)
|
||||
{
|
||||
Usr_PutParamOtherUsrCodEncrypted (Gbl.Usrs.Other.UsrDat.EnUsrCod);
|
||||
Par_PutHiddenParamChar ("ParamOfficeHours",'Y');
|
||||
Par_PutParChar ("ParamOfficeHours",'Y');
|
||||
}
|
||||
|
||||
static void Rec_PutParamsShowOfficeHoursSeveralTchs (void)
|
||||
{
|
||||
Usr_PutHiddenParSelectedUsrsCods (&Gbl.Usrs.Selected);
|
||||
Par_PutHiddenParamChar ("ParamOfficeHours",'Y');
|
||||
Par_PutParChar ("ParamOfficeHours",'Y');
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -1493,8 +1493,8 @@ static void Rec_PutParamsShowOfficeHoursSeveralTchs (void)
|
|||
|
||||
static bool Rec_GetParamShowOfficeHours (void)
|
||||
{
|
||||
if (Par_GetParToBool ("ParamOfficeHours"))
|
||||
return Par_GetParToBool ("ShowOfficeHours");
|
||||
if (Par_GetParBool ("ParamOfficeHours"))
|
||||
return Par_GetParBool ("ShowOfficeHours");
|
||||
|
||||
return Rec_SHOW_OFFICE_HOURS_DEFAULT;
|
||||
}
|
||||
|
@ -1534,7 +1534,7 @@ void Rec_UpdateAndShowOtherCrsRecord (void)
|
|||
long OriginalActCod;
|
||||
|
||||
/***** Get where we came from *****/
|
||||
OriginalActCod = Par_GetParToLong ("OriginalActCod");
|
||||
OriginalActCod = Par_GetParLong ("OriginalActCod");
|
||||
Gbl.Action.Original = Act_GetActionFromActCod (OriginalActCod);
|
||||
|
||||
/***** Get the user whose record we want to modify *****/
|
||||
|
@ -1650,7 +1650,7 @@ static void Rec_ShowCrsRecord (Rec_CourseRecordViewType_t TypeOfView,
|
|||
{
|
||||
ICanEdit = true;
|
||||
Frm_BeginFormAnchor (ActRcvRecOthUsr,Anchor);
|
||||
Par_PutHiddenParamLong (NULL,"OriginalActCod",
|
||||
Par_PutParLong (NULL,"OriginalActCod",
|
||||
Act_GetActCod (ActSeeRecSevStd)); // Original action, used to know where we came from
|
||||
Usr_PutParamUsrCodEncrypted (UsrDat->EnUsrCod);
|
||||
if (TypeOfView == Rec_CRS_LIST_SEVERAL_RECORDS)
|
||||
|
@ -1819,7 +1819,7 @@ void Rec_GetFieldsCrsRecordFromForm (void)
|
|||
/* Get text from the form */
|
||||
snprintf (FieldParamName,sizeof (FieldParamName),"Field%ld",
|
||||
Gbl.Crs.Records.LstFields.Lst[NumField].FieldCod);
|
||||
Par_GetParToHTML (FieldParamName,Gbl.Crs.Records.LstFields.Lst[NumField].Text,Cns_MAX_BYTES_TEXT);
|
||||
Par_GetParHTML (FieldParamName,Gbl.Crs.Records.LstFields.Lst[NumField].Text,Cns_MAX_BYTES_TEXT);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2514,14 +2514,14 @@ static void Rec_PutParamsStdTsts (__attribute__((unused)) void *Args)
|
|||
static void Rec_PutParamsWorks (__attribute__((unused)) void *Args)
|
||||
{
|
||||
Rec_PutParamsStudent (NULL);
|
||||
Par_PutHiddenParamChar ("FullTree",'Y'); // By default, show all files
|
||||
Par_PutParChar ("FullTree",'Y'); // By default, show all files
|
||||
Gbl.FileBrowser.FullTree = true;
|
||||
Brw_PutHiddenParamFullTreeIfSelected (&Gbl.FileBrowser.FullTree);
|
||||
}
|
||||
|
||||
static void Rec_PutParamsStudent (__attribute__((unused)) void *Args)
|
||||
{
|
||||
Par_PutHiddenParamString (NULL,"UsrCodStd",Rec_Record.UsrDat->EnUsrCod);
|
||||
Par_PutParString (NULL,"UsrCodStd",Rec_Record.UsrDat->EnUsrCod);
|
||||
Grp_PutParamAllGroups ();
|
||||
}
|
||||
|
||||
|
@ -2529,7 +2529,7 @@ static void Rec_PutParamsMsgUsr (__attribute__((unused)) void *Args)
|
|||
{
|
||||
Rec_PutParamUsrCodEncrypted (NULL);
|
||||
Grp_PutParamAllGroups ();
|
||||
Par_PutHiddenParamChar ("ShowOnlyOneRecipient",'Y');
|
||||
Par_PutParChar ("ShowOnlyOneRecipient",'Y');
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -3564,7 +3564,7 @@ Rol_Role_t Rec_GetRoleFromRecordForm (void)
|
|||
|
||||
/***** Get role as a parameter from form *****/
|
||||
Role = (Rol_Role_t)
|
||||
Par_GetParToUnsignedLong ("Role",
|
||||
Par_GetParUnsignedLong ("Role",
|
||||
0,
|
||||
Rol_NUM_ROLES - 1,
|
||||
(unsigned long) Rol_UNK);
|
||||
|
@ -3615,18 +3615,18 @@ void Rec_GetUsrNameFromRecordForm (struct Usr_Data *UsrDat)
|
|||
char FrstName[Usr_MAX_BYTES_FIRSTNAME_OR_SURNAME + 1]; // Temporary first name
|
||||
|
||||
/***** Get surname 1 *****/
|
||||
Par_GetParToText ("Surname1",Surname1,Usr_MAX_BYTES_FIRSTNAME_OR_SURNAME);
|
||||
Par_GetParText ("Surname1",Surname1,Usr_MAX_BYTES_FIRSTNAME_OR_SURNAME);
|
||||
Str_ConvertToTitleType (Surname1);
|
||||
// Surname 1 is mandatory, so avoid overwriting surname 1 with empty string
|
||||
if (Surname1[0]) // New surname 1 not empty
|
||||
Str_Copy (UsrDat->Surname1,Surname1,sizeof (UsrDat->Surname1) - 1);
|
||||
|
||||
/***** Get surname 2 *****/
|
||||
Par_GetParToText ("Surname2",UsrDat->Surname2,Usr_MAX_BYTES_FIRSTNAME_OR_SURNAME);
|
||||
Par_GetParText ("Surname2",UsrDat->Surname2,Usr_MAX_BYTES_FIRSTNAME_OR_SURNAME);
|
||||
Str_ConvertToTitleType (UsrDat->Surname2);
|
||||
|
||||
/***** Get first name *****/
|
||||
Par_GetParToText ("FirstName",FrstName,Usr_MAX_BYTES_FIRSTNAME_OR_SURNAME);
|
||||
Par_GetParText ("FirstName",FrstName,Usr_MAX_BYTES_FIRSTNAME_OR_SURNAME);
|
||||
Str_ConvertToTitleType (FrstName);
|
||||
// First name is mandatory, so avoid overwriting first name with empty string
|
||||
if (FrstName[0]) // New first name not empty
|
||||
|
@ -3640,7 +3640,7 @@ static void Rec_GetUsrExtraDataFromRecordForm (struct Usr_Data *UsrDat)
|
|||
{
|
||||
/***** Get sex from form *****/
|
||||
UsrDat->Sex = (Usr_Sex_t)
|
||||
Par_GetParToUnsignedLong ("Sex",
|
||||
Par_GetParUnsignedLong ("Sex",
|
||||
(unsigned long) Usr_SEX_FEMALE,
|
||||
(unsigned long) Usr_SEX_MALE,
|
||||
(unsigned long) Usr_SEX_UNKNOWN);
|
||||
|
@ -3654,8 +3654,8 @@ static void Rec_GetUsrExtraDataFromRecordForm (struct Usr_Data *UsrDat)
|
|||
&(UsrDat->Birthday.Year ));
|
||||
Dat_ConvDateToDateStr (&(UsrDat->Birthday),UsrDat->StrBirthday);
|
||||
|
||||
Par_GetParToText ("Phone0",UsrDat->Phone[0],Usr_MAX_BYTES_PHONE);
|
||||
Par_GetParToText ("Phone1",UsrDat->Phone[1],Usr_MAX_BYTES_PHONE);
|
||||
Par_GetParText ("Phone0",UsrDat->Phone[0],Usr_MAX_BYTES_PHONE);
|
||||
Par_GetParText ("Phone1",UsrDat->Phone[1],Usr_MAX_BYTES_PHONE);
|
||||
|
||||
Rec_GetUsrCommentsFromForm (UsrDat);
|
||||
}
|
||||
|
@ -3671,7 +3671,7 @@ static void Rec_GetUsrCommentsFromForm (struct Usr_Data *UsrDat)
|
|||
Err_ShowErrorAndExit ("Can not read comments of a user.");
|
||||
|
||||
/***** Get the parameter with the comments *****/
|
||||
Par_GetParToHTML ("Comments",UsrDat->Comments,Cns_MAX_BYTES_TEXT);
|
||||
Par_GetParHTML ("Comments",UsrDat->Comments,Cns_MAX_BYTES_TEXT);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -4123,7 +4123,7 @@ void Rec_UpdateMyDepartment (void)
|
|||
void Rec_UpdateMyOffice (void)
|
||||
{
|
||||
/***** Get my office *****/
|
||||
Par_GetParToText ("Office",Gbl.Usrs.Me.UsrDat.Tch.Office,Usr_MAX_BYTES_ADDRESS);
|
||||
Par_GetParText ("Office",Gbl.Usrs.Me.UsrDat.Tch.Office,Usr_MAX_BYTES_ADDRESS);
|
||||
|
||||
/***** Update office *****/
|
||||
Usr_DB_UpdateMyOffice ();
|
||||
|
@ -4139,7 +4139,7 @@ void Rec_UpdateMyOffice (void)
|
|||
void Rec_UpdateMyOfficePhone (void)
|
||||
{
|
||||
/***** Get my office *****/
|
||||
Par_GetParToText ("OfficePhone",Gbl.Usrs.Me.UsrDat.Tch.OfficePhone,Usr_MAX_BYTES_PHONE);
|
||||
Par_GetParText ("OfficePhone",Gbl.Usrs.Me.UsrDat.Tch.OfficePhone,Usr_MAX_BYTES_PHONE);
|
||||
|
||||
/***** Update office phone *****/
|
||||
Usr_DB_UpdateMyOfficePhone ();
|
||||
|
|
|
@ -511,7 +511,7 @@ void Rol_ChangeMyRole (void)
|
|||
|
||||
/***** Get parameter with the new logged role ******/
|
||||
NewRole = (Rol_Role_t)
|
||||
Par_GetParToUnsignedLong ("MyRole",
|
||||
Par_GetParUnsignedLong ("MyRole",
|
||||
0,
|
||||
Rol_NUM_ROLES - 1,
|
||||
(unsigned long) Rol_UNK);
|
||||
|
@ -574,7 +574,7 @@ void Rol_WriteSelectorRoles (unsigned RolesAllowed,unsigned RolesSelected,
|
|||
|
||||
void Rol_PutHiddenParamRoles (unsigned Roles)
|
||||
{
|
||||
Par_PutHiddenParamUnsigned (NULL,"Roles",Roles);
|
||||
Par_PutParUnsigned (NULL,"Roles",Roles);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -591,7 +591,7 @@ unsigned Rol_GetSelectedRoles (void)
|
|||
|
||||
/***** Try to get param "Roles" with multiple roles *****/
|
||||
Roles = (unsigned)
|
||||
Par_GetParToUnsignedLong ("Roles",
|
||||
Par_GetParUnsignedLong ("Roles",
|
||||
0, // 000...000
|
||||
(1 << Rol_NUM_ROLES) - 1, // 111...111
|
||||
0); // 000...000
|
||||
|
|
24
swad_room.c
24
swad_room.c
|
@ -186,7 +186,7 @@ void Roo_SeeRooms (void)
|
|||
{
|
||||
HTM_TH_Begin (HTM_HEAD_LEFT);
|
||||
Frm_BeginForm (ActSeeRoo);
|
||||
Par_PutHiddenParamUnsigned (NULL,"Order",(unsigned) Order);
|
||||
Par_PutParUnsigned (NULL,"Order",(unsigned) Order);
|
||||
HTM_BUTTON_Submit_Begin (Txt_ROOMS_HELP_ORDER[Order],
|
||||
"class=\"BT_LINK\"");
|
||||
if (Order == Rooms.SelectedOrder)
|
||||
|
@ -347,7 +347,7 @@ void Roo_ChangeMAC (void)
|
|||
|
||||
/***** Get parameters from form *****/
|
||||
/* Get room code */
|
||||
if ((Roo_EditingRoom->RooCod = Par_GetParToLong ("Cod")) <= 0)
|
||||
if ((Roo_EditingRoom->RooCod = Par_GetParLong ("Cod")) <= 0)
|
||||
Err_WrongRoomExit ();
|
||||
|
||||
/* Get the old MAC address of the room */
|
||||
|
@ -375,7 +375,7 @@ void Roo_ChangeMAC (void)
|
|||
|
||||
static Roo_Order_t Roo_GetParamRoomOrder (void)
|
||||
{
|
||||
return (Roo_Order_t) Par_GetParToUnsignedLong ("Order",
|
||||
return (Roo_Order_t) Par_GetParUnsignedLong ("Order",
|
||||
0,
|
||||
Roo_NUM_ORDERS - 1,
|
||||
(unsigned long) Roo_ORDER_DEFAULT);
|
||||
|
@ -848,7 +848,7 @@ static void Roo_PutSelectorType (Roo_RoomType_t RoomType,
|
|||
static void Roo_PutParamRooCod (void *RooCod)
|
||||
{
|
||||
if (RooCod)
|
||||
Par_PutHiddenParamLong (NULL,"RooCod",*((long *) RooCod));
|
||||
Par_PutParLong (NULL,"RooCod",*((long *) RooCod));
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -858,7 +858,7 @@ static void Roo_PutParamRooCod (void *RooCod)
|
|||
long Roo_GetParamRooCod (void)
|
||||
{
|
||||
/***** Get code of room *****/
|
||||
return Par_GetParToLong ("RooCod");
|
||||
return Par_GetParLong ("RooCod");
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -868,7 +868,7 @@ long Roo_GetParamRooCod (void)
|
|||
static int Roo_GetParamFloor (void)
|
||||
{
|
||||
/***** Get floor *****/
|
||||
return (int) Par_GetParToLong ("Floor");
|
||||
return (int) Par_GetParLong ("Floor");
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -880,7 +880,7 @@ static Roo_RoomType_t Roo_GetParamType (void)
|
|||
long TypeLong;
|
||||
|
||||
/***** Get type string *****/
|
||||
TypeLong = Par_GetParToLong ("Type");
|
||||
TypeLong = Par_GetParLong ("Type");
|
||||
if (TypeLong >= 0 && TypeLong < Roo_NUM_TYPES)
|
||||
return (Roo_RoomType_t) TypeLong; // Correc type
|
||||
|
||||
|
@ -1124,7 +1124,7 @@ static void Roo_RenameRoom (Cns_ShrtOrFullName_t ShrtOrFullName)
|
|||
Err_WrongRoomExit ();
|
||||
|
||||
/* Get the new name for the room */
|
||||
Par_GetParToText (ParamName,NewClaName,MaxBytes);
|
||||
Par_GetParText (ParamName,NewClaName,MaxBytes);
|
||||
|
||||
/***** Get from the database the old names of the room *****/
|
||||
Roo_GetDataOfRoomByCod (Roo_EditingRoom);
|
||||
|
@ -1186,7 +1186,7 @@ void Roo_ChangeCapacity (void)
|
|||
|
||||
/* Get the seating capacity of the room */
|
||||
NewCapacity = (unsigned)
|
||||
Par_GetParToUnsignedLong ("Capacity",
|
||||
Par_GetParUnsignedLong ("Capacity",
|
||||
0,
|
||||
Roo_MAX_CAPACITY,
|
||||
Roo_UNLIMITED_CAPACITY);
|
||||
|
@ -1391,12 +1391,12 @@ void Roo_ReceiveFormNewRoom (void)
|
|||
Roo_EditingRoom->Type = Roo_GetParamType ();
|
||||
|
||||
/* Get room short name and full name */
|
||||
Par_GetParToText ("ShortName",Roo_EditingRoom->ShrtName,Roo_MAX_BYTES_SHRT_NAME);
|
||||
Par_GetParToText ("FullName" ,Roo_EditingRoom->FullName,Roo_MAX_BYTES_FULL_NAME);
|
||||
Par_GetParText ("ShortName",Roo_EditingRoom->ShrtName,Roo_MAX_BYTES_SHRT_NAME);
|
||||
Par_GetParText ("FullName" ,Roo_EditingRoom->FullName,Roo_MAX_BYTES_FULL_NAME);
|
||||
|
||||
/* Get seating capacity */
|
||||
Roo_EditingRoom->Capacity = (unsigned)
|
||||
Par_GetParToUnsignedLong ("Capacity",
|
||||
Par_GetParUnsignedLong ("Capacity",
|
||||
0,
|
||||
Roo_MAX_CAPACITY,
|
||||
Roo_UNLIMITED_CAPACITY);
|
||||
|
|
|
@ -495,7 +495,7 @@ void Rub_PutParams (void *Rubrics)
|
|||
void Rub_PutParamRubCod (long RubCod)
|
||||
{
|
||||
if (RubCod > 0)
|
||||
Par_PutHiddenParamLong (NULL,"RubCod",RubCod);
|
||||
Par_PutParLong (NULL,"RubCod",RubCod);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -505,7 +505,7 @@ void Rub_PutParamRubCod (long RubCod)
|
|||
long Rub_GetParamRubCod (void)
|
||||
{
|
||||
/***** Get code of rubric *****/
|
||||
return Par_GetParToLong ("RubCod");
|
||||
return Par_GetParLong ("RubCod");
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -932,10 +932,10 @@ static void Rub_ReceiveRubricFieldsFromForm (struct Rub_Rubric *Rubric,
|
|||
char Txt[Cns_MAX_BYTES_TEXT + 1])
|
||||
{
|
||||
/***** Get rubric title *****/
|
||||
Par_GetParToText ("Title",Rubric->Title,Rub_MAX_BYTES_TITLE);
|
||||
Par_GetParText ("Title",Rubric->Title,Rub_MAX_BYTES_TITLE);
|
||||
|
||||
/***** Get rubric text *****/
|
||||
Par_GetParToHTML ("Txt",Txt,Cns_MAX_BYTES_TEXT); // Store in HTML format (not rigorous)
|
||||
Par_GetParHTML ("Txt",Txt,Cns_MAX_BYTES_TEXT); // Store in HTML format (not rigorous)
|
||||
}
|
||||
|
||||
static bool Rub_CheckRubricFieldsReceivedFromForm (const struct Rub_Rubric *Rubric)
|
||||
|
|
|
@ -81,7 +81,7 @@ void RubCri_PutParamCriCod (void *CriCod) // Should be a pointer to long
|
|||
{
|
||||
if (CriCod)
|
||||
if (*((long *) CriCod) > 0) // If criterion exists
|
||||
Par_PutHiddenParamLong (NULL,"CriCod",*((long *) CriCod));
|
||||
Par_PutParLong (NULL,"CriCod",*((long *) CriCod));
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -234,7 +234,7 @@ void RubCri_PutButtonToAddNewCriterion (struct Rub_Rubrics *Rubrics)
|
|||
|
||||
void RubCri_PutParamCriInd (unsigned CriInd)
|
||||
{
|
||||
Par_PutHiddenParamUnsigned (NULL,"CriInd",CriInd);
|
||||
Par_PutParUnsigned (NULL,"CriInd",CriInd);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -245,7 +245,7 @@ unsigned RubCri_GetParamCriInd (void)
|
|||
{
|
||||
long CriInd;
|
||||
|
||||
if ((CriInd = Par_GetParToLong ("CriInd")) <= 0) // In rubrics, criterion index should be 1, 2, 3...
|
||||
if ((CriInd = Par_GetParLong ("CriInd")) <= 0) // In rubrics, criterion index should be 1, 2, 3...
|
||||
Err_WrongCriterionIndexExit ();
|
||||
|
||||
return (unsigned) CriInd;
|
||||
|
|
|
@ -167,7 +167,7 @@ void Sco_PutParamCurrentScope (void *Scope)
|
|||
|
||||
void Sco_PutParamScope (const char *ParamName,HieLvl_Level_t Scope)
|
||||
{
|
||||
Par_PutHiddenParamUnsigned (NULL,ParamName,(unsigned) Scope);
|
||||
Par_PutParUnsigned (NULL,ParamName,(unsigned) Scope);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -178,7 +178,7 @@ void Sco_GetScope (const char *ParamName)
|
|||
{
|
||||
/***** Get parameter with scope *****/
|
||||
Gbl.Scope.Current = (HieLvl_Level_t)
|
||||
Par_GetParToUnsignedLong (ParamName,
|
||||
Par_GetParUnsignedLong (ParamName,
|
||||
0,
|
||||
HieLvl_NUM_LEVELS - 1,
|
||||
(unsigned long) HieLvl_UNK);
|
||||
|
|
|
@ -306,7 +306,7 @@ void Sch_GetParamWhatToSearch (void)
|
|||
|
||||
/***** Get what to search from form *****/
|
||||
WhatToSearch = (Sch_WhatToSearch_t)
|
||||
Par_GetParToUnsignedLong ("WhatToSearch",
|
||||
Par_GetParUnsignedLong ("WhatToSearch",
|
||||
0,
|
||||
Sch_NUM_WHAT_TO_SEARCH - 1,
|
||||
(unsigned long) Sch_SEARCH_UNKNOWN);
|
||||
|
@ -326,7 +326,7 @@ static void Sch_GetParamSearchStr (void)
|
|||
struct Sch_Search *Search = Sch_GetSearch ();
|
||||
|
||||
/***** Get string to search *****/
|
||||
Par_GetParToText ("Search",Search->Str,Sch_MAX_BYTES_STRING_TO_FIND);
|
||||
Par_GetParText ("Search",Search->Str,Sch_MAX_BYTES_STRING_TO_FIND);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -871,5 +871,5 @@ static void Sch_SaveLastSearchIntoSession (void)
|
|||
void Sch_PutLinkToSearchCoursesParams (__attribute__((unused)) void *Args)
|
||||
{
|
||||
Sco_PutParamScope ("ScopeSch",HieLvl_SYS);
|
||||
Par_PutHiddenParamUnsigned (NULL,"WhatToSearch",(unsigned) Sch_SEARCH_COURSES);
|
||||
Par_PutParUnsigned (NULL,"WhatToSearch",(unsigned) Sch_SEARCH_COURSES);
|
||||
}
|
||||
|
|
|
@ -218,7 +218,7 @@ static void Set_PutIconsToSelectSideCols (void)
|
|||
{
|
||||
Set_BeginPref (SideCols == Gbl.Prefs.SideCols);
|
||||
Frm_BeginForm (ActChgCol);
|
||||
Par_PutHiddenParamUnsigned (NULL,"SideCols",SideCols);
|
||||
Par_PutParUnsigned (NULL,"SideCols",SideCols);
|
||||
snprintf (Icon,sizeof (Icon),"layout%u%u_32x20.gif",
|
||||
SideCols >> 1,SideCols & 1);
|
||||
Ico_PutSettingIconLink (Icon,Ico_UNCHANGED,Txt_LAYOUT_SIDE_COLUMNS[SideCols]);
|
||||
|
@ -263,7 +263,7 @@ void Set_ChangeSideCols (void)
|
|||
|
||||
unsigned Set_GetParamSideCols (void)
|
||||
{
|
||||
return (unsigned) Par_GetParToUnsignedLong ("SideCols",
|
||||
return (unsigned) Par_GetParUnsignedLong ("SideCols",
|
||||
0,
|
||||
Lay_SHOW_BOTH_COLUMNS,
|
||||
Cfg_DEFAULT_COLUMNS);
|
||||
|
@ -339,7 +339,7 @@ static void Set_GetAndUpdateUsrListType (void)
|
|||
|
||||
void Set_PutParamUsrListType (Set_ShowUsrsType_t ListType)
|
||||
{
|
||||
Par_PutHiddenParamUnsigned (NULL,"UsrListType",(unsigned) ListType);
|
||||
Par_PutParUnsigned (NULL,"UsrListType",(unsigned) ListType);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -349,7 +349,7 @@ void Set_PutParamUsrListType (Set_ShowUsrsType_t ListType)
|
|||
static void Set_GetUsrListTypeFromForm (void)
|
||||
{
|
||||
Gbl.Usrs.Me.ListType = (Set_ShowUsrsType_t)
|
||||
Par_GetParToUnsignedLong ("UsrListType",
|
||||
Par_GetParUnsignedLong ("UsrListType",
|
||||
0,
|
||||
Set_NUM_USR_LIST_TYPES - 1,
|
||||
(unsigned long) Set_USR_LIST_UNKNOWN);
|
||||
|
@ -447,7 +447,7 @@ void Set_GetMyColsClassPhotoFromDB (void)
|
|||
|
||||
void Set_PutParamColsClassPhoto (void)
|
||||
{
|
||||
Par_PutHiddenParamUnsigned (NULL,"ColsClassPhoto",Gbl.Usrs.ClassPhoto.Cols);
|
||||
Par_PutParUnsigned (NULL,"ColsClassPhoto",Gbl.Usrs.ClassPhoto.Cols);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -457,7 +457,7 @@ void Set_PutParamColsClassPhoto (void)
|
|||
static void Set_GetParamColsClassPhotoFromForm (void)
|
||||
{
|
||||
Gbl.Usrs.ClassPhoto.Cols = (unsigned)
|
||||
Par_GetParToUnsignedLong ("ColsClassPhoto",
|
||||
Par_GetParUnsignedLong ("ColsClassPhoto",
|
||||
1,
|
||||
Usr_CLASS_PHOTO_COLS_MAX,
|
||||
0);
|
||||
|
@ -485,8 +485,8 @@ static void Set_GetAndUpdatePrefAboutListWithPhotos (void)
|
|||
|
||||
void Set_PutParamListWithPhotos (void)
|
||||
{
|
||||
Par_PutHiddenParamChar ("WithPhotosExists",'Y');
|
||||
Par_PutHiddenParamChar ("WithPhotos",
|
||||
Par_PutParChar ("WithPhotosExists",'Y');
|
||||
Par_PutParChar ("WithPhotos",
|
||||
Gbl.Usrs.Listing.WithPhotos ? 'Y' :
|
||||
'N');
|
||||
}
|
||||
|
@ -498,10 +498,10 @@ void Set_PutParamListWithPhotos (void)
|
|||
static bool Set_GetParamListWithPhotosFromForm (void)
|
||||
{
|
||||
/***** Get if exists parameter with preference about photos in users' list *****/
|
||||
if (Par_GetParToBool ("WithPhotosExists"))
|
||||
if (Par_GetParBool ("WithPhotosExists"))
|
||||
{
|
||||
/***** Parameter with preference about photos in users' list exists, so get it *****/
|
||||
Gbl.Usrs.Listing.WithPhotos = Par_GetParToBool ("WithPhotos");
|
||||
Gbl.Usrs.Listing.WithPhotos = Par_GetParBool ("WithPhotos");
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -293,8 +293,8 @@ static void Sta_PutFormCrsHits (struct Sta_Stats *Stats)
|
|||
Frm_BeginFormAnchor (ActSeeAccCrs,Sta_STAT_RESULTS_SECTION_ID);
|
||||
|
||||
Grp_PutParamsCodGrps ();
|
||||
Par_PutHiddenParamLong (NULL,"FirstRow",0);
|
||||
Par_PutHiddenParamLong (NULL,"LastRow",0);
|
||||
Par_PutParLong (NULL,"FirstRow",0);
|
||||
Par_PutParLong (NULL,"LastRow",0);
|
||||
|
||||
/***** Put list of users to select some of them *****/
|
||||
HTM_TABLE_BeginCenterPadding (2);
|
||||
|
@ -766,7 +766,7 @@ static void Sta_ShowHits (Sta_GlobalOrCourseAccesses_t GlobalOrCourse)
|
|||
|
||||
/***** Get the type of stat of clicks ******/
|
||||
DetailedOrGrouped = (Sta_ClicksDetailedOrGrouped_t)
|
||||
Par_GetParToUnsignedLong ("GroupedOrDetailed",
|
||||
Par_GetParUnsignedLong ("GroupedOrDetailed",
|
||||
0,
|
||||
Sta_NUM_CLICKS_DETAILED_OR_GROUPED - 1,
|
||||
(unsigned long) Sta_CLICKS_DETAILED_OR_GROUPED_DEFAULT);
|
||||
|
@ -775,7 +775,7 @@ static void Sta_ShowHits (Sta_GlobalOrCourseAccesses_t GlobalOrCourse)
|
|||
Stats.ClicksGroupedBy = Sta_CLICKS_CRS_DETAILED_LIST;
|
||||
else // DetailedOrGrouped == Sta_CLICKS_GROUPED
|
||||
Stats.ClicksGroupedBy = (Sta_ClicksGroupedBy_t)
|
||||
Par_GetParToUnsignedLong ("GroupedBy",
|
||||
Par_GetParUnsignedLong ("GroupedBy",
|
||||
0,
|
||||
Sta_NUM_CLICKS_GROUPED_BY - 1,
|
||||
(unsigned long) Sta_CLICKS_GROUPED_BY_DEFAULT);
|
||||
|
@ -783,14 +783,14 @@ static void Sta_ShowHits (Sta_GlobalOrCourseAccesses_t GlobalOrCourse)
|
|||
/***** Get the type of count of clicks *****/
|
||||
if (Stats.ClicksGroupedBy != Sta_CLICKS_CRS_DETAILED_LIST)
|
||||
Stats.CountType = (Sta_CountType_t)
|
||||
Par_GetParToUnsignedLong ("CountType",
|
||||
Par_GetParUnsignedLong ("CountType",
|
||||
0,
|
||||
Sta_NUM_COUNT_TYPES - 1,
|
||||
(unsigned long) Sta_COUNT_TYPE_DEFAULT);
|
||||
|
||||
/***** Get action *****/
|
||||
Stats.NumAction = (Act_Action_t)
|
||||
Par_GetParToUnsignedLong ("StatAct",
|
||||
Par_GetParUnsignedLong ("StatAct",
|
||||
0,
|
||||
ActLst_NUM_ACTIONS - 1,
|
||||
(unsigned long) Sta_NUM_ACTION_DEFAULT);
|
||||
|
@ -800,7 +800,7 @@ static void Sta_ShowHits (Sta_GlobalOrCourseAccesses_t GlobalOrCourse)
|
|||
case Sta_SHOW_GLOBAL_ACCESSES:
|
||||
/***** Get the type of user of clicks *****/
|
||||
Stats.Role = (Sta_Role_t)
|
||||
Par_GetParToUnsignedLong ("Role",
|
||||
Par_GetParUnsignedLong ("Role",
|
||||
0,
|
||||
Sta_NUM_ROLES_STAT - 1,
|
||||
(unsigned long) Sta_ROLE_DEFAULT);
|
||||
|
@ -836,20 +836,20 @@ static void Sta_ShowHits (Sta_GlobalOrCourseAccesses_t GlobalOrCourse)
|
|||
if (Stats.ClicksGroupedBy == Sta_CLICKS_CRS_DETAILED_LIST)
|
||||
{
|
||||
/****** Get the number of the first row to show ******/
|
||||
Stats.FirstRow = Par_GetParToUnsignedLong ("FirstRow",
|
||||
Stats.FirstRow = Par_GetParUnsignedLong ("FirstRow",
|
||||
1,
|
||||
ULONG_MAX,
|
||||
0);
|
||||
|
||||
/****** Get the number of the last row to show ******/
|
||||
Stats.LastRow = Par_GetParToUnsignedLong ("LastRow",
|
||||
Stats.LastRow = Par_GetParUnsignedLong ("LastRow",
|
||||
1,
|
||||
ULONG_MAX,
|
||||
0);
|
||||
|
||||
/****** Get the number of rows per page ******/
|
||||
Stats.RowsPerPage =
|
||||
(unsigned) Par_GetParToUnsignedLong ("RowsPage",
|
||||
(unsigned) Par_GetParUnsignedLong ("RowsPage",
|
||||
Sta_MIN_ROWS_PER_PAGE,
|
||||
Sta_MAX_ROWS_PER_PAGE,
|
||||
Sta_DEF_ROWS_PER_PAGE);
|
||||
|
@ -1115,11 +1115,11 @@ static void Sta_ShowDetailedAccessesList (const struct Sta_Stats *Stats,
|
|||
{
|
||||
Frm_BeginFormAnchor (ActSeeAccCrs,Sta_STAT_RESULTS_SECTION_ID);
|
||||
Dat_WriteParamsIniEndDates ();
|
||||
Par_PutHiddenParamUnsigned (NULL,"GroupedBy",(unsigned) Sta_CLICKS_CRS_DETAILED_LIST);
|
||||
Par_PutHiddenParamUnsigned (NULL,"StatAct" ,(unsigned) Stats->NumAction);
|
||||
Par_PutHiddenParamLong (NULL,"FirstRow",FirstRow - Stats->RowsPerPage);
|
||||
Par_PutHiddenParamLong (NULL,"LastRow" ,FirstRow - 1);
|
||||
Par_PutHiddenParamUnsigned (NULL,"RowsPage",Stats->RowsPerPage);
|
||||
Par_PutParUnsigned (NULL,"GroupedBy",(unsigned) Sta_CLICKS_CRS_DETAILED_LIST);
|
||||
Par_PutParUnsigned (NULL,"StatAct" ,(unsigned) Stats->NumAction);
|
||||
Par_PutParLong (NULL,"FirstRow",FirstRow - Stats->RowsPerPage);
|
||||
Par_PutParLong (NULL,"LastRow" ,FirstRow - 1);
|
||||
Par_PutParUnsigned (NULL,"RowsPage",Stats->RowsPerPage);
|
||||
Usr_PutHiddenParSelectedUsrsCods (&Gbl.Usrs.Selected);
|
||||
}
|
||||
HTM_TH_Begin (HTM_HEAD_LEFT);
|
||||
|
@ -1149,11 +1149,11 @@ static void Sta_ShowDetailedAccessesList (const struct Sta_Stats *Stats,
|
|||
{
|
||||
Frm_BeginFormAnchor (ActSeeAccCrs,Sta_STAT_RESULTS_SECTION_ID);
|
||||
Dat_WriteParamsIniEndDates ();
|
||||
Par_PutHiddenParamUnsigned (NULL,"GroupedBy",(unsigned) Sta_CLICKS_CRS_DETAILED_LIST);
|
||||
Par_PutHiddenParamUnsigned (NULL,"StatAct" ,(unsigned) Stats->NumAction);
|
||||
Par_PutHiddenParamUnsigned (NULL,"FirstRow" ,(unsigned) (LastRow + 1));
|
||||
Par_PutHiddenParamUnsigned (NULL,"LastRow" ,(unsigned) (LastRow + Stats->RowsPerPage));
|
||||
Par_PutHiddenParamUnsigned (NULL,"RowsPage" ,(unsigned) Stats->RowsPerPage);
|
||||
Par_PutParUnsigned (NULL,"GroupedBy",(unsigned) Sta_CLICKS_CRS_DETAILED_LIST);
|
||||
Par_PutParUnsigned (NULL,"StatAct" ,(unsigned) Stats->NumAction);
|
||||
Par_PutParUnsigned (NULL,"FirstRow" ,(unsigned) (LastRow + 1));
|
||||
Par_PutParUnsigned (NULL,"LastRow" ,(unsigned) (LastRow + Stats->RowsPerPage));
|
||||
Par_PutParUnsigned (NULL,"RowsPage" ,(unsigned) Stats->RowsPerPage);
|
||||
Usr_PutHiddenParSelectedUsrsCods (&Gbl.Usrs.Selected);
|
||||
}
|
||||
HTM_TH_Begin (HTM_HEAD_RIGHT);
|
||||
|
@ -1591,14 +1591,14 @@ static void Sta_ShowDistrAccessesPerDayAndHour (const struct Sta_Stats *Stats,
|
|||
|
||||
Frm_BeginFormAnchor (Gbl.Action.Act,Sta_STAT_RESULTS_SECTION_ID);
|
||||
Dat_WriteParamsIniEndDates ();
|
||||
Par_PutHiddenParamUnsigned (NULL,"GroupedBy",(unsigned) Stats->ClicksGroupedBy);
|
||||
Par_PutHiddenParamUnsigned (NULL,"CountType",(unsigned) Stats->CountType);
|
||||
Par_PutHiddenParamUnsigned (NULL,"StatAct" ,(unsigned) Stats->NumAction);
|
||||
Par_PutParUnsigned (NULL,"GroupedBy",(unsigned) Stats->ClicksGroupedBy);
|
||||
Par_PutParUnsigned (NULL,"CountType",(unsigned) Stats->CountType);
|
||||
Par_PutParUnsigned (NULL,"StatAct" ,(unsigned) Stats->NumAction);
|
||||
if (Gbl.Action.Act == ActSeeAccCrs)
|
||||
Usr_PutHiddenParSelectedUsrsCods (&Gbl.Usrs.Selected);
|
||||
else // Gbl.Action.Act == ActSeeAccGbl
|
||||
{
|
||||
Par_PutHiddenParamUnsigned (NULL,"Role",(unsigned) Stats->Role);
|
||||
Par_PutParUnsigned (NULL,"Role",(unsigned) Stats->Role);
|
||||
Sta_PutHiddenParamScopeSta ();
|
||||
}
|
||||
|
||||
|
@ -1840,7 +1840,7 @@ static void Sta_PutHiddenParamScopeSta (void)
|
|||
static Sta_ColorType_t Sta_GetStatColorType (void)
|
||||
{
|
||||
return (Sta_ColorType_t)
|
||||
Par_GetParToUnsignedLong ("ColorType",
|
||||
Par_GetParUnsignedLong ("ColorType",
|
||||
0,
|
||||
Sta_NUM_COLOR_TYPES - 1,
|
||||
(unsigned long) Sta_COLOR_TYPE_DEF);
|
||||
|
|
|
@ -250,7 +250,7 @@ void Svy_ListAllSurveys (struct Svy_Surveys *Surveys)
|
|||
WhichGroups = Grp_GetParamWhichGroups ();
|
||||
Grp_PutParamWhichGroups (&WhichGroups);
|
||||
Pag_PutHiddenParamPagNum (Pag_SURVEYS,Surveys->CurrentPage);
|
||||
Par_PutHiddenParamOrder ((unsigned) Order);
|
||||
Par_PutParOrder ((unsigned) Order);
|
||||
HTM_BUTTON_Submit_Begin (Txt_START_END_TIME_HELP[Order],
|
||||
"class=\"BT_LINK\"");
|
||||
if (Order == Surveys->SelectedOrder)
|
||||
|
@ -531,7 +531,7 @@ static void Svy_ShowOneSurvey (struct Svy_Surveys *Surveys,
|
|||
|
||||
HTM_ARTICLE_Begin (Anchor);
|
||||
Frm_BeginForm (ActSeeSvy);
|
||||
Par_PutParCod (Par_SvyCod,Surveys->Svy.SvyCod);
|
||||
Par_PutParCode (Par_SvyCod,Surveys->Svy.SvyCod);
|
||||
Svy_PutHiddenParamSvyOrder (Surveys->SelectedOrder);
|
||||
WhichGroups = Grp_GetParamWhichGroups ();
|
||||
Grp_PutParamWhichGroups (&WhichGroups);
|
||||
|
@ -575,7 +575,7 @@ static void Svy_ShowOneSurvey (struct Svy_Surveys *Surveys,
|
|||
HTM_DIV_Begin ("class=\"BUTTONS_AFTER_ALERT\"");
|
||||
|
||||
Frm_BeginForm (ActSeeSvy);
|
||||
Par_PutParCod (Par_SvyCod,Surveys->Svy.SvyCod);
|
||||
Par_PutParCode (Par_SvyCod,Surveys->Svy.SvyCod);
|
||||
Svy_PutHiddenParamSvyOrder (Surveys->SelectedOrder);
|
||||
WhichGroups = Grp_GetParamWhichGroups ();
|
||||
Grp_PutParamWhichGroups (&WhichGroups);
|
||||
|
@ -591,7 +591,7 @@ static void Svy_ShowOneSurvey (struct Svy_Surveys *Surveys,
|
|||
HTM_DIV_Begin ("class=\"BUTTONS_AFTER_ALERT\"");
|
||||
|
||||
Frm_BeginForm (ActSeeSvy);
|
||||
Par_PutParCod (Par_SvyCod,Surveys->Svy.SvyCod);
|
||||
Par_PutParCode (Par_SvyCod,Surveys->Svy.SvyCod);
|
||||
Svy_PutHiddenParamSvyOrder (Surveys->SelectedOrder);
|
||||
WhichGroups = Grp_GetParamWhichGroups ();
|
||||
Grp_PutParamWhichGroups (&WhichGroups);
|
||||
|
@ -869,7 +869,7 @@ static void Svy_WriteStatus (struct Svy_Survey *Svy)
|
|||
static Dat_StartEndTime_t Svy_GetParamSvyOrder (void)
|
||||
{
|
||||
return (Dat_StartEndTime_t)
|
||||
Par_GetParToUnsignedLong ("Order",
|
||||
Par_GetParUnsignedLong ("Order",
|
||||
0,
|
||||
Dat_NUM_START_END_TIME - 1,
|
||||
(unsigned long) Svy_ORDER_DEFAULT);
|
||||
|
@ -881,7 +881,7 @@ static Dat_StartEndTime_t Svy_GetParamSvyOrder (void)
|
|||
|
||||
void Svy_PutHiddenParamSvyOrder (Dat_StartEndTime_t SelectedOrder)
|
||||
{
|
||||
Par_PutHiddenParamOrder ((unsigned) SelectedOrder);
|
||||
Par_PutParOrder ((unsigned) SelectedOrder);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -934,8 +934,8 @@ static void Svy_PutParams (void *Surveys)
|
|||
|
||||
if (Surveys)
|
||||
{
|
||||
Par_PutParCod (Par_SvyCod,((struct Svy_Surveys *) Surveys)->Svy.SvyCod);
|
||||
Par_PutHiddenParamOrder ((unsigned) ((struct Svy_Surveys *) Surveys)->SelectedOrder);
|
||||
Par_PutParCode (Par_SvyCod,((struct Svy_Surveys *) Surveys)->Svy.SvyCod);
|
||||
Par_PutParOrder ((unsigned) ((struct Svy_Surveys *) Surveys)->SelectedOrder);
|
||||
WhichGroups = Grp_GetParamWhichGroups ();
|
||||
Grp_PutParamWhichGroups (&WhichGroups);
|
||||
Pag_PutHiddenParamPagNum (Pag_SURVEYS,((struct Svy_Surveys *) Surveys)->CurrentPage);
|
||||
|
@ -2047,10 +2047,10 @@ void Svy_ReceiveFormSurvey (void)
|
|||
NewSvy.TimeUTC[Dat_END_TIME] = Dat_GetTimeUTCFromForm (Dat_END_TIME);
|
||||
|
||||
/***** Get survey title *****/
|
||||
Par_GetParToText ("Title",NewSvy.Title,Svy_MAX_BYTES_SURVEY_TITLE);
|
||||
Par_GetParText ("Title",NewSvy.Title,Svy_MAX_BYTES_SURVEY_TITLE);
|
||||
|
||||
/***** Get survey text and insert links *****/
|
||||
Par_GetParToHTML ("Txt",Txt,Cns_MAX_BYTES_TEXT); // Store in HTML format (not rigorous)
|
||||
Par_GetParHTML ("Txt",Txt,Cns_MAX_BYTES_TEXT); // Store in HTML format (not rigorous)
|
||||
|
||||
/***** Adjust dates *****/
|
||||
if (NewSvy.TimeUTC[Dat_STR_TIME] == 0)
|
||||
|
@ -2361,8 +2361,8 @@ static void Svy_ShowFormEditOneQst (struct Svy_Surveys *Surveys,
|
|||
|
||||
/***** Begin form *****/
|
||||
Frm_BeginForm (ActRcvSvyQst);
|
||||
Par_PutParCod (Par_SvyCod,Surveys->Svy.SvyCod);
|
||||
Par_PutParCod (Par_QstCod,SvyQst->QstCod);
|
||||
Par_PutParCode (Par_SvyCod,Surveys->Svy.SvyCod);
|
||||
Par_PutParCode (Par_QstCod,SvyQst->QstCod);
|
||||
|
||||
/***** Begin table *****/
|
||||
HTM_TABLE_BeginWidePadding (2);
|
||||
|
@ -2563,13 +2563,13 @@ void Svy_ReceiveQst (void)
|
|||
|
||||
/* Get answer type */
|
||||
SvyQst.AnswerType = (Svy_AnswerType_t)
|
||||
Par_GetParToUnsignedLong ("AnswerType",
|
||||
Par_GetParUnsignedLong ("AnswerType",
|
||||
0,
|
||||
Svy_NUM_ANS_TYPES - 1,
|
||||
(unsigned long) Svy_ANSWER_TYPE_DEFAULT);
|
||||
|
||||
/* Get question text */
|
||||
Par_GetParToHTML ("Txt",Stem,Cns_MAX_BYTES_TEXT);
|
||||
Par_GetParHTML ("Txt",Stem,Cns_MAX_BYTES_TEXT);
|
||||
|
||||
/* Get the texts of the answers */
|
||||
for (NumAns = 0;
|
||||
|
@ -2580,7 +2580,7 @@ void Svy_ReceiveQst (void)
|
|||
/* Abort on error */
|
||||
Ale_ShowAlertsAndExit ();
|
||||
snprintf (AnsStr,sizeof (AnsStr),"AnsStr%u",NumAns);
|
||||
Par_GetParToHTML (AnsStr,SvyQst.AnsChoice[NumAns].Text,Svy_MAX_BYTES_ANSWER);
|
||||
Par_GetParHTML (AnsStr,SvyQst.AnsChoice[NumAns].Text,Svy_MAX_BYTES_ANSWER);
|
||||
}
|
||||
|
||||
/***** Make sure that stem and answer are not empty *****/
|
||||
|
@ -2742,7 +2742,7 @@ static void Svy_ListSvyQuestions (struct Svy_Surveys *Surveys)
|
|||
{
|
||||
/***** Begin form to send answers to survey *****/
|
||||
Frm_BeginForm (ActAnsSvy);
|
||||
Par_PutParCod (Par_SvyCod,Surveys->Svy.SvyCod);
|
||||
Par_PutParCode (Par_SvyCod,Surveys->Svy.SvyCod);
|
||||
}
|
||||
|
||||
/***** Write the heading *****/
|
||||
|
@ -2870,8 +2870,8 @@ static void Svy_PutParamsToEditQuestion (void *Surveys)
|
|||
{
|
||||
if (Surveys)
|
||||
{
|
||||
Par_PutParCod (Par_SvyCod,((struct Svy_Surveys *) Surveys)->Svy.SvyCod);
|
||||
Par_PutParCod (Par_QstCod,((struct Svy_Surveys *) Surveys)->QstCod);
|
||||
Par_PutParCode (Par_SvyCod,((struct Svy_Surveys *) Surveys)->Svy.SvyCod);
|
||||
Par_PutParCode (Par_QstCod,((struct Svy_Surveys *) Surveys)->QstCod);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3095,8 +3095,8 @@ static void Svy_PutParamsRemoveOneQst (void *Surveys)
|
|||
{
|
||||
if (Surveys)
|
||||
{
|
||||
Par_PutParCod (Par_SvyCod,((struct Svy_Surveys *) Surveys)->Svy.SvyCod);
|
||||
Par_PutParCod (Par_QstCod,((struct Svy_Surveys *) Surveys)->QstCod);
|
||||
Par_PutParCode (Par_SvyCod,((struct Svy_Surveys *) Surveys)->Svy.SvyCod);
|
||||
Par_PutParCode (Par_QstCod,((struct Svy_Surveys *) Surveys)->QstCod);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -85,7 +85,7 @@ void SvyRsc_WriteSurveyInCrsProgram (long SvyCod,bool PutFormToGo,
|
|||
NextAction = (SvyCod > 0) ? ActSeeSvy : // Survey specified
|
||||
ActSeeAllSvy; // All surveys
|
||||
Frm_BeginForm (NextAction);
|
||||
Par_PutParCod (Par_SvyCod,SvyCod);
|
||||
Par_PutParCode (Par_SvyCod,SvyCod);
|
||||
HTM_BUTTON_Submit_Begin (Txt_Actions[NextAction],
|
||||
"class=\"LM BT_LINK PRG_LNK_%s\"",
|
||||
The_GetSuffix ());
|
||||
|
|
|
@ -148,7 +148,7 @@ Syl_WhichSyllabus_t Syl_GetParamWhichSyllabus (void)
|
|||
{
|
||||
/***** Get which syllabus I want to see *****/
|
||||
return (Syl_WhichSyllabus_t)
|
||||
Par_GetParToUnsignedLong ("WhichSyllabus",
|
||||
Par_GetParUnsignedLong ("WhichSyllabus",
|
||||
0,
|
||||
Syl_NUM_WHICH_SYLLABUS - 1,
|
||||
(unsigned long) Syl_DEFAULT_WHICH_SYLLABUS);
|
||||
|
@ -194,7 +194,7 @@ static void Syl_PutFormWhichSyllabus (Syl_WhichSyllabus_t SyllabusSelected)
|
|||
|
||||
static unsigned Syl_GetParamItemNumber (void)
|
||||
{
|
||||
return (unsigned) Par_GetParToUnsignedLong ("NumI",
|
||||
return (unsigned) Par_GetParUnsignedLong ("NumI",
|
||||
0,
|
||||
UINT_MAX,
|
||||
0);
|
||||
|
@ -875,7 +875,7 @@ static void Syl_PutFormItemSyllabus (struct Syl_Syllabus *Syllabus,
|
|||
static void Syl_PutParamNumItem (void *ParamNumItem)
|
||||
{
|
||||
if (ParamNumItem)
|
||||
Par_PutHiddenParamUnsigned (NULL,"NumI",*((unsigned *) ParamNumItem));
|
||||
Par_PutParUnsigned (NULL,"NumI",*((unsigned *) ParamNumItem));
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -1263,7 +1263,7 @@ void Syl_InsertItemSyllabus (void)
|
|||
Syllabus.NumItem = Syl_GetParamItemNumber ();
|
||||
|
||||
/***** Get item body *****/
|
||||
Par_GetParToHTML ("Txt",Txt,Syl_MAX_BYTES_TEXT_ITEM);
|
||||
Par_GetParHTML ("Txt",Txt,Syl_MAX_BYTES_TEXT_ITEM);
|
||||
|
||||
/***** Create a new file to do the update *****/
|
||||
Syl_BuildPathFileSyllabus (&Syllabus,PathFile);
|
||||
|
@ -1332,7 +1332,7 @@ void Syl_ModifyItemSyllabus (void)
|
|||
Syllabus.NumItem = Syl_GetParamItemNumber ();
|
||||
|
||||
/***** Get item body *****/
|
||||
Par_GetParToHTML ("Txt",Syl_LstItemsSyllabus.Lst[Syllabus.NumItem].Text,
|
||||
Par_GetParHTML ("Txt",Syl_LstItemsSyllabus.Lst[Syllabus.NumItem].Text,
|
||||
Syl_MAX_BYTES_TEXT_ITEM);
|
||||
|
||||
/***** Create a new file where make the update *****/
|
||||
|
|
|
@ -97,7 +97,7 @@ void Tab_DrawTabs (void)
|
|||
HTM_DIV_Begin ("class=\"ICO_HIGHLIGHT\"");
|
||||
|
||||
Frm_BeginForm (ActMnu);
|
||||
Par_PutHiddenParamUnsigned (NULL,"NxtTab",(unsigned) NumTab);
|
||||
Par_PutParUnsigned (NULL,"NxtTab",(unsigned) NumTab);
|
||||
HTM_BUTTON_Submit_Begin (Txt_TABS_TXT[NumTab],
|
||||
"class=\"BT_LINK\"");
|
||||
snprintf (URLIconSet,sizeof (URLIconSet),"%s/%s",
|
||||
|
|
12
swad_tag.c
12
swad_tag.c
|
@ -142,7 +142,7 @@ static long Tag_GetParamTagCode (void)
|
|||
long TagCod;
|
||||
|
||||
/***** Get tag code *****/
|
||||
if ((TagCod = Par_GetParToLong ("TagCod")) <= 0)
|
||||
if ((TagCod = Par_GetParLong ("TagCod")) <= 0)
|
||||
Err_WrongTagExit ();
|
||||
|
||||
return TagCod;
|
||||
|
@ -163,8 +163,8 @@ void Tag_RenameTag (void)
|
|||
bool ComplexRenaming;
|
||||
|
||||
/***** Get old and new tags from the form *****/
|
||||
Par_GetParToText ("OldTagTxt",OldTagTxt,Tag_MAX_BYTES_TAG);
|
||||
Par_GetParToText ("NewTagTxt",NewTagTxt,Tag_MAX_BYTES_TAG);
|
||||
Par_GetParText ("OldTagTxt",OldTagTxt,Tag_MAX_BYTES_TAG);
|
||||
Par_GetParText ("NewTagTxt",NewTagTxt,Tag_MAX_BYTES_TAG);
|
||||
|
||||
/***** Check that the new tag is not empty *****/
|
||||
if (NewTagTxt[0]) // New tag not empty
|
||||
|
@ -440,7 +440,7 @@ void Tag_ShowFormEditTags (void)
|
|||
/* Form to rename this tag */
|
||||
HTM_TD_Begin ("class=\"LM\"");
|
||||
Frm_BeginForm (ActRenTag);
|
||||
Par_PutHiddenParamString (NULL,"OldTagTxt",row[1]);
|
||||
Par_PutParString (NULL,"OldTagTxt",row[1]);
|
||||
HTM_INPUT_TEXT ("NewTagTxt",Tag_MAX_CHARS_TAG,row[1],
|
||||
HTM_SUBMIT_ON_CHANGE,
|
||||
"size=\"36\" class=\"INPUT_%s\""
|
||||
|
@ -470,7 +470,7 @@ static void Tag_PutIconEnable (long TagCod)
|
|||
{
|
||||
HTM_TD_Begin ("class=\"BM\"");
|
||||
Frm_BeginForm (ActEnaTag);
|
||||
Par_PutHiddenParamLong (NULL,"TagCod",TagCod);
|
||||
Par_PutParLong (NULL,"TagCod",TagCod);
|
||||
Ico_PutIconLink ("eye-slash.svg",Ico_RED,ActEnaTag);
|
||||
Frm_EndForm ();
|
||||
HTM_TD_End ();
|
||||
|
@ -484,7 +484,7 @@ static void Tag_PutIconDisable (long TagCod)
|
|||
{
|
||||
HTM_TD_Begin ("class=\"BM\"");
|
||||
Frm_BeginForm (ActDisTag);
|
||||
Par_PutHiddenParamLong (NULL,"TagCod",TagCod);
|
||||
Par_PutParLong (NULL,"TagCod",TagCod);
|
||||
Ico_PutIconLink ("eye.svg",Ico_GREEN,ActDisTag);
|
||||
Frm_EndForm ();
|
||||
HTM_TD_End ();
|
||||
|
|
12
swad_test.c
12
swad_test.c
|
@ -343,7 +343,7 @@ void Tst_AssessTest (void)
|
|||
|
||||
/***** Get if test print will be visible by teachers *****/
|
||||
Print.Sent = true; // The exam has been finished and sent by student
|
||||
Print.AllowTeachers = Par_GetParToBool ("AllowTchs");
|
||||
Print.AllowTeachers = Par_GetParBool ("AllowTchs");
|
||||
|
||||
/***** Update test print in database *****/
|
||||
TstPrn_ComputeScoresAndStoreQuestionsOfPrint (&Print,
|
||||
|
@ -551,7 +551,7 @@ static void Tst_GetQuestionsForNewTest (struct Qst_Questions *Questions,
|
|||
}
|
||||
|
||||
/***** Get if test print will be visible by teachers *****/
|
||||
Print->AllowTeachers = Par_GetParToBool ("AllowTchs");
|
||||
Print->AllowTeachers = Par_GetParBool ("AllowTchs");
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -634,7 +634,7 @@ bool Tst_GetParamsTst (struct Qst_Questions *Questions,
|
|||
|
||||
/***** Tags *****/
|
||||
/* Get parameter that indicates whether all tags are selected */
|
||||
Questions->Tags.All = Par_GetParToBool ("AllTags");
|
||||
Questions->Tags.All = Par_GetParBool ("AllTags");
|
||||
|
||||
/* Get the tags */
|
||||
if ((Questions->Tags.List = malloc (Tag_MAX_BYTES_TAGS_LIST + 1)) == NULL)
|
||||
|
@ -655,7 +655,7 @@ bool Tst_GetParamsTst (struct Qst_Questions *Questions,
|
|||
case Tst_EDIT_QUESTIONS:
|
||||
case Tst_SELECT_QUESTIONS_FOR_EXAM:
|
||||
/* Get parameter that indicates if all types of answer are selected */
|
||||
Questions->AnswerTypes.All = Par_GetParToBool ("AllAnsTypes");
|
||||
Questions->AnswerTypes.All = Par_GetParBool ("AllAnsTypes");
|
||||
|
||||
/* Get types of answer */
|
||||
Par_GetParMultiToText ("AnswerType",Questions->AnswerTypes.List,Qst_MAX_BYTES_LIST_ANSWER_TYPES);
|
||||
|
@ -724,7 +724,7 @@ bool Tst_GetParamsTst (struct Qst_Questions *Questions,
|
|||
|
||||
static unsigned Tst_GetParamNumTst (void)
|
||||
{
|
||||
return (unsigned) Par_GetParToUnsignedLong ("NumTst",
|
||||
return (unsigned) Par_GetParUnsignedLong ("NumTst",
|
||||
1,
|
||||
UINT_MAX,
|
||||
1);
|
||||
|
@ -736,7 +736,7 @@ static unsigned Tst_GetParamNumTst (void)
|
|||
|
||||
static unsigned Tst_GetParamNumQsts (void)
|
||||
{
|
||||
return (unsigned) Par_GetParToUnsignedLong ("NumQst",
|
||||
return (unsigned) Par_GetParUnsignedLong ("NumQst",
|
||||
(unsigned long) TstCfg_GetConfigMin (),
|
||||
(unsigned long) TstCfg_GetConfigMax (),
|
||||
(unsigned long) TstCfg_GetConfigDef ());
|
||||
|
|
|
@ -399,21 +399,21 @@ void TstCfg_ReceiveConfigTst (void)
|
|||
/***** Get number of questions *****/
|
||||
/* Get minimum number of questions */
|
||||
TstCfg_SetConfigMin ((unsigned)
|
||||
Par_GetParToUnsignedLong ("NumQstMin",
|
||||
Par_GetParUnsignedLong ("NumQstMin",
|
||||
1,
|
||||
UINT_MAX,
|
||||
1));
|
||||
|
||||
/* Get default number of questions */
|
||||
TstCfg_SetConfigDef ((unsigned)
|
||||
Par_GetParToUnsignedLong ("NumQstDef",
|
||||
Par_GetParUnsignedLong ("NumQstDef",
|
||||
1,
|
||||
UINT_MAX,
|
||||
1));
|
||||
|
||||
/* Get maximum number of questions */
|
||||
TstCfg_SetConfigMax ((unsigned)
|
||||
Par_GetParToUnsignedLong ("NumQstMax",
|
||||
Par_GetParUnsignedLong ("NumQstMax",
|
||||
1,
|
||||
UINT_MAX,
|
||||
1));
|
||||
|
@ -422,7 +422,7 @@ void TstCfg_ReceiveConfigTst (void)
|
|||
TstCfg_CheckAndCorrectMinDefMax ();
|
||||
|
||||
/***** Get minimum time between consecutive tests, per question *****/
|
||||
TstCfg_SetConfigMinTimeNxtTstPerQst (Par_GetParToUnsignedLong ("MinTimeNxtTstPerQst",
|
||||
TstCfg_SetConfigMinTimeNxtTstPerQst (Par_GetParUnsignedLong ("MinTimeNxtTstPerQst",
|
||||
0,
|
||||
ULONG_MAX,
|
||||
0));
|
||||
|
@ -447,7 +447,7 @@ void TstCfg_ReceiveConfigTst (void)
|
|||
static TstCfg_Pluggable_t TstCfg_GetPluggableFromForm (void)
|
||||
{
|
||||
return (TstCfg_Pluggable_t)
|
||||
Par_GetParToUnsignedLong ("Pluggable",
|
||||
Par_GetParUnsignedLong ("Pluggable",
|
||||
0,
|
||||
TstCfg_NUM_OPTIONS_PLUGGABLE - 1,
|
||||
(unsigned long) TstCfg_PLUGGABLE_UNKNOWN);
|
||||
|
|
|
@ -227,7 +227,7 @@ void TstPrn_ShowTestPrintToFillIt (struct TstPrn_Print *Print,
|
|||
/***** Begin form *****/
|
||||
Frm_BeginForm (Action[RequestOrConfirm]);
|
||||
TstPrn_PutParamPrnCod (Print->PrnCod);
|
||||
Par_PutHiddenParamUnsigned (NULL,"NumTst",NumPrintsGeneratedByMe);
|
||||
Par_PutParUnsigned (NULL,"NumTst",NumPrintsGeneratedByMe);
|
||||
|
||||
/***** Begin table *****/
|
||||
HTM_TABLE_BeginWideMarginPadding (10);
|
||||
|
@ -2073,7 +2073,7 @@ static void TstPrn_ShowUsrPrints (struct Usr_Data *UsrDat)
|
|||
|
||||
void TstPrn_PutParamPrnCod (long ExaCod)
|
||||
{
|
||||
Par_PutHiddenParamLong (NULL,"PrnCod",ExaCod);
|
||||
Par_PutParLong (NULL,"PrnCod",ExaCod);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -2083,7 +2083,7 @@ void TstPrn_PutParamPrnCod (long ExaCod)
|
|||
long TstPrn_GetParamPrnCod (void)
|
||||
{
|
||||
/***** Get code of test print *****/
|
||||
return Par_GetParToLong ("PrnCod");
|
||||
return Par_GetParLong ("PrnCod");
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
|
@ -108,7 +108,7 @@ void The_PutIconsToSelectTheme (void)
|
|||
{
|
||||
Set_BeginPref (Theme == Gbl.Prefs.Theme);
|
||||
Frm_BeginForm (ActChgThe);
|
||||
Par_PutHiddenParamString (NULL,"Theme",The_ThemeId[Theme]);
|
||||
Par_PutParString (NULL,"Theme",The_ThemeId[Theme]);
|
||||
snprintf (Icon,sizeof (Icon),"%s/%s/theme_32x20.gif",
|
||||
Cfg_ICON_FOLDER_THEMES,The_ThemeId[Theme]);
|
||||
Ico_PutSettingIconLink (Icon,Ico_UNCHANGED,The_ThemeNames[Theme]);
|
||||
|
@ -156,7 +156,7 @@ The_Theme_t The_GetParamTheme (void)
|
|||
char ThemeId[The_MAX_BYTES_THEME_ID + 1];
|
||||
The_Theme_t Theme;
|
||||
|
||||
Par_GetParToText ("Theme",ThemeId,The_MAX_BYTES_THEME_ID);
|
||||
Par_GetParText ("Theme",ThemeId,The_MAX_BYTES_THEME_ID);
|
||||
for (Theme = (The_Theme_t) 0;
|
||||
Theme <= (The_Theme_t) (The_NUM_THEMES - 1);
|
||||
Theme++)
|
||||
|
|
|
@ -223,7 +223,7 @@ static void TmlCom_PutFormToWriteNewComm (const struct Tml_Timeline *Timeline,
|
|||
|
||||
/***** Begin form to write the post *****/
|
||||
TmlFrm_BeginForm (Timeline,TmlFrm_RECEIVE_COMM);
|
||||
Par_PutParCod (Par_NotCod,NotCod);
|
||||
Par_PutParCode (Par_NotCod,NotCod);
|
||||
|
||||
/***** Textarea and button *****/
|
||||
if (asprintf (&ClassTextArea,"Tml_COM_TEXTAREA Tml_COM_WIDTH INPUT_%s",
|
||||
|
@ -373,8 +373,8 @@ void TmlCom_ShowHiddenCommsGbl (void)
|
|||
/***** Get parameters *****/
|
||||
/* Get note code, identifier and number of comments to get */
|
||||
NotCod = Par_GetParCode (Par_NotCod);
|
||||
Par_GetParToText ("IdComments",IdComms,Frm_MAX_BYTES_ID);
|
||||
NumInitialCommsToGet = (unsigned) Par_GetParToLong ("NumHidCom");
|
||||
Par_GetParText ("IdComments",IdComms,Frm_MAX_BYTES_ID);
|
||||
NumInitialCommsToGet = (unsigned) Par_GetParLong ("NumHidCom");
|
||||
|
||||
/***** Write HTML inside DIV with hidden comments *****/
|
||||
NumInitialCommsGot =
|
||||
|
@ -700,7 +700,7 @@ static void TmlCom_PutFormToRemoveComm (const struct Tml_Timeline *Timeline,
|
|||
/***** Form to remove publication *****/
|
||||
/* Begin form */
|
||||
TmlFrm_BeginForm (Timeline,TmlFrm_REQ_REM_COMM);
|
||||
Par_PutParCod (Par_PubCod,PubCod);
|
||||
Par_PutParCode (Par_PubCod,PubCod);
|
||||
|
||||
/* Icon to remove */
|
||||
Ico_PutIconLink ("trash.svg",Ico_RED,
|
||||
|
@ -922,7 +922,7 @@ static void TmlCom_PutParamsRemoveComm (void *Timeline)
|
|||
Usr_PutParamOtherUsrCodEncrypted (Gbl.Usrs.Other.UsrDat.EnUsrCod);
|
||||
else // Global timeline
|
||||
Usr_PutHiddenParamWho (((struct Tml_Timeline *) Timeline)->Who);
|
||||
Par_PutParCod (Par_PubCod,((struct Tml_Timeline *) Timeline)->PubCod);
|
||||
Par_PutParCode (Par_PubCod,((struct Tml_Timeline *) Timeline)->PubCod);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -625,28 +625,28 @@ static void TmlNot_PutFormGoToAction (const struct TmlNot_Note *Not,
|
|||
case TmlNot_INS_DOC_PUB_FILE:
|
||||
case TmlNot_INS_SHA_PUB_FILE:
|
||||
Frm_BeginForm (Tml_DefaultActions[Not->Type]);
|
||||
Par_PutParCod (Par_FilCod,Not->Cod);
|
||||
Par_PutParCode (Par_FilCod,Not->Cod);
|
||||
if (Not->HieCod != Gbl.Hierarchy.Ins.InsCod) // Not the current institution
|
||||
Ins_PutParamInsCod (Not->HieCod); // Go to another institution
|
||||
break;
|
||||
case TmlNot_CTR_DOC_PUB_FILE:
|
||||
case TmlNot_CTR_SHA_PUB_FILE:
|
||||
Frm_BeginForm (Tml_DefaultActions[Not->Type]);
|
||||
Par_PutParCod (Par_FilCod,Not->Cod);
|
||||
Par_PutParCode (Par_FilCod,Not->Cod);
|
||||
if (Not->HieCod != Gbl.Hierarchy.Ctr.CtrCod) // Not the current center
|
||||
Ctr_PutParamCtrCod (Not->HieCod); // Go to another center
|
||||
break;
|
||||
case TmlNot_DEG_DOC_PUB_FILE:
|
||||
case TmlNot_DEG_SHA_PUB_FILE:
|
||||
Frm_BeginForm (Tml_DefaultActions[Not->Type]);
|
||||
Par_PutParCod (Par_FilCod,Not->Cod);
|
||||
Par_PutParCode (Par_FilCod,Not->Cod);
|
||||
if (Not->HieCod != Gbl.Hierarchy.Deg.DegCod) // Not the current degree
|
||||
Deg_PutParamDegCod (Not->HieCod); // Go to another degree
|
||||
break;
|
||||
case TmlNot_CRS_DOC_PUB_FILE:
|
||||
case TmlNot_CRS_SHA_PUB_FILE:
|
||||
Frm_BeginForm (Tml_DefaultActions[Not->Type]);
|
||||
Par_PutParCod (Par_FilCod,Not->Cod);
|
||||
Par_PutParCode (Par_FilCod,Not->Cod);
|
||||
if (Not->HieCod != Gbl.Hierarchy.Crs.CrsCod) // Not the current course
|
||||
Crs_PutParamCrsCod (Not->HieCod); // Go to another course
|
||||
break;
|
||||
|
@ -655,7 +655,7 @@ static void TmlNot_PutFormGoToAction (const struct TmlNot_Note *Not,
|
|||
Frm_BeginFormAnchor (Tml_DefaultActions[Not->Type],
|
||||
Anchor); // Locate on this specific exam
|
||||
Frm_FreeAnchorStr (Anchor);
|
||||
Par_PutParCod (Par_ExaCod,Not->Cod);
|
||||
Par_PutParCode (Par_ExaCod,Not->Cod);
|
||||
if (Not->HieCod != Gbl.Hierarchy.Crs.CrsCod) // Not the current course
|
||||
Crs_PutParamCrsCod (Not->HieCod); // Go to another course
|
||||
break;
|
||||
|
@ -677,7 +677,7 @@ static void TmlNot_PutFormGoToAction (const struct TmlNot_Note *Not,
|
|||
Frm_SetAnchorStr (Not->Cod,&Anchor);
|
||||
Frm_BeginFormAnchor (Tml_DefaultActions[Not->Type],Anchor);
|
||||
Frm_FreeAnchorStr (Anchor);
|
||||
Par_PutParCod (Par_NotCod,Not->Cod);
|
||||
Par_PutParCode (Par_NotCod,Not->Cod);
|
||||
if (Not->HieCod != Gbl.Hierarchy.Crs.CrsCod) // Not the current course
|
||||
Crs_PutParamCrsCod (Not->HieCod); // Go to another course
|
||||
break;
|
||||
|
@ -867,7 +867,7 @@ static void TmlNot_PutFormToRemoveNote (const struct Tml_Timeline *Timeline,
|
|||
/***** Form to remove publication *****/
|
||||
/* Begin form */
|
||||
TmlFrm_BeginForm (Timeline,TmlFrm_REQ_REM_NOTE);
|
||||
Par_PutParCod (Par_NotCod,NotCod);
|
||||
Par_PutParCode (Par_NotCod,NotCod);
|
||||
|
||||
/* Icon to remove */
|
||||
Ico_PutIconLink ("trash.svg",Ico_RED,
|
||||
|
@ -1049,7 +1049,7 @@ static void TmlNot_PutParamsRemoveNote (void *Timeline)
|
|||
Usr_PutParamOtherUsrCodEncrypted (Gbl.Usrs.Other.UsrDat.EnUsrCod);
|
||||
else // Global timeline
|
||||
Usr_PutHiddenParamWho (((struct Tml_Timeline *) Timeline)->Who);
|
||||
Par_PutParCod (Par_NotCod,((struct Tml_Timeline *) Timeline)->NotCod);
|
||||
Par_PutParCode (Par_NotCod,((struct Tml_Timeline *) Timeline)->NotCod);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -79,7 +79,7 @@ void TmlWho_PutFormWho (struct Tml_Timeline *Timeline)
|
|||
{
|
||||
Set_BeginPref (Who == Timeline->Who);
|
||||
Frm_BeginForm (ActSeeGblTL);
|
||||
Par_PutHiddenParamUnsigned (NULL,"Who",(unsigned) Who);
|
||||
Par_PutParUnsigned (NULL,"Who",(unsigned) Who);
|
||||
Usr_PutWhoIcon (Who);
|
||||
Frm_EndForm ();
|
||||
Set_EndPref ();
|
||||
|
|
|
@ -257,27 +257,27 @@ static void Tmt_GetParamsTimeTable (struct Tmt_Timetable *Timetable)
|
|||
|
||||
/***** Get day (0: monday, 1: tuesday,..., 6: sunday *****/
|
||||
Timetable->WhichCell.Weekday = (unsigned)
|
||||
Par_GetParToUnsignedLong ("TTDay",
|
||||
Par_GetParUnsignedLong ("TTDay",
|
||||
0,
|
||||
Tmt_DAYS_PER_WEEK - 1,
|
||||
0);
|
||||
|
||||
/***** Get hour *****/
|
||||
Timetable->WhichCell.Interval = (unsigned)
|
||||
Par_GetParToUnsignedLong ("TTInt",
|
||||
Par_GetParUnsignedLong ("TTInt",
|
||||
0,
|
||||
Timetable->Config.IntervalsPerDay - 1,
|
||||
0);
|
||||
|
||||
/***** Get number of column *****/
|
||||
Timetable->WhichCell.Column = (unsigned)
|
||||
Par_GetParToUnsignedLong ("TTCol",
|
||||
Par_GetParUnsignedLong ("TTCol",
|
||||
0,
|
||||
Tmt_MAX_COLUMNS_PER_CELL - 1,
|
||||
0);
|
||||
|
||||
/***** Get class type *****/
|
||||
Par_GetParToText ("TTTyp",StrClassType,Tmt_MAX_BYTES_STR_CLASS_TYPE);
|
||||
Par_GetParText ("TTTyp",StrClassType,Tmt_MAX_BYTES_STR_CLASS_TYPE);
|
||||
for (Timetable->ClassType = (Tmt_ClassType_t) 0;
|
||||
Timetable->ClassType <= (Tmt_ClassType_t) (Tmt_NUM_CLASS_TYPES - 1);
|
||||
Timetable->ClassType++)
|
||||
|
@ -287,17 +287,17 @@ static void Tmt_GetParamsTimeTable (struct Tmt_Timetable *Timetable)
|
|||
Err_ShowErrorAndExit ("Type of timetable cell is missing.");
|
||||
|
||||
/***** Get class duration *****/
|
||||
Par_GetParToText ("TTDur",StrDuration,Tmt_MAX_BYTES_STR_DURATION);
|
||||
Par_GetParText ("TTDur",StrDuration,Tmt_MAX_BYTES_STR_DURATION);
|
||||
if (sscanf (StrDuration,"%u:%u",&Hours,&Minutes) != 2)
|
||||
Err_ShowErrorAndExit ("Duration is missing.");
|
||||
Timetable->DurationIntervals = Hours * Timetable->Config.IntervalsPerHour +
|
||||
Minutes / Timetable->Config.Range.MinutesPerInterval;
|
||||
|
||||
/***** Get group code *****/
|
||||
Timetable->GrpCod = Par_GetParToLong ("TTGrp");
|
||||
Timetable->GrpCod = Par_GetParLong ("TTGrp");
|
||||
|
||||
/***** Get info *****/
|
||||
Par_GetParToText ("TTInf",Timetable->Info,Tmt_MAX_BYTES_INFO);
|
||||
Par_GetParText ("TTInf",Timetable->Info,Tmt_MAX_BYTES_INFO);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -1508,9 +1508,9 @@ static void Tmt_TimeTableDrawCellEdit (const struct Tmt_Timetable *Timetable,
|
|||
Frm_BeginForm (NextAction[Timetable->View]);
|
||||
|
||||
/***** Put hidden parameters *****/
|
||||
Par_PutHiddenParamUnsigned (NULL,"TTDay",WhichCell->Weekday );
|
||||
Par_PutHiddenParamUnsigned (NULL,"TTInt",WhichCell->Interval);
|
||||
Par_PutHiddenParamUnsigned (NULL,"TTCol",WhichCell->Column );
|
||||
Par_PutParUnsigned (NULL,"TTDay",WhichCell->Weekday );
|
||||
Par_PutParUnsigned (NULL,"TTInt",WhichCell->Interval);
|
||||
Par_PutParUnsigned (NULL,"TTCol",WhichCell->Column );
|
||||
|
||||
/***** Class type *****/
|
||||
HTM_SELECT_Begin (HTM_SUBMIT_ON_CHANGE,
|
||||
|
@ -1542,7 +1542,7 @@ static void Tmt_TimeTableDrawCellEdit (const struct Tmt_Timetable *Timetable,
|
|||
(Dur % Timetable->Config.IntervalsPerHour) *
|
||||
Timetable->Config.Range.MinutesPerInterval) < 0) // Minutes
|
||||
Err_NotEnoughMemoryExit ();
|
||||
Par_PutHiddenParamString (NULL,"TTDur",TTDur);
|
||||
Par_PutParString (NULL,"TTDur",TTDur);
|
||||
free (TTDur);
|
||||
}
|
||||
else
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue