");
/***** Initialize structure with user's data *****/
Usr_UsrDataConstructor (&UsrDat);
/***** Get email addresses of the selected users *****/
StrAddresses[0] = '\0';
Ptr = Gbl.Usrs.Selected.List[Rol_UNK];
while (*Ptr)
{
/* Get next user */
Par_GetNextStrUntilSeparParamMult (&Ptr,UsrDat.EncryptedUsrCod,
Cry_BYTES_ENCRYPTED_STR_SHA256_BASE64);
Usr_GetUsrCodFromEncryptedUsrCod (&UsrDat);
/* Get user's email */
Mai_GetEmailFromUsrCod (&UsrDat);
if (UsrDat.Email[0])
{
NumUsrsWithEmail++;
/* Check if users has accepted inscription in current course */
UsrDat.Accepted = Usr_CheckIfUsrHasAcceptedInCurrentCrs (&UsrDat);
if (UsrDat.Accepted) // If student has email and has accepted
{
if (NumAcceptedUsrsWithEmail > 0)
{
fprintf (Gbl.F.Out,", ");
LengthStrAddr ++;
if (LengthStrAddr > Mai_MAX_BYTES_STR_ADDR)
Lay_ShowErrorAndExit ("The space allocated to store email addresses is full.");
Str_Concat (StrAddresses,",",
Mai_MAX_BYTES_STR_ADDR);
}
LengthStrAddr += strlen (UsrDat.Email);
if (LengthStrAddr > Mai_MAX_BYTES_STR_ADDR)
Lay_ShowErrorAndExit ("The space allocated to store email addresses is full.");
Str_Concat (StrAddresses,UsrDat.Email,
Mai_MAX_BYTES_STR_ADDR);
fprintf (Gbl.F.Out,"
%s",
UsrDat.Email,Gbl.Hierarchy.Crs.FullName,UsrDat.Email);
NumAcceptedUsrsWithEmail++;
}
}
}
/***** Free memory used for user's data *****/
Usr_UsrDataDestructor (&UsrDat);
/***** End list with users' email addresses *****/
HTM_DIV_End ();
/***** Show a message with the number of users with email ****/
fprintf (Gbl.F.Out,"
");
fprintf (Gbl.F.Out,Txt_X_users_who_have_email,
NumUsrsWithEmail);
HTM_DIV_End ();
/***** Show a message with the number of users who have accepted and have email ****/
fprintf (Gbl.F.Out,"
");
fprintf (Gbl.F.Out,Txt_X_users_who_have_accepted_and_who_have_email,
NumAcceptedUsrsWithEmail);
HTM_DIV_End ();
/***** Icon to open the client email program *****/
fprintf (Gbl.F.Out,"