mirror of https://github.com/acanas/swad-core.git
Version19.31.40
This commit is contained in:
parent
1c065cbf99
commit
9a2de95c02
|
@ -2118,7 +2118,7 @@ static void Att_WriteRowUsrToCallTheRoll (unsigned NumUsr,
|
||||||
Tbl_EndCell ();
|
Tbl_EndCell ();
|
||||||
|
|
||||||
/***** Write number of student in the list *****/
|
/***** Write number of student in the list *****/
|
||||||
Tbl_StartCellAttr ("class=\"%s RIGHT_TOP COLOR%u\">",
|
Tbl_StartCellAttr ("class=\"%s RIGHT_TOP COLOR%u\"",
|
||||||
UsrDat->Accepted ? "DAT_N" :
|
UsrDat->Accepted ? "DAT_N" :
|
||||||
"DAT",
|
"DAT",
|
||||||
Gbl.RowEvenOdd);
|
Gbl.RowEvenOdd);
|
||||||
|
@ -2128,7 +2128,7 @@ static void Att_WriteRowUsrToCallTheRoll (unsigned NumUsr,
|
||||||
/***** Show student's photo *****/
|
/***** Show student's photo *****/
|
||||||
if (Gbl.Usrs.Listing.WithPhotos)
|
if (Gbl.Usrs.Listing.WithPhotos)
|
||||||
{
|
{
|
||||||
Tbl_StartCellAttr ("class=\"LEFT_TOP COLOR%u\">",Gbl.RowEvenOdd);
|
Tbl_StartCellAttr ("class=\"LEFT_TOP COLOR%u\"",Gbl.RowEvenOdd);
|
||||||
ShowPhoto = Pho_ShowingUsrPhotoIsAllowed (UsrDat,PhotoURL);
|
ShowPhoto = Pho_ShowingUsrPhotoIsAllowed (UsrDat,PhotoURL);
|
||||||
Pho_ShowUsrPhoto (UsrDat,ShowPhoto ? PhotoURL :
|
Pho_ShowUsrPhoto (UsrDat,ShowPhoto ? PhotoURL :
|
||||||
NULL,
|
NULL,
|
||||||
|
@ -2137,7 +2137,7 @@ static void Att_WriteRowUsrToCallTheRoll (unsigned NumUsr,
|
||||||
}
|
}
|
||||||
|
|
||||||
/***** Write user's ID ******/
|
/***** Write user's ID ******/
|
||||||
Tbl_StartCellAttr ("class=\"%s LEFT_TOP COLOR%u\">",
|
Tbl_StartCellAttr ("class=\"%s LEFT_TOP COLOR%u\"",
|
||||||
UsrDat->Accepted ? "DAT_SMALL_N" :
|
UsrDat->Accepted ? "DAT_SMALL_N" :
|
||||||
"DAT_SMALL",
|
"DAT_SMALL",
|
||||||
Gbl.RowEvenOdd);
|
Gbl.RowEvenOdd);
|
||||||
|
@ -3392,7 +3392,7 @@ static void Att_WriteRowUsrSeveralAttEvents (unsigned NumUsr,struct UsrData *Usr
|
||||||
}
|
}
|
||||||
|
|
||||||
/***** Write user's ID ******/
|
/***** Write user's ID ******/
|
||||||
Tbl_StartCellAttr ("class=\"%s LEFT_MIDDLE COLOR%u\">",
|
Tbl_StartCellAttr ("class=\"%s LEFT_MIDDLE COLOR%u\"",
|
||||||
UsrDat->Accepted ? "DAT_SMALL_N" :
|
UsrDat->Accepted ? "DAT_SMALL_N" :
|
||||||
"DAT_SMALL",
|
"DAT_SMALL",
|
||||||
Gbl.RowEvenOdd);
|
Gbl.RowEvenOdd);
|
||||||
|
|
|
@ -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.38 (2019-10-10)"
|
#define Log_PLATFORM_VERSION "SWAD 19.31.40 (2019-10-10)"
|
||||||
#define CSS_FILE "swad19.29.css"
|
#define CSS_FILE "swad19.29.css"
|
||||||
#define JS_FILE "swad19.30.js"
|
#define JS_FILE "swad19.30.js"
|
||||||
/*
|
/*
|
||||||
|
@ -496,6 +496,8 @@ ps2pdf source.ps destination.pdf
|
||||||
// TODO: En un TFG no preasignado con estudiante tiene que salir un triángulo amarillo
|
// TODO: En un TFG no preasignado con 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.40: Oct 10, 2019 Code refactoring in HTML tables. (246669 lines)
|
||||||
|
Version 19.31.39: Oct 10, 2019 Code refactoring in HTML tables. (246668 lines)
|
||||||
Version 19.31.38: Oct 10, 2019 Code refactoring in HTML tables. (246657 lines)
|
Version 19.31.38: Oct 10, 2019 Code refactoring in HTML tables. (246657 lines)
|
||||||
Version 19.31.37: Oct 10, 2019 Code refactoring in HTML tables. (246626 lines)
|
Version 19.31.37: Oct 10, 2019 Code refactoring in HTML tables. (246626 lines)
|
||||||
Version 19.31.36: Oct 10, 2019 Code refactoring in HTML tables. (246620 lines)
|
Version 19.31.36: Oct 10, 2019 Code refactoring in HTML tables. (246620 lines)
|
||||||
|
|
|
@ -323,8 +323,6 @@ static void Crs_Configuration (bool PrintView)
|
||||||
Txt_Short_name);
|
Txt_Short_name);
|
||||||
Tbl_EndCell ();
|
Tbl_EndCell ();
|
||||||
|
|
||||||
Tbl_EndRow ();
|
|
||||||
|
|
||||||
Tbl_StartCellAttr ("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)
|
||||||
|
@ -345,6 +343,7 @@ static void Crs_Configuration (bool PrintView)
|
||||||
else // I can not edit course short name
|
else // I can not edit course short name
|
||||||
fprintf (Gbl.F.Out,"%s",Gbl.Hierarchy.Crs.ShrtName);
|
fprintf (Gbl.F.Out,"%s",Gbl.Hierarchy.Crs.ShrtName);
|
||||||
Tbl_EndCell ();
|
Tbl_EndCell ();
|
||||||
|
|
||||||
Tbl_EndRow ();
|
Tbl_EndRow ();
|
||||||
|
|
||||||
/***** Course year *****/
|
/***** Course year *****/
|
||||||
|
@ -355,7 +354,7 @@ static void Crs_Configuration (bool PrintView)
|
||||||
fprintf (Gbl.F.Out,"<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_EndCell ();
|
||||||
|
|
||||||
Tbl_StartCellAttr ("class=\"DAT LEFT_MIDDLE\"");
|
Tbl_StartCellAttr ("class=\"DAT LEFT_MIDDLE\"");
|
||||||
if (IsForm)
|
if (IsForm)
|
||||||
|
@ -380,6 +379,7 @@ static void Crs_Configuration (bool PrintView)
|
||||||
Gbl.Hierarchy.Crs.Year ? Txt_YEAR_OF_DEGREE[Gbl.Hierarchy.Crs.Year] :
|
Gbl.Hierarchy.Crs.Year ? Txt_YEAR_OF_DEGREE[Gbl.Hierarchy.Crs.Year] :
|
||||||
Txt_Not_applicable);
|
Txt_Not_applicable);
|
||||||
Tbl_EndCell ();
|
Tbl_EndCell ();
|
||||||
|
|
||||||
Tbl_EndRow ();
|
Tbl_EndRow ();
|
||||||
|
|
||||||
if (!PrintView)
|
if (!PrintView)
|
||||||
|
@ -391,7 +391,7 @@ static void Crs_Configuration (bool PrintView)
|
||||||
fprintf (Gbl.F.Out,"<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_EndCell ();
|
||||||
|
|
||||||
Tbl_StartCellAttr ("class=\"DAT LEFT_MIDDLE\"");
|
Tbl_StartCellAttr ("class=\"DAT LEFT_MIDDLE\"");
|
||||||
if (IsForm)
|
if (IsForm)
|
||||||
|
@ -410,6 +410,7 @@ static void Crs_Configuration (bool PrintView)
|
||||||
else
|
else
|
||||||
fprintf (Gbl.F.Out,"%s",Gbl.Hierarchy.Crs.InstitutionalCrsCod);
|
fprintf (Gbl.F.Out,"%s",Gbl.Hierarchy.Crs.InstitutionalCrsCod);
|
||||||
Tbl_EndCell ();
|
Tbl_EndCell ();
|
||||||
|
|
||||||
Tbl_EndRow ();
|
Tbl_EndRow ();
|
||||||
|
|
||||||
/***** Internal code of the course *****/
|
/***** Internal code of the course *****/
|
||||||
|
@ -417,11 +418,11 @@ static void Crs_Configuration (bool PrintView)
|
||||||
|
|
||||||
Tbl_StartCellAttr ("class=\"%s RIGHT_MIDDLE\"",The_ClassFormInBox[Gbl.Prefs.Theme]);
|
Tbl_StartCellAttr ("class=\"%s RIGHT_MIDDLE\"",The_ClassFormInBox[Gbl.Prefs.Theme]);
|
||||||
fprintf (Gbl.F.Out,"%s:",Txt_Internal_code);
|
fprintf (Gbl.F.Out,"%s:",Txt_Internal_code);
|
||||||
Tbl_EndRow ();
|
Tbl_EndCell ();
|
||||||
|
|
||||||
Tbl_StartCellAttr ("class=\"DAT LEFT_MIDDLE\"");
|
Tbl_StartCellAttr ("class=\"DAT LEFT_MIDDLE\"");
|
||||||
fprintf (Gbl.F.Out,"%ld",Gbl.Hierarchy.Crs.CrsCod);
|
fprintf (Gbl.F.Out,"%ld",Gbl.Hierarchy.Crs.CrsCod);
|
||||||
Tbl_EndRow ();
|
Tbl_EndCell ();
|
||||||
|
|
||||||
Tbl_EndRow ();
|
Tbl_EndRow ();
|
||||||
}
|
}
|
||||||
|
@ -431,7 +432,7 @@ static void Crs_Configuration (bool PrintView)
|
||||||
|
|
||||||
Tbl_StartCellAttr ("class=\"%s RIGHT_MIDDLE\"",The_ClassFormInBox[Gbl.Prefs.Theme]);
|
Tbl_StartCellAttr ("class=\"%s RIGHT_MIDDLE\"",The_ClassFormInBox[Gbl.Prefs.Theme]);
|
||||||
fprintf (Gbl.F.Out,"%s:",Txt_Shortcut);
|
fprintf (Gbl.F.Out,"%s:",Txt_Shortcut);
|
||||||
Tbl_EndRow ();
|
Tbl_EndCell ();
|
||||||
|
|
||||||
Tbl_StartCellAttr ("class=\"DAT LEFT_MIDDLE\"");
|
Tbl_StartCellAttr ("class=\"DAT LEFT_MIDDLE\"");
|
||||||
fprintf (Gbl.F.Out,"<a href=\"%s/%s?crs=%ld\" class=\"DAT\" target=\"_blank\">"
|
fprintf (Gbl.F.Out,"<a href=\"%s/%s?crs=%ld\" class=\"DAT\" target=\"_blank\">"
|
||||||
|
@ -442,7 +443,7 @@ static void Crs_Configuration (bool PrintView)
|
||||||
Cfg_URL_SWAD_CGI,
|
Cfg_URL_SWAD_CGI,
|
||||||
Lan_STR_LANG_ID[Gbl.Prefs.Language],
|
Lan_STR_LANG_ID[Gbl.Prefs.Language],
|
||||||
Gbl.Hierarchy.Crs.CrsCod);
|
Gbl.Hierarchy.Crs.CrsCod);
|
||||||
Tbl_EndRow ();
|
Tbl_EndCell ();
|
||||||
|
|
||||||
Tbl_EndRow ();
|
Tbl_EndRow ();
|
||||||
|
|
||||||
|
@ -453,7 +454,7 @@ static void Crs_Configuration (bool PrintView)
|
||||||
|
|
||||||
Tbl_StartCellAttr ("class=\"%s RIGHT_MIDDLE\"",The_ClassFormInBox[Gbl.Prefs.Theme]);
|
Tbl_StartCellAttr ("class=\"%s RIGHT_MIDDLE\"",The_ClassFormInBox[Gbl.Prefs.Theme]);
|
||||||
fprintf (Gbl.F.Out,"%s:",Txt_QR_code);
|
fprintf (Gbl.F.Out,"%s:",Txt_QR_code);
|
||||||
Tbl_EndRow ();
|
Tbl_EndCell ();
|
||||||
|
|
||||||
Tbl_StartCellAttr ("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);
|
||||||
|
@ -476,7 +477,7 @@ static void Crs_Configuration (bool PrintView)
|
||||||
|
|
||||||
Tbl_StartCellAttr ("class=\"%s RIGHT_MIDDLE\"",The_ClassFormInBox[Gbl.Prefs.Theme]);
|
Tbl_StartCellAttr ("class=\"%s RIGHT_MIDDLE\"",The_ClassFormInBox[Gbl.Prefs.Theme]);
|
||||||
fprintf (Gbl.F.Out,"%s:",Txt_Indicators);
|
fprintf (Gbl.F.Out,"%s:",Txt_Indicators);
|
||||||
Tbl_EndRow ();
|
Tbl_EndCell ();
|
||||||
|
|
||||||
Tbl_StartCellAttr ("class=\"LEFT_MIDDLE\"");
|
Tbl_StartCellAttr ("class=\"LEFT_MIDDLE\"");
|
||||||
Frm_StartForm (ActReqStaCrs);
|
Frm_StartForm (ActReqStaCrs);
|
||||||
|
@ -495,6 +496,7 @@ static void Crs_Configuration (bool PrintView)
|
||||||
Gbl.Title);
|
Gbl.Title);
|
||||||
Frm_EndForm ();
|
Frm_EndForm ();
|
||||||
Tbl_EndCell ();
|
Tbl_EndCell ();
|
||||||
|
|
||||||
Tbl_EndRow ();
|
Tbl_EndRow ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -527,11 +529,11 @@ static void Crs_ShowNumUsrsInCrs (Rol_Role_t Role)
|
||||||
|
|
||||||
Tbl_StartCellAttr ("class=\"%s RIGHT_MIDDLE\"",The_ClassFormInBox[Gbl.Prefs.Theme]);
|
Tbl_StartCellAttr ("class=\"%s RIGHT_MIDDLE\"",The_ClassFormInBox[Gbl.Prefs.Theme]);
|
||||||
fprintf (Gbl.F.Out,"%s:",Txt_ROLES_PLURAL_Abc[Role][Usr_SEX_UNKNOWN]);
|
fprintf (Gbl.F.Out,"%s:",Txt_ROLES_PLURAL_Abc[Role][Usr_SEX_UNKNOWN]);
|
||||||
Tbl_EndRow ();
|
Tbl_EndCell ();
|
||||||
|
|
||||||
Tbl_StartCellAttr ("class=\"DAT LEFT_MIDDLE\"");
|
Tbl_StartCellAttr ("class=\"DAT LEFT_MIDDLE\"");
|
||||||
fprintf (Gbl.F.Out,"%u",Gbl.Hierarchy.Crs.NumUsrs[Role]);
|
fprintf (Gbl.F.Out,"%u",Gbl.Hierarchy.Crs.NumUsrs[Role]);
|
||||||
Tbl_EndRow ();
|
Tbl_EndCell ();
|
||||||
|
|
||||||
Tbl_EndRow ();
|
Tbl_EndRow ();
|
||||||
}
|
}
|
||||||
|
@ -1297,22 +1299,22 @@ static bool Crs_ListCoursesOfAYearForSeeing (unsigned Year)
|
||||||
Txt_COURSE_Without_users);
|
Txt_COURSE_Without_users);
|
||||||
fprintf (Gbl.F.Out,"%s",Crs->NumUsrs[Rol_UNK] ? "✓" :
|
fprintf (Gbl.F.Out,"%s",Crs->NumUsrs[Rol_UNK] ? "✓" :
|
||||||
" ");
|
" ");
|
||||||
Tbl_EndRow ();
|
Tbl_EndCell ();
|
||||||
|
|
||||||
/* Institutional code of the course */
|
/* Institutional code of the course */
|
||||||
Tbl_StartCellAttr ("class=\"%s CENTER_MIDDLE %s\"",
|
Tbl_StartCellAttr ("class=\"%s CENTER_MIDDLE %s\"",
|
||||||
TxtClassNormal,BgColor);
|
TxtClassNormal,BgColor);
|
||||||
fprintf (Gbl.F.Out,"%s",Crs->InstitutionalCrsCod);
|
fprintf (Gbl.F.Out,"%s",Crs->InstitutionalCrsCod);
|
||||||
Tbl_EndRow ();
|
Tbl_EndCell ();
|
||||||
|
|
||||||
/* Course year */
|
/* Course year */
|
||||||
Tbl_StartCellAttr ("class=\"%s CENTER_MIDDLE %s\">",
|
Tbl_StartCellAttr ("class=\"%s CENTER_MIDDLE %s\">",
|
||||||
TxtClassNormal,BgColor);
|
TxtClassNormal,BgColor);
|
||||||
fprintf (Gbl.F.Out,"%s",Txt_YEAR_OF_DEGREE[Crs->Year]);
|
fprintf (Gbl.F.Out,"%s",Txt_YEAR_OF_DEGREE[Crs->Year]);
|
||||||
Tbl_EndRow ();
|
Tbl_EndCell ();
|
||||||
|
|
||||||
/* Course full name */
|
/* Course full name */
|
||||||
Tbl_StartCellAttr ("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);
|
||||||
|
@ -1330,13 +1332,13 @@ static bool Crs_ListCoursesOfAYearForSeeing (unsigned Year)
|
||||||
TxtClassNormal,BgColor);
|
TxtClassNormal,BgColor);
|
||||||
fprintf (Gbl.F.Out,"%u",Crs->NumUsrs[Rol_TCH] +
|
fprintf (Gbl.F.Out,"%u",Crs->NumUsrs[Rol_TCH] +
|
||||||
Crs->NumUsrs[Rol_NET]);
|
Crs->NumUsrs[Rol_NET]);
|
||||||
Tbl_EndRow ();
|
Tbl_EndCell ();
|
||||||
|
|
||||||
/* Current number of students in this course */
|
/* Current number of students in this course */
|
||||||
Tbl_StartCellAttr ("class=\"%s RIGHT_MIDDLE %s\"",
|
Tbl_StartCellAttr ("class=\"%s RIGHT_MIDDLE %s\"",
|
||||||
TxtClassNormal,BgColor);
|
TxtClassNormal,BgColor);
|
||||||
fprintf (Gbl.F.Out,"%u",Crs->NumUsrs[Rol_STD]);
|
fprintf (Gbl.F.Out,"%u",Crs->NumUsrs[Rol_STD]);
|
||||||
Tbl_EndRow ();
|
Tbl_EndCell ();
|
||||||
|
|
||||||
/* Course status */
|
/* Course status */
|
||||||
StatusTxt = Crs_GetStatusTxtFromStatusBits (Crs->Status);
|
StatusTxt = Crs_GetStatusTxtFromStatusBits (Crs->Status);
|
||||||
|
@ -1345,6 +1347,7 @@ static bool Crs_ListCoursesOfAYearForSeeing (unsigned Year)
|
||||||
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 ();
|
||||||
|
|
||||||
Tbl_EndRow ();
|
Tbl_EndRow ();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1503,7 +1506,7 @@ static void Crs_ListCoursesOfAYearForEdition (unsigned Year)
|
||||||
/* Course code */
|
/* Course code */
|
||||||
Tbl_StartCellAttr ("class=\"DAT CODE\"");
|
Tbl_StartCellAttr ("class=\"DAT CODE\"");
|
||||||
fprintf (Gbl.F.Out,"%ld",Crs->CrsCod);
|
fprintf (Gbl.F.Out,"%ld",Crs->CrsCod);
|
||||||
Tbl_EndRow ();
|
Tbl_EndCell ();
|
||||||
|
|
||||||
/* Institutional code of the course */
|
/* Institutional code of the course */
|
||||||
Tbl_StartCellAttr ("class=\"DAT CENTER_MIDDLE\"");
|
Tbl_StartCellAttr ("class=\"DAT CENTER_MIDDLE\"");
|
||||||
|
@ -1626,6 +1629,7 @@ static void Crs_ListCoursesOfAYearForEdition (unsigned Year)
|
||||||
else if (StatusTxt != Crs_STATUS_ACTIVE) // If active ==> do not show anything
|
else 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 ();
|
||||||
|
|
||||||
Tbl_EndRow ();
|
Tbl_EndRow ();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1717,11 +1721,11 @@ static void Crs_PutFormToCreateCourse (void)
|
||||||
|
|
||||||
/***** Column to remove course, disabled here *****/
|
/***** Column to remove course, disabled here *****/
|
||||||
Tbl_StartCellAttr ("class=\"BM\"");
|
Tbl_StartCellAttr ("class=\"BM\"");
|
||||||
Tbl_EndRow ();
|
Tbl_EndCell ();
|
||||||
|
|
||||||
/***** Course code *****/
|
/***** Course code *****/
|
||||||
Tbl_StartCellAttr ("class=\"CODE\"");
|
Tbl_StartCellAttr ("class=\"CODE\"");
|
||||||
Tbl_EndRow ();
|
Tbl_EndCell ();
|
||||||
|
|
||||||
/***** Institutional code of the course *****/
|
/***** Institutional code of the course *****/
|
||||||
Tbl_StartCellAttr ("class=\"CENTER_MIDDLE\"");
|
Tbl_StartCellAttr ("class=\"CENTER_MIDDLE\"");
|
||||||
|
@ -1730,7 +1734,7 @@ static void Crs_PutFormToCreateCourse (void)
|
||||||
" class=\"INPUT_INS_CODE\" />",
|
" class=\"INPUT_INS_CODE\" />",
|
||||||
Crs_MAX_CHARS_INSTITUTIONAL_CRS_COD,
|
Crs_MAX_CHARS_INSTITUTIONAL_CRS_COD,
|
||||||
Crs_EditingCrs->InstitutionalCrsCod);
|
Crs_EditingCrs->InstitutionalCrsCod);
|
||||||
Tbl_EndRow ();
|
Tbl_EndCell ();
|
||||||
|
|
||||||
/***** Year *****/
|
/***** Year *****/
|
||||||
Tbl_StartCellAttr ("class=\"CENTER_MIDDLE\"");
|
Tbl_StartCellAttr ("class=\"CENTER_MIDDLE\"");
|
||||||
|
@ -1744,7 +1748,7 @@ static void Crs_PutFormToCreateCourse (void)
|
||||||
"",
|
"",
|
||||||
Txt_YEAR_OF_DEGREE[Year]);
|
Txt_YEAR_OF_DEGREE[Year]);
|
||||||
fprintf (Gbl.F.Out,"</select>");
|
fprintf (Gbl.F.Out,"</select>");
|
||||||
Tbl_EndRow ();
|
Tbl_EndCell ();
|
||||||
|
|
||||||
/***** Course short name *****/
|
/***** Course short name *****/
|
||||||
Tbl_StartCellAttr ("class=\"LEFT_MIDDLE\"");
|
Tbl_StartCellAttr ("class=\"LEFT_MIDDLE\"");
|
||||||
|
@ -1753,7 +1757,7 @@ static void Crs_PutFormToCreateCourse (void)
|
||||||
" class=\"INPUT_SHORT_NAME\""
|
" class=\"INPUT_SHORT_NAME\""
|
||||||
" required=\"required\" />",
|
" required=\"required\" />",
|
||||||
Hie_MAX_CHARS_SHRT_NAME,Crs_EditingCrs->ShrtName);
|
Hie_MAX_CHARS_SHRT_NAME,Crs_EditingCrs->ShrtName);
|
||||||
Tbl_EndRow ();
|
Tbl_EndCell ();
|
||||||
|
|
||||||
/***** Course full name *****/
|
/***** Course full name *****/
|
||||||
Tbl_StartCellAttr ("class=\"LEFT_MIDDLE\"");
|
Tbl_StartCellAttr ("class=\"LEFT_MIDDLE\"");
|
||||||
|
@ -1762,17 +1766,17 @@ static void Crs_PutFormToCreateCourse (void)
|
||||||
" class=\"INPUT_FULL_NAME\""
|
" class=\"INPUT_FULL_NAME\""
|
||||||
" required=\"required\" />",
|
" required=\"required\" />",
|
||||||
Hie_MAX_CHARS_FULL_NAME,Crs_EditingCrs->FullName);
|
Hie_MAX_CHARS_FULL_NAME,Crs_EditingCrs->FullName);
|
||||||
Tbl_EndRow ();
|
Tbl_EndCell ();
|
||||||
|
|
||||||
/***** Current number of teachers in this course *****/
|
/***** Current number of teachers in this course *****/
|
||||||
Tbl_StartCellAttr ("class=\"DAT RIGHT_MIDDLE\"");
|
Tbl_StartCellAttr ("class=\"DAT RIGHT_MIDDLE\"");
|
||||||
fprintf (Gbl.F.Out,"0");
|
fprintf (Gbl.F.Out,"0");
|
||||||
Tbl_EndRow ();
|
Tbl_EndCell ();
|
||||||
|
|
||||||
/***** Current number of students in this course *****/
|
/***** Current number of students in this course *****/
|
||||||
Tbl_StartCellAttr ("class=\"DAT RIGHT_MIDDLE\"");
|
Tbl_StartCellAttr ("class=\"DAT RIGHT_MIDDLE\"");
|
||||||
fprintf (Gbl.F.Out,"0");
|
fprintf (Gbl.F.Out,"0");
|
||||||
Tbl_EndRow ();
|
Tbl_EndCell ();
|
||||||
|
|
||||||
/***** Course requester *****/
|
/***** Course requester *****/
|
||||||
Tbl_StartCellAttr ("class=\"DAT INPUT_REQUESTER LEFT_TOP\"");
|
Tbl_StartCellAttr ("class=\"DAT INPUT_REQUESTER LEFT_TOP\"");
|
||||||
|
@ -1781,7 +1785,7 @@ static void Crs_PutFormToCreateCourse (void)
|
||||||
|
|
||||||
/***** Course status *****/
|
/***** Course status *****/
|
||||||
Tbl_StartCellAttr ("class=\"DAT LEFT_MIDDLE\"");
|
Tbl_StartCellAttr ("class=\"DAT LEFT_MIDDLE\"");
|
||||||
Tbl_EndRow ();
|
Tbl_EndCell ();
|
||||||
|
|
||||||
Tbl_EndRow ();
|
Tbl_EndRow ();
|
||||||
|
|
||||||
|
@ -3303,13 +3307,13 @@ static void Crs_WriteRowCrsData (unsigned NumCrs,MYSQL_ROW row,bool WriteColumnA
|
||||||
fprintf (Gbl.F.Out,"%s",
|
fprintf (Gbl.F.Out,"%s",
|
||||||
Accepted ? "✓" :
|
Accepted ? "✓" :
|
||||||
"✗");
|
"✗");
|
||||||
Tbl_EndRow ();
|
Tbl_EndCell ();
|
||||||
}
|
}
|
||||||
|
|
||||||
/***** Write number of course in this search *****/
|
/***** Write number of course in this search *****/
|
||||||
Tbl_StartCellAttr ("class=\"%s RIGHT_TOP %s\"",StyleNoBR,BgColor);
|
Tbl_StartCellAttr ("class=\"%s RIGHT_TOP %s\"",StyleNoBR,BgColor);
|
||||||
fprintf (Gbl.F.Out,"%u",NumCrs);
|
fprintf (Gbl.F.Out,"%u",NumCrs);
|
||||||
Tbl_EndRow ();
|
Tbl_EndCell ();
|
||||||
|
|
||||||
/***** 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]) *****/
|
||||||
|
@ -3330,7 +3334,7 @@ static void Crs_WriteRowCrsData (unsigned NumCrs,MYSQL_ROW row,bool WriteColumnA
|
||||||
/***** Write year (row[4]) *****/
|
/***** Write year (row[4]) *****/
|
||||||
Tbl_StartCellAttr ("class=\"%s CENTER_TOP %s\"",Style,BgColor);
|
Tbl_StartCellAttr ("class=\"%s CENTER_TOP %s\"",Style,BgColor);
|
||||||
fprintf (Gbl.F.Out,"%s",Txt_YEAR_OF_DEGREE[Deg_ConvStrToYear (row[4])]);
|
fprintf (Gbl.F.Out,"%s",Txt_YEAR_OF_DEGREE[Deg_ConvStrToYear (row[4])]);
|
||||||
Tbl_EndRow ();
|
Tbl_EndCell ();
|
||||||
|
|
||||||
/***** Write course full name (row[5]) *****/
|
/***** Write course full name (row[5]) *****/
|
||||||
Tbl_StartCellAttr ("class=\"%s LEFT_TOP %s\"",Style,BgColor);
|
Tbl_StartCellAttr ("class=\"%s LEFT_TOP %s\"",Style,BgColor);
|
||||||
|
|
|
@ -1488,7 +1488,7 @@ static void Ins_ListInstitutionsForEdition (void)
|
||||||
Tbl_StartRow ();
|
Tbl_StartRow ();
|
||||||
|
|
||||||
/* Put icon to remove institution */
|
/* Put icon to remove institution */
|
||||||
Tbl_StartCellAttr ("class=\"BM\">");
|
Tbl_StartCellAttr ("class=\"BM\"");
|
||||||
if (Ins->Ctrs.Num ||
|
if (Ins->Ctrs.Num ||
|
||||||
Ins->NumUsrsWhoClaimToBelongToIns ||
|
Ins->NumUsrsWhoClaimToBelongToIns ||
|
||||||
Ins->NumUsrs || // Institution has centres or users ==> deletion forbidden
|
Ins->NumUsrs || // Institution has centres or users ==> deletion forbidden
|
||||||
|
|
|
@ -608,7 +608,7 @@ static void Prf_ShowNumClicks (const struct UsrData *UsrDat,
|
||||||
if (UsrFigures->NumDays > 0)
|
if (UsrFigures->NumDays > 0)
|
||||||
{
|
{
|
||||||
fprintf (Gbl.F.Out," (");
|
fprintf (Gbl.F.Out," (");
|
||||||
Str_WriteFloatNum (Gbl.F.Out,
|
Str_WriteFloatNumToFile (Gbl.F.Out,
|
||||||
(float) UsrFigures->NumClicks /
|
(float) UsrFigures->NumClicks /
|
||||||
(float) UsrFigures->NumDays);
|
(float) UsrFigures->NumDays);
|
||||||
fprintf (Gbl.F.Out,"/%s ",Txt_day);
|
fprintf (Gbl.F.Out,"/%s ",Txt_day);
|
||||||
|
@ -650,7 +650,7 @@ static void Prf_ShowNumFileViews (const struct UsrData *UsrDat,
|
||||||
if (UsrFigures->NumDays > 0)
|
if (UsrFigures->NumDays > 0)
|
||||||
{
|
{
|
||||||
fprintf (Gbl.F.Out," (");
|
fprintf (Gbl.F.Out," (");
|
||||||
Str_WriteFloatNum (Gbl.F.Out,
|
Str_WriteFloatNumToFile (Gbl.F.Out,
|
||||||
(float) UsrFigures->NumFileViews /
|
(float) UsrFigures->NumFileViews /
|
||||||
(float) UsrFigures->NumDays);
|
(float) UsrFigures->NumDays);
|
||||||
fprintf (Gbl.F.Out,"/%s)",Txt_day);
|
fprintf (Gbl.F.Out,"/%s)",Txt_day);
|
||||||
|
@ -689,7 +689,7 @@ static void Prf_ShowNumSocialPublications (const struct UsrData *UsrDat,
|
||||||
if (UsrFigures->NumDays > 0)
|
if (UsrFigures->NumDays > 0)
|
||||||
{
|
{
|
||||||
fprintf (Gbl.F.Out," (");
|
fprintf (Gbl.F.Out," (");
|
||||||
Str_WriteFloatNum (Gbl.F.Out,
|
Str_WriteFloatNumToFile (Gbl.F.Out,
|
||||||
(float) UsrFigures->NumSocPub /
|
(float) UsrFigures->NumSocPub /
|
||||||
(float) UsrFigures->NumDays);
|
(float) UsrFigures->NumDays);
|
||||||
fprintf (Gbl.F.Out,"/%s)",Txt_day);
|
fprintf (Gbl.F.Out,"/%s)",Txt_day);
|
||||||
|
@ -728,7 +728,7 @@ static void Prf_ShowNumForumPosts (const struct UsrData *UsrDat,
|
||||||
if (UsrFigures->NumDays > 0)
|
if (UsrFigures->NumDays > 0)
|
||||||
{
|
{
|
||||||
fprintf (Gbl.F.Out," (");
|
fprintf (Gbl.F.Out," (");
|
||||||
Str_WriteFloatNum (Gbl.F.Out,
|
Str_WriteFloatNumToFile (Gbl.F.Out,
|
||||||
(float) UsrFigures->NumForPst /
|
(float) UsrFigures->NumForPst /
|
||||||
(float) UsrFigures->NumDays);
|
(float) UsrFigures->NumDays);
|
||||||
fprintf (Gbl.F.Out,"/%s)",Txt_day);
|
fprintf (Gbl.F.Out,"/%s)",Txt_day);
|
||||||
|
@ -767,7 +767,7 @@ static void Prf_ShowNumMessagesSent (const struct UsrData *UsrDat,
|
||||||
if (UsrFigures->NumDays > 0)
|
if (UsrFigures->NumDays > 0)
|
||||||
{
|
{
|
||||||
fprintf (Gbl.F.Out," (");
|
fprintf (Gbl.F.Out," (");
|
||||||
Str_WriteFloatNum (Gbl.F.Out,
|
Str_WriteFloatNumToFile (Gbl.F.Out,
|
||||||
(float) UsrFigures->NumMsgSnt /
|
(float) UsrFigures->NumMsgSnt /
|
||||||
(float) UsrFigures->NumDays);
|
(float) UsrFigures->NumDays);
|
||||||
fprintf (Gbl.F.Out,"/%s)",Txt_day);
|
fprintf (Gbl.F.Out,"/%s)",Txt_day);
|
||||||
|
@ -1733,7 +1733,7 @@ void Prf_GetAndShowRankingClicksPerDay (void)
|
||||||
Prf_ShowUsrInRanking (&UsrDat,Rank);
|
Prf_ShowUsrInRanking (&UsrDat,Rank);
|
||||||
Tbl_StartCellAttr ("class=\"RIGHT_MIDDLE COLOR%u\" style=\"height:50px;\"",
|
Tbl_StartCellAttr ("class=\"RIGHT_MIDDLE COLOR%u\" style=\"height:50px;\"",
|
||||||
Gbl.RowEvenOdd);
|
Gbl.RowEvenOdd);
|
||||||
Str_WriteFloatNum (Gbl.F.Out,NumClicksPerDay);
|
Str_WriteFloatNumToFile (Gbl.F.Out,NumClicksPerDay);
|
||||||
Tbl_EndCell ();
|
Tbl_EndCell ();
|
||||||
Tbl_EndRow ();
|
Tbl_EndRow ();
|
||||||
}
|
}
|
||||||
|
|
|
@ -649,7 +649,7 @@ static void Rep_WriteSectionUsrFigures (const struct Rep_Report *Report)
|
||||||
if (Report->UsrFigures.NumDays > 0)
|
if (Report->UsrFigures.NumDays > 0)
|
||||||
{
|
{
|
||||||
fprintf (Gbl.F.Rep," (");
|
fprintf (Gbl.F.Rep," (");
|
||||||
Str_WriteFloatNum (Gbl.F.Rep,
|
Str_WriteFloatNumToFile (Gbl.F.Rep,
|
||||||
(float) Report->UsrFigures.NumClicks /
|
(float) Report->UsrFigures.NumClicks /
|
||||||
(float) Report->UsrFigures.NumDays);
|
(float) Report->UsrFigures.NumDays);
|
||||||
fprintf (Gbl.F.Rep," / %s)",Txt_day);
|
fprintf (Gbl.F.Rep," / %s)",Txt_day);
|
||||||
|
@ -684,7 +684,7 @@ static void Rep_WriteSectionUsrFigures (const struct Rep_Report *Report)
|
||||||
if (Report->UsrFigures.NumDays > 0)
|
if (Report->UsrFigures.NumDays > 0)
|
||||||
{
|
{
|
||||||
fprintf (Gbl.F.Rep," (");
|
fprintf (Gbl.F.Rep," (");
|
||||||
Str_WriteFloatNum (Gbl.F.Rep,
|
Str_WriteFloatNumToFile (Gbl.F.Rep,
|
||||||
(float) Report->UsrFigures.NumFileViews /
|
(float) Report->UsrFigures.NumFileViews /
|
||||||
(float) Report->UsrFigures.NumDays);
|
(float) Report->UsrFigures.NumDays);
|
||||||
fprintf (Gbl.F.Rep," / %s)",Txt_day);
|
fprintf (Gbl.F.Rep," / %s)",Txt_day);
|
||||||
|
@ -705,7 +705,7 @@ static void Rep_WriteSectionUsrFigures (const struct Rep_Report *Report)
|
||||||
if (Report->UsrFigures.NumDays > 0)
|
if (Report->UsrFigures.NumDays > 0)
|
||||||
{
|
{
|
||||||
fprintf (Gbl.F.Rep," (");
|
fprintf (Gbl.F.Rep," (");
|
||||||
Str_WriteFloatNum (Gbl.F.Rep,
|
Str_WriteFloatNumToFile (Gbl.F.Rep,
|
||||||
(float) Report->UsrFigures.NumForPst /
|
(float) Report->UsrFigures.NumForPst /
|
||||||
(float) Report->UsrFigures.NumDays);
|
(float) Report->UsrFigures.NumDays);
|
||||||
fprintf (Gbl.F.Rep," / %s)",Txt_day);
|
fprintf (Gbl.F.Rep," / %s)",Txt_day);
|
||||||
|
@ -726,7 +726,7 @@ static void Rep_WriteSectionUsrFigures (const struct Rep_Report *Report)
|
||||||
if (Report->UsrFigures.NumDays > 0)
|
if (Report->UsrFigures.NumDays > 0)
|
||||||
{
|
{
|
||||||
fprintf (Gbl.F.Rep," (");
|
fprintf (Gbl.F.Rep," (");
|
||||||
Str_WriteFloatNum (Gbl.F.Rep,
|
Str_WriteFloatNumToFile (Gbl.F.Rep,
|
||||||
(float) Report->UsrFigures.NumMsgSnt /
|
(float) Report->UsrFigures.NumMsgSnt /
|
||||||
(float) Report->UsrFigures.NumDays);
|
(float) Report->UsrFigures.NumDays);
|
||||||
fprintf (Gbl.F.Rep," / %s)",Txt_day);
|
fprintf (Gbl.F.Rep," / %s)",Txt_day);
|
||||||
|
@ -1372,7 +1372,7 @@ static void Rep_DrawBarNumHits (unsigned long HitsNum,unsigned long HitsMax,
|
||||||
|
|
||||||
/***** Write the number of hits *****/
|
/***** Write the number of hits *****/
|
||||||
fprintf (Gbl.F.Rep," ");
|
fprintf (Gbl.F.Rep," ");
|
||||||
Str_WriteFloatNum (Gbl.F.Rep,HitsNum);
|
Str_WriteFloatNumToFile (Gbl.F.Rep,HitsNum);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1923,7 +1923,7 @@ static void Sta_ShowNumHitsPerUsr (unsigned long NumRows,MYSQL_RES *mysql_res)
|
||||||
UsrDat.Roles.InCurrentCrs.Role == Rol_STD ? 'o' : // Student
|
UsrDat.Roles.InCurrentCrs.Role == Rol_STD ? 'o' : // Student
|
||||||
'r', // Non-editing teacher or teacher
|
'r', // Non-editing teacher or teacher
|
||||||
BarWidth);
|
BarWidth);
|
||||||
Str_WriteFloatNum (Gbl.F.Out,Hits.Num);
|
Str_WriteFloatNumToFile (Gbl.F.Out,Hits.Num);
|
||||||
fprintf (Gbl.F.Out," ");
|
fprintf (Gbl.F.Out," ");
|
||||||
Tbl_EndCell ();
|
Tbl_EndCell ();
|
||||||
|
|
||||||
|
@ -2402,14 +2402,14 @@ static void Sta_DrawBarColors (Sta_ColorType_t ColorType,float HitsMax)
|
||||||
Tbl_StartCellAttr ("colspan=\"%u\" class=\"LOG CENTER_BOTTOM\" style=\"width:%upx;\"",
|
Tbl_StartCellAttr ("colspan=\"%u\" class=\"LOG CENTER_BOTTOM\" style=\"width:%upx;\"",
|
||||||
GRAPH_DISTRIBUTION_PER_HOUR_TOTAL_WIDTH/5,
|
GRAPH_DISTRIBUTION_PER_HOUR_TOTAL_WIDTH/5,
|
||||||
GRAPH_DISTRIBUTION_PER_HOUR_TOTAL_WIDTH/5);
|
GRAPH_DISTRIBUTION_PER_HOUR_TOTAL_WIDTH/5);
|
||||||
Str_WriteFloatNum (Gbl.F.Out,(float) Interval * HitsMax / 5.0);
|
Str_WriteFloatNumToFile (Gbl.F.Out,(float) Interval * HitsMax / 5.0);
|
||||||
Tbl_EndCell ();
|
Tbl_EndCell ();
|
||||||
}
|
}
|
||||||
|
|
||||||
Tbl_StartCellAttr ("colspan=\"%u\" class=\"LOG RIGHT_BOTTOM\" style=\"width:%upx;\"",
|
Tbl_StartCellAttr ("colspan=\"%u\" class=\"LOG RIGHT_BOTTOM\" style=\"width:%upx;\"",
|
||||||
(GRAPH_DISTRIBUTION_PER_HOUR_TOTAL_WIDTH/5)/2,
|
(GRAPH_DISTRIBUTION_PER_HOUR_TOTAL_WIDTH/5)/2,
|
||||||
(GRAPH_DISTRIBUTION_PER_HOUR_TOTAL_WIDTH/5)/2);
|
(GRAPH_DISTRIBUTION_PER_HOUR_TOTAL_WIDTH/5)/2);
|
||||||
Str_WriteFloatNum (Gbl.F.Out,HitsMax);
|
Str_WriteFloatNumToFile (Gbl.F.Out,HitsMax);
|
||||||
Tbl_EndCell ();
|
Tbl_EndCell ();
|
||||||
|
|
||||||
Tbl_EndRow ();
|
Tbl_EndRow ();
|
||||||
|
@ -2422,7 +2422,8 @@ static void Sta_DrawBarColors (Sta_ColorType_t ColorType,float HitsMax)
|
||||||
NumColor++)
|
NumColor++)
|
||||||
{
|
{
|
||||||
Sta_SetColor (ColorType,(float) NumColor,(float) GRAPH_DISTRIBUTION_PER_HOUR_TOTAL_WIDTH,&R,&G,&B);
|
Sta_SetColor (ColorType,(float) NumColor,(float) GRAPH_DISTRIBUTION_PER_HOUR_TOTAL_WIDTH,&R,&G,&B);
|
||||||
Tbl_StartCellAttr ("class=\"LEFT_MIDDLE\" style=\"width:1px; background-color:#%02X%02X%02X;\">",
|
Tbl_StartCellAttr ("class=\"LEFT_MIDDLE\""
|
||||||
|
" style=\"width:1px; background-color:#%02X%02X%02X;\"",
|
||||||
R,G,B);
|
R,G,B);
|
||||||
fprintf (Gbl.F.Out,"<img src=\"%s/tr1x14.gif\" alt=\"\" title=\"\" />",
|
fprintf (Gbl.F.Out,"<img src=\"%s/tr1x14.gif\" alt=\"\" title=\"\" />",
|
||||||
Cfg_URL_ICON_PUBLIC);
|
Cfg_URL_ICON_PUBLIC);
|
||||||
|
@ -2442,22 +2443,31 @@ static void Sta_DrawAccessesPerHourForADay (Sta_ColorType_t ColorType,float Hits
|
||||||
unsigned R;
|
unsigned R;
|
||||||
unsigned G;
|
unsigned G;
|
||||||
unsigned B;
|
unsigned B;
|
||||||
|
char *Str;
|
||||||
|
|
||||||
for (Hour = 0;
|
for (Hour = 0;
|
||||||
Hour < 24;
|
Hour < 24;
|
||||||
Hour++)
|
Hour++)
|
||||||
{
|
{
|
||||||
|
/***** Set color depending on hits *****/
|
||||||
Sta_SetColor (ColorType,HitsNum[Hour],HitsMax,&R,&G,&B);
|
Sta_SetColor (ColorType,HitsNum[Hour],HitsMax,&R,&G,&B);
|
||||||
fprintf (Gbl.F.Out,"<td class=\"LOG LEFT_MIDDLE\" title=\"");
|
|
||||||
Str_WriteFloatNum (Gbl.F.Out,HitsNum[Hour]);
|
/***** Write from floating point number to string *****/
|
||||||
fprintf (Gbl.F.Out,"\" style=\"width:%upx; background-color:#%02X%02X%02X;\">",
|
Str_FloatNumToStr (&Str,HitsNum[Hour]);
|
||||||
GRAPH_DISTRIBUTION_PER_HOUR_HOUR_WIDTH,R,G,B);
|
|
||||||
|
/***** Write cell *****/
|
||||||
|
Tbl_StartCellAttr ("class=\"LOG LEFT_MIDDLE\" title=\"%s\""
|
||||||
|
" style=\"width:%upx; background-color:#%02X%02X%02X;\"",
|
||||||
|
Str,GRAPH_DISTRIBUTION_PER_HOUR_HOUR_WIDTH,R,G,B);
|
||||||
Tbl_EndCell ();
|
Tbl_EndCell ();
|
||||||
|
|
||||||
|
/***** Free memory allocated for string *****/
|
||||||
|
free ((void *) Str);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/************************* Set color depending on ratio **********************/
|
/************************* Set color depending on hits ***********************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
// Hits.Max must be > 0
|
// Hits.Max must be > 0
|
||||||
/*
|
/*
|
||||||
|
@ -2925,7 +2935,7 @@ static void Sta_WriteAccessHour (unsigned Hour,struct Sta_Hits *Hits,unsigned Co
|
||||||
fprintf (Gbl.F.Out,"%u%%<br />",
|
fprintf (Gbl.F.Out,"%u%%<br />",
|
||||||
(unsigned) (((Hits->Num * 100.0) /
|
(unsigned) (((Hits->Num * 100.0) /
|
||||||
Hits->Total) + 0.5));
|
Hits->Total) + 0.5));
|
||||||
Str_WriteFloatNum (Gbl.F.Out,Hits->Num);
|
Str_WriteFloatNumToFile (Gbl.F.Out,Hits->Num);
|
||||||
fprintf (Gbl.F.Out,"<br />");
|
fprintf (Gbl.F.Out,"<br />");
|
||||||
BarHeight = (unsigned) (((Hits->Num * 500.0) / Hits->Max) + 0.5);
|
BarHeight = (unsigned) (((Hits->Num * 500.0) / Hits->Max) + 0.5);
|
||||||
if (BarHeight == 0)
|
if (BarHeight == 0)
|
||||||
|
@ -3995,7 +4005,7 @@ static void Sta_DrawBarNumHits (char Color,
|
||||||
Cfg_URL_ICON_PUBLIC,Color,BarWidth);
|
Cfg_URL_ICON_PUBLIC,Color,BarWidth);
|
||||||
|
|
||||||
/***** Write the number of hits *****/
|
/***** Write the number of hits *****/
|
||||||
Str_WriteFloatNum (Gbl.F.Out,HitsNum);
|
Str_WriteFloatNumToFile (Gbl.F.Out,HitsNum);
|
||||||
fprintf (Gbl.F.Out," (%u",
|
fprintf (Gbl.F.Out," (%u",
|
||||||
(unsigned) (((HitsNum * 100.0) /
|
(unsigned) (((HitsNum * 100.0) /
|
||||||
HitsTotal) + 0.5));
|
HitsTotal) + 0.5));
|
||||||
|
|
|
@ -25,10 +25,12 @@
|
||||||
/********************************* Headers ***********************************/
|
/********************************* Headers ***********************************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
#define _GNU_SOURCE // For asprintf
|
||||||
#include <linux/stddef.h> // For NULL
|
#include <linux/stddef.h> // For NULL
|
||||||
#include <ctype.h> // For isprint, isspace, etc.
|
#include <ctype.h> // For isprint, isspace, etc.
|
||||||
#include <locale.h> // For setlocale
|
#include <locale.h> // For setlocale
|
||||||
#include <math.h> // For log10, floor, ceil, modf, sqrt...
|
#include <math.h> // For log10, floor, ceil, modf, sqrt...
|
||||||
|
#include <stdio.h> // For asprintf
|
||||||
#include <stdlib.h> // For malloc and free
|
#include <stdlib.h> // For malloc and free
|
||||||
#include <string.h> // For string functions
|
#include <string.h> // For string functions
|
||||||
|
|
||||||
|
@ -878,10 +880,29 @@ char Str_ConvertToLowerLetter (char Ch)
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/******** Write a number in floating point with the correct accuracy *********/
|
/*** Write a number in floating point with the correct accuracy to a file ****/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
void Str_WriteFloatNum (FILE *FileDst,float Number)
|
void Str_WriteFloatNumToFile (FILE *FileDst,float Number)
|
||||||
|
{
|
||||||
|
char *Str;
|
||||||
|
|
||||||
|
/***** Write from floating point number to string *****/
|
||||||
|
Str_FloatNumToStr (&Str,Number);
|
||||||
|
|
||||||
|
/***** Write number from string to file *****/
|
||||||
|
fprintf (FileDst,"%s",Str);
|
||||||
|
|
||||||
|
/***** Free memory allocated for string *****/
|
||||||
|
free ((void *) Str);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
/** Write a number in floating point with the correct accuracy to a string ***/
|
||||||
|
/*****************************************************************************/
|
||||||
|
// Str should be freed after calling this function
|
||||||
|
|
||||||
|
void Str_FloatNumToStr (char **Str,float Number)
|
||||||
{
|
{
|
||||||
double IntegerPart;
|
double IntegerPart;
|
||||||
double FractionaryPart;
|
double FractionaryPart;
|
||||||
|
@ -890,7 +911,10 @@ void Str_WriteFloatNum (FILE *FileDst,float Number)
|
||||||
FractionaryPart = modf ((double) Number,&IntegerPart);
|
FractionaryPart = modf ((double) Number,&IntegerPart);
|
||||||
|
|
||||||
if (FractionaryPart == 0.0)
|
if (FractionaryPart == 0.0)
|
||||||
fprintf (FileDst,"%.0f",IntegerPart);
|
{
|
||||||
|
if (asprintf (Str,"%.0f",IntegerPart) < 0)
|
||||||
|
Lay_NotEnoughMemoryExit ();
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (IntegerPart != 0.0)
|
if (IntegerPart != 0.0)
|
||||||
|
@ -907,7 +931,8 @@ void Str_WriteFloatNum (FILE *FileDst,float Number)
|
||||||
Format = "%.6f";
|
Format = "%.6f";
|
||||||
else
|
else
|
||||||
Format = "%e";
|
Format = "%e";
|
||||||
fprintf (FileDst,Format,Number);
|
if (asprintf (Str,Format,Number) < 0)
|
||||||
|
Lay_NotEnoughMemoryExit ();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -92,7 +92,8 @@ char *Str_ConvertToLowerText (char *Str);
|
||||||
char Str_ConvertToUpperLetter (char Ch);
|
char Str_ConvertToUpperLetter (char Ch);
|
||||||
char Str_ConvertToLowerLetter (char Ch);
|
char Str_ConvertToLowerLetter (char Ch);
|
||||||
|
|
||||||
void Str_WriteFloatNum (FILE *FileDst,float Number);
|
void Str_WriteFloatNumToFile (FILE *FileDst,float Number);
|
||||||
|
void Str_FloatNumToStr (char **Str,float Number);
|
||||||
void Str_ConvertStrFloatCommaToStrFloatPoint (char *Str);
|
void Str_ConvertStrFloatCommaToStrFloatPoint (char *Str);
|
||||||
float Str_GetFloatNumFromStr (const char *Str);
|
float Str_GetFloatNumFromStr (const char *Str);
|
||||||
void Str_SetDecimalPointToUS (void);
|
void Str_SetDecimalPointToUS (void);
|
||||||
|
|
|
@ -913,7 +913,7 @@ static void Syl_PutFormItemSyllabus (bool NewItem,unsigned NumItem,int Level,int
|
||||||
}
|
}
|
||||||
|
|
||||||
/***** Text of the item *****/
|
/***** Text of the item *****/
|
||||||
Tbl_StartCellAttr ("colspan=\"%d\" class=\"LEFT_MIDDLE COLOR%u\">",
|
Tbl_StartCellAttr ("colspan=\"%d\" class=\"LEFT_MIDDLE COLOR%u\"",
|
||||||
LstItemsSyllabus.NumLevels - Level + 1,Gbl.RowEvenOdd);
|
LstItemsSyllabus.NumLevels - Level + 1,Gbl.RowEvenOdd);
|
||||||
Frm_StartForm (NewItem ? (Gbl.Crs.Info.Type == Inf_LECTURES ? ActInsIteSylLec :
|
Frm_StartForm (NewItem ? (Gbl.Crs.Info.Type == Inf_LECTURES ? ActInsIteSylLec :
|
||||||
ActInsIteSylPra) :
|
ActInsIteSylPra) :
|
||||||
|
|
54
swad_table.c
54
swad_table.c
|
@ -79,8 +79,7 @@ void Tbl_StartTableClass (const char *fmt,...)
|
||||||
Lay_NotEnoughMemoryExit ();
|
Lay_NotEnoughMemoryExit ();
|
||||||
|
|
||||||
/***** Print HTML *****/
|
/***** Print HTML *****/
|
||||||
fprintf (Gbl.F.Out,
|
fprintf (Gbl.F.Out,"<table class=\"%s\">",Class);
|
||||||
"<table class=\"%s\">",Class);
|
|
||||||
|
|
||||||
free ((void *) Class);
|
free ((void *) Class);
|
||||||
}
|
}
|
||||||
|
@ -94,8 +93,7 @@ void Tbl_StartTableClass (const char *fmt,...)
|
||||||
void Tbl_StartTablePadding (unsigned CellPadding)
|
void Tbl_StartTablePadding (unsigned CellPadding)
|
||||||
{
|
{
|
||||||
if (CellPadding)
|
if (CellPadding)
|
||||||
fprintf (Gbl.F.Out,
|
fprintf (Gbl.F.Out,"<table class=\"CELLS_PAD_%u\">",
|
||||||
"<table class=\"CELLS_PAD_%u\">",
|
|
||||||
CellPadding); // CellPadding must be 0, 1, 2, 5 or 10
|
CellPadding); // CellPadding must be 0, 1, 2, 5 or 10
|
||||||
else
|
else
|
||||||
Tbl_StartTable ();
|
Tbl_StartTable ();
|
||||||
|
@ -103,15 +101,13 @@ void Tbl_StartTablePadding (unsigned CellPadding)
|
||||||
|
|
||||||
void Tbl_StartTable (void)
|
void Tbl_StartTable (void)
|
||||||
{
|
{
|
||||||
fprintf (Gbl.F.Out,
|
fprintf (Gbl.F.Out,"<table>");
|
||||||
"<table>");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Tbl_StartTableCenterPadding (unsigned CellPadding)
|
void Tbl_StartTableCenterPadding (unsigned CellPadding)
|
||||||
{
|
{
|
||||||
if (CellPadding)
|
if (CellPadding)
|
||||||
fprintf (Gbl.F.Out,
|
fprintf (Gbl.F.Out,"<table class=\"FRAME_TBL_CENTER CELLS_PAD_%u\">",
|
||||||
"<table class=\"FRAME_TBL_CENTER CELLS_PAD_%u\">",
|
|
||||||
CellPadding); // CellPadding must be 0, 1, 2, 5 or 10
|
CellPadding); // CellPadding must be 0, 1, 2, 5 or 10
|
||||||
else
|
else
|
||||||
Tbl_StartTableCenter ();
|
Tbl_StartTableCenter ();
|
||||||
|
@ -119,15 +115,13 @@ void Tbl_StartTableCenterPadding (unsigned CellPadding)
|
||||||
|
|
||||||
void Tbl_StartTableCenter (void)
|
void Tbl_StartTableCenter (void)
|
||||||
{
|
{
|
||||||
fprintf (Gbl.F.Out,
|
fprintf (Gbl.F.Out,"<table class=\"FRAME_TBL_CENTER\">");
|
||||||
"<table class=\"FRAME_TBL_CENTER\">");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Tbl_StartTableWidePadding (unsigned CellPadding)
|
void Tbl_StartTableWidePadding (unsigned CellPadding)
|
||||||
{
|
{
|
||||||
if (CellPadding)
|
if (CellPadding)
|
||||||
fprintf (Gbl.F.Out,
|
fprintf (Gbl.F.Out,"<table class=\"FRAME_TBL_WIDE CELLS_PAD_%u\">",
|
||||||
"<table class=\"FRAME_TBL_WIDE CELLS_PAD_%u\">",
|
|
||||||
CellPadding); // CellPadding must be 0, 1, 2, 5 or 10
|
CellPadding); // CellPadding must be 0, 1, 2, 5 or 10
|
||||||
else
|
else
|
||||||
Tbl_StartTableWide ();
|
Tbl_StartTableWide ();
|
||||||
|
@ -135,15 +129,13 @@ void Tbl_StartTableWidePadding (unsigned CellPadding)
|
||||||
|
|
||||||
void Tbl_StartTableWide (void)
|
void Tbl_StartTableWide (void)
|
||||||
{
|
{
|
||||||
fprintf (Gbl.F.Out,
|
fprintf (Gbl.F.Out,"<table class=\"FRAME_TBL_WIDE\">");
|
||||||
"<table class=\"FRAME_TBL_WIDE\">");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Tbl_StartTableWideMarginPadding (unsigned CellPadding)
|
void Tbl_StartTableWideMarginPadding (unsigned CellPadding)
|
||||||
{
|
{
|
||||||
if (CellPadding)
|
if (CellPadding)
|
||||||
fprintf (Gbl.F.Out,
|
fprintf (Gbl.F.Out,"<table class=\"FRAME_TBL_WIDE_MARGIN CELLS_PAD_%u\">",
|
||||||
"<table class=\"FRAME_TBL_WIDE_MARGIN CELLS_PAD_%u\">",
|
|
||||||
CellPadding); // CellPadding must be 0, 1, 2, 5 or 10
|
CellPadding); // CellPadding must be 0, 1, 2, 5 or 10
|
||||||
else
|
else
|
||||||
Tbl_StartTableWideMargin ();
|
Tbl_StartTableWideMargin ();
|
||||||
|
@ -151,14 +143,12 @@ void Tbl_StartTableWideMarginPadding (unsigned CellPadding)
|
||||||
|
|
||||||
void Tbl_StartTableWideMargin (void)
|
void Tbl_StartTableWideMargin (void)
|
||||||
{
|
{
|
||||||
fprintf (Gbl.F.Out,
|
fprintf (Gbl.F.Out,"<table class=\"FRAME_TBL_WIDE_MARGIN\">");
|
||||||
"<table class=\"FRAME_TBL_WIDE_MARGIN\">");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Tbl_EndTable (void)
|
void Tbl_EndTable (void)
|
||||||
{
|
{
|
||||||
fprintf (Gbl.F.Out,
|
fprintf (Gbl.F.Out,"</table>");
|
||||||
"</table>");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
@ -185,8 +175,7 @@ void Tbl_StartRowAttr (const char *fmt,...)
|
||||||
Lay_NotEnoughMemoryExit ();
|
Lay_NotEnoughMemoryExit ();
|
||||||
|
|
||||||
/***** Print HTML *****/
|
/***** Print HTML *****/
|
||||||
fprintf (Gbl.F.Out,
|
fprintf (Gbl.F.Out,"<tr %s>",Attr);
|
||||||
"<tr %s>",Attr);
|
|
||||||
|
|
||||||
free ((void *) Attr);
|
free ((void *) Attr);
|
||||||
}
|
}
|
||||||
|
@ -199,14 +188,12 @@ void Tbl_StartRowAttr (const char *fmt,...)
|
||||||
|
|
||||||
void Tbl_StartRow (void)
|
void Tbl_StartRow (void)
|
||||||
{
|
{
|
||||||
fprintf (Gbl.F.Out,
|
fprintf (Gbl.F.Out,"<tr>");
|
||||||
"<tr>");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Tbl_EndRow (void)
|
void Tbl_EndRow (void)
|
||||||
{
|
{
|
||||||
fprintf (Gbl.F.Out,
|
fprintf (Gbl.F.Out,"</tr>");
|
||||||
"</tr>");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
@ -233,8 +220,7 @@ void Tbl_StartCellAttr (const char *fmt,...)
|
||||||
Lay_NotEnoughMemoryExit ();
|
Lay_NotEnoughMemoryExit ();
|
||||||
|
|
||||||
/***** Print HTML *****/
|
/***** Print HTML *****/
|
||||||
fprintf (Gbl.F.Out,
|
fprintf (Gbl.F.Out,"<td %s>",Attr);
|
||||||
"<td %s>",Attr);
|
|
||||||
|
|
||||||
free ((void *) Attr);
|
free ((void *) Attr);
|
||||||
}
|
}
|
||||||
|
@ -247,14 +233,12 @@ void Tbl_StartCellAttr (const char *fmt,...)
|
||||||
|
|
||||||
void Tbl_StartCell (void)
|
void Tbl_StartCell (void)
|
||||||
{
|
{
|
||||||
fprintf (Gbl.F.Out,
|
fprintf (Gbl.F.Out,"<td>");
|
||||||
"<td>");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Tbl_EndCell (void)
|
void Tbl_EndCell (void)
|
||||||
{
|
{
|
||||||
fprintf (Gbl.F.Out,
|
fprintf (Gbl.F.Out,"</td>");
|
||||||
"</td>");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Tbl_PutEmptyCells (unsigned NumColumns)
|
void Tbl_PutEmptyCells (unsigned NumColumns)
|
||||||
|
@ -264,8 +248,7 @@ void Tbl_PutEmptyCells (unsigned NumColumns)
|
||||||
for (NumCol = 0;
|
for (NumCol = 0;
|
||||||
NumCol < NumColumns;
|
NumCol < NumColumns;
|
||||||
NumCol++)
|
NumCol++)
|
||||||
fprintf (Gbl.F.Out,
|
fprintf (Gbl.F.Out,"<td></td>");
|
||||||
"<td></td>");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Tbl_PutEmptyColouredCells (unsigned NumColumns)
|
void Tbl_PutEmptyColouredCells (unsigned NumColumns)
|
||||||
|
@ -275,7 +258,6 @@ void Tbl_PutEmptyColouredCells (unsigned NumColumns)
|
||||||
for (NumCol = 0;
|
for (NumCol = 0;
|
||||||
NumCol < NumColumns;
|
NumCol < NumColumns;
|
||||||
NumCol++)
|
NumCol++)
|
||||||
fprintf (Gbl.F.Out,
|
fprintf (Gbl.F.Out,"<td class=\"COLOR%u\"></td>",
|
||||||
"<td class=\"COLOR%u\"></td>",
|
|
||||||
Gbl.RowEvenOdd);
|
Gbl.RowEvenOdd);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1492,22 +1492,22 @@ static void TT_TimeTableDrawCell (unsigned Weekday,unsigned Interval,unsigned Co
|
||||||
/* Create rowspan, colspan and class strings */
|
/* Create rowspan, colspan and class strings */
|
||||||
if (RowSpan > 1)
|
if (RowSpan > 1)
|
||||||
{
|
{
|
||||||
if (asprintf (&RowSpanStr,"%s","") < 0)
|
if (asprintf (&RowSpanStr,"rowspan=\"%u\" ",RowSpan) < 0)
|
||||||
Lay_NotEnoughMemoryExit ();
|
Lay_NotEnoughMemoryExit ();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (asprintf (&RowSpanStr,"rowspan=\"%u\" ",RowSpan) < 0)
|
if (asprintf (&RowSpanStr,"%s","") < 0)
|
||||||
Lay_NotEnoughMemoryExit ();
|
Lay_NotEnoughMemoryExit ();
|
||||||
}
|
}
|
||||||
if (ColSpan > 1)
|
if (ColSpan > 1)
|
||||||
{
|
{
|
||||||
if (asprintf (&ColSpanStr,"%s","") < 0)
|
if (asprintf (&ColSpanStr,"colspan=\"%u\" ",ColSpan) < 0)
|
||||||
Lay_NotEnoughMemoryExit ();
|
Lay_NotEnoughMemoryExit ();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (asprintf (&ColSpanStr,"colspan=\"%u\" ",ColSpan) < 0)
|
if (asprintf (&ColSpanStr,"%s","") < 0)
|
||||||
Lay_NotEnoughMemoryExit ();
|
Lay_NotEnoughMemoryExit ();
|
||||||
}
|
}
|
||||||
if (ClassType == TT_FREE)
|
if (ClassType == TT_FREE)
|
||||||
|
|
|
@ -8943,16 +8943,17 @@ static void Usr_DrawClassPhoto (Usr_ClassPhotoType_t ClassPhotoType,
|
||||||
ID_GetListIDsFromUsrCod (&UsrDat);
|
ID_GetListIDsFromUsrCod (&UsrDat);
|
||||||
|
|
||||||
/***** Begin user's cell *****/
|
/***** Begin user's cell *****/
|
||||||
fprintf (Gbl.F.Out,"<td class=\"CLASSPHOTO CENTER_BOTTOM");
|
|
||||||
if (ClassPhotoType == Usr_CLASS_PHOTO_SEL &&
|
if (ClassPhotoType == Usr_CLASS_PHOTO_SEL &&
|
||||||
UsrDat.UsrCod == Gbl.Usrs.Other.UsrDat.UsrCod)
|
UsrDat.UsrCod == Gbl.Usrs.Other.UsrDat.UsrCod)
|
||||||
{
|
{
|
||||||
UsrIsTheMsgSender = true;
|
UsrIsTheMsgSender = true;
|
||||||
fprintf (Gbl.F.Out," LIGHT_GREEN");
|
Tbl_StartCellAttr ("class=\"CLASSPHOTO CENTER_BOTTOM LIGHT_GREEN\"");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
UsrIsTheMsgSender = false;
|
UsrIsTheMsgSender = false;
|
||||||
fprintf (Gbl.F.Out,"\">");
|
Tbl_StartCellAttr ("class=\"CLASSPHOTO CENTER_BOTTOM\"");
|
||||||
|
}
|
||||||
|
|
||||||
/***** Checkbox to select this user *****/
|
/***** Checkbox to select this user *****/
|
||||||
if (PutCheckBoxToSelectUsr)
|
if (PutCheckBoxToSelectUsr)
|
||||||
|
|
Loading…
Reference in New Issue