From 2c8e7ec4f860ddcd9557d6cd34619a03a046f6ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonio=20Ca=C3=B1as=20Vargas?= Date: Sat, 13 Dec 2014 17:17:42 +0100 Subject: [PATCH] Version 14.37.2 --- swad_changelog.h | 5 +++-- swad_course.c | 9 ++++++++- swad_layout.c | 2 +- swad_search.c | 4 ++-- swad_search.h | 2 +- 5 files changed, 15 insertions(+), 7 deletions(-) diff --git a/swad_changelog.h b/swad_changelog.h index 3abc150be..c76ecb701 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -35,13 +35,14 @@ /****************************** Public constants *****************************/ /*****************************************************************************/ -#define Log_PLATFORM_VERSION "SWAD 14.37.1 (2014/12/13)" +#define Log_PLATFORM_VERSION "SWAD 14.37.2 (2014/12/13)" // 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 | tail -1 /* - Version 14.37.1 :Dic 12, 2014 Fixed bug in HTML entities in swad_text.c (translation). + Version 14.37.2 :Dic 13, 2014 Changes in search of courses link in "my courses". (170874 lines) + Version 14.37.1 :Dic 13, 2014 Fixed bug in HTML entities in swad_text.c (translation). Guests can view option "my courses" on profile tab. Reordering of options in profile tab. (170866 lines) Version 14.37 :Dic 12, 2014 New module swad_account for user's account. (170863 lines) diff --git a/swad_course.c b/swad_course.c index a04924f8a..367303f18 100644 --- a/swad_course.c +++ b/swad_course.c @@ -2617,7 +2617,14 @@ static void Usr_PutFormToSearchCourses (void) extern const char *Txt_Search_courses; /***** Put form to search / select courses *****/ - Act_FormStart (ActSysReqSch); + Act_FormStart ( Gbl.CurrentCrs.Crs.CrsCod > 0 ? ActCrsReqSch : + (Gbl.CurrentDeg.Deg.DegCod > 0 ? ActDegReqSch : + (Gbl.CurrentCtr.Ctr.CtrCod > 0 ? ActCtrReqSch : + (Gbl.CurrentIns.Ins.InsCod > 0 ? ActInsReqSch : + (Gbl.CurrentCty.Cty.CtyCod > 0 ? ActCtyReqSch : + ActSysReqSch))))); + Sco_PutParamScope (Sco_SCOPE_PLATFORM); + Par_PutHiddenParamUnsigned ("WhatToSearch",(unsigned) Sch_SEARCH_COURSES); Act_LinkFormSubmit (Txt_Search_courses,The_ClassFormul[Gbl.Prefs.Theme]); Lay_PutSendIcon ("search",Txt_Search_courses,Txt_Search_courses); fprintf (Gbl.F.Out,""); diff --git a/swad_layout.c b/swad_layout.c index 90dcb4d65..5b3993caf 100644 --- a/swad_layout.c +++ b/swad_layout.c @@ -632,7 +632,7 @@ static void Lay_WritePageTopHeading (void) ActSysSch))))); Sco_PutParamScope (Sco_SCOPE_PLATFORM); Par_PutHiddenParamUnsigned ("WhatToSearch",(unsigned) Sch_SEARCH_ALL); - Sch_PutFormToSearch (Gbl.Prefs.PathTheme); + Sch_PutFormToSearchOnHead (Gbl.Prefs.PathTheme); fprintf (Gbl.F.Out,"" ""); } diff --git a/swad_search.c b/swad_search.c index ca8eab0fe..143618f6f 100644 --- a/swad_search.c +++ b/swad_search.c @@ -261,7 +261,7 @@ static void Sch_PutFormToSearchWithWhatToSearchAndScope (Act_Action_t Action,Sco fprintf (Gbl.F.Out,""); /***** String to find *****/ - Sch_PutFormToSearch (Gbl.Prefs.IconsURL); + Sch_PutFormToSearchOnHead (Gbl.Prefs.IconsURL); /***** Send button *****/ fprintf (Gbl.F.Out,"
" @@ -304,7 +304,7 @@ static bool Sch_CheckIfIHavePermissionToSearch (Sch_WhatToSearch_t WhatToSearch) /*********** Put form to search courses, teachers, documents... **************/ /*****************************************************************************/ -void Sch_PutFormToSearch (const char *IconURL) +void Sch_PutFormToSearchOnHead (const char *IconURL) { extern const char *Txt_Search; diff --git a/swad_search.h b/swad_search.h index 22615e06f..db5727f13 100644 --- a/swad_search.h +++ b/swad_search.h @@ -63,7 +63,7 @@ void Sch_ReqInsSearch (void); void Sch_ReqCtrSearch (void); void Sch_ReqDegSearch (void); void Sch_ReqCrsSearch (void); -void Sch_PutFormToSearch (const char *IconURL); +void Sch_PutFormToSearchOnHead (const char *IconURL); void Sch_GetParamsSearch (void); void Sch_SysSearch (void); void Sch_CtySearch (void);