Version 22.74: Mar 10, 2023 New module swad_parameter_code.

This commit is contained in:
acanas 2023-03-10 17:21:04 +01:00
parent 24e2901a61
commit 288ebde35a
461 changed files with 1383 additions and 1303 deletions

View File

@ -9,7 +9,7 @@
# and used to support university teaching. #
# #
# This file is part of SWAD core. #
# Copyright (C) 1999-2022 Antonio Cañas Vargas #
# Copyright (C) 1999-2023 Antonio Cañas Vargas #
# #
# This program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU Affero General Public License as #
@ -73,13 +73,13 @@ OBJS = swad_account.o swad_account_database.o swad_action.o swad_action_list.o \
swad_network.o swad_network_database.o swad_nickname.o \
swad_nickname_database.o swad_notice.o swad_notice_database.o \
swad_notification.o swad_notification_database.o \
swad_pagination.o swad_parameter.o swad_password.o \
swad_password_database.o swad_photo.o swad_photo_database.o \
swad_photo_shape.o swad_place.o swad_place_database.o swad_plugin.o \
swad_plugin_database.o swad_privacy.o swad_process.o swad_profile.o \
swad_profile_database.o swad_program.o swad_program_database.o \
swad_program_resource.o swad_project.o swad_project_database.o \
swad_project_resource.o \
swad_pagination.o swad_parameter.o swad_parameter_code.o \
swad_password.o swad_password_database.o swad_photo.o \
swad_photo_database.o swad_photo_shape.o swad_place.o \
swad_place_database.o swad_plugin.o swad_plugin_database.o \
swad_privacy.o swad_process.o swad_profile.o swad_profile_database.o \
swad_program.o swad_program_database.o swad_program_resource.o \
swad_project.o swad_project_database.o swad_project_resource.o \
swad_question.o swad_question_database.o swad_question_import.o \
swad_QR.o \
swad_record.o swad_record_database.o swad_report.o \

View File

@ -6,7 +6,7 @@
and used to support university teaching.
This file is part of SWAD core.
Copyright (C) 1999-2022 Antonio Cañas Vargas
Copyright (C) 1999-2023 Antonio Cañas Vargas
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General 3 License as

View File

@ -4,7 +4,7 @@
SWAD (Shared Workspace At a Distance),
is a web platform developed at the University of Granada (Spain),
and used to support university teaching.
Copyright (C) 1999-2022 Antonio Cañas-Vargas
Copyright (C) 1999-2023 Antonio Cañas-Vargas
University of Granada (SPAIN) (acanas@ugr.es)
This program is free software: you can redistribute it and/or modify

View File

