diff --git a/swad_centre.c b/swad_centre.c index 4ef6e701a..3b880557a 100644 --- a/swad_centre.c +++ b/swad_centre.c @@ -580,7 +580,8 @@ static void Ctr_ListOneCentreForSeeing (struct Centre *Ctr,unsigned NumCtr) extern const char *Txt_Go_to_X; extern const char *Txt_CENTRE_STATUS[Ctr_NUM_STATUS_TXT]; struct Place Plc; - const char *TxtClass; + const char *TxtClassNormal; + const char *TxtClassStrong; const char *BgColor; Crs_StatusTxt_t StatusTxt; @@ -588,8 +589,16 @@ static void Ctr_ListOneCentreForSeeing (struct Centre *Ctr,unsigned NumCtr) Plc.PlcCod = Ctr->PlcCod; Plc_GetDataOfPlaceByCod (&Plc); - TxtClass = (Ctr->Status & Ctr_STATUS_BIT_PENDING) ? "DAT_LIGHT" : - "DAT"; + if (Ctr->Status & Ctr_STATUS_BIT_PENDING) + { + TxtClassNormal = "DAT_LIGHT"; + TxtClassStrong = "DAT_LIGHT"; + } + else + { + TxtClassNormal = "DAT"; + TxtClassStrong = "DAT_N"; + } BgColor = (Ctr->CtrCod == Gbl.CurrentCtr.Ctr.CtrCod) ? "LIGHT_BLUE" : Gbl.ColorRows[Gbl.RowEvenOdd]; @@ -598,35 +607,19 @@ static void Ctr_ListOneCentreForSeeing (struct Centre *Ctr,unsigned NumCtr) "" "%u" "", - TxtClass,BgColor, + TxtClassNormal,BgColor, NumCtr); - /***** Centre logo *****/ - fprintf (Gbl.F.Out,"" - "", - TxtClass,BgColor, - Ctr->WWW,Ctr->FullName); - Log_DrawLogo (Sco_SCOPE_CTR,Ctr->CtrCod,Ctr->ShortName, - 16,"CENTER_MIDDLE",true); - fprintf (Gbl.F.Out,"" - ""); - - /***** Place *****/ - fprintf (Gbl.F.Out,"" - "%s" - "", - TxtClass,BgColor, - Plc.PlcCod > 0 ? Plc.ShortName : - Txt_Another_place); - - /***** Centre name *****/ + /***** Centre logo and name *****/ fprintf (Gbl.F.Out,"", - TxtClass,BgColor); - Act_FormGoToStart (ActSeeCtrInf); + TxtClassStrong,BgColor); + Act_FormGoToStart (ActSeeDeg); Ctr_PutParamCtrCod (Ctr->CtrCod); sprintf (Gbl.Title,Txt_Go_to_X,Ctr->FullName); - Act_LinkFormSubmit (Gbl.Title,TxtClass); - fprintf (Gbl.F.Out,"%s", + Act_LinkFormSubmit (Gbl.Title,TxtClassStrong); + Log_DrawLogo (Sco_SCOPE_CTR,Ctr->CtrCod,Ctr->ShortName, + 16,"CENTER_MIDDLE",true); + fprintf (Gbl.F.Out," %s", Ctr->FullName); Act_FormEnd (); fprintf (Gbl.F.Out,""); @@ -635,23 +628,31 @@ static void Ctr_ListOneCentreForSeeing (struct Centre *Ctr,unsigned NumCtr) fprintf (Gbl.F.Out,"" "%u" "", - TxtClass,BgColor, + TxtClassNormal,BgColor, Ctr->NumTchs); /***** Number of degrees *****/ fprintf (Gbl.F.Out,"" "%u" "", - TxtClass,BgColor, + TxtClassNormal,BgColor, Ctr->NumDegs); + /***** Place *****/ + fprintf (Gbl.F.Out,"" + "%s" + "", + TxtClassNormal,BgColor, + Plc.PlcCod > 0 ? Plc.ShortName : + Txt_Another_place); + /***** Centre status *****/ StatusTxt = Ctr_GetStatusTxtFromStatusBits (Ctr->Status); fprintf (Gbl.F.Out,"" "%s" "" "", - TxtClass,BgColor, + TxtClassNormal,BgColor, Txt_CENTRE_STATUS[StatusTxt]); Gbl.RowEvenOdd = 1 - Gbl.RowEvenOdd; @@ -2104,12 +2105,7 @@ static void Ctr_PutHeadCentresForSeeing (bool OrderSelectable) tCtrsOrderType Order; fprintf (Gbl.F.Out,"" - "" - "" - "" - "%s" - "", - Txt_Place); + ""); for (Order = Ctr_ORDER_BY_CENTRE; Order <= Ctr_ORDER_BY_NUM_TCHS; Order++) @@ -2139,8 +2135,12 @@ static void Ctr_PutHeadCentresForSeeing (bool OrderSelectable) "" "%s" "" + "" + "%s" + "" "", Txt_Degrees_ABBREVIATION, + Txt_Place, Txt_Status); } diff --git a/swad_changelog.h b/swad_changelog.h index 296af8fde..4b9410af5 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -103,7 +103,6 @@ // TODO: System admin should be able to remove/edit user's mail (when he/she detects a recipient does not exists, for example) // TODO: When a new assignment/attendance/survey is incorrect, the second time the form is shown, it should be filled with partial data, now is always empty // TODO: Remove columns "first year, last year, optional, status" when listing degrees? -// TODO: Row with total of users in figures // TODO: Show message indicating that mail could be in SPAM folder // TODO: List institution and centre admins // TODO: List of degrees administrated by a degree admin should be ordered by name @@ -112,12 +111,14 @@ /****************************** Public constants *****************************/ /*****************************************************************************/ -#define Log_PLATFORM_VERSION "SWAD 15.40 (2015/11/17)" +#define Log_PLATFORM_VERSION "SWAD 15.40.1 (2015/11/19)" // 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.40: Nov 17, 2015 Changes in listing of countries. (187275 lines) + Version 15.40.1: Nov 19, 2015 Changes in behaviour of links to countries, institutions, centres and degrees. (187288 lines) + Version 15.40: Nov 17, 2015 Changes in statistics of number of users. + Changes in listing of countries. (187275 lines) Version 15.39.1: Nov 16, 2015 User' e-mail can be removed even if it is the unique. (187236 lines) Version 15.39: Nov 16, 2015 Administrators can edit another user' e-mails. (187268 lines) 9 changes necessary in database: diff --git a/swad_country.c b/swad_country.c index 54b8a35e8..1cca5397a 100644 --- a/swad_country.c +++ b/swad_country.c @@ -519,8 +519,8 @@ void Cty_ListCountries2 (void) fprintf (Gbl.F.Out,"" "", BgColor); - Cty_DrawCountryMapWithLinkToSeeCtyInf (&Gbl.Ctys.Lst[NumCty],ActSeeCtyInf, - "DAT_NOBR","COUNTRY_MAP_SMALL"); + Cty_DrawCountryMapWithLinkToSeeCtyInf (&Gbl.Ctys.Lst[NumCty],ActSeeIns, + "DAT_NOBR_N","COUNTRY_MAP_SMALL"); fprintf (Gbl.F.Out,""); /* Write stats of this country */ diff --git a/swad_course.c b/swad_course.c index 24f32dc77..146133f90 100644 --- a/swad_course.c +++ b/swad_course.c @@ -1272,7 +1272,8 @@ static void Crs_ListCoursesForSeeing (void) struct Course *Crs; unsigned Year; unsigned NumCrs; - const char *TxtClass; + const char *TxtClassNormal; + const char *TxtClassStrong; const char *BgColor; Crs_StatusTxt_t StatusTxt; @@ -1294,8 +1295,16 @@ static void Crs_ListCoursesForSeeing (void) Crs = &(Gbl.CurrentDeg.Deg.LstCrss[NumCrs]); if (Crs->Year == Year) { - TxtClass = (Crs->Status & Crs_STATUS_BIT_PENDING) ? "DAT_LIGHT" : - "DAT"; + if (Crs->Status & Crs_STATUS_BIT_PENDING) + { + TxtClassNormal = "DAT_LIGHT"; + TxtClassStrong = "DAT_LIGHT"; + } + else + { + TxtClassNormal = "DAT"; + TxtClassStrong = "DAT_N"; + } BgColor = (Crs->CrsCod == Gbl.CurrentCrs.Crs.CrsCod) ? "LIGHT_BLUE" : Gbl.ColorRows[Gbl.RowEvenOdd]; @@ -1319,30 +1328,30 @@ static void Crs_ListCoursesForSeeing (void) fprintf (Gbl.F.Out,"" "%s" "", - TxtClass,BgColor, + TxtClassNormal,BgColor, Crs->InstitutionalCrsCod); /* Course year */ fprintf (Gbl.F.Out,"" "%s" "", - TxtClass,BgColor, + TxtClassNormal,BgColor, Txt_YEAR_OF_DEGREE[Crs->Year]); /* Course semester */ fprintf (Gbl.F.Out,"" "%s" "", - TxtClass,BgColor, + TxtClassNormal,BgColor, Txt_SEMESTER_OF_YEAR[Crs->Semester]); /* Course full name */ fprintf (Gbl.F.Out,"", - TxtClass,BgColor); + TxtClassStrong,BgColor); Act_FormGoToStart (ActSeeCrsInf); Crs_PutParamCrsCod (Crs->CrsCod); sprintf (Gbl.Title,Txt_Go_to_X,Crs->FullName); - Act_LinkFormSubmit (Gbl.Title,TxtClass); + Act_LinkFormSubmit (Gbl.Title,TxtClassStrong); fprintf (Gbl.F.Out,"%s", Crs->FullName); Act_FormEnd (); @@ -1352,13 +1361,13 @@ static void Crs_ListCoursesForSeeing (void) fprintf (Gbl.F.Out,"" "%u" "", - TxtClass,BgColor,Crs->NumStds); + TxtClassNormal,BgColor,Crs->NumStds); /* Current number of teachers in this course */ fprintf (Gbl.F.Out,"" "%u" "", - TxtClass,BgColor,Crs->NumTchs); + TxtClassNormal,BgColor,Crs->NumTchs); /* Course status */ StatusTxt = Crs_GetStatusTxtFromStatusBits (Crs->Status); @@ -1366,7 +1375,7 @@ static void Crs_ListCoursesForSeeing (void) "%s" "" "", - TxtClass,BgColor,Txt_COURSE_STATUS[StatusTxt]); + TxtClassNormal,BgColor,Txt_COURSE_STATUS[StatusTxt]); } } Gbl.RowEvenOdd = 1 - Gbl.RowEvenOdd; diff --git a/swad_degree.c b/swad_degree.c index 3d08f683c..9ad509b38 100644 --- a/swad_degree.c +++ b/swad_degree.c @@ -644,7 +644,7 @@ void Deg_WriteCtyInsCtrDeg (void) The_ClassDegree[Gbl.Prefs.Theme]); /***** Form to go to the country *****/ - Act_FormGoToStart (ActSeeCtyInf); + Act_FormGoToStart (ActSeeIns); Cty_PutParamCtyCod (Gbl.CurrentCty.Cty.CtyCod); Act_LinkFormSubmit (Gbl.CurrentCty.Cty.Name[Gbl.Prefs.Language], The_ClassDegree[Gbl.Prefs.Theme]); @@ -659,7 +659,7 @@ void Deg_WriteCtyInsCtrDeg (void) The_ClassDegree[Gbl.Prefs.Theme]); /***** Form to go to the institution *****/ - Act_FormGoToStart (ActSeeInsInf); + Act_FormGoToStart (ActSeeCtr); Ins_PutParamInsCod (Gbl.CurrentIns.Ins.InsCod); Act_LinkFormSubmit (Gbl.CurrentIns.Ins.FullName, The_ClassDegree[Gbl.Prefs.Theme]); @@ -674,7 +674,7 @@ void Deg_WriteCtyInsCtrDeg (void) The_ClassDegree[Gbl.Prefs.Theme]); /***** Form to go to the centre *****/ - Act_FormGoToStart (ActSeeCtrInf); + Act_FormGoToStart (ActSeeDeg); Ctr_PutParamCtrCod (Gbl.CurrentCtr.Ctr.CtrCod); Act_LinkFormSubmit (Gbl.CurrentCtr.Ctr.FullName, The_ClassDegree[Gbl.Prefs.Theme]); @@ -689,7 +689,7 @@ void Deg_WriteCtyInsCtrDeg (void) The_ClassDegree[Gbl.Prefs.Theme]); /***** Form to go to the degree *****/ - Act_FormGoToStart (ActSeeDegInf); + Act_FormGoToStart (ActSeeCrs); Deg_PutParamDegCod (Gbl.CurrentDeg.Deg.DegCod); Act_LinkFormSubmit (Gbl.CurrentDeg.Deg.FullName, The_ClassDegree[Gbl.Prefs.Theme]); @@ -1230,7 +1230,8 @@ static void Deg_ListOneDegreeForSeeing (struct Degree *Deg,unsigned NumDeg) extern const char *Txt_DEGREE_Without_year_for_optional_courses; extern const char *Txt_DEGREE_STATUS[Deg_NUM_STATUS_TXT]; struct DegreeType DegTyp; - const char *TxtClass; + const char *TxtClassNormal; + const char *TxtClassStrong; const char *BgColor; Crs_StatusTxt_t StatusTxt; @@ -1239,8 +1240,16 @@ static void Deg_ListOneDegreeForSeeing (struct Degree *Deg,unsigned NumDeg) if (!Deg_GetDataOfDegreeTypeByCod (&DegTyp)) Lay_ShowErrorAndExit ("Code of type of degree not found."); - TxtClass = (Deg->Status & Deg_STATUS_BIT_PENDING) ? "DAT_LIGHT" : - "DAT"; + if (Deg->Status & Deg_STATUS_BIT_PENDING) + { + TxtClassNormal = "DAT_LIGHT"; + TxtClassStrong = "DAT_LIGHT"; + } + else + { + TxtClassNormal = "DAT"; + TxtClassStrong = "DAT_N"; + } BgColor = (Deg->DegCod == Gbl.CurrentDeg.Deg.DegCod) ? "LIGHT_BLUE" : Gbl.ColorRows[Gbl.RowEvenOdd]; @@ -1264,49 +1273,42 @@ static void Deg_ListOneDegreeForSeeing (struct Degree *Deg,unsigned NumDeg) fprintf (Gbl.F.Out,"" "%u" "", - TxtClass,BgColor, + TxtClassNormal,BgColor, NumDeg); - /***** Degree logo *****/ - fprintf (Gbl.F.Out,"" - "", - BgColor, - Deg->WWW,Deg->FullName); - Log_DrawLogo (Sco_SCOPE_DEG,Deg->DegCod,Deg->ShortName, - 16,"CENTER_MIDDLE",true); - fprintf (Gbl.F.Out,"" - ""); - - /* Degree full name */ + /***** Degree logo and name *****/ fprintf (Gbl.F.Out,"", - TxtClass,BgColor); - Act_FormGoToStart (ActSeeDegInf); + TxtClassStrong,BgColor); + Act_FormGoToStart (ActSeeCrs); Deg_PutParamDegCod (Deg->DegCod); sprintf (Gbl.Title,Txt_Go_to_X,Deg->FullName); - Act_LinkFormSubmit (Gbl.Title,TxtClass); - fprintf (Gbl.F.Out,"%s",Deg->FullName); + Act_LinkFormSubmit (Gbl.Title,TxtClassStrong); + Log_DrawLogo (Sco_SCOPE_DEG,Deg->DegCod,Deg->ShortName, + 16,"CENTER_MIDDLE",true); + fprintf (Gbl.F.Out," %s", + Deg->FullName); Act_FormEnd (); fprintf (Gbl.F.Out,""); - /* Type of degree */ + /***** Type of degree *****/ fprintf (Gbl.F.Out,"" "%s" "", - TxtClass,BgColor,DegTyp.DegTypName); + TxtClassNormal,BgColor,DegTyp.DegTypName); - /* Degree first year */ + /***** Degree first year *****/ fprintf (Gbl.F.Out,"" "%u" "", - TxtClass,BgColor,Deg->FirstYear); + TxtClassNormal,BgColor,Deg->FirstYear); - /* Degree last year */ + /***** Degree last year *****/ fprintf (Gbl.F.Out,"" "%u" "", - TxtClass,BgColor,Deg->LastYear); + TxtClassNormal,BgColor,Deg->LastYear); - /* Degree optional year */ + /***** Degree optional year *****/ fprintf (Gbl.F.Out,"" "\"%s\"OptYear ? Txt_DEGREE_With_year_for_optional_courses : Txt_DEGREE_Without_year_for_optional_courses); - /* Current number of courses in this degree */ + /***** Current number of courses in this degree *****/ fprintf (Gbl.F.Out,"" "%u" "", - TxtClass,BgColor,Deg->NumCourses); + TxtClassNormal,BgColor,Deg->NumCourses); - /* Degree status */ + /***** Degree status *****/ StatusTxt = Deg_GetStatusTxtFromStatusBits (Deg->Status); fprintf (Gbl.F.Out,"" "%s" "" "", - TxtClass,BgColor,Txt_DEGREE_STATUS[StatusTxt]); + TxtClassNormal,BgColor,Txt_DEGREE_STATUS[StatusTxt]); Gbl.RowEvenOdd = 1 - Gbl.RowEvenOdd; } @@ -1988,7 +1990,6 @@ static void Deg_PutHeadDegreesForSeeing (void) fprintf (Gbl.F.Out,"" "" "" - "" "" "%s" "" diff --git a/swad_institution.c b/swad_institution.c index c78a8819b..7bcd79d51 100644 --- a/swad_institution.c +++ b/swad_institution.c @@ -528,12 +528,21 @@ static void Ins_ListOneInstitutionForSeeing (struct Institution *Ins,unsigned Nu { extern const char *Txt_Go_to_X; extern const char *Txt_INSTITUTION_STATUS[Ins_NUM_STATUS_TXT]; - const char *TxtClass; + const char *TxtClassNormal; + const char *TxtClassStrong; const char *BgColor; Crs_StatusTxt_t StatusTxt; - TxtClass = (Ins->Status & Ins_STATUS_BIT_PENDING) ? "DAT_LIGHT" : - "DAT"; + if (Ins->Status & Ins_STATUS_BIT_PENDING) + { + TxtClassNormal = "DAT_LIGHT"; + TxtClassStrong = "DAT_LIGHT"; + } + else + { + TxtClassNormal = "DAT"; + TxtClassStrong = "DAT_N"; + } BgColor = (Ins->InsCod == Gbl.CurrentIns.Ins.InsCod) ? "LIGHT_BLUE" : Gbl.ColorRows[Gbl.RowEvenOdd]; @@ -542,28 +551,19 @@ static void Ins_ListOneInstitutionForSeeing (struct Institution *Ins,unsigned Nu "" "%u" "", - TxtClass,BgColor, + TxtClassNormal,BgColor, NumIns); - /***** Icon *****/ - fprintf (Gbl.F.Out,"" - "", - BgColor, - Ins->WWW,Ins->FullName); - Log_DrawLogo (Sco_SCOPE_INS,Ins->InsCod,Ins->ShortName, - 16,NULL,true); - fprintf (Gbl.F.Out,"" - ""); - - /***** Name and link to go to this institution *****/ + /***** Institution logo and name *****/ fprintf (Gbl.F.Out,"", - TxtClass,BgColor); - Act_FormGoToStart (ActSeeInsInf); + TxtClassStrong,BgColor); + Act_FormGoToStart (ActSeeCtr); Ins_PutParamInsCod (Ins->InsCod); sprintf (Gbl.Title,Txt_Go_to_X,Ins->FullName); - Act_LinkFormSubmit (Gbl.Title,TxtClass); - fprintf (Gbl.F.Out,"%s", + Act_LinkFormSubmit (Gbl.Title,TxtClassStrong); + Log_DrawLogo (Sco_SCOPE_INS,Ins->InsCod,Ins->ShortName, + 16,NULL,true); + fprintf (Gbl.F.Out," %s", Ins->FullName); Act_FormEnd (); fprintf (Gbl.F.Out,""); @@ -572,27 +572,27 @@ static void Ins_ListOneInstitutionForSeeing (struct Institution *Ins,unsigned Nu fprintf (Gbl.F.Out,"" "%u" "", - TxtClass,BgColor,Ins->NumUsrs); + TxtClassNormal,BgColor,Ins->NumUsrs); fprintf (Gbl.F.Out,"" "%u" "", - TxtClass,BgColor,Ins->NumStds); + TxtClassNormal,BgColor,Ins->NumStds); fprintf (Gbl.F.Out,"" "%u" "", - TxtClass,BgColor,Ins->NumTchs); + TxtClassNormal,BgColor,Ins->NumTchs); fprintf (Gbl.F.Out,"" "%u" "", - TxtClass,BgColor,Ins->NumCtrs); + TxtClassNormal,BgColor,Ins->NumCtrs); fprintf (Gbl.F.Out,"" "%u" "", - TxtClass,BgColor,Ins->NumDegs); + TxtClassNormal,BgColor,Ins->NumDegs); fprintf (Gbl.F.Out,"" "%u" "", - TxtClass,BgColor,Ins->NumDpts); + TxtClassNormal,BgColor,Ins->NumDpts); /***** Institution status *****/ StatusTxt = Ins_GetStatusTxtFromStatusBits (Ins->Status); @@ -600,7 +600,7 @@ static void Ins_ListOneInstitutionForSeeing (struct Institution *Ins,unsigned Nu "%s" "" "", - TxtClass,BgColor,Txt_INSTITUTION_STATUS[StatusTxt]); + TxtClassNormal,BgColor,Txt_INSTITUTION_STATUS[StatusTxt]); Gbl.RowEvenOdd = 1 - Gbl.RowEvenOdd; } @@ -622,8 +622,7 @@ static void Ins_PutHeadInstitutionsForSeeing (bool OrderSelectable) Ins_InssOrderType_t Order; fprintf (Gbl.F.Out,"" - "" - ""); + ""); for (Order = Ins_ORDER_BY_INSTITUTION; Order <= Ins_ORDER_BY_NUM_USRS; Order++) diff --git a/swad_text.c b/swad_text.c index 004a992d4..ea50c6d5b 100644 --- a/swad_text.c +++ b/swad_text.c @@ -15205,17 +15205,17 @@ const char *Txt_Last_clicks_in_real_time = const char *Txt_Last_BR_year = // "Last academic year", the opposite to "First academic year" #if L==0 - "Últ..
curso"; // Necessita traduccio + "Último
curso"; // Necessita traduccio #elif L==1 "Last
year"; // Need Übersetzung #elif L==2 "Last
year"; #elif L==3 - "Últ..
curso"; + "Último
curso"; #elif L==4 "Last
year"; // Besoin de traduction #elif L==5 - "Últ..
curso"; // Okoteve traducción + "Último
curso"; // Okoteve traducción #elif L==6 "Ultimo
anno"; #elif L==7