Version 15.60.2

This commit is contained in:
Antonio Cañas Vargas 2015-12-08 00:25:56 +01:00
parent 55fdbc5a94
commit f7e9ba3cff
5 changed files with 31 additions and 11 deletions

View File

@ -94,7 +94,6 @@
----------Otros ----------Otros
....Etc..... ....Etc.....
*/ */
// TODO: Link to user's country in public profile
// TODO: Show guests in connected users. // TODO: Show guests in connected users.
// TODO: A teacher should may confirm a student ID? In what conditions? (Necessary in order to a student can view his/her marks) // TODO: A teacher should may confirm a student ID? In what conditions? (Necessary in order to a student can view his/her marks)
// TODO: Put headers Content-type and Content-disposition when redirecting with Location: // TODO: Put headers Content-type and Content-disposition when redirecting with Location:
@ -112,14 +111,15 @@
/****************************** Public constants *****************************/ /****************************** Public constants *****************************/
/*****************************************************************************/ /*****************************************************************************/
#define Log_PLATFORM_VERSION "SWAD 15.60.1 (2015/12/07)" #define Log_PLATFORM_VERSION "SWAD 15.60.2 (2015/12/08)"
#define CSS_FILE "swad15.59.4.css" #define CSS_FILE "swad15.59.4.css"
// Number of lines (includes comments but not blank lines) has been got with the following command: // 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 // nl swad*.c swad*.h css/swad*.css py/swad*.py js/swad*.js soap/swad*.h sql/swad*.sql | tail -1
/* /*
Version 15.60.2: Dec 08, 2015 Link to user's country in public profile. (186592 lines)
Version 15.60.1: Dec 07, 2015 Fixed names of some small icons. Version 15.60.1: Dec 07, 2015 Fixed names of some small icons.
New link in student's record card to see her/his attendance. (? lines) New link in student's record card to see her/his attendance. (186576 lines)
Version 15.60: Dec 07, 2015 By default, the language of a new user is unknown. Version 15.60: Dec 07, 2015 By default, the language of a new user is unknown.
Fixed bugs when registering a new user. (? lines) Fixed bugs when registering a new user. (? lines)
Version 15.59.4: Dec 06, 2015 Changes in some small icons. (186462 lines) Version 15.59.4: Dec 06, 2015 Changes in some small icons. (186462 lines)

View File

@ -271,15 +271,15 @@ void Con_GetAndShowLastClicks (void)
if (sscanf (row[2],"%ld",&TimeDiff) != 1) if (sscanf (row[2],"%ld",&TimeDiff) != 1)
TimeDiff = (time_t) 0; TimeDiff = (time_t) 0;
/* Get degree code (row[4]) */ /* Get country code (row[4]) */
Cty.CtyCod = Str_ConvertStrCodToLongCod (row[4]); Cty.CtyCod = Str_ConvertStrCodToLongCod (row[4]);
Cty_GetCountryName (Cty.CtyCod,Cty.Name[Gbl.Prefs.Language]); Cty_GetCountryName (Cty.CtyCod,Cty.Name[Gbl.Prefs.Language]);
/* Get degree code (row[5]) */ /* Get institution code (row[5]) */
Ins.InsCod = Str_ConvertStrCodToLongCod (row[5]); Ins.InsCod = Str_ConvertStrCodToLongCod (row[5]);
Ins_GetShortNameOfInstitutionByCod (&Ins); Ins_GetShortNameOfInstitutionByCod (&Ins);
/* Get degree code (row[6]) */ /* Get centre code (row[6]) */
Ctr.CtrCod = Str_ConvertStrCodToLongCod (row[6]); Ctr.CtrCod = Str_ConvertStrCodToLongCod (row[6]);
Ctr_GetShortNameOfCentreByCod (&Ctr); Ctr_GetShortNameOfCentreByCod (&Ctr);

View File

