From 4f0ccdc1c4758c0b3b9650d4dc9d73d7fcb902cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonio=20Ca=C3=B1as=20Vargas?= Date: Wed, 31 May 2017 10:51:29 +0200 Subject: [PATCH] Version 16.231.2 --- swad_changelog.h | 3 ++- swad_connected.c | 16 ++++++++++------ 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/swad_changelog.h b/swad_changelog.h index bda60f5f1..f54e05f07 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -231,13 +231,14 @@ /****************************** Public constants *****************************/ /*****************************************************************************/ -#define Log_PLATFORM_VERSION "SWAD 16.231.1 (2017-05-31)" +#define Log_PLATFORM_VERSION "SWAD 16.231.2 (2017-05-31)" #define CSS_FILE "swad16.226.css" #define JS_FILE "swad16.206.3.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 16.231.2: May 31, 2017 Fixed bug in connected users. (221036 lines) Version 16.231.1: May 31, 2017 Fixed bugs in enrolment and groups. (221031 lines) Version 16.231: May 31, 2017 Non-editing teachers can edit (with restrictions) in private zones. (221031 lines) Version 16.230: May 30, 2017 Number of teachers and non-editing teachers in list of groups. (220953 lines) diff --git a/swad_connected.c b/swad_connected.c index 29b2d74d4..419b7b1ef 100644 --- a/swad_connected.c +++ b/swad_connected.c @@ -1010,14 +1010,15 @@ static void Con_WriteRowConnectedUsrOnRightColumn (Rol_Role_t Role) Act_FormStartUnique (ActSeeRecOneTch); break; default: - Lay_ShowErrorAndExit ("Wrong role"); + Lay_ShowErrorAndExit ("Wrong role."); + break; } Usr_PutParamUsrCodEncrypted (UsrDat->EncryptedUsrCod); - fprintf (Gbl.F.Out,"
"); // Limited width + fprintf (Gbl.F.Out,"
",Font); // Limited width Act_LinkFormSubmitUnique (Txt_View_record_for_this_course,Font); Usr_WriteFirstNameBRSurnames (UsrDat); fprintf (Gbl.F.Out,"" - "
"); + "
"); Act_FormEnd (); fprintf (Gbl.F.Out,""); @@ -1058,8 +1059,11 @@ static void Con_ShowConnectedUsrsCurrentLocationOneByOneOnMainZone (Rol_Role_t R char PhotoURL[PATH_MAX + 1]; const char *Font; struct UsrData UsrDat; - bool PutLinkToRecord = (Gbl.CurrentCrs.Crs.CrsCod > 0 && - Gbl.Scope.Current == Sco_SCOPE_CRS); + bool PutLinkToRecord = (Gbl.CurrentCrs.Crs.CrsCod > 0 && // Course selected + Gbl.Scope.Current == Sco_SCOPE_CRS && // Scope is current course + (Role == Rol_STD || // Role is student,... + Role == Rol_NET || // ...non-editing teacher... + Role == Rol_TCH)); // ...or teacher /***** Get connected users who belong to current location from database *****/ switch (Role) @@ -1213,7 +1217,7 @@ static void Con_ShowConnectedUsrsCurrentLocationOneByOneOnMainZone (Rol_Role_t R Act_FormStart (ActSeeRecOneTch); break; default: - Lay_ShowErrorAndExit ("Wrong role"); + Lay_ShowErrorAndExit ("Wrong role."); } Usr_PutParamUsrCodEncrypted (UsrDat.EncryptedUsrCod); }