@ -6,7 +6,7 @@
and used to support university teaching.
This file is part of SWAD core.
Copyright (C) 1999-2022 Antonio Cañas Vargas
Copyright (C) 1999-2023 Antonio Cañas Vargas
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
@ -2700,7 +2700,7 @@ int swad__getAttendanceUsers (struct soap *soap,
/***** Query list of attendance users *****/
AttEventIsAsociatedToGrps = Grp_DB_CheckIfAssociatedToGrps ("att_groups",
Par_AttCod,
"AttCod",
Event.AttCod);
NumUsrs = Att_DB_GetListUsrsInAttEvent (&mysql_res,Event.AttCod,AttEventIsAsociatedToGrps);

View File

@ -8,7 +8,7 @@
and used to support university teaching.
This file is part of SWAD core.
Copyright (C) 1999-2022 Antonio Cañas Vargas
Copyright (C) 1999-2023 Antonio Cañas Vargas
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as

View File

@ -8,7 +8,7 @@
and used to support university teaching.
This file is part of SWAD core.
Copyright (C) 1999-2022 Antonio Cañas Vargas
Copyright (C) 1999-2023 Antonio Cañas Vargas
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as

View File

@ -8,7 +8,7 @@
and used to support university teaching.
This file is part of SWAD core.
Copyright (C) 1999-2022 Antonio Cañas Vargas
Copyright (C) 1999-2023 Antonio Cañas Vargas
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as

View File

@ -6,7 +6,7 @@
and used to support university teaching.
This file is part of SWAD core.
Copyright (C) 1999-2022 Antonio Cañas Vargas
Copyright (C) 1999-2023 Antonio Cañas Vargas
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as

View File

@ -8,7 +8,7 @@
and used to support university teaching.
This file is part of SWAD core.
Copyright (C) 1999-2022 Antonio Cañas Vargas
Copyright (C) 1999-2023 Antonio Cañas Vargas
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as

View File

@ -6,7 +6,7 @@
and used to support university teaching.
This file is part of SWAD core.
Copyright (C) 1999-2022 Antonio Cañas Vargas
Copyright (C) 1999-2023 Antonio Cañas Vargas
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
@ -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_PutParCode (Par_OrgActCod,Act_GetActCod (Gbl.Action.Original)); // Original action, used to know where we came from
ParCod_PutPar (ParCod_OrgAct,Act_GetActCod (Gbl.Action.Original)); // Original action, used to know where we came from
switch (Gbl.Action.Original)
{
case ActSeeRecSevGst:
@ -890,7 +890,7 @@ void ID_ConfirmOtherUsrID (void)
unsigned NumIDFound = 0; // Initialized to avoid warning
/***** Get where we came from *****/
Gbl.Action.Original = Act_GetActionFromActCod (Par_GetParCode (Par_OrgActCod));
Gbl.Action.Original = Act_GetActionFromActCod (ParCod_GetPar (ParCod_OrgAct));
/***** Get other user's code from form and get user's data *****/
ICanConfirm = false;

View File

@ -8,7 +8,7 @@
and used to support university teaching.
This file is part of SWAD core.
Copyright (C) 1999-2022 Antonio Cañas Vargas
Copyright (C) 1999-2023 Antonio Cañas Vargas
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as

View File

@ -6,7 +6,7 @@
and used to support university teaching.
This file is part of SWAD core.
Copyright (C) 1999-2022 Antonio Cañas Vargas
Copyright (C) 1999-2023 Antonio Cañas Vargas
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as

View File

@ -8,7 +8,7 @@
and used to support university teaching.
This file is part of SWAD core.
Copyright (C) 1999-2022 Antonio Cañas Vargas
Copyright (C) 1999-2023 Antonio Cañas Vargas
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as

View File

@ -6,7 +6,7 @@
and used to support university teaching.
This file is part of SWAD core.
Copyright (C) 1999-2022 Antonio Cañas Vargas
Copyright (C) 1999-2023 Antonio Cañas Vargas
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
@ -35,6 +35,7 @@
#include "swad_HTML.h"
#include "swad_MAC.h"
#include "swad_parameter.h"
#include "swad_parameter_code.h"
/*****************************************************************************/
/******************************* Private types *******************************/
@ -63,7 +64,7 @@ static void MAC_PutPars (void *Args)
{
if (Args)
{
Par_PutParCode (Par_RooCod,((struct MAC_Pars *) Args)->RooCod);
ParCod_PutPar (ParCod_Roo,((struct MAC_Pars *) Args)->RooCod);
Par_PutParString (NULL,"MAC",((struct MAC_Pars *) Args)->MACstr);
}
}

View File

@ -8,7 +8,7 @@
and used to support university teaching.
This file is part of SWAD core.
Copyright (C) 1999-2022 Antonio Cañas Vargas
Copyright (C) 1999-2023 Antonio Cañas Vargas
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as

View File

@ -6,7 +6,7 @@
and used to support university teaching.
This file is part of SWAD core.
Copyright (C) 1999-2022 Antonio Cañas Vargas
Copyright (C) 1999-2023 Antonio Cañas Vargas
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General 3 License as

View File

@ -8,7 +8,7 @@
and used to support university teaching.
This file is part of SWAD core.
Copyright (C) 1999-2022 Antonio Cañas Vargas
Copyright (C) 1999-2023 Antonio Cañas Vargas
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as

View File

@ -6,7 +6,7 @@
and used to support university teaching.
This file is part of SWAD core.
Copyright (C) 1999-2022 Antonio Cañas Vargas
Copyright (C) 1999-2023 Antonio Cañas Vargas
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General 3 License as

View File

@ -8,7 +8,7 @@
and used to support university teaching.
This file is part of SWAD core.
Copyright (C) 1999-2022 Antonio Cañas Vargas
Copyright (C) 1999-2023 Antonio Cañas Vargas
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as

View File

@ -6,7 +6,7 @@
and used to support university teaching.
This file is part of SWAD core.
Copyright (C) 1999-2022 Antonio Cañas Vargas
Copyright (C) 1999-2023 Antonio Cañas Vargas
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General 3 License as
@ -145,14 +145,14 @@ void QR_ImageQRCode (const char *QRString)
/*************** Show QR code with direct link (shortcut URL) ****************/
/*****************************************************************************/
void QR_LinkTo (unsigned Size,Par_Code_t ParCode,long Cod)
void QR_LinkTo (unsigned Size,ParCod_Param_t ParCode,long Cod)
{
extern const char *Par_CodeStr[];
extern const char *Txt_Shortcut;
char *URL;
/***** Show QR code with link *****/
if (ParCode == Par_None)
if (ParCode == ParCod_None)
{
if (asprintf (&URL,"https://chart.googleapis.com/"
"chart?cht=qr&chs=%ux%u&chl=%s/",

View File

@ -8,7 +8,7 @@
and used to support university teaching.
This file is part of SWAD core.
Copyright (C) 1999-2022 Antonio Cañas Vargas
Copyright (C) 1999-2023 Antonio Cañas Vargas
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
@ -27,7 +27,7 @@
/********************************* Headers ***********************************/
/*****************************************************************************/
#include "swad_parameter.h"
#include "swad_parameter_code.h"
/*****************************************************************************/
/***************************** Public prototypes *****************************/
@ -41,7 +41,7 @@ void QR_PrintQRCode (void);
void QR_PrintUsrQRCode (void);
void QR_ImageQRCode (const char *QRString);
void QR_LinkTo (unsigned Size,Par_Code_t ParCode,long Cod);
void QR_LinkTo (unsigned Size,ParCod_Param_t ParCode,long Cod);
void QR_ExamAnnnouncement (void);
#endif

View File

@ -6,7 +6,7 @@
and used to support university teaching.
This file is part of SWAD core.
Copyright (C) 1999-2022 Antonio Cañas Vargas
Copyright (C) 1999-2023 Antonio Cañas Vargas
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as

View File

@ -8,7 +8,7 @@
and used to support university teaching.
This file is part of SWAD core.
Copyright (C) 1999-2022 Antonio Cañas Vargas
Copyright (C) 1999-2023 Antonio Cañas Vargas
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as

View File

@ -6,7 +6,7 @@
and used to support university teaching.
This file is part of SWAD core.
Copyright (C) 1999-2022 Antonio Cañas Vargas
Copyright (C) 1999-2023 Antonio Cañas Vargas
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General 3 License as

View File

@ -8,7 +8,7 @@
and used to support university teaching.
This file is part of SWAD core.
Copyright (C) 1999-2022 Antonio Cañas Vargas
Copyright (C) 1999-2023 Antonio Cañas Vargas
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as

View File

@ -6,7 +6,7 @@
and used to support university teaching.
This file is part of SWAD core.
Copyright (C) 1999-2022 Antonio Cañas Vargas
Copyright (C) 1999-2023 Antonio Cañas Vargas
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General 3 License as

View File

@ -8,7 +8,7 @@
and used to support university teaching.
This file is part of SWAD core.
Copyright (C) 1999-2022 Antonio Cañas Vargas
Copyright (C) 1999-2023 Antonio Cañas Vargas
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as

View File

@ -5,7 +5,7 @@
is a web platform developed at the University of Granada (Spain),
and used to support university teaching.
This file is part of SWAD core.
Copyright (C) 1999-2022 Antonio Cañas Vargas
Copyright (C) 1999-2023 Antonio Cañas Vargas
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the

View File

@ -8,7 +8,7 @@
and used to support university teaching.
This file is part of SWAD core.
Copyright (C) 1999-2022 Antonio Cañas Vargas
Copyright (C) 1999-2023 Antonio Cañas Vargas
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as

View File

@ -5,7 +5,7 @@
is a web platform developed at the University of Granada (Spain),
and used to support university teaching.
This file is part of SWAD core.
Copyright (C) 1999-2022 Antonio Cañas Vargas
Copyright (C) 1999-2023 Antonio Cañas Vargas
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the

View File

@ -8,7 +8,7 @@
and used to support university teaching.
This file is part of SWAD core.
Copyright (C) 1999-2022 Antonio Cañas Vargas
Copyright (C) 1999-2023 Antonio Cañas Vargas
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as

View File

@ -6,7 +6,7 @@
and used to support university teaching.
This file is part of SWAD core.
Copyright (C) 1999-2022 Antonio Cañas Vargas
Copyright (C) 1999-2023 Antonio Cañas Vargas
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General 3 License as

View File

@ -8,7 +8,7 @@
and used to support university teaching.
This file is part of SWAD core.
Copyright (C) 1999-2022 Antonio Cañas Vargas
Copyright (C) 1999-2023 Antonio Cañas Vargas
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as

View File

@ -6,7 +6,7 @@
and used to support university teaching.
This file is part of SWAD core.
Copyright (C) 1999-2022 Antonio Cañas Vargas
Copyright (C) 1999-2023 Antonio Cañas Vargas
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General 3 License as

View File

@ -8,7 +8,7 @@
and used to support university teaching.
This file is part of SWAD core.
Copyright (C) 1999-2022 Antonio Cañas Vargas
Copyright (C) 1999-2023 Antonio Cañas Vargas
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as

View File

@ -6,7 +6,7 @@
and used to support university teaching.
This file is part of SWAD core.
Copyright (C) 1999-2022 Antonio Cañas Vargas
Copyright (C) 1999-2023 Antonio Cañas Vargas
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General 3 License as
@ -962,7 +962,7 @@ void Agd_PutParsMyAgenda (unsigned Past__FutureEvents,
if (NumPage > 1)
Pag_PutParPagNum (Pag_MY_AGENDA,NumPage);
Par_PutParCode (Par_AgdCod,AgdCodToEdit);
ParCod_PutPar (ParCod_Agd,AgdCodToEdit);
}
/*****************************************************************************/
@ -1172,7 +1172,7 @@ void Agd_AskRemEvent (void)
Agd_GetPars (&Agenda,Agd_MY_AGENDA);
/***** Get event code *****/
AgdEvent.AgdCod = Par_GetAndCheckParCode (Par_AgdCod);
AgdEvent.AgdCod = ParCod_GetAndCheckPar (ParCod_Agd);
/***** Get data of the event from database *****/
AgdEvent.UsrCod = Gbl.Usrs.Me.UsrDat.UsrCod;
@ -1207,7 +1207,7 @@ void Agd_RemoveEvent (void)
Agd_GetPars (&Agenda,Agd_MY_AGENDA);
/***** Get event code *****/
AgdEvent.AgdCod = Par_GetAndCheckParCode (Par_AgdCod);
AgdEvent.AgdCod = ParCod_GetAndCheckPar (ParCod_Agd);
/***** Get data of the event from database *****/
AgdEvent.UsrCod = Gbl.Usrs.Me.UsrDat.UsrCod;
@ -1240,7 +1240,7 @@ void Agd_HideEvent (void)
Agd_GetPars (&Agenda,Agd_MY_AGENDA);
/***** Get event code *****/
AgdEvent.AgdCod = Par_GetAndCheckParCode (Par_AgdCod);
AgdEvent.AgdCod = ParCod_GetAndCheckPar (ParCod_Agd);
/***** Get data of the event from database *****/
AgdEvent.UsrCod = Gbl.Usrs.Me.UsrDat.UsrCod;
@ -1269,7 +1269,7 @@ void Agd_UnhideEvent (void)
Agd_GetPars (&Agenda,Agd_MY_AGENDA);
/***** Get event code *****/
AgdEvent.AgdCod = Par_GetAndCheckParCode (Par_AgdCod);
AgdEvent.AgdCod = ParCod_GetAndCheckPar (ParCod_Agd);
/***** Get data of the event from database *****/
AgdEvent.UsrCod = Gbl.Usrs.Me.UsrDat.UsrCod;
@ -1299,7 +1299,7 @@ void Agd_MakeEventPrivate (void)
Agd_GetPars (&Agenda,Agd_MY_AGENDA);
/***** Get event code *****/
AgdEvent.AgdCod = Par_GetAndCheckParCode (Par_AgdCod);
AgdEvent.AgdCod = ParCod_GetAndCheckPar (ParCod_Agd);
/***** Get data of the event from database *****/
AgdEvent.UsrCod = Gbl.Usrs.Me.UsrDat.UsrCod;
@ -1333,7 +1333,7 @@ void Agd_MakeEventPublic (void)
Agd_GetPars (&Agenda,Agd_MY_AGENDA);
/***** Get event code *****/
AgdEvent.AgdCod = Par_GetAndCheckParCode (Par_AgdCod);
AgdEvent.AgdCod = ParCod_GetAndCheckPar (ParCod_Agd);
/***** Get data of the event from database *****/
AgdEvent.UsrCod = Gbl.Usrs.Me.UsrDat.UsrCod;
@ -1382,7 +1382,7 @@ void Agd_RequestCreatOrEditEvent (void)
Agd_GetPars (&Agenda,Agd_MY_AGENDA);
/***** Get the code of the event *****/
ItsANewEvent = ((AgdEvent.AgdCod = Par_GetParCode (Par_AgdCod)) <= 0);
ItsANewEvent = ((AgdEvent.AgdCod = ParCod_GetPar (ParCod_Agd)) <= 0);
/***** Get from the database the data of the event *****/
AgdEvent.UsrCod = Gbl.Usrs.Me.UsrDat.UsrCod;
@ -1528,7 +1528,7 @@ void Agd_ReceiveFormEvent (void)
AgdEvent.UsrCod = Gbl.Usrs.Me.UsrDat.UsrCod;
/***** Get the code of the event *****/
ItsANewEvent = ((AgdEvent.AgdCod = Par_GetParCode (Par_AgdCod)) <= 0);
ItsANewEvent = ((AgdEvent.AgdCod = ParCod_GetPar (ParCod_Agd)) <= 0);
/***** Get start/end date-times *****/
AgdEvent.TimeUTC[Dat_STR_TIME] = Dat_GetTimeUTCFromForm (Dat_STR_TIME);

View File

@ -8,7 +8,7 @@
and used to support university teaching.
This file is part of SWAD core.
Copyright (C) 1999-2022 Antonio Cañas Vargas
Copyright (C) 1999-2023 Antonio Cañas Vargas
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as

View File

@ -6,7 +6,7 @@
and used to support university teaching.
This file is part of SWAD core.
Copyright (C) 1999-2022 Antonio Cañas Vargas
Copyright (C) 1999-2023 Antonio Cañas Vargas
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General 3 License as

View File

@ -8,7 +8,7 @@
and used to support university teaching.
This file is part of SWAD core.
Copyright (C) 1999-2022 Antonio Cañas Vargas
Copyright (C) 1999-2023 Antonio Cañas Vargas
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as

View File

@ -6,7 +6,7 @@
and used to support university teaching.
This file is part of SWAD core.
Copyright (C) 1999-2022 Antonio Cañas Vargas
Copyright (C) 1999-2023 Antonio Cañas Vargas
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as

View File

@ -8,7 +8,7 @@
and used to support university teaching.
This file is part of SWAD core.
Copyright (C) 1999-2022 Antonio Cañas Vargas
Copyright (C) 1999-2023 Antonio Cañas Vargas
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as

View File

@ -6,7 +6,7 @@
and used to support university teaching.
This file is part of SWAD core.
Copyright (C) 1999-2022 Antonio Cañas Vargas
Copyright (C) 1999-2023 Antonio Cañas Vargas
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General 3 License as
@ -37,6 +37,7 @@
#include "swad_global.h"
#include "swad_HTML.h"
#include "swad_parameter.h"
#include "swad_parameter_code.h"
#include "swad_role.h"
/*****************************************************************************/
@ -305,7 +306,7 @@ static void Ann_DrawAnAnnouncement (long AnnCod,Ann_Status_t Status,
static void Ann_PutParAnnCod (void *AnnCod)
{
if (AnnCod)
Par_PutParCode (Par_AnnCod,*((long *) AnnCod));
ParCod_PutPar (ParCod_Ann,*((long *) AnnCod));
}
/*****************************************************************************/
@ -429,7 +430,7 @@ void Ann_HideActiveAnnouncement (void)
long AnnCod;
/***** Get the code of the global announcement to hide *****/
AnnCod = Par_GetAndCheckParCode (Par_AnnCod);
AnnCod = ParCod_GetAndCheckPar (ParCod_Ann);
/***** Set global announcement as hidden *****/
Ann_DB_HideAnnouncement (AnnCod);
@ -444,7 +445,7 @@ void Ann_RevealHiddenAnnouncement (void)
long AnnCod;
/***** Get the code of the global announcement to show *****/
AnnCod = Par_GetAndCheckParCode (Par_AnnCod);
AnnCod = ParCod_GetAndCheckPar (ParCod_Ann);
/***** Set global announcement as not hidden *****/
Ann_DB_UnhideAnnouncement (AnnCod);
@ -460,7 +461,7 @@ void Ann_RemoveAnnouncement (void)
long AnnCod;
/***** Get the code of the global announcement *****/
AnnCod = Par_GetAndCheckParCode (Par_AnnCod);
AnnCod = ParCod_GetAndCheckPar (ParCod_Ann);
/***** Remove users who have seen the announcement *****/
Ann_DB_RemoveUsrsWhoSawAnnouncement (AnnCod);
@ -484,7 +485,7 @@ void Ann_MarkAnnouncementAsSeen (void)
long AnnCod;
/***** Get the code of the global announcement *****/
AnnCod = Par_GetAndCheckParCode (Par_AnnCod);
AnnCod = ParCod_GetAndCheckPar (ParCod_Ann);
/***** Mark announcement as seen *****/
Ann_DB_MarkAnnouncementAsSeenByMe (AnnCod);

View File

@ -8,7 +8,7 @@
and used to support university teaching.
This file is part of SWAD core.
Copyright (C) 1999-2022 Antonio Cañas Vargas
Copyright (C) 1999-2023 Antonio Cañas Vargas
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as

View File

@ -6,7 +6,7 @@
and used to support university teaching.
This file is part of SWAD core.
Copyright (C) 1999-2022 Antonio Cañas Vargas
Copyright (C) 1999-2023 Antonio Cañas Vargas
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General 3 License as

View File

@ -8,7 +8,7 @@
and used to support university teaching.
This file is part of SWAD core.
Copyright (C) 1999-2022 Antonio Cañas Vargas
Copyright (C) 1999-2023 Antonio Cañas Vargas
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as

View File

@ -6,7 +6,7 @@
and used to support university teaching.
This file is part of SWAD core.
Copyright (C) 1999-2022 Antonio Cañas Vargas
Copyright (C) 1999-2023 Antonio Cañas Vargas
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
@ -48,7 +48,7 @@
#include "swad_notification.h"
#include "swad_notification_database.h"
#include "swad_pagination.h"
#include "swad_parameter.h"
#include "swad_parameter_code.h"
#include "swad_photo.h"
#include "swad_program_resource.h"
#include "swad_role.h"
@ -382,7 +382,7 @@ void Asg_SeeOneAssignment (void)
Assignments.CurrentPage = Pag_GetParPagNum (Pag_ASSIGNMENTS);
/***** Get the code of the assignment *****/
Assignments.Asg.AsgCod = Par_GetAndCheckParCode (Par_AsgCod);
Assignments.Asg.AsgCod = ParCod_GetAndCheckPar (ParCod_Asg);
/***** Show selected assignment in a box *****/
Asg_ShowOneAssignmentInBox (&Assignments);
@ -403,7 +403,7 @@ void Asg_PrintOneAssignment (void)
Asg_ResetAssignments (&Assignments);
/***** Get the code of the assignment *****/
Assignments.Asg.AsgCod = Par_GetAndCheckParCode (Par_AsgCod);
Assignments.Asg.AsgCod = ParCod_GetAndCheckPar (ParCod_Asg);
/***** Write header *****/
Lay_WriteHeaderClassPhoto (true,false,
@ -774,7 +774,7 @@ static void Asg_PutPars (void *Assignments)
if (Assignments)
{
Par_PutParCode (Par_AsgCod,((struct Asg_Assignments *) Assignments)->Asg.AsgCod);
ParCod_PutPar (ParCod_Asg,((struct Asg_Assignments *) Assignments)->Asg.AsgCod);
Par_PutParOrder ((unsigned) ((struct Asg_Assignments *) Assignments)->SelectedOrder);
WhichGroups = Grp_GetParWhichGroups ();
Grp_PutParWhichGroups (&WhichGroups);
@ -1022,7 +1022,7 @@ void Asg_ReqRemAssignment (void)
Assignments.CurrentPage = Pag_GetParPagNum (Pag_ASSIGNMENTS);
/***** Get assignment code *****/
Assignments.Asg.AsgCod = Par_GetAndCheckParCode (Par_AsgCod);
Assignments.Asg.AsgCod = ParCod_GetAndCheckPar (ParCod_Asg);
/***** Get data of the assignment from database *****/
Asg_GetDataOfAssignmentByCod (&Assignments.Asg);
@ -1056,7 +1056,7 @@ void Asg_RemoveAssignment (void)
Assignments.CurrentPage = Pag_GetParPagNum (Pag_ASSIGNMENTS);
/***** Get assignment code *****/
Assignments.Asg.AsgCod = Par_GetAndCheckParCode (Par_AsgCod);
Assignments.Asg.AsgCod = ParCod_GetAndCheckPar (ParCod_Asg);
/***** Get data of the assignment from database *****/
Asg_GetDataOfAssignmentByCod (&Assignments.Asg); // Inside this function, the course is checked to be the current one
@ -1099,7 +1099,7 @@ void Asg_HideAssignment (void)
Assignments.CurrentPage = Pag_GetParPagNum (Pag_ASSIGNMENTS);
/***** Get assignment code *****/
Assignments.Asg.AsgCod = Par_GetAndCheckParCode (Par_AsgCod);
Assignments.Asg.AsgCod = ParCod_GetAndCheckPar (ParCod_Asg);
/***** Get data of the assignment from database *****/
Asg_GetDataOfAssignmentByCod (&Assignments.Asg);
@ -1128,7 +1128,7 @@ void Asg_UnhideAssignment (void)
Assignments.CurrentPage = Pag_GetParPagNum (Pag_ASSIGNMENTS);
/***** Get assignment code *****/
Assignments.Asg.AsgCod = Par_GetAndCheckParCode (Par_AsgCod);
Assignments.Asg.AsgCod = ParCod_GetAndCheckPar (ParCod_Asg);
/***** Get data of the assignment from database *****/
Asg_GetDataOfAssignmentByCod (&Assignments.Asg);
@ -1179,7 +1179,7 @@ void Asg_RequestCreatOrEditAsg (void)
Assignments.CurrentPage = Pag_GetParPagNum (Pag_ASSIGNMENTS);
/***** Get the code of the assignment *****/
ItsANewAssignment = ((Assignments.Asg.AsgCod = Par_GetParCode (Par_AsgCod)) <= 0);
ItsANewAssignment = ((Assignments.Asg.AsgCod = ParCod_GetPar (ParCod_Asg)) <= 0);
/***** Get from the database the data of the assignment *****/
if (ItsANewAssignment)
@ -1344,7 +1344,7 @@ static void Asg_ShowLstGrpsToEditAssignment (long AsgCod)
"id=\"WholeCrs\" value=\"Y\"%s"
" onclick=\"uncheckChildren(this,'GrpCods')\"",
Grp_DB_CheckIfAssociatedToGrps ("asg_groups",
Par_AsgCod,
"AsgCod",
AsgCod) ? "" :
" checked=\"checked\"");
HTM_TxtF ("%s&nbsp;%s",Txt_The_whole_course,Gbl.Hierarchy.Crs.ShrtName);
@ -1399,7 +1399,7 @@ void Asg_ReceiveFormAssignment (void)
Assignments.CurrentPage = Pag_GetParPagNum (Pag_ASSIGNMENTS);
/***** Get the code of the assignment *****/
ItsANewAssignment = ((Assignments.Asg.AsgCod = Par_GetParCode (Par_AsgCod)) <= 0);
ItsANewAssignment = ((Assignments.Asg.AsgCod = ParCod_GetPar (ParCod_Asg)) <= 0);
if (ItsANewAssignment)
{

View File

@ -8,7 +8,7 @@
and used to support university teaching.
This file is part of SWAD core.
Copyright (C) 1999-2022 Antonio Cañas Vargas
Copyright (C) 1999-2023 Antonio Cañas Vargas
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as

View File

@ -6,7 +6,7 @@
and used to support university teaching.
This file is part of SWAD core.
Copyright (C) 1999-2022 Antonio Cañas Vargas
Copyright (C) 1999-2023 Antonio Cañas Vargas
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as

View File

@ -8,7 +8,7 @@
and used to support university teaching.
This file is part of SWAD core.
Copyright (C) 1999-2022 Antonio Cañas Vargas
Copyright (C) 1999-2023 Antonio Cañas Vargas
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as

View File

@ -6,7 +6,7 @@
and used to support university teaching.
This file is part of SWAD core.
Copyright (C) 1999-2022 Antonio Cañas Vargas
Copyright (C) 1999-2023 Antonio Cañas Vargas
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
@ -33,7 +33,7 @@
#include "swad_error.h"
#include "swad_form.h"
#include "swad_pagination.h"
#include "swad_parameter.h"
#include "swad_parameter_code.h"
#include "swad_program_database.h"
/*****************************************************************************/
@ -55,7 +55,7 @@ void AsgRsc_GetLinkToAssignment (void)
Assignments.CurrentPage = Pag_GetParPagNum (Pag_ASSIGNMENTS);
/***** Get assignment code *****/
Assignments.Asg.AsgCod = Par_GetAndCheckParCode (Par_AsgCod);
Assignments.Asg.AsgCod = ParCod_GetAndCheckPar (ParCod_Asg);
/***** Get assignment title *****/
AsgRsc_GetTitleFromAsgCod (Assignments.Asg.AsgCod,Title,sizeof (Title) - 1);
@ -95,7 +95,7 @@ void AsgRsc_WriteAssignmentInCrsProgram (long AsgCod,bool PutFormToGo,
NextAction = (AsgCod > 0) ? ActSeeOneAsg : // Assignment specified
ActSeeAsg; // All assignments
Frm_BeginForm (NextAction);
Par_PutParCode (Par_AsgCod,AsgCod);
ParCod_PutPar (ParCod_Asg,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],

View File

@ -8,7 +8,7 @@
and used to support university teaching.
This file is part of SWAD core.
Copyright (C) 1999-2022 Antonio Cañas Vargas
Copyright (C) 1999-2023 Antonio Cañas Vargas
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as

View File

@ -6,7 +6,7 @@
and used to support university teaching.
This file is part of SWAD core.
Copyright (C) 1999-2022 Antonio Cañas Vargas
Copyright (C) 1999-2023 Antonio Cañas Vargas
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
@ -651,7 +651,7 @@ static void Att_PutPars (void *Events)
if (Events)
{
Par_PutParCode (Par_AttCod,((struct Att_Events *) Events)->Event.AttCod);
ParCod_PutPar (ParCod_Att,((struct Att_Events *) Events)->Event.AttCod);
Par_PutParOrder ((unsigned) ((struct Att_Events *) Events)->SelectedOrder);
WhichGroups = Grp_GetParWhichGroups ();
Grp_PutParWhichGroups (&WhichGroups);
@ -832,7 +832,7 @@ void Att_AskRemAttEvent (void)
Events.CurrentPage = Pag_GetParPagNum (Pag_ATT_EVENTS);
/***** Get attendance event code *****/
Events.Event.AttCod = Par_GetAndCheckParCode (Par_AttCod);
Events.Event.AttCod = ParCod_GetAndCheckPar (ParCod_Att);
/***** Get data of the attendance event from database *****/
Att_GetDataOfAttEventByCodAndCheckCrs (&Events.Event);
@ -858,7 +858,7 @@ void Att_GetAndRemAttEvent (void)
struct Att_Event Event;
/***** Get attendance event code *****/
Event.AttCod = Par_GetAndCheckParCode (Par_AttCod);
Event.AttCod = ParCod_GetAndCheckPar (ParCod_Att);
/***** Get data of the attendance event from database *****/
// Inside this function, the course is checked to be the current one
@ -900,7 +900,7 @@ void Att_HideAttEvent (void)
struct Att_Event Event;
/***** Get attendance event code *****/
Event.AttCod = Par_GetAndCheckParCode (Par_AttCod);
Event.AttCod = ParCod_GetAndCheckPar (ParCod_Att);
/***** Get data of the attendance event from database *****/
Att_GetDataOfAttEventByCodAndCheckCrs (&Event);
@ -921,7 +921,7 @@ void Att_UnhideAttEvent (void)
struct Att_Event Event;
/***** Get attendance event code *****/
Event.AttCod = Par_GetAndCheckParCode (Par_AttCod);
Event.AttCod = ParCod_GetAndCheckPar (ParCod_Att);
/***** Get data of the attendance event from database *****/
Att_GetDataOfAttEventByCodAndCheckCrs (&Event);
@ -969,7 +969,7 @@ void Att_RequestCreatOrEditAttEvent (void)
Events.CurrentPage = Pag_GetParPagNum (Pag_ATT_EVENTS);
/***** Get the code of the attendance event *****/
ItsANewAttEvent = ((Events.Event.AttCod = Par_GetParCode (Par_AttCod)) <= 0);
ItsANewAttEvent = ((Events.Event.AttCod = ParCod_GetPar (ParCod_Att)) <= 0);
/***** Get from the database the data of the attendance event *****/
if (ItsANewAttEvent)
@ -1000,7 +1000,7 @@ void Att_RequestCreatOrEditAttEvent (void)
else
{
Frm_BeginForm (ActChgAtt);
Par_PutParCode (Par_AttCod,Events.Event.AttCod);
ParCod_PutPar (ParCod_Att,Events.Event.AttCod);
}
Par_PutParOrder ((unsigned) Events.SelectedOrder);
WhichGroups = Grp_GetParWhichGroups ();
@ -1134,7 +1134,7 @@ static void Att_ShowLstGrpsToEditAttEvent (long AttCod)
"id=\"WholeCrs\" value=\"Y\"%s"
" onclick=\"uncheckChildren(this,'GrpCods')\"",
Grp_DB_CheckIfAssociatedToGrps ("att_groups",
Par_AttCod,
"AttCod",
AttCod) ? "" :
" checked=\"checked\"");
HTM_TxtF ("%s&nbsp;%s",Txt_The_whole_course,Gbl.Hierarchy.Crs.ShrtName);
@ -1178,7 +1178,7 @@ void Att_ReceiveFormAttEvent (void)
char Description[Cns_MAX_BYTES_TEXT + 1];
/***** Get the code of the attendance event *****/
ItsANewAttEvent = ((ReceivedAtt.AttCod = Par_GetParCode (Par_AttCod)) <= 0);
ItsANewAttEvent = ((ReceivedAtt.AttCod = ParCod_GetPar (ParCod_Att)) <= 0);
if (!ItsANewAttEvent)
{
@ -1438,7 +1438,7 @@ void Att_SeeOneAttEvent (void)
Att_ResetEvents (&Events);
/***** Get attendance event code *****/
Events.Event.AttCod = Par_GetAndCheckParCode (Par_AttCod);
Events.Event.AttCod = ParCod_GetAndCheckPar (ParCod_Att);
/***** Show event *****/
Att_ShowEvent (&Events);
@ -1527,7 +1527,7 @@ static void Att_ListAttOnlyMeAsStudent (struct Att_Event *Event)
if (Event->Open)
{
Frm_BeginForm (ActRecAttMe);
Par_PutParCode (Par_AttCod,Event->AttCod);
ParCod_PutPar (ParCod_Att,Event->AttCod);
}
/***** List students (only me) *****/
@ -1606,7 +1606,7 @@ static void Att_ListAttStudents (struct Att_Events *Events)
/* Begin form */
Frm_BeginForm (ActRecAttStd);
Par_PutParCode (Par_AttCod,Events->Event.AttCod);
ParCod_PutPar (ParCod_Att,Events->Event.AttCod);
Grp_PutParsCodGrps ();
/* Begin table */
@ -1674,7 +1674,7 @@ static void Att_ListAttStudents (struct Att_Events *Events)
static void Att_PutParAttCod (void *Events)
{
if (Events)
Par_PutParCode (Par_AttCod,((struct Att_Events *) Events)->Event.AttCod);
ParCod_PutPar (ParCod_Att,((struct Att_Events *) Events)->Event.AttCod);
}
/*****************************************************************************/
@ -1850,7 +1850,7 @@ static void Att_PutLinkAttEvent (struct Att_Event *Event,
{
/***** Begin form *****/
Frm_BeginForm (ActSeeOneAtt);
Par_PutParCode (Par_AttCod,Event->AttCod);
ParCod_PutPar (ParCod_Att,Event->AttCod);
Att_PutParsCodGrps (Event->AttCod);
/***** Link to view attendance event *****/
@ -1937,7 +1937,7 @@ void Att_RegisterMeAsStdInAttEvent (void)
Att_ResetEvents (&Events);
/***** Get attendance event code *****/
Events.Event.AttCod = Par_GetAndCheckParCode (Par_AttCod);
Events.Event.AttCod = ParCod_GetAndCheckPar (ParCod_Att);
Att_GetDataOfAttEventByCodAndCheckCrs (&Events.Event); // This checks that event belong to current course
if (Events.Event.Open)
@ -2000,7 +2000,7 @@ void Att_RegisterStudentsInAttEvent (void)
Att_ResetEvents (&Events);
/***** Get attendance event code *****/
Events.Event.AttCod = Par_GetAndCheckParCode (Par_AttCod);
Events.Event.AttCod = ParCod_GetAndCheckPar (ParCod_Att);
Att_GetDataOfAttEventByCodAndCheckCrs (&Events.Event); // This checks that event belong to current course
/***** Get groups selected *****/

View File

@ -8,7 +8,7 @@
and used to support university teaching.
This file is part of SWAD core.
Copyright (C) 1999-2022 Antonio Cañas Vargas
Copyright (C) 1999-2023 Antonio Cañas Vargas
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as

View File

@ -6,7 +6,7 @@
and used to support university teaching.
This file is part of SWAD core.
Copyright (C) 1999-2022 Antonio Cañas Vargas
Copyright (C) 1999-2023 Antonio Cañas Vargas
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as

View File

@ -8,7 +8,7 @@
and used to support university teaching.
This file is part of SWAD core.
Copyright (C) 1999-2022 Antonio Cañas Vargas
Copyright (C) 1999-2023 Antonio Cañas Vargas
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as

View File

@ -5,7 +5,7 @@
and used to support university teaching.
This file is part of SWAD core.
Copyright (C) 1999-2022 Antonio Cañas Vargas
Copyright (C) 1999-2023 Antonio Cañas Vargas
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
@ -31,7 +31,7 @@
#include "swad_attendance_resource.h"
#include "swad_error.h"
#include "swad_form.h"
#include "swad_parameter.h"
#include "swad_parameter_code.h"
#include "swad_program_database.h"
/*****************************************************************************/
@ -45,7 +45,7 @@ void AttRsc_GetLinkToEvent (void)
char Title[Att_MAX_BYTES_ATTENDANCE_EVENT_TITLE + 1];
/***** Get attendance event code *****/
AttCod = Par_GetAndCheckParCode (Par_AttCod);
AttCod = ParCod_GetAndCheckPar (ParCod_Att);
/***** Get attendance event title *****/
AttRsc_GetTitleFromAttCod (AttCod,Title,sizeof (Title) - 1);
@ -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_PutParCode (Par_AttCod,AttCod);
ParCod_PutPar (ParCod_Att,AttCod);
Att_PutParsCodGrps (AttCod);
HTM_BUTTON_Submit_Begin (Txt_Actions[NextAction],
"class=\"LM BT_LINK PRG_LNK_%s\"",

View File

@ -8,7 +8,7 @@
and used to support university teaching.
This file is part of SWAD core.
Copyright (C) 1999-2022 Antonio Cañas Vargas
Copyright (C) 1999-2023 Antonio Cañas Vargas
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as

View File

@ -6,7 +6,7 @@
and used to support university teaching.
This file is part of SWAD core.
Copyright (C) 1999-2022 Antonio Cañas Vargas
Copyright (C) 1999-2023 Antonio Cañas Vargas
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as

View File

@ -8,7 +8,7 @@
and used to support university teaching.
This file is part of SWAD core.
Copyright (C) 1999-2022 Antonio Cañas Vargas
Copyright (C) 1999-2023 Antonio Cañas Vargas
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as

View File

@ -6,7 +6,7 @@
and used to support university teaching.
This file is part of SWAD core.
Copyright (C) 1999-2022 Antonio Cañas Vargas
Copyright (C) 1999-2023 Antonio Cañas Vargas
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
@ -43,6 +43,7 @@
#include "swad_language.h"
#include "swad_link.h"
#include "swad_parameter.h"
#include "swad_parameter_code.h"
#include "swad_photo.h"
/*****************************************************************************/
@ -450,7 +451,7 @@ static void Ban_ListBannersForEdition (struct Ban_Banners *Banners)
/* Banner short name */
HTM_TD_Begin ("class=\"CM\"");
Frm_BeginForm (ActRenBanSho);
Par_PutParCode (Par_BanCod,Banners->BanCodToEdit);
ParCod_PutPar (ParCod_Ban,Banners->BanCodToEdit);
HTM_INPUT_TEXT ("ShortName",Ban_MAX_CHARS_SHRT_NAME,Ban->ShrtName,
HTM_SUBMIT_ON_CHANGE,
"class=\"INPUT_SHORT_NAME INPUT_%s\"",
@ -461,7 +462,7 @@ static void Ban_ListBannersForEdition (struct Ban_Banners *Banners)
/* Banner full name */
HTM_TD_Begin ("class=\"CM\"");
Frm_BeginForm (ActRenBanFul);
Par_PutParCode (Par_BanCod,Banners->BanCodToEdit);
ParCod_PutPar (ParCod_Ban,Banners->BanCodToEdit);
HTM_INPUT_TEXT ("FullName",Ban_MAX_CHARS_FULL_NAME,Ban->FullName,
HTM_SUBMIT_ON_CHANGE,
"class=\"INPUT_FULL_NAME INPUT_%s\"",
@ -472,7 +473,7 @@ static void Ban_ListBannersForEdition (struct Ban_Banners *Banners)
/* Banner image */
HTM_TD_Begin ("class=\"CM\"");
Frm_BeginForm (ActChgBanImg);
Par_PutParCode (Par_BanCod,Banners->BanCodToEdit);
ParCod_PutPar (ParCod_Ban,Banners->BanCodToEdit);
HTM_INPUT_TEXT ("Img",Ban_MAX_CHARS_IMAGE,Ban->Img,
HTM_SUBMIT_ON_CHANGE,
"size=\"12\" class=\"INPUT_%s\"",
@ -483,7 +484,7 @@ static void Ban_ListBannersForEdition (struct Ban_Banners *Banners)
/* Banner WWW */
HTM_TD_Begin ("class=\"CM\"");
Frm_BeginForm (ActChgBanWWW);
Par_PutParCode (Par_BanCod,Banners->BanCodToEdit);
ParCod_PutPar (ParCod_Ban,Banners->BanCodToEdit);
HTM_INPUT_URL ("WWW",Ban->WWW,HTM_SUBMIT_ON_CHANGE,
"class=\"INPUT_WWW_NARROW INPUT_%s\""
" required=\"required\"",
@ -508,7 +509,7 @@ static void Ban_ListBannersForEdition (struct Ban_Banners *Banners)
static void Ban_PutParBanCod (void *BanCod)
{
if (BanCod)
Par_PutParCode (Par_BanCod,*((long *) BanCod));
ParCod_PutPar (ParCod_Ban,*((long *) BanCod));
}
/*****************************************************************************/
@ -524,7 +525,7 @@ void Ban_RemoveBanner (void)
Ban_ResetBanner (Ban);
/***** Get banner code *****/
Ban->BanCod = Par_GetAndCheckParCode (Par_BanCod);
Ban->BanCod = ParCod_GetAndCheckPar (ParCod_Ban);
/***** Get data of the banner from database *****/
Ban_GetDataOfBannerByCod (Ban);
@ -575,7 +576,7 @@ void Ban_HideBanner (void)
static void Ban_ShowOrHideBanner (struct Ban_Banner *Ban,bool Hide)
{
/***** Get banner code *****/
Ban->BanCod = Par_GetAndCheckParCode (Par_BanCod);
Ban->BanCod = ParCod_GetAndCheckPar (ParCod_Ban);
/***** Get data of the banner from database *****/
Ban_GetDataOfBannerByCod (Ban);
@ -649,7 +650,7 @@ static void Ban_RenameBanner (struct Ban_Banner *Ban,
/***** Get parameters from form *****/
/* Get the code of the banner */
Ban->BanCod = Par_GetAndCheckParCode (Par_BanCod);
Ban->BanCod = ParCod_GetAndCheckPar (ParCod_Ban);
/* Get the new name for the banner */
Par_GetParText (ParName,NewBanName,MaxBytes);
@ -707,7 +708,7 @@ void Ban_ChangeBannerImg (void)
/***** Get parameters from form *****/
/* Get the code of the banner */
Ban->BanCod = Par_GetAndCheckParCode (Par_BanCod);
Ban->BanCod = ParCod_GetAndCheckPar (ParCod_Ban);
/* Get the new WWW for the banner */
Par_GetParText ("Img",NewImg,Ban_MAX_BYTES_IMAGE);
@ -749,7 +750,7 @@ void Ban_ChangeBannerWWW (void)
/***** Get parameters from form *****/
/* Get the code of the banner */
Ban->BanCod = Par_GetAndCheckParCode (Par_BanCod);
Ban->BanCod = ParCod_GetAndCheckPar (ParCod_Ban);
/* Get the new WWW for the banner */
Par_GetParText ("WWW",NewWWW,Cns_MAX_BYTES_WWW);
@ -981,7 +982,7 @@ void Ban_WriteMenuWithBanners (void)
/* Begin form */
Frm_BeginForm (ActClkBan);
Par_PutParCode (Par_BanCod,Banners.Lst[NumBan].BanCod);
ParCod_PutPar (ParCod_Ban,Banners.Lst[NumBan].BanCod);
Par_PutParString (NULL,"URL",Banners.Lst[NumBan].WWW);
/* Banner image */
@ -1009,7 +1010,7 @@ void Ban_ClickOnBanner (void)
struct Ban_Banner Ban;
/***** Get banner code *****/
Ban.BanCod = Par_GetAndCheckParCode (Par_BanCod);
Ban.BanCod = ParCod_GetAndCheckPar (ParCod_Ban);
/***** Get data of the banner from database *****/
Ban_GetDataOfBannerByCod (&Ban);

View File

@ -8,7 +8,7 @@
and used to support university teaching.
This file is part of SWAD core.
Copyright (C) 1999-2022 Antonio Cañas Vargas
Copyright (C) 1999-2023 Antonio Cañas Vargas
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as

View File

@ -6,7 +6,7 @@
and used to support university teaching.
This file is part of SWAD core.
Copyright (C) 1999-2022 Antonio Cañas Vargas
Copyright (C) 1999-2023 Antonio Cañas Vargas
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as

View File

@ -8,7 +8,7 @@
and used to support university teaching.
This file is part of SWAD core.
Copyright (C) 1999-2022 Antonio Cañas Vargas
Copyright (C) 1999-2023 Antonio Cañas Vargas
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as

View File

@ -6,7 +6,7 @@
and used to support university teaching.
This file is part of SWAD core.
Copyright (C) 1999-2022 Antonio Cañas Vargas
Copyright (C) 1999-2023 Antonio Cañas Vargas
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as

View File

@ -8,7 +8,7 @@
and used to support university teaching.
This file is part of SWAD core.
Copyright (C) 1999-2022 Antonio Cañas Vargas
Copyright (C) 1999-2023 Antonio Cañas Vargas
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as

View File

@ -6,7 +6,7 @@
and used to support university teaching.
This file is part of SWAD core.
Copyright (C) 1999-2022 Antonio Cañas Vargas
Copyright (C) 1999-2023 Antonio Cañas Vargas
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
@ -64,7 +64,7 @@
#include "swad_mark_database.h"
#include "swad_notification.h"
#include "swad_notification_database.h"
#include "swad_parameter.h"
#include "swad_parameter_code.h"
#include "swad_photo.h"
#include "swad_profile.h"
#include "swad_profile_database.h"
@ -1865,7 +1865,7 @@ void Brw_GetParAndInitFileBrowser (void)
/***** Get other parameters *****/
if (Brw_GetIfProjectFileBrowser ())
/* Get project code */
Prj_SetPrjCod (Par_GetParCode (Par_PrjCod));
Prj_SetPrjCod (ParCod_GetPar (ParCod_Prj));
else if (Brw_GetIfCrsAssigWorksFileBrowser ())
{
/* Get lists of the selected users if not already got */
@ -1978,7 +1978,7 @@ static long Brw_GetGrpSettings (void)
{
long GrpCod;
if ((GrpCod = Par_GetParCode (Par_GrpCod)) > 0)
if ((GrpCod = ParCod_GetPar (ParCod_Grp)) > 0)
return GrpCod;
else
/***** Try to get group code from database *****/
@ -2093,10 +2093,10 @@ void Brw_PutParsFileBrowser (const char *PathInTree,const char *FilFolLnkName,
{
if (Brw_GetIfGroupFileBrowser ()) // This file browser needs specify a group
/***** Group code *****/
Par_PutParCode (Par_GrpCod,Gbl.Crs.Grps.GrpCod);
ParCod_PutPar (ParCod_Grp,Gbl.Crs.Grps.GrpCod);
else if (Brw_GetIfProjectFileBrowser ()) // This file browser needs specify a project
/***** Project code *****/
Par_PutParCode (Par_PrjCod,Prj_GetPrjCod ());
ParCod_PutPar (ParCod_Prj,Prj_GetPrjCod ());
else if (Brw_GetIfCrsAssigWorksFileBrowser ())
{
/***** Users selected *****/
@ -2112,7 +2112,7 @@ void Brw_PutParsFileBrowser (const char *PathInTree,const char *FilFolLnkName,
Par_PutParString (NULL,"Path",PathInTree);
if (FilFolLnkName)
Par_PutParString (NULL,Brw_FileTypeParName[FileType],FilFolLnkName);
Par_PutParCode (Par_FilCod,FilCod);
ParCod_PutPar (ParCod_Fil,FilCod);
}
/*****************************************************************************/
@ -2849,7 +2849,7 @@ static void Brw_FormToChangeCrsGrpZone (void)
HTM_LI_Begin ("class=\"%s\"",IsCourseZone ? "BROWSER_TITLE" :
"BROWSER_TITLE_LIGHT");
HTM_LABEL_Begin (NULL);
HTM_INPUT_RADIO (Par_CodeStr[Par_GrpCod],true,
HTM_INPUT_RADIO (Par_CodeStr[ParCod_Grp],true,
"value=\"-1\"%s",
IsCourseZone ? " checked=\"checked\"" : "");
HTM_Txt (Gbl.Hierarchy.Crs.FullName);
@ -2878,7 +2878,7 @@ static void Brw_FormToChangeCrsGrpZone (void)
NULL,
"class=\"ICO25x25\" style=\"margin-left:6px;\"");
HTM_LABEL_Begin (NULL);
HTM_INPUT_RADIO (Par_CodeStr[Par_GrpCod],true,
HTM_INPUT_RADIO (Par_CodeStr[ParCod_Grp],true,
"value=\"%ld\"%s",
GrpDat.GrpCod,
(IsGroupZone &&
@ -3656,9 +3656,9 @@ static void Brw_PutCheckboxFullTree (void)
static void Brw_PutParsFullTree (void)
{
if (Brw_GetIfGroupFileBrowser ())
Par_PutParCode (Par_GrpCod,Gbl.Crs.Grps.GrpCod);
ParCod_PutPar (ParCod_Grp,Gbl.Crs.Grps.GrpCod);
else if (Brw_GetIfProjectFileBrowser ()) // This file browser needs specify a project
Par_PutParCode (Par_PrjCod,Prj_GetPrjCod ());
ParCod_PutPar (ParCod_Prj,Prj_GetPrjCod ());
else if (Brw_GetIfCrsAssigWorksFileBrowser ())
Usr_PutParSelectedUsrsCods (&Gbl.Usrs.Selected);
}
@ -7470,7 +7470,7 @@ void Brw_ShowFileMetadata (void)
Brw_GetParAndInitFileBrowser ();
/***** Get file metadata *****/
FileMetadata.FilCod = Par_GetAndCheckParCode (Par_FilCod);
FileMetadata.FilCod = ParCod_GetAndCheckPar (ParCod_Fil);
Brw_GetFileMetadataByCod (&FileMetadata);
Found = Brw_GetFileTypeSizeAndDate (&FileMetadata);
@ -8280,7 +8280,7 @@ void Brw_ChgFileMetadata (void)
Brw_GetParAndInitFileBrowser ();
/***** Get file metadata *****/
FileMetadata.FilCod = Par_GetAndCheckParCode (Par_FilCod);
FileMetadata.FilCod = ParCod_GetAndCheckPar (ParCod_Fil);
Brw_GetFileMetadataByCod (&FileMetadata);
Found = Brw_GetFileTypeSizeAndDate (&FileMetadata);
@ -9599,7 +9599,7 @@ static void Brw_WriteRowDocData (unsigned *NumDocsNotHidden,MYSQL_ROW row)
if (InsCod > 0)
{
Frm_BeginFormGoTo (ActSeeInsInf);
Par_PutParCode (Par_InsCod,InsCod);
ParCod_PutPar (ParCod_Ins,InsCod);
HTM_BUTTON_Submit_Begin (Str_BuildGoToTitle (InsShortName),
"class=\"LT BT_LINK\"");
Str_FreeGoToTitle ();
@ -9616,7 +9616,7 @@ static void Brw_WriteRowDocData (unsigned *NumDocsNotHidden,MYSQL_ROW row)
if (CtrCod > 0)
{
Frm_BeginFormGoTo (ActSeeCtrInf);
Par_PutParCode (Par_CtrCod,CtrCod);
ParCod_PutPar (ParCod_Ctr,CtrCod);
HTM_BUTTON_Submit_Begin (Str_BuildGoToTitle (CtrShortName),
"class=\"LT BT_LINK\"");
Str_FreeGoToTitle ();
@ -9633,7 +9633,7 @@ static void Brw_WriteRowDocData (unsigned *NumDocsNotHidden,MYSQL_ROW row)
if (DegCod > 0)
{
Frm_BeginFormGoTo (ActSeeDegInf);
Par_PutParCode (Par_DegCod,DegCod);
ParCod_PutPar (ParCod_Deg,DegCod);
HTM_BUTTON_Submit_Begin (Str_BuildGoToTitle (DegShortName),
"class=\"LT BT_LINK\"");
Str_FreeGoToTitle ();
@ -9650,7 +9650,7 @@ static void Brw_WriteRowDocData (unsigned *NumDocsNotHidden,MYSQL_ROW row)
if (CrsCod > 0)
{
Frm_BeginFormGoTo (ActSeeCrsInf);
Par_PutParCode (Par_CrsCod,CrsCod);
ParCod_PutPar (ParCod_Crs,CrsCod);
HTM_BUTTON_Submit_Begin (Str_BuildGoToTitle (CrsShortName),
"class=\"LT BT_LINK\"");
Str_FreeGoToTitle ();
@ -9725,24 +9725,24 @@ static void Brw_WriteRowDocData (unsigned *NumDocsNotHidden,MYSQL_ROW row)
if (CrsCod > 0)
{
Frm_BeginFormGoTo (Action);
Par_PutParCode (Par_CrsCod,CrsCod); // Go to course
ParCod_PutPar (ParCod_Crs,CrsCod); // Go to course
if (GrpCod > 0)
Par_PutParCode (Par_GrpCod,GrpCod);
ParCod_PutPar (ParCod_Grp,GrpCod);
}
else if (DegCod > 0)
{
Frm_BeginFormGoTo (Action);
Par_PutParCode (Par_DegCod,DegCod); // Go to degree
ParCod_PutPar (ParCod_Deg,DegCod); // Go to degree
}
else if (CtrCod > 0)
{
Frm_BeginFormGoTo (Action);
Par_PutParCode (Par_CtrCod,CtrCod); // Go to center
ParCod_PutPar (ParCod_Ctr,CtrCod); // Go to center
}
else if (InsCod > 0)
{
Frm_BeginFormGoTo (Action);
Par_PutParCode (Par_InsCod,InsCod); // Go to institution
ParCod_PutPar (ParCod_Ins,InsCod); // Go to institution
}
else
Frm_BeginForm (Action);

View File

@ -8,7 +8,7 @@
and used to support university teaching.
This file is part of SWAD core.
Copyright (C) 1999-2022 Antonio Cañas Vargas
Copyright (C) 1999-2023 Antonio Cañas Vargas
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as

View File

@ -6,7 +6,7 @@
and used to support university teaching.
This file is part of SWAD core.
Copyright (C) 1999-2022 Antonio Cañas Vargas
Copyright (C) 1999-2023 Antonio Cañas Vargas
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as

View File

@ -8,7 +8,7 @@
and used to support university teaching.
This file is part of SWAD core.
Copyright (C) 1999-2022 Antonio Cañas Vargas
Copyright (C) 1999-2023 Antonio Cañas Vargas
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as

View File

@ -5,7 +5,7 @@
and used to support university teaching.
This file is part of SWAD core.
Copyright (C) 1999-2022 Antonio Cañas Vargas
Copyright (C) 1999-2023 Antonio Cañas Vargas
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
@ -32,7 +32,7 @@
#include "swad_error.h"
#include "swad_form.h"
#include "swad_global.h"
#include "swad_parameter.h"
#include "swad_parameter_code.h"
#include "swad_program.h"
#include "swad_program_database.h"
#include "swad_program_resource.h"
@ -58,7 +58,7 @@ void BrwRsc_GetLinkToFile (void)
Brw_GetParAndInitFileBrowser ();
/***** Get file code *****/
FilCod = Par_GetAndCheckParCode (Par_FilCod);
FilCod = ParCod_GetAndCheckPar (ParCod_Fil);
/***** Get file title *****/
switch (Gbl.Action.Act)

View File

@ -8,7 +8,7 @@
and used to support university teaching.
This file is part of SWAD core.
Copyright (C) 1999-2022 Antonio Cañas Vargas
Copyright (C) 1999-2023 Antonio Cañas Vargas
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as

View File

@ -6,7 +6,7 @@
and used to support university teaching.
This file is part of SWAD core.
Copyright (C) 1999-2022 Antonio Cañas Vargas
Copyright (C) 1999-2023 Antonio Cañas Vargas
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as

View File

@ -8,7 +8,7 @@
and used to support university teaching.
This file is part of SWAD core.
Copyright (C) 1999-2022 Antonio Cañas Vargas
Copyright (C) 1999-2023 Antonio Cañas Vargas
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as

View File

@ -6,7 +6,7 @@
and used to support university teaching.
This file is part of SWAD core.
Copyright (C) 1999-2022 Antonio Cañas Vargas
Copyright (C) 1999-2023 Antonio Cañas Vargas
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
@ -40,6 +40,7 @@
#include "swad_global.h"
#include "swad_HTML.h"
#include "swad_parameter.h"
#include "swad_parameter_code.h"
#include "swad_room_database.h"
/*****************************************************************************/
@ -445,7 +446,7 @@ static void Bld_ListBuildingsForEdition (const struct Bld_Buildings *Buildings)
/* Building short name */
HTM_TD_Begin ("class=\"LM\"");
Frm_BeginFormAnchor (ActRenBldSho,Anchor);
Par_PutParCode (Par_BldCod,Building->BldCod);
ParCod_PutPar (ParCod_Bld,Building->BldCod);
HTM_INPUT_TEXT ("ShortName",Bld_MAX_CHARS_SHRT_NAME,Building->ShrtName,
HTM_SUBMIT_ON_CHANGE,
"size=\"10\" class=\"INPUT_SHORT_NAME INPUT_%s\"",
@ -456,7 +457,7 @@ static void Bld_ListBuildingsForEdition (const struct Bld_Buildings *Buildings)
/* Building full name */
HTM_TD_Begin ("class=\"LM\"");
Frm_BeginFormAnchor (ActRenBldFul,Anchor);
Par_PutParCode (Par_BldCod,Building->BldCod);
ParCod_PutPar (ParCod_Bld,Building->BldCod);
HTM_INPUT_TEXT ("FullName",Bld_MAX_CHARS_FULL_NAME,Building->FullName,
HTM_SUBMIT_ON_CHANGE,
"size=\"20\" class=\"INPUT_FULL_NAME INPUT_%s\"",
@ -467,7 +468,7 @@ static void Bld_ListBuildingsForEdition (const struct Bld_Buildings *Buildings)
/* Building location */
HTM_TD_Begin ("class=\"LM\"");
Frm_BeginFormAnchor (ActRenBldLoc,Anchor);
Par_PutParCode (Par_BldCod,Building->BldCod);
ParCod_PutPar (ParCod_Bld,Building->BldCod);
HTM_INPUT_TEXT ("Location",Bld_MAX_CHARS_LOCATION,Building->Location,
HTM_SUBMIT_ON_CHANGE,
"size=\"15\" class=\"INPUT_FULL_NAME INPUT_%s\"",
@ -489,7 +490,7 @@ static void Bld_ListBuildingsForEdition (const struct Bld_Buildings *Buildings)
static void Bld_PutParBldCod (void *BldCod)
{
if (BldCod)
Par_PutParCode (Par_BldCod,*((long *) BldCod));
ParCod_PutPar (ParCod_Bld,*((long *) BldCod));
}
/*****************************************************************************/
@ -504,7 +505,7 @@ void Bld_RemoveBuilding (void)
Bld_EditingBuildingConstructor ();
/***** Get building code *****/
Bld_EditingBuilding->BldCod = Par_GetAndCheckParCode (Par_BldCod);
Bld_EditingBuilding->BldCod = ParCod_GetAndCheckPar (ParCod_Bld);
/***** Get data of the building from database *****/
Bld_GetDataOfBuildingByCod (Bld_EditingBuilding);
@ -580,7 +581,7 @@ static void Bld_RenameBuilding (Cns_ShrtOrFullName_t ShrtOrFullName)
/***** Get parameters from form *****/
/* Get the code of the building */
Bld_EditingBuilding->BldCod = Par_GetAndCheckParCode (Par_BldCod);
Bld_EditingBuilding->BldCod = ParCod_GetAndCheckPar (ParCod_Bld);
/* Get the new name for the building */
Par_GetParText (ParName,NewClaName,MaxBytes);
@ -637,7 +638,7 @@ void Bld_ChangeBuildingLocation (void)
/***** Get parameters from form *****/
/* Get the code of the building */
Bld_EditingBuilding->BldCod = Par_GetAndCheckParCode (Par_BldCod);
Bld_EditingBuilding->BldCod = ParCod_GetAndCheckPar (ParCod_Bld);
/* Get the new location for the building */
Par_GetParText ("Location",NewLocation,Bld_MAX_BYTES_LOCATION);

View File

@ -8,7 +8,7 @@
and used to support university teaching.
This file is part of SWAD core.
Copyright (C) 1999-2022 Antonio Cañas Vargas
Copyright (C) 1999-2023 Antonio Cañas Vargas
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as

View File

@ -6,7 +6,7 @@
and used to support university teaching.
This file is part of SWAD core.
Copyright (C) 1999-2022 Antonio Cañas Vargas
Copyright (C) 1999-2023 Antonio Cañas Vargas
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as

View File

@ -8,7 +8,7 @@
and used to support university teaching.
This file is part of SWAD core.
Copyright (C) 1999-2022 Antonio Cañas Vargas
Copyright (C) 1999-2023 Antonio Cañas Vargas
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as

View File

@ -6,7 +6,7 @@
and used to support university teaching.
This file is part of SWAD core.
Copyright (C) 1999-2022 Antonio Cañas Vargas
Copyright (C) 1999-2023 Antonio Cañas Vargas
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as

View File

@ -8,7 +8,7 @@
and used to support university teaching.
This file is part of SWAD core.
Copyright (C) 1999-2022 Antonio Cañas Vargas
Copyright (C) 1999-2023 Antonio Cañas Vargas
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as

View File

@ -6,7 +6,7 @@
and used to support university teaching.
This file is part of SWAD core.
Copyright (C) 1999-2022 Antonio Cañas Vargas
Copyright (C) 1999-2023 Antonio Cañas Vargas
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as

View File

@ -8,7 +8,7 @@
and used to support university teaching.
This file is part of SWAD core.
Copyright (C) 1999-2022 Antonio Cañas Vargas
Copyright (C) 1999-2023 Antonio Cañas Vargas
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as

View File

@ -6,7 +6,7 @@
and used to support university teaching.
This file is part of SWAD core.
Copyright (C) 1999-2022 Antonio Cañas Vargas
Copyright (C) 1999-2023 Antonio Cañas Vargas
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General 3 License as
@ -169,7 +169,7 @@ static long Cfe_GetParsCallsForExams (struct Cfe_CallsForExams *CallsForExams)
long ExaCod;
/***** Get the code of the call for exam *****/
ExaCod = Par_GetAndCheckParCode (Par_ExaCod);
ExaCod = ParCod_GetAndCheckPar (ParCod_Exa);
/***** Get the name of the course (it is allowed to be different from the official name of the course) *****/
Par_GetParText ("CrsName",CallsForExams->CallForExam.CrsFullName,Cns_HIERARCHY_MAX_BYTES_FULL_NAME);
@ -379,7 +379,7 @@ void Cfe_PrintCallForExam (void)
Cfe_AllocMemCallForExam (&CallsForExams);
/***** Get the code of the call for exam *****/
ExaCod = Par_GetAndCheckParCode (Par_ExaCod);
ExaCod = ParCod_GetAndCheckPar (ParCod_Exa);
/***** Read call for exam from the database *****/
Cfe_GetDataCallForExamFromDB (&CallsForExams,ExaCod);
@ -406,7 +406,7 @@ void Cfe_ReqRemoveCallForExam (void)
Cfe_ResetCallsForExams (&CallsForExams);
/***** Get the code of the call for exam *****/
ExaCod = Par_GetAndCheckParCode (Par_ExaCod);
ExaCod = ParCod_GetAndCheckPar (ParCod_Exa);
/***** Show question and button to remove call for exam *****/
/* Begin alert */
@ -440,7 +440,7 @@ void Cfe_RemoveCallForExam1 (void)
Cfe_ResetCallsForExams (CallsForExams);
/***** Get the code of the call for exam *****/
ExaCod = Par_GetAndCheckParCode (Par_ExaCod);
ExaCod = ParCod_GetAndCheckPar (ParCod_Exa);
/***** Mark the call for exam as deleted in the database *****/
Cfe_DB_MarkACallForExamAsDeleted (ExaCod);
@ -481,7 +481,7 @@ void Cfe_HideCallForExam (void)
Cfe_ResetCallsForExams (CallsForExams);
/***** Get the code of the call for exam *****/
ExaCod = Par_GetAndCheckParCode (Par_ExaCod);
ExaCod = ParCod_GetAndCheckPar (ParCod_Exa);
/***** Mark the call for exam as hidden in the database *****/
Cfe_DB_HideCallForExam (ExaCod);
@ -505,7 +505,7 @@ void Cfe_UnhideCallForExam (void)
Cfe_ResetCallsForExams (CallsForExams);
/***** Get the code of the call for exam *****/
ExaCod = Par_GetAndCheckParCode (Par_ExaCod);
ExaCod = ParCod_GetAndCheckPar (ParCod_Exa);
/***** Mark the call for exam as visible in the database *****/
Cfe_DB_UnhideCallForExam (ExaCod);
@ -587,7 +587,7 @@ static void Cfe_GetExaCodToHighlight (struct Cfe_CallsForExams *CallsForExams)
{
/***** Get the call for exam code
of the call for exam to highlight *****/
CallsForExams->HighlightExaCod = Par_GetParCode (Par_ExaCod);
CallsForExams->HighlightExaCod = ParCod_GetPar (ParCod_Exa);
}
/*****************************************************************************/
@ -958,7 +958,7 @@ static void Cfe_ShowCallForExam (struct Cfe_CallsForExams *CallsForExams,
{
/***** Begin form *****/
Frm_BeginFormAnchor (ActRcvCfe,Anchor);
Par_PutParCode (Par_ExaCod,ExaCod);
ParCod_PutPar (ParCod_Exa,ExaCod);
}
/***** Begin table *****/
@ -1547,7 +1547,7 @@ bool Cfe_CheckIfICanEditCallsForExams (void)
static void Cfe_PutParExaCod (void *ExaCod)
{
if (ExaCod)
Par_PutParCode (Par_ExaCod,*((long *) ExaCod));
ParCod_PutPar (ParCod_Exa,*((long *) ExaCod));
}
/*****************************************************************************/

View File

@ -8,7 +8,7 @@
and used to support university teaching.
This file is part of SWAD core.
Copyright (C) 1999-2022 Antonio Cañas Vargas
Copyright (C) 1999-2023 Antonio Cañas Vargas
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General 3 License as

View File

@ -6,7 +6,7 @@
and used to support university teaching.
This file is part of SWAD core.
Copyright (C) 1999-2022 Antonio Cañas Vargas
Copyright (C) 1999-2023 Antonio Cañas Vargas
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General 3 License as

View File

@ -8,7 +8,7 @@
and used to support university teaching.
This file is part of SWAD core.
Copyright (C) 1999-2022 Antonio Cañas Vargas
Copyright (C) 1999-2023 Antonio Cañas Vargas
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General 3 License as

View File

@ -6,7 +6,7 @@
and used to support university teaching.
This file is part of SWAD core.
Copyright (C) 1999-2022 Antonio Cañas Vargas
Copyright (C) 1999-2023 Antonio Cañas Vargas
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General 3 License as
@ -31,7 +31,7 @@
#include "swad_call_for_exam_resource.h"
#include "swad_error.h"
#include "swad_form.h"
#include "swad_parameter.h"
#include "swad_parameter_code.h"
#include "swad_program_database.h"
/*****************************************************************************/
@ -46,7 +46,7 @@ void Cfe_GetLinkToCallForExam (void)
char Title[Cfe_MAX_BYTES_SESSION_AND_DATE];
/***** Get the code of the call for exam *****/
ExaCod = Par_GetAndCheckParCode (Par_ExaCod);
ExaCod = ParCod_GetAndCheckPar (ParCod_Exa);
/***** Get session and date of the exam *****/
CfeRsc_GetTitleFromExaCod (ExaCod,Title,sizeof (Title) - 1);
@ -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_PutParCode (Par_ExaCod,ExaCod);
ParCod_PutPar (ParCod_Exa,ExaCod);
HTM_BUTTON_Submit_Begin (Txt_Actions[NextAction],
"class=\"LM BT_LINK PRG_LNK_%s\"",
The_GetSuffix ());

View File

@ -8,7 +8,7 @@
and used to support university teaching.
This file is part of SWAD core.
Copyright (C) 1999-2022 Antonio Cañas Vargas
Copyright (C) 1999-2023 Antonio Cañas Vargas
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General 3 License as

View File

@ -6,7 +6,7 @@
and used to support university teaching.
This file is part of SWAD core.
Copyright (C) 1999-2022 Antonio Cañas Vargas
Copyright (C) 1999-2023 Antonio Cañas Vargas
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
@ -53,6 +53,7 @@
#include "swad_logo.h"
#include "swad_message.h"
#include "swad_parameter.h"
#include "swad_parameter_code.h"
#include "swad_place.h"
#include "swad_room_database.h"
#include "swad_survey.h"
@ -190,7 +191,7 @@ void Ctr_DrawCenterLogoAndNameWithLink (struct Ctr_Center *Ctr,Act_Action_t Acti
{
/***** Begin form *****/
Frm_BeginFormGoTo (Action);
Par_PutParCode (Par_CtrCod,Ctr->CtrCod);
ParCod_PutPar (ParCod_Ctr,Ctr->CtrCod);
/***** Link to action *****/
HTM_BUTTON_Submit_Begin (Str_BuildGoToTitle (Ctr->FullName),
@ -818,7 +819,7 @@ static void Ctr_ListCentersForEdition (const struct Plc_Places *Places)
if (ICanEdit)
{
Frm_BeginForm (ActChgCtrPlc);
Par_PutParCode (Par_OthHieCod,Ctr->CtrCod);
ParCod_PutPar (ParCod_OthHie,Ctr->CtrCod);
HTM_SELECT_Begin (HTM_SUBMIT_ON_CHANGE,
"name=\"PlcCod\""
" class=\"PLC_SEL INPUT_%s\"",
@ -848,7 +849,7 @@ static void Ctr_ListCentersForEdition (const struct Plc_Places *Places)
if (ICanEdit)
{
Frm_BeginForm (ActRenCtrSho);
Par_PutParCode (Par_OthHieCod,Ctr->CtrCod);
ParCod_PutPar (ParCod_OthHie,Ctr->CtrCod);
HTM_INPUT_TEXT ("ShortName",Cns_HIERARCHY_MAX_CHARS_SHRT_NAME,Ctr->ShrtName,
HTM_SUBMIT_ON_CHANGE,
"class=\"INPUT_SHORT_NAME INPUT_%s\"",
@ -864,7 +865,7 @@ static void Ctr_ListCentersForEdition (const struct Plc_Places *Places)
if (ICanEdit)
{
Frm_BeginForm (ActRenCtrFul);
Par_PutParCode (Par_OthHieCod,Ctr->CtrCod);
ParCod_PutPar (ParCod_OthHie,Ctr->CtrCod);
HTM_INPUT_TEXT ("FullName",Cns_HIERARCHY_MAX_CHARS_FULL_NAME,Ctr->FullName,
HTM_SUBMIT_ON_CHANGE,
"class=\"INPUT_FULL_NAME INPUT_%s\"",
@ -880,7 +881,7 @@ static void Ctr_ListCentersForEdition (const struct Plc_Places *Places)
if (ICanEdit)
{
Frm_BeginForm (ActChgCtrWWW);
Par_PutParCode (Par_OthHieCod,Ctr->CtrCod);
ParCod_PutPar (ParCod_OthHie,Ctr->CtrCod);
HTM_INPUT_URL ("WWW",Ctr->WWW,HTM_SUBMIT_ON_CHANGE,
"class=\"INPUT_WWW_NARROW INPUT_%s\""
" required=\"required\"",
@ -967,7 +968,7 @@ void Ctr_RemoveCenter (void)
Ctr_EditingCenterConstructor ();
/***** Get center code *****/
Ctr_EditingCtr->CtrCod = Par_GetAndCheckParCode (Par_OthHieCod);
Ctr_EditingCtr->CtrCod = ParCod_GetAndCheckPar (ParCod_OthHie);
/***** Get data of the center from database *****/
Ctr_GetDataOfCenterByCod (Ctr_EditingCtr);
@ -1039,10 +1040,10 @@ void Ctr_ChangeCtrPlc (void)
Ctr_EditingCenterConstructor ();
/***** Get center code *****/
Ctr_EditingCtr->CtrCod = Par_GetAndCheckParCode (Par_OthHieCod);
Ctr_EditingCtr->CtrCod = ParCod_GetAndCheckPar (ParCod_OthHie);
/***** Get parameter with place code *****/
NewPlcCod = Par_GetAndCheckParCodeMin (Par_PlcCod,0); // 0 (another place) is allowed here
NewPlcCod = ParCod_GetAndCheckParMin (ParCod_Plc,0); // 0 (another place) is allowed here
/***** Get data of center from database *****/
Ctr_GetDataOfCenterByCod (Ctr_EditingCtr);
@ -1067,7 +1068,7 @@ void Ctr_RenameCenterShort (void)
Ctr_EditingCenterConstructor ();
/***** Rename center *****/
Ctr_EditingCtr->CtrCod = Par_GetAndCheckParCode (Par_OthHieCod);
Ctr_EditingCtr->CtrCod = ParCod_GetAndCheckPar (ParCod_OthHie);
Ctr_RenameCenter (Ctr_EditingCtr,Cns_SHRT_NAME);
}
@ -1077,7 +1078,7 @@ void Ctr_RenameCenterFull (void)
Ctr_EditingCenterConstructor ();
/***** Rename center *****/
Ctr_EditingCtr->CtrCod = Par_GetAndCheckParCode (Par_OthHieCod);
Ctr_EditingCtr->CtrCod = ParCod_GetAndCheckPar (ParCod_OthHie);
Ctr_RenameCenter (Ctr_EditingCtr,Cns_FULL_NAME);
}
@ -1166,7 +1167,7 @@ void Ctr_ChangeCtrWWW (void)
Ctr_EditingCenterConstructor ();
/***** Get the code of the center *****/
Ctr_EditingCtr->CtrCod = Par_GetAndCheckParCode (Par_OthHieCod);
Ctr_EditingCtr->CtrCod = ParCod_GetAndCheckPar (ParCod_OthHie);
/***** Get the new WWW for the center *****/
Par_GetParText ("WWW",NewWWW,Cns_MAX_BYTES_WWW);
@ -1205,7 +1206,7 @@ void Ctr_ChangeCtrStatus (void)
/***** Get parameters from form *****/
/* Get center code */
Ctr_EditingCtr->CtrCod = Par_GetAndCheckParCode (Par_OthHieCod);
Ctr_EditingCtr->CtrCod = ParCod_GetAndCheckPar (ParCod_OthHie);
/* Get parameter with status */
Status = Hie_GetParStatus (); // New status
@ -1521,7 +1522,7 @@ static void Ctr_ReceiveFormRequestOrCreateCtr (Hie_Status_t Status)
Ctr_EditingCtr->InsCod = Gbl.Hierarchy.Ins.InsCod;
/* Get place */
Ctr_EditingCtr->PlcCod = Par_GetAndCheckParCodeMin (Par_PlcCod,0); // 0 (another place) is allowed here
Ctr_EditingCtr->PlcCod = ParCod_GetAndCheckParMin (ParCod_Plc,0); // 0 (another place) is allowed here
/* Get center short name and full name */
Par_GetParText ("ShortName",Ctr_EditingCtr->ShrtName,Cns_HIERARCHY_MAX_BYTES_SHRT_NAME);
@ -2081,5 +2082,5 @@ unsigned Ctr_GetCachedNumUsrsWhoClaimToBelongToCtr (struct Ctr_Center *Ctr)
static void Ctr_PutParCtrCod (void *CtrCod)
{
if (CtrCod)
Par_PutParCode (Par_CtrCod,*((long *) CtrCod));
ParCod_PutPar (ParCod_Ctr,*((long *) CtrCod));
}

View File

@ -8,7 +8,7 @@
and used to support university teaching.
This file is part of SWAD core.
Copyright (C) 1999-2022 Antonio Cañas Vargas
Copyright (C) 1999-2023 Antonio Cañas Vargas
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as

View File

@ -6,7 +6,7 @@
and used to support university teaching.
This file is part of SWAD core.
Copyright (C) 1999-2022 Antonio Cañas Vargas
Copyright (C) 1999-2023 Antonio Cañas Vargas
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
@ -548,7 +548,7 @@ static void CtrCfg_Institution (bool PrintView,bool PutForm)
HTM_TR_Begin (NULL);
/* Label */
Frm_LabelColumn ("RT",PutForm ? Par_CodeStr[Par_OthInsCod] :
Frm_LabelColumn ("RT",PutForm ? Par_CodeStr[ParCod_OthIns] :
NULL,
Txt_Institution);
@ -582,7 +582,7 @@ static void CtrCfg_Institution (bool PrintView,bool PutForm)
if (!PrintView)
{
Frm_BeginFormGoTo (ActSeeInsInf);
Par_PutParCode (Par_InsCod,Gbl.Hierarchy.Ins.InsCod);
ParCod_PutPar (ParCod_Ins,Gbl.Hierarchy.Ins.InsCod);
HTM_BUTTON_Submit_Begin (Str_BuildGoToTitle (Gbl.Hierarchy.Ins.ShrtName),
"class=\"LT BT_LINK\"");
Str_FreeGoToTitle ();
@ -649,7 +649,7 @@ static void CtrCfg_Place (bool PutForm)
HTM_TR_Begin (NULL);
/* Label */
Frm_LabelColumn ("RT",PutForm ? Par_CodeStr[Par_PlcCod] :
Frm_LabelColumn ("RT",PutForm ? Par_CodeStr[ParCod_Plc] :
NULL,
Txt_Place);
@ -704,7 +704,7 @@ static void CtrCfg_WWW (bool PrintView,bool PutForm)
static void CtrCfg_Shortcut (bool PrintView)
{
HieCfg_Shortcut (PrintView,Par_CtrCod,Gbl.Hierarchy.Ctr.CtrCod);
HieCfg_Shortcut (PrintView,ParCod_Ctr,Gbl.Hierarchy.Ctr.CtrCod);
}
/*****************************************************************************/
@ -713,7 +713,7 @@ static void CtrCfg_Shortcut (bool PrintView)
static void CtrCfg_QR (void)
{
HieCfg_QR (Par_CtrCod,Gbl.Hierarchy.Ctr.CtrCod);
HieCfg_QR (ParCod_Ctr,Gbl.Hierarchy.Ctr.CtrCod);
}
/*****************************************************************************/
@ -757,7 +757,7 @@ static void CtrCfg_NumDegs (void)
/* Data */
HTM_TD_Begin ("class=\"LB DAT_%s\"",The_GetSuffix ());
Frm_BeginFormGoTo (ActSeeDeg);
Par_PutParCode (Par_CtrCod,Gbl.Hierarchy.Ctr.CtrCod);
ParCod_PutPar (ParCod_Ctr,Gbl.Hierarchy.Ctr.CtrCod);
if (asprintf (&Title,Txt_Degrees_of_CENTER_X,Gbl.Hierarchy.Ctr.ShrtName) < 0)
Err_NotEnoughMemoryExit ();
HTM_BUTTON_Submit_Begin (Title,"class=\"LB BT_LINK\"");
@ -1008,7 +1008,7 @@ void CtrCfg_ChangeCtrIns (void)
struct Ins_Instit NewIns;
/***** Get parameter with institution code *****/
NewIns.InsCod = Par_GetAndCheckParCode (Par_OthInsCod);
NewIns.InsCod = ParCod_GetAndCheckPar (ParCod_OthIns);
/***** Check if institution has changed *****/
if (NewIns.InsCod != Gbl.Hierarchy.Ctr.InsCod)
@ -1061,7 +1061,7 @@ void CtrCfg_ChangeCtrPlc (void)
long NewPlcCod;
/***** Get parameter with place code *****/
NewPlcCod = Par_GetAndCheckParCodeMin (Par_PlcCod,0); // 0 (another place) is allowed here
NewPlcCod = ParCod_GetAndCheckParMin (ParCod_Plc,0); // 0 (another place) is allowed here
/***** Update place in table of centers *****/
Ctr_DB_UpdateCtrPlc (Gbl.Hierarchy.Ctr.CtrCod,NewPlcCod);

View File

@ -8,7 +8,7 @@
and used to support university teaching.
This file is part of SWAD core.
Copyright (C) 1999-2022 Antonio Cañas Vargas
Copyright (C) 1999-2023 Antonio Cañas Vargas
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as

View File

@ -6,7 +6,7 @@
and used to support university teaching.
This file is part of SWAD core.
Copyright (C) 1999-2022 Antonio Cañas Vargas
Copyright (C) 1999-2023 Antonio Cañas Vargas
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as

View File

@ -8,7 +8,7 @@
and used to support university teaching.
This file is part of SWAD core.
Copyright (C) 1999-2022 Antonio Cañas Vargas
Copyright (C) 1999-2023 Antonio Cañas Vargas
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as

View File

@ -8,7 +8,7 @@
and used to support university teaching.
This file is part of SWAD core.
Copyright (C) 1999-2022 Antonio Cañas Vargas
Copyright (C) 1999-2023 Antonio Cañas Vargas
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
@ -629,10 +629,12 @@ TODO: Emilce Barrera Mesa: Podr
TODO: Emilce Barrera Mesa: Mis estudiantes presentan muchas dificultades a la hora de poner la foto porque la plataforma es muy exigente respecto al fondo de la imagen.
*/
#define Log_PLATFORM_VERSION "SWAD 22.73 (2023-03-10)"
#define Log_PLATFORM_VERSION "SWAD 22.74 (2023-03-10)"
#define CSS_FILE "swad22.57.1.css"
#define JS_FILE "swad22.49.js"
/*
Version 22.74: Mar 10, 2023 New module swad_parameter_code. (336740 lines)
Version 22.73.1: Mar 10, 2023 Code refactoring in parameters. (336657 lines)
Version 22.73: Mar 10, 2023 Code refactoring in parameters. (336668 lines)
Version 22.72: Mar 09, 2023 Code refactoring in parameters. Not finished. (336749 lines)
Version 22.71: Mar 08, 2023 Code refactoring in parameters. Not finished. (336806 lines)

View File

@ -6,7 +6,7 @@
and used to support university teaching.
This file is part of SWAD core.
Copyright (C) 1999-2022 Antonio Cañas Vargas
Copyright (C) 1999-2023 Antonio Cañas Vargas
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as

View File

@ -8,7 +8,7 @@
and used to support university teaching.
This file is part of SWAD core.
Copyright (C) 1999-2022 Antonio Cañas Vargas
Copyright (C) 1999-2023 Antonio Cañas Vargas
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as

View File

@ -6,7 +6,7 @@
and used to support university teaching.
This file is part of SWAD core.
Copyright (C) 1999-2022 Antonio Cañas Vargas
Copyright (C) 1999-2023 Antonio Cañas Vargas
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as

View File

@ -8,7 +8,7 @@
and used to support university teaching.
This file is part of SWAD core.
Copyright (C) 1999-2022 Antonio Cañas Vargas
Copyright (C) 1999-2023 Antonio Cañas Vargas
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as

View File

@ -6,7 +6,7 @@
and used to support university teaching.
This file is part of SWAD core.
Copyright (C) 1999-2022 Antonio Cañas Vargas
Copyright (C) 1999-2023 Antonio Cañas Vargas
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General 3 License as

View File

@ -8,7 +8,7 @@
and used to support university teaching.
This file is part of SWAD core.
Copyright (C) 1999-2022 Antonio Cañas Vargas
Copyright (C) 1999-2023 Antonio Cañas Vargas
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as

Some files were not shown because too many files have changed in this diff Show More