mirror of https://github.com/acanas/swad-core.git
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:
|
||||
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 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: 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.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)
|
||||
|
|
239
swad_course.c
239
swad_course.c
|
@ -240,13 +240,13 @@ static void Crs_Configuration (bool PrintView)
|
|||
/***** Degree *****/
|
||||
Tbl_StartRow ();
|
||||
|
||||
fprintf (Gbl.F.Out,"<td class=\"RIGHT_MIDDLE\">"
|
||||
"<label for=\"OthDegCod\" class=\"%s\">%s:</label>",
|
||||
Tbl_StartCellAttr ("class=\"RIGHT_MIDDLE\"");
|
||||
fprintf (Gbl.F.Out,"<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\">");
|
||||
Tbl_StartCellAttr ("class=\"DAT LEFT_MIDDLE\"");
|
||||
|
||||
if (!PrintView &&
|
||||
Gbl.Usrs.Me.Role.Logged >= Rol_CTR_ADM)
|
||||
|
@ -285,13 +285,13 @@ static void Crs_Configuration (bool PrintView)
|
|||
/***** Course full name *****/
|
||||
Tbl_StartRow ();
|
||||
|
||||
fprintf (Gbl.F.Out,"<td class=\"RIGHT_MIDDLE\">"
|
||||
"<label for=\"FullName\" class=\"%s\">%s:</label>",
|
||||
Tbl_StartCellAttr ("class=\"RIGHT_MIDDLE\"");
|
||||
fprintf (Gbl.F.Out,"<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\">");
|
||||
Tbl_StartCellAttr ("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
|
||||
|
@ -317,15 +317,15 @@ static void Crs_Configuration (bool PrintView)
|
|||
/***** Course short name *****/
|
||||
Tbl_StartRow ();
|
||||
|
||||
fprintf (Gbl.F.Out,"<td class=\"RIGHT_MIDDLE\">"
|
||||
"<label for=\"ShortName\" class=\"%s\">%s:</label>",
|
||||
Tbl_StartCellAttr ("class=\"RIGHT_MIDDLE\"");
|
||||
fprintf (Gbl.F.Out,"<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\">");
|
||||
Tbl_StartCellAttr ("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
|
||||
|
@ -351,13 +351,13 @@ static void Crs_Configuration (bool PrintView)
|
|||
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>",
|
||||
Tbl_StartCellAttr ("class=\"RIGHT_MIDDLE\"");
|
||||
fprintf (Gbl.F.Out,"<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\">");
|
||||
Tbl_StartCellAttr ("class=\"DAT LEFT_MIDDLE\"");
|
||||
if (IsForm)
|
||||
{
|
||||
Frm_StartForm (ActChgCrsYeaCfg);
|
||||
|
@ -387,13 +387,13 @@ 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>",
|
||||
Tbl_StartCellAttr ("class=\"RIGHT_MIDDLE\"");
|
||||
fprintf (Gbl.F.Out,"<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\">");
|
||||
Tbl_StartCellAttr ("class=\"DAT LEFT_MIDDLE\"");
|
||||
if (IsForm)
|
||||
{
|
||||
Frm_StartForm (ActChgInsCrsCodCfg);
|
||||
|
@ -415,15 +415,12 @@ static void Crs_Configuration (bool PrintView)
|
|||
/***** Internal code of the course *****/
|
||||
Tbl_StartRow ();
|
||||
|
||||
fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_MIDDLE\">"
|
||||
"%s:",
|
||||
The_ClassFormInBox[Gbl.Prefs.Theme],
|
||||
Txt_Internal_code);
|
||||
Tbl_StartCellAttr ("class=\"%s RIGHT_MIDDLE\"",The_ClassFormInBox[Gbl.Prefs.Theme]);
|
||||
fprintf (Gbl.F.Out,"%s:",Txt_Internal_code);
|
||||
Tbl_EndRow ();
|
||||
|
||||
fprintf (Gbl.F.Out,"<td class=\"DAT LEFT_MIDDLE\">"
|
||||
"%ld",
|
||||
Gbl.Hierarchy.Crs.CrsCod);
|
||||
Tbl_StartCellAttr ("class=\"DAT LEFT_MIDDLE\"");
|
||||
fprintf (Gbl.F.Out,"%ld",Gbl.Hierarchy.Crs.CrsCod);
|
||||
Tbl_EndRow ();
|
||||
|
||||
Tbl_EndRow ();
|
||||
|
@ -432,14 +429,12 @@ static void Crs_Configuration (bool PrintView)
|
|||
/***** Link to the course *****/
|
||||
Tbl_StartRow ();
|
||||
|
||||
fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_MIDDLE\">"
|
||||
"%s:",
|
||||
The_ClassFormInBox[Gbl.Prefs.Theme],
|
||||
Txt_Shortcut);
|
||||
Tbl_StartCellAttr ("class=\"%s RIGHT_MIDDLE\"",The_ClassFormInBox[Gbl.Prefs.Theme]);
|
||||
fprintf (Gbl.F.Out,"%s:",Txt_Shortcut);
|
||||
Tbl_EndRow ();
|
||||
|
||||
fprintf (Gbl.F.Out,"<td class=\"DAT LEFT_MIDDLE\">"
|
||||
"<a href=\"%s/%s?crs=%ld\" class=\"DAT\" target=\"_blank\">"
|
||||
Tbl_StartCellAttr ("class=\"DAT LEFT_MIDDLE\"");
|
||||
fprintf (Gbl.F.Out,"<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],
|
||||
|
@ -456,13 +451,11 @@ static void Crs_Configuration (bool PrintView)
|
|||
/***** QR code with link to the course *****/
|
||||
Tbl_StartRow ();
|
||||
|
||||
fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_MIDDLE\">"
|
||||
"%s:",
|
||||
The_ClassFormInBox[Gbl.Prefs.Theme],
|
||||
Txt_QR_code);
|
||||
Tbl_StartCellAttr ("class=\"%s RIGHT_MIDDLE\"",The_ClassFormInBox[Gbl.Prefs.Theme]);
|
||||
fprintf (Gbl.F.Out,"%s:",Txt_QR_code);
|
||||
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);
|
||||
Tbl_EndCell ();
|
||||
|
||||
|
@ -481,13 +474,11 @@ static void Crs_Configuration (bool PrintView)
|
|||
NumIndicatorsFromDB,&Indicators);
|
||||
Tbl_StartRow ();
|
||||
|
||||
fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_MIDDLE\">"
|
||||
"%s:",
|
||||
The_ClassFormInBox[Gbl.Prefs.Theme],
|
||||
Txt_Indicators);
|
||||
Tbl_StartCellAttr ("class=\"%s RIGHT_MIDDLE\"",The_ClassFormInBox[Gbl.Prefs.Theme]);
|
||||
fprintf (Gbl.F.Out,"%s:",Txt_Indicators);
|
||||
Tbl_EndRow ();
|
||||
|
||||
fprintf (Gbl.F.Out,"<td class=\"LEFT_MIDDLE\">");
|
||||
Tbl_StartCellAttr ("class=\"LEFT_MIDDLE\"");
|
||||
Frm_StartForm (ActReqStaCrs);
|
||||
snprintf (Gbl.Title,sizeof (Gbl.Title),
|
||||
"%u %s %u",
|
||||
|
@ -534,15 +525,12 @@ static void Crs_ShowNumUsrsInCrs (Rol_Role_t Role)
|
|||
|
||||
Tbl_StartRow ();
|
||||
|
||||
fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_MIDDLE\">"
|
||||
"%s:",
|
||||
The_ClassFormInBox[Gbl.Prefs.Theme],
|
||||
Txt_ROLES_PLURAL_Abc[Role][Usr_SEX_UNKNOWN]);
|
||||
Tbl_StartCellAttr ("class=\"%s RIGHT_MIDDLE\"",The_ClassFormInBox[Gbl.Prefs.Theme]);
|
||||
fprintf (Gbl.F.Out,"%s:",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_StartCellAttr ("class=\"DAT LEFT_MIDDLE\"");
|
||||
fprintf (Gbl.F.Out,"%u",Gbl.Hierarchy.Crs.NumUsrs[Role]);
|
||||
Tbl_EndRow ();
|
||||
|
||||
Tbl_EndRow ();
|
||||
|
@ -1303,32 +1291,29 @@ static bool Crs_ListCoursesOfAYearForSeeing (unsigned Year)
|
|||
Tbl_StartRow ();
|
||||
|
||||
/* Put green tip if course has users */
|
||||
fprintf (Gbl.F.Out,"<td class=\"%s CENTER_MIDDLE %s\" title=\"%s\">"
|
||||
"%s",
|
||||
TxtClassNormal,BgColor,
|
||||
Crs->NumUsrs[Rol_UNK] ? Txt_COURSE_With_users :
|
||||
Txt_COURSE_Without_users,
|
||||
Crs->NumUsrs[Rol_UNK] ? "✓" :
|
||||
" ");
|
||||
Tbl_StartCellAttr ("class=\"%s CENTER_MIDDLE %s\" title=\"%s\"",
|
||||
TxtClassNormal,BgColor,
|
||||
Crs->NumUsrs[Rol_UNK] ? Txt_COURSE_With_users :
|
||||
Txt_COURSE_Without_users);
|
||||
fprintf (Gbl.F.Out,"%s",Crs->NumUsrs[Rol_UNK] ? "✓" :
|
||||
" ");
|
||||
Tbl_EndRow ();
|
||||
|
||||
/* Institutional code of the course */
|
||||
fprintf (Gbl.F.Out,"<td class=\"%s CENTER_MIDDLE %s\">"
|
||||
"%s",
|
||||
TxtClassNormal,BgColor,
|
||||
Crs->InstitutionalCrsCod);
|
||||
Tbl_StartCellAttr ("class=\"%s CENTER_MIDDLE %s\"",
|
||||
TxtClassNormal,BgColor);
|
||||
fprintf (Gbl.F.Out,"%s",Crs->InstitutionalCrsCod);
|
||||
Tbl_EndRow ();
|
||||
|
||||
/* Course year */
|
||||
fprintf (Gbl.F.Out,"<td class=\"%s CENTER_MIDDLE %s\">"
|
||||
"%s",
|
||||
TxtClassNormal,BgColor,
|
||||
Txt_YEAR_OF_DEGREE[Crs->Year]);
|
||||
Tbl_StartCellAttr ("class=\"%s CENTER_MIDDLE %s\">",
|
||||
TxtClassNormal,BgColor);
|
||||
fprintf (Gbl.F.Out,"%s",Txt_YEAR_OF_DEGREE[Crs->Year]);
|
||||
Tbl_EndRow ();
|
||||
|
||||
/* Course full name */
|
||||
fprintf (Gbl.F.Out,"<td class=\"%s LEFT_MIDDLE %s\">",
|
||||
TxtClassStrong,BgColor);
|
||||
Tbl_StartCellAttr ("class=\"%s LEFT_MIDDLE %s\">",
|
||||
TxtClassStrong,BgColor);
|
||||
Frm_StartFormGoTo (ActSeeCrsInf);
|
||||
Crs_PutParamCrsCod (Crs->CrsCod);
|
||||
snprintf (Gbl.Title,sizeof (Gbl.Title),
|
||||
|
@ -1341,24 +1326,22 @@ static bool Crs_ListCoursesOfAYearForSeeing (unsigned Year)
|
|||
Tbl_EndCell ();
|
||||
|
||||
/* Current number of teachers in this course */
|
||||
fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_MIDDLE %s\">"
|
||||
"%u",
|
||||
TxtClassNormal,BgColor,
|
||||
Crs->NumUsrs[Rol_TCH] +
|
||||
Crs->NumUsrs[Rol_NET]);
|
||||
Tbl_StartCellAttr ("class=\"%s RIGHT_MIDDLE %s\"",
|
||||
TxtClassNormal,BgColor);
|
||||
fprintf (Gbl.F.Out,"%u",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",
|
||||
TxtClassNormal,BgColor,
|
||||
Crs->NumUsrs[Rol_STD]);
|
||||
Tbl_StartCellAttr ("class=\"%s RIGHT_MIDDLE %s\"",
|
||||
TxtClassNormal,BgColor);
|
||||
fprintf (Gbl.F.Out,"%u",Crs->NumUsrs[Rol_STD]);
|
||||
Tbl_EndRow ();
|
||||
|
||||
/* Course status */
|
||||
StatusTxt = Crs_GetStatusTxtFromStatusBits (Crs->Status);
|
||||
fprintf (Gbl.F.Out,"<td class=\"%s LEFT_MIDDLE %s\">",
|
||||
TxtClassNormal,BgColor);
|
||||
Tbl_StartCellAttr ("class=\"%s LEFT_MIDDLE %s\"",
|
||||
TxtClassNormal,BgColor);
|
||||
if (StatusTxt != Crs_STATUS_ACTIVE) // If active ==> do not show anything
|
||||
fprintf (Gbl.F.Out,"%s",Txt_COURSE_STATUS[StatusTxt]);
|
||||
Tbl_EndCell ();
|
||||
|
@ -1501,9 +1484,10 @@ static void Crs_ListCoursesOfAYearForEdition (unsigned Year)
|
|||
{
|
||||
ICanEdit = Crs_CheckIfICanEdit (Crs);
|
||||
|
||||
/* Put icon to remove course */
|
||||
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
|
||||
!ICanEdit)
|
||||
Ico_PutIconRemovalNotAllowed ();
|
||||
|
@ -1517,13 +1501,12 @@ static void Crs_ListCoursesOfAYearForEdition (unsigned Year)
|
|||
Tbl_EndCell ();
|
||||
|
||||
/* Course code */
|
||||
fprintf (Gbl.F.Out,"<td class=\"DAT CODE\">"
|
||||
"%ld",
|
||||
Crs->CrsCod);
|
||||
Tbl_StartCellAttr ("class=\"DAT CODE\"");
|
||||
fprintf (Gbl.F.Out,"%ld",Crs->CrsCod);
|
||||
Tbl_EndRow ();
|
||||
|
||||
/* Institutional code of the course */
|
||||
fprintf (Gbl.F.Out,"<td class=\"DAT CENTER_MIDDLE\">");
|
||||
Tbl_StartCellAttr ("class=\"DAT CENTER_MIDDLE\"");
|
||||
if (ICanEdit)
|
||||
{
|
||||
Frm_StartForm (ActChgInsCrsCod);
|
||||
|
@ -1542,7 +1525,7 @@ static void Crs_ListCoursesOfAYearForEdition (unsigned Year)
|
|||
Tbl_EndCell ();
|
||||
|
||||
/* Course year */
|
||||
fprintf (Gbl.F.Out,"<td class=\"DAT CENTER_MIDDLE\">");
|
||||
Tbl_StartCellAttr ("class=\"DAT CENTER_MIDDLE\"");
|
||||
if (ICanEdit)
|
||||
{
|
||||
Frm_StartForm (ActChgCrsYea);
|
||||
|
@ -1567,7 +1550,7 @@ static void Crs_ListCoursesOfAYearForEdition (unsigned Year)
|
|||
Tbl_EndCell ();
|
||||
|
||||
/* Course short name */
|
||||
fprintf (Gbl.F.Out,"<td class=\"DAT LEFT_MIDDLE\">");
|
||||
Tbl_StartCellAttr ("class=\"DAT LEFT_MIDDLE\"");
|
||||
if (ICanEdit)
|
||||
{
|
||||
Frm_StartForm (ActRenCrsSho);
|
||||
|
@ -1585,7 +1568,7 @@ static void Crs_ListCoursesOfAYearForEdition (unsigned Year)
|
|||
Tbl_EndCell ();
|
||||
|
||||
/* Course full name */
|
||||
fprintf (Gbl.F.Out,"<td class=\"DAT LEFT_MIDDLE\">");
|
||||
Tbl_StartCellAttr ("class=\"DAT LEFT_MIDDLE\"");
|
||||
if (ICanEdit)
|
||||
{
|
||||
Frm_StartForm (ActRenCrsFul);
|
||||
|
@ -1603,28 +1586,26 @@ static void Crs_ListCoursesOfAYearForEdition (unsigned Year)
|
|||
Tbl_EndCell ();
|
||||
|
||||
/* Current number of teachers in this course */
|
||||
fprintf (Gbl.F.Out,"<td class=\"DAT RIGHT_MIDDLE\">"
|
||||
"%u",
|
||||
Crs->NumUsrs[Rol_TCH] +
|
||||
Crs->NumUsrs[Rol_NET]);
|
||||
Tbl_EndRow ();
|
||||
Tbl_StartCellAttr ("class=\"DAT RIGHT_MIDDLE\"");
|
||||
fprintf (Gbl.F.Out,"%u",Crs->NumUsrs[Rol_TCH] +
|
||||
Crs->NumUsrs[Rol_NET]);
|
||||
Tbl_EndCell ();
|
||||
|
||||
/* Current number of students in this course */
|
||||
fprintf (Gbl.F.Out,"<td class=\"DAT RIGHT_MIDDLE\">"
|
||||
"%u",
|
||||
Crs->NumUsrs[Rol_STD]);
|
||||
Tbl_EndRow ();
|
||||
Tbl_StartCellAttr ("class=\"DAT RIGHT_MIDDLE\"");
|
||||
fprintf (Gbl.F.Out,"%u",Crs->NumUsrs[Rol_STD]);
|
||||
Tbl_EndCell ();
|
||||
|
||||
/* Course requester */
|
||||
UsrDat.UsrCod = Crs->RequesterUsrCod;
|
||||
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);
|
||||
Tbl_EndCell ();
|
||||
|
||||
/* Course 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 &&
|
||||
StatusTxt == Crs_STATUS_PENDING)
|
||||
{
|
||||
|
@ -1735,16 +1716,16 @@ static void Crs_PutFormToCreateCourse (void)
|
|||
Tbl_StartRow ();
|
||||
|
||||
/***** Column to remove course, disabled here *****/
|
||||
fprintf (Gbl.F.Out,"<td class=\"BM\">");
|
||||
Tbl_StartCellAttr ("class=\"BM\"");
|
||||
Tbl_EndRow ();
|
||||
|
||||
/***** Course code *****/
|
||||
fprintf (Gbl.F.Out,"<td class=\"CODE\">");
|
||||
Tbl_StartCellAttr ("class=\"CODE\"");
|
||||
Tbl_EndRow ();
|
||||
|
||||
/***** Institutional code of the course *****/
|
||||
fprintf (Gbl.F.Out,"<td class=\"CENTER_MIDDLE\">"
|
||||
"<input type=\"text\" name=\"InsCrsCod\""
|
||||
Tbl_StartCellAttr ("class=\"CENTER_MIDDLE\"");
|
||||
fprintf (Gbl.F.Out,"<input type=\"text\" name=\"InsCrsCod\""
|
||||
" maxlength=\"%u\" value=\"%s\""
|
||||
" class=\"INPUT_INS_CODE\" />",
|
||||
Crs_MAX_CHARS_INSTITUTIONAL_CRS_COD,
|
||||
|
@ -1752,8 +1733,8 @@ static void Crs_PutFormToCreateCourse (void)
|
|||
Tbl_EndRow ();
|
||||
|
||||
/***** Year *****/
|
||||
fprintf (Gbl.F.Out,"<td class=\"CENTER_MIDDLE\">"
|
||||
"<select name=\"OthCrsYear\" style=\"width:50px;\">");
|
||||
Tbl_StartCellAttr ("class=\"CENTER_MIDDLE\"");
|
||||
fprintf (Gbl.F.Out,"<select name=\"OthCrsYear\" style=\"width:50px;\">");
|
||||
for (Year = 0;
|
||||
Year <= Deg_MAX_YEARS_PER_DEGREE;
|
||||
Year++)
|
||||
|
@ -1766,8 +1747,8 @@ static void Crs_PutFormToCreateCourse (void)
|
|||
Tbl_EndRow ();
|
||||
|
||||
/***** Course short name *****/
|
||||
fprintf (Gbl.F.Out,"<td class=\"LEFT_MIDDLE\">"
|
||||
"<input type=\"text\" name=\"ShortName\""
|
||||
Tbl_StartCellAttr ("class=\"LEFT_MIDDLE\"");
|
||||
fprintf (Gbl.F.Out,"<input type=\"text\" name=\"ShortName\""
|
||||
" maxlength=\"%u\" value=\"%s\""
|
||||
" class=\"INPUT_SHORT_NAME\""
|
||||
" required=\"required\" />",
|
||||
|
@ -1775,8 +1756,8 @@ static void Crs_PutFormToCreateCourse (void)
|
|||
Tbl_EndRow ();
|
||||
|
||||
/***** Course full name *****/
|
||||
fprintf (Gbl.F.Out,"<td class=\"LEFT_MIDDLE\">"
|
||||
"<input type=\"text\" name=\"FullName\""
|
||||
Tbl_StartCellAttr ("class=\"LEFT_MIDDLE\"");
|
||||
fprintf (Gbl.F.Out,"<input type=\"text\" name=\"FullName\""
|
||||
" maxlength=\"%u\" value=\"%s\""
|
||||
" class=\"INPUT_FULL_NAME\""
|
||||
" required=\"required\" />",
|
||||
|
@ -1784,22 +1765,22 @@ static void Crs_PutFormToCreateCourse (void)
|
|||
Tbl_EndRow ();
|
||||
|
||||
/***** Current number of teachers in this course *****/
|
||||
fprintf (Gbl.F.Out,"<td class=\"DAT RIGHT_MIDDLE\">"
|
||||
"0");
|
||||
Tbl_StartCellAttr ("class=\"DAT RIGHT_MIDDLE\"");
|
||||
fprintf (Gbl.F.Out,"0");
|
||||
Tbl_EndRow ();
|
||||
|
||||
/***** Current number of students in this course *****/
|
||||
fprintf (Gbl.F.Out,"<td class=\"DAT RIGHT_MIDDLE\">"
|
||||
"0");
|
||||
Tbl_StartCellAttr ("class=\"DAT RIGHT_MIDDLE\"");
|
||||
fprintf (Gbl.F.Out,"0");
|
||||
Tbl_EndRow ();
|
||||
|
||||
/***** 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);
|
||||
Tbl_EndCell ();
|
||||
|
||||
/***** Course status *****/
|
||||
fprintf (Gbl.F.Out,"<td class=\"DAT LEFT_MIDDLE\">");
|
||||
Tbl_StartCellAttr ("class=\"DAT LEFT_MIDDLE\"");
|
||||
Tbl_EndRow ();
|
||||
|
||||
Tbl_EndRow ();
|
||||
|
@ -3315,26 +3296,24 @@ static void Crs_WriteRowCrsData (unsigned NumCrs,MYSQL_ROW row,bool WriteColumnA
|
|||
if (WriteColumnAccepted)
|
||||
{
|
||||
Accepted = (row[7][0] == 'Y');
|
||||
fprintf (Gbl.F.Out,"<td class=\"BT %s\" title=\"%s\">"
|
||||
"%s",
|
||||
BgColor,
|
||||
Accepted ? Txt_Enrolment_confirmed :
|
||||
Txt_Enrolment_not_confirmed,
|
||||
Tbl_StartCellAttr ("class=\"BT %s\" title=\"%s\"",
|
||||
BgColor,
|
||||
Accepted ? Txt_Enrolment_confirmed :
|
||||
Txt_Enrolment_not_confirmed);
|
||||
fprintf (Gbl.F.Out,"%s",
|
||||
Accepted ? "✓" :
|
||||
"✗");
|
||||
Tbl_EndRow ();
|
||||
}
|
||||
|
||||
/***** Write number of course in this search *****/
|
||||
fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_TOP %s\">"
|
||||
"%u",
|
||||
StyleNoBR,BgColor,NumCrs);
|
||||
Tbl_StartCellAttr ("class=\"%s RIGHT_TOP %s\"",StyleNoBR,BgColor);
|
||||
fprintf (Gbl.F.Out,"%u",NumCrs);
|
||||
Tbl_EndRow ();
|
||||
|
||||
/***** Write degree logo, degree short name (row[2])
|
||||
and centre short name (row[6]) *****/
|
||||
fprintf (Gbl.F.Out,"<td class=\"%s LEFT_TOP %s\">",
|
||||
StyleNoBR,BgColor);
|
||||
Tbl_StartCellAttr ("class=\"%s LEFT_TOP %s\"",StyleNoBR,BgColor);
|
||||
Frm_StartFormGoTo (ActSeeDegInf);
|
||||
Deg_PutParamDegCod (Deg.DegCod);
|
||||
snprintf (Gbl.Title,sizeof (Gbl.Title),
|
||||
|
@ -3349,14 +3328,12 @@ static void Crs_WriteRowCrsData (unsigned NumCrs,MYSQL_ROW row,bool WriteColumnA
|
|||
Tbl_EndCell ();
|
||||
|
||||
/***** Write year (row[4]) *****/
|
||||
fprintf (Gbl.F.Out,"<td class=\"%s CENTER_TOP %s\">"
|
||||
"%s",
|
||||
Style,BgColor,Txt_YEAR_OF_DEGREE[Deg_ConvStrToYear (row[4])]);
|
||||
Tbl_StartCellAttr ("class=\"%s CENTER_TOP %s\"",Style,BgColor);
|
||||
fprintf (Gbl.F.Out,"%s",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\">",
|
||||
Style,BgColor);
|
||||
Tbl_StartCellAttr ("class=\"%s LEFT_TOP %s\"",Style,BgColor);
|
||||
Frm_StartFormGoTo (ActSeeCrsInf);
|
||||
Crs_PutParamCrsCod (CrsCod);
|
||||
snprintf (Gbl.Title,sizeof (Gbl.Title),
|
||||
|
@ -3368,16 +3345,14 @@ static void Crs_WriteRowCrsData (unsigned NumCrs,MYSQL_ROW row,bool WriteColumnA
|
|||
Tbl_EndCell ();
|
||||
|
||||
/***** Write number of teachers in course *****/
|
||||
fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_TOP %s\">"
|
||||
"%u",
|
||||
Style,BgColor,NumTchs);
|
||||
Tbl_EndRow ();
|
||||
Tbl_StartCellAttr ("class=\"%s RIGHT_TOP %s\"",Style,BgColor);
|
||||
fprintf (Gbl.F.Out,"%u",NumTchs);
|
||||
Tbl_EndCell ();
|
||||
|
||||
/***** Write number of students in course *****/
|
||||
fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_TOP %s\">"
|
||||
"%u",
|
||||
Style,BgColor,NumStds);
|
||||
Tbl_EndRow ();
|
||||
Tbl_StartCellAttr ("class=\"%s RIGHT_TOP %s\"",Style,BgColor);
|
||||
fprintf (Gbl.F.Out,"%u",NumStds);
|
||||
Tbl_EndCell ();
|
||||
|
||||
Tbl_EndRow ();
|
||||
|
||||
|
|
|
@ -234,7 +234,7 @@ void Tbl_StartCellAttr (const char *fmt,...)
|
|||
|
||||
/***** Print HTML *****/
|
||||
fprintf (Gbl.F.Out,
|
||||
"<tr %s>",Attr);
|
||||
"<td %s>",Attr);
|
||||
|
||||
free ((void *) Attr);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue