mirror of
https://github.com/acanas/swad-core.git
synced 2024-06-12 19:54:05 +02:00
Version 16.205
This commit is contained in:
parent
756ac27652
commit
40ef386c36
|
@ -1215,6 +1215,7 @@ a:hover /* Default ==> underlined */
|
||||||
color:#4D88A1;
|
color:#4D88A1;
|
||||||
font-size:9pt;
|
font-size:9pt;
|
||||||
white-space:nowrap;
|
white-space:nowrap;
|
||||||
|
text-transform:uppercase;
|
||||||
}
|
}
|
||||||
.DAY_WRK_HEAD
|
.DAY_WRK_HEAD
|
||||||
{
|
{
|
|
@ -39,7 +39,7 @@ var countClockConnected = 0;
|
||||||
/****************** Write a date in client local time ************************/
|
/****************** Write a date in client local time ************************/
|
||||||
//id is the id of the HTML element in which date will be written
|
//id is the id of the HTML element in which date will be written
|
||||||
//TimeUTC is the date-time to write in UTC UNIX time format
|
//TimeUTC is the date-time to write in UTC UNIX time format
|
||||||
|
/*
|
||||||
function writeLocalDateFromUTC (id,TimeUTC,StrToday) {
|
function writeLocalDateFromUTC (id,TimeUTC,StrToday) {
|
||||||
var today = new Date();
|
var today = new Date();
|
||||||
var todayYea = today.getFullYear();
|
var todayYea = today.getFullYear();
|
||||||
|
@ -66,13 +66,17 @@ function writeLocalDateFromUTC (id,TimeUTC,StrToday) {
|
||||||
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 **********************/
|
||||||
// id is the id of the HTML element in which date-time will be written
|
// id is the id of the HTML element in which date-time will be written
|
||||||
// TimeUTC is the date-time to write in UTC UNIX time format
|
// TimeUTC is the date-time to write in UTC UNIX time format
|
||||||
|
// DateFormat:
|
||||||
|
// Dat_FORMAT_YYYY_MM_DD = 0
|
||||||
|
// Dat_FORMAT_DD_MONTH_YYYY = 1
|
||||||
|
// Dat_FORMAT_MONTH_DD_YYYY = 2
|
||||||
// separator is HTML code to write between date and time
|
// separator is HTML code to write between date and time
|
||||||
|
|
||||||
function writeLocalDateHMSFromUTC (id,TimeUTC,Separator,StrToday,
|
function writeLocalDateHMSFromUTC (id,TimeUTC,DateFormat,Separator,StrToday,
|
||||||
WriteDateOnSameDay,WriteWeekDay,WriteSeconds) {
|
WriteDateOnSameDay,WriteWeekDay,WriteSeconds) {
|
||||||
// HMS: Hour, Minutes, Seconds
|
// HMS: Hour, Minutes, Seconds
|
||||||
var today = new Date();
|
var today = new Date();
|
||||||
|
@ -111,16 +115,43 @@ function writeLocalDateHMSFromUTC (id,TimeUTC,Separator,StrToday,
|
||||||
|
|
||||||
/* Set date */
|
/* Set date */
|
||||||
if (WriteDate) {
|
if (WriteDate) {
|
||||||
StrMon = ((Mon < 10) ? '-0' : '-') + Mon;
|
switch (DateFormat) {
|
||||||
StrDay = ((Day < 10) ? '-0' : '-') + Day;
|
case 0: // Dat_FORMAT_YYYY_MM_DD
|
||||||
|
StrMon = ((Mon < 10) ? '0' : '') + Mon;
|
||||||
|
break;
|
||||||
|
case 1: // Dat_FORMAT_DD_MONTH_YYYY
|
||||||
|
StrMon = MonthsShort[Mon - 1];
|
||||||
|
break;
|
||||||
|
case 2: // Dat_FORMAT_MONTH_DD_YYYY
|
||||||
|
StrMon = MonthsShort[Mon - 1];
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
StrMon = '';
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
StrDay = ((Day < 10) ? '0' : '') + Day;
|
||||||
|
|
||||||
if (Yea == todayYea &&
|
if (Yea == todayYea &&
|
||||||
Mon == todayMon &&
|
Mon == todayMon &&
|
||||||
Day == todayDay && // Today
|
Day == todayDay && // Today
|
||||||
StrToday.length)
|
StrToday.length)
|
||||||
StrDate = StrToday;
|
StrDate = StrToday;
|
||||||
else
|
else {
|
||||||
StrDate = Yea.toString() + StrMon + StrDay;
|
switch (DateFormat) {
|
||||||
|
case 0: // Dat_FORMAT_YYYY_MM_DD
|
||||||
|
StrDate = Yea.toString() + '-' + StrMon + '-' + StrDay;
|
||||||
|
break;
|
||||||
|
case 1: // Dat_FORMAT_DD_MONTH_YYYY
|
||||||
|
StrDate = StrDay + ' ' + StrMon + ' ' + Yea.toString();
|
||||||
|
break;
|
||||||
|
case 2: // Dat_FORMAT_MONTH_DD_YYYY
|
||||||
|
StrDate = StrMon + ' ' + StrDay + ', ' + Yea.toString();
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
StrDate = '';
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (WriteWeekDay) {
|
if (WriteWeekDay) {
|
||||||
DayOfWeek = d.getDay();
|
DayOfWeek = d.getDay();
|
||||||
|
@ -1096,7 +1127,7 @@ function DrawMonth (id,FirstDayOfWeek,YearToDraw,MonthToDraw,CurrentMonth,Curren
|
||||||
'<a href="" class="MONTH" onclick="document.getElementById(\'' + FormId +
|
'<a href="" class="MONTH" onclick="document.getElementById(\'' + FormId +
|
||||||
'\').submit();return false;">';
|
'\').submit();return false;">';
|
||||||
}
|
}
|
||||||
Gbl_HTMLContent += MONTHS_CAPS[MonthToDraw - 1] + ' ' + YearToDraw;
|
Gbl_HTMLContent += Months[MonthToDraw - 1] + ' ' + YearToDraw;
|
||||||
if (DrawingCalendar)
|
if (DrawingCalendar)
|
||||||
Gbl_HTMLContent += '</div>';
|
Gbl_HTMLContent += '</div>';
|
||||||
else
|
else
|
|
@ -751,22 +751,23 @@ static void Agd_ShowOneEvent (Agd_AgendaType_t AgendaType,long AgdCod)
|
||||||
fprintf (Gbl.F.Out,"<tr>"
|
fprintf (Gbl.F.Out,"<tr>"
|
||||||
"<td id=\"agd_date_start_%u\" class=\"%s LEFT_BOTTOM COLOR%u\">"
|
"<td id=\"agd_date_start_%u\" class=\"%s LEFT_BOTTOM COLOR%u\">"
|
||||||
"<script type=\"text/javascript\">"
|
"<script type=\"text/javascript\">"
|
||||||
"writeLocalDateHMSFromUTC('agd_date_start_%u',"
|
"writeLocalDateHMSFromUTC('agd_date_start_%u',%ld,"
|
||||||
"%ld,'<br />','%s',true,true,false);"
|
"%u,'<br />','%s',true,true,false);"
|
||||||
"</script>"
|
"</script>"
|
||||||
"</td>",
|
"</td>",
|
||||||
UniqueId,
|
UniqueId,
|
||||||
AgdEvent.Hidden ? Dat_TimeStatusClassHidden[AgdEvent.TimeStatus] :
|
AgdEvent.Hidden ? Dat_TimeStatusClassHidden[AgdEvent.TimeStatus] :
|
||||||
Dat_TimeStatusClassVisible[AgdEvent.TimeStatus],
|
Dat_TimeStatusClassVisible[AgdEvent.TimeStatus],
|
||||||
Gbl.RowEvenOdd,
|
Gbl.RowEvenOdd,
|
||||||
UniqueId,AgdEvent.TimeUTC[Agd_START_TIME],Txt_Today);
|
UniqueId,AgdEvent.TimeUTC[Agd_START_TIME],
|
||||||
|
(unsigned) Gbl.Prefs.DateFormat,Txt_Today);
|
||||||
|
|
||||||
/* End date/time */
|
/* End date/time */
|
||||||
UniqueId++;
|
UniqueId++;
|
||||||
fprintf (Gbl.F.Out,"<td id=\"agd_date_end_%u\" class=\"%s LEFT_BOTTOM COLOR%u\">"
|
fprintf (Gbl.F.Out,"<td id=\"agd_date_end_%u\" class=\"%s LEFT_BOTTOM COLOR%u\">"
|
||||||
"<script type=\"text/javascript\">"
|
"<script type=\"text/javascript\">"
|
||||||
"writeLocalDateHMSFromUTC('agd_date_end_%u',"
|
"writeLocalDateHMSFromUTC('agd_date_end_%u',%ld,"
|
||||||
"%ld,'<br />','%s',false,true,false);"
|
"%u,'<br />','%s',false,true,false);"
|
||||||
"</script>"
|
"</script>"
|
||||||
"</td>",
|
"</td>",
|
||||||
UniqueId,
|
UniqueId,
|
||||||
|
@ -774,8 +775,7 @@ static void Agd_ShowOneEvent (Agd_AgendaType_t AgendaType,long AgdCod)
|
||||||
Dat_TimeStatusClassVisible[AgdEvent.TimeStatus],
|
Dat_TimeStatusClassVisible[AgdEvent.TimeStatus],
|
||||||
Gbl.RowEvenOdd,
|
Gbl.RowEvenOdd,
|
||||||
UniqueId,AgdEvent.TimeUTC[Agd_END_TIME],
|
UniqueId,AgdEvent.TimeUTC[Agd_END_TIME],
|
||||||
|
(unsigned) Gbl.Prefs.DateFormat,Txt_Today);
|
||||||
Txt_Today);
|
|
||||||
|
|
||||||
/* Event */
|
/* Event */
|
||||||
fprintf (Gbl.F.Out,"<td class=\"LEFT_TOP COLOR%u\">"
|
fprintf (Gbl.F.Out,"<td class=\"LEFT_TOP COLOR%u\">"
|
||||||
|
|
|
@ -380,12 +380,12 @@ static void Asg_ShowOneAssignment (long AsgCod,bool PrintView)
|
||||||
fprintf (Gbl.F.Out," COLOR%u",Gbl.RowEvenOdd);
|
fprintf (Gbl.F.Out," COLOR%u",Gbl.RowEvenOdd);
|
||||||
fprintf (Gbl.F.Out,"\">"
|
fprintf (Gbl.F.Out,"\">"
|
||||||
"<script type=\"text/javascript\">"
|
"<script type=\"text/javascript\">"
|
||||||
"writeLocalDateHMSFromUTC('asg_date_start_%u',"
|
"writeLocalDateHMSFromUTC('asg_date_start_%u',%ld,"
|
||||||
"%ld,'<br />','%s',true,true,true);"
|
"%u,'<br />','%s',true,true,true);"
|
||||||
"</script>"
|
"</script>"
|
||||||
"</td>",
|
"</td>",
|
||||||
UniqueId,
|
UniqueId,Asg.TimeUTC[Dat_START_TIME],
|
||||||
Asg.TimeUTC[Dat_START_TIME],Txt_Today);
|
(unsigned) Gbl.Prefs.DateFormat,Txt_Today);
|
||||||
|
|
||||||
/* End date/time */
|
/* End date/time */
|
||||||
UniqueId++;
|
UniqueId++;
|
||||||
|
@ -399,12 +399,12 @@ static void Asg_ShowOneAssignment (long AsgCod,bool PrintView)
|
||||||
fprintf (Gbl.F.Out," COLOR%u",Gbl.RowEvenOdd);
|
fprintf (Gbl.F.Out," COLOR%u",Gbl.RowEvenOdd);
|
||||||
fprintf (Gbl.F.Out,"\">"
|
fprintf (Gbl.F.Out,"\">"
|
||||||
"<script type=\"text/javascript\">"
|
"<script type=\"text/javascript\">"
|
||||||
"writeLocalDateHMSFromUTC('asg_date_end_%u',"
|
"writeLocalDateHMSFromUTC('asg_date_end_%u',%ld,"
|
||||||
"%ld,'<br />','%s',false,true,true);"
|
"%u,'<br />','%s',false,true,true);"
|
||||||
"</script>"
|
"</script>"
|
||||||
"</td>",
|
"</td>",
|
||||||
UniqueId,
|
UniqueId,Asg.TimeUTC[Dat_END_TIME],
|
||||||
Asg.TimeUTC[Dat_END_TIME],Txt_Today);
|
(unsigned) Gbl.Prefs.DateFormat,Txt_Today);
|
||||||
|
|
||||||
/* Assignment title */
|
/* Assignment title */
|
||||||
fprintf (Gbl.F.Out,"<td class=\"LEFT_TOP");
|
fprintf (Gbl.F.Out,"<td class=\"LEFT_TOP");
|
||||||
|
|
|
@ -393,11 +393,12 @@ static void Att_ShowOneAttEvent (struct AttendanceEvent *Att,bool ShowOnlyThisAt
|
||||||
fprintf (Gbl.F.Out," COLOR%u",Gbl.RowEvenOdd);
|
fprintf (Gbl.F.Out," COLOR%u",Gbl.RowEvenOdd);
|
||||||
fprintf (Gbl.F.Out,"\">"
|
fprintf (Gbl.F.Out,"\">"
|
||||||
"<script type=\"text/javascript\">"
|
"<script type=\"text/javascript\">"
|
||||||
"writeLocalDateHMSFromUTC('att_date_start_%u',"
|
"writeLocalDateHMSFromUTC('att_date_start_%u',%ld,"
|
||||||
"%ld,'<br />','%s',true,true,true);"
|
"%u,'<br />','%s',true,true,true);"
|
||||||
"</script>"
|
"</script>"
|
||||||
"</td>",
|
"</td>",
|
||||||
UniqueId,Att->TimeUTC[Att_START_TIME],Txt_Today);
|
UniqueId,Att->TimeUTC[Att_START_TIME],
|
||||||
|
(unsigned) Gbl.Prefs.DateFormat,Txt_Today);
|
||||||
|
|
||||||
/* End date/time */
|
/* End date/time */
|
||||||
fprintf (Gbl.F.Out,"<td id=\"att_date_end_%u\" class=\"%s LEFT_TOP",
|
fprintf (Gbl.F.Out,"<td id=\"att_date_end_%u\" class=\"%s LEFT_TOP",
|
||||||
|
@ -410,11 +411,12 @@ static void Att_ShowOneAttEvent (struct AttendanceEvent *Att,bool ShowOnlyThisAt
|
||||||
fprintf (Gbl.F.Out," COLOR%u",Gbl.RowEvenOdd);
|
fprintf (Gbl.F.Out," COLOR%u",Gbl.RowEvenOdd);
|
||||||
fprintf (Gbl.F.Out,"\">"
|
fprintf (Gbl.F.Out,"\">"
|
||||||
"<script type=\"text/javascript\">"
|
"<script type=\"text/javascript\">"
|
||||||
"writeLocalDateHMSFromUTC('att_date_end_%u',"
|
"writeLocalDateHMSFromUTC('att_date_end_%u',%ld,"
|
||||||
"%ld,'<br />','%s',false,true,true);"
|
"%u,'<br />','%s',false,true,true);"
|
||||||
"</script>"
|
"</script>"
|
||||||
"</td>",
|
"</td>",
|
||||||
UniqueId,Att->TimeUTC[Att_END_TIME],Txt_Today);
|
UniqueId,Att->TimeUTC[Att_END_TIME],
|
||||||
|
(unsigned) Gbl.Prefs.DateFormat,Txt_Today);
|
||||||
|
|
||||||
/* Attendance event title */
|
/* Attendance event title */
|
||||||
fprintf (Gbl.F.Out,"<td class=\"LEFT_TOP");
|
fprintf (Gbl.F.Out,"<td class=\"LEFT_TOP");
|
||||||
|
@ -3078,8 +3080,8 @@ static void Att_ListEventsToSelect (Att_TypeOfView_t TypeOfView)
|
||||||
"<span id=\"att_date_start_%u\"></span> %s"
|
"<span id=\"att_date_start_%u\"></span> %s"
|
||||||
"</label>"
|
"</label>"
|
||||||
"<script type=\"text/javascript\">"
|
"<script type=\"text/javascript\">"
|
||||||
"writeLocalDateHMSFromUTC('att_date_start_%u',"
|
"writeLocalDateHMSFromUTC('att_date_start_%u',%ld,"
|
||||||
"%ld,', ','%s',true,true,true);"
|
"%u,', ','%s',true,true,true);"
|
||||||
"</script>"
|
"</script>"
|
||||||
"</td>"
|
"</td>"
|
||||||
"<td class=\"DAT RIGHT_MIDDLE COLOR%u\">"
|
"<td class=\"DAT RIGHT_MIDDLE COLOR%u\">"
|
||||||
|
@ -3091,7 +3093,7 @@ static void Att_ListEventsToSelect (Att_TypeOfView_t TypeOfView)
|
||||||
Gbl.RowEvenOdd,
|
Gbl.RowEvenOdd,
|
||||||
NumAttEvent,UniqueId,Gbl.AttEvents.Lst[NumAttEvent].Title,
|
NumAttEvent,UniqueId,Gbl.AttEvents.Lst[NumAttEvent].Title,
|
||||||
UniqueId,Gbl.AttEvents.Lst[NumAttEvent].TimeUTC[Att_START_TIME],
|
UniqueId,Gbl.AttEvents.Lst[NumAttEvent].TimeUTC[Att_START_TIME],
|
||||||
Txt_Today,
|
(unsigned) Gbl.Prefs.DateFormat,Txt_Today,
|
||||||
Gbl.RowEvenOdd,
|
Gbl.RowEvenOdd,
|
||||||
Gbl.AttEvents.Lst[NumAttEvent].NumStdsTotal);
|
Gbl.AttEvents.Lst[NumAttEvent].NumStdsTotal);
|
||||||
}
|
}
|
||||||
|
@ -3487,8 +3489,8 @@ static void Att_ListAttEventsForAStd (unsigned NumStd,struct UsrData *UsrDat)
|
||||||
" alt=\"%s\" title=\"%s\" class=\"ICO20x20\" />"
|
" alt=\"%s\" title=\"%s\" class=\"ICO20x20\" />"
|
||||||
"<span id=\"att_date_start_%u\"></span> %s"
|
"<span id=\"att_date_start_%u\"></span> %s"
|
||||||
"<script type=\"text/javascript\">"
|
"<script type=\"text/javascript\">"
|
||||||
"writeLocalDateHMSFromUTC('att_date_start_%u',"
|
"writeLocalDateHMSFromUTC('att_date_start_%u',%ld,"
|
||||||
"%ld,', ','%s',true,true,true);"
|
"%u,', ','%s',true,true,true);"
|
||||||
"</script>"
|
"</script>"
|
||||||
"</td>"
|
"</td>"
|
||||||
"</tr>",
|
"</tr>",
|
||||||
|
@ -3506,7 +3508,7 @@ static void Att_ListAttEventsForAStd (unsigned NumStd,struct UsrData *UsrDat)
|
||||||
UniqueId,
|
UniqueId,
|
||||||
Gbl.AttEvents.Lst[NumAttEvent].Title,
|
Gbl.AttEvents.Lst[NumAttEvent].Title,
|
||||||
UniqueId,Gbl.AttEvents.Lst[NumAttEvent].TimeUTC[Att_START_TIME],
|
UniqueId,Gbl.AttEvents.Lst[NumAttEvent].TimeUTC[Att_START_TIME],
|
||||||
Txt_Today);
|
(unsigned) Gbl.Prefs.DateFormat,Txt_Today);
|
||||||
|
|
||||||
/***** Write comments for this student *****/
|
/***** Write comments for this student *****/
|
||||||
if (ShowCommentStd || ShowCommentTch)
|
if (ShowCommentStd || ShowCommentTch)
|
||||||
|
|
|
@ -233,13 +233,14 @@
|
||||||
/****************************** Public constants *****************************/
|
/****************************** Public constants *****************************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
#define Log_PLATFORM_VERSION "SWAD 16.204 (2017-05-04)"
|
#define Log_PLATFORM_VERSION "SWAD 16.205 (2017-05-04)"
|
||||||
#define CSS_FILE "swad16.202.css"
|
#define CSS_FILE "swad16.205.css"
|
||||||
#define JS_FILE "swad16.181.js"
|
#define JS_FILE "swad16.205.js"
|
||||||
|
|
||||||
// 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 16.205: May 04, 2017 Dates written depending on user's preferences. (218721 lines)
|
||||||
Version 16.204: May 04, 2017 Form in preferences to change date format. (218656 lines)
|
Version 16.204: May 04, 2017 Form in preferences to change date format. (218656 lines)
|
||||||
3 changes necessary in database:
|
3 changes necessary in database:
|
||||||
INSERT INTO actions (ActCod,Language,Obsolete,Txt) VALUES ('1638','es','N','Cambiar formato de fecha');
|
INSERT INTO actions (ActCod,Language,Obsolete,Txt) VALUES ('1638','es','N','Cambiar formato de fecha');
|
||||||
|
|
12
swad_date.c
12
swad_date.c
|
@ -1444,6 +1444,7 @@ void Dat_AssignDate (struct Date *DateDst,struct Date *DateSrc)
|
||||||
void Dat_WriteScriptMonths (void)
|
void Dat_WriteScriptMonths (void)
|
||||||
{
|
{
|
||||||
extern const char *Txt_MONTHS_SMALL[12];
|
extern const char *Txt_MONTHS_SMALL[12];
|
||||||
|
extern const char *Txt_MONTHS_SMALL_SHORT[12];
|
||||||
unsigned NumMonth;
|
unsigned NumMonth;
|
||||||
|
|
||||||
fprintf (Gbl.F.Out,"var Months = [");
|
fprintf (Gbl.F.Out,"var Months = [");
|
||||||
|
@ -1456,4 +1457,15 @@ void Dat_WriteScriptMonths (void)
|
||||||
fprintf (Gbl.F.Out,"'%s'",Txt_MONTHS_SMALL[NumMonth]);
|
fprintf (Gbl.F.Out,"'%s'",Txt_MONTHS_SMALL[NumMonth]);
|
||||||
}
|
}
|
||||||
fprintf (Gbl.F.Out,"];\n");
|
fprintf (Gbl.F.Out,"];\n");
|
||||||
|
|
||||||
|
fprintf (Gbl.F.Out,"var MonthsShort = [");
|
||||||
|
for (NumMonth = 0;
|
||||||
|
NumMonth < 12;
|
||||||
|
NumMonth++)
|
||||||
|
{
|
||||||
|
if (NumMonth)
|
||||||
|
fprintf (Gbl.F.Out,",");
|
||||||
|
fprintf (Gbl.F.Out,"'%s'",Txt_MONTHS_SMALL_SHORT[NumMonth]);
|
||||||
|
}
|
||||||
|
fprintf (Gbl.F.Out,"];\n");
|
||||||
}
|
}
|
||||||
|
|
|
@ -6044,11 +6044,11 @@ static void Brw_WriteDatesAssignment (void)
|
||||||
Gbl.FileBrowser.Asg.Open ? "ASG_LST_DATE_GREEN" :
|
Gbl.FileBrowser.Asg.Open ? "ASG_LST_DATE_GREEN" :
|
||||||
"ASG_LST_DATE_RED");
|
"ASG_LST_DATE_RED");
|
||||||
fprintf (Gbl.F.Out,"<script type=\"text/javascript\">"
|
fprintf (Gbl.F.Out,"<script type=\"text/javascript\">"
|
||||||
"writeLocalDateHMSFromUTC('asg_start_date_%u',"
|
"writeLocalDateHMSFromUTC('asg_start_date_%u',%ld,"
|
||||||
"%ld,', ','%s',true,false,true);"
|
"%u,', ','%s',true,false,true);"
|
||||||
"</script>",
|
"</script>",
|
||||||
UniqueId,
|
UniqueId,(long) Gbl.FileBrowser.Asg.TimeUTC[Dat_START_TIME],
|
||||||
(long) Gbl.FileBrowser.Asg.TimeUTC[Dat_START_TIME],Txt_Today);
|
(unsigned) Gbl.Prefs.DateFormat,Txt_Today);
|
||||||
fprintf (Gbl.F.Out,"</span>");
|
fprintf (Gbl.F.Out,"</span>");
|
||||||
|
|
||||||
/***** Arrow *****/
|
/***** Arrow *****/
|
||||||
|
@ -6065,11 +6065,11 @@ static void Brw_WriteDatesAssignment (void)
|
||||||
Gbl.FileBrowser.Asg.Open ? "ASG_LST_DATE_GREEN" :
|
Gbl.FileBrowser.Asg.Open ? "ASG_LST_DATE_GREEN" :
|
||||||
"ASG_LST_DATE_RED");
|
"ASG_LST_DATE_RED");
|
||||||
fprintf (Gbl.F.Out,"<script type=\"text/javascript\">"
|
fprintf (Gbl.F.Out,"<script type=\"text/javascript\">"
|
||||||
"writeLocalDateHMSFromUTC('asg_end_date_%u',"
|
"writeLocalDateHMSFromUTC('asg_end_date_%u',%ld,"
|
||||||
"%ld,', ','%s',false,false,true);"
|
"%u,', ','%s',false,false,true);"
|
||||||
"</script>",
|
"</script>",
|
||||||
UniqueId,
|
UniqueId,(long) Gbl.FileBrowser.Asg.TimeUTC[Dat_END_TIME],
|
||||||
(long) Gbl.FileBrowser.Asg.TimeUTC[Dat_END_TIME],Txt_Today);
|
(unsigned) Gbl.Prefs.DateFormat,Txt_Today);
|
||||||
fprintf (Gbl.F.Out,"</span>");
|
fprintf (Gbl.F.Out,"</span>");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -6109,11 +6109,12 @@ static void Brw_WriteFileSizeAndDate (struct FileMetadata *FileMetadata)
|
||||||
UniqueId++;
|
UniqueId++;
|
||||||
fprintf (Gbl.F.Out,"<span id=\"filedate%u\"></span>"
|
fprintf (Gbl.F.Out,"<span id=\"filedate%u\"></span>"
|
||||||
"<script type=\"text/javascript\">"
|
"<script type=\"text/javascript\">"
|
||||||
"writeLocalDateHMSFromUTC('filedate%u',"
|
"writeLocalDateHMSFromUTC('filedate%u',%ld,"
|
||||||
"%ld,', ','%s',true,false,false);"
|
"%u,', ','%s',true,false,false);"
|
||||||
"</script>",
|
"</script>",
|
||||||
UniqueId,
|
UniqueId,
|
||||||
UniqueId,(long) FileMetadata->Time,Txt_Today);
|
UniqueId,(long) FileMetadata->Time,
|
||||||
|
(unsigned) Gbl.Prefs.DateFormat,Txt_Today);
|
||||||
}
|
}
|
||||||
fprintf (Gbl.F.Out,"</td>");
|
fprintf (Gbl.F.Out,"</td>");
|
||||||
}
|
}
|
||||||
|
@ -9192,14 +9193,15 @@ void Brw_ShowFileMetadata (void)
|
||||||
"</td>"
|
"</td>"
|
||||||
"<td id=\"filedate\" class=\"DAT LEFT_MIDDLE\">"
|
"<td id=\"filedate\" class=\"DAT LEFT_MIDDLE\">"
|
||||||
"<script type=\"text/javascript\">"
|
"<script type=\"text/javascript\">"
|
||||||
"writeLocalDateHMSFromUTC('filedate',"
|
"writeLocalDateHMSFromUTC('filedate',%ld,"
|
||||||
"%ld,', ','%s',true,true,true);"
|
"%u,', ','%s',true,true,true);"
|
||||||
"</script>"
|
"</script>"
|
||||||
"</td>"
|
"</td>"
|
||||||
"</tr>",
|
"</tr>",
|
||||||
The_ClassForm[Gbl.Prefs.Theme],
|
The_ClassForm[Gbl.Prefs.Theme],
|
||||||
Txt_Date_of_creation,
|
Txt_Date_of_creation,
|
||||||
(long) FileMetadata.Time,Txt_Today);
|
(long) FileMetadata.Time,
|
||||||
|
(unsigned) Gbl.Prefs.DateFormat,Txt_Today);
|
||||||
|
|
||||||
/***** Private or public? *****/
|
/***** Private or public? *****/
|
||||||
fprintf (Gbl.F.Out,"<tr>"
|
fprintf (Gbl.F.Out,"<tr>"
|
||||||
|
|
|
@ -3406,12 +3406,13 @@ static void For_ListForumThrs (long ThrCods[Pag_ITEMS_PER_PAGE],
|
||||||
UniqueId++;
|
UniqueId++;
|
||||||
fprintf (Gbl.F.Out,"<td id=\"thr_date_%u\" class=\"%s LEFT_TOP %s\">"
|
fprintf (Gbl.F.Out,"<td id=\"thr_date_%u\" class=\"%s LEFT_TOP %s\">"
|
||||||
"<script type=\"text/javascript\">"
|
"<script type=\"text/javascript\">"
|
||||||
"writeLocalDateHMSFromUTC('thr_date_%u',"
|
"writeLocalDateHMSFromUTC('thr_date_%u',%ld,"
|
||||||
"%ld,'<br />','%s',true,false,false);"
|
"%u,'<br />','%s',true,false,false);"
|
||||||
"</script>"
|
"</script>"
|
||||||
"</td>",
|
"</td>",
|
||||||
UniqueId,Style,BgColor,
|
UniqueId,Style,BgColor,
|
||||||
UniqueId,(long) TimeUTC,Txt_Today);
|
UniqueId,(long) TimeUTC,
|
||||||
|
(unsigned) Gbl.Prefs.DateFormat,Txt_Today);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
for (Column = 1;
|
for (Column = 1;
|
||||||
|
|
|
@ -2071,12 +2071,13 @@ static void Grp_WriteGrpHead (struct GroupType *GrpTyp)
|
||||||
fprintf (Gbl.F.Out,"<br />%s: "
|
fprintf (Gbl.F.Out,"<br />%s: "
|
||||||
"<span id=\"open_time_%u\"></span>"
|
"<span id=\"open_time_%u\"></span>"
|
||||||
"<script type=\"text/javascript\">"
|
"<script type=\"text/javascript\">"
|
||||||
"writeLocalDateHMSFromUTC('open_time_%u',"
|
"writeLocalDateHMSFromUTC('open_time_%u',%ld,"
|
||||||
"%ld,', ','%s',true,true,true);"
|
"%u,', ','%s',true,true,true);"
|
||||||
"</script>",
|
"</script>",
|
||||||
Txt_Opening_of_groups,
|
Txt_Opening_of_groups,
|
||||||
UniqueId,
|
UniqueId,
|
||||||
UniqueId,(long) GrpTyp->OpenTimeUTC,Txt_Today);
|
UniqueId,(long) GrpTyp->OpenTimeUTC,
|
||||||
|
(unsigned) Gbl.Prefs.DateFormat,Txt_Today);
|
||||||
}
|
}
|
||||||
fprintf (Gbl.F.Out,"</td>"
|
fprintf (Gbl.F.Out,"</td>"
|
||||||
"</tr>");
|
"</tr>");
|
||||||
|
|
|
@ -3525,10 +3525,11 @@ void Msg_WriteMsgDate (time_t TimeUTC,const char *ClassBackground)
|
||||||
|
|
||||||
/***** Write date and time *****/
|
/***** Write date and time *****/
|
||||||
fprintf (Gbl.F.Out,"<script type=\"text/javascript\">"
|
fprintf (Gbl.F.Out,"<script type=\"text/javascript\">"
|
||||||
"writeLocalDateHMSFromUTC('msg_date_%u',"
|
"writeLocalDateHMSFromUTC('msg_date_%u',%ld,"
|
||||||
"%ld,', ','%s',true,false,false);"
|
"%u,', ','%s',true,false,false);"
|
||||||
"</script>",
|
"</script>",
|
||||||
UniqueId,(long) TimeUTC,Txt_Today);
|
UniqueId,(long) TimeUTC,
|
||||||
|
(unsigned) Gbl.Prefs.DateFormat,Txt_Today);
|
||||||
|
|
||||||
/***** End cell *****/
|
/***** End cell *****/
|
||||||
fprintf (Gbl.F.Out,"</td>");
|
fprintf (Gbl.F.Out,"</td>");
|
||||||
|
|
|
@ -703,11 +703,12 @@ static void Not_DrawANotice (Not_Listing_t TypeNoticesListing,
|
||||||
Act_FormEnd ();
|
Act_FormEnd ();
|
||||||
}
|
}
|
||||||
fprintf (Gbl.F.Out,"<script type=\"text/javascript\">"
|
fprintf (Gbl.F.Out,"<script type=\"text/javascript\">"
|
||||||
"writeLocalDateHMSFromUTC('not_date_%u',"
|
"writeLocalDateHMSFromUTC('not_date_%u',%ld,"
|
||||||
"%ld,'<br />','%s',true,false,false);"
|
"%u,'<br />','%s',true,false,false);"
|
||||||
"</script>"
|
"</script>"
|
||||||
"</div>",
|
"</div>",
|
||||||
UniqueId,(long) TimeUTC,Txt_Today);
|
UniqueId,(long) TimeUTC,
|
||||||
|
(unsigned) Gbl.Prefs.DateFormat,Txt_Today);
|
||||||
|
|
||||||
/***** Write the content of the notice *****/
|
/***** Write the content of the notice *****/
|
||||||
if (TypeNoticesListing == Not_LIST_BRIEF_NOTICES)
|
if (TypeNoticesListing == Not_LIST_BRIEF_NOTICES)
|
||||||
|
|
|
@ -455,10 +455,13 @@ void Prf_ShowDetailsUserProfile (const struct UsrData *UsrDat)
|
||||||
(UsrFigures.NumDays == 1) ? Txt_day :
|
(UsrFigures.NumDays == 1) ? Txt_day :
|
||||||
Txt_days);
|
Txt_days);
|
||||||
fprintf (Gbl.F.Out,"<script type=\"text/javascript\">"
|
fprintf (Gbl.F.Out,"<script type=\"text/javascript\">"
|
||||||
"writeLocalDateFromUTC('%s',%ld,'%s');"
|
"writeLocalDateHMSFromUTC('%s',%ld,"
|
||||||
"</script>",
|
"%u,', ','%s',true,false,false);"
|
||||||
IdFirstClickTime,
|
"</script>",
|
||||||
(long) UsrFigures.FirstClickTimeUTC,Txt_Today);
|
IdFirstClickTime,(long) UsrFigures.FirstClickTimeUTC,
|
||||||
|
(unsigned) Gbl.Prefs.DateFormat,Txt_Today);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
else // First click time is unknown or user never logged
|
else // First click time is unknown or user never logged
|
||||||
/***** Button to fetch and store first click time *****/
|
/***** Button to fetch and store first click time *****/
|
||||||
|
|
|
@ -1625,10 +1625,11 @@ static void Soc_WriteDateTime (time_t TimeUTC)
|
||||||
// This must be out of the div where the output is written
|
// This must be out of the div where the output is written
|
||||||
// because it will be evaluated in a loop in JavaScript
|
// because it will be evaluated in a loop in JavaScript
|
||||||
fprintf (Gbl.F.Out,"<script type=\"text/javascript\">"
|
fprintf (Gbl.F.Out,"<script type=\"text/javascript\">"
|
||||||
"writeLocalDateHMSFromUTC('%s',"
|
"writeLocalDateHMSFromUTC('%s',%ld,"
|
||||||
"%ld,', ','%s',true,false,false);"
|
"%u,', ','%s',true,false,false);"
|
||||||
"</script>",
|
"</script>",
|
||||||
IdDateTime,(long) TimeUTC,Txt_Today);
|
IdDateTime,(long) TimeUTC,
|
||||||
|
(unsigned) Gbl.Prefs.DateFormat,Txt_Today);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
|
@ -1771,12 +1771,13 @@ static void Sta_ShowDetailedAccessesList (unsigned long NumRows,MYSQL_RES *mysql
|
||||||
/* Write the date-time (row[3]) */
|
/* Write the date-time (row[3]) */
|
||||||
fprintf (Gbl.F.Out,"<td id=\"log_date_%u\" class=\"LOG CENTER_TOP COLOR%u\">"
|
fprintf (Gbl.F.Out,"<td id=\"log_date_%u\" class=\"LOG CENTER_TOP COLOR%u\">"
|
||||||
"<script type=\"text/javascript\">"
|
"<script type=\"text/javascript\">"
|
||||||
"writeLocalDateHMSFromUTC('log_date_%u',"
|
"writeLocalDateHMSFromUTC('log_date_%u',%ld,"
|
||||||
"%ld,', ','%s',true,false,true);"
|
"%u,', ','%s',true,false,true);"
|
||||||
"</script>"
|
"</script>"
|
||||||
"</td>",
|
"</td>",
|
||||||
UniqueId,Gbl.RowEvenOdd,
|
UniqueId,Gbl.RowEvenOdd,
|
||||||
UniqueId,(long) Dat_GetUNIXTimeFromStr (row[3]),Txt_Today);
|
UniqueId,(long) Dat_GetUNIXTimeFromStr (row[3]),
|
||||||
|
(unsigned) Gbl.Prefs.DateFormat,Txt_Today);
|
||||||
|
|
||||||
/* Write the action */
|
/* Write the action */
|
||||||
if (sscanf (row[4],"%ld",&ActCod) != 1)
|
if (sscanf (row[4],"%ld",&ActCod) != 1)
|
||||||
|
@ -8948,7 +8949,7 @@ static void Sta_GetAndShowNumUsrsPerDateFormat (void)
|
||||||
Format <= (Dat_Format_t) (Dat_NUM_OPTIONS_FORMAT - 1);
|
Format <= (Dat_Format_t) (Dat_NUM_OPTIONS_FORMAT - 1);
|
||||||
Format++)
|
Format++)
|
||||||
fprintf (Gbl.F.Out,"<tr>"
|
fprintf (Gbl.F.Out,"<tr>"
|
||||||
"<td class=\"DAT_N CENTER_MIDDLE\">"
|
"<td class=\"DAT_N LEFT_MIDDLE\">"
|
||||||
"%s"
|
"%s"
|
||||||
"</td>"
|
"</td>"
|
||||||
"<td class=\"DAT RIGHT_MIDDLE\">"
|
"<td class=\"DAT RIGHT_MIDDLE\">"
|
||||||
|
|
|
@ -462,11 +462,12 @@ static void Svy_ShowOneSurvey (long SvyCod,struct SurveyQuestion *SvyQst,
|
||||||
fprintf (Gbl.F.Out," COLOR%u",Gbl.RowEvenOdd);
|
fprintf (Gbl.F.Out," COLOR%u",Gbl.RowEvenOdd);
|
||||||
fprintf (Gbl.F.Out,"\">"
|
fprintf (Gbl.F.Out,"\">"
|
||||||
"<script type=\"text/javascript\">"
|
"<script type=\"text/javascript\">"
|
||||||
"writeLocalDateHMSFromUTC('svy_date_start_%u',"
|
"writeLocalDateHMSFromUTC('svy_date_start_%u',%ld,"
|
||||||
"%ld,'<br />','%s',true,true,true);"
|
"%u,'<br />','%s',true,true,true);"
|
||||||
"</script>"
|
"</script>"
|
||||||
"</td>",
|
"</td>",
|
||||||
UniqueId,Svy.TimeUTC[Svy_START_TIME],Txt_Today);
|
UniqueId,Svy.TimeUTC[Svy_START_TIME],
|
||||||
|
(unsigned) Gbl.Prefs.DateFormat,Txt_Today);
|
||||||
|
|
||||||
/* End date/time */
|
/* End date/time */
|
||||||
fprintf (Gbl.F.Out,"<td id=\"svy_date_end_%u\" class=\"%s LEFT_TOP",
|
fprintf (Gbl.F.Out,"<td id=\"svy_date_end_%u\" class=\"%s LEFT_TOP",
|
||||||
|
@ -479,11 +480,12 @@ static void Svy_ShowOneSurvey (long SvyCod,struct SurveyQuestion *SvyQst,
|
||||||
fprintf (Gbl.F.Out," COLOR%u",Gbl.RowEvenOdd);
|
fprintf (Gbl.F.Out," COLOR%u",Gbl.RowEvenOdd);
|
||||||
fprintf (Gbl.F.Out,"\">"
|
fprintf (Gbl.F.Out,"\">"
|
||||||
"<script type=\"text/javascript\">"
|
"<script type=\"text/javascript\">"
|
||||||
"writeLocalDateHMSFromUTC('svy_date_end_%u',"
|
"writeLocalDateHMSFromUTC('svy_date_end_%u',%ld,"
|
||||||
"%ld,'<br />','%s',false,true,true);"
|
"%u,'<br />','%s',false,true,true);"
|
||||||
"</script>"
|
"</script>"
|
||||||
"</td>",
|
"</td>",
|
||||||
UniqueId,Svy.TimeUTC[Svy_END_TIME],Txt_Today);
|
UniqueId,Svy.TimeUTC[Svy_END_TIME],
|
||||||
|
(unsigned) Gbl.Prefs.DateFormat,Txt_Today);
|
||||||
|
|
||||||
/* Survey title */
|
/* Survey title */
|
||||||
fprintf (Gbl.F.Out,"<td class=\"LEFT_TOP");
|
fprintf (Gbl.F.Out,"<td class=\"LEFT_TOP");
|
||||||
|
|
28
swad_test.c
28
swad_test.c
|
@ -680,11 +680,12 @@ static bool Tst_CheckIfNextTstAllowed (void)
|
||||||
/***** Write warning *****/
|
/***** Write warning *****/
|
||||||
sprintf (Gbl.Message,"%s:<br /><span id=\"date_next_test\"></span>."
|
sprintf (Gbl.Message,"%s:<br /><span id=\"date_next_test\"></span>."
|
||||||
"<script type=\"text/javascript\">"
|
"<script type=\"text/javascript\">"
|
||||||
"writeLocalDateHMSFromUTC('date_next_test',"
|
"writeLocalDateHMSFromUTC('date_next_test',%ld,"
|
||||||
"%ld,', ','%s',true,true,true);"
|
"%u,', ','%s',true,true,true);"
|
||||||
"</script>",
|
"</script>",
|
||||||
Txt_You_can_not_take_a_new_test_until,
|
Txt_You_can_not_take_a_new_test_until,
|
||||||
(long) TimeNextTestUTC,Txt_Today);
|
(long) TimeNextTestUTC,
|
||||||
|
(unsigned) Gbl.Prefs.DateFormat,Txt_Today);
|
||||||
Lay_ShowAlert (Lay_WARNING,Gbl.Message);
|
Lay_ShowAlert (Lay_WARNING,Gbl.Message);
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
@ -2855,12 +2856,13 @@ static void Tst_ListOneOrMoreQuestionsToEdit (unsigned long NumRows,MYSQL_RES *m
|
||||||
fprintf (Gbl.F.Out,"<td id=\"tst_date_%u\""
|
fprintf (Gbl.F.Out,"<td id=\"tst_date_%u\""
|
||||||
" class=\"DAT_SMALL CENTER_TOP COLOR%u\">"
|
" class=\"DAT_SMALL CENTER_TOP COLOR%u\">"
|
||||||
"<script type=\"text/javascript\">"
|
"<script type=\"text/javascript\">"
|
||||||
"writeLocalDateHMSFromUTC('tst_date_%u',"
|
"writeLocalDateHMSFromUTC('tst_date_%u',%ld,"
|
||||||
"%ld,'<br />','%s',true,false,true);"
|
"%u,'<br />','%s',true,false,true);"
|
||||||
"</script>"
|
"</script>"
|
||||||
"</td>",
|
"</td>",
|
||||||
UniqueId,Gbl.RowEvenOdd,
|
UniqueId,Gbl.RowEvenOdd,
|
||||||
UniqueId,(long) TimeUTC,Txt_Today);
|
UniqueId,(long) TimeUTC,
|
||||||
|
(unsigned) Gbl.Prefs.DateFormat,Txt_Today);
|
||||||
|
|
||||||
/* Write the question tags */
|
/* Write the question tags */
|
||||||
fprintf (Gbl.F.Out,"<td class=\"LEFT_TOP COLOR%u\">",
|
fprintf (Gbl.F.Out,"<td class=\"LEFT_TOP COLOR%u\">",
|
||||||
|
@ -7329,12 +7331,13 @@ static void Tst_ShowTestResults (struct UsrData *UsrDat)
|
||||||
UniqueId++;
|
UniqueId++;
|
||||||
fprintf (Gbl.F.Out,"<td id =\"tst_date_%u\" class=\"%s RIGHT_TOP COLOR%u\">"
|
fprintf (Gbl.F.Out,"<td id =\"tst_date_%u\" class=\"%s RIGHT_TOP COLOR%u\">"
|
||||||
"<script type=\"text/javascript\">"
|
"<script type=\"text/javascript\">"
|
||||||
"writeLocalDateHMSFromUTC('tst_date_%u',"
|
"writeLocalDateHMSFromUTC('tst_date_%u',%ld,"
|
||||||
"%ld,', ','%s',true,false,true);"
|
"%u,', ','%s',true,false,true);"
|
||||||
"</script>"
|
"</script>"
|
||||||
"</td>",
|
"</td>",
|
||||||
UniqueId,ClassDat,Gbl.RowEvenOdd,
|
UniqueId,ClassDat,Gbl.RowEvenOdd,
|
||||||
UniqueId,(long) TimeUTC,Txt_Today);
|
UniqueId,(long) TimeUTC,
|
||||||
|
(unsigned) Gbl.Prefs.DateFormat,Txt_Today);
|
||||||
|
|
||||||
/* Get number of questions (row[3]) */
|
/* Get number of questions (row[3]) */
|
||||||
if (sscanf (row[3],"%u",&NumQstsInThisTest) != 1)
|
if (sscanf (row[3],"%u",&NumQstsInThisTest) != 1)
|
||||||
|
@ -7712,12 +7715,13 @@ void Tst_ShowOneTestResult (void)
|
||||||
"</td>"
|
"</td>"
|
||||||
"<td id=\"test\" class=\"DAT LEFT_TOP\">"
|
"<td id=\"test\" class=\"DAT LEFT_TOP\">"
|
||||||
"<script type=\"text/javascript\">"
|
"<script type=\"text/javascript\">"
|
||||||
"writeLocalDateHMSFromUTC('test',"
|
"writeLocalDateHMSFromUTC('test',%ld,"
|
||||||
"%ld,', ','%s',true,true,true);"
|
"%u,', ','%s',true,true,true);"
|
||||||
"</script>"
|
"</script>"
|
||||||
"</td>"
|
"</td>"
|
||||||
"</tr>",
|
"</tr>",
|
||||||
Txt_Date,TstTimeUTC,Txt_Today);
|
Txt_Date,TstTimeUTC,
|
||||||
|
(unsigned) Gbl.Prefs.DateFormat,Txt_Today);
|
||||||
|
|
||||||
/* Number of questions */
|
/* Number of questions */
|
||||||
fprintf (Gbl.F.Out,"<tr>"
|
fprintf (Gbl.F.Out,"<tr>"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user