diff --git a/swad_changelog.h b/swad_changelog.h index 81201c17..7e885d1c 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -487,12 +487,13 @@ enscript -2 --landscape --color --file-align=2 --highlight --line-numbers -o - * En OpenSWAD: ps2pdf source.ps destination.pdf */ -#define Log_PLATFORM_VERSION "SWAD 19.31.9 (2019-10-06)" +#define Log_PLATFORM_VERSION "SWAD 19.31.10 (2019-10-07)" #define CSS_FILE "swad19.29.css" #define JS_FILE "swad19.30.js" /* // TODO: Perico: poner un candado de bloqueo de creación/edición de proyectos (por ejemplo en asignaturas obsoletas) + Version 19.31.10: Oct 07, 2019 Code refactoring in HTML tables. (247106 lines) Version 19.31.9: Oct 06, 2019 Code refactoring in HTML tables. (247097 lines) Version 19.31.8: Oct 05, 2019 Code refactoring in HTML tables. (247089 lines) Version 19.31.7: Oct 05, 2019 Code refactoring in HTML tables. (247076 lines) diff --git a/swad_country.c b/swad_country.c index 508e49de..c8fce1fb 100644 --- a/swad_country.c +++ b/swad_country.c @@ -197,7 +197,7 @@ void Cty_SeeCtyWithPendingInss (void) fprintf (Gbl.F.Out,"" "%s", BgColor,row[1]); - Tbl_EndRow (); + Tbl_EndCell (); Tbl_EndRow (); Gbl.RowEvenOdd = 1 - Gbl.RowEvenOdd; @@ -327,12 +327,14 @@ static void Cty_Configuration (bool PrintView) /***** Country name (an link to WWW if exists) *****/ Tbl_StartRow (); + fprintf (Gbl.F.Out,"" - "%s:" - "" - "", + "%s:", The_ClassFormInBox[Gbl.Prefs.Theme], Txt_Country); + Tbl_EndCell (); + + fprintf (Gbl.F.Out,""); if (!PrintView && Gbl.Hierarchy.Cty.WWW[Gbl.Prefs.Language][0]) fprintf (Gbl.F.Out,"", Gbl.Hierarchy.Cty.WWW[Gbl.Prefs.Language]); @@ -340,66 +342,77 @@ static void Cty_Configuration (bool PrintView) if (!PrintView && Gbl.Hierarchy.Cty.WWW[Gbl.Prefs.Language][0]) fprintf (Gbl.F.Out,""); Tbl_EndCell (); + Tbl_EndRow (); /***** Link to the country inside platform *****/ Tbl_StartRow (); + fprintf (Gbl.F.Out,"" - "%s:" - "" - "" - "" - "%s/%s?cty=%ld" - "", + "%s:", The_ClassFormInBox[Gbl.Prefs.Theme], - Txt_Shortcut, + Txt_Shortcut); + Tbl_EndCell (); + + fprintf (Gbl.F.Out,"" + "" + "%s/%s?cty=%ld", Cfg_URL_SWAD_CGI, Lan_STR_LANG_ID[Gbl.Prefs.Language], Gbl.Hierarchy.Cty.CtyCod, Cfg_URL_SWAD_CGI, Lan_STR_LANG_ID[Gbl.Prefs.Language], Gbl.Hierarchy.Cty.CtyCod); + Tbl_EndCell (); + Tbl_EndRow (); if (PrintView) { /***** QR code with link to the country *****/ Tbl_StartRow (); + fprintf (Gbl.F.Out,"" - "%s:" - "" - "", + "%s:", The_ClassFormInBox[Gbl.Prefs.Theme], Txt_QR_code); + Tbl_EndCell (); + + fprintf (Gbl.F.Out,""); QR_LinkTo (250,"cty",Gbl.Hierarchy.Cty.CtyCod); Tbl_EndCell (); + Tbl_EndRow (); } else { /***** Number of users who claim to belong to this country *****/ Tbl_StartRow (); + fprintf (Gbl.F.Out,"" - "%s:" - "" - "" - "%u" - "", + "%s:", The_ClassFormInBox[Gbl.Prefs.Theme], - Txt_Users_of_the_country, + Txt_Users_of_the_country); + Tbl_EndCell (); + + fprintf (Gbl.F.Out,"" + "%u", Usr_GetNumUsrsWhoClaimToBelongToCty (Gbl.Hierarchy.Cty.CtyCod)); + Tbl_EndCell (); + Tbl_EndRow (); /***** Number of institutions *****/ Tbl_StartRow (); + fprintf (Gbl.F.Out,"" - "%s:" - "" - "", + "%s:", The_ClassFormInBox[Gbl.Prefs.Theme], Txt_Institutions); + Tbl_EndCell (); /* Form to go to see institutions of this country */ + fprintf (Gbl.F.Out,""); Frm_StartFormGoTo (ActSeeIns); Cty_PutParamCtyCod (Gbl.Hierarchy.Cty.CtyCod); snprintf (Gbl.Title,sizeof (Gbl.Title), @@ -409,47 +422,56 @@ static void Cty_Configuration (bool PrintView) fprintf (Gbl.F.Out,"%u", Ins_GetNumInssInCty (Gbl.Hierarchy.Cty.CtyCod)); Frm_EndForm (); - Tbl_EndCell (); + Tbl_EndRow (); /***** Number of centres *****/ Tbl_StartRow (); + fprintf (Gbl.F.Out,"" - "%s:" - "" - "" - "%u" - "", + "%s:", The_ClassFormInBox[Gbl.Prefs.Theme], - Txt_Centres, + Txt_Centres); + Tbl_EndCell (); + + fprintf (Gbl.F.Out,"" + "%u", Ctr_GetNumCtrsInCty (Gbl.Hierarchy.Cty.CtyCod)); + Tbl_EndCell (); + Tbl_EndRow (); /***** Number of degrees *****/ Tbl_StartRow (); + fprintf (Gbl.F.Out,"" - "%s:" - "" - "" - "%u" - "", + "%s:", The_ClassFormInBox[Gbl.Prefs.Theme], - Txt_Degrees, + Txt_Degrees); + Tbl_EndCell (); + + fprintf (Gbl.F.Out,"" + "%u", Deg_GetNumDegsInCty (Gbl.Hierarchy.Cty.CtyCod)); + Tbl_EndCell (); + Tbl_EndRow (); /***** Number of courses *****/ Tbl_StartRow (); + fprintf (Gbl.F.Out,"" - "%s:" - "" - "" - "%u" - "", + "%s:", The_ClassFormInBox[Gbl.Prefs.Theme], - Txt_Courses, + Txt_Courses); + Tbl_EndCell (); + + fprintf (Gbl.F.Out,"" + "%u", Crs_GetNumCrssInCty (Gbl.Hierarchy.Cty.CtyCod)); + Tbl_EndCell (); + Tbl_EndRow (); /***** Number of users in courses of this country *****/ @@ -486,16 +508,19 @@ static void Cty_ShowNumUsrsInCrssOfCty (Rol_Role_t Role) extern const char *Txt_ROLES_PLURAL_Abc[Rol_NUM_ROLES][Usr_NUM_SEXS]; Tbl_StartRow (); + fprintf (Gbl.F.Out,"" - "%s:" - "" - "" - "%u" - "", + "%s:", The_ClassFormInBox[Gbl.Prefs.Theme], (Role == Rol_UNK) ? Txt_Users_in_courses : - Txt_ROLES_PLURAL_Abc[Role][Usr_SEX_UNKNOWN], + Txt_ROLES_PLURAL_Abc[Role][Usr_SEX_UNKNOWN]); + Tbl_EndCell (); + + fprintf (Gbl.F.Out,"" + "%u", Usr_GetNumUsrsInCrssOfCty (Role,Gbl.Hierarchy.Cty.CtyCod)); + Tbl_EndCell (); + Tbl_EndRow (); } @@ -549,75 +574,93 @@ void Cty_ListCountries2 (void) /***** Separation row *****/ Tbl_StartRow (); fprintf (Gbl.F.Out,"" - " " - ""); + " "); + Tbl_EndCell (); Tbl_EndRow (); /***** Write users and institutions in other countries *****/ Tbl_StartRow (); + + fprintf (Gbl.F.Out,""); + Tbl_EndCell (); + + fprintf (Gbl.F.Out,"" + "%s", + Txt_Other_countries); + Tbl_EndCell (); + fprintf (Gbl.F.Out,"" - "" - "" - "%s" - "" - "" - "%u" - "" - "" - "%u" - "" - "" - "%u" - "" - "" - "%u" - "" - "" - "%u" - "" - "" - "%u" - "", - Txt_Other_countries, - Cty_GetNumUsrsWhoClaimToBelongToCty (0), - Ins_GetNumInssInCty (0), - Ctr_GetNumCtrsInCty (0), - Deg_GetNumDegsInCty (0), - Crs_GetNumCrssInCty (0), + "%u", + Cty_GetNumUsrsWhoClaimToBelongToCty (0)); + Tbl_EndCell (); + + fprintf (Gbl.F.Out,"" + "%u", + Ins_GetNumInssInCty (0)); + Tbl_EndCell (); + + fprintf (Gbl.F.Out,"" + "%u", + Ctr_GetNumCtrsInCty (0)); + Tbl_EndCell (); + + fprintf (Gbl.F.Out,"" + "%u", + Deg_GetNumDegsInCty (0)); + Tbl_EndCell (); + + fprintf (Gbl.F.Out,"" + "%u", + Crs_GetNumCrssInCty (0)); + Tbl_EndCell (); + + fprintf (Gbl.F.Out,"" + "%u", Usr_GetNumUsrsInCrssOfCty (Rol_TCH,0)); + Tbl_EndCell (); + Tbl_EndRow (); /***** Write users and institutions with unknown country *****/ Tbl_StartRow (); + + fprintf (Gbl.F.Out,""); + Tbl_EndCell (); + + fprintf (Gbl.F.Out,"" + "%s", + Txt_Country_unspecified); + Tbl_EndCell (); + fprintf (Gbl.F.Out,"" - "" - "" - "%s" - "" - "" - "%u" - "" - "" - "%u" - "" - "" - "%u" - "" - "" - "%u" - "" - "" - "%u" - "" - "" - "0" - "", - Txt_Country_unspecified, - Cty_GetNumUsrsWhoClaimToBelongToCty (-1L), - Ins_GetNumInssInCty (-1L), - Ctr_GetNumCtrsInCty (-1L), - Deg_GetNumDegsInCty (-1L), + "%u", + Cty_GetNumUsrsWhoClaimToBelongToCty (-1L)); + Tbl_EndCell (); + + fprintf (Gbl.F.Out,"" + "%u", + Ins_GetNumInssInCty (-1L)); + Tbl_EndCell (); + + fprintf (Gbl.F.Out,"" + "%u", + Ctr_GetNumCtrsInCty (-1L)); + Tbl_EndCell (); + + fprintf (Gbl.F.Out,"" + "%u", + Deg_GetNumDegsInCty (-1L)); + Tbl_EndCell (); + + fprintf (Gbl.F.Out,"" + "%u", Crs_GetNumCrssInCty (-1L)); + Tbl_EndCell (); + + fprintf (Gbl.F.Out,"" + "0"); + Tbl_EndCell (); + Tbl_EndRow (); /***** End table and box *****/ @@ -651,6 +694,7 @@ static void Cty_PutHeadCountriesForSeeing (bool OrderSelectable) Cty_Order_t Order; Tbl_StartRow (); + fprintf (Gbl.F.Out,""); for (Order = Cty_ORDER_BY_COUNTRY; Order <= Cty_ORDER_BY_NUM_USRS; @@ -698,6 +742,7 @@ static void Cty_PutHeadCountriesForSeeing (bool OrderSelectable) Txt_Courses_ABBREVIATION, Txt_ROLES_PLURAL_BRIEF_Abc[Rol_TCH], Txt_ROLES_PLURAL_BRIEF_Abc[Rol_STD]); + Tbl_EndRow (); } @@ -712,12 +757,13 @@ static void Cty_ListOneCountryForSeeing (struct Country *Cty,unsigned NumCty) BgColor = (Cty->CtyCod == Gbl.Hierarchy.Cty.CtyCod) ? "LIGHT_BLUE" : Gbl.ColorRows[Gbl.RowEvenOdd]; - /***** Number of country in this list *****/ Tbl_StartRow (); + + /***** Number of country in this list *****/ fprintf (Gbl.F.Out,"" - "%u" - "", + "%u", BgColor,NumCty); + Tbl_EndCell (); /***** Country map (and link to WWW if exists) *****/ fprintf (Gbl.F.Out,"",BgColor); @@ -729,29 +775,35 @@ static void Cty_ListOneCountryForSeeing (struct Country *Cty,unsigned NumCty) /* Write stats of this country */ fprintf (Gbl.F.Out,"" - "%u" - "" - "" - "%u" - "" - "" - "%u" - "" - "" - "%u" - "" - "" - "%u" - "" - "" - "%u" - "", - BgColor,Cty->NumUsrsWhoClaimToBelongToCty, - BgColor,Cty->Inss.Num, - BgColor,Cty->NumCtrs, - BgColor,Cty->NumDegs, - BgColor,Cty->NumCrss, + "%u", + BgColor,Cty->NumUsrsWhoClaimToBelongToCty); + Tbl_EndCell (); + + fprintf (Gbl.F.Out,"" + "%u", + BgColor,Cty->Inss.Num); + Tbl_EndCell (); + + fprintf (Gbl.F.Out,"" + "%u", + BgColor,Cty->NumCtrs); + Tbl_EndCell (); + + fprintf (Gbl.F.Out,"" + "%u", + BgColor,Cty->NumDegs); + Tbl_EndCell (); + + fprintf (Gbl.F.Out,"" + "%u", + BgColor,Cty->NumCrss); + Tbl_EndCell (); + + fprintf (Gbl.F.Out,"" + "%u", BgColor,Cty->NumUsrs); + Tbl_EndCell (); + Tbl_EndRow (); Gbl.RowEvenOdd = 1 - Gbl.RowEvenOdd; @@ -1631,29 +1683,29 @@ static void Cty_ListCountriesForEdition (void) /* Numerical country code (ISO 3166-1) */ fprintf (Gbl.F.Out,"" - "%03ld" - "", + "%03ld", 1 + Lan_NUM_LANGUAGES,Cty->CtyCod); + Tbl_EndCell (); /* Alphabetic country code with 2 letters (ISO 3166-1) */ fprintf (Gbl.F.Out,"" - "%s" - "", + "%s", 1 + Lan_NUM_LANGUAGES,Cty->Alpha2); + Tbl_EndCell (); Tbl_PutEmptyCells (3); /* Number of users */ fprintf (Gbl.F.Out,"" - "%u" - "", + "%u", 1 + Lan_NUM_LANGUAGES,Cty->NumUsrsWhoClaimToBelongToCty); + Tbl_EndCell (); /* Number of institutions */ fprintf (Gbl.F.Out,"" - "%u" - "", + "%u", 1 + Lan_NUM_LANGUAGES,Cty->Inss.Num); + Tbl_EndCell (); Tbl_EndRow (); @@ -1666,9 +1718,9 @@ static void Cty_ListCountriesForEdition (void) /* Language */ fprintf (Gbl.F.Out,"" - "%s:" - "", + "%s:", Txt_STR_LANG_NAME[Lan]); + Tbl_EndCell (); /* Name */ fprintf (Gbl.F.Out,""); @@ -2054,8 +2106,9 @@ static void Cty_PutFormToCreateCountry (void) Tbl_StartRow (); /***** Column to remove country, disabled here *****/ - fprintf (Gbl.F.Out,"", + fprintf (Gbl.F.Out,"", 1 + Lan_NUM_LANGUAGES); + Tbl_EndCell (); /***** Numerical country code (ISO 3166-1) *****/ fprintf (Gbl.F.Out,"" @@ -2064,30 +2117,30 @@ static void Cty_PutFormToCreateCountry (void) 1 + Lan_NUM_LANGUAGES); if (Cty_EditingCty->CtyCod > 0) fprintf (Gbl.F.Out,"%03ld",Cty_EditingCty->CtyCod); - fprintf (Gbl.F.Out,"\" required=\"required\" />" - ""); + fprintf (Gbl.F.Out,"\" required=\"required\" />"); + Tbl_EndCell (); /***** Alphabetic country code with 2 letters (ISO 3166-1) *****/ fprintf (Gbl.F.Out,"" "" - "", + " required=\"required\" />", 1 + Lan_NUM_LANGUAGES,Cty_EditingCty->Alpha2); + Tbl_EndCell (); Tbl_PutEmptyCells (3); /***** Number of users *****/ fprintf (Gbl.F.Out,"" - "0" - "", + "0", 1 + Lan_NUM_LANGUAGES); + Tbl_EndCell (); /***** Number of institutions *****/ fprintf (Gbl.F.Out,"" - "0" - "", + "0", 1 + Lan_NUM_LANGUAGES); + Tbl_EndCell (); Tbl_EndRow (); @@ -2100,29 +2153,29 @@ static void Cty_PutFormToCreateCountry (void) /* Language */ fprintf (Gbl.F.Out,"" - "%s" - "", + "%s", Txt_STR_LANG_NAME[Lan]); + Tbl_EndCell (); /* Name */ fprintf (Gbl.F.Out,"" "" - "", + " required=\"required\" />", Lan_STR_LANG_ID[Lan], Cty_MAX_CHARS_NAME, Cty_EditingCty->Name[Lan]); + Tbl_EndCell (); /* WWW */ fprintf (Gbl.F.Out,"" "" - "", + " class=\"INPUT_WWW\" />", Lan_STR_LANG_ID[Lan], Cns_MAX_CHARS_WWW, Cty_EditingCty->WWW[Lan]); + Tbl_EndCell (); Tbl_EndRow (); } @@ -2148,6 +2201,7 @@ static void Cty_PutHeadCountriesForEdition (void) extern const char *Txt_Institutions_ABBREVIATION; Tbl_StartRow (); + fprintf (Gbl.F.Out,"" "" "%s" @@ -2174,6 +2228,7 @@ static void Cty_PutHeadCountriesForEdition (void) Txt_WWW, Txt_Users, Txt_Institutions_ABBREVIATION); + Tbl_EndRow (); } diff --git a/swad_course.c b/swad_course.c index 5b78bcf0..8ad00f8b 100644 --- a/swad_course.c +++ b/swad_course.c @@ -239,12 +239,14 @@ static void Crs_Configuration (bool PrintView) /***** Degree *****/ Tbl_StartRow (); + fprintf (Gbl.F.Out,"" - "" - "" - "", + "", The_ClassFormInBox[Gbl.Prefs.Theme], Txt_Degree); + Tbl_EndCell (); + + fprintf (Gbl.F.Out,""); if (!PrintView && Gbl.Usrs.Me.Role.Logged >= Rol_CTR_ADM) @@ -277,16 +279,19 @@ static void Crs_Configuration (bool PrintView) fprintf (Gbl.F.Out,"%s",Gbl.Hierarchy.Deg.FullName); Tbl_EndCell (); + Tbl_EndRow (); /***** Course full name *****/ Tbl_StartRow (); + fprintf (Gbl.F.Out,"" - "" - "" - "", + "", The_ClassFormInBox[Gbl.Prefs.Theme], Txt_Course); + Tbl_EndCell (); + + fprintf (Gbl.F.Out,""); if (!PrintView && Gbl.Usrs.Me.Role.Logged >= Rol_DEG_ADM) // Only degree admins, centre admins, institution admins and system admins can edit course full name @@ -306,16 +311,21 @@ static void Crs_Configuration (bool PrintView) else // I can not edit course full name fprintf (Gbl.F.Out,"%s",Gbl.Hierarchy.Crs.FullName); Tbl_EndCell (); + Tbl_EndRow (); /***** Course short name *****/ Tbl_StartRow (); + fprintf (Gbl.F.Out,"" - "" - "" - "", + "", The_ClassFormInBox[Gbl.Prefs.Theme], Txt_Short_name); + Tbl_EndCell (); + + Tbl_EndRow (); + + fprintf (Gbl.F.Out,""); if (!PrintView && Gbl.Usrs.Me.Role.Logged >= Rol_DEG_ADM) // Only degree admins, centre admins, institution admins and system admins can edit course short name @@ -340,12 +350,14 @@ static void Crs_Configuration (bool PrintView) /***** Course year *****/ IsForm = (!PrintView && Gbl.Usrs.Me.Role.Logged >= Rol_TCH); Tbl_StartRow (); + fprintf (Gbl.F.Out,"" - "" - "" - "", + "", The_ClassFormInBox[Gbl.Prefs.Theme], Txt_Year_OF_A_DEGREE); + Tbl_EndRow (); + + fprintf (Gbl.F.Out,""); if (IsForm) { Frm_StartForm (ActChgCrsYeaCfg); @@ -374,12 +386,14 @@ static void Crs_Configuration (bool PrintView) { /***** Institutional code of the course *****/ Tbl_StartRow (); + fprintf (Gbl.F.Out,"" - "" - "" - "", + "", The_ClassFormInBox[Gbl.Prefs.Theme], Txt_Institutional_code); + Tbl_EndRow (); + + fprintf (Gbl.F.Out,""); if (IsForm) { Frm_StartForm (ActChgInsCrsCodCfg); @@ -400,29 +414,33 @@ static void Crs_Configuration (bool PrintView) /***** Internal code of the course *****/ Tbl_StartRow (); + fprintf (Gbl.F.Out,"" - "%s:" - "" - "" - "%ld" - "", + "%s:", The_ClassFormInBox[Gbl.Prefs.Theme], - Txt_Internal_code, + Txt_Internal_code); + Tbl_EndRow (); + + fprintf (Gbl.F.Out,"" + "%ld", Gbl.Hierarchy.Crs.CrsCod); Tbl_EndRow (); + + Tbl_EndRow (); } /***** Link to the course *****/ Tbl_StartRow (); + fprintf (Gbl.F.Out,"" - "%s:" - "" - "" - "" - "%s/%s?crs=%ld" - "", + "%s:", The_ClassFormInBox[Gbl.Prefs.Theme], - Txt_Shortcut, + Txt_Shortcut); + Tbl_EndRow (); + + fprintf (Gbl.F.Out,"" + "" + "%s/%s?crs=%ld", Cfg_URL_SWAD_CGI, Lan_STR_LANG_ID[Gbl.Prefs.Language], Gbl.Hierarchy.Crs.CrsCod, @@ -431,18 +449,23 @@ static void Crs_Configuration (bool PrintView) Gbl.Hierarchy.Crs.CrsCod); Tbl_EndRow (); + Tbl_EndRow (); + if (PrintView) { /***** QR code with link to the course *****/ Tbl_StartRow (); + fprintf (Gbl.F.Out,"" - "%s:" - "" - "", + "%s:", The_ClassFormInBox[Gbl.Prefs.Theme], Txt_QR_code); + Tbl_EndRow (); + + fprintf (Gbl.F.Out,""); QR_LinkTo (250,"crs",Gbl.Hierarchy.Crs.CrsCod); Tbl_EndCell (); + Tbl_EndRow (); } else @@ -457,12 +480,14 @@ static void Crs_Configuration (bool PrintView) Ind_ComputeAndStoreIndicatorsCrs (Gbl.Hierarchy.Crs.CrsCod, NumIndicatorsFromDB,&Indicators); Tbl_StartRow (); + fprintf (Gbl.F.Out,"" - "%s:" - "" - "", + "%s:", The_ClassFormInBox[Gbl.Prefs.Theme], Txt_Indicators); + Tbl_EndRow (); + + fprintf (Gbl.F.Out,""); Frm_StartForm (ActReqStaCrs); snprintf (Gbl.Title,sizeof (Gbl.Title), "%u %s %u", @@ -508,16 +533,19 @@ static void Crs_ShowNumUsrsInCrs (Rol_Role_t Role) extern const char *Txt_ROLES_PLURAL_Abc[Rol_NUM_ROLES][Usr_NUM_SEXS]; Tbl_StartRow (); + fprintf (Gbl.F.Out,"" - "%s:" - "" - "" - "%u" - "", + "%s:", The_ClassFormInBox[Gbl.Prefs.Theme], - Txt_ROLES_PLURAL_Abc[Role][Usr_SEX_UNKNOWN], + Txt_ROLES_PLURAL_Abc[Role][Usr_SEX_UNKNOWN]); + Tbl_EndRow (); + + fprintf (Gbl.F.Out,"" + "%u", Gbl.Hierarchy.Crs.NumUsrs[Role]); Tbl_EndRow (); + + Tbl_EndRow (); } /*****************************************************************************/ @@ -1272,30 +1300,31 @@ static bool Crs_ListCoursesOfAYearForSeeing (unsigned Year) BgColor = (Usr_CheckIfIBelongToCrs (Crs->CrsCod)) ? "LIGHT_BLUE" : Gbl.ColorRows[Gbl.RowEvenOdd]; - /* Put green tip if course has users */ Tbl_StartRow (); + + /* Put green tip if course has users */ fprintf (Gbl.F.Out,"" - "%s" - "", + "%s", TxtClassNormal,BgColor, Crs->NumUsrs[Rol_UNK] ? Txt_COURSE_With_users : Txt_COURSE_Without_users, Crs->NumUsrs[Rol_UNK] ? "✓" : " "); + Tbl_EndRow (); /* Institutional code of the course */ fprintf (Gbl.F.Out,"" - "%s" - "", + "%s", TxtClassNormal,BgColor, Crs->InstitutionalCrsCod); + Tbl_EndRow (); /* Course year */ fprintf (Gbl.F.Out,"" - "%s" - "", + "%s", TxtClassNormal,BgColor, Txt_YEAR_OF_DEGREE[Crs->Year]); + Tbl_EndRow (); /* Course full name */ fprintf (Gbl.F.Out,"", @@ -1313,18 +1342,18 @@ static bool Crs_ListCoursesOfAYearForSeeing (unsigned Year) /* Current number of teachers in this course */ fprintf (Gbl.F.Out,"" - "%u" - "", + "%u", TxtClassNormal,BgColor, Crs->NumUsrs[Rol_TCH] + Crs->NumUsrs[Rol_NET]); + Tbl_EndRow (); /* Current number of students in this course */ fprintf (Gbl.F.Out,"" - "%u" - "", + "%u", TxtClassNormal,BgColor, Crs->NumUsrs[Rol_STD]); + Tbl_EndRow (); /* Course status */ StatusTxt = Crs_GetStatusTxtFromStatusBits (Crs->Status); @@ -1489,9 +1518,9 @@ static void Crs_ListCoursesOfAYearForEdition (unsigned Year) /* Course code */ fprintf (Gbl.F.Out,"" - "%ld" - "", + "%ld", Crs->CrsCod); + Tbl_EndRow (); /* Institutional code of the course */ fprintf (Gbl.F.Out,""); @@ -1575,16 +1604,16 @@ static void Crs_ListCoursesOfAYearForEdition (unsigned Year) /* Current number of teachers in this course */ fprintf (Gbl.F.Out,"" - "%u" - "", + "%u", Crs->NumUsrs[Rol_TCH] + Crs->NumUsrs[Rol_NET]); + Tbl_EndRow (); /* Current number of students in this course */ fprintf (Gbl.F.Out,"" - "%u" - "", + "%u", Crs->NumUsrs[Rol_STD]); + Tbl_EndRow (); /* Course requester */ UsrDat.UsrCod = Crs->RequesterUsrCod; @@ -1703,21 +1732,24 @@ static void Crs_PutFormToCreateCourse (void) /***** Write heading *****/ Crs_PutHeadCoursesForEdition (); - /***** Column to remove course, disabled here *****/ Tbl_StartRow (); - fprintf (Gbl.F.Out,""); + + /***** Column to remove course, disabled here *****/ + fprintf (Gbl.F.Out,""); + Tbl_EndRow (); /***** Course code *****/ - fprintf (Gbl.F.Out,""); + fprintf (Gbl.F.Out,""); + Tbl_EndRow (); /***** Institutional code of the course *****/ fprintf (Gbl.F.Out,"" "" - "", + " class=\"INPUT_INS_CODE\" />", Crs_MAX_CHARS_INSTITUTIONAL_CRS_COD, Crs_EditingCrs->InstitutionalCrsCod); + Tbl_EndRow (); /***** Year *****/ fprintf (Gbl.F.Out,"" @@ -1730,36 +1762,36 @@ static void Crs_PutFormToCreateCourse (void) Year == Crs_EditingCrs->Year ? " selected=\"selected\"" : "", Txt_YEAR_OF_DEGREE[Year]); - fprintf (Gbl.F.Out,"" - ""); + fprintf (Gbl.F.Out,""); + Tbl_EndRow (); /***** Course short name *****/ fprintf (Gbl.F.Out,"" "" - "", + " required=\"required\" />", Hie_MAX_CHARS_SHRT_NAME,Crs_EditingCrs->ShrtName); + Tbl_EndRow (); /***** Course full name *****/ fprintf (Gbl.F.Out,"" "" - "", + " required=\"required\" />", Hie_MAX_CHARS_FULL_NAME,Crs_EditingCrs->FullName); + Tbl_EndRow (); /***** Current number of teachers in this course *****/ fprintf (Gbl.F.Out,"" - "0" - ""); + "0"); + Tbl_EndRow (); /***** Current number of students in this course *****/ fprintf (Gbl.F.Out,"" - "0" - ""); + "0"); + Tbl_EndRow (); /***** Course requester *****/ fprintf (Gbl.F.Out,""); @@ -1767,8 +1799,9 @@ static void Crs_PutFormToCreateCourse (void) Tbl_EndCell (); /***** Course status *****/ - fprintf (Gbl.F.Out,"" - ""); + fprintf (Gbl.F.Out,""); + Tbl_EndRow (); + Tbl_EndRow (); /***** End table, send button and end box *****/ @@ -3283,20 +3316,20 @@ static void Crs_WriteRowCrsData (unsigned NumCrs,MYSQL_ROW row,bool WriteColumnA { Accepted = (row[7][0] == 'Y'); fprintf (Gbl.F.Out,"" - "%s" - "", + "%s", BgColor, Accepted ? Txt_Enrolment_confirmed : Txt_Enrolment_not_confirmed, Accepted ? "✓" : "✗"); + Tbl_EndRow (); } /***** Write number of course in this search *****/ fprintf (Gbl.F.Out,"" - "%u" - "", + "%u", StyleNoBR,BgColor,NumCrs); + Tbl_EndRow (); /***** Write degree logo, degree short name (row[2]) and centre short name (row[6]) *****/ @@ -3317,9 +3350,9 @@ static void Crs_WriteRowCrsData (unsigned NumCrs,MYSQL_ROW row,bool WriteColumnA /***** Write year (row[4]) *****/ fprintf (Gbl.F.Out,"" - "%s" - "", + "%s", Style,BgColor,Txt_YEAR_OF_DEGREE[Deg_ConvStrToYear (row[4])]); + Tbl_EndRow (); /***** Write course full name (row[5]) *****/ fprintf (Gbl.F.Out,"", @@ -3336,17 +3369,18 @@ static void Crs_WriteRowCrsData (unsigned NumCrs,MYSQL_ROW row,bool WriteColumnA /***** Write number of teachers in course *****/ fprintf (Gbl.F.Out,"" - "%u" - "", + "%u", Style,BgColor,NumTchs); + Tbl_EndRow (); /***** Write number of students in course *****/ fprintf (Gbl.F.Out,"" - "%u" - "", + "%u", Style,BgColor,NumStds); Tbl_EndRow (); + Tbl_EndRow (); + RowEvenOdd = 1 - RowEvenOdd; } diff --git a/swad_date.c b/swad_date.c index 48394a52..8aba614c 100644 --- a/swad_date.c +++ b/swad_date.c @@ -427,16 +427,17 @@ void Dat_PutFormStartEndClientLocalDateTimesWithYesterdayToday (bool SetHMS00000 extern const char *Txt_Yesterday; extern const char *Txt_Today; - /***** Start date-time *****/ Tbl_StartRow (); + + /***** Start date-time *****/ fprintf (Gbl.F.Out,"" - "" - "" - "", + "", The_ClassFormInBox[Gbl.Prefs.Theme], Txt_START_END_TIME[Dat_START_TIME]); + Tbl_EndCell (); /* Date-time */ + fprintf (Gbl.F.Out,""); Dat_WriteFormClientLocalDateTimeFromTimeUTC ("Start", "Start", Gbl.DateRange.TimeUTC[0], @@ -446,28 +447,30 @@ void Dat_PutFormStartEndClientLocalDateTimesWithYesterdayToday (bool SetHMS00000 SetHMS000000To235959 ? Dat_HMS_TO_000000 : // Set hour, minute and second to 00:00:00 Dat_HMS_DO_NOT_SET, // Don't set hour, minute and second to 00:00:00 false); // Don't submit on change + Tbl_EndCell (); /***** "Yesterday" and "Today" buttons *****/ - fprintf (Gbl.F.Out,"" - "" + fprintf (Gbl.F.Out,"" "" "" - "", + " onclick=\"setDateToToday('Start','End');\" />", Txt_Yesterday, Txt_Today); + Tbl_EndCell (); + Tbl_EndRow (); + Tbl_StartRow (); /***** End date-time *****/ - Tbl_StartRow (); fprintf (Gbl.F.Out,"" - "" - "" - "", + "", The_ClassFormInBox[Gbl.Prefs.Theme], Txt_START_END_TIME[Dat_END_TIME]); + Tbl_EndCell (); + /* Date-time */ + fprintf (Gbl.F.Out,""); Dat_WriteFormClientLocalDateTimeFromTimeUTC ("End", "End", Gbl.DateRange.TimeUTC[1], @@ -478,6 +481,7 @@ void Dat_PutFormStartEndClientLocalDateTimesWithYesterdayToday (bool SetHMS00000 Dat_HMS_DO_NOT_SET, // Don't set hour, minute and second false); // Don't submit on change Tbl_EndCell (); + Tbl_EndRow (); } @@ -503,12 +507,14 @@ void Dat_PutFormStartEndClientLocalDateTimes (time_t TimeUTC[2], { /* Date-time */ Tbl_StartRow (); + fprintf (Gbl.F.Out,"" - "" - "" - "", + "", The_ClassFormInBox[Gbl.Prefs.Theme], Txt_START_END_TIME[StartEndTime]); + Tbl_EndCell (); + + fprintf (Gbl.F.Out,""); Dat_WriteFormClientLocalDateTimeFromTimeUTC (Id[StartEndTime], Id[StartEndTime], TimeUTC[StartEndTime], @@ -518,6 +524,7 @@ void Dat_PutFormStartEndClientLocalDateTimes (time_t TimeUTC[2], Dat_HMS_DO_NOT_SET, // Don't set hour, minute and second false); // Don't submit on change Tbl_EndCell (); + Tbl_EndRow (); } } @@ -569,8 +576,8 @@ void Dat_WriteFormClientLocalDateTimeFromTimeUTC (const char *Id, Year++) fprintf (Gbl.F.Out,"", Year,Year); - fprintf (Gbl.F.Out,"" - ""); + fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /***** Month *****/ fprintf (Gbl.F.Out,"" @@ -588,8 +595,8 @@ void Dat_WriteFormClientLocalDateTimeFromTimeUTC (const char *Id, Month++) fprintf (Gbl.F.Out,"", Month,Txt_MONTHS_SMALL[Month - 1]); - fprintf (Gbl.F.Out,"" - ""); + fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /***** Day *****/ fprintf (Gbl.F.Out,"" @@ -605,8 +612,8 @@ void Dat_WriteFormClientLocalDateTimeFromTimeUTC (const char *Id, Day++) fprintf (Gbl.F.Out,"", Day,Day); - fprintf (Gbl.F.Out,"" - ""); + fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /***** Hour *****/ fprintf (Gbl.F.Out,"" @@ -622,8 +629,8 @@ void Dat_WriteFormClientLocalDateTimeFromTimeUTC (const char *Id, Hour++) fprintf (Gbl.F.Out,"", Hour,Hour); - fprintf (Gbl.F.Out,"" - ""); + fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /***** Minute *****/ fprintf (Gbl.F.Out,"" @@ -641,8 +648,8 @@ void Dat_WriteFormClientLocalDateTimeFromTimeUTC (const char *Id, fprintf (Gbl.F.Out,"", Minute,Minute); - fprintf (Gbl.F.Out,"" - ""); + fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /***** Second *****/ if (FormSeconds == Dat_FORM_SECONDS_ON) @@ -660,8 +667,8 @@ void Dat_WriteFormClientLocalDateTimeFromTimeUTC (const char *Id, Second++) fprintf (Gbl.F.Out,"", Second,Second); - fprintf (Gbl.F.Out,"" - ""); + fprintf (Gbl.F.Out,""); + Tbl_EndCell (); } /***** End table *****/ @@ -842,8 +849,8 @@ void Dat_WriteFormDate (unsigned FirstYear,unsigned LastYear, fprintf (Gbl.F.Out," selected=\"selected\""); fprintf (Gbl.F.Out,">%u",Year); } - fprintf (Gbl.F.Out,"" - ""); + fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /***** Month *****/ fprintf (Gbl.F.Out,"" @@ -866,8 +873,8 @@ void Dat_WriteFormDate (unsigned FirstYear,unsigned LastYear, fprintf (Gbl.F.Out," selected=\"selected\""); fprintf (Gbl.F.Out,">%s",Txt_MONTHS_SMALL[Month - 1]); } - fprintf (Gbl.F.Out,"" - ""); + fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /***** Day *****/ fprintf (Gbl.F.Out,"" @@ -891,8 +898,8 @@ void Dat_WriteFormDate (unsigned FirstYear,unsigned LastYear, fprintf (Gbl.F.Out," selected=\"selected\""); fprintf (Gbl.F.Out,">%u",Day); } - fprintf (Gbl.F.Out,"" - ""); + fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /***** End table *****/ Tbl_EndRow (); diff --git a/swad_degree.c b/swad_degree.c index 65ebbef8..42df2a73 100644 --- a/swad_degree.c +++ b/swad_degree.c @@ -212,8 +212,9 @@ void Deg_SeeDegWithPendingCrss (void) /* Get data of degree */ Deg_GetDataOfDegreeByCod (&Deg); - /* Degree logo and full name */ Tbl_StartRow (); + + /* Degree logo and full name */ fprintf (Gbl.F.Out,"", BgColor); Deg_DrawDegreeLogoAndNameWithLink (&Deg,ActSeeCrs, @@ -222,9 +223,10 @@ void Deg_SeeDegWithPendingCrss (void) /* Number of pending courses (row[1]) */ fprintf (Gbl.F.Out,"" - "%s" - "", + "%s", BgColor,row[1]); + Tbl_EndCell (); + Tbl_EndRow (); Gbl.RowEvenOdd = 1 - Gbl.RowEvenOdd; @@ -343,13 +345,14 @@ static void Deg_Configuration (bool PrintView) /***** Centre *****/ Tbl_StartRow (); + fprintf (Gbl.F.Out,"" - "" - "" - "", + "", The_ClassFormInBox[Gbl.Prefs.Theme], Txt_Centre); + Tbl_EndCell (); + fprintf (Gbl.F.Out,""); if (!PrintView && Gbl.Usrs.Me.Role.Logged >= Rol_INS_ADM) // Only institution admins and system admin can move a degree to another centre @@ -379,18 +382,19 @@ static void Deg_Configuration (bool PrintView) } else // I can not move degree to another centre fprintf (Gbl.F.Out,"%s",Gbl.Hierarchy.Ctr.FullName); - Tbl_EndCell (); + Tbl_EndRow (); /***** Degree full name *****/ Tbl_StartRow (); fprintf (Gbl.F.Out,"" - "" - "" - "", + "", The_ClassFormInBox[Gbl.Prefs.Theme], Txt_Degree); + Tbl_EndCell (); + + fprintf (Gbl.F.Out,""); if (!PrintView && Gbl.Usrs.Me.Role.Logged >= Rol_CTR_ADM) // Only centre admins, institution admins and system admins @@ -416,11 +420,11 @@ static void Deg_Configuration (bool PrintView) /***** Degree short name *****/ Tbl_StartRow (); fprintf (Gbl.F.Out,"" - "" - "" - "", + "", The_ClassFormInBox[Gbl.Prefs.Theme], Txt_Short_name); + fprintf (Gbl.F.Out,"" + ""); if (!PrintView && Gbl.Usrs.Me.Role.Logged >= Rol_CTR_ADM) // Only centre admins, institution admins and system admins @@ -446,11 +450,12 @@ static void Deg_Configuration (bool PrintView) /***** Degree WWW *****/ Tbl_StartRow (); fprintf (Gbl.F.Out,"" - "" - "" - "", + "", The_ClassFormInBox[Gbl.Prefs.Theme], Txt_Web); + Tbl_EndCell (); + + fprintf (Gbl.F.Out,""); if (!PrintView && Gbl.Usrs.Me.Role.Logged >= Rol_DEG_ADM) // Only degree admins, centre admins, institution admins @@ -480,50 +485,58 @@ static void Deg_Configuration (bool PrintView) /***** Shortcut to the degree *****/ Tbl_StartRow (); + fprintf (Gbl.F.Out,"" - "%s:" - "" - "" + "%s:", + The_ClassFormInBox[Gbl.Prefs.Theme], + Txt_Shortcut); + Tbl_EndCell (); + + fprintf (Gbl.F.Out,"" "" "%s/%s?deg=%ld" - "" - "", - The_ClassFormInBox[Gbl.Prefs.Theme], - Txt_Shortcut, + "", Cfg_URL_SWAD_CGI, Lan_STR_LANG_ID[Gbl.Prefs.Language], Gbl.Hierarchy.Deg.DegCod, Cfg_URL_SWAD_CGI, Lan_STR_LANG_ID[Gbl.Prefs.Language], Gbl.Hierarchy.Deg.DegCod); + Tbl_EndCell (); + Tbl_EndRow (); if (PrintView) { /***** QR code with link to the degree *****/ Tbl_StartRow (); + fprintf (Gbl.F.Out,"" - "%s:" - "" - "", + "%s:", The_ClassFormInBox[Gbl.Prefs.Theme], Txt_QR_code); + Tbl_EndCell (); + + fprintf (Gbl.F.Out,""); QR_LinkTo (250,"deg",Gbl.Hierarchy.Deg.DegCod); Tbl_EndCell (); + Tbl_EndRow (); } else { /***** Number of courses *****/ Tbl_StartRow (); + fprintf (Gbl.F.Out,"" - "%s:" - "" - "", + "%s:", The_ClassFormInBox[Gbl.Prefs.Theme], Txt_Courses); + Tbl_EndCell (); + /* Form to go to see courses of this degree */ + fprintf (Gbl.F.Out,""); Frm_StartFormGoTo (ActSeeCrs); Deg_PutParamDegCod (Gbl.Hierarchy.Deg.DegCod); snprintf (Gbl.Title,sizeof (Gbl.Title), @@ -533,8 +546,8 @@ static void Deg_Configuration (bool PrintView) fprintf (Gbl.F.Out,"%u", Crs_GetNumCrssInDeg (Gbl.Hierarchy.Deg.DegCod)); Frm_EndForm (); - Tbl_EndCell (); + Tbl_EndRow (); /***** Number of users *****/ @@ -578,16 +591,19 @@ static void Deg_ShowNumUsrsInCrssOfDeg (Rol_Role_t Role) extern const char *Txt_ROLES_PLURAL_Abc[Rol_NUM_ROLES][Usr_NUM_SEXS]; Tbl_StartRow (); + fprintf (Gbl.F.Out,"" - "%s:" - "" - "" - "%u" - "", + "%s:", The_ClassFormInBox[Gbl.Prefs.Theme], (Role == Rol_UNK) ? Txt_Users_in_courses : - Txt_ROLES_PLURAL_Abc[Role][Usr_SEX_UNKNOWN], + Txt_ROLES_PLURAL_Abc[Role][Usr_SEX_UNKNOWN]); + Tbl_EndCell (); + + fprintf (Gbl.F.Out,"" + "%u", Usr_GetNumUsrsInCrssOfDeg (Role,Gbl.Hierarchy.Deg.DegCod)); + Tbl_EndCell (); + Tbl_EndRow (); } @@ -736,9 +752,9 @@ static void Deg_ListDegreesForEdition (void) /* Degree code */ fprintf (Gbl.F.Out,"" - "%ld" - "", + "%ld", Deg->DegCod); + Tbl_EndCell (); /* Degree logo */ fprintf (Gbl.F.Out,"", @@ -841,9 +857,9 @@ static void Deg_ListDegreesForEdition (void) /* Current number of courses in this degree */ fprintf (Gbl.F.Out,"" - "%u" - "", + "%u", NumCrss); + Tbl_EndCell (); /* Degree requester */ UsrDat.UsrCod = Deg->RequesterUsrCod; @@ -964,12 +980,15 @@ static void Deg_PutFormToCreateDegree (void) /***** Write heading *****/ Deg_PutHeadDegreesForEdition (); - /***** Column to remove degree, disabled here *****/ Tbl_StartRow (); - fprintf (Gbl.F.Out,""); + + /***** Column to remove degree, disabled here *****/ + fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /***** Degree code *****/ - fprintf (Gbl.F.Out,""); + fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /***** Degree logo *****/ fprintf (Gbl.F.Out,""); @@ -981,18 +1000,18 @@ static void Deg_PutFormToCreateDegree (void) "" - "", + " required=\"required\" />", Hie_MAX_CHARS_SHRT_NAME,Deg_EditingDeg->ShrtName); + Tbl_EndCell (); /***** Degree full name *****/ fprintf (Gbl.F.Out,"" "" - "", + " required=\"required\" />", Hie_MAX_CHARS_FULL_NAME,Deg_EditingDeg->FullName); + Tbl_EndCell (); /***** Degree type *****/ fprintf (Gbl.F.Out,"" @@ -1008,22 +1027,22 @@ static void Deg_PutFormToCreateDegree (void) "", DegTyp->DegTypName); } - fprintf (Gbl.F.Out,"" - ""); + fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /***** Degree WWW *****/ fprintf (Gbl.F.Out,"" "" - "", + " required=\"required\" />", Cns_MAX_CHARS_WWW,Deg_EditingDeg->WWW); + Tbl_EndCell (); /***** Current number of courses in this degree *****/ fprintf (Gbl.F.Out,"" - "0" - ""); + "0"); + Tbl_EndCell (); /***** Degree requester *****/ fprintf (Gbl.F.Out,""); @@ -1031,8 +1050,9 @@ static void Deg_PutFormToCreateDegree (void) Tbl_EndCell (); /***** Degree status *****/ - fprintf (Gbl.F.Out,"" - ""); + fprintf (Gbl.F.Out,""); + Tbl_EndCell (); + Tbl_EndRow (); /***** End table, send button and end box *****/ @@ -1284,23 +1304,24 @@ static void Deg_ListOneDegreeForSeeing (struct Degree *Deg,unsigned NumDeg) BgColor = (Deg->DegCod == Gbl.Hierarchy.Deg.DegCod) ? "LIGHT_BLUE" : Gbl.ColorRows[Gbl.RowEvenOdd]; - /***** Put tip if degree has courses *****/ Tbl_StartRow (); + + /***** Put tip if degree has courses *****/ fprintf (Gbl.F.Out,"" - "%s" - "", + "%s", TxtClassNormal,BgColor, NumCrss ? Txt_DEGREE_With_courses : Txt_DEGREE_Without_courses, NumCrss ? "✓" : " "); + Tbl_EndCell (); /***** Number of degree in this list *****/ fprintf (Gbl.F.Out,"" - "%u" - "", + "%u", TxtClassNormal,BgColor, NumDeg); + Tbl_EndCell (); /***** Degree logo and name *****/ fprintf (Gbl.F.Out,"",BgColor); @@ -1310,15 +1331,15 @@ static void Deg_ListOneDegreeForSeeing (struct Degree *Deg,unsigned NumDeg) /***** Type of degree *****/ fprintf (Gbl.F.Out,"" - "%s" - "", + "%s", TxtClassNormal,BgColor,DegTyp.DegTypName); + Tbl_EndCell (); /***** Current number of courses in this degree *****/ fprintf (Gbl.F.Out,"" - "%u" - "", + "%u", TxtClassNormal,BgColor,NumCrss); + Tbl_EndCell (); /***** Degree status *****/ StatusTxt = Deg_GetStatusTxtFromStatusBits (Deg->Status); @@ -1327,6 +1348,7 @@ static void Deg_ListOneDegreeForSeeing (struct Degree *Deg,unsigned NumDeg) if (StatusTxt != Deg_STATUS_ACTIVE) // If active ==> do not show anything fprintf (Gbl.F.Out,"%s",Txt_DEGREE_STATUS[StatusTxt]); Tbl_EndCell (); + Tbl_EndRow (); Gbl.RowEvenOdd = 1 - Gbl.RowEvenOdd; @@ -2521,16 +2543,17 @@ void Hie_GetAndWriteInsCtrDegAdminBy (long UsrCod,unsigned ColSpan) NumRow <= NumRows; NumRow++) { - /***** Indent *****/ Tbl_StartRow (); + + /***** Indent *****/ fprintf (Gbl.F.Out,"" "\"\"" - "", + " class=\"ICO25x25\" />", Gbl.RowEvenOdd,Cfg_URL_ICON_PUBLIC, NumRow == NumRows ? "subend" : "submid"); + Tbl_EndCell (); /***** Write institution, centre, degree *****/ fprintf (Gbl.F.Out,"" - "%u" - "", + "%u", BgColor,NumDegTyp + 1); + Tbl_EndCell (); /* Name of degree type */ fprintf (Gbl.F.Out,"" - "%s" - "", + "%s", BgColor,Gbl.DegTypes.Lst[NumDegTyp].DegTypName); + Tbl_EndCell (); /* Number of degrees of this type */ fprintf (Gbl.F.Out,"" - "%u" - "", + "%u", BgColor,Gbl.DegTypes.Lst[NumDegTyp].NumDegs); + Tbl_EndCell (); + Tbl_EndRow (); Gbl.RowEvenOdd = 1 - Gbl.RowEvenOdd; @@ -399,8 +400,9 @@ static void DT_ListDegreeTypesForEdition (void) NumDegTyp < Gbl.DegTypes.Num; NumDegTyp++) { - /* Put icon to remove degree type */ Tbl_StartRow (); + + /* Put icon to remove degree type */ fprintf (Gbl.F.Out,""); if (Gbl.DegTypes.Lst[NumDegTyp].NumDegs) // Degree type has degrees => deletion forbidden Ico_PutIconRemovalNotAllowed (); @@ -411,13 +413,13 @@ static void DT_ListDegreeTypesForEdition (void) Ico_PutIconRemove (); Frm_EndForm (); } + Tbl_EndCell (); /* Degree type code */ - fprintf (Gbl.F.Out,"" - "" - "%ld" - "", + fprintf (Gbl.F.Out,"" + "%ld", Gbl.DegTypes.Lst[NumDegTyp].DegTypCod); + Tbl_EndCell (); /* Name of degree type */ fprintf (Gbl.F.Out,""); @@ -435,9 +437,10 @@ static void DT_ListDegreeTypesForEdition (void) /* Number of degrees of this type */ fprintf (Gbl.F.Out,"" - "%u" - "", + "%u", Gbl.DegTypes.Lst[NumDegTyp].NumDegs); + Tbl_EndCell (); + Tbl_EndRow (); } @@ -473,25 +476,29 @@ static void DT_PutFormToCreateDegreeType (void) /***** Write heading *****/ DT_PutHeadDegreeTypesForEdition (); - /***** Column to remove degree type, disabled here *****/ Tbl_StartRow (); - fprintf (Gbl.F.Out,""); + + /***** Column to remove degree type, disabled here *****/ + fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /***** Degree type code *****/ - fprintf (Gbl.F.Out,""); + fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /***** Degree type name *****/ fprintf (Gbl.F.Out,"" "" - "", + " required=\"required\" />", Deg_MAX_CHARS_DEGREE_TYPE_NAME,DT_EditingDegTyp->DegTypName); + Tbl_EndCell (); /***** Number of degrees of this degree type ****/ fprintf (Gbl.F.Out,"" - "0" - ""); + "0"); + Tbl_EndCell (); + Tbl_EndRow (); /***** End table, send button and end box *****/