diff --git a/css/swad15.77.2.css b/css/swad15.77.4.css similarity index 99% rename from css/swad15.77.2.css rename to css/swad15.77.4.css index d74de9577..c19f8f802 100644 --- a/css/swad15.77.2.css +++ b/css/swad15.77.4.css @@ -1672,12 +1672,14 @@ a:hover img.CENTRE_PHOTO_SHOW display:inline-block; text-align:left; vertical-align:top; - width:64px; + width:60px; height:90px; } .SOCIAL_RIGHT_CONTAINER { display:inline-block; + padding:0 0 10px 10px; + width:400px; } .SOCIAL_RIGHT_AUTHOR { diff --git a/swad_changelog.h b/swad_changelog.h index 868d544eb..6793bace0 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -114,12 +114,14 @@ /****************************** Public constants *****************************/ /*****************************************************************************/ -#define Log_PLATFORM_VERSION "SWAD 15.77.3 (2015-12-28)" -#define CSS_FILE "swad15.77.2.css" +#define Log_PLATFORM_VERSION "SWAD 15.77.4 (2015-12-29)" +#define CSS_FILE "swad15.77.4.css" // 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.77.4: Dec 29, 2015 Insert social event when publishing a new notice. + Changes in CSS related to social activity. (188410 lines) Version 15.77.3: Dec 28, 2015 Insert social event when changing file from private to public. (188402 lines) Version 15.77.2: Dec 28, 2015 Changes in CSS related to social activity. (188368 lines) Version 15.77.1: Dec 28, 2015 Insert social event when posting in a global forum. (188342 lines) diff --git a/swad_notice.c b/swad_notice.c index 4a630bffa..d871c6368 100644 --- a/swad_notice.c +++ b/swad_notice.c @@ -36,6 +36,7 @@ #include "swad_notification.h" #include "swad_parameter.h" #include "swad_RSS.h" +#include "swad_social.h" /*****************************************************************************/ /************** External global variables from others modules ****************/ @@ -153,6 +154,9 @@ void Not_ReceiveNotice (void) if ((NumUsrsToBeNotifiedByEMail = Ntf_StoreNotifyEventsToAllUsrs (Ntf_EVENT_NOTICE,NotCod))) Not_UpdateNumUsrsNotifiedByEMailAboutNotice (NotCod,NumUsrsToBeNotifiedByEMail); Ntf_ShowAlertNumUsrsToBeNotifiedByEMail (NumUsrsToBeNotifiedByEMail); + + /***** Create a new social event about the new notice *****/ + Soc_StoreSocialEvent (Soc_EVENT_NOTICE,NotCod); } /*****************************************************************************/ @@ -719,11 +723,12 @@ static void Not_DrawANotice (Not_Listing_t TypeNoticesListing, } /*****************************************************************************/ -/********************* Write first characters of a notice *******************/ +/******************* Get summary and content for a notice ********************/ /*****************************************************************************/ // This function may be called inside a web service, so don't report error -void Not_GetNotifNotice (char *SummaryStr,char **ContentStr,long NotCod,unsigned MaxChars,bool GetContent) +void Not_GetSummaryAndContentNotice (char *SummaryStr,char **ContentStr, + long NotCod,unsigned MaxChars,bool GetContent) { char Query[512]; MYSQL_RES *mysql_res; diff --git a/swad_notice.h b/swad_notice.h index f660d1ef6..8a218fdcf 100644 --- a/swad_notice.h +++ b/swad_notice.h @@ -68,7 +68,8 @@ void Not_RemoveNotice (void); void Not_GetNotToShowHighlighted (void); void Not_ShowNotices (Not_Listing_t TypeNoticesListing,bool ICanEditNotices); -void Not_GetNotifNotice (char *SummaryStr,char **ContentStr,long NotCod,unsigned MaxChars,bool GetContent); +void Not_GetSummaryAndContentNotice (char *SummaryStr,char **ContentStr, + long NotCod,unsigned MaxChars,bool GetContent); unsigned Not_GetNumNotices (Sco_Scope_t Scope,Not_Status_t Status,unsigned *NumNotif); unsigned Not_GetNumNoticesDeleted (Sco_Scope_t Scope,unsigned *NumNotif); diff --git a/swad_notification.c b/swad_notification.c index bf7c6bb82..594540d45 100644 --- a/swad_notification.c +++ b/swad_notification.c @@ -755,7 +755,7 @@ void Ntf_GetNotifSummaryAndContent (char *SummaryStr,char **ContentStr,Ntf_Notif Enr_GetNotifEnrollmentRequest (SummaryStr,ContentStr,Cod,MaxChars,GetContent); break; case Ntf_EVENT_NOTICE: - Not_GetNotifNotice (SummaryStr,ContentStr,Cod,MaxChars,GetContent); + Not_GetSummaryAndContentNotice (SummaryStr,ContentStr,Cod,MaxChars,GetContent); break; case Ntf_EVENT_FORUM_POST_COURSE: case Ntf_EVENT_FORUM_REPLY: diff --git a/swad_social.c b/swad_social.c index ee0d358be..0dfb26b57 100644 --- a/swad_social.c +++ b/swad_social.c @@ -33,6 +33,7 @@ #include "swad_database.h" #include "swad_global.h" #include "swad_layout.h" +#include "swad_notice.h" #include "swad_social.h" /*****************************************************************************/ @@ -43,7 +44,7 @@ /***************************** Private constants *****************************/ /*****************************************************************************/ -#define Soc_MAX_BYTES_SUMMARY 200 +#define Soc_MAX_BYTES_SUMMARY 100 /*****************************************************************************/ /****************************** Internal types *******************************/ @@ -358,11 +359,10 @@ static void Soc_GetEventSummary (Soc_SocialEvent_t SocialEvent,long Cod, break; case Soc_EVENT_EXAM_ANNOUNCEMENT: break; - case Soc_EVENT_MARKS_FILE: - break; case Soc_EVENT_SOCIAL_POST: break; case Soc_EVENT_NOTICE: + Not_GetSummaryAndContentNotice (SummaryStr,NULL,Cod,MaxChars,false); break; case Soc_EVENT_FORUM_POST: For_GetSummaryAndContentForumPst (SummaryStr,NULL,Cod,MaxChars,false); diff --git a/swad_social.h b/swad_social.h index 2fe8cdf40..730ec914b 100644 --- a/swad_social.h +++ b/swad_social.h @@ -35,7 +35,7 @@ /******************************** Public types *******************************/ /*****************************************************************************/ -#define Soc_NUM_SOCIAL_EVENTS 14 +#define Soc_NUM_SOCIAL_EVENTS 13 // If the numbers assigned to each event type change, // it is necessary to change old numbers to new ones in database table social @@ -61,16 +61,15 @@ typedef enum /* Assessment tab */ Soc_EVENT_EXAM_ANNOUNCEMENT = 9, - Soc_EVENT_MARKS_FILE = 10, /* Enrollment tab */ /* Social tab */ - Soc_EVENT_SOCIAL_POST = 11, + Soc_EVENT_SOCIAL_POST = 10, /* Messages tab */ - Soc_EVENT_NOTICE = 12, - Soc_EVENT_FORUM_POST = 13, + Soc_EVENT_NOTICE = 11, + Soc_EVENT_FORUM_POST = 12, /* Statistics tab */