diff --git a/swad_changelog.h b/swad_changelog.h index dba96fc95..dd2ca4e25 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -111,19 +111,19 @@ // TODO: Reply to all // TODO: Hour in exam announcement should start at six a.m. // TODO: Forums For_FORUM_GLOBAL_USRS and For_FORUM_SWAD_USRS should be available for guests for coherence with social timeline? -// TODO: Actividad pública: (*) Visible por cualquier usuario identificado /*****************************************************************************/ /****************************** Public constants *****************************/ /*****************************************************************************/ -#define Log_PLATFORM_VERSION "SWAD 15.97.1 (2016-01-04)" +#define Log_PLATFORM_VERSION "SWAD 15.97.2 (2016-01-04)" #define CSS_FILE "swad15.97.css" #define JS_FILE "swad15.77.7.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.97.2: Jan 04, 2016 New option in user's privacy. (190743 lines) Version 15.97.1: Jan 04, 2016 User's timeline below user's profile visible only by logged users. (190719 lines) Version 15.97: Jan 04, 2016 Show list of some users who has shared a social note. (190718 lines) 3 changes necessary in database: diff --git a/swad_privacy.c b/swad_privacy.c index 8a9fbc42a..c426b8158 100644 --- a/swad_privacy.c +++ b/swad_privacy.c @@ -62,7 +62,8 @@ const char *Pri_VisibilityDB[Pri_NUM_OPTIONS_PRIVACY] = static void Pri_PutFormVisibility (const char *TxtLabel, Act_Action_t Action,const char *ParamName, - Pri_Visibility_t CurrentVisibilityInDB); + Pri_Visibility_t CurrentVisibilityInDB, + unsigned MaskAllowedVisibility); /*****************************************************************************/ /*************** Put a link to the action to edit my privacy *****************/ @@ -86,6 +87,7 @@ void Pri_EditMyPrivacy (void) extern const char *Txt_Privacy; extern const char *Txt_Photo; extern const char *Txt_Public_profile; + extern const char *Txt_Public_activity; /***** Start table *****/ Lay_StartRoundFrameTable (NULL,2,Txt_Privacy); @@ -93,12 +95,26 @@ void Pri_EditMyPrivacy (void) /***** Edit photo visibility *****/ Pri_PutFormVisibility (Txt_Photo, ActChgPriPho,"VisPho", - Gbl.Usrs.Me.UsrDat.PhotoVisibility); + Gbl.Usrs.Me.UsrDat.PhotoVisibility, + (1 << Pri_VISIBILITY_USER) | + (1 << Pri_VISIBILITY_COURSE) | + (1 << Pri_VISIBILITY_SYSTEM) | + (1 << Pri_VISIBILITY_WORLD)); /***** Edit public profile visibility *****/ Pri_PutFormVisibility (Txt_Public_profile, ActChgPriPrf,"VisPrf", - Gbl.Usrs.Me.UsrDat.ProfileVisibility); + Gbl.Usrs.Me.UsrDat.ProfileVisibility, + (1 << Pri_VISIBILITY_USER) | + (1 << Pri_VISIBILITY_COURSE) | + (1 << Pri_VISIBILITY_SYSTEM) | + (1 << Pri_VISIBILITY_WORLD)); + + /***** Edit public activity (timeline) visibility *****/ + Pri_PutFormVisibility (Txt_Public_activity, + ActUnk,"VisTml", + Pri_VISIBILITY_SYSTEM, + (1 << Pri_VISIBILITY_SYSTEM)); /***** End table *****/ Lay_EndRoundFrameTable (); @@ -110,7 +126,8 @@ void Pri_EditMyPrivacy (void) static void Pri_PutFormVisibility (const char *TxtLabel, Act_Action_t Action,const char *ParamName, - Pri_Visibility_t CurrentVisibilityInDB) + Pri_Visibility_t CurrentVisibilityInDB, + unsigned MaskAllowedVisibility) { extern const char *The_ClassForm[The_NUM_THEMES]; extern const char *Txt_PRIVACY_OPTIONS[Pri_NUM_OPTIONS_PRIVACY]; @@ -125,28 +142,36 @@ static void Pri_PutFormVisibility (const char *TxtLabel, The_ClassForm[Gbl.Prefs.Theme],TxtLabel); /***** Form with list of options *****/ - Act_FormStart (Action); + if (Action != ActUnk) + Act_FormStart (Action); fprintf (Gbl.F.Out,""); - Act_FormEnd (); + if (Action != ActUnk) + Act_FormEnd (); fprintf (Gbl.F.Out,"" ""); }