From 57c6ed0fa788894978f176aaa1367c87d05fb130 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonio=20Ca=C3=B1as=20Vargas?= Date: Mon, 3 Dec 2018 19:49:54 +0100 Subject: [PATCH] Version 18.19 --- swad_attendance.c | 48 +++++++++++++++++++++++++++++++++-------------- swad_changelog.h | 5 +++-- 2 files changed, 37 insertions(+), 16 deletions(-) diff --git a/swad_attendance.c b/swad_attendance.c index edc7fc8ee..e74b36257 100644 --- a/swad_attendance.c +++ b/swad_attendance.c @@ -113,6 +113,9 @@ static void Att_ListAttStudents (struct AttendanceEvent *Att); static void Att_WriteRowStdToCallTheRoll (unsigned NumStd, struct UsrData *UsrDat, struct AttendanceEvent *Att); +static void Att_PutLinkAttEvent (struct AttendanceEvent *AttEvent, + const char *Title,const char *Txt, + const char *LinkStyle); static void Att_PutParamsCodGrps (long AttCod); static void Att_GetNumStdsTotalWhoAreInAttEvent (struct AttendanceEvent *Att); static unsigned Att_GetNumStdsFromAListWhoAreInAttEvent (long AttCod,long LstSelectedUsrCods[],unsigned NumStdsInList); @@ -441,15 +444,9 @@ static void Att_ShowOneAttEvent (struct AttendanceEvent *Att,bool ShowOnlyThisAt if (!ShowOnlyThisAttEventComplete) fprintf (Gbl.F.Out," COLOR%u",Gbl.RowEvenOdd); fprintf (Gbl.F.Out,"\">"); - - /* Put form to view attendance event */ - Frm_StartForm (ActSeeOneAtt); - Att_PutParamAttCod (Att->AttCod); - Att_PutParamsCodGrps (Att->AttCod); - Frm_LinkFormSubmit (Txt_View_event,Att->Hidden ? "ASG_TITLE_LIGHT" : - "ASG_TITLE",NULL); - fprintf (Gbl.F.Out,"%s",Att->Title); - Frm_EndForm (); + Att_PutLinkAttEvent (Att,Txt_View_event,Att->Title, + Att->Hidden ? "ASG_TITLE_LIGHT" : + "ASG_TITLE"); fprintf (Gbl.F.Out,""); /* Number of students in this event */ @@ -2196,6 +2193,22 @@ static void Att_WriteRowStdToCallTheRoll (unsigned NumStd, Gbl.RowEvenOdd = 1 - Gbl.RowEvenOdd; } +/*****************************************************************************/ +/**************** Put link to view one attendance event **********************/ +/*****************************************************************************/ + +static void Att_PutLinkAttEvent (struct AttendanceEvent *AttEvent, + const char *Title,const char *Txt, + const char *LinkStyle) + { + Frm_StartForm (ActSeeOneAtt); + Att_PutParamAttCod (AttEvent->AttCod); + Att_PutParamsCodGrps (AttEvent->AttCod); + Frm_LinkFormSubmit (Title,LinkStyle,NULL); + fprintf (Gbl.F.Out,"%s",Txt); + Frm_EndForm (); + } + /*****************************************************************************/ /****** Put parameters with the default groups in an attendance event ********/ /*****************************************************************************/ @@ -3372,6 +3385,7 @@ static void Att_WriteTableHeadSeveralAttEvents (void) extern const char *Txt_ROLES_SINGUL_Abc[Rol_NUM_ROLES][Usr_NUM_SEXS]; extern const char *Txt_Attendance; unsigned NumAttEvent; + char StrNumAttEvent[10 + 1]; fprintf (Gbl.F.Out,"" "" @@ -3389,11 +3403,17 @@ static void Att_WriteTableHeadSeveralAttEvents (void) /***** Get data of this attendance event *****/ Att_GetDataOfAttEventByCodAndCheckCrs (&Gbl.AttEvents.Lst[NumAttEvent]); - fprintf (Gbl.F.Out,"" - "%u" - "", - Gbl.AttEvents.Lst[NumAttEvent].Title, - NumAttEvent + 1); + /***** Put link to this attendance event *****/ + fprintf (Gbl.F.Out,"", + Gbl.AttEvents.Lst[NumAttEvent].Title); + snprintf (StrNumAttEvent,sizeof (StrNumAttEvent), + "%u", + NumAttEvent + 1); + Att_PutLinkAttEvent (&Gbl.AttEvents.Lst[NumAttEvent], + Gbl.AttEvents.Lst[NumAttEvent].Title, + StrNumAttEvent, + NULL); + fprintf (Gbl.F.Out,""); } fprintf (Gbl.F.Out,"" diff --git a/swad_changelog.h b/swad_changelog.h index f87558d9c..6424857a5 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -329,7 +329,7 @@ Buenos d // 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. -// TODO: Al listar asistencia de un estudiante, en los números de cada una de las actividades, poner un enlace a dicha actividad. +// TODO: No se puede pulsar sobre la foto de un remitente de un mensaje recibido. /*****************************************************************************/ /****************************** Public constants *****************************/ @@ -350,10 +350,11 @@ En OpenSWAD: ps2pdf source.ps destination.pdf */ -#define Log_PLATFORM_VERSION "SWAD 18.18.4 (2018-12-03)" +#define Log_PLATFORM_VERSION "SWAD 18.19 (2018-12-03)" #define CSS_FILE "swad18.4.css" #define JS_FILE "swad17.17.1.js" /* + Version 18.19: Dec 03, 2018 Links to attendance events in attendance list. (237054 lines) Version 18.18.4: Dec 03, 2018 Removed MOOC advertisement. (237034 lines) Version 18.18.3: Nov 20, 2018 Fixed bug in user's public profile. (237031 lines) Version 18.18.2: Nov 16, 2018 Hierarchy menu shown in list of countries. (237028 lines)