mirror of https://github.com/acanas/swad-core.git
Version 15.159.1
This commit is contained in:
parent
1a010ce6f0
commit
05fead7907
|
@ -134,14 +134,15 @@
|
||||||
/****************************** Public constants *****************************/
|
/****************************** Public constants *****************************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
#define Log_PLATFORM_VERSION "SWAD 15.158.5 (2016-03-21)"
|
#define Log_PLATFORM_VERSION "SWAD 15.159.1 (2016-03-21)"
|
||||||
#define CSS_FILE "swad15.157.css"
|
#define CSS_FILE "swad15.157.css"
|
||||||
#define JS_FILE "swad15.131.3.js"
|
#define JS_FILE "swad15.131.3.js"
|
||||||
|
|
||||||
// Number of lines (includes comments but not blank lines) has been got with the following command:
|
// 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
|
// nl swad*.c swad*.h css/swad*.css py/swad*.py js/swad*.js soap/swad*.h sql/swad*.sql | tail -1
|
||||||
/*
|
/*
|
||||||
Version 15.158.5: Mar 21, 2016 Number of sent/received messages integrated in frame title. (? lines)
|
Version 15.159.1: Mar 21, 2016 Icon to add new notice integrated in frame. (196395 lines)
|
||||||
|
Version 15.159: Mar 21, 2016 Number of sent/received messages integrated in frame title. (196372 lines)
|
||||||
Version 15.158.4: Mar 21, 2016 Icon to remove sent/received messages integrated in frame. (196300 lines)
|
Version 15.158.4: Mar 21, 2016 Icon to remove sent/received messages integrated in frame. (196300 lines)
|
||||||
Version 15.158.3: Mar 21, 2016 Change in layout of form to import test questions. (196277 lines)
|
Version 15.158.3: Mar 21, 2016 Change in layout of form to import test questions. (196277 lines)
|
||||||
Version 15.158.2: Mar 21, 2016 Icon to add new test question integrated in frame. (196283 lines)
|
Version 15.158.2: Mar 21, 2016 Icon to add new test question integrated in frame. (196283 lines)
|
||||||
|
|
|
@ -66,14 +66,15 @@ const unsigned Not_MaxCharsURLOnScreen[Not_NUM_TYPES_LISTING] =
|
||||||
/***************************** Private prototypes ****************************/
|
/***************************** Private prototypes ****************************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
static void Not_GetDataAndShowNotice (long NotCod,bool ICanEditNotices);
|
static void Not_PutIconToAddNewNotice (void);
|
||||||
|
static void Not_GetDataAndShowNotice (long NotCod,bool ICanEdit);
|
||||||
static void Not_DrawANotice (Not_Listing_t TypeNoticesListing,
|
static void Not_DrawANotice (Not_Listing_t TypeNoticesListing,
|
||||||
long NotCod,
|
long NotCod,
|
||||||
time_t TimeUTC,
|
time_t TimeUTC,
|
||||||
const char *Content,
|
const char *Content,
|
||||||
long UsrCod,
|
long UsrCod,
|
||||||
Not_Status_t Status,
|
Not_Status_t Status,
|
||||||
bool ICanEditNotices);
|
bool ICanEdit);
|
||||||
static long Not_InsertNoticeInDB (const char *Content);
|
static long Not_InsertNoticeInDB (const char *Content);
|
||||||
static void Not_UpdateNumUsrsNotifiedByEMailAboutNotice (long NotCod,unsigned NumUsrsToBeNotifiedByEMail);
|
static void Not_UpdateNumUsrsNotifiedByEMailAboutNotice (long NotCod,unsigned NumUsrsToBeNotifiedByEMail);
|
||||||
static long Not_GetParamNotCod (void);
|
static long Not_GetParamNotCod (void);
|
||||||
|
@ -210,24 +211,15 @@ void Not_ListNoticesAfterRemoval (void)
|
||||||
|
|
||||||
void Not_ListFullNotices (void)
|
void Not_ListFullNotices (void)
|
||||||
{
|
{
|
||||||
extern const char *Txt_New_notice;
|
bool ICanEdit = (Gbl.Usrs.Me.LoggedRole == Rol_TEACHER ||
|
||||||
bool ICanEditNotices = (Gbl.Usrs.Me.LoggedRole == Rol_TEACHER ||
|
Gbl.Usrs.Me.LoggedRole == Rol_SYS_ADM);
|
||||||
Gbl.Usrs.Me.LoggedRole == Rol_SYS_ADM);
|
|
||||||
|
|
||||||
if (ICanEditNotices)
|
|
||||||
{
|
|
||||||
fprintf (Gbl.F.Out,"<div class=\"CONTEXT_MENU\">");
|
|
||||||
Lay_PutContextualLink (ActWriNot,NULL,"plus64x64.png",
|
|
||||||
Txt_New_notice,Txt_New_notice);
|
|
||||||
fprintf (Gbl.F.Out,"</div>");
|
|
||||||
}
|
|
||||||
|
|
||||||
/***** Show highlighted notice *****/
|
/***** Show highlighted notice *****/
|
||||||
if (Gbl.CurrentCrs.Notices.HighlightNotCod > 0)
|
if (Gbl.CurrentCrs.Notices.HighlightNotCod > 0)
|
||||||
Not_GetDataAndShowNotice (Gbl.CurrentCrs.Notices.HighlightNotCod,ICanEditNotices);
|
Not_GetDataAndShowNotice (Gbl.CurrentCrs.Notices.HighlightNotCod,ICanEdit);
|
||||||
|
|
||||||
/***** Show all notices *****/
|
/***** Show all notices *****/
|
||||||
Not_ShowNotices (Not_LIST_FULL_NOTICES,ICanEditNotices);
|
Not_ShowNotices (Not_LIST_FULL_NOTICES,ICanEdit);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
@ -354,9 +346,10 @@ void Not_GetNotToShowHighlighted (void)
|
||||||
/***************************** Show the notices ******************************/
|
/***************************** Show the notices ******************************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
void Not_ShowNotices (Not_Listing_t TypeNoticesListing,bool ICanEditNotices)
|
void Not_ShowNotices (Not_Listing_t TypeNoticesListing,bool ICanEdit)
|
||||||
{
|
{
|
||||||
extern const char *Txt_All_notices;
|
extern const char *Txt_All_notices;
|
||||||
|
extern const char *Txt_Notices;
|
||||||
extern const char *Txt_No_notices;
|
extern const char *Txt_No_notices;
|
||||||
char Query[512];
|
char Query[512];
|
||||||
MYSQL_RES *mysql_res;
|
MYSQL_RES *mysql_res;
|
||||||
|
@ -398,14 +391,15 @@ void Not_ShowNotices (Not_Listing_t TypeNoticesListing,bool ICanEditNotices)
|
||||||
|
|
||||||
if (TypeNoticesListing == Not_LIST_FULL_NOTICES)
|
if (TypeNoticesListing == Not_LIST_FULL_NOTICES)
|
||||||
{
|
{
|
||||||
if (NumNotices)
|
/***** Start frame *****/
|
||||||
{
|
sprintf (StrWidth,"%upx",
|
||||||
/***** Start frame *****/
|
Not_ContainerWidth[Not_LIST_FULL_NOTICES] + 50);
|
||||||
sprintf (StrWidth,"%upx",
|
Lay_StartRoundFrame (StrWidth,
|
||||||
Not_ContainerWidth[Not_LIST_FULL_NOTICES] + 50);
|
Gbl.CurrentCrs.Notices.HighlightNotCod > 0 ? Txt_All_notices :
|
||||||
Lay_StartRoundFrame (StrWidth,Txt_All_notices,NULL);
|
Txt_Notices,
|
||||||
}
|
ICanEdit ? Not_PutIconToAddNewNotice :
|
||||||
else
|
NULL);
|
||||||
|
if (!NumNotices)
|
||||||
Lay_ShowAlert (Lay_INFO,Txt_No_notices);
|
Lay_ShowAlert (Lay_INFO,Txt_No_notices);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -443,7 +437,7 @@ void Not_ShowNotices (Not_Listing_t TypeNoticesListing,bool ICanEditNotices)
|
||||||
Not_DrawANotice (TypeNoticesListing,
|
Not_DrawANotice (TypeNoticesListing,
|
||||||
NotCod,
|
NotCod,
|
||||||
TimeUTC,Content,UsrCod,Status,
|
TimeUTC,Content,UsrCod,Status,
|
||||||
ICanEditNotices);
|
ICanEdit);
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (TypeNoticesListing)
|
switch (TypeNoticesListing)
|
||||||
|
@ -469,9 +463,8 @@ void Not_ShowNotices (Not_Listing_t TypeNoticesListing,bool ICanEditNotices)
|
||||||
Gbl.Prefs.IconsURL);
|
Gbl.Prefs.IconsURL);
|
||||||
break;
|
break;
|
||||||
case Not_LIST_FULL_NOTICES:
|
case Not_LIST_FULL_NOTICES:
|
||||||
if (NumNotices)
|
/***** End frame *****/
|
||||||
/***** End frame *****/
|
Lay_EndRoundFrame ();
|
||||||
Lay_EndRoundFrame ();
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -485,11 +478,22 @@ void Not_ShowNotices (Not_Listing_t TypeNoticesListing,bool ICanEditNotices)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
/*********************** Put icon to add a new notice ************************/
|
||||||
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
static void Not_PutIconToAddNewNotice (void)
|
||||||
|
{
|
||||||
|
extern const char *Txt_New_notice;
|
||||||
|
|
||||||
|
Lay_PutContextualLink (ActWriNot,NULL,"plus64x64.png",Txt_New_notice,NULL);
|
||||||
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/******************** Get data of a notice and show it ***********************/
|
/******************** Get data of a notice and show it ***********************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
static void Not_GetDataAndShowNotice (long NotCod,bool ICanEditNotices)
|
static void Not_GetDataAndShowNotice (long NotCod,bool ICanEdit)
|
||||||
{
|
{
|
||||||
char Query[512];
|
char Query[512];
|
||||||
MYSQL_RES *mysql_res;
|
MYSQL_RES *mysql_res;
|
||||||
|
@ -531,7 +535,7 @@ static void Not_GetDataAndShowNotice (long NotCod,bool ICanEditNotices)
|
||||||
Not_DrawANotice (Not_LIST_FULL_NOTICES,
|
Not_DrawANotice (Not_LIST_FULL_NOTICES,
|
||||||
NotCod,
|
NotCod,
|
||||||
TimeUTC,Content,UsrCod,Status,
|
TimeUTC,Content,UsrCod,Status,
|
||||||
ICanEditNotices);
|
ICanEdit);
|
||||||
}
|
}
|
||||||
|
|
||||||
/***** Free structure that stores the query result *****/
|
/***** Free structure that stores the query result *****/
|
||||||
|
@ -548,7 +552,7 @@ static void Not_DrawANotice (Not_Listing_t TypeNoticesListing,
|
||||||
const char *Content,
|
const char *Content,
|
||||||
long UsrCod,
|
long UsrCod,
|
||||||
Not_Status_t Status,
|
Not_Status_t Status,
|
||||||
bool ICanEditNotices)
|
bool ICanEdit)
|
||||||
{
|
{
|
||||||
extern const char *The_ClassForm[The_NUM_THEMES];
|
extern const char *The_ClassForm[The_NUM_THEMES];
|
||||||
extern const char *Txt_NOTICE_Active_SINGULAR;
|
extern const char *Txt_NOTICE_Active_SINGULAR;
|
||||||
|
@ -590,7 +594,7 @@ static void Not_DrawANotice (Not_Listing_t TypeNoticesListing,
|
||||||
/* Write symbol to indicate if notice is obsolete or active */
|
/* Write symbol to indicate if notice is obsolete or active */
|
||||||
if (TypeNoticesListing == Not_LIST_FULL_NOTICES)
|
if (TypeNoticesListing == Not_LIST_FULL_NOTICES)
|
||||||
{
|
{
|
||||||
if (ICanEditNotices)
|
if (ICanEdit)
|
||||||
{
|
{
|
||||||
/* Form to remove notice */
|
/* Form to remove notice */
|
||||||
Act_FormStart (ActReqRemNot);
|
Act_FormStart (ActReqRemNot);
|
||||||
|
|
|
@ -67,7 +67,7 @@ void Not_RequestRemNotice (void);
|
||||||
void Not_RemoveNotice (void);
|
void Not_RemoveNotice (void);
|
||||||
|
|
||||||
void Not_GetNotToShowHighlighted (void);
|
void Not_GetNotToShowHighlighted (void);
|
||||||
void Not_ShowNotices (Not_Listing_t TypeNoticesListing,bool ICanEditNotices);
|
void Not_ShowNotices (Not_Listing_t TypeNoticesListing,bool ICanEdit);
|
||||||
void Not_GetSummaryAndContentNotice (char *SummaryStr,char **ContentStr,
|
void Not_GetSummaryAndContentNotice (char *SummaryStr,char **ContentStr,
|
||||||
long NotCod,unsigned MaxChars,bool GetContent);
|
long NotCod,unsigned MaxChars,bool GetContent);
|
||||||
unsigned Not_GetNumNotices (Sco_Scope_t Scope,Not_Status_t Status,unsigned *NumNotif);
|
unsigned Not_GetNumNotices (Sco_Scope_t Scope,Not_Status_t Status,unsigned *NumNotif);
|
||||||
|
|
23
swad_text.c
23
swad_text.c
|
@ -25033,6 +25033,27 @@ const char *Txt_Notice_removed =
|
||||||
"Aviso removido.";
|
"Aviso removido.";
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
const char *Txt_Notices =
|
||||||
|
#if L==1
|
||||||
|
"Avisos";
|
||||||
|
#elif L==2
|
||||||
|
"Ankündigungen";
|
||||||
|
#elif L==3
|
||||||
|
"Notices";
|
||||||
|
#elif L==4
|
||||||
|
"Avisos";
|
||||||
|
#elif L==5
|
||||||
|
"Avis";
|
||||||
|
#elif L==6
|
||||||
|
"Marandu";
|
||||||
|
#elif L==7
|
||||||
|
"Avvisi";
|
||||||
|
#elif L==8
|
||||||
|
"Ogloszenia";
|
||||||
|
#elif L==9
|
||||||
|
"Avisos";
|
||||||
|
#endif
|
||||||
|
|
||||||
const char *Txt_NOTIF_new_SINGULAR =
|
const char *Txt_NOTIF_new_SINGULAR =
|
||||||
#if L==1
|
#if L==1
|
||||||
"nueva"; // Necessita traduccio
|
"nueva"; // Necessita traduccio
|
||||||
|
@ -38017,7 +38038,7 @@ const char *Txt_STAT_USE_STAT_TYPES[Sta_NUM_FIGURES] =
|
||||||
#elif L==7
|
#elif L==7
|
||||||
"Avvisi"
|
"Avvisi"
|
||||||
#elif L==8
|
#elif L==8
|
||||||
"Notices" // Potrzebujesz tlumaczenie
|
"Ogloszenia"
|
||||||
#elif L==9
|
#elif L==9
|
||||||
"Avisos"
|
"Avisos"
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue