mirror of https://github.com/acanas/swad-core.git
Version 23.1: Sep 14, 2023 Fixed bugs in listing of users.
This commit is contained in:
parent
76fc5dff8e
commit
2ee8712203
19
swad_ID.c
19
swad_ID.c
|
@ -308,22 +308,21 @@ static bool ID_CheckIfUsrIDIsValidUsingMinDigits (const char *UsrID,unsigned Min
|
|||
void ID_WriteUsrIDs (struct Usr_Data *UsrDat,const char *Anchor)
|
||||
{
|
||||
unsigned NumID;
|
||||
bool ICanSeeUsrID;
|
||||
bool ICanConfirmUsrID;
|
||||
|
||||
ICanSeeUsrID = ID_ICanSeeOtherUsrIDs (UsrDat);
|
||||
ICanConfirmUsrID = ICanSeeUsrID &&
|
||||
(UsrDat->UsrCod != Gbl.Usrs.Me.UsrDat.UsrCod) && // Not me
|
||||
!Frm_CheckIfInside () && // Not inside another form
|
||||
Act_GetBrowserTab (Gbl.Action.Act) == Act_BRW_1ST_TAB; // Only in main browser tab
|
||||
bool ICanSeeUsrID = ID_ICanSeeOtherUsrIDs (UsrDat);
|
||||
bool ICanConfirmUsrID = ICanSeeUsrID &&
|
||||
Usr_ItsMe (UsrDat->UsrCod) == Usr_OTHER && // Not me
|
||||
!Frm_CheckIfInside () && // Not inside another form
|
||||
Act_GetBrowserTab (Gbl.Action.Act) == Act_BRW_1ST_TAB; // Only in main browser tab
|
||||
|
||||
for (NumID = 0;
|
||||
NumID < UsrDat->IDs.Num;
|
||||
NumID++)
|
||||
{
|
||||
/* If not the first ID ==> new line */
|
||||
if (NumID)
|
||||
HTM_BR ();
|
||||
|
||||
/* Write this ID */
|
||||
HTM_SPAN_Begin ("class=\"%s_%s\"",
|
||||
UsrDat->IDs.List[NumID].Confirmed ? "USR_ID_C" :
|
||||
"USR_ID_NC",
|
||||
|
@ -334,8 +333,8 @@ void ID_WriteUsrIDs (struct Usr_Data *UsrDat,const char *Anchor)
|
|||
HTM_Txt ("********");
|
||||
HTM_SPAN_End ();
|
||||
|
||||
if (ICanConfirmUsrID &&
|
||||
!UsrDat->IDs.List[NumID].Confirmed)
|
||||
/* Put link to confirm ID? */
|
||||
if (ICanConfirmUsrID && !UsrDat->IDs.List[NumID].Confirmed)
|
||||
ID_PutLinkToConfirmID (UsrDat,NumID,Anchor);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -632,10 +632,11 @@ TODO: Francisco Javier Fern
|
|||
Me sale este error, no sé si por no recordar yo la sintaxis apropiada para mandar a varios destinatarios. ¿No era así?
|
||||
"can npt create received message (duplicated entry '243218-2160773' for key 'UsrCod_MsgCod')
|
||||
*/
|
||||
#define Log_PLATFORM_VERSION "SWAD 23.0.2 (2023-09-13)"
|
||||
#define Log_PLATFORM_VERSION "SWAD 23.1 (2023-09-14)"
|
||||
#define CSS_FILE "swad22.120.4.css"
|
||||
#define JS_FILE "swad22.49.js"
|
||||
/*
|
||||
Version 23.1: Sep 14, 2023 Fixed bugs in listing of users. (337600 lines)
|
||||
Version 23.0.2: Sep 13, 2023 Fixed CSS in dates and listing of centers and degrees. (337587 lines)
|
||||
Version 23.0.1: Sep 11, 2023 Code refactoring related to hidden-visible. (337586 lines)
|
||||
Version 23.0: Sep 11, 2023 Code refactoring related to hidden-visible. (337588 lines)
|
||||
|
|
14
swad_user.c
14
swad_user.c
|
@ -2221,9 +2221,9 @@ void Usr_WriteRowUsrMainData (unsigned NumUsr,struct Usr_Data *UsrDat,
|
|||
HTM_Unsigned (NumUsr);
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** Show user's photo *****/
|
||||
if (Gbl.Usrs.Listing.WithPhotos)
|
||||
{
|
||||
/***** Show user's photo *****/
|
||||
HTM_TD_Begin ("class=\"CM %s\"",BgColor);
|
||||
Pho_ShowUsrPhotoIfAllowed (UsrDat,
|
||||
ClassPhoto[Gbl.Prefs.PhotoShape],Pho_ZOOM);
|
||||
|
@ -4301,6 +4301,9 @@ void Usr_ListAllDataGsts (void)
|
|||
Usr_DONT_GET_PREFS,
|
||||
Usr_DONT_GET_ROLE_IN_CURRENT_CRS))
|
||||
{
|
||||
UsrDat.Roles.InCurrentCrs = Rol_GST; // We know the user's role.
|
||||
// It is not necessary to retrieve
|
||||
// his/her role from database.
|
||||
UsrDat.Accepted = false; // Guests have no courses,...
|
||||
// ...so they have not accepted...
|
||||
// ...inscription in any course
|
||||
|
@ -4502,6 +4505,9 @@ void Usr_ListAllDataStds (void)
|
|||
Usr_DONT_GET_PREFS,
|
||||
Usr_DONT_GET_ROLE_IN_CURRENT_CRS))
|
||||
{
|
||||
UsrDat.Roles.InCurrentCrs = Rol_STD; // We know the user's role.
|
||||
// It is not necessary to retrieve
|
||||
// his/her role from database.
|
||||
UsrDat.Accepted = Gbl.Usrs.LstUsrs[Rol_STD].Lst[NumUsr].Accepted;
|
||||
NumUsr++;
|
||||
Usr_WriteRowStdAllData (&UsrDat,GroupNames);
|
||||
|
@ -4567,6 +4573,9 @@ static void Usr_ListUsrsForSelection (Rol_Role_t Role,
|
|||
Usr_DONT_GET_PREFS,
|
||||
Usr_DONT_GET_ROLE_IN_CURRENT_CRS))
|
||||
{
|
||||
UsrDat.Roles.InCurrentCrs = Role; // We know the user's role.
|
||||
// It is not necessary to retrieve
|
||||
// his/her role from database.
|
||||
UsrDat.Accepted = Gbl.Usrs.LstUsrs[Role].Lst[NumUsr].Accepted;
|
||||
Usr_WriteRowUsrMainData (++NumUsr,&UsrDat,true,Role,SelectedUsrs);
|
||||
|
||||
|
@ -4704,6 +4713,9 @@ static void Usr_ListRowsAllDataTchs (Rol_Role_t Role,
|
|||
Usr_DONT_GET_PREFS,
|
||||
Usr_DONT_GET_ROLE_IN_CURRENT_CRS))
|
||||
{
|
||||
UsrDat.Roles.InCurrentCrs = Role; // We know the user's role.
|
||||
// It is not necessary to retrieve
|
||||
// his/her role from database.
|
||||
UsrDat.Accepted = Gbl.Usrs.LstUsrs[Role].Lst[NumUsr].Accepted;
|
||||
NumUsr++;
|
||||
Usr_WriteRowTchAllData (&UsrDat);
|
||||
|
|
Loading…
Reference in New Issue