Version 14.134.8

This commit is contained in:
Antonio Cañas Vargas 2015-09-20 19:20:05 +02:00
parent 307797eaa9
commit 0a3074523b
4 changed files with 34 additions and 28 deletions

View File

@ -98,11 +98,13 @@
/****************************** Public constants *****************************/
/*****************************************************************************/
#define Log_PLATFORM_VERSION "SWAD 14.134.7 (2015/09/18)"
#define Log_PLATFORM_VERSION "SWAD 14.134.8 (2015/09/20)"
// 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 14.134.8: Sep 20, 2015 Fixed bug in list of guests.
Changes in listing of connected users. (184885 lines)
Version 14.134.7: Sep 18, 2015 Fixed bug in list of guests. (184879 lines)
Version 14.134.6: Sep 18, 2015 Fixed bug in user enrollment. (184878 lines)
Version 14.134.5: Sep 18, 2015 Change in order of options in user menu.

View File

@ -94,7 +94,7 @@ void Con_ShowConnectedUsrs (void)
" style=\"padding-bottom:10px;\">");
Act_FormStart (ActLstCon);
Gbl.Scope.Current = Sco_SCOPE_CRS;
if (Gbl.Usrs.Me.LoggedRole == Rol_SYS_ADM)
if (Gbl.Usrs.Me.LoggedRole >= Rol_DEG_ADM)
{
fprintf (Gbl.F.Out,"<label class=\"%s\">"
"%s:&nbsp;"
@ -522,23 +522,19 @@ static void Con_ShowConnectedUsrsWithARoleBelongingToCurrentLocationOnMainZone (
return;
break;
case Sco_SCOPE_INS: // Show connected users in the current institution
if (!(Gbl.Usrs.Me.LoggedRole == Rol_INS_ADM ||
Gbl.Usrs.Me.LoggedRole == Rol_SYS_ADM))
if (Gbl.Usrs.Me.LoggedRole < Rol_INS_ADM)
return;
break;
case Sco_SCOPE_CTR: // Show connected users in the current centre
if (!(Gbl.Usrs.Me.LoggedRole == Rol_CTR_ADM ||
Gbl.Usrs.Me.LoggedRole == Rol_SYS_ADM))
if (Gbl.Usrs.Me.LoggedRole < Rol_CTR_ADM)
return;
break;
case Sco_SCOPE_DEG: // Show connected users in the current degree
if (!(Gbl.Usrs.Me.LoggedRole == Rol_DEG_ADM ||
Gbl.Usrs.Me.LoggedRole == Rol_SYS_ADM))
if (Gbl.Usrs.Me.LoggedRole < Rol_DEG_ADM)
return;
break;
case Sco_SCOPE_CRS: // Show connected users in the current course
if (!(Gbl.Usrs.Me.IBelongToCurrentCrs ||
Gbl.Usrs.Me.LoggedRole == Rol_SYS_ADM))
if (Gbl.Usrs.Me.LoggedRole < Rol_STUDENT)
return;
break;
default:
@ -594,28 +590,26 @@ static void Con_ShowConnectedUsrsWithARoleBelongingToCurrentLocationOnRightColum
/***** List connected users belonging to this location *****/
switch (Gbl.Scope.Current)
{
/*
case Sco_SCOPE_SYS: // Show connected users in the whole platform
case Sco_SCOPE_CTY: // Show connected users in the current country
if (Gbl.Usrs.Me.LoggedRole != Rol_ROLE_SYS_ADM)
if (Gbl.Usrs.Me.LoggedRole != Rol_SYS_ADM)
return;
break;
case Sco_SCOPE_INS: // Show connected users in the current institution
if (!(Gbl.Usrs.Me.LoggedRole == Rol_ROLE_INS_ADM ||
Gbl.Usrs.Me.LoggedRole == Rol_ROLE_SYS_ADM))
if (!(Gbl.Usrs.Me.LoggedRole == Rol_INS_ADM ||
Gbl.Usrs.Me.LoggedRole == Rol_SYS_ADM))
return;
break;
case Sco_SCOPE_CTR: // Show connected users in the current centre
if (!(Gbl.Usrs.Me.LoggedRole == Rol_ROLE_CTR_ADM ||
Gbl.Usrs.Me.LoggedRole == Rol_ROLE_SYS_ADM))
if (!(Gbl.Usrs.Me.LoggedRole == Rol_CTR_ADM ||
Gbl.Usrs.Me.LoggedRole == Rol_SYS_ADM))
return;
break;
case Sco_SCOPE_DEG: // Show connected users in the current degree
if (!(Gbl.Usrs.Me.LoggedRole == Rol_ROLE_DEG_ADM ||
Gbl.Usrs.Me.LoggedRole == Rol_ROLE_SYS_ADM))
if (!(Gbl.Usrs.Me.LoggedRole == Rol_DEG_ADM ||
Gbl.Usrs.Me.LoggedRole == Rol_SYS_ADM))
return;
break;
*/
case Sco_SCOPE_CRS: // Show connected users in the current course
if (!(Gbl.Usrs.Me.IBelongToCurrentCrs ||
Gbl.Usrs.Me.LoggedRole == Rol_SYS_ADM))

View File

@ -258,25 +258,35 @@ void Sco_SetScopesForListingGuests (void)
void Sco_SetScopesForListingStudents (void)
{
Gbl.Scope.Default = Sco_SCOPE_CRS;
switch (Gbl.Usrs.Me.LoggedRole)
{
case Rol_STUDENT:
case Rol_TEACHER:
Gbl.Scope.Allowed = 1 << Sco_SCOPE_CRS;
Gbl.Scope.Default = Sco_SCOPE_CRS;
break;
case Rol_DEG_ADM:
Gbl.Scope.Allowed = 1 << Sco_SCOPE_DEG;
Gbl.Scope.Default = Sco_SCOPE_DEG;
Gbl.Scope.Allowed = 1 << Sco_SCOPE_DEG |
1 << Sco_SCOPE_CRS;
break;
case Rol_CTR_ADM:
Gbl.Scope.Allowed = 1 << Sco_SCOPE_CTR |
1 << Sco_SCOPE_DEG |
1 << Sco_SCOPE_CRS;
break;
case Rol_INS_ADM:
Gbl.Scope.Allowed = 1 << Sco_SCOPE_INS |
1 << Sco_SCOPE_CTR |
1 << Sco_SCOPE_DEG |
1 << Sco_SCOPE_CRS;
break;
case Rol_SYS_ADM:
Gbl.Scope.Allowed = 1 << Sco_SCOPE_SYS |
1 << Sco_SCOPE_CTY |
Gbl.Scope.Allowed = 1 << Sco_SCOPE_SYS |
1 << Sco_SCOPE_CTY |
1 << Sco_SCOPE_INS |
1 << Sco_SCOPE_CTR |
1 << Sco_SCOPE_DEG |
1 << Sco_SCOPE_CTR |
1 << Sco_SCOPE_DEG |
1 << Sco_SCOPE_CRS;
Gbl.Scope.Default = Sco_SCOPE_CRS;
break;
default:
Gbl.Scope.Allowed = 0;

View File

@ -4826,7 +4826,7 @@ void Usr_PutExtraParamsUsrList (Act_Action_t NextAction)
{
switch (Gbl.CurrentAct)
{
case ActLstOth:
case ActLstGst:
case ActLstStd:
case ActLstTch:
Sco_PutParamScope (Gbl.Scope.Current);