@ -46,6 +46,7 @@
/*****************************************************************************/ /*****************************************************************************/
extern struct Globals Gbl; extern struct Globals Gbl;
extern struct Act_Actions Act_Actions[Act_NUM_ACTIONS];
/*****************************************************************************/ /*****************************************************************************/
/***************************** Private constants *****************************/ /***************************** Private constants *****************************/
@ -1023,6 +1024,27 @@ void Cty_WriteSelectorOfCountry (void)
/**************************** Get country full name **************************/ /**************************** Get country full name **************************/
/*****************************************************************************/ /*****************************************************************************/
void Cty_WriteCountryName (long CtyCod,const char *Class)
{
char CtyName[Cty_MAX_BYTES_COUNTRY_NAME+1];
char ActTxt[Act_MAX_LENGTH_ACTION_TXT+1];
/***** Get country name *****/
Cty_GetCountryName (CtyCod,CtyName);
/***** Link to country information *****/
Act_FormStart (ActSeeCtyInf);
Cty_PutParamCtyCod (CtyCod);
Act_LinkFormSubmit (Act_GetActionTextFromDB (Act_Actions[ActSeeCtyInf].ActCod,ActTxt),
Class);
fprintf (Gbl.F.Out,"%s</a>",CtyName);
Act_FormEnd ();
}
/*****************************************************************************/
/**************************** Get country full name **************************/
/*****************************************************************************/
bool Cty_GetDataOfCountryByCod (struct Country *Cty) bool Cty_GetDataOfCountryByCod (struct Country *Cty)
{ {
extern const char *Txt_Another_country; extern const char *Txt_Another_country;

View File

@ -91,6 +91,7 @@ void Cty_EditCountries (void);
void Cty_GetListCountries (Cty_GetExtraData_t GetExtraData); void Cty_GetListCountries (Cty_GetExtraData_t GetExtraData);
void Cty_FreeListCountries (void); void Cty_FreeListCountries (void);
void Cty_WriteSelectorOfCountry (void); void Cty_WriteSelectorOfCountry (void);
void Cty_WriteCountryName (long CtyCod,const char *Class);
bool Cty_GetDataOfCountryByCod (struct Country *Cty); bool Cty_GetDataOfCountryByCod (struct Country *Cty);
void Cty_GetCountryName (long CtyCod,char CtyName[Cty_MAX_BYTES_COUNTRY_NAME+1]); void Cty_GetCountryName (long CtyCod,char CtyName[Cty_MAX_BYTES_COUNTRY_NAME+1]);
void Cty_PutParamCtyCod (long CtyCod); void Cty_PutParamCtyCod (long CtyCod);

View File

@ -2065,7 +2065,6 @@ void Rec_ShowSharedUsrRecord (Rec_RecordViewType_t TypeOfView,
Rol_Role_t Role; Rol_Role_t Role;
Rol_Role_t DefaultRoleInCurrentCrs; Rol_Role_t DefaultRoleInCurrentCrs;
bool ShowPhoto; bool ShowPhoto;
char CtyName[Cty_MAX_BYTES_COUNTRY_NAME+1];
unsigned NumCty; unsigned NumCty;
struct Institution Ins; struct Institution Ins;
struct Centre Ctr; struct Centre Ctr;
@ -2444,10 +2443,8 @@ void Rec_ShowSharedUsrRecord (Rec_RecordViewType_t TypeOfView,
"<td class=\"%s LEFT_TOP\" style=\"width:%upx;\">", "<td class=\"%s LEFT_TOP\" style=\"width:%upx;\">",
ClassData,TopC2Width); ClassData,TopC2Width);
if (ShowData && UsrDat->CtyCod > 0) if (ShowData && UsrDat->CtyCod > 0)
{ /* Link to see country information */
Cty_GetCountryName (UsrDat->CtyCod,CtyName); Cty_WriteCountryName (UsrDat->CtyCod,ClassData);
fprintf (Gbl.F.Out,"%s",CtyName);
}
fprintf (Gbl.F.Out,"</td>"); fprintf (Gbl.F.Out,"</td>");
/***** User's web and social networks *****/ /***** User's web and social networks *****/