diff --git a/swad_changelog.h b/swad_changelog.h index 59bfc4efc..3d08830f8 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -134,14 +134,15 @@ /****************************** Public constants *****************************/ /*****************************************************************************/ -#define Log_PLATFORM_VERSION "SWAD 15.202.12 (2016-04-23)" +#define Log_PLATFORM_VERSION "SWAD 15.202.13 (2016-04-23)" #define CSS_FILE "swad15.202.css" #define JS_FILE "swad15.197.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.202.12:Apr 23, 2016 Code refactoring in record card. (? lines) + Version 15.202.13:Apr 23, 2016 Code refactoring in record card. (201037 lines) + Version 15.202.12:Apr 23, 2016 Code refactoring in record card. (201026 lines) Version 15.202.11:Apr 23, 2016 Code refactoring in record card. (201014 lines) Version 15.202.10:Apr 23, 2016 Code refactoring in record card. (201000 lines) Version 15.202.9: Apr 23, 2016 Code refactoring in record card. (200987 lines) diff --git a/swad_record.c b/swad_record.c index b08f2c20a..46f518c01 100644 --- a/swad_record.c +++ b/swad_record.c @@ -84,7 +84,7 @@ static void Rec_ShowCrsRecord (Rec_RecordViewType_t TypeOfView,struct UsrData *U const char *Anchor); static void Rec_ShowMyCrsRecordUpdated (void); -static void Rec_ShowInstitution (struct Institution *Ins,bool PutFormLinks); +static void Rec_ShowInstitutionInHead (struct Institution *Ins,bool PutFormLinks); static void Rec_ShowPhoto (struct UsrData *UsrDat); static void Rec_ShowCommands (struct UsrData *UsrDat, Rec_RecordViewType_t TypeOfView, @@ -134,6 +134,8 @@ static void Rec_ShowFamilyPhone (struct UsrData *UsrDat, static void Rec_ShowComments (struct UsrData *UsrDat, bool ShowData,bool DataForm, const char *ClassForm); +static void Rec_ShowInstitution (struct Institution *Ins, + bool ShowData,const char *ClassForm); static void Rec_WriteLinkToDataProtectionClause (void); @@ -1996,7 +1998,6 @@ void Rec_ShowSharedUsrRecord (Rec_RecordViewType_t TypeOfView, struct UsrData *UsrDat) { extern const char *The_ClassForm[The_NUM_THEMES]; - extern const char *Txt_Institution; extern const char *Txt_Centre; extern const char *Txt_Department; extern const char *Txt_Office; @@ -2072,7 +2073,7 @@ void Rec_ShowSharedUsrRecord (Rec_RecordViewType_t TypeOfView, /***** Institution and user's photo *****/ fprintf (Gbl.F.Out,""); - Rec_ShowInstitution (&Ins,PutFormLinks); + Rec_ShowInstitutionInHead (&Ins,PutFormLinks); Rec_ShowPhoto (UsrDat); fprintf (Gbl.F.Out,""); @@ -2169,30 +2170,7 @@ void Rec_ShowSharedUsrRecord (Rec_RecordViewType_t TypeOfView, if (ShowTeacherRows) { /***** Institution *****/ - fprintf (Gbl.F.Out,"" - "" - "%s:" - "" - "", - ClassForm,Rec_C1_BOTTOM,Txt_Institution, - Rec_C2_BOTTOM); - if (ShowData) - { - if (UsrDat->InsCod > 0) - { - if (Ins.WWW[0]) - fprintf (Gbl.F.Out,"", - Ins.WWW); - fprintf (Gbl.F.Out,"%s",Ins.FullName); - if (Ins.WWW[0]) - fprintf (Gbl.F.Out,""); - } - } - fprintf (Gbl.F.Out,"" - ""); + Rec_ShowInstitution (&Ins,ShowData,ClassForm); /* Centre */ fprintf (Gbl.F.Out,"" @@ -2330,7 +2308,7 @@ void Rec_ShowSharedUsrRecord (Rec_RecordViewType_t TypeOfView, /*********************** Show institution in record card *********************/ /*****************************************************************************/ -static void Rec_ShowInstitution (struct Institution *Ins,bool PutFormLinks) +static void Rec_ShowInstitutionInHead (struct Institution *Ins,bool PutFormLinks) { /***** Institution logo *****/ fprintf (Gbl.F.Out,""); } +/*****************************************************************************/ +/************************** Show user's institution **************************/ +/*****************************************************************************/ + +static void Rec_ShowInstitution (struct Institution *Ins, + bool ShowData,const char *ClassForm) + { + extern const char *Txt_Institution; + + fprintf (Gbl.F.Out,"" + "" + "%s:" + "" + "", + ClassForm,Rec_C1_BOTTOM,Txt_Institution, + Rec_C2_BOTTOM); + if (ShowData) + { + if (Ins->InsCod > 0) + { + if (Ins->WWW[0]) + fprintf (Gbl.F.Out,"", + Ins->WWW); + fprintf (Gbl.F.Out,"%s",Ins->FullName); + if (Ins->WWW[0]) + fprintf (Gbl.F.Out,""); + } + } + fprintf (Gbl.F.Out,"" + ""); + } + /*****************************************************************************/ /*********************** Write a link to netiquette rules ********************/ /*****************************************************************************/