diff --git a/swad_changelog.h b/swad_changelog.h index 95a7c0d3b..29ab88204 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -137,13 +137,14 @@ /****************************** Public constants *****************************/ /*****************************************************************************/ -#define Log_PLATFORM_VERSION "SWAD 15.202 (2016-04-23)" +#define Log_PLATFORM_VERSION "SWAD 15.202.1 (2016-04-23)" #define CSS_FILE "swad15.202.css" #define JS_FILE "swad15.197.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 15.202.1: Apr 23, 2016 Code refactoring related to showing user's e-mail. (200887 lines) Version 15.202: Apr 23, 2016 User's IDs are show in green or red. Code refactoring and bug fixing related to showing user's ID and e-mail. (200908 lines) Version 15.201.9: Apr 22, 2016 Code refactoring in record card. diff --git a/swad_record.c b/swad_record.c index 6fc9bb503..1e43e75b0 100644 --- a/swad_record.c +++ b/swad_record.c @@ -94,10 +94,7 @@ static void Rec_ShowNickname (struct UsrData *UsrDat,bool PutFormLinks); static void Rec_ShowCountry (struct UsrData *UsrDat,bool ShowData); static void Rec_ShowWebsAndSocialNets (struct UsrData *UsrDat, Rec_RecordViewType_t TypeOfView); -static void Rec_ShowEmail (struct UsrData *UsrDat, - Rec_RecordViewType_t TypeOfView, - bool DataForm, - const char *ClassForm); +static void Rec_ShowEmail (struct UsrData *UsrDat,const char *ClassForm); static void Rec_ShowUsrIDs (struct UsrData *UsrDat,const char *ClassForm); static void Rec_ShowRole (struct UsrData *UsrDat, Rec_RecordViewType_t TypeOfView, @@ -2103,7 +2100,7 @@ void Rec_ShowSharedUsrRecord (Rec_RecordViewType_t TypeOfView, if (ShowIDRows) { /***** User's e-mail *****/ - Rec_ShowEmail (UsrDat,TypeOfView,DataForm,ClassForm); + Rec_ShowEmail (UsrDat,ClassForm); /***** User's ID *****/ Rec_ShowUsrIDs (UsrDat,ClassForm); @@ -2986,28 +2983,9 @@ static void Rec_ShowWebsAndSocialNets (struct UsrData *UsrDat, /***************************** Show user's e-mail ****************************/ /*****************************************************************************/ -static void Rec_ShowEmail (struct UsrData *UsrDat, - Rec_RecordViewType_t TypeOfView, - bool DataForm, - const char *ClassForm) +static void Rec_ShowEmail (struct UsrData *UsrDat,const char *ClassForm) { extern const char *Txt_Email; - bool ItsMe = (Gbl.Usrs.Me.UsrDat.UsrCod == UsrDat->UsrCod); - bool ShowEmail = (ItsMe || - Gbl.Usrs.Me.LoggedRole == Rol_SYS_ADM || - DataForm || - TypeOfView == Rec_FORM_MY_COMMON_RECORD || - TypeOfView == Rec_MY_COMMON_RECORD_CHECK || - TypeOfView == Rec_FORM_MY_COURSE_RECORD_AS_STUDENT || - TypeOfView == Rec_CHECK_MY_COURSE_RECORD_AS_STUDENT || - (UsrDat->Accepted && - (TypeOfView == Rec_FORM_MODIFY_RECORD_OTHER_EXISTING_USR || - TypeOfView == Rec_CHECK_OTHER_USR_COMMON_RECORD || - ((TypeOfView == Rec_RECORD_LIST || - TypeOfView == Rec_RECORD_PRINT) && - (Gbl.Usrs.Me.LoggedRole >= Rol_TEACHER || - (Gbl.Usrs.Me.LoggedRole == Rol_STUDENT && - Gbl.Usrs.Listing.RecsUsrs == Rec_RECORD_USERS_TEACHERS)))))); fprintf (Gbl.F.Out,"" "Email[0]) { - if (ShowEmail) + if (Mai_ICanSeeEmail (UsrDat)) { fprintf (Gbl.F.Out,"Email);