mirror of
https://github.com/acanas/swad-core.git
synced 2024-06-30 04:15:54 +02:00
Version 15.32.2
This commit is contained in:
parent
885947ebb2
commit
69d7c6e575
10
js/swad.js
10
js/swad.js
|
@ -49,7 +49,7 @@ function writeLocalDateFromUTC(id,TimeUTC) {
|
||||||
Day = d.getDate();
|
Day = d.getDate();
|
||||||
StrMon = ((Mon < 10) ? '0' : '') + Mon;
|
StrMon = ((Mon < 10) ? '0' : '') + Mon;
|
||||||
StrDay = ((Day < 10) ? '0' : '') + Day;
|
StrDay = ((Day < 10) ? '0' : '') + Day;
|
||||||
document.getElementById(id).innerHTML = Yea + '/' + StrMon + '/' + StrDay;
|
document.getElementById(id).innerHTML = Yea + '-' + StrMon + '-' + StrDay;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*************** Write a date-time in client local time **********************/
|
/*************** Write a date-time in client local time **********************/
|
||||||
|
@ -83,9 +83,9 @@ function writeLocalDateTimeFromUTC(id,TimeUTC,separator) {
|
||||||
StrHou = ((Hou < 10) ? '0' : '') + Hou;
|
StrHou = ((Hou < 10) ? '0' : '') + Hou;
|
||||||
StrMin = ((Min < 10) ? '0' : '') + Min;
|
StrMin = ((Min < 10) ? '0' : '') + Min;
|
||||||
StrSec = ((Sec < 10) ? '0' : '') + Sec;
|
StrSec = ((Sec < 10) ? '0' : '') + Sec;
|
||||||
document.getElementById(id).innerHTML = Yea + '/' + StrMon + '/' + StrDay +
|
document.getElementById(id).innerHTML = Yea + '-' + StrMon + '-' + StrDay +
|
||||||
separator +
|
separator +
|
||||||
StrHou + ':' + StrMin + ':' + StrSec;
|
StrHou + ':' + StrMin + ':' + StrSec;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set local date-time form fields from UTC time
|
// Set local date-time form fields from UTC time
|
||||||
|
@ -318,7 +318,7 @@ function writeLocalClock() {
|
||||||
Hou = d.getHours();
|
Hou = d.getHours();
|
||||||
Min = d.getMinutes();
|
Min = d.getMinutes();
|
||||||
StrMin = ((Min < 10) ? '0' : '') + Min;
|
StrMin = ((Min < 10) ? '0' : '') + Min;
|
||||||
document.getElementById('hm').innerHTML = Day + ' ' + Months[Mon] + ', ' + Hou + ':' + StrMin;
|
document.getElementById('hm').innerHTML = Months[Mon] + ' ' + Day + ', ' + Hou + ':' + StrMin;
|
||||||
}
|
}
|
||||||
|
|
||||||
function writeClockConnected() {
|
function writeClockConnected() {
|
||||||
|
|
|
@ -916,14 +916,11 @@ void Ban_WriteMenuWithBanners (void)
|
||||||
Act_FormStart (ActClkBan);
|
Act_FormStart (ActClkBan);
|
||||||
Ban_PutParamBanCod (Gbl.Banners.Lst[NumBan].BanCod);
|
Ban_PutParamBanCod (Gbl.Banners.Lst[NumBan].BanCod);
|
||||||
Par_PutHiddenParamString ("URL",Gbl.Banners.Lst[NumBan].WWW);
|
Par_PutHiddenParamString ("URL",Gbl.Banners.Lst[NumBan].WWW);
|
||||||
fprintf (Gbl.F.Out,"<a href=\"\" title=\"%s\""
|
Act_LinkFormSubmit (Gbl.Banners.Lst[NumBan].FullName,"BANNER");
|
||||||
" onclick=\"document.getElementById('%s').submit();\">"
|
fprintf (Gbl.F.Out,"<img src=\"%s/%s/%s\""
|
||||||
"<img src=\"%s/%s/%s\""
|
|
||||||
" alt=\"%s\" title=\"%s\""
|
" alt=\"%s\" title=\"%s\""
|
||||||
" class=\"BANNER\" />"
|
" class=\"BANNER\" />"
|
||||||
"</a>",
|
"</a>",
|
||||||
Gbl.Banners.Lst[NumBan].FullName,
|
|
||||||
Gbl.FormId,
|
|
||||||
Cfg_HTTPS_URL_SWAD_PUBLIC,Cfg_FOLDER_BANNER,
|
Cfg_HTTPS_URL_SWAD_PUBLIC,Cfg_FOLDER_BANNER,
|
||||||
Gbl.Banners.Lst[NumBan].Img,
|
Gbl.Banners.Lst[NumBan].Img,
|
||||||
Gbl.Banners.Lst[NumBan].ShortName,
|
Gbl.Banners.Lst[NumBan].ShortName,
|
||||||
|
|
|
@ -104,17 +104,19 @@
|
||||||
// TODO: System admin should be able to remove/edit user's mail (when he/she detects a recipient does not exists, for example)
|
// TODO: System admin should be able to remove/edit user's mail (when he/she detects a recipient does not exists, for example)
|
||||||
// TODO: When a new assignment/attendance/survey is incorrect, the second time the form is shown, it should be filled with partial data, now is always empty
|
// TODO: When a new assignment/attendance/survey is incorrect, the second time the form is shown, it should be filled with partial data, now is always empty
|
||||||
// TODO: Global announcements should be available for all users?
|
// TODO: Global announcements should be available for all users?
|
||||||
// TODO: Dates in Holidays should be shown in big-endian
|
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/****************************** Public constants *****************************/
|
/****************************** Public constants *****************************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
#define Log_PLATFORM_VERSION "SWAD 15.32 (2015/10/30)"
|
#define Log_PLATFORM_VERSION "SWAD 15.32.2 (2015/10/31)"
|
||||||
|
|
||||||
// Number of lines (includes comments but not blank lines) has been got with the following command:
|
// Number of lines (includes comments but not blank lines) has been got with the following command:
|
||||||
// nl swad*.c swad*.h css/swad*.css py/swad*.py js/swad*.js soap/swad*.h sql/swad*.sql | tail -1
|
// nl swad*.c swad*.h css/swad*.css py/swad*.py js/swad*.js soap/swad*.h sql/swad*.sql | tail -1
|
||||||
/*
|
/*
|
||||||
|
Version 15.32.2: Oct 31, 2015 Fixed bug in form submit. (186618 lines)
|
||||||
|
Version 15.32.1: Oct 31, 2015 Dates in holidays are shown in big-endian.
|
||||||
|
All dates are now shown in ISO 8601 format (YYYY-MM-DD). (186627 lines)
|
||||||
Version 15.32: Oct 30, 2015 Code refactoring and cleaning related to calendar. (186617 lines)
|
Version 15.32: Oct 30, 2015 Code refactoring and cleaning related to calendar. (186617 lines)
|
||||||
Version 15.31: Oct 30, 2015 Calendar is drawn in browser using JavaScript. (186902 lines)
|
Version 15.31: Oct 30, 2015 Calendar is drawn in browser using JavaScript. (186902 lines)
|
||||||
Version 15.30: Oct 30, 2015 Current month is drawn in browser using JavaScript. (186795 lines)
|
Version 15.30: Oct 30, 2015 Current month is drawn in browser using JavaScript. (186795 lines)
|
||||||
|
|
115
swad_date.c
115
swad_date.c
|
@ -187,7 +187,8 @@ void Dat_ConvDateToDateStr (struct Date *Date,char *DateStr)
|
||||||
Date->Year == 0)
|
Date->Year == 0)
|
||||||
DateStr[0] = '\0';
|
DateStr[0] = '\0';
|
||||||
else
|
else
|
||||||
sprintf (DateStr,"%02u/%02u/%04u",Date->Day,Date->Month,Date->Year);
|
sprintf (DateStr,"%04u-%02u-%02u",
|
||||||
|
Date->Year,Date->Month,Date->Day);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
@ -567,64 +568,17 @@ void Dat_WriteFormDate (unsigned FirstYear,unsigned LastYear,
|
||||||
bool SubmitFormOnChange,bool Disabled)
|
bool SubmitFormOnChange,bool Disabled)
|
||||||
{
|
{
|
||||||
extern const char *Txt_MONTHS_SMALL[12];
|
extern const char *Txt_MONTHS_SMALL[12];
|
||||||
unsigned Day;
|
|
||||||
unsigned Month;
|
|
||||||
unsigned Year;
|
unsigned Year;
|
||||||
|
unsigned Month;
|
||||||
|
unsigned Day;
|
||||||
unsigned NumDaysSelectedMonth;
|
unsigned NumDaysSelectedMonth;
|
||||||
|
|
||||||
/***** Day *****/
|
/***** Start table *****/
|
||||||
fprintf (Gbl.F.Out,"<table>"
|
fprintf (Gbl.F.Out,"<table>"
|
||||||
"<tr>"
|
"<tr>");
|
||||||
"<td class=\"CENTER_MIDDLE\">"
|
|
||||||
"<select id=\"%sDay\" name=\"%sDay\"",
|
|
||||||
Id,Id);
|
|
||||||
if (SubmitFormOnChange)
|
|
||||||
fprintf (Gbl.F.Out," onchange=\"document.getElementById('%s').submit();\"",
|
|
||||||
Gbl.FormId);
|
|
||||||
if (Disabled)
|
|
||||||
fprintf (Gbl.F.Out," disabled=\"disabled\"");
|
|
||||||
fprintf (Gbl.F.Out,"><option value=\"0\">-</option>");
|
|
||||||
NumDaysSelectedMonth = (DateSelected->Month == 0) ? 31 :
|
|
||||||
((DateSelected->Month == 2) ? Dat_GetNumDaysFebruary (DateSelected->Year) :
|
|
||||||
Dat_NumDaysMonth[DateSelected->Month]);
|
|
||||||
for (Day = 1;
|
|
||||||
Day <= NumDaysSelectedMonth;
|
|
||||||
Day++)
|
|
||||||
{
|
|
||||||
fprintf (Gbl.F.Out,"<option value=\"%u\"",Day);
|
|
||||||
if (Day == DateSelected->Day)
|
|
||||||
fprintf (Gbl.F.Out," selected=\"selected\"");
|
|
||||||
fprintf (Gbl.F.Out,">%u</option>",Day);
|
|
||||||
}
|
|
||||||
|
|
||||||
/***** Month *****/
|
|
||||||
fprintf (Gbl.F.Out,"</select>"
|
|
||||||
"</td>"
|
|
||||||
"<td class=\"CENTER_MIDDLE\">"
|
|
||||||
"<select id=\"%sMonth\" name=\"%sMonth\""
|
|
||||||
" onchange=\"adjustDateForm('%s');",
|
|
||||||
Id,Id,Id);
|
|
||||||
if (SubmitFormOnChange)
|
|
||||||
fprintf (Gbl.F.Out,"document.getElementById('%s').submit();",
|
|
||||||
Gbl.FormId);
|
|
||||||
fprintf (Gbl.F.Out,"\"");
|
|
||||||
if (Disabled)
|
|
||||||
fprintf (Gbl.F.Out," disabled=\"disabled\"");
|
|
||||||
fprintf (Gbl.F.Out,"><option value=\"0\">-</option>");
|
|
||||||
for (Month = 1;
|
|
||||||
Month <= 12;
|
|
||||||
Month++)
|
|
||||||
{
|
|
||||||
fprintf (Gbl.F.Out,"<option value=\"%u\"",Month);
|
|
||||||
if (Month == DateSelected->Month)
|
|
||||||
fprintf (Gbl.F.Out," selected=\"selected\"");
|
|
||||||
fprintf (Gbl.F.Out,">%s</option>",Txt_MONTHS_SMALL[Month - 1]);
|
|
||||||
}
|
|
||||||
|
|
||||||
/***** Year *****/
|
/***** Year *****/
|
||||||
fprintf (Gbl.F.Out,"</select>"
|
fprintf (Gbl.F.Out,"<td class=\"CENTER_MIDDLE\">"
|
||||||
"</td>"
|
|
||||||
"<td class=\"CENTER_MIDDLE\">"
|
|
||||||
"<select id=\"%sYear\" name=\"%sYear\""
|
"<select id=\"%sYear\" name=\"%sYear\""
|
||||||
" onchange=\"adjustDateForm('%s');",
|
" onchange=\"adjustDateForm('%s');",
|
||||||
Id,Id,Id);
|
Id,Id,Id);
|
||||||
|
@ -645,8 +599,59 @@ void Dat_WriteFormDate (unsigned FirstYear,unsigned LastYear,
|
||||||
fprintf (Gbl.F.Out,">%u</option>",Year);
|
fprintf (Gbl.F.Out,">%u</option>",Year);
|
||||||
}
|
}
|
||||||
fprintf (Gbl.F.Out,"</select>"
|
fprintf (Gbl.F.Out,"</select>"
|
||||||
"</td>"
|
"</td>");
|
||||||
"</tr>"
|
|
||||||
|
/***** Month *****/
|
||||||
|
fprintf (Gbl.F.Out,"<td class=\"CENTER_MIDDLE\">"
|
||||||
|
"<select id=\"%sMonth\" name=\"%sMonth\""
|
||||||
|
" onchange=\"adjustDateForm('%s');",
|
||||||
|
Id,Id,Id);
|
||||||
|
if (SubmitFormOnChange)
|
||||||
|
fprintf (Gbl.F.Out,"document.getElementById('%s').submit();",
|
||||||
|
Gbl.FormId);
|
||||||
|
fprintf (Gbl.F.Out,"\"");
|
||||||
|
if (Disabled)
|
||||||
|
fprintf (Gbl.F.Out," disabled=\"disabled\"");
|
||||||
|
fprintf (Gbl.F.Out,"><option value=\"0\">-</option>");
|
||||||
|
for (Month = 1;
|
||||||
|
Month <= 12;
|
||||||
|
Month++)
|
||||||
|
{
|
||||||
|
fprintf (Gbl.F.Out,"<option value=\"%u\"",Month);
|
||||||
|
if (Month == DateSelected->Month)
|
||||||
|
fprintf (Gbl.F.Out," selected=\"selected\"");
|
||||||
|
fprintf (Gbl.F.Out,">%s</option>",Txt_MONTHS_SMALL[Month - 1]);
|
||||||
|
}
|
||||||
|
fprintf (Gbl.F.Out,"</select>"
|
||||||
|
"</td>");
|
||||||
|
|
||||||
|
/***** Day *****/
|
||||||
|
fprintf (Gbl.F.Out,"<td class=\"CENTER_MIDDLE\">"
|
||||||
|
"<select id=\"%sDay\" name=\"%sDay\"",
|
||||||
|
Id,Id);
|
||||||
|
if (SubmitFormOnChange)
|
||||||
|
fprintf (Gbl.F.Out," onchange=\"document.getElementById('%s').submit();\"",
|
||||||
|
Gbl.FormId);
|
||||||
|
if (Disabled)
|
||||||
|
fprintf (Gbl.F.Out," disabled=\"disabled\"");
|
||||||
|
fprintf (Gbl.F.Out,"><option value=\"0\">-</option>");
|
||||||
|
NumDaysSelectedMonth = (DateSelected->Month == 0) ? 31 :
|
||||||
|
((DateSelected->Month == 2) ? Dat_GetNumDaysFebruary (DateSelected->Year) :
|
||||||
|
Dat_NumDaysMonth[DateSelected->Month]);
|
||||||
|
for (Day = 1;
|
||||||
|
Day <= NumDaysSelectedMonth;
|
||||||
|
Day++)
|
||||||
|
{
|
||||||
|
fprintf (Gbl.F.Out,"<option value=\"%u\"",Day);
|
||||||
|
if (Day == DateSelected->Day)
|
||||||
|
fprintf (Gbl.F.Out," selected=\"selected\"");
|
||||||
|
fprintf (Gbl.F.Out,">%u</option>",Day);
|
||||||
|
}
|
||||||
|
fprintf (Gbl.F.Out,"</select>"
|
||||||
|
"</td>");
|
||||||
|
|
||||||
|
/***** End table *****/
|
||||||
|
fprintf (Gbl.F.Out,"</tr>"
|
||||||
"</table>");
|
"</table>");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
14
swad_exam.c
14
swad_exam.c
|
@ -983,10 +983,9 @@ static void Exa_ShowExamAnnouncement (long ExaCod,Exa_tTypeViewExamAnnouncement_
|
||||||
fprintf (Gbl.F.Out,"</select>");
|
fprintf (Gbl.F.Out,"</select>");
|
||||||
}
|
}
|
||||||
else if (Gbl.ExamAnnouncement.StartTime.Hour)
|
else if (Gbl.ExamAnnouncement.StartTime.Hour)
|
||||||
fprintf (Gbl.F.Out,"%2u:%02u %s",
|
fprintf (Gbl.F.Out,"%2u:%02u",
|
||||||
Gbl.ExamAnnouncement.StartTime.Hour,
|
Gbl.ExamAnnouncement.StartTime.Hour,
|
||||||
Gbl.ExamAnnouncement.StartTime.Minute,
|
Gbl.ExamAnnouncement.StartTime.Minute);
|
||||||
Txt_hours_ABBREVIATION);
|
|
||||||
fprintf (Gbl.F.Out,"</td>" \
|
fprintf (Gbl.F.Out,"</td>" \
|
||||||
"</tr>");
|
"</tr>");
|
||||||
|
|
||||||
|
@ -1242,14 +1241,13 @@ void Exa_GetNotifExamAnnouncement (char *SummaryStr,char **ContentStr,long ExaCo
|
||||||
Str_LimitLengthHTMLStr (Gbl.ExamAnnouncement.CrsFullName,MaxChars-(Cns_MAX_LENGTH_DATE+9));
|
Str_LimitLengthHTMLStr (Gbl.ExamAnnouncement.CrsFullName,MaxChars-(Cns_MAX_LENGTH_DATE+9));
|
||||||
|
|
||||||
/* Date of exam */
|
/* Date of exam */
|
||||||
sprintf (SummaryStr,"%s, %02u/%02u/%04u, %2u:%02u %s",
|
sprintf (SummaryStr,"%s, %04u-%02u-%02u %2u:%02u",
|
||||||
Gbl.ExamAnnouncement.CrsFullName,
|
Gbl.ExamAnnouncement.CrsFullName,
|
||||||
Gbl.ExamAnnouncement.ExamDate.Day,
|
|
||||||
Gbl.ExamAnnouncement.ExamDate.Month,
|
|
||||||
Gbl.ExamAnnouncement.ExamDate.Year,
|
Gbl.ExamAnnouncement.ExamDate.Year,
|
||||||
|
Gbl.ExamAnnouncement.ExamDate.Month,
|
||||||
|
Gbl.ExamAnnouncement.ExamDate.Day,
|
||||||
Gbl.ExamAnnouncement.StartTime.Hour,
|
Gbl.ExamAnnouncement.StartTime.Hour,
|
||||||
Gbl.ExamAnnouncement.StartTime.Minute,
|
Gbl.ExamAnnouncement.StartTime.Minute);
|
||||||
Txt_hours_ABBREVIATION);
|
|
||||||
|
|
||||||
/***** Free memory of the exam announcement *****/
|
/***** Free memory of the exam announcement *****/
|
||||||
Exa_FreeMemExamAnnouncement ();
|
Exa_FreeMemExamAnnouncement ();
|
||||||
|
|
|
@ -5513,10 +5513,7 @@ static void Brw_PutIconFileWithLinkToViewMetadata (unsigned Size,Brw_FileType_t
|
||||||
FileNameToShow);
|
FileNameToShow);
|
||||||
|
|
||||||
/* Link to the form and to the file */
|
/* Link to the form and to the file */
|
||||||
fprintf (Gbl.F.Out,"<a href=\"\" title=\"%s\" class=\"%s\""
|
Act_LinkFormSubmit (Gbl.Title,Gbl.FileBrowser.TxtStyle);
|
||||||
" onclick=\"document.getElementById('%s').submit();\">",
|
|
||||||
Gbl.Title,Gbl.FileBrowser.TxtStyle,
|
|
||||||
Gbl.FormId);
|
|
||||||
|
|
||||||
/***** Icon depending on the file extension *****/
|
/***** Icon depending on the file extension *****/
|
||||||
Brw_PutIconFile (Size,FileType,FileName);
|
Brw_PutIconFile (Size,FileType,FileName);
|
||||||
|
@ -5672,14 +5669,10 @@ static void Brw_WriteFileName (unsigned Level,bool IsPublic,Brw_FileType_t FileT
|
||||||
/* Link to the form and to the file */
|
/* Link to the form and to the file */
|
||||||
sprintf (Gbl.Title,(Gbl.FileBrowser.Type == Brw_SHOW_MARKS_CRS ||
|
sprintf (Gbl.Title,(Gbl.FileBrowser.Type == Brw_SHOW_MARKS_CRS ||
|
||||||
Gbl.FileBrowser.Type == Brw_SHOW_MARKS_GRP) ? Txt_Check_marks_in_file_X :
|
Gbl.FileBrowser.Type == Brw_SHOW_MARKS_GRP) ? Txt_Check_marks_in_file_X :
|
||||||
Txt_Download_FILE_OR_LINK_X,
|
Txt_Download_FILE_OR_LINK_X,
|
||||||
FileNameToShow);
|
FileNameToShow);
|
||||||
fprintf (Gbl.F.Out,"<a href=\"\" title=\"%s\" class=\"%s\""
|
Act_LinkFormSubmit (Gbl.Title,Gbl.FileBrowser.TxtStyle);
|
||||||
" onclick=\"document.getElementById('%s').submit();\">"
|
fprintf (Gbl.F.Out,"%s</a>",
|
||||||
"%s"
|
|
||||||
"</a>",
|
|
||||||
Gbl.Title,Gbl.FileBrowser.TxtStyle,
|
|
||||||
Gbl.FormId,
|
|
||||||
FileNameToShow);
|
FileNameToShow);
|
||||||
Act_FormEnd ();
|
Act_FormEnd ();
|
||||||
|
|
||||||
|
|
|
@ -103,7 +103,7 @@ void Hld_SeeHolidays (void)
|
||||||
Order <= Hld_ORDER_BY_START_DATE;
|
Order <= Hld_ORDER_BY_START_DATE;
|
||||||
Order++)
|
Order++)
|
||||||
{
|
{
|
||||||
fprintf (Gbl.F.Out,"<th class=\"CENTER_MIDDLE\">");
|
fprintf (Gbl.F.Out,"<th class=\"LEFT_MIDDLE\">");
|
||||||
Act_FormStart (ActSeeHld);
|
Act_FormStart (ActSeeHld);
|
||||||
Par_PutHiddenParamUnsigned ("Order",(unsigned) Order);
|
Par_PutHiddenParamUnsigned ("Order",(unsigned) Order);
|
||||||
Act_LinkFormSubmit (Txt_HOLIDAYS_HELP_ORDER[Order],"TIT_TBL");
|
Act_LinkFormSubmit (Txt_HOLIDAYS_HELP_ORDER[Order],"TIT_TBL");
|
||||||
|
@ -116,10 +116,10 @@ void Hld_SeeHolidays (void)
|
||||||
Act_FormEnd ();
|
Act_FormEnd ();
|
||||||
fprintf (Gbl.F.Out,"</th>");
|
fprintf (Gbl.F.Out,"</th>");
|
||||||
}
|
}
|
||||||
fprintf (Gbl.F.Out,"<th class=\"CENTER_MIDDLE\">"
|
fprintf (Gbl.F.Out,"<th class=\"LEFT_MIDDLE\">"
|
||||||
" %s "
|
" %s "
|
||||||
"</th>"
|
"</th>"
|
||||||
"<th class=\"CENTER_MIDDLE\">"
|
"<th class=\"LEFT_MIDDLE\">"
|
||||||
"%s"
|
"%s"
|
||||||
"</th>"
|
"</th>"
|
||||||
"</tr>",
|
"</tr>",
|
||||||
|
@ -138,13 +138,13 @@ void Hld_SeeHolidays (void)
|
||||||
"</td>",
|
"</td>",
|
||||||
Gbl.Hlds.Lst[NumHld].PlcCod <= 0 ? Txt_All_places :
|
Gbl.Hlds.Lst[NumHld].PlcCod <= 0 ? Txt_All_places :
|
||||||
Gbl.Hlds.Lst[NumHld].PlaceFullName);
|
Gbl.Hlds.Lst[NumHld].PlaceFullName);
|
||||||
fprintf (Gbl.F.Out,"<td class=\"DAT CENTER_MIDDLE\">"
|
fprintf (Gbl.F.Out,"<td class=\"DAT LEFT_MIDDLE\">"
|
||||||
" %02u/%02u/%04u"
|
" %04u-%02u-%02u"
|
||||||
"</td>",
|
"</td>",
|
||||||
Gbl.Hlds.Lst[NumHld].StartDate.Day,
|
Gbl.Hlds.Lst[NumHld].StartDate.Year,
|
||||||
Gbl.Hlds.Lst[NumHld].StartDate.Month,
|
Gbl.Hlds.Lst[NumHld].StartDate.Month,
|
||||||
Gbl.Hlds.Lst[NumHld].StartDate.Year);
|
Gbl.Hlds.Lst[NumHld].StartDate.Day);
|
||||||
fprintf (Gbl.F.Out,"<td class=\"DAT CENTER_MIDDLE\">"
|
fprintf (Gbl.F.Out,"<td class=\"DAT LEFT_MIDDLE\">"
|
||||||
" ");
|
" ");
|
||||||
switch (Gbl.Hlds.Lst[NumHld].HldTyp)
|
switch (Gbl.Hlds.Lst[NumHld].HldTyp)
|
||||||
{
|
{
|
||||||
|
@ -152,14 +152,14 @@ void Hld_SeeHolidays (void)
|
||||||
fprintf (Gbl.F.Out,"-");
|
fprintf (Gbl.F.Out,"-");
|
||||||
break;
|
break;
|
||||||
case Hld_NON_SCHOOL_PERIOD:
|
case Hld_NON_SCHOOL_PERIOD:
|
||||||
fprintf (Gbl.F.Out,"%02u/%02u/%04u",
|
fprintf (Gbl.F.Out,"%04u-%02u-%02u",
|
||||||
Gbl.Hlds.Lst[NumHld].EndDate.Day,
|
Gbl.Hlds.Lst[NumHld].EndDate.Year,
|
||||||
Gbl.Hlds.Lst[NumHld].EndDate.Month,
|
Gbl.Hlds.Lst[NumHld].EndDate.Month,
|
||||||
Gbl.Hlds.Lst[NumHld].EndDate.Year);
|
Gbl.Hlds.Lst[NumHld].EndDate.Day);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
fprintf (Gbl.F.Out,"</td>"
|
fprintf (Gbl.F.Out,"</td>"
|
||||||
"<td class=\"DAT CENTER_MIDDLE\">"
|
"<td class=\"DAT LEFT_MIDDLE\">"
|
||||||
" %s"
|
" %s"
|
||||||
"</td>"
|
"</td>"
|
||||||
"</tr>",
|
"</tr>",
|
||||||
|
@ -808,12 +808,16 @@ static void Hld_ChangeDate (Hld_StartOrEndDate_t StartOrEndDate)
|
||||||
|
|
||||||
/***** Update the date in database *****/
|
/***** Update the date in database *****/
|
||||||
sprintf (Query,"UPDATE holidays SET %s='%04u%02u%02u' WHERE HldCod='%ld'",
|
sprintf (Query,"UPDATE holidays SET %s='%04u%02u%02u' WHERE HldCod='%ld'",
|
||||||
StrStartOrEndDate,NewDate.Year,NewDate.Month,NewDate.Day,Hld->HldCod);
|
StrStartOrEndDate,
|
||||||
|
NewDate.Year,
|
||||||
|
NewDate.Month,
|
||||||
|
NewDate.Day,
|
||||||
|
Hld->HldCod);
|
||||||
DB_QueryUPDATE (Query,"can not update the date of a holiday");
|
DB_QueryUPDATE (Query,"can not update the date of a holiday");
|
||||||
|
|
||||||
/***** Write message to show the change made *****/
|
/***** Write message to show the change made *****/
|
||||||
sprintf (StrDate,"%02u/%02u/%04u",
|
sprintf (StrDate,"%04u-%02u-%02u",
|
||||||
NewDate.Day,NewDate.Month,NewDate.Year); // Change format depending on location
|
NewDate.Year,NewDate.Month,NewDate.Day); // Change format depending on location
|
||||||
sprintf (Gbl.Message,Txt_The_date_of_the_holiday_X_has_changed_to_Y,
|
sprintf (Gbl.Message,Txt_The_date_of_the_holiday_X_has_changed_to_Y,
|
||||||
Hld->Name,StrDate);
|
Hld->Name,StrDate);
|
||||||
Lay_ShowAlert (Lay_SUCCESS,Gbl.Message);
|
Lay_ShowAlert (Lay_SUCCESS,Gbl.Message);
|
||||||
|
@ -1121,8 +1125,12 @@ static void Hld_CreateHoliday (struct Holiday *Hld)
|
||||||
sprintf (Query,"INSERT INTO holidays (InsCod,PlcCod,HldTyp,StartDate,EndDate,Name)"
|
sprintf (Query,"INSERT INTO holidays (InsCod,PlcCod,HldTyp,StartDate,EndDate,Name)"
|
||||||
" VALUES ('%ld','%ld','%u','%04u%02u%02u','%04u%02u%02u','%s')",
|
" VALUES ('%ld','%ld','%u','%04u%02u%02u','%04u%02u%02u','%s')",
|
||||||
Gbl.CurrentIns.Ins.InsCod,Hld->PlcCod,(unsigned) Hld->HldTyp,
|
Gbl.CurrentIns.Ins.InsCod,Hld->PlcCod,(unsigned) Hld->HldTyp,
|
||||||
Hld->StartDate.Year,Hld->StartDate.Month,Hld->StartDate.Day,
|
Hld->StartDate.Year,
|
||||||
Hld->EndDate.Year,Hld->EndDate.Month,Hld->EndDate.Day,
|
Hld->StartDate.Month,
|
||||||
|
Hld->StartDate.Day,
|
||||||
|
Hld->EndDate.Year,
|
||||||
|
Hld->EndDate.Month,
|
||||||
|
Hld->EndDate.Day,
|
||||||
Hld->Name);
|
Hld->Name);
|
||||||
DB_QueryINSERT (Query,"can not create holiday");
|
DB_QueryINSERT (Query,"can not create holiday");
|
||||||
|
|
||||||
|
|
|
@ -1964,11 +1964,11 @@ static void Sta_ShowNumHitsPerDays (unsigned long NumRows,
|
||||||
/* Write the date */
|
/* Write the date */
|
||||||
fprintf (Gbl.F.Out,"<tr>"
|
fprintf (Gbl.F.Out,"<tr>"
|
||||||
"<td class=\"%s RIGHT_TOP\">"
|
"<td class=\"%s RIGHT_TOP\">"
|
||||||
"%02u/%02u/%02u "
|
"%04u-%02u-%02u "
|
||||||
"</td>",
|
"</td>",
|
||||||
NumDayWeek == 6 ? "LOG_R" :
|
NumDayWeek == 6 ? "LOG_R" :
|
||||||
"LOG",
|
"LOG",
|
||||||
Date.Day,Date.Month,Date.Year % 100);
|
Date.Year,Date.Month,Date.Day);
|
||||||
|
|
||||||
/* Write the day of the week */
|
/* Write the day of the week */
|
||||||
fprintf (Gbl.F.Out,"<td class=\"%s LEFT_TOP\">"
|
fprintf (Gbl.F.Out,"<td class=\"%s LEFT_TOP\">"
|
||||||
|
@ -2002,11 +2002,11 @@ static void Sta_ShowNumHitsPerDays (unsigned long NumRows,
|
||||||
/* Write the date */
|
/* Write the date */
|
||||||
fprintf (Gbl.F.Out,"<tr>"
|
fprintf (Gbl.F.Out,"<tr>"
|
||||||
"<td class=\"%s RIGHT_TOP\">"
|
"<td class=\"%s RIGHT_TOP\">"
|
||||||
"%02u/%02u/%02u "
|
"%04u-%02u-%02u "
|
||||||
"</td>",
|
"</td>",
|
||||||
NumDayWeek == 6 ? "LOG_R" :
|
NumDayWeek == 6 ? "LOG_R" :
|
||||||
"LOG",
|
"LOG",
|
||||||
Date.Day,Date.Month,Date.Year % 100);
|
Date.Year,Date.Month,Date.Day);
|
||||||
|
|
||||||
/* Write the day of the week */
|
/* Write the day of the week */
|
||||||
fprintf (Gbl.F.Out,"<td class=\"%s LEFT_TOP\">"
|
fprintf (Gbl.F.Out,"<td class=\"%s LEFT_TOP\">"
|
||||||
|
@ -2186,11 +2186,11 @@ static void Sta_ShowDistrAccessesPerDaysAndHour (unsigned long NumRows,MYSQL_RES
|
||||||
/* Write the date */
|
/* Write the date */
|
||||||
fprintf (Gbl.F.Out,"<tr>"
|
fprintf (Gbl.F.Out,"<tr>"
|
||||||
"<td class=\"%s RIGHT_TOP\">"
|
"<td class=\"%s RIGHT_TOP\">"
|
||||||
"%02u/%02u/%02u "
|
"%04u-%02u-%02u "
|
||||||
"</td>",
|
"</td>",
|
||||||
NumDayWeek == 6 ? "LOG_R" :
|
NumDayWeek == 6 ? "LOG_R" :
|
||||||
"LOG",
|
"LOG",
|
||||||
Date.Day,Date.Month,Date.Year % 100);
|
Date.Year,Date.Month,Date.Day);
|
||||||
|
|
||||||
/* Write the day of the week */
|
/* Write the day of the week */
|
||||||
fprintf (Gbl.F.Out,"<td class=\"%s LEFT_TOP\">"
|
fprintf (Gbl.F.Out,"<td class=\"%s LEFT_TOP\">"
|
||||||
|
@ -2236,11 +2236,11 @@ static void Sta_ShowDistrAccessesPerDaysAndHour (unsigned long NumRows,MYSQL_RES
|
||||||
/* Write the date */
|
/* Write the date */
|
||||||
fprintf (Gbl.F.Out,"<tr>"
|
fprintf (Gbl.F.Out,"<tr>"
|
||||||
"<td class=\"%s RIGHT_TOP\">"
|
"<td class=\"%s RIGHT_TOP\">"
|
||||||
"%02u/%02u/%02u "
|
"%04u-%02u-%02u "
|
||||||
"</td>",
|
"</td>",
|
||||||
NumDayWeek == 6 ? "LOG_R" :
|
NumDayWeek == 6 ? "LOG_R" :
|
||||||
"LOG",
|
"LOG",
|
||||||
Date.Day,Date.Month,Date.Year % 100);
|
Date.Year,Date.Month,Date.Day);
|
||||||
|
|
||||||
/* Write the day of the week */
|
/* Write the day of the week */
|
||||||
fprintf (Gbl.F.Out,"<td class=\"%s LEFT_TOP\">"
|
fprintf (Gbl.F.Out,"<td class=\"%s LEFT_TOP\">"
|
||||||
|
@ -2274,11 +2274,11 @@ static void Sta_ShowDistrAccessesPerDaysAndHour (unsigned long NumRows,MYSQL_RES
|
||||||
/* Write the date */
|
/* Write the date */
|
||||||
fprintf (Gbl.F.Out,"<tr>"
|
fprintf (Gbl.F.Out,"<tr>"
|
||||||
"<td class=\"%s RIGHT_TOP\">"
|
"<td class=\"%s RIGHT_TOP\">"
|
||||||
"%02u/%02u/%02u "
|
"%04u-%02u-%02u "
|
||||||
"</td>",
|
"</td>",
|
||||||
NumDayWeek == 6 ? "LOG_R" :
|
NumDayWeek == 6 ? "LOG_R" :
|
||||||
"LOG",
|
"LOG",
|
||||||
Date.Day,Date.Month,Date.Year % 100);
|
Date.Year,Date.Month,Date.Day);
|
||||||
|
|
||||||
/* Write the day of the week */
|
/* Write the day of the week */
|
||||||
fprintf (Gbl.F.Out,"<td class=\"%s LEFT_TOP\">"
|
fprintf (Gbl.F.Out,"<td class=\"%s LEFT_TOP\">"
|
||||||
|
@ -2538,9 +2538,9 @@ static void Sta_ShowNumHitsPerWeeks (unsigned long NumRows,
|
||||||
/* Write week */
|
/* Write week */
|
||||||
fprintf (Gbl.F.Out,"<tr>"
|
fprintf (Gbl.F.Out,"<tr>"
|
||||||
"<td class=\"LOG RIGHT_TOP\">"
|
"<td class=\"LOG RIGHT_TOP\">"
|
||||||
"%02u/%02u "
|
"%04u-%02u "
|
||||||
"</td>",
|
"</td>",
|
||||||
Date.Week,Date.Year % 100);
|
Date.Year,Date.Week);
|
||||||
|
|
||||||
/* Draw bar proportional to number of pages generated */
|
/* Draw bar proportional to number of pages generated */
|
||||||
Sta_DrawBarNumHits ('c',
|
Sta_DrawBarNumHits ('c',
|
||||||
|
@ -2564,9 +2564,9 @@ static void Sta_ShowNumHitsPerWeeks (unsigned long NumRows,
|
||||||
/* Write week */
|
/* Write week */
|
||||||
fprintf (Gbl.F.Out,"<tr>"
|
fprintf (Gbl.F.Out,"<tr>"
|
||||||
"<td class=\"LOG RIGHT_TOP\">"
|
"<td class=\"LOG RIGHT_TOP\">"
|
||||||
"%02u/%02u "
|
"%04u-%02u "
|
||||||
"</td>",
|
"</td>",
|
||||||
Date.Week,Date.Year % 100);
|
Date.Year,Date.Week);
|
||||||
|
|
||||||
/* Draw bar proportional to number of pages generated */
|
/* Draw bar proportional to number of pages generated */
|
||||||
Sta_DrawBarNumHits ('c',0.0,Hits.Max,Hits.Total,500);
|
Sta_DrawBarNumHits ('c',0.0,Hits.Max,Hits.Total,500);
|
||||||
|
@ -2636,9 +2636,9 @@ static void Sta_ShowNumHitsPerMonths (unsigned long NumRows,
|
||||||
/* Write the month */
|
/* Write the month */
|
||||||
fprintf (Gbl.F.Out,"<tr>"
|
fprintf (Gbl.F.Out,"<tr>"
|
||||||
"<td class=\"LOG RIGHT_TOP\">"
|
"<td class=\"LOG RIGHT_TOP\">"
|
||||||
"%02u/%02u "
|
"%04u-%02u "
|
||||||
"</td>",
|
"</td>",
|
||||||
Date.Month,Date.Year % 100);
|
Date.Year,Date.Month);
|
||||||
|
|
||||||
/* Draw bar proportional to number of pages generated */
|
/* Draw bar proportional to number of pages generated */
|
||||||
Sta_DrawBarNumHits ('c',
|
Sta_DrawBarNumHits ('c',
|
||||||
|
@ -2661,9 +2661,9 @@ static void Sta_ShowNumHitsPerMonths (unsigned long NumRows,
|
||||||
/* Write the month */
|
/* Write the month */
|
||||||
fprintf (Gbl.F.Out,"<tr>"
|
fprintf (Gbl.F.Out,"<tr>"
|
||||||
"<td class=\"LOG RIGHT_TOP\">"
|
"<td class=\"LOG RIGHT_TOP\">"
|
||||||
"%02u/%02u "
|
"%04u-%02u "
|
||||||
"</td>",
|
"</td>",
|
||||||
Date.Month,Date.Year % 100);
|
Date.Year,Date.Month);
|
||||||
|
|
||||||
/* Draw bar proportional to number of pages generated */
|
/* Draw bar proportional to number of pages generated */
|
||||||
Sta_DrawBarNumHits ('c',0.0,Hits.Max,Hits.Total,500);
|
Sta_DrawBarNumHits ('c',0.0,Hits.Max,Hits.Total,500);
|
||||||
|
|
|
@ -607,7 +607,7 @@ static bool Tst_CheckIfNextTstAllowed (void)
|
||||||
Gbl.CurrentCrs.Crs.FullName,Hour,Minute,Second);
|
Gbl.CurrentCrs.Crs.FullName,Hour,Minute,Second);
|
||||||
else
|
else
|
||||||
sprintf (Gbl.Message,Txt_You_can_not_make_a_new_test_in_the_course_X_until_TIME_Y_on_DATE_Z,
|
sprintf (Gbl.Message,Txt_You_can_not_make_a_new_test_in_the_course_X_until_TIME_Y_on_DATE_Z,
|
||||||
Gbl.CurrentCrs.Crs.FullName,Hour,Minute,Second,Day,Month,Year);
|
Gbl.CurrentCrs.Crs.FullName,Hour,Minute,Second,Year,Month,Day);
|
||||||
Lay_ShowAlert (Lay_WARNING,Gbl.Message);
|
Lay_ShowAlert (Lay_WARNING,Gbl.Message);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
18
swad_text.c
18
swad_text.c
|
@ -49808,31 +49808,31 @@ const char *Txt_You_can_not_make_a_new_test_in_the_course_X_until_TIME_Y = // Wa
|
||||||
const char *Txt_You_can_not_make_a_new_test_in_the_course_X_until_TIME_Y_on_DATE_Z = // Warning: it is very important to include %s, five %02u and %04u in the following sentences
|
const char *Txt_You_can_not_make_a_new_test_in_the_course_X_until_TIME_Y_on_DATE_Z = // Warning: it is very important to include %s, five %02u and %04u in the following sentences
|
||||||
#if L==0
|
#if L==0
|
||||||
"No puede hacer un nuevo test en la asignatura <strong>%s</strong>"
|
"No puede hacer un nuevo test en la asignatura <strong>%s</strong>"
|
||||||
" hasta las %02uh%02u'%02u" del %02u/%02u/%04u"; // Necessita traduccio
|
" hasta las %02u:%02u:%02u del %04u-%02u-%02u"; // Necessita traduccio
|
||||||
#elif L==1
|
#elif L==1
|
||||||
"You can not make a new test in the course <strong>%s</strong>"
|
"You can not make a new test in the course <strong>%s</strong>"
|
||||||
" until %02uh%02u'%02u" on %02u/%02u/%04u"; // Need Übersetzung
|
" until %02u:%02u:%02u on %04u-%02u-%02u"; // Need Übersetzung
|
||||||
#elif L==2
|
#elif L==2
|
||||||
"You can not make a new test in the course <strong>%s</strong>"
|
"You can not make a new test in the course <strong>%s</strong>"
|
||||||
" until %02uh%02u'%02u" on %02u/%02u/%04u";
|
" until %02u:%02u:%02u on %04u-%02u-%02u";
|
||||||
#elif L==3
|
#elif L==3
|
||||||
"No puede hacer un nuevo test en la asignatura <strong>%s</strong>"
|
"No puede hacer un nuevo test en la asignatura <strong>%s</strong>"
|
||||||
" hasta las %02uh%02u'%02u" del %02u/%02u/%04u";
|
" hasta las %02u:%02u:%02u del %04u-%02u-%02u";
|
||||||
#elif L==4
|
#elif L==4
|
||||||
"You can not make a new test in the course <strong>%s</strong>"
|
"You can not make a new test in the course <strong>%s</strong>"
|
||||||
" until %02uh%02u'%02u" on %02u/%02u/%04u"; // Besoin de traduction
|
" until %02u:%02u:%02u on %04u-%02u-%02u"; // Besoin de traduction
|
||||||
#elif L==5
|
#elif L==5
|
||||||
"No puede hacer un nuevo test en la asignatura <strong>%s</strong>"
|
"No puede hacer un nuevo test en la asignatura <strong>%s</strong>"
|
||||||
" hasta las %02uh%02u'%02u" del %02u/%02u/%04u"; // Okoteve traducción
|
" hasta las %02u:%02u:%02u del %04u-%02u-%02u"; // Okoteve traducción
|
||||||
#elif L==6
|
#elif L==6
|
||||||
"Non puoi fare un nuovo test nel corso <strong>%s</strong>"
|
"Non puoi fare un nuovo test nel corso <strong>%s</strong>"
|
||||||
" fino al %02uh%02u'%02u" del %02u/%02u/%04u";
|
" fino al %02u:%02u:%02u del %04u-%02u-%02u";
|
||||||
#elif L==7
|
#elif L==7
|
||||||
"You can not make a new test in the course <strong>%s</strong>"
|
"You can not make a new test in the course <strong>%s</strong>"
|
||||||
" until %02uh%02u'%02u" on %02u/%02u/%04u"; // Potrzebujesz tlumaczenie
|
" until %02u:%02u:%02u on %04u-%02u-%02u"; // Potrzebujesz tlumaczenie
|
||||||
#elif L==8
|
#elif L==8
|
||||||
"You can not make a new test in the course <strong>%s</strong>"
|
"You can not make a new test in the course <strong>%s</strong>"
|
||||||
" until %02uh%02u'%02u" on %02u/%02u/%04u"; // Necessita de tradução
|
" until %02u:%02u:%02u on %04u-%02u-%02u"; // Necessita de tradução
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
const char *Txt_You_can_not_paste_file_or_folder_here =
|
const char *Txt_You_can_not_paste_file_or_folder_here =
|
||||||
|
|
Loading…
Reference in New Issue
Block a user