mirror of https://github.com/acanas/swad-core.git
Version19.31.10
This commit is contained in:
parent
a8d8cadda6
commit
da3b69116f
|
@ -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)
|
||||
|
|
365
swad_country.c
365
swad_country.c
|
@ -197,7 +197,7 @@ void Cty_SeeCtyWithPendingInss (void)
|
|||
fprintf (Gbl.F.Out,"<td class=\"DAT RIGHT_MIDDLE %s\">"
|
||||
"%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,"<td class=\"%s RIGHT_MIDDLE\">"
|
||||
"%s:"
|
||||
"</td>"
|
||||
"<td class=\"DAT_N LEFT_MIDDLE\">",
|
||||
"%s:",
|
||||
The_ClassFormInBox[Gbl.Prefs.Theme],
|
||||
Txt_Country);
|
||||
Tbl_EndCell ();
|
||||
|
||||
fprintf (Gbl.F.Out,"<td class=\"DAT_N LEFT_MIDDLE\">");
|
||||
if (!PrintView && Gbl.Hierarchy.Cty.WWW[Gbl.Prefs.Language][0])
|
||||
fprintf (Gbl.F.Out,"<a href=\"%s\" target=\"_blank\" class=\"DAT_N\">",
|
||||
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,"</a>");
|
||||
Tbl_EndCell ();
|
||||
|
||||
Tbl_EndRow ();
|
||||
|
||||
/***** Link to the country inside platform *****/
|
||||
Tbl_StartRow ();
|
||||
|
||||
fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_MIDDLE\">"
|
||||
"%s:"
|
||||
"</td>"
|
||||
"<td class=\"DAT LEFT_MIDDLE\">"
|
||||
"<a href=\"%s/%s?cty=%ld\" class=\"DAT\" target=\"_blank\">"
|
||||
"%s/%s?cty=%ld</a>"
|
||||
"</td>",
|
||||
"%s:",
|
||||
The_ClassFormInBox[Gbl.Prefs.Theme],
|
||||
Txt_Shortcut,
|
||||
Txt_Shortcut);
|
||||
Tbl_EndCell ();
|
||||
|
||||
fprintf (Gbl.F.Out,"<td class=\"DAT LEFT_MIDDLE\">"
|
||||
"<a href=\"%s/%s?cty=%ld\" class=\"DAT\" target=\"_blank\">"
|
||||
"%s/%s?cty=%ld</a>",
|
||||
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,"<td class=\"%s RIGHT_MIDDLE\">"
|
||||
"%s:"
|
||||
"</td>"
|
||||
"<td class=\"DAT LEFT_MIDDLE\">",
|
||||
"%s:",
|
||||
The_ClassFormInBox[Gbl.Prefs.Theme],
|
||||
Txt_QR_code);
|
||||
Tbl_EndCell ();
|
||||
|
||||
fprintf (Gbl.F.Out,"<td class=\"DAT LEFT_MIDDLE\">");
|
||||
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,"<td class=\"%s RIGHT_MIDDLE\">"
|
||||
"%s:"
|
||||
"</td>"
|
||||
"<td class=\"DAT LEFT_MIDDLE\">"
|
||||
"%u"
|
||||
"</td>",
|
||||
"%s:",
|
||||
The_ClassFormInBox[Gbl.Prefs.Theme],
|
||||
Txt_Users_of_the_country,
|
||||
Txt_Users_of_the_country);
|
||||
Tbl_EndCell ();
|
||||
|
||||
fprintf (Gbl.F.Out,"<td class=\"DAT LEFT_MIDDLE\">"
|
||||
"%u",
|
||||
Usr_GetNumUsrsWhoClaimToBelongToCty (Gbl.Hierarchy.Cty.CtyCod));
|
||||
Tbl_EndCell ();
|
||||
|
||||
Tbl_EndRow ();
|
||||
|
||||
/***** Number of institutions *****/
|
||||
Tbl_StartRow ();
|
||||
|
||||
fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_MIDDLE\">"
|
||||
"%s:"
|
||||
"</td>"
|
||||
"<td class=\"LEFT_MIDDLE\">",
|
||||
"%s:",
|
||||
The_ClassFormInBox[Gbl.Prefs.Theme],
|
||||
Txt_Institutions);
|
||||
Tbl_EndCell ();
|
||||
|
||||
/* Form to go to see institutions of this country */
|
||||
fprintf (Gbl.F.Out,"<td class=\"LEFT_MIDDLE\">");
|
||||
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</a>",
|
||||
Ins_GetNumInssInCty (Gbl.Hierarchy.Cty.CtyCod));
|
||||
Frm_EndForm ();
|
||||
|
||||
Tbl_EndCell ();
|
||||
|
||||
Tbl_EndRow ();
|
||||
|
||||
/***** Number of centres *****/
|
||||
Tbl_StartRow ();
|
||||
|
||||
fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_MIDDLE\">"
|
||||
"%s:"
|
||||
"</td>"
|
||||
"<td class=\"DAT LEFT_MIDDLE\">"
|
||||
"%u"
|
||||
"</td>",
|
||||
"%s:",
|
||||
The_ClassFormInBox[Gbl.Prefs.Theme],
|
||||
Txt_Centres,
|
||||
Txt_Centres);
|
||||
Tbl_EndCell ();
|
||||
|
||||
fprintf (Gbl.F.Out,"<td class=\"DAT LEFT_MIDDLE\">"
|
||||
"%u",
|
||||
Ctr_GetNumCtrsInCty (Gbl.Hierarchy.Cty.CtyCod));
|
||||
Tbl_EndCell ();
|
||||
|
||||
Tbl_EndRow ();
|
||||
|
||||
/***** Number of degrees *****/
|
||||
Tbl_StartRow ();
|
||||
|
||||
fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_MIDDLE\">"
|
||||
"%s:"
|
||||
"</td>"
|
||||
"<td class=\"DAT LEFT_MIDDLE\">"
|
||||
"%u"
|
||||
"</td>",
|
||||
"%s:",
|
||||
The_ClassFormInBox[Gbl.Prefs.Theme],
|
||||
Txt_Degrees,
|
||||
Txt_Degrees);
|
||||
Tbl_EndCell ();
|
||||
|
||||
fprintf (Gbl.F.Out,"<td class=\"DAT LEFT_MIDDLE\">"
|
||||
"%u",
|
||||
Deg_GetNumDegsInCty (Gbl.Hierarchy.Cty.CtyCod));
|
||||
Tbl_EndCell ();
|
||||
|
||||
Tbl_EndRow ();
|
||||
|
||||
/***** Number of courses *****/
|
||||
Tbl_StartRow ();
|
||||
|
||||
fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_MIDDLE\">"
|
||||
"%s:"
|
||||
"</td>"
|
||||
"<td class=\"DAT LEFT_MIDDLE\">"
|
||||
"%u"
|
||||
"</td>",
|
||||
"%s:",
|
||||
The_ClassFormInBox[Gbl.Prefs.Theme],
|
||||
Txt_Courses,
|
||||
Txt_Courses);
|
||||
Tbl_EndCell ();
|
||||
|
||||
fprintf (Gbl.F.Out,"<td class=\"DAT LEFT_MIDDLE\">"
|
||||
"%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,"<td class=\"%s RIGHT_MIDDLE\">"
|
||||
"%s:"
|
||||
"</td>"
|
||||
"<td class=\"DAT LEFT_MIDDLE\">"
|
||||
"%u"
|
||||
"</td>",
|
||||
"%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,"<td class=\"DAT LEFT_MIDDLE\">"
|
||||
"%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,"<td colspan=\"8\" class=\"DAT CENTER_MIDDLE\">"
|
||||
" "
|
||||
"</td>");
|
||||
" ");
|
||||
Tbl_EndCell ();
|
||||
Tbl_EndRow ();
|
||||
|
||||
/***** Write users and institutions in other countries *****/
|
||||
Tbl_StartRow ();
|
||||
|
||||
fprintf (Gbl.F.Out,"<td class=\"DAT RIGHT_MIDDLE\">");
|
||||
Tbl_EndCell ();
|
||||
|
||||
fprintf (Gbl.F.Out,"<td class=\"DAT LEFT_MIDDLE\">"
|
||||
"%s",
|
||||
Txt_Other_countries);
|
||||
Tbl_EndCell ();
|
||||
|
||||
fprintf (Gbl.F.Out,"<td class=\"DAT RIGHT_MIDDLE\">"
|
||||
"</td>"
|
||||
"<td class=\"DAT LEFT_MIDDLE\">"
|
||||
"%s"
|
||||
"</td>"
|
||||
"<td class=\"DAT RIGHT_MIDDLE\">"
|
||||
"%u"
|
||||
"</td>"
|
||||
"<td class=\"DAT RIGHT_MIDDLE\">"
|
||||
"%u"
|
||||
"</td>"
|
||||
"<td class=\"DAT RIGHT_MIDDLE\">"
|
||||
"%u"
|
||||
"</td>"
|
||||
"<td class=\"DAT RIGHT_MIDDLE\">"
|
||||
"%u"
|
||||
"</td>"
|
||||
"<td class=\"DAT RIGHT_MIDDLE\">"
|
||||
"%u"
|
||||
"</td>"
|
||||
"<td class=\"DAT RIGHT_MIDDLE\">"
|
||||
"%u"
|
||||
"</td>",
|
||||
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,"<td class=\"DAT RIGHT_MIDDLE\">"
|
||||
"%u",
|
||||
Ins_GetNumInssInCty (0));
|
||||
Tbl_EndCell ();
|
||||
|
||||
fprintf (Gbl.F.Out,"<td class=\"DAT RIGHT_MIDDLE\">"
|
||||
"%u",
|
||||
Ctr_GetNumCtrsInCty (0));
|
||||
Tbl_EndCell ();
|
||||
|
||||
fprintf (Gbl.F.Out,"<td class=\"DAT RIGHT_MIDDLE\">"
|
||||
"%u",
|
||||
Deg_GetNumDegsInCty (0));
|
||||
Tbl_EndCell ();
|
||||
|
||||
fprintf (Gbl.F.Out,"<td class=\"DAT RIGHT_MIDDLE\">"
|
||||
"%u",
|
||||
Crs_GetNumCrssInCty (0));
|
||||
Tbl_EndCell ();
|
||||
|
||||
fprintf (Gbl.F.Out,"<td class=\"DAT RIGHT_MIDDLE\">"
|
||||
"%u",
|
||||
Usr_GetNumUsrsInCrssOfCty (Rol_TCH,0));
|
||||
Tbl_EndCell ();
|
||||
|
||||
Tbl_EndRow ();
|
||||
|
||||
/***** Write users and institutions with unknown country *****/
|
||||
Tbl_StartRow ();
|
||||
|
||||
fprintf (Gbl.F.Out,"<td class=\"DAT RIGHT_MIDDLE\">");
|
||||
Tbl_EndCell ();
|
||||
|
||||
fprintf (Gbl.F.Out,"<td class=\"DAT LEFT_MIDDLE\">"
|
||||
"%s",
|
||||
Txt_Country_unspecified);
|
||||
Tbl_EndCell ();
|
||||
|
||||
fprintf (Gbl.F.Out,"<td class=\"DAT RIGHT_MIDDLE\">"
|
||||
"</td>"
|
||||
"<td class=\"DAT LEFT_MIDDLE\">"
|
||||
"%s"
|
||||
"</td>"
|
||||
"<td class=\"DAT RIGHT_MIDDLE\">"
|
||||
"%u"
|
||||
"</td>"
|
||||
"<td class=\"DAT RIGHT_MIDDLE\">"
|
||||
"%u"
|
||||
"</td>"
|
||||
"<td class=\"DAT RIGHT_MIDDLE\">"
|
||||
"%u"
|
||||
"</td>"
|
||||
"<td class=\"DAT RIGHT_MIDDLE\">"
|
||||
"%u"
|
||||
"</td>"
|
||||
"<td class=\"DAT RIGHT_MIDDLE\">"
|
||||
"%u"
|
||||
"</td>"
|
||||
"<td class=\"DAT RIGHT_MIDDLE\">"
|
||||
"0"
|
||||
"</td>",
|
||||
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,"<td class=\"DAT RIGHT_MIDDLE\">"
|
||||
"%u",
|
||||
Ins_GetNumInssInCty (-1L));
|
||||
Tbl_EndCell ();
|
||||
|
||||
fprintf (Gbl.F.Out,"<td class=\"DAT RIGHT_MIDDLE\">"
|
||||
"%u",
|
||||
Ctr_GetNumCtrsInCty (-1L));
|
||||
Tbl_EndCell ();
|
||||
|
||||
fprintf (Gbl.F.Out,"<td class=\"DAT RIGHT_MIDDLE\">"
|
||||
"%u",
|
||||
Deg_GetNumDegsInCty (-1L));
|
||||
Tbl_EndCell ();
|
||||
|
||||
fprintf (Gbl.F.Out,"<td class=\"DAT RIGHT_MIDDLE\">"
|
||||
"%u",
|
||||
Crs_GetNumCrssInCty (-1L));
|
||||
Tbl_EndCell ();
|
||||
|
||||
fprintf (Gbl.F.Out,"<td class=\"DAT RIGHT_MIDDLE\">"
|
||||
"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,"<th></th>");
|
||||
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,"<td class=\"DAT RIGHT_MIDDLE %s\">"
|
||||
"%u"
|
||||
"</td>",
|
||||
"%u",
|
||||
BgColor,NumCty);
|
||||
Tbl_EndCell ();
|
||||
|
||||
/***** Country map (and link to WWW if exists) *****/
|
||||
fprintf (Gbl.F.Out,"<td class=\"LEFT_MIDDLE %s\">",BgColor);
|
||||
|
@ -729,29 +775,35 @@ static void Cty_ListOneCountryForSeeing (struct Country *Cty,unsigned NumCty)
|
|||
|
||||
/* Write stats of this country */
|
||||
fprintf (Gbl.F.Out,"<td class=\"DAT RIGHT_MIDDLE %s\">"
|
||||
"%u"
|
||||
"</td>"
|
||||
"<td class=\"DAT RIGHT_MIDDLE %s\">"
|
||||
"%u"
|
||||
"</td>"
|
||||
"<td class=\"DAT RIGHT_MIDDLE %s\">"
|
||||
"%u"
|
||||
"</td>"
|
||||
"<td class=\"DAT RIGHT_MIDDLE %s\">"
|
||||
"%u"
|
||||
"</td>"
|
||||
"<td class=\"DAT RIGHT_MIDDLE %s\">"
|
||||
"%u"
|
||||
"</td>"
|
||||
"<td class=\"DAT RIGHT_MIDDLE %s\">"
|
||||
"%u"
|
||||
"</td>",
|
||||
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,"<td class=\"DAT RIGHT_MIDDLE %s\">"
|
||||
"%u",
|
||||
BgColor,Cty->Inss.Num);
|
||||
Tbl_EndCell ();
|
||||
|
||||
fprintf (Gbl.F.Out,"<td class=\"DAT RIGHT_MIDDLE %s\">"
|
||||
"%u",
|
||||
BgColor,Cty->NumCtrs);
|
||||
Tbl_EndCell ();
|
||||
|
||||
fprintf (Gbl.F.Out,"<td class=\"DAT RIGHT_MIDDLE %s\">"
|
||||
"%u",
|
||||
BgColor,Cty->NumDegs);
|
||||
Tbl_EndCell ();
|
||||
|
||||
fprintf (Gbl.F.Out,"<td class=\"DAT RIGHT_MIDDLE %s\">"
|
||||
"%u",
|
||||
BgColor,Cty->NumCrss);
|
||||
Tbl_EndCell ();
|
||||
|
||||
fprintf (Gbl.F.Out,"<td class=\"DAT RIGHT_MIDDLE %s\">"
|
||||
"%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,"<td rowspan=\"%u\" class=\"DAT RIGHT_TOP\">"
|
||||
"%03ld"
|
||||
"</td>",
|
||||
"%03ld",
|
||||
1 + Lan_NUM_LANGUAGES,Cty->CtyCod);
|
||||
Tbl_EndCell ();
|
||||
|
||||
/* Alphabetic country code with 2 letters (ISO 3166-1) */
|
||||
fprintf (Gbl.F.Out,"<td rowspan=\"%u\" class=\"DAT RIGHT_TOP\">"
|
||||
"%s"
|
||||
"</td>",
|
||||
"%s",
|
||||
1 + Lan_NUM_LANGUAGES,Cty->Alpha2);
|
||||
Tbl_EndCell ();
|
||||
|
||||
Tbl_PutEmptyCells (3);
|
||||
|
||||
/* Number of users */
|
||||
fprintf (Gbl.F.Out,"<td rowspan=\"%u\" class=\"DAT RIGHT_TOP\">"
|
||||
"%u"
|
||||
"</td>",
|
||||
"%u",
|
||||
1 + Lan_NUM_LANGUAGES,Cty->NumUsrsWhoClaimToBelongToCty);
|
||||
Tbl_EndCell ();
|
||||
|
||||
/* Number of institutions */
|
||||
fprintf (Gbl.F.Out,"<td rowspan=\"%u\" class=\"DAT RIGHT_TOP\">"
|
||||
"%u"
|
||||
"</td>",
|
||||
"%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,"<td class=\"DAT RIGHT_MIDDLE\">"
|
||||
"%s:"
|
||||
"</td>",
|
||||
"%s:",
|
||||
Txt_STR_LANG_NAME[Lan]);
|
||||
Tbl_EndCell ();
|
||||
|
||||
/* Name */
|
||||
fprintf (Gbl.F.Out,"<td class=\"LEFT_TOP\">");
|
||||
|
@ -2054,8 +2106,9 @@ static void Cty_PutFormToCreateCountry (void)
|
|||
Tbl_StartRow ();
|
||||
|
||||
/***** Column to remove country, disabled here *****/
|
||||
fprintf (Gbl.F.Out,"<td rowspan=\"%u\" class=\"BT\"></td>",
|
||||
fprintf (Gbl.F.Out,"<td rowspan=\"%u\" class=\"BT\">",
|
||||
1 + Lan_NUM_LANGUAGES);
|
||||
Tbl_EndCell ();
|
||||
|
||||
/***** Numerical country code (ISO 3166-1) *****/
|
||||
fprintf (Gbl.F.Out,"<td rowspan=\"%u\" class=\"RIGHT_TOP\">"
|
||||
|
@ -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\" />"
|
||||
"</td>");
|
||||
fprintf (Gbl.F.Out,"\" required=\"required\" />");
|
||||
Tbl_EndCell ();
|
||||
|
||||
/***** Alphabetic country code with 2 letters (ISO 3166-1) *****/
|
||||
fprintf (Gbl.F.Out,"<td rowspan=\"%u\" class=\"RIGHT_TOP\">"
|
||||
"<input type=\"text\" name=\"Alpha2\""
|
||||
" size=\"2\" maxlength=\"2\" value=\"%s\""
|
||||
" required=\"required\" />"
|
||||
"</td>",
|
||||
" required=\"required\" />",
|
||||
1 + Lan_NUM_LANGUAGES,Cty_EditingCty->Alpha2);
|
||||
Tbl_EndCell ();
|
||||
|
||||
Tbl_PutEmptyCells (3);
|
||||
|
||||
/***** Number of users *****/
|
||||
fprintf (Gbl.F.Out,"<td rowspan=\"%u\" class=\"DAT RIGHT_TOP\">"
|
||||
"0"
|
||||
"</td>",
|
||||
"0",
|
||||
1 + Lan_NUM_LANGUAGES);
|
||||
Tbl_EndCell ();
|
||||
|
||||
/***** Number of institutions *****/
|
||||
fprintf (Gbl.F.Out,"<td rowspan=\"%u\" class=\"DAT RIGHT_TOP\">"
|
||||
"0"
|
||||
"</td>",
|
||||
"0",
|
||||
1 + Lan_NUM_LANGUAGES);
|
||||
Tbl_EndCell ();
|
||||
|
||||
Tbl_EndRow ();
|
||||
|
||||
|
@ -2100,29 +2153,29 @@ static void Cty_PutFormToCreateCountry (void)
|
|||
|
||||
/* Language */
|
||||
fprintf (Gbl.F.Out,"<td class=\"DAT RIGHT_TOP\">"
|
||||
"%s"
|
||||
"</td>",
|
||||
"%s",
|
||||
Txt_STR_LANG_NAME[Lan]);
|
||||
Tbl_EndCell ();
|
||||
|
||||
/* Name */
|
||||
fprintf (Gbl.F.Out,"<td class=\"LEFT_MIDDLE\">"
|
||||
"<input type=\"text\" name=\"Name_%s\""
|
||||
" size=\"15\" maxlength=\"%u\" value=\"%s\""
|
||||
" required=\"required\" />"
|
||||
"</td>",
|
||||
" required=\"required\" />",
|
||||
Lan_STR_LANG_ID[Lan],
|
||||
Cty_MAX_CHARS_NAME,
|
||||
Cty_EditingCty->Name[Lan]);
|
||||
Tbl_EndCell ();
|
||||
|
||||
/* WWW */
|
||||
fprintf (Gbl.F.Out,"<td class=\"LEFT_MIDDLE\">"
|
||||
"<input type=\"url\" name=\"WWW_%s\""
|
||||
" maxlength=\"%u\" value=\"%s\""
|
||||
" class=\"INPUT_WWW\" />"
|
||||
"</td>",
|
||||
" 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,"<th class=\"BM\"></th>"
|
||||
"<th class=\"RIGHT_MIDDLE\">"
|
||||
"%s"
|
||||
|
@ -2174,6 +2228,7 @@ static void Cty_PutHeadCountriesForEdition (void)
|
|||
Txt_WWW,
|
||||
Txt_Users,
|
||||
Txt_Institutions_ABBREVIATION);
|
||||
|
||||
Tbl_EndRow ();
|
||||
}
|
||||
|
||||
|
|
202
swad_course.c
202
swad_course.c
|
@ -239,12 +239,14 @@ static void Crs_Configuration (bool PrintView)
|
|||
|
||||
/***** Degree *****/
|
||||
Tbl_StartRow ();
|
||||
|
||||
fprintf (Gbl.F.Out,"<td class=\"RIGHT_MIDDLE\">"
|
||||
"<label for=\"OthDegCod\" class=\"%s\">%s:</label>"
|
||||
"</td>"
|
||||
"<td class=\"DAT LEFT_MIDDLE\">",
|
||||
"<label for=\"OthDegCod\" class=\"%s\">%s:</label>",
|
||||
The_ClassFormInBox[Gbl.Prefs.Theme],
|
||||
Txt_Degree);
|
||||
Tbl_EndCell ();
|
||||
|
||||
fprintf (Gbl.F.Out,"<td class=\"DAT LEFT_MIDDLE\">");
|
||||
|
||||
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,"<td class=\"RIGHT_MIDDLE\">"
|
||||
"<label for=\"FullName\" class=\"%s\">%s:</label>"
|
||||
"</td>"
|
||||
"<td class=\"DAT_N LEFT_MIDDLE\">",
|
||||
"<label for=\"FullName\" class=\"%s\">%s:</label>",
|
||||
The_ClassFormInBox[Gbl.Prefs.Theme],
|
||||
Txt_Course);
|
||||
Tbl_EndCell ();
|
||||
|
||||
fprintf (Gbl.F.Out,"<td class=\"DAT_N LEFT_MIDDLE\">");
|
||||
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,"<td class=\"RIGHT_MIDDLE\">"
|
||||
"<label for=\"ShortName\" class=\"%s\">%s:</label>"
|
||||
"</td>"
|
||||
"<td class=\"DAT_N LEFT_MIDDLE\">",
|
||||
"<label for=\"ShortName\" class=\"%s\">%s:</label>",
|
||||
The_ClassFormInBox[Gbl.Prefs.Theme],
|
||||
Txt_Short_name);
|
||||
Tbl_EndCell ();
|
||||
|
||||
Tbl_EndRow ();
|
||||
|
||||
fprintf (Gbl.F.Out,"<td class=\"DAT_N LEFT_MIDDLE\">");
|
||||
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,"<td class=\"RIGHT_MIDDLE\">"
|
||||
"<label for=\"OthCrsYear\" class=\"%s\">%s:</label>"
|
||||
"</td>"
|
||||
"<td class=\"DAT LEFT_MIDDLE\">",
|
||||
"<label for=\"OthCrsYear\" class=\"%s\">%s:</label>",
|
||||
The_ClassFormInBox[Gbl.Prefs.Theme],
|
||||
Txt_Year_OF_A_DEGREE);
|
||||
Tbl_EndRow ();
|
||||
|
||||
fprintf (Gbl.F.Out,"<td class=\"DAT LEFT_MIDDLE\">");
|
||||
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,"<td class=\"RIGHT_MIDDLE\">"
|
||||
"<label for=\"InsCrsCod\" class=\"%s\">%s:</label>"
|
||||
"</td>"
|
||||
"<td class=\"DAT LEFT_MIDDLE\">",
|
||||
"<label for=\"InsCrsCod\" class=\"%s\">%s:</label>",
|
||||
The_ClassFormInBox[Gbl.Prefs.Theme],
|
||||
Txt_Institutional_code);
|
||||
Tbl_EndRow ();
|
||||
|
||||
fprintf (Gbl.F.Out,"<td class=\"DAT LEFT_MIDDLE\">");
|
||||
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,"<td class=\"%s RIGHT_MIDDLE\">"
|
||||
"%s:"
|
||||
"</td>"
|
||||
"<td class=\"DAT LEFT_MIDDLE\">"
|
||||
"%ld"
|
||||
"</td>",
|
||||
"%s:",
|
||||
The_ClassFormInBox[Gbl.Prefs.Theme],
|
||||
Txt_Internal_code,
|
||||
Txt_Internal_code);
|
||||
Tbl_EndRow ();
|
||||
|
||||
fprintf (Gbl.F.Out,"<td class=\"DAT LEFT_MIDDLE\">"
|
||||
"%ld",
|
||||
Gbl.Hierarchy.Crs.CrsCod);
|
||||
Tbl_EndRow ();
|
||||
|
||||
Tbl_EndRow ();
|
||||
}
|
||||
|
||||
/***** Link to the course *****/
|
||||
Tbl_StartRow ();
|
||||
|
||||
fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_MIDDLE\">"
|
||||
"%s:"
|
||||
"</td>"
|
||||
"<td class=\"DAT LEFT_MIDDLE\">"
|
||||
"<a href=\"%s/%s?crs=%ld\" class=\"DAT\" target=\"_blank\">"
|
||||
"%s/%s?crs=%ld</a>"
|
||||
"</td>",
|
||||
"%s:",
|
||||
The_ClassFormInBox[Gbl.Prefs.Theme],
|
||||
Txt_Shortcut,
|
||||
Txt_Shortcut);
|
||||
Tbl_EndRow ();
|
||||
|
||||
fprintf (Gbl.F.Out,"<td class=\"DAT LEFT_MIDDLE\">"
|
||||
"<a href=\"%s/%s?crs=%ld\" class=\"DAT\" target=\"_blank\">"
|
||||
"%s/%s?crs=%ld</a>",
|
||||
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,"<td class=\"%s RIGHT_MIDDLE\">"
|
||||
"%s:"
|
||||
"</td>"
|
||||
"<td class=\"DAT LEFT_MIDDLE\">",
|
||||
"%s:",
|
||||
The_ClassFormInBox[Gbl.Prefs.Theme],
|
||||
Txt_QR_code);
|
||||
Tbl_EndRow ();
|
||||
|
||||
fprintf (Gbl.F.Out,"<td class=\"DAT LEFT_MIDDLE\">");
|
||||
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,"<td class=\"%s RIGHT_MIDDLE\">"
|
||||
"%s:"
|
||||
"</td>"
|
||||
"<td class=\"LEFT_MIDDLE\">",
|
||||
"%s:",
|
||||
The_ClassFormInBox[Gbl.Prefs.Theme],
|
||||
Txt_Indicators);
|
||||
Tbl_EndRow ();
|
||||
|
||||
fprintf (Gbl.F.Out,"<td class=\"LEFT_MIDDLE\">");
|
||||
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,"<td class=\"%s RIGHT_MIDDLE\">"
|
||||
"%s:"
|
||||
"</td>"
|
||||
"<td class=\"DAT LEFT_MIDDLE\">"
|
||||
"%u"
|
||||
"</td>",
|
||||
"%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,"<td class=\"DAT LEFT_MIDDLE\">"
|
||||
"%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,"<td class=\"%s CENTER_MIDDLE %s\" title=\"%s\">"
|
||||
"%s"
|
||||
"</td>",
|
||||
"%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,"<td class=\"%s CENTER_MIDDLE %s\">"
|
||||
"%s"
|
||||
"</td>",
|
||||
"%s",
|
||||
TxtClassNormal,BgColor,
|
||||
Crs->InstitutionalCrsCod);
|
||||
Tbl_EndRow ();
|
||||
|
||||
/* Course year */
|
||||
fprintf (Gbl.F.Out,"<td class=\"%s CENTER_MIDDLE %s\">"
|
||||
"%s"
|
||||
"</td>",
|
||||
"%s",
|
||||
TxtClassNormal,BgColor,
|
||||
Txt_YEAR_OF_DEGREE[Crs->Year]);
|
||||
Tbl_EndRow ();
|
||||
|
||||
/* Course full name */
|
||||
fprintf (Gbl.F.Out,"<td class=\"%s LEFT_MIDDLE %s\">",
|
||||
|
@ -1313,18 +1342,18 @@ static bool Crs_ListCoursesOfAYearForSeeing (unsigned Year)
|
|||
|
||||
/* Current number of teachers in this course */
|
||||
fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_MIDDLE %s\">"
|
||||
"%u"
|
||||
"</td>",
|
||||
"%u",
|
||||
TxtClassNormal,BgColor,
|
||||
Crs->NumUsrs[Rol_TCH] +
|
||||
Crs->NumUsrs[Rol_NET]);
|
||||
Tbl_EndRow ();
|
||||
|
||||
/* Current number of students in this course */
|
||||
fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_MIDDLE %s\">"
|
||||
"%u"
|
||||
"</td>",
|
||||
"%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,"<td class=\"DAT CODE\">"
|
||||
"%ld"
|
||||
"</td>",
|
||||
"%ld",
|
||||
Crs->CrsCod);
|
||||
Tbl_EndRow ();
|
||||
|
||||
/* Institutional code of the course */
|
||||
fprintf (Gbl.F.Out,"<td class=\"DAT CENTER_MIDDLE\">");
|
||||
|
@ -1575,16 +1604,16 @@ static void Crs_ListCoursesOfAYearForEdition (unsigned Year)
|
|||
|
||||
/* Current number of teachers in this course */
|
||||
fprintf (Gbl.F.Out,"<td class=\"DAT RIGHT_MIDDLE\">"
|
||||
"%u"
|
||||
"</td>",
|
||||
"%u",
|
||||
Crs->NumUsrs[Rol_TCH] +
|
||||
Crs->NumUsrs[Rol_NET]);
|
||||
Tbl_EndRow ();
|
||||
|
||||
/* Current number of students in this course */
|
||||
fprintf (Gbl.F.Out,"<td class=\"DAT RIGHT_MIDDLE\">"
|
||||
"%u"
|
||||
"</td>",
|
||||
"%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,"<td class=\"BM\"></td>");
|
||||
|
||||
/***** Column to remove course, disabled here *****/
|
||||
fprintf (Gbl.F.Out,"<td class=\"BM\">");
|
||||
Tbl_EndRow ();
|
||||
|
||||
/***** Course code *****/
|
||||
fprintf (Gbl.F.Out,"<td class=\"CODE\"></td>");
|
||||
fprintf (Gbl.F.Out,"<td class=\"CODE\">");
|
||||
Tbl_EndRow ();
|
||||
|
||||
/***** Institutional code of the course *****/
|
||||
fprintf (Gbl.F.Out,"<td class=\"CENTER_MIDDLE\">"
|
||||
"<input type=\"text\" name=\"InsCrsCod\""
|
||||
" maxlength=\"%u\" value=\"%s\""
|
||||
" class=\"INPUT_INS_CODE\" />"
|
||||
"</td>",
|
||||
" class=\"INPUT_INS_CODE\" />",
|
||||
Crs_MAX_CHARS_INSTITUTIONAL_CRS_COD,
|
||||
Crs_EditingCrs->InstitutionalCrsCod);
|
||||
Tbl_EndRow ();
|
||||
|
||||
/***** Year *****/
|
||||
fprintf (Gbl.F.Out,"<td class=\"CENTER_MIDDLE\">"
|
||||
|
@ -1730,36 +1762,36 @@ static void Crs_PutFormToCreateCourse (void)
|
|||
Year == Crs_EditingCrs->Year ? " selected=\"selected\"" :
|
||||
"",
|
||||
Txt_YEAR_OF_DEGREE[Year]);
|
||||
fprintf (Gbl.F.Out,"</select>"
|
||||
"</td>");
|
||||
fprintf (Gbl.F.Out,"</select>");
|
||||
Tbl_EndRow ();
|
||||
|
||||
/***** Course short name *****/
|
||||
fprintf (Gbl.F.Out,"<td class=\"LEFT_MIDDLE\">"
|
||||
"<input type=\"text\" name=\"ShortName\""
|
||||
" maxlength=\"%u\" value=\"%s\""
|
||||
" class=\"INPUT_SHORT_NAME\""
|
||||
" required=\"required\" />"
|
||||
"</td>",
|
||||
" required=\"required\" />",
|
||||
Hie_MAX_CHARS_SHRT_NAME,Crs_EditingCrs->ShrtName);
|
||||
Tbl_EndRow ();
|
||||
|
||||
/***** Course full name *****/
|
||||
fprintf (Gbl.F.Out,"<td class=\"LEFT_MIDDLE\">"
|
||||
"<input type=\"text\" name=\"FullName\""
|
||||
" maxlength=\"%u\" value=\"%s\""
|
||||
" class=\"INPUT_FULL_NAME\""
|
||||
" required=\"required\" />"
|
||||
"</td>",
|
||||
" required=\"required\" />",
|
||||
Hie_MAX_CHARS_FULL_NAME,Crs_EditingCrs->FullName);
|
||||
Tbl_EndRow ();
|
||||
|
||||
/***** Current number of teachers in this course *****/
|
||||
fprintf (Gbl.F.Out,"<td class=\"DAT RIGHT_MIDDLE\">"
|
||||
"0"
|
||||
"</td>");
|
||||
"0");
|
||||
Tbl_EndRow ();
|
||||
|
||||
/***** Current number of students in this course *****/
|
||||
fprintf (Gbl.F.Out,"<td class=\"DAT RIGHT_MIDDLE\">"
|
||||
"0"
|
||||
"</td>");
|
||||
"0");
|
||||
Tbl_EndRow ();
|
||||
|
||||
/***** Course requester *****/
|
||||
fprintf (Gbl.F.Out,"<td class=\"DAT INPUT_REQUESTER LEFT_TOP\">");
|
||||
|
@ -1767,8 +1799,9 @@ static void Crs_PutFormToCreateCourse (void)
|
|||
Tbl_EndCell ();
|
||||
|
||||
/***** Course status *****/
|
||||
fprintf (Gbl.F.Out,"<td class=\"DAT LEFT_MIDDLE\">"
|
||||
"</td>");
|
||||
fprintf (Gbl.F.Out,"<td class=\"DAT LEFT_MIDDLE\">");
|
||||
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,"<td class=\"BT %s\" title=\"%s\">"
|
||||
"%s"
|
||||
"</td>",
|
||||
"%s",
|
||||
BgColor,
|
||||
Accepted ? Txt_Enrolment_confirmed :
|
||||
Txt_Enrolment_not_confirmed,
|
||||
Accepted ? "✓" :
|
||||
"✗");
|
||||
Tbl_EndRow ();
|
||||
}
|
||||
|
||||
/***** Write number of course in this search *****/
|
||||
fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_TOP %s\">"
|
||||
"%u"
|
||||
"</td>",
|
||||
"%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,"<td class=\"%s CENTER_TOP %s\">"
|
||||
"%s"
|
||||
"</td>",
|
||||
"%s",
|
||||
Style,BgColor,Txt_YEAR_OF_DEGREE[Deg_ConvStrToYear (row[4])]);
|
||||
Tbl_EndRow ();
|
||||
|
||||
/***** Write course full name (row[5]) *****/
|
||||
fprintf (Gbl.F.Out,"<td class=\"%s LEFT_TOP %s\">",
|
||||
|
@ -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,"<td class=\"%s RIGHT_TOP %s\">"
|
||||
"%u"
|
||||
"</td>",
|
||||
"%u",
|
||||
Style,BgColor,NumTchs);
|
||||
Tbl_EndRow ();
|
||||
|
||||
/***** Write number of students in course *****/
|
||||
fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_TOP %s\">"
|
||||
"%u"
|
||||
"</td>",
|
||||
"%u",
|
||||
Style,BgColor,NumStds);
|
||||
Tbl_EndRow ();
|
||||
|
||||
Tbl_EndRow ();
|
||||
|
||||
RowEvenOdd = 1 - RowEvenOdd;
|
||||
}
|
||||
|
||||
|
|
73
swad_date.c
73
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,"<td class=\"RIGHT_MIDDLE\">"
|
||||
"<label class=\"%s\">%s:</label>"
|
||||
"</td>"
|
||||
"<td class=\"LEFT_MIDDLE\">",
|
||||
"<label class=\"%s\">%s:</label>",
|
||||
The_ClassFormInBox[Gbl.Prefs.Theme],
|
||||
Txt_START_END_TIME[Dat_START_TIME]);
|
||||
Tbl_EndCell ();
|
||||
|
||||
/* Date-time */
|
||||
fprintf (Gbl.F.Out,"<td class=\"LEFT_MIDDLE\">");
|
||||
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,"</td>"
|
||||
"<td rowspan=\"2\" class=\"LEFT_MIDDLE\">"
|
||||
fprintf (Gbl.F.Out,"<td rowspan=\"2\" class=\"LEFT_MIDDLE\">"
|
||||
"<input type=\"button\" name=\"Yesterday\" value=\"%s\""
|
||||
" onclick=\"setDateToYesterday('Start','End');\" />"
|
||||
"<input type=\"button\" name=\"Today\" value=\"%s\""
|
||||
" onclick=\"setDateToToday('Start','End');\" />"
|
||||
"</td>",
|
||||
" onclick=\"setDateToToday('Start','End');\" />",
|
||||
Txt_Yesterday,
|
||||
Txt_Today);
|
||||
Tbl_EndCell ();
|
||||
|
||||
Tbl_EndRow ();
|
||||
Tbl_StartRow ();
|
||||
|
||||
/***** End date-time *****/
|
||||
Tbl_StartRow ();
|
||||
fprintf (Gbl.F.Out,"<td class=\"RIGHT_MIDDLE\">"
|
||||
"<label class=\"%s\">%s:</label>"
|
||||
"</td>"
|
||||
"<td class=\"LEFT_MIDDLE\">",
|
||||
"<label class=\"%s\">%s:</label>",
|
||||
The_ClassFormInBox[Gbl.Prefs.Theme],
|
||||
Txt_START_END_TIME[Dat_END_TIME]);
|
||||
Tbl_EndCell ();
|
||||
|
||||
/* Date-time */
|
||||
fprintf (Gbl.F.Out,"<td class=\"LEFT_MIDDLE\">");
|
||||
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,"<td class=\"RIGHT_MIDDLE\">"
|
||||
"<label class=\"%s\">%s:</label>"
|
||||
"</td>"
|
||||
"<td class=\"LEFT_MIDDLE\">",
|
||||
"<label class=\"%s\">%s:</label>",
|
||||
The_ClassFormInBox[Gbl.Prefs.Theme],
|
||||
Txt_START_END_TIME[StartEndTime]);
|
||||
Tbl_EndCell ();
|
||||
|
||||
fprintf (Gbl.F.Out,"<td class=\"LEFT_MIDDLE\">");
|
||||
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,"<option value=\"%u\">%u</option>",
|
||||
Year,Year);
|
||||
fprintf (Gbl.F.Out,"</select>"
|
||||
"</td>");
|
||||
fprintf (Gbl.F.Out,"</select>");
|
||||
Tbl_EndCell ();
|
||||
|
||||
/***** Month *****/
|
||||
fprintf (Gbl.F.Out,"<td class=\"CENTER_MIDDLE\">"
|
||||
|
@ -588,8 +595,8 @@ void Dat_WriteFormClientLocalDateTimeFromTimeUTC (const char *Id,
|
|||
Month++)
|
||||
fprintf (Gbl.F.Out,"<option value=\"%u\">%s</option>",
|
||||
Month,Txt_MONTHS_SMALL[Month - 1]);
|
||||
fprintf (Gbl.F.Out,"</select>"
|
||||
"</td>");
|
||||
fprintf (Gbl.F.Out,"</select>");
|
||||
Tbl_EndCell ();
|
||||
|
||||
/***** Day *****/
|
||||
fprintf (Gbl.F.Out,"<td class=\"LEFT_MIDDLE\">"
|
||||
|
@ -605,8 +612,8 @@ void Dat_WriteFormClientLocalDateTimeFromTimeUTC (const char *Id,
|
|||
Day++)
|
||||
fprintf (Gbl.F.Out,"<option value=\"%u\">%u</option>",
|
||||
Day,Day);
|
||||
fprintf (Gbl.F.Out,"</select>"
|
||||
"</td>");
|
||||
fprintf (Gbl.F.Out,"</select>");
|
||||
Tbl_EndCell ();
|
||||
|
||||
/***** Hour *****/
|
||||
fprintf (Gbl.F.Out,"<td class=\"RIGHT_MIDDLE\">"
|
||||
|
@ -622,8 +629,8 @@ void Dat_WriteFormClientLocalDateTimeFromTimeUTC (const char *Id,
|
|||
Hour++)
|
||||
fprintf (Gbl.F.Out,"<option value=\"%u\">%02u h</option>",
|
||||
Hour,Hour);
|
||||
fprintf (Gbl.F.Out,"</select>"
|
||||
"</td>");
|
||||
fprintf (Gbl.F.Out,"</select>");
|
||||
Tbl_EndCell ();
|
||||
|
||||
/***** Minute *****/
|
||||
fprintf (Gbl.F.Out,"<td class=\"CENTER_MIDDLE\">"
|
||||
|
@ -641,8 +648,8 @@ void Dat_WriteFormClientLocalDateTimeFromTimeUTC (const char *Id,
|
|||
fprintf (Gbl.F.Out,"<option value=\"%u\">%02u '</option>",
|
||||
Minute,Minute);
|
||||
|
||||
fprintf (Gbl.F.Out,"</select>"
|
||||
"</td>");
|
||||
fprintf (Gbl.F.Out,"</select>");
|
||||
Tbl_EndCell ();
|
||||
|
||||
/***** Second *****/
|
||||
if (FormSeconds == Dat_FORM_SECONDS_ON)
|
||||
|
@ -660,8 +667,8 @@ void Dat_WriteFormClientLocalDateTimeFromTimeUTC (const char *Id,
|
|||
Second++)
|
||||
fprintf (Gbl.F.Out,"<option value=\"%u\">%02u "</option>",
|
||||
Second,Second);
|
||||
fprintf (Gbl.F.Out,"</select>"
|
||||
"</td>");
|
||||
fprintf (Gbl.F.Out,"</select>");
|
||||
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</option>",Year);
|
||||
}
|
||||
fprintf (Gbl.F.Out,"</select>"
|
||||
"</td>");
|
||||
fprintf (Gbl.F.Out,"</select>");
|
||||
Tbl_EndCell ();
|
||||
|
||||
/***** Month *****/
|
||||
fprintf (Gbl.F.Out,"<td class=\"CENTER_MIDDLE\">"
|
||||
|
@ -866,8 +873,8 @@ void Dat_WriteFormDate (unsigned FirstYear,unsigned LastYear,
|
|||
fprintf (Gbl.F.Out," selected=\"selected\"");
|
||||
fprintf (Gbl.F.Out,">%s</option>",Txt_MONTHS_SMALL[Month - 1]);
|
||||
}
|
||||
fprintf (Gbl.F.Out,"</select>"
|
||||
"</td>");
|
||||
fprintf (Gbl.F.Out,"</select>");
|
||||
Tbl_EndCell ();
|
||||
|
||||
/***** Day *****/
|
||||
fprintf (Gbl.F.Out,"<td class=\"CENTER_MIDDLE\">"
|
||||
|
@ -891,8 +898,8 @@ void Dat_WriteFormDate (unsigned FirstYear,unsigned LastYear,
|
|||
fprintf (Gbl.F.Out," selected=\"selected\"");
|
||||
fprintf (Gbl.F.Out,">%u</option>",Day);
|
||||
}
|
||||
fprintf (Gbl.F.Out,"</select>"
|
||||
"</td>");
|
||||
fprintf (Gbl.F.Out,"</select>");
|
||||
Tbl_EndCell ();
|
||||
|
||||
/***** End table *****/
|
||||
Tbl_EndRow ();
|
||||
|
|
158
swad_degree.c
158
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,"<td class=\"LEFT_MIDDLE %s\">",
|
||||
BgColor);
|
||||
Deg_DrawDegreeLogoAndNameWithLink (&Deg,ActSeeCrs,
|
||||
|
@ -222,9 +223,10 @@ void Deg_SeeDegWithPendingCrss (void)
|
|||
|
||||
/* Number of pending courses (row[1]) */
|
||||
fprintf (Gbl.F.Out,"<td class=\"DAT RIGHT_MIDDLE %s\">"
|
||||
"%s"
|
||||
"</td>",
|
||||
"%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,"<td class=\"RIGHT_MIDDLE\">"
|
||||
"<label for=\"OthCtrCod\" class=\"%s\">%s:</label>"
|
||||
"</td>"
|
||||
"<td class=\"DAT_N LEFT_MIDDLE\">",
|
||||
"<label for=\"OthCtrCod\" class=\"%s\">%s:</label>",
|
||||
The_ClassFormInBox[Gbl.Prefs.Theme],
|
||||
Txt_Centre);
|
||||
Tbl_EndCell ();
|
||||
|
||||
fprintf (Gbl.F.Out,"<td class=\"DAT_N LEFT_MIDDLE\">");
|
||||
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,"<td class=\"RIGHT_MIDDLE\">"
|
||||
"<label for=\"FullName\" class=\"%s\">%s:</label>"
|
||||
"</td>"
|
||||
"<td class=\"DAT_N LEFT_MIDDLE\">",
|
||||
"<label for=\"FullName\" class=\"%s\">%s:</label>",
|
||||
The_ClassFormInBox[Gbl.Prefs.Theme],
|
||||
Txt_Degree);
|
||||
Tbl_EndCell ();
|
||||
|
||||
fprintf (Gbl.F.Out,"<td class=\"DAT_N LEFT_MIDDLE\">");
|
||||
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,"<td class=\"RIGHT_MIDDLE\">"
|
||||
"<label for=\"ShortName\" class=\"%s\">%s:</label>"
|
||||
"</td>"
|
||||
"<td class=\"DAT_N LEFT_MIDDLE\">",
|
||||
"<label for=\"ShortName\" class=\"%s\">%s:</label>",
|
||||
The_ClassFormInBox[Gbl.Prefs.Theme],
|
||||
Txt_Short_name);
|
||||
fprintf (Gbl.F.Out,"</td>"
|
||||
"<td class=\"DAT_N LEFT_MIDDLE\">");
|
||||
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,"<td class=\"RIGHT_MIDDLE\">"
|
||||
"<label for=\"WWW\" class=\"%s\">%s:</label>"
|
||||
"</td>"
|
||||
"<td class=\"DAT LEFT_MIDDLE\">",
|
||||
"<label for=\"WWW\" class=\"%s\">%s:</label>",
|
||||
The_ClassFormInBox[Gbl.Prefs.Theme],
|
||||
Txt_Web);
|
||||
Tbl_EndCell ();
|
||||
|
||||
fprintf (Gbl.F.Out,"<td class=\"DAT LEFT_MIDDLE\">");
|
||||
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,"<td class=\"%s RIGHT_MIDDLE\">"
|
||||
"%s:"
|
||||
"</td>"
|
||||
"<td class=\"DAT LEFT_MIDDLE\">"
|
||||
"%s:",
|
||||
The_ClassFormInBox[Gbl.Prefs.Theme],
|
||||
Txt_Shortcut);
|
||||
Tbl_EndCell ();
|
||||
|
||||
fprintf (Gbl.F.Out,"<td class=\"DAT LEFT_MIDDLE\">"
|
||||
"<a href=\"%s/%s?deg=%ld\" class=\"DAT\" target=\"_blank\">"
|
||||
"%s/%s?deg=%ld"
|
||||
"</a>"
|
||||
"</td>",
|
||||
The_ClassFormInBox[Gbl.Prefs.Theme],
|
||||
Txt_Shortcut,
|
||||
"</a>",
|
||||
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,"<td class=\"%s RIGHT_MIDDLE\">"
|
||||
"%s:"
|
||||
"</td>"
|
||||
"<td class=\"DAT LEFT_MIDDLE\">",
|
||||
"%s:",
|
||||
The_ClassFormInBox[Gbl.Prefs.Theme],
|
||||
Txt_QR_code);
|
||||
Tbl_EndCell ();
|
||||
|
||||
fprintf (Gbl.F.Out,"<td class=\"DAT LEFT_MIDDLE\">");
|
||||
QR_LinkTo (250,"deg",Gbl.Hierarchy.Deg.DegCod);
|
||||
Tbl_EndCell ();
|
||||
|
||||
Tbl_EndRow ();
|
||||
}
|
||||
else
|
||||
{
|
||||
/***** Number of courses *****/
|
||||
Tbl_StartRow ();
|
||||
|
||||
fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_MIDDLE\">"
|
||||
"%s:"
|
||||
"</td>"
|
||||
"<td class=\"LEFT_MIDDLE\">",
|
||||
"%s:",
|
||||
The_ClassFormInBox[Gbl.Prefs.Theme],
|
||||
Txt_Courses);
|
||||
Tbl_EndCell ();
|
||||
|
||||
|
||||
/* Form to go to see courses of this degree */
|
||||
fprintf (Gbl.F.Out,"<td class=\"LEFT_MIDDLE\">");
|
||||
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</a>",
|
||||
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,"<td class=\"%s RIGHT_MIDDLE\">"
|
||||
"%s:"
|
||||
"</td>"
|
||||
"<td class=\"DAT LEFT_MIDDLE\">"
|
||||
"%u"
|
||||
"</td>",
|
||||
"%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,"<td class=\"DAT LEFT_MIDDLE\">"
|
||||
"%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,"<td class=\"DAT CODE\">"
|
||||
"%ld"
|
||||
"</td>",
|
||||
"%ld",
|
||||
Deg->DegCod);
|
||||
Tbl_EndCell ();
|
||||
|
||||
/* Degree logo */
|
||||
fprintf (Gbl.F.Out,"<td title=\"%s LEFT_MIDDLE\" style=\"width:25px;\">",
|
||||
|
@ -841,9 +857,9 @@ static void Deg_ListDegreesForEdition (void)
|
|||
|
||||
/* Current number of courses in this degree */
|
||||
fprintf (Gbl.F.Out,"<td class=\"DAT RIGHT_MIDDLE\">"
|
||||
"%u"
|
||||
"</td>",
|
||||
"%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,"<td class=\"BM\"></td>");
|
||||
|
||||
/***** Column to remove degree, disabled here *****/
|
||||
fprintf (Gbl.F.Out,"<td class=\"BM\">");
|
||||
Tbl_EndCell ();
|
||||
|
||||
/***** Degree code *****/
|
||||
fprintf (Gbl.F.Out,"<td class=\"CODE\"></td>");
|
||||
fprintf (Gbl.F.Out,"<td class=\"CODE\">");
|
||||
Tbl_EndCell ();
|
||||
|
||||
/***** Degree logo *****/
|
||||
fprintf (Gbl.F.Out,"<td class=\"LEFT_MIDDLE\" style=\"width:25px;\">");
|
||||
|
@ -981,18 +1000,18 @@ static void Deg_PutFormToCreateDegree (void)
|
|||
"<input type=\"text\" name=\"ShortName\""
|
||||
" maxlength=\"%u\" value=\"%s\""
|
||||
" class=\"INPUT_SHORT_NAME\""
|
||||
" required=\"required\" />"
|
||||
"</td>",
|
||||
" required=\"required\" />",
|
||||
Hie_MAX_CHARS_SHRT_NAME,Deg_EditingDeg->ShrtName);
|
||||
Tbl_EndCell ();
|
||||
|
||||
/***** Degree full name *****/
|
||||
fprintf (Gbl.F.Out,"<td class=\"LEFT_MIDDLE\">"
|
||||
"<input type=\"text\" name=\"FullName\""
|
||||
" maxlength=\"%u\" value=\"%s\""
|
||||
" class=\"INPUT_FULL_NAME\""
|
||||
" required=\"required\" />"
|
||||
"</td>",
|
||||
" required=\"required\" />",
|
||||
Hie_MAX_CHARS_FULL_NAME,Deg_EditingDeg->FullName);
|
||||
Tbl_EndCell ();
|
||||
|
||||
/***** Degree type *****/
|
||||
fprintf (Gbl.F.Out,"<td class=\"LEFT_MIDDLE\">"
|
||||
|
@ -1008,22 +1027,22 @@ static void Deg_PutFormToCreateDegree (void)
|
|||
"",
|
||||
DegTyp->DegTypName);
|
||||
}
|
||||
fprintf (Gbl.F.Out,"</select>"
|
||||
"</td>");
|
||||
fprintf (Gbl.F.Out,"</select>");
|
||||
Tbl_EndCell ();
|
||||
|
||||
/***** Degree WWW *****/
|
||||
fprintf (Gbl.F.Out,"<td class=\"LEFT_MIDDLE\">"
|
||||
"<input type=\"url\" name=\"WWW\""
|
||||
" maxlength=\"%u\" value=\"%s\""
|
||||
" class=\"INPUT_WWW\""
|
||||
" required=\"required\" />"
|
||||
"</td>",
|
||||
" required=\"required\" />",
|
||||
Cns_MAX_CHARS_WWW,Deg_EditingDeg->WWW);
|
||||
Tbl_EndCell ();
|
||||
|
||||
/***** Current number of courses in this degree *****/
|
||||
fprintf (Gbl.F.Out,"<td class=\"DAT RIGHT_MIDDLE\">"
|
||||
"0"
|
||||
"</td>");
|
||||
"0");
|
||||
Tbl_EndCell ();
|
||||
|
||||
/***** Degree requester *****/
|
||||
fprintf (Gbl.F.Out,"<td class=\"DAT INPUT_REQUESTER LEFT_TOP\">");
|
||||
|
@ -1031,8 +1050,9 @@ static void Deg_PutFormToCreateDegree (void)
|
|||
Tbl_EndCell ();
|
||||
|
||||
/***** Degree status *****/
|
||||
fprintf (Gbl.F.Out,"<td class=\"DAT LEFT_MIDDLE\">"
|
||||
"</td>");
|
||||
fprintf (Gbl.F.Out,"<td class=\"DAT LEFT_MIDDLE\">");
|
||||
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,"<td class=\"%s CENTER_MIDDLE %s\" title=\"%s\">"
|
||||
"%s"
|
||||
"</td>",
|
||||
"%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,"<td class=\"%s RIGHT_MIDDLE %s\">"
|
||||
"%u"
|
||||
"</td>",
|
||||
"%u",
|
||||
TxtClassNormal,BgColor,
|
||||
NumDeg);
|
||||
Tbl_EndCell ();
|
||||
|
||||
/***** Degree logo and name *****/
|
||||
fprintf (Gbl.F.Out,"<td class=\"LEFT_MIDDLE %s\">",BgColor);
|
||||
|
@ -1310,15 +1331,15 @@ static void Deg_ListOneDegreeForSeeing (struct Degree *Deg,unsigned NumDeg)
|
|||
|
||||
/***** Type of degree *****/
|
||||
fprintf (Gbl.F.Out,"<td class=\"%s LEFT_MIDDLE %s\">"
|
||||
"%s"
|
||||
"</td>",
|
||||
"%s",
|
||||
TxtClassNormal,BgColor,DegTyp.DegTypName);
|
||||
Tbl_EndCell ();
|
||||
|
||||
/***** Current number of courses in this degree *****/
|
||||
fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_MIDDLE %s\">"
|
||||
"%u"
|
||||
"</td>",
|
||||
"%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,"<td class=\"RIGHT_TOP COLOR%u\">"
|
||||
"<img src=\"%s/%s20x20.gif\""
|
||||
" alt=\"\" title=\"\""
|
||||
" class=\"ICO25x25\" />"
|
||||
"</td>",
|
||||
" class=\"ICO25x25\" />",
|
||||
Gbl.RowEvenOdd,Cfg_URL_ICON_PUBLIC,
|
||||
NumRow == NumRows ? "subend" :
|
||||
"submid");
|
||||
Tbl_EndCell ();
|
||||
|
||||
/***** Write institution, centre, degree *****/
|
||||
fprintf (Gbl.F.Out,"<td colspan=\"%u\""
|
||||
|
@ -2594,6 +2617,7 @@ void Hie_GetAndWriteInsCtrDegAdminBy (long UsrCod,unsigned ColSpan)
|
|||
break;
|
||||
}
|
||||
Tbl_EndCell ();
|
||||
|
||||
Tbl_EndRow ();
|
||||
}
|
||||
|
||||
|
|
|
@ -333,21 +333,22 @@ static void DT_ListDegreeTypesForSeeing (void)
|
|||
/* Number of degree type in this list */
|
||||
Tbl_StartRow ();
|
||||
fprintf (Gbl.F.Out,"<td class=\"DAT_N RIGHT_MIDDLE %s\">"
|
||||
"%u"
|
||||
"</td>",
|
||||
"%u",
|
||||
BgColor,NumDegTyp + 1);
|
||||
Tbl_EndCell ();
|
||||
|
||||
/* Name of degree type */
|
||||
fprintf (Gbl.F.Out,"<td class=\"DAT_N LEFT_MIDDLE %s\">"
|
||||
"%s"
|
||||
"</td>",
|
||||
"%s",
|
||||
BgColor,Gbl.DegTypes.Lst[NumDegTyp].DegTypName);
|
||||
Tbl_EndCell ();
|
||||
|
||||
/* Number of degrees of this type */
|
||||
fprintf (Gbl.F.Out,"<td class=\"DAT_N RIGHT_MIDDLE %s\">"
|
||||
"%u"
|
||||
"</td>",
|
||||
"%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,"<td class=\"BM\">");
|
||||
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,"</td>"
|
||||
"<td class=\"DAT CODE\">"
|
||||
"%ld"
|
||||
"</td>",
|
||||
fprintf (Gbl.F.Out,"<td class=\"DAT CODE\">"
|
||||
"%ld",
|
||||
Gbl.DegTypes.Lst[NumDegTyp].DegTypCod);
|
||||
Tbl_EndCell ();
|
||||
|
||||
/* Name of degree type */
|
||||
fprintf (Gbl.F.Out,"<td class=\"LEFT_MIDDLE\">");
|
||||
|
@ -435,9 +437,10 @@ static void DT_ListDegreeTypesForEdition (void)
|
|||
|
||||
/* Number of degrees of this type */
|
||||
fprintf (Gbl.F.Out,"<td class=\"DAT RIGHT_MIDDLE\">"
|
||||
"%u"
|
||||
"</td>",
|
||||
"%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,"<td class=\"BM\"></td>");
|
||||
|
||||
/***** Column to remove degree type, disabled here *****/
|
||||
fprintf (Gbl.F.Out,"<td class=\"BM\">");
|
||||
Tbl_EndCell ();
|
||||
|
||||
/***** Degree type code *****/
|
||||
fprintf (Gbl.F.Out,"<td class=\"CODE\"></td>");
|
||||
fprintf (Gbl.F.Out,"<td class=\"CODE\">");
|
||||
Tbl_EndCell ();
|
||||
|
||||
/***** Degree type name *****/
|
||||
fprintf (Gbl.F.Out,"<td class=\"LEFT_MIDDLE\">"
|
||||
"<input type=\"text\" name=\"DegTypName\""
|
||||
" size=\"25\" maxlength=\"%u\" value=\"%s\""
|
||||
" required=\"required\" />"
|
||||
"</td>",
|
||||
" required=\"required\" />",
|
||||
Deg_MAX_CHARS_DEGREE_TYPE_NAME,DT_EditingDegTyp->DegTypName);
|
||||
Tbl_EndCell ();
|
||||
|
||||
/***** Number of degrees of this degree type ****/
|
||||
fprintf (Gbl.F.Out,"<td class=\"DAT RIGHT_MIDDLE\">"
|
||||
"0"
|
||||
"</td>");
|
||||
"0");
|
||||
Tbl_EndCell ();
|
||||
|
||||
Tbl_EndRow ();
|
||||
|
||||
/***** End table, send button and end box *****/
|
||||
|
|
Loading…
Reference in New Issue