Version 16.89.2

This commit is contained in:
Antonio Cañas Vargas 2016-12-06 19:50:32 +01:00
parent 92769055d5
commit fbfac97fa6
3 changed files with 21 additions and 20 deletions

View File

@ -2787,8 +2787,8 @@ struct Act_Actions Act_Actions[Act_NUM_ACTIONS] =
/* ActMyCrs */{ 987, 2,TabPrf,ActMyCrs ,0x1FE,0x1FE,0x1FE,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Crs_ReqSelectOneOfMyCourses ,"hierarchy64x64.png" },
/* ActSeeMyTT */{ 408, 3,TabPrf,ActSeeMyTT ,0x1FE,0x1FE,0x1FE,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,TT_ShowClassTimeTable ,"clock64x64.gif" },
/* ActSeeMyAgd */{1602, 4,TabPrf,ActSeeMyAgd ,0x1FE,0x1FE,0x1FE,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Agd_ShowMyAgenda ,"date64x64.gif" },
/* ActSeeMyAgd */{1602, 4,TabPrf,ActSeeMyAgd ,0x100,0x100,0x100,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Agd_ShowMyAgenda ,"date64x64.gif" }, // TODO: Remove when debugged
// /* ActFrmMyAcc */{ 36, 5,TabPrf,ActFrmMyAcc ,0x1FF,0x1FF,0x1FF,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Acc_ShowFormMyAccount ,"arroba64x64.gif" },
// /* ActSeeMyAgd */{1602, 4,TabPrf,ActSeeMyAgd ,0x100,0x100,0x100,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Agd_ShowMyAgenda ,"date64x64.gif" }, // TODO: Remove when debugged
/* ActFrmMyAcc */{ 36, 5,TabPrf,ActFrmMyAcc ,0x1FF,0x1FF,0x1FF,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Acc_ShowFormMyAccount ,"arroba64x64.gif" },
/* ActReqEdiRecCom */{ 285, 6,TabPrf,ActReqEdiRecCom ,0x1FE,0x1FE,0x1FE,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Rec_ShowFormMySharedRecord ,"card64x64.gif" },
/* ActEdiPrf */{ 673, 7,TabPrf,ActEdiPrf ,0x1FF,0x1FF,0x1FF,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Pre_EditPrefs ,"heart64x64.gif" },
/* ActAdmBrf */{ 23, 8,TabPrf,ActAdmBrf ,0x1FE,0x1FE,0x1FE,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Brw_ShowFileBrowserOrWorks ,"pendrive64x64.gif" },

View File

@ -211,8 +211,7 @@ void Agd_ShowMyAgenda (void)
extern const char *Txt_Public_agenda_USER;
/***** Get whether to show all events or only my events ******/
if (Gbl.Usrs.Me.AvailableRoles & (1 << Rol_TEACHER)) // I am a teacher in some courses
Agd_GetParamWhichEvents ();
Agd_GetParamWhichEvents ();
/***** Start frame *****/
switch (Gbl.Agenda.WhichEvents)
@ -308,7 +307,8 @@ static void Agd_ShowEvents (Agd_AgendaType_t AgendaType)
Pag_WriteLinksToPagesCentered (WhatPaginate[AgendaType],0,&Pagination);
/***** Button to create a new event *****/
if (AgendaType == Agd_MY_AGENDA)
if (AgendaType == Agd_MY_AGENDA &&
Gbl.Agenda.WhichEvents == Agd_ALL_EVENTS)
Agd_PutButtonToCreateNewEvent ();
/***** Free list of events *****/
@ -452,7 +452,8 @@ static void Agd_PutIconToViewEditMyAgenda (void)
static void Agd_PutIconsListEvents (void)
{
/***** Put icon to create a new event *****/
Agd_PutIconToCreateNewEvent ();
if (Gbl.Agenda.WhichEvents == Agd_ALL_EVENTS)
Agd_PutIconToCreateNewEvent ();
/***** Put icon to show QR code *****/
Agd_PutIconToShowQR ();
@ -811,19 +812,16 @@ static void Agd_PutFormsToRemEditOneEvent (struct AgendaEvent *AgdEvent)
NULL);
/***** Put form to make event public/private *****/
if (Gbl.Usrs.Me.UsrDat.Roles & (1 << Rol_TEACHER)) // I am a teacher in some courses
{
if (AgdEvent->Public)
Lay_PutContextualLink (ActPrvEvtMyAgd,Agd_PutParams,
"unlock-on64x64.png",
Txt_Event_visible_to_the_users_of_your_courses_click_to_make_it_private,NULL,
NULL);
else
Lay_PutContextualLink (ActPubEvtMyAgd,Agd_PutParams,
"lock-on64x64.png",
Txt_Event_private_click_to_make_it_visible_to_the_users_of_your_courses,NULL,
NULL);
}
if (AgdEvent->Public)
Lay_PutContextualLink (ActPrvEvtMyAgd,Agd_PutParams,
"unlock-on64x64.png",
Txt_Event_visible_to_the_users_of_your_courses_click_to_make_it_private,NULL,
NULL);
else
Lay_PutContextualLink (ActPubEvtMyAgd,Agd_PutParams,
"lock-on64x64.png",
Txt_Event_private_click_to_make_it_visible_to_the_users_of_your_courses,NULL,
NULL);
fprintf (Gbl.F.Out,"</div>");
}
@ -921,6 +919,7 @@ static void Agd_GetListEvents (Agd_AgendaType_t AgendaType)
case Agd_ONLY_PUBLIC_EVENTS:
sprintf (Query,"SELECT AgdCod FROM agendas"
" WHERE UsrCod='%ld' AND Public='Y' AND Hidden='N'"
" AND DATE(EndTime)>=CURDATE()" // Only today and future events
" ORDER BY %s",
Gbl.Usrs.Me.UsrDat.UsrCod,OrderBySubQuery);
break;

View File

@ -183,13 +183,15 @@
/****************************** Public constants *****************************/
/*****************************************************************************/
#define Log_PLATFORM_VERSION "SWAD 16.89.1 (2016-12-06)"
#define Log_PLATFORM_VERSION "SWAD 16.89.2 (2016-12-06)"
#define CSS_FILE "swad16.86.5.css"
#define JS_FILE "swad16.84.2.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 16.89.2: Dec 06, 2016 Fixed bugs in agenda.
Public agenda available for any user, not only teachers. (210167 lines)
Version 16.89.1: Dec 06, 2016 Changes in help on agenda. (210166 lines)
Version 16.89: Dec 06, 2016 Agenda events now are replaced by agenda events today. (210139 lines)
Version 16.88.1: Dec 06, 2016 Fixed bugs in agenda. (210118 lines)