mirror of https://github.com/acanas/swad-core.git
Version 15.246.1
This commit is contained in:
parent
b80475ac0e
commit
8bb17ae3ae
|
@ -1923,12 +1923,13 @@ static void Att_ListAttStudents (struct AttendanceEvent *Att)
|
|||
NumStd < Gbl.Usrs.LstUsrs[Rol_STUDENT].NumUsrs;
|
||||
NumStd++)
|
||||
{
|
||||
UsrDat.UsrCod = Gbl.Usrs.LstUsrs[Rol_STUDENT].Lst[NumStd].UsrCod;
|
||||
if (Usr_ChkUsrCodAndGetAllUsrDataFromUsrCod (&UsrDat)) // If user's data exist...
|
||||
{
|
||||
UsrDat.Accepted = Gbl.Usrs.LstUsrs[Rol_STUDENT].Lst[NumStd].Accepted;
|
||||
Att_WriteRowStdToCallTheRoll (NumStd + 1,&UsrDat,Att);
|
||||
}
|
||||
/* Copy user's basic data from list */
|
||||
Usr_CopyBasicUsrDataFromList (&UsrDat,&Gbl.Usrs.LstUsrs[Rol_STUDENT].Lst[NumStd]);
|
||||
|
||||
/* Get list of user's IDs */
|
||||
ID_GetListIDsFromUsrCod (&UsrDat);
|
||||
|
||||
Att_WriteRowStdToCallTheRoll (NumStd + 1,&UsrDat,Att);
|
||||
}
|
||||
|
||||
/* Send button and end frame */
|
||||
|
@ -2226,7 +2227,7 @@ void Att_RegisterStudentsInAttEvent (void)
|
|||
{
|
||||
Par_GetNextStrUntilSeparParamMult (&Ptr,UsrData.EncryptedUsrCod,Cry_LENGTH_ENCRYPTED_STR_SHA256_BASE64);
|
||||
Usr_GetUsrCodFromEncryptedUsrCod (&UsrData);
|
||||
if (Usr_ChkUsrCodAndGetAllUsrDataFromUsrCod (&UsrData)) // Get student's data from the database
|
||||
if (UsrData.UsrCod > 0) // Student exists in database
|
||||
/***** Mark student to not be removed *****/
|
||||
for (NumStd = 0;
|
||||
NumStd < Gbl.Usrs.LstUsrs[Rol_STUDENT].NumUsrs;
|
||||
|
|
|
@ -136,13 +136,14 @@
|
|||
/****************************** Public constants *****************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
#define Log_PLATFORM_VERSION "SWAD 15.246 (2016-07-26)"
|
||||
#define Log_PLATFORM_VERSION "SWAD 15.246.1 (2016-07-26)"
|
||||
#define CSS_FILE "swad15.229.css"
|
||||
#define JS_FILE "swad15.238.1.js"
|
||||
|
||||
// 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
|
||||
/*
|
||||
Version 15.246.1: Jul 26, 2016 Attendance of users and e-mail to users use the list filled instead of querying database a second time to get all user's data. (204093 lines)
|
||||
Version 15.246: Jul 26, 2016 Classphoto of users uses the list filled instead of querying database a second time to get all user's data.
|
||||
Origin place is removed from classphoto. (204094 lines)
|
||||
Version 15.245.5: Jul 26, 2016 Fixed bug in user's data. (204116 lines)
|
||||
|
|
59
swad_mail.c
59
swad_mail.c
|
@ -815,37 +815,38 @@ void Mai_ListEMails (void)
|
|||
NumUsr < Gbl.Usrs.LstUsrs[Rol_STUDENT].NumUsrs;
|
||||
NumUsr++)
|
||||
{
|
||||
UsrDat.UsrCod = Gbl.Usrs.LstUsrs[Rol_STUDENT].Lst[NumUsr].UsrCod;
|
||||
if (Usr_ChkUsrCodAndGetAllUsrDataFromUsrCod (&UsrDat)) // If user's data exist...
|
||||
{
|
||||
UsrDat.Accepted = Gbl.Usrs.LstUsrs[Rol_STUDENT].Lst[NumUsr].Accepted;
|
||||
if (UsrDat.Email[0])
|
||||
{
|
||||
NumStdsWithEmail++;
|
||||
if (UsrDat.Accepted) // If student has e-mail and has accepted
|
||||
{
|
||||
if (NumAcceptedStdsWithEmail > 0)
|
||||
{
|
||||
fprintf (Gbl.F.Out,", ");
|
||||
LengthStrAddr += 2;
|
||||
if (LengthStrAddr <= Mai_MAX_LENGTH_STR_ADDR)
|
||||
strcat (StrAddresses,",");
|
||||
else
|
||||
Lay_ShowErrorAndExit ("The space allocated to store e-mail addresses is full.");
|
||||
}
|
||||
LengthStrAddr += strlen (UsrDat.Email);
|
||||
if (LengthStrAddr <= Mai_MAX_LENGTH_STR_ADDR)
|
||||
strcat (StrAddresses,UsrDat.Email);
|
||||
else
|
||||
Lay_ShowErrorAndExit ("The space allocated to store e-mail addresses is full.");
|
||||
/* Copy user's basic data from list */
|
||||
Usr_CopyBasicUsrDataFromList (&UsrDat,&Gbl.Usrs.LstUsrs[Rol_STUDENT].Lst[NumUsr]);
|
||||
|
||||
fprintf (Gbl.F.Out,"<a href=\"mailto:%s?subject=%s\">%s</a>",
|
||||
UsrDat.Email,Gbl.CurrentCrs.Crs.FullName,UsrDat.Email);
|
||||
/* Get user's e-mail */
|
||||
Mai_GetEmailFromUsrCod (&UsrDat);
|
||||
|
||||
NumAcceptedStdsWithEmail++;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (UsrDat.Email[0])
|
||||
{
|
||||
NumStdsWithEmail++;
|
||||
if (UsrDat.Accepted) // If student has e-mail and has accepted
|
||||
{
|
||||
if (NumAcceptedStdsWithEmail > 0)
|
||||
{
|
||||
fprintf (Gbl.F.Out,", ");
|
||||
LengthStrAddr += 2;
|
||||
if (LengthStrAddr <= Mai_MAX_LENGTH_STR_ADDR)
|
||||
strcat (StrAddresses,",");
|
||||
else
|
||||
Lay_ShowErrorAndExit ("The space allocated to store e-mail addresses is full.");
|
||||
}
|
||||
LengthStrAddr += strlen (UsrDat.Email);
|
||||
if (LengthStrAddr <= Mai_MAX_LENGTH_STR_ADDR)
|
||||
strcat (StrAddresses,UsrDat.Email);
|
||||
else
|
||||
Lay_ShowErrorAndExit ("The space allocated to store e-mail addresses is full.");
|
||||
|
||||
fprintf (Gbl.F.Out,"<a href=\"mailto:%s?subject=%s\">%s</a>",
|
||||
UsrDat.Email,Gbl.CurrentCrs.Crs.FullName,UsrDat.Email);
|
||||
|
||||
NumAcceptedStdsWithEmail++;
|
||||
}
|
||||
}
|
||||
}
|
||||
fprintf (Gbl.F.Out,"</td>"
|
||||
"</tr>");
|
||||
|
|
Loading…
Reference in New Issue