From d7fc47251b535b1f8107684b3479cd9e6c72b0eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonio=20Ca=C3=B1as=20Vargas?= Date: Sat, 13 Dec 2014 20:32:10 +0100 Subject: [PATCH] Version 14.38 --- icon/deg16x16.gif | Bin 170 -> 163 bytes icon/iconset/awesome/action16x16/deg16x16.gif | Bin 170 -> 163 bytes icon/iconset/awesome/action32x32/deg32x32.gif | Bin 284 -> 267 bytes icon/iconset/awesome/action64x64/deg64x64.gif | Bin 520 -> 459 bytes swad_centre.c | 37 ++++- swad_centre.h | 1 + swad_changelog.h | 3 +- swad_country.c | 16 ++ swad_country.h | 1 + swad_course.c | 49 +++++- swad_course.h | 2 +- swad_degree.c | 37 ++++- swad_degree.h | 1 + swad_institution.c | 37 ++++- swad_institution.h | 1 + swad_search.c | 12 +- swad_text.c | 154 +++++++++++++----- 17 files changed, 276 insertions(+), 75 deletions(-) diff --git a/icon/deg16x16.gif b/icon/deg16x16.gif index 1e0eb6ff1ddd5a7b899c0e1c45b6c2f5ccc331e8..ca489628d8492510b7ec9f989f3b44de1ac0d85d 100644 GIT binary patch literal 163 zcmV;U09^k^Nk%w1VGsZi0J8u9KtMoEO-)r*Rc2;petv%c|Nn%9gpQ7mm6esEqN1p% zsJFMb!NI}H%gfl<*y7^iA^8LW000F5EC2ui01yBW000C~u*gZPy?8p8Wjg`@2uD*f zL?EtfU@!%uva~25(m;gt%}s;HCNUT!HmAX2RQjl369gbp6D=r=L19qSQWOG-W06QK R9+m^3LwT6k@Hi#{06SCyKp_AC literal 170 zcmV;b09F4-Nk%w1VGsZi0J8u9KtMo9NJvyvR9#(NW@cu0cXxPrcY1nyi;Ietm6f8R zqN%B=ySuyp|Np|m!p+UiA^8LW000dDEC2ui01yBW000D6u*pfQZ3%#MrxThcFqaXY zz(FkmiUv!goJE7UfYPvIbGR@GY1cv-C;%ZSByd!c0bOPzOHPuS0cD^;Hcp41Cg5G* Y05J(j(0C9|ga>6!amX*aP9*{WJEMg^cK`qY diff --git a/icon/iconset/awesome/action16x16/deg16x16.gif b/icon/iconset/awesome/action16x16/deg16x16.gif index 1e0eb6ff1ddd5a7b899c0e1c45b6c2f5ccc331e8..ca489628d8492510b7ec9f989f3b44de1ac0d85d 100644 GIT binary patch literal 163 zcmV;U09^k^Nk%w1VGsZi0J8u9KtMoEO-)r*Rc2;petv%c|Nn%9gpQ7mm6esEqN1p% zsJFMb!NI}H%gfl<*y7^iA^8LW000F5EC2ui01yBW000C~u*gZPy?8p8Wjg`@2uD*f zL?EtfU@!%uva~25(m;gt%}s;HCNUT!HmAX2RQjl369gbp6D=r=L19qSQWOG-W06QK R9+m^3LwT6k@Hi#{06SCyKp_AC literal 170 zcmV;b09F4-Nk%w1VGsZi0J8u9KtMo9NJvyvR9#(NW@cu0cXxPrcY1nyi;Ietm6f8R zqN%B=ySuyp|Np|m!p+UiA^8LW000dDEC2ui01yBW000D6u*pfQZ3%#MrxThcFqaXY zz(FkmiUv!goJE7UfYPvIbGR@GY1cv-C;%ZSByd!c0bOPzOHPuS0cD^;Hcp41Cg5G* Y05J(j(0C9|ga>6!amX*aP9*{WJEMg^cK`qY diff --git a/icon/iconset/awesome/action32x32/deg32x32.gif b/icon/iconset/awesome/action32x32/deg32x32.gif index 647cb01916516af644b421f599e83078110f53ea..fbe6de7baa823c43765528536e98c11159aff145 100644 GIT binary patch literal 267 zcmV+m0rdVyNk%w1VITk?0J8u9KtMoCOG{K#R9jnHWMpJ(Yio0Jb9#Du|NsAph=`Js zlAN5Jr>Cd4x3|d1$kf!-A^8LW000O8EC2ui03ZM$000EI5Xniay*TU5yZ>M)PL85D zqtzq<-~vH{ijC2}xEmZz#}v7s(7?DX2*RYYu#g~?Q0M{CI7F{HUWI`b3S^iBfbmEO zt^>tm6A(}yi$Rdk>^uMpglRot5DG;k3UwF_06hjeU==Gj2^w+)2tYVH4Gaf2FH;x} zFAq;$1{!B>a$Nug8VUeS3#f-0R*zJtPy{m>a;g(>2Lmku0RsnQ9W8Dt7%$2fcP`CF R3xv_t*4NnC+6WN<06Ug$UcmqW literal 284 zcmV+%0ptEhNk%w1VITk?0J8u9KtMoCOG{BvQC(eKVPRo)b#;P*fryBRk&%(3qob&( zsI|4Vy1Kdl|Np_k!OF_YA^8LW000dDEC2ui03ZM$000EZu*pfQy*SI1w7*FJ073VC z#Ha$qnIUToATH$yvK%mVk^g|gCjl&$GO41nRe=FTN)=5qD0Xhq(LjRB2_@L9VB%B> zcoJWBW=S3<3TTvhQBac6qXl3muY(yQHeE#m4jO_DCJkjdQ;Hag00R#bcq()cRgnM^ zDh6;+dJP6DoSrHHeTs{5E2j-Ibe1x(KW_~OKd^Ft0k8~zDrik3Q^9}46pfFUKeH7v izY`12n93HtofZoS1_lTVC(Jb;FaeL{>gyE|00282J7_up diff --git a/icon/iconset/awesome/action64x64/deg64x64.gif b/icon/iconset/awesome/action64x64/deg64x64.gif index 9a09f085a073d68880641b0f01fb0f2e5632f5da..e88dada22f63bfd0a614e25598bb01b4e510015a 100644 GIT binary patch literal 459 zcmV;+0W|(cNk%w1VL$*t0J8u9KtMoCOG{T*S7&Euc6N6E|Nn-DhLDetlaiC0o13Jh zq^hc_va+(gyu8E1!vFvPA^8LW000F5EC2ui06+jh000F3u*gZPy*TU5yZ>M)j$~<` zXsWJk>%MR-&ve}~L;wJR(bylwU`H$h2n--5F*G`hgN3qi5InEXL1JdmVZT?wfz`-? z&)}YEK|s6R0m9ECeB18?DF$J^`~6xI3VnZte*z9ohKqLw1rA+|l2`%=7krbGfgE+2 zcnTp3o^D7aUH}edr=D>RCZaof5|FEf0tT)qO#vBIega!8L}MFFX9J)v4MY^U8l6RX z8V!ym2+XrPtr~2l893M^Z2$rj3{Ku4(BUKF1A^21Yqa7UF=DB;zC!@dsj=5ea!2H3G0SBH~7nB8iY3L8M@Td?`&7 zq2N#=!x0W-jGDoL0s{jE1kj;FzyJaU z76?sIkHD0HMarH1;AE|boFCnCfXPnol8bhq*~`nfuiw9b0}CEZxUk{Fh%H0_06Rli ByORI_ literal 520 zcmV+j0{8t#Nk%w1VL$*t0J8u9KtMoCOG{K#Q(0M8T3T9cY;1RTc7%k4k&%y>n3$%f zrmL%~v$M0hy1M`W|H;Y6A^8LW000gEEC2ui06+jh000F3(8)=wy*TU5yZ>M)jwBZV zfY6kzSD-LJwDfhvIB?W;bLO}JgI6*DkAMO(v_Lumi)DxKd=8|UTXnm`PJG)iYK1k5 z&xU2<%!VmygSI@y($42y5aV~h3qLP?f+$KGO@oLiQ5aNn0gZ_;GZhSdT@3<}F+&oS za{?9!nlPLSa|kx0C~p#WVTBc#ssN}JkWPOVW}}lAhe&x8o~nx)yD?W6w~=WcU@!@( zssUsmH?S14s=*qp9Ilbc9&{SRqs8MW+!M=**dH+%+KJR8@mY!MAom(^cj6`ZInd#2 z4!Q|9_Q9Y)>cX)q%_uE|H&H^2UfK8{sb}GqLKL_PKHhh6VYK9r5451q995P)PZMINSODOBFLq) zj$C~h7C=*!GO?CTi}owguuNhcR68p~JB&A{**yYK!p=c9HT(iH7pWhk9x@^6J7JBZ zsUfPAYv+UjCwoFUEI1GoMt}ozM<_l5D#U{Z4<29{oFlZC50quRZgF=ujRlGYxVFu^ Kx9`~z0029K_}icW diff --git a/swad_centre.c b/swad_centre.c index a1baa1a67..bbdf33b60 100644 --- a/swad_centre.c +++ b/swad_centre.c @@ -443,6 +443,25 @@ static void Ctr_Configuration (bool PrintView) } } +/*****************************************************************************/ +/********* Put a link (form) to view centres of current institution **********/ +/*****************************************************************************/ +// Gbl.CurrentIns.Ins.InsCod must be > 0 + +void Ctr_PutLinkToViewCentresOfCurrentIns (void) + { + extern const char *The_ClassFormul[The_NUM_THEMES]; + extern const char *Txt_Centres_of_INSTITUTION_X; + + /***** Put form to view centres of current institution *****/ + Act_FormStart (ActSeeCtr); + sprintf (Gbl.Title,Txt_Centres_of_INSTITUTION_X, + Gbl.CurrentIns.Ins.ShortName); + Act_LinkFormSubmit (Gbl.Title,The_ClassFormul[Gbl.Prefs.Theme]); + Lay_PutSendIcon ("ctr",Gbl.Title,Gbl.Title); + fprintf (Gbl.F.Out,""); + } + /*****************************************************************************/ /*************** Show the centres of the current institution *****************/ /*****************************************************************************/ @@ -492,11 +511,13 @@ static void Ctr_ListCentres (void) static void Ctr_ListCentresForSeeing (void) { - extern const char *Txt_Centres; + extern const char *Txt_Centres_of_INSTITUTION_X; unsigned NumCtr; /***** Write heading *****/ - Lay_StartRoundFrameTable10 (NULL,2,Txt_Centres); + sprintf (Gbl.Title,Txt_Centres_of_INSTITUTION_X, + Gbl.CurrentIns.Ins.ShortName); + Lay_StartRoundFrameTable10 (NULL,2,Gbl.Title); Ctr_PutHeadCentresForSeeing (true); // Order selectable /***** Write all the centres and their nuber of teachers *****/ @@ -1011,7 +1032,7 @@ void Ctr_WriteSelectorOfCentre (Act_Action_t NextAction) static void Ctr_ListCentresForEdition (void) { - extern const char *Txt_Centres; + extern const char *Txt_Centres_of_INSTITUTION_X; extern const char *Txt_Remove_centre; extern const char *Txt_Another_place; extern const char *Txt_CENTRE_STATUS[Ctr_NUM_STATUS_TXT]; @@ -1029,7 +1050,9 @@ static void Ctr_ListCentresForEdition (void) Usr_UsrDataConstructor (&UsrDat); /***** Write heading *****/ - Lay_StartRoundFrameTable10 (NULL,2,Txt_Centres); + sprintf (Gbl.Title,Txt_Centres_of_INSTITUTION_X, + Gbl.CurrentIns.Ins.ShortName); + Lay_StartRoundFrameTable10 (NULL,2,Gbl.Title); Ctr_PutHeadCentresForEdition (); /***** Write all the centres *****/ @@ -1820,7 +1843,7 @@ void Ctr_ChangeCtrPhotoAttribution (void) static void Ctr_PutFormToCreateCentre (void) { extern const char *The_ClassFormul[The_NUM_THEMES]; - extern const char *Txt_New_centre; + extern const char *Txt_New_centre_of_INSTITUTION_X; extern const char *Txt_Another_place; extern const char *Txt_CENTRE_STATUS[Ctr_NUM_STATUS_TXT]; extern const char *Txt_Create_centre; @@ -1838,7 +1861,9 @@ static void Ctr_PutFormToCreateCentre (void) Lay_ShowErrorAndExit ("You can not edit centres."); /***** Start of frame *****/ - Lay_StartRoundFrameTable10 (NULL,2,Txt_New_centre); + sprintf (Gbl.Title,Txt_New_centre_of_INSTITUTION_X, + Gbl.CurrentIns.Ins.ShortName); + Lay_StartRoundFrameTable10 (NULL,2,Gbl.Title); /***** Write heading *****/ Ctr_PutHeadCentresForEdition (); diff --git a/swad_centre.h b/swad_centre.h index 70c6d61b7..2ef3462a5 100644 --- a/swad_centre.h +++ b/swad_centre.h @@ -90,6 +90,7 @@ void Ctr_SeeCtrWithPendingDegs (void); void Ctr_ShowConfiguration (void); void Ctr_PrintConfiguration (void); +void Ctr_PutLinkToViewCentresOfCurrentIns (void); void Ctr_ShowCtrsOfCurrentIns (void); void Ctr_EditCentres (void); void Ctr_GetListCentres (long InsCod); diff --git a/swad_changelog.h b/swad_changelog.h index 36ff75199..a0a674cf2 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -35,12 +35,13 @@ /****************************** Public constants *****************************/ /*****************************************************************************/ -#define Log_PLATFORM_VERSION "SWAD 14.37.3 (2014/12/13)" +#define Log_PLATFORM_VERSION "SWAD 14.38 (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.38 :Dic 13, 2014 Link in "my courses" to courses, degrees, centres, institutions or countries. (171083 lines) Version 14.37.3 :Dic 13, 2014 The title of list of courses in current degree now contains the short name of the degree. (170898 lines) 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). diff --git a/swad_country.c b/swad_country.c index 60f2c92cb..608309879 100644 --- a/swad_country.c +++ b/swad_country.c @@ -410,6 +410,22 @@ static void Cty_Configuration (bool PrintView) } } +/*****************************************************************************/ +/******************** Put a link (form) to view countries ********************/ +/*****************************************************************************/ + +void Cty_PutLinkToViewCountries (void) + { + extern const char *The_ClassFormul[The_NUM_THEMES]; + extern const char *Txt_Countries; + + /***** Put form to view institutions of current country *****/ + Act_FormStart (ActSeeCty); + Act_LinkFormSubmit (Txt_Countries,The_ClassFormul[Gbl.Prefs.Theme]); + Lay_PutSendIcon ("earth",Txt_Countries,Txt_Countries); + fprintf (Gbl.F.Out,""); + } + /*****************************************************************************/ /*************************** List all the countries **************************/ /*****************************************************************************/ diff --git a/swad_country.h b/swad_country.h index 2ddab1f79..3ab8974cc 100644 --- a/swad_country.h +++ b/swad_country.h @@ -75,6 +75,7 @@ void Cty_SeeCtyWithPendingInss (void); void Cty_ShowConfiguration (void); void Cty_PrintConfiguration (void); +void Cty_PutLinkToViewCountries (void); void Cty_ListCountries (void); void Cty_ListCountries1 (void); void Cty_ListCountries2 (void); diff --git a/swad_course.c b/swad_course.c index b21ae5052..0bab299ed 100644 --- a/swad_course.c +++ b/swad_course.c @@ -75,6 +75,7 @@ static void Crs_PutFormToConfigLogIn (bool IsForm); static void Crs_WriteListMyCoursesToSelectOne (void); +static void Crs_PutLinkToViewCoursesOfCurrentDeg (void); static void Crs_GetListCoursesInDegree (Crs_WhatCourses_t WhatCourses); static void Crs_ListCourses (void); static void Crs_EditCourses (void); @@ -94,7 +95,7 @@ static void Crs_GetDataOfCourseFromRow (struct Course *Crs,MYSQL_ROW row); static void Crs_EmptyCourseCompletely (long CrsCod); static bool Crs_RenameCourse (struct Course *Crs,Cns_ShortOrFullName_t ShortOrFullName); static void Crs_PutLinkToGoToCrs (struct Course *Crs); -static void Usr_PutFormToSearchCourses (void); +static void Crs_PutLinkToSearchCourses (void); static void Crs_PutParamOtherCrsCod (long CrsCod); static long Crs_GetParamOtherCrsCod (void); @@ -647,6 +648,25 @@ unsigned Crs_GetNumCrssWithUsrs (Rol_Role_t Role,const char *SubQuery) return (unsigned) DB_QueryCOUNT (Query,"can not get number of courses with users"); } +/*****************************************************************************/ +/************ Put a link (form) to view courses of current degree ************/ +/*****************************************************************************/ +// Gbl.CurrentDeg.Deg.DegCod must be > 0 + +static void Crs_PutLinkToViewCoursesOfCurrentDeg (void) + { + extern const char *The_ClassFormul[The_NUM_THEMES]; + extern const char *Txt_Courses_of_DEGREE_X; + + /***** Put form to view courses of current degree *****/ + Act_FormStart (ActSeeCrs); + sprintf (Gbl.Title,Txt_Courses_of_DEGREE_X, + Gbl.CurrentDeg.Deg.ShortName); + Act_LinkFormSubmit (Gbl.Title,The_ClassFormul[Gbl.Prefs.Theme]); + Lay_PutSendIcon ("hierarchy",Gbl.Title,Gbl.Title); + fprintf (Gbl.F.Out,""); + } + /*****************************************************************************/ /************************** Show courses of a degree *************************/ /*****************************************************************************/ @@ -919,7 +939,8 @@ static void Crs_ListCoursesForSeeing (void) Crs_StatusTxt_t StatusTxt; /***** Write heading *****/ - sprintf (Gbl.Message,Txt_Courses_of_DEGREE_X,Gbl.CurrentDeg.Deg.ShortName); + sprintf (Gbl.Message,Txt_Courses_of_DEGREE_X, + Gbl.CurrentDeg.Deg.ShortName); Lay_StartRoundFrameTable10 (NULL,2,Gbl.Message); Crs_PutHeadCoursesForSeeing (); @@ -1024,7 +1045,8 @@ static void Crs_ListCoursesForEdition (void) Usr_UsrDataConstructor (&UsrDat); /***** Write heading *****/ - sprintf (Gbl.Message,Txt_Courses_of_DEGREE_X,Gbl.CurrentDeg.Deg.ShortName); + sprintf (Gbl.Message,Txt_Courses_of_DEGREE_X, + Gbl.CurrentDeg.Deg.ShortName); Lay_StartRoundFrameTable10 (NULL,2,Gbl.Message); Crs_PutHeadCoursesForEdition (); @@ -1321,7 +1343,8 @@ static void Crs_PutFormToCreateCourse (void) Crs = &Gbl.Degs.EditingCrs; /***** Write heading *****/ - sprintf (Gbl.Message,Txt_New_course_of_DEGREE_X,Gbl.CurrentDeg.Deg.ShortName); + sprintf (Gbl.Message,Txt_New_course_of_DEGREE_X, + Gbl.CurrentDeg.Deg.ShortName); Lay_StartRoundFrameTable10 (NULL,2,Gbl.Message); Crs_PutHeadCoursesForEdition (); @@ -2597,7 +2620,17 @@ void Crs_ReqSelectOneOfMyCourses (void) /***** Search / select more courses *****/ fprintf (Gbl.F.Out,"
"); - Usr_PutFormToSearchCourses (); + Crs_PutLinkToSearchCourses (); + if (Gbl.CurrentDeg.Deg.DegCod > 0) + Crs_PutLinkToViewCoursesOfCurrentDeg (); + else if (Gbl.CurrentCtr.Ctr.CtrCod > 0) + Deg_PutLinkToViewDegreesOfCurrentCtr (); + else if (Gbl.CurrentIns.Ins.InsCod > 0) + Ctr_PutLinkToViewCentresOfCurrentIns (); + else if (Gbl.CurrentCty.Cty.CtyCod > 0) + Ins_PutLinkToViewInstitutionsOfCurrentCty (); + else + Cty_PutLinkToViewCountries (); fprintf (Gbl.F.Out,"
"); /***** Select one of my courses *****/ @@ -2614,7 +2647,7 @@ void Crs_ReqSelectOneOfMyCourses (void) /******************* Put a link (form) to search courses *********************/ /*****************************************************************************/ -static void Usr_PutFormToSearchCourses (void) +static void Crs_PutLinkToSearchCourses (void) { extern const char *The_ClassFormul[The_NUM_THEMES]; extern const char *Txt_Search_courses; @@ -2634,10 +2667,10 @@ static void Usr_PutFormToSearchCourses (void) } /*****************************************************************************/ -/**** Put a link (form) to remove all the students in the current course *****/ +/****************** Put a link (form) to select my courses *******************/ /*****************************************************************************/ -void Usr_PutFormToSelectMyCourses (void) +void Crs_PutFormToSelectMyCourses (void) { extern const char *The_ClassFormul[The_NUM_THEMES]; extern const char *Txt_My_courses; diff --git a/swad_course.h b/swad_course.h index 7b480c7d8..a1dfb6c68 100644 --- a/swad_course.h +++ b/swad_course.h @@ -127,7 +127,7 @@ void Crs_RenameCourseFull (void); void Crs_ChangeCrsStatus (void); void Crs_ContEditAfterChgCrs (void); -void Usr_PutFormToSelectMyCourses (void); +void Crs_PutFormToSelectMyCourses (void); void Crs_PutParamCrsCod (long CrsCod); void Crs_ReqSelectOneOfMyCourses (void); diff --git a/swad_degree.c b/swad_degree.c index a8e51fa75..10e9c7f1f 100644 --- a/swad_degree.c +++ b/swad_degree.c @@ -903,6 +903,25 @@ void Deg_ReqEditDegreeTypes (void) Deg_FreeListDegTypes (); } +/*****************************************************************************/ +/*********** Put a link (form) to view degrees of current centre *************/ +/*****************************************************************************/ +// Gbl.CurrentCtr.Ctr.CtrCod must be > 0 + +void Deg_PutLinkToViewDegreesOfCurrentCtr (void) + { + extern const char *The_ClassFormul[The_NUM_THEMES]; + extern const char *Txt_Degrees_of_CENTRE_X; + + /***** Put form to view degrees of current centre *****/ + Act_FormStart (ActSeeDeg); + sprintf (Gbl.Title,Txt_Degrees_of_CENTRE_X, + Gbl.CurrentCtr.Ctr.ShortName); + Act_LinkFormSubmit (Gbl.Title,The_ClassFormul[Gbl.Prefs.Theme]); + Lay_PutSendIcon ("deg",Gbl.Title,Gbl.Title); + fprintf (Gbl.F.Out,""); + } + /*****************************************************************************/ /************* Show the degrees belonging to the current centre **************/ /*****************************************************************************/ @@ -1113,11 +1132,13 @@ static void Deg_ListDegreeTypesForEdition (void) static void Deg_ListDegreesForSeeing (void) { - extern const char *Txt_Degrees; + extern const char *Txt_Degrees_of_CENTRE_X; unsigned NumDeg; /***** Write heading *****/ - Lay_StartRoundFrameTable10 (NULL,2,Txt_Degrees); + sprintf (Gbl.Title,Txt_Degrees_of_CENTRE_X, + Gbl.CurrentCtr.Ctr.ShortName); + Lay_StartRoundFrameTable10 (NULL,2,Gbl.Title); Deg_PutHeadDegreesForSeeing (); /***** List the degrees *****/ @@ -1243,7 +1264,7 @@ static void Deg_ListOneDegreeForSeeing (struct Degree *Deg,unsigned NumDeg) static void Deg_ListDegreesForEdition (void) { - extern const char *Txt_Degrees; + extern const char *Txt_Degrees_of_CENTRE_X; extern const char *Txt_Remove_degree; extern const char *Txt_DEGREE_With_year_for_optional_courses; extern const char *Txt_DEGREE_Without_year_for_optional_courses; @@ -1263,7 +1284,9 @@ static void Deg_ListDegreesForEdition (void) Usr_UsrDataConstructor (&UsrDat); /***** Write heading *****/ - Lay_StartRoundFrameTable10 (NULL,2,Txt_Degrees); + sprintf (Gbl.Title,Txt_Degrees_of_CENTRE_X, + Gbl.CurrentCtr.Ctr.ShortName); + Lay_StartRoundFrameTable10 (NULL,2,Gbl.Title); Deg_PutHeadDegreesForEdition (); /***** List the degrees *****/ @@ -1651,7 +1674,7 @@ static void Deg_PutFormToCreateDegType (void) static void Deg_PutFormToCreateDegree (void) { - extern const char *Txt_New_degree; + extern const char *Txt_New_degree_of_CENTRE_X; extern const char *Txt_DEGREE_STATUS[Deg_NUM_STATUS_TXT]; extern const char *Txt_Create_degree; struct Degree *Deg; @@ -1671,7 +1694,9 @@ static void Deg_PutFormToCreateDegree (void) Deg = &Gbl.Degs.EditingDeg; /***** Start of frame *****/ - Lay_StartRoundFrameTable10 (NULL,2,Txt_New_degree); + sprintf (Gbl.Title,Txt_New_degree_of_CENTRE_X, + Gbl.CurrentCtr.Ctr.ShortName); + Lay_StartRoundFrameTable10 (NULL,2,Gbl.Title); /***** Write heading *****/ Deg_PutHeadDegreesForEdition (); diff --git a/swad_degree.h b/swad_degree.h index e97b7c6fa..1d3932fe7 100644 --- a/swad_degree.h +++ b/swad_degree.h @@ -114,6 +114,7 @@ void Deg_InitCurrentCourse (void); void Deg_WriteSelectorDegTypes (void); void Deg_SeeDegTypes (void); void Deg_ReqEditDegreeTypes (void); +void Deg_PutLinkToViewDegreesOfCurrentCtr (void); void Deg_ShowDegsOfCurrentCtr (void); unsigned Deg_ConvStrToYear (const char *StrYear); diff --git a/swad_institution.c b/swad_institution.c index aa39fa7c5..0ff1c3980 100644 --- a/swad_institution.c +++ b/swad_institution.c @@ -389,6 +389,25 @@ static void Ins_Configuration (bool PrintView) } } +/*****************************************************************************/ +/********* Put a link (form) to view institutions of current country *********/ +/*****************************************************************************/ +// Gbl.CurrentCty.Cty.CtyCod must be > 0 + +void Ins_PutLinkToViewInstitutionsOfCurrentCty (void) + { + extern const char *The_ClassFormul[The_NUM_THEMES]; + extern const char *Txt_Institutions_of_COUNTRY_X; + + /***** Put form to view institutions of current country *****/ + Act_FormStart (ActSeeIns); + sprintf (Gbl.Title,Txt_Institutions_of_COUNTRY_X, + Gbl.CurrentCty.Cty.Name[Gbl.Prefs.Language]); + Act_LinkFormSubmit (Gbl.Title,The_ClassFormul[Gbl.Prefs.Theme]); + Lay_PutSendIcon ("ins",Gbl.Title,Gbl.Title); + fprintf (Gbl.F.Out,""); + } + /*****************************************************************************/ /**************** List the institutions of the current country ***************/ /*****************************************************************************/ @@ -424,11 +443,13 @@ void Ins_ShowInssOfCurrentCty (void) static void Ins_ListInstitutionsForSeeing (void) { - extern const char *Txt_Institutions; + extern const char *Txt_Institutions_of_COUNTRY_X; unsigned NumIns; /***** Table head *****/ - Lay_StartRoundFrameTable10 (NULL,2,Txt_Institutions); + sprintf (Gbl.Title,Txt_Institutions_of_COUNTRY_X, + Gbl.CurrentCty.Cty.Name[Gbl.Prefs.Language]); + Lay_StartRoundFrameTable10 (NULL,2,Gbl.Title); Ins_PutHeadInstitutionsForSeeing (true); // Order selectable /***** Write all the institutions and their nuber of users *****/ @@ -964,7 +985,7 @@ void Ins_WriteSelectorOfInstitution (Act_Action_t NextAction) static void Ins_ListInstitutionsForEdition (void) { - extern const char *Txt_Institutions; + extern const char *Txt_Institutions_of_COUNTRY_X; extern const char *Txt_Remove_institution; extern const char *Txt_Another_country; extern const char *Txt_INSTITUTION_STATUS[Ins_NUM_STATUS_TXT]; @@ -984,7 +1005,9 @@ static void Ins_ListInstitutionsForEdition (void) Cty_GetListCountries (Cty_GET_ONLY_COUNTRIES); /***** Write heading *****/ - Lay_StartRoundFrameTable10 (NULL,2,Txt_Institutions); + sprintf (Gbl.Title,Txt_Institutions_of_COUNTRY_X, + Gbl.CurrentCty.Cty.Name[Gbl.Prefs.Language]); + Lay_StartRoundFrameTable10 (NULL,2,Gbl.Title); Ins_PutHeadInstitutionsForEdition (); /***** Write all the institutions *****/ @@ -1598,7 +1621,7 @@ void Ins_ChangeInsStatus (void) static void Ins_PutFormToCreateInstitution (void) { - extern const char *Txt_New_institution; + extern const char *Txt_New_institution_of_COUNTRY_X; extern const char *Txt_INSTITUTION_STATUS[Ins_NUM_STATUS_TXT]; extern const char *Txt_Create_institution; struct Institution *Ins; @@ -1618,7 +1641,9 @@ static void Ins_PutFormToCreateInstitution (void) Lay_ShowErrorAndExit ("You can not edit institutions."); /***** Start of frame *****/ - Lay_StartRoundFrameTable10 (NULL,2,Txt_New_institution); + sprintf (Gbl.Title,Txt_New_institution_of_COUNTRY_X, + Gbl.CurrentCty.Cty.Name[Gbl.Prefs.Language]); + Lay_StartRoundFrameTable10 (NULL,2,Gbl.Title); /***** Write heading *****/ Ins_PutHeadInstitutionsForEdition (); diff --git a/swad_institution.h b/swad_institution.h index badd4cf31..5cee735b3 100644 --- a/swad_institution.h +++ b/swad_institution.h @@ -97,6 +97,7 @@ void Ins_SeeInsWithPendingCtrs (void); void Ins_ShowConfiguration (void); void Ins_PrintConfiguration (void); +void Ins_PutLinkToViewInstitutionsOfCurrentCty (void); void Ins_ShowInssOfCurrentCty (void); void Ins_EditInstitutions (void); void Ins_GetListInstitutions (long CtyCod,Ins_GetExtraData_t GetExtraData); diff --git a/swad_search.c b/swad_search.c index 143618f6f..dcdea95ab 100644 --- a/swad_search.c +++ b/swad_search.c @@ -91,7 +91,7 @@ void Sch_ReqSysSearch (void) if (Gbl.Usrs.Me.Logged) { fprintf (Gbl.F.Out,"
"); - Usr_PutFormToSelectMyCourses (); + Crs_PutFormToSelectMyCourses (); fprintf (Gbl.F.Out,"
"); } @@ -109,7 +109,7 @@ void Sch_ReqCtySearch (void) if (Gbl.Usrs.Me.Logged) { fprintf (Gbl.F.Out,"
"); - Usr_PutFormToSelectMyCourses (); + Crs_PutFormToSelectMyCourses (); fprintf (Gbl.F.Out,"
"); } @@ -127,7 +127,7 @@ void Sch_ReqInsSearch (void) if (Gbl.Usrs.Me.Logged) { fprintf (Gbl.F.Out,"
"); - Usr_PutFormToSelectMyCourses (); + Crs_PutFormToSelectMyCourses (); fprintf (Gbl.F.Out,"
"); } @@ -145,7 +145,7 @@ void Sch_ReqCtrSearch (void) if (Gbl.Usrs.Me.Logged) { fprintf (Gbl.F.Out,"
"); - Usr_PutFormToSelectMyCourses (); + Crs_PutFormToSelectMyCourses (); fprintf (Gbl.F.Out,"
"); } @@ -163,7 +163,7 @@ void Sch_ReqDegSearch (void) if (Gbl.Usrs.Me.Logged) { fprintf (Gbl.F.Out,"
"); - Usr_PutFormToSelectMyCourses (); + Crs_PutFormToSelectMyCourses (); fprintf (Gbl.F.Out,"
"); } @@ -181,7 +181,7 @@ void Sch_ReqCrsSearch (void) if (Gbl.Usrs.Me.Logged) { fprintf (Gbl.F.Out,"
"); - Usr_PutFormToSelectMyCourses (); + Crs_PutFormToSelectMyCourses (); fprintf (Gbl.F.Out,"
"); } diff --git a/swad_text.c b/swad_text.c index d69f2d101..f63e53da6 100644 --- a/swad_text.c +++ b/swad_text.c @@ -3845,6 +3845,27 @@ const char *Txt_CENTRES_HELP_ORDER[2] = #endif }; +const char *Txt_Centres_of_INSTITUTION_X = // Warning: it is very important to include %s in the following sentences +#if L==0 + "Centres de %s"; +#elif L==1 + "Lehrinstitute von %s"; +#elif L==2 + "Centres of %s"; +#elif L==3 + "Centros de %s"; +#elif L==4 + "Centres de %s"; +#elif L==5 + "Centros de %s"; // Okoteve traducción +#elif L==6 + "Centri di %s"; +#elif L==7 + "Centra %s"; +#elif L==8 + "Centros de %s"; +#endif + const char *Txt_CENTRES_ORDER[2] = { #if L==0 @@ -7258,6 +7279,27 @@ const char *Txt_degrees = "titulaçoes"; #endif +const char *Txt_Degrees_of_CENTRE_X = // Warning: it is very important to include %s in the following sentences +#if L==0 + "Titulacions de %s"; +#elif L==1 + "Studiengang von %s"; +#elif L==2 + "Degrees of %s"; +#elif L==3 + "Titulaciones de %s"; +#elif L==4 + "Études de %s"; +#elif L==5 + "Titulaciones de %s"; // Okoteve traducción +#elif L==6 + "Lauree di %s"; +#elif L==7 + "Stopnie %s"; +#elif L==8 + "Titulaçoes de %s"; +#endif + const char *Txt_Degrees_with_pending_courses = #if L==0 "Titulacions amb assignatures pendents d'activar"; @@ -14207,6 +14249,27 @@ const char *Txt_INSTITUTIONS_HELP_ORDER[2] = #endif }; +const char *Txt_Institutions_of_COUNTRY_X = // Warning: it is very important to include %s in the following sentences +#if L==0 + "Institucions de %s"; +#elif L==1 + "Hochschulen von %s"; +#elif L==2 + "Institutions of %s"; +#elif L==3 + "Instituciones de %s"; +#elif L==4 + "Établissements de %s"; +#elif L==5 + "Instituciones de %s"; // Okoteve traducción +#elif L==6 + "Istituzioni di %s"; +#elif L==7 + "Instytucje %s"; +#elif L==8 + "Instituções de %s"; +#endif + const char *Txt_INSTITUTIONS_ORDER[2] = { #if L==0 @@ -14333,28 +14396,37 @@ const char *Txt_IP = // Internet Protocol address #elif L==8 "IP"; #endif - +/* const char *Txt_X_is_busy_at_the_moment_Try_again_in_a_few_seconds = // Warning: it is very important to include %s in the following sentences #if L==0 - "%s está ocupado en este momento. Vuelva a intentarlo dentro de unos segundos."; // Necessita traduccio + "%s está ocupado en este momento." + " Vuelva a intentarlo dentro de unos segundos."; // Necessita traduccio #elif L==1 - "%s ist im Moment beschäftigt. Wieder in ein paar Sekunden noch einmal."; + "%s ist im Moment beschäftigt." + " Wieder in ein paar Sekunden noch einmal."; #elif L==2 - "%s is busy at the moment. Try again in a few seconds."; + "%s is busy at the moment." + " Try again in a few seconds."; #elif L==3 - "%s está ocupado en este momento. Vuelva a intentarlo dentro de unos segundos."; + "%s está ocupado en este momento." + " Vuelva a intentarlo dentro de unos segundos."; #elif L==4 - "%s est occupé en ce moment. Essayez à nouveau dans quelques secondes."; + "%s est occupé en ce moment." + " Essayez à nouveau dans quelques secondes."; #elif L==5 - "%s está ocupado en este momento. Vuelva a intentarlo dentro de unos segundos."; // Okoteve traducción + "%s está ocupado en este momento." + " Vuelva a intentarlo dentro de unos segundos."; // Okoteve traducción #elif L==6 - "%s è occupato in questo momento. Riprova tra pochi secondi."; + "%s è occupato in questo momento." + " Riprova tra pochi secondi."; #elif L==7 - "%s jest zajety. Spróbuj ponownie za kilka sekund."; + "%s jest zajety." + " Spróbuj ponownie za kilka sekund."; #elif L==8 - "%s está ocupado no momento. Tente novamente em alguns segundos."; + "%s está ocupado no momento." + " Tente novamente em alguns segundos."; #endif - +*/ const char *Txt_It_is_mandatory_to_choose_a_group = #if L==0 "Elegir grupo es obligatorio"; // Necessita traduccio @@ -23824,25 +23896,25 @@ const char *Txt_New_banner = "Novo banner"; #endif -const char *Txt_New_centre = +const char *Txt_New_centre_of_INSTITUTION_X = // Warning: it is very important to include %s in the following sentences #if L==0 - "Nuevo centro"; // Necessita traduccio + "Nou centre de %s"; #elif L==1 - "Neues Lehrinstitut"; + "Neues Lehrinstitut von %s"; #elif L==2 - "New centre"; + "New centre of %s"; #elif L==3 - "Nuevo centro"; + "Nuevo centro de %s"; #elif L==4 - "Nouveau centre"; + "Nouveau centre de %s"; #elif L==5 - "Nuevo centro"; // Okoteve traducción + "Nuevo centro de %s"; // Okoteve traducción #elif L==6 - "Nuovo centro"; + "Nuovo centro di %s"; #elif L==7 - "Nowe centrum"; + "Nowe centrum %s"; #elif L==8 - "Novo centro"; + "Novo centro de %s"; #endif const char *Txt_New_country = @@ -23887,25 +23959,25 @@ const char *Txt_New_course_of_DEGREE_X = // Warning: it is very important to inc "Nova disciplina de %s"; #endif -const char *Txt_New_degree = +const char *Txt_New_degree_of_CENTRE_X = // Warning: it is very important to include %s in the following sentences #if L==0 - "Nueva titulación"; // Necessita traduccio + "Nova titulació de %s"; #elif L==1 - "Neuer Studiengang"; + "Neuer Studiengang von %s"; #elif L==2 - "New degree"; + "New degree of %s"; #elif L==3 - "Nueva titulación"; + "Nueva titulación de %s"; #elif L==4 - "Nouvel étude"; + "Nouvel étude de %s"; #elif L==5 - "Nueva titulación"; // Okoteve traducción + "Nueva titulación de %s"; // Okoteve traducción #elif L==6 - "Nuova laurea"; + "Nuova laurea di %s"; #elif L==7 - "Nowy stopien"; + "Nowy stopien %s"; #elif L==8 - "Nova titulação"; + "Nova titulação de %s"; #endif const char *Txt_New_department = @@ -24034,25 +24106,25 @@ const char *Txt_New_holiday = "Nova féria"; #endif -const char *Txt_New_institution = +const char *Txt_New_institution_of_COUNTRY_X = // Warning: it is very important to include %s in the following sentences #if L==0 - "Nueva institución"; // Necessita traduccio + "Nova institución de %s"; #elif L==1 - "Neue Hochschule"; + "Neue Hochschule von %s"; #elif L==2 - "New institution"; + "New institution of %s"; #elif L==3 - "Nueva institución"; + "Nueva institución de %s"; #elif L==4 - "Nouvel établissement"; + "Nouvel établissement de %s"; #elif L==5 - "Nueva institución"; // Okoteve traducción + "Nueva institución de %s"; // Okoteve traducción #elif L==6 - "Nuova istituzione"; + "Nuova istituzione di %s"; #elif L==7 - "Nowa instytucja"; + "Nowa instytucja %s"; #elif L==8 - "Nova institução"; + "Nova institução de %s"; #endif const char *Txt_New_link =