Version 22.101.1: Apr 20, 2023 Changes in edition of holidays.

This commit is contained in:
acanas 2023-04-20 09:07:18 +02:00
parent 66557536f3
commit 4ad861a650
3 changed files with 132 additions and 124 deletions

View File

@ -629,10 +629,11 @@ TODO: Emilce Barrera Mesa: Podr
TODO: Emilce Barrera Mesa: Mis estudiantes presentan muchas dificultades a la hora de poner la foto porque la plataforma es muy exigente respecto al fondo de la imagen.
*/
#define Log_PLATFORM_VERSION "SWAD 22.101 (2023-04-20)"
#define Log_PLATFORM_VERSION "SWAD 22.101.1 (2023-04-20)"
#define CSS_FILE "swad22.95.css"
#define JS_FILE "swad22.49.js"
/*
Version 22.101.1: Apr 20, 2023 Changes in edition of holidays. (337338 lines)
Version 22.101: Apr 20, 2023 Removed buttons to create new elements: a new place, new holiday, new link, new banner, new plugin, new building, new room, new program item, new assignment, new project, new call for exam, new question, new exam, new set of questions, new exam session, new game, new match, new rubric, new criterion, new group, new type of group, new attendance event, new record field, new announcement, new notice, new message, new forum thread, new forum post, new survey, new survey question, new agenda event, new email domain. (337332 lines)
Version 22.100.4: Apr 19, 2023 Removed buttons to create a new institution, new center, new degree and new course. (338756 lines)
Version 22.100.3: Apr 19, 2023 Institution admins can edit places. (338891 lines)

View File

@ -295,12 +295,8 @@ static void Hld_EditHolidaysInternal (void)
/***** Get list of holidays *****/
Hld_GetListHolidays (&Holidays);
/***** Put a form to create a new holiday *****/
Hld_PutFormToCreateHoliday (&Places);
/***** Forms to edit current holidays *****/
if (Holidays.Num)
Hld_ListHolidaysForEdition (&Holidays,&Places);
Hld_ListHolidaysForEdition (&Holidays,&Places);
/***** Free list of holidays *****/
Hld_FreeListHolidays (&Holidays);
@ -490,122 +486,134 @@ static void Hld_ListHolidaysForEdition (const struct Hld_Holidays *Holidays,
unsigned HolidayTypeUnsigned;
unsigned CurrentYear = Dat_GetCurrentYear ();
/***** Begin box and table *****/
Box_BoxTableBegin (NULL,Txt_Holidays,
/***** Begin box *****/
Box_BoxBegin (NULL,Txt_Holidays,
Cal_PutIconToSeeCalendar,NULL,
Hlp_INSTITUTION_Holidays_edit,Box_NOT_CLOSABLE,2);
Hlp_INSTITUTION_Holidays_edit,Box_NOT_CLOSABLE);
/***** Write heading *****/
Hld_PutHeadHolidays ();
/***** Put a form to create a new holiday *****/
Hld_PutFormToCreateHoliday (Places);
/***** Write all holidays *****/
for (NumHld = 0;
NumHld < Holidays->Num;
NumHld++)
if (Places->Num)
{
HldInLst = &Holidays->Lst[NumHld];
/***** Begin table *****/
HTM_TABLE_BeginWidePadding (2);
HTM_TR_Begin (NULL);
/***** Write heading *****/
Hld_PutHeadHolidays ();
/* Put icon to remove holiday */
HTM_TD_Begin ("class=\"BM\"");
Ico_PutContextualIconToRemove (ActRemHld,NULL,
Hld_PutParHldCod,&HldInLst->HldCod);
HTM_TD_End ();
/***** Write all holidays *****/
for (NumHld = 0;
NumHld < Holidays->Num;
NumHld++)
{
HldInLst = &Holidays->Lst[NumHld];
/* Holiday code */
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
HTM_TxtF ("%ld&nbsp;",HldInLst->HldCod);
HTM_TD_End ();
HTM_TR_Begin (NULL);
/* Holiday place */
HTM_TD_Begin ("class=\"CM\"");
Frm_BeginForm (ActChgHldPlc);
ParCod_PutPar (ParCod_Hld,HldInLst->HldCod);
HTM_SELECT_Begin (HTM_SUBMIT_ON_CHANGE,NULL,
"name=\"PlcCod\" class=\"PLC_SEL INPUT_%s\"",
The_GetSuffix ());
HTM_OPTION (HTM_Type_STRING,"-1",
HldInLst->PlcCod <= 0, // Selected?
HTM_OPTION_ENABLED,
"%s",Txt_All_places);
for (NumPlc = 0;
NumPlc < Places->Num;
NumPlc++)
{
PlcInLst = &Places->Lst[NumPlc];
HTM_OPTION (HTM_Type_LONG,&PlcInLst->PlcCod,
PlcInLst->PlcCod == HldInLst->PlcCod, // Selected?
HTM_OPTION_ENABLED,
"%s",PlcInLst->ShrtName);
}
HTM_SELECT_End ();
Frm_EndForm ();
HTM_TD_End ();
/* Put icon to remove holiday */
HTM_TD_Begin ("class=\"BM\"");
Ico_PutContextualIconToRemove (ActRemHld,NULL,
Hld_PutParHldCod,&HldInLst->HldCod);
HTM_TD_End ();
/* Holiday type */
HTM_TD_Begin ("class=\"CM\"");
Frm_BeginForm (ActChgHldTyp);
ParCod_PutPar (ParCod_Hld,HldInLst->HldCod);
HTM_SELECT_Begin (HTM_SUBMIT_ON_CHANGE,NULL,
"name=\"HldTyp\" class=\"INPUT_%s\""
" style=\"width:62px;\"", // TODO: Use a CSS class
The_GetSuffix ());
for (HolidayType = (Hld_HolidayType_t) 0;
HolidayType <= (Hld_HolidayType_t) (Hld_NUM_TYPES_HOLIDAY - 1);
HolidayType++)
{
HolidayTypeUnsigned = (unsigned) HolidayType;
HTM_OPTION (HTM_Type_UNSIGNED,&HolidayTypeUnsigned,
HolidayType == HldInLst->HldTyp, // Selected?
HTM_OPTION_ENABLED,
"%s",Txt_HOLIDAY_TYPES[HolidayType]);
}
HTM_SELECT_End ();
Frm_EndForm ();
HTM_TD_End ();
/* Holiday code */
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
HTM_TxtF ("%ld&nbsp;",HldInLst->HldCod);
HTM_TD_End ();
/* Holiday date / Non school period start date */
HTM_TD_Begin ("class=\"CM\"");
Frm_BeginForm (ActChgHldStrDat);
ParCod_PutPar (ParCod_Hld,HldInLst->HldCod);
Dat_WriteFormDate (CurrentYear - 1,
CurrentYear + 1,
"Start",
&(Holidays->Lst[NumHld].StartDate),
HTM_SUBMIT_ON_CHANGE,
false);
Frm_EndForm ();
HTM_TD_End ();
/* Holiday place */
HTM_TD_Begin ("class=\"CM\"");
Frm_BeginForm (ActChgHldPlc);
ParCod_PutPar (ParCod_Hld,HldInLst->HldCod);
HTM_SELECT_Begin (HTM_SUBMIT_ON_CHANGE,NULL,
"name=\"PlcCod\" class=\"PLC_SEL INPUT_%s\"",
The_GetSuffix ());
HTM_OPTION (HTM_Type_STRING,"-1",
HldInLst->PlcCod <= 0, // Selected?
HTM_OPTION_ENABLED,
"%s",Txt_All_places);
for (NumPlc = 0;
NumPlc < Places->Num;
NumPlc++)
{
PlcInLst = &Places->Lst[NumPlc];
HTM_OPTION (HTM_Type_LONG,&PlcInLst->PlcCod,
PlcInLst->PlcCod == HldInLst->PlcCod, // Selected?
HTM_OPTION_ENABLED,
"%s",PlcInLst->ShrtName);
}
HTM_SELECT_End ();
Frm_EndForm ();
HTM_TD_End ();
/* Non school period end date */
HTM_TD_Begin ("class=\"CM\"");
Frm_BeginForm (ActChgHldEndDat);
ParCod_PutPar (ParCod_Hld,HldInLst->HldCod);
Dat_WriteFormDate (CurrentYear - 1,
CurrentYear + 1,
"End",
&(Holidays->Lst[NumHld].EndDate),
HTM_SUBMIT_ON_CHANGE,
(HldInLst->HldTyp == Hld_HOLIDAY));
Frm_EndForm ();
HTM_TD_End ();
/* Holiday type */
HTM_TD_Begin ("class=\"CM\"");
Frm_BeginForm (ActChgHldTyp);
ParCod_PutPar (ParCod_Hld,HldInLst->HldCod);
HTM_SELECT_Begin (HTM_SUBMIT_ON_CHANGE,NULL,
"name=\"HldTyp\" class=\"INPUT_%s\""
" style=\"width:62px;\"", // TODO: Use a CSS class
The_GetSuffix ());
for (HolidayType = (Hld_HolidayType_t) 0;
HolidayType <= (Hld_HolidayType_t) (Hld_NUM_TYPES_HOLIDAY - 1);
HolidayType++)
{
HolidayTypeUnsigned = (unsigned) HolidayType;
HTM_OPTION (HTM_Type_UNSIGNED,&HolidayTypeUnsigned,
HolidayType == HldInLst->HldTyp, // Selected?
HTM_OPTION_ENABLED,
"%s",Txt_HOLIDAY_TYPES[HolidayType]);
}
HTM_SELECT_End ();
Frm_EndForm ();
HTM_TD_End ();
/* Holiday name */
HTM_TD_Begin ("class=\"CM\"");
Frm_BeginForm (ActRenHld);
ParCod_PutPar (ParCod_Hld,HldInLst->HldCod);
HTM_INPUT_TEXT ("Name",Hld_MAX_CHARS_HOLIDAY_NAME,HldInLst->Name,
HTM_SUBMIT_ON_CHANGE,
"size=\"20\" class=\"INPUT_%s\"",
The_GetSuffix ());
Frm_EndForm ();
HTM_TD_End ();
HTM_TR_End ();
/* Holiday date / Non school period start date */
HTM_TD_Begin ("class=\"CM\"");
Frm_BeginForm (ActChgHldStrDat);
ParCod_PutPar (ParCod_Hld,HldInLst->HldCod);
Dat_WriteFormDate (CurrentYear - 1,
CurrentYear + 1,
"Start",
&(Holidays->Lst[NumHld].StartDate),
HTM_SUBMIT_ON_CHANGE,
false);
Frm_EndForm ();
HTM_TD_End ();
/* Non school period end date */
HTM_TD_Begin ("class=\"CM\"");
Frm_BeginForm (ActChgHldEndDat);
ParCod_PutPar (ParCod_Hld,HldInLst->HldCod);
Dat_WriteFormDate (CurrentYear - 1,
CurrentYear + 1,
"End",
&(Holidays->Lst[NumHld].EndDate),
HTM_SUBMIT_ON_CHANGE,
(HldInLst->HldTyp == Hld_HOLIDAY));
Frm_EndForm ();
HTM_TD_End ();
/* Holiday name */
HTM_TD_Begin ("class=\"CM\"");
Frm_BeginForm (ActRenHld);
ParCod_PutPar (ParCod_Hld,HldInLst->HldCod);
HTM_INPUT_TEXT ("Name",Hld_MAX_CHARS_HOLIDAY_NAME,HldInLst->Name,
HTM_SUBMIT_ON_CHANGE,
"size=\"20\" class=\"INPUT_%s\"",
The_GetSuffix ());
Frm_EndForm ();
HTM_TD_End ();
HTM_TR_End ();
}
/***** End table *****/
HTM_TABLE_End ();
}
/***** End table and box *****/
Box_BoxTableEnd ();
/***** End box *****/
Box_BoxEnd ();
}
/*****************************************************************************/
@ -864,7 +872,6 @@ void Hld_ContEditAfterChgHld (void)
static void Hld_PutFormToCreateHoliday (const struct Plc_Places *Places)
{
extern const char *Hlp_INSTITUTION_Holidays_edit;
extern const char *Txt_All_places;
extern const char *Txt_Holiday;
extern const char *Txt_Place;
@ -885,7 +892,7 @@ static void Hld_PutFormToCreateHoliday (const struct Plc_Places *Places)
/***** Begin box and table *****/
Box_BoxTableBegin (NULL,Txt_Holiday,
NULL,NULL,
Hlp_INSTITUTION_Holidays_edit,Box_NOT_CLOSABLE,2);
NULL,Box_NOT_CLOSABLE,2);
/***** Write heading *****/
HTM_TR_Begin (NULL);

View File

@ -6951,7 +6951,7 @@ const char *Txt_Create_holiday =
#elif L==5 // fr
"Cr&eacute;er f&ecirc;te";
#elif L==6 // gn
"Crear festividad"; // Okoteve traducción
"Omohe&ntilde;&oacute;i arete";
#elif L==7 // it
"Crea festivit&agrave;";
#elif L==8 // pl
@ -6959,7 +6959,7 @@ const char *Txt_Create_holiday =
#elif L==9 // pt
"Criar f&eacute;ria";
#elif L==10 // tr
"Create holiday"; // Çeviri lazim!
"Tatil olu&scedil;tur";
#endif
const char *Txt_Create_institution =
@ -16886,7 +16886,7 @@ const char *Txt_Holiday =
#elif L==5 // fr
"F&ecirc;te";
#elif L==6 // gn
"Festividad";
"Arete";
#elif L==7 // it
"Festivit&agrave;";
#elif L==8 // pl
@ -16894,7 +16894,7 @@ const char *Txt_Holiday =
#elif L==9 // pt
"F&eacute;ria";
#elif L==10 // tr
"Holiday"; // Çeviri lazim!
"Tatil";
#endif
const char *Txt_Holiday_X_removed = // Warning: it is very important to include %s in the following sentences
@ -16942,7 +16942,7 @@ const char *Txt_HOLIDAY_TYPES[Hld_NUM_TYPES_HOLIDAY] =
#elif L==9 // pt
"Feriado"
#elif L==10 // tr
"Holiday" // Çeviri lazim!
"Tatil"
#endif
,
[Hld_NON_SCHOOL_PERIOD] =
@ -16971,15 +16971,15 @@ const char *Txt_HOLIDAY_TYPES[Hld_NUM_TYPES_HOLIDAY] =
const char *Txt_Holidays =
#if L==1 // ca
"Dies festius";
"Festivitats";
#elif L==2 // de
"Feiertage";
#elif L==3 // en
"Holidays";
#elif L==4 // es
"D&iacute;as festivos";
"Festividades";
#elif L==5 // fr
"Jours f&eacute;ri&eacute;s";
"Festivit&eacute;s";
#elif L==6 // gn
"Arete";
#elif L==7 // it
@ -16989,7 +16989,7 @@ const char *Txt_Holidays =
#elif L==9 // pt
"F&eacute;rias";
#elif L==10 // tr
"Bayram";
"Tatil";
#endif
const char *Txt_HOLIDAYS_HELP_ORDER[Hld_NUM_ORDERS] =
@ -25649,17 +25649,17 @@ const char *Txt_No_groups_have_been_created_in_the_course_X_Therefore_ = // Warn
const char *Txt_No_holidays =
#if L==1 // ca
"No hi ha dies festius.";
"No hi ha festivitats.";
#elif L==2 // de
"Keine Feiertage.";
#elif L==3 // en
"No holidays.";
#elif L==4 // es
"No hay d&iacute;as festivos.";
"No hay festividades.";
#elif L==5 // fr
"Pas de vacances.";
"Pas de festivit&eacute;s.";
#elif L==6 // gn
"No hay d&iacute;as festivos."; // Okoteve traducción
"Ndaip&oacute;ri arete.";
#elif L==7 // it
"Non ci sono festivit&agrave;.";
#elif L==8 // pl
@ -25667,7 +25667,7 @@ const char *Txt_No_holidays =
#elif L==9 // pt
"N&atilde;o h&aacute; feriados.";
#elif L==10 // tr
"No holidays."; // Çeviri lazim!
"Tatil yok.";
#endif
const char *Txt_No_image_video = // Without any image