mirror of
https://github.com/acanas/swad-core.git
synced 2024-06-12 19:54:05 +02:00
Version 18.7
This commit is contained in:
parent
fba8af478f
commit
322bfe8b99
|
@ -132,13 +132,13 @@ static void Att_PutParamsToPrintStdsList (void);
|
||||||
|
|
||||||
static void Att_PutButtonToShowDetails (void);
|
static void Att_PutButtonToShowDetails (void);
|
||||||
static void Att_ListEventsToSelect (Att_TypeOfView_t TypeOfView);
|
static void Att_ListEventsToSelect (Att_TypeOfView_t TypeOfView);
|
||||||
|
static void Att_PutIconToViewEditAttEvents (void);
|
||||||
static void Att_ListStdsAttendanceTable (Att_TypeOfView_t TypeOfView,
|
static void Att_ListStdsAttendanceTable (Att_TypeOfView_t TypeOfView,
|
||||||
unsigned NumStdsInList,
|
unsigned NumStdsInList,
|
||||||
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_ListStdsWithAttEventsDetails (Att_TypeOfView_t TypeOfView,
|
static void Att_ListStdsWithAttEventsDetails (unsigned NumStdsInList,
|
||||||
unsigned NumStdsInList,
|
|
||||||
long *LstSelectedUsrCods);
|
long *LstSelectedUsrCods);
|
||||||
static void Att_ListAttEventsForAStd (unsigned NumStd,struct UsrData *UsrDat);
|
static void Att_ListAttEventsForAStd (unsigned NumStd,struct UsrData *UsrDat);
|
||||||
|
|
||||||
|
@ -2768,6 +2768,8 @@ void Usr_PrintMyAttendanceCrs (void)
|
||||||
|
|
||||||
static void Usr_ListOrPrintMyAttendanceCrs (Att_TypeOfView_t TypeOfView)
|
static void Usr_ListOrPrintMyAttendanceCrs (Att_TypeOfView_t TypeOfView)
|
||||||
{
|
{
|
||||||
|
extern const char *Hlp_USERS_Attendance_attendance_list;
|
||||||
|
extern const char *Txt_Attendance;
|
||||||
unsigned NumAttEvent;
|
unsigned NumAttEvent;
|
||||||
|
|
||||||
/***** Get list of attendance events *****/
|
/***** Get list of attendance events *****/
|
||||||
|
@ -2790,6 +2792,14 @@ static void Usr_ListOrPrintMyAttendanceCrs (Att_TypeOfView_t TypeOfView)
|
||||||
/***** Get list of attendance events selected *****/
|
/***** Get list of attendance events selected *****/
|
||||||
Att_GetListSelectedAttCods (&Gbl.AttEvents.StrAttCodsSelected);
|
Att_GetListSelectedAttCods (&Gbl.AttEvents.StrAttCodsSelected);
|
||||||
|
|
||||||
|
/***** Start box *****/
|
||||||
|
Box_StartBox (NULL,Txt_Attendance,
|
||||||
|
TypeOfView == Att_NORMAL_VIEW_ONLY_ME ? Att_PutIconToPrintMyList :
|
||||||
|
NULL,
|
||||||
|
TypeOfView == Att_NORMAL_VIEW_ONLY_ME ? Hlp_USERS_Attendance_attendance_list :
|
||||||
|
NULL,
|
||||||
|
Box_NOT_CLOSABLE);
|
||||||
|
|
||||||
/***** List events to select *****/
|
/***** List events to select *****/
|
||||||
Att_ListEventsToSelect (TypeOfView);
|
Att_ListEventsToSelect (TypeOfView);
|
||||||
|
|
||||||
|
@ -2801,7 +2811,10 @@ static void Usr_ListOrPrintMyAttendanceCrs (Att_TypeOfView_t TypeOfView)
|
||||||
|
|
||||||
/***** Show details or put button to show details *****/
|
/***** Show details or put button to show details *****/
|
||||||
if (Gbl.AttEvents.ShowDetails)
|
if (Gbl.AttEvents.ShowDetails)
|
||||||
Att_ListStdsWithAttEventsDetails (TypeOfView,1,&Gbl.Usrs.Me.UsrDat.UsrCod);
|
Att_ListStdsWithAttEventsDetails (1,&Gbl.Usrs.Me.UsrDat.UsrCod);
|
||||||
|
|
||||||
|
/***** End box *****/
|
||||||
|
Box_EndBox ();
|
||||||
|
|
||||||
/***** Free memory for list of attendance events selected *****/
|
/***** Free memory for list of attendance events selected *****/
|
||||||
free ((void *) Gbl.AttEvents.StrAttCodsSelected);
|
free ((void *) Gbl.AttEvents.StrAttCodsSelected);
|
||||||
|
@ -2829,6 +2842,8 @@ void Usr_PrintStdsAttendanceCrs (void)
|
||||||
|
|
||||||
static void Usr_ListOrPrintStdsAttendanceCrs (Att_TypeOfView_t TypeOfView)
|
static void Usr_ListOrPrintStdsAttendanceCrs (Att_TypeOfView_t TypeOfView)
|
||||||
{
|
{
|
||||||
|
extern const char *Hlp_USERS_Attendance_attendance_list;
|
||||||
|
extern const char *Txt_Attendance;
|
||||||
extern const char *Txt_You_must_select_one_ore_more_students;
|
extern const char *Txt_You_must_select_one_ore_more_students;
|
||||||
unsigned NumStdsInList;
|
unsigned NumStdsInList;
|
||||||
long *LstSelectedUsrCods;
|
long *LstSelectedUsrCods;
|
||||||
|
@ -2863,6 +2878,14 @@ static void Usr_ListOrPrintStdsAttendanceCrs (Att_TypeOfView_t TypeOfView)
|
||||||
/***** Get list of attendance events selected *****/
|
/***** Get list of attendance events selected *****/
|
||||||
Att_GetListSelectedAttCods (&Gbl.AttEvents.StrAttCodsSelected);
|
Att_GetListSelectedAttCods (&Gbl.AttEvents.StrAttCodsSelected);
|
||||||
|
|
||||||
|
/***** Start box *****/
|
||||||
|
Box_StartBox (NULL,Txt_Attendance,
|
||||||
|
TypeOfView == Att_NORMAL_VIEW_STUDENTS ? Att_PutIconToPrintStdsList :
|
||||||
|
NULL,
|
||||||
|
TypeOfView == Att_NORMAL_VIEW_STUDENTS ? Hlp_USERS_Attendance_attendance_list :
|
||||||
|
NULL,
|
||||||
|
Box_NOT_CLOSABLE);
|
||||||
|
|
||||||
/***** List events to select *****/
|
/***** List events to select *****/
|
||||||
Att_ListEventsToSelect (TypeOfView);
|
Att_ListEventsToSelect (TypeOfView);
|
||||||
|
|
||||||
|
@ -2874,7 +2897,10 @@ static void Usr_ListOrPrintStdsAttendanceCrs (Att_TypeOfView_t TypeOfView)
|
||||||
|
|
||||||
/***** Show details or put button to show details *****/
|
/***** Show details or put button to show details *****/
|
||||||
if (Gbl.AttEvents.ShowDetails)
|
if (Gbl.AttEvents.ShowDetails)
|
||||||
Att_ListStdsWithAttEventsDetails (TypeOfView,NumStdsInList,LstSelectedUsrCods);
|
Att_ListStdsWithAttEventsDetails (NumStdsInList,LstSelectedUsrCods);
|
||||||
|
|
||||||
|
/***** End box *****/
|
||||||
|
Box_EndBox ();
|
||||||
|
|
||||||
/***** Free memory for list of attendance events selected *****/
|
/***** Free memory for list of attendance events selected *****/
|
||||||
free ((void *) Gbl.AttEvents.StrAttCodsSelected);
|
free ((void *) Gbl.AttEvents.StrAttCodsSelected);
|
||||||
|
@ -3101,7 +3127,6 @@ static void Att_PutButtonToShowDetails (void)
|
||||||
|
|
||||||
static void Att_ListEventsToSelect (Att_TypeOfView_t TypeOfView)
|
static void Att_ListEventsToSelect (Att_TypeOfView_t TypeOfView)
|
||||||
{
|
{
|
||||||
extern const char *Hlp_USERS_Attendance_attendance_list;
|
|
||||||
extern const char *The_ClassFormBold[The_NUM_THEMES];
|
extern const char *The_ClassFormBold[The_NUM_THEMES];
|
||||||
extern const char *Txt_Events;
|
extern const char *Txt_Events;
|
||||||
extern const char *Txt_Event;
|
extern const char *Txt_Event;
|
||||||
|
@ -3111,22 +3136,27 @@ static void Att_ListEventsToSelect (Att_TypeOfView_t TypeOfView)
|
||||||
extern const char *Txt_Update_attendance;
|
extern const char *Txt_Update_attendance;
|
||||||
unsigned UniqueId;
|
unsigned UniqueId;
|
||||||
unsigned NumAttEvent;
|
unsigned NumAttEvent;
|
||||||
|
bool NormalView = (TypeOfView == Att_NORMAL_VIEW_ONLY_ME ||
|
||||||
|
TypeOfView == Att_NORMAL_VIEW_STUDENTS);
|
||||||
|
|
||||||
|
/***** Start box *****/
|
||||||
|
Box_StartBox (NULL,Txt_Events,
|
||||||
|
TypeOfView == Att_NORMAL_VIEW_STUDENTS ? Att_PutIconToViewEditAttEvents :
|
||||||
|
NULL,
|
||||||
|
NULL,
|
||||||
|
Box_NOT_CLOSABLE);
|
||||||
|
|
||||||
/***** Start form to update the attendance
|
/***** Start form to update the attendance
|
||||||
depending on the events selected *****/
|
depending on the events selected *****/
|
||||||
if (TypeOfView == Att_NORMAL_VIEW_ONLY_ME ||
|
if (NormalView)
|
||||||
TypeOfView == Att_NORMAL_VIEW_STUDENTS)
|
|
||||||
{
|
{
|
||||||
Act_StartForm (Gbl.Action.Act);
|
Act_StartForm (Gbl.Action.Act);
|
||||||
Grp_PutParamsCodGrps ();
|
Grp_PutParamsCodGrps ();
|
||||||
Usr_PutHiddenParUsrCodAll (Gbl.Action.Act,Gbl.Usrs.Select[Rol_UNK]);
|
Usr_PutHiddenParUsrCodAll (Gbl.Action.Act,Gbl.Usrs.Select[Rol_UNK]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/***** Start box and table *****/
|
/***** Start table *****/
|
||||||
Box_StartBoxTable (NULL,Txt_Events,NULL,
|
Tbl_StartTableWide (2);
|
||||||
TypeOfView == Att_PRINT_VIEW ? NULL :
|
|
||||||
Hlp_USERS_Attendance_attendance_list,
|
|
||||||
Box_NOT_CLOSABLE,2);
|
|
||||||
|
|
||||||
/***** Heading row *****/
|
/***** Heading row *****/
|
||||||
fprintf (Gbl.F.Out,"<tr>"
|
fprintf (Gbl.F.Out,"<tr>"
|
||||||
|
@ -3188,8 +3218,7 @@ static void Att_ListEventsToSelect (Att_TypeOfView_t TypeOfView)
|
||||||
}
|
}
|
||||||
|
|
||||||
/***** Put button to refresh *****/
|
/***** Put button to refresh *****/
|
||||||
if (TypeOfView == Att_NORMAL_VIEW_ONLY_ME ||
|
if (NormalView)
|
||||||
TypeOfView == Att_NORMAL_VIEW_STUDENTS)
|
|
||||||
{
|
{
|
||||||
fprintf (Gbl.F.Out,"<tr>"
|
fprintf (Gbl.F.Out,"<tr>"
|
||||||
"<td colspan=\"4\" class=\"CENTER_MIDDLE\">");
|
"<td colspan=\"4\" class=\"CENTER_MIDDLE\">");
|
||||||
|
@ -3202,13 +3231,24 @@ static void Att_ListEventsToSelect (Att_TypeOfView_t TypeOfView)
|
||||||
"</tr>");
|
"</tr>");
|
||||||
}
|
}
|
||||||
|
|
||||||
/***** End table and box *****/
|
/***** End table *****/
|
||||||
Box_EndBoxTable ();
|
Tbl_EndTable ();
|
||||||
|
|
||||||
/***** End form *****/
|
/***** End form *****/
|
||||||
if (TypeOfView == Att_NORMAL_VIEW_ONLY_ME ||
|
if (NormalView)
|
||||||
TypeOfView == Att_NORMAL_VIEW_STUDENTS)
|
|
||||||
Act_EndForm ();
|
Act_EndForm ();
|
||||||
|
|
||||||
|
/***** End box *****/
|
||||||
|
Box_EndBox ();
|
||||||
|
}
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
/************** Put icon to view/edit all attendance events ******************/
|
||||||
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
static void Att_PutIconToViewEditAttEvents (void)
|
||||||
|
{
|
||||||
|
Ico_PutContextualIconToEdit (ActSeeAtt,NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
@ -3219,32 +3259,19 @@ static void Att_ListStdsAttendanceTable (Att_TypeOfView_t TypeOfView,
|
||||||
unsigned NumStdsInList,
|
unsigned NumStdsInList,
|
||||||
long *LstSelectedUsrCods)
|
long *LstSelectedUsrCods)
|
||||||
{
|
{
|
||||||
extern const char *Hlp_USERS_Attendance_attendance_list;
|
|
||||||
extern const char *Txt_Attendance;
|
|
||||||
extern const char *Txt_Number_of_students;
|
extern const char *Txt_Number_of_students;
|
||||||
struct UsrData UsrDat;
|
struct UsrData UsrDat;
|
||||||
unsigned NumStd;
|
unsigned NumStd;
|
||||||
unsigned NumAttEvent;
|
unsigned NumAttEvent;
|
||||||
unsigned Total;
|
unsigned Total;
|
||||||
bool PutButtonShowDetails = (!Gbl.AttEvents.ShowDetails &&
|
bool PutButtonShowDetails = (TypeOfView != Att_PRINT_VIEW &&
|
||||||
(TypeOfView == Att_NORMAL_VIEW_ONLY_ME ||
|
!Gbl.AttEvents.ShowDetails);
|
||||||
TypeOfView == Att_NORMAL_VIEW_STUDENTS));
|
|
||||||
|
|
||||||
/***** Initialize structure with user's data *****/
|
/***** Initialize structure with user's data *****/
|
||||||
Usr_UsrDataConstructor (&UsrDat);
|
Usr_UsrDataConstructor (&UsrDat);
|
||||||
|
|
||||||
/***** Start box *****/
|
/***** Start table *****/
|
||||||
Box_StartBox (NULL,Txt_Attendance,
|
Tbl_StartTableCenter (2);
|
||||||
(TypeOfView == Att_NORMAL_VIEW_ONLY_ME) ? Att_PutIconToPrintMyList :
|
|
||||||
((TypeOfView == Att_NORMAL_VIEW_STUDENTS) ? Att_PutIconToPrintStdsList :
|
|
||||||
NULL),
|
|
||||||
TypeOfView == Att_PRINT_VIEW ? NULL :
|
|
||||||
Hlp_USERS_Attendance_attendance_list,
|
|
||||||
Box_NOT_CLOSABLE);
|
|
||||||
if (PutButtonShowDetails)
|
|
||||||
Tbl_StartTableWideMargin (2);
|
|
||||||
else
|
|
||||||
Tbl_StartTableWide (2);
|
|
||||||
|
|
||||||
/***** Heading row *****/
|
/***** Heading row *****/
|
||||||
Att_WriteTableHeadSeveralAttEvents ();
|
Att_WriteTableHeadSeveralAttEvents ();
|
||||||
|
@ -3298,9 +3325,6 @@ static void Att_ListStdsAttendanceTable (Att_TypeOfView_t TypeOfView,
|
||||||
if (PutButtonShowDetails)
|
if (PutButtonShowDetails)
|
||||||
Att_PutButtonToShowDetails ();
|
Att_PutButtonToShowDetails ();
|
||||||
|
|
||||||
/***** End box *****/
|
|
||||||
Box_EndBox ();
|
|
||||||
|
|
||||||
/***** Free memory used for user's data *****/
|
/***** Free memory used for user's data *****/
|
||||||
Usr_UsrDataDestructor (&UsrDat);
|
Usr_UsrDataDestructor (&UsrDat);
|
||||||
}
|
}
|
||||||
|
@ -3444,11 +3468,9 @@ static void Att_WriteRowStdSeveralAttEvents (unsigned NumStd,struct UsrData *Usr
|
||||||
/**************** List the students with details and comments ****************/
|
/**************** List the students with details and comments ****************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
static void Att_ListStdsWithAttEventsDetails (Att_TypeOfView_t TypeOfView,
|
static void Att_ListStdsWithAttEventsDetails (unsigned NumStdsInList,
|
||||||
unsigned NumStdsInList,
|
|
||||||
long *LstSelectedUsrCods)
|
long *LstSelectedUsrCods)
|
||||||
{
|
{
|
||||||
extern const char *Hlp_USERS_Attendance_attendance_list;
|
|
||||||
extern const char *Txt_Details;
|
extern const char *Txt_Details;
|
||||||
struct UsrData UsrDat;
|
struct UsrData UsrDat;
|
||||||
unsigned NumStd;
|
unsigned NumStd;
|
||||||
|
@ -3458,9 +3480,7 @@ static void Att_ListStdsWithAttEventsDetails (Att_TypeOfView_t TypeOfView,
|
||||||
|
|
||||||
/***** Start box and table *****/
|
/***** Start box and table *****/
|
||||||
Box_StartBoxTable (NULL,Txt_Details,NULL,
|
Box_StartBoxTable (NULL,Txt_Details,NULL,
|
||||||
TypeOfView == Att_PRINT_VIEW ? NULL :
|
NULL,Box_NOT_CLOSABLE,2);
|
||||||
Hlp_USERS_Attendance_attendance_list,
|
|
||||||
Box_NOT_CLOSABLE,2);
|
|
||||||
|
|
||||||
/***** List students with attendance details *****/
|
/***** List students with attendance details *****/
|
||||||
for (NumStd = 0, Gbl.RowEvenOdd = 0;
|
for (NumStd = 0, Gbl.RowEvenOdd = 0;
|
||||||
|
|
|
@ -355,10 +355,11 @@ En OpenSWAD:
|
||||||
ps2pdf source.ps destination.pdf
|
ps2pdf source.ps destination.pdf
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define Log_PLATFORM_VERSION "SWAD 18.6.7 (2018-10-17)"
|
#define Log_PLATFORM_VERSION "SWAD 18.7 (2018-10-18)"
|
||||||
#define CSS_FILE "swad18.4.css"
|
#define CSS_FILE "swad18.4.css"
|
||||||
#define JS_FILE "swad17.17.1.js"
|
#define JS_FILE "swad17.17.1.js"
|
||||||
/*
|
/*
|
||||||
|
Version 18.7: Oct 18, 2018 Changes in layout of list of attendance. (236570 lines)
|
||||||
Version 18.6.7: Oct 18, 2018 Changes related to QR codes. (236556 lines)
|
Version 18.6.7: Oct 18, 2018 Changes related to QR codes. (236556 lines)
|
||||||
Version 18.6.6: Oct 18, 2018 Some sprintf changed by snprintf. (236560 lines)
|
Version 18.6.6: Oct 18, 2018 Some sprintf changed by snprintf. (236560 lines)
|
||||||
Version 18.6.5: Oct 17, 2018 Some sprintf changed by snprintf or asprintf. (236125 lines)
|
Version 18.6.5: Oct 17, 2018 Some sprintf changed by snprintf or asprintf. (236125 lines)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user