mirror of
https://github.com/acanas/swad-core.git
synced 2024-05-31 22:05:23 +02:00
Version 18.41
This commit is contained in:
parent
fc137e8f1c
commit
139d21814c
|
@ -2701,6 +2701,21 @@ a:hover img.CENTRE_PHOTO_SHOW
|
||||||
text-overflow:ellipsis;
|
text-overflow:ellipsis;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/********************************* Attendance ********************************/
|
||||||
|
.ATT_CHECK
|
||||||
|
{
|
||||||
|
display:inline-block;
|
||||||
|
font-size:16pt;
|
||||||
|
color:darkgreen;
|
||||||
|
}
|
||||||
|
.ATT_CROSS
|
||||||
|
{
|
||||||
|
display:inline-block;
|
||||||
|
font-size:16pt;
|
||||||
|
color:darkred;
|
||||||
|
opacity:0.2;
|
||||||
|
}
|
||||||
|
|
||||||
/**************************** Enrolment requests *****************************/
|
/**************************** Enrolment requests *****************************/
|
||||||
.REQUESTER_NAME
|
.REQUESTER_NAME
|
||||||
{
|
{
|
||||||
|
@ -3074,8 +3089,10 @@ a:hover img.CENTRE_PHOTO_SHOW
|
||||||
.BT {width:20px; text-align:center; vertical-align:top;}
|
.BT {width:20px; text-align:center; vertical-align:top;}
|
||||||
.BT0 {width:20px; text-align:center; vertical-align:top; background-color:#F4F2EA;}
|
.BT0 {width:20px; text-align:center; vertical-align:top; background-color:#F4F2EA;}
|
||||||
.BT1 {width:20px; text-align:center; vertical-align:top; background-color:#FBFAF7;}
|
.BT1 {width:20px; text-align:center; vertical-align:top; background-color:#FBFAF7;}
|
||||||
|
|
||||||
.BM {width:20px; text-align:center; vertical-align:middle;}
|
.BM {width:20px; text-align:center; vertical-align:middle;}
|
||||||
.BM_SEL {width:20px; text-align:center; vertical-align:middle; background-color:#C0FF40;}
|
.BM_SEL {width:20px; text-align:center; vertical-align:middle; background-color:#C0FF40;}
|
||||||
|
|
||||||
.BM0 {width:20px; text-align:center; vertical-align:middle; background-color:#F4F2EA;}
|
.BM0 {width:20px; text-align:center; vertical-align:middle; background-color:#F4F2EA;}
|
||||||
.BM1 {width:20px; text-align:center; vertical-align:middle; background-color:#FBFAF7;}
|
.BM1 {width:20px; text-align:center; vertical-align:middle; background-color:#FBFAF7;}
|
||||||
|
|
|
@ -148,6 +148,7 @@ static void Att_ListStdsAttendanceTable (Att_TypeOfView_t TypeOfView,
|
||||||
long *LstSelectedUsrCods);
|
long *LstSelectedUsrCods);
|
||||||
static void Att_WriteTableHeadSeveralAttEvents (void);
|
static void Att_WriteTableHeadSeveralAttEvents (void);
|
||||||
static void Att_WriteRowStdSeveralAttEvents (unsigned NumStd,struct UsrData *UsrDat);
|
static void Att_WriteRowStdSeveralAttEvents (unsigned NumStd,struct UsrData *UsrDat);
|
||||||
|
static void Att_PutCheckOrCross (bool Present);
|
||||||
static void Att_ListStdsWithAttEventsDetails (unsigned NumStdsInList,
|
static void Att_ListStdsWithAttEventsDetails (unsigned NumStdsInList,
|
||||||
long *LstSelectedUsrCods);
|
long *LstSelectedUsrCods);
|
||||||
static void Att_ListAttEventsForAStd (unsigned NumStd,struct UsrData *UsrDat);
|
static void Att_ListAttEventsForAStd (unsigned NumStd,struct UsrData *UsrDat);
|
||||||
|
@ -2044,8 +2045,6 @@ static void Att_WriteRowStdToCallTheRoll (unsigned NumStd,
|
||||||
struct UsrData *UsrDat,
|
struct UsrData *UsrDat,
|
||||||
struct AttendanceEvent *Att)
|
struct AttendanceEvent *Att)
|
||||||
{
|
{
|
||||||
extern const char *Txt_Present;
|
|
||||||
extern const char *Txt_Absent;
|
|
||||||
bool Present;
|
bool Present;
|
||||||
char PhotoURL[PATH_MAX + 1];
|
char PhotoURL[PATH_MAX + 1];
|
||||||
bool ShowPhoto;
|
bool ShowPhoto;
|
||||||
|
@ -2085,26 +2084,17 @@ static void Att_WriteRowStdToCallTheRoll (unsigned NumStd,
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
/***** Check if this student is already registered in the current event *****/
|
/***** Check if this student is already present in the current event *****/
|
||||||
Present = Att_CheckIfUsrIsPresentInAttEventAndGetComments (Att->AttCod,UsrDat->UsrCod,CommentStd,CommentTch);
|
Present = Att_CheckIfUsrIsPresentInAttEventAndGetComments (Att->AttCod,UsrDat->UsrCod,CommentStd,CommentTch);
|
||||||
|
|
||||||
/***** Icon to show if the user is already registered *****/
|
/***** Icon to show if the user is already present *****/
|
||||||
fprintf (Gbl.F.Out,"<tr>"
|
fprintf (Gbl.F.Out,"<tr>"
|
||||||
"<td class=\"BT%u\">"
|
"<td class=\"BT%u\">"
|
||||||
"<label for=\"Std%u\">"
|
"<label for=\"Std%u\">",
|
||||||
"<img src=\"%s/%s\""
|
Gbl.RowEvenOdd,NumStd);
|
||||||
" alt=\"%s\" title=\"%s\""
|
Att_PutCheckOrCross (Present);
|
||||||
" class=\"CONTEXT_ICO_16x16\" />"
|
fprintf (Gbl.F.Out,"</label>"
|
||||||
"</label>"
|
"</td>");
|
||||||
"</td>",
|
|
||||||
Gbl.RowEvenOdd,NumStd,
|
|
||||||
Gbl.Prefs.URLIcons,
|
|
||||||
Present ? "check-square.svg" :
|
|
||||||
"square.svg",
|
|
||||||
Present ? Txt_Present :
|
|
||||||
Txt_Absent,
|
|
||||||
Present ? Txt_Present :
|
|
||||||
Txt_Absent);
|
|
||||||
|
|
||||||
/***** Checkbox to select user *****/
|
/***** Checkbox to select user *****/
|
||||||
fprintf (Gbl.F.Out,"<td class=\"CENTER_TOP COLOR%u\">"
|
fprintf (Gbl.F.Out,"<td class=\"CENTER_TOP COLOR%u\">"
|
||||||
|
@ -3431,8 +3421,6 @@ static void Att_WriteTableHeadSeveralAttEvents (void)
|
||||||
|
|
||||||
static void Att_WriteRowStdSeveralAttEvents (unsigned NumStd,struct UsrData *UsrDat)
|
static void Att_WriteRowStdSeveralAttEvents (unsigned NumStd,struct UsrData *UsrDat)
|
||||||
{
|
{
|
||||||
extern const char *Txt_Present;
|
|
||||||
extern const char *Txt_Absent;
|
|
||||||
char PhotoURL[PATH_MAX + 1];
|
char PhotoURL[PATH_MAX + 1];
|
||||||
bool ShowPhoto;
|
bool ShowPhoto;
|
||||||
unsigned NumAttEvent;
|
unsigned NumAttEvent;
|
||||||
|
@ -3482,29 +3470,22 @@ static void Att_WriteRowStdSeveralAttEvents (unsigned NumStd,struct UsrData *Usr
|
||||||
fprintf (Gbl.F.Out,", %s</td>",
|
fprintf (Gbl.F.Out,", %s</td>",
|
||||||
UsrDat->FirstName);
|
UsrDat->FirstName);
|
||||||
|
|
||||||
/***** Icon to show if the user is already registered *****/
|
/***** Check/cross to show if the user is present/absent *****/
|
||||||
for (NumAttEvent = 0, NumTimesPresent = 0;
|
for (NumAttEvent = 0, NumTimesPresent = 0;
|
||||||
NumAttEvent < Gbl.AttEvents.Num;
|
NumAttEvent < Gbl.AttEvents.Num;
|
||||||
NumAttEvent++)
|
NumAttEvent++)
|
||||||
if (Gbl.AttEvents.Lst[NumAttEvent].Selected)
|
if (Gbl.AttEvents.Lst[NumAttEvent].Selected)
|
||||||
{
|
{
|
||||||
/***** Check if this student is already registered in the current event *****/
|
/* Check if this student is already registered in the current event */
|
||||||
// Here it is not necessary to get comments
|
// Here it is not necessary to get comments
|
||||||
Present = Att_CheckIfUsrIsPresentInAttEvent (Gbl.AttEvents.Lst[NumAttEvent].AttCod,UsrDat->UsrCod);
|
Present = Att_CheckIfUsrIsPresentInAttEvent (Gbl.AttEvents.Lst[NumAttEvent].AttCod,
|
||||||
|
UsrDat->UsrCod);
|
||||||
|
|
||||||
fprintf (Gbl.F.Out,"<td class=\"BM%u\">"
|
/* Write check or cross */
|
||||||
"<img src=\"%s/%s\""
|
fprintf (Gbl.F.Out,"<td class=\"BM%u\">",
|
||||||
" alt=\"%s\" title=\"%s\""
|
Gbl.RowEvenOdd);
|
||||||
" class=\"CONTEXT_ICO_16x16\" />"
|
Att_PutCheckOrCross (Present);
|
||||||
"</td>",
|
fprintf (Gbl.F.Out,"</td>");
|
||||||
Gbl.RowEvenOdd,
|
|
||||||
Gbl.Prefs.URLIcons,
|
|
||||||
Present ? "check-square.svg" :
|
|
||||||
"square.svg",
|
|
||||||
Present ? Txt_Present :
|
|
||||||
Txt_Absent,
|
|
||||||
Present ? Txt_Present :
|
|
||||||
Txt_Absent);
|
|
||||||
|
|
||||||
if (Present)
|
if (Present)
|
||||||
NumTimesPresent++;
|
NumTimesPresent++;
|
||||||
|
@ -3521,6 +3502,29 @@ static void Att_WriteRowStdSeveralAttEvents (unsigned NumStd,struct UsrData *Usr
|
||||||
Gbl.RowEvenOdd = 1 - Gbl.RowEvenOdd;
|
Gbl.RowEvenOdd = 1 - Gbl.RowEvenOdd;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
/*********************** Put check or cross character ************************/
|
||||||
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
static void Att_PutCheckOrCross (bool Present)
|
||||||
|
{
|
||||||
|
extern const char *Txt_Present;
|
||||||
|
extern const char *Txt_Absent;
|
||||||
|
|
||||||
|
fprintf (Gbl.F.Out,"<div class=\"");
|
||||||
|
|
||||||
|
if (Present)
|
||||||
|
fprintf (Gbl.F.Out,"ATT_CHECK\" title=\"%s\">"
|
||||||
|
"✓",
|
||||||
|
Txt_Present);
|
||||||
|
else
|
||||||
|
fprintf (Gbl.F.Out,"ATT_CROSS\" title=\"%s\">"
|
||||||
|
"✗",
|
||||||
|
Txt_Absent);
|
||||||
|
|
||||||
|
fprintf (Gbl.F.Out,"</div>");
|
||||||
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/**************** List the students with details and comments ****************/
|
/**************** List the students with details and comments ****************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
@ -3573,8 +3577,6 @@ static void Att_ListStdsWithAttEventsDetails (unsigned NumStdsInList,
|
||||||
static void Att_ListAttEventsForAStd (unsigned NumStd,struct UsrData *UsrDat)
|
static void Att_ListAttEventsForAStd (unsigned NumStd,struct UsrData *UsrDat)
|
||||||
{
|
{
|
||||||
extern const char *Txt_Today;
|
extern const char *Txt_Today;
|
||||||
extern const char *Txt_Present;
|
|
||||||
extern const char *Txt_Absent;
|
|
||||||
extern const char *Txt_Student_comment;
|
extern const char *Txt_Student_comment;
|
||||||
extern const char *Txt_Teachers_comment;
|
extern const char *Txt_Teachers_comment;
|
||||||
char PhotoURL[PATH_MAX + 1];
|
char PhotoURL[PATH_MAX + 1];
|
||||||
|
@ -3652,31 +3654,22 @@ static void Att_ListAttEventsForAStd (unsigned NumStd,struct UsrData *UsrDat)
|
||||||
/***** Write a row for this event *****/
|
/***** Write a row for this event *****/
|
||||||
fprintf (Gbl.F.Out,"<tr>"
|
fprintf (Gbl.F.Out,"<tr>"
|
||||||
"<td class=\"COLOR%u\"></td>"
|
"<td class=\"COLOR%u\"></td>"
|
||||||
"<td class=\"DAT RIGHT_MIDDLE COLOR%u\">"
|
"<td class=\"DAT RIGHT_TOP COLOR%u\">"
|
||||||
"%u:"
|
"%u:"
|
||||||
"</td>"
|
"</td>"
|
||||||
"<td class=\"DAT LEFT_MIDDLE COLOR%u\">"
|
"<td class=\"DAT LEFT_TOP COLOR%u\">",
|
||||||
"<img src=\"%s/%s\""
|
Gbl.RowEvenOdd,
|
||||||
" alt=\"%s\" title=\"%s\""
|
Gbl.RowEvenOdd,
|
||||||
" class=\"CONTEXT_ICO_16x16\" />"
|
NumAttEvent + 1,
|
||||||
"<span id=\"att_date_start_%u\"></span> %s"
|
Gbl.RowEvenOdd);
|
||||||
|
Att_PutCheckOrCross (Present);
|
||||||
|
fprintf (Gbl.F.Out,"<span id=\"att_date_start_%u\"></span> %s"
|
||||||
"<script type=\"text/javascript\">"
|
"<script type=\"text/javascript\">"
|
||||||
"writeLocalDateHMSFromUTC('att_date_start_%u',%ld,"
|
"writeLocalDateHMSFromUTC('att_date_start_%u',%ld,"
|
||||||
"%u,', ','%s',true,true,0x7);"
|
"%u,', ','%s',true,true,0x7);"
|
||||||
"</script>"
|
"</script>"
|
||||||
"</td>"
|
"</td>"
|
||||||
"</tr>",
|
"</tr>",
|
||||||
Gbl.RowEvenOdd,
|
|
||||||
Gbl.RowEvenOdd,
|
|
||||||
NumAttEvent + 1,
|
|
||||||
Gbl.RowEvenOdd,
|
|
||||||
Gbl.Prefs.URLIcons,
|
|
||||||
Present ? "check-square.svg" :
|
|
||||||
"square.svg",
|
|
||||||
Present ? Txt_Present :
|
|
||||||
Txt_Absent,
|
|
||||||
Present ? Txt_Present :
|
|
||||||
Txt_Absent,
|
|
||||||
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],
|
||||||
|
|
|
@ -356,8 +356,6 @@ Buenos d
|
||||||
|
|
||||||
// TODO: Sale de vez en cuando un mensaje "Can not get information about a file or folder.", por ejemplo en el timeline.
|
// TODO: Sale de vez en cuando un mensaje "Can not get information about a file or folder.", por ejemplo en el timeline.
|
||||||
|
|
||||||
// TODO: Tabla de asistencia con símbolos tip ok como entidades HTML
|
|
||||||
|
|
||||||
// TODO: Pedro Villar Castro:
|
// TODO: Pedro Villar Castro:
|
||||||
// Al asignar un TFG a alumnos, no escribir el DNI del alumno, sino escogerlo de una lista de entre los alumnos inscritos en la asignatura.
|
// Al asignar un TFG a alumnos, no escribir el DNI del alumno, sino escogerlo de una lista de entre los alumnos inscritos en la asignatura.
|
||||||
|
|
||||||
|
@ -386,10 +384,11 @@ En OpenSWAD:
|
||||||
ps2pdf source.ps destination.pdf
|
ps2pdf source.ps destination.pdf
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define Log_PLATFORM_VERSION "SWAD 18.40.1 (2019-02-13)"
|
#define Log_PLATFORM_VERSION "SWAD 18.41 (2019-02-13)"
|
||||||
#define CSS_FILE "swad18.33.css"
|
#define CSS_FILE "swad18.41.css"
|
||||||
#define JS_FILE "swad18.32.1.js"
|
#define JS_FILE "swad18.32.1.js"
|
||||||
/*
|
/*
|
||||||
|
Version 18.41: Feb 13, 2019 Changes in attendance marks for present/absent. (239203 lines)
|
||||||
Version 18.40.1: Feb 13, 2019 Code refactorization in firewall. (239201 lines)
|
Version 18.40.1: Feb 13, 2019 Code refactorization in firewall. (239201 lines)
|
||||||
Version 18.40: Feb 13, 2019 New table for banned IPs to mitigate DoS attacks. (239198 lines)
|
Version 18.40: Feb 13, 2019 New table for banned IPs to mitigate DoS attacks. (239198 lines)
|
||||||
2 changes necessary in database:
|
2 changes necessary in database:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user