Version 15.77.5

This commit is contained in:
Antonio Cañas Vargas 2015-12-29 02:09:50 +01:00
parent dbc97595fc
commit 4074ebf32f
7 changed files with 34 additions and 51 deletions

View File

@ -1678,16 +1678,26 @@ a:hover img.CENTRE_PHOTO_SHOW
.SOCIAL_RIGHT_CONTAINER
{
display:inline-block;
box-sizing:border-box;
padding:0 0 10px 10px;
width:400px;
width:500px;
}
.SOCIAL_RIGHT_AUTHOR
{
display:inline-block;
box-sizing:border-box;
width:300px;
text-align:left;
vertical-align:top;
}
.SOCIAL_RIGHT_TIME
{
display:inline-block;
box-sizing:border-box;
width:190px;
text-align:right;
vertical-align:top;
}
/*********************************** Messages ********************************/
.MSG_TO_ONE_RCP

View File

@ -109,17 +109,20 @@
// TODO: When page is refreshed in course works, prevent users to be duplicated
// TODO: Fix bug at the end of ranking (number too low) when a course is selected
// TODO: Reply to all
// TODO: Hour in exam announcement should start at six a.m.
/*****************************************************************************/
/****************************** Public constants *****************************/
/*****************************************************************************/
#define Log_PLATFORM_VERSION "SWAD 15.77.4 (2015-12-29)"
#define CSS_FILE "swad15.77.4.css"
#define Log_PLATFORM_VERSION "SWAD 15.77.5 (2015-12-29)"
#define CSS_FILE "swad15.77.5.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.5: Dec 29, 2015 Insert social event when publishing an exam announcement.
Changes in CSS related to social activity. (188392 lines)
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)

View File

@ -39,7 +39,7 @@
#define Cns_MAX_LENGTH_IP 15 // Max. bytes of an IP address
#define Cns_MAX_LENGTH_DATE (2+1+2+1+4)
#define Cns_MAX_LENGTH_DATE (4+1+2+1+2)
#define Cns_MAX_BYTES_DATE 19 // Examples: "20030614143857", "14/06/2003 14:38:57"
#define Cns_MAX_LENGTH_SUBJECT 255

View File

@ -44,6 +44,7 @@
#include "swad_parameter.h"
#include "swad_QR.h"
#include "swad_RSS.h"
#include "swad_social.h"
#include "swad_string.h"
/*****************************************************************************/
@ -304,6 +305,9 @@ void Exa_ReceiveExamAnnouncement (void)
Exa_UpdateNumUsrsNotifiedByEMailAboutExamAnnouncement (ExaCod,NumUsrsToBeNotifiedByEMail);
Ntf_ShowAlertNumUsrsToBeNotifiedByEMail (NumUsrsToBeNotifiedByEMail);
/***** Create a new social event about the new exam announcement *****/
Soc_StoreSocialEvent (Soc_EVENT_EXAM_ANNOUNCEMENT,ExaCod);
/***** Show exam announcement *****/
Exa_ListExamAnnouncementsEdit ();
@ -1225,12 +1229,13 @@ static void Exa_PutParamExaCod (void)
}
/*****************************************************************************/
/*********** Get data for notification about an exam announcement ************/
/************ Get summary and content about an exam announcement *************/
/*****************************************************************************/
// This function may be called inside a web service, so don't report error
// NumChars must be > 3+Cns_MAX_LENGTH_DATE+9
// MaxChars must be > 3+(2+Cns_MAX_LENGTH_DATE+6)
void Exa_GetNotifExamAnnouncement (char *SummaryStr,char **ContentStr,long ExaCod,unsigned MaxChars,bool GetContent)
void Exa_GetSummaryAndContentExamAnnouncement (char *SummaryStr,char **ContentStr,
long ExaCod,unsigned MaxChars,bool GetContent)
{
extern const char *Txt_hours_ABBREVIATION;
@ -1249,7 +1254,8 @@ void Exa_GetNotifExamAnnouncement (char *SummaryStr,char **ContentStr,long ExaCo
/***** Summary *****/
/* Name of the course */
if (MaxChars)
Str_LimitLengthHTMLStr (Gbl.ExamAnnouncement.CrsFullName,MaxChars-(Cns_MAX_LENGTH_DATE+9));
Str_LimitLengthHTMLStr (Gbl.ExamAnnouncement.CrsFullName,
MaxChars-(2+Cns_MAX_LENGTH_DATE+6));
/* Date of exam */
sprintf (SummaryStr,"%s, %04u-%02u-%02u %2u:%02u",

View File

@ -59,6 +59,7 @@ void Exa_FreeMemExamAnnouncement (void);
void Exa_FreeListExamAnnouncements (void);
void Exa_ListExamAnnouncementsSee (void);
void Exa_CreateListOfExamAnnouncements (void);
void Exa_GetNotifExamAnnouncement (char *SummaryStr,char **ContentStr,long ExaCod,unsigned MaxChars,bool GetContent);
void Exa_GetSummaryAndContentExamAnnouncement (char *SummaryStr,char **ContentStr,
long ExaCod,unsigned MaxChars,bool GetContent);
#endif

View File

@ -742,7 +742,7 @@ void Ntf_GetNotifSummaryAndContent (char *SummaryStr,char **ContentStr,Ntf_Notif
Asg_GetNotifAssignment (SummaryStr,ContentStr,Cod,MaxChars,GetContent);
break;
case Ntf_EVENT_EXAM_ANNOUNCEMENT:
Exa_GetNotifExamAnnouncement (SummaryStr,ContentStr,Cod,MaxChars,GetContent);
Exa_GetSummaryAndContentExamAnnouncement (SummaryStr,ContentStr,Cod,MaxChars,GetContent);
break;
case Ntf_EVENT_MARKS_FILE:
Mrk_GetNotifMyMarks (SummaryStr,ContentStr,Cod,UsrCod,MaxChars,GetContent);

View File

@ -31,6 +31,7 @@
#include "swad_constant.h"
#include "swad_database.h"
#include "swad_exam.h"
#include "swad_global.h"
#include "swad_layout.h"
#include "swad_notice.h"
@ -280,7 +281,7 @@ static void Soc_WriteEventDate (time_t TimeUTC)
UniqueId++;
/***** Start cell *****/
fprintf (Gbl.F.Out,"<div id=\"date_%u\" class=\"DAT_LIGHT RIGHT_TOP\""
fprintf (Gbl.F.Out,"<div id=\"date_%u\" class=\"SOCIAL_RIGHT_TIME DAT_LIGHT\""
" style=\"display:inline-block;\">",
UniqueId);
@ -305,46 +306,6 @@ static void Soc_GetEventSummary (Soc_SocialEvent_t SocialEvent,long Cod,
switch (SocialEvent)
{
/*
case Ntf_EVENT_UNKNOWN:
break;
case Ntf_EVENT_DOCUMENT_FILE:
case Ntf_EVENT_SHARED_FILE:
Brw_GetNotifDocOrSharedFile (SummaryStr,ContentStr,Cod,MaxChars,GetContent);
break;
case Ntf_EVENT_ASSIGNMENT:
Asg_GetNotifAssignment (SummaryStr,ContentStr,Cod,MaxChars,GetContent);
break;
case Ntf_EVENT_EXAM_ANNOUNCEMENT:
Exa_GetNotifExamAnnouncement (SummaryStr,ContentStr,Cod,MaxChars,GetContent);
break;
case Ntf_EVENT_MARKS_FILE:
Mrk_GetNotifMyMarks (SummaryStr,ContentStr,Cod,UsrCod,MaxChars,GetContent);
break;
case Ntf_EVENT_ENROLLMENT_STUDENT:
case Ntf_EVENT_ENROLLMENT_TEACHER:
Enr_GetNotifEnrollment (SummaryStr,CrsCod,UsrCod,MaxChars);
break;
case Ntf_EVENT_ENROLLMENT_REQUEST:
Enr_GetNotifEnrollmentRequest (SummaryStr,ContentStr,Cod,MaxChars,GetContent);
break;
case Ntf_EVENT_NOTICE:
Not_GetNotifNotice (SummaryStr,ContentStr,Cod,MaxChars,GetContent);
break;
case Ntf_EVENT_FORUM_POST_COURSE:
case Ntf_EVENT_FORUM_REPLY:
For_GetNotifForumPst (SummaryStr,ContentStr,Cod,MaxChars,GetContent);
break;
case Ntf_EVENT_MESSAGE:
Msg_GetNotifMessage (SummaryStr,ContentStr,Cod,MaxChars,GetContent);
break;
case Ntf_EVENT_SURVEY:
Svy_GetNotifSurvey (SummaryStr,ContentStr,Cod,MaxChars,GetContent);
break;
case Ntf_EVENT_FOLLOWER:
Fol_GetNotifFollower (SummaryStr,ContentStr);
break;
*/
case Soc_EVENT_UNKNOWN:
break;
case Soc_EVENT_INS_DOC_PUB_FILE:
@ -358,8 +319,10 @@ static void Soc_GetEventSummary (Soc_SocialEvent_t SocialEvent,long Cod,
Brw_GetSummaryAndContentOrSharedFile (SummaryStr,NULL,Cod,MaxChars,false);
break;
case Soc_EVENT_EXAM_ANNOUNCEMENT:
Exa_GetSummaryAndContentExamAnnouncement (SummaryStr,NULL,Cod,MaxChars,false);
break;
case Soc_EVENT_SOCIAL_POST:
// TODO: Implement social posts
break;
case Soc_EVENT_NOTICE:
Not_GetSummaryAndContentNotice (SummaryStr,NULL,Cod,MaxChars,false);