mirror of https://github.com/acanas/swad-core.git
Version 22.112: May 18, 2023 Code refactoring in options of selectors.
This commit is contained in:
parent
1bd1985c02
commit
0796f50539
|
@ -1736,7 +1736,7 @@ void HTM_OPTGROUP_End (void)
|
|||
}
|
||||
|
||||
void HTM_OPTION (HTM_Type_t Type,const void *ValuePtr,
|
||||
bool Selected,HTM_OptionEnabled_t Disabled,
|
||||
HTM_OptionSelected_t Selected,HTM_OptionDisabled_t Disabled,
|
||||
const char *fmt,...)
|
||||
{
|
||||
va_list ap;
|
||||
|
@ -1757,7 +1757,7 @@ void HTM_OPTION (HTM_Type_t Type,const void *ValuePtr,
|
|||
break;
|
||||
}
|
||||
HTM_Txt ("\"");
|
||||
if (Selected)
|
||||
if (Selected == HTM_OPTION_SELECTED)
|
||||
HTM_Txt (" selected=\"selected\"");
|
||||
if (Disabled == HTM_OPTION_DISABLED)
|
||||
HTM_Txt (" disabled=\"disabled\"");
|
||||
|
|
12
swad_HTML.h
12
swad_HTML.h
|
@ -54,9 +54,15 @@ typedef enum
|
|||
|
||||
typedef enum
|
||||
{
|
||||
HTM_OPTION_DISABLED,
|
||||
HTM_OPTION_UNSELECTED,
|
||||
HTM_OPTION_SELECTED,
|
||||
} HTM_OptionSelected_t;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
HTM_OPTION_ENABLED,
|
||||
} HTM_OptionEnabled_t;
|
||||
HTM_OPTION_DISABLED,
|
||||
} HTM_OptionDisabled_t;
|
||||
|
||||
#define HTM_NUM_HEAD_ALIGN 3
|
||||
typedef enum
|
||||
|
@ -198,7 +204,7 @@ void HTM_SELECT_End (void);
|
|||
void HTM_OPTGROUP_Begin (const char *Label);
|
||||
void HTM_OPTGROUP_End (void);
|
||||
void HTM_OPTION (HTM_Type_t Type,const void *ValuePtr,
|
||||
bool Selected,HTM_OptionEnabled_t Disabled,
|
||||
HTM_OptionSelected_t Selected,HTM_OptionDisabled_t Disabled,
|
||||
const char *fmt,...);
|
||||
|
||||
void HTM_IMG (const char *URL,const char *Icon,const char *Title,
|
||||
|
|
|
@ -1030,11 +1030,13 @@ void Att_ReqCreatOrEditEvent (void)
|
|||
" class=\"INPUT_%s\"",
|
||||
The_GetSuffix ());
|
||||
HTM_OPTION (HTM_Type_STRING,"N",
|
||||
!Events.Event.CommentTchVisible, // Selected?
|
||||
Events.Event.CommentTchVisible ? HTM_OPTION_UNSELECTED :
|
||||
HTM_OPTION_SELECTED,
|
||||
HTM_OPTION_ENABLED,
|
||||
"%s",Txt_Hidden_MALE_PLURAL);
|
||||
HTM_OPTION (HTM_Type_STRING,"Y",
|
||||
Events.Event.CommentTchVisible, // Selected?
|
||||
Events.Event.CommentTchVisible ? HTM_OPTION_SELECTED :
|
||||
HTM_OPTION_UNSELECTED,
|
||||
HTM_OPTION_ENABLED,
|
||||
"%s",Txt_Visible_MALE_PLURAL);
|
||||
HTM_SELECT_End ();
|
||||
|
|
|
@ -7713,11 +7713,13 @@ void Brw_ShowFileMetadata (void)
|
|||
HTM_SELECT_Begin (HTM_DONT_SUBMIT_ON_CHANGE,NULL,
|
||||
"id=\"PublicFile\" name=\"PublicFile\" class=\"PUBLIC_FILE\"");
|
||||
HTM_OPTION (HTM_Type_STRING,"N",
|
||||
!FileMetadata.IsPublic, // Selected?
|
||||
FileMetadata.IsPublic ? HTM_OPTION_UNSELECTED :
|
||||
HTM_OPTION_SELECTED,
|
||||
HTM_OPTION_ENABLED,
|
||||
"%s",Txt_Private_available_to_certain_users_identified);
|
||||
HTM_OPTION (HTM_Type_STRING,"Y",
|
||||
FileMetadata.IsPublic, // Selected?
|
||||
FileMetadata.IsPublic ? HTM_OPTION_SELECTED :
|
||||
HTM_OPTION_UNSELECTED,
|
||||
HTM_OPTION_ENABLED,
|
||||
"%s",Txt_Public_open_educational_resource_OER_for_everyone);
|
||||
HTM_SELECT_End ();
|
||||
|
@ -7750,7 +7752,8 @@ void Brw_ShowFileMetadata (void)
|
|||
{
|
||||
LicenseUnsigned = (unsigned) License;
|
||||
HTM_OPTION (HTM_Type_UNSIGNED,&LicenseUnsigned,
|
||||
License == FileMetadata.License, // Selected?
|
||||
License == FileMetadata.License ? HTM_OPTION_SELECTED :
|
||||
HTM_OPTION_UNSELECTED,
|
||||
HTM_OPTION_ENABLED,
|
||||
"%s",Txt_LICENSES[License]);
|
||||
}
|
||||
|
@ -9746,7 +9749,8 @@ void Brw_AskRemoveOldFilesBriefcase (void)
|
|||
Months <= Brw_MAX_MONTHS_IN_BRIEFCASE;
|
||||
Months++)
|
||||
HTM_OPTION (HTM_Type_UNSIGNED,&Months,
|
||||
Months == Brw_DEF_MONTHS_TO_REMOVE_OLD_FILES, // Selected?
|
||||
Months == Brw_DEF_MONTHS_TO_REMOVE_OLD_FILES ? HTM_OPTION_SELECTED :
|
||||
HTM_OPTION_UNSELECTED,
|
||||
HTM_OPTION_ENABLED,
|
||||
"%u",Months);
|
||||
HTM_SELECT_End ();
|
||||
|
|
|
@ -1036,7 +1036,8 @@ static void Cfe_ShowCallForExam (struct Cfe_CallsForExams *CallsForExams,
|
|||
Year <= Deg_MAX_YEARS_PER_DEGREE;
|
||||
Year++)
|
||||
HTM_OPTION (HTM_Type_UNSIGNED,&Year,
|
||||
Year == CallsForExams->CallForExam.Year, // Selected
|
||||
Year == CallsForExams->CallForExam.Year ? HTM_OPTION_SELECTED :
|
||||
HTM_OPTION_UNSELECTED,
|
||||
HTM_OPTION_ENABLED,
|
||||
"%s",Txt_YEAR_OF_DEGREE[Year]);
|
||||
HTM_SELECT_End ();
|
||||
|
@ -1121,14 +1122,16 @@ static void Cfe_ShowCallForExam (struct Cfe_CallsForExams *CallsForExams,
|
|||
" class=\"INPUT_%s\"",
|
||||
The_GetSuffix ());
|
||||
HTM_OPTION (HTM_Type_STRING,"0",
|
||||
CallsForExams->CallForExam.StartTime.Hour == 0, // Selected?
|
||||
CallsForExams->CallForExam.StartTime.Hour == 0 ? HTM_OPTION_SELECTED :
|
||||
HTM_OPTION_UNSELECTED,
|
||||
HTM_OPTION_ENABLED,
|
||||
"-");
|
||||
for (Hour = 7;
|
||||
Hour <= 22;
|
||||
Hour++)
|
||||
HTM_OPTION (HTM_Type_UNSIGNED,&Hour,
|
||||
Hour == CallsForExams->CallForExam.StartTime.Hour, // Selected?
|
||||
Hour == CallsForExams->CallForExam.StartTime.Hour ? HTM_OPTION_SELECTED :
|
||||
HTM_OPTION_UNSELECTED,
|
||||
HTM_OPTION_ENABLED,
|
||||
"%02u %s",Hour,Txt_hours_ABBREVIATION);
|
||||
HTM_SELECT_End ();
|
||||
|
@ -1140,7 +1143,8 @@ static void Cfe_ShowCallForExam (struct Cfe_CallsForExams *CallsForExams,
|
|||
Minute <= 59;
|
||||
Minute++)
|
||||
HTM_OPTION (HTM_Type_UNSIGNED,&Minute,
|
||||
Minute == CallsForExams->CallForExam.StartTime.Minute, // Selected?
|
||||
Minute == CallsForExams->CallForExam.StartTime.Minute ? HTM_OPTION_SELECTED :
|
||||
HTM_OPTION_UNSELECTED,
|
||||
HTM_OPTION_ENABLED,
|
||||
"%02u ′",Minute);
|
||||
HTM_SELECT_End ();
|
||||
|
@ -1174,7 +1178,8 @@ static void Cfe_ShowCallForExam (struct Cfe_CallsForExams *CallsForExams,
|
|||
Hour <= 8;
|
||||
Hour++)
|
||||
HTM_OPTION (HTM_Type_UNSIGNED,&Hour,
|
||||
Hour == CallsForExams->CallForExam.Duration.Hour, // Selected?
|
||||
Hour == CallsForExams->CallForExam.Duration.Hour ? HTM_OPTION_SELECTED :
|
||||
HTM_OPTION_UNSELECTED,
|
||||
HTM_OPTION_ENABLED,
|
||||
"%02u %s",Hour,Txt_hours_ABBREVIATION);
|
||||
HTM_SELECT_End ();
|
||||
|
@ -1187,7 +1192,8 @@ static void Cfe_ShowCallForExam (struct Cfe_CallsForExams *CallsForExams,
|
|||
Minute <= 59;
|
||||
Minute++)
|
||||
HTM_OPTION (HTM_Type_UNSIGNED,&Minute,
|
||||
Minute == CallsForExams->CallForExam.Duration.Minute, // Selected?
|
||||
Minute == CallsForExams->CallForExam.Duration.Minute ? HTM_OPTION_SELECTED :
|
||||
HTM_OPTION_UNSELECTED,
|
||||
HTM_OPTION_ENABLED,
|
||||
"%02u ′",Minute);
|
||||
HTM_SELECT_End ();
|
||||
|
|
|
@ -671,7 +671,8 @@ void Ctr_WriteSelectorOfCenter (void)
|
|||
" disabled=\"disabled\"",
|
||||
The_GetSuffix ());
|
||||
HTM_OPTION (HTM_Type_STRING,"",
|
||||
Gbl.Hierarchy.Ctr.CtrCod < 0, // Selected?
|
||||
Gbl.Hierarchy.Ctr.CtrCod < 0 ? HTM_OPTION_SELECTED :
|
||||
HTM_OPTION_UNSELECTED,
|
||||
HTM_OPTION_DISABLED,
|
||||
"[%s]",Txt_Center);
|
||||
|
||||
|
@ -693,7 +694,8 @@ void Ctr_WriteSelectorOfCenter (void)
|
|||
/* Write option */
|
||||
HTM_OPTION (HTM_Type_LONG,&CtrCod,
|
||||
Gbl.Hierarchy.Ctr.CtrCod > 0 &&
|
||||
CtrCod == Gbl.Hierarchy.Ctr.CtrCod, // Selected?
|
||||
CtrCod == Gbl.Hierarchy.Ctr.CtrCod ? HTM_OPTION_SELECTED :
|
||||
HTM_OPTION_UNSELECTED,
|
||||
HTM_OPTION_ENABLED,
|
||||
"%s",row[1]);
|
||||
}
|
||||
|
@ -787,7 +789,8 @@ static void Ctr_ListCentersForEdition (const struct Plc_Places *Places)
|
|||
" class=\"PLC_SEL INPUT_%s\"",
|
||||
The_GetSuffix ());
|
||||
HTM_OPTION (HTM_Type_STRING,"0",
|
||||
Ctr->PlcCod == 0, // Selected?
|
||||
Ctr->PlcCod == 0 ? HTM_OPTION_SELECTED :
|
||||
HTM_OPTION_UNSELECTED,
|
||||
HTM_OPTION_ENABLED,
|
||||
"%s",Txt_Another_place);
|
||||
for (NumPlc = 0;
|
||||
|
@ -796,7 +799,8 @@ static void Ctr_ListCentersForEdition (const struct Plc_Places *Places)
|
|||
{
|
||||
PlcInLst = &Places->Lst[NumPlc];
|
||||
HTM_OPTION (HTM_Type_LONG,&PlcInLst->PlcCod,
|
||||
PlcInLst->PlcCod == Ctr->PlcCod, // Selected?
|
||||
PlcInLst->PlcCod == Ctr->PlcCod ? HTM_OPTION_SELECTED :
|
||||
HTM_OPTION_UNSELECTED,
|
||||
HTM_OPTION_ENABLED,
|
||||
"%s",PlcInLst->ShrtName);
|
||||
}
|
||||
|
@ -1277,7 +1281,8 @@ static void Ctr_PutFormToCreateCenter (const struct Plc_Places *Places)
|
|||
"name=\"PlcCod\" class=\"PLC_SEL INPUT_%s\"",
|
||||
The_GetSuffix ());
|
||||
HTM_OPTION (HTM_Type_STRING,"0",
|
||||
Ctr_EditingCtr->PlcCod == 0, // Selected?
|
||||
Ctr_EditingCtr->PlcCod == 0 ? HTM_OPTION_SELECTED :
|
||||
HTM_OPTION_UNSELECTED,
|
||||
HTM_OPTION_ENABLED,
|
||||
"%s",Txt_Another_place);
|
||||
for (NumPlc = 0;
|
||||
|
@ -1286,7 +1291,8 @@ static void Ctr_PutFormToCreateCenter (const struct Plc_Places *Places)
|
|||
{
|
||||
PlcInLst = &Places->Lst[NumPlc];
|
||||
HTM_OPTION (HTM_Type_LONG,&PlcInLst->PlcCod,
|
||||
PlcInLst->PlcCod == Ctr_EditingCtr->PlcCod, // Selected?
|
||||
PlcInLst->PlcCod == Ctr_EditingCtr->PlcCod ? HTM_OPTION_SELECTED :
|
||||
HTM_OPTION_UNSELECTED,
|
||||
HTM_OPTION_ENABLED,
|
||||
"%s",PlcInLst->ShrtName);
|
||||
}
|
||||
|
|
|
@ -575,7 +575,8 @@ static void CtrCfg_Institution (bool PrintView,bool PutForm)
|
|||
{
|
||||
InsInLst = &Gbl.Hierarchy.Inss.Lst[NumIns];
|
||||
HTM_OPTION (HTM_Type_LONG,&InsInLst->InsCod,
|
||||
InsInLst->InsCod == Gbl.Hierarchy.Ins.InsCod, // Selected?
|
||||
InsInLst->InsCod == Gbl.Hierarchy.Ins.InsCod ? HTM_OPTION_SELECTED :
|
||||
HTM_OPTION_UNSELECTED,
|
||||
HTM_OPTION_ENABLED,
|
||||
"%s",InsInLst->ShrtName);
|
||||
}
|
||||
|
@ -674,7 +675,8 @@ static void CtrCfg_Place (bool PutForm)
|
|||
" class=\"INPUT_SHORT_NAME INPUT_%s\"",
|
||||
The_GetSuffix ());
|
||||
HTM_OPTION (HTM_Type_STRING,"0",
|
||||
Gbl.Hierarchy.Ctr.PlcCod == 0, // Selected?
|
||||
Gbl.Hierarchy.Ctr.PlcCod == 0 ? HTM_OPTION_SELECTED :
|
||||
HTM_OPTION_UNSELECTED,
|
||||
HTM_OPTION_ENABLED,
|
||||
"%s",Txt_Another_place);
|
||||
for (NumPlc = 0;
|
||||
|
@ -683,7 +685,8 @@ static void CtrCfg_Place (bool PutForm)
|
|||
{
|
||||
PlcInLst = &Places.Lst[NumPlc];
|
||||
HTM_OPTION (HTM_Type_LONG,&PlcInLst->PlcCod,
|
||||
PlcInLst->PlcCod == Gbl.Hierarchy.Ctr.PlcCod, // Selected?
|
||||
PlcInLst->PlcCod == Gbl.Hierarchy.Ctr.PlcCod ? HTM_OPTION_SELECTED :
|
||||
HTM_OPTION_UNSELECTED,
|
||||
HTM_OPTION_ENABLED,
|
||||
"%s",PlcInLst->ShrtName);
|
||||
}
|
||||
|
|
|
@ -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.111 (2023-05-17)"
|
||||
#define Log_PLATFORM_VERSION "SWAD 22.112 (2023-05-18)"
|
||||
#define CSS_FILE "swad22.107.36.css"
|
||||
#define JS_FILE "swad22.49.js"
|
||||
/*
|
||||
Version 22.112: May 18, 2023 Code refactoring in options of selectors. (336794 lines)
|
||||
Version 22.111: May 17, 2023 A project can have more than one rubric in each category. (336691 lines)
|
||||
Version 22.110.3: May 15, 2023 Changes in rubrics. (336550 lines)
|
||||
Version 22.110.2: May 15, 2023 Changes in rubrics. (336507 lines)
|
||||
|
|
|
@ -872,7 +872,8 @@ void Cty_WriteSelectorOfCountry (void)
|
|||
|
||||
/***** Initial disabled option *****/
|
||||
HTM_OPTION (HTM_Type_STRING,"",
|
||||
Gbl.Hierarchy.Cty.CtyCod < 0, // Selected?
|
||||
Gbl.Hierarchy.Cty.CtyCod < 0 ? HTM_OPTION_SELECTED :
|
||||
HTM_OPTION_UNSELECTED,
|
||||
HTM_OPTION_DISABLED,
|
||||
"[%s]",Txt_Country);
|
||||
|
||||
|
@ -883,7 +884,8 @@ void Cty_WriteSelectorOfCountry (void)
|
|||
{
|
||||
CtyInLst = &Gbl.Hierarchy.Ctys.Lst[NumCty];
|
||||
HTM_OPTION (HTM_Type_LONG,&CtyInLst->CtyCod,
|
||||
CtyInLst->CtyCod == Gbl.Hierarchy.Cty.CtyCod, // Selected?
|
||||
CtyInLst->CtyCod == Gbl.Hierarchy.Cty.CtyCod ? HTM_OPTION_SELECTED :
|
||||
HTM_OPTION_UNSELECTED,
|
||||
HTM_OPTION_ENABLED,
|
||||
"%s",CtyInLst->Name[Gbl.Prefs.Language]);
|
||||
}
|
||||
|
|
|
@ -642,7 +642,8 @@ void Crs_WriteSelectorOfCourse (void)
|
|||
|
||||
/***** Initial disabled option *****/
|
||||
HTM_OPTION (HTM_Type_STRING,"",
|
||||
Gbl.Hierarchy.Crs.CrsCod < 0, // Selected?
|
||||
Gbl.Hierarchy.Crs.CrsCod < 0 ? HTM_OPTION_SELECTED :
|
||||
HTM_OPTION_UNSELECTED,
|
||||
HTM_OPTION_DISABLED,
|
||||
"[%s]",Txt_Course);
|
||||
|
||||
|
@ -664,7 +665,8 @@ void Crs_WriteSelectorOfCourse (void)
|
|||
/* Write option */
|
||||
HTM_OPTION (HTM_Type_LONG,&CrsCod,
|
||||
Gbl.Hierarchy.Level == HieLvl_CRS && // Course selected
|
||||
CrsCod == Gbl.Hierarchy.Crs.CrsCod,
|
||||
CrsCod == Gbl.Hierarchy.Crs.CrsCod ? HTM_OPTION_SELECTED :
|
||||
HTM_OPTION_UNSELECTED,
|
||||
HTM_OPTION_ENABLED,
|
||||
"%s",row[1]); // Short name (row[1])
|
||||
}
|
||||
|
@ -779,7 +781,7 @@ void Crs_WriteSelectorMyCoursesInBreadcrumb (void)
|
|||
/***** Write an option when no course selected *****/
|
||||
if (Gbl.Hierarchy.Crs.CrsCod <= 0) // No course selected
|
||||
HTM_OPTION (HTM_Type_STRING,"-1",
|
||||
true, // Selected
|
||||
HTM_OPTION_SELECTED,
|
||||
HTM_OPTION_DISABLED,
|
||||
"%s",Txt_Course);
|
||||
|
||||
|
@ -804,7 +806,8 @@ void Crs_WriteSelectorMyCoursesInBreadcrumb (void)
|
|||
}
|
||||
|
||||
HTM_OPTION (HTM_Type_LONG,&CrsCod,
|
||||
CrsCod == Gbl.Hierarchy.Crs.CrsCod, // Selected?
|
||||
CrsCod == Gbl.Hierarchy.Crs.CrsCod ? HTM_OPTION_SELECTED :
|
||||
HTM_OPTION_UNSELECTED,
|
||||
HTM_OPTION_ENABLED,
|
||||
"%s",CrsShortName);
|
||||
}
|
||||
|
@ -818,7 +821,7 @@ void Crs_WriteSelectorMyCoursesInBreadcrumb (void)
|
|||
if (Gbl.Hierarchy.Level == HieLvl_CRS && // Course selected
|
||||
!Gbl.Usrs.Me.IBelongToCurrentCrs) // I do not belong to it
|
||||
HTM_OPTION (HTM_Type_LONG,&Gbl.Hierarchy.Crs.CrsCod,
|
||||
true, // Selected
|
||||
HTM_OPTION_SELECTED,
|
||||
HTM_OPTION_DISABLED,
|
||||
"%s",Gbl.Hierarchy.Crs.ShrtName);
|
||||
|
||||
|
@ -1187,7 +1190,8 @@ static void Crs_ListCoursesOfAYearForEdition (unsigned Year)
|
|||
// because it's possible to move this course
|
||||
// to another degree (with other active years)
|
||||
HTM_OPTION (HTM_Type_UNSIGNED,&YearAux,
|
||||
YearAux == Crs->Year, // Selected?
|
||||
YearAux == Crs->Year ? HTM_OPTION_SELECTED :
|
||||
HTM_OPTION_UNSELECTED,
|
||||
HTM_OPTION_ENABLED,
|
||||
"%s",Txt_YEAR_OF_DEGREE[YearAux]);
|
||||
HTM_SELECT_End ();
|
||||
|
@ -1329,7 +1333,8 @@ static void Crs_PutFormToCreateCourse (void)
|
|||
Year <= Deg_MAX_YEARS_PER_DEGREE;
|
||||
Year++)
|
||||
HTM_OPTION (HTM_Type_UNSIGNED,&Year,
|
||||
Year == Crs_EditingCrs->Year, // Selected?
|
||||
Year == Crs_EditingCrs->Year ? HTM_OPTION_SELECTED :
|
||||
HTM_OPTION_UNSELECTED,
|
||||
HTM_OPTION_ENABLED,
|
||||
"%s",Txt_YEAR_OF_DEGREE[Year]);
|
||||
HTM_SELECT_End ();
|
||||
|
@ -2521,7 +2526,8 @@ void Crs_AskRemoveOldCrss (void)
|
|||
i <= Crs_MAX_MONTHS_WITHOUT_ACCESS_TO_REMOVE_OLD_CRSS;
|
||||
i++)
|
||||
HTM_OPTION (HTM_Type_UNSIGNED,&i,
|
||||
i == MonthsWithoutAccess, // Selected?
|
||||
i == MonthsWithoutAccess ? HTM_OPTION_SELECTED :
|
||||
HTM_OPTION_UNSELECTED,
|
||||
HTM_OPTION_ENABLED,
|
||||
"%u",i);
|
||||
HTM_SELECT_End ();
|
||||
|
|
|
@ -243,7 +243,8 @@ static void CrsCfg_Degree (bool PrintView,bool PutForm)
|
|||
{
|
||||
DegInLst = &Gbl.Hierarchy.Degs.Lst[NumDeg];
|
||||
HTM_OPTION (HTM_Type_LONG,&DegInLst->DegCod,
|
||||
DegInLst->DegCod == Gbl.Hierarchy.Deg.DegCod, // Selected?
|
||||
DegInLst->DegCod == Gbl.Hierarchy.Deg.DegCod ? HTM_OPTION_SELECTED :
|
||||
HTM_OPTION_UNSELECTED,
|
||||
HTM_OPTION_ENABLED,
|
||||
"%s",DegInLst->ShrtName);
|
||||
}
|
||||
|
@ -331,7 +332,8 @@ static void CrsCfg_Year (bool PutForm)
|
|||
Year <= Deg_MAX_YEARS_PER_DEGREE;
|
||||
Year++)
|
||||
HTM_OPTION (HTM_Type_UNSIGNED,&Year,
|
||||
Year == Gbl.Hierarchy.Crs.Year, // Selected?
|
||||
Year == Gbl.Hierarchy.Crs.Year ? HTM_OPTION_SELECTED :
|
||||
HTM_OPTION_UNSELECTED,
|
||||
HTM_OPTION_ENABLED,
|
||||
"%s",Txt_YEAR_OF_DEGREE[Year]);
|
||||
HTM_SELECT_End ();
|
||||
|
|
27
swad_date.c
27
swad_date.c
|
@ -767,7 +767,7 @@ void Dat_WriteFormClientLocalDateTimeFromTimeUTC (const char *Id,
|
|||
Year <= LastYear;
|
||||
Year++)
|
||||
HTM_OPTION (HTM_Type_UNSIGNED,&Year,
|
||||
false, // Not selected
|
||||
HTM_OPTION_UNSELECTED,
|
||||
HTM_OPTION_ENABLED,
|
||||
"%u",Year);
|
||||
HTM_SELECT_End ();
|
||||
|
@ -784,7 +784,7 @@ void Dat_WriteFormClientLocalDateTimeFromTimeUTC (const char *Id,
|
|||
Month <= 12;
|
||||
Month++)
|
||||
HTM_OPTION (HTM_Type_UNSIGNED,&Month,
|
||||
false, // Not selected
|
||||
HTM_OPTION_UNSELECTED,
|
||||
HTM_OPTION_ENABLED,
|
||||
"%s",Txt_MONTHS_SMALL[Month - 1]);
|
||||
HTM_SELECT_End ();
|
||||
|
@ -801,7 +801,7 @@ void Dat_WriteFormClientLocalDateTimeFromTimeUTC (const char *Id,
|
|||
Day <= 31;
|
||||
Day++)
|
||||
HTM_OPTION (HTM_Type_UNSIGNED,&Day,
|
||||
false, // Not selected
|
||||
HTM_OPTION_UNSELECTED,
|
||||
HTM_OPTION_ENABLED,
|
||||
"%u",Day);
|
||||
HTM_SELECT_End ();
|
||||
|
@ -818,7 +818,7 @@ void Dat_WriteFormClientLocalDateTimeFromTimeUTC (const char *Id,
|
|||
Hour <= 23;
|
||||
Hour++)
|
||||
HTM_OPTION (HTM_Type_UNSIGNED,&Hour,
|
||||
false, // Not selected
|
||||
HTM_OPTION_UNSELECTED,
|
||||
HTM_OPTION_ENABLED,
|
||||
"%02u h",Hour);
|
||||
HTM_SELECT_End ();
|
||||
|
@ -835,7 +835,7 @@ void Dat_WriteFormClientLocalDateTimeFromTimeUTC (const char *Id,
|
|||
Minute < 60;
|
||||
Minute += MinutesIInterval[FormSeconds])
|
||||
HTM_OPTION (HTM_Type_UNSIGNED,&Minute,
|
||||
false, // Not selected
|
||||
HTM_OPTION_UNSELECTED,
|
||||
HTM_OPTION_ENABLED,
|
||||
"%02u ′",Minute);
|
||||
HTM_SELECT_End ();
|
||||
|
@ -854,7 +854,7 @@ void Dat_WriteFormClientLocalDateTimeFromTimeUTC (const char *Id,
|
|||
Second <= 59;
|
||||
Second++)
|
||||
HTM_OPTION (HTM_Type_UNSIGNED,&Second,
|
||||
false, // Not selected
|
||||
HTM_OPTION_UNSELECTED,
|
||||
HTM_OPTION_ENABLED,
|
||||
"%02u ″",Second);
|
||||
HTM_SELECT_End ();
|
||||
|
@ -1021,14 +1021,15 @@ void Dat_WriteFormDate (unsigned FirstYear,unsigned LastYear,
|
|||
Disabled ? " disabled=\"disabled\"" :
|
||||
"");
|
||||
HTM_OPTION (HTM_Type_STRING,"0",
|
||||
false, // Not selected
|
||||
HTM_OPTION_UNSELECTED,
|
||||
HTM_OPTION_ENABLED,
|
||||
"-");
|
||||
for (Year = FirstYear;
|
||||
Year <= LastYear;
|
||||
Year++)
|
||||
HTM_OPTION (HTM_Type_UNSIGNED,&Year,
|
||||
Year == DateSelected->Year, // Selected?
|
||||
Year == DateSelected->Year ? HTM_OPTION_SELECTED :
|
||||
HTM_OPTION_UNSELECTED,
|
||||
HTM_OPTION_ENABLED,
|
||||
"%u",Year);
|
||||
HTM_SELECT_End ();
|
||||
|
@ -1044,14 +1045,15 @@ void Dat_WriteFormDate (unsigned FirstYear,unsigned LastYear,
|
|||
Disabled ? " disabled=\"disabled\"" :
|
||||
"");
|
||||
HTM_OPTION (HTM_Type_STRING,"0",
|
||||
false, // Not selected
|
||||
HTM_OPTION_UNSELECTED,
|
||||
HTM_OPTION_ENABLED,
|
||||
"-");
|
||||
for (Month = 1;
|
||||
Month <= 12;
|
||||
Month++)
|
||||
HTM_OPTION (HTM_Type_UNSIGNED,&Month,
|
||||
Month == DateSelected->Month, // Selected?
|
||||
Month == DateSelected->Month ? HTM_OPTION_SELECTED :
|
||||
HTM_OPTION_UNSELECTED,
|
||||
HTM_OPTION_ENABLED,
|
||||
"%s",Txt_MONTHS_SMALL[Month - 1]);
|
||||
HTM_SELECT_End ();
|
||||
|
@ -1069,7 +1071,7 @@ void Dat_WriteFormDate (unsigned FirstYear,unsigned LastYear,
|
|||
Disabled ? " disabled=\"disabled\"" :
|
||||
"");
|
||||
HTM_OPTION (HTM_Type_STRING,"0",
|
||||
false, // Not selected
|
||||
HTM_OPTION_UNSELECTED,
|
||||
HTM_OPTION_ENABLED,
|
||||
"-");
|
||||
NumDaysSelectedMonth = (DateSelected->Month == 0) ? 31 :
|
||||
|
@ -1079,7 +1081,8 @@ void Dat_WriteFormDate (unsigned FirstYear,unsigned LastYear,
|
|||
Day <= NumDaysSelectedMonth;
|
||||
Day++)
|
||||
HTM_OPTION (HTM_Type_UNSIGNED,&Day,
|
||||
Day == DateSelected->Day, // Selected?
|
||||
Day == DateSelected->Day ? HTM_OPTION_SELECTED :
|
||||
HTM_OPTION_UNSELECTED,
|
||||
HTM_OPTION_ENABLED,
|
||||
"%u",Day);
|
||||
HTM_SELECT_End ();
|
||||
|
|
|
@ -240,7 +240,8 @@ void Deg_WriteSelectorOfDegree (void)
|
|||
" disabled=\"disabled\"",
|
||||
The_GetSuffix ());
|
||||
HTM_OPTION (HTM_Type_STRING,"",
|
||||
Gbl.Hierarchy.Deg.DegCod <= 0, // Selected?
|
||||
Gbl.Hierarchy.Deg.DegCod <= 0 ? HTM_OPTION_SELECTED :
|
||||
HTM_OPTION_UNSELECTED,
|
||||
HTM_OPTION_DISABLED,
|
||||
"[%s]",Txt_Degree);
|
||||
|
||||
|
@ -264,7 +265,8 @@ void Deg_WriteSelectorOfDegree (void)
|
|||
/* Write option */
|
||||
HTM_OPTION (HTM_Type_LONG,&DegCod,
|
||||
Gbl.Hierarchy.Deg.DegCod > 0 &&
|
||||
DegCod == Gbl.Hierarchy.Deg.DegCod, // Selected?
|
||||
DegCod == Gbl.Hierarchy.Deg.DegCod ? HTM_OPTION_SELECTED :
|
||||
HTM_OPTION_UNSELECTED,
|
||||
HTM_OPTION_ENABLED,
|
||||
"%s",row[1]);
|
||||
}
|
||||
|
@ -416,7 +418,8 @@ static void Deg_ListDegreesForEdition (const struct DegTyp_DegTypes *DegTypes)
|
|||
{
|
||||
DegTypInLst = &DegTypes->Lst[NumDegTyp];
|
||||
HTM_OPTION (HTM_Type_LONG,&DegTypInLst->DegTypCod,
|
||||
DegTypInLst->DegTypCod == DegInLst->DegTypCod, // Selected?
|
||||
DegTypInLst->DegTypCod == DegInLst->DegTypCod ? HTM_OPTION_SELECTED :
|
||||
HTM_OPTION_UNSELECTED,
|
||||
HTM_OPTION_ENABLED,
|
||||
"%s",DegTypInLst->DegTypName);
|
||||
}
|
||||
|
@ -576,7 +579,8 @@ static void Deg_PutFormToCreateDegree (const struct DegTyp_DegTypes *DegTypes)
|
|||
{
|
||||
DegTypInLst = &DegTypes->Lst[NumDegTyp];
|
||||
HTM_OPTION (HTM_Type_LONG,&DegTypInLst->DegTypCod,
|
||||
DegTypInLst->DegTypCod == Deg_EditingDeg->DegTypCod, // Selected?
|
||||
DegTypInLst->DegTypCod == Deg_EditingDeg->DegTypCod ? HTM_OPTION_SELECTED :
|
||||
HTM_OPTION_UNSELECTED,
|
||||
HTM_OPTION_ENABLED,
|
||||
"%s",DegTypInLst->DegTypName);
|
||||
}
|
||||
|
|
|
@ -238,7 +238,8 @@ static void DegCfg_Center (bool PrintView,bool PutForm)
|
|||
{
|
||||
CtrInLst = &Gbl.Hierarchy.Ctrs.Lst[NumCtr];
|
||||
HTM_OPTION (HTM_Type_LONG,&CtrInLst->CtrCod,
|
||||
CtrInLst->CtrCod == Gbl.Hierarchy.Ctr.CtrCod, // Selected?
|
||||
CtrInLst->CtrCod == Gbl.Hierarchy.Ctr.CtrCod ? HTM_OPTION_SELECTED :
|
||||
HTM_OPTION_UNSELECTED,
|
||||
HTM_OPTION_ENABLED,
|
||||
"%s",CtrInLst->ShrtName);
|
||||
}
|
||||
|
|
|
@ -117,7 +117,8 @@ void DegTyp_WriteSelectorDegreeTypes (long SelectedDegTypCod)
|
|||
" class=\"INPUT_%s\"",
|
||||
The_GetSuffix ());
|
||||
HTM_OPTION (HTM_Type_STRING,"-1",
|
||||
SelectedDegTypCod <= 0, // Selected?
|
||||
SelectedDegTypCod <= 0 ? HTM_OPTION_SELECTED :
|
||||
HTM_OPTION_UNSELECTED,
|
||||
HTM_OPTION_ENABLED,
|
||||
"%s",Txt_Any_type_of_degree);
|
||||
for (NumDegTyp = 0;
|
||||
|
@ -126,7 +127,8 @@ void DegTyp_WriteSelectorDegreeTypes (long SelectedDegTypCod)
|
|||
{
|
||||
DegTypInLst = &DegTypes.Lst[NumDegTyp];
|
||||
HTM_OPTION (HTM_Type_LONG,&DegTypInLst->DegTypCod,
|
||||
DegTypInLst->DegTypCod == SelectedDegTypCod, // Selected?
|
||||
DegTypInLst->DegTypCod == SelectedDegTypCod ? HTM_OPTION_SELECTED :
|
||||
HTM_OPTION_UNSELECTED,
|
||||
HTM_OPTION_ENABLED,
|
||||
"%s",DegTypInLst->DegTypName);
|
||||
}
|
||||
|
|
|
@ -511,7 +511,8 @@ static void Dpt_ListDepartmentsForEdition (const struct Dpt_Departments *Departm
|
|||
" class=\"HIE_SEL_NARROW INPUT_%s\"",
|
||||
The_GetSuffix ());
|
||||
HTM_OPTION (HTM_Type_STRING,"0",
|
||||
DptInLst->InsCod == 0, // Selected?
|
||||
DptInLst->InsCod == 0 ? HTM_OPTION_SELECTED :
|
||||
HTM_OPTION_UNSELECTED,
|
||||
HTM_OPTION_ENABLED,
|
||||
"%s",Txt_Another_institution);
|
||||
for (NumIns = 0;
|
||||
|
@ -520,7 +521,8 @@ static void Dpt_ListDepartmentsForEdition (const struct Dpt_Departments *Departm
|
|||
{
|
||||
InsInLst = &Gbl.Hierarchy.Inss.Lst[NumIns];
|
||||
HTM_OPTION (HTM_Type_LONG,&InsInLst->InsCod,
|
||||
InsInLst->InsCod == DptInLst->InsCod, // Selected?
|
||||
InsInLst->InsCod == DptInLst->InsCod ? HTM_OPTION_SELECTED :
|
||||
HTM_OPTION_UNSELECTED,
|
||||
HTM_OPTION_ENABLED,
|
||||
"%s",InsInLst->ShrtName);
|
||||
}
|
||||
|
@ -837,7 +839,8 @@ static void Dpt_PutFormToCreateDepartment (void)
|
|||
" class=\"HIE_SEL_NARROW INPUT_%s\"",
|
||||
The_GetSuffix ());
|
||||
HTM_OPTION (HTM_Type_STRING,"0",
|
||||
Dpt_EditingDpt->InsCod == 0, // Selected?
|
||||
Dpt_EditingDpt->InsCod == 0 ? HTM_OPTION_SELECTED :
|
||||
HTM_OPTION_UNSELECTED,
|
||||
HTM_OPTION_ENABLED,
|
||||
"%s",Txt_Another_institution);
|
||||
for (NumIns = 0;
|
||||
|
@ -846,7 +849,8 @@ static void Dpt_PutFormToCreateDepartment (void)
|
|||
{
|
||||
InsInLst = &Gbl.Hierarchy.Inss.Lst[NumIns];
|
||||
HTM_OPTION (HTM_Type_LONG,&InsInLst->InsCod,
|
||||
InsInLst->InsCod == Dpt_EditingDpt->InsCod, // Selected?
|
||||
InsInLst->InsCod == Dpt_EditingDpt->InsCod ? HTM_OPTION_SELECTED :
|
||||
HTM_OPTION_UNSELECTED,
|
||||
HTM_OPTION_ENABLED,
|
||||
"%s",InsInLst->ShrtName);
|
||||
}
|
||||
|
@ -1044,7 +1048,8 @@ void Dpt_WriteSelectorDepartment (long InsCod,long DptCod,
|
|||
NoDptSelectable = true;
|
||||
|
||||
HTM_OPTION (HTM_Type_STRING,"-1",
|
||||
DptCod < 0, // Selected?
|
||||
DptCod < 0 ? HTM_OPTION_SELECTED :
|
||||
HTM_OPTION_UNSELECTED,
|
||||
NoDptSelectable ? HTM_OPTION_ENABLED :
|
||||
HTM_OPTION_DISABLED,
|
||||
"%s",TextWhenNoDptSelected);
|
||||
|
@ -1052,7 +1057,8 @@ void Dpt_WriteSelectorDepartment (long InsCod,long DptCod,
|
|||
|
||||
/* Another department selected (different to all departments listed) */
|
||||
HTM_OPTION (HTM_Type_STRING,"0",
|
||||
DptCod == 0, // Selected?
|
||||
DptCod == 0 ? HTM_OPTION_SELECTED :
|
||||
HTM_OPTION_UNSELECTED,
|
||||
HTM_OPTION_ENABLED,
|
||||
"%s",Txt_Another_department);
|
||||
}
|
||||
|
@ -1064,7 +1070,8 @@ void Dpt_WriteSelectorDepartment (long InsCod,long DptCod,
|
|||
{
|
||||
DptInLst = &Departments.Lst[NumDpt];
|
||||
HTM_OPTION (HTM_Type_LONG,&DptInLst->DptCod,
|
||||
DptInLst->DptCod == DptCod, // Selected?
|
||||
DptInLst->DptCod == DptCod ? HTM_OPTION_SELECTED :
|
||||
HTM_OPTION_UNSELECTED,
|
||||
HTM_OPTION_ENABLED,
|
||||
"%s",DptInLst->FullName);
|
||||
}
|
||||
|
|
|
@ -680,7 +680,8 @@ void Enr_AskRemoveOldUsrs (void)
|
|||
Months <= Usr_MAX_MONTHS_WITHOUT_ACCESS_TO_REMOVE_OLD_USRS;
|
||||
Months++)
|
||||
HTM_OPTION (HTM_Type_UNSIGNED,&Months,
|
||||
Months == Usr_DEF_MONTHS_WITHOUT_ACCESS_TO_REMOVE_OLD_USRS, // Selected?
|
||||
Months == Usr_DEF_MONTHS_WITHOUT_ACCESS_TO_REMOVE_OLD_USRS ? HTM_OPTION_SELECTED :
|
||||
HTM_OPTION_UNSELECTED,
|
||||
HTM_OPTION_ENABLED,
|
||||
"%u",Months);
|
||||
HTM_SELECT_End ();
|
||||
|
|
|
@ -816,15 +816,18 @@ static void ExaPrn_WriteTF_AnsToFill (const struct ExaPrn_Print *Print,
|
|||
ExaPrn_WriteJSToUpdateExamPrint (Print,QstInd,Id,-1);
|
||||
HTM_Txt (" />");
|
||||
HTM_OPTION (HTM_Type_STRING,"" ,
|
||||
Print->PrintedQuestions[QstInd].StrAnswers[0] == '\0',// Selected?
|
||||
Print->PrintedQuestions[QstInd].StrAnswers[0] == '\0' ? HTM_OPTION_SELECTED :
|
||||
HTM_OPTION_UNSELECTED,
|
||||
HTM_OPTION_ENABLED,
|
||||
" ");
|
||||
HTM_OPTION (HTM_Type_STRING,"T",
|
||||
Print->PrintedQuestions[QstInd].StrAnswers[0] == 'T', // Selected?
|
||||
Print->PrintedQuestions[QstInd].StrAnswers[0] == 'T' ? HTM_OPTION_SELECTED :
|
||||
HTM_OPTION_UNSELECTED,
|
||||
HTM_OPTION_ENABLED,
|
||||
"%s",Txt_TF_QST[0]);
|
||||
HTM_OPTION (HTM_Type_STRING,"F",
|
||||
Print->PrintedQuestions[QstInd].StrAnswers[0] == 'F', // Selected?
|
||||
Print->PrintedQuestions[QstInd].StrAnswers[0] == 'F' ? HTM_OPTION_SELECTED :
|
||||
HTM_OPTION_UNSELECTED,
|
||||
HTM_OPTION_ENABLED,
|
||||
"%s",Txt_TF_QST[1]);
|
||||
HTM_Txt ("</select>");
|
||||
|
|
|
@ -124,7 +124,8 @@ static void Fig_ReqShowFigure (Fig_FigureType_t SelectedFigureType)
|
|||
{
|
||||
FigureTypeUnsigned = (unsigned) FigType;
|
||||
HTM_OPTION (HTM_Type_UNSIGNED,&FigureTypeUnsigned,
|
||||
FigType == SelectedFigureType, // Selected?
|
||||
FigType == SelectedFigureType ? HTM_OPTION_SELECTED :
|
||||
HTM_OPTION_UNSELECTED,
|
||||
HTM_OPTION_ENABLED,
|
||||
"%s",Txt_FIGURE_TYPES[FigType]);
|
||||
}
|
||||
|
|
48
swad_group.c
48
swad_group.c
|
@ -1254,11 +1254,13 @@ static void Grp_ListGroupTypesForEdition (void)
|
|||
" class=\"INPUT_%s\" style=\"width:150px;\"",
|
||||
The_GetSuffix ());
|
||||
HTM_OPTION (HTM_Type_STRING,"N",
|
||||
!Gbl.Crs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp].MandatoryEnrolment, // Selected?
|
||||
Gbl.Crs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp].MandatoryEnrolment ? HTM_OPTION_UNSELECTED :
|
||||
HTM_OPTION_SELECTED,
|
||||
HTM_OPTION_ENABLED,
|
||||
"%s",Txt_It_is_optional_to_choose_a_group);
|
||||
HTM_OPTION (HTM_Type_STRING,"Y",
|
||||
Gbl.Crs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp].MandatoryEnrolment, // Selected?
|
||||
Gbl.Crs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp].MandatoryEnrolment ? HTM_OPTION_SELECTED :
|
||||
HTM_OPTION_UNSELECTED,
|
||||
HTM_OPTION_ENABLED,
|
||||
"%s",Txt_It_is_mandatory_to_choose_a_group);
|
||||
HTM_SELECT_End ();
|
||||
|
@ -1274,11 +1276,13 @@ static void Grp_ListGroupTypesForEdition (void)
|
|||
" class=\"INPUT_%s\" style=\"width:150px;\"",
|
||||
The_GetSuffix ());
|
||||
HTM_OPTION (HTM_Type_STRING,"N",
|
||||
!Gbl.Crs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp].MultipleEnrolment, // Selected?
|
||||
Gbl.Crs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp].MultipleEnrolment ? HTM_OPTION_UNSELECTED :
|
||||
HTM_OPTION_SELECTED,
|
||||
HTM_OPTION_ENABLED,
|
||||
"%s",Txt_A_student_can_only_belong_to_one_group);
|
||||
HTM_OPTION (HTM_Type_STRING,"Y",
|
||||
Gbl.Crs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp].MultipleEnrolment, // Selected?
|
||||
Gbl.Crs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp].MultipleEnrolment ? HTM_OPTION_SELECTED :
|
||||
HTM_OPTION_UNSELECTED,
|
||||
HTM_OPTION_ENABLED,
|
||||
"%s",Txt_A_student_can_belong_to_several_groups);
|
||||
HTM_SELECT_End ();
|
||||
|
@ -1469,7 +1473,8 @@ static void Grp_ListGroupsForEdition (const struct Roo_Rooms *Rooms)
|
|||
{
|
||||
GrpTyp2InLst = &Gbl.Crs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp2];
|
||||
HTM_OPTION (HTM_Type_LONG,&GrpTyp2InLst->GrpTypCod,
|
||||
GrpTyp2InLst->GrpTypCod == GrpTyp1InLst->GrpTypCod, // Selected?
|
||||
GrpTyp2InLst->GrpTypCod == GrpTyp1InLst->GrpTypCod ? HTM_OPTION_SELECTED :
|
||||
HTM_OPTION_UNSELECTED,
|
||||
HTM_OPTION_ENABLED,
|
||||
"%s",GrpTyp2InLst->GrpTypName);
|
||||
}
|
||||
|
@ -1502,13 +1507,15 @@ static void Grp_ListGroupsForEdition (const struct Roo_Rooms *Rooms)
|
|||
|
||||
/* Option for no assigned room */
|
||||
HTM_OPTION (HTM_Type_STRING,"-1",
|
||||
Grp->Room.RooCod < 0, // Selected?
|
||||
Grp->Room.RooCod < 0 ? HTM_OPTION_SELECTED :
|
||||
HTM_OPTION_UNSELECTED,
|
||||
HTM_OPTION_ENABLED,
|
||||
"%s",Txt_No_assigned_room);
|
||||
|
||||
/* Option for another room */
|
||||
HTM_OPTION (HTM_Type_STRING,"0",
|
||||
Grp->Room.RooCod == 0, // Selected?
|
||||
Grp->Room.RooCod == 0 ? HTM_OPTION_SELECTED :
|
||||
HTM_OPTION_UNSELECTED,
|
||||
HTM_OPTION_ENABLED,
|
||||
"%s",Txt_Another_room);
|
||||
|
||||
|
@ -1519,7 +1526,8 @@ static void Grp_ListGroupsForEdition (const struct Roo_Rooms *Rooms)
|
|||
{
|
||||
RooInLst = &Rooms->Lst[NumRoo];
|
||||
HTM_OPTION (HTM_Type_LONG,&RooInLst->RooCod,
|
||||
RooInLst->RooCod == Grp->Room.RooCod, // Selected?
|
||||
RooInLst->RooCod == Grp->Room.RooCod ? HTM_OPTION_SELECTED :
|
||||
HTM_OPTION_UNSELECTED,
|
||||
HTM_OPTION_ENABLED,
|
||||
"%s",RooInLst->ShrtName);
|
||||
}
|
||||
|
@ -2414,11 +2422,13 @@ static void Grp_PutFormToCreateGroupType (void)
|
|||
" class=\"INPUT_%s\" style=\"width:150px;\"",
|
||||
The_GetSuffix ());
|
||||
HTM_OPTION (HTM_Type_STRING,"N",
|
||||
!Gbl.Crs.Grps.GrpTyp.MandatoryEnrolment, // Selected?
|
||||
Gbl.Crs.Grps.GrpTyp.MandatoryEnrolment ? HTM_OPTION_UNSELECTED :
|
||||
HTM_OPTION_SELECTED,
|
||||
HTM_OPTION_ENABLED,
|
||||
"%s",Txt_It_is_optional_to_choose_a_group);
|
||||
HTM_OPTION (HTM_Type_STRING,"Y",
|
||||
Gbl.Crs.Grps.GrpTyp.MandatoryEnrolment, // Selected?
|
||||
Gbl.Crs.Grps.GrpTyp.MandatoryEnrolment ? HTM_OPTION_SELECTED :
|
||||
HTM_OPTION_UNSELECTED,
|
||||
HTM_OPTION_ENABLED,
|
||||
"%s",Txt_It_is_mandatory_to_choose_a_group);
|
||||
HTM_SELECT_End ();
|
||||
|
@ -2431,11 +2441,13 @@ static void Grp_PutFormToCreateGroupType (void)
|
|||
" class=\"INPUT_%s\" style=\"width:150px;\"",
|
||||
The_GetSuffix ());
|
||||
HTM_OPTION (HTM_Type_STRING,"N",
|
||||
!Gbl.Crs.Grps.GrpTyp.MultipleEnrolment, // Selected?
|
||||
Gbl.Crs.Grps.GrpTyp.MultipleEnrolment ? HTM_OPTION_UNSELECTED :
|
||||
HTM_OPTION_SELECTED,
|
||||
HTM_OPTION_ENABLED,
|
||||
"%s",Txt_A_student_can_only_belong_to_one_group);
|
||||
HTM_OPTION (HTM_Type_STRING,"Y",
|
||||
Gbl.Crs.Grps.GrpTyp.MultipleEnrolment, // Selected?
|
||||
Gbl.Crs.Grps.GrpTyp.MultipleEnrolment ? HTM_OPTION_SELECTED :
|
||||
HTM_OPTION_UNSELECTED,
|
||||
HTM_OPTION_ENABLED,
|
||||
"%s",Txt_A_student_can_belong_to_several_groups);
|
||||
HTM_SELECT_End ();
|
||||
|
@ -2543,7 +2555,8 @@ static void Grp_PutFormToCreateGroup (const struct Roo_Rooms *Rooms)
|
|||
{
|
||||
GrpTypInLst = &Gbl.Crs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp];
|
||||
HTM_OPTION (HTM_Type_LONG,&GrpTypInLst->GrpTypCod,
|
||||
GrpTypInLst->GrpTypCod == Gbl.Crs.Grps.GrpTyp.GrpTypCod, // Selected?
|
||||
GrpTypInLst->GrpTypCod == Gbl.Crs.Grps.GrpTyp.GrpTypCod ? HTM_OPTION_SELECTED :
|
||||
HTM_OPTION_UNSELECTED,
|
||||
HTM_OPTION_ENABLED,
|
||||
"%s",GrpTypInLst->GrpTypName);
|
||||
}
|
||||
|
@ -2571,13 +2584,15 @@ static void Grp_PutFormToCreateGroup (const struct Roo_Rooms *Rooms)
|
|||
|
||||
/* Option for no assigned room */
|
||||
HTM_OPTION (HTM_Type_STRING,"-1",
|
||||
Gbl.Crs.Grps.RooCod < 0, // Selected?
|
||||
Gbl.Crs.Grps.RooCod < 0 ? HTM_OPTION_SELECTED :
|
||||
HTM_OPTION_UNSELECTED,
|
||||
HTM_OPTION_ENABLED,
|
||||
"%s",Txt_No_assigned_room);
|
||||
|
||||
/* Option for another room */
|
||||
HTM_OPTION (HTM_Type_STRING,"0",
|
||||
Gbl.Crs.Grps.RooCod == 0, // Selected?
|
||||
Gbl.Crs.Grps.RooCod == 0 ? HTM_OPTION_SELECTED :
|
||||
HTM_OPTION_UNSELECTED,
|
||||
HTM_OPTION_ENABLED,
|
||||
"%s",Txt_Another_room);
|
||||
|
||||
|
@ -2588,7 +2603,8 @@ static void Grp_PutFormToCreateGroup (const struct Roo_Rooms *Rooms)
|
|||
{
|
||||
RooInLst = &Rooms->Lst[NumRoo];
|
||||
HTM_OPTION (HTM_Type_LONG,&RooInLst->RooCod,
|
||||
RooInLst->RooCod == Gbl.Crs.Grps.RooCod, // Selected?
|
||||
RooInLst->RooCod == Gbl.Crs.Grps.RooCod ? HTM_OPTION_SELECTED :
|
||||
HTM_OPTION_UNSELECTED,
|
||||
HTM_OPTION_ENABLED,
|
||||
"%s",RooInLst->ShrtName);
|
||||
}
|
||||
|
|
|
@ -837,13 +837,13 @@ void Hie_WriteStatusCellEditable (bool ICanEdit,Hie_Status_t Status,
|
|||
|
||||
StatusUnsigned = (unsigned) Hie_GetStatusBitsFromStatusTxt (Hie_STATUS_PENDING);
|
||||
HTM_OPTION (HTM_Type_UNSIGNED,&StatusUnsigned,
|
||||
true, // Selected
|
||||
HTM_OPTION_SELECTED,
|
||||
HTM_OPTION_ENABLED,
|
||||
"%s",Txt[Hie_STATUS_PENDING]);
|
||||
|
||||
StatusUnsigned = (unsigned) Hie_GetStatusBitsFromStatusTxt (Hie_STATUS_ACTIVE);
|
||||
HTM_OPTION (HTM_Type_UNSIGNED,&StatusUnsigned,
|
||||
false, // Not selected
|
||||
HTM_OPTION_UNSELECTED,
|
||||
HTM_OPTION_ENABLED,
|
||||
"%s",Txt[Hie_STATUS_ACTIVE]);
|
||||
|
||||
|
|
|
@ -542,7 +542,8 @@ static void Hld_ListHolidaysForEdition (const struct Hld_Holidays *Holidays,
|
|||
"name=\"PlcCod\" class=\"PLC_SEL INPUT_%s\"",
|
||||
The_GetSuffix ());
|
||||
HTM_OPTION (HTM_Type_STRING,"-1",
|
||||
HldInLst->PlcCod <= 0, // Selected?
|
||||
HldInLst->PlcCod <= 0 ? HTM_OPTION_SELECTED :
|
||||
HTM_OPTION_UNSELECTED,
|
||||
HTM_OPTION_ENABLED,
|
||||
"%s",Txt_All_places);
|
||||
for (NumPlc = 0;
|
||||
|
@ -551,7 +552,8 @@ static void Hld_ListHolidaysForEdition (const struct Hld_Holidays *Holidays,
|
|||
{
|
||||
PlcInLst = &Places->Lst[NumPlc];
|
||||
HTM_OPTION (HTM_Type_LONG,&PlcInLst->PlcCod,
|
||||
PlcInLst->PlcCod == HldInLst->PlcCod, // Selected?
|
||||
PlcInLst->PlcCod == HldInLst->PlcCod ? HTM_OPTION_SELECTED :
|
||||
HTM_OPTION_UNSELECTED,
|
||||
HTM_OPTION_ENABLED,
|
||||
"%s",PlcInLst->ShrtName);
|
||||
}
|
||||
|
@ -573,7 +575,8 @@ static void Hld_ListHolidaysForEdition (const struct Hld_Holidays *Holidays,
|
|||
{
|
||||
HolidayTypeUnsigned = (unsigned) HolidayType;
|
||||
HTM_OPTION (HTM_Type_UNSIGNED,&HolidayTypeUnsigned,
|
||||
HolidayType == HldInLst->HldTyp, // Selected?
|
||||
HolidayType == HldInLst->HldTyp ? HTM_OPTION_SELECTED :
|
||||
HTM_OPTION_UNSELECTED,
|
||||
HTM_OPTION_ENABLED,
|
||||
"%s",Txt_HOLIDAY_TYPES[HolidayType]);
|
||||
}
|
||||
|
@ -914,7 +917,8 @@ static void Hld_PutFormToCreateHoliday (const struct Plc_Places *Places)
|
|||
"name=\"PlcCod\" class=\"PLC_SEL INPUT_%s\"",
|
||||
The_GetSuffix ());
|
||||
HTM_OPTION (HTM_Type_STRING,"-1",
|
||||
Hld_EditingHld->PlcCod <= 0, // Selected?
|
||||
Hld_EditingHld->PlcCod <= 0 ? HTM_OPTION_SELECTED :
|
||||
HTM_OPTION_UNSELECTED,
|
||||
HTM_OPTION_ENABLED,
|
||||
"%s",Txt_All_places);
|
||||
for (NumPlc = 0;
|
||||
|
@ -923,7 +927,8 @@ static void Hld_PutFormToCreateHoliday (const struct Plc_Places *Places)
|
|||
{
|
||||
PlcInLst = &Places->Lst[NumPlc];
|
||||
HTM_OPTION (HTM_Type_LONG,&PlcInLst->PlcCod,
|
||||
PlcInLst->PlcCod == Hld_EditingHld->PlcCod, // Selected?
|
||||
PlcInLst->PlcCod == Hld_EditingHld->PlcCod ? HTM_OPTION_SELECTED :
|
||||
HTM_OPTION_UNSELECTED,
|
||||
HTM_OPTION_ENABLED,
|
||||
"%s",PlcInLst->ShrtName);
|
||||
}
|
||||
|
@ -942,7 +947,8 @@ static void Hld_PutFormToCreateHoliday (const struct Plc_Places *Places)
|
|||
{
|
||||
HolidayTypeUnsigned = (unsigned) HolidayType;
|
||||
HTM_OPTION (HTM_Type_UNSIGNED,&HolidayTypeUnsigned,
|
||||
HolidayType == Hld_EditingHld->HldTyp, // Selected?
|
||||
HolidayType == Hld_EditingHld->HldTyp ? HTM_OPTION_SELECTED :
|
||||
HTM_OPTION_UNSELECTED,
|
||||
HTM_OPTION_ENABLED,
|
||||
"%s",Txt_HOLIDAY_TYPES[HolidayType]);
|
||||
}
|
||||
|
|
|
@ -846,7 +846,8 @@ void Ins_WriteSelectorOfInstitution (void)
|
|||
The_GetSuffix ());
|
||||
|
||||
HTM_OPTION (HTM_Type_STRING,"",
|
||||
Gbl.Hierarchy.Ins.InsCod < 0, // Selected?
|
||||
Gbl.Hierarchy.Ins.InsCod < 0 ? HTM_OPTION_SELECTED :
|
||||
HTM_OPTION_UNSELECTED,
|
||||
HTM_OPTION_DISABLED,
|
||||
"[%s]",Txt_Institution);
|
||||
|
||||
|
@ -870,7 +871,8 @@ void Ins_WriteSelectorOfInstitution (void)
|
|||
/* Write option */
|
||||
HTM_OPTION (HTM_Type_LONG,&InsCod,
|
||||
Gbl.Hierarchy.Ins.InsCod > 0 &&
|
||||
InsCod == Gbl.Hierarchy.Ins.InsCod, // Selected?
|
||||
InsCod == Gbl.Hierarchy.Ins.InsCod ? HTM_OPTION_SELECTED :
|
||||
HTM_OPTION_UNSELECTED,
|
||||
HTM_OPTION_ENABLED,
|
||||
"%s",row[1]);
|
||||
}
|
||||
|
|
|
@ -338,7 +338,8 @@ static void InsCfg_Country (bool PrintView,bool PutForm)
|
|||
{
|
||||
CtyInLst = &Gbl.Hierarchy.Ctys.Lst[NumCty];
|
||||
HTM_OPTION (HTM_Type_LONG,&CtyInLst->CtyCod,
|
||||
CtyInLst->CtyCod == Gbl.Hierarchy.Cty.CtyCod, // Selected?
|
||||
CtyInLst->CtyCod == Gbl.Hierarchy.Cty.CtyCod ? HTM_OPTION_SELECTED :
|
||||
HTM_OPTION_UNSELECTED,
|
||||
HTM_OPTION_ENABLED,
|
||||
"%s",CtyInLst->Name[Gbl.Prefs.Language]);
|
||||
}
|
||||
|
|
|
@ -137,7 +137,8 @@ void Lan_PutSelectorToSelectLanguage (void)
|
|||
{
|
||||
LanUnsigned = (unsigned) Lan;
|
||||
HTM_OPTION (HTM_Type_UNSIGNED,&LanUnsigned,
|
||||
Lan == Gbl.Prefs.Language, // Selected?
|
||||
Lan == Gbl.Prefs.Language ? HTM_OPTION_SELECTED :
|
||||
HTM_OPTION_UNSELECTED,
|
||||
HTM_OPTION_ENABLED,
|
||||
"%s",Txt_STR_LANG_NAME[Lan]);
|
||||
}
|
||||
|
|
|
@ -1820,7 +1820,8 @@ static void Msg_ShowFormSelectCourseSentOrRecMsgs (const struct Msg_Messages *Me
|
|||
|
||||
/* Write a first option to select any course */
|
||||
HTM_OPTION (HTM_Type_STRING,"",
|
||||
Messages->FilterCrsCod < 0, // Selected?
|
||||
Messages->FilterCrsCod < 0 ? HTM_OPTION_SELECTED :
|
||||
HTM_OPTION_UNSELECTED,
|
||||
HTM_OPTION_ENABLED,
|
||||
"%s",Txt_any_course);
|
||||
|
||||
|
@ -1834,7 +1835,8 @@ static void Msg_ShowFormSelectCourseSentOrRecMsgs (const struct Msg_Messages *Me
|
|||
|
||||
if ((CrsCod = Str_ConvertStrCodToLongCod (row[0])) > 0)
|
||||
HTM_OPTION (HTM_Type_LONG,&CrsCod,
|
||||
CrsCod == Messages->FilterCrsCod, // Selected?
|
||||
CrsCod == Messages->FilterCrsCod ? HTM_OPTION_SELECTED :
|
||||
HTM_OPTION_UNSELECTED,
|
||||
HTM_OPTION_ENABLED,
|
||||
"%s",row[1]); // Course short name
|
||||
}
|
||||
|
|
18
swad_photo.c
18
swad_photo.c
|
@ -1802,7 +1802,8 @@ static void Pho_PutSelectorForTypeOfAvg (const struct Pho_DegPhotos *DegPhotos)
|
|||
{
|
||||
TypeOfAvgUnsigned = (unsigned) TypeOfAvg;
|
||||
HTM_OPTION (HTM_Type_UNSIGNED,&TypeOfAvgUnsigned,
|
||||
TypeOfAvg == DegPhotos->TypeOfAverage, // Selected?
|
||||
TypeOfAvg == DegPhotos->TypeOfAverage ? HTM_OPTION_SELECTED :
|
||||
HTM_OPTION_UNSELECTED,
|
||||
HTM_OPTION_ENABLED,
|
||||
"%s",Txt_AVERAGE_PHOTO_TYPES[TypeOfAvg]);
|
||||
}
|
||||
|
@ -1868,7 +1869,8 @@ static void Pho_PutSelectorForHowComputePhotoSize (const struct Pho_DegPhotos *D
|
|||
{
|
||||
PhoSiUnsigned = (unsigned) PhoSi;
|
||||
HTM_OPTION (HTM_Type_UNSIGNED,&PhoSiUnsigned,
|
||||
PhoSi == DegPhotos->HowComputePhotoSize, // Selected?
|
||||
PhoSi == DegPhotos->HowComputePhotoSize ? HTM_OPTION_SELECTED :
|
||||
HTM_OPTION_UNSELECTED,
|
||||
HTM_OPTION_ENABLED,
|
||||
"%s",Txt_STAT_DEGREE_PHOTO_SIZE[PhoSi]);
|
||||
}
|
||||
|
@ -1933,7 +1935,8 @@ static void Pho_PutSelectorForHowOrderDegrees (const struct Pho_DegPhotos *DegPh
|
|||
{
|
||||
OrderUnsigned = (unsigned) Order;
|
||||
HTM_OPTION (HTM_Type_UNSIGNED,&OrderUnsigned,
|
||||
Order == DegPhotos->HowOrderDegrees, // Selected?
|
||||
Order == DegPhotos->HowOrderDegrees ? HTM_OPTION_SELECTED :
|
||||
HTM_OPTION_UNSELECTED,
|
||||
HTM_OPTION_ENABLED,
|
||||
"%s",Txt_STAT_DEGREE_PHOTO_ORDER[Order]);
|
||||
}
|
||||
|
@ -1998,8 +2001,8 @@ static void Pho_PutLinkToCalculateDegreeStats (const struct Pho_DegPhotos *DegPh
|
|||
struct Deg_Degree Deg;
|
||||
long EstimatedTimeToComputeAvgPhotoInMicroseconds;
|
||||
char StrEstimatedTimeToComputeAvgPhoto[Dat_MAX_BYTES_TIME + 1];
|
||||
bool Selected;
|
||||
bool Disabled;
|
||||
HTM_OptionSelected_t Selected;
|
||||
HTM_OptionDisabled_t Disabled;
|
||||
|
||||
if ((Deg.DegCod = Pho_GetDegWithAvgPhotoLeastRecentlyUpdated ()) > 0)
|
||||
{
|
||||
|
@ -2043,8 +2046,9 @@ static void Pho_PutLinkToCalculateDegreeStats (const struct Pho_DegPhotos *DegPh
|
|||
Dat_WriteTime (StrEstimatedTimeToComputeAvgPhoto,
|
||||
EstimatedTimeToComputeAvgPhotoInMicroseconds);
|
||||
|
||||
Selected = (Degs.Lst[NumDeg].DegCod == Deg.DegCod);
|
||||
if (Selected)
|
||||
Selected = (Degs.Lst[NumDeg].DegCod == Deg.DegCod) ? HTM_OPTION_SELECTED :
|
||||
HTM_OPTION_UNSELECTED;
|
||||
if (Selected == HTM_OPTION_SELECTED)
|
||||
Disabled = HTM_OPTION_ENABLED;
|
||||
else
|
||||
// Too recently computed ?
|
||||
|
|
|
@ -1833,7 +1833,8 @@ static void Prj_PutSelectorReviewStatus (struct Prj_Projects *Projects)
|
|||
{
|
||||
ReviewStatusUnsigned = (unsigned) ReviewStatus;
|
||||
HTM_OPTION (HTM_Type_UNSIGNED,&ReviewStatusUnsigned,
|
||||
ReviewStatus == Projects->Prj.Review.Status, // Selected?
|
||||
ReviewStatus == Projects->Prj.Review.Status ? HTM_OPTION_SELECTED :
|
||||
HTM_OPTION_UNSELECTED,
|
||||
HTM_OPTION_ENABLED,
|
||||
"%s",Txt_PROJECT_REVIEW_SINGUL[ReviewStatus]);
|
||||
}
|
||||
|
@ -3813,11 +3814,13 @@ static void Prj_PutFormProject (struct Prj_Projects *Projects,
|
|||
"name=\"Assigned\" class=\"INPUT_%s\"",
|
||||
The_GetSuffix ());
|
||||
HTM_OPTION (HTM_Type_STRING,"Y",
|
||||
Projects->Prj.Assigned == Prj_ASSIGNED, // Selected?
|
||||
Projects->Prj.Assigned == Prj_ASSIGNED ? HTM_OPTION_SELECTED :
|
||||
HTM_OPTION_SELECTED,
|
||||
HTM_OPTION_ENABLED,
|
||||
"%s",Txt_Yes);
|
||||
HTM_OPTION (HTM_Type_STRING,"N",
|
||||
Projects->Prj.Assigned == Prj_NONASSIG, // Selected?
|
||||
Projects->Prj.Assigned == Prj_NONASSIG ? HTM_OPTION_SELECTED :
|
||||
HTM_OPTION_UNSELECTED,
|
||||
HTM_OPTION_ENABLED,
|
||||
"%s",Txt_No);
|
||||
HTM_SELECT_End ();
|
||||
|
@ -3859,7 +3862,8 @@ static void Prj_PutFormProject (struct Prj_Projects *Projects,
|
|||
{
|
||||
ProposalUnsigned = (unsigned) Proposal;
|
||||
HTM_OPTION (HTM_Type_UNSIGNED,&ProposalUnsigned,
|
||||
Projects->Prj.Proposal == Proposal, // Selected?
|
||||
Projects->Prj.Proposal == Proposal ? HTM_OPTION_SELECTED :
|
||||
HTM_OPTION_UNSELECTED,
|
||||
HTM_OPTION_ENABLED,
|
||||
"%s",Txt_PROJECT_STATUS[Proposal]);
|
||||
}
|
||||
|
|
|
@ -205,7 +205,7 @@ static void PrjCfg_ShowFormsRubricsOfType (const struct Rub_Rubrics *Rubrics,
|
|||
Par_CodeStr[ParCod_Rub]);
|
||||
/* First option to indicate that no rubric is selected */
|
||||
HTM_OPTION (HTM_Type_STRING,"-1",
|
||||
false, // Selected?
|
||||
HTM_OPTION_UNSELECTED,
|
||||
HTM_OPTION_ENABLED,
|
||||
"[%s]",Txt_no_rubric);
|
||||
|
||||
|
@ -216,7 +216,8 @@ static void PrjCfg_ShowFormsRubricsOfType (const struct Rub_Rubrics *Rubrics,
|
|||
{
|
||||
Rub_DB_GetRubricTitle (Rubrics->Lst[NumRubThisCrs],Title,Rub_MAX_BYTES_TITLE);
|
||||
HTM_OPTION (HTM_Type_LONG,&Rubrics->Lst[NumRubThisCrs],
|
||||
Rubrics->Lst[NumRubThisCrs] == RubCodThisType, // Selected?
|
||||
Rubrics->Lst[NumRubThisCrs] == RubCodThisType ? HTM_OPTION_SELECTED :
|
||||
HTM_OPTION_UNSELECTED,
|
||||
HTM_OPTION_ENABLED,
|
||||
"%s",Title);
|
||||
}
|
||||
|
@ -235,7 +236,7 @@ static void PrjCfg_ShowFormsRubricsOfType (const struct Rub_Rubrics *Rubrics,
|
|||
|
||||
/* First option to indicate that no rubric is selected */
|
||||
HTM_OPTION (HTM_Type_STRING,"-1",
|
||||
true, // Selected?
|
||||
HTM_OPTION_SELECTED,
|
||||
HTM_OPTION_DISABLED,
|
||||
"[%s]",Txt_add_rubric);
|
||||
|
||||
|
@ -246,7 +247,7 @@ static void PrjCfg_ShowFormsRubricsOfType (const struct Rub_Rubrics *Rubrics,
|
|||
{
|
||||
Rub_DB_GetRubricTitle (Rubrics->Lst[NumRubThisCrs],Title,Rub_MAX_BYTES_TITLE);
|
||||
HTM_OPTION (HTM_Type_LONG,&Rubrics->Lst[NumRubThisCrs],
|
||||
false, // Selected?
|
||||
HTM_OPTION_UNSELECTED,
|
||||
HTM_OPTION_ENABLED,
|
||||
"%s",Title);
|
||||
}
|
||||
|
|
|
@ -1884,7 +1884,7 @@ void Qst_PutFormEditOneQst (struct Qst_Question *Question)
|
|||
The_GetSuffix ());
|
||||
free (FuncOnChange);
|
||||
HTM_OPTION (HTM_Type_STRING,"",
|
||||
false, // Not selected
|
||||
HTM_OPTION_UNSELECTED,
|
||||
HTM_OPTION_ENABLED,
|
||||
" ");
|
||||
mysql_data_seek (mysql_res,0);
|
||||
|
@ -1902,23 +1902,23 @@ void Qst_PutFormEditOneQst (struct Qst_Question *Question)
|
|||
IsThisTag = false;
|
||||
if (!strcasecmp (Question->Tags.Txt[IndTag],row[1]))
|
||||
{
|
||||
HTM_Txt (" selected=\"selected\"");
|
||||
IsThisTag = true;
|
||||
TagFound = true;
|
||||
}
|
||||
HTM_OPTION (HTM_Type_STRING,row[1],
|
||||
IsThisTag, // Selected?
|
||||
IsThisTag ? HTM_OPTION_SELECTED :
|
||||
HTM_OPTION_UNSELECTED,
|
||||
HTM_OPTION_ENABLED,
|
||||
"%s",row[1]);
|
||||
}
|
||||
/* If it's a new tag received from the form */
|
||||
if (!TagFound && Question->Tags.Txt[IndTag][0])
|
||||
HTM_OPTION (HTM_Type_STRING,Question->Tags.Txt[IndTag],
|
||||
true, // Selected
|
||||
HTM_OPTION_SELECTED,
|
||||
HTM_OPTION_ENABLED,
|
||||
"%s",Question->Tags.Txt[IndTag]);
|
||||
HTM_OPTION (HTM_Type_STRING,"",
|
||||
false, // Selected
|
||||
HTM_OPTION_UNSELECTED,
|
||||
HTM_OPTION_ENABLED,
|
||||
"[%s]",Txt_new_tag);
|
||||
HTM_SELECT_End ();
|
||||
|
|
|
@ -332,7 +332,8 @@ static void Rec_ListFieldsRecordsForEdition (void)
|
|||
{
|
||||
VisUnsigned = (unsigned) Vis;
|
||||
HTM_OPTION (HTM_Type_UNSIGNED,&VisUnsigned,
|
||||
Vis == FldInLst->Visibility, // Selected?
|
||||
Vis == FldInLst->Visibility ? HTM_OPTION_SELECTED :
|
||||
HTM_OPTION_UNSELECTED,
|
||||
HTM_OPTION_ENABLED,
|
||||
"%s",Txt_RECORD_FIELD_VISIBILITY_MENU[Vis]);
|
||||
}
|
||||
|
@ -403,7 +404,8 @@ void Rec_ShowFormCreateRecordField (void)
|
|||
{
|
||||
VisUnsigned = (unsigned) Vis;
|
||||
HTM_OPTION (HTM_Type_UNSIGNED,&VisUnsigned,
|
||||
Vis == Gbl.Crs.Records.Field.Visibility, // Selected?
|
||||
Vis == Gbl.Crs.Records.Field.Visibility ? HTM_OPTION_SELECTED :
|
||||
HTM_OPTION_UNSELECTED,
|
||||
HTM_OPTION_ENABLED,
|
||||
"%s",Txt_RECORD_FIELD_VISIBILITY_MENU[Vis]);
|
||||
}
|
||||
|
@ -1408,7 +1410,8 @@ static void Rec_ShowLinkToPrintPreviewOfRecords (void)
|
|||
i <= Rec_MAX_RECORDS_PER_PAGE;
|
||||
i++)
|
||||
HTM_OPTION (HTM_Type_UNSIGNED,&i,
|
||||
i == Gbl.Usrs.Listing.RecsPerPag, // Selected?
|
||||
i == Gbl.Usrs.Listing.RecsPerPag ? HTM_OPTION_SELECTED :
|
||||
HTM_OPTION_UNSELECTED,
|
||||
HTM_OPTION_ENABLED,
|
||||
"%u",i);
|
||||
HTM_SELECT_End ();
|
||||
|
@ -2791,7 +2794,8 @@ static void Rec_ShowRole (struct Usr_Data *UsrDat,
|
|||
{
|
||||
RoleUnsigned = (unsigned) Role;
|
||||
HTM_OPTION (HTM_Type_UNSIGNED,&RoleUnsigned,
|
||||
Role == DefaultRoleInForm, // Selected?
|
||||
Role == DefaultRoleInForm ? HTM_OPTION_SELECTED :
|
||||
HTM_OPTION_UNSELECTED,
|
||||
HTM_OPTION_ENABLED,
|
||||
"%s",Txt_ROLES_SINGUL_Abc[Role][UsrDat->Sex]);
|
||||
}
|
||||
|
@ -2858,7 +2862,7 @@ static void Rec_ShowRole (struct Usr_Data *UsrDat,
|
|||
case Rol_NET:
|
||||
RoleUnsigned = (unsigned) Gbl.Usrs.Me.Role.Logged;
|
||||
HTM_OPTION (HTM_Type_UNSIGNED,&RoleUnsigned,
|
||||
true, // Selected
|
||||
HTM_OPTION_SELECTED,
|
||||
HTM_OPTION_DISABLED,
|
||||
"%s",Txt_ROLES_SINGUL_Abc[Gbl.Usrs.Me.Role.Logged][UsrDat->Sex]);
|
||||
break;
|
||||
|
@ -2873,7 +2877,8 @@ static void Rec_ShowRole (struct Usr_Data *UsrDat,
|
|||
{
|
||||
RoleUnsigned = (unsigned) Role;
|
||||
HTM_OPTION (HTM_Type_UNSIGNED,&RoleUnsigned,
|
||||
Role == DefaultRoleInForm, // Selected?
|
||||
Role == DefaultRoleInForm ? HTM_OPTION_SELECTED :
|
||||
HTM_OPTION_UNSELECTED,
|
||||
HTM_OPTION_ENABLED,
|
||||
"%s",Txt_ROLES_SINGUL_Abc[Role][UsrDat->Sex]);
|
||||
}
|
||||
|
@ -2898,7 +2903,7 @@ static void Rec_ShowRole (struct Usr_Data *UsrDat,
|
|||
The_GetSuffix ());
|
||||
RoleUnsigned = (unsigned) DefaultRoleInForm;
|
||||
HTM_OPTION (HTM_Type_UNSIGNED,&RoleUnsigned,
|
||||
true, // Selected
|
||||
HTM_OPTION_SELECTED,
|
||||
HTM_OPTION_DISABLED,
|
||||
"%s",Txt_ROLES_SINGUL_Abc[DefaultRoleInForm][UsrDat->Sex]);
|
||||
HTM_SELECT_End ();
|
||||
|
@ -2941,7 +2946,8 @@ static void Rec_ShowRole (struct Usr_Data *UsrDat,
|
|||
{
|
||||
RoleUnsigned = (unsigned) Role;
|
||||
HTM_OPTION (HTM_Type_UNSIGNED,&RoleUnsigned,
|
||||
Role == DefaultRoleInForm, // Selected?
|
||||
Role == DefaultRoleInForm ? HTM_OPTION_SELECTED :
|
||||
HTM_OPTION_UNSELECTED,
|
||||
HTM_OPTION_ENABLED,
|
||||
"%s",Txt_ROLES_SINGUL_Abc[Role][Usr_SEX_UNKNOWN]);
|
||||
}
|
||||
|
@ -2961,7 +2967,7 @@ static void Rec_ShowRole (struct Usr_Data *UsrDat,
|
|||
The_GetSuffix ());
|
||||
RoleUnsigned = (unsigned) Rol_GST;
|
||||
HTM_OPTION (HTM_Type_UNSIGNED,&RoleUnsigned,
|
||||
true, // Selected
|
||||
HTM_OPTION_SELECTED,
|
||||
HTM_OPTION_ENABLED,
|
||||
"%s",Txt_ROLES_SINGUL_Abc[Rol_GST][Usr_SEX_UNKNOWN]);
|
||||
HTM_SELECT_End ();
|
||||
|
@ -3177,11 +3183,12 @@ static void Rec_ShowCountry (struct Usr_Data *UsrDat,bool PutForm)
|
|||
" required=\"required\"",
|
||||
The_GetSuffix ());
|
||||
HTM_OPTION (HTM_Type_STRING,"",
|
||||
false, // Not selected
|
||||
HTM_OPTION_UNSELECTED,
|
||||
HTM_OPTION_ENABLED,
|
||||
"%s",Txt_Country);
|
||||
HTM_OPTION (HTM_Type_STRING,"0",
|
||||
UsrDat->CtyCod == 0, // Selected?
|
||||
UsrDat->CtyCod == 0 ? HTM_OPTION_SELECTED :
|
||||
HTM_OPTION_UNSELECTED,
|
||||
HTM_OPTION_ENABLED,
|
||||
"%s",Txt_Another_country);
|
||||
for (NumCty = 0;
|
||||
|
@ -3190,7 +3197,8 @@ static void Rec_ShowCountry (struct Usr_Data *UsrDat,bool PutForm)
|
|||
{
|
||||
CtyInLst = &Gbl.Hierarchy.Ctys.Lst[NumCty];
|
||||
HTM_OPTION (HTM_Type_LONG,&CtyInLst->CtyCod,
|
||||
CtyInLst->CtyCod == UsrDat->CtyCod, // Selected?
|
||||
CtyInLst->CtyCod == UsrDat->CtyCod ? HTM_OPTION_SELECTED :
|
||||
HTM_OPTION_UNSELECTED,
|
||||
HTM_OPTION_ENABLED,
|
||||
"%s",CtyInLst->Name[Gbl.Prefs.Language]);
|
||||
}
|
||||
|
@ -3810,7 +3818,8 @@ static void Rec_ShowFormMyInsCtrDpt (bool IAmATeacher)
|
|||
" class=\"REC_C2_BOT_INPUT INPUT_%s\"",
|
||||
The_GetSuffix ());
|
||||
HTM_OPTION (HTM_Type_STRING,"-1",
|
||||
Gbl.Usrs.Me.UsrDat.InsCtyCod <= 0, // Selected?
|
||||
Gbl.Usrs.Me.UsrDat.InsCtyCod <= 0 ? HTM_OPTION_SELECTED :
|
||||
HTM_OPTION_UNSELECTED,
|
||||
HTM_OPTION_DISABLED,
|
||||
NULL);
|
||||
for (NumCty = 0;
|
||||
|
@ -3819,7 +3828,8 @@ static void Rec_ShowFormMyInsCtrDpt (bool IAmATeacher)
|
|||
{
|
||||
CtyInLst = &Gbl.Hierarchy.Ctys.Lst[NumCty];
|
||||
HTM_OPTION (HTM_Type_LONG,&CtyInLst->CtyCod,
|
||||
CtyInLst->CtyCod == Gbl.Usrs.Me.UsrDat.InsCtyCod, // Selected?
|
||||
CtyInLst->CtyCod == Gbl.Usrs.Me.UsrDat.InsCtyCod ? HTM_OPTION_SELECTED :
|
||||
HTM_OPTION_UNSELECTED,
|
||||
HTM_OPTION_ENABLED,
|
||||
"%s",CtyInLst->Name[Gbl.Prefs.Language]);
|
||||
}
|
||||
|
@ -3854,11 +3864,13 @@ static void Rec_ShowFormMyInsCtrDpt (bool IAmATeacher)
|
|||
" class=\"REC_C2_BOT_INPUT INPUT_%s\"",
|
||||
The_GetSuffix ());
|
||||
HTM_OPTION (HTM_Type_STRING,"-1",
|
||||
Gbl.Usrs.Me.UsrDat.InsCod < 0, // Selected?
|
||||
Gbl.Usrs.Me.UsrDat.InsCod < 0 ? HTM_OPTION_SELECTED :
|
||||
HTM_OPTION_UNSELECTED,
|
||||
HTM_OPTION_DISABLED,
|
||||
NULL);
|
||||
HTM_OPTION (HTM_Type_STRING,"0",
|
||||
Gbl.Usrs.Me.UsrDat.InsCod == 0, // Selected?
|
||||
Gbl.Usrs.Me.UsrDat.InsCod == 0 ? HTM_OPTION_SELECTED :
|
||||
HTM_OPTION_UNSELECTED,
|
||||
HTM_OPTION_ENABLED,
|
||||
"%s",Txt_Another_institution);
|
||||
for (NumIns = 0;
|
||||
|
@ -3867,7 +3879,8 @@ static void Rec_ShowFormMyInsCtrDpt (bool IAmATeacher)
|
|||
{
|
||||
InsInLst = &Gbl.Hierarchy.Inss.Lst[NumIns];
|
||||
HTM_OPTION (HTM_Type_LONG,&InsInLst->InsCod,
|
||||
InsInLst->InsCod == Gbl.Usrs.Me.UsrDat.InsCod, // Selected?
|
||||
InsInLst->InsCod == Gbl.Usrs.Me.UsrDat.InsCod ? HTM_OPTION_SELECTED :
|
||||
HTM_OPTION_UNSELECTED,
|
||||
HTM_OPTION_ENABLED,
|
||||
"%s",InsInLst->FullName);
|
||||
}
|
||||
|
@ -3903,11 +3916,13 @@ static void Rec_ShowFormMyInsCtrDpt (bool IAmATeacher)
|
|||
" class=\"REC_C2_BOT_INPUT INPUT_%s\"",
|
||||
The_GetSuffix ());
|
||||
HTM_OPTION (HTM_Type_STRING,"-1",
|
||||
Gbl.Usrs.Me.UsrDat.Tch.CtrCod < 0, // Selected?
|
||||
Gbl.Usrs.Me.UsrDat.Tch.CtrCod < 0 ? HTM_OPTION_SELECTED :
|
||||
HTM_OPTION_UNSELECTED,
|
||||
HTM_OPTION_DISABLED,
|
||||
NULL);
|
||||
HTM_OPTION (HTM_Type_STRING,"0",
|
||||
Gbl.Usrs.Me.UsrDat.Tch.CtrCod == 0, // Selected?
|
||||
Gbl.Usrs.Me.UsrDat.Tch.CtrCod == 0 ? HTM_OPTION_SELECTED :
|
||||
HTM_OPTION_UNSELECTED,
|
||||
HTM_OPTION_ENABLED,
|
||||
Txt_Another_center);
|
||||
for (NumCtr = 0;
|
||||
|
@ -3916,7 +3931,8 @@ static void Rec_ShowFormMyInsCtrDpt (bool IAmATeacher)
|
|||
{
|
||||
CtrInLst = &Gbl.Hierarchy.Ctrs.Lst[NumCtr];
|
||||
HTM_OPTION (HTM_Type_LONG,&CtrInLst->CtrCod,
|
||||
CtrInLst->CtrCod == Gbl.Usrs.Me.UsrDat.Tch.CtrCod, // Selected?
|
||||
CtrInLst->CtrCod == Gbl.Usrs.Me.UsrDat.Tch.CtrCod ? HTM_OPTION_SELECTED :
|
||||
HTM_OPTION_UNSELECTED,
|
||||
HTM_OPTION_ENABLED,
|
||||
CtrInLst->FullName);
|
||||
}
|
||||
|
|
|
@ -492,7 +492,8 @@ void Rol_PutFormToChangeMyRole (const char *ClassSelect)
|
|||
{
|
||||
RoleUnsigned = (unsigned) Role;
|
||||
HTM_OPTION (HTM_Type_UNSIGNED,&RoleUnsigned,
|
||||
Role == Gbl.Usrs.Me.Role.Logged, // Selected?
|
||||
Role == Gbl.Usrs.Me.Role.Logged ? HTM_OPTION_SELECTED :
|
||||
HTM_OPTION_UNSELECTED,
|
||||
HTM_OPTION_ENABLED,
|
||||
"%s",Txt_ROLES_SINGUL_Abc[Role][Gbl.Usrs.Me.UsrDat.Sex]);
|
||||
}
|
||||
|
|
12
swad_room.c
12
swad_room.c
|
@ -771,13 +771,15 @@ static void Roo_PutSelectorBuilding (long BldCod,
|
|||
|
||||
/***** Option for no assigned building *****/
|
||||
HTM_OPTION (HTM_Type_STRING,"-1",
|
||||
BldCod < 0, // Selected?
|
||||
BldCod < 0 ? HTM_OPTION_SELECTED :
|
||||
HTM_OPTION_UNSELECTED,
|
||||
HTM_OPTION_ENABLED,
|
||||
"%s",Txt_No_assigned_building);
|
||||
|
||||
/***** Option for another room *****/
|
||||
HTM_OPTION (HTM_Type_STRING,"0",
|
||||
BldCod == 0, // Selected?
|
||||
BldCod == 0 ? HTM_OPTION_SELECTED :
|
||||
HTM_OPTION_UNSELECTED,
|
||||
HTM_OPTION_ENABLED,
|
||||
"%s",Txt_Another_building);
|
||||
|
||||
|
@ -788,7 +790,8 @@ static void Roo_PutSelectorBuilding (long BldCod,
|
|||
{
|
||||
BldInLst = &Buildings->Lst[NumBld];
|
||||
HTM_OPTION (HTM_Type_LONG,&BldInLst->BldCod,
|
||||
BldCod == BldInLst->BldCod, // Selected?
|
||||
BldCod == BldInLst->BldCod ? HTM_OPTION_SELECTED :
|
||||
HTM_OPTION_UNSELECTED,
|
||||
HTM_OPTION_ENABLED,
|
||||
"%s",BldInLst->ShrtName);
|
||||
}
|
||||
|
@ -817,7 +820,8 @@ static void Roo_PutSelectorType (Roo_RoomType_t RoomType,
|
|||
Type <= (Roo_RoomType_t) (Roo_NUM_TYPES - 1);
|
||||
Type++)
|
||||
HTM_OPTION (HTM_Type_UNSIGNED,&Type,
|
||||
Type == RoomType, // Selected?
|
||||
Type == RoomType ? HTM_OPTION_SELECTED :
|
||||
HTM_OPTION_UNSELECTED,
|
||||
HTM_OPTION_ENABLED,
|
||||
"%s",Txt_ROOM_TYPES[Type]);
|
||||
|
||||
|
|
81
swad_scope.c
81
swad_scope.c
|
@ -55,12 +55,30 @@ void Sco_PutSelectorScope (const char *ParName,HTM_SubmitOnChange_t SubmitOnChan
|
|||
HieLvl_Level_t Scope;
|
||||
unsigned ScopeUnsigned;
|
||||
bool WriteScope;
|
||||
static const char **TxtScope[HieLvl_NUM_LEVELS] =
|
||||
{
|
||||
[HieLvl_SYS] = &Txt_System,
|
||||
[HieLvl_CTY] = &Txt_Country,
|
||||
[HieLvl_INS] = &Txt_Institution,
|
||||
[HieLvl_CTR] = &Txt_Center,
|
||||
[HieLvl_DEG] = &Txt_Degree,
|
||||
[HieLvl_CRS] = &Txt_Course,
|
||||
};
|
||||
const char *TxtName[HieLvl_NUM_LEVELS] =
|
||||
{
|
||||
[HieLvl_SYS] = Cfg_PLATFORM_SHORT_NAME,
|
||||
[HieLvl_CTY] = Gbl.Hierarchy.Cty.Name[Gbl.Prefs.Language],
|
||||
[HieLvl_INS] = Gbl.Hierarchy.Ins.ShrtName,
|
||||
[HieLvl_CTR] = Gbl.Hierarchy.Ctr.ShrtName,
|
||||
[HieLvl_DEG] = Gbl.Hierarchy.Deg.ShrtName,
|
||||
[HieLvl_CRS] = Gbl.Hierarchy.Crs.ShrtName,
|
||||
};
|
||||
|
||||
HTM_SELECT_Begin (SubmitOnChange,NULL,
|
||||
"id=\"%s\" name=\"%s\" class=\"INPUT_%s\"",
|
||||
ParName,ParName,The_GetSuffix ());
|
||||
|
||||
for (Scope = (HieLvl_Level_t) 0;
|
||||
for (Scope = (HieLvl_Level_t) 1;
|
||||
Scope <= (HieLvl_Level_t) (HieLvl_NUM_LEVELS - 1);
|
||||
Scope++)
|
||||
if ((Gbl.Scope.Allowed & (1 << Scope)))
|
||||
|
@ -93,7 +111,6 @@ void Sco_PutSelectorScope (const char *ParName,HTM_SubmitOnChange_t SubmitOnChan
|
|||
WriteScope = true;
|
||||
break;
|
||||
default:
|
||||
Err_WrongScopeExit ();
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -101,60 +118,12 @@ void Sco_PutSelectorScope (const char *ParName,HTM_SubmitOnChange_t SubmitOnChan
|
|||
{
|
||||
/***** Write allowed option *****/
|
||||
ScopeUnsigned = (unsigned) Scope;
|
||||
switch (Scope)
|
||||
{
|
||||
case HieLvl_SYS:
|
||||
HTM_OPTION (HTM_Type_UNSIGNED,&ScopeUnsigned,
|
||||
Gbl.Scope.Current == Scope, // Selected?
|
||||
HTM_OPTION_ENABLED,
|
||||
"%s: %s",
|
||||
Txt_System,
|
||||
Cfg_PLATFORM_SHORT_NAME);
|
||||
break;
|
||||
case HieLvl_CTY:
|
||||
HTM_OPTION (HTM_Type_UNSIGNED,&ScopeUnsigned,
|
||||
Gbl.Scope.Current == Scope, // Selected?
|
||||
HTM_OPTION_ENABLED,
|
||||
"%s: %s",
|
||||
Txt_Country,
|
||||
Gbl.Hierarchy.Cty.Name[Gbl.Prefs.Language]);
|
||||
break;
|
||||
case HieLvl_INS:
|
||||
HTM_OPTION (HTM_Type_UNSIGNED,&ScopeUnsigned,
|
||||
Gbl.Scope.Current == Scope, // Selected?
|
||||
HTM_OPTION_ENABLED,
|
||||
"%s: %s",
|
||||
Txt_Institution,
|
||||
Gbl.Hierarchy.Ins.ShrtName);
|
||||
break;
|
||||
case HieLvl_CTR:
|
||||
HTM_OPTION (HTM_Type_UNSIGNED,&ScopeUnsigned,
|
||||
Gbl.Scope.Current == Scope, // Selected?
|
||||
HTM_OPTION_ENABLED,
|
||||
"%s: %s",
|
||||
Txt_Center,
|
||||
Gbl.Hierarchy.Ctr.ShrtName);
|
||||
break;
|
||||
case HieLvl_DEG:
|
||||
HTM_OPTION (HTM_Type_UNSIGNED,&ScopeUnsigned,
|
||||
Gbl.Scope.Current == Scope, // Selected?
|
||||
HTM_OPTION_ENABLED,
|
||||
"%s: %s",
|
||||
Txt_Degree,
|
||||
Gbl.Hierarchy.Deg.ShrtName);
|
||||
break;
|
||||
case HieLvl_CRS:
|
||||
HTM_OPTION (HTM_Type_UNSIGNED,&ScopeUnsigned,
|
||||
Gbl.Scope.Current == Scope, // Selected?
|
||||
HTM_OPTION_ENABLED,
|
||||
"%s: %s",
|
||||
Txt_Course,
|
||||
Gbl.Hierarchy.Crs.ShrtName);
|
||||
break;
|
||||
default:
|
||||
Err_WrongScopeExit ();
|
||||
break;
|
||||
}
|
||||
HTM_OPTION (HTM_Type_UNSIGNED,&ScopeUnsigned,
|
||||
Scope == Gbl.Scope.Current ? HTM_OPTION_SELECTED :
|
||||
HTM_OPTION_UNSELECTED,
|
||||
HTM_OPTION_ENABLED,
|
||||
"%s: %s",
|
||||
*TxtScope[Scope],TxtName[Scope]);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -200,7 +200,8 @@ static void Sch_PutFormToSearchWithWhatToSearchAndScope (HieLvl_Level_t DefaultS
|
|||
{
|
||||
WTS = (unsigned) WhatToSearch;
|
||||
HTM_OPTION (HTM_Type_UNSIGNED,&WTS,
|
||||
WhatToSearch == Search->WhatToSearch, // Selected?
|
||||
WhatToSearch == Search->WhatToSearch ? HTM_OPTION_SELECTED :
|
||||
HTM_OPTION_UNSELECTED,
|
||||
HTM_OPTION_ENABLED,
|
||||
"%s",*Titles[WhatToSearch]);
|
||||
}
|
||||
|
|
|
@ -370,7 +370,8 @@ static void Sta_PutFormCrsHits (struct Sta_Stats *Stats)
|
|||
{
|
||||
ClicksGroupedByUnsigned = (unsigned) ClicksGroupedBy;
|
||||
HTM_OPTION (HTM_Type_UNSIGNED,&ClicksGroupedByUnsigned,
|
||||
ClicksGroupedBy == Stats->ClicksGroupedBy, // Selected?
|
||||
ClicksGroupedBy == Stats->ClicksGroupedBy ? HTM_OPTION_SELECTED :
|
||||
HTM_OPTION_UNSELECTED,
|
||||
HTM_OPTION_ENABLED,
|
||||
"%s",Txt_STAT_CLICKS_GROUPED_BY[ClicksGroupedBy]);
|
||||
}
|
||||
|
@ -407,7 +408,8 @@ static void Sta_PutFormCrsHits (struct Sta_Stats *Stats)
|
|||
i < NUM_OPTIONS_ROWS_PER_PAGE;
|
||||
i++)
|
||||
HTM_OPTION (HTM_Type_UNSIGNED,&RowsPerPage[i],
|
||||
RowsPerPage[i] == Stats->RowsPerPage, // Selected?
|
||||
RowsPerPage[i] == Stats->RowsPerPage ? HTM_OPTION_SELECTED :
|
||||
HTM_OPTION_UNSELECTED,
|
||||
HTM_OPTION_ENABLED,
|
||||
"%u",RowsPerPage[i]);
|
||||
HTM_SELECT_End ();
|
||||
|
@ -519,7 +521,8 @@ static void Sta_PutFormGblHits (struct Sta_Stats *Stats)
|
|||
{
|
||||
RoleStatUnsigned = (unsigned) RoleStat;
|
||||
HTM_OPTION (HTM_Type_UNSIGNED,&RoleStatUnsigned,
|
||||
RoleStat == Stats->Role, // Selected?
|
||||
RoleStat == Stats->Role ? HTM_OPTION_SELECTED :
|
||||
HTM_OPTION_UNSELECTED,
|
||||
HTM_OPTION_ENABLED,
|
||||
"%s",Txt_ROLE_STATS[RoleStat]);
|
||||
}
|
||||
|
@ -580,7 +583,8 @@ static void Sta_PutFormGblHits (struct Sta_Stats *Stats)
|
|||
{
|
||||
ClicksGroupedByUnsigned = (unsigned) ClicksGroupedBy;
|
||||
HTM_OPTION (HTM_Type_UNSIGNED,&ClicksGroupedByUnsigned,
|
||||
ClicksGroupedBy == Stats->ClicksGroupedBy, // Selected?
|
||||
ClicksGroupedBy == Stats->ClicksGroupedBy ? HTM_OPTION_SELECTED :
|
||||
HTM_OPTION_UNSELECTED,
|
||||
HTM_OPTION_ENABLED,
|
||||
"%s",Txt_STAT_CLICKS_GROUPED_BY[ClicksGroupedBy]);
|
||||
}
|
||||
|
@ -661,7 +665,8 @@ static void Sta_WriteSelectorCountType (const struct Sta_Stats *Stats)
|
|||
{
|
||||
StatCountTypeUnsigned = (unsigned) StatCountType;
|
||||
HTM_OPTION (HTM_Type_UNSIGNED,&StatCountTypeUnsigned,
|
||||
StatCountType == Stats->CountType, // Selected?
|
||||
StatCountType == Stats->CountType ? HTM_OPTION_SELECTED :
|
||||
HTM_OPTION_UNSELECTED,
|
||||
HTM_OPTION_ENABLED,
|
||||
"%s",Txt_STAT_TYPE_COUNT_SMALL[StatCountType]);
|
||||
}
|
||||
|
@ -693,7 +698,8 @@ static void Sta_WriteSelectorAction (const struct Sta_Stats *Stats)
|
|||
" class=\"STAT_SEL INPUT_%s\"",
|
||||
The_GetSuffix ());
|
||||
HTM_OPTION (HTM_Type_STRING,"0",
|
||||
Stats->NumAction == 0, // Selected?
|
||||
Stats->NumAction == 0 ? HTM_OPTION_SELECTED :
|
||||
HTM_OPTION_UNSELECTED,
|
||||
HTM_OPTION_ENABLED,
|
||||
"%s",Txt_Any_action);
|
||||
for (Action = (Act_Action_t) 1;
|
||||
|
@ -703,7 +709,8 @@ static void Sta_WriteSelectorAction (const struct Sta_Stats *Stats)
|
|||
Tab = Act_GetTab (Act_GetSuperAction (Action));
|
||||
ActionUnsigned = (unsigned) Action;
|
||||
HTM_OPTION (HTM_Type_UNSIGNED,&ActionUnsigned,
|
||||
Action == Stats->NumAction, // Selected?
|
||||
Action == Stats->NumAction ? HTM_OPTION_SELECTED :
|
||||
HTM_OPTION_UNSELECTED,
|
||||
HTM_OPTION_ENABLED,
|
||||
"%u: %s > %s",
|
||||
(unsigned) Action,Txt_TABS_TXT[Tab],Act_GetActionText (Action));
|
||||
|
@ -1620,7 +1627,8 @@ static void Sta_ShowDistrAccessesPerDayAndHour (const struct Sta_Stats *Stats,
|
|||
{
|
||||
ColorTypeUnsigned = (unsigned) ColorType;
|
||||
HTM_OPTION (HTM_Type_UNSIGNED,&ColorTypeUnsigned,
|
||||
ColorType == SelectedColorType, // Selected?
|
||||
ColorType == SelectedColorType ? HTM_OPTION_SELECTED :
|
||||
HTM_OPTION_UNSELECTED,
|
||||
HTM_OPTION_ENABLED,
|
||||
"%s",Txt_STAT_COLOR_TYPES[ColorType]);
|
||||
}
|
||||
|
|
|
@ -398,15 +398,18 @@ static void TstPrn_WriteTF_AnsToFill (const struct TstPrn_PrintedQuestion *Print
|
|||
"name=\"Ans%010u\" class=\"INPUT_%s\"",
|
||||
QstInd,The_GetSuffix ());
|
||||
HTM_OPTION (HTM_Type_STRING,"" ,
|
||||
PrintedQuestion->StrAnswers[0] == '\0', // Selected?
|
||||
PrintedQuestion->StrAnswers[0] == '\0' ? HTM_OPTION_SELECTED :
|
||||
HTM_OPTION_UNSELECTED,
|
||||
HTM_OPTION_ENABLED,
|
||||
" ");
|
||||
HTM_OPTION (HTM_Type_STRING,"T",
|
||||
PrintedQuestion->StrAnswers[0] == 'T', // Selected?
|
||||
PrintedQuestion->StrAnswers[0] == 'T' ? HTM_OPTION_SELECTED :
|
||||
HTM_OPTION_UNSELECTED,
|
||||
HTM_OPTION_ENABLED,
|
||||
"%s",Txt_TF_QST[0]);
|
||||
HTM_OPTION (HTM_Type_STRING,"F",
|
||||
PrintedQuestion->StrAnswers[0] == 'F', // Selected?
|
||||
PrintedQuestion->StrAnswers[0] == 'F' ? HTM_OPTION_SELECTED :
|
||||
HTM_OPTION_UNSELECTED,
|
||||
HTM_OPTION_ENABLED,
|
||||
"%s",Txt_TF_QST[1]);
|
||||
HTM_SELECT_End ();
|
||||
|
|
|
@ -1526,7 +1526,8 @@ static void Tmt_TimeTableDrawCellEdit (const struct Tmt_Timetable *Timetable,
|
|||
((Timetable->View == Tmt_CRS_EDIT) && (CT == Tmt_LECTURE || CT == Tmt_PRACTICAL)) ||
|
||||
((Timetable->View == Tmt_TUT_EDIT) && (CT == Tmt_TUTORING)))
|
||||
HTM_OPTION (HTM_Type_STRING,Tmt_DB_ClassType[CT],
|
||||
CT == ClassType, // Selected?
|
||||
CT == ClassType ? HTM_OPTION_SELECTED :
|
||||
HTM_OPTION_UNSELECTED,
|
||||
HTM_OPTION_ENABLED,
|
||||
"%s",Txt_TIMETABLE_CLASS_TYPES[CT]);
|
||||
HTM_SELECT_End ();
|
||||
|
@ -1574,7 +1575,8 @@ static void Tmt_TimeTableDrawCellEdit (const struct Tmt_Timetable *Timetable,
|
|||
Timetable->Config.Range.MinutesPerInterval) < 0) // Minutes
|
||||
Err_NotEnoughMemoryExit ();
|
||||
HTM_OPTION (HTM_Type_STRING,TTDur,
|
||||
Dur == DurationNumIntervals, // Selected?
|
||||
Dur == DurationNumIntervals ? HTM_OPTION_SELECTED :
|
||||
HTM_OPTION_UNSELECTED,
|
||||
HTM_OPTION_ENABLED,
|
||||
"%s",TTDur);
|
||||
free (TTDur);
|
||||
|
@ -1601,7 +1603,8 @@ static void Tmt_TimeTableDrawCellEdit (const struct Tmt_Timetable *Timetable,
|
|||
CellStr,Par_CodeStr[ParCod_Grp],
|
||||
The_GetSuffix ());
|
||||
HTM_OPTION (HTM_Type_STRING,"-1",
|
||||
GrpCod <= 0, // Selected?
|
||||
GrpCod <= 0 ? HTM_OPTION_SELECTED :
|
||||
HTM_OPTION_UNSELECTED,
|
||||
HTM_OPTION_ENABLED,
|
||||
"%s",Txt_All_groups);
|
||||
for (NumGrpTyp = 0;
|
||||
|
@ -1626,7 +1629,8 @@ static void Tmt_TimeTableDrawCellEdit (const struct Tmt_Timetable *Timetable,
|
|||
Err_NotEnoughMemoryExit ();
|
||||
}
|
||||
HTM_OPTION (HTM_Type_LONG,&Grp->GrpCod,
|
||||
GrpCod == Grp->GrpCod, // Selected?
|
||||
GrpCod == Grp->GrpCod ? HTM_OPTION_SELECTED :
|
||||
HTM_OPTION_UNSELECTED,
|
||||
HTM_OPTION_ENABLED,
|
||||
"%s %s%s",
|
||||
GrpTyp->GrpTypName,Grp->GrpName,Room);
|
||||
|
|
|
@ -6227,7 +6227,8 @@ void Usr_PutSelectorNumColsClassPhoto (void)
|
|||
Cols <= Usr_CLASS_PHOTO_COLS_MAX;
|
||||
Cols++)
|
||||
HTM_OPTION (HTM_Type_UNSIGNED,&Cols,
|
||||
Cols == Gbl.Usrs.ClassPhoto.Cols, // Selected?
|
||||
Cols == Gbl.Usrs.ClassPhoto.Cols ? HTM_OPTION_SELECTED :
|
||||
HTM_OPTION_UNSELECTED,
|
||||
HTM_OPTION_ENABLED,
|
||||
"%u",Cols);
|
||||
|
||||
|
|
Loading…
Reference in New Issue