mirror of
https://github.com/acanas/swad-core.git
synced 2024-06-28 11:25:43 +02:00
Version19.54.7
This commit is contained in:
parent
4731e69f3f
commit
5ff423a22c
|
@ -490,7 +490,7 @@ enscript -2 --landscape --color --file-align=2 --highlight --line-numbers -o - *
|
||||||
En OpenSWAD:
|
En OpenSWAD:
|
||||||
ps2pdf source.ps destination.pdf
|
ps2pdf source.ps destination.pdf
|
||||||
*/
|
*/
|
||||||
#define Log_PLATFORM_VERSION "SWAD 19.54.6 (2019-11-06)"
|
#define Log_PLATFORM_VERSION "SWAD 19.54.7 (2019-11-06)"
|
||||||
#define CSS_FILE "swad19.47.css"
|
#define CSS_FILE "swad19.47.css"
|
||||||
#define JS_FILE "swad19.39.js"
|
#define JS_FILE "swad19.39.js"
|
||||||
/*
|
/*
|
||||||
|
@ -498,6 +498,7 @@ ps2pdf source.ps destination.pdf
|
||||||
// TODO: Impedir la creación y edición de proyectos si no son editables.
|
// TODO: Impedir la creación y edición de proyectos si no son editables.
|
||||||
// TODO: Importante: filtrar proyectos por usuarios (igual que en trabajos o en asistencia)
|
// TODO: Importante: filtrar proyectos por usuarios (igual que en trabajos o en asistencia)
|
||||||
|
|
||||||
|
Version 19.54.7: Nov 05, 2019 Code refactoring in HTML select options. (245923 lines)
|
||||||
Version 19.54.6: Nov 05, 2019 Code refactoring in HTML select options. (245941 lines)
|
Version 19.54.6: Nov 05, 2019 Code refactoring in HTML select options. (245941 lines)
|
||||||
Version 19.54.5: Nov 05, 2019 Code refactoring in HTML select options. (245985 lines)
|
Version 19.54.5: Nov 05, 2019 Code refactoring in HTML select options. (245985 lines)
|
||||||
Version 19.54.4: Nov 05, 2019 Code refactoring in HTML select options. (246023 lines)
|
Version 19.54.4: Nov 05, 2019 Code refactoring in HTML select options. (246023 lines)
|
||||||
|
|
60
swad_exam.c
60
swad_exam.c
|
@ -1124,20 +1124,13 @@ static void Exa_ShowExamAnnouncement (long ExaCod,
|
||||||
for (Year = 0;
|
for (Year = 0;
|
||||||
Year <= Deg_MAX_YEARS_PER_DEGREE;
|
Year <= Deg_MAX_YEARS_PER_DEGREE;
|
||||||
Year++)
|
Year++)
|
||||||
{
|
HTM_OPTION (HTM_Type_UNSIGNED,&Year,
|
||||||
fprintf (Gbl.F.Out,"<option");
|
Gbl.ExamAnns.ExaDat.Year == Year,false,
|
||||||
if (Gbl.ExamAnns.ExaDat.Year == Year)
|
"%s",Txt_YEAR_OF_DEGREE[Year]);
|
||||||
fprintf (Gbl.F.Out," selected=\"selected\"");
|
|
||||||
fprintf (Gbl.F.Out," value=\"%u\">"
|
|
||||||
"%s"
|
|
||||||
"</option>",
|
|
||||||
Year,Txt_YEAR_OF_DEGREE[Year]);
|
|
||||||
}
|
|
||||||
HTM_SELECT_End ();
|
HTM_SELECT_End ();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
fprintf (Gbl.F.Out,"%s",
|
fprintf (Gbl.F.Out,"%s",Txt_YEAR_OF_DEGREE[Gbl.ExamAnns.ExaDat.Year]);
|
||||||
Txt_YEAR_OF_DEGREE[Gbl.ExamAnns.ExaDat.Year]);
|
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
|
|
||||||
HTM_TR_End ();
|
HTM_TR_End ();
|
||||||
|
@ -1200,20 +1193,15 @@ static void Exa_ShowExamAnnouncement (long ExaCod,
|
||||||
{
|
{
|
||||||
HTM_SELECT_Begin (false,
|
HTM_SELECT_Begin (false,
|
||||||
"name=\"ExamHour\"");
|
"name=\"ExamHour\"");
|
||||||
fprintf (Gbl.F.Out,"<option value=\"0\"");
|
HTM_OPTION (HTM_Type_STRING,"0",
|
||||||
if (Gbl.ExamAnns.ExaDat.StartTime.Hour == 0)
|
Gbl.ExamAnns.ExaDat.StartTime.Hour == 0,false,
|
||||||
fprintf (Gbl.F.Out," selected=\"selected\"");
|
"-");
|
||||||
fprintf (Gbl.F.Out,">-</option>");
|
|
||||||
for (Hour = 7;
|
for (Hour = 7;
|
||||||
Hour <= 22;
|
Hour <= 22;
|
||||||
Hour++)
|
Hour++)
|
||||||
{
|
HTM_OPTION (HTM_Type_UNSIGNED,&Hour,
|
||||||
fprintf (Gbl.F.Out,"<option value=\"%u\"",Hour);
|
Gbl.ExamAnns.ExaDat.StartTime.Hour == Hour,false,
|
||||||
if (Gbl.ExamAnns.ExaDat.StartTime.Hour == Hour)
|
"%02u %s",Hour,Txt_hours_ABBREVIATION);
|
||||||
fprintf (Gbl.F.Out," selected=\"selected\"");
|
|
||||||
fprintf (Gbl.F.Out,">%02u %s</option>",
|
|
||||||
Hour,Txt_hours_ABBREVIATION);
|
|
||||||
}
|
|
||||||
HTM_SELECT_End ();
|
HTM_SELECT_End ();
|
||||||
|
|
||||||
HTM_SELECT_Begin (false,
|
HTM_SELECT_Begin (false,
|
||||||
|
@ -1221,12 +1209,9 @@ static void Exa_ShowExamAnnouncement (long ExaCod,
|
||||||
for (Minute = 0;
|
for (Minute = 0;
|
||||||
Minute <= 59;
|
Minute <= 59;
|
||||||
Minute++)
|
Minute++)
|
||||||
{
|
HTM_OPTION (HTM_Type_UNSIGNED,&Minute,
|
||||||
fprintf (Gbl.F.Out,"<option value=\"%u\"",Minute);
|
Gbl.ExamAnns.ExaDat.StartTime.Minute == Minute,false,
|
||||||
if (Gbl.ExamAnns.ExaDat.StartTime.Minute == Minute)
|
"%02u '",Minute);
|
||||||
fprintf (Gbl.F.Out," selected=\"selected\"");
|
|
||||||
fprintf (Gbl.F.Out,">%02u '</option>",Minute);
|
|
||||||
}
|
|
||||||
HTM_SELECT_End ();
|
HTM_SELECT_End ();
|
||||||
}
|
}
|
||||||
else if (Gbl.ExamAnns.ExaDat.StartTime.Hour)
|
else if (Gbl.ExamAnns.ExaDat.StartTime.Hour)
|
||||||
|
@ -1252,13 +1237,9 @@ static void Exa_ShowExamAnnouncement (long ExaCod,
|
||||||
for (Hour = 0;
|
for (Hour = 0;
|
||||||
Hour <= 8;
|
Hour <= 8;
|
||||||
Hour++)
|
Hour++)
|
||||||
{
|
HTM_OPTION (HTM_Type_UNSIGNED,&Hour,
|
||||||
fprintf (Gbl.F.Out,"<option value=\"%u\"",Hour);
|
Gbl.ExamAnns.ExaDat.Duration.Hour == Hour,false,
|
||||||
if (Gbl.ExamAnns.ExaDat.Duration.Hour == Hour)
|
"%02u %s",Hour,Txt_hours_ABBREVIATION);
|
||||||
fprintf (Gbl.F.Out," selected=\"selected\"");
|
|
||||||
fprintf (Gbl.F.Out,">%02u %s</option>",
|
|
||||||
Hour,Txt_hours_ABBREVIATION);
|
|
||||||
}
|
|
||||||
HTM_SELECT_End ();
|
HTM_SELECT_End ();
|
||||||
|
|
||||||
HTM_SELECT_Begin (false,
|
HTM_SELECT_Begin (false,
|
||||||
|
@ -1266,12 +1247,9 @@ static void Exa_ShowExamAnnouncement (long ExaCod,
|
||||||
for (Minute = 0;
|
for (Minute = 0;
|
||||||
Minute <= 59;
|
Minute <= 59;
|
||||||
Minute++)
|
Minute++)
|
||||||
{
|
HTM_OPTION (HTM_Type_UNSIGNED,&Minute,
|
||||||
fprintf (Gbl.F.Out,"<option value=\"%u\"",Minute);
|
Gbl.ExamAnns.ExaDat.Duration.Minute == Minute,false,
|
||||||
if (Gbl.ExamAnns.ExaDat.Duration.Minute == Minute)
|
"%02u '",Minute);
|
||||||
fprintf (Gbl.F.Out," selected=\"selected\"");
|
|
||||||
fprintf (Gbl.F.Out,">%02u '</option>",Minute);
|
|
||||||
}
|
|
||||||
HTM_SELECT_End ();
|
HTM_SELECT_End ();
|
||||||
}
|
}
|
||||||
else if (Gbl.ExamAnns.ExaDat.Duration.Hour ||
|
else if (Gbl.ExamAnns.ExaDat.Duration.Hour ||
|
||||||
|
|
|
@ -9370,6 +9370,7 @@ void Brw_ShowFileMetadata (void)
|
||||||
bool ShowPhoto;
|
bool ShowPhoto;
|
||||||
char PhotoURL[PATH_MAX + 1];
|
char PhotoURL[PATH_MAX + 1];
|
||||||
Brw_License_t License;
|
Brw_License_t License;
|
||||||
|
unsigned LicenseUnsigned;
|
||||||
|
|
||||||
/***** Get parameters related to file browser *****/
|
/***** Get parameters related to file browser *****/
|
||||||
Brw_GetParAndInitFileBrowser ();
|
Brw_GetParAndInitFileBrowser ();
|
||||||
|
@ -9577,17 +9578,12 @@ void Brw_ShowFileMetadata (void)
|
||||||
{
|
{
|
||||||
HTM_SELECT_Begin (false,
|
HTM_SELECT_Begin (false,
|
||||||
"id=\"PublicFile\" name=\"PublicFile\"");
|
"id=\"PublicFile\" name=\"PublicFile\"");
|
||||||
|
HTM_OPTION (HTM_Type_STRING,"N",
|
||||||
fprintf (Gbl.F.Out,"<option value=\"N\"");
|
!FileMetadata.IsPublic,false,
|
||||||
if (!FileMetadata.IsPublic)
|
"%s",Txt_Private_available_to_certain_users_identified);
|
||||||
fprintf (Gbl.F.Out," selected=\"selected\"");
|
HTM_OPTION (HTM_Type_STRING,"Y",
|
||||||
fprintf (Gbl.F.Out,">%s</option>",Txt_Private_available_to_certain_users_identified);
|
FileMetadata.IsPublic,false,
|
||||||
|
"%s",Txt_Public_open_educational_resource_OER_for_everyone);
|
||||||
fprintf (Gbl.F.Out,"<option value=\"Y\"");
|
|
||||||
if (FileMetadata.IsPublic)
|
|
||||||
fprintf (Gbl.F.Out," selected=\"selected\"");
|
|
||||||
fprintf (Gbl.F.Out,">%s</option>",Txt_Public_open_educational_resource_OER_for_everyone);
|
|
||||||
|
|
||||||
HTM_SELECT_End ();
|
HTM_SELECT_End ();
|
||||||
}
|
}
|
||||||
else // I can not edit file properties
|
else // I can not edit file properties
|
||||||
|
@ -9617,10 +9613,10 @@ void Brw_ShowFileMetadata (void)
|
||||||
License < Brw_NUM_LICENSES;
|
License < Brw_NUM_LICENSES;
|
||||||
License++)
|
License++)
|
||||||
{
|
{
|
||||||
fprintf (Gbl.F.Out,"<option value=\"%u\"",(unsigned) License);
|
LicenseUnsigned = (unsigned) License;
|
||||||
if (License == FileMetadata.License)
|
HTM_OPTION (HTM_Type_UNSIGNED,&LicenseUnsigned,
|
||||||
fprintf (Gbl.F.Out," selected=\"selected\"");
|
License == FileMetadata.License,false,
|
||||||
fprintf (Gbl.F.Out,">%s</option>",Txt_LICENSES[License]);
|
"%s",Txt_LICENSES[License]);
|
||||||
}
|
}
|
||||||
HTM_SELECT_End ();
|
HTM_SELECT_End ();
|
||||||
}
|
}
|
||||||
|
@ -12140,12 +12136,9 @@ void Brw_AskRemoveOldFiles (void)
|
||||||
for (Months = Brw_MIN_MONTHS_TO_REMOVE_OLD_FILES;
|
for (Months = Brw_MIN_MONTHS_TO_REMOVE_OLD_FILES;
|
||||||
Months <= Brw_MAX_MONTHS_IN_BRIEFCASE;
|
Months <= Brw_MAX_MONTHS_IN_BRIEFCASE;
|
||||||
Months++)
|
Months++)
|
||||||
{
|
HTM_OPTION (HTM_Type_UNSIGNED,&Months,
|
||||||
fprintf (Gbl.F.Out,"<option");
|
Months == Brw_DEF_MONTHS_TO_REMOVE_OLD_FILES,false,
|
||||||
if (Months == Brw_DEF_MONTHS_TO_REMOVE_OLD_FILES)
|
"%u",Months);
|
||||||
fprintf (Gbl.F.Out," selected=\"selected\"");
|
|
||||||
fprintf (Gbl.F.Out,">%u</option>",Months);
|
|
||||||
}
|
|
||||||
HTM_SELECT_End ();
|
HTM_SELECT_End ();
|
||||||
fprintf (Gbl.F.Out," ");
|
fprintf (Gbl.F.Out," ");
|
||||||
fprintf (Gbl.F.Out,Txt_Remove_files_older_than_PART_2_OF_2,
|
fprintf (Gbl.F.Out,Txt_Remove_files_older_than_PART_2_OF_2,
|
||||||
|
|
49
swad_photo.c
49
swad_photo.c
|
@ -1783,6 +1783,7 @@ static void Pho_PutSelectorForTypeOfAvg (void)
|
||||||
extern const char *Txt_Average_type;
|
extern const char *Txt_Average_type;
|
||||||
extern const char *Txt_AVERAGE_PHOTO_TYPES[Pho_NUM_AVERAGE_PHOTO_TYPES];
|
extern const char *Txt_AVERAGE_PHOTO_TYPES[Pho_NUM_AVERAGE_PHOTO_TYPES];
|
||||||
Pho_AvgPhotoTypeOfAverage_t TypeOfAvg;
|
Pho_AvgPhotoTypeOfAverage_t TypeOfAvg;
|
||||||
|
unsigned TypeOfAvgUnsigned;
|
||||||
|
|
||||||
HTM_TR_Begin (NULL);
|
HTM_TR_Begin (NULL);
|
||||||
|
|
||||||
|
@ -1803,10 +1804,10 @@ static void Pho_PutSelectorForTypeOfAvg (void)
|
||||||
TypeOfAvg < Pho_NUM_AVERAGE_PHOTO_TYPES;
|
TypeOfAvg < Pho_NUM_AVERAGE_PHOTO_TYPES;
|
||||||
TypeOfAvg++)
|
TypeOfAvg++)
|
||||||
{
|
{
|
||||||
fprintf (Gbl.F.Out,"<option value=\"%u\"",(unsigned) TypeOfAvg);
|
TypeOfAvgUnsigned = (unsigned) TypeOfAvg;
|
||||||
if (TypeOfAvg == Gbl.Stat.DegPhotos.TypeOfAverage)
|
HTM_OPTION (HTM_Type_UNSIGNED,&TypeOfAvgUnsigned,
|
||||||
fprintf (Gbl.F.Out," selected=\"selected\"");
|
TypeOfAvg == Gbl.Stat.DegPhotos.TypeOfAverage,false,
|
||||||
fprintf (Gbl.F.Out,">%s</option>",Txt_AVERAGE_PHOTO_TYPES[TypeOfAvg]);
|
"%s",Txt_AVERAGE_PHOTO_TYPES[TypeOfAvg]);
|
||||||
}
|
}
|
||||||
HTM_SELECT_End ();
|
HTM_SELECT_End ();
|
||||||
Frm_EndForm ();
|
Frm_EndForm ();
|
||||||
|
@ -1847,6 +1848,7 @@ static void Pho_PutSelectorForHowComputePhotoSize (void)
|
||||||
extern const char *Txt_Size_of_photos;
|
extern const char *Txt_Size_of_photos;
|
||||||
extern const char *Txt_STAT_DEGREE_PHOTO_SIZE[Pho_NUM_HOW_COMPUTE_PHOTO_SIZES];
|
extern const char *Txt_STAT_DEGREE_PHOTO_SIZE[Pho_NUM_HOW_COMPUTE_PHOTO_SIZES];
|
||||||
Pho_HowComputePhotoSize_t PhoSi;
|
Pho_HowComputePhotoSize_t PhoSi;
|
||||||
|
unsigned PhoSiUnsigned;
|
||||||
|
|
||||||
HTM_TR_Begin (NULL);
|
HTM_TR_Begin (NULL);
|
||||||
|
|
||||||
|
@ -1867,10 +1869,10 @@ static void Pho_PutSelectorForHowComputePhotoSize (void)
|
||||||
PhoSi < Pho_NUM_HOW_COMPUTE_PHOTO_SIZES;
|
PhoSi < Pho_NUM_HOW_COMPUTE_PHOTO_SIZES;
|
||||||
PhoSi++)
|
PhoSi++)
|
||||||
{
|
{
|
||||||
fprintf (Gbl.F.Out,"<option value=\"%u\"",(unsigned) PhoSi);
|
PhoSiUnsigned = (unsigned) PhoSi;
|
||||||
if (PhoSi == Gbl.Stat.DegPhotos.HowComputePhotoSize)
|
HTM_OPTION (HTM_Type_UNSIGNED,&PhoSiUnsigned,
|
||||||
fprintf (Gbl.F.Out," selected=\"selected\"");
|
PhoSi == Gbl.Stat.DegPhotos.HowComputePhotoSize,false,
|
||||||
fprintf (Gbl.F.Out,">%s</option>",Txt_STAT_DEGREE_PHOTO_SIZE[PhoSi]);
|
"%s",Txt_STAT_DEGREE_PHOTO_SIZE[PhoSi]);
|
||||||
}
|
}
|
||||||
HTM_SELECT_End ();
|
HTM_SELECT_End ();
|
||||||
Frm_EndForm ();
|
Frm_EndForm ();
|
||||||
|
@ -1911,6 +1913,7 @@ static void Pho_PutSelectorForHowOrderDegrees (void)
|
||||||
extern const char *Txt_Sort_degrees_by;
|
extern const char *Txt_Sort_degrees_by;
|
||||||
extern const char *Txt_STAT_DEGREE_PHOTO_ORDER[Pho_NUM_HOW_ORDER_DEGREES];
|
extern const char *Txt_STAT_DEGREE_PHOTO_ORDER[Pho_NUM_HOW_ORDER_DEGREES];
|
||||||
Pho_HowOrderDegrees_t Order;
|
Pho_HowOrderDegrees_t Order;
|
||||||
|
unsigned OrderUnsigned;
|
||||||
|
|
||||||
HTM_TR_Begin (NULL);
|
HTM_TR_Begin (NULL);
|
||||||
|
|
||||||
|
@ -1931,10 +1934,10 @@ static void Pho_PutSelectorForHowOrderDegrees (void)
|
||||||
Order < Pho_NUM_HOW_ORDER_DEGREES;
|
Order < Pho_NUM_HOW_ORDER_DEGREES;
|
||||||
Order++)
|
Order++)
|
||||||
{
|
{
|
||||||
fprintf (Gbl.F.Out,"<option value=\"%u\"",(unsigned) Order);
|
OrderUnsigned = (unsigned) Order;
|
||||||
if (Order == Gbl.Stat.DegPhotos.HowOrderDegrees)
|
HTM_OPTION (HTM_Type_UNSIGNED,&OrderUnsigned,
|
||||||
fprintf (Gbl.F.Out," selected=\"selected\"");
|
Order == Gbl.Stat.DegPhotos.HowOrderDegrees,false,
|
||||||
fprintf (Gbl.F.Out,">%s</option>",Txt_STAT_DEGREE_PHOTO_ORDER[Order]);
|
"%s",Txt_STAT_DEGREE_PHOTO_ORDER[Order]);
|
||||||
}
|
}
|
||||||
HTM_SELECT_End ();
|
HTM_SELECT_End ();
|
||||||
Frm_EndForm ();
|
Frm_EndForm ();
|
||||||
|
@ -1997,6 +2000,8 @@ static void Pho_PutLinkToCalculateDegreeStats (void)
|
||||||
struct Degree Deg;
|
struct Degree Deg;
|
||||||
long EstimatedTimeToComputeAvgPhotoInMicroseconds;
|
long EstimatedTimeToComputeAvgPhotoInMicroseconds;
|
||||||
char StrEstimatedTimeToComputeAvgPhoto[Dat_MAX_BYTES_TIME + 1];
|
char StrEstimatedTimeToComputeAvgPhoto[Dat_MAX_BYTES_TIME + 1];
|
||||||
|
bool Selected;
|
||||||
|
bool Disabled;
|
||||||
|
|
||||||
if ((Deg.DegCod = Pho_GetDegWithAvgPhotoLeastRecentlyUpdated ()) > 0)
|
if ((Deg.DegCod = Pho_GetDegWithAvgPhotoLeastRecentlyUpdated ()) > 0)
|
||||||
{
|
{
|
||||||
|
@ -2037,15 +2042,17 @@ static void Pho_PutLinkToCalculateDegreeStats (void)
|
||||||
Sta_WriteTime (StrEstimatedTimeToComputeAvgPhoto,
|
Sta_WriteTime (StrEstimatedTimeToComputeAvgPhoto,
|
||||||
EstimatedTimeToComputeAvgPhotoInMicroseconds);
|
EstimatedTimeToComputeAvgPhotoInMicroseconds);
|
||||||
|
|
||||||
fprintf (Gbl.F.Out,"<option value=\"%ld\"%s>%s (%s: %s)</option>",
|
Selected = (Degs.Lst[NumDeg].DegCod == Deg.DegCod);
|
||||||
Degs.Lst[NumDeg].DegCod,
|
if (Selected)
|
||||||
Degs.Lst[NumDeg].DegCod == Deg.DegCod ? " selected=\"selected\"" :
|
Disabled = false;
|
||||||
((Pho_GetTimeAvgPhotoWasComputed (Degs.Lst[NumDeg].DegCod) >=
|
else
|
||||||
Gbl.StartExecutionTimeUTC - Cfg_MIN_TIME_TO_RECOMPUTE_AVG_PHOTO) ? " disabled=\"disabled\"" :
|
// Too recently computed ?
|
||||||
""),
|
Disabled = Pho_GetTimeAvgPhotoWasComputed (Degs.Lst[NumDeg].DegCod) >=
|
||||||
Degs.Lst[NumDeg].ShrtName,
|
Gbl.StartExecutionTimeUTC - Cfg_MIN_TIME_TO_RECOMPUTE_AVG_PHOTO;
|
||||||
Txt_time,
|
HTM_OPTION (HTM_Type_LONG,&Degs.Lst[NumDeg].DegCod,Selected,Disabled,
|
||||||
StrEstimatedTimeToComputeAvgPhoto);
|
"%s (%s: %s)",
|
||||||
|
Degs.Lst[NumDeg].ShrtName,
|
||||||
|
Txt_time,StrEstimatedTimeToComputeAvgPhoto);
|
||||||
}
|
}
|
||||||
HTM_SELECT_End ();
|
HTM_SELECT_End ();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user