mirror of
https://github.com/acanas/swad-core.git
synced 2024-06-01 06:15:31 +02:00
Version19.31.22
This commit is contained in:
parent
82d003ba6d
commit
0af579adbd
|
@ -487,7 +487,7 @@ enscript -2 --landscape --color --file-align=2 --highlight --line-numbers -o - *
|
||||||
En OpenSWAD:
|
En OpenSWAD:
|
||||||
ps2pdf source.ps destination.pdf
|
ps2pdf source.ps destination.pdf
|
||||||
*/
|
*/
|
||||||
#define Log_PLATFORM_VERSION "SWAD 19.31.21 (2019-10-08)"
|
#define Log_PLATFORM_VERSION "SWAD 19.31.22 (2019-10-08)"
|
||||||
#define CSS_FILE "swad19.29.css"
|
#define CSS_FILE "swad19.29.css"
|
||||||
#define JS_FILE "swad19.30.js"
|
#define JS_FILE "swad19.30.js"
|
||||||
/*
|
/*
|
||||||
|
@ -495,6 +495,7 @@ ps2pdf source.ps destination.pdf
|
||||||
// TODO: Un TFG preasignado sin estudiante tiene que salir un triángulo amarillo
|
// TODO: Un TFG preasignado sin estudiante tiene que salir un triángulo amarillo
|
||||||
// TODO: Hacer un nuevo rol en los TFG: tutor externo (profesor de áreas no vinculadas con el centro, profesionales de empresas, etc.)
|
// TODO: Hacer un nuevo rol en los TFG: tutor externo (profesor de áreas no vinculadas con el centro, profesionales de empresas, etc.)
|
||||||
|
|
||||||
|
Version 19.31.22: Oct 08, 2019 Code refactoring in HTML tables. (247099 lines)
|
||||||
Version 19.31.21: Oct 08, 2019 Code refactoring in HTML tables. (247124 lines)
|
Version 19.31.21: Oct 08, 2019 Code refactoring in HTML tables. (247124 lines)
|
||||||
Version 19.31.20: Oct 07, 2019 Code refactoring in HTML tables. (247192 lines)
|
Version 19.31.20: Oct 07, 2019 Code refactoring in HTML tables. (247192 lines)
|
||||||
Version 19.31.19: Oct 07, 2019 Code refactoring in HTML tables. (247211 lines)
|
Version 19.31.19: Oct 07, 2019 Code refactoring in HTML tables. (247211 lines)
|
||||||
|
|
239
swad_course.c
239
swad_course.c
|
@ -240,13 +240,13 @@ static void Crs_Configuration (bool PrintView)
|
||||||
/***** Degree *****/
|
/***** Degree *****/
|
||||||
Tbl_StartRow ();
|
Tbl_StartRow ();
|
||||||
|
|
||||||
fprintf (Gbl.F.Out,"<td class=\"RIGHT_MIDDLE\">"
|
Tbl_StartCellAttr ("class=\"RIGHT_MIDDLE\"");
|
||||||
"<label for=\"OthDegCod\" class=\"%s\">%s:</label>",
|
fprintf (Gbl.F.Out,"<label for=\"OthDegCod\" class=\"%s\">%s:</label>",
|
||||||
The_ClassFormInBox[Gbl.Prefs.Theme],
|
The_ClassFormInBox[Gbl.Prefs.Theme],
|
||||||
Txt_Degree);
|
Txt_Degree);
|
||||||
Tbl_EndCell ();
|
Tbl_EndCell ();
|
||||||
|
|
||||||
fprintf (Gbl.F.Out,"<td class=\"DAT LEFT_MIDDLE\">");
|
Tbl_StartCellAttr ("class=\"DAT LEFT_MIDDLE\"");
|
||||||
|
|
||||||
if (!PrintView &&
|
if (!PrintView &&
|
||||||
Gbl.Usrs.Me.Role.Logged >= Rol_CTR_ADM)
|
Gbl.Usrs.Me.Role.Logged >= Rol_CTR_ADM)
|
||||||
|
@ -285,13 +285,13 @@ static void Crs_Configuration (bool PrintView)
|
||||||
/***** Course full name *****/
|
/***** Course full name *****/
|
||||||
Tbl_StartRow ();
|
Tbl_StartRow ();
|
||||||
|
|
||||||
fprintf (Gbl.F.Out,"<td class=\"RIGHT_MIDDLE\">"
|
Tbl_StartCellAttr ("class=\"RIGHT_MIDDLE\"");
|
||||||
"<label for=\"FullName\" class=\"%s\">%s:</label>",
|
fprintf (Gbl.F.Out,"<label for=\"FullName\" class=\"%s\">%s:</label>",
|
||||||
The_ClassFormInBox[Gbl.Prefs.Theme],
|
The_ClassFormInBox[Gbl.Prefs.Theme],
|
||||||
Txt_Course);
|
Txt_Course);
|
||||||
Tbl_EndCell ();
|
Tbl_EndCell ();
|
||||||
|
|
||||||
fprintf (Gbl.F.Out,"<td class=\"DAT_N LEFT_MIDDLE\">");
|
Tbl_StartCellAttr ("class=\"DAT_N LEFT_MIDDLE\"");
|
||||||
if (!PrintView &&
|
if (!PrintView &&
|
||||||
Gbl.Usrs.Me.Role.Logged >= Rol_DEG_ADM)
|
Gbl.Usrs.Me.Role.Logged >= Rol_DEG_ADM)
|
||||||
// Only degree admins, centre admins, institution admins and system admins can edit course full name
|
// Only degree admins, centre admins, institution admins and system admins can edit course full name
|
||||||
|
@ -317,15 +317,15 @@ static void Crs_Configuration (bool PrintView)
|
||||||
/***** Course short name *****/
|
/***** Course short name *****/
|
||||||
Tbl_StartRow ();
|
Tbl_StartRow ();
|
||||||
|
|
||||||
fprintf (Gbl.F.Out,"<td class=\"RIGHT_MIDDLE\">"
|
Tbl_StartCellAttr ("class=\"RIGHT_MIDDLE\"");
|
||||||
"<label for=\"ShortName\" class=\"%s\">%s:</label>",
|
fprintf (Gbl.F.Out,"<label for=\"ShortName\" class=\"%s\">%s:</label>",
|
||||||
The_ClassFormInBox[Gbl.Prefs.Theme],
|
The_ClassFormInBox[Gbl.Prefs.Theme],
|
||||||
Txt_Short_name);
|
Txt_Short_name);
|
||||||
Tbl_EndCell ();
|
Tbl_EndCell ();
|
||||||
|
|
||||||
Tbl_EndRow ();
|
Tbl_EndRow ();
|
||||||
|
|
||||||
fprintf (Gbl.F.Out,"<td class=\"DAT_N LEFT_MIDDLE\">");
|
Tbl_StartCellAttr ("class=\"DAT_N LEFT_MIDDLE\"");
|
||||||
if (!PrintView &&
|
if (!PrintView &&
|
||||||
Gbl.Usrs.Me.Role.Logged >= Rol_DEG_ADM)
|
Gbl.Usrs.Me.Role.Logged >= Rol_DEG_ADM)
|
||||||
// Only degree admins, centre admins, institution admins and system admins can edit course short name
|
// Only degree admins, centre admins, institution admins and system admins can edit course short name
|
||||||
|
@ -351,13 +351,13 @@ static void Crs_Configuration (bool PrintView)
|
||||||
IsForm = (!PrintView && Gbl.Usrs.Me.Role.Logged >= Rol_TCH);
|
IsForm = (!PrintView && Gbl.Usrs.Me.Role.Logged >= Rol_TCH);
|
||||||
Tbl_StartRow ();
|
Tbl_StartRow ();
|
||||||
|
|
||||||
fprintf (Gbl.F.Out,"<td class=\"RIGHT_MIDDLE\">"
|
Tbl_StartCellAttr ("class=\"RIGHT_MIDDLE\"");
|
||||||
"<label for=\"OthCrsYear\" class=\"%s\">%s:</label>",
|
fprintf (Gbl.F.Out,"<label for=\"OthCrsYear\" class=\"%s\">%s:</label>",
|
||||||
The_ClassFormInBox[Gbl.Prefs.Theme],
|
The_ClassFormInBox[Gbl.Prefs.Theme],
|
||||||
Txt_Year_OF_A_DEGREE);
|
Txt_Year_OF_A_DEGREE);
|
||||||
Tbl_EndRow ();
|
Tbl_EndRow ();
|
||||||
|
|
||||||
fprintf (Gbl.F.Out,"<td class=\"DAT LEFT_MIDDLE\">");
|
Tbl_StartCellAttr ("class=\"DAT LEFT_MIDDLE\"");
|
||||||
if (IsForm)
|
if (IsForm)
|
||||||
{
|
{
|
||||||
Frm_StartForm (ActChgCrsYeaCfg);
|
Frm_StartForm (ActChgCrsYeaCfg);
|
||||||
|
@ -387,13 +387,13 @@ static void Crs_Configuration (bool PrintView)
|
||||||
/***** Institutional code of the course *****/
|
/***** Institutional code of the course *****/
|
||||||
Tbl_StartRow ();
|
Tbl_StartRow ();
|
||||||
|
|
||||||
fprintf (Gbl.F.Out,"<td class=\"RIGHT_MIDDLE\">"
|
Tbl_StartCellAttr ("class=\"RIGHT_MIDDLE\"");
|
||||||
"<label for=\"InsCrsCod\" class=\"%s\">%s:</label>",
|
fprintf (Gbl.F.Out,"<label for=\"InsCrsCod\" class=\"%s\">%s:</label>",
|
||||||
The_ClassFormInBox[Gbl.Prefs.Theme],
|
The_ClassFormInBox[Gbl.Prefs.Theme],
|
||||||
Txt_Institutional_code);
|
Txt_Institutional_code);
|
||||||
Tbl_EndRow ();
|
Tbl_EndRow ();
|
||||||
|
|
||||||
fprintf (Gbl.F.Out,"<td class=\"DAT LEFT_MIDDLE\">");
|
Tbl_StartCellAttr ("class=\"DAT LEFT_MIDDLE\"");
|
||||||
if (IsForm)
|
if (IsForm)
|
||||||
{
|
{
|
||||||
Frm_StartForm (ActChgInsCrsCodCfg);
|
Frm_StartForm (ActChgInsCrsCodCfg);
|
||||||
|
@ -415,15 +415,12 @@ static void Crs_Configuration (bool PrintView)
|
||||||
/***** Internal code of the course *****/
|
/***** Internal code of the course *****/
|
||||||
Tbl_StartRow ();
|
Tbl_StartRow ();
|
||||||
|
|
||||||
fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_MIDDLE\">"
|
Tbl_StartCellAttr ("class=\"%s RIGHT_MIDDLE\"",The_ClassFormInBox[Gbl.Prefs.Theme]);
|
||||||
"%s:",
|
fprintf (Gbl.F.Out,"%s:",Txt_Internal_code);
|
||||||
The_ClassFormInBox[Gbl.Prefs.Theme],
|
|
||||||
Txt_Internal_code);
|
|
||||||
Tbl_EndRow ();
|
Tbl_EndRow ();
|
||||||
|
|
||||||
fprintf (Gbl.F.Out,"<td class=\"DAT LEFT_MIDDLE\">"
|
Tbl_StartCellAttr ("class=\"DAT LEFT_MIDDLE\"");
|
||||||
"%ld",
|
fprintf (Gbl.F.Out,"%ld",Gbl.Hierarchy.Crs.CrsCod);
|
||||||
Gbl.Hierarchy.Crs.CrsCod);
|
|
||||||
Tbl_EndRow ();
|
Tbl_EndRow ();
|
||||||
|
|
||||||
Tbl_EndRow ();
|
Tbl_EndRow ();
|
||||||
|
@ -432,14 +429,12 @@ static void Crs_Configuration (bool PrintView)
|
||||||
/***** Link to the course *****/
|
/***** Link to the course *****/
|
||||||
Tbl_StartRow ();
|
Tbl_StartRow ();
|
||||||
|
|
||||||
fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_MIDDLE\">"
|
Tbl_StartCellAttr ("class=\"%s RIGHT_MIDDLE\"",The_ClassFormInBox[Gbl.Prefs.Theme]);
|
||||||
"%s:",
|
fprintf (Gbl.F.Out,"%s:",Txt_Shortcut);
|
||||||
The_ClassFormInBox[Gbl.Prefs.Theme],
|
|
||||||
Txt_Shortcut);
|
|
||||||
Tbl_EndRow ();
|
Tbl_EndRow ();
|
||||||
|
|
||||||
fprintf (Gbl.F.Out,"<td class=\"DAT LEFT_MIDDLE\">"
|
Tbl_StartCellAttr ("class=\"DAT LEFT_MIDDLE\"");
|
||||||
"<a href=\"%s/%s?crs=%ld\" class=\"DAT\" target=\"_blank\">"
|
fprintf (Gbl.F.Out,"<a href=\"%s/%s?crs=%ld\" class=\"DAT\" target=\"_blank\">"
|
||||||
"%s/%s?crs=%ld</a>",
|
"%s/%s?crs=%ld</a>",
|
||||||
Cfg_URL_SWAD_CGI,
|
Cfg_URL_SWAD_CGI,
|
||||||
Lan_STR_LANG_ID[Gbl.Prefs.Language],
|
Lan_STR_LANG_ID[Gbl.Prefs.Language],
|
||||||
|
@ -456,13 +451,11 @@ static void Crs_Configuration (bool PrintView)
|
||||||
/***** QR code with link to the course *****/
|
/***** QR code with link to the course *****/
|
||||||
Tbl_StartRow ();
|
Tbl_StartRow ();
|
||||||
|
|
||||||
fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_MIDDLE\">"
|
Tbl_StartCellAttr ("class=\"%s RIGHT_MIDDLE\"",The_ClassFormInBox[Gbl.Prefs.Theme]);
|
||||||
"%s:",
|
fprintf (Gbl.F.Out,"%s:",Txt_QR_code);
|
||||||
The_ClassFormInBox[Gbl.Prefs.Theme],
|
|
||||||
Txt_QR_code);
|
|
||||||
Tbl_EndRow ();
|
Tbl_EndRow ();
|
||||||
|
|
||||||
fprintf (Gbl.F.Out,"<td class=\"DAT LEFT_MIDDLE\">");
|
Tbl_StartCellAttr ("class=\"DAT LEFT_MIDDLE\"");
|
||||||
QR_LinkTo (250,"crs",Gbl.Hierarchy.Crs.CrsCod);
|
QR_LinkTo (250,"crs",Gbl.Hierarchy.Crs.CrsCod);
|
||||||
Tbl_EndCell ();
|
Tbl_EndCell ();
|
||||||
|
|
||||||
|
@ -481,13 +474,11 @@ static void Crs_Configuration (bool PrintView)
|
||||||
NumIndicatorsFromDB,&Indicators);
|
NumIndicatorsFromDB,&Indicators);
|
||||||
Tbl_StartRow ();
|
Tbl_StartRow ();
|
||||||
|
|
||||||
fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_MIDDLE\">"
|
Tbl_StartCellAttr ("class=\"%s RIGHT_MIDDLE\"",The_ClassFormInBox[Gbl.Prefs.Theme]);
|
||||||
"%s:",
|
fprintf (Gbl.F.Out,"%s:",Txt_Indicators);
|
||||||
The_ClassFormInBox[Gbl.Prefs.Theme],
|
|
||||||
Txt_Indicators);
|
|
||||||
Tbl_EndRow ();
|
Tbl_EndRow ();
|
||||||
|
|
||||||
fprintf (Gbl.F.Out,"<td class=\"LEFT_MIDDLE\">");
|
Tbl_StartCellAttr ("class=\"LEFT_MIDDLE\"");
|
||||||
Frm_StartForm (ActReqStaCrs);
|
Frm_StartForm (ActReqStaCrs);
|
||||||
snprintf (Gbl.Title,sizeof (Gbl.Title),
|
snprintf (Gbl.Title,sizeof (Gbl.Title),
|
||||||
"%u %s %u",
|
"%u %s %u",
|
||||||
|
@ -534,15 +525,12 @@ static void Crs_ShowNumUsrsInCrs (Rol_Role_t Role)
|
||||||
|
|
||||||
Tbl_StartRow ();
|
Tbl_StartRow ();
|
||||||
|
|
||||||
fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_MIDDLE\">"
|
Tbl_StartCellAttr ("class=\"%s RIGHT_MIDDLE\"",The_ClassFormInBox[Gbl.Prefs.Theme]);
|
||||||
"%s:",
|
fprintf (Gbl.F.Out,"%s:",Txt_ROLES_PLURAL_Abc[Role][Usr_SEX_UNKNOWN]);
|
||||||
The_ClassFormInBox[Gbl.Prefs.Theme],
|
|
||||||
Txt_ROLES_PLURAL_Abc[Role][Usr_SEX_UNKNOWN]);
|
|
||||||
Tbl_EndRow ();
|
Tbl_EndRow ();
|
||||||
|
|
||||||
fprintf (Gbl.F.Out,"<td class=\"DAT LEFT_MIDDLE\">"
|
Tbl_StartCellAttr ("class=\"DAT LEFT_MIDDLE\"");
|
||||||
"%u",
|
fprintf (Gbl.F.Out,"%u",Gbl.Hierarchy.Crs.NumUsrs[Role]);
|
||||||
Gbl.Hierarchy.Crs.NumUsrs[Role]);
|
|
||||||
Tbl_EndRow ();
|
Tbl_EndRow ();
|
||||||
|
|
||||||
Tbl_EndRow ();
|
Tbl_EndRow ();
|
||||||
|
@ -1303,32 +1291,29 @@ static bool Crs_ListCoursesOfAYearForSeeing (unsigned Year)
|
||||||
Tbl_StartRow ();
|
Tbl_StartRow ();
|
||||||
|
|
||||||
/* Put green tip if course has users */
|
/* Put green tip if course has users */
|
||||||
fprintf (Gbl.F.Out,"<td class=\"%s CENTER_MIDDLE %s\" title=\"%s\">"
|
Tbl_StartCellAttr ("class=\"%s CENTER_MIDDLE %s\" title=\"%s\"",
|
||||||
"%s",
|
TxtClassNormal,BgColor,
|
||||||
TxtClassNormal,BgColor,
|
Crs->NumUsrs[Rol_UNK] ? Txt_COURSE_With_users :
|
||||||
Crs->NumUsrs[Rol_UNK] ? Txt_COURSE_With_users :
|
Txt_COURSE_Without_users);
|
||||||
Txt_COURSE_Without_users,
|
fprintf (Gbl.F.Out,"%s",Crs->NumUsrs[Rol_UNK] ? "✓" :
|
||||||
Crs->NumUsrs[Rol_UNK] ? "✓" :
|
" ");
|
||||||
" ");
|
|
||||||
Tbl_EndRow ();
|
Tbl_EndRow ();
|
||||||
|
|
||||||
/* Institutional code of the course */
|
/* Institutional code of the course */
|
||||||
fprintf (Gbl.F.Out,"<td class=\"%s CENTER_MIDDLE %s\">"
|
Tbl_StartCellAttr ("class=\"%s CENTER_MIDDLE %s\"",
|
||||||
"%s",
|
TxtClassNormal,BgColor);
|
||||||
TxtClassNormal,BgColor,
|
fprintf (Gbl.F.Out,"%s",Crs->InstitutionalCrsCod);
|
||||||
Crs->InstitutionalCrsCod);
|
|
||||||
Tbl_EndRow ();
|
Tbl_EndRow ();
|
||||||
|
|
||||||
/* Course year */
|
/* Course year */
|
||||||
fprintf (Gbl.F.Out,"<td class=\"%s CENTER_MIDDLE %s\">"
|
Tbl_StartCellAttr ("class=\"%s CENTER_MIDDLE %s\">",
|
||||||
"%s",
|
TxtClassNormal,BgColor);
|
||||||
TxtClassNormal,BgColor,
|
fprintf (Gbl.F.Out,"%s",Txt_YEAR_OF_DEGREE[Crs->Year]);
|
||||||
Txt_YEAR_OF_DEGREE[Crs->Year]);
|
|
||||||
Tbl_EndRow ();
|
Tbl_EndRow ();
|
||||||
|
|
||||||
/* Course full name */
|
/* Course full name */
|
||||||
fprintf (Gbl.F.Out,"<td class=\"%s LEFT_MIDDLE %s\">",
|
Tbl_StartCellAttr ("class=\"%s LEFT_MIDDLE %s\">",
|
||||||
TxtClassStrong,BgColor);
|
TxtClassStrong,BgColor);
|
||||||
Frm_StartFormGoTo (ActSeeCrsInf);
|
Frm_StartFormGoTo (ActSeeCrsInf);
|
||||||
Crs_PutParamCrsCod (Crs->CrsCod);
|
Crs_PutParamCrsCod (Crs->CrsCod);
|
||||||
snprintf (Gbl.Title,sizeof (Gbl.Title),
|
snprintf (Gbl.Title,sizeof (Gbl.Title),
|
||||||
|
@ -1341,24 +1326,22 @@ static bool Crs_ListCoursesOfAYearForSeeing (unsigned Year)
|
||||||
Tbl_EndCell ();
|
Tbl_EndCell ();
|
||||||
|
|
||||||
/* Current number of teachers in this course */
|
/* Current number of teachers in this course */
|
||||||
fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_MIDDLE %s\">"
|
Tbl_StartCellAttr ("class=\"%s RIGHT_MIDDLE %s\"",
|
||||||
"%u",
|
TxtClassNormal,BgColor);
|
||||||
TxtClassNormal,BgColor,
|
fprintf (Gbl.F.Out,"%u",Crs->NumUsrs[Rol_TCH] +
|
||||||
Crs->NumUsrs[Rol_TCH] +
|
Crs->NumUsrs[Rol_NET]);
|
||||||
Crs->NumUsrs[Rol_NET]);
|
|
||||||
Tbl_EndRow ();
|
Tbl_EndRow ();
|
||||||
|
|
||||||
/* Current number of students in this course */
|
/* Current number of students in this course */
|
||||||
fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_MIDDLE %s\">"
|
Tbl_StartCellAttr ("class=\"%s RIGHT_MIDDLE %s\"",
|
||||||
"%u",
|
TxtClassNormal,BgColor);
|
||||||
TxtClassNormal,BgColor,
|
fprintf (Gbl.F.Out,"%u",Crs->NumUsrs[Rol_STD]);
|
||||||
Crs->NumUsrs[Rol_STD]);
|
|
||||||
Tbl_EndRow ();
|
Tbl_EndRow ();
|
||||||
|
|
||||||
/* Course status */
|
/* Course status */
|
||||||
StatusTxt = Crs_GetStatusTxtFromStatusBits (Crs->Status);
|
StatusTxt = Crs_GetStatusTxtFromStatusBits (Crs->Status);
|
||||||
fprintf (Gbl.F.Out,"<td class=\"%s LEFT_MIDDLE %s\">",
|
Tbl_StartCellAttr ("class=\"%s LEFT_MIDDLE %s\"",
|
||||||
TxtClassNormal,BgColor);
|
TxtClassNormal,BgColor);
|
||||||
if (StatusTxt != Crs_STATUS_ACTIVE) // If active ==> do not show anything
|
if (StatusTxt != Crs_STATUS_ACTIVE) // If active ==> do not show anything
|
||||||
fprintf (Gbl.F.Out,"%s",Txt_COURSE_STATUS[StatusTxt]);
|
fprintf (Gbl.F.Out,"%s",Txt_COURSE_STATUS[StatusTxt]);
|
||||||
Tbl_EndCell ();
|
Tbl_EndCell ();
|
||||||
|
@ -1501,9 +1484,10 @@ static void Crs_ListCoursesOfAYearForEdition (unsigned Year)
|
||||||
{
|
{
|
||||||
ICanEdit = Crs_CheckIfICanEdit (Crs);
|
ICanEdit = Crs_CheckIfICanEdit (Crs);
|
||||||
|
|
||||||
/* Put icon to remove course */
|
|
||||||
Tbl_StartRow ();
|
Tbl_StartRow ();
|
||||||
fprintf (Gbl.F.Out,"<td class=\"BM\">");
|
|
||||||
|
/* Put icon to remove course */
|
||||||
|
Tbl_StartCellAttr ("class=\"BM\"");
|
||||||
if (Crs->NumUsrs[Rol_UNK] || // Course has users ==> deletion forbidden
|
if (Crs->NumUsrs[Rol_UNK] || // Course has users ==> deletion forbidden
|
||||||
!ICanEdit)
|
!ICanEdit)
|
||||||
Ico_PutIconRemovalNotAllowed ();
|
Ico_PutIconRemovalNotAllowed ();
|
||||||
|
@ -1517,13 +1501,12 @@ static void Crs_ListCoursesOfAYearForEdition (unsigned Year)
|
||||||
Tbl_EndCell ();
|
Tbl_EndCell ();
|
||||||
|
|
||||||
/* Course code */
|
/* Course code */
|
||||||
fprintf (Gbl.F.Out,"<td class=\"DAT CODE\">"
|
Tbl_StartCellAttr ("class=\"DAT CODE\"");
|
||||||
"%ld",
|
fprintf (Gbl.F.Out,"%ld",Crs->CrsCod);
|
||||||
Crs->CrsCod);
|
|
||||||
Tbl_EndRow ();
|
Tbl_EndRow ();
|
||||||
|
|
||||||
/* Institutional code of the course */
|
/* Institutional code of the course */
|
||||||
fprintf (Gbl.F.Out,"<td class=\"DAT CENTER_MIDDLE\">");
|
Tbl_StartCellAttr ("class=\"DAT CENTER_MIDDLE\"");
|
||||||
if (ICanEdit)
|
if (ICanEdit)
|
||||||
{
|
{
|
||||||
Frm_StartForm (ActChgInsCrsCod);
|
Frm_StartForm (ActChgInsCrsCod);
|
||||||
|
@ -1542,7 +1525,7 @@ static void Crs_ListCoursesOfAYearForEdition (unsigned Year)
|
||||||
Tbl_EndCell ();
|
Tbl_EndCell ();
|
||||||
|
|
||||||
/* Course year */
|
/* Course year */
|
||||||
fprintf (Gbl.F.Out,"<td class=\"DAT CENTER_MIDDLE\">");
|
Tbl_StartCellAttr ("class=\"DAT CENTER_MIDDLE\"");
|
||||||
if (ICanEdit)
|
if (ICanEdit)
|
||||||
{
|
{
|
||||||
Frm_StartForm (ActChgCrsYea);
|
Frm_StartForm (ActChgCrsYea);
|
||||||
|
@ -1567,7 +1550,7 @@ static void Crs_ListCoursesOfAYearForEdition (unsigned Year)
|
||||||
Tbl_EndCell ();
|
Tbl_EndCell ();
|
||||||
|
|
||||||
/* Course short name */
|
/* Course short name */
|
||||||
fprintf (Gbl.F.Out,"<td class=\"DAT LEFT_MIDDLE\">");
|
Tbl_StartCellAttr ("class=\"DAT LEFT_MIDDLE\"");
|
||||||
if (ICanEdit)
|
if (ICanEdit)
|
||||||
{
|
{
|
||||||
Frm_StartForm (ActRenCrsSho);
|
Frm_StartForm (ActRenCrsSho);
|
||||||
|
@ -1585,7 +1568,7 @@ static void Crs_ListCoursesOfAYearForEdition (unsigned Year)
|
||||||
Tbl_EndCell ();
|
Tbl_EndCell ();
|
||||||
|
|
||||||
/* Course full name */
|
/* Course full name */
|
||||||
fprintf (Gbl.F.Out,"<td class=\"DAT LEFT_MIDDLE\">");
|
Tbl_StartCellAttr ("class=\"DAT LEFT_MIDDLE\"");
|
||||||
if (ICanEdit)
|
if (ICanEdit)
|
||||||
{
|
{
|
||||||
Frm_StartForm (ActRenCrsFul);
|
Frm_StartForm (ActRenCrsFul);
|
||||||
|
@ -1603,28 +1586,26 @@ static void Crs_ListCoursesOfAYearForEdition (unsigned Year)
|
||||||
Tbl_EndCell ();
|
Tbl_EndCell ();
|
||||||
|
|
||||||
/* Current number of teachers in this course */
|
/* Current number of teachers in this course */
|
||||||
fprintf (Gbl.F.Out,"<td class=\"DAT RIGHT_MIDDLE\">"
|
Tbl_StartCellAttr ("class=\"DAT RIGHT_MIDDLE\"");
|
||||||
"%u",
|
fprintf (Gbl.F.Out,"%u",Crs->NumUsrs[Rol_TCH] +
|
||||||
Crs->NumUsrs[Rol_TCH] +
|
Crs->NumUsrs[Rol_NET]);
|
||||||
Crs->NumUsrs[Rol_NET]);
|
Tbl_EndCell ();
|
||||||
Tbl_EndRow ();
|
|
||||||
|
|
||||||
/* Current number of students in this course */
|
/* Current number of students in this course */
|
||||||
fprintf (Gbl.F.Out,"<td class=\"DAT RIGHT_MIDDLE\">"
|
Tbl_StartCellAttr ("class=\"DAT RIGHT_MIDDLE\"");
|
||||||
"%u",
|
fprintf (Gbl.F.Out,"%u",Crs->NumUsrs[Rol_STD]);
|
||||||
Crs->NumUsrs[Rol_STD]);
|
Tbl_EndCell ();
|
||||||
Tbl_EndRow ();
|
|
||||||
|
|
||||||
/* Course requester */
|
/* Course requester */
|
||||||
UsrDat.UsrCod = Crs->RequesterUsrCod;
|
UsrDat.UsrCod = Crs->RequesterUsrCod;
|
||||||
Usr_ChkUsrCodAndGetAllUsrDataFromUsrCod (&UsrDat,Usr_DONT_GET_PREFS);
|
Usr_ChkUsrCodAndGetAllUsrDataFromUsrCod (&UsrDat,Usr_DONT_GET_PREFS);
|
||||||
fprintf (Gbl.F.Out,"<td class=\"DAT INPUT_REQUESTER LEFT_TOP\">");
|
Tbl_StartCellAttr ("class=\"DAT INPUT_REQUESTER LEFT_TOP\"");
|
||||||
Msg_WriteMsgAuthor (&UsrDat,true,NULL);
|
Msg_WriteMsgAuthor (&UsrDat,true,NULL);
|
||||||
Tbl_EndCell ();
|
Tbl_EndCell ();
|
||||||
|
|
||||||
/* Course status */
|
/* Course status */
|
||||||
StatusTxt = Crs_GetStatusTxtFromStatusBits (Crs->Status);
|
StatusTxt = Crs_GetStatusTxtFromStatusBits (Crs->Status);
|
||||||
fprintf (Gbl.F.Out,"<td class=\"DAT LEFT_MIDDLE\">");
|
Tbl_StartCellAttr ("class=\"DAT LEFT_MIDDLE\"");
|
||||||
if (Gbl.Usrs.Me.Role.Logged >= Rol_DEG_ADM &&
|
if (Gbl.Usrs.Me.Role.Logged >= Rol_DEG_ADM &&
|
||||||
StatusTxt == Crs_STATUS_PENDING)
|
StatusTxt == Crs_STATUS_PENDING)
|
||||||
{
|
{
|
||||||
|
@ -1735,16 +1716,16 @@ static void Crs_PutFormToCreateCourse (void)
|
||||||
Tbl_StartRow ();
|
Tbl_StartRow ();
|
||||||
|
|
||||||
/***** Column to remove course, disabled here *****/
|
/***** Column to remove course, disabled here *****/
|
||||||
fprintf (Gbl.F.Out,"<td class=\"BM\">");
|
Tbl_StartCellAttr ("class=\"BM\"");
|
||||||
Tbl_EndRow ();
|
Tbl_EndRow ();
|
||||||
|
|
||||||
/***** Course code *****/
|
/***** Course code *****/
|
||||||
fprintf (Gbl.F.Out,"<td class=\"CODE\">");
|
Tbl_StartCellAttr ("class=\"CODE\"");
|
||||||
Tbl_EndRow ();
|
Tbl_EndRow ();
|
||||||
|
|
||||||
/***** Institutional code of the course *****/
|
/***** Institutional code of the course *****/
|
||||||
fprintf (Gbl.F.Out,"<td class=\"CENTER_MIDDLE\">"
|
Tbl_StartCellAttr ("class=\"CENTER_MIDDLE\"");
|
||||||
"<input type=\"text\" name=\"InsCrsCod\""
|
fprintf (Gbl.F.Out,"<input type=\"text\" name=\"InsCrsCod\""
|
||||||
" maxlength=\"%u\" value=\"%s\""
|
" maxlength=\"%u\" value=\"%s\""
|
||||||
" class=\"INPUT_INS_CODE\" />",
|
" class=\"INPUT_INS_CODE\" />",
|
||||||
Crs_MAX_CHARS_INSTITUTIONAL_CRS_COD,
|
Crs_MAX_CHARS_INSTITUTIONAL_CRS_COD,
|
||||||
|
@ -1752,8 +1733,8 @@ static void Crs_PutFormToCreateCourse (void)
|
||||||
Tbl_EndRow ();
|
Tbl_EndRow ();
|
||||||
|
|
||||||
/***** Year *****/
|
/***** Year *****/
|
||||||
fprintf (Gbl.F.Out,"<td class=\"CENTER_MIDDLE\">"
|
Tbl_StartCellAttr ("class=\"CENTER_MIDDLE\"");
|
||||||
"<select name=\"OthCrsYear\" style=\"width:50px;\">");
|
fprintf (Gbl.F.Out,"<select name=\"OthCrsYear\" style=\"width:50px;\">");
|
||||||
for (Year = 0;
|
for (Year = 0;
|
||||||
Year <= Deg_MAX_YEARS_PER_DEGREE;
|
Year <= Deg_MAX_YEARS_PER_DEGREE;
|
||||||
Year++)
|
Year++)
|
||||||
|
@ -1766,8 +1747,8 @@ static void Crs_PutFormToCreateCourse (void)
|
||||||
Tbl_EndRow ();
|
Tbl_EndRow ();
|
||||||
|
|
||||||
/***** Course short name *****/
|
/***** Course short name *****/
|
||||||
fprintf (Gbl.F.Out,"<td class=\"LEFT_MIDDLE\">"
|
Tbl_StartCellAttr ("class=\"LEFT_MIDDLE\"");
|
||||||
"<input type=\"text\" name=\"ShortName\""
|
fprintf (Gbl.F.Out,"<input type=\"text\" name=\"ShortName\""
|
||||||
" maxlength=\"%u\" value=\"%s\""
|
" maxlength=\"%u\" value=\"%s\""
|
||||||
" class=\"INPUT_SHORT_NAME\""
|
" class=\"INPUT_SHORT_NAME\""
|
||||||
" required=\"required\" />",
|
" required=\"required\" />",
|
||||||
|
@ -1775,8 +1756,8 @@ static void Crs_PutFormToCreateCourse (void)
|
||||||
Tbl_EndRow ();
|
Tbl_EndRow ();
|
||||||
|
|
||||||
/***** Course full name *****/
|
/***** Course full name *****/
|
||||||
fprintf (Gbl.F.Out,"<td class=\"LEFT_MIDDLE\">"
|
Tbl_StartCellAttr ("class=\"LEFT_MIDDLE\"");
|
||||||
"<input type=\"text\" name=\"FullName\""
|
fprintf (Gbl.F.Out,"<input type=\"text\" name=\"FullName\""
|
||||||
" maxlength=\"%u\" value=\"%s\""
|
" maxlength=\"%u\" value=\"%s\""
|
||||||
" class=\"INPUT_FULL_NAME\""
|
" class=\"INPUT_FULL_NAME\""
|
||||||
" required=\"required\" />",
|
" required=\"required\" />",
|
||||||
|
@ -1784,22 +1765,22 @@ static void Crs_PutFormToCreateCourse (void)
|
||||||
Tbl_EndRow ();
|
Tbl_EndRow ();
|
||||||
|
|
||||||
/***** Current number of teachers in this course *****/
|
/***** Current number of teachers in this course *****/
|
||||||
fprintf (Gbl.F.Out,"<td class=\"DAT RIGHT_MIDDLE\">"
|
Tbl_StartCellAttr ("class=\"DAT RIGHT_MIDDLE\"");
|
||||||
"0");
|
fprintf (Gbl.F.Out,"0");
|
||||||
Tbl_EndRow ();
|
Tbl_EndRow ();
|
||||||
|
|
||||||
/***** Current number of students in this course *****/
|
/***** Current number of students in this course *****/
|
||||||
fprintf (Gbl.F.Out,"<td class=\"DAT RIGHT_MIDDLE\">"
|
Tbl_StartCellAttr ("class=\"DAT RIGHT_MIDDLE\"");
|
||||||
"0");
|
fprintf (Gbl.F.Out,"0");
|
||||||
Tbl_EndRow ();
|
Tbl_EndRow ();
|
||||||
|
|
||||||
/***** Course requester *****/
|
/***** Course requester *****/
|
||||||
fprintf (Gbl.F.Out,"<td class=\"DAT INPUT_REQUESTER LEFT_TOP\">");
|
Tbl_StartCellAttr ("class=\"DAT INPUT_REQUESTER LEFT_TOP\"");
|
||||||
Msg_WriteMsgAuthor (&Gbl.Usrs.Me.UsrDat,true,NULL);
|
Msg_WriteMsgAuthor (&Gbl.Usrs.Me.UsrDat,true,NULL);
|
||||||
Tbl_EndCell ();
|
Tbl_EndCell ();
|
||||||
|
|
||||||
/***** Course status *****/
|
/***** Course status *****/
|
||||||
fprintf (Gbl.F.Out,"<td class=\"DAT LEFT_MIDDLE\">");
|
Tbl_StartCellAttr ("class=\"DAT LEFT_MIDDLE\"");
|
||||||
Tbl_EndRow ();
|
Tbl_EndRow ();
|
||||||
|
|
||||||
Tbl_EndRow ();
|
Tbl_EndRow ();
|
||||||
|
@ -3315,26 +3296,24 @@ static void Crs_WriteRowCrsData (unsigned NumCrs,MYSQL_ROW row,bool WriteColumnA
|
||||||
if (WriteColumnAccepted)
|
if (WriteColumnAccepted)
|
||||||
{
|
{
|
||||||
Accepted = (row[7][0] == 'Y');
|
Accepted = (row[7][0] == 'Y');
|
||||||
fprintf (Gbl.F.Out,"<td class=\"BT %s\" title=\"%s\">"
|
Tbl_StartCellAttr ("class=\"BT %s\" title=\"%s\"",
|
||||||
"%s",
|
BgColor,
|
||||||
BgColor,
|
Accepted ? Txt_Enrolment_confirmed :
|
||||||
Accepted ? Txt_Enrolment_confirmed :
|
Txt_Enrolment_not_confirmed);
|
||||||
Txt_Enrolment_not_confirmed,
|
fprintf (Gbl.F.Out,"%s",
|
||||||
Accepted ? "✓" :
|
Accepted ? "✓" :
|
||||||
"✗");
|
"✗");
|
||||||
Tbl_EndRow ();
|
Tbl_EndRow ();
|
||||||
}
|
}
|
||||||
|
|
||||||
/***** Write number of course in this search *****/
|
/***** Write number of course in this search *****/
|
||||||
fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_TOP %s\">"
|
Tbl_StartCellAttr ("class=\"%s RIGHT_TOP %s\"",StyleNoBR,BgColor);
|
||||||
"%u",
|
fprintf (Gbl.F.Out,"%u",NumCrs);
|
||||||
StyleNoBR,BgColor,NumCrs);
|
|
||||||
Tbl_EndRow ();
|
Tbl_EndRow ();
|
||||||
|
|
||||||
/***** Write degree logo, degree short name (row[2])
|
/***** Write degree logo, degree short name (row[2])
|
||||||
and centre short name (row[6]) *****/
|
and centre short name (row[6]) *****/
|
||||||
fprintf (Gbl.F.Out,"<td class=\"%s LEFT_TOP %s\">",
|
Tbl_StartCellAttr ("class=\"%s LEFT_TOP %s\"",StyleNoBR,BgColor);
|
||||||
StyleNoBR,BgColor);
|
|
||||||
Frm_StartFormGoTo (ActSeeDegInf);
|
Frm_StartFormGoTo (ActSeeDegInf);
|
||||||
Deg_PutParamDegCod (Deg.DegCod);
|
Deg_PutParamDegCod (Deg.DegCod);
|
||||||
snprintf (Gbl.Title,sizeof (Gbl.Title),
|
snprintf (Gbl.Title,sizeof (Gbl.Title),
|
||||||
|
@ -3349,14 +3328,12 @@ static void Crs_WriteRowCrsData (unsigned NumCrs,MYSQL_ROW row,bool WriteColumnA
|
||||||
Tbl_EndCell ();
|
Tbl_EndCell ();
|
||||||
|
|
||||||
/***** Write year (row[4]) *****/
|
/***** Write year (row[4]) *****/
|
||||||
fprintf (Gbl.F.Out,"<td class=\"%s CENTER_TOP %s\">"
|
Tbl_StartCellAttr ("class=\"%s CENTER_TOP %s\"",Style,BgColor);
|
||||||
"%s",
|
fprintf (Gbl.F.Out,"%s",Txt_YEAR_OF_DEGREE[Deg_ConvStrToYear (row[4])]);
|
||||||
Style,BgColor,Txt_YEAR_OF_DEGREE[Deg_ConvStrToYear (row[4])]);
|
|
||||||
Tbl_EndRow ();
|
Tbl_EndRow ();
|
||||||
|
|
||||||
/***** Write course full name (row[5]) *****/
|
/***** Write course full name (row[5]) *****/
|
||||||
fprintf (Gbl.F.Out,"<td class=\"%s LEFT_TOP %s\">",
|
Tbl_StartCellAttr ("class=\"%s LEFT_TOP %s\"",Style,BgColor);
|
||||||
Style,BgColor);
|
|
||||||
Frm_StartFormGoTo (ActSeeCrsInf);
|
Frm_StartFormGoTo (ActSeeCrsInf);
|
||||||
Crs_PutParamCrsCod (CrsCod);
|
Crs_PutParamCrsCod (CrsCod);
|
||||||
snprintf (Gbl.Title,sizeof (Gbl.Title),
|
snprintf (Gbl.Title,sizeof (Gbl.Title),
|
||||||
|
@ -3368,16 +3345,14 @@ static void Crs_WriteRowCrsData (unsigned NumCrs,MYSQL_ROW row,bool WriteColumnA
|
||||||
Tbl_EndCell ();
|
Tbl_EndCell ();
|
||||||
|
|
||||||
/***** Write number of teachers in course *****/
|
/***** Write number of teachers in course *****/
|
||||||
fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_TOP %s\">"
|
Tbl_StartCellAttr ("class=\"%s RIGHT_TOP %s\"",Style,BgColor);
|
||||||
"%u",
|
fprintf (Gbl.F.Out,"%u",NumTchs);
|
||||||
Style,BgColor,NumTchs);
|
Tbl_EndCell ();
|
||||||
Tbl_EndRow ();
|
|
||||||
|
|
||||||
/***** Write number of students in course *****/
|
/***** Write number of students in course *****/
|
||||||
fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_TOP %s\">"
|
Tbl_StartCellAttr ("class=\"%s RIGHT_TOP %s\"",Style,BgColor);
|
||||||
"%u",
|
fprintf (Gbl.F.Out,"%u",NumStds);
|
||||||
Style,BgColor,NumStds);
|
Tbl_EndCell ();
|
||||||
Tbl_EndRow ();
|
|
||||||
|
|
||||||
Tbl_EndRow ();
|
Tbl_EndRow ();
|
||||||
|
|
||||||
|
|
|
@ -234,7 +234,7 @@ void Tbl_StartCellAttr (const char *fmt,...)
|
||||||
|
|
||||||
/***** Print HTML *****/
|
/***** Print HTML *****/
|
||||||
fprintf (Gbl.F.Out,
|
fprintf (Gbl.F.Out,
|
||||||
"<tr %s>",Attr);
|
"<td %s>",Attr);
|
||||||
|
|
||||||
free ((void *) Attr);
|
free ((void *) Attr);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user