From 200522b4681a5ce74ae234ae4093b6c777af788c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonio=20Ca=C3=B1as=20Vargas?= Date: Fri, 18 Mar 2016 14:17:19 +0100 Subject: [PATCH] Version 15.150.1 --- swad_changelog.h | 7 ++++--- swad_timetable.c | 49 ++++++++++++++++++++++++++++++++---------------- 2 files changed, 37 insertions(+), 19 deletions(-) diff --git a/swad_changelog.h b/swad_changelog.h index 1b25254a..c49ee4e2 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -134,20 +134,21 @@ /****************************** Public constants *****************************/ /*****************************************************************************/ -#define Log_PLATFORM_VERSION "SWAD 15.150 (2016-03-18)" +#define Log_PLATFORM_VERSION "SWAD 15.150.1 (2016-03-18)" #define CSS_FILE "swad15.146.css" #define JS_FILE "swad15.131.3.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 15.150: Mar 18, 2016 Icon to edit timetable integrated in frame. (195923 lines) + Version 15.150.1: Mar 18, 2016 Icon to view timetable integrated in frame. (195936 lines) + Version 15.150: Mar 18, 2016 Icons to edit/print timetable integrated in frame. (195923 lines) Version 15.149.1: Mar 18, 2016 Button Done after internal editor of syllabus. Focus on new item in internal editor of syllabus. Removed links to view course info. (195920 lines) Version 15.149: Mar 17, 2016 Icon to edit course info integrated in frame. Code refacgtoring related to course info. (195949 lines) - Version 15.148: Mar 17, 2016 Icon to see/edit file browser integrated in frame. (195914 lines) + Version 15.148: Mar 17, 2016 Icon to view/edit file browser integrated in frame. (195914 lines) Version 15.147.6: Mar 16, 2016 Icon to edit departments integrated in frame. (195862 lines) Version 15.147.5: Mar 16, 2016 Icon to edit institutional links integrated in frame. (195863 lines) Version 15.147.4: Mar 16, 2016 Icon to edit places integrated in frame. (195866 lines) diff --git a/swad_timetable.c b/swad_timetable.c index 9f4f5638..059c6bfd 100644 --- a/swad_timetable.c +++ b/swad_timetable.c @@ -118,6 +118,9 @@ static void TT_GetParamsTimeTable (void); static void TT_PutContextualIcons (void); static void TT_ShowSelectorWhichGrps (Act_Action_t Action); +static void TT_PutIconToViewCrsTT (void); +static void TT_PutIconToViewMyTT (void); + static void TT_WriteCrsTimeTableIntoDB (long CrsCod); static void TT_WriteTutTimeTableIntoDB (long UsrCod); static void TT_CreatTimeTableFromDB (long UsrCod); @@ -340,18 +343,12 @@ static void TT_ShowSelectorWhichGrps (Act_Action_t Action) void TT_EditCrsTimeTable (void) { - extern const char *Txt_Show_timetable; extern const char *Txt_TIMETABLE_TYPES[TT_NUM_TIMETABLE_TYPES]; - /***** Link (form) to see my timetable *****/ - fprintf (Gbl.F.Out,"
"); - Lay_PutContextualLink (ActSeeCrsTT,NULL,"clock64x64.gif", - Txt_Show_timetable,Txt_Show_timetable); - fprintf (Gbl.F.Out,"
"); - /***** Editable time table *****/ Gbl.TimeTable.Type = TT_COURSE_TIMETABLE; - Lay_StartRoundFrame ("100%",Txt_TIMETABLE_TYPES[Gbl.TimeTable.Type],NULL); + Lay_StartRoundFrame ("100%",Txt_TIMETABLE_TYPES[Gbl.TimeTable.Type], + TT_PutIconToViewCrsTT); TT_ShowTimeTable (Gbl.Usrs.Me.UsrDat.UsrCod); Lay_EndRoundFrame (); } @@ -362,22 +359,42 @@ void TT_EditCrsTimeTable (void) void TT_ShowMyTutTimeTable (void) { - extern const char *Txt_Show_timetable; extern const char *Txt_TIMETABLE_TYPES[TT_NUM_TIMETABLE_TYPES]; - /***** Link (form) to see my timetable *****/ - fprintf (Gbl.F.Out,"
"); - Lay_PutContextualLink (ActSeeMyTT,NULL,"clock64x64.gif", - Txt_Show_timetable,Txt_Show_timetable); - fprintf (Gbl.F.Out,"
"); - /***** Time table *****/ Gbl.TimeTable.Type = TT_TUTOR_TIMETABLE; - Lay_StartRoundFrame ("100%",Txt_TIMETABLE_TYPES[Gbl.TimeTable.Type],NULL); + Lay_StartRoundFrame ("100%",Txt_TIMETABLE_TYPES[Gbl.TimeTable.Type], + TT_PutIconToViewMyTT); TT_ShowTimeTable (Gbl.Usrs.Me.UsrDat.UsrCod); Lay_EndRoundFrame (); } +/*****************************************************************************/ +/********************** Put icon to view course timetable ********************/ +/*****************************************************************************/ + +static void TT_PutIconToViewCrsTT (void) + { + extern const char *Txt_Show_timetable; + + /***** Link (form) to see course timetable *****/ + Lay_PutContextualLink (ActSeeCrsTT,NULL,"clock64x64.gif", + Txt_Show_timetable,NULL); + } + +/*****************************************************************************/ +/************************ Put icon to view my timetable **********************/ +/*****************************************************************************/ + +static void TT_PutIconToViewMyTT (void) + { + extern const char *Txt_Show_timetable; + + /***** Link (form) to see my timetable *****/ + Lay_PutContextualLink (ActSeeMyTT,NULL,"clock64x64.gif", + Txt_Show_timetable,NULL); + } + /*****************************************************************************/ /*********** Show course timetable or tutor timetable of a teacher ***********/ /*****************************************************************************/