diff --git a/js/swad15.226.js b/js/swad15.226.js index 015448067..8b50ddecb 100644 --- a/js/swad15.226.js +++ b/js/swad15.226.js @@ -577,7 +577,7 @@ function readOldTimelineData () { // Move all the LI elements in UL 'old_timeline_list' to the bottom of UL 'timeline_list' var timeline = document.getElementById("timeline_list"); for (var i=0; iNumUsrs)) { /***** Write heading *****/ @@ -5862,6 +6106,11 @@ unsigned Usr_ListUsrsFound (Rol_Role_t Role,const char *UsrQuery) { UsrDat.Accepted = LstUsrs->Lst[NumUsr].Accepted; + if (Role == Rol__GUEST_) + UsrDat.Accepted = false; + else + UsrDat.Accepted = (Usr_GetNumCrssOfUsrWithARoleNotAccepted (UsrDat.UsrCod,Role) == 0); + /* Write data of this user */ Usr_WriteRowUsrMainData (NumUsr + 1,&UsrDat,false); diff --git a/swad_user.h b/swad_user.h index 52b56bda0..6df2cd37c 100644 --- a/swad_user.h +++ b/swad_user.h @@ -220,6 +220,8 @@ bool Usr_CheckIfUsrIsSuperuser (long UsrCod); unsigned Usr_GetNumCrssOfUsr (long UsrCod); unsigned Usr_GetNumCrssOfUsrNotAccepted (long UsrCod); unsigned Usr_GetNumCrssOfUsrWithARole (long UsrCod,Rol_Role_t Role); +unsigned Usr_GetNumCrssOfUsrWithARoleNotAccepted (long UsrCod,Rol_Role_t Role); + unsigned Usr_GetNumUsrsInCrssOfAUsr (long UsrCod,Rol_Role_t UsrRole, Rol_Role_t OthersRole); bool Usr_CheckIfUsrSharesAnyOfMyCrs (long UsrCod); @@ -301,6 +303,7 @@ unsigned Usr_GetNumUsrsWhoClaimToBelongToIns (long InsCod); unsigned Usr_GetNumUsrsWhoClaimToBelongToCtr (long CtrCod); unsigned Usr_GetNumberOfTeachersInCentre (long CtrCod); +void Usr_GetUsrsLst_new (Rol_Role_t Role,Sco_Scope_t Scope,const char *UsrQuery,bool Search); void Usr_GetUsrsLst (Rol_Role_t Role,Sco_Scope_t ListUsrsRange,const char *TchQuery,bool Search); void Usr_GetUnorderedStdsCodesInDeg (long DegCod); void Usr_FreeUsrsList (struct ListUsers *LstUsrs);