diff --git a/Makefile b/Makefile
index 92099003..f6494d11 100644
--- a/Makefile
+++ b/Makefile
@@ -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 \
diff --git a/css/swad22.57.1.css b/css/swad22.57.1.css
index 2ab85884..7f0338a9 100644
--- a/css/swad22.57.1.css
+++ b/css/swad22.57.1.css
@@ -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
diff --git a/js/swad22.49.js b/js/swad22.49.js
index db0fe994..94f3daae 100644
--- a/js/swad22.49.js
+++ b/js/swad22.49.js
@@ -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
diff --git a/swad_API.c b/swad_API.c
index a33af6f4..b6214a6c 100644
--- a/swad_API.c
+++ b/swad_API.c
@@ -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);
diff --git a/swad_API.h b/swad_API.h
index 172ec85c..a7e6976d 100644
--- a/swad_API.h
+++ b/swad_API.h
@@ -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
diff --git a/swad_API_database.c b/swad_API_database.c
index 3c32083c..b9355114 100644
--- a/swad_API_database.c
+++ b/swad_API_database.c
@@ -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
diff --git a/swad_API_database.h b/swad_API_database.h
index 05bda516..28fc225f 100644
--- a/swad_API_database.h
+++ b/swad_API_database.h
@@ -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
diff --git a/swad_HTML.c b/swad_HTML.c
index ec66fd30..bdc995a3 100644
--- a/swad_HTML.c
+++ b/swad_HTML.c
@@ -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
diff --git a/swad_HTML.h b/swad_HTML.h
index 1e9e6593..213390dc 100644
--- a/swad_HTML.h
+++ b/swad_HTML.h
@@ -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
diff --git a/swad_ID.c b/swad_ID.c
index 8aa5d163..ce41fa19 100644
--- a/swad_ID.c
+++ b/swad_ID.c
@@ -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;
diff --git a/swad_ID.h b/swad_ID.h
index 2b8b06a4..0fabf03b 100644
--- a/swad_ID.h
+++ b/swad_ID.h
@@ -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
diff --git a/swad_ID_database.c b/swad_ID_database.c
index af0e3455..28dd8e90 100644
--- a/swad_ID_database.c
+++ b/swad_ID_database.c
@@ -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
diff --git a/swad_ID_database.h b/swad_ID_database.h
index 6f5d6ce8..efebae0e 100644
--- a/swad_ID_database.h
+++ b/swad_ID_database.h
@@ -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
diff --git a/swad_MAC.c b/swad_MAC.c
index b73ff628..3b9dbb0a 100644
--- a/swad_MAC.c
+++ b/swad_MAC.c
@@ -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);
}
}
diff --git a/swad_MAC.h b/swad_MAC.h
index e6f429cc..54292ac9 100644
--- a/swad_MAC.h
+++ b/swad_MAC.h
@@ -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
diff --git a/swad_MFU.c b/swad_MFU.c
index 6ef4b4a5..4074f37f 100644
--- a/swad_MFU.c
+++ b/swad_MFU.c
@@ -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
diff --git a/swad_MFU.h b/swad_MFU.h
index bb3d7edd..8bc8c2e9 100644
--- a/swad_MFU.h
+++ b/swad_MFU.h
@@ -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
diff --git a/swad_MFU_database.c b/swad_MFU_database.c
index 754b2264..547608bf 100644
--- a/swad_MFU_database.c
+++ b/swad_MFU_database.c
@@ -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
diff --git a/swad_MFU_database.h b/swad_MFU_database.h
index f82badc6..d7ecc06d 100644
--- a/swad_MFU_database.h
+++ b/swad_MFU_database.h
@@ -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
diff --git a/swad_QR.c b/swad_QR.c
index f23b08bd..6d02ab06 100644
--- a/swad_QR.c
+++ b/swad_QR.c
@@ -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/",
diff --git a/swad_QR.h b/swad_QR.h
index cdbd369a..935cf677 100644
--- a/swad_QR.h
+++ b/swad_QR.h
@@ -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
diff --git a/swad_RSS.c b/swad_RSS.c
index a90048e9..44c578ef 100644
--- a/swad_RSS.c
+++ b/swad_RSS.c
@@ -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
diff --git a/swad_RSS.h b/swad_RSS.h
index 84664619..b2f38460 100644
--- a/swad_RSS.h
+++ b/swad_RSS.h
@@ -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
diff --git a/swad_account.c b/swad_account.c
index 4a48b6ae..54c3b787 100644
--- a/swad_account.c
+++ b/swad_account.c
@@ -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
diff --git a/swad_account.h b/swad_account.h
index 1f152faa..8a2a2468 100644
--- a/swad_account.h
+++ b/swad_account.h
@@ -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
diff --git a/swad_account_database.c b/swad_account_database.c
index 098fd1f5..817c88c9 100644
--- a/swad_account_database.c
+++ b/swad_account_database.c
@@ -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
diff --git a/swad_account_database.h b/swad_account_database.h
index f11e4b85..ba11d6b4 100644
--- a/swad_account_database.h
+++ b/swad_account_database.h
@@ -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
diff --git a/swad_action.c b/swad_action.c
index 178ad2e6..f35e7a9f 100644
--- a/swad_action.c
+++ b/swad_action.c
@@ -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
diff --git a/swad_action.h b/swad_action.h
index d3b05c05..3a3979da 100644
--- a/swad_action.h
+++ b/swad_action.h
@@ -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
diff --git a/swad_action_list.c b/swad_action_list.c
index 8d22b501..3e09c76c 100644
--- a/swad_action_list.c
+++ b/swad_action_list.c
@@ -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
diff --git a/swad_action_list.h b/swad_action_list.h
index 857007f7..45ed9afc 100644
--- a/swad_action_list.h
+++ b/swad_action_list.h
@@ -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
diff --git a/swad_admin.c b/swad_admin.c
index ad08fa3a..c22ed5cc 100644
--- a/swad_admin.c
+++ b/swad_admin.c
@@ -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
diff --git a/swad_admin.h b/swad_admin.h
index a13baadb..2490ef6a 100644
--- a/swad_admin.h
+++ b/swad_admin.h
@@ -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
diff --git a/swad_admin_database.c b/swad_admin_database.c
index 8cc28e71..03151add 100644
--- a/swad_admin_database.c
+++ b/swad_admin_database.c
@@ -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
diff --git a/swad_admin_database.h b/swad_admin_database.h
index a36bf950..237b920e 100644
--- a/swad_admin_database.h
+++ b/swad_admin_database.h
@@ -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
diff --git a/swad_agenda.c b/swad_agenda.c
index f03cd9ff..34ea1c5b 100644
--- a/swad_agenda.c
+++ b/swad_agenda.c
@@ -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);
diff --git a/swad_agenda.h b/swad_agenda.h
index 4219a264..0b3086a9 100644
--- a/swad_agenda.h
+++ b/swad_agenda.h
@@ -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
diff --git a/swad_agenda_database.c b/swad_agenda_database.c
index 485fa197..c0f70dd3 100644
--- a/swad_agenda_database.c
+++ b/swad_agenda_database.c
@@ -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
diff --git a/swad_agenda_database.h b/swad_agenda_database.h
index f008ab97..16c93f2d 100644
--- a/swad_agenda_database.h
+++ b/swad_agenda_database.h
@@ -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
diff --git a/swad_alert.c b/swad_alert.c
index 4cc833b8..9bcf6b44 100644
--- a/swad_alert.c
+++ b/swad_alert.c
@@ -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
diff --git a/swad_alert.h b/swad_alert.h
index a7a25a4a..b09198eb 100644
--- a/swad_alert.h
+++ b/swad_alert.h
@@ -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
diff --git a/swad_announcement.c b/swad_announcement.c
index b12f42ac..62f010ab 100644
--- a/swad_announcement.c
+++ b/swad_announcement.c
@@ -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);
diff --git a/swad_announcement.h b/swad_announcement.h
index 3133871b..589a47ac 100644
--- a/swad_announcement.h
+++ b/swad_announcement.h
@@ -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
diff --git a/swad_announcement_database.c b/swad_announcement_database.c
index 60537ef2..8b0b8bd0 100644
--- a/swad_announcement_database.c
+++ b/swad_announcement_database.c
@@ -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
diff --git a/swad_announcement_database.h b/swad_announcement_database.h
index 364380c6..e46ff8f0 100644
--- a/swad_announcement_database.h
+++ b/swad_announcement_database.h
@@ -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
diff --git a/swad_assignment.c b/swad_assignment.c
index 1aa1ce6e..7505e524 100644
--- a/swad_assignment.c
+++ b/swad_assignment.c
@@ -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 %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)
{
diff --git a/swad_assignment.h b/swad_assignment.h
index f8d489e1..f813fae3 100644
--- a/swad_assignment.h
+++ b/swad_assignment.h
@@ -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
diff --git a/swad_assignment_database.c b/swad_assignment_database.c
index 36a7c0b4..d2bd1345 100644
--- a/swad_assignment_database.c
+++ b/swad_assignment_database.c
@@ -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
diff --git a/swad_assignment_database.h b/swad_assignment_database.h
index 4ff9f0c5..ec9b57fe 100644
--- a/swad_assignment_database.h
+++ b/swad_assignment_database.h
@@ -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
diff --git a/swad_assignment_resource.c b/swad_assignment_resource.c
index 56500277..6e177661 100644
--- a/swad_assignment_resource.c
+++ b/swad_assignment_resource.c
@@ -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],
diff --git a/swad_assignment_resource.h b/swad_assignment_resource.h
index e975924f..c580a6d6 100644
--- a/swad_assignment_resource.h
+++ b/swad_assignment_resource.h
@@ -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
diff --git a/swad_attendance.c b/swad_attendance.c
index c7b3e1bb..fcb08402 100644
--- a/swad_attendance.c
+++ b/swad_attendance.c
@@ -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 %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 *****/
diff --git a/swad_attendance.h b/swad_attendance.h
index 13352916..235d73b4 100644
--- a/swad_attendance.h
+++ b/swad_attendance.h
@@ -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
diff --git a/swad_attendance_database.c b/swad_attendance_database.c
index 5fd9c376..05da968b 100644
--- a/swad_attendance_database.c
+++ b/swad_attendance_database.c
@@ -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
diff --git a/swad_attendance_database.h b/swad_attendance_database.h
index 768c6eef..0312370f 100644
--- a/swad_attendance_database.h
+++ b/swad_attendance_database.h
@@ -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
diff --git a/swad_attendance_resource.c b/swad_attendance_resource.c
index f36804db..b775f6fc 100644
--- a/swad_attendance_resource.c
+++ b/swad_attendance_resource.c
@@ -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\"",
diff --git a/swad_attendance_resource.h b/swad_attendance_resource.h
index 78a87eac..a3e2b866 100644
--- a/swad_attendance_resource.h
+++ b/swad_attendance_resource.h
@@ -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
diff --git a/swad_autolink.c b/swad_autolink.c
index 3e148ace..4a3a92c7 100644
--- a/swad_autolink.c
+++ b/swad_autolink.c
@@ -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
diff --git a/swad_autolink.h b/swad_autolink.h
index 9c96d644..8da60fb9 100644
--- a/swad_autolink.h
+++ b/swad_autolink.h
@@ -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
diff --git a/swad_banner.c b/swad_banner.c
index 02c07ef5..8a8e8add 100644
--- a/swad_banner.c
+++ b/swad_banner.c
@@ -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);
diff --git a/swad_banner.h b/swad_banner.h
index 66b4cca3..46e77e32 100644
--- a/swad_banner.h
+++ b/swad_banner.h
@@ -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
diff --git a/swad_banner_database.c b/swad_banner_database.c
index ba8ee728..0e15a532 100644
--- a/swad_banner_database.c
+++ b/swad_banner_database.c
@@ -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
diff --git a/swad_banner_database.h b/swad_banner_database.h
index 27dd7628..8d6e31c7 100644
--- a/swad_banner_database.h
+++ b/swad_banner_database.h
@@ -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
diff --git a/swad_box.c b/swad_box.c
index 4dc2e868..ae8e7507 100644
--- a/swad_box.c
+++ b/swad_box.c
@@ -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
diff --git a/swad_box.h b/swad_box.h
index c282dcdf..970f998c 100644
--- a/swad_box.h
+++ b/swad_box.h
@@ -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
diff --git a/swad_browser.c b/swad_browser.c
index 534d45dc..72526bff 100644
--- a/swad_browser.c
+++ b/swad_browser.c
@@ -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);
diff --git a/swad_browser.h b/swad_browser.h
index ce08e32d..f282d9bc 100644
--- a/swad_browser.h
+++ b/swad_browser.h
@@ -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
diff --git a/swad_browser_database.c b/swad_browser_database.c
index a2ec1a62..3e99f361 100644
--- a/swad_browser_database.c
+++ b/swad_browser_database.c
@@ -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
diff --git a/swad_browser_database.h b/swad_browser_database.h
index d8cb96da..4975af32 100644
--- a/swad_browser_database.h
+++ b/swad_browser_database.h
@@ -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
diff --git a/swad_browser_resource.c b/swad_browser_resource.c
index e6830170..9a034900 100644
--- a/swad_browser_resource.c
+++ b/swad_browser_resource.c
@@ -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)
diff --git a/swad_browser_resource.h b/swad_browser_resource.h
index e07e932f..c49ff140 100644
--- a/swad_browser_resource.h
+++ b/swad_browser_resource.h
@@ -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
diff --git a/swad_browser_size.c b/swad_browser_size.c
index 9ead576d..d7569e6d 100644
--- a/swad_browser_size.c
+++ b/swad_browser_size.c
@@ -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
diff --git a/swad_browser_size.h b/swad_browser_size.h
index 1357f75b..db85905e 100644
--- a/swad_browser_size.h
+++ b/swad_browser_size.h
@@ -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
diff --git a/swad_building.c b/swad_building.c
index 6c6c9062..098dec4d 100644
--- a/swad_building.c
+++ b/swad_building.c
@@ -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);
diff --git a/swad_building.h b/swad_building.h
index e9e8319b..01bf6a27 100644
--- a/swad_building.h
+++ b/swad_building.h
@@ -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
diff --git a/swad_building_database.c b/swad_building_database.c
index 4109fd47..34c0a225 100644
--- a/swad_building_database.c
+++ b/swad_building_database.c
@@ -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
diff --git a/swad_building_database.h b/swad_building_database.h
index 2e6e96ab..70b3cae9 100644
--- a/swad_building_database.h
+++ b/swad_building_database.h
@@ -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
diff --git a/swad_button.c b/swad_button.c
index 83c93345..19cb310b 100644
--- a/swad_button.c
+++ b/swad_button.c
@@ -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
diff --git a/swad_button.h b/swad_button.h
index 5c9e77b4..8e81660c 100644
--- a/swad_button.h
+++ b/swad_button.h
@@ -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
diff --git a/swad_calendar.c b/swad_calendar.c
index 9d7bfef4..116b5e39 100644
--- a/swad_calendar.c
+++ b/swad_calendar.c
@@ -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
diff --git a/swad_calendar.h b/swad_calendar.h
index 6664962a..b65e2de2 100644
--- a/swad_calendar.h
+++ b/swad_calendar.h
@@ -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
diff --git a/swad_call_for_exam.c b/swad_call_for_exam.c
index 6b715bef..2919cf25 100644
--- a/swad_call_for_exam.c
+++ b/swad_call_for_exam.c
@@ -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));
}
/*****************************************************************************/
diff --git a/swad_call_for_exam.h b/swad_call_for_exam.h
index 3936e419..c7958847 100644
--- a/swad_call_for_exam.h
+++ b/swad_call_for_exam.h
@@ -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
diff --git a/swad_call_for_exam_database.c b/swad_call_for_exam_database.c
index c0c7ef8b..50402cba 100644
--- a/swad_call_for_exam_database.c
+++ b/swad_call_for_exam_database.c
@@ -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
diff --git a/swad_call_for_exam_database.h b/swad_call_for_exam_database.h
index 0ba94588..507e2e23 100644
--- a/swad_call_for_exam_database.h
+++ b/swad_call_for_exam_database.h
@@ -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
diff --git a/swad_call_for_exam_resource.c b/swad_call_for_exam_resource.c
index be934783..709ead55 100644
--- a/swad_call_for_exam_resource.c
+++ b/swad_call_for_exam_resource.c
@@ -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 ());
diff --git a/swad_call_for_exam_resource.h b/swad_call_for_exam_resource.h
index 3c98e06c..53558a85 100644
--- a/swad_call_for_exam_resource.h
+++ b/swad_call_for_exam_resource.h
@@ -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
diff --git a/swad_center.c b/swad_center.c
index b71d59ff..f36a5f8b 100644
--- a/swad_center.c
+++ b/swad_center.c
@@ -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));
}
diff --git a/swad_center.h b/swad_center.h
index 0a6eb60f..109d49f7 100644
--- a/swad_center.h
+++ b/swad_center.h
@@ -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
diff --git a/swad_center_config.c b/swad_center_config.c
index e9dfb28c..2d0fb30c 100644
--- a/swad_center_config.c
+++ b/swad_center_config.c
@@ -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);
diff --git a/swad_center_config.h b/swad_center_config.h
index 06055923..c09899b7 100644
--- a/swad_center_config.h
+++ b/swad_center_config.h
@@ -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
diff --git a/swad_center_database.c b/swad_center_database.c
index af106ba9..b55d163a 100644
--- a/swad_center_database.c
+++ b/swad_center_database.c
@@ -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
diff --git a/swad_center_database.h b/swad_center_database.h
index a49ba4fe..970968a7 100644
--- a/swad_center_database.h
+++ b/swad_center_database.h
@@ -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
diff --git a/swad_changelog.h b/swad_changelog.h
index e1eec609..b538c961 100644
--- a/swad_changelog.h
+++ b/swad_changelog.h
@@ -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)
diff --git a/swad_chat.c b/swad_chat.c
index b7fd8223..9dd1ae1f 100644
--- a/swad_chat.c
+++ b/swad_chat.c
@@ -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
diff --git a/swad_chat.h b/swad_chat.h
index eaf00123..bbc5b711 100644
--- a/swad_chat.h
+++ b/swad_chat.h
@@ -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
diff --git a/swad_chat_database.c b/swad_chat_database.c
index 4c24abb2..ca579158 100644
--- a/swad_chat_database.c
+++ b/swad_chat_database.c
@@ -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
diff --git a/swad_chat_database.h b/swad_chat_database.h
index f3993698..47da9723 100644
--- a/swad_chat_database.h
+++ b/swad_chat_database.h
@@ -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
diff --git a/swad_config.c b/swad_config.c
index dee06d20..e2ec6722 100644
--- a/swad_config.c
+++ b/swad_config.c
@@ -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
diff --git a/swad_config.h b/swad_config.h
index 80aa999f..772de2f2 100644
--- a/swad_config.h
+++ b/swad_config.h
@@ -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
diff --git a/swad_connected.c b/swad_connected.c
index 38965a0f..5fafe5f9 100644
--- a/swad_connected.c
+++ b/swad_connected.c
@@ -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
diff --git a/swad_connected.h b/swad_connected.h
index 47c0e3b6..2f8bcf2c 100644
--- a/swad_connected.h
+++ b/swad_connected.h
@@ -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
diff --git a/swad_connected_database.c b/swad_connected_database.c
index 731153d8..965182f7 100644
--- a/swad_connected_database.c
+++ b/swad_connected_database.c
@@ -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
diff --git a/swad_connected_database.h b/swad_connected_database.h
index fc2f4cc8..c1cf3222 100644
--- a/swad_connected_database.h
+++ b/swad_connected_database.h
@@ -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
diff --git a/swad_constant.h b/swad_constant.h
index e1477f5e..4000e594 100644
--- a/swad_constant.h
+++ b/swad_constant.h
@@ -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
diff --git a/swad_cookie.c b/swad_cookie.c
index ee0ee19d..29329805 100644
--- a/swad_cookie.c
+++ b/swad_cookie.c
@@ -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
diff --git a/swad_cookie.h b/swad_cookie.h
index 82133240..84d2c709 100644
--- a/swad_cookie.h
+++ b/swad_cookie.h
@@ -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
diff --git a/swad_cookie_database.c b/swad_cookie_database.c
index a7711bea..a5e193eb 100644
--- a/swad_cookie_database.c
+++ b/swad_cookie_database.c
@@ -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
diff --git a/swad_cookie_database.h b/swad_cookie_database.h
index 58b899f7..b156357f 100644
--- a/swad_cookie_database.h
+++ b/swad_cookie_database.h
@@ -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
diff --git a/swad_country.c b/swad_country.c
index c0eec07c..aaf525a0 100644
--- a/swad_country.c
+++ b/swad_country.c
@@ -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
@@ -47,6 +47,7 @@
#include "swad_hierarchy_level.h"
#include "swad_HTML.h"
#include "swad_parameter.h"
+#include "swad_parameter_code.h"
#include "swad_survey.h"
/*****************************************************************************/
@@ -512,7 +513,7 @@ void Cty_DrawCountryMapAndNameWithLink (struct Cty_Countr *Cty,Act_Action_t Acti
/***** Begin form *****/
Frm_BeginFormGoTo (Action);
- Par_PutParCode (Par_CtyCod,Cty->CtyCod);
+ ParCod_PutPar (ParCod_Cty,Cty->CtyCod);
/***** Begin container *****/
HTM_DIV_Begin ("class=\"%s\"",ClassContainer);
@@ -918,7 +919,7 @@ void Cty_WriteCountryName (long CtyCod)
{
/***** Write country name with link to country information *****/
Frm_BeginForm (ActSeeCtyInf);
- Par_PutParCode (Par_CtyCod,CtyCod);
+ ParCod_PutPar (ParCod_Cty,CtyCod);
HTM_BUTTON_Submit_Begin (Act_GetActionText (ActSeeCtyInf),
"class=\"BT_LINK\"");
HTM_Txt (CtyName);
@@ -1135,7 +1136,7 @@ static void Cty_ListCountriesForEdition (void)
/* Name */
HTM_TD_Begin ("class=\"LT\"");
Frm_BeginForm (ActRenCty);
- Par_PutParCode (Par_OthCtyCod,Cty->CtyCod);
+ ParCod_PutPar (ParCod_OthCty,Cty->CtyCod);
Par_PutParUnsigned (NULL,"Lan",(unsigned) Lan);
HTM_INPUT_TEXT ("Name",Cty_MAX_CHARS_NAME,Cty->Name[Lan],
HTM_SUBMIT_ON_CHANGE,
@@ -1147,7 +1148,7 @@ static void Cty_ListCountriesForEdition (void)
/* WWW */
HTM_TD_Begin ("class=\"LT\"");
Frm_BeginForm (ActChgCtyWWW);
- Par_PutParCode (Par_OthCtyCod,Cty->CtyCod);
+ ParCod_PutPar (ParCod_OthCty,Cty->CtyCod);
Par_PutParUnsigned (NULL,"Lan",(unsigned) Lan);
HTM_INPUT_URL ("WWW",Cty->WWW[Lan],HTM_SUBMIT_ON_CHANGE,
"class=\"INPUT_WWW_NARROW INPUT_%s\""
@@ -1171,7 +1172,7 @@ static void Cty_ListCountriesForEdition (void)
static void Cty_PutParOthCtyCod (void *CtyCod)
{
if (CtyCod)
- Par_PutParCode (Par_OthCtyCod,*((long *) CtyCod));
+ ParCod_PutPar (ParCod_OthCty,*((long *) CtyCod));
}
/*****************************************************************************/
@@ -1187,7 +1188,7 @@ void Cty_RemoveCountry (void)
Cty_EditingCountryConstructor ();
/***** Get country code *****/
- Cty_EditingCty->CtyCod = Par_GetAndCheckParCode (Par_OthCtyCod);
+ Cty_EditingCty->CtyCod = ParCod_GetAndCheckPar (ParCod_OthCty);
/***** Get data of the country from database *****/
Cty_GetDataOfCountryByCod (Cty_EditingCty);
@@ -1248,7 +1249,7 @@ void Cty_RenameCountry (void)
Cty_EditingCountryConstructor ();
/***** Get the code of the country *****/
- Cty_EditingCty->CtyCod = Par_GetAndCheckParCode (Par_OthCtyCod);
+ Cty_EditingCty->CtyCod = ParCod_GetAndCheckPar (ParCod_OthCty);
/***** Get the lenguage *****/
Language = Lan_GetParLanguage ();
@@ -1327,7 +1328,7 @@ void Cty_ChangeCtyWWW (void)
Cty_EditingCountryConstructor ();
/***** Get the code of the country *****/
- Cty_EditingCty->CtyCod = Par_GetAndCheckParCode (Par_OthCtyCod);
+ Cty_EditingCty->CtyCod = ParCod_GetAndCheckPar (ParCod_OthCty);
/***** Get the lenguage *****/
Language = Lan_GetParLanguage ();
@@ -1393,7 +1394,7 @@ static void Cty_ShowAlertAndButtonToGoToCty (void)
static void Cty_PutParGoToCty (void *CtyCod)
{
if (CtyCod)
- Par_PutParCode (Par_CtyCod,*((long *) CtyCod));
+ ParCod_PutPar (ParCod_Cty,*((long *) CtyCod));
}
/*****************************************************************************/
@@ -1434,7 +1435,7 @@ static void Cty_PutFormToCreateCountry (void)
snprintf (StrCtyCod,sizeof (StrCtyCod),"%03ld",Cty_EditingCty->CtyCod);
else
StrCtyCod[0] = '\0';
- HTM_INPUT_TEXT (Par_CodeStr[Par_OthCtyCod],3,StrCtyCod,HTM_DONT_SUBMIT_ON_CHANGE,
+ HTM_INPUT_TEXT (Par_CodeStr[ParCod_OthCty],3,StrCtyCod,HTM_DONT_SUBMIT_ON_CHANGE,
"size=\"3\" class=\"INPUT_%s\""
" required=\"required\"",
The_GetSuffix ());
@@ -1556,7 +1557,7 @@ void Cty_ReceiveFormNewCountry (void)
/***** Get parameters from form *****/
/* Get numeric country code */
- if ((Cty_EditingCty->CtyCod = Par_GetParCode (Par_OthCtyCod)) < 0)
+ if ((Cty_EditingCty->CtyCod = ParCod_GetPar (ParCod_OthCty)) < 0)
{
Ale_CreateAlert (Ale_WARNING,NULL,
Txt_You_must_specify_the_numerical_code_of_the_new_country);
diff --git a/swad_country.h b/swad_country.h
index 38485cba..9c91092e 100644
--- a/swad_country.h
+++ b/swad_country.h
@@ -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
diff --git a/swad_country_config.c b/swad_country_config.c
index 3f49a88b..6638f02d 100644
--- a/swad_country_config.c
+++ b/swad_country_config.c
@@ -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
@@ -425,7 +425,7 @@ static void CtyCfg_Name (bool PutLink)
static void CtyCfg_Shortcut (bool PrintView)
{
- HieCfg_Shortcut (PrintView,Par_CtyCod,Gbl.Hierarchy.Cty.CtyCod);
+ HieCfg_Shortcut (PrintView,ParCod_Cty,Gbl.Hierarchy.Cty.CtyCod);
}
/*****************************************************************************/
@@ -434,7 +434,7 @@ static void CtyCfg_Shortcut (bool PrintView)
static void CtyCfg_QR (void)
{
- HieCfg_QR (Par_CtyCod,Gbl.Hierarchy.Cty.CtyCod);
+ HieCfg_QR (ParCod_Cty,Gbl.Hierarchy.Cty.CtyCod);
}
/*****************************************************************************/
@@ -478,7 +478,7 @@ static void CtyCfg_NumInss (void)
/* Data */
HTM_TD_Begin ("class=\"LT DAT_%s\"",The_GetSuffix ());
Frm_BeginFormGoTo (ActSeeIns);
- Par_PutParCode (Par_CtyCod,Gbl.Hierarchy.Cty.CtyCod);
+ ParCod_PutPar (ParCod_Cty,Gbl.Hierarchy.Cty.CtyCod);
if (asprintf (&Title,Txt_Institutions_of_COUNTRY_X,
Gbl.Hierarchy.Cty.Name[Gbl.Prefs.Language]) < 0)
Err_NotEnoughMemoryExit ();
diff --git a/swad_country_config.h b/swad_country_config.h
index 75d6cdf3..c9685e9a 100644
--- a/swad_country_config.h
+++ b/swad_country_config.h
@@ -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
diff --git a/swad_country_database.c b/swad_country_database.c
index 48acb41d..fdc558f7 100644
--- a/swad_country_database.c
+++ b/swad_country_database.c
@@ -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
diff --git a/swad_country_database.h b/swad_country_database.h
index d08c098b..90c414e9 100644
--- a/swad_country_database.h
+++ b/swad_country_database.h
@@ -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
diff --git a/swad_course.c b/swad_course.c
index 4a83b662..d4b8cba4 100644
--- a/swad_course.c
+++ b/swad_course.c
@@ -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
@@ -63,6 +63,7 @@
#include "swad_notice_database.h"
#include "swad_notification_database.h"
#include "swad_parameter.h"
+#include "swad_parameter_code.h"
#include "swad_project.h"
#include "swad_record_database.h"
#include "swad_search.h"
@@ -219,7 +220,7 @@ static void Crs_WriteListMyCoursesToSelectOne (void)
IsLastItemInLevel[2] = (NumCty == NumCtys - 1);
Lay_IndentDependingOnLevel (2,IsLastItemInLevel);
Frm_BeginForm (ActMyCrs);
- Par_PutParCode (Par_CtyCod,Hie.Cty.CtyCod);
+ ParCod_PutPar (ParCod_Cty,Hie.Cty.CtyCod);
HTM_BUTTON_Submit_Begin (Act_GetActionText (ActSeeCtyInf),
"class=\"BT_LINK FORM_IN_%s\"",
The_GetSuffix ());
@@ -253,7 +254,7 @@ static void Crs_WriteListMyCoursesToSelectOne (void)
IsLastItemInLevel[3] = (NumIns == NumInss - 1);
Lay_IndentDependingOnLevel (3,IsLastItemInLevel);
Frm_BeginForm (ActMyCrs);
- Par_PutParCode (Par_InsCod,Hie.Ins.InsCod);
+ ParCod_PutPar (ParCod_Ins,Hie.Ins.InsCod);
HTM_BUTTON_Submit_Begin (Act_GetActionText (ActSeeInsInf),
"class=\"BT_LINK FORM_IN_%s\"",
The_GetSuffix ());
@@ -287,7 +288,7 @@ static void Crs_WriteListMyCoursesToSelectOne (void)
IsLastItemInLevel[4] = (NumCtr == NumCtrs - 1);
Lay_IndentDependingOnLevel (4,IsLastItemInLevel);
Frm_BeginForm (ActMyCrs);
- Par_PutParCode (Par_CtrCod,Hie.Ctr.CtrCod);
+ ParCod_PutPar (ParCod_Ctr,Hie.Ctr.CtrCod);
HTM_BUTTON_Submit_Begin (Act_GetActionText (ActSeeCtrInf),
"class=\"BT_LINK FORM_IN_%s\"",
The_GetSuffix ());
@@ -321,7 +322,7 @@ static void Crs_WriteListMyCoursesToSelectOne (void)
IsLastItemInLevel[5] = (NumDeg == NumDegs - 1);
Lay_IndentDependingOnLevel (5,IsLastItemInLevel);
Frm_BeginForm (ActMyCrs);
- Par_PutParCode (Par_DegCod,Hie.Deg.DegCod);
+ ParCod_PutPar (ParCod_Deg,Hie.Deg.DegCod);
HTM_BUTTON_Submit_Begin (Act_GetActionText (ActSeeDegInf),
"class=\"BT_LINK FORM_IN_%s\"",
The_GetSuffix ());
@@ -355,7 +356,7 @@ static void Crs_WriteListMyCoursesToSelectOne (void)
IsLastItemInLevel[6] = (NumCrs == NumCrss - 1);
Lay_IndentDependingOnLevel (6,IsLastItemInLevel);
Frm_BeginForm (ActMyCrs);
- Par_PutParCode (Par_CrsCod,Hie.Crs.CrsCod);
+ ParCod_PutPar (ParCod_Crs,Hie.Crs.CrsCod);
HTM_BUTTON_Submit_Begin (Str_BuildGoToTitle (Hie.Crs.ShrtName),
"class=\"BT_LINK FORM_IN_%s\"",
The_GetSuffix ());
@@ -994,7 +995,7 @@ static bool Crs_ListCoursesOfAYearForSeeing (unsigned Year)
HTM_TD_Begin ("class=\"LM %s_%s %s\"",
TxtClassStrong,The_GetSuffix (),BgColor);
Frm_BeginFormGoTo (ActSeeCrsInf);
- Par_PutParCode (Par_CrsCod,Crs->CrsCod);
+ ParCod_PutPar (ParCod_Crs,Crs->CrsCod);
HTM_BUTTON_Submit_Begin (Str_BuildGoToTitle (Crs->FullName),
"class=\"LM BT_LINK\"");
Str_FreeGoToTitle ();
@@ -1188,7 +1189,7 @@ static void Crs_ListCoursesOfAYearForEdition (unsigned Year)
if (ICanEdit)
{
Frm_BeginForm (ActChgInsCrsCod);
- Par_PutParCode (Par_OthHieCod,Crs->CrsCod);
+ ParCod_PutPar (ParCod_OthHie,Crs->CrsCod);
HTM_INPUT_TEXT ("InsCrsCod",Crs_MAX_CHARS_INSTITUTIONAL_CRS_COD,
Crs->InstitutionalCrsCod,HTM_SUBMIT_ON_CHANGE,
"class=\"INPUT_INS_CODE INPUT_%s\"",
@@ -1204,7 +1205,7 @@ static void Crs_ListCoursesOfAYearForEdition (unsigned Year)
if (ICanEdit)
{
Frm_BeginForm (ActChgCrsYea);
- Par_PutParCode (Par_OthHieCod,Crs->CrsCod);
+ ParCod_PutPar (ParCod_OthHie,Crs->CrsCod);
HTM_SELECT_Begin (HTM_SUBMIT_ON_CHANGE,
"name=\"OthCrsYear\""
" class=\"HIE_SEL_NARROW INPUT_%s\"",
@@ -1229,7 +1230,7 @@ static void Crs_ListCoursesOfAYearForEdition (unsigned Year)
if (ICanEdit)
{
Frm_BeginForm (ActRenCrsSho);
- Par_PutParCode (Par_OthHieCod,Crs->CrsCod);
+ ParCod_PutPar (ParCod_OthHie,Crs->CrsCod);
HTM_INPUT_TEXT ("ShortName",Cns_HIERARCHY_MAX_CHARS_SHRT_NAME,Crs->ShrtName,
HTM_SUBMIT_ON_CHANGE,
"class=\"INPUT_SHORT_NAME INPUT_%s\"",
@@ -1245,7 +1246,7 @@ static void Crs_ListCoursesOfAYearForEdition (unsigned Year)
if (ICanEdit)
{
Frm_BeginForm (ActRenCrsFul);
- Par_PutParCode (Par_OthHieCod,Crs->CrsCod);
+ ParCod_PutPar (ParCod_OthHie,Crs->CrsCod);
HTM_INPUT_TEXT ("FullName",Cns_HIERARCHY_MAX_CHARS_FULL_NAME,Crs->FullName,
HTM_SUBMIT_ON_CHANGE,
"class=\"INPUT_FULL_NAME INPUT_%s\"",
@@ -1581,7 +1582,7 @@ void Crs_RemoveCourse (void)
Crs_EditingCourseConstructor ();
/***** Get course code *****/
- Crs_EditingCrs->CrsCod = Par_GetAndCheckParCode (Par_OthHieCod);
+ Crs_EditingCrs->CrsCod = ParCod_GetAndCheckPar (ParCod_OthHie);
/***** Get data of the course from database *****/
Crs_GetDataOfCourseByCod (Crs_EditingCrs);
@@ -1816,7 +1817,7 @@ void Crs_ChangeInsCrsCod (void)
/***** Get parameters from form *****/
/* Get course code */
- Crs_EditingCrs->CrsCod = Par_GetAndCheckParCode (Par_OthHieCod);
+ Crs_EditingCrs->CrsCod = ParCod_GetAndCheckPar (ParCod_OthHie);
/* Get institutional code */
Par_GetParText ("InsCrsCod",NewInstitutionalCrsCod,Crs_MAX_BYTES_INSTITUTIONAL_CRS_COD);
@@ -1862,7 +1863,7 @@ void Crs_ChangeCrsYear (void)
/***** Get parameters from form *****/
/* Get course code */
- Crs_EditingCrs->CrsCod = Par_GetAndCheckParCode (Par_OthHieCod);
+ Crs_EditingCrs->CrsCod = ParCod_GetAndCheckPar (ParCod_OthHie);
/* Get parameter with year */
Par_GetParText ("OthCrsYear",YearStr,2);
@@ -1945,7 +1946,7 @@ void Crs_RenameCourseShort (void)
Crs_EditingCourseConstructor ();
/***** Rename course *****/
- Crs_EditingCrs->CrsCod = Par_GetAndCheckParCode (Par_OthHieCod);
+ Crs_EditingCrs->CrsCod = ParCod_GetAndCheckPar (ParCod_OthHie);
Crs_RenameCourse (Crs_EditingCrs,Cns_SHRT_NAME);
}
@@ -1955,7 +1956,7 @@ void Crs_RenameCourseFull (void)
Crs_EditingCourseConstructor ();
/***** Rename course *****/
- Crs_EditingCrs->CrsCod = Par_GetAndCheckParCode (Par_OthHieCod);
+ Crs_EditingCrs->CrsCod = ParCod_GetAndCheckPar (ParCod_OthHie);
Crs_RenameCourse (Crs_EditingCrs,Cns_FULL_NAME);
}
@@ -2051,7 +2052,7 @@ void Crs_ChangeCrsStatus (void)
/***** Get parameters from form *****/
/* Get course code */
- Crs_EditingCrs->CrsCod = Par_GetAndCheckParCode (Par_OthHieCod);
+ Crs_EditingCrs->CrsCod = ParCod_GetAndCheckPar (ParCod_OthHie);
/* Get parameter with status */
Status = Hie_GetParStatus (); // New status
@@ -2138,7 +2139,7 @@ static void Crs_PutButtonToGoToCrs (void)
if (Crs_EditingCrs->CrsCod != Gbl.Hierarchy.Crs.CrsCod)
{
Frm_BeginForm (ActSeeCrsInf);
- Par_PutParCode (Par_CrsCod,Crs_EditingCrs->CrsCod);
+ ParCod_PutPar (ParCod_Crs,Crs_EditingCrs->CrsCod);
Btn_PutConfirmButton (Str_BuildGoToTitle (Crs_EditingCrs->ShrtName));
Str_FreeGoToTitle ();
Frm_EndForm ();
@@ -2157,7 +2158,7 @@ static void Crs_PutButtonToRegisterInCrs (void)
Frm_BeginForm (ActReqSignUp);
// If the course being edited is different to the current one...
if (Crs_EditingCrs->CrsCod != Gbl.Hierarchy.Crs.CrsCod)
- Par_PutParCode (Par_CrsCod,Crs_EditingCrs->CrsCod);
+ ParCod_PutPar (ParCod_Crs,Crs_EditingCrs->CrsCod);
if (asprintf (&TxtButton,Txt_Register_me_in_X,Crs_EditingCrs->ShrtName) < 0)
Err_NotEnoughMemoryExit ();
@@ -2445,7 +2446,7 @@ static void Crs_WriteRowCrsData (unsigned NumCrs,MYSQL_ROW row,bool WriteColumnA
HTM_TD_Begin ("class=\"LT %s_%s %s\"",
ClassTxt,The_GetSuffix (),BgColor);
Frm_BeginFormGoTo (ActSeeDegInf);
- Par_PutParCode (Par_DegCod,Deg.DegCod);
+ ParCod_PutPar (ParCod_Deg,Deg.DegCod);
HTM_BUTTON_Submit_Begin (Str_BuildGoToTitle (row[2]),
"class=\"LT BT_LINK\"");
Str_FreeGoToTitle ();
@@ -2465,7 +2466,7 @@ static void Crs_WriteRowCrsData (unsigned NumCrs,MYSQL_ROW row,bool WriteColumnA
HTM_TD_Begin ("class=\"LT %s_%s %s\"",
ClassTxt,The_GetSuffix (),BgColor);
Frm_BeginFormGoTo (ActSeeCrsInf);
- Par_PutParCode (Par_CrsCod,CrsCod);
+ ParCod_PutPar (ParCod_Crs,CrsCod);
HTM_BUTTON_Submit_Begin (Str_BuildGoToTitle (row[5]),
"class=\"LT BT_LINK\"");
Str_FreeGoToTitle ();
diff --git a/swad_course.h b/swad_course.h
index b8749f24..7c264302 100644
--- a/swad_course.h
+++ b/swad_course.h
@@ -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
diff --git a/swad_course_config.c b/swad_course_config.c
index de476989..ed0a641e 100644
--- a/swad_course_config.c
+++ b/swad_course_config.c
@@ -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
@@ -219,7 +219,7 @@ static void CrsCfg_Degree (bool PrintView,bool PutForm)
HTM_TR_Begin (NULL);
/* Label */
- Frm_LabelColumn ("RT",PutForm ? Par_CodeStr[Par_OthDegCod] :
+ Frm_LabelColumn ("RT",PutForm ? Par_CodeStr[ParCod_OthDeg] :
NULL,
Txt_Degree);
@@ -253,7 +253,7 @@ static void CrsCfg_Degree (bool PrintView,bool PutForm)
if (!PrintView)
{
Frm_BeginFormGoTo (ActSeeDegInf);
- Par_PutParCode (Par_DegCod,Gbl.Hierarchy.Deg.DegCod);
+ ParCod_PutPar (ParCod_Deg,Gbl.Hierarchy.Deg.DegCod);
HTM_BUTTON_Submit_Begin (Str_BuildGoToTitle (Gbl.Hierarchy.Deg.ShrtName),
"class=\"LT BT_LINK\"");
Str_FreeGoToTitle ();
@@ -404,7 +404,7 @@ static void CrsCfg_InternalCode (void)
static void CrsCfg_Shortcut (bool PrintView)
{
- HieCfg_Shortcut (PrintView,Par_CrsCod,Gbl.Hierarchy.Crs.CrsCod);
+ HieCfg_Shortcut (PrintView,ParCod_Crs,Gbl.Hierarchy.Crs.CrsCod);
}
/*****************************************************************************/
@@ -413,7 +413,7 @@ static void CrsCfg_Shortcut (bool PrintView)
static void CrsCfg_QR (void)
{
- HieCfg_QR (Par_CrsCod,Gbl.Hierarchy.Crs.CrsCod);
+ HieCfg_QR (ParCod_Crs,Gbl.Hierarchy.Crs.CrsCod);
}
/*****************************************************************************/
@@ -473,7 +473,7 @@ void CrsCfg_ChangeCrsDeg (void)
struct Deg_Degree NewDeg;
/***** Get parameter with degree code *****/
- NewDeg.DegCod = Par_GetAndCheckParCode (Par_OthDegCod);
+ NewDeg.DegCod = ParCod_GetAndCheckPar (ParCod_OthDeg);
/***** Check if degree has changed *****/
if (NewDeg.DegCod != Gbl.Hierarchy.Crs.DegCod)
diff --git a/swad_course_config.h b/swad_course_config.h
index ed342396..082cf147 100644
--- a/swad_course_config.h
+++ b/swad_course_config.h
@@ -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
diff --git a/swad_course_database.c b/swad_course_database.c
index e04c8a2c..256e73ca 100644
--- a/swad_course_database.c
+++ b/swad_course_database.c
@@ -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
diff --git a/swad_course_database.h b/swad_course_database.h
index 999fe46e..3b71c870 100644
--- a/swad_course_database.h
+++ b/swad_course_database.h
@@ -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
diff --git a/swad_cryptography.c b/swad_cryptography.c
index 57d63e63..24bbbc51 100644
--- a/swad_cryptography.c
+++ b/swad_cryptography.c
@@ -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
diff --git a/swad_cryptography.h b/swad_cryptography.h
index ead6f91e..29df5f97 100644
--- a/swad_cryptography.h
+++ b/swad_cryptography.h
@@ -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
diff --git a/swad_database.c b/swad_database.c
index f08c7733..330dc9ac 100644
--- a/swad_database.c
+++ b/swad_database.c
@@ -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
diff --git a/swad_database.h b/swad_database.h
index aaeb829f..872531db 100644
--- a/swad_database.h
+++ b/swad_database.h
@@ -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
diff --git a/swad_date.c b/swad_date.c
index b64192a0..a51c2776 100644
--- a/swad_date.c
+++ b/swad_date.c
@@ -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
diff --git a/swad_date.h b/swad_date.h
index c9ea39f1..e2bbc14b 100644
--- a/swad_date.h
+++ b/swad_date.h
@@ -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
diff --git a/swad_degree.c b/swad_degree.c
index ae4fe78a..025c4ee8 100644
--- a/swad_degree.c
+++ b/swad_degree.c
@@ -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_photo_database.h"
#include "swad_survey.h"
@@ -194,7 +195,7 @@ void Deg_DrawDegreeLogoAndNameWithLink (struct Deg_Degree *Deg,Act_Action_t Acti
{
/***** Begin form *****/
Frm_BeginFormGoTo (Action);
- Par_PutParCode (Par_DegCod,Deg->DegCod);
+ ParCod_PutPar (ParCod_Deg,Deg->DegCod);
/***** Link to action *****/
HTM_BUTTON_Submit_Begin (Str_BuildGoToTitle (Deg->FullName),
@@ -370,7 +371,7 @@ static void Deg_ListDegreesForEdition (const struct DegTyp_DegTypes *DegTypes)
if (ICanEdit)
{
Frm_BeginForm (ActRenDegSho);
- Par_PutParCode (Par_OthHieCod,Deg->DegCod);
+ ParCod_PutPar (ParCod_OthHie,Deg->DegCod);
HTM_INPUT_TEXT ("ShortName",Cns_HIERARCHY_MAX_CHARS_SHRT_NAME,Deg->ShrtName,
HTM_SUBMIT_ON_CHANGE,
"class=\"INPUT_SHORT_NAME INPUT_%s\"",
@@ -386,7 +387,7 @@ static void Deg_ListDegreesForEdition (const struct DegTyp_DegTypes *DegTypes)
if (ICanEdit)
{
Frm_BeginForm (ActRenDegFul);
- Par_PutParCode (Par_OthHieCod,Deg->DegCod);
+ ParCod_PutPar (ParCod_OthHie,Deg->DegCod);
HTM_INPUT_TEXT ("FullName",Cns_HIERARCHY_MAX_CHARS_FULL_NAME,Deg->FullName,
HTM_SUBMIT_ON_CHANGE,
"class=\"INPUT_FULL_NAME INPUT_%s\"",
@@ -402,7 +403,7 @@ static void Deg_ListDegreesForEdition (const struct DegTyp_DegTypes *DegTypes)
if (ICanEdit)
{
Frm_BeginForm (ActChgDegTyp);
- Par_PutParCode (Par_OthHieCod,Deg->DegCod);
+ ParCod_PutPar (ParCod_OthHie,Deg->DegCod);
HTM_SELECT_Begin (HTM_SUBMIT_ON_CHANGE,
"name=\"OthDegTypCod\""
" class=\"HIE_SEL_NARROW INPUT_%s\"",
@@ -433,7 +434,7 @@ static void Deg_ListDegreesForEdition (const struct DegTyp_DegTypes *DegTypes)
if (ICanEdit)
{
Frm_BeginForm (ActChgDegWWW);
- Par_PutParCode (Par_OthHieCod,Deg->DegCod);
+ ParCod_PutPar (ParCod_OthHie,Deg->DegCod);
HTM_INPUT_URL ("WWW",Deg->WWW,HTM_SUBMIT_ON_CHANGE,
"class=\"INPUT_WWW_NARROW INPUT_%s\""
" required=\"required\"",
@@ -1096,7 +1097,7 @@ static void Deg_ReceiveFormRequestOrCreateDeg (Hie_Status_t Status)
Par_GetParText ("FullName" ,Deg_EditingDeg->FullName,Cns_HIERARCHY_MAX_BYTES_FULL_NAME);
/* Get degree type */
- Deg_EditingDeg->DegTypCod = Par_GetAndCheckParCode (Par_OthDegTypCod);
+ Deg_EditingDeg->DegTypCod = ParCod_GetAndCheckPar (ParCod_OthDegTyp);
/* Get degree WWW */
Par_GetParText ("WWW",Deg_EditingDeg->WWW,Cns_MAX_BYTES_WWW);
@@ -1145,7 +1146,7 @@ void Deg_RemoveDegree (void)
Deg_EditingDegreeConstructor ();
/***** Get degree code *****/
- Deg_EditingDeg->DegCod = Par_GetAndCheckParCode (Par_OthHieCod);
+ Deg_EditingDeg->DegCod = ParCod_GetAndCheckPar (ParCod_OthHie);
/***** Get data of degree *****/
Deg_GetDataOfDegreeByCod (Deg_EditingDeg);
@@ -1304,7 +1305,7 @@ void Deg_RenameDegreeShort (void)
Deg_EditingDegreeConstructor ();
/***** Rename degree *****/
- Deg_EditingDeg->DegCod = Par_GetAndCheckParCode (Par_OthHieCod);
+ Deg_EditingDeg->DegCod = ParCod_GetAndCheckPar (ParCod_OthHie);
Deg_RenameDegree (Deg_EditingDeg,Cns_SHRT_NAME);
}
@@ -1314,7 +1315,7 @@ void Deg_RenameDegreeFull (void)
Deg_EditingDegreeConstructor ();
/***** Rename degree *****/
- Deg_EditingDeg->DegCod = Par_GetAndCheckParCode (Par_OthHieCod);
+ Deg_EditingDeg->DegCod = ParCod_GetAndCheckPar (ParCod_OthHie);
Deg_RenameDegree (Deg_EditingDeg,Cns_FULL_NAME);
}
@@ -1404,10 +1405,10 @@ void Deg_ChangeDegreeType (void)
/***** Get parameters from form *****/
/* Get degree code */
- Deg_EditingDeg->DegCod = Par_GetAndCheckParCode (Par_OthHieCod);
+ Deg_EditingDeg->DegCod = ParCod_GetAndCheckPar (ParCod_OthHie);
/* Get the new degree type */
- NewDegTypCod = Par_GetAndCheckParCode (Par_OthDegTypCod);
+ NewDegTypCod = ParCod_GetAndCheckPar (ParCod_OthDegTyp);
/***** Get data of degree *****/
Deg_GetDataOfDegreeByCod (Deg_EditingDeg);
@@ -1437,7 +1438,7 @@ void Deg_ChangeDegWWW (void)
/***** Get parameters from form *****/
/* Get the code of the degree */
- Deg_EditingDeg->DegCod = Par_GetAndCheckParCode (Par_OthHieCod);
+ Deg_EditingDeg->DegCod = ParCod_GetAndCheckPar (ParCod_OthHie);
/* Get the new WWW for the degree */
Par_GetParText ("WWW",NewWWW,Cns_MAX_BYTES_WWW);
@@ -1476,7 +1477,7 @@ void Deg_ChangeDegStatus (void)
/***** Get parameters from form *****/
/* Get degree code */
- Deg_EditingDeg->DegCod = Par_GetAndCheckParCode (Par_OthHieCod);
+ Deg_EditingDeg->DegCod = ParCod_GetAndCheckPar (ParCod_OthHie);
/* Get parameter with status */
Status = Hie_GetParStatus (); // New status
@@ -1991,5 +1992,5 @@ bool Deg_CheckIfUsrBelongsToDeg (long UsrCod,long DegCod)
static void Deg_PutParDegCod (void *DegCod)
{
if (DegCod)
- Par_PutParCode (Par_DegCod,*((long *) DegCod));
+ ParCod_PutPar (ParCod_Deg,*((long *) DegCod));
}
diff --git a/swad_degree.h b/swad_degree.h
index 31bd897e..280e870d 100644
--- a/swad_degree.h
+++ b/swad_degree.h
@@ -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
diff --git a/swad_degree_config.c b/swad_degree_config.c
index de844979..1d69cfe3 100644
--- a/swad_degree_config.c
+++ b/swad_degree_config.c
@@ -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
@@ -214,7 +214,7 @@ static void DegCfg_Center (bool PrintView,bool PutForm)
HTM_TR_Begin (NULL);
/* Label */
- Frm_LabelColumn ("RT",PutForm ? Par_CodeStr[Par_OthCtrCod] :
+ Frm_LabelColumn ("RT",PutForm ? Par_CodeStr[ParCod_OthCtr] :
NULL,
Txt_Center);
@@ -248,7 +248,7 @@ static void DegCfg_Center (bool PrintView,bool PutForm)
if (!PrintView)
{
Frm_BeginFormGoTo (ActSeeCtrInf);
- Par_PutParCode (Par_CtrCod,Gbl.Hierarchy.Ctr.CtrCod);
+ ParCod_PutPar (ParCod_Ctr,Gbl.Hierarchy.Ctr.CtrCod);
HTM_BUTTON_Submit_Begin (Str_BuildGoToTitle (Gbl.Hierarchy.Ctr.ShrtName),
"class=\"LB BT_LINK\"");
Str_FreeGoToTitle ();
@@ -304,7 +304,7 @@ static void DegCfg_WWW (bool PrintView,bool PutForm)
static void DegCfg_Shortcut (bool PrintView)
{
- HieCfg_Shortcut (PrintView,Par_DegCod,Gbl.Hierarchy.Deg.DegCod);
+ HieCfg_Shortcut (PrintView,ParCod_Deg,Gbl.Hierarchy.Deg.DegCod);
}
/*****************************************************************************/
@@ -313,7 +313,7 @@ static void DegCfg_Shortcut (bool PrintView)
static void DegCfg_QR (void)
{
- HieCfg_QR (Par_DegCod,Gbl.Hierarchy.Deg.DegCod);
+ HieCfg_QR (ParCod_Deg,Gbl.Hierarchy.Deg.DegCod);
}
/*****************************************************************************/
@@ -336,7 +336,7 @@ static void DegCfg_NumCrss (void)
/* Data */
HTM_TD_Begin ("class=\"LB DAT_%s\"",The_GetSuffix ());
Frm_BeginFormGoTo (ActSeeCrs);
- Par_PutParCode (Par_DegCod,Gbl.Hierarchy.Deg.DegCod);
+ ParCod_PutPar (ParCod_Deg,Gbl.Hierarchy.Deg.DegCod);
if (asprintf (&Title,Txt_Courses_of_DEGREE_X,Gbl.Hierarchy.Deg.ShrtName) < 0)
Err_NotEnoughMemoryExit ();
HTM_BUTTON_Submit_Begin (Title,"class=\"LB BT_LINK\"");
@@ -361,7 +361,7 @@ void DegCfg_ChangeDegCtr (void)
struct Ctr_Center NewCtr;
/***** Get parameter with center code *****/
- NewCtr.CtrCod = Par_GetAndCheckParCode (Par_OthCtrCod);
+ NewCtr.CtrCod = ParCod_GetAndCheckPar (ParCod_OthCtr);
/***** Check if center has changed *****/
if (NewCtr.CtrCod != Gbl.Hierarchy.Deg.CtrCod)
diff --git a/swad_degree_config.h b/swad_degree_config.h
index ad7df254..a13103ab 100644
--- a/swad_degree_config.h
+++ b/swad_degree_config.h
@@ -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
diff --git a/swad_degree_database.c b/swad_degree_database.c
index 4f9c3385..e37e0305 100644
--- a/swad_degree_database.c
+++ b/swad_degree_database.c
@@ -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
diff --git a/swad_degree_database.h b/swad_degree_database.h
index 2a6bfc59..9f791d58 100644
--- a/swad_degree_database.h
+++ b/swad_degree_database.h
@@ -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
diff --git a/swad_degree_type.c b/swad_degree_type.c
index 1cb375d9..afddf297 100644
--- a/swad_degree_type.c
+++ b/swad_degree_type.c
@@ -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
@@ -47,6 +47,7 @@
#include "swad_hierarchy_level.h"
#include "swad_HTML.h"
#include "swad_parameter.h"
+#include "swad_parameter_code.h"
/*****************************************************************************/
/************** External global variables from others modules ****************/
@@ -700,7 +701,7 @@ void DegTyp_RemoveDegreeType (void)
DegTyp_EditingDegreeTypeConstructor ();
/***** Get the code of the degree type *****/
- DegTyp_EditingDegTyp->DegTypCod = Par_GetAndCheckParCode (Par_OthDegTypCod);
+ DegTyp_EditingDegTyp->DegTypCod = ParCod_GetAndCheckPar (ParCod_OthDegTyp);
/***** Get data of the degree type from database *****/
if (!DegTyp_GetDataOfDegreeTypeByCod (DegTyp_EditingDegTyp))
@@ -729,7 +730,7 @@ void DegTyp_RemoveDegreeType (void)
static void DegTyp_PutParOtherDegTypCod (void *DegTypCod)
{
if (DegTypCod)
- Par_PutParCode (Par_OthDegTypCod,*((long *) DegTypCod));
+ ParCod_PutPar (ParCod_OthDegTyp,*((long *) DegTypCod));
}
/*****************************************************************************/
@@ -810,7 +811,7 @@ void DegTyp_RenameDegreeType (void)
/***** Get parameters from form *****/
/* Get the code of the degree type */
- DegTyp_EditingDegTyp->DegTypCod = Par_GetAndCheckParCode (Par_OthDegTypCod);
+ DegTyp_EditingDegTyp->DegTypCod = ParCod_GetAndCheckPar (ParCod_OthDegTyp);
/* Get the new name for the degree type */
Par_GetParText ("DegTypName",NewNameDegTyp,DegTyp_MAX_BYTES_DEGREE_TYPE_NAME);
diff --git a/swad_degree_type.h b/swad_degree_type.h
index 1b758fa9..0fd46728 100644
--- a/swad_degree_type.h
+++ b/swad_degree_type.h
@@ -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
diff --git a/swad_department.c b/swad_department.c
index 6b0255ba..33bd157f 100644
--- a/swad_department.c
+++ b/swad_department.c
@@ -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
@@ -46,6 +46,7 @@
#include "swad_institution.h"
#include "swad_language.h"
#include "swad_parameter.h"
+#include "swad_parameter_code.h"
#include "swad_string.h"
/*****************************************************************************/
@@ -488,7 +489,7 @@ static void Dpt_ListDepartmentsForEdition (const struct Dpt_Departments *Departm
/* Institution */
HTM_TD_Begin ("class=\"CM\"");
Frm_BeginForm (ActChgDptIns);
- Par_PutParCode (Par_DptCod,Dpt->DptCod);
+ ParCod_PutPar (ParCod_Dpt,Dpt->DptCod);
HTM_SELECT_Begin (HTM_SUBMIT_ON_CHANGE,
"name=\"OthInsCod\""
" class=\"HIE_SEL_NARROW INPUT_%s\"",
@@ -508,7 +509,7 @@ static void Dpt_ListDepartmentsForEdition (const struct Dpt_Departments *Departm
/* Department short name */
HTM_TD_Begin ("class=\"CM\"");
Frm_BeginForm (ActRenDptSho);
- Par_PutParCode (Par_DptCod,Dpt->DptCod);
+ ParCod_PutPar (ParCod_Dpt,Dpt->DptCod);
HTM_INPUT_TEXT ("ShortName",Cns_HIERARCHY_MAX_CHARS_SHRT_NAME,Dpt->ShrtName,
HTM_SUBMIT_ON_CHANGE,
"class=\"INPUT_SHORT_NAME INPUT_%s\"",
@@ -519,7 +520,7 @@ static void Dpt_ListDepartmentsForEdition (const struct Dpt_Departments *Departm
/* Department full name */
HTM_TD_Begin ("class=\"CM\"");
Frm_BeginForm (ActRenDptFul);
- Par_PutParCode (Par_DptCod,Dpt->DptCod);
+ ParCod_PutPar (ParCod_Dpt,Dpt->DptCod);
HTM_INPUT_TEXT ("FullName",Cns_HIERARCHY_MAX_CHARS_FULL_NAME,Dpt->FullName,
HTM_SUBMIT_ON_CHANGE,
"class=\"INPUT_FULL_NAME INPUT_%s\"",
@@ -530,7 +531,7 @@ static void Dpt_ListDepartmentsForEdition (const struct Dpt_Departments *Departm
/* Department WWW */
HTM_TD_Begin ("class=\"CM\"");
Frm_BeginForm (ActChgDptWWW);
- Par_PutParCode (Par_DptCod,Dpt->DptCod);
+ ParCod_PutPar (ParCod_Dpt,Dpt->DptCod);
HTM_INPUT_URL ("WWW",Dpt->WWW,HTM_SUBMIT_ON_CHANGE,
"class=\"INPUT_WWW_NARROW INPUT_%s\""
" required=\"required\"",
@@ -557,7 +558,7 @@ static void Dpt_ListDepartmentsForEdition (const struct Dpt_Departments *Departm
static void Dpt_PutParDptCod (void *DptCod)
{
if (DptCod)
- Par_PutParCode (Par_DptCod,*((long *) DptCod));
+ ParCod_PutPar (ParCod_Dpt,*((long *) DptCod));
}
/*****************************************************************************/
@@ -573,7 +574,7 @@ void Dpt_RemoveDepartment (void)
Dpt_EditingDepartmentConstructor ();
/***** Get department code *****/
- Dpt_EditingDpt->DptCod = Par_GetAndCheckParCode (Par_DptCod);
+ Dpt_EditingDpt->DptCod = ParCod_GetAndCheckPar (ParCod_Dpt);
/***** Get data of the department from database *****/
Dpt_GetDataOfDepartmentByCod (Dpt_EditingDpt);
@@ -608,10 +609,10 @@ void Dpt_ChangeDepartIns (void)
/***** Get parameters from form *****/
/* Get the code of the department */
- Dpt_EditingDpt->DptCod = Par_GetAndCheckParCode (Par_DptCod);
+ Dpt_EditingDpt->DptCod = ParCod_GetAndCheckPar (ParCod_Dpt);
/* Get parameter with institution code */
- NewInsCod = Par_GetAndCheckParCode (Par_OthInsCod);
+ NewInsCod = ParCod_GetAndCheckPar (ParCod_OthIns);
/***** Get data of the department from database *****/
Dpt_GetDataOfDepartmentByCod (Dpt_EditingDpt);
@@ -683,7 +684,7 @@ static void Dpt_RenameDepartment (Cns_ShrtOrFullName_t ShrtOrFullName)
/***** Get parameters from form *****/
/* Get the code of the department */
- Dpt_EditingDpt->DptCod = Par_GetAndCheckParCode (Par_DptCod);
+ Dpt_EditingDpt->DptCod = ParCod_GetAndCheckPar (ParCod_Dpt);
/* Get the new name for the department */
Par_GetParText (ParName,NewDptName,MaxBytes);
@@ -739,7 +740,7 @@ void Dpt_ChangeDptWWW (void)
/***** Get parameters from form *****/
/* Get the code of the department */
- Dpt_EditingDpt->DptCod = Par_GetAndCheckParCode (Par_DptCod);
+ Dpt_EditingDpt->DptCod = ParCod_GetAndCheckPar (ParCod_Dpt);
/* Get the new WWW for the department */
Par_GetParText ("WWW",NewWWW,Cns_MAX_BYTES_WWW);
@@ -904,7 +905,7 @@ void Dpt_ReceiveFormNewDpt (void)
/***** Get parameters from form *****/
/* Get institution */
- Dpt_EditingDpt->InsCod = Par_GetAndCheckParCode (Par_OthInsCod);
+ Dpt_EditingDpt->InsCod = ParCod_GetAndCheckPar (ParCod_OthIns);
/* Get department short name */
Par_GetParText ("ShortName",Dpt_EditingDpt->ShrtName,Cns_HIERARCHY_MAX_BYTES_SHRT_NAME);
diff --git a/swad_department.h b/swad_department.h
index b4e6bf62..52ee8d94 100644
--- a/swad_department.h
+++ b/swad_department.h
@@ -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
diff --git a/swad_department_database.c b/swad_department_database.c
index d15d6d21..74d46c77 100644
--- a/swad_department_database.c
+++ b/swad_department_database.c
@@ -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
diff --git a/swad_department_database.h b/swad_department_database.h
index 0a0e74f7..60778f86 100644
--- a/swad_department_database.h
+++ b/swad_department_database.h
@@ -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
diff --git a/swad_duplicate.c b/swad_duplicate.c
index da01d557..747d338c 100644
--- a/swad_duplicate.c
+++ b/swad_duplicate.c
@@ -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
diff --git a/swad_duplicate.h b/swad_duplicate.h
index 715ca76f..99c6aebb 100644
--- a/swad_duplicate.h
+++ b/swad_duplicate.h
@@ -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
diff --git a/swad_duplicate_database.c b/swad_duplicate_database.c
index 44039010..1288ea13 100644
--- a/swad_duplicate_database.c
+++ b/swad_duplicate_database.c
@@ -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
diff --git a/swad_duplicate_database.h b/swad_duplicate_database.h
index ec81e2a6..ddcc17d2 100644
--- a/swad_duplicate_database.h
+++ b/swad_duplicate_database.h
@@ -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
diff --git a/swad_enrolment.c b/swad_enrolment.c
index 2ad17c00..37a6ce27 100644
--- a/swad_enrolment.c
+++ b/swad_enrolment.c
@@ -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
@@ -60,6 +60,7 @@
#include "swad_notification.h"
#include "swad_notification_database.h"
#include "swad_parameter.h"
+#include "swad_parameter_code.h"
#include "swad_photo.h"
#include "swad_record_database.h"
#include "swad_role.h"
@@ -180,7 +181,7 @@ void Enr_PutButtonInlineToRegisterStds (long CrsCod)
1 << Rol_STD)) // No students in course
{
Frm_BeginForm (ActReqEnrSevStd);
- Par_PutParCode (Par_CrsCod,CrsCod);
+ ParCod_PutPar (ParCod_Crs,CrsCod);
Btn_PutCreateButtonInline (Txt_Register_students);
Frm_EndForm ();
}
@@ -2226,7 +2227,7 @@ static void Enr_ShowEnrolmentRequestsGivenRoles (unsigned RolesSelected)
Deg_GetDataOfDegreeByCod (&Deg);
Frm_BeginFormGoTo (ActSeeCrsInf);
- Par_PutParCode (Par_CrsCod,Crs.CrsCod);
+ ParCod_PutPar (ParCod_Crs,Crs.CrsCod);
HTM_BUTTON_Submit_Begin (Str_BuildGoToTitle (Crs.FullName),
"class=\"LT BT_LINK\"");
Str_FreeGoToTitle ();
@@ -2274,7 +2275,7 @@ static void Enr_ShowEnrolmentRequestsGivenRoles (unsigned RolesSelected)
if (!NextAction[DesiredRole])
Err_WrongRoleExit ();
Frm_BeginForm (NextAction[DesiredRole]);
- Par_PutParCode (Par_CrsCod,Crs.CrsCod);
+ ParCod_PutPar (ParCod_Crs,Crs.CrsCod);
Usr_PutParUsrCodEncrypted (UsrDat.EnUsrCod);
Btn_PutCreateButtonInline (Txt_Register);
Frm_EndForm ();
@@ -2284,7 +2285,7 @@ static void Enr_ShowEnrolmentRequestsGivenRoles (unsigned RolesSelected)
HTM_TD_Begin ("class=\"LT DAT_%s\"",
The_GetSuffix ());
Frm_BeginForm (ActReqRejSignUp);
- Par_PutParCode (Par_CrsCod,Crs.CrsCod);
+ ParCod_PutPar (ParCod_Crs,Crs.CrsCod);
Usr_PutParUsrCodEncrypted (UsrDat.EnUsrCod);
Btn_PutRemoveButtonInline (Txt_Reject);
Frm_EndForm ();
diff --git a/swad_enrolment.h b/swad_enrolment.h
index 2c94c50f..f1f42ae8 100644
--- a/swad_enrolment.h
+++ b/swad_enrolment.h
@@ -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
diff --git a/swad_enrolment_database.c b/swad_enrolment_database.c
index 7a00d9fc..dc86c5ed 100644
--- a/swad_enrolment_database.c
+++ b/swad_enrolment_database.c
@@ -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
diff --git a/swad_enrolment_database.h b/swad_enrolment_database.h
index d5c4ee93..4aa32ba6 100644
--- a/swad_enrolment_database.h
+++ b/swad_enrolment_database.h
@@ -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
diff --git a/swad_error.c b/swad_error.c
index 9a419030..4213fe8c 100644
--- a/swad_error.c
+++ b/swad_error.c
@@ -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
@@ -91,11 +91,6 @@ void Err_WrongScopeExit (void)
/********* when wrong country, institution, center, degree or course *********/
/*****************************************************************************/
-void Err_WrongHierarchyExit (void)
- {
- Err_ShowErrorAndExit ("Wrong hierarchy.");
- }
-
void Err_WrongCountrExit (void)
{
Err_ShowErrorAndExit ("Wrong country.");
@@ -144,15 +139,6 @@ void Err_WrongPlaceExit (void)
Err_ShowErrorAndExit ("Wrong place.");
}
-/*****************************************************************************/
-/************* Write error message and exit when wrong order *****************/
-/*****************************************************************************/
-
-void Err_WrongOrderExit (void)
- {
- Err_ShowErrorAndExit ("Wrong order.");
- }
-
/*****************************************************************************/
/************* Write error message and exit when wrong status ****************/
/*****************************************************************************/
diff --git a/swad_error.h b/swad_error.h
index 822f68da..4fae9b84 100644
--- a/swad_error.h
+++ b/swad_error.h
@@ -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
@@ -30,9 +30,9 @@
void Err_NotEnoughMemoryExit (void);
void Err_PathTooLongExit (void);
void Err_QuerySizeExceededExit (void);
+
void Err_WrongActionExit (void);
void Err_WrongScopeExit (void);
-void Err_WrongHierarchyExit (void);
void Err_WrongCountrExit (void);
void Err_WrongInstitExit (void);
void Err_WrongCenterExit (void);
@@ -41,7 +41,6 @@ void Err_WrongDegreeExit (void);
void Err_WrongCourseExit (void);
void Err_WrongDepartmentExit (void);
void Err_WrongPlaceExit (void);
-void Err_WrongOrderExit (void);
void Err_WrongStatusExit (void);
void Err_WrongDateExit (void);
void Err_WrongPluginExit (void);
@@ -50,7 +49,9 @@ void Err_WrongItemExit (void);
void Err_WrongResourceExit (void);
void Err_WrongSyllabusFormatExit (void);
void Err_WrongFileBrowserExit (void);
+
void Err_FileFolderNotFoundExit (void);
+
void Err_WrongCopySrcExit (void);
void Err_WrongNumberOfRowsExit (void);
void Err_WrongGrpTypExit (void);
@@ -93,6 +94,7 @@ void Err_WrongMessageExit (void);
void Err_WrongMailDomainExit (void);
void Err_WrongRoleExit (void);
void Err_WrongUserExit (void);
+
void Err_NoPermission (void);
void Err_NoPermissionExit (void);
void Err_ShowErrorAndExit (const char *Txt);
diff --git a/swad_exam.c b/swad_exam.c
index c01034bc..ebae315c 100644
--- a/swad_exam.c
+++ b/swad_exam.c
@@ -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
@@ -54,6 +54,7 @@
#include "swad_match_result.h"
#include "swad_pagination.h"
#include "swad_parameter.h"
+#include "swad_parameter_code.h"
#include "swad_program_database.h"
#include "swad_role.h"
#include "swad_test.h"
@@ -716,7 +717,7 @@ void Exa_PutPars (void *Exams)
if (Exams)
{
- Par_PutParCode (Par_ExaCod,((struct Exa_Exams *) Exams)->Exam.ExaCod);
+ ParCod_PutPar (ParCod_Exa,((struct Exa_Exams *) Exams)->Exam.ExaCod);
Exa_PutParOrder (((struct Exa_Exams *) Exams)->SelectedOrder);
WhichGroups = Grp_GetParWhichGroups ();
Grp_PutParWhichGroups (&WhichGroups);
@@ -730,10 +731,10 @@ void Exa_PutPars (void *Exams)
void Exa_GetPars (struct Exa_Exams *Exams,bool CheckExaCod)
{
- long (*GetExaCo[2]) (Par_Code_t ParCode) =
+ long (*GetExaCo[2]) (ParCod_Param_t ParCode) =
{
- [false] = Par_GetParCode,
- [true ] = Par_GetAndCheckParCode,
+ [false] = ParCod_GetPar,
+ [true ] = ParCod_GetAndCheckPar,
};
/***** Get other parameters *****/
@@ -741,7 +742,7 @@ void Exa_GetPars (struct Exa_Exams *Exams,bool CheckExaCod)
Exams->CurrentPage = Pag_GetParPagNum (Pag_EXAMS);
/***** Get exam code *****/
- Exams->Exam.ExaCod = GetExaCo[CheckExaCod] (Par_ExaCod);
+ Exams->Exam.ExaCod = GetExaCo[CheckExaCod] (ParCod_Exa);
}
/*****************************************************************************/
@@ -825,7 +826,7 @@ void Exa_GetListSelectedExaCods (struct Exa_Exams *Exams)
Err_NotEnoughMemoryExit ();
/***** Get parameter multiple with list of exams selected *****/
- Par_GetParMultiToText (Par_CodeStr[Par_ExaCod],Exams->ExaCodsSelected,
+ Par_GetParMultiToText (Par_CodeStr[ParCod_Exa],Exams->ExaCodsSelected,
MaxSizeListExaCodsSelected);
/***** Set which exams will be shown as selected (checkboxes on) *****/
@@ -1024,7 +1025,7 @@ void Exa_RemoveExam (void)
Exa_ResetExam (&Exams.Exam);
/***** Get exam code *****/
- Exams.Exam.ExaCod = Par_GetAndCheckParCode (Par_ExaCod);
+ Exams.Exam.ExaCod = ParCod_GetAndCheckPar (ParCod_Exa);
/***** Get data of the exam from database *****/
Exa_GetDataOfExamByCod (&Exams.Exam);
diff --git a/swad_exam.h b/swad_exam.h
index a64315c6..ca1d9295 100644
--- a/swad_exam.h
+++ b/swad_exam.h
@@ -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
diff --git a/swad_exam_database.c b/swad_exam_database.c
index aafdc79f..05c210d0 100644
--- a/swad_exam_database.c
+++ b/swad_exam_database.c
@@ -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
diff --git a/swad_exam_database.h b/swad_exam_database.h
index 398ccc10..78ef019e 100644
--- a/swad_exam_database.h
+++ b/swad_exam_database.h
@@ -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
diff --git a/swad_exam_log.c b/swad_exam_log.c
index 77aa08b2..1f189fc6 100644
--- a/swad_exam_log.c
+++ b/swad_exam_log.c
@@ -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
diff --git a/swad_exam_log.h b/swad_exam_log.h
index f4038c08..472375d7 100644
--- a/swad_exam_log.h
+++ b/swad_exam_log.h
@@ -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
diff --git a/swad_exam_print.c b/swad_exam_print.c
index ec19ca37..7e4db614 100644
--- a/swad_exam_print.c
+++ b/swad_exam_print.c
@@ -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
@@ -49,6 +49,7 @@
#include "swad_global.h"
#include "swad_ID.h"
#include "swad_parameter.h"
+#include "swad_parameter_code.h"
#include "swad_photo.h"
/*****************************************************************************/
@@ -971,7 +972,7 @@ void ExaPrn_ReceivePrintAnswer (void)
ExaSes_ResetSession (&Session);
/***** Get session code *****/
- Print.SesCod = Par_GetAndCheckParCode (Par_SesCod);
+ Print.SesCod = ParCod_GetAndCheckPar (ParCod_Ses);
/***** Get print data *****/
Print.UsrCod = Gbl.Usrs.Me.UsrDat.UsrCod;
diff --git a/swad_exam_print.h b/swad_exam_print.h
index cb64a4ba..26e36fcc 100644
--- a/swad_exam_print.h
+++ b/swad_exam_print.h
@@ -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
diff --git a/swad_exam_resource.c b/swad_exam_resource.c
index 21caea8e..2308bfb3 100644
--- a/swad_exam_resource.c
+++ b/swad_exam_resource.c
@@ -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
@@ -32,7 +32,7 @@
#include "swad_exam_database.h"
#include "swad_exam_resource.h"
#include "swad_form.h"
-#include "swad_parameter.h"
+#include "swad_parameter_code.h"
#include "swad_program_database.h"
/*****************************************************************************/
@@ -85,7 +85,7 @@ void ExaRsc_WriteExamInCrsProgram (long ExaCod,bool PutFormToGo,
NextAction = (ExaCod > 0) ? ActSeeExa : // Exam specified
ActSeeAllExa; // All exams
Frm_BeginForm (NextAction);
- 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 ());
diff --git a/swad_exam_resource.h b/swad_exam_resource.h
index 38680d6a..d2789a3b 100644
--- a/swad_exam_resource.h
+++ b/swad_exam_resource.h
@@ -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
diff --git a/swad_exam_result.c b/swad_exam_result.c
index 32ef0145..9b2f2de9 100644
--- a/swad_exam_result.c
+++ b/swad_exam_result.c
@@ -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
@@ -51,6 +51,7 @@
#include "swad_HTML.h"
#include "swad_ID.h"
#include "swad_parameter.h"
+#include "swad_parameter_code.h"
#include "swad_photo.h"
#include "swad_test_print.h"
#include "swad_test_visibility.h"
@@ -243,7 +244,7 @@ void ExaRes_ShowMyResultsInSes (void)
/***** Get parameters *****/
Exa_GetPars (&Exams,true);
- Session.SesCod = Par_GetAndCheckParCode (Par_SesCod);
+ Session.SesCod = ParCod_GetAndCheckPar (ParCod_Ses);
Exa_GetDataOfExamByCod (&Exams.Exam);
ExaSes_GetDataOfSessionByCod (&Session);
@@ -457,7 +458,7 @@ void ExaRes_ShowAllResultsInSes (void)
/***** Get parameters *****/
Exa_GetPars (&Exams,true);
- Session.SesCod = Par_GetAndCheckParCode (Par_SesCod);
+ Session.SesCod = ParCod_GetAndCheckPar (ParCod_Ses);
/***** Get exam data and session *****/
Exa_GetDataOfExamByCod (&Exams.Exam);
@@ -605,7 +606,7 @@ static void ExaRes_ListExamsToSelect (struct Exa_Exams *Exams)
HTM_TD_Begin ("class=\"CT DAT_%s %s\"",
The_GetSuffix (),
The_GetColorRows ());
- HTM_INPUT_CHECKBOX (Par_CodeStr[Par_ExaCod],HTM_DONT_SUBMIT_ON_CHANGE,
+ HTM_INPUT_CHECKBOX (Par_CodeStr[ParCod_Exa],HTM_DONT_SUBMIT_ON_CHANGE,
"id=\"Gam%u\" value=\"%ld\"%s",
NumExam,Exams->Lst[NumExam].ExaCod,
Exams->Lst[NumExam].Selected ? " checked=\"checked\"" :
diff --git a/swad_exam_result.h b/swad_exam_result.h
index 70c7406f..4eea8b82 100644
--- a/swad_exam_result.h
+++ b/swad_exam_result.h
@@ -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
diff --git a/swad_exam_session.c b/swad_exam_session.c
index 11e86377..6d52cc24 100644
--- a/swad_exam_session.c
+++ b/swad_exam_session.c
@@ -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
@@ -49,7 +49,7 @@
#include "swad_global.h"
#include "swad_group_database.h"
#include "swad_HTML.h"
-#include "swad_parameter.h"
+#include "swad_parameter_code.h"
#include "swad_role.h"
#include "swad_setting.h"
#include "swad_test.h"
@@ -521,7 +521,7 @@ static void ExaSes_ListOneOrMoreSessionsTitleGrps (struct Exa_Exams *Exams,
{
Frm_BeginForm (ActSeeExaPrn);
Exa_PutPars (Exams);
- Par_PutParCode (Par_SesCod,Session->SesCod);
+ ParCod_PutPar (ParCod_Ses,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_PutParsEdit (void *Exams)
if (Exams)
{
Exa_PutPars (Exams);
- Par_PutParCode (Par_SesCod,((struct Exa_Exams *) Exams)->SesCod);
+ ParCod_PutPar (ParCod_Ses,((struct Exa_Exams *) Exams)->SesCod);
}
}
@@ -940,7 +940,7 @@ void ExaSes_GetAndCheckPars (struct Exa_Exams *Exams,
/***** Get parameters *****/
Exa_GetPars (Exams,true);
Grp_GetParWhichGroups ();
- Session->SesCod = Par_GetAndCheckParCode (Par_SesCod);
+ Session->SesCod = ParCod_GetAndCheckPar (ParCod_Ses);
/***** Get exam data from database *****/
Exa_GetDataOfExamByCod (&Exams->Exam);
@@ -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_PutParCode (Par_ExaCod,Session->ExaCod);
+ ParCod_PutPar (ParCod_Exa,Session->ExaCod);
if (!ItsANewSession) // Existing session
- Par_PutParCode (Par_SesCod,Session->SesCod);
+ ParCod_PutPar (ParCod_Ses,Session->SesCod);
/***** Begin box and table *****/
Box_BoxTableBegin (NULL,ItsANewSession ? Txt_New_session :
@@ -1063,7 +1063,7 @@ static void ExaSes_ShowLstGrpsToCreateSession (long SesCod)
"id=\"WholeCrs\" value=\"Y\"%s"
" onclick=\"uncheckChildren(this,'GrpCods')\"",
Grp_DB_CheckIfAssociatedToGrps ("exa_groups",
- Par_SesCod,
+ "SesCod",
SesCod) ? "" :
" checked=\"checked\"");
HTM_TxtF ("%s %s",Txt_The_whole_course,Gbl.Hierarchy.Crs.ShrtName);
@@ -1122,7 +1122,7 @@ void ExaSes_RequestCreatOrEditSes (void)
/***** Get parameters *****/
Exa_GetPars (&Exams,true);
Grp_GetParWhichGroups ();
- Session.SesCod = Par_GetParCode (Par_SesCod);
+ Session.SesCod = ParCod_GetPar (ParCod_Ses);
ItsANewSession = (Session.SesCod <= 0);
/***** Get exam data from database *****/
@@ -1168,7 +1168,7 @@ void ExaSes_ReceiveFormSession (void)
/***** Get main parameters *****/
Exa_GetPars (&Exams,true);
Grp_GetParWhichGroups ();
- Session.SesCod = Par_GetParCode (Par_SesCod);
+ Session.SesCod = ParCod_GetPar (ParCod_Ses);
ItsANewSession = (Session.SesCod <= 0);
/***** Get exam data from database *****/
diff --git a/swad_exam_session.h b/swad_exam_session.h
index d358f214..b68bcf5d 100644
--- a/swad_exam_session.h
+++ b/swad_exam_session.h
@@ -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
diff --git a/swad_exam_set.c b/swad_exam_set.c
index 0131e9bb..667c9863 100644
--- a/swad_exam_set.c
+++ b/swad_exam_set.c
@@ -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
@@ -51,6 +51,7 @@
#include "swad_match_result.h"
#include "swad_pagination.h"
#include "swad_parameter.h"
+#include "swad_parameter_code.h"
#include "swad_question_database.h"
#include "swad_role.h"
#include "swad_test.h"
@@ -144,7 +145,7 @@ static void ExaSet_PutParsOneQst (void *Exams)
if (Exams)
{
ExaSet_PutParsOneSet (Exams);
- Par_PutParCode (Par_QstCod,((struct Exa_Exams *) Exams)->QstCod);
+ ParCod_PutPar (ParCod_Qst,((struct Exa_Exams *) Exams)->QstCod);
}
}
@@ -287,7 +288,7 @@ void ExaSet_ReceiveFormSet (void)
/***** Get parameters *****/
Exa_GetPars (&Exams,true);
Set.ExaCod = Exams.Exam.ExaCod;
- Exams.SetCod = Set.SetCod = Par_GetParCode (Par_SesCod);
+ Exams.SetCod = Set.SetCod = ParCod_GetPar (ParCod_Ses);
ItsANewSet = (Set.SetCod <= 0);
/***** Get exam data from database *****/
@@ -505,7 +506,7 @@ void ExaSet_RequestCreatOrEditSet (void)
/***** Get parameters *****/
Exa_GetPars (&Exams,true);
- Exams.SetCod = Set.SetCod = Par_GetParCode (Par_SesCod);
+ Exams.SetCod = Set.SetCod = ParCod_GetPar (ParCod_Ses);
ItsANewSet = (Set.SetCod <= 0);
/***** Get exam data from database *****/
@@ -1535,7 +1536,7 @@ void ExaSet_RequestRemoveQstFromSet (void)
ExaSet_GetAndCheckPars (&Exams,&Set);
/***** Get question code *****/
- Exams.QstCod = Par_GetAndCheckParCode (Par_QstCod);
+ Exams.QstCod = ParCod_GetAndCheckPar (ParCod_Qst);
/***** Build anchor string *****/
Frm_SetAnchorStr (Set.SetCod,&Anchor);
@@ -1575,7 +1576,7 @@ void ExaSet_RemoveQstFromSet (void)
ExaSet_GetAndCheckPars (&Exams,&Set);
/***** Get question code *****/
- QstCod = Par_GetAndCheckParCode (Par_QstCod);
+ QstCod = ParCod_GetAndCheckPar (ParCod_Qst);
/***** Remove media associated to question *****/
ExaSet_RemoveMediaFromStemOfQst (QstCod,Set.SetCod);
@@ -1656,7 +1657,7 @@ static void ExaSet_ChangeValidityQst (Qst_Validity_t Validity)
ExaSet_GetAndCheckPars (&Exams,&Set);
/***** Get question code *****/
- QstCod = Par_GetAndCheckParCode (Par_QstCod);
+ QstCod = ParCod_GetAndCheckPar (ParCod_Qst);
/***** Validate/unvalidate question *****/
Exa_DB_ChangeValidityQst (QstCod,Set.SetCod,Exams.Exam.ExaCod,Gbl.Hierarchy.Crs.CrsCod,
@@ -1677,7 +1678,7 @@ static void ExaSet_GetAndCheckPars (struct Exa_Exams *Exams,
/***** Get parameters *****/
Exa_GetPars (Exams,true);
Grp_GetParWhichGroups ();
- Set->SetCod = Par_GetAndCheckParCode (Par_SesCod);
+ Set->SetCod = ParCod_GetAndCheckPar (ParCod_Ses);
/***** Get exam data from database *****/
Exa_GetDataOfExamByCod (&Exams->Exam);
diff --git a/swad_exam_set.h b/swad_exam_set.h
index 2285e78a..aba5c55b 100644
--- a/swad_exam_set.h
+++ b/swad_exam_set.h
@@ -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
diff --git a/swad_exam_type.h b/swad_exam_type.h
index bf55b41c..541f401b 100644
--- a/swad_exam_type.h
+++ b/swad_exam_type.h
@@ -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
diff --git a/swad_figure.c b/swad_figure.c
index 462de0bf..334c2e8c 100644
--- a/swad_figure.c
+++ b/swad_figure.c
@@ -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
diff --git a/swad_figure.h b/swad_figure.h
index 467cfe9f..445bf1fb 100644
--- a/swad_figure.h
+++ b/swad_figure.h
@@ -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
diff --git a/swad_figure_cache.c b/swad_figure_cache.c
index 78ab8482..5fabaad2 100644
--- a/swad_figure_cache.c
+++ b/swad_figure_cache.c
@@ -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
diff --git a/swad_figure_cache.h b/swad_figure_cache.h
index 058aa586..8fbf474e 100644
--- a/swad_figure_cache.h
+++ b/swad_figure_cache.h
@@ -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
diff --git a/swad_figure_database.c b/swad_figure_database.c
index 30096943..3169c4bf 100644
--- a/swad_figure_database.c
+++ b/swad_figure_database.c
@@ -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
diff --git a/swad_figure_database.h b/swad_figure_database.h
index 5983e957..7b3478a3 100644
--- a/swad_figure_database.h
+++ b/swad_figure_database.h
@@ -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
diff --git a/swad_file.c b/swad_file.c
index 7c754c83..93a61272 100644
--- a/swad_file.c
+++ b/swad_file.c
@@ -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
diff --git a/swad_file.h b/swad_file.h
index fb4b26c9..f3536052 100644
--- a/swad_file.h
+++ b/swad_file.h
@@ -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
diff --git a/swad_file_MIME.c b/swad_file_MIME.c
index 6e48a315..c2eb1273 100644
--- a/swad_file_MIME.c
+++ b/swad_file_MIME.c
@@ -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
diff --git a/swad_file_MIME.h b/swad_file_MIME.h
index 3bfa265f..7f46d238 100644
--- a/swad_file_MIME.h
+++ b/swad_file_MIME.h
@@ -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
diff --git a/swad_file_database.c b/swad_file_database.c
index fb460c3e..5a979c09 100644
--- a/swad_file_database.c
+++ b/swad_file_database.c
@@ -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
diff --git a/swad_file_database.h b/swad_file_database.h
index 81c683e9..14a3ccc6 100644
--- a/swad_file_database.h
+++ b/swad_file_database.h
@@ -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
diff --git a/swad_file_extension.c b/swad_file_extension.c
index 88e87929..2e7754f9 100644
--- a/swad_file_extension.c
+++ b/swad_file_extension.c
@@ -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
diff --git a/swad_file_extension.h b/swad_file_extension.h
index 7f3f1808..5e66889a 100644
--- a/swad_file_extension.h
+++ b/swad_file_extension.h
@@ -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
diff --git a/swad_firewall.c b/swad_firewall.c
index febb0f60..27f8bca6 100644
--- a/swad_firewall.c
+++ b/swad_firewall.c
@@ -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
diff --git a/swad_firewall.h b/swad_firewall.h
index 6d078767..1e03b21b 100644
--- a/swad_firewall.h
+++ b/swad_firewall.h
@@ -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
diff --git a/swad_firewall_database.c b/swad_firewall_database.c
index b2b12f77..237be135 100644
--- a/swad_firewall_database.c
+++ b/swad_firewall_database.c
@@ -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
diff --git a/swad_firewall_database.h b/swad_firewall_database.h
index 85aaecf4..5f047ce1 100644
--- a/swad_firewall_database.h
+++ b/swad_firewall_database.h
@@ -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
diff --git a/swad_follow.c b/swad_follow.c
index da9c26a2..ecb8bbac 100644
--- a/swad_follow.c
+++ b/swad_follow.c
@@ -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
diff --git a/swad_follow.h b/swad_follow.h
index 988a6a9b..da025ed8 100644
--- a/swad_follow.h
+++ b/swad_follow.h
@@ -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
diff --git a/swad_follow_database.c b/swad_follow_database.c
index 72f38bfa..6b221f99 100644
--- a/swad_follow_database.c
+++ b/swad_follow_database.c
@@ -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
diff --git a/swad_follow_database.h b/swad_follow_database.h
index 771e61bf..47e9ce70 100644
--- a/swad_follow_database.h
+++ b/swad_follow_database.h
@@ -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
diff --git a/swad_form.c b/swad_form.c
index 8c7a46f9..417c040d 100644
--- a/swad_form.c
+++ b/swad_form.c
@@ -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
diff --git a/swad_form.h b/swad_form.h
index 3ba8cee6..57dc20c1 100644
--- a/swad_form.h
+++ b/swad_form.h
@@ -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
diff --git a/swad_forum.c b/swad_forum.c
index 28281624..f5bf6239 100644
--- a/swad_forum.c
+++ b/swad_forum.c
@@ -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
@@ -56,6 +56,7 @@
#include "swad_notification_database.h"
#include "swad_pagination.h"
#include "swad_parameter.h"
+#include "swad_parameter_code.h"
#include "swad_profile.h"
#include "swad_profile_database.h"
#include "swad_program_database.h"
@@ -1141,8 +1142,8 @@ void For_PutAllParsForum (unsigned NumPageThreads,
For_PutParForumSet (ForumSet);
Par_PutParOrder ((unsigned) Order);
For_PutParForumLocation (Location);
- Par_PutParCode (Par_ThrCod,ThrCod);
- Par_PutParCode (Par_PstCod,PstCod);
+ ParCod_PutPar (ParCod_Thr,ThrCod);
+ ParCod_PutPar (ParCod_Pst,PstCod);
}
/*****************************************************************************/
@@ -2440,10 +2441,10 @@ void For_GetParsForums (struct For_Forums *Forums)
/***** Get optional parameter with code of a selected thread *****/
Forums->Thread.Current =
- Forums->Thread.Selected = Par_GetParCode (Par_ThrCod);
+ Forums->Thread.Selected = ParCod_GetPar (ParCod_Thr);
/***** Get optional parameter with code of a selected post *****/
- Forums->PstCod = Par_GetParCode (Par_PstCod);
+ Forums->PstCod = ParCod_GetPar (ParCod_Pst);
/***** Get which forums I want to see *****/
Forums->ForumSet = (For_ForumSet_t)
diff --git a/swad_forum.h b/swad_forum.h
index c2a6f9e6..b437b19e 100644
--- a/swad_forum.h
+++ b/swad_forum.h
@@ -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
diff --git a/swad_forum_database.c b/swad_forum_database.c
index da3a7730..3599f80a 100644
--- a/swad_forum_database.c
+++ b/swad_forum_database.c
@@ -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
diff --git a/swad_forum_database.h b/swad_forum_database.h
index 720d0e10..884876e1 100644
--- a/swad_forum_database.h
+++ b/swad_forum_database.h
@@ -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
diff --git a/swad_forum_resource.c b/swad_forum_resource.c
index 4163c0f5..1a141dc7 100644
--- a/swad_forum_resource.c
+++ b/swad_forum_resource.c
@@ -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
diff --git a/swad_forum_resource.h b/swad_forum_resource.h
index 9c83ae4c..abf536be 100644
--- a/swad_forum_resource.h
+++ b/swad_forum_resource.h
@@ -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
diff --git a/swad_game.c b/swad_game.c
index 976aa865..2f288479 100644
--- a/swad_game.c
+++ b/swad_game.c
@@ -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
@@ -50,6 +50,7 @@
#include "swad_match_result.h"
#include "swad_pagination.h"
#include "swad_parameter.h"
+#include "swad_parameter_code.h"
#include "swad_program_database.h"
#include "swad_role.h"
#include "swad_test.h"
@@ -785,7 +786,7 @@ void Gam_PutPars (void *Games)
if (Games)
{
- Par_PutParCode (Par_GamCod,((struct Gam_Games *) Games)->Game.GamCod);
+ ParCod_PutPar (ParCod_Gam,((struct Gam_Games *) Games)->Game.GamCod);
Gam_PutParOrder (((struct Gam_Games *) Games)->SelectedOrder);
WhichGroups = Grp_GetParWhichGroups ();
Grp_PutParWhichGroups (&WhichGroups);
@@ -804,7 +805,7 @@ long Gam_GetPars (struct Gam_Games *Games)
Games->CurrentPage = Pag_GetParPagNum (Pag_GAMES);
/***** Get game code *****/
- return Par_GetParCode (Par_GamCod);
+ return ParCod_GetPar (ParCod_Gam);
}
/*****************************************************************************/
@@ -895,7 +896,7 @@ void Gam_GetListSelectedGamCods (struct Gam_Games *Games)
Err_NotEnoughMemoryExit ();
/***** Get parameter multiple with list of games selected *****/
- Par_GetParMultiToText (Par_CodeStr[Par_GamCod],Games->GamCodsSelected,
+ Par_GetParMultiToText (Par_CodeStr[ParCod_Gam],Games->GamCodsSelected,
MaxSizeListGamCodsSelected);
/***** Set which games will be shown as selected (checkboxes on) *****/
@@ -1085,7 +1086,7 @@ void Gam_RemoveGame (void)
Gam_ResetGame (&Games.Game);
/***** Get game code *****/
- Games.Game.GamCod = Par_GetAndCheckParCode (Par_GamCod);
+ Games.Game.GamCod = ParCod_GetAndCheckPar (ParCod_Gam);
/***** Get data of the game from database *****/
Gam_GetDataOfGameByCod (&Games.Game);
diff --git a/swad_game.h b/swad_game.h
index dabd362b..594e0fb3 100644
--- a/swad_game.h
+++ b/swad_game.h
@@ -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
diff --git a/swad_game_database.c b/swad_game_database.c
index c240dc4c..f136a8c1 100644
--- a/swad_game_database.c
+++ b/swad_game_database.c
@@ -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
diff --git a/swad_game_database.h b/swad_game_database.h
index b31bef95..0ad162bf 100644
--- a/swad_game_database.h
+++ b/swad_game_database.h
@@ -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
diff --git a/swad_game_resource.c b/swad_game_resource.c
index 7e70e127..98c6ee6f 100644
--- a/swad_game_resource.c
+++ b/swad_game_resource.c
@@ -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
@@ -32,7 +32,7 @@
#include "swad_game.h"
#include "swad_game_database.h"
#include "swad_game_resource.h"
-#include "swad_parameter.h"
+#include "swad_parameter_code.h"
#include "swad_program_database.h"
/*****************************************************************************/
@@ -86,7 +86,7 @@ void GamRsc_WriteGameInCrsProgram (long GamCod,bool PutFormToGo,
NextAction = (GamCod > 0) ? ActSeeGam : // Game specified
ActSeeAllGam; // All games
Frm_BeginForm (NextAction);
- Par_PutParCode (Par_GamCod,GamCod);
+ ParCod_PutPar (ParCod_Gam,GamCod);
HTM_BUTTON_Submit_Begin (Txt_Actions[NextAction],
"class=\"LM BT_LINK PRG_LNK_%s\"",
The_GetSuffix ());
diff --git a/swad_game_resource.h b/swad_game_resource.h
index d6e037df..df1ea228 100644
--- a/swad_game_resource.h
+++ b/swad_game_resource.h
@@ -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
diff --git a/swad_global.c b/swad_global.c
index eb450788..f98d4135 100644
--- a/swad_global.c
+++ b/swad_global.c
@@ -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
diff --git a/swad_global.h b/swad_global.h
index 4081e9b7..dca3c35a 100644
--- a/swad_global.h
+++ b/swad_global.h
@@ -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
diff --git a/swad_group.c b/swad_group.c
index 065372d6..0585926b 100644
--- a/swad_group.c
+++ b/swad_group.c
@@ -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_HTML.h"
#include "swad_match_database.h"
#include "swad_notification.h"
-#include "swad_parameter.h"
+#include "swad_parameter_code.h"
#include "swad_program.h"
#include "swad_project.h"
#include "swad_setting.h"
@@ -1254,7 +1254,7 @@ static void Grp_ListGroupTypesForEdition (void)
/* Name of group type */
HTM_TD_Begin ("class=\"LM\"");
Frm_BeginFormAnchor (ActRenGrpTyp,Grp_GROUP_TYPES_SECTION_ID);
- Par_PutParCode (Par_GrpTypCod,Gbl.Crs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp].GrpTypCod);
+ ParCod_PutPar (ParCod_GrpTyp,Gbl.Crs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp].GrpTypCod);
HTM_INPUT_TEXT ("GrpTypName",Grp_MAX_CHARS_GROUP_TYPE_NAME,
Gbl.Crs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp].GrpTypName,
HTM_SUBMIT_ON_CHANGE,
@@ -1266,7 +1266,7 @@ static void Grp_ListGroupTypesForEdition (void)
/* Is it mandatory to register in any group? */
HTM_TD_Begin ("class=\"CM\"");
Frm_BeginFormAnchor (ActChgMdtGrpTyp,Grp_GROUP_TYPES_SECTION_ID);
- Par_PutParCode (Par_GrpTypCod,Gbl.Crs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp].GrpTypCod);
+ ParCod_PutPar (ParCod_GrpTyp,Gbl.Crs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp].GrpTypCod);
HTM_SELECT_Begin (HTM_SUBMIT_ON_CHANGE,
"name=\"MandatoryEnrolment\""
" class=\"INPUT_%s\" style=\"width:150px;\"",
@@ -1284,7 +1284,7 @@ static void Grp_ListGroupTypesForEdition (void)
/* Is it possible to register in multiple groups? */
HTM_TD_Begin ("class=\"CM\"");
Frm_BeginFormAnchor (ActChgMulGrpTyp,Grp_GROUP_TYPES_SECTION_ID);
- Par_PutParCode (Par_GrpTypCod,Gbl.Crs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp].GrpTypCod);
+ ParCod_PutPar (ParCod_GrpTyp,Gbl.Crs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp].GrpTypCod);
HTM_SELECT_Begin (HTM_SUBMIT_ON_CHANGE,
"name=\"MultipleEnrolment\""
" class=\"INPUT_%s\" style=\"width:150px;\"",
@@ -1302,7 +1302,7 @@ static void Grp_ListGroupTypesForEdition (void)
/* Open time */
HTM_TD_Begin ("class=\"LM\"");
Frm_BeginFormAnchor (ActChgTimGrpTyp,Grp_GROUP_TYPES_SECTION_ID);
- Par_PutParCode (Par_GrpTypCod,Gbl.Crs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp].GrpTypCod);
+ ParCod_PutPar (ParCod_GrpTyp,Gbl.Crs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp].GrpTypCod);
HTM_TABLE_BeginCenterPadding (2);
HTM_TR_Begin (NULL);
@@ -1449,7 +1449,7 @@ static void Grp_ListGroupsForEdition (const struct Roo_Rooms *Rooms)
Frm_BeginFormAnchor (Grp->Open ? ActCloGrp :
ActOpeGrp,
Grp_GROUPS_SECTION_ID);
- Par_PutParCode (Par_GrpCod,Grp->GrpCod);
+ ParCod_PutPar (ParCod_Grp,Grp->GrpCod);
Ico_PutIconLink (Grp->Open ? "unlock.svg" :
"lock.svg",
Grp->Open ? Ico_GREEN :
@@ -1464,7 +1464,7 @@ static void Grp_ListGroupsForEdition (const struct Roo_Rooms *Rooms)
Frm_BeginFormAnchor (Grp->FileZones ? ActDisFilZonGrp :
ActEnaFilZonGrp,
Grp_GROUPS_SECTION_ID);
- Par_PutParCode (Par_GrpCod,Grp->GrpCod);
+ ParCod_PutPar (ParCod_Grp,Grp->GrpCod);
Ico_PutIconLink (Grp->FileZones ? "folder-open.svg" :
"folder.svg",
Grp->FileZones ? Ico_GREEN :
@@ -1478,7 +1478,7 @@ static void Grp_ListGroupsForEdition (const struct Roo_Rooms *Rooms)
/* Begin selector */
HTM_TD_Begin ("class=\"CM\"");
Frm_BeginFormAnchor (ActChgGrpTyp,Grp_GROUPS_SECTION_ID);
- Par_PutParCode (Par_GrpCod,Grp->GrpCod);
+ ParCod_PutPar (ParCod_Grp,Grp->GrpCod);
HTM_SELECT_Begin (HTM_SUBMIT_ON_CHANGE,
"name=\"GrpTypCod\""
" class=\"INPUT_%s\" style=\"width:100px;\"",
@@ -1503,7 +1503,7 @@ static void Grp_ListGroupsForEdition (const struct Roo_Rooms *Rooms)
/***** Group name *****/
HTM_TD_Begin ("class=\"CM\"");
Frm_BeginFormAnchor (ActRenGrp,Grp_GROUPS_SECTION_ID);
- Par_PutParCode (Par_GrpCod,Grp->GrpCod);
+ ParCod_PutPar (ParCod_Grp,Grp->GrpCod);
HTM_INPUT_TEXT ("GrpName",Grp_MAX_CHARS_GROUP_NAME,Grp->GrpName,
HTM_SUBMIT_ON_CHANGE,
"size=\"20\" class=\"INPUT_%s\"",
@@ -1515,7 +1515,7 @@ static void Grp_ListGroupsForEdition (const struct Roo_Rooms *Rooms)
/* Begin selector */
HTM_TD_Begin ("class=\"CM\"");
Frm_BeginFormAnchor (ActChgGrpRoo,Grp_GROUPS_SECTION_ID);
- Par_PutParCode (Par_GrpCod,Grp->GrpCod);
+ ParCod_PutPar (ParCod_Grp,Grp->GrpCod);
HTM_SELECT_Begin (HTM_SUBMIT_ON_CHANGE,
"name=\"RooCod\""
" class=\"INPUT_%s\" style=\"width:100px;\"",
@@ -1557,7 +1557,7 @@ static void Grp_ListGroupsForEdition (const struct Roo_Rooms *Rooms)
/***** Maximum number of students of the group (row[3]) *****/
HTM_TD_Begin ("class=\"CM\"");
Frm_BeginFormAnchor (ActChgMaxStdGrp,Grp_GROUPS_SECTION_ID);
- Par_PutParCode (Par_GrpCod,Grp->GrpCod);
+ ParCod_PutPar (ParCod_Grp,Grp->GrpCod);
Grp_WriteMaxStds (StrMaxStudents,Grp->MaxStudents);
HTM_INPUT_TEXT ("MaxStudents",Cns_MAX_DECIMAL_DIGITS_UINT,StrMaxStudents,
HTM_SUBMIT_ON_CHANGE,
@@ -1621,14 +1621,14 @@ void Grp_ListGrpsToEditAsgAttSvyEvtMch (struct GroupType *GrpTyp,
static const struct
{
const char *Table;
- Par_Code_t ParCode;
+ const char *Field;
} AssociationsToGrps[Grp_NUM_ASSOCIATIONS_TO_GROUPS] =
{
- [Grp_ASSIGNMENT] = {"asg_groups",Par_AsgCod},
- [Grp_ATT_EVENT ] = {"att_groups",Par_AttCod},
- [Grp_SURVEY ] = {"svy_groups",Par_SvyCod},
- [Grp_EXA_EVENT ] = {"exa_groups",Par_SesCod},
- [Grp_MATCH ] = {"mch_groups",Par_MchCod},
+ [Grp_ASSIGNMENT] = {"asg_groups","AsgCod"},
+ [Grp_ATT_EVENT ] = {"att_groups","AttCod"},
+ [Grp_SURVEY ] = {"svy_groups","SvyCod"},
+ [Grp_EXA_EVENT ] = {"exa_groups","SesCod"},
+ [Grp_MATCH ] = {"mch_groups","MchCod"},
};
struct ListCodGrps LstGrpsIBelong;
unsigned NumGrpThisType;
@@ -1653,7 +1653,7 @@ void Grp_ListGrpsToEditAsgAttSvyEvtMch (struct GroupType *GrpTyp,
if (Cod > 0) // Cod == -1L means new item, assignment, event, survey, exam event or match
AssociatedToGrp = Grp_DB_CheckIfAssociatedToGrp (AssociationsToGrps[WhichIsAssociatedToGrp].Table,
- AssociationsToGrps[WhichIsAssociatedToGrp].ParCode,
+ AssociationsToGrps[WhichIsAssociatedToGrp].Field,
Cod,Grp->GrpCod);
else
AssociatedToGrp = false;
@@ -3296,13 +3296,13 @@ void Grp_ReceiveFormNewGrp (void)
char AlertTxt[256 + Grp_MAX_BYTES_GROUP_NAME];
/***** Get parameters from form *****/
- if ((Gbl.Crs.Grps.GrpTyp.GrpTypCod = Par_GetParCode (Par_GrpTypCod)) > 0) // Group type valid
+ if ((Gbl.Crs.Grps.GrpTyp.GrpTypCod = ParCod_GetPar (ParCod_GrpTyp)) > 0) // Group type valid
{
/* Get group name */
Par_GetParText ("GrpName",Gbl.Crs.Grps.GrpName,Grp_MAX_BYTES_GROUP_NAME);
/* Get room */
- Gbl.Crs.Grps.RooCod = Par_GetParCode (Par_RooCod);
+ Gbl.Crs.Grps.RooCod = ParCod_GetPar (ParCod_Roo);
/* Get maximum number of students */
Gbl.Crs.Grps.MaxStudents = (unsigned)
@@ -3360,7 +3360,7 @@ void Grp_ReqRemGroupType (void)
unsigned NumGrps;
/***** Get the code of the group type *****/
- Gbl.Crs.Grps.GrpTyp.GrpTypCod = Par_GetAndCheckParCode (Par_GrpTypCod);
+ Gbl.Crs.Grps.GrpTyp.GrpTypCod = ParCod_GetAndCheckPar (ParCod_GrpTyp);
/***** Check if this group type has groups *****/
if ((NumGrps = Grp_DB_CountNumGrpsInThisCrsOfType (Gbl.Crs.Grps.GrpTyp.GrpTypCod))) // Group type has groups ==> Ask for confirmation
@@ -3376,7 +3376,7 @@ void Grp_ReqRemGroupType (void)
void Grp_ReqRemGroup (void)
{
/***** Get group code *****/
- Gbl.Crs.Grps.GrpCod = Par_GetAndCheckParCode (Par_GrpCod);
+ Gbl.Crs.Grps.GrpCod = ParCod_GetAndCheckPar (ParCod_Grp);
/***** Confirm removing *****/
Grp_AskConfirmRemGrp ();
@@ -3472,7 +3472,7 @@ static void Grp_AskConfirmRemGrp (void)
void Grp_RemoveGroupType (void)
{
/***** Get param with code of group type *****/
- Gbl.Crs.Grps.GrpTyp.GrpTypCod = Par_GetAndCheckParCode (Par_GrpTypCod);
+ Gbl.Crs.Grps.GrpTyp.GrpTypCod = ParCod_GetAndCheckPar (ParCod_GrpTyp);
/***** Remove group type and its groups *****/
Grp_RemoveGroupTypeCompletely ();
@@ -3485,7 +3485,7 @@ void Grp_RemoveGroupType (void)
void Grp_RemoveGroup (void)
{
/***** Get param with group code *****/
- Gbl.Crs.Grps.GrpCod = Par_GetAndCheckParCode (Par_GrpCod);
+ Gbl.Crs.Grps.GrpCod = ParCod_GetAndCheckPar (ParCod_Grp);
/***** Remove group *****/
Grp_RemoveGroupCompletely ();
@@ -3603,7 +3603,7 @@ void Grp_OpenGroup (void)
char AlertTxt[256 + Grp_MAX_BYTES_GROUP_NAME];
/***** Get group code *****/
- Gbl.Crs.Grps.GrpCod = Par_GetAndCheckParCode (Par_GrpCod);
+ Gbl.Crs.Grps.GrpCod = ParCod_GetAndCheckPar (ParCod_Grp);
/***** Get group data from database *****/
GrpDat.GrpCod = Gbl.Crs.Grps.GrpCod;
@@ -3633,7 +3633,7 @@ void Grp_CloseGroup (void)
char AlertTxt[256 + Grp_MAX_BYTES_GROUP_NAME];
/***** Get group code *****/
- Gbl.Crs.Grps.GrpCod = Par_GetAndCheckParCode (Par_GrpCod);
+ Gbl.Crs.Grps.GrpCod = ParCod_GetAndCheckPar (ParCod_Grp);
/***** Get group data from database *****/
GrpDat.GrpCod = Gbl.Crs.Grps.GrpCod;
@@ -3663,7 +3663,7 @@ void Grp_EnableFileZonesGrp (void)
char AlertTxt[256 + Grp_MAX_BYTES_GROUP_NAME];
/***** Get group code *****/
- Gbl.Crs.Grps.GrpCod = Par_GetAndCheckParCode (Par_GrpCod);
+ Gbl.Crs.Grps.GrpCod = ParCod_GetAndCheckPar (ParCod_Grp);
/***** Get group data from database *****/
GrpDat.GrpCod = Gbl.Crs.Grps.GrpCod;
@@ -3694,7 +3694,7 @@ void Grp_DisableFileZonesGrp (void)
char AlertTxt[256 + Grp_MAX_BYTES_GROUP_NAME];
/***** Get group code *****/
- Gbl.Crs.Grps.GrpCod = Par_GetAndCheckParCode (Par_GrpCod);
+ Gbl.Crs.Grps.GrpCod = ParCod_GetAndCheckPar (ParCod_Grp);
/***** Get group data from database *****/
GrpDat.GrpCod = Gbl.Crs.Grps.GrpCod;
@@ -3729,10 +3729,10 @@ void Grp_ChangeGroupType (void)
/***** Get parameters from form *****/
/* Get group code */
- Gbl.Crs.Grps.GrpCod = Par_GetAndCheckParCode (Par_GrpCod);
+ Gbl.Crs.Grps.GrpCod = ParCod_GetAndCheckPar (ParCod_Grp);
/* Get the new group type */
- NewGrpTypCod = Par_GetAndCheckParCode (Par_GrpTypCod);
+ NewGrpTypCod = ParCod_GetAndCheckPar (ParCod_GrpTyp);
/* Get from the database the type and the name of the group */
GrpDat.GrpCod = Gbl.Crs.Grps.GrpCod;
@@ -3778,10 +3778,10 @@ void Grp_ChangeGroupRoom (void)
/***** Get parameters from form *****/
/* Get group code */
- Gbl.Crs.Grps.GrpCod = Par_GetAndCheckParCode (Par_GrpCod);
+ Gbl.Crs.Grps.GrpCod = ParCod_GetAndCheckPar (ParCod_Grp);
/* Get the new room */
- NewRooCod = Par_GetParCode (Par_RooCod);
+ NewRooCod = ParCod_GetPar (ParCod_Roo);
/* Get from the database the name of the group */
GrpDat.GrpCod = Gbl.Crs.Grps.GrpCod;
@@ -3817,7 +3817,7 @@ void Grp_ChangeMandatGrpTyp (void)
/***** Get parameters of the form *****/
/* Get the código of type of group */
- Gbl.Crs.Grps.GrpTyp.GrpTypCod = Par_GetAndCheckParCode (Par_GrpTypCod);
+ Gbl.Crs.Grps.GrpTyp.GrpTypCod = ParCod_GetAndCheckPar (ParCod_GrpTyp);
/* Get the new type of enrolment (mandatory or voluntaria) of this type of group */
NewMandatoryEnrolment = Par_GetParBool ("MandatoryEnrolment");
@@ -3870,7 +3870,7 @@ void Grp_ChangeMultiGrpTyp (void)
/***** Get parameters from the form *****/
/* Get the code of type of group */
- Gbl.Crs.Grps.GrpTyp.GrpTypCod = Par_GetAndCheckParCode (Par_GrpTypCod);
+ Gbl.Crs.Grps.GrpTyp.GrpTypCod = ParCod_GetAndCheckPar (ParCod_GrpTyp);
/* Get the new type of enrolment (single or multiple) of this type of group */
NewMultipleEnrolment = Par_GetParBool ("MultipleEnrolment");
@@ -3916,7 +3916,7 @@ void Grp_ChangeOpenTimeGrpTyp (void)
extern const char *Txt_The_date_time_of_opening_of_groups_has_changed;
/***** Get the code of type of group *****/
- Gbl.Crs.Grps.GrpTyp.GrpTypCod = Par_GetAndCheckParCode (Par_GrpTypCod);
+ Gbl.Crs.Grps.GrpTyp.GrpTypCod = ParCod_GetAndCheckPar (ParCod_GrpTyp);
/***** Get from the database the data of this type of group *****/
Grp_GetDataOfGroupTypeByCod (&Gbl.Crs.Grps.GrpTyp);
@@ -3955,7 +3955,7 @@ void Grp_ChangeMaxStdsGrp (void)
/***** Get parameters of the form *****/
/* Get group code */
- Gbl.Crs.Grps.GrpCod = Par_GetAndCheckParCode (Par_GrpCod);
+ Gbl.Crs.Grps.GrpCod = ParCod_GetAndCheckPar (ParCod_Grp);
/* Get the new maximum number of students of the group */
NewMaxStds = (unsigned)
@@ -4043,7 +4043,7 @@ void Grp_RenameGroupType (void)
/***** Get parameters from form *****/
/* Get the code of the group type */
- Gbl.Crs.Grps.GrpTyp.GrpTypCod = Par_GetAndCheckParCode (Par_GrpTypCod);
+ Gbl.Crs.Grps.GrpTyp.GrpTypCod = ParCod_GetAndCheckPar (ParCod_GrpTyp);
/* Get the new name for the group type */
Par_GetParText ("GrpTypName",NewNameGrpTyp,Grp_MAX_BYTES_GROUP_TYPE_NAME);
@@ -4115,7 +4115,7 @@ void Grp_RenameGroup (void)
/***** Get parameters from form *****/
/* Get the code of the group */
- Gbl.Crs.Grps.GrpCod = Par_GetAndCheckParCode (Par_GrpCod);
+ Gbl.Crs.Grps.GrpCod = ParCod_GetAndCheckPar (ParCod_Grp);
/* Get the new name for the group */
Par_GetParText ("GrpName",NewNameGrp,Grp_MAX_BYTES_GROUP_NAME);
@@ -4177,7 +4177,7 @@ void Grp_RenameGroup (void)
static void Grp_PutParGrpTypCod (void *GrpTypCod)
{
if (GrpTypCod)
- Par_PutParCode (Par_GrpTypCod,*((long *) GrpTypCod));
+ ParCod_PutPar (ParCod_GrpTyp,*((long *) GrpTypCod));
}
/*****************************************************************************/
@@ -4187,7 +4187,7 @@ static void Grp_PutParGrpTypCod (void *GrpTypCod)
static void Grp_PutParGrpCod (void *GrpCod)
{
if (GrpCod)
- Par_PutParCode (Par_GrpCod,*((long *) GrpCod));
+ ParCod_PutPar (ParCod_Grp,*((long *) GrpCod));
}
/*****************************************************************************/
diff --git a/swad_group.h b/swad_group.h
index cf76f894..3ac5b8a7 100644
--- a/swad_group.h
+++ b/swad_group.h
@@ -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
diff --git a/swad_group_database.c b/swad_group_database.c
index a7e9c7f2..94fcd8a8 100644
--- a/swad_group_database.c
+++ b/swad_group_database.c
@@ -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
@@ -679,11 +679,9 @@ long Grp_DB_GetGrpTypeFromGrp (long GrpCod)
/*********** exam session or match is associated to a given group ************/
/*****************************************************************************/
-bool Grp_DB_CheckIfAssociatedToGrp (const char *Table,Par_Code_t ParCode,
+bool Grp_DB_CheckIfAssociatedToGrp (const char *Table,const char *Field,
long Cod,long GrpCod)
{
- extern const char *Par_CodeStr[]; // Database field name must be equal to code parameter name
-
return
DB_QueryEXISTS ("can not check if associated to a group",
"SELECT EXISTS"
@@ -692,7 +690,7 @@ bool Grp_DB_CheckIfAssociatedToGrp (const char *Table,Par_Code_t ParCode,
" WHERE %s=%ld"
" AND GrpCod=%ld)",
Table,
- Par_CodeStr[ParCode],Cod,
+ Field,Cod,
GrpCod);
}
@@ -701,10 +699,8 @@ bool Grp_DB_CheckIfAssociatedToGrp (const char *Table,Par_Code_t ParCode,
/************ exam session or match is associated to any group **************/
/*****************************************************************************/
-bool Grp_DB_CheckIfAssociatedToGrps (const char *Table,Par_Code_t ParCode,long Cod)
+bool Grp_DB_CheckIfAssociatedToGrps (const char *Table,const char *Field,long Cod)
{
- extern const char *Par_CodeStr[]; // Database field name must be equal to code parameter name
-
/***** Trivial check *****/
if (Cod <= 0) // Assignment, attendance event, survey, exam event or match code
return false;
@@ -718,7 +714,7 @@ bool Grp_DB_CheckIfAssociatedToGrps (const char *Table,Par_Code_t ParCode,long C
" FROM %s"
" WHERE %s=%ld)",
Table,
- Par_CodeStr[ParCode],Cod);
+ Field,Cod);
}
/*****************************************************************************/
diff --git a/swad_group_database.h b/swad_group_database.h
index 95ff7146..eade000b 100644
--- a/swad_group_database.h
+++ b/swad_group_database.h
@@ -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
@@ -78,9 +78,9 @@ unsigned Grp_DB_GetNamesGrpsUsrBelongsTo (MYSQL_RES **mysql_res,
long Grp_DB_GetGrpTypeFromGrp (long GrpCod);
-bool Grp_DB_CheckIfAssociatedToGrp (const char *Table,Par_Code_t ParCode,
+bool Grp_DB_CheckIfAssociatedToGrp (const char *Table,const char *Field,
long Cod,long GrpCod);
-bool Grp_DB_CheckIfAssociatedToGrps (const char *Table,Par_Code_t ParCode,long Cod);
+bool Grp_DB_CheckIfAssociatedToGrps (const char *Table,const char *Field,long Cod);
void Grp_DB_ChangeMandatoryEnrolmentOfAGrpTyp (long GrpTypCod,
bool NewMandatoryEnrolment);
diff --git a/swad_help.c b/swad_help.c
index 9089de7c..2e780cad 100644
--- a/swad_help.c
+++ b/swad_help.c
@@ -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
diff --git a/swad_help.h b/swad_help.h
index 772d9569..f70ef2bb 100644
--- a/swad_help.h
+++ b/swad_help.h
@@ -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
diff --git a/swad_help_URL.c b/swad_help_URL.c
index da5d245a..f62e2649 100644
--- a/swad_help_URL.c
+++ b/swad_help_URL.c
@@ -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
diff --git a/swad_hierarchy.c b/swad_hierarchy.c
index 170026d4..fd28fcd7 100644
--- a/swad_hierarchy.c
+++ b/swad_hierarchy.c
@@ -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
@@ -44,7 +44,7 @@
#include "swad_hierarchy_level.h"
#include "swad_HTML.h"
#include "swad_logo.h"
-#include "swad_parameter.h"
+#include "swad_parameter_code.h"
/*****************************************************************************/
/************** External global variables from others modules ****************/
@@ -116,7 +116,7 @@ void Hie_WriteMenuHierarchy (void)
HTM_TR_Begin (NULL);
/* Label */
- Frm_LabelColumn ("RT",Par_CodeStr[Par_CtyCod],Txt_Country);
+ Frm_LabelColumn ("RT",Par_CodeStr[ParCod_Cty],Txt_Country);
/* Data */
HTM_TD_Begin ("class=\"LT\"");
@@ -132,7 +132,7 @@ void Hie_WriteMenuHierarchy (void)
HTM_TR_Begin (NULL);
/* Label */
- Frm_LabelColumn ("RT",Par_CodeStr[Par_InsCod],Txt_Institution);
+ Frm_LabelColumn ("RT",Par_CodeStr[ParCod_Ins],Txt_Institution);
/* Data */
HTM_TD_Begin ("class=\"LT\"");
@@ -148,7 +148,7 @@ void Hie_WriteMenuHierarchy (void)
HTM_TR_Begin (NULL);
/* Label */
- Frm_LabelColumn ("RT",Par_CodeStr[Par_CtrCod],Txt_Center);
+ Frm_LabelColumn ("RT",Par_CodeStr[ParCod_Ctr],Txt_Center);
/* Data */
HTM_TD_Begin ("class=\"LT\"");
@@ -164,7 +164,7 @@ void Hie_WriteMenuHierarchy (void)
HTM_TR_Begin (NULL);
/* Label */
- Frm_LabelColumn ("RT",Par_CodeStr[Par_DegCod],Txt_Degree);
+ Frm_LabelColumn ("RT",Par_CodeStr[ParCod_Deg],Txt_Degree);
/* Data */
HTM_TD_Begin ("class=\"LT\"");
@@ -180,7 +180,7 @@ void Hie_WriteMenuHierarchy (void)
HTM_TR_Begin (NULL);
/* Label */
- Frm_LabelColumn ("RT",Par_CodeStr[Par_CrsCod],Txt_Course);
+ Frm_LabelColumn ("RT",Par_CodeStr[ParCod_Crs],Txt_Course);
/* Data */
HTM_TD_Begin ("class=\"LT\"");
@@ -232,7 +232,7 @@ void Hie_WriteHierarchyInBreadcrumb (void)
/***** Form to go to see institutions of this country *****/
Frm_BeginFormGoTo (ActSeeIns);
- Par_PutParCode (Par_CtyCod,Gbl.Hierarchy.Cty.CtyCod);
+ ParCod_PutPar (ParCod_Cty,Gbl.Hierarchy.Cty.CtyCod);
HTM_BUTTON_Submit_Begin (Gbl.Hierarchy.Cty.Name[Gbl.Prefs.Language],
"class=\"BT_LINK\"");
HTM_Txt (Gbl.Hierarchy.Cty.Name[Gbl.Prefs.Language]);
@@ -267,7 +267,7 @@ void Hie_WriteHierarchyInBreadcrumb (void)
/***** Form to see centers of this institution *****/
Frm_BeginFormGoTo (ActSeeCtr);
- Par_PutParCode (Par_InsCod,Gbl.Hierarchy.Ins.InsCod);
+ ParCod_PutPar (ParCod_Ins,Gbl.Hierarchy.Ins.InsCod);
HTM_BUTTON_Submit_Begin (Gbl.Hierarchy.Ins.FullName,
"class=\"BT_LINK\"");
HTM_Txt (Gbl.Hierarchy.Ins.ShrtName);
@@ -314,7 +314,7 @@ void Hie_WriteHierarchyInBreadcrumb (void)
/***** Form to see degrees of this center *****/
Frm_BeginFormGoTo (ActSeeDeg);
- Par_PutParCode (Par_CtrCod,Gbl.Hierarchy.Ctr.CtrCod);
+ ParCod_PutPar (ParCod_Ctr,Gbl.Hierarchy.Ctr.CtrCod);
HTM_BUTTON_Submit_Begin (Gbl.Hierarchy.Ctr.FullName,
"class=\"BT_LINK\"");
HTM_Txt (Gbl.Hierarchy.Ctr.ShrtName);
@@ -361,7 +361,7 @@ void Hie_WriteHierarchyInBreadcrumb (void)
/***** Form to go to see courses of this degree *****/
Frm_BeginFormGoTo (ActSeeCrs);
- Par_PutParCode (Par_DegCod,Gbl.Hierarchy.Deg.DegCod);
+ ParCod_PutPar (ParCod_Deg,Gbl.Hierarchy.Deg.DegCod);
HTM_BUTTON_Submit_Begin (Gbl.Hierarchy.Deg.FullName,
"class=\"BT_LINK\"");
HTM_Txt (Gbl.Hierarchy.Deg.ShrtName);
@@ -803,7 +803,7 @@ void Hie_WriteStatusCellEditable (bool ICanEdit,Hie_Status_t Status,
{
/* Begin form */
Frm_BeginForm (NextAction);
- Par_PutParCode (Par_OthHieCod,HieCod);
+ ParCod_PutPar (ParCod_OthHie,HieCod);
/* Selector */
HTM_SELECT_Begin (HTM_SUBMIT_ON_CHANGE,
@@ -901,7 +901,7 @@ static Hie_Status_t Hie_GetStatusBitsFromStatusTxt (Hie_StatusTxt_t StatusTxt)
void Hie_PutParOtherHieCod (void *HieCod)
{
if (HieCod)
- Par_PutParCode (Par_OthHieCod,*((long *) HieCod));
+ ParCod_PutPar (ParCod_OthHie,*((long *) HieCod));
}
/*****************************************************************************/
diff --git a/swad_hierarchy.h b/swad_hierarchy.h
index f4633661..2344a5cc 100644
--- a/swad_hierarchy.h
+++ b/swad_hierarchy.h
@@ -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
diff --git a/swad_hierarchy_config.c b/swad_hierarchy_config.c
index a73d240e..053e12cc 100644
--- a/swad_hierarchy_config.c
+++ b/swad_hierarchy_config.c
@@ -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
@@ -203,7 +203,7 @@ void HieCfg_WWW (bool PrintView,bool PutForm,Act_Action_t NextAction,
/********************** Show shortcut in configuration ***********************/
/*****************************************************************************/
-void HieCfg_Shortcut (bool PrintView,Par_Code_t ParCode,long HieCod)
+void HieCfg_Shortcut (bool PrintView,ParCod_Param_t ParCode,long HieCod)
{
extern const char *Par_CodeStr[];
extern const char *Txt_Shortcut;
@@ -218,7 +218,7 @@ void HieCfg_Shortcut (bool PrintView,Par_Code_t ParCode,long HieCod)
HTM_TD_Begin ("class=\"LB DAT_%s\"",The_GetSuffix ());
if (!PrintView)
{
- if (ParCode == Par_None)
+ if (ParCode == ParCod_None)
HTM_A_Begin ("href=\"%s/\" target=\"_blank\" class=\"DAT_%s\"",
Cfg_URL_SWAD_CGI,
The_GetSuffix ());
@@ -229,7 +229,7 @@ void HieCfg_Shortcut (bool PrintView,Par_Code_t ParCode,long HieCod)
Par_CodeStr[ParCode],HieCod,
The_GetSuffix ());
}
- if (ParCode == Par_None)
+ if (ParCode == ParCod_None)
HTM_TxtF ("%s/",
Cfg_URL_SWAD_CGI);
else
@@ -264,7 +264,7 @@ void HieCfg_NumCtrs (unsigned NumCtrs,bool PutForm)
if (PutForm)
{
Frm_BeginFormGoTo (ActSeeCtr);
- Par_PutParCode (Par_InsCod,Gbl.Hierarchy.Ins.InsCod);
+ ParCod_PutPar (ParCod_Ins,Gbl.Hierarchy.Ins.InsCod);
if (asprintf (&Title,Txt_Centers_of_INSTITUTION_X,
Gbl.Hierarchy.Ins.ShrtName) < 0)
Err_NotEnoughMemoryExit ();
@@ -312,7 +312,7 @@ void HieCfg_NumCtrsWithMap (unsigned NumCtrs,unsigned NumCtrsWithMap)
/************************* Show QR in configuration **************************/
/*****************************************************************************/
-void HieCfg_QR (Par_Code_t ParCode,long HieCod)
+void HieCfg_QR (ParCod_Param_t ParCode,long HieCod)
{
extern const char *Txt_QR_code;
diff --git a/swad_hierarchy_config.h b/swad_hierarchy_config.h
index ac9097e2..70a60fb1 100644
--- a/swad_hierarchy_config.h
+++ b/swad_hierarchy_config.h
@@ -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 *****************************/
@@ -46,10 +46,10 @@ void HieCfg_ShrtName (bool PutForm,Act_Action_t NextAction,
const char ShrtName[Cns_HIERARCHY_MAX_BYTES_SHRT_NAME + 1]);
void HieCfg_WWW (bool PrintView,bool PutForm,Act_Action_t NextAction,
const char WWW[Cns_MAX_BYTES_WWW + 1]);
-void HieCfg_Shortcut (bool PrintView,Par_Code_t ParCode,long HieCod);
+void HieCfg_Shortcut (bool PrintView,ParCod_Param_t ParCode,long HieCod);
void HieCfg_NumCtrs (unsigned NumCtrs,bool PutForm);
void HieCfg_NumCtrsWithMap (unsigned NumCtrs,unsigned NumCtrsWithMap);
-void HieCfg_QR (Par_Code_t ParCode,long HieCod);
+void HieCfg_QR (ParCod_Param_t ParCode,long HieCod);
void HieCfg_NumUsrsInCrss (HieLvl_Level_t Scope,long Cod,Rol_Role_t Role);
#endif
diff --git a/swad_hierarchy_database.c b/swad_hierarchy_database.c
index 49c5d620..39fe5eeb 100644
--- a/swad_hierarchy_database.c
+++ b/swad_hierarchy_database.c
@@ -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
diff --git a/swad_hierarchy_database.h b/swad_hierarchy_database.h
index cf6298de..e7ea0c58 100644
--- a/swad_hierarchy_database.h
+++ b/swad_hierarchy_database.h
@@ -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
diff --git a/swad_hierarchy_level.h b/swad_hierarchy_level.h
index b5a5f93f..d0aa14b1 100644
--- a/swad_hierarchy_level.h
+++ b/swad_hierarchy_level.h
@@ -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
diff --git a/swad_holiday.c b/swad_holiday.c
index c7ec742f..909cf932 100644
--- a/swad_holiday.c
+++ b/swad_holiday.c
@@ -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
@@ -42,6 +42,7 @@
#include "swad_HTML.h"
#include "swad_language.h"
#include "swad_parameter.h"
+#include "swad_parameter_code.h"
/*****************************************************************************/
/************** External global variables from others modules ****************/
@@ -546,7 +547,7 @@ static void Hld_ListHolidaysForEdition (const struct Hld_Holidays *Holidays,
/* Holiday place */
HTM_TD_Begin ("class=\"CM\"");
Frm_BeginForm (ActChgHldPlc);
- Par_PutParCode (Par_HldCod,Hld->HldCod);
+ ParCod_PutPar (ParCod_Hld,Hld->HldCod);
HTM_SELECT_Begin (HTM_SUBMIT_ON_CHANGE,
"name=\"PlcCod\" class=\"PLC_SEL INPUT_%s\"",
The_GetSuffix ());
@@ -565,7 +566,7 @@ static void Hld_ListHolidaysForEdition (const struct Hld_Holidays *Holidays,
/* Holiday type */
HTM_TD_Begin ("class=\"CM\"");
Frm_BeginForm (ActChgHldTyp);
- Par_PutParCode (Par_HldCod,Hld->HldCod);
+ ParCod_PutPar (ParCod_Hld,Hld->HldCod);
HTM_SELECT_Begin (HTM_SUBMIT_ON_CHANGE,
"name=\"HldTyp\" class=\"INPUT_%s\""
" style=\"width:62px;\"", // TODO: Use a CSS class
@@ -586,7 +587,7 @@ static void Hld_ListHolidaysForEdition (const struct Hld_Holidays *Holidays,
/* Holiday date / Non school period start date */
HTM_TD_Begin ("class=\"CM\"");
Frm_BeginForm (ActChgHldStrDat);
- Par_PutParCode (Par_HldCod,Hld->HldCod);
+ ParCod_PutPar (ParCod_Hld,Hld->HldCod);
Dat_WriteFormDate (CurrentYear - 1,
CurrentYear + 1,
"Start",
@@ -598,7 +599,7 @@ static void Hld_ListHolidaysForEdition (const struct Hld_Holidays *Holidays,
/* Non school period end date */
HTM_TD_Begin ("class=\"CM\"");
Frm_BeginForm (ActChgHldEndDat);
- Par_PutParCode (Par_HldCod,Hld->HldCod);
+ ParCod_PutPar (ParCod_Hld,Hld->HldCod);
Dat_WriteFormDate (CurrentYear - 1,
CurrentYear + 1,
"End",
@@ -610,7 +611,7 @@ static void Hld_ListHolidaysForEdition (const struct Hld_Holidays *Holidays,
/* Holiday name */
HTM_TD_Begin ("class=\"CM\"");
Frm_BeginForm (ActRenHld);
- Par_PutParCode (Par_HldCod,Hld->HldCod);
+ ParCod_PutPar (ParCod_Hld,Hld->HldCod);
HTM_INPUT_TEXT ("Name",Hld_MAX_CHARS_HOLIDAY_NAME,Hld->Name,
HTM_SUBMIT_ON_CHANGE,
"size=\"20\" class=\"INPUT_%s\"",
@@ -631,7 +632,7 @@ static void Hld_ListHolidaysForEdition (const struct Hld_Holidays *Holidays,
static void Hld_PutParHldCod (void *HldCod)
{
if (HldCod)
- Par_PutParCode (Par_HldCod,*((long *) HldCod));
+ ParCod_PutPar (ParCod_Hld,*((long *) HldCod));
}
/*****************************************************************************/
@@ -646,7 +647,7 @@ void Hld_RemoveHoliday (void)
Hld_EditingHolidayConstructor ();
/***** Get holiday code *****/
- Hld_EditingHld->HldCod = Par_GetAndCheckParCode (Par_HldCod);
+ Hld_EditingHld->HldCod = ParCod_GetAndCheckPar (ParCod_Hld);
/***** Get data of the holiday from database *****/
Hld_GetDataOfHolidayByCod (Hld_EditingHld);
@@ -674,11 +675,11 @@ void Hld_ChangeHolidayPlace (void)
/***** Get parameters from form *****/
/* Get the code of the holiday */
- Hld_EditingHld->HldCod = Par_GetAndCheckParCode (Par_HldCod);
+ Hld_EditingHld->HldCod = ParCod_GetAndCheckPar (ParCod_Hld);
/* Get the new place for the holiday */
// <0 (place unspecified/all places) and 0 (another place) are allowed here
- NewPlace.PlcCod = Par_GetParCode (Par_PlcCod);
+ NewPlace.PlcCod = ParCod_GetPar (ParCod_Plc);
/***** Get from the database the data of the place *****/
Plc_GetDataOfPlaceByCod (&NewPlace);
@@ -710,7 +711,7 @@ void Hld_ChangeHolidayType (void)
Hld_EditingHolidayConstructor ();
/***** Get the code of the holiday *****/
- Hld_EditingHld->HldCod = Par_GetAndCheckParCode (Par_HldCod);
+ Hld_EditingHld->HldCod = ParCod_GetAndCheckPar (ParCod_Hld);
/***** Get from the database the data of the holiday *****/
Hld_GetDataOfHolidayByCod (Hld_EditingHld);
@@ -762,7 +763,7 @@ static void Hld_ChangeDate (Hld_StartOrEndDate_t StartOrEndDate)
Hld_EditingHolidayConstructor ();
/***** Get the code of the holiday *****/
- Hld_EditingHld->HldCod = Par_GetAndCheckParCode (Par_HldCod);
+ Hld_EditingHld->HldCod = ParCod_GetAndCheckPar (ParCod_Hld);
/***** Get from the database the data of the holiday *****/
Hld_GetDataOfHolidayByCod (Hld_EditingHld);
@@ -826,7 +827,7 @@ void Hld_RenameHoliday (void)
/***** Get parameters from form *****/
/* Get the code of the holiday */
- Hld_EditingHld->HldCod = Par_GetAndCheckParCode (Par_HldCod);
+ Hld_EditingHld->HldCod = ParCod_GetAndCheckPar (ParCod_Hld);
/* Get the new name for the holiday */
Par_GetParText ("Name",NewHldName,Hld_MAX_BYTES_HOLIDAY_NAME);
@@ -1024,7 +1025,7 @@ void Hld_ReceiveFormNewHoliday (void)
/***** Get place code *****/
// <0 (place unspecified/all places) and 0 (another place) are allowed here
- Hld_EditingHld->PlcCod = Par_GetParCode (Par_PlcCod);
+ Hld_EditingHld->PlcCod = ParCod_GetPar (ParCod_Plc);
/***** Get the type of holiday *****/
Hld_EditingHld->HldTyp = Hld_GetParHldType ();
diff --git a/swad_holiday.h b/swad_holiday.h
index 385b713c..fb5617a1 100644
--- a/swad_holiday.h
+++ b/swad_holiday.h
@@ -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
diff --git a/swad_holiday_database.c b/swad_holiday_database.c
index 96060a17..e3eca2ed 100644
--- a/swad_holiday_database.c
+++ b/swad_holiday_database.c
@@ -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
diff --git a/swad_holiday_database.h b/swad_holiday_database.h
index 663493ce..0a6b2a18 100644
--- a/swad_holiday_database.h
+++ b/swad_holiday_database.h
@@ -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
diff --git a/swad_icon.c b/swad_icon.c
index e0a6394c..7e50e2d8 100644
--- a/swad_icon.c
+++ b/swad_icon.c
@@ -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
diff --git a/swad_icon.h b/swad_icon.h
index c392277f..b5bd5cc4 100644
--- a/swad_icon.h
+++ b/swad_icon.h
@@ -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
diff --git a/swad_indicator.c b/swad_indicator.c
index cae93f63..d3e7c0ef 100644
--- a/swad_indicator.c
+++ b/swad_indicator.c
@@ -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
@@ -50,6 +50,7 @@
#include "swad_message.h"
#include "swad_message_database.h"
#include "swad_parameter.h"
+#include "swad_parameter_code.h"
#include "swad_theme.h"
/*****************************************************************************/
@@ -144,7 +145,7 @@ void Ind_ReqIndicatorsCourses (void)
HTM_TR_Begin (NULL);
/* Label */
- Frm_LabelColumn ("RT",Par_CodeStr[Par_OthDegTypCod],Txt_Types_of_degree);
+ Frm_LabelColumn ("RT",Par_CodeStr[ParCod_OthDegTyp],Txt_Types_of_degree);
/* Data */
HTM_TD_Begin ("class=\"LT DAT_%s\"",The_GetSuffix ());
@@ -160,7 +161,7 @@ void Ind_ReqIndicatorsCourses (void)
HTM_TR_Begin (NULL);
/* Label */
- Frm_LabelColumn ("RT",Par_CodeStr[Par_DptCod],Txt_Department);
+ Frm_LabelColumn ("RT",Par_CodeStr[ParCod_Dpt],Txt_Department);
/* Data */
HTM_TD_Begin ("class=\"LT\"");
@@ -169,7 +170,7 @@ void Ind_ReqIndicatorsCourses (void)
Err_NotEnoughMemoryExit ();
Dpt_WriteSelectorDepartment (Gbl.Hierarchy.Ins.InsCod, // Departments in current insitution
Indicators.DptCod, // Selected department
- Par_CodeStr[Par_DptCod], // Parameter name
+ Par_CodeStr[ParCod_Dpt], // Parameter name
SelectClass, // Selector class
-1L, // First option
Txt_Any_department, // Text when no department selected
@@ -221,8 +222,8 @@ void Ind_ReqIndicatorsCourses (void)
/* Button to show more details */
Frm_BeginForm (ActSeeAllStaCrs);
Sco_PutParScope ("ScopeInd",Gbl.Scope.Current);
- Par_PutParCode (Par_OthDegTypCod,Indicators.DegTypCod);
- Par_PutParCode (Par_DptCod ,Indicators.DptCod );
+ ParCod_PutPar (ParCod_OthDegTyp,Indicators.DegTypCod);
+ ParCod_PutPar (ParCod_Dpt ,Indicators.DptCod );
if (Indicators.StrIndicatorsSelected[0])
Par_PutParString (NULL,"Indicators",Indicators.StrIndicatorsSelected);
Btn_PutConfirmButton (Txt_Show_more_details);
@@ -254,11 +255,11 @@ static void Ind_GetParsIndicators (struct Ind_Indicators *Indicators)
/***** Get degree type code *****/
Indicators->DegTypCod = (Gbl.Scope.Current == HieLvl_SYS) ?
- Par_GetParCode (Par_OthDegTypCod) : // -1L (any degree type) is allowed here
+ ParCod_GetPar (ParCod_OthDegTyp) : // -1L (any degree type) is allowed here
-1L;
/***** Get department code *****/
- Indicators->DptCod = Par_GetParCode (Par_DptCod); // -1L (any department) is allowed here
+ Indicators->DptCod = ParCod_GetPar (ParCod_Dpt); // -1L (any department) is allowed here
/***** Get number of indicators *****/
Ind_GetParNumIndicators (Indicators);
@@ -382,13 +383,11 @@ static void Ind_PutButtonToConfirmIWantToSeeBigList (struct Ind_Indicators *Indi
static void Ind_PutParsConfirmIWantToSeeBigList (void *Indicators)
{
- extern const char *Par_CodeStr[];
-
if (Indicators)
{
Sco_PutParScope ("ScopeInd",Gbl.Scope.Current);
- Par_PutParCode (Par_OthDegTypCod,((struct Ind_Indicators *) Indicators)->DegTypCod);
- Par_PutParCode (Par_DptCod ,((struct Ind_Indicators *) Indicators)->DptCod );
+ ParCod_PutPar (ParCod_OthDegTyp,((struct Ind_Indicators *) Indicators)->DegTypCod);
+ ParCod_PutPar (ParCod_Dpt ,((struct Ind_Indicators *) Indicators)->DptCod );
if (((struct Ind_Indicators *) Indicators)->StrIndicatorsSelected[0])
Par_PutParString (NULL,"Indicators",((struct Ind_Indicators *) Indicators)->StrIndicatorsSelected);
Par_PutParChar ("ShowBigList",'Y');
diff --git a/swad_indicator.h b/swad_indicator.h
index 23a93111..87ac9956 100644
--- a/swad_indicator.h
+++ b/swad_indicator.h
@@ -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
diff --git a/swad_indicator_database.c b/swad_indicator_database.c
index 0cecc306..80dd09d2 100644
--- a/swad_indicator_database.c
+++ b/swad_indicator_database.c
@@ -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
diff --git a/swad_indicator_database.h b/swad_indicator_database.h
index 579fb348..6e5511f9 100644
--- a/swad_indicator_database.h
+++ b/swad_indicator_database.h
@@ -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
diff --git a/swad_info.c b/swad_info.c
index d0646273..5dbf3f48 100644
--- a/swad_info.c
+++ b/swad_info.c
@@ -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
diff --git a/swad_info.h b/swad_info.h
index c61f15d9..545c60f9 100644
--- a/swad_info.h
+++ b/swad_info.h
@@ -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
diff --git a/swad_info_database.c b/swad_info_database.c
index 2271dcbe..2507f467 100644
--- a/swad_info_database.c
+++ b/swad_info_database.c
@@ -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
diff --git a/swad_info_database.h b/swad_info_database.h
index 040ef1cb..eca152bb 100644
--- a/swad_info_database.h
+++ b/swad_info_database.h
@@ -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
diff --git a/swad_institution.c b/swad_institution.c
index ae4566db..ac213d9d 100644
--- a/swad_institution.c
+++ b/swad_institution.c
@@ -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
@@ -54,6 +54,7 @@
#include "swad_logo.h"
#include "swad_message.h"
#include "swad_parameter.h"
+#include "swad_parameter_code.h"
#include "swad_place.h"
#include "swad_survey.h"
@@ -212,7 +213,7 @@ void Ins_DrawInstitutionLogoWithLink (struct Ins_Instit *Ins,unsigned Size)
if (PutLink)
{
Frm_BeginForm (ActSeeInsInf);
- Par_PutParCode (Par_InsCod,Ins->InsCod);
+ ParCod_PutPar (ParCod_Ins,Ins->InsCod);
HTM_BUTTON_Submit_Begin (Ins->FullName,"class=\"BT_LINK\"");
}
Lgo_DrawLogo (HieLvl_INS,Ins->InsCod,Ins->FullName,
@@ -233,7 +234,7 @@ void Ins_DrawInstitLogoAndNameWithLink (struct Ins_Instit *Ins,Act_Action_t Acti
{
/***** Begin form *****/
Frm_BeginFormGoTo (Action);
- Par_PutParCode (Par_InsCod,Ins->InsCod);
+ ParCod_PutPar (ParCod_Ins,Ins->InsCod);
/***** Link to action *****/
HTM_BUTTON_Submit_Begin (Str_BuildGoToTitle (Ins->FullName),
@@ -991,7 +992,7 @@ static void Ins_ListInstitutionsForEdition (void)
if (ICanEdit)
{
Frm_BeginForm (ActRenInsSho);
- Par_PutParCode (Par_OthHieCod,Ins->InsCod);
+ ParCod_PutPar (ParCod_OthHie,Ins->InsCod);
HTM_INPUT_TEXT ("ShortName",Cns_HIERARCHY_MAX_CHARS_SHRT_NAME,Ins->ShrtName,
HTM_SUBMIT_ON_CHANGE,
"class=\"INPUT_SHORT_NAME INPUT_%s\"",
@@ -1007,7 +1008,7 @@ static void Ins_ListInstitutionsForEdition (void)
if (ICanEdit)
{
Frm_BeginForm (ActRenInsFul);
- Par_PutParCode (Par_OthHieCod,Ins->InsCod);
+ ParCod_PutPar (ParCod_OthHie,Ins->InsCod);
HTM_INPUT_TEXT ("FullName",Cns_HIERARCHY_MAX_CHARS_FULL_NAME,Ins->FullName,
HTM_SUBMIT_ON_CHANGE,
"class=\"INPUT_FULL_NAME INPUT_%s\"",
@@ -1023,7 +1024,7 @@ static void Ins_ListInstitutionsForEdition (void)
if (ICanEdit)
{
Frm_BeginForm (ActChgInsWWW);
- Par_PutParCode (Par_OthHieCod,Ins->InsCod);
+ ParCod_PutPar (ParCod_OthHie,Ins->InsCod);
HTM_INPUT_URL ("WWW",Ins->WWW,HTM_SUBMIT_ON_CHANGE,
"class=\"INPUT_WWW_NARROW INPUT_%s\""
" required=\"required\"",
@@ -1110,7 +1111,7 @@ void Ins_RemoveInstitution (void)
Ins_EditingInstitutionConstructor ();
/***** Get institution code *****/
- Ins_EditingIns->InsCod = Par_GetAndCheckParCode (Par_OthHieCod);
+ Ins_EditingIns->InsCod = ParCod_GetAndCheckPar (ParCod_OthHie);
/***** Get data of the institution from database *****/
Ins_GetDataOfInstitByCod (Ins_EditingIns);
@@ -1184,7 +1185,7 @@ void Ins_RenameInsShort (void)
Ins_EditingInstitutionConstructor ();
/***** Rename institution *****/
- Ins_EditingIns->InsCod = Par_GetAndCheckParCode (Par_OthHieCod);
+ Ins_EditingIns->InsCod = ParCod_GetAndCheckPar (ParCod_OthHie);
Ins_RenameInstitution (Ins_EditingIns,Cns_SHRT_NAME);
}
@@ -1194,7 +1195,7 @@ void Ins_RenameInsFull (void)
Ins_EditingInstitutionConstructor ();
/***** Rename institution *****/
- Ins_EditingIns->InsCod = Par_GetAndCheckParCode (Par_OthHieCod);
+ Ins_EditingIns->InsCod = ParCod_GetAndCheckPar (ParCod_OthHie);
Ins_RenameInstitution (Ins_EditingIns,Cns_FULL_NAME);
}
@@ -1297,7 +1298,7 @@ void Ins_ChangeInsWWW (void)
/***** Get parameters from form *****/
/* Get the code of the institution */
- Ins_EditingIns->InsCod = Par_GetAndCheckParCode (Par_OthHieCod);
+ Ins_EditingIns->InsCod = ParCod_GetAndCheckPar (ParCod_OthHie);
/* Get the new WWW for the institution */
Par_GetParText ("WWW",NewWWW,Cns_MAX_BYTES_WWW);
@@ -1336,7 +1337,7 @@ void Ins_ChangeInsStatus (void)
/***** Get parameters from form *****/
/* Get institution code */
- Ins_EditingIns->InsCod = Par_GetAndCheckParCode (Par_OthHieCod);
+ Ins_EditingIns->InsCod = ParCod_GetAndCheckPar (ParCod_OthHie);
/* Get parameter with status */
Status = Hie_GetParStatus (); // New status
@@ -2030,7 +2031,7 @@ unsigned Ins_GetCachedNumUsrsWhoClaimToBelongToIns (struct Ins_Instit *Ins)
void Ins_PutParInsCod (void *InsCod)
{
if (InsCod)
- Par_PutParCode (Par_InsCod,*((long *) InsCod));
+ ParCod_PutPar (ParCod_Ins,*((long *) InsCod));
}
/*****************************************************************************/
@@ -2302,7 +2303,7 @@ static void Ins_ShowInss (MYSQL_RES **mysql_res,unsigned NumInss,
The_GetSuffix ());
/* Icon and name of this institution */
Frm_BeginForm (ActSeeInsInf);
- Par_PutParCode (Par_InsCod,Ins.InsCod);
+ ParCod_PutPar (ParCod_Ins,Ins.InsCod);
HTM_BUTTON_Submit_Begin (Ins.ShrtName,
"class=\"LM BT_LINK\"");
if (Gbl.Usrs.Listing.WithPhotos)
diff --git a/swad_institution.h b/swad_institution.h
index bd78832f..b47ee217 100644
--- a/swad_institution.h
+++ b/swad_institution.h
@@ -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
diff --git a/swad_institution_config.c b/swad_institution_config.c
index d9d7f9c2..f4e79d60 100644
--- a/swad_institution_config.c
+++ b/swad_institution_config.c
@@ -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
@@ -317,7 +317,7 @@ static void InsCfg_Country (bool PrintView,bool PutForm)
HTM_TR_Begin (NULL);
/* Label */
- Frm_LabelColumn ("RT",PutForm ? Par_CodeStr[Par_OthCtyCod] :
+ Frm_LabelColumn ("RT",PutForm ? Par_CodeStr[ParCod_OthCty] :
NULL,
Txt_Country);
@@ -345,7 +345,7 @@ static void InsCfg_Country (bool PrintView,bool PutForm)
if (!PrintView)
{
Frm_BeginFormGoTo (ActSeeCtyInf);
- Par_PutParCode (Par_CtyCod,Gbl.Hierarchy.Cty.CtyCod);
+ ParCod_PutPar (ParCod_Cty,Gbl.Hierarchy.Cty.CtyCod);
HTM_BUTTON_Submit_Begin (Str_BuildGoToTitle (Gbl.Hierarchy.Cty.Name[Gbl.Prefs.Language]),
"class=\"BT_LINK\"");
Str_FreeGoToTitle ();
@@ -402,7 +402,7 @@ static void InsCfg_WWW (bool PrintView,bool PutForm)
static void InsCfg_Shortcut (bool PrintView)
{
- HieCfg_Shortcut (PrintView,Par_InsCod,Gbl.Hierarchy.Ins.InsCod);
+ HieCfg_Shortcut (PrintView,ParCod_Ins,Gbl.Hierarchy.Ins.InsCod);
}
/*****************************************************************************/
@@ -411,7 +411,7 @@ static void InsCfg_Shortcut (bool PrintView)
static void InsCfg_QR (void)
{
- HieCfg_QR (Par_InsCod,Gbl.Hierarchy.Ins.InsCod);
+ HieCfg_QR (ParCod_Ins,Gbl.Hierarchy.Ins.InsCod);
}
/*****************************************************************************/
@@ -540,7 +540,7 @@ void InsCfg_ChangeInsCty (void)
struct Cty_Countr NewCty;
/***** Get the new country code for the institution *****/
- NewCty.CtyCod = Par_GetAndCheckParCode (Par_OthCtyCod);
+ NewCty.CtyCod = ParCod_GetAndCheckPar (ParCod_OthCty);
/***** Check if country has changed *****/
if (NewCty.CtyCod != Gbl.Hierarchy.Ins.CtyCod)
diff --git a/swad_institution_config.h b/swad_institution_config.h
index 697c5f0c..e6e69a28 100644
--- a/swad_institution_config.h
+++ b/swad_institution_config.h
@@ -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
diff --git a/swad_institution_database.c b/swad_institution_database.c
index 3099b056..f9330ee3 100644
--- a/swad_institution_database.c
+++ b/swad_institution_database.c
@@ -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
diff --git a/swad_institution_database.h b/swad_institution_database.h
index 26f842e4..90565c01 100644
--- a/swad_institution_database.h
+++ b/swad_institution_database.h
@@ -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
diff --git a/swad_language.c b/swad_language.c
index c83d925b..e5432ab5 100644
--- a/swad_language.c
+++ b/swad_language.c
@@ -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
diff --git a/swad_language.h b/swad_language.h
index 6f71c11b..70946e00 100644
--- a/swad_language.h
+++ b/swad_language.h
@@ -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
diff --git a/swad_layout.c b/swad_layout.c
index 72382c95..867160f0 100644
--- a/swad_layout.c
+++ b/swad_layout.c
@@ -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
diff --git a/swad_layout.h b/swad_layout.h
index 2ef43d2e..06b097b5 100644
--- a/swad_layout.h
+++ b/swad_layout.h
@@ -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
diff --git a/swad_link.c b/swad_link.c
index b23196c8..ea2b53d4 100644
--- a/swad_link.c
+++ b/swad_link.c
@@ -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_link.h"
#include "swad_link_database.h"
#include "swad_parameter.h"
+#include "swad_parameter_code.h"
/*****************************************************************************/
/************** External global variables from others modules ****************/
@@ -433,7 +434,7 @@ static void Lnk_ListLinksForEdition (const struct Lnk_Links *Links)
/* Link short name */
HTM_TD_Begin ("class=\"CM\"");
Frm_BeginForm (ActRenLnkSho);
- Par_PutParCode (Par_LnkCod,Lnk->LnkCod);
+ ParCod_PutPar (ParCod_Lnk,Lnk->LnkCod);
HTM_INPUT_TEXT ("ShortName",Lnk_MAX_CHARS_LINK_SHRT_NAME,Lnk->ShrtName,
HTM_SUBMIT_ON_CHANGE,
"class=\"INPUT_SHORT_NAME INPUT_%s\""
@@ -445,7 +446,7 @@ static void Lnk_ListLinksForEdition (const struct Lnk_Links *Links)
/* Link full name */
HTM_TD_Begin ("class=\"CM\"");
Frm_BeginForm (ActRenLnkFul);
- Par_PutParCode (Par_LnkCod,Lnk->LnkCod);
+ ParCod_PutPar (ParCod_Lnk,Lnk->LnkCod);
HTM_INPUT_TEXT ("FullName",Lnk_MAX_CHARS_LINK_FULL_NAME,Lnk->FullName,
HTM_SUBMIT_ON_CHANGE,
"class=\"INPUT_FULL_NAME INPUT_%s\""
@@ -457,7 +458,7 @@ static void Lnk_ListLinksForEdition (const struct Lnk_Links *Links)
/* Link WWW */
HTM_TD_Begin ("class=\"CM\"");
Frm_BeginForm (ActChgLnkWWW);
- Par_PutParCode (Par_LnkCod,Lnk->LnkCod);
+ ParCod_PutPar (ParCod_Lnk,Lnk->LnkCod);
HTM_INPUT_URL ("WWW",Lnk->WWW,HTM_SUBMIT_ON_CHANGE,
"class=\"INPUT_WWW_NARROW INPUT_%s\""
" required=\"required\"",
@@ -479,7 +480,7 @@ static void Lnk_ListLinksForEdition (const struct Lnk_Links *Links)
static void Lnk_PutParLnkCod (void *LnkCod)
{
if (LnkCod)
- Par_PutParCode (Par_LnkCod,*((long *) LnkCod));
+ ParCod_PutPar (ParCod_Lnk,*((long *) LnkCod));
}
/*****************************************************************************/
@@ -494,7 +495,7 @@ void Lnk_RemoveLink (void)
Lnk_EditingLinkConstructor ();
/***** Get link code *****/
- Lnk_EditingLnk->LnkCod = Par_GetAndCheckParCode (Par_LnkCod);
+ Lnk_EditingLnk->LnkCod = ParCod_GetAndCheckPar (ParCod_Lnk);
/***** Get data of the link from database *****/
Lnk_GetDataOfLinkByCod (Lnk_EditingLnk);
@@ -567,7 +568,7 @@ static void Lnk_RenameLink (Cns_ShrtOrFullName_t ShrtOrFullName)
/***** Get parameters from form *****/
/* Get the code of the link */
- Lnk_EditingLnk->LnkCod = Par_GetAndCheckParCode (Par_LnkCod);
+ Lnk_EditingLnk->LnkCod = ParCod_GetAndCheckPar (ParCod_Lnk);
/* Get the new name for the link */
Par_GetParText (ParName,NewLnkName,MaxBytes);
@@ -623,7 +624,7 @@ void Lnk_ChangeLinkWWW (void)
/***** Get parameters from form *****/
/* Get the code of the link */
- Lnk_EditingLnk->LnkCod = Par_GetAndCheckParCode (Par_LnkCod);
+ Lnk_EditingLnk->LnkCod = ParCod_GetAndCheckPar (ParCod_Lnk);
/* Get the new WWW for the link */
Par_GetParText ("WWW",NewWWW,Cns_MAX_BYTES_WWW);
diff --git a/swad_link.h b/swad_link.h
index 02074f22..ee3f7809 100644
--- a/swad_link.h
+++ b/swad_link.h
@@ -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
diff --git a/swad_link_database.c b/swad_link_database.c
index f5aada51..cdc85446 100644
--- a/swad_link_database.c
+++ b/swad_link_database.c
@@ -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
diff --git a/swad_link_database.h b/swad_link_database.h
index a4d2bc86..92488ad8 100644
--- a/swad_link_database.h
+++ b/swad_link_database.h
@@ -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
diff --git a/swad_log.c b/swad_log.c
index 6c2f59b5..482e1168 100644
--- a/swad_log.c
+++ b/swad_log.c
@@ -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
diff --git a/swad_log.h b/swad_log.h
index 98ab121b..5d809a0e 100644
--- a/swad_log.h
+++ b/swad_log.h
@@ -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
diff --git a/swad_log_database.c b/swad_log_database.c
index 53731780..f7348191 100644
--- a/swad_log_database.c
+++ b/swad_log_database.c
@@ -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
diff --git a/swad_log_database.h b/swad_log_database.h
index ea8b79ef..1bcdc933 100644
--- a/swad_log_database.h
+++ b/swad_log_database.h
@@ -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
diff --git a/swad_logo.c b/swad_logo.c
index 5be1fe36..4af9fcfc 100644
--- a/swad_logo.c
+++ b/swad_logo.c
@@ -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
diff --git a/swad_logo.h b/swad_logo.h
index 4a2ea915..3a592b35 100644
--- a/swad_logo.h
+++ b/swad_logo.h
@@ -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
diff --git a/swad_mail.c b/swad_mail.c
index f26aa820..62c0e6ca 100644
--- a/swad_mail.c
+++ b/swad_mail.c
@@ -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
@@ -471,7 +471,7 @@ static void Mai_ListMailDomainsForEdition (const struct Mai_Mails *Mails)
/* Mail domain */
HTM_TD_Begin ("class=\"CM\"");
Frm_BeginForm (ActRenMaiSho);
- Par_PutParCode (Par_MaiCod,Mai->MaiCod);
+ ParCod_PutPar (ParCod_Mai,Mai->MaiCod);
HTM_INPUT_TEXT ("Domain",Cns_MAX_CHARS_EMAIL_ADDRESS,Mai->Domain,
HTM_SUBMIT_ON_CHANGE,
"size=\"15\" class=\"INPUT_%s\"",
@@ -482,7 +482,7 @@ static void Mai_ListMailDomainsForEdition (const struct Mai_Mails *Mails)
/* Mail domain info */
HTM_TD_Begin ("class=\"CM\"");
Frm_BeginForm (ActRenMaiFul);
- Par_PutParCode (Par_MaiCod,Mai->MaiCod);
+ ParCod_PutPar (ParCod_Mai,Mai->MaiCod);
HTM_INPUT_TEXT ("Info",Mai_MAX_CHARS_MAIL_INFO,Mai->Info,
HTM_SUBMIT_ON_CHANGE,
"size=\"40\" class=\"INPUT_%s\"",
@@ -509,7 +509,7 @@ static void Mai_ListMailDomainsForEdition (const struct Mai_Mails *Mails)
static void Mai_PutParMaiCod (void *MaiCod)
{
if (MaiCod)
- Par_PutParCode (Par_MaiCod,*((long *) MaiCod));
+ ParCod_PutPar (ParCod_Mai,*((long *) MaiCod));
}
/*****************************************************************************/
@@ -524,7 +524,7 @@ void Mai_RemoveMailDomain (void)
Mai_EditingMailDomainConstructor ();
/***** Get mail domain code *****/
- Mai_EditingMai->MaiCod = Par_GetAndCheckParCode (Par_MaiCod);
+ Mai_EditingMai->MaiCod = ParCod_GetAndCheckPar (ParCod_Mai);
/***** Get data of the mail domain rom database *****/
Mai_GetDataOfMailDomainByCod (Mai_EditingMai);
@@ -597,7 +597,7 @@ static void Mai_RenameMailDomain (Cns_ShrtOrFullName_t ShrtOrFullName)
/***** Get parameters from form *****/
/* Get the code of the mail */
- Mai_EditingMai->MaiCod = Par_GetAndCheckParCode (Par_MaiCod);
+ Mai_EditingMai->MaiCod = ParCod_GetAndCheckPar (ParCod_Mai);
/* Get the new name for the mail */
Par_GetParText (ParName,NewMaiName,MaxBytes);
diff --git a/swad_mail.h b/swad_mail.h
index d1f24e48..4515dced 100644
--- a/swad_mail.h
+++ b/swad_mail.h
@@ -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
diff --git a/swad_mail_database.c b/swad_mail_database.c
index 3662960c..711abab0 100644
--- a/swad_mail_database.c
+++ b/swad_mail_database.c
@@ -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
diff --git a/swad_mail_database.h b/swad_mail_database.h
index 3b28d697..4069e036 100644
--- a/swad_mail_database.h
+++ b/swad_mail_database.h
@@ -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
diff --git a/swad_main.c b/swad_main.c
index e268303a..da7fcbf3 100644
--- a/swad_main.c
+++ b/swad_main.c
@@ -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
diff --git a/swad_maintenance.c b/swad_maintenance.c
index 05e630ac..b9c38cc1 100644
--- a/swad_maintenance.c
+++ b/swad_maintenance.c
@@ -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
diff --git a/swad_maintenance.h b/swad_maintenance.h
index 35c61872..b2b96b34 100644
--- a/swad_maintenance.h
+++ b/swad_maintenance.h
@@ -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
diff --git a/swad_map.c b/swad_map.c
index 89666e2c..b9808d96 100644
--- a/swad_map.c
+++ b/swad_map.c
@@ -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
diff --git a/swad_map.h b/swad_map.h
index 094856d9..38bfa640 100644
--- a/swad_map.h
+++ b/swad_map.h
@@ -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
diff --git a/swad_mark.c b/swad_mark.c
index e4217d9f..7e39201d 100644
--- a/swad_mark.c
+++ b/swad_mark.c
@@ -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
diff --git a/swad_mark.h b/swad_mark.h
index 2a55046c..be5a0125 100644
--- a/swad_mark.h
+++ b/swad_mark.h
@@ -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
diff --git a/swad_mark_database.c b/swad_mark_database.c
index 1ba70510..ba0d73b3 100644
--- a/swad_mark_database.c
+++ b/swad_mark_database.c
@@ -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
diff --git a/swad_mark_database.h b/swad_mark_database.h
index 7dc2623b..3bf27b2a 100644
--- a/swad_mark_database.h
+++ b/swad_mark_database.h
@@ -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
diff --git a/swad_match.c b/swad_match.c
index 83cbd466..3b1a3141 100644
--- a/swad_match.c
+++ b/swad_match.c
@@ -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
@@ -47,7 +47,7 @@
#include "swad_match.h"
#include "swad_match_database.h"
#include "swad_match_result.h"
-#include "swad_parameter.h"
+#include "swad_parameter_code.h"
#include "swad_question_database.h"
#include "swad_role.h"
#include "swad_setting.h"
@@ -630,7 +630,7 @@ static void Mch_ListOneOrMoreMatchesTitleGrps (const struct Mch_Match *Match,
/***** Match title *****/
Frm_BeginForm (Gbl.Usrs.Me.Role.Logged == Rol_STD ? ActJoiMch :
ActResMch);
- Par_PutParCode (Par_MchCod,Match->MchCod);
+ ParCod_PutPar (ParCod_Mch,Match->MchCod);
HTM_BUTTON_Submit_Begin (Gbl.Usrs.Me.Role.Logged == Rol_STD ? Txt_Play :
Txt_Resume,
@@ -754,7 +754,7 @@ static void Mch_ListOneOrMoreMatchesStatus (struct Mch_Match *Match,unsigned Num
static void Mch_PutParMchCod (void *MchCod)
{
if (MchCod)
- Par_PutParCode (Par_MchCod,*((long *) MchCod));
+ ParCod_PutPar (ParCod_Mch,*((long *) MchCod));
}
/*****************************************************************************/
@@ -1130,7 +1130,7 @@ void Mch_PutParsEdit (void *Games)
if (Games)
{
Gam_PutPars (Games);
- Par_PutParCode (Par_MchCod,((struct Gam_Games *) Games)->MchCod.Current);
+ ParCod_PutPar (ParCod_Mch,((struct Gam_Games *) Games)->MchCod.Current);
}
}
@@ -1149,7 +1149,7 @@ void Mch_GetAndCheckPars (struct Gam_Games *Games,
Gam_GetDataOfGameByCod (&Games->Game);
/* Get match code */
- Match->MchCod = Par_GetAndCheckParCode (Par_MchCod);
+ Match->MchCod = ParCod_GetAndCheckPar (ParCod_Mch);
Mch_GetDataOfMatchByCod (Match);
/***** Ensure parameters are correct *****/
@@ -1233,7 +1233,7 @@ static void Mch_PutFormNewMatch (const struct Gam_Game *Game)
/***** Begin form *****/
Frm_BeginForm (ActNewMch);
- Par_PutParCode (Par_GamCod,Game->GamCod);
+ ParCod_PutPar (ParCod_Gam,Game->GamCod);
Gam_PutParQstInd (0); // Start by first question in game
/***** Begin box and table *****/
@@ -1317,7 +1317,7 @@ static void Mch_ShowLstGrpsToEditMatch (long MchCod)
"id=\"WholeCrs\" value=\"Y\"%s"
" onclick=\"uncheckChildren(this,'GrpCods')\"",
Grp_DB_CheckIfAssociatedToGrps ("mch_groups",
- Par_MchCod,
+ "MchCod",
MchCod) ? "" :
" checked=\"checked\"");
HTM_TxtF ("%s %s",Txt_The_whole_course,Gbl.Hierarchy.Crs.ShrtName);
@@ -1357,7 +1357,7 @@ void Mch_CreateNewMatch (void)
/***** Get form parameters *****/
/* Get match code */
- GamCod = Par_GetAndCheckParCode (Par_GamCod);
+ GamCod = ParCod_GetAndCheckPar (ParCod_Gam);
/* Get match title */
Par_GetParText ("Title",Title,Mch_MAX_BYTES_TITLE);
@@ -2597,7 +2597,7 @@ static void Mch_ShowFormColumns (const struct Mch_Match *Match)
/* Begin form */
Frm_BeginForm (ActChgNumColMch);
- Par_PutParCode (Par_MchCod,Match->MchCod); // Current match being played
+ ParCod_PutPar (ParCod_Mch,Match->MchCod); // Current match being played
Mch_PutParNumCols (NumCols); // Number of columns
/* Number of columns */
@@ -2642,7 +2642,7 @@ static void Mch_PutCheckboxResult (const struct Mch_Match *Match)
/***** Begin form *****/
Frm_BeginForm (ActChgVisResMchQst);
- Par_PutParCode (Par_MchCod,Match->MchCod); // Current match being played
+ ParCod_PutPar (ParCod_Mch,Match->MchCod); // Current match being played
/***** Put icon with link *****/
HTM_BUTTON_Submit_Begin (Txt_View_results,
@@ -2680,7 +2680,7 @@ static void Mch_PutIfAnswered (const struct Mch_Match *Match,bool Answered)
{
/* Begin form */
Frm_BeginForm (ActSeeMchAnsQstStd);
- Par_PutParCode (Par_MchCod,Match->MchCod); // Current match being played
+ ParCod_PutPar (ParCod_Mch,Match->MchCod); // Current match being played
HTM_BUTTON_Submit_Begin (Txt_View_my_answer,
"class=\"BT_LINK DAT_SMALL_GREEN_%s\""
@@ -2725,7 +2725,7 @@ static void Mch_PutIconToRemoveMyAnswer (const struct Mch_Match *Match)
/***** Begin form *****/
Frm_BeginForm (ActRemMchAnsQstStd);
- Par_PutParCode (Par_MchCod,Match->MchCod); // Current match being played
+ ParCod_PutPar (ParCod_Mch,Match->MchCod); // Current match being played
Gam_PutParQstInd (Match->Status.QstInd); // Current question index shown
/***** Put icon with link *****/
@@ -2981,7 +2981,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_PutParCode (Par_MchCod,Match->MchCod); // Current match being played
+ ParCod_PutPar (ParCod_Mch,Match->MchCod); // Current match being played
Gam_PutParQstInd (Match->Status.QstInd); // Current question index shown
Mch_PutParNumOpt (NumOpt); // Number of button
@@ -3246,7 +3246,7 @@ static void Mch_PutBigButton (Act_Action_t NextAction,const char *Id,
{
/***** Begin form *****/
Frm_BeginFormId (NextAction,Id);
- Par_PutParCode (Par_MchCod,MchCod);
+ ParCod_PutPar (ParCod_Mch,MchCod);
/***** Put icon with link *****/
HTM_DIV_Begin ("class=\"MCH_BIGBUTTON_CONT\"");
@@ -3341,7 +3341,7 @@ void Mch_GetMatchBeingPlayed (void)
long MchCodBeingPlayed;
/***** Get match code ****/
- MchCodBeingPlayed = Par_GetAndCheckParCode (Par_MchCod);
+ MchCodBeingPlayed = ParCod_GetAndCheckPar (ParCod_Mch);
Mch_SetMchCodBeingPlayed (MchCodBeingPlayed);
}
diff --git a/swad_match.h b/swad_match.h
index dfad0660..c8981784 100644
--- a/swad_match.h
+++ b/swad_match.h
@@ -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
diff --git a/swad_match_database.c b/swad_match_database.c
index b71dd0d9..307660ff 100644
--- a/swad_match_database.c
+++ b/swad_match_database.c
@@ -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
diff --git a/swad_match_database.h b/swad_match_database.h
index dde5804b..d45a731f 100644
--- a/swad_match_database.h
+++ b/swad_match_database.h
@@ -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
diff --git a/swad_match_print.c b/swad_match_print.c
index 6e461091..f8141b7a 100644
--- a/swad_match_print.c
+++ b/swad_match_print.c
@@ -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
diff --git a/swad_match_print.h b/swad_match_print.h
index a71d8582..45d9db0f 100644
--- a/swad_match_print.h
+++ b/swad_match_print.h
@@ -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
diff --git a/swad_match_result.c b/swad_match_result.c
index 1bfcfd07..80a7ceef 100644
--- a/swad_match_result.c
+++ b/swad_match_result.c
@@ -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
@@ -46,6 +46,7 @@
#include "swad_match_database.h"
#include "swad_match_result.h"
#include "swad_parameter.h"
+#include "swad_parameter_code.h"
#include "swad_photo.h"
#include "swad_test_visibility.h"
#include "swad_user.h"
@@ -213,7 +214,7 @@ void MchRes_ShowMyMchResultsInMch (void)
/***** Get parameters *****/
if ((Games.Game.GamCod = Gam_GetPars (&Games)) <= 0)
Err_WrongGameExit ();
- Match.MchCod = Par_GetAndCheckParCode (Par_MchCod);
+ Match.MchCod = ParCod_GetAndCheckPar (ParCod_Mch);
Gam_GetDataOfGameByCod (&Games.Game);
Mch_GetDataOfMatchByCod (&Match);
@@ -439,7 +440,7 @@ void MchRes_ShowAllMchResultsInMch (void)
/***** Get parameters *****/
if ((Games.Game.GamCod = Gam_GetPars (&Games)) <= 0)
Err_WrongGameExit ();
- Match.MchCod = Par_GetAndCheckParCode (Par_MchCod);
+ Match.MchCod = ParCod_GetAndCheckPar (ParCod_Mch);
Gam_GetDataOfGameByCod (&Games.Game);
Mch_GetDataOfMatchByCod (&Match);
@@ -578,7 +579,7 @@ static void MchRes_ListGamesToSelect (struct Gam_Games *Games)
HTM_TD_Begin ("class=\"CT DAT_%s %s\"",
The_GetSuffix (),
The_GetColorRows ());
- HTM_INPUT_CHECKBOX (Par_CodeStr[Par_GamCod],HTM_DONT_SUBMIT_ON_CHANGE,
+ HTM_INPUT_CHECKBOX (Par_CodeStr[ParCod_Gam],HTM_DONT_SUBMIT_ON_CHANGE,
"id=\"Gam%u\" value=\"%ld\"%s",
NumGame,Games->Lst[NumGame].GamCod,
Games->Lst[NumGame].Selected ? " checked=\"checked\"" :
diff --git a/swad_match_result.h b/swad_match_result.h
index 3194bff7..221ac35b 100644
--- a/swad_match_result.h
+++ b/swad_match_result.h
@@ -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
diff --git a/swad_media.c b/swad_media.c
index 1a693451..5655a1bd 100644
--- a/swad_media.c
+++ b/swad_media.c
@@ -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
diff --git a/swad_media.h b/swad_media.h
index 446d7838..437df4dd 100644
--- a/swad_media.h
+++ b/swad_media.h
@@ -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
diff --git a/swad_media_database.c b/swad_media_database.c
index 0180a91d..9ada777b 100644
--- a/swad_media_database.c
+++ b/swad_media_database.c
@@ -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
diff --git a/swad_media_database.h b/swad_media_database.h
index 9373a8d2..466566be 100644
--- a/swad_media_database.h
+++ b/swad_media_database.h
@@ -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
diff --git a/swad_menu.c b/swad_menu.c
index 9203c721..1b6e0cd1 100644
--- a/swad_menu.c
+++ b/swad_menu.c
@@ -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
diff --git a/swad_menu.h b/swad_menu.h
index e1c5a28e..93a92482 100644
--- a/swad_menu.h
+++ b/swad_menu.h
@@ -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
diff --git a/swad_message.c b/swad_message.c
index 61169e2b..8b34e8c4 100644
--- a/swad_message.c
+++ b/swad_message.c
@@ -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
@@ -58,6 +58,7 @@
#include "swad_notification_database.h"
#include "swad_pagination.h"
#include "swad_parameter.h"
+#include "swad_parameter_code.h"
#include "swad_photo.h"
#include "swad_profile.h"
#include "swad_profile_database.h"
@@ -234,7 +235,7 @@ static void Msg_PutFormMsgUsrs (struct Msg_Messages *Messages,
/***** Get parameter that indicates if the message is a reply to another message *****/
if ((Messages->Reply.IsReply = Par_GetParBool ("IsReply")))
/* Get original message code */
- Messages->Reply.OriginalMsgCod = Par_GetAndCheckParCode (Par_MsgCod);
+ Messages->Reply.OriginalMsgCod = ParCod_GetAndCheckPar (ParCod_Msg);
/***** Get user's code of possible preselected recipient *****/
if (Usr_GetParOtherUsrCodEncryptedAndGetUsrData ()) // There is a preselected recipient
@@ -319,7 +320,7 @@ static void Msg_PutFormMsgUsrs (struct Msg_Messages *Messages,
if (Messages->Reply.IsReply)
{
Par_PutParChar ("IsReply",'Y');
- Par_PutParCode (Par_MsgCod,Messages->Reply.OriginalMsgCod);
+ ParCod_PutPar (ParCod_Msg,Messages->Reply.OriginalMsgCod);
}
if (Gbl.Usrs.Other.UsrDat.UsrCod > 0)
{
@@ -431,7 +432,7 @@ static void Msg_PutParsShowMorePotentialRecipients (void *Messages)
if (((struct Msg_Messages *) Messages)->Reply.IsReply)
{
Par_PutParChar ("IsReply",'Y');
- Par_PutParCode (Par_MsgCod,((struct Msg_Messages *) Messages)->Reply.OriginalMsgCod);
+ ParCod_PutPar (ParCod_Msg,((struct Msg_Messages *) Messages)->Reply.OriginalMsgCod);
}
if (Gbl.Usrs.Other.UsrDat.UsrCod > 0)
Usr_PutParOtherUsrCodEncrypted (Gbl.Usrs.Other.UsrDat.EnUsrCod);
@@ -455,7 +456,7 @@ static void Msg_PutParsWriteMsg (void *Messages)
if (((struct Msg_Messages *) Messages)->Reply.IsReply)
{
Par_PutParChar ("IsReply",'Y');
- Par_PutParCode (Par_MsgCod,((struct Msg_Messages *) Messages)->Reply.OriginalMsgCod);
+ ParCod_PutPar (ParCod_Msg,((struct Msg_Messages *) Messages)->Reply.OriginalMsgCod);
}
if (Gbl.Usrs.Other.UsrDat.UsrCod > 0)
{
@@ -587,7 +588,7 @@ static void Msg_WriteFormSubjectAndContentMsgToUsrs (struct Msg_Messages *Messag
bool SubjectAndContentComeFromForm = (Messages->Subject[0] || Content[0]);
/***** Get possible code (of original message if it's a reply) *****/
- MsgCod = Par_GetParCode (Par_MsgCod);
+ MsgCod = ParCod_GetPar (ParCod_Msg);
/***** Message subject *****/
HTM_TR_Begin (NULL);
@@ -759,7 +760,7 @@ void Msg_RecMsgFromUsr (void)
/* Get parameter that indicates if the message is a reply to a previous message */
if ((IsReply = Par_GetParBool ("IsReply")))
/* Get original message code */
- OriginalMsgCod = Par_GetAndCheckParCode (Par_MsgCod);
+ OriginalMsgCod = ParCod_GetAndCheckPar (ParCod_Msg);
/* Get user's code of possible preselected recipient */
Usr_GetParOtherUsrCodEncryptedAndGetListIDs ();
@@ -1107,7 +1108,7 @@ static void Msg_GetParMsgsCrsCod (struct Msg_Messages *Messages)
extern const char *Txt_any_course;
struct Crs_Course Crs;
- if ((Messages->FilterCrsCod = Par_GetParCode (Par_OthCrsCod)) > 0) // If origin course specified
+ if ((Messages->FilterCrsCod = ParCod_GetPar (ParCod_OthCrs)) > 0) // If origin course specified
{
/* Get data of course */
Crs.CrsCod = Messages->FilterCrsCod;
@@ -1151,7 +1152,7 @@ void Msg_DelSntMsg (void)
long MsgCod;
/***** Get the code of the message to delete *****/
- MsgCod = Par_GetAndCheckParCode (Par_MsgCod);
+ MsgCod = ParCod_GetAndCheckPar (ParCod_Msg);
/***** Delete the message *****/
/* Delete the sent message */
@@ -1172,7 +1173,7 @@ void Msg_DelRecMsg (void)
long MsgCod;
/***** Get the code of the message to delete *****/
- MsgCod = Par_GetAndCheckParCode (Par_MsgCod);
+ MsgCod = ParCod_GetAndCheckPar (ParCod_Msg);
/***** Delete the message *****/
/* Delete the received message */
@@ -1195,7 +1196,7 @@ void Msg_ExpSntMsg (void)
Msg_ResetMessages (&Messages);
/***** Get the code of the message to expand *****/
- Messages.ExpandedMsgCod = Par_GetAndCheckParCode (Par_MsgCod);
+ Messages.ExpandedMsgCod = ParCod_GetAndCheckPar (ParCod_Msg);
/***** Expand the message *****/
Msg_DB_ExpandSntMsg (Messages.ExpandedMsgCod);
@@ -1216,7 +1217,7 @@ void Msg_ExpRecMsg (void)
Msg_ResetMessages (&Messages);
/***** Get the code of the message to expand *****/
- Messages.ExpandedMsgCod = Par_GetAndCheckParCode (Par_MsgCod);
+ Messages.ExpandedMsgCod = ParCod_GetAndCheckPar (ParCod_Msg);
/***** Expand the message *****/
Msg_DB_ExpandRcvMsg (Messages.ExpandedMsgCod);
@@ -1237,7 +1238,7 @@ void Msg_ConSntMsg (void)
long MsgCod;
/***** Get the code of the message to contract *****/
- MsgCod = Par_GetAndCheckParCode (Par_MsgCod);
+ MsgCod = ParCod_GetAndCheckPar (ParCod_Msg);
/***** Contract the message *****/
Msg_DB_ContractSntMsg (MsgCod);
@@ -1255,7 +1256,7 @@ void Msg_ConRecMsg (void)
long MsgCod;
/***** Get the code of the message to contract *****/
- MsgCod = Par_GetAndCheckParCode (Par_MsgCod);
+ MsgCod = ParCod_GetAndCheckPar (ParCod_Msg);
/***** Contract the message *****/
Msg_DB_ContractRcvMsg (MsgCod);
@@ -1760,7 +1761,7 @@ static void Msg_PutParsOneMsg (void *Messages)
{
Pag_PutParPagNum (Msg_WhatPaginate[((struct Msg_Messages *) Messages)->TypeOfMessages],
((struct Msg_Messages *) Messages)->CurrentPage);
- Par_PutParCode (Par_MsgCod,((struct Msg_Messages *) Messages)->MsgCod);
+ ParCod_PutPar (ParCod_Msg,((struct Msg_Messages *) Messages)->MsgCod);
Msg_PutParsMsgsFilters (Messages);
}
}
@@ -1774,7 +1775,7 @@ void Msg_PutParsMsgsFilters (void *Messages)
if (Messages)
{
if (((struct Msg_Messages *) Messages)->FilterCrsCod >= 0)
- Par_PutParCode (Par_OthCrsCod,((struct Msg_Messages *) Messages)->FilterCrsCod);
+ ParCod_PutPar (ParCod_OthCrs,((struct Msg_Messages *) Messages)->FilterCrsCod);
if (((struct Msg_Messages *) Messages)->FilterFromTo[0])
Par_PutParString (NULL,"FilterFromTo",((struct Msg_Messages *) Messages)->FilterFromTo);
@@ -2385,7 +2386,7 @@ static bool Msg_WriteCrsOrgMsg (long CrsCod)
{
/* Write course, including link */
Frm_BeginFormGoTo (ActSeeCrsInf);
- Par_PutParCode (Par_CrsCod,Crs.CrsCod);
+ ParCod_PutPar (ParCod_Crs,Crs.CrsCod);
HTM_DIV_Begin ("class=\"MSG_AUT_%s\"",The_GetSuffix ());
HTM_Txt ("(");
HTM_BUTTON_Submit_Begin (Str_BuildGoToTitle (Crs.FullName),
@@ -2422,11 +2423,11 @@ static void Msg_WriteFormToReply (long MsgCod,long CrsCod,bool FromThisCrs,
else // Not the current course ==> go to another course
{
Frm_BeginFormGoTo (ActReqMsgUsr);
- Par_PutParCode (Par_CrsCod,CrsCod);
+ ParCod_PutPar (ParCod_Crs,CrsCod);
}
Grp_PutParAllGroups ();
Par_PutParChar ("IsReply",'Y');
- Par_PutParCode (Par_MsgCod,MsgCod);
+ ParCod_PutPar (ParCod_Msg,MsgCod);
Usr_PutParUsrCodEncrypted (UsrDat->EnUsrCod);
Par_PutParChar ("ShowOnlyOneRecipient",'Y');
diff --git a/swad_message.h b/swad_message.h
index 04569c0c..33c48106 100644
--- a/swad_message.h
+++ b/swad_message.h
@@ -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
diff --git a/swad_message_database.c b/swad_message_database.c
index a884a412..71bca810 100644
--- a/swad_message_database.c
+++ b/swad_message_database.c
@@ -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
diff --git a/swad_message_database.h b/swad_message_database.h
index fe357723..90f2c420 100644
--- a/swad_message_database.h
+++ b/swad_message_database.h
@@ -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
diff --git a/swad_network.c b/swad_network.c
index 89072716..c1d65846 100644
--- a/swad_network.c
+++ b/swad_network.c
@@ -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
diff --git a/swad_network.h b/swad_network.h
index 50d7624e..19a7f769 100644
--- a/swad_network.h
+++ b/swad_network.h
@@ -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
diff --git a/swad_network_database.c b/swad_network_database.c
index fb7a35b2..398b1d82 100644
--- a/swad_network_database.c
+++ b/swad_network_database.c
@@ -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
diff --git a/swad_network_database.h b/swad_network_database.h
index a7ebe3db..50bf5250 100644
--- a/swad_network_database.h
+++ b/swad_network_database.h
@@ -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
diff --git a/swad_nickname.c b/swad_nickname.c
index 14f78502..a7f32d8e 100644
--- a/swad_nickname.c
+++ b/swad_nickname.c
@@ -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
diff --git a/swad_nickname.h b/swad_nickname.h
index c096ffbc..7d20e82c 100644
--- a/swad_nickname.h
+++ b/swad_nickname.h
@@ -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
diff --git a/swad_nickname_database.c b/swad_nickname_database.c
index ec8f5213..bbf47eb4 100644
--- a/swad_nickname_database.c
+++ b/swad_nickname_database.c
@@ -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
diff --git a/swad_nickname_database.h b/swad_nickname_database.h
index 2393eb60..021fe83d 100644
--- a/swad_nickname_database.h
+++ b/swad_nickname_database.h
@@ -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
diff --git a/swad_notice.c b/swad_notice.c
index c6394a43..f3d36e5b 100644
--- a/swad_notice.c
+++ b/swad_notice.c
@@ -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,6 +48,7 @@
#include "swad_notification.h"
#include "swad_notification_database.h"
#include "swad_parameter.h"
+#include "swad_parameter_code.h"
#include "swad_RSS.h"
#include "swad_timeline.h"
#include "swad_timeline_database.h"
@@ -202,7 +203,7 @@ void Not_ListFullNotices (void)
void Not_GetHighLightedNotCod (void)
{
- Gbl.Crs.Notices.HighlightNotCod = Par_GetParCode (Par_NotCod);
+ Gbl.Crs.Notices.HighlightNotCod = ParCod_GetPar (ParCod_Not);
}
/*****************************************************************************/
@@ -214,7 +215,7 @@ void Not_HideActiveNotice (void)
long NotCod;
/***** Get the code of the notice to hide *****/
- NotCod = Par_GetAndCheckParCode (Par_NotCod);
+ NotCod = ParCod_GetAndCheckPar (ParCod_Not);
/***** Set notice as hidden *****/
Not_DB_ChangeNoticeStatus (NotCod,Not_OBSOLETE_NOTICE);
@@ -235,7 +236,7 @@ void Not_RevealHiddenNotice (void)
long NotCod;
/***** Get the code of the notice to reveal *****/
- NotCod = Par_GetAndCheckParCode (Par_NotCod);
+ NotCod = ParCod_GetAndCheckPar (ParCod_Not);
/***** Set notice as active *****/
Not_DB_ChangeNoticeStatus (NotCod,Not_ACTIVE_NOTICE);
@@ -257,7 +258,7 @@ void Not_RequestRemNotice (void)
long NotCod;
/***** Get the code of the notice to remove *****/
- NotCod = Par_GetAndCheckParCode (Par_NotCod);
+ NotCod = ParCod_GetAndCheckPar (ParCod_Not);
/***** Show question and button to remove this notice *****/
/* Begin alert */
@@ -285,7 +286,7 @@ void Not_RemoveNotice (void)
long NotCod;
/***** Get the code of the notice to remove *****/
- NotCod = Par_GetAndCheckParCode (Par_NotCod);
+ NotCod = ParCod_GetAndCheckPar (ParCod_Not);
/***** Remove notice *****/
/* Copy notice to table of deleted notices */
@@ -600,7 +601,7 @@ static void Not_DrawANotice (Not_Listing_t TypeNoticesListing,
{
/* Form to view full notice */
Frm_BeginFormAnchor (ActSeeOneNot,Anchor);
- Par_PutParCode (Par_NotCod,NotCod);
+ ParCod_PutPar (ParCod_Not,NotCod);
HTM_BUTTON_Submit_Begin (Txt_See_full_notice,
"class=\"RT BT_LINK\"");
}
@@ -804,7 +805,7 @@ unsigned Not_GetNumNoticesDeleted (HieLvl_Level_t Scope,unsigned *NumNotif)
static void Not_PutParNotCod (void *NotCod)
{
if (NotCod)
- Par_PutParCode (Par_NotCod,*((long *) NotCod));
+ ParCod_PutPar (ParCod_Not,*((long *) NotCod));
}
/*****************************************************************************/
diff --git a/swad_notice.h b/swad_notice.h
index e24ce167..1ec9e26b 100644
--- a/swad_notice.h
+++ b/swad_notice.h
@@ -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
diff --git a/swad_notice_database.c b/swad_notice_database.c
index af21ea21..8410bd0a 100644
--- a/swad_notice_database.c
+++ b/swad_notice_database.c
@@ -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
diff --git a/swad_notice_database.h b/swad_notice_database.h
index 71f8123e..0ca583df 100644
--- a/swad_notice_database.h
+++ b/swad_notice_database.h
@@ -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
diff --git a/swad_notification.c b/swad_notification.c
index 28151ee9..41c8bb5f 100644
--- a/swad_notification.c
+++ b/swad_notification.c
@@ -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
@@ -62,7 +62,7 @@
#include "swad_notice.h"
#include "swad_notification.h"
#include "swad_notification_database.h"
-#include "swad_parameter.h"
+#include "swad_parameter_code.h"
#include "swad_setting.h"
#include "swad_setting_database.h"
#include "swad_survey.h"
@@ -714,7 +714,7 @@ static Act_Action_t Ntf_StartFormGoToAction (Ntf_NotifyEvent_t NotifyEvent,
/* Begin form */
Action = ActSeeOneCfe;
Frm_BeginFormAnchor (ActSeeOneCfe,Anchor);
- Par_PutParCode (Par_ExaCod,Cod);
+ ParCod_PutPar (ParCod_Exa,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_PutParCode (Par_GrpCod,GrpCod);
- Par_PutParCode (Par_FilCod,FileMetadata.FilCod);
+ ParCod_PutPar (ParCod_Grp,GrpCod);
+ ParCod_PutPar (ParCod_Fil,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_PutParCode (Par_PubCod,Cod);
+ ParCod_PutPar (ParCod_Pub,Cod);
Usr_PutParUsrCodEncrypted (UsrDat->EnUsrCod);
Ntf_PutParNotifyEvent (NotifyEvent);
break;
@@ -803,12 +803,12 @@ static Act_Action_t Ntf_StartFormGoToAction (Ntf_NotifyEvent_t NotifyEvent,
case Ntf_EVENT_NOTICE:
Action = ActSeeOneNot;
Frm_BeginForm (Action);
- Par_PutParCode (Par_NotCod,Cod);
+ ParCod_PutPar (ParCod_Not,Cod);
break;
case Ntf_EVENT_MESSAGE:
Action = ActExpRcvMsg;
Frm_BeginForm (Action);
- Par_PutParCode (Par_MsgCod,Cod);
+ ParCod_PutPar (ParCod_Msg,Cod);
break;
default:
Action = Ntf_DefaultActions[NotifyEvent];
@@ -822,22 +822,22 @@ static Act_Action_t Ntf_StartFormGoToAction (Ntf_NotifyEvent_t NotifyEvent,
if (CrsCod > 0) // Course specified
{
if (CrsCod != Gbl.Hierarchy.Crs.CrsCod) // Not the current course
- Par_PutParCode (Par_CrsCod,CrsCod); // Go to another course
+ ParCod_PutPar (ParCod_Crs,CrsCod); // Go to another course
}
else if (DegCod > 0) // Degree specified
{
if (DegCod != Gbl.Hierarchy.Deg.DegCod) // Not the current degree
- Par_PutParCode (Par_DegCod,DegCod); // Go to another degree
+ ParCod_PutPar (ParCod_Deg,DegCod); // Go to another degree
}
else if (CtrCod > 0) // Center specified
{
if (CtrCod != Gbl.Hierarchy.Ctr.CtrCod) // Not the current center
- Par_PutParCode (Par_CtrCod,CtrCod); // Go to another center
+ ParCod_PutPar (ParCod_Ctr,CtrCod); // Go to another center
}
else if (InsCod > 0) // Institution specified
{
if (InsCod != Gbl.Hierarchy.Ins.InsCod) // Not the current institution
- Par_PutParCode (Par_InsCod,InsCod); // Go to another institution
+ ParCod_PutPar (ParCod_Ins,InsCod); // Go to another institution
}
}
diff --git a/swad_notification.h b/swad_notification.h
index a1b02a7b..c0bcb0ad 100644
--- a/swad_notification.h
+++ b/swad_notification.h
@@ -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
diff --git a/swad_notification_database.c b/swad_notification_database.c
index a967fc33..41473dd4 100644
--- a/swad_notification_database.c
+++ b/swad_notification_database.c
@@ -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
diff --git a/swad_notification_database.h b/swad_notification_database.h
index ad100727..12f7d7a5 100644
--- a/swad_notification_database.h
+++ b/swad_notification_database.h
@@ -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
diff --git a/swad_pagination.c b/swad_pagination.c
index 5628a2ea..e9312d68 100644
--- a/swad_pagination.c
+++ b/swad_pagination.c
@@ -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
diff --git a/swad_pagination.h b/swad_pagination.h
index 6b9216ba..2befde79 100644
--- a/swad_pagination.h
+++ b/swad_pagination.h
@@ -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
diff --git a/swad_parameter.c b/swad_parameter.c
index 94c534f2..3ba37dfe 100644
--- a/swad_parameter.c
+++ b/swad_parameter.c
@@ -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
@@ -37,6 +37,7 @@
#include "swad_global.h"
#include "swad_HTML.h"
#include "swad_parameter.h"
+#include "swad_parameter_code.h"
#include "swad_password.h"
#include "swad_session.h"
#include "swad_setting.h"
@@ -54,59 +55,6 @@ extern struct Globals Gbl;
const char *Par_SEPARATOR_PARAM_MULTIPLE = "\x0a"; // Must be 1 <= character <= 31
-// Parameter name for codes, some of them also used as database fields (so change carefully)
-const char *Par_CodeStr[] =
- {
- [Par_None ] = NULL,
- [Par_AgdCod ] = "AgdCod", // Agenda event code
- [Par_AnnCod ] = "AnnCod", // Announcement code
- [Par_AsgCod ] = "AsgCod", // Assignment code
- [Par_AttCod ] = "AttCod", // Attendance event code
- [Par_BanCod ] = "BanCod", // Banner code
- [Par_BldCod ] = "BldCod", // Building code
- [Par_CrsCod ] = "crs", // Course code
- [Par_CtrCod ] = "ctr", // Center code
- [Par_CtyCod ] = "cty", // Country code
- [Par_DegCod ] = "deg", // Degree code
- [Par_DptCod ] = "DptCod", // Department code
- [Par_ExaCod ] = "ExaCod", // Exam code in calls-for-exam/exam
- [Par_FilCod ] = "FilCod", // File code
- [Par_FldCod ] = "FldCod", // Field code in course record
- [Par_GamCod ] = "GamCod", // Game code
- [Par_GrpCod ] = "GrpCod", // Group code
- [Par_GrpTypCod ] = "GrpTypCod", // Group type code
- [Par_HldCod ] = "HldCod", // Holiday code
- [Par_InsCod ] = "ins", // Institution code
- [Par_ItmCod ] = "ItmCod", // Item code in course program
- [Par_LnkCod ] = "LnkCod", // Link code
- [Par_MaiCod ] = "MaiCod", // Domain mail code
- [Par_MchCod ] = "MchCod", // Match code in game
- [Par_MsgCod ] = "MsgCod", // Message code
- [Par_NotCod ] = "NotCod", // Note code in timeline
- [Par_OrgActCod ] = "OrgActCod", // Original action code
- [Par_OthCrsCod ] = "OthCrsCod", // Other course code
- [Par_OthCtrCod ] = "OthCtrCod", // Other center code
- [Par_OthCtyCod ] = "OthCtyCod", // Other country code
- [Par_OthDegCod ] = "OthDegCod", // Other degree code
- [Par_OthDegTypCod] = "OthDegTypCod", // Other degree type code
- [Par_OthHieCod ] = "OthHieCod", // Other hierarchy code
- [Par_OthInsCod ] = "OthInsCod", // Other institution code
- [Par_PlcCod ] = "PlcCod", // Place code
- [Par_PlgCod ] = "PlgCod", // Plugin code
- [Par_PrjCod ] = "PrjCod", // Project code
- [Par_PrnCod ] = "PrnCod", // Print code in assessment test
- [Par_PstCod ] = "PstCod", // Post code in forum
- [Par_PubCod ] = "PubCod", // Publication code in timeline
- [Par_QstCod ] = "QstCod", // Question code in assessment/survey
- [Par_RooCod ] = "RooCod", // Room code
- [Par_RscCod ] = "RscCod", // Resource code in course program
- [Par_RubCod ] = "RubCod", // Rubric code
- [Par_SesCod ] = "SesCod", // Session code in exam
- [Par_SvyCod ] = "SvyCod", // Syrvey code
- [Par_TagCod ] = "TagCod", // Tag code in assessment question
- [Par_ThrCod ] = "ThrCod", // Thread code in forum
- };
-
/*****************************************************************************/
/**************************** Private constants ******************************/
/*****************************************************************************/
@@ -898,7 +846,7 @@ void Par_GetMainPars (void)
Set_GetSettingsFromIP ();
/***** Get country if exists (from menu) *****/
- Par_GetParText (Par_CodeStr[Par_CtyCod],LongStr,Cns_MAX_DECIMAL_DIGITS_LONG);
+ Par_GetParText (Par_CodeStr[ParCod_Cty],LongStr,Cns_MAX_DECIMAL_DIGITS_LONG);
if (LongStr[0]) // Parameter available
{
Gbl.Hierarchy.Cty.CtyCod = Str_ConvertStrCodToLongCod (LongStr);
@@ -909,7 +857,7 @@ void Par_GetMainPars (void)
}
/***** Get institution if exists (from menu) *****/
- Par_GetParText (Par_CodeStr[Par_InsCod],LongStr,Cns_MAX_DECIMAL_DIGITS_LONG);
+ Par_GetParText (Par_CodeStr[ParCod_Ins],LongStr,Cns_MAX_DECIMAL_DIGITS_LONG);
if (LongStr[0]) // Parameter available
{
Gbl.Hierarchy.Ins.InsCod = Str_ConvertStrCodToLongCod (LongStr);
@@ -919,7 +867,7 @@ void Par_GetMainPars (void)
}
/***** Get center if exists (from menu) *****/
- Par_GetParText (Par_CodeStr[Par_CtrCod],LongStr,Cns_MAX_DECIMAL_DIGITS_LONG);
+ Par_GetParText (Par_CodeStr[ParCod_Ctr],LongStr,Cns_MAX_DECIMAL_DIGITS_LONG);
if (LongStr[0]) // Parameter available
{
Gbl.Hierarchy.Ctr.CtrCod = Str_ConvertStrCodToLongCod (LongStr);
@@ -928,7 +876,7 @@ void Par_GetMainPars (void)
}
/***** Get numerical degree code if exists (from menu) *****/
- Par_GetParText (Par_CodeStr[Par_DegCod],LongStr,Cns_MAX_DECIMAL_DIGITS_LONG);
+ Par_GetParText (Par_CodeStr[ParCod_Deg],LongStr,Cns_MAX_DECIMAL_DIGITS_LONG);
if (LongStr[0]) // Parameter available
{
Gbl.Hierarchy.Deg.DegCod = Str_ConvertStrCodToLongCod (LongStr);
@@ -936,7 +884,7 @@ void Par_GetMainPars (void)
}
/***** Get numerical course code if exists (from menu) *****/
- Par_GetParText (Par_CodeStr[Par_CrsCod],LongStr,Cns_MAX_DECIMAL_DIGITS_LONG);
+ Par_GetParText (Par_CodeStr[ParCod_Crs],LongStr,Cns_MAX_DECIMAL_DIGITS_LONG);
if (LongStr[0]) // Parameter available
Gbl.Hierarchy.Crs.CrsCod = Str_ConvertStrCodToLongCod (LongStr); // Overwrite CrsCod from session
@@ -960,9 +908,9 @@ void Par_GetMainPars (void)
/*****************************************************************************/
// Return the number of parameters found
-unsigned Par_GetParText (const char *ParamName,char *ParamValue,size_t MaxBytes)
+unsigned Par_GetParText (const char *ParName,char *ParValue,size_t MaxBytes)
{
- return Par_GetParAndChangeFormat (ParamName,ParamValue,MaxBytes,
+ return Par_GetParAndChangeFormat (ParName,ParValue,MaxBytes,
Str_TO_TEXT,true);
}
@@ -970,7 +918,7 @@ unsigned Par_GetParText (const char *ParamName,char *ParamValue,size_t MaxBytes)
/****************** Get the unsigned value of a parameter ********************/
/*****************************************************************************/
-unsigned long Par_GetParUnsignedLong (const char *ParamName,
+unsigned long Par_GetParUnsignedLong (const char *ParName,
unsigned long Min,
unsigned long Max,
unsigned long Default)
@@ -979,7 +927,7 @@ unsigned long Par_GetParUnsignedLong (const char *ParamName,
unsigned long UnsignedLongNum;
/***** Get parameter with unsigned number *****/
- Par_GetParText (ParamName,UnsignedLongStr,Cns_MAX_DECIMAL_DIGITS_ULONG);
+ Par_GetParText (ParName,UnsignedLongStr,Cns_MAX_DECIMAL_DIGITS_ULONG);
if (sscanf (UnsignedLongStr,"%lu",&UnsignedLongNum) == 1)
if (UnsignedLongNum >= Min && UnsignedLongNum <= Max)
return UnsignedLongNum;
@@ -991,40 +939,15 @@ unsigned long Par_GetParUnsignedLong (const char *ParamName,
/******************** Get the long value of a parameter **********************/
/*****************************************************************************/
-long Par_GetParLong (const char *ParamName)
+long Par_GetParLong (const char *ParName)
{
char LongStr[Cns_MAX_DECIMAL_DIGITS_LONG + 1];
/***** Get parameter with long number *****/
- Par_GetParText (ParamName,LongStr,Cns_MAX_DECIMAL_DIGITS_LONG);
+ Par_GetParText (ParName,LongStr,Cns_MAX_DECIMAL_DIGITS_LONG);
return Str_ConvertStrCodToLongCod (LongStr);
}
-/*****************************************************************************/
-/******************** Get the value of a code parameter **********************/
-/*****************************************************************************/
-
-long Par_GetAndCheckParCode (Par_Code_t ParCode)
- {
- return Par_GetAndCheckParCodeMin (ParCode,1);
- }
-
-long Par_GetAndCheckParCodeMin (Par_Code_t ParCode,long MinCodAllowed)
- {
- long Cod;
-
- /***** Get code and check that is a valid code (>= minimum) *****/
- if ((Cod = Par_GetParCode (ParCode)) < MinCodAllowed)
- Err_WrongCodeExit ();
-
- return Cod;
- }
-
-long Par_GetParCode (Par_Code_t ParCode)
- {
- return Par_GetParLong (Par_CodeStr[ParCode]);
- }
-
/*****************************************************************************/
/************************ Get a boolean Y/N parameter ************************/
/*****************************************************************************/
@@ -1043,9 +966,9 @@ bool Par_GetParBool (const char *ParName)
/*****************************************************************************/
// Return the number of parameters found
-unsigned Par_GetParHTML (const char *ParamName,char *ParamValue,size_t MaxBytes)
+unsigned Par_GetParHTML (const char *ParName,char *ParValue,size_t MaxBytes)
{
- return Par_GetParAndChangeFormat (ParamName,ParamValue,MaxBytes,
+ return Par_GetParAndChangeFormat (ParName,ParValue,MaxBytes,
Str_TO_HTML,true);
}
@@ -1054,13 +977,13 @@ unsigned Par_GetParHTML (const char *ParamName,char *ParamValue,size_t MaxBytes)
/*****************************************************************************/
// Return the number of parameters found
-unsigned Par_GetParMultiToText (const char *ParamName,char *ParamValue,size_t MaxBytes)
+unsigned Par_GetParMultiToText (const char *ParName,char *ParValue,size_t MaxBytes)
{
- unsigned NumTimes = Par_GetPar (Par_PARAM_MULTIPLE,ParamName,
- ParamValue,MaxBytes,NULL);
+ unsigned NumTimes = Par_GetPar (Par_PARAM_MULTIPLE,ParName,
+ ParValue,MaxBytes,NULL);
Str_ChangeFormat (Str_FROM_FORM,Str_TO_TEXT,
- ParamValue,MaxBytes,true);
+ ParValue,MaxBytes,true);
return NumTimes;
}
@@ -1069,14 +992,14 @@ unsigned Par_GetParMultiToText (const char *ParamName,char *ParamValue,size_t Ma
/*****************************************************************************/
// Return the number of parameters found
-unsigned Par_GetParAndChangeFormat (const char *ParamName,char *ParamValue,size_t MaxBytes,
+unsigned Par_GetParAndChangeFormat (const char *ParName,char *ParValue,size_t MaxBytes,
Str_ChangeTo_t ChangeTo,bool RemoveLeadingAndTrailingSpaces)
{
- unsigned NumTimes = Par_GetPar (Par_PARAM_SINGLE,ParamName,
- ParamValue,MaxBytes,NULL);
+ unsigned NumTimes = Par_GetPar (Par_PARAM_SINGLE,ParName,
+ ParValue,MaxBytes,NULL);
Str_ChangeFormat (Str_FROM_FORM,ChangeTo,
- ParamValue,MaxBytes,RemoveLeadingAndTrailingSpaces);
+ ParValue,MaxBytes,RemoveLeadingAndTrailingSpaces);
return NumTimes;
}
@@ -1167,30 +1090,30 @@ void Par_ReplaceSeparatorMultipleByComma (char *Str)
/********************** Put an unsigned hidden parameter *********************/
/*****************************************************************************/
-void Par_PutParUnsigned (const char *Id,const char *ParamName,unsigned Value)
+void Par_PutParUnsigned (const char *Id,const char *ParName,unsigned ParValue)
{
HTM_Txt ("",ParamName,Value);
+ HTM_TxtF (" name=\"%s\" value=\"%u\" />",ParName,ParValue);
}
-void Par_PutParUnsignedDisabled (const char *Id,const char *ParamName,unsigned Value)
+void Par_PutParUnsignedDisabled (const char *Id,const char *ParName,unsigned ParValue)
{
HTM_Txt ("",
- ParamName,Value);
+ ParName,ParValue);
}
/*****************************************************************************/
/******************** Put the value of a code parameter **********************/
/*****************************************************************************/
-void Par_PutParCode (Par_Code_t ParCod,long Cod)
+void ParCod_PutPar (ParCod_Param_t ParCod,long Cod)
{
extern const char *Par_CodeStr[];
@@ -1204,37 +1127,37 @@ void Par_PutParCode (Par_Code_t ParCod,long Cod)
/************************* Put a long hidden parameter ***********************/
/*****************************************************************************/
-void Par_PutParLong (const char *Id,const char *ParamName,long Value)
+void Par_PutParLong (const char *Id,const char *ParName,long ParValue)
{
HTM_Txt ("",ParamName,Value);
+ HTM_TxtF (" name=\"%s\" value=\"%ld\" />",ParName,ParValue);
}
/*****************************************************************************/
/************************* Put a char hidden parameter ***********************/
/*****************************************************************************/
-void Par_PutParChar (const char *ParamName,char Value)
+void Par_PutParChar (const char *ParName,char ParValue)
{
HTM_TxtF ("",
- ParamName,Value);
+ ParName,ParValue);
}
/*****************************************************************************/
/************************ Put a string hidden parameter **********************/
/*****************************************************************************/
-void Par_PutParString (const char *Id,const char *ParamName,const char *Value)
+void Par_PutParString (const char *Id,const char *ParName,const char *ParValue)
{
HTM_Txt ("",
- ParamName,Value ? Value :
+ ParName,ParValue ? ParValue :
"");
}
diff --git a/swad_parameter.h b/swad_parameter.h
index 8b30d71c..b747e096 100644
--- a/swad_parameter.h
+++ b/swad_parameter.h
@@ -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
@@ -30,6 +30,7 @@
#include // For boolean type
#include // For size_t
+#include "swad_action.h"
#include "swad_string.h"
/*****************************************************************************/
@@ -63,58 +64,6 @@ typedef enum
Par_PARAM_MULTIPLE,
} Par_ParamType_t; // Parameter is present only one time / multiple times
-typedef enum
- {
- Par_None, // Special code
- Par_AgdCod, // Agenda event code
- Par_AnnCod, // Announcement code
- Par_AsgCod, // Assignment code
- Par_AttCod, // Attendance event code
- Par_BanCod, // Banner code
- Par_BldCod, // Building code
- Par_CrsCod, // Course code
- Par_CtrCod, // Center code
- Par_CtyCod, // Country code
- Par_DegCod, // Degree code
- Par_DptCod, // Department code
- Par_ExaCod, // Exam code in calls-for-exam/exam
- Par_FilCod, // File code
- Par_FldCod, // Field code in course record
- Par_GamCod, // Game code
- Par_GrpCod, // Group code
- Par_GrpTypCod, // Group type code
- Par_HldCod, // Holiday code
- Par_InsCod, // Institution code
- Par_ItmCod, // Item code in course program
- Par_LnkCod, // Link code
- Par_MaiCod, // Domain mail code
- Par_MchCod, // Match code in game
- Par_MsgCod, // Message code
- Par_NotCod, // Note code in timeline
- Par_OrgActCod, // Original action code
- Par_OthCrsCod, // Other course code
- Par_OthCtrCod, // Other center code
- Par_OthCtyCod, // Other country code
- Par_OthDegCod, // Other degree code
- Par_OthDegTypCod, // Other degree type code
- Par_OthHieCod, // Other hierarchy code
- Par_OthInsCod, // Other institution code
- Par_PlcCod, // Place code
- Par_PlgCod, // Plugin code
- Par_PrjCod, // Project code
- Par_PrnCod, // Print code in assessment test
- Par_PstCod, // Post code in forum
- Par_PubCod, // Publication code in timeline
- Par_QstCod, // Question code in assessment/survey
- Par_RooCod, // Room code
- Par_RscCod, // Resource code in course program
- Par_RubCod, // Rubric code
- Par_SesCod, // Session code in exam
- Par_SvyCod, // Syrvey code
- Par_TagCod, // Tag code in assessment question
- Par_ThrCod, // Thread code in forum
- } Par_Code_t;
-
/*****************************************************************************/
/***************************** Public prototypes *****************************/
/*****************************************************************************/
@@ -138,9 +87,6 @@ unsigned long Par_GetParUnsignedLong (const char *ParName,
unsigned long Max,
unsigned long Default);
long Par_GetParLong (const char *ParName);
-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 *ParName);
unsigned Par_GetParHTML (const char *ParName,char *ParValue,size_t MaxBytes);
unsigned Par_GetParMultiToText (const char *ParName,char *ParValue,size_t MaxBytes);
@@ -152,12 +98,11 @@ bool Par_GetNextStrUntilComma (const char **StrSrc,char *StrDst,size_t LongMax);
void Par_ReplaceSeparatorMultipleByComma (char *Str);
//------------------------------ Put parameters -------------------------------
-void Par_PutParUnsigned (const char *Id,const char *ParName,unsigned Value);
-void Par_PutParUnsignedDisabled (const char *Id,const char *ParName,unsigned Value);
-void Par_PutParCode (Par_Code_t ParCod,long Cod);
-void Par_PutParLong (const char *Id,const char *ParName,long Value);
-void Par_PutParChar (const char *ParName,char Value);
-void Par_PutParString (const char *Id,const char *ParName,const char *Value);
+void Par_PutParUnsigned (const char *Id,const char *ParName,unsigned ParValue);
+void Par_PutParUnsignedDisabled (const char *Id,const char *ParName,unsigned ParValue);
+void Par_PutParLong (const char *Id,const char *ParName,long ParValue);
+void Par_PutParChar (const char *ParName,char ParValue);
+void Par_PutParString (const char *Id,const char *ParName,const char *ParValue);
void Par_PutParOrder (unsigned SelectedOrder);
//----------------------------- Client IP address -----------------------------
diff --git a/swad_parameter_code.c b/swad_parameter_code.c
new file mode 100644
index 00000000..6cd68e10
--- /dev/null
+++ b/swad_parameter_code.c
@@ -0,0 +1,113 @@
+// swad_parameter_code.c: CGI parameters related to codes
+
+/*
+ SWAD (Shared Workspace At a Distance),
+ 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-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
+ License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see .
+*/
+/*****************************************************************************/
+/********************************** Headers **********************************/
+/*****************************************************************************/
+
+#include // For NULL
+
+#include "swad_error.h"
+#include "swad_parameter.h"
+#include "swad_parameter_code.h"
+
+/*****************************************************************************/
+/***************************** Public constants ******************************/
+/*****************************************************************************/
+
+const char *Par_CodeStr[] =
+ {
+ [ParCod_None ] = NULL,
+ [ParCod_Agd ] = "AgdCod", // Agenda event code
+ [ParCod_Ann ] = "AnnCod", // Announcement code
+ [ParCod_Asg ] = "AsgCod", // Assignment code
+ [ParCod_Att ] = "AttCod", // Attendance event code
+ [ParCod_Ban ] = "BanCod", // Banner code
+ [ParCod_Bld ] = "BldCod", // Building code
+ [ParCod_Crs ] = "crs", // Course code
+ [ParCod_Ctr ] = "ctr", // Center code
+ [ParCod_Cty ] = "cty", // Country code
+ [ParCod_Deg ] = "deg", // Degree code
+ [ParCod_Dpt ] = "DptCod", // Department code
+ [ParCod_Exa ] = "ExaCod", // Exam code in calls-for-exam/exam
+ [ParCod_Fil ] = "FilCod", // File code
+ [ParCod_Fld ] = "FldCod", // Field code in course record
+ [ParCod_Gam ] = "GamCod", // Game code
+ [ParCod_Grp ] = "GrpCod", // Group code
+ [ParCod_GrpTyp ] = "GrpTypCod", // Group type code
+ [ParCod_Hld ] = "HldCod", // Holiday code
+ [ParCod_Ins ] = "ins", // Institution code
+ [ParCod_Itm ] = "ItmCod", // Item code in course program
+ [ParCod_Lnk ] = "LnkCod", // Link code
+ [ParCod_Mai ] = "MaiCod", // Domain mail code
+ [ParCod_Mch ] = "MchCod", // Match code in game
+ [ParCod_Msg ] = "MsgCod", // Message code
+ [ParCod_Not ] = "NotCod", // Note code in timeline
+ [ParCod_OrgAct ] = "OrgActCod", // Original action code
+ [ParCod_OthCrs ] = "OthCrsCod", // Other course code
+ [ParCod_OthCtr ] = "OthCtrCod", // Other center code
+ [ParCod_OthCty ] = "OthCtyCod", // Other country code
+ [ParCod_OthDeg ] = "OthDegCod", // Other degree code
+ [ParCod_OthDegTyp] = "OthDegTypCod", // Other degree type code
+ [ParCod_OthHie ] = "OthHieCod", // Other hierarchy code
+ [ParCod_OthIns ] = "OthInsCod", // Other institution code
+ [ParCod_Plc ] = "PlcCod", // Place code
+ [ParCod_Plg ] = "PlgCod", // Plugin code
+ [ParCod_Prj ] = "PrjCod", // Project code
+ [ParCod_Prn ] = "PrnCod", // Print code in assessment test
+ [ParCod_Pst ] = "PstCod", // Post code in forum
+ [ParCod_Pub ] = "PubCod", // Publication code in timeline
+ [ParCod_Qst ] = "QstCod", // Question code in assessment/survey
+ [ParCod_Roo ] = "RooCod", // Room code
+ [ParCod_Rsc ] = "RscCod", // Resource code in course program
+ [ParCod_Rub ] = "RubCod", // Rubric code
+ [ParCod_Ses ] = "SesCod", // Session code in exam
+ [ParCod_Svy ] = "SvyCod", // Syrvey code
+ [ParCod_Tag ] = "TagCod", // Tag code in assessment question
+ [ParCod_Thr ] = "ThrCod", // Thread code in forum
+ };
+
+/*****************************************************************************/
+/******************** Get the value of a code parameter **********************/
+/*****************************************************************************/
+
+long ParCod_GetAndCheckPar (ParCod_Param_t ParCode)
+ {
+ return ParCod_GetAndCheckParMin (ParCode,1);
+ }
+
+long ParCod_GetAndCheckParMin (ParCod_Param_t ParCode,long MinCodAllowed)
+ {
+ long Cod;
+
+ /***** Get code and check that is a valid code (>= minimum) *****/
+ if ((Cod = ParCod_GetPar (ParCode)) < MinCodAllowed)
+ Err_WrongCodeExit ();
+
+ return Cod;
+ }
+
+long ParCod_GetPar (ParCod_Param_t ParCode)
+ {
+ return Par_GetParLong (Par_CodeStr[ParCode]);
+ }
diff --git a/swad_parameter_code.h b/swad_parameter_code.h
new file mode 100644
index 00000000..7a7aafbc
--- /dev/null
+++ b/swad_parameter_code.h
@@ -0,0 +1,94 @@
+// swad_parameter_code.h: CGI parameters related to codes
+
+#ifndef _SWAD_PAR_COD
+#define _SWAD_PAR_COD
+/*
+ SWAD (Shared Workspace At a Distance in Spanish),
+ 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-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
+ License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see .
+*/
+/*****************************************************************************/
+/************************** Public types and constants ***********************/
+/*****************************************************************************/
+
+typedef enum
+ {
+ ParCod_None, // Special code
+ ParCod_Agd, // Agenda event code
+ ParCod_Ann, // Announcement code
+ ParCod_Asg, // Assignment code
+ ParCod_Att, // Attendance event code
+ ParCod_Ban, // Banner code
+ ParCod_Bld, // Building code
+ ParCod_Crs, // Course code
+ ParCod_Ctr, // Center code
+ ParCod_Cty, // Country code
+ ParCod_Deg, // Degree code
+ ParCod_Dpt, // Department code
+ ParCod_Exa, // Exam code in calls-for-exam/exam
+ ParCod_Fil, // File code
+ ParCod_Fld, // Field code in course record
+ ParCod_Gam, // Game code
+ ParCod_Grp, // Group code
+ ParCod_GrpTyp, // Group type code
+ ParCod_Hld, // Holiday code
+ ParCod_Ins, // Institution code
+ ParCod_Itm, // Item code in course program
+ ParCod_Lnk, // Link code
+ ParCod_Mai, // Domain mail code
+ ParCod_Mch, // Match code in game
+ ParCod_Msg, // Message code
+ ParCod_Not, // Note code in timeline
+ ParCod_OrgAct, // Original action code
+ ParCod_OthCrs, // Other course code
+ ParCod_OthCtr, // Other center code
+ ParCod_OthCty, // Other country code
+ ParCod_OthDeg, // Other degree code
+ ParCod_OthDegTyp, // Other degree type code
+ ParCod_OthHie, // Other hierarchy code
+ ParCod_OthIns, // Other institution code
+ ParCod_Plc, // Place code
+ ParCod_Plg, // Plugin code
+ ParCod_Prj, // Project code
+ ParCod_Prn, // Print code in assessment test
+ ParCod_Pst, // Post code in forum
+ ParCod_Pub, // Publication code in timeline
+ ParCod_Qst, // Question code in assessment/survey
+ ParCod_Roo, // Room code
+ ParCod_Rsc, // Resource code in course program
+ ParCod_Rub, // Rubric code
+ ParCod_Ses, // Session code in exam
+ ParCod_Svy, // Syrvey code
+ ParCod_Tag, // Tag code in assessment question
+ ParCod_Thr, // Thread code in forum
+ } ParCod_Param_t;
+
+/*****************************************************************************/
+/***************************** Public prototypes *****************************/
+/*****************************************************************************/
+
+//------------------------------ Get parameters -------------------------------
+long ParCod_GetAndCheckPar (ParCod_Param_t ParCod);
+long ParCod_GetAndCheckParMin (ParCod_Param_t ParCod,long MinCodAllowed);
+long ParCod_GetPar (ParCod_Param_t ParCod);
+
+//------------------------------ Put parameters -------------------------------
+void ParCod_PutPar (ParCod_Param_t ParCod,long Cod);
+
+#endif
diff --git a/swad_password.c b/swad_password.c
index f3bf6f4d..b76086aa 100644
--- a/swad_password.c
+++ b/swad_password.c
@@ -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
diff --git a/swad_password.h b/swad_password.h
index 66e9f00e..de4305d1 100644
--- a/swad_password.h
+++ b/swad_password.h
@@ -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
diff --git a/swad_password_database.c b/swad_password_database.c
index 776cec9d..3ca3f5c7 100644
--- a/swad_password_database.c
+++ b/swad_password_database.c
@@ -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
diff --git a/swad_password_database.h b/swad_password_database.h
index 6aa8c445..d0e7076b 100644
--- a/swad_password_database.h
+++ b/swad_password_database.h
@@ -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
diff --git a/swad_photo.c b/swad_photo.c
index a306d816..5d8668c9 100644
--- a/swad_photo.c
+++ b/swad_photo.c
@@ -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_HTML.h"
#include "swad_logo.h"
#include "swad_parameter.h"
+#include "swad_parameter_code.h"
#include "swad_photo.h"
#include "swad_photo_database.h"
#include "swad_privacy.h"
@@ -1410,7 +1411,7 @@ void Pho_CalcPhotoDegree (void)
Fil_CreateDirIfNotExists (Cfg_PATH_PHOTO_TMP_PRIVATE);
/***** Get the degree which photo will be computed *****/
- if ((DegCod = Par_GetParCode (Par_OthDegCod)) > 0) // Parameter may be omitted
+ if ((DegCod = ParCod_GetPar (ParCod_OthDeg)) > 0) // Parameter may be omitted
{ // (when selecting classphoto/list)
/***** Prevent the computing of an average photo too recently updated *****/
if (Pho_GetTimeAvgPhotoWasComputed (DegCod) >=
@@ -2349,7 +2350,7 @@ static void Pho_ShowDegreeAvgPhotoAndStat (const struct Deg_Degree *Deg,
if (SeeOrPrint == Pho_DEGREES_SEE)
{
Frm_BeginFormGoTo (ActSeeDegInf);
- Par_PutParCode (Par_DegCod,Deg->DegCod);
+ ParCod_PutPar (ParCod_Deg,Deg->DegCod);
HTM_BUTTON_Submit_Begin (Str_BuildGoToTitle (Deg->FullName),
"class=\"BT_LINK\"");
Str_FreeGoToTitle ();
diff --git a/swad_photo.h b/swad_photo.h
index 129e0770..4f9f59d5 100644
--- a/swad_photo.h
+++ b/swad_photo.h
@@ -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
diff --git a/swad_photo_database.c b/swad_photo_database.c
index 7bf16e87..152d0075 100644
--- a/swad_photo_database.c
+++ b/swad_photo_database.c
@@ -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
diff --git a/swad_photo_database.h b/swad_photo_database.h
index e067a26d..f723f9dc 100644
--- a/swad_photo_database.h
+++ b/swad_photo_database.h
@@ -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
diff --git a/swad_photo_shape.c b/swad_photo_shape.c
index e874a528..7219e89b 100644
--- a/swad_photo_shape.c
+++ b/swad_photo_shape.c
@@ -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
diff --git a/swad_photo_shape.h b/swad_photo_shape.h
index eaa42235..7062f80e 100644
--- a/swad_photo_shape.h
+++ b/swad_photo_shape.h
@@ -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
diff --git a/swad_place.c b/swad_place.c
index de40e345..c0848f31 100644
--- a/swad_place.c
+++ b/swad_place.c
@@ -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
@@ -41,6 +41,7 @@
#include "swad_HTML.h"
#include "swad_language.h"
#include "swad_parameter.h"
+#include "swad_parameter_code.h"
#include "swad_place.h"
#include "swad_place_database.h"
@@ -495,7 +496,7 @@ static void Plc_ListPlacesForEdition (const struct Plc_Places *Places)
/* Place short name */
HTM_TD_Begin ("class=\"CM\"");
Frm_BeginForm (ActRenPlcSho);
- Par_PutParCode (Par_PlcCod,Plc->PlcCod);
+ ParCod_PutPar (ParCod_Plc,Plc->PlcCod);
HTM_INPUT_TEXT ("ShortName",Plc_MAX_CHARS_PLACE_SHRT_NAME,Plc->ShrtName,
HTM_SUBMIT_ON_CHANGE,
"class=\"INPUT_SHORT_NAME INPUT_%s\"",
@@ -506,7 +507,7 @@ static void Plc_ListPlacesForEdition (const struct Plc_Places *Places)
/* Place full name */
HTM_TD_Begin ("class=\"CM\"");
Frm_BeginForm (ActRenPlcFul);
- Par_PutParCode (Par_PlcCod,Plc->PlcCod);
+ ParCod_PutPar (ParCod_Plc,Plc->PlcCod);
HTM_INPUT_TEXT ("FullName",Plc_MAX_CHARS_PLACE_FULL_NAME,Plc->FullName,
HTM_SUBMIT_ON_CHANGE,
"class=\"INPUT_FULL_NAME INPUT_%s\"",
@@ -533,7 +534,7 @@ static void Plc_ListPlacesForEdition (const struct Plc_Places *Places)
static void Plc_PutParPlcCod (void *PlcCod)
{
if (PlcCod)
- Par_PutParCode (Par_PlcCod,*((long *) PlcCod));
+ ParCod_PutPar (ParCod_Plc,*((long *) PlcCod));
}
/*****************************************************************************/
@@ -549,7 +550,7 @@ void Plc_RemovePlace (void)
Plc_EditingPlaceConstructor ();
/***** Get place code *****/
- Plc_EditingPlc->PlcCod = Par_GetAndCheckParCode (Par_PlcCod);
+ Plc_EditingPlc->PlcCod = ParCod_GetAndCheckPar (ParCod_Plc);
/***** Get data of the place from database *****/
Plc_GetDataOfPlaceByCod (Plc_EditingPlc);
@@ -629,7 +630,7 @@ static void Plc_RenamePlace (Cns_ShrtOrFullName_t ShrtOrFullName)
/***** Get parameters from form *****/
/* Get the code of the place */
- Plc_EditingPlc->PlcCod = Par_GetAndCheckParCode (Par_PlcCod);
+ Plc_EditingPlc->PlcCod = ParCod_GetAndCheckPar (ParCod_Plc);
/* Get the new name for the place */
Par_GetParText (ParName,NewPlcName,MaxBytes);
diff --git a/swad_place.h b/swad_place.h
index b44316ef..b6b43ca7 100644
--- a/swad_place.h
+++ b/swad_place.h
@@ -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
diff --git a/swad_place_database.c b/swad_place_database.c
index 59d33645..9c2c19c0 100644
--- a/swad_place_database.c
+++ b/swad_place_database.c
@@ -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
diff --git a/swad_place_database.h b/swad_place_database.h
index ba33be73..16dc71ea 100644
--- a/swad_place_database.h
+++ b/swad_place_database.h
@@ -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
diff --git a/swad_plugin.c b/swad_plugin.c
index 3b4f938d..91eafb17 100644
--- a/swad_plugin.c
+++ b/swad_plugin.c
@@ -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
@@ -47,7 +47,7 @@ TODO: Check if web service is called from an authorized IP.
#include "swad_global.h"
#include "swad_HTML.h"
#include "swad_language.h"
-#include "swad_parameter.h"
+#include "swad_parameter_code.h"
#include "swad_plugin.h"
#include "swad_plugin_database.h"
#include "swad_session.h"
@@ -387,7 +387,7 @@ static void Plg_ListPluginsForEdition (struct Plg_Plugins *Plugins)
/* Plugin name */
HTM_TD_Begin ("class=\"CM\"");
Frm_BeginForm (ActRenPlg);
- Par_PutParCode (Par_PlgCod,Plg->PlgCod);
+ ParCod_PutPar (ParCod_Plg,Plg->PlgCod);
HTM_INPUT_TEXT ("Name",Plg_MAX_CHARS_PLUGIN_NAME,Plg->Name,
HTM_SUBMIT_ON_CHANGE,
"size=\"10\" class=\"INPUT_%s\"",
@@ -398,7 +398,7 @@ static void Plg_ListPluginsForEdition (struct Plg_Plugins *Plugins)
/* Plugin description */
HTM_TD_Begin ("class=\"CM\"");
Frm_BeginForm (ActChgPlgDes);
- Par_PutParCode (Par_PlgCod,Plg->PlgCod);
+ ParCod_PutPar (ParCod_Plg,Plg->PlgCod);
HTM_INPUT_TEXT ("Description",Plg_MAX_CHARS_PLUGIN_DESCRIPTION,Plg->Description,
HTM_SUBMIT_ON_CHANGE,
"size=\"30\" class=\"INPUT_%s\"",
@@ -409,7 +409,7 @@ static void Plg_ListPluginsForEdition (struct Plg_Plugins *Plugins)
/* Plugin logo */
HTM_TD_Begin ("class=\"CM\"");
Frm_BeginForm (ActChgPlgLog);
- Par_PutParCode (Par_PlgCod,Plg->PlgCod);
+ ParCod_PutPar (ParCod_Plg,Plg->PlgCod);
HTM_INPUT_TEXT ("Logo",Plg_MAX_CHARS_PLUGIN_LOGO,Plg->Logo,
HTM_SUBMIT_ON_CHANGE,
"size=\"4\" class=\"INPUT_%s\"",
@@ -420,7 +420,7 @@ static void Plg_ListPluginsForEdition (struct Plg_Plugins *Plugins)
/* Plugin application key */
HTM_TD_Begin ("class=\"CM\"");
Frm_BeginForm (ActChgPlgAppKey);
- Par_PutParCode (Par_PlgCod,Plg->PlgCod);
+ ParCod_PutPar (ParCod_Plg,Plg->PlgCod);
HTM_INPUT_TEXT ("AppKey",Plg_MAX_CHARS_PLUGIN_APP_KEY,Plg->AppKey,
HTM_SUBMIT_ON_CHANGE,
"size=\"16\" class=\"INPUT_%s\"",
@@ -431,7 +431,7 @@ static void Plg_ListPluginsForEdition (struct Plg_Plugins *Plugins)
/* Plugin URL */
HTM_TD_Begin ("class=\"CM\"");
Frm_BeginForm (ActChgPlgURL);
- Par_PutParCode (Par_PlgCod,Plg->PlgCod);
+ ParCod_PutPar (ParCod_Plg,Plg->PlgCod);
HTM_INPUT_URL ("URL",Plg->URL,HTM_SUBMIT_ON_CHANGE,
"size=\"15\" class=\"INPUT_%s\"",
The_GetSuffix ());
@@ -441,7 +441,7 @@ static void Plg_ListPluginsForEdition (struct Plg_Plugins *Plugins)
/* Plugin IP */
HTM_TD_Begin ("class=\"CM\"");
Frm_BeginForm (ActChgPlgIP);
- Par_PutParCode (Par_PlgCod,Plg->PlgCod);
+ ParCod_PutPar (ParCod_Plg,Plg->PlgCod);
HTM_INPUT_TEXT ("IP",Cns_MAX_CHARS_IP,Plg->IP,HTM_SUBMIT_ON_CHANGE,
"size=\"10\" class=\"INPUT_%s\"",
The_GetSuffix ());
@@ -463,7 +463,7 @@ static void Plg_ListPluginsForEdition (struct Plg_Plugins *Plugins)
static void Plg_PutParPlgCod (void *PlgCod)
{
if (PlgCod)
- Par_PutParCode (Par_PlgCod,*((long *) PlgCod));
+ ParCod_PutPar (ParCod_Plg,*((long *) PlgCod));
}
/*****************************************************************************/
@@ -478,7 +478,7 @@ void Plg_RemovePlugin (void)
Plg_EditingPluginConstructor ();
/***** Get plugin code *****/
- Plg_EditingPlg->PlgCod = Par_GetAndCheckParCode (Par_PlgCod);
+ Plg_EditingPlg->PlgCod = ParCod_GetAndCheckPar (ParCod_Plg);
/***** Get data of the plugin from database *****/
Plg_GetDataOfPluginByCod (Plg_EditingPlg);
@@ -508,7 +508,7 @@ void Plg_RenamePlugin (void)
/***** Get parameters from form *****/
/* Get the code of the plugin */
- Plg_EditingPlg->PlgCod = Par_GetAndCheckParCode (Par_PlgCod);
+ Plg_EditingPlg->PlgCod = ParCod_GetAndCheckPar (ParCod_Plg);
/* Get the new name for the plugin */
Par_GetParText ("Name",NewPlgName,Plg_MAX_BYTES_PLUGIN_NAME);
@@ -564,7 +564,7 @@ void Plg_ChangePlgDescription (void)
/***** Get parameters from form *****/
/* Get the code of the plugin */
- Plg_EditingPlg->PlgCod = Par_GetAndCheckParCode (Par_PlgCod);
+ Plg_EditingPlg->PlgCod = ParCod_GetAndCheckPar (ParCod_Plg);
/* Get the new description for the plugin */
Par_GetParText ("Description",NewDescription,Plg_MAX_BYTES_PLUGIN_DESCRIPTION);
@@ -605,7 +605,7 @@ void Plg_ChangePlgLogo (void)
/***** Get parameters from form *****/
/* Get the code of the plugin */
- Plg_EditingPlg->PlgCod = Par_GetAndCheckParCode (Par_PlgCod);
+ Plg_EditingPlg->PlgCod = ParCod_GetAndCheckPar (ParCod_Plg);
/* Get the new logo for the plugin */
Par_GetParText ("Logo",NewLogo,Plg_MAX_BYTES_PLUGIN_LOGO);
@@ -646,7 +646,7 @@ void Plg_ChangePlgAppKey (void)
/***** Get parameters from form *****/
/* Get the code of the plugin */
- Plg_EditingPlg->PlgCod = Par_GetAndCheckParCode (Par_PlgCod);
+ Plg_EditingPlg->PlgCod = ParCod_GetAndCheckPar (ParCod_Plg);
/* Get the new logo for the plugin */
Par_GetParText ("AppKey",NewAppKey,Plg_MAX_BYTES_PLUGIN_APP_KEY);
@@ -687,7 +687,7 @@ void Plg_ChangePlgURL (void)
/***** Get parameters from form *****/
/* Get the code of the plugin */
- Plg_EditingPlg->PlgCod = Par_GetAndCheckParCode (Par_PlgCod);
+ Plg_EditingPlg->PlgCod = ParCod_GetAndCheckPar (ParCod_Plg);
/* Get the new URL for the plugin */
Par_GetParText ("URL",NewURL,Cns_MAX_BYTES_WWW);
@@ -728,7 +728,7 @@ void Plg_ChangePlgIP (void)
/***** Get parameters from form *****/
/* Get the code of the plugin */
- Plg_EditingPlg->PlgCod = Par_GetAndCheckParCode (Par_PlgCod);
+ Plg_EditingPlg->PlgCod = ParCod_GetAndCheckPar (ParCod_Plg);
/* Get the new IP for the plugin */
Par_GetParText ("IP",NewIP,Cns_MAX_BYTES_IP);
diff --git a/swad_plugin.h b/swad_plugin.h
index 8cfa4b81..ba5cf313 100644
--- a/swad_plugin.h
+++ b/swad_plugin.h
@@ -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
diff --git a/swad_plugin_database.c b/swad_plugin_database.c
index 0fe55398..f3d16c2d 100644
--- a/swad_plugin_database.c
+++ b/swad_plugin_database.c
@@ -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
diff --git a/swad_plugin_database.h b/swad_plugin_database.h
index 9be395b1..3d1f53c4 100644
--- a/swad_plugin_database.h
+++ b/swad_plugin_database.h
@@ -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
diff --git a/swad_privacy.c b/swad_privacy.c
index 0edff97f..360c07af 100644
--- a/swad_privacy.c
+++ b/swad_privacy.c
@@ -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
diff --git a/swad_privacy.h b/swad_privacy.h
index 7a604c5f..be0e111d 100644
--- a/swad_privacy.h
+++ b/swad_privacy.h
@@ -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
diff --git a/swad_privacy_visibility_type.h b/swad_privacy_visibility_type.h
index b298e96f..dd9d5789 100644
--- a/swad_privacy_visibility_type.h
+++ b/swad_privacy_visibility_type.h
@@ -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
diff --git a/swad_process.c b/swad_process.c
index 9c72147d..abe1bbc8 100644
--- a/swad_process.c
+++ b/swad_process.c
@@ -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
diff --git a/swad_process.h b/swad_process.h
index 737bfa82..89c27b3f 100644
--- a/swad_process.h
+++ b/swad_process.h
@@ -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
diff --git a/swad_profile.c b/swad_profile.c
index ab9543fc..214ab1ac 100644
--- a/swad_profile.c
+++ b/swad_profile.c
@@ -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
diff --git a/swad_profile.h b/swad_profile.h
index aa9c9f2b..4c957670 100644
--- a/swad_profile.h
+++ b/swad_profile.h
@@ -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
diff --git a/swad_profile_database.c b/swad_profile_database.c
index 5ac40f44..a8f9c430 100644
--- a/swad_profile_database.c
+++ b/swad_profile_database.c
@@ -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
diff --git a/swad_profile_database.h b/swad_profile_database.h
index d28f1fc1..1220a2cd 100644
--- a/swad_profile_database.h
+++ b/swad_profile_database.h
@@ -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
diff --git a/swad_program.c b/swad_program.c
index aca1a6b4..5533b5f7 100644
--- a/swad_program.c
+++ b/swad_program.c
@@ -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
@@ -44,6 +44,7 @@
#include "swad_HTML.h"
#include "swad_pagination.h"
#include "swad_parameter.h"
+#include "swad_parameter_code.h"
#include "swad_photo.h"
#include "swad_program.h"
#include "swad_program_database.h"
@@ -1132,20 +1133,20 @@ static bool Prg_CheckIfMoveRightIsAllowed (unsigned NumItem)
void Prg_PutParItmCod (void *ItmCod)
{
if (ItmCod)
- Par_PutParCode (Par_ItmCod,*((long *) ItmCod));
+ ParCod_PutPar (ParCod_Itm,*((long *) ItmCod));
}
void Prg_GetPars (struct Prg_Item *Item)
{
/***** Try to get item resource *****/
- Item->Resource.Hierarchy.RscCod = Par_GetParCode (Par_RscCod);
+ Item->Resource.Hierarchy.RscCod = ParCod_GetPar (ParCod_Rsc);
/***** 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_GetParCode (Par_ItmCod);
+ Item->Hierarchy.ItmCod = ParCod_GetPar (ParCod_Itm);
/***** Get data of the program item from database *****/
Prg_GetDataOfItemByCod (Item);
@@ -1967,7 +1968,7 @@ static void Prg_ShowFormToCreateItem (long ParentItmCod)
/***** Begin form *****/
Frm_BeginFormAnchor (ActNewPrgItm,Prg_HIGHLIGHTED_SECTION_ID);
- Par_PutParCode (Par_ItmCod,ParentItem.Hierarchy.ItmCod);
+ ParCod_PutPar (ParCod_Itm,ParentItem.Hierarchy.ItmCod);
/***** Begin box and table *****/
Box_BoxTableBegin ("100%",Txt_New_item,
@@ -2008,7 +2009,7 @@ static void Prg_ShowFormToChangeItem (long ItmCod)
/***** Begin form *****/
Frm_BeginFormAnchor (ActChgPrgItm,Prg_HIGHLIGHTED_SECTION_ID);
- Par_PutParCode (Par_ItmCod,Item.Hierarchy.ItmCod);
+ ParCod_PutPar (ParCod_Itm,Item.Hierarchy.ItmCod);
/***** Begin box and table *****/
Box_BoxTableBegin ("100%",
diff --git a/swad_program.h b/swad_program.h
index 4d8f2dd2..2baf9486 100644
--- a/swad_program.h
+++ b/swad_program.h
@@ -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
diff --git a/swad_program_database.c b/swad_program_database.c
index 8991ea0d..e9b80f1a 100644
--- a/swad_program_database.c
+++ b/swad_program_database.c
@@ -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
diff --git a/swad_program_database.h b/swad_program_database.h
index f72387fc..93b91e6b 100644
--- a/swad_program_database.h
+++ b/swad_program_database.h
@@ -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
diff --git a/swad_program_resource.c b/swad_program_resource.c
index adf7c6d5..2eac4a8d 100644
--- a/swad_program_resource.c
+++ b/swad_program_resource.c
@@ -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
@@ -44,6 +44,7 @@
#include "swad_game_resource.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"
@@ -465,7 +466,7 @@ static void PrgRsc_WriteRowEditResource (unsigned NumRsc,unsigned NumResources,
/* Title */
Frm_BeginFormAnchor (ActRenPrgRsc,PrgRsc_RESOURCE_SECTION_ID);
- Par_PutParCode (Par_RscCod,Item->Resource.Hierarchy.RscCod);
+ ParCod_PutPar (ParCod_Rsc,Item->Resource.Hierarchy.RscCod);
HTM_INPUT_TEXT ("Title",PrgRsc_MAX_CHARS_PROGRAM_RESOURCE_TITLE,Item->Resource.Title,
HTM_SUBMIT_ON_CHANGE,
"class=\"PRG_RSC_INPUT INPUT_%s\"",
@@ -519,7 +520,7 @@ static void PrgRsc_WriteRowNewResource (unsigned NumResources,
/* Title */
Frm_BeginFormAnchor (ActNewPrgRsc,PrgRsc_RESOURCE_SECTION_ID);
- Par_PutParCode (Par_ItmCod,Item->Hierarchy.ItmCod);
+ ParCod_PutPar (ParCod_Itm,Item->Hierarchy.ItmCod);
HTM_INPUT_TEXT ("Title",PrgRsc_MAX_CHARS_PROGRAM_RESOURCE_TITLE,"",
HTM_SUBMIT_ON_CHANGE,
"placeholder=\"%s\""
@@ -617,7 +618,7 @@ static void PrgRsc_PutFormsToRemEditOneResource (struct Prg_Item *Item,
static void PrgRsc_PutParRscCod (void *RscCod)
{
if (RscCod)
- Par_PutParCode (Par_RscCod,*((long *) RscCod));
+ ParCod_PutPar (ParCod_Rsc,*((long *) RscCod));
}
/*****************************************************************************/
@@ -917,10 +918,10 @@ static void PrgRsc_ShowClipboard (struct Prg_Item *Item)
/***** Begin form *****/
Frm_BeginFormAnchor (ActChgLnkPrgRsc,PrgRsc_RESOURCE_SECTION_ID);
if (Item->Resource.Hierarchy.RscCod > 0)
- Par_PutParCode (Par_RscCod,Item->Resource.Hierarchy.RscCod);
+ ParCod_PutPar (ParCod_Rsc,Item->Resource.Hierarchy.RscCod);
else
/* No resource selected, so it's a new resource at the end of the item */
- Par_PutParCode (Par_ItmCod,Item->Hierarchy.ItmCod);
+ ParCod_PutPar (ParCod_Itm,Item->Hierarchy.ItmCod);
/***** Begin list *****/
HTM_UL_Begin ("class=\"PRG_CLIPBOARD\"");
diff --git a/swad_program_resource.h b/swad_program_resource.h
index 5fc3906b..4faf5bdf 100644
--- a/swad_program_resource.h
+++ b/swad_program_resource.h
@@ -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
diff --git a/swad_project.c b/swad_project.c
index f3704646..1eb11456 100644
--- a/swad_project.c
+++ b/swad_project.c
@@ -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,6 +48,7 @@
#include "swad_notification.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_project.h"
@@ -958,7 +959,7 @@ void Prj_PutPars (struct Prj_Filter *Filter,
Pag_PutParPagNum (Pag_PROJECTS,NumPage);
/***** Put selected project code *****/
- Par_PutParCode (Par_PrjCod,PrjCod);
+ ParCod_PutPar (ParCod_Prj,PrjCod);
/***** Put another user's code *****/
if (Gbl.Usrs.Other.UsrDat.UsrCod > 0)
@@ -1321,7 +1322,7 @@ void Prj_ShowOneProject (void)
/***** Get parameters *****/
Prj_GetPars (&Projects);
- Projects.Prj.PrjCod = Par_GetAndCheckParCode (Par_PrjCod);
+ Projects.Prj.PrjCod = ParCod_GetAndCheckPar (ParCod_Prj);
/***** Show project and (if possible) its file browser *****/
Prj_ShowOneProjectWithFileBrowser (&Projects);
@@ -1412,7 +1413,7 @@ void Prj_PrintOneProject (void)
Prj_AllocMemProject (&Projects.Prj);
/***** Get project data *****/
- Projects.Prj.PrjCod = Par_GetAndCheckParCode (Par_PrjCod);
+ Projects.Prj.PrjCod = ParCod_GetAndCheckPar (ParCod_Prj);
Prj_GetDataOfProjectByCod (&Projects.Prj);
/***** Write header *****/
@@ -2864,7 +2865,7 @@ static void Prj_FormToSelectUsrs (struct Prj_Projects *Projects,
/***** Get parameters *****/
Prj_GetPars (Projects);
- Projects->Prj.PrjCod = Par_GetAndCheckParCode (Par_PrjCod);
+ Projects->Prj.PrjCod = ParCod_GetAndCheckPar (ParCod_Prj);
/***** Put form to select users *****/
if (asprintf (&TxtButton,Txt_Add_USERS,
@@ -2939,7 +2940,7 @@ static void Prj_AddUsrsToProject (Prj_RoleInProject_t RoleInPrj)
/***** Get parameters *****/
Prj_GetPars (&Projects);
- Projects.Prj.PrjCod = Par_GetAndCheckParCode (Par_PrjCod);
+ Projects.Prj.PrjCod = ParCod_GetAndCheckPar (ParCod_Prj);
/***** Add the selected users to project *****/
Ptr = Prj_MembersToAdd.List[Rol_UNK];
@@ -3031,7 +3032,7 @@ static void Prj_ReqRemUsrFromPrj (struct Prj_Projects *Projects,
/***** Get parameters *****/
Prj_GetPars (Projects);
- Projects->Prj.PrjCod = Par_GetAndCheckParCode (Par_PrjCod);
+ Projects->Prj.PrjCod = ParCod_GetAndCheckPar (ParCod_Prj);
/***** Get data of the project from database *****/
Prj_GetDataOfProjectByCod (&Projects->Prj);
@@ -3110,7 +3111,7 @@ static void Prj_RemUsrFromPrj (Prj_RoleInProject_t RoleInPrj)
/***** Get parameters *****/
Prj_GetPars (&Projects);
- Projects.Prj.PrjCod = Par_GetAndCheckParCode (Par_PrjCod);
+ Projects.Prj.PrjCod = ParCod_GetAndCheckPar (ParCod_Prj);
/***** Get data of the project from database *****/
Prj_GetDataOfProjectByCod (&Projects.Prj);
@@ -3494,7 +3495,7 @@ void Prj_ReqRemProject (void)
/***** Get parameters *****/
Prj_GetPars (&Projects);
- Projects.Prj.PrjCod = Par_GetAndCheckParCode (Par_PrjCod);
+ Projects.Prj.PrjCod = ParCod_GetAndCheckPar (ParCod_Prj);
/***** Get data of the project from database *****/
Prj_GetDataOfProjectByCod (&Projects.Prj);
@@ -3534,7 +3535,7 @@ void Prj_RemoveProject (void)
/***** Get parameters *****/
Prj_GetPars (&Projects);
- Projects.Prj.PrjCod = Par_GetAndCheckParCode (Par_PrjCod);
+ Projects.Prj.PrjCod = ParCod_GetAndCheckPar (ParCod_Prj);
/***** Get data of the project from database *****/
Prj_GetDataOfProjectByCod (&Projects.Prj); // Inside this function, the course is checked to be the current one
@@ -3589,7 +3590,7 @@ void Prj_HideProject (void)
/***** Get parameters *****/
Prj_GetPars (&Projects);
- Projects.Prj.PrjCod = Par_GetAndCheckParCode (Par_PrjCod);
+ Projects.Prj.PrjCod = ParCod_GetAndCheckPar (ParCod_Prj);
/***** Get data of the project from database *****/
Prj_GetDataOfProjectByCod (&Projects.Prj);
@@ -3623,7 +3624,7 @@ void Prj_UnhideProject (void)
/***** Get parameters *****/
Prj_GetPars (&Projects);
- Projects.Prj.PrjCod = Par_GetAndCheckParCode (Par_PrjCod);
+ Projects.Prj.PrjCod = ParCod_GetAndCheckPar (ParCod_Prj);
/***** Get data of the project from database *****/
Prj_GetDataOfProjectByCod (&Projects.Prj);
@@ -3669,7 +3670,7 @@ void Prj_RequestEditPrj (void)
/***** Get parameters *****/
Prj_GetPars (&Projects);
- Projects.Prj.PrjCod = Par_GetAndCheckParCode (Par_PrjCod);
+ Projects.Prj.PrjCod = ParCod_GetAndCheckPar (ParCod_Prj);
/***** Form to edit project *****/
Prj_RequestCreatOrEditPrj (&Projects);
@@ -3796,7 +3797,7 @@ static void Prj_PutFormProject (struct Prj_Projects *Projects,
HTM_TR_Begin (NULL);
/* Label */
- Frm_LabelColumn ("RT",Par_CodeStr[Par_DptCod],Txt_Department);
+ Frm_LabelColumn ("RT",Par_CodeStr[ParCod_Dpt],Txt_Department);
/* Data */
HTM_TD_Begin ("class=\"LT\"");
@@ -3805,7 +3806,7 @@ static void Prj_PutFormProject (struct Prj_Projects *Projects,
Err_NotEnoughMemoryExit ();
Dpt_WriteSelectorDepartment (Gbl.Hierarchy.Ins.InsCod, // Departments in current institution
Projects->Prj.DptCod, // Selected department
- Par_CodeStr[Par_DptCod], // Parameter name
+ Par_CodeStr[ParCod_Dpt], // Parameter name
SelectClass, // Selector class
0, // First option
Txt_Another_department, // Text when no department selected
@@ -4017,7 +4018,7 @@ void Prj_ReceiveFormProject (void)
/***** Get parameters *****/
Prj_GetPars (&Projects);
- ItsANewProject = ((Projects.Prj.PrjCod = Par_GetParCode (Par_PrjCod)) <= 0);
+ ItsANewProject = ((Projects.Prj.PrjCod = ParCod_GetPar (ParCod_Prj)) <= 0);
if (ItsANewProject)
{
@@ -4040,7 +4041,7 @@ void Prj_ReceiveFormProject (void)
Par_GetParText ("Title",Projects.Prj.Title,Prj_MAX_BYTES_TITLE);
/* Get department */
- Projects.Prj.DptCod = Par_GetParCode (Par_DptCod);
+ Projects.Prj.DptCod = ParCod_GetPar (ParCod_Dpt);
/* Get whether the project is assigned */
Projects.Prj.Assigned = (Par_GetParBool ("Assigned")) ? Prj_ASSIGNED :
@@ -4524,7 +4525,7 @@ void Prj_LockProjectEdition (void)
/***** Get parameters *****/
Prj_GetPars (&Projects);
- Projects.Prj.PrjCod = Par_GetAndCheckParCode (Par_PrjCod);
+ Projects.Prj.PrjCod = ParCod_GetAndCheckPar (ParCod_Prj);
/***** Get data of the project from database *****/
Prj_GetDataOfProjectByCod (&Projects.Prj);
@@ -4561,7 +4562,7 @@ void Prj_UnloProjectEdition (void)
/***** Get parameters *****/
Prj_GetPars (&Projects);
- Projects.Prj.PrjCod = Par_GetAndCheckParCode (Par_PrjCod);
+ Projects.Prj.PrjCod = ParCod_GetAndCheckPar (ParCod_Prj);
/***** Get data of the project from database *****/
Prj_GetDataOfProjectByCod (&Projects.Prj);
@@ -4598,7 +4599,7 @@ void Prj_ChangeReviewStatus (void)
/***** Get parameters *****/
Prj_GetPars (&Projects);
- Projects.Prj.PrjCod = Par_GetAndCheckParCode (Par_PrjCod);
+ Projects.Prj.PrjCod = ParCod_GetAndCheckPar (ParCod_Prj);
/***** Get data of the project from database *****/
Prj_GetDataOfProjectByCod (&Projects.Prj);
diff --git a/swad_project.h b/swad_project.h
index 84033dfc..c5a58d81 100644
--- a/swad_project.h
+++ b/swad_project.h
@@ -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
diff --git a/swad_project_database.c b/swad_project_database.c
index 2630ebdb..53faed9a 100644
--- a/swad_project_database.c
+++ b/swad_project_database.c
@@ -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
diff --git a/swad_project_database.h b/swad_project_database.h
index 38f064b0..9ba4e8f7 100644
--- a/swad_project_database.h
+++ b/swad_project_database.h
@@ -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
diff --git a/swad_project_resource.c b/swad_project_resource.c
index d3a9d6c6..56eb8b4f 100644
--- a/swad_project_resource.c
+++ b/swad_project_resource.c
@@ -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
@@ -29,7 +29,7 @@
#include "swad_alert.h"
#include "swad_error.h"
#include "swad_form.h"
-#include "swad_parameter.h"
+#include "swad_parameter_code.h"
#include "swad_program_database.h"
#include "swad_project.h"
#include "swad_project_database.h"
@@ -50,7 +50,7 @@ void PrjRsc_GetLinkToProject (void)
/***** Get parameters *****/
Prj_GetPars (&Projects);
- Projects.Prj.PrjCod = Par_GetAndCheckParCode (Par_PrjCod);
+ Projects.Prj.PrjCod = ParCod_GetAndCheckPar (ParCod_Prj);
/***** Get project title *****/
PrjRsc_GetTitleFromPrjCod (Projects.Prj.PrjCod,Title,sizeof (Title) - 1);
@@ -89,7 +89,7 @@ void PrjRsc_WriteProjectInCrsProgram (long PrjCod,bool PutFormToGo,
NextAction = (PrjCod > 0) ? ActSeeOnePrj : // Project specified
ActSeePrj; // All projects
Frm_BeginForm (NextAction);
- Par_PutParCode (Par_PrjCod,PrjCod);
+ ParCod_PutPar (ParCod_Prj,PrjCod);
HTM_BUTTON_Submit_Begin (Txt_Actions[NextAction],
"class=\"LM BT_LINK PRG_LNK_%s\"",
The_GetSuffix ());
diff --git a/swad_project_resource.h b/swad_project_resource.h
index 752c9e45..cfc8d594 100644
--- a/swad_project_resource.h
+++ b/swad_project_resource.h
@@ -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
diff --git a/swad_question.c b/swad_question.c
index d7f4c740..cbb9ccd7 100644
--- a/swad_question.c
+++ b/swad_question.c
@@ -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_form.h"
#include "swad_global.h"
#include "swad_parameter.h"
+#include "swad_parameter_code.h"
#include "swad_question.h"
#include "swad_question_database.h"
#include "swad_question_import.h"
@@ -1377,7 +1378,7 @@ void Qst_PutParsEditQst (void *Questions)
'N');
Par_PutParString (NULL,"AnswerType",((struct Qst_Questions *) Questions)->AnswerTypes.List);
- Par_PutParCode (Par_QstCod,((struct Qst_Questions *) Questions)->Question.QstCod);
+ ParCod_PutPar (ParCod_Qst,((struct Qst_Questions *) Questions)->Question.QstCod);
// if (Test->NumQsts == 1)
// Par_PutParChar ("OnlyThisQst",'Y'); // If there are only one row, don't list again after removing
Dat_WriteParsIniEndDates ();
@@ -1817,7 +1818,7 @@ void Qst_ShowFormEditOneQst (void)
Qst_QstConstructor (&Question);
/***** Get question data *****/
- Question.QstCod = Par_GetParCode (Par_QstCod);
+ Question.QstCod = ParCod_GetPar (ParCod_Qst);
if (Question.QstCod <= 0) // New question
PutFormToEditQuestion = true;
else
@@ -1896,7 +1897,7 @@ void Qst_PutFormEditOneQst (struct Qst_Question *Question)
/***** Begin form *****/
Frm_BeginForm (ActRcvTstQst);
- Par_PutParCode (Par_QstCod,Question->QstCod);
+ ParCod_PutPar (ParCod_Qst,Question->QstCod);
/***** Begin table *****/
HTM_TABLE_BeginPadding (2); // Table for this question
@@ -2724,7 +2725,7 @@ void Qst_GetQstFromForm (struct Qst_Question *Question)
unsigned NumCorrectAns;
/***** Get question code *****/
- Question->QstCod = Par_GetParCode (Par_QstCod);
+ Question->QstCod = ParCod_GetPar (ParCod_Qst);
/***** Get answer type *****/
Question->Answer.Type = (Qst_AnswerType_t)
@@ -3330,7 +3331,7 @@ void Qst_RequestRemoveOneQst (void)
/***** Get main parameters from form *****/
/* Get the question code */
- Questions.Question.QstCod = Par_GetAndCheckParCode (Par_QstCod);
+ Questions.Question.QstCod = ParCod_GetAndCheckPar (ParCod_Qst);
/* Get a parameter that indicates whether it's necessary
to continue listing the rest of questions */
@@ -3373,7 +3374,7 @@ void Qst_PutParsRemoveOnlyThisQst (void *QstCod)
{
if (QstCod)
{
- Par_PutParCode (Par_QstCod,*(long *) QstCod);
+ ParCod_PutPar (ParCod_Qst,*(long *) QstCod);
Par_PutParChar ("OnlyThisQst",'Y');
}
}
@@ -3389,7 +3390,7 @@ void Qst_RemoveOneQst (void)
bool EditingOnlyThisQst;
/***** Get the question code *****/
- QstCod = Par_GetAndCheckParCode (Par_QstCod);
+ QstCod = ParCod_GetAndCheckPar (ParCod_Qst);
/***** Get a parameter that indicates whether it's necessary
to continue listing the rest of questions ******/
@@ -3442,7 +3443,7 @@ void Qst_ChangeShuffleQst (void)
Qst_Constructor (&Questions);
/***** Get the question code *****/
- Questions.Question.QstCod = Par_GetAndCheckParCode (Par_QstCod);
+ Questions.Question.QstCod = ParCod_GetAndCheckPar (ParCod_Qst);
/***** Get a parameter that indicates whether it's necessary to continue listing the rest of questions ******/
EditingOnlyThisQst = Par_GetParBool ("OnlyThisQst");
@@ -3475,7 +3476,7 @@ void Qst_ChangeShuffleQst (void)
void Qst_PutParQstCod (void *QstCod) // Should be a pointer to long
{
if (QstCod)
- Par_PutParCode (Par_QstCod,*((long *) QstCod));
+ ParCod_PutPar (ParCod_Qst,*((long *) QstCod));
}
/*****************************************************************************/
diff --git a/swad_question.h b/swad_question.h
index 707c474b..627d816f 100644
--- a/swad_question.h
+++ b/swad_question.h
@@ -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
diff --git a/swad_question_database.c b/swad_question_database.c
index d2ccf192..59d76f93 100644
--- a/swad_question_database.c
+++ b/swad_question_database.c
@@ -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
diff --git a/swad_question_database.h b/swad_question_database.h
index bf78ee7c..24bf9f98 100644
--- a/swad_question_database.h
+++ b/swad_question_database.h
@@ -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
diff --git a/swad_question_import.c b/swad_question_import.c
index e7421368..d2cf1b6c 100644
--- a/swad_question_import.c
+++ b/swad_question_import.c
@@ -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
diff --git a/swad_question_import.h b/swad_question_import.h
index b187df30..d329648b 100644
--- a/swad_question_import.h
+++ b/swad_question_import.h
@@ -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
diff --git a/swad_question_type.h b/swad_question_type.h
index 3f2f9457..43ab087e 100644
--- a/swad_question_type.h
+++ b/swad_question_type.h
@@ -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
diff --git a/swad_record.c b/swad_record.c
index 16ea9569..e8224b82 100644
--- a/swad_record.c
+++ b/swad_record.c
@@ -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
@@ -290,7 +290,7 @@ void Rec_ListFieldsRecordsForEdition (void)
/* Name of the field */
HTM_TD_Begin ("class=\"LM\"");
Frm_BeginForm (ActRenFie);
- Par_PutParCode (Par_FldCod,Gbl.Crs.Records.LstFields.Lst[NumField].FieldCod);
+ ParCod_PutPar (ParCod_Fld,Gbl.Crs.Records.LstFields.Lst[NumField].FieldCod);
HTM_INPUT_TEXT ("FieldName",Rec_MAX_CHARS_NAME_FIELD,
Gbl.Crs.Records.LstFields.Lst[NumField].Name,
HTM_SUBMIT_ON_CHANGE,
@@ -302,7 +302,7 @@ void Rec_ListFieldsRecordsForEdition (void)
/* Number of lines in the form */
HTM_TD_Begin ("class=\"CM\"");
Frm_BeginForm (ActChgRowFie);
- Par_PutParCode (Par_FldCod,Gbl.Crs.Records.LstFields.Lst[NumField].FieldCod);
+ ParCod_PutPar (ParCod_Fld,Gbl.Crs.Records.LstFields.Lst[NumField].FieldCod);
snprintf (StrNumLines,sizeof (StrNumLines),"%u",
Gbl.Crs.Records.LstFields.Lst[NumField].NumLines);
HTM_INPUT_TEXT ("NumLines",Cns_MAX_DECIMAL_DIGITS_UINT,StrNumLines,
@@ -315,7 +315,7 @@ void Rec_ListFieldsRecordsForEdition (void)
/* Visibility of a field */
HTM_TD_Begin ("class=\"CM\"");
Frm_BeginForm (ActChgVisFie);
- Par_PutParCode (Par_FldCod,Gbl.Crs.Records.LstFields.Lst[NumField].FieldCod);
+ ParCod_PutPar (ParCod_Fld,Gbl.Crs.Records.LstFields.Lst[NumField].FieldCod);
HTM_SELECT_Begin (HTM_SUBMIT_ON_CHANGE,
"name=\"Visibility\" class=\"INPUT_%s\"",
The_GetSuffix ());
@@ -552,7 +552,7 @@ void Rec_ReqRemField (void)
unsigned NumRecords;
/***** Get the code of field *****/
- Gbl.Crs.Records.Field.FieldCod = Par_GetAndCheckParCode (Par_FldCod);
+ Gbl.Crs.Records.Field.FieldCod = ParCod_GetAndCheckPar (ParCod_Fld);
/***** Check if exists any record with that field filled *****/
if ((NumRecords = Rec_DB_CountNumRecordsWithFieldContent (Gbl.Crs.Records.Field.FieldCod))) // There are records with that field filled
@@ -595,7 +595,7 @@ void Rec_AskConfirmRemFieldWithRecords (unsigned NumRecords)
static void Rec_PutParFldCod (void *FldCod)
{
if (FldCod)
- Par_PutParCode (Par_FldCod,*((long *) FldCod));
+ ParCod_PutPar (ParCod_Fld,*((long *) FldCod));
}
/*****************************************************************************/
@@ -667,7 +667,7 @@ static void Rec_GetFieldByCod (long FldCod,char Name[Rec_MAX_BYTES_NAME_FIELD +
void Rec_RemoveField (void)
{
/***** Get the code of the field *****/
- Gbl.Crs.Records.Field.FieldCod = Par_GetAndCheckParCode (Par_FldCod);
+ Gbl.Crs.Records.Field.FieldCod = ParCod_GetAndCheckPar (ParCod_Fld);
/***** Borrarlo from the database *****/
Rec_RemoveFieldFromDB ();
@@ -686,7 +686,7 @@ void Rec_RenameField (void)
/***** Get parameters of the form *****/
/* Get the code of the field */
- Gbl.Crs.Records.Field.FieldCod = Par_GetAndCheckParCode (Par_FldCod);
+ Gbl.Crs.Records.Field.FieldCod = ParCod_GetAndCheckPar (ParCod_Fld);
/* Get the new group name */
Par_GetParText ("FieldName",NewFieldName,Rec_MAX_BYTES_NAME_FIELD);
@@ -742,7 +742,7 @@ void Rec_ChangeLinesField (void)
/***** Get parameters of the form *****/
/* Get the code of field */
- Gbl.Crs.Records.Field.FieldCod = Par_GetAndCheckParCode (Par_FldCod);
+ Gbl.Crs.Records.Field.FieldCod = ParCod_GetAndCheckPar (ParCod_Fld);
/* Get the new number of lines */
NewNumLines = (unsigned)
@@ -786,7 +786,7 @@ void Rec_ChangeVisibilityField (void)
/***** Get parameters of the form *****/
/* Get the code of field */
- Gbl.Crs.Records.Field.FieldCod = Par_GetAndCheckParCode (Par_FldCod);
+ Gbl.Crs.Records.Field.FieldCod = ParCod_GetAndCheckPar (ParCod_Fld);
/* Get the new visibility of the field */
NewVisibility = (Rec_VisibilityRecordFields_t)
@@ -1518,7 +1518,7 @@ void Rec_UpdateAndShowOtherCrsRecord (void)
extern const char *Txt_Student_record_card_in_this_course_has_been_updated;
/***** Get where we came from *****/
- Gbl.Action.Original = Act_GetActionFromActCod (Par_GetParCode (Par_OrgActCod));
+ Gbl.Action.Original = Act_GetActionFromActCod (ParCod_GetPar (ParCod_OrgAct));
/***** Get the user whose record we want to modify *****/
Usr_GetParOtherUsrCodEncryptedAndGetListIDs ();
@@ -1633,7 +1633,7 @@ static void Rec_ShowCrsRecord (Rec_CourseRecordViewType_t TypeOfView,
{
ICanEdit = true;
Frm_BeginFormAnchor (ActRcvRecOthUsr,Anchor);
- Par_PutParCode (Par_OrgActCod,Act_GetActCod (ActSeeRecSevStd)); // Original action, used to know where we came from
+ ParCod_PutPar (ParCod_OrgAct,Act_GetActCod (ActSeeRecSevStd)); // Original action, used to know where we came from
Usr_PutParUsrCodEncrypted (UsrDat->EnUsrCod);
if (TypeOfView == Rec_CRS_LIST_SEVERAL_RECORDS)
Usr_PutParSelectedUsrsCods (&Gbl.Usrs.Selected);
@@ -2528,7 +2528,7 @@ static void Rec_ShowInstitutionInHead (struct Ins_Instit *Ins,bool PutFormLinks)
if (PutFormLinks)
{
Frm_BeginFormGoTo (ActSeeInsInf);
- Par_PutParCode (Par_InsCod,Ins->InsCod);
+ ParCod_PutPar (ParCod_Ins,Ins->InsCod);
HTM_BUTTON_Submit_Begin (Ins->FullName,"class=\"BT_LINK\"");
}
Lgo_DrawLogo (HieLvl_INS,Ins->InsCod,Ins->ShrtName,
@@ -2549,7 +2549,7 @@ static void Rec_ShowInstitutionInHead (struct Ins_Instit *Ins,bool PutFormLinks)
if (PutFormLinks)
{
Frm_BeginFormGoTo (ActSeeInsInf);
- Par_PutParCode (Par_InsCod,Ins->InsCod);
+ ParCod_PutPar (ParCod_Ins,Ins->InsCod);
HTM_BUTTON_Submit_Begin (Ins->FullName,"class=\"BT_LINK\"");
}
HTM_Txt (Ins->FullName);
@@ -3152,7 +3152,7 @@ static void Rec_ShowCountry (struct Usr_Data *UsrDat,bool PutForm)
{
if (asprintf (&Label,"%s*",Txt_Country) < 0)
Err_NotEnoughMemoryExit ();
- Frm_LabelColumn ("REC_C1_BOT RM",Par_CodeStr[Par_OthCtyCod],Label);
+ Frm_LabelColumn ("REC_C1_BOT RM",Par_CodeStr[ParCod_OthCty],Label);
free (Label);
}
else
@@ -3189,7 +3189,6 @@ static void Rec_ShowCountry (struct Usr_Data *UsrDat,bool PutForm)
static void Rec_ShowDateOfBirth (struct Usr_Data *UsrDat,bool ShowData,bool PutForm)
{
- extern const char *Par_CodeStr[];
extern const char *Txt_Date_of_birth;
unsigned CurrentYear = Dat_GetCurrentYear ();
@@ -3628,7 +3627,7 @@ static void Rec_GetUsrExtraDataFromRecordForm (struct Usr_Data *UsrDat)
(unsigned long) Usr_SEX_UNKNOWN);
/***** Get country code *****/
- UsrDat->CtyCod = Par_GetAndCheckParCodeMin (Par_OthCtyCod,0); // 0 (another country) is allowed here
+ UsrDat->CtyCod = ParCod_GetAndCheckParMin (ParCod_OthCty,0); // 0 (another country) is allowed here
Dat_GetDateFromForm ("BirthDay","BirthMonth","BirthYear",
&(UsrDat->Birthday.Day ),
@@ -3809,7 +3808,7 @@ static void Rec_ShowFormMyInsCtrDpt (bool IAmATeacher)
/* Label */
if (asprintf (&Label,"%s*",Txt_Institution) < 0)
Err_NotEnoughMemoryExit ();
- Frm_LabelColumn ("REC_C1_BOT RM",Par_CodeStr[Par_OthInsCod],Label);
+ Frm_LabelColumn ("REC_C1_BOT RM",Par_CodeStr[ParCod_OthIns],Label);
free (Label);
/* Data */
@@ -3852,7 +3851,7 @@ static void Rec_ShowFormMyInsCtrDpt (bool IAmATeacher)
/* Label */
if (asprintf (&Label,"%s*",Txt_Center) < 0)
Err_NotEnoughMemoryExit ();
- Frm_LabelColumn ("REC_C1_BOT RM",Par_CodeStr[Par_OthCtrCod],Label);
+ Frm_LabelColumn ("REC_C1_BOT RM",Par_CodeStr[ParCod_OthCtr],Label);
free (Label);
/* Data */
@@ -3893,7 +3892,7 @@ static void Rec_ShowFormMyInsCtrDpt (bool IAmATeacher)
/* Label */
if (asprintf (&Label,"%s*",Txt_Department) < 0)
Err_NotEnoughMemoryExit ();
- Frm_LabelColumn ("REC_C1_BOT RM",Par_CodeStr[Par_DptCod],Label);
+ Frm_LabelColumn ("REC_C1_BOT RM",Par_CodeStr[ParCod_Dpt],Label);
free (Label);
/* Data */
@@ -3904,7 +3903,7 @@ static void Rec_ShowFormMyInsCtrDpt (bool IAmATeacher)
Err_NotEnoughMemoryExit ();
Dpt_WriteSelectorDepartment (Gbl.Usrs.Me.UsrDat.InsCod, // Departments in my institution
Gbl.Usrs.Me.UsrDat.Tch.DptCod, // Selected department
- Par_CodeStr[Par_DptCod], // Parameter name
+ Par_CodeStr[ParCod_Dpt], // Parameter name
SelectClass, // Selector class
-1L, // First option
"", // Text when no department selected
@@ -3972,7 +3971,7 @@ void Rec_ChgCountryOfMyInstitution (void)
unsigned NumInss;
/***** Get country code of my institution *****/
- Gbl.Usrs.Me.UsrDat.InsCtyCod = Par_GetAndCheckParCode (Par_OthCtyCod);
+ Gbl.Usrs.Me.UsrDat.InsCtyCod = ParCod_GetAndCheckPar (ParCod_OthCty);
/***** When country changes, the institution, center and department must be reset *****/
NumInss = Ins_GetNumInssInCty (Gbl.Usrs.Me.UsrDat.InsCtyCod);
@@ -4008,7 +4007,7 @@ void Rec_UpdateMyInstitution (void)
/***** Get my institution *****/
/* Get institution code */
- Ins.InsCod = Par_GetAndCheckParCodeMin (Par_OthInsCod,0); // 0 (another institution) is allowed here
+ Ins.InsCod = ParCod_GetAndCheckParMin (ParCod_OthIns,0); // 0 (another institution) is allowed here
/* Get country of institution */
if (Ins.InsCod > 0)
@@ -4044,7 +4043,7 @@ void Rec_UpdateMyCenter (void)
/***** Get my center *****/
/* Get center code */
- Ctr.CtrCod = Par_GetAndCheckParCodeMin (Par_OthCtrCod,0); // 0 (another center) is allowed here
+ Ctr.CtrCod = ParCod_GetAndCheckParMin (ParCod_OthCtr,0); // 0 (another center) is allowed here
/* Get institution of center */
if (Ctr.CtrCod > 0)
@@ -4077,7 +4076,7 @@ void Rec_UpdateMyDepartment (void)
/***** Get my department *****/
/* Get department code */
- Dpt.DptCod = Par_GetAndCheckParCodeMin (Par_DptCod,0); // 0 (another department) is allowed here
+ Dpt.DptCod = ParCod_GetAndCheckParMin (ParCod_Dpt,0); // 0 (another department) is allowed here
/* Get institution of department */
if (Dpt.DptCod > 0)
diff --git a/swad_record.h b/swad_record.h
index 7e564116..eb18b432 100644
--- a/swad_record.h
+++ b/swad_record.h
@@ -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
diff --git a/swad_record_database.c b/swad_record_database.c
index fa3cd2c7..3ebdf206 100644
--- a/swad_record_database.c
+++ b/swad_record_database.c
@@ -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
diff --git a/swad_record_database.h b/swad_record_database.h
index d9303f8e..7abc2801 100644
--- a/swad_record_database.h
+++ b/swad_record_database.h
@@ -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
diff --git a/swad_report.c b/swad_report.c
index f398204f..34373811 100644
--- a/swad_report.c
+++ b/swad_report.c
@@ -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
diff --git a/swad_report.h b/swad_report.h
index ca1f9f8c..1ffcd4fa 100644
--- a/swad_report.h
+++ b/swad_report.h
@@ -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
diff --git a/swad_report_database.c b/swad_report_database.c
index e96ce28f..ef677414 100644
--- a/swad_report_database.c
+++ b/swad_report_database.c
@@ -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
diff --git a/swad_report_database.h b/swad_report_database.h
index 23b949bb..23347b7c 100644
--- a/swad_report_database.h
+++ b/swad_report_database.h
@@ -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
diff --git a/swad_role.c b/swad_role.c
index edee7c43..a1d2b402 100644
--- a/swad_role.c
+++ b/swad_role.c
@@ -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
diff --git a/swad_role.h b/swad_role.h
index 01bf88d7..581f16dc 100644
--- a/swad_role.h
+++ b/swad_role.h
@@ -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
diff --git a/swad_role_database.c b/swad_role_database.c
index a2f60674..c795940a 100644
--- a/swad_role_database.c
+++ b/swad_role_database.c
@@ -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
diff --git a/swad_role_database.h b/swad_role_database.h
index 5a5f73c6..f795081e 100644
--- a/swad_role_database.h
+++ b/swad_role_database.h
@@ -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
diff --git a/swad_role_type.h b/swad_role_type.h
index 4d32d381..c1008e42 100644
--- a/swad_role_type.h
+++ b/swad_role_type.h
@@ -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
diff --git a/swad_room.c b/swad_room.c
index 8106f643..b1708fc2 100644
--- a/swad_room.c
+++ b/swad_room.c
@@ -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,7 +40,7 @@
#include "swad_group_database.h"
#include "swad_HTML.h"
#include "swad_MAC.h"
-#include "swad_parameter.h"
+#include "swad_parameter_code.h"
#include "swad_room.h"
#include "swad_room_database.h"
@@ -347,7 +347,7 @@ void Roo_ChangeMAC (void)
/***** Get parameters from form *****/
/* Get room code */
- Roo_EditingRoom->RooCod = Par_GetAndCheckParCode (Par_RooCod);
+ Roo_EditingRoom->RooCod = ParCod_GetAndCheckPar (ParCod_Roo);
/* Get the old MAC address of the room */
OldMACnum = MAC_GetMACnumFromForm ("MAC");
@@ -699,7 +699,7 @@ static void Roo_ListRoomsForEdition (const struct Bld_Buildings *Buildings,
/* Building */
HTM_TD_Begin ("class=\"CT\"");
Frm_BeginFormAnchor (ActChgRooBld,Anchor);
- Par_PutParCode (Par_RooCod,Room->RooCod);
+ ParCod_PutPar (ParCod_Roo,Room->RooCod);
Roo_PutSelectorBuilding (Room->BldCod,Buildings,
HTM_SUBMIT_ON_CHANGE);
Frm_EndForm ();
@@ -708,7 +708,7 @@ static void Roo_ListRoomsForEdition (const struct Bld_Buildings *Buildings,
/* Floor */
HTM_TD_Begin ("class=\"LT\"");
Frm_BeginFormAnchor (ActChgRooFlo,Anchor);
- Par_PutParCode (Par_RooCod,Room->RooCod);
+ ParCod_PutPar (ParCod_Roo,Room->RooCod);
HTM_INPUT_LONG ("Floor",(long) INT_MIN,(long) INT_MAX,(long) Room->Floor,
HTM_SUBMIT_ON_CHANGE,false,
"class=\"INPUT_LONG INPUT_%s\"",
@@ -719,7 +719,7 @@ static void Roo_ListRoomsForEdition (const struct Bld_Buildings *Buildings,
/* Room type */
HTM_TD_Begin ("class=\"CT\"");
Frm_BeginFormAnchor (ActChgRooTyp,Anchor);
- Par_PutParCode (Par_RooCod,Room->RooCod);
+ ParCod_PutPar (ParCod_Roo,Room->RooCod);
Roo_PutSelectorType (Room->Type,
HTM_SUBMIT_ON_CHANGE);
Frm_EndForm ();
@@ -728,7 +728,7 @@ static void Roo_ListRoomsForEdition (const struct Bld_Buildings *Buildings,
/* Room short name */
HTM_TD_Begin ("class=\"LT\"");
Frm_BeginFormAnchor (ActRenRooSho,Anchor);
- Par_PutParCode (Par_RooCod,Room->RooCod);
+ ParCod_PutPar (ParCod_Roo,Room->RooCod);
HTM_INPUT_TEXT ("ShortName",Roo_MAX_CHARS_SHRT_NAME,Room->ShrtName,
HTM_SUBMIT_ON_CHANGE,
"size=\"10\""
@@ -740,7 +740,7 @@ static void Roo_ListRoomsForEdition (const struct Bld_Buildings *Buildings,
/* Room full name */
HTM_TD_Begin ("class=\"LT\"");
Frm_BeginFormAnchor (ActRenRooFul,Anchor);
- Par_PutParCode (Par_RooCod,Room->RooCod);
+ ParCod_PutPar (ParCod_Roo,Room->RooCod);
HTM_INPUT_TEXT ("FullName",Roo_MAX_CHARS_FULL_NAME,Room->FullName,
HTM_SUBMIT_ON_CHANGE,
"size=\"20\""
@@ -752,7 +752,7 @@ static void Roo_ListRoomsForEdition (const struct Bld_Buildings *Buildings,
/* Seating capacity */
HTM_TD_Begin ("class=\"LT\"");
Frm_BeginFormAnchor (ActChgRooMaxUsr,Anchor);
- Par_PutParCode (Par_RooCod,Room->RooCod);
+ ParCod_PutPar (ParCod_Roo,Room->RooCod);
Roo_WriteCapacity (StrCapacity,Room->Capacity);
HTM_INPUT_TEXT ("Capacity",Cns_MAX_DECIMAL_DIGITS_UINT,StrCapacity,
HTM_SUBMIT_ON_CHANGE,
@@ -780,7 +780,7 @@ static void Roo_ListRoomsForEdition (const struct Bld_Buildings *Buildings,
static void Roo_PutParRooCod (void *RooCod)
{
if (RooCod)
- Par_PutParCode (Par_RooCod,*((long *) RooCod));
+ ParCod_PutPar (ParCod_Roo,*((long *) RooCod));
}
/*****************************************************************************/
@@ -888,7 +888,7 @@ void Roo_RemoveRoom (void)
Roo_EditingRoomConstructor ();
/***** Get room code *****/
- Roo_EditingRoom->RooCod = Par_GetAndCheckParCode (Par_RooCod);
+ Roo_EditingRoom->RooCod = ParCod_GetAndCheckPar (ParCod_Roo);
/***** Get data of the room from database *****/
Roo_GetDataOfRoomByCod (Roo_EditingRoom);
@@ -920,10 +920,10 @@ void Roo_ChangeBuilding (void)
/***** Get parameters from form *****/
/* Get room code */
- Roo_EditingRoom->RooCod = Par_GetAndCheckParCode (Par_RooCod);
+ Roo_EditingRoom->RooCod = ParCod_GetAndCheckPar (ParCod_Roo);
/* Get room building */
- NewBldCod = Par_GetAndCheckParCode (Par_BldCod);
+ NewBldCod = ParCod_GetAndCheckPar (ParCod_Bld);
/***** Get data of the room from database *****/
Roo_GetDataOfRoomByCod (Roo_EditingRoom);
@@ -967,7 +967,7 @@ void Roo_ChangeFloor (void)
/***** Get parameters from form *****/
/* Get room code */
- Roo_EditingRoom->RooCod = Par_GetAndCheckParCode (Par_RooCod);
+ Roo_EditingRoom->RooCod = ParCod_GetAndCheckPar (ParCod_Roo);
/* Get room floor */
NewFloor = Roo_GetParFloor ();
@@ -1013,7 +1013,7 @@ void Roo_ChangeType (void)
/***** Get parameters from form *****/
/* Get room code */
- Roo_EditingRoom->RooCod = Par_GetAndCheckParCode (Par_RooCod);
+ Roo_EditingRoom->RooCod = ParCod_GetAndCheckPar (ParCod_Roo);
/* Get room type */
NewType = Roo_GetParType ();
@@ -1104,7 +1104,7 @@ static void Roo_RenameRoom (Cns_ShrtOrFullName_t ShrtOrFullName)
/***** Get parameters from form *****/
/* Get room code */
- Roo_EditingRoom->RooCod = Par_GetAndCheckParCode (Par_RooCod);
+ Roo_EditingRoom->RooCod = ParCod_GetAndCheckPar (ParCod_Roo);
/* Get the new name for the room */
Par_GetParText (ParName,NewClaName,MaxBytes);
@@ -1164,7 +1164,7 @@ void Roo_ChangeCapacity (void)
/***** Get parameters from form *****/
/* Get room code */
- Roo_EditingRoom->RooCod = Par_GetAndCheckParCode (Par_RooCod);
+ Roo_EditingRoom->RooCod = ParCod_GetAndCheckPar (ParCod_Roo);
/* Get the seating capacity of the room */
NewCapacity = (unsigned)
@@ -1368,7 +1368,7 @@ void Roo_ReceiveFormNewRoom (void)
/***** Get parameters from form *****/
/* Get room building, floor and type */
- Roo_EditingRoom->BldCod = Par_GetAndCheckParCode (Par_BldCod);
+ Roo_EditingRoom->BldCod = ParCod_GetAndCheckPar (ParCod_Bld);
Roo_EditingRoom->Floor = Roo_GetParFloor ();
Roo_EditingRoom->Type = Roo_GetParType ();
diff --git a/swad_room.h b/swad_room.h
index 8d50456c..c2c1b167 100644
--- a/swad_room.h
+++ b/swad_room.h
@@ -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
diff --git a/swad_room_database.c b/swad_room_database.c
index 4d1da4a0..ccba2c8d 100644
--- a/swad_room_database.c
+++ b/swad_room_database.c
@@ -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
diff --git a/swad_room_database.h b/swad_room_database.h
index 3f75138b..4fcba724 100644
--- a/swad_room_database.h
+++ b/swad_room_database.h
@@ -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
diff --git a/swad_rubric.c b/swad_rubric.c
index 57599cc3..814bdacc 100644
--- a/swad_rubric.c
+++ b/swad_rubric.c
@@ -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
@@ -39,6 +39,7 @@
#include "swad_global.h"
#include "swad_pagination.h"
#include "swad_parameter.h"
+#include "swad_parameter_code.h"
#include "swad_rubric.h"
#include "swad_rubric_criteria.h"
#include "swad_rubric_database.h"
@@ -482,7 +483,7 @@ void Rub_PutPars (void *Rubrics)
{
if (Rubrics)
{
- Par_PutParCode (Par_RubCod,((struct Rub_Rubrics *) Rubrics)->Rubric.RubCod);
+ ParCod_PutPar (ParCod_Rub,((struct Rub_Rubrics *) Rubrics)->Rubric.RubCod);
Pag_PutParPagNum (Pag_RUBRICS,((struct Rub_Rubrics *) Rubrics)->CurrentPage);
}
}
@@ -497,7 +498,7 @@ long Rub_GetPars (struct Rub_Rubrics *Rubrics)
Rubrics->CurrentPage = Pag_GetParPagNum (Pag_RUBRICS);
/***** Get rubric code *****/
- return Par_GetParCode (Par_RubCod);
+ return ParCod_GetPar (ParCod_Rub);
}
/*****************************************************************************/
@@ -646,7 +647,7 @@ void Rub_RemoveRubric (void)
Rub_ResetRubric (&Rubrics.Rubric);
/***** Get rubric code *****/
- Rubrics.Rubric.RubCod = Par_GetAndCheckParCode (Par_RubCod);
+ Rubrics.Rubric.RubCod = ParCod_GetAndCheckPar (ParCod_Rub);
/***** Get data of the rubric from database *****/
Rub_GetDataOfRubricByCod (&Rubrics.Rubric);
diff --git a/swad_rubric.h b/swad_rubric.h
index 0a001573..00e1b984 100644
--- a/swad_rubric.h
+++ b/swad_rubric.h
@@ -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
diff --git a/swad_rubric_criteria.c b/swad_rubric_criteria.c
index dcdb6f4f..415bec1f 100644
--- a/swad_rubric_criteria.c
+++ b/swad_rubric_criteria.c
@@ -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
diff --git a/swad_rubric_criteria.h b/swad_rubric_criteria.h
index f4f181b2..8b072991 100644
--- a/swad_rubric_criteria.h
+++ b/swad_rubric_criteria.h
@@ -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
diff --git a/swad_rubric_database.c b/swad_rubric_database.c
index 83294ff1..97b90351 100644
--- a/swad_rubric_database.c
+++ b/swad_rubric_database.c
@@ -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
diff --git a/swad_rubric_database.h b/swad_rubric_database.h
index b098f5b6..6e55b292 100644
--- a/swad_rubric_database.h
+++ b/swad_rubric_database.h
@@ -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
diff --git a/swad_scope.c b/swad_scope.c
index 7a7bc69c..2406928e 100644
--- a/swad_scope.c
+++ b/swad_scope.c
@@ -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
diff --git a/swad_scope.h b/swad_scope.h
index cc0de1c0..2cff036a 100644
--- a/swad_scope.h
+++ b/swad_scope.h
@@ -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
diff --git a/swad_search.c b/swad_search.c
index b04e1f33..c60eec8e 100644
--- a/swad_search.c
+++ b/swad_search.c
@@ -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
diff --git a/swad_search.h b/swad_search.h
index 54c5d83c..80d1f3d5 100644
--- a/swad_search.h
+++ b/swad_search.h
@@ -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
diff --git a/swad_session.c b/swad_session.c
index e3aed48d..a4d21c3e 100644
--- a/swad_session.c
+++ b/swad_session.c
@@ -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
diff --git a/swad_session.h b/swad_session.h
index 56672af6..515d27a7 100644
--- a/swad_session.h
+++ b/swad_session.h
@@ -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
diff --git a/swad_session_database.c b/swad_session_database.c
index b522c9bb..9160fb6b 100644
--- a/swad_session_database.c
+++ b/swad_session_database.c
@@ -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
@@ -273,7 +273,7 @@ void Ses_DB_InsertPar (const char *ParName,const char *ParValue)
Gbl.Session.Id,
ParName,
ParValue ? ParValue :
- "");
+ "");
}
/*****************************************************************************/
diff --git a/swad_session_database.h b/swad_session_database.h
index 17fbde6f..96d263ab 100644
--- a/swad_session_database.h
+++ b/swad_session_database.h
@@ -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
diff --git a/swad_setting.c b/swad_setting.c
index 1501e2c0..a67af933 100644
--- a/swad_setting.c
+++ b/swad_setting.c
@@ -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
diff --git a/swad_setting.h b/swad_setting.h
index d50bbb14..7531d0ac 100644
--- a/swad_setting.h
+++ b/swad_setting.h
@@ -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
diff --git a/swad_setting_database.c b/swad_setting_database.c
index 44bebdef..731aa701 100644
--- a/swad_setting_database.c
+++ b/swad_setting_database.c
@@ -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
diff --git a/swad_setting_database.h b/swad_setting_database.h
index fccf24a1..e9a84c10 100644
--- a/swad_setting_database.h
+++ b/swad_setting_database.h
@@ -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
diff --git a/swad_statistic.c b/swad_statistic.c
index 3b983e17..b4ccb66c 100644
--- a/swad_statistic.c
+++ b/swad_statistic.c
@@ -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
@@ -45,7 +45,7 @@
#include "swad_ID.h"
#include "swad_log.h"
#include "swad_log_database.h"
-#include "swad_parameter.h"
+#include "swad_parameter_code.h"
#include "swad_plugin.h"
#include "swad_profile.h"
#include "swad_role.h"
@@ -3313,7 +3313,7 @@ static void Sta_ShowNumHitsPerCourse (Sta_CountType_t CountType,
if (CrsOK)
{
Frm_BeginFormGoTo (ActSeeCrsInf);
- Par_PutParCode (Par_CrsCod,Crs.CrsCod);
+ ParCod_PutPar (ParCod_Crs,Crs.CrsCod);
HTM_BUTTON_Submit_Begin (Str_BuildGoToTitle (Crs.FullName),
"class=\"LT BT_LINK\"");
Str_FreeGoToTitle ();
diff --git a/swad_statistic.h b/swad_statistic.h
index b1e56fff..4793ad76 100644
--- a/swad_statistic.h
+++ b/swad_statistic.h
@@ -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
diff --git a/swad_statistic_database.c b/swad_statistic_database.c
index 2d32aa13..2d2ca597 100644
--- a/swad_statistic_database.c
+++ b/swad_statistic_database.c
@@ -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
diff --git a/swad_statistic_database.h b/swad_statistic_database.h
index c90927ba..3a2380a6 100644
--- a/swad_statistic_database.h
+++ b/swad_statistic_database.h
@@ -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
diff --git a/swad_string.c b/swad_string.c
index d4224188..5ff45c50 100644
--- a/swad_string.c
+++ b/swad_string.c
@@ -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
diff --git a/swad_string.h b/swad_string.h
index 448b4d69..40038178 100644
--- a/swad_string.h
+++ b/swad_string.h
@@ -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
diff --git a/swad_survey.c b/swad_survey.c
index 67454b78..368194eb 100644
--- a/swad_survey.c
+++ b/swad_survey.c
@@ -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
@@ -47,7 +47,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_program.h"
#include "swad_program_database.h"
#include "swad_role.h"
@@ -407,7 +407,7 @@ void Svy_SeeOneSurvey (void)
Surveys.CurrentPage = Pag_GetParPagNum (Pag_SURVEYS);
/***** Get survey code *****/
- Surveys.Svy.SvyCod = Par_GetAndCheckParCode (Par_SvyCod);
+ Surveys.Svy.SvyCod = ParCod_GetAndCheckPar (ParCod_Svy);
/***** Show survey *****/
Svy_ShowOneSurvey (&Surveys,true);
@@ -531,7 +531,7 @@ static void Svy_ShowOneSurvey (struct Svy_Surveys *Surveys,
HTM_ARTICLE_Begin (Anchor);
Frm_BeginForm (ActSeeSvy);
- Par_PutParCode (Par_SvyCod,Surveys->Svy.SvyCod);
+ ParCod_PutPar (ParCod_Svy,Surveys->Svy.SvyCod);
Svy_PutParSvyOrder (Surveys->SelectedOrder);
WhichGroups = Grp_GetParWhichGroups ();
Grp_PutParWhichGroups (&WhichGroups);
@@ -575,7 +575,7 @@ static void Svy_ShowOneSurvey (struct Svy_Surveys *Surveys,
HTM_DIV_Begin ("class=\"BUTTONS_AFTER_ALERT\"");
Frm_BeginForm (ActSeeSvy);
- Par_PutParCode (Par_SvyCod,Surveys->Svy.SvyCod);
+ ParCod_PutPar (ParCod_Svy,Surveys->Svy.SvyCod);
Svy_PutParSvyOrder (Surveys->SelectedOrder);
WhichGroups = Grp_GetParWhichGroups ();
Grp_PutParWhichGroups (&WhichGroups);
@@ -591,7 +591,7 @@ static void Svy_ShowOneSurvey (struct Svy_Surveys *Surveys,
HTM_DIV_Begin ("class=\"BUTTONS_AFTER_ALERT\"");
Frm_BeginForm (ActSeeSvy);
- Par_PutParCode (Par_SvyCod,Surveys->Svy.SvyCod);
+ ParCod_PutPar (ParCod_Svy,Surveys->Svy.SvyCod);
Svy_PutParSvyOrder (Surveys->SelectedOrder);
WhichGroups = Grp_GetParWhichGroups ();
Grp_PutParWhichGroups (&WhichGroups);
@@ -934,7 +934,7 @@ static void Svy_PutPars (void *Surveys)
if (Surveys)
{
- Par_PutParCode (Par_SvyCod,((struct Svy_Surveys *) Surveys)->Svy.SvyCod);
+ ParCod_PutPar (ParCod_Svy,((struct Svy_Surveys *) Surveys)->Svy.SvyCod);
Par_PutParOrder ((unsigned) ((struct Svy_Surveys *) Surveys)->SelectedOrder);
WhichGroups = Grp_GetParWhichGroups ();
Grp_PutParWhichGroups (&WhichGroups);
@@ -1423,7 +1423,7 @@ void Svy_AskRemSurvey (void)
Surveys.CurrentPage = Pag_GetParPagNum (Pag_SURVEYS);
/***** Get survey code *****/
- Surveys.Svy.SvyCod = Par_GetAndCheckParCode (Par_SvyCod);
+ Surveys.Svy.SvyCod = ParCod_GetAndCheckPar (ParCod_Svy);
/***** Get data of the survey from database *****/
Svy_GetDataOfSurveyByCod (&Surveys.Svy);
@@ -1459,7 +1459,7 @@ void Svy_RemoveSurvey (void)
Surveys.CurrentPage = Pag_GetParPagNum (Pag_SURVEYS);
/***** Get survey code *****/
- Surveys.Svy.SvyCod = Par_GetAndCheckParCode (Par_SvyCod);
+ Surveys.Svy.SvyCod = ParCod_GetAndCheckPar (ParCod_Svy);
/***** Get data of the survey from database *****/
Svy_GetDataOfSurveyByCod (&Surveys.Svy);
@@ -1511,7 +1511,7 @@ void Svy_AskResetSurvey (void)
Surveys.CurrentPage = Pag_GetParPagNum (Pag_SURVEYS);
/***** Get survey code *****/
- Surveys.Svy.SvyCod = Par_GetAndCheckParCode (Par_SvyCod);
+ Surveys.Svy.SvyCod = ParCod_GetAndCheckPar (ParCod_Svy);
/***** Get data of the survey from database *****/
Svy_GetDataOfSurveyByCod (&Surveys.Svy);
@@ -1547,7 +1547,7 @@ void Svy_ResetSurvey (void)
Surveys.CurrentPage = Pag_GetParPagNum (Pag_SURVEYS);
/***** Get survey code *****/
- Surveys.Svy.SvyCod = Par_GetAndCheckParCode (Par_SvyCod);
+ Surveys.Svy.SvyCod = ParCod_GetAndCheckPar (ParCod_Svy);
/***** Get data of the survey from database *****/
Svy_GetDataOfSurveyByCod (&Surveys.Svy);
@@ -1585,7 +1585,7 @@ void Svy_HideSurvey (void)
Surveys.CurrentPage = Pag_GetParPagNum (Pag_SURVEYS);
/***** Get survey code *****/
- Surveys.Svy.SvyCod = Par_GetAndCheckParCode (Par_SvyCod);
+ Surveys.Svy.SvyCod = ParCod_GetAndCheckPar (ParCod_Svy);
/***** Get data of the survey from database *****/
Svy_GetDataOfSurveyByCod (&Surveys.Svy);
@@ -1616,7 +1616,7 @@ void Svy_UnhideSurvey (void)
Surveys.CurrentPage = Pag_GetParPagNum (Pag_SURVEYS);
/***** Get survey code *****/
- Surveys.Svy.SvyCod = Par_GetAndCheckParCode (Par_SvyCod);
+ Surveys.Svy.SvyCod = ParCod_GetAndCheckPar (ParCod_Svy);
/***** Get data of the survey from database *****/
Svy_GetDataOfSurveyByCod (&Surveys.Svy);
@@ -1664,7 +1664,7 @@ void Svy_RequestCreatOrEditSvy (void)
Surveys.CurrentPage = Pag_GetParPagNum (Pag_SURVEYS);
/***** Get the code of the survey *****/
- ItsANewSurvey = ((Surveys.Svy.SvyCod = Par_GetParCode (Par_SvyCod)) <= 0);
+ ItsANewSurvey = ((Surveys.Svy.SvyCod = ParCod_GetPar (ParCod_Svy)) <= 0);
/***** Get from the database the data of the survey *****/
if (ItsANewSurvey)
@@ -1927,7 +1927,7 @@ static void Svy_ShowLstGrpsToEditSurvey (long SvyCod)
HTM_INPUT_CHECKBOX ("WholeCrs",HTM_DONT_SUBMIT_ON_CHANGE,
"id=\"WholeCrs\" value=\"Y\"%s onclick=\"uncheckChildren(this,'GrpCods')\"",
Grp_DB_CheckIfAssociatedToGrps ("svy_groups",
- Par_SvyCod,
+ "SvyCod",
SvyCod) ? "" :
" checked=\"checked\"");
HTM_TxtF ("%s %s",Txt_The_whole_course,Gbl.Hierarchy.Crs.ShrtName);
@@ -1978,7 +1978,7 @@ void Svy_ReceiveFormSurvey (void)
Surveys.CurrentPage = Pag_GetParPagNum (Pag_SURVEYS);
/***** Get the code of the survey *****/
- ItsANewSurvey = ((NewSvy.SvyCod = Par_GetParCode (Par_SvyCod)) <= 0);
+ ItsANewSurvey = ((NewSvy.SvyCod = ParCod_GetPar (ParCod_Svy)) <= 0);
if (ItsANewSurvey)
NewSvy.Scope = HieLvl_UNK;
@@ -2264,10 +2264,10 @@ void Svy_RequestEditQuestion (void)
Stem[0] = '\0';
/***** Get survey code *****/
- Surveys.Svy.SvyCod = Par_GetAndCheckParCode (Par_SvyCod);
+ Surveys.Svy.SvyCod = ParCod_GetAndCheckPar (ParCod_Svy);
/* Get the question code */
- SvyQst.QstCod = Par_GetParCode (Par_QstCod);
+ SvyQst.QstCod = ParCod_GetPar (ParCod_Qst);
/***** Get other parameters *****/
Surveys.SelectedOrder = Svy_GetParSvyOrder ();
@@ -2361,8 +2361,8 @@ static void Svy_ShowFormEditOneQst (struct Svy_Surveys *Surveys,
/***** Begin form *****/
Frm_BeginForm (ActRcvSvyQst);
- Par_PutParCode (Par_SvyCod,Surveys->Svy.SvyCod);
- Par_PutParCode (Par_QstCod,SvyQst->QstCod);
+ ParCod_PutPar (ParCod_Svy,Surveys->Svy.SvyCod);
+ ParCod_PutPar (ParCod_Qst,SvyQst->QstCod);
/***** Begin table *****/
HTM_TABLE_BeginWidePadding (2);
@@ -2556,10 +2556,10 @@ void Svy_ReceiveQst (void)
/***** Get parameters from form *****/
/* Get survey code */
- Surveys.Svy.SvyCod = Par_GetAndCheckParCode (Par_SvyCod);
+ Surveys.Svy.SvyCod = ParCod_GetAndCheckPar (ParCod_Svy);
/* Get question code */
- SvyQst.QstCod = Par_GetParCode (Par_QstCod);
+ SvyQst.QstCod = ParCod_GetPar (ParCod_Qst);
/* Get answer type */
SvyQst.AnswerType = (Svy_AnswerType_t)
@@ -2742,7 +2742,7 @@ static void Svy_ListSvyQuestions (struct Svy_Surveys *Surveys)
{
/***** Begin form to send answers to survey *****/
Frm_BeginForm (ActAnsSvy);
- Par_PutParCode (Par_SvyCod,Surveys->Svy.SvyCod);
+ ParCod_PutPar (ParCod_Svy,Surveys->Svy.SvyCod);
}
/***** Write the heading *****/
@@ -2870,8 +2870,8 @@ static void Svy_PutParsToEditQuestion (void *Surveys)
{
if (Surveys)
{
- Par_PutParCode (Par_SvyCod,((struct Svy_Surveys *) Surveys)->Svy.SvyCod);
- Par_PutParCode (Par_QstCod,((struct Svy_Surveys *) Surveys)->QstCod);
+ ParCod_PutPar (ParCod_Svy,((struct Svy_Surveys *) Surveys)->Svy.SvyCod);
+ ParCod_PutPar (ParCod_Qst,((struct Svy_Surveys *) Surveys)->QstCod);
}
}
@@ -3095,8 +3095,8 @@ static void Svy_PutParsRemoveOneQst (void *Surveys)
{
if (Surveys)
{
- Par_PutParCode (Par_SvyCod,((struct Svy_Surveys *) Surveys)->Svy.SvyCod);
- Par_PutParCode (Par_QstCod,((struct Svy_Surveys *) Surveys)->QstCod);
+ ParCod_PutPar (ParCod_Svy,((struct Svy_Surveys *) Surveys)->Svy.SvyCod);
+ ParCod_PutPar (ParCod_Qst,((struct Svy_Surveys *) Surveys)->QstCod);
}
}
@@ -3119,10 +3119,10 @@ void Svy_RequestRemoveQst (void)
/***** Get parameters from form *****/
/* Get survey code */
- Surveys.Svy.SvyCod = Par_GetAndCheckParCode (Par_SvyCod);
+ Surveys.Svy.SvyCod = ParCod_GetAndCheckPar (ParCod_Svy);
/* Get question code */
- SvyQst.QstCod = Par_GetAndCheckParCode (Par_QstCod);
+ SvyQst.QstCod = ParCod_GetAndCheckPar (ParCod_Qst);
/* Get question index */
SvyQst.QstInd = Svy_DB_GetQstIndFromQstCod (SvyQst.QstCod);
@@ -3157,10 +3157,10 @@ void Svy_RemoveQst (void)
/***** Get parameters from form *****/
/* Get survey code */
- Surveys.Svy.SvyCod = Par_GetAndCheckParCode (Par_SvyCod);
+ Surveys.Svy.SvyCod = ParCod_GetAndCheckPar (ParCod_Svy);
/* Get question code */
- SvyQst.QstCod = Par_GetAndCheckParCode (Par_QstCod);
+ SvyQst.QstCod = ParCod_GetAndCheckPar (ParCod_Qst);
/* Get question index */
SvyQst.QstInd = Svy_DB_GetQstIndFromQstCod (SvyQst.QstCod);
@@ -3196,7 +3196,7 @@ void Svy_ReceiveSurveyAnswers (void)
Svy_ResetSurveys (&Surveys);
/***** Get survey code *****/
- Surveys.Svy.SvyCod = Par_GetAndCheckParCode (Par_SvyCod);
+ Surveys.Svy.SvyCod = ParCod_GetAndCheckPar (ParCod_Svy);
/***** Get data of the survey from database *****/
Svy_GetDataOfSurveyByCod (&Surveys.Svy);
diff --git a/swad_survey.h b/swad_survey.h
index bbe967e3..05414d01 100644
--- a/swad_survey.h
+++ b/swad_survey.h
@@ -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
diff --git a/swad_survey_database.c b/swad_survey_database.c
index 5d01448c..ec2b5cba 100644
--- a/swad_survey_database.c
+++ b/swad_survey_database.c
@@ -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
diff --git a/swad_survey_database.h b/swad_survey_database.h
index f0759968..85add109 100644
--- a/swad_survey_database.h
+++ b/swad_survey_database.h
@@ -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
diff --git a/swad_survey_resource.c b/swad_survey_resource.c
index 044f4358..ea09a1f7 100644
--- a/swad_survey_resource.c
+++ b/swad_survey_resource.c
@@ -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
@@ -29,7 +29,7 @@
#include "swad_alert.h"
#include "swad_error.h"
#include "swad_form.h"
-#include "swad_parameter.h"
+#include "swad_parameter_code.h"
#include "swad_program_database.h"
#include "swad_survey.h"
#include "swad_survey_database.h"
@@ -49,7 +49,7 @@ void SvyRsc_GetLinkToSurvey (void)
Svy_ResetSurveys (&Surveys);
/***** Get survey code *****/
- Surveys.Svy.SvyCod = Par_GetAndCheckParCode (Par_SvyCod);
+ Surveys.Svy.SvyCod = ParCod_GetAndCheckPar (ParCod_Svy);
/***** Get survey title *****/
SvyRsc_GetTitleFromSvyCod (Surveys.Svy.SvyCod,Title,sizeof (Title) - 1);
@@ -85,7 +85,7 @@ void SvyRsc_WriteSurveyInCrsProgram (long SvyCod,bool PutFormToGo,
NextAction = (SvyCod > 0) ? ActSeeSvy : // Survey specified
ActSeeAllSvy; // All surveys
Frm_BeginForm (NextAction);
- Par_PutParCode (Par_SvyCod,SvyCod);
+ ParCod_PutPar (ParCod_Svy,SvyCod);
HTM_BUTTON_Submit_Begin (Txt_Actions[NextAction],
"class=\"LM BT_LINK PRG_LNK_%s\"",
The_GetSuffix ());
diff --git a/swad_survey_resource.h b/swad_survey_resource.h
index a4a90bd6..feb0f9e4 100644
--- a/swad_survey_resource.h
+++ b/swad_survey_resource.h
@@ -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
diff --git a/swad_syllabus.c b/swad_syllabus.c
index 0eb4290e..888f45e6 100644
--- a/swad_syllabus.c
+++ b/swad_syllabus.c
@@ -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
diff --git a/swad_syllabus.h b/swad_syllabus.h
index 3cbc3980..592cbde6 100644
--- a/swad_syllabus.h
+++ b/swad_syllabus.h
@@ -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
diff --git a/swad_system_config.c b/swad_system_config.c
index d97a8d01..f2474c86 100644
--- a/swad_system_config.c
+++ b/swad_system_config.c
@@ -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
@@ -275,7 +275,7 @@ static void SysCfg_Platform (void)
static void SysCfg_Shortcut (bool PrintView)
{
- HieCfg_Shortcut (PrintView,Par_None,-1L);
+ HieCfg_Shortcut (PrintView,ParCod_None,-1L);
}
/*****************************************************************************/
@@ -284,7 +284,7 @@ static void SysCfg_Shortcut (bool PrintView)
static void SysCfg_QR (void)
{
- HieCfg_QR (Par_None,-1L);
+ HieCfg_QR (ParCod_None,-1L);
}
/*****************************************************************************/
diff --git a/swad_system_config.h b/swad_system_config.h
index 523940bb..ee1e3fef 100644
--- a/swad_system_config.h
+++ b/swad_system_config.h
@@ -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
diff --git a/swad_tab.c b/swad_tab.c
index d40f383e..ad7a2ea6 100644
--- a/swad_tab.c
+++ b/swad_tab.c
@@ -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
diff --git a/swad_tab.h b/swad_tab.h
index 391edbd8..4b52b4f8 100644
--- a/swad_tab.h
+++ b/swad_tab.h
@@ -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
diff --git a/swad_tag.c b/swad_tag.c
index 97137413..99f896e0 100644
--- a/swad_tag.c
+++ b/swad_tag.c
@@ -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
@@ -41,6 +41,7 @@
#include "swad_form.h"
#include "swad_global.h"
#include "swad_parameter.h"
+#include "swad_parameter_code.h"
#include "swad_tag.h"
#include "swad_tag_database.h"
#include "swad_theme.h"
@@ -107,7 +108,7 @@ void Tag_PutIconToEditTags (void)
void Tag_EnableTag (void)
{
- long TagCod = Par_GetAndCheckParCode (Par_TagCod);
+ long TagCod = ParCod_GetAndCheckPar (ParCod_Tag);
/***** Change tag status to enabled *****/
Tag_DB_EnableOrDisableTag (TagCod,false);
@@ -122,7 +123,7 @@ void Tag_EnableTag (void)
void Tag_DisableTag (void)
{
- long TagCod = Par_GetAndCheckParCode (Par_TagCod);
+ long TagCod = ParCod_GetAndCheckPar (ParCod_Tag);
/***** Change tag status to disabled *****/
Tag_DB_EnableOrDisableTag (TagCod,true);
@@ -453,7 +454,7 @@ static void Tag_PutIconEnable (long TagCod)
{
HTM_TD_Begin ("class=\"BM\"");
Frm_BeginForm (ActEnaTag);
- Par_PutParCode (Par_TagCod,TagCod);
+ ParCod_PutPar (ParCod_Tag,TagCod);
Ico_PutIconLink ("eye-slash.svg",Ico_RED,ActEnaTag);
Frm_EndForm ();
HTM_TD_End ();
@@ -467,7 +468,7 @@ static void Tag_PutIconDisable (long TagCod)
{
HTM_TD_Begin ("class=\"BM\"");
Frm_BeginForm (ActDisTag);
- Par_PutParCode (Par_TagCod,TagCod);
+ ParCod_PutPar (ParCod_Tag,TagCod);
Ico_PutIconLink ("eye.svg",Ico_GREEN,ActDisTag);
Frm_EndForm ();
HTM_TD_End ();
diff --git a/swad_tag.h b/swad_tag.h
index 0dbdcceb..10e44c58 100644
--- a/swad_tag.h
+++ b/swad_tag.h
@@ -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
diff --git a/swad_tag_database.c b/swad_tag_database.c
index 655edc0e..85941b2a 100644
--- a/swad_tag_database.c
+++ b/swad_tag_database.c
@@ -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
diff --git a/swad_tag_database.h b/swad_tag_database.h
index e0017065..2b824979 100644
--- a/swad_tag_database.h
+++ b/swad_tag_database.h
@@ -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
diff --git a/swad_template.c b/swad_template.c
index da982f30..5da8d0d2 100644
--- a/swad_template.c
+++ b/swad_template.c
@@ -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
diff --git a/swad_template.h b/swad_template.h
index 44e750a0..53f21fea 100644
--- a/swad_template.h
+++ b/swad_template.h
@@ -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
diff --git a/swad_test.c b/swad_test.c
index e83401ff..b9c147bb 100644
--- a/swad_test.c
+++ b/swad_test.c
@@ -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
@@ -54,6 +54,7 @@
#include "swad_match.h"
#include "swad_media.h"
#include "swad_parameter.h"
+#include "swad_parameter_code.h"
#include "swad_question.h"
#include "swad_question_database.h"
#include "swad_question_import.h"
@@ -262,7 +263,7 @@ void Tst_ReceiveTestDraft (void)
/***** Get basic parameters of the exam *****/
/* Get test print code from form */
TstPrn_ResetPrint (&Print);
- Print.PrnCod = Par_GetAndCheckParCode (Par_PrnCod);
+ Print.PrnCod = ParCod_GetAndCheckPar (ParCod_Prn);
/* Get number of this test from form */
NumTst = Tst_GetParNumTst ();
@@ -318,7 +319,7 @@ void Tst_AssessTest (void)
/***** Get basic parameters of the exam *****/
/* Get test print code from form */
TstPrn_ResetPrint (&Print);
- Print.PrnCod = Par_GetAndCheckParCode (Par_PrnCod);
+ Print.PrnCod = ParCod_GetAndCheckPar (ParCod_Prn);
/* Get number of this test from form */
NumTst = Tst_GetParNumTst ();
diff --git a/swad_test.h b/swad_test.h
index 8a0eff13..21cb6176 100644
--- a/swad_test.h
+++ b/swad_test.h
@@ -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
diff --git a/swad_test_config.c b/swad_test_config.c
index 3fba8ee8..b235415d 100644
--- a/swad_test_config.c
+++ b/swad_test_config.c
@@ -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
diff --git a/swad_test_config.h b/swad_test_config.h
index 0f24dffc..be29bced 100644
--- a/swad_test_config.h
+++ b/swad_test_config.h
@@ -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
diff --git a/swad_test_database.c b/swad_test_database.c
index f7720267..77149910 100644
--- a/swad_test_database.c
+++ b/swad_test_database.c
@@ -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
diff --git a/swad_test_database.h b/swad_test_database.h
index 321bb239..82483336 100644
--- a/swad_test_database.h
+++ b/swad_test_database.h
@@ -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
diff --git a/swad_test_print.c b/swad_test_print.c
index e421b30f..c5234594 100644
--- a/swad_test_print.c
+++ b/swad_test_print.c
@@ -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
@@ -44,6 +44,7 @@
#include "swad_HTML.h"
#include "swad_ID.h"
#include "swad_parameter.h"
+#include "swad_parameter_code.h"
#include "swad_photo.h"
#include "swad_question.h"
#include "swad_question_database.h"
@@ -226,7 +227,7 @@ void TstPrn_ShowTestPrintToFillIt (struct TstPrn_Print *Print,
{
/***** Begin form *****/
Frm_BeginForm (Action[RequestOrConfirm]);
- Par_PutParCode (Par_PrnCod,Print->PrnCod);
+ ParCod_PutPar (ParCod_Prn,Print->PrnCod);
Par_PutParUnsigned (NULL,"NumTst",NumPrintsGeneratedByMe);
/***** Begin table *****/
@@ -2006,7 +2007,7 @@ static void TstPrn_ShowUsrPrints (struct Usr_Data *UsrDat)
{
Frm_BeginForm (Gbl.Action.Act == ActSeeMyTstResCrs ? ActSeeOneTstResMe :
ActSeeOneTstResOth);
- Par_PutParCode (Par_PrnCod,Print.PrnCod);
+ ParCod_PutPar (ParCod_Prn,Print.PrnCod);
Ico_PutIconLink ("tasks.svg",Ico_BLACK,
Gbl.Action.Act == ActSeeMyTstResCrs ? ActSeeOneTstResMe :
ActSeeOneTstResOth);
@@ -2205,7 +2206,7 @@ void TstPrn_ShowOnePrint (void)
/***** Get the code of the test *****/
TstPrn_ResetPrint (&Print);
- Print.PrnCod = Par_GetAndCheckParCode (Par_PrnCod);
+ Print.PrnCod = ParCod_GetAndCheckPar (ParCod_Prn);
/***** Get test data *****/
TstPrn_GetPrintDataByPrnCod (&Print);
diff --git a/swad_test_print.h b/swad_test_print.h
index 1ba0d32d..d33a478e 100644
--- a/swad_test_print.h
+++ b/swad_test_print.h
@@ -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
diff --git a/swad_test_visibility.c b/swad_test_visibility.c
index 52428768..d73d58f2 100644
--- a/swad_test_visibility.c
+++ b/swad_test_visibility.c
@@ -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
diff --git a/swad_test_visibility.h b/swad_test_visibility.h
index 863c252e..0106ae1f 100644
--- a/swad_test_visibility.h
+++ b/swad_test_visibility.h
@@ -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
diff --git a/swad_text.c b/swad_text.c
index 362e4914..ad3adabf 100644
--- a/swad_text.c
+++ b/swad_text.c
@@ -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
Catalā translation:
Antonio Caņas Vargas
diff --git a/swad_text_action.c b/swad_text_action.c
index 9534f105..768ba109 100644
--- a/swad_text_action.c
+++ b/swad_text_action.c
@@ -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
diff --git a/swad_text_no_html.c b/swad_text_no_html.c
index 89437b53..e2f20eeb 100644
--- a/swad_text_no_html.c
+++ b/swad_text_no_html.c
@@ -16,7 +16,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
Catalā translation:
Antonio Caņas Vargas
diff --git a/swad_theme.c b/swad_theme.c
index 81c11c5e..5e4c3017 100644
--- a/swad_theme.c
+++ b/swad_theme.c
@@ -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
diff --git a/swad_theme.h b/swad_theme.h
index 3e9ab217..40c7056b 100644
--- a/swad_theme.h
+++ b/swad_theme.h
@@ -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
diff --git a/swad_timeline.c b/swad_timeline.c
index 03f9b4f5..0cb132c5 100644
--- a/swad_timeline.c
+++ b/swad_timeline.c
@@ -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
@@ -134,7 +134,7 @@ mysql> SHOW TABLES LIKE 'tml_%';
#include "swad_global.h"
#include "swad_message.h"
#include "swad_notification.h"
-#include "swad_parameter.h"
+#include "swad_parameter_code.h"
#include "swad_photo.h"
#include "swad_profile.h"
#include "swad_timeline.h"
@@ -226,7 +226,7 @@ void Tml_ShowNoteAndTimelineGbl (struct Tml_Timeline *Timeline)
// This parameter is optional. It can be provided by a notification.
// If > 0 ==> the associated note will be shown highlighted
// get its code from database and show it above the timeline
- if ((PubCod = Par_GetParCode (Par_PubCod)) > 0)
+ if ((PubCod = ParCod_GetPar (ParCod_Pub)) > 0)
{
if ((Not.NotCod = Tml_DB_GetNotCodFromPubCod (PubCod)) > 0)
TmlNot_ShowHighlightedNote (Timeline,&Not);
diff --git a/swad_timeline.h b/swad_timeline.h
index 8782c0f4..5ddb3cf3 100644
--- a/swad_timeline.h
+++ b/swad_timeline.h
@@ -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
diff --git a/swad_timeline_comment.c b/swad_timeline_comment.c
index edcbc09c..d0b03797 100644
--- a/swad_timeline_comment.c
+++ b/swad_timeline_comment.c
@@ -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
@@ -38,6 +38,7 @@
#include "swad_message.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_timeline.h"
@@ -223,7 +224,7 @@ static void TmlCom_PutFormToWriteNewComm (const struct Tml_Timeline *Timeline,
/***** Begin form to write the post *****/
TmlFrm_BeginForm (Timeline,TmlFrm_RECEIVE_COMM);
- Par_PutParCode (Par_NotCod,NotCod);
+ ParCod_PutPar (ParCod_Not,NotCod);
/***** Textarea and button *****/
if (asprintf (&ClassTextArea,"Tml_COM_TEXTAREA Tml_COM_WIDTH INPUT_%s",
@@ -372,7 +373,7 @@ void TmlCom_ShowHiddenCommsGbl (void)
/***** Get parameters *****/
/* Get note code, identifier and number of comments to get */
- NotCod = Par_GetParCode (Par_NotCod);
+ NotCod = ParCod_GetPar (ParCod_Not);
Par_GetParText ("IdComments",IdComms,Frm_MAX_BYTES_ID);
NumInitialCommsToGet = (unsigned) Par_GetParLong ("NumHidCom");
@@ -700,7 +701,7 @@ static void TmlCom_PutFormToRemoveComm (const struct Tml_Timeline *Timeline,
/***** Form to remove publication *****/
/* Begin form */
TmlFrm_BeginForm (Timeline,TmlFrm_REQ_REM_COMM);
- Par_PutParCode (Par_PubCod,PubCod);
+ ParCod_PutPar (ParCod_Pub,PubCod);
/* Icon to remove */
Ico_PutIconLink ("trash.svg",Ico_RED,
@@ -764,7 +765,7 @@ static long TmlCom_ReceiveComm (void)
struct TmlPub_Publication Pub;
/***** Get data of note *****/
- Not.NotCod = Par_GetAndCheckParCode (Par_NotCod);
+ Not.NotCod = ParCod_GetAndCheckPar (ParCod_Not);
TmlNot_GetDataOfNoteByCod (&Not);
/***** Trivial check: note code *****/
@@ -870,7 +871,7 @@ static void TmlCom_RequestRemovalComm (struct Tml_Timeline *Timeline)
Med_MediaConstructor (&Com.Content.Media);
/***** Get data of comment *****/
- Com.PubCod = Par_GetAndCheckParCode (Par_PubCod);
+ Com.PubCod = ParCod_GetAndCheckPar (ParCod_Pub);
TmlCom_GetDataOfCommByCod (&Com);
/***** Do some checks *****/
@@ -922,7 +923,7 @@ static void TmlCom_PutParsRemoveComm (void *Timeline)
Usr_PutParOtherUsrCodEncrypted (Gbl.Usrs.Other.UsrDat.EnUsrCod);
else // Global timeline
Usr_PutParWho (((struct Tml_Timeline *) Timeline)->Who);
- Par_PutParCode (Par_PubCod,((struct Tml_Timeline *) Timeline)->PubCod);
+ ParCod_PutPar (ParCod_Pub,((struct Tml_Timeline *) Timeline)->PubCod);
}
}
@@ -980,7 +981,7 @@ static void TmlCom_RemoveComm (void)
Med_MediaConstructor (&Com.Content.Media);
/***** Get data of comment *****/
- Com.PubCod = Par_GetAndCheckParCode (Par_PubCod);
+ Com.PubCod = ParCod_GetAndCheckPar (ParCod_Pub);
TmlCom_GetDataOfCommByCod (&Com);
/***** Trivial check 1: publication code *****/
diff --git a/swad_timeline_comment.h b/swad_timeline_comment.h
index 5d595342..327b142f 100644
--- a/swad_timeline_comment.h
+++ b/swad_timeline_comment.h
@@ -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
diff --git a/swad_timeline_database.c b/swad_timeline_database.c
index d186638d..b99aac4a 100644
--- a/swad_timeline_database.c
+++ b/swad_timeline_database.c
@@ -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
@@ -45,11 +45,11 @@ static const char *Tml_DB_TableFav[TmlUsr_NUM_FAV_SHA] =
[TmlUsr_FAV_UNF_COMM] = "tml_comments_fav",
[TmlUsr_SHA_UNS_NOTE] = NULL, // Not used
};
-static Par_Code_t Tml_DB_FieldFav[TmlUsr_NUM_FAV_SHA] =
+static const char *Tml_DB_FieldFav[TmlUsr_NUM_FAV_SHA] =
{
- [TmlUsr_FAV_UNF_NOTE] = Par_NotCod,
- [TmlUsr_FAV_UNF_COMM] = Par_PubCod,
- [TmlUsr_SHA_UNS_NOTE] = Par_NotCod, // Not used
+ [TmlUsr_FAV_UNF_NOTE] = "NotCod",
+ [TmlUsr_FAV_UNF_COMM] = "PubCod",
+ [TmlUsr_SHA_UNS_NOTE] = NULL, // Not used
};
static TmlPub_Type_t Tml_DB_PubTypeFav[TmlUsr_NUM_FAV_SHA] =
{
@@ -68,7 +68,7 @@ extern struct Globals Gbl;
/***************************** Private prototypes ****************************/
/*****************************************************************************/
-static long Tml_DB_GetMedCod (const char *Table,Par_Code_t ParCod,long Cod);
+static long Tml_DB_GetMedCod (const char *Table,const char *Field,long Cod);
/*****************************************************************************/
/********************* Get which users to show in timeline *******************/
@@ -573,7 +573,7 @@ unsigned Tml_DB_GetPostByCod (long PstCod,MYSQL_RES **mysql_res)
long Tml_DB_GetMedCodFromPost (long PstCod)
{
- return Tml_DB_GetMedCod ("tml_posts",Par_PstCod,PstCod);
+ return Tml_DB_GetMedCod ("tml_posts","PstCod",PstCod);
}
/*****************************************************************************/
@@ -757,7 +757,7 @@ void Tml_DB_InsertCommContent (long PubCod,
long Tml_DB_GetMedCodFromComm (long PubCod)
{
- return Tml_DB_GetMedCod ("tml_comments",Par_PubCod,PubCod);
+ return Tml_DB_GetMedCod ("tml_comments","PubCod",PubCod);
}
/*****************************************************************************/
@@ -839,16 +839,14 @@ void Tml_DB_RemoveAllCommsMadeBy (long UsrCod)
/*************** Get code of media associated to post/comment ****************/
/*****************************************************************************/
-static long Tml_DB_GetMedCod (const char *Table,Par_Code_t ParCod,long Cod)
+static long Tml_DB_GetMedCod (const char *Table,const char *Field,long Cod)
{
- extern const char *Par_CodeStr[]; // Database field name must be equal to code parameter name
-
return DB_QuerySELECTCode ("can not get media code",
"SELECT MedCod" // row[0]
" FROM %s"
" WHERE %s=%ld",
Table,
- Par_CodeStr[ParCod],Cod);
+ Field,Cod);
}
/*****************************************************************************/
@@ -1134,8 +1132,6 @@ void Tml_DB_RemoveAllPubsPublishedBy (long UsrCod)
bool Tml_DB_CheckIfFavedByUsr (TmlUsr_FavSha_t FavSha,long Cod,long UsrCod)
{
- extern const char *Par_CodeStr[]; // Database field name must be equal to code parameter name
-
return
DB_QueryEXISTS ("can not check if a user has favourited",
"SELECT EXISTS"
@@ -1144,7 +1140,7 @@ bool Tml_DB_CheckIfFavedByUsr (TmlUsr_FavSha_t FavSha,long Cod,long UsrCod)
" WHERE %s=%ld"
" AND UsrCod=%ld)",
Tml_DB_TableFav[FavSha],
- Par_CodeStr[Tml_DB_FieldFav[FavSha]],Cod,UsrCod);
+ Tml_DB_FieldFav[FavSha],Cod,UsrCod);
}
/*****************************************************************************/
@@ -1153,8 +1149,6 @@ bool Tml_DB_CheckIfFavedByUsr (TmlUsr_FavSha_t FavSha,long Cod,long UsrCod)
unsigned Tml_DB_GetNumFavers (TmlUsr_FavSha_t FavSha,long Cod,long UsrCod)
{
- extern const char *Par_CodeStr[]; // Database field name must be equal to code parameter name
-
return (unsigned)
DB_QueryCOUNT ("can not get number of times has been favourited",
"SELECT COUNT(*)"
@@ -1162,7 +1156,7 @@ unsigned Tml_DB_GetNumFavers (TmlUsr_FavSha_t FavSha,long Cod,long UsrCod)
" WHERE %s=%ld"
" AND UsrCod<>%ld", // Extra check
Tml_DB_TableFav[FavSha],
- Par_CodeStr[Tml_DB_FieldFav[FavSha]],Cod,
+ Tml_DB_FieldFav[FavSha],Cod,
UsrCod); // The author
}
@@ -1174,8 +1168,6 @@ unsigned Tml_DB_GetFavers (TmlUsr_FavSha_t FavSha,
long Cod,long UsrCod,unsigned MaxUsrs,
MYSQL_RES **mysql_res)
{
- extern const char *Par_CodeStr[]; // Database field name must be equal to code parameter name
-
return (unsigned)
DB_QuerySELECT (mysql_res,"can not get favers",
"SELECT UsrCod" // row[0]
@@ -1185,7 +1177,7 @@ unsigned Tml_DB_GetFavers (TmlUsr_FavSha_t FavSha,
" ORDER BY FavCod"
" LIMIT %u",
Tml_DB_TableFav[FavSha],
- Par_CodeStr[Tml_DB_FieldFav[FavSha]],Cod,
+ Tml_DB_FieldFav[FavSha],Cod,
UsrCod,
MaxUsrs);
}
@@ -1196,15 +1188,13 @@ unsigned Tml_DB_GetFavers (TmlUsr_FavSha_t FavSha,
void Tml_DB_MarkAsFav (TmlUsr_FavSha_t FavSha,long Cod)
{
- extern const char *Par_CodeStr[]; // Database field name must be equal to code parameter name
-
DB_QueryINSERT ("can not favourite comment",
"INSERT IGNORE INTO %s"
" (%s,UsrCod,TimeFav)"
" VALUES"
" (%ld,%ld,NOW())",
Tml_DB_TableFav[FavSha],
- Par_CodeStr[Tml_DB_FieldFav[FavSha]],
+ Tml_DB_FieldFav[FavSha],
Cod,Gbl.Usrs.Me.UsrDat.UsrCod);
}
@@ -1214,14 +1204,12 @@ void Tml_DB_MarkAsFav (TmlUsr_FavSha_t FavSha,long Cod)
void Tml_DB_UnmarkAsFav (TmlUsr_FavSha_t FavSha,long Cod)
{
- extern const char *Par_CodeStr[]; // Database field name must be equal to code parameter name
-
DB_QueryDELETE ("can not unfavourite",
"DELETE FROM %s"
" WHERE %s=%ld"
" AND UsrCod=%ld",
Tml_DB_TableFav[FavSha],
- Par_CodeStr[Tml_DB_FieldFav[FavSha]],Cod,
+ Tml_DB_FieldFav[FavSha],Cod,
Gbl.Usrs.Me.UsrDat.UsrCod);
}
@@ -1244,8 +1232,6 @@ void Tml_DB_RemoveAllFavsMadeByUsr (TmlUsr_FavSha_t FavSha,long UsrCod)
void Tml_DB_RemoveAllFavsToPubsBy (TmlUsr_FavSha_t FavSha,long UsrCod)
{
- extern const char *Par_CodeStr[]; // Database field name must be equal to code parameter name
-
DB_QueryDELETE ("can not remove favs",
"DELETE FROM %s"
" USING tml_pubs,"
@@ -1257,9 +1243,9 @@ void Tml_DB_RemoveAllFavsToPubsBy (TmlUsr_FavSha_t FavSha,long UsrCod)
Tml_DB_TableFav[FavSha],
UsrCod,
(unsigned) Tml_DB_PubTypeFav[FavSha],
- Par_CodeStr[Tml_DB_FieldFav[FavSha]],
+ Tml_DB_FieldFav[FavSha],
Tml_DB_TableFav[FavSha],
- Par_CodeStr[Tml_DB_FieldFav[FavSha]]);
+ Tml_DB_FieldFav[FavSha]);
}
/*****************************************************************************/
diff --git a/swad_timeline_database.h b/swad_timeline_database.h
index 6543b0d8..3008bb57 100644
--- a/swad_timeline_database.h
+++ b/swad_timeline_database.h
@@ -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
diff --git a/swad_timeline_favourite.c b/swad_timeline_favourite.c
index 4e2f1306..30ba368f 100644
--- a/swad_timeline_favourite.c
+++ b/swad_timeline_favourite.c
@@ -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
@@ -28,7 +28,7 @@
#include "swad_database.h"
#include "swad_global.h"
#include "swad_notification_database.h"
-#include "swad_parameter.h"
+#include "swad_parameter_code.h"
#include "swad_timeline.h"
#include "swad_timeline_database.h"
#include "swad_timeline_favourite.h"
@@ -69,7 +69,7 @@ void TmlFav_ShowAllFaversNoteGbl (void)
struct TmlNot_Note Not;
/***** Get data of note *****/
- Not.NotCod = Par_GetAndCheckParCode (Par_NotCod);
+ Not.NotCod = ParCod_GetAndCheckPar (ParCod_Not);
TmlNot_GetDataOfNoteByCod (&Not);
/***** Write HTML inside DIV with form to fav/unfav *****/
@@ -131,7 +131,7 @@ static void TmlFav_FavNote (struct TmlNot_Note *Not)
long OriginalPubCod;
/***** Get data of note *****/
- Not->NotCod = Par_GetAndCheckParCode (Par_NotCod);
+ Not->NotCod = ParCod_GetAndCheckPar (ParCod_Not);
TmlNot_GetDataOfNoteByCod (Not);
/***** Do some checks *****/
@@ -161,7 +161,7 @@ static void TmlFav_UnfNote (struct TmlNot_Note *Not)
long OriginalPubCod;
/***** Get data of note *****/
- Not->NotCod = Par_GetAndCheckParCode (Par_NotCod);
+ Not->NotCod = ParCod_GetAndCheckPar (ParCod_Not);
TmlNot_GetDataOfNoteByCod (Not);
/***** Do some checks *****/
@@ -204,7 +204,7 @@ void TmlFav_ShowAllFaversComGbl (void)
/***** Get data of comment *****/
Med_MediaConstructor (&Com.Content.Media);
- Com.PubCod = Par_GetAndCheckParCode (Par_PubCod);
+ Com.PubCod = ParCod_GetAndCheckPar (ParCod_Pub);
TmlCom_GetDataOfCommByCod (&Com);
Med_MediaDestructor (&Com.Content.Media);
@@ -268,7 +268,7 @@ static void TmlFav_FavComm (struct TmlCom_Comment *Com)
Med_MediaConstructor (&Com->Content.Media);
/***** Get data of comment *****/
- Com->PubCod = Par_GetAndCheckParCode (Par_PubCod);
+ Com->PubCod = ParCod_GetAndCheckPar (ParCod_Pub);
TmlCom_GetDataOfCommByCod (Com);
/***** Do some checks *****/
@@ -307,7 +307,7 @@ static void TmlFav_UnfComm (struct TmlCom_Comment *Com)
Med_MediaConstructor (&Com->Content.Media);
/***** Get data of comment *****/
- Com->PubCod = Par_GetAndCheckParCode (Par_PubCod);
+ Com->PubCod = ParCod_GetAndCheckPar (ParCod_Pub);
TmlCom_GetDataOfCommByCod (Com);
/***** Do some checks *****/
diff --git a/swad_timeline_favourite.h b/swad_timeline_favourite.h
index c2546ab6..a0096bfc 100644
--- a/swad_timeline_favourite.h
+++ b/swad_timeline_favourite.h
@@ -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
diff --git a/swad_timeline_form.c b/swad_timeline_form.c
index aee6dbdd..c3fced28 100644
--- a/swad_timeline_form.c
+++ b/swad_timeline_form.c
@@ -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
diff --git a/swad_timeline_form.h b/swad_timeline_form.h
index a5e71599..9ae9b444 100644
--- a/swad_timeline_form.h
+++ b/swad_timeline_form.h
@@ -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
diff --git a/swad_timeline_note.c b/swad_timeline_note.c
index 93ec1aac..3ca529e9 100644
--- a/swad_timeline_note.c
+++ b/swad_timeline_note.c
@@ -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
@@ -42,7 +42,7 @@
#include "swad_hierarchy.h"
#include "swad_notice.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_timeline.h"
@@ -625,39 +625,39 @@ 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_PutParCode (Par_FilCod,Not->Cod);
+ ParCod_PutPar (ParCod_Fil,Not->Cod);
if (Not->HieCod != Gbl.Hierarchy.Ins.InsCod) // Not the current institution
- Par_PutParCode (Par_InsCod,Not->HieCod); // Go to another institution
+ ParCod_PutPar (ParCod_Ins,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_PutParCode (Par_FilCod,Not->Cod);
+ ParCod_PutPar (ParCod_Fil,Not->Cod);
if (Not->HieCod != Gbl.Hierarchy.Ctr.CtrCod) // Not the current center
- Par_PutParCode (Par_CtrCod,Not->HieCod); // Go to another center
+ ParCod_PutPar (ParCod_Ctr,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_PutParCode (Par_FilCod,Not->Cod);
+ ParCod_PutPar (ParCod_Fil,Not->Cod);
if (Not->HieCod != Gbl.Hierarchy.Deg.DegCod) // Not the current degree
- Par_PutParCode (Par_DegCod,Not->HieCod); // Go to another degree
+ ParCod_PutPar (ParCod_Deg,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_PutParCode (Par_FilCod,Not->Cod);
+ ParCod_PutPar (ParCod_Fil,Not->Cod);
if (Not->HieCod != Gbl.Hierarchy.Crs.CrsCod) // Not the current course
- Par_PutParCode (Par_CrsCod,Not->HieCod); // Go to another course
+ ParCod_PutPar (ParCod_Crs,Not->HieCod); // Go to another course
break;
case TmlNot_CALL_FOR_EXAM:
Frm_SetAnchorStr (Not->Cod,&Anchor);
Frm_BeginFormAnchor (Tml_DefaultActions[Not->Type],
Anchor); // Locate on this specific exam
Frm_FreeAnchorStr (Anchor);
- Par_PutParCode (Par_ExaCod,Not->Cod);
+ ParCod_PutPar (ParCod_Exa,Not->Cod);
if (Not->HieCod != Gbl.Hierarchy.Crs.CrsCod) // Not the current course
- Par_PutParCode (Par_CrsCod,Not->HieCod); // Go to another course
+ ParCod_PutPar (ParCod_Crs,Not->HieCod); // Go to another course
break;
case TmlNot_POST: // Not applicable
return;
@@ -671,15 +671,15 @@ static void TmlNot_PutFormGoToAction (const struct TmlNot_Note *Not,
Forums->Thread.Selected,
-1L);
if (Not->HieCod != Gbl.Hierarchy.Crs.CrsCod) // Not the current course
- Par_PutParCode (Par_CrsCod,Not->HieCod); // Go to another course
+ ParCod_PutPar (ParCod_Crs,Not->HieCod); // Go to another course
break;
case TmlNot_NOTICE:
Frm_SetAnchorStr (Not->Cod,&Anchor);
Frm_BeginFormAnchor (Tml_DefaultActions[Not->Type],Anchor);
Frm_FreeAnchorStr (Anchor);
- Par_PutParCode (Par_NotCod,Not->Cod);
+ ParCod_PutPar (ParCod_Not,Not->Cod);
if (Not->HieCod != Gbl.Hierarchy.Crs.CrsCod) // Not the current course
- Par_PutParCode (Par_CrsCod,Not->HieCod); // Go to another course
+ ParCod_PutPar (ParCod_Crs,Not->HieCod); // Go to another course
break;
default: // Not applicable
return;
@@ -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_PutParCode (Par_NotCod,NotCod);
+ ParCod_PutPar (ParCod_Not,NotCod);
/* Icon to remove */
Ico_PutIconLink ("trash.svg",Ico_RED,
@@ -1009,7 +1009,7 @@ static void TmlNot_RequestRemovalNote (struct Tml_Timeline *Timeline)
struct TmlNot_Note Not;
/***** Get data of note *****/
- Not.NotCod = Par_GetAndCheckParCode (Par_NotCod);
+ Not.NotCod = ParCod_GetAndCheckPar (ParCod_Not);
TmlNot_GetDataOfNoteByCod (&Not);
/***** Do some checks *****/
@@ -1049,7 +1049,7 @@ static void TmlNot_PutParsRemoveNote (void *Timeline)
Usr_PutParOtherUsrCodEncrypted (Gbl.Usrs.Other.UsrDat.EnUsrCod);
else // Global timeline
Usr_PutParWho (((struct Tml_Timeline *) Timeline)->Who);
- Par_PutParCode (Par_NotCod,((struct Tml_Timeline *) Timeline)->NotCod);
+ ParCod_PutPar (ParCod_Not,((struct Tml_Timeline *) Timeline)->NotCod);
}
}
@@ -1104,7 +1104,7 @@ static void TmlNot_RemoveNote (void)
struct TmlNot_Note Not;
/***** Get data of note *****/
- Not.NotCod = Par_GetAndCheckParCode (Par_NotCod);
+ Not.NotCod = ParCod_GetAndCheckPar (ParCod_Not);
TmlNot_GetDataOfNoteByCod (&Not);
/***** Trivial check 1: note code should be > 0 *****/
diff --git a/swad_timeline_note.h b/swad_timeline_note.h
index 94ca4dd9..703799fe 100644
--- a/swad_timeline_note.h
+++ b/swad_timeline_note.h
@@ -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
diff --git a/swad_timeline_notification.c b/swad_timeline_notification.c
index 423a3c85..50799a0c 100644
--- a/swad_timeline_notification.c
+++ b/swad_timeline_notification.c
@@ -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
diff --git a/swad_timeline_notification.h b/swad_timeline_notification.h
index d310b765..79f2af5e 100644
--- a/swad_timeline_notification.h
+++ b/swad_timeline_notification.h
@@ -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
diff --git a/swad_timeline_post.c b/swad_timeline_post.c
index f371ee33..0f6988e2 100644
--- a/swad_timeline_post.c
+++ b/swad_timeline_post.c
@@ -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
diff --git a/swad_timeline_post.h b/swad_timeline_post.h
index 84ee76d2..bc339b3b 100644
--- a/swad_timeline_post.h
+++ b/swad_timeline_post.h
@@ -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
diff --git a/swad_timeline_publication.c b/swad_timeline_publication.c
index ff4810f8..a2daa02d 100644
--- a/swad_timeline_publication.c
+++ b/swad_timeline_publication.c
@@ -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
diff --git a/swad_timeline_publication.h b/swad_timeline_publication.h
index 93f8da2e..47672682 100644
--- a/swad_timeline_publication.h
+++ b/swad_timeline_publication.h
@@ -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
diff --git a/swad_timeline_share.c b/swad_timeline_share.c
index 6efac561..f611011a 100644
--- a/swad_timeline_share.c
+++ b/swad_timeline_share.c
@@ -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
@@ -28,7 +28,7 @@
#include "swad_database.h"
#include "swad_global.h"
#include "swad_notification_database.h"
-#include "swad_parameter.h"
+#include "swad_parameter_code.h"
#include "swad_timeline.h"
#include "swad_timeline_database.h"
#include "swad_timeline_notification.h"
@@ -66,7 +66,7 @@ void TmlSha_ShowAllSharersNoteGbl (void)
struct TmlNot_Note Not;
/***** Get data of note *****/
- Not.NotCod = Par_GetAndCheckParCode (Par_NotCod);
+ Not.NotCod = ParCod_GetAndCheckPar (ParCod_Not);
TmlNot_GetDataOfNoteByCod (&Not);
/***** Write HTML inside DIV with form to share/unshare *****/
@@ -107,7 +107,7 @@ static void TmlSha_ShaNote (struct TmlNot_Note *Not)
long OriginalPubCod;
/***** Get data of note *****/
- Not->NotCod = Par_GetAndCheckParCode (Par_NotCod);
+ Not->NotCod = ParCod_GetAndCheckPar (ParCod_Not);
TmlNot_GetDataOfNoteByCod (Not);
/***** Do some checks *****/
@@ -165,7 +165,7 @@ static void TmlSha_UnsNote (struct TmlNot_Note *Not)
long OriginalPubCod;
/***** Get data of note *****/
- Not->NotCod = Par_GetAndCheckParCode (Par_NotCod);
+ Not->NotCod = ParCod_GetAndCheckPar (ParCod_Not);
TmlNot_GetDataOfNoteByCod (Not);
/***** Do some checks *****/
diff --git a/swad_timeline_share.h b/swad_timeline_share.h
index 14a9dd5e..fdbf57b1 100644
--- a/swad_timeline_share.h
+++ b/swad_timeline_share.h
@@ -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
diff --git a/swad_timeline_user.c b/swad_timeline_user.c
index 2ed02fd6..4ee0d380 100644
--- a/swad_timeline_user.c
+++ b/swad_timeline_user.c
@@ -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
diff --git a/swad_timeline_user.h b/swad_timeline_user.h
index 8aed6c46..5f6a9d72 100644
--- a/swad_timeline_user.h
+++ b/swad_timeline_user.h
@@ -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
diff --git a/swad_timeline_who.c b/swad_timeline_who.c
index e0597d1f..c166c095 100644
--- a/swad_timeline_who.c
+++ b/swad_timeline_who.c
@@ -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
diff --git a/swad_timeline_who.h b/swad_timeline_who.h
index f0c1f41e..4eee3d4f 100644
--- a/swad_timeline_who.h
+++ b/swad_timeline_who.h
@@ -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
diff --git a/swad_timetable.c b/swad_timetable.c
index f2af863f..710c226b 100644
--- a/swad_timetable.c
+++ b/swad_timetable.c
@@ -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
@@ -42,6 +42,7 @@
#include "swad_HTML.h"
#include "swad_language.h"
#include "swad_parameter.h"
+#include "swad_parameter_code.h"
#include "swad_setting.h"
#include "swad_timetable.h"
#include "swad_timetable_database.h"
@@ -294,7 +295,7 @@ static void Tmt_GetParsTimeTable (struct Tmt_Timetable *Timetable)
Minutes / Timetable->Config.Range.MinutesPerInterval;
/***** Get group code *****/
- Timetable->GrpCod = Par_GetParCode (Par_GrpCod);
+ Timetable->GrpCod = ParCod_GetPar (ParCod_Grp);
/***** Get info *****/
Par_GetParText ("TTInf",Timetable->Info,Tmt_MAX_BYTES_INFO);
@@ -1594,7 +1595,7 @@ static void Tmt_TimeTableDrawCellEdit (const struct Tmt_Timetable *Timetable,
HTM_SELECT_Begin (HTM_SUBMIT_ON_CHANGE,
"id=\"TTGrp%s\" name=\"%s\""
" class=\"Tmt_GRP INPUT_%s\"",
- CellStr,Par_CodeStr[Par_GrpCod],
+ CellStr,Par_CodeStr[ParCod_Grp],
The_GetSuffix ());
HTM_OPTION (HTM_Type_STRING,"-1",GrpCod <= 0,false,
"%s",Txt_All_groups);
diff --git a/swad_timetable.h b/swad_timetable.h
index 3c7aba57..d8ed3fe1 100644
--- a/swad_timetable.h
+++ b/swad_timetable.h
@@ -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
diff --git a/swad_timetable_database.c b/swad_timetable_database.c
index f8120007..df1c1d5a 100644
--- a/swad_timetable_database.c
+++ b/swad_timetable_database.c
@@ -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
diff --git a/swad_timetable_database.h b/swad_timetable_database.h
index 64a3e927..3b96daf9 100644
--- a/swad_timetable_database.h
+++ b/swad_timetable_database.h
@@ -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
diff --git a/swad_user.c b/swad_user.c
index 1d5edff7..4045ef9b 100644
--- a/swad_user.c
+++ b/swad_user.c
@@ -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
diff --git a/swad_user.h b/swad_user.h
index 45585df1..72bf1dee 100644
--- a/swad_user.h
+++ b/swad_user.h
@@ -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
diff --git a/swad_user_database.c b/swad_user_database.c
index 6dea8538..06c3f175 100644
--- a/swad_user_database.c
+++ b/swad_user_database.c
@@ -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
diff --git a/swad_user_database.h b/swad_user_database.h
index 5dc14ade..b7fb516a 100644
--- a/swad_user_database.h
+++ b/swad_user_database.h
@@ -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
diff --git a/swad_xml.c b/swad_xml.c
index 86ef1539..a1a0ca5a 100644
--- a/swad_xml.c
+++ b/swad_xml.c
@@ -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
diff --git a/swad_xml.h b/swad_xml.h
index 37cd7a81..e20dee32 100644
--- a/swad_xml.h
+++ b/swad_xml.h
@@ -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
diff --git a/swad_zip.c b/swad_zip.c
index 9f27bab4..b81b975f 100644
--- a/swad_zip.c
+++ b/swad_zip.c
@@ -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
diff --git a/swad_zip.h b/swad_zip.h
index b9d33f23..ebe33ff3 100644
--- a/swad_zip.h
+++ b/swad_zip.h
@@ -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