");
Act_FormStart (ActPrnLstAttStd);
+ Grp_PutParamsCodGrps ();
Usr_PutHiddenParUsrCodAll (ActPrnLstAttStd,Gbl.Usrs.Select.All);
+ if (StrAttCodsSelected[0])
+ Par_PutHiddenParamString ("AttCods",StrAttCodsSelected);
Act_LinkFormSubmit (Txt_Print_view,The_ClassFormul[Gbl.Prefs.Theme]);
Lay_PutSendIcon ("print",Txt_Print_view,Txt_Print_view);
fprintf (Gbl.F.Out,""
@@ -2144,7 +2147,7 @@ static void Att_PutParamsCodGrps (long AttCod)
{
fprintf (Gbl.F.Out," 0)
+ /* Check if this group is selected */
+ for (NumGrpSel = 0;
+ NumGrpSel < Gbl.CurrentCrs.Grps.LstGrpsSel.NumGrps &&
+ !Gbl.AttEvents.Lst[NumAttEvent].Selected;
+ NumGrpSel++)
+ if (Gbl.CurrentCrs.Grps.LstGrpsSel.GrpCod[NumGrpSel] == GrpCodInThisEvent)
+ Gbl.AttEvents.Lst[NumAttEvent].Selected = true;
+ }
+ else // This event is not associated to groups
+ Gbl.AttEvents.Lst[NumAttEvent].Selected = true;
+
+ /***** Free structure that stores the query result *****/
+ DB_FreeMySQLResult (&mysql_res);
+ }
+ }
+ }
}
/*****************************************************************************/
@@ -2797,19 +2865,24 @@ static void Att_GetListSelectedAttCods (void)
static void Att_ListEventsToSelect (void)
{
+ extern const char *The_ClassFormul[The_NUM_THEMES];
extern const char *Txt_Events;
extern const char *Txt_Event;
extern const char *Txt_ROLES_PLURAL_Abc[Rol_NUM_ROLES][Usr_NUM_SEXS];
- extern const char *Txt_Present;
- extern const char *Txt_Absent;
- extern const char *Txt_Student_comment;
- extern const char *Txt_Teachers_comment;
+ extern const char *Txt_Update_attendance;
const char *BgColor;
unsigned NumAttEvent;
/***** Start frame *****/
if (Gbl.CurrentAct == ActSeeLstAttStd)
+ {
+ /***** Start form to update the attendance
+ depending on the events selected *****/
+ Act_FormStart (ActSeeLstAttStd);
+ Usr_PutHiddenParUsrCodAll (ActSeeLstAttStd,Gbl.Usrs.Select.All);
+
Lay_StartRoundFrameTable10 (NULL,2,Txt_Events);
+ }
else
Lay_StartSquareFrameTable (NULL,NULL,NULL,2);
@@ -2820,7 +2893,7 @@ static void Att_ListEventsToSelect (void)
Txt_Event,
Txt_ROLES_PLURAL_Abc[Rol_ROLE_STUDENT][Usr_SEX_UNKNOWN]);
- /***** List the events with students *****/
+ /***** List the events *****/
for (NumAttEvent = 0, Gbl.RowEvenOdd = 0;
NumAttEvent < Gbl.AttEvents.Num;
NumAttEvent++)
@@ -2834,12 +2907,13 @@ static void Att_ListEventsToSelect (void)
/***** Write a row for this event *****/
fprintf (Gbl.F.Out,"
"
"
"
- ""
+ fprintf (Gbl.F.Out," />"
+ "
"
"
%u:
"
"
%02u/%02u/%04u %02u:%02u h %s
"
"
%u
"
@@ -2861,15 +2935,20 @@ static void Att_ListEventsToSelect (void)
/***** Put button to refresh *****/
fprintf (Gbl.F.Out,"
"
- "
");
- // TODO: Form to update attendance
- Lay_PutSendIcon ("recycle","Actualizar asistencia en los eventos seleccionados","Actualizar asistencia"); // Need translation!!!
+ "
");
+ Act_LinkFormSubmit ("Actualizar asistencia según los eventos seleccionados",The_ClassFormul[Gbl.Prefs.Theme]);
+ Lay_PutSendIcon ("recycle","Actualizar asistencia según los eventos seleccionados",Txt_Update_attendance); // Need translation!!!
fprintf (Gbl.F.Out,"
"
"
");
/***** End frame *****/
if (Gbl.CurrentAct == ActSeeLstAttStd)
+ {
Lay_EndRoundFrameTable10 ();
+
+ /***** End form *****/
+ fprintf (Gbl.F.Out,"");
+ }
else
Lay_EndSquareFrameTable ();
}
@@ -2961,7 +3040,7 @@ static void Att_WriteTableHeadSeveralAttEvents (void)
for (NumAttEvent = 0;
NumAttEvent < Gbl.AttEvents.Num;
NumAttEvent++)
- if (Gbl.AttEvents.Lst[NumAttEvent].NumStdsFromList)
+ if (Gbl.AttEvents.Lst[NumAttEvent].Selected)
{
/***** Get data of this attendance event *****/
Att_GetDataOfAttEventByCodAndCheckCrs (&Gbl.AttEvents.Lst[NumAttEvent]);
@@ -3038,7 +3117,7 @@ static void Att_WriteRowStdSeveralAttEvents (unsigned NumStd,struct UsrData *Usr
for (NumAttEvent = 0, NumTimesPresent = 0;
NumAttEvent < Gbl.AttEvents.Num;
NumAttEvent++)
- if (Gbl.AttEvents.Lst[NumAttEvent].NumStdsFromList)
+ if (Gbl.AttEvents.Lst[NumAttEvent].Selected)
{
/***** Check if this student is already registered in the current event *****/
// Here it is not necessary to get comments
diff --git a/swad_changelog.h b/swad_changelog.h
index 031ec3077..0dba0147a 100644
--- a/swad_changelog.h
+++ b/swad_changelog.h
@@ -35,14 +35,15 @@
/****************************** Public constants *****************************/
/*****************************************************************************/
-#define Log_PLATFORM_VERSION "SWAD 14.33 (2014/12/07)"
+#define Log_PLATFORM_VERSION "SWAD 14.34 (2014/12/08)"
// 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 | tail -1
/*
- Version 13.33 :Dic 07, 2014 A teacher can select attendance events in list of attendances. (170595 lines)
- Version 13.32.1 :Dic 06, 2014 Added new social network. (170518 lines)
+ Version 14.34 :Dic 08, 2014 Teachers can refresh list of attendances after selecting events. (170688 lines)
+ Version 14.33 :Dic 07, 2014 A teacher can select attendance events in list of attendances. (170595 lines)
+ Version 14.32.1 :Dic 06, 2014 Added new social network. (170518 lines)
1 change necessary in database:
ALTER TABLE usr_webs CHANGE Web Web ENUM('www','delicious','edmodo','facebook','flickr','foursquare','github','googleplus','googlescholar','instagram','linkedin','paperli','pinterest','researchgate','scoopit','slideshare','storify','tumblr','twitter','wikipedia','youtube') NOT NULL;
diff --git a/swad_group.c b/swad_group.c
index ee1600f51..96eb7ab6d 100644
--- a/swad_group.c
+++ b/swad_group.c
@@ -273,7 +273,7 @@ static void Grp_ShowFormSeveralGrps (Act_Action_t NextAction)
/***** Free list of groups types and groups in this course *****/
Grp_FreeListGrpTypesAndGrps ();
- /***** Submit buton *****/
+ /***** Submit button *****/
fprintf (Gbl.F.Out,"