From 360cb0aaca8d921b89967c8754fc57759323e228 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonio=20Ca=C3=B1as=20Vargas?= Date: Sun, 24 Mar 2019 23:25:07 +0100 Subject: [PATCH] Version18.87.1 --- swad_changelog.h | 5 +++-- swad_notice.c | 25 +++++++++++++++++++++---- 2 files changed, 24 insertions(+), 6 deletions(-) diff --git a/swad_changelog.h b/swad_changelog.h index 342a80268..9a74d9720 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -444,7 +444,7 @@ Lo de mutear anuncios, en principio prefiero hacer una opci // TODO: Actualizar ayuda en GitHub, por ejemplo Preferencias ahora es Ajustes. // TODO: Change in usability of Announcements of exams, suggested by Javier Fernández Baldomero. -// TODO: Al pulsar sobre una convocatoria de examen / aviso --> ir a la sección de esa convocatoria/aviso en lugar de mostrarlo repetido y destacado arriba +// TODO: Al pulsar sobre una convocatoria de examen --> ir a la sección de esa convocatoria/aviso en lugar de mostrarlo repetido y destacado arriba // TODO: Allow timeline posting only for users belonging to courses or admins to avoid user who create accounts only to post @@ -469,10 +469,11 @@ En OpenSWAD: ps2pdf source.ps destination.pdf */ -#define Log_PLATFORM_VERSION "SWAD 18.87 (2019-03-24)" +#define Log_PLATFORM_VERSION "SWAD 18.87.1 (2019-03-24)" #define CSS_FILE "swad18.87.css" #define JS_FILE "swad18.85.js" /* + Version 18.87.1: Mar 24, 2019 Code refactoring in notices. (241011 lines) Version 18.87: Mar 24, 2019 Change in usability of notices. (240997 lines) Version 18.86.3: Mar 24, 2019 Optimization in suggestion of users to follow. (240965 lines) Version 18.86.2: Mar 24, 2019 Optimization in suggestion of users to follow. (240935 lines) diff --git a/swad_notice.c b/swad_notice.c index 91fab4702..f0705074d 100644 --- a/swad_notice.c +++ b/swad_notice.c @@ -84,6 +84,9 @@ static void Not_UpdateNumUsrsNotifiedByEMailAboutNotice (long NotCod,unsigned Nu static void Not_PutParams (void); static long Not_GetParamNotCod (void); +static void Not_SetNotCodToEdit (long NotCod); +static long Not_GetNotCodToEdit (void); + /*****************************************************************************/ /***************************** Write a new notice ****************************/ /*****************************************************************************/ @@ -296,7 +299,7 @@ void Not_RequestRemNotice (void) Not_GetDataAndShowNotice (NotCod); /* End alert */ - Gbl.CurrentCrs.Notices.NotCod = NotCod; // To put parameters + Not_SetNotCodToEdit (NotCod); // To be used as parameter Ale_ShowAlertAndButton2 (ActRemNot,NULL,NULL,Not_PutParams, Btn_REMOVE_BUTTON,Txt_Remove); @@ -662,7 +665,7 @@ static void Not_DrawANotice (Not_Listing_t TypeNoticesListing, { if (Not_CheckIfICanEditNotices ()) { - Gbl.CurrentCrs.Notices.NotCod = NotCod; // To put parameters + Not_SetNotCodToEdit (NotCod); // To be used as parameter /***** Put form to remove announcement *****/ Ico_PutContextualIconToRemove (ActReqRemNot,Not_PutParams); @@ -745,7 +748,7 @@ static void Not_DrawANotice (Not_Listing_t TypeNoticesListing, /* Put form to view full notice */ fprintf (Gbl.F.Out,"
"); - Gbl.CurrentCrs.Notices.NotCod = NotCod; // To put parameters + Not_SetNotCodToEdit (NotCod); // To be used as parameter Lay_PutContextualLinkOnlyIcon (ActSeeOneNot,Anchor,Not_PutParams, "ellipsis-h.svg", Txt_See_full_notice); @@ -1025,7 +1028,7 @@ unsigned Not_GetNumNoticesDeleted (Sco_Scope_t Scope,unsigned *NumNotif) static void Not_PutParams (void) { - Not_PutHiddenParamNotCod (Gbl.CurrentCrs.Notices.NotCod); + Not_PutHiddenParamNotCod (Not_GetNotCodToEdit ()); } /*****************************************************************************/ @@ -1046,3 +1049,17 @@ static long Not_GetParamNotCod (void) /***** Get notice code *****/ return Par_GetParToLong ("NotCod"); } + +/*****************************************************************************/ +/********** Set/get code of a notice to be removed/enable/disable ************/ +/*****************************************************************************/ + +static void Not_SetNotCodToEdit (long NotCod) + { + Gbl.CurrentCrs.Notices.NotCod = NotCod; + } + +static long Not_GetNotCodToEdit (void) + { + return Gbl.CurrentCrs.Notices.NotCod; + }