mirror of https://github.com/acanas/swad-core.git
Version19.31.33
This commit is contained in:
parent
0db0eb335e
commit
dd2eb13e54
|
@ -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.32 (2019-10-08)"
|
||||
#define Log_PLATFORM_VERSION "SWAD 19.31.33 (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.33: Oct 08, 2019 Code refactoring in HTML tables. (246688 lines)
|
||||
Version 19.31.32: Oct 08, 2019 Code refactoring in HTML tables. (246718 lines)
|
||||
Version 19.31.31: Oct 08, 2019 Code refactoring in HTML tables. (246762 lines)
|
||||
Version 19.31.30: Oct 08, 2019 Code refactoring in HTML tables. (246731 lines)
|
||||
|
|
154
swad_record.c
154
swad_record.c
|
@ -383,7 +383,7 @@ void Rec_ShowFormCreateRecordField (void)
|
|||
Tbl_EndCell ();
|
||||
|
||||
/***** Field name *****/
|
||||
fprintf (Gbl.F.Out,"<td class=\"LEFT_MIDDLE\">");
|
||||
Tbl_StartCellAttr ("class=\"LEFT_MIDDLE\"");
|
||||
fprintf (Gbl.F.Out,"<input type=\"text\" name=\"FieldName\""
|
||||
" style=\"width:500px;\" maxlength=\"%u\" value=\"%s\""
|
||||
" required=\"required\" />",
|
||||
|
@ -391,7 +391,7 @@ void Rec_ShowFormCreateRecordField (void)
|
|||
Tbl_EndCell ();
|
||||
|
||||
/***** Number of lines in form ******/
|
||||
fprintf (Gbl.F.Out,"<td class=\"CENTER_MIDDLE\">");
|
||||
Tbl_StartCellAttr ("class=\"CENTER_MIDDLE\"");
|
||||
fprintf (Gbl.F.Out,"<input type=\"text\" name=\"NumLines\""
|
||||
" size=\"2\" maxlength=\"2\" value=\"%u\""
|
||||
" required=\"required\" />",
|
||||
|
@ -399,7 +399,7 @@ void Rec_ShowFormCreateRecordField (void)
|
|||
Tbl_EndCell ();
|
||||
|
||||
/***** Visibility to students *****/
|
||||
fprintf (Gbl.F.Out,"<td class=\"CENTER_MIDDLE\">");
|
||||
Tbl_StartCellAttr ("class=\"CENTER_MIDDLE\"");
|
||||
fprintf (Gbl.F.Out,"<select name=\"Visibility\">");
|
||||
for (Vis = (Rec_VisibilityRecordFields_t) 0;
|
||||
Vis < (Rec_VisibilityRecordFields_t) Rec_NUM_TYPES_VISIBILITY;
|
||||
|
@ -1749,17 +1749,17 @@ static void Rec_ShowCrsRecord (Rec_CourseRecordViewType_t TypeOfView,
|
|||
|
||||
/***** Write heading *****/
|
||||
Tbl_StartRow ();
|
||||
fprintf (Gbl.F.Out,"<td colspan=\"2\" class=\"LEFT_TOP\">");
|
||||
|
||||
Tbl_StartCellAttr ("colspan=\"2\" class=\"LEFT_TOP\"");
|
||||
Tbl_StartTableWide ();
|
||||
Tbl_StartRow ();
|
||||
|
||||
fprintf (Gbl.F.Out,"<td class=\"LEFT_MIDDLE\" style=\"width:%upx;\">",
|
||||
Rec_DEGREE_LOGO_SIZE);
|
||||
Tbl_StartCellAttr ("class=\"LEFT_MIDDLE\" style=\"width:%upx;\"",Rec_DEGREE_LOGO_SIZE);
|
||||
Log_DrawLogo (Hie_DEG,Gbl.Hierarchy.Deg.DegCod,
|
||||
Gbl.Hierarchy.Deg.ShrtName,Rec_DEGREE_LOGO_SIZE,NULL,true);
|
||||
Tbl_EndCell ();
|
||||
|
||||
fprintf (Gbl.F.Out,"<td class=\"REC_HEAD CENTER_MIDDLE\">");
|
||||
Tbl_StartCellAttr ("class=\"REC_HEAD CENTER_MIDDLE\"");
|
||||
fprintf (Gbl.F.Out,"%s<br />%s<br />%s",
|
||||
Gbl.Hierarchy.Deg.FullName,Gbl.Hierarchy.Crs.FullName,
|
||||
UsrDat->FullName);
|
||||
|
@ -1800,10 +1800,11 @@ static void Rec_ShowCrsRecord (Rec_CourseRecordViewType_t TypeOfView,
|
|||
|
||||
/* Name of the field */
|
||||
Tbl_StartRow ();
|
||||
fprintf (Gbl.F.Out,"<td class=\"REC_C1_BOT %s RIGHT_TOP COLOR%u\">",
|
||||
ICanEditThisField ? The_ClassFormInBox[Gbl.Prefs.Theme] :
|
||||
"REC_DAT_SMALL",
|
||||
Gbl.RowEvenOdd);
|
||||
|
||||
Tbl_StartCellAttr ("class=\"REC_C1_BOT %s RIGHT_TOP COLOR%u\"",
|
||||
ICanEditThisField ? The_ClassFormInBox[Gbl.Prefs.Theme] :
|
||||
"REC_DAT_SMALL",
|
||||
Gbl.RowEvenOdd);
|
||||
fprintf (Gbl.F.Out,"%s:",Gbl.Crs.Records.LstFields.Lst[NumField].Name);
|
||||
if (TypeOfView == Rec_CRS_LIST_ONE_RECORD ||
|
||||
TypeOfView == Rec_CRS_LIST_SEVERAL_RECORDS)
|
||||
|
@ -1822,8 +1823,7 @@ static void Rec_ShowCrsRecord (Rec_CourseRecordViewType_t TypeOfView,
|
|||
|
||||
/* Write form, text, or nothing depending on
|
||||
the user's role and the visibility of the field */
|
||||
fprintf (Gbl.F.Out,"<td class=\"REC_C2_BOT REC_DAT_BOLD LEFT_TOP COLOR%u\">",
|
||||
Gbl.RowEvenOdd);
|
||||
Tbl_StartCellAttr ("class=\"REC_C2_BOT REC_DAT_BOLD LEFT_TOP COLOR%u\"",Gbl.RowEvenOdd);
|
||||
if (ICanEditThisField) // Show with form
|
||||
{
|
||||
fprintf (Gbl.F.Out,"<textarea name=\"Field%ld\" rows=\"%u\""
|
||||
|
@ -2289,7 +2289,8 @@ void Rec_ShowSharedUsrRecord (Rec_SharedRecordViewType_t TypeOfView,
|
|||
ShowTeacherRows)
|
||||
{
|
||||
Tbl_StartRow ();
|
||||
fprintf (Gbl.F.Out,"<td colspan=\"3\">");
|
||||
|
||||
Tbl_StartCellAttr ("colspan=\"3\"");
|
||||
|
||||
/***** Show email and user's IDs *****/
|
||||
if (ShowIDRows)
|
||||
|
@ -2687,7 +2688,7 @@ static void Rec_PutParamsMsgUsr (void)
|
|||
static void Rec_ShowInstitutionInHead (struct Instit *Ins,bool PutFormLinks)
|
||||
{
|
||||
/***** Institution logo *****/
|
||||
fprintf (Gbl.F.Out,"<td rowspan=\"4\" class=\"REC_C1_TOP CENTER_MIDDLE\">");
|
||||
Tbl_StartCellAttr ("rowspan=\"4\" class=\"REC_C1_TOP CENTER_MIDDLE\"");
|
||||
if (Ins->InsCod > 0)
|
||||
{
|
||||
/* Form to go to the institution */
|
||||
|
@ -2708,7 +2709,7 @@ static void Rec_ShowInstitutionInHead (struct Instit *Ins,bool PutFormLinks)
|
|||
Tbl_EndCell ();
|
||||
|
||||
/***** Institution name *****/
|
||||
fprintf (Gbl.F.Out,"<td class=\"REC_C2_TOP REC_HEAD LEFT_MIDDLE\">");
|
||||
Tbl_StartCellAttr ("class=\"REC_C2_TOP REC_HEAD LEFT_MIDDLE\"");
|
||||
if (Ins->InsCod > 0)
|
||||
{
|
||||
/* Form to go to the institution */
|
||||
|
@ -2738,7 +2739,7 @@ static void Rec_ShowPhoto (struct UsrData *UsrDat)
|
|||
bool ShowPhoto = Pho_ShowingUsrPhotoIsAllowed (UsrDat,PhotoURL);
|
||||
|
||||
/***** User's photo *****/
|
||||
fprintf (Gbl.F.Out,"<td rowspan=\"3\" class=\"REC_C3_TOP CENTER_TOP\">");
|
||||
Tbl_StartCellAttr ("rowspan=\"3\" class=\"REC_C3_TOP CENTER_TOP\"");
|
||||
Pho_ShowUsrPhoto (UsrDat,ShowPhoto ? PhotoURL :
|
||||
NULL,
|
||||
"PHOTO186x248",Pho_ZOOM,false);
|
||||
|
@ -2751,7 +2752,7 @@ static void Rec_ShowPhoto (struct UsrData *UsrDat)
|
|||
|
||||
static void Rec_ShowFullName (struct UsrData *UsrDat)
|
||||
{
|
||||
fprintf (Gbl.F.Out,"<td class=\"REC_C2_MID LEFT_TOP\">");
|
||||
Tbl_StartCellAttr ("class=\"REC_C2_MID LEFT_TOP\"");
|
||||
fprintf (Gbl.F.Out,"<div class=\"REC_NAME\">");
|
||||
|
||||
/***** First name *****/
|
||||
|
@ -2777,7 +2778,7 @@ static void Rec_ShowNickname (struct UsrData *UsrDat,bool PutFormLinks)
|
|||
extern const char *Txt_Another_user_s_profile;
|
||||
bool ItsMe;
|
||||
|
||||
fprintf (Gbl.F.Out,"<td class=\"REC_C2_MID LEFT_BOTTOM\">");
|
||||
Tbl_StartCellAttr ("class=\"REC_C2_MID LEFT_BOTTOM\"");
|
||||
fprintf (Gbl.F.Out,"<div class=\"REC_NICK\">");
|
||||
if (UsrDat->Nickname[0])
|
||||
{
|
||||
|
@ -2808,7 +2809,7 @@ static void Rec_ShowNickname (struct UsrData *UsrDat,bool PutFormLinks)
|
|||
|
||||
static void Rec_ShowCountryInHead (struct UsrData *UsrDat,bool ShowData)
|
||||
{
|
||||
fprintf (Gbl.F.Out,"<td class=\"REC_C2_MID REC_DAT_BOLD LEFT_TOP\">");
|
||||
Tbl_StartCellAttr ("class=\"REC_C2_MID REC_DAT_BOLD LEFT_TOP\"");
|
||||
if (ShowData && UsrDat->CtyCod > 0)
|
||||
/* Link to see country information */
|
||||
Cty_WriteCountryName (UsrDat->CtyCod,
|
||||
|
@ -2823,7 +2824,7 @@ static void Rec_ShowCountryInHead (struct UsrData *UsrDat,bool ShowData)
|
|||
static void Rec_ShowWebsAndSocialNets (struct UsrData *UsrDat,
|
||||
Rec_SharedRecordViewType_t TypeOfView)
|
||||
{
|
||||
fprintf (Gbl.F.Out,"<td class=\"REC_C3_MID CENTER_TOP\">");
|
||||
Tbl_StartCellAttr ("class=\"REC_C3_MID CENTER_TOP\"");
|
||||
if (TypeOfView != Rec_SHA_RECORD_PRINT)
|
||||
Net_ShowWebsAndSocialNets (UsrDat);
|
||||
Tbl_EndCell ();
|
||||
|
@ -2839,11 +2840,11 @@ static void Rec_ShowEmail (struct UsrData *UsrDat,const char *ClassForm)
|
|||
|
||||
Tbl_StartRow ();
|
||||
|
||||
fprintf (Gbl.F.Out,"<td class=\"REC_C1_BOT RIGHT_MIDDLE %s\">",ClassForm);
|
||||
Tbl_StartCellAttr ("class=\"REC_C1_BOT RIGHT_MIDDLE %s\"",ClassForm);
|
||||
fprintf (Gbl.F.Out,"%s:",Txt_Email);
|
||||
Tbl_EndCell ();
|
||||
|
||||
fprintf (Gbl.F.Out,"<td class=\"REC_C2_BOT REC_DAT_BOLD LEFT_MIDDLE\">");
|
||||
Tbl_StartCellAttr ("class=\"REC_C2_BOT REC_DAT_BOLD LEFT_MIDDLE\"");
|
||||
if (UsrDat->Email[0])
|
||||
{
|
||||
fprintf (Gbl.F.Out,"<div class=\"REC_EMAIL\">"); // Limited width
|
||||
|
@ -2873,11 +2874,11 @@ static void Rec_ShowUsrIDs (struct UsrData *UsrDat,const char *ClassForm,
|
|||
|
||||
Tbl_StartRow ();
|
||||
|
||||
fprintf (Gbl.F.Out,"<td class=\"REC_C1_BOT RIGHT_TOP %s\">",ClassForm);
|
||||
Tbl_StartCellAttr ("class=\"REC_C1_BOT RIGHT_TOP %s\"",ClassForm);
|
||||
fprintf (Gbl.F.Out,"%s:",Txt_ID);
|
||||
Tbl_EndCell ();
|
||||
|
||||
fprintf (Gbl.F.Out,"<td class=\"REC_C2_BOT REC_DAT_BOLD LEFT_TOP\">");
|
||||
Tbl_StartCellAttr ("class=\"REC_C2_BOT REC_DAT_BOLD LEFT_TOP\"");
|
||||
ID_WriteUsrIDs (UsrDat,Anchor);
|
||||
Tbl_EndCell ();
|
||||
|
||||
|
@ -2913,12 +2914,12 @@ static void Rec_ShowRole (struct UsrData *UsrDat,
|
|||
/* Get user's roles if not got */
|
||||
Rol_GetRolesInAllCrssIfNotYetGot (UsrDat);
|
||||
|
||||
fprintf (Gbl.F.Out,"<td class=\"REC_C1_BOT RIGHT_MIDDLE\">");
|
||||
Tbl_StartCellAttr ("class=\"REC_C1_BOT RIGHT_MIDDLE\"");
|
||||
fprintf (Gbl.F.Out,"<label for=\"Role\" class=\"%s\">%s:</label>",
|
||||
ClassForm,Txt_Role);
|
||||
Tbl_EndCell ();
|
||||
|
||||
fprintf (Gbl.F.Out,"<td class=\"REC_C2_BOT REC_DAT_BOLD LEFT_MIDDLE\">");
|
||||
Tbl_StartCellAttr ("class=\"REC_C2_BOT REC_DAT_BOLD LEFT_MIDDLE\"");
|
||||
switch (TypeOfView)
|
||||
{
|
||||
case Rec_SHA_SIGN_UP_IN_CRS_FORM: // I want to apply for enrolment
|
||||
|
@ -3111,11 +3112,11 @@ static void Rec_ShowRole (struct UsrData *UsrDat,
|
|||
else if (SexForm)
|
||||
{
|
||||
/***** Form to select a sex *****/
|
||||
fprintf (Gbl.F.Out,"<td class=\"REC_C1_BOT RIGHT_MIDDLE %s\">",ClassForm);
|
||||
Tbl_StartCellAttr ("class=\"REC_C1_BOT RIGHT_MIDDLE %s\"",ClassForm);
|
||||
fprintf (Gbl.F.Out,"%s*:",Txt_Sex);
|
||||
Tbl_EndCell ();
|
||||
|
||||
fprintf (Gbl.F.Out,"<td class=\"REC_C2_BOT LEFT_MIDDLE\">");
|
||||
Tbl_StartCellAttr ("class=\"REC_C2_BOT LEFT_MIDDLE\"");
|
||||
for (Sex = Usr_SEX_FEMALE;
|
||||
Sex <= Usr_SEX_MALE;
|
||||
Sex++)
|
||||
|
@ -3135,11 +3136,11 @@ static void Rec_ShowRole (struct UsrData *UsrDat,
|
|||
else // RoleForm == false, SexForm == false
|
||||
{
|
||||
/***** No form, only text *****/
|
||||
fprintf (Gbl.F.Out,"<td class=\"REC_C1_BOT RIGHT_MIDDLE %s\">",ClassForm);
|
||||
Tbl_StartCellAttr ("class=\"REC_C1_BOT RIGHT_MIDDLE %s\"",ClassForm);
|
||||
fprintf (Gbl.F.Out,"%s:",Txt_Role);
|
||||
Tbl_EndCell ();
|
||||
|
||||
fprintf (Gbl.F.Out,"<td class=\"REC_C2_BOT REC_DAT_BOLD LEFT_MIDDLE\">");
|
||||
Tbl_StartCellAttr ("class=\"REC_C2_BOT REC_DAT_BOLD LEFT_MIDDLE\"");
|
||||
fprintf (Gbl.F.Out,"%s",
|
||||
Txt_ROLES_SINGUL_Abc[UsrDat->Roles.InCurrentCrs.Role][UsrDat->Sex]);
|
||||
Tbl_EndCell ();
|
||||
|
@ -3160,7 +3161,8 @@ static void Rec_ShowSurname1 (struct UsrData *UsrDat,
|
|||
extern const char *Txt_Surname_1;
|
||||
|
||||
Tbl_StartRow ();
|
||||
fprintf (Gbl.F.Out,"<td class=\"REC_C1_BOT RIGHT_MIDDLE\">");
|
||||
|
||||
Tbl_StartCellAttr ("class=\"REC_C1_BOT RIGHT_MIDDLE\"");
|
||||
fprintf (Gbl.F.Out,"<label for=\"Surname1\" class=\"%s\">"
|
||||
"%s",
|
||||
ClassForm,Txt_Surname_1);
|
||||
|
@ -3170,7 +3172,7 @@ static void Rec_ShowSurname1 (struct UsrData *UsrDat,
|
|||
"</label>");
|
||||
Tbl_EndCell ();
|
||||
|
||||
fprintf (Gbl.F.Out,"<td class=\"REC_C2_BOT REC_DAT_BOLD LEFT_MIDDLE\">");
|
||||
Tbl_StartCellAttr ("class=\"REC_C2_BOT REC_DAT_BOLD LEFT_MIDDLE\"");
|
||||
if (ICanEdit)
|
||||
{
|
||||
fprintf (Gbl.F.Out,"<input type=\"text\""
|
||||
|
@ -3186,10 +3188,10 @@ static void Rec_ShowSurname1 (struct UsrData *UsrDat,
|
|||
else if (UsrDat->Surname1[0])
|
||||
fprintf (Gbl.F.Out,"<strong>%s</strong>",UsrDat->Surname1);
|
||||
Tbl_EndCell ();
|
||||
|
||||
Tbl_EndRow ();
|
||||
}
|
||||
|
||||
|
||||
/*****************************************************************************/
|
||||
/*************************** Show user's surname 2 ***************************/
|
||||
/*****************************************************************************/
|
||||
|
@ -3202,14 +3204,14 @@ static void Rec_ShowSurname2 (struct UsrData *UsrDat,
|
|||
|
||||
Tbl_StartRow ();
|
||||
|
||||
fprintf (Gbl.F.Out,"<td class=\"REC_C1_BOT RIGHT_MIDDLE\">");
|
||||
Tbl_StartCellAttr ("class=\"REC_C1_BOT RIGHT_MIDDLE\"");
|
||||
fprintf (Gbl.F.Out,"<label for=\"Surname2\" class=\"%s\">"
|
||||
"%s:"
|
||||
"</label>",
|
||||
ClassForm,Txt_Surname_2);
|
||||
Tbl_EndCell ();
|
||||
|
||||
fprintf (Gbl.F.Out,"<td class=\"REC_C2_BOT REC_DAT_BOLD LEFT_MIDDLE\">");
|
||||
Tbl_StartCellAttr ("class=\"REC_C2_BOT REC_DAT_BOLD LEFT_MIDDLE\"");
|
||||
if (ICanEdit)
|
||||
fprintf (Gbl.F.Out,"<input type=\"text\""
|
||||
" id=\"Surname2\" name=\"Surname2\""
|
||||
|
@ -3237,7 +3239,7 @@ static void Rec_ShowFirstName (struct UsrData *UsrDat,
|
|||
|
||||
Tbl_StartRow ();
|
||||
|
||||
fprintf (Gbl.F.Out,"<td class=\"REC_C1_BOT RIGHT_MIDDLE\">");
|
||||
Tbl_StartCellAttr ("class=\"REC_C1_BOT RIGHT_MIDDLE\"");
|
||||
fprintf (Gbl.F.Out,"<label for=\"FirstName\" class=\"%s\">"
|
||||
"%s",
|
||||
ClassForm,Txt_First_name);
|
||||
|
@ -3247,7 +3249,7 @@ static void Rec_ShowFirstName (struct UsrData *UsrDat,
|
|||
"</label>");
|
||||
Tbl_EndCell ();
|
||||
|
||||
fprintf (Gbl.F.Out,"<td colspan=\"2\" class=\"REC_C2_BOT REC_DAT_BOLD LEFT_MIDDLE\">");
|
||||
Tbl_StartCellAttr ("colspan=\"2\" class=\"REC_C2_BOT REC_DAT_BOLD LEFT_MIDDLE\"");
|
||||
if (ICanEdit)
|
||||
{
|
||||
fprintf (Gbl.F.Out,"<input type=\"text\""
|
||||
|
@ -3288,7 +3290,7 @@ static void Rec_ShowCountry (struct UsrData *UsrDat,
|
|||
|
||||
Tbl_StartRow ();
|
||||
|
||||
fprintf (Gbl.F.Out,"<td class=\"REC_C1_BOT RIGHT_MIDDLE\">");
|
||||
Tbl_StartCellAttr ("class=\"REC_C1_BOT RIGHT_MIDDLE\"");
|
||||
fprintf (Gbl.F.Out,"<label for=\"OthCtyCod\" class=\"%s\">%s",
|
||||
ClassForm,Txt_Country);
|
||||
if (TypeOfView == Rec_SHA_MY_RECORD_FORM)
|
||||
|
@ -3296,7 +3298,7 @@ static void Rec_ShowCountry (struct UsrData *UsrDat,
|
|||
fprintf (Gbl.F.Out,":</label>");
|
||||
Tbl_EndCell ();
|
||||
|
||||
fprintf (Gbl.F.Out,"<td colspan=\"2\" class=\"REC_C2_BOT LEFT_MIDDLE\">");
|
||||
Tbl_StartCellAttr ("colspan=\"2\" class=\"REC_C2_BOT LEFT_MIDDLE\"");
|
||||
|
||||
/***** Selector of country *****/
|
||||
fprintf (Gbl.F.Out,"<select id=\"OthCtyCod\" name=\"OthCtyCod\""
|
||||
|
@ -3336,14 +3338,14 @@ static void Rec_ShowOriginPlace (struct UsrData *UsrDat,
|
|||
|
||||
Tbl_StartRow ();
|
||||
|
||||
fprintf (Gbl.F.Out,"<td class=\"REC_C1_BOT RIGHT_MIDDLE\">");
|
||||
Tbl_StartCellAttr ("class=\"REC_C1_BOT RIGHT_MIDDLE\"");
|
||||
fprintf (Gbl.F.Out,"<label for=\"OriginPlace\" class=\"%s\">"
|
||||
"%s:"
|
||||
"</label>",
|
||||
ClassForm,Txt_Place_of_origin);
|
||||
Tbl_EndCell ();
|
||||
|
||||
fprintf (Gbl.F.Out,"<td class=\"REC_C2_BOT REC_DAT_BOLD LEFT_MIDDLE\">");
|
||||
Tbl_StartCellAttr ("class=\"REC_C2_BOT REC_DAT_BOLD LEFT_MIDDLE\"");
|
||||
if (ShowData)
|
||||
{
|
||||
if (ICanEdit)
|
||||
|
@ -3373,11 +3375,11 @@ static void Rec_ShowDateOfBirth (struct UsrData *UsrDat,
|
|||
|
||||
Tbl_StartRow ();
|
||||
|
||||
fprintf (Gbl.F.Out,"<td class=\"REC_C1_BOT RIGHT_MIDDLE %s\">",ClassForm);
|
||||
Tbl_StartCellAttr ("class=\"REC_C1_BOT RIGHT_MIDDLE %s\"",ClassForm);
|
||||
fprintf (Gbl.F.Out,"%s:",Txt_Date_of_birth);
|
||||
Tbl_EndCell ();
|
||||
|
||||
fprintf (Gbl.F.Out,"<td class=\"REC_C2_BOT REC_DAT_BOLD LEFT_MIDDLE\">");
|
||||
Tbl_StartCellAttr ("class=\"REC_C2_BOT REC_DAT_BOLD LEFT_MIDDLE\"");
|
||||
if (ShowData)
|
||||
{
|
||||
if (ICanEdit)
|
||||
|
@ -3406,14 +3408,14 @@ static void Rec_ShowLocalAddress (struct UsrData *UsrDat,
|
|||
|
||||
Tbl_StartRow ();
|
||||
|
||||
fprintf (Gbl.F.Out,"<td class=\"REC_C1_BOT RIGHT_MIDDLE\">");
|
||||
Tbl_StartCellAttr ("class=\"REC_C1_BOT RIGHT_MIDDLE\"");
|
||||
fprintf (Gbl.F.Out,"<label for=\"LocalAddress\" class=\"%s\">"
|
||||
"%s:"
|
||||
"</label>",
|
||||
ClassForm,Txt_Local_address);
|
||||
Tbl_EndCell ();
|
||||
|
||||
fprintf (Gbl.F.Out,"<td class=\"REC_C2_BOT REC_DAT_BOLD LEFT_MIDDLE\">");
|
||||
Tbl_StartCellAttr ("class=\"REC_C2_BOT REC_DAT_BOLD LEFT_MIDDLE\"");
|
||||
if (ShowData)
|
||||
{
|
||||
if (ICanEdit)
|
||||
|
@ -3443,14 +3445,14 @@ static void Rec_ShowLocalPhone (struct UsrData *UsrDat,
|
|||
|
||||
Tbl_StartRow ();
|
||||
|
||||
fprintf (Gbl.F.Out,"<td class=\"REC_C1_BOT RIGHT_MIDDLE\">");
|
||||
Tbl_StartCellAttr ("class=\"REC_C1_BOT RIGHT_MIDDLE\"");
|
||||
fprintf (Gbl.F.Out,"<label for=\"LocalPhone\" class=\"%s\">"
|
||||
"%s:"
|
||||
"</label>",
|
||||
ClassForm,Txt_Phone);
|
||||
Tbl_EndCell ();
|
||||
|
||||
fprintf (Gbl.F.Out,"<td class=\"REC_C2_BOT REC_DAT_BOLD LEFT_MIDDLE\">");
|
||||
Tbl_StartCellAttr ("class=\"REC_C2_BOT REC_DAT_BOLD LEFT_MIDDLE\"");
|
||||
if (ShowData)
|
||||
{
|
||||
if (ICanEdit)
|
||||
|
@ -3482,14 +3484,14 @@ static void Rec_ShowFamilyAddress (struct UsrData *UsrDat,
|
|||
|
||||
Tbl_StartRow ();
|
||||
|
||||
fprintf (Gbl.F.Out,"<td class=\"REC_C1_BOT RIGHT_MIDDLE\">");
|
||||
Tbl_StartCellAttr ("class=\"REC_C1_BOT RIGHT_MIDDLE\"");
|
||||
fprintf (Gbl.F.Out,"<label for=\"FamilyAddress\" class=\"%s\">"
|
||||
"%s:"
|
||||
"</label>",
|
||||
ClassForm,Txt_Family_address);
|
||||
Tbl_EndCell ();
|
||||
|
||||
fprintf (Gbl.F.Out,"<td class=\"REC_C2_BOT REC_DAT_BOLD LEFT_MIDDLE\">");
|
||||
Tbl_StartCellAttr ("class=\"REC_C2_BOT REC_DAT_BOLD LEFT_MIDDLE\"");
|
||||
if (ShowData)
|
||||
{
|
||||
if (ICanEdit)
|
||||
|
@ -3519,14 +3521,14 @@ static void Rec_ShowFamilyPhone (struct UsrData *UsrDat,
|
|||
|
||||
Tbl_StartRow ();
|
||||
|
||||
fprintf (Gbl.F.Out,"<td class=\"REC_C1_BOT RIGHT_MIDDLE\">");
|
||||
Tbl_StartCellAttr ("class=\"REC_C1_BOT RIGHT_MIDDLE\"");
|
||||
fprintf (Gbl.F.Out,"<label for=\"FamilyPhone\" class=\"%s\">"
|
||||
"%s:"
|
||||
"</label>",
|
||||
ClassForm,Txt_Phone);
|
||||
Tbl_EndCell ();
|
||||
|
||||
fprintf (Gbl.F.Out,"<td class=\"REC_C2_BOT REC_DAT_BOLD LEFT_MIDDLE\">");
|
||||
Tbl_StartCellAttr ("class=\"REC_C2_BOT REC_DAT_BOLD LEFT_MIDDLE\"");
|
||||
if (ShowData)
|
||||
{
|
||||
if (ICanEdit)
|
||||
|
@ -3558,12 +3560,12 @@ static void Rec_ShowComments (struct UsrData *UsrDat,
|
|||
|
||||
Tbl_StartRow ();
|
||||
|
||||
fprintf (Gbl.F.Out,"<td class=\"REC_C1_BOT RIGHT_TOP\">");
|
||||
Tbl_StartCellAttr ("class=\"REC_C1_BOT RIGHT_TOP\"");
|
||||
fprintf (Gbl.F.Out,"<label for=\"Comments\" class=\"%s\">%s:</label>",
|
||||
ClassForm,Txt_USER_comments);
|
||||
Tbl_EndCell ();
|
||||
|
||||
fprintf (Gbl.F.Out,"<td class=\"REC_C2_BOT REC_DAT_BOLD LEFT_TOP\">");
|
||||
Tbl_StartCellAttr ("class=\"REC_C2_BOT REC_DAT_BOLD LEFT_TOP\"");
|
||||
if (ShowData)
|
||||
{
|
||||
if (ICanEdit)
|
||||
|
@ -3619,11 +3621,11 @@ static void Rec_ShowInstitution (struct Instit *Ins,
|
|||
|
||||
Tbl_StartRow ();
|
||||
|
||||
fprintf (Gbl.F.Out,"<td class=\"REC_C1_BOT RIGHT_MIDDLE %s\">",ClassForm);
|
||||
Tbl_StartCellAttr ("class=\"REC_C1_BOT RIGHT_MIDDLE %s\"",ClassForm);
|
||||
fprintf (Gbl.F.Out,"%s:",Txt_Institution);
|
||||
Tbl_EndCell ();
|
||||
|
||||
fprintf (Gbl.F.Out,"<td class=\"REC_C2_BOT REC_DAT_BOLD LEFT_MIDDLE\">");
|
||||
Tbl_StartCellAttr ("class=\"REC_C2_BOT REC_DAT_BOLD LEFT_MIDDLE\"");
|
||||
if (ShowData)
|
||||
if (Ins->InsCod > 0)
|
||||
{
|
||||
|
@ -3652,11 +3654,11 @@ static void Rec_ShowCentre (struct UsrData *UsrDat,
|
|||
|
||||
Tbl_StartRow ();
|
||||
|
||||
fprintf (Gbl.F.Out,"<td class=\"REC_C1_BOT RIGHT_MIDDLE %s\">",ClassForm);
|
||||
Tbl_StartCellAttr ("class=\"REC_C1_BOT RIGHT_MIDDLE %s\"",ClassForm);
|
||||
fprintf (Gbl.F.Out,"%s:",Txt_Centre);
|
||||
Tbl_EndCell ();
|
||||
|
||||
fprintf (Gbl.F.Out,"<td class=\"REC_C2_BOT REC_DAT_BOLD LEFT_MIDDLE\">");
|
||||
Tbl_StartCellAttr ("class=\"REC_C2_BOT REC_DAT_BOLD LEFT_MIDDLE\"");
|
||||
if (ShowData)
|
||||
{
|
||||
if (UsrDat->Tch.CtrCod > 0)
|
||||
|
@ -3689,11 +3691,11 @@ static void Rec_ShowDepartment (struct UsrData *UsrDat,
|
|||
|
||||
Tbl_StartRow ();
|
||||
|
||||
fprintf (Gbl.F.Out,"<td class=\"REC_C1_BOT RIGHT_MIDDLE %s\">",ClassForm);
|
||||
Tbl_StartCellAttr ("class=\"REC_C1_BOT RIGHT_MIDDLE %s\"",ClassForm);
|
||||
fprintf (Gbl.F.Out,"%s:",Txt_Department);
|
||||
Tbl_EndCell ();
|
||||
|
||||
fprintf (Gbl.F.Out,"<td class=\"REC_C2_BOT REC_DAT_BOLD LEFT_MIDDLE\">");
|
||||
Tbl_StartCellAttr ("class=\"REC_C2_BOT REC_DAT_BOLD LEFT_MIDDLE\"");
|
||||
if (ShowData)
|
||||
{
|
||||
if (UsrDat->Tch.DptCod > 0)
|
||||
|
@ -3725,11 +3727,11 @@ static void Rec_ShowOffice (struct UsrData *UsrDat,
|
|||
|
||||
Tbl_StartRow ();
|
||||
|
||||
fprintf (Gbl.F.Out,"<td class=\"REC_C1_BOT RIGHT_MIDDLE %s\">",ClassForm);
|
||||
Tbl_StartCellAttr ("class=\"REC_C1_BOT RIGHT_MIDDLE %s\"",ClassForm);
|
||||
fprintf (Gbl.F.Out,"%s:",Txt_Office);
|
||||
Tbl_EndCell ();
|
||||
|
||||
fprintf (Gbl.F.Out,"<td class=\"REC_C2_BOT REC_DAT_BOLD LEFT_MIDDLE\">");
|
||||
Tbl_StartCellAttr ("class=\"REC_C2_BOT REC_DAT_BOLD LEFT_MIDDLE\"");
|
||||
if (ShowData)
|
||||
fprintf (Gbl.F.Out,"%s",UsrDat->Tch.Office);
|
||||
Tbl_EndCell ();
|
||||
|
@ -3748,11 +3750,11 @@ static void Rec_ShowOfficePhone (struct UsrData *UsrDat,
|
|||
|
||||
Tbl_StartRow ();
|
||||
|
||||
fprintf (Gbl.F.Out,"<td class=\"REC_C1_BOT RIGHT_MIDDLE %s\">",ClassForm);
|
||||
Tbl_StartCellAttr ("class=\"REC_C1_BOT RIGHT_MIDDLE %s\"",ClassForm);
|
||||
fprintf (Gbl.F.Out,"%s:",Txt_Phone);
|
||||
Tbl_EndCell ();
|
||||
|
||||
fprintf (Gbl.F.Out,"<td class=\"REC_C2_BOT REC_DAT_BOLD LEFT_MIDDLE\">");
|
||||
Tbl_StartCellAttr ("class=\"REC_C2_BOT REC_DAT_BOLD LEFT_MIDDLE\"");
|
||||
if (ShowData)
|
||||
fprintf (Gbl.F.Out,"<a href=\"tel:%s\" class=\"REC_DAT_BOLD\">%s</a>",
|
||||
UsrDat->Tch.OfficePhone,
|
||||
|
@ -4035,12 +4037,12 @@ static void Rec_ShowFormMyInsCtrDpt (bool IAmATeacher)
|
|||
/***** Country *****/
|
||||
Tbl_StartRow ();
|
||||
|
||||
fprintf (Gbl.F.Out,"<td class=\"REC_C1_BOT RIGHT_MIDDLE\">");
|
||||
Tbl_StartCellAttr ("class=\"REC_C1_BOT RIGHT_MIDDLE\"");
|
||||
fprintf (Gbl.F.Out,"<label for=\"OthCtyCod\" class=\"%s\">%s*:</label>",
|
||||
ClassForm,Txt_Country);
|
||||
Tbl_EndCell ();
|
||||
|
||||
fprintf (Gbl.F.Out,"<td class=\"REC_C2_BOT LEFT_MIDDLE\">");
|
||||
Tbl_StartCellAttr ("class=\"REC_C2_BOT LEFT_MIDDLE\"");
|
||||
|
||||
/* If list of countries is empty, try to get it */
|
||||
if (!Gbl.Hierarchy.Sys.Ctys.Num)
|
||||
|
@ -4079,12 +4081,12 @@ static void Rec_ShowFormMyInsCtrDpt (bool IAmATeacher)
|
|||
/***** Institution *****/
|
||||
Tbl_StartRow ();
|
||||
|
||||
fprintf (Gbl.F.Out,"<td class=\"REC_C1_BOT RIGHT_MIDDLE\">");
|
||||
Tbl_StartCellAttr ("class=\"REC_C1_BOT RIGHT_MIDDLE\"");
|
||||
fprintf (Gbl.F.Out,"<label for=\"OthInsCod\" class=\"%s\">%s*:</label>",
|
||||
ClassForm,Txt_Institution);
|
||||
Tbl_EndCell ();
|
||||
|
||||
fprintf (Gbl.F.Out,"<td class=\"REC_C2_BOT LEFT_MIDDLE\">");
|
||||
Tbl_StartCellAttr ("class=\"REC_C2_BOT LEFT_MIDDLE\"");
|
||||
|
||||
/* Get list of institutions in this country */
|
||||
Ins_FreeListInstitutions ();
|
||||
|
@ -4128,12 +4130,12 @@ static void Rec_ShowFormMyInsCtrDpt (bool IAmATeacher)
|
|||
/***** Centre *****/
|
||||
Tbl_StartRow ();
|
||||
|
||||
fprintf (Gbl.F.Out,"<td class=\"REC_C1_BOT RIGHT_MIDDLE\">");
|
||||
Tbl_StartCellAttr ("class=\"REC_C1_BOT RIGHT_MIDDLE\"");
|
||||
fprintf (Gbl.F.Out,"<label for=\"OthCtrCod\" class=\"%s\">%s*:</label>",
|
||||
ClassForm,Txt_Centre);
|
||||
Tbl_EndCell ();
|
||||
|
||||
fprintf (Gbl.F.Out,"<td class=\"REC_C2_BOT LEFT_MIDDLE\">");
|
||||
Tbl_StartCellAttr ("class=\"REC_C2_BOT LEFT_MIDDLE\"");
|
||||
|
||||
/* Get list of centres in this institution */
|
||||
Ctr_FreeListCentres ();
|
||||
|
@ -4175,12 +4177,12 @@ static void Rec_ShowFormMyInsCtrDpt (bool IAmATeacher)
|
|||
/***** Department *****/
|
||||
Tbl_StartRow ();
|
||||
|
||||
fprintf (Gbl.F.Out,"<td class=\"REC_C1_BOT RIGHT_MIDDLE\">");
|
||||
Tbl_StartCellAttr ("class=\"REC_C1_BOT RIGHT_MIDDLE\"");
|
||||
fprintf (Gbl.F.Out,"<label for=\"%s\" class=\"%s\">%s*:</label>",
|
||||
Dpt_PARAM_DPT_COD_NAME,ClassForm,Txt_Department);
|
||||
Tbl_EndCell ();
|
||||
|
||||
fprintf (Gbl.F.Out,"<td class=\"REC_C2_BOT LEFT_MIDDLE\">");
|
||||
Tbl_StartCellAttr ("class=\"REC_C2_BOT LEFT_MIDDLE\"");
|
||||
Frm_StartFormAnchor (ActChgMyDpt,Rec_MY_INS_CTR_DPT_ID);
|
||||
Dpt_WriteSelectorDepartment (Gbl.Usrs.Me.UsrDat.InsCod, // Departments in my institution
|
||||
Gbl.Usrs.Me.UsrDat.Tch.DptCod, // Selected department
|
||||
|
@ -4196,14 +4198,14 @@ static void Rec_ShowFormMyInsCtrDpt (bool IAmATeacher)
|
|||
/***** Office *****/
|
||||
Tbl_StartRow ();
|
||||
|
||||
fprintf (Gbl.F.Out,"<td class=\"REC_C1_BOT RIGHT_MIDDLE\">");
|
||||
Tbl_StartCellAttr ("class=\"REC_C1_BOT RIGHT_MIDDLE\"");
|
||||
fprintf (Gbl.F.Out,"<label for=\"Office\" class=\"%s\">"
|
||||
"%s:"
|
||||
"</label>",
|
||||
ClassForm,Txt_Office);
|
||||
Tbl_EndCell ();
|
||||
|
||||
fprintf (Gbl.F.Out,"<td class=\"REC_C2_BOT LEFT_MIDDLE\">");
|
||||
Tbl_StartCellAttr ("class=\"REC_C2_BOT LEFT_MIDDLE\"");
|
||||
Frm_StartFormAnchor (ActChgMyOff,Rec_MY_INS_CTR_DPT_ID);
|
||||
fprintf (Gbl.F.Out,"<input type=\"text\" id=\"Office\" name=\"Office\""
|
||||
" maxlength=\"%u\" value=\"%s\""
|
||||
|
@ -4220,14 +4222,14 @@ static void Rec_ShowFormMyInsCtrDpt (bool IAmATeacher)
|
|||
/***** Phone *****/
|
||||
Tbl_StartRow ();
|
||||
|
||||
fprintf (Gbl.F.Out,"<td class=\"REC_C1_BOT RIGHT_MIDDLE\">");
|
||||
Tbl_StartCellAttr ("class=\"REC_C1_BOT RIGHT_MIDDLE\"");
|
||||
fprintf (Gbl.F.Out,"<label for=\"OfficePhone\" class=\"%s\">"
|
||||
"%s:"
|
||||
"</label>",
|
||||
ClassForm,Txt_Phone);
|
||||
Tbl_EndCell ();
|
||||
|
||||
fprintf (Gbl.F.Out,"<td class=\"REC_C2_BOT LEFT_MIDDLE\">");
|
||||
Tbl_StartCellAttr ("class=\"REC_C2_BOT LEFT_MIDDLE\"");
|
||||
Frm_StartFormAnchor (ActChgMyOffPho,Rec_MY_INS_CTR_DPT_ID);
|
||||
fprintf (Gbl.F.Out,"<input type=\"tel\""
|
||||
" id=\"OfficePhone\" name=\"OfficePhone\""
|
||||
|
|
283
swad_statistic.c
283
swad_statistic.c
|
@ -378,12 +378,11 @@ void Sta_AskShowCrsHits (void)
|
|||
|
||||
Tbl_StartRow ();
|
||||
|
||||
fprintf (Gbl.F.Out,"<td class=\"RIGHT_TOP %s\">",The_ClassFormInBox[Gbl.Prefs.Theme]);
|
||||
Tbl_StartCellAttr ("class=\"RIGHT_TOP %s\"",The_ClassFormInBox[Gbl.Prefs.Theme]);
|
||||
fprintf (Gbl.F.Out,"%s:",Txt_Users);
|
||||
Tbl_EndCell ();
|
||||
|
||||
fprintf (Gbl.F.Out,"<td colspan=\"2\" class=\"%s LEFT_TOP\">",
|
||||
The_ClassFormInBox[Gbl.Prefs.Theme]);
|
||||
Tbl_StartCellAttr ("colspan=\"2\" class=\"%s LEFT_TOP\"",The_ClassFormInBox[Gbl.Prefs.Theme]);
|
||||
Tbl_StartTable ();
|
||||
Usr_ListUsersToSelect (Rol_TCH);
|
||||
Usr_ListUsersToSelect (Rol_NET);
|
||||
|
@ -402,11 +401,11 @@ void Sta_AskShowCrsHits (void)
|
|||
/***** Option a) Listing of clicks distributed by some metric *****/
|
||||
Tbl_StartRow ();
|
||||
|
||||
fprintf (Gbl.F.Out,"<td class=\"RIGHT_MIDDLE %s\">",The_ClassFormInBox[Gbl.Prefs.Theme]);
|
||||
Tbl_StartCellAttr ("class=\"RIGHT_MIDDLE %s\"",The_ClassFormInBox[Gbl.Prefs.Theme]);
|
||||
fprintf (Gbl.F.Out,"%s:",Txt_Show);
|
||||
Tbl_EndCell ();
|
||||
|
||||
fprintf (Gbl.F.Out,"<td colspan=\"2\" class=\"LEFT_MIDDLE\">");
|
||||
Tbl_StartCellAttr ("colspan=\"2\" class=\"LEFT_MIDDLE\"");
|
||||
|
||||
if ((Gbl.Stat.ClicksGroupedBy < Sta_CLICKS_CRS_PER_USR ||
|
||||
Gbl.Stat.ClicksGroupedBy > Sta_CLICKS_CRS_PER_ACTION) &&
|
||||
|
@ -547,12 +546,12 @@ void Sta_AskShowGblHits (void)
|
|||
/***** Users' roles whose accesses we want to see *****/
|
||||
Tbl_StartRow ();
|
||||
|
||||
fprintf (Gbl.F.Out,"<td class=\"RIGHT_MIDDLE\">");
|
||||
Tbl_StartCellAttr ("class=\"RIGHT_MIDDLE\"");
|
||||
fprintf (Gbl.F.Out,"<label for=\"Role\" class=\"%s\">%s:</label>",
|
||||
The_ClassFormInBox[Gbl.Prefs.Theme],Txt_Users);
|
||||
Tbl_EndCell ();
|
||||
|
||||
fprintf (Gbl.F.Out,"<td colspan=\"2\" class=\"LEFT_MIDDLE\">");
|
||||
Tbl_StartCellAttr ("colspan=\"2\" class=\"LEFT_MIDDLE\"");
|
||||
fprintf (Gbl.F.Out,"<select id=\"Role\" name=\"Role\">");
|
||||
for (RoleStat = (Sta_Role_t) 0;
|
||||
RoleStat < Sta_NUM_ROLES_STAT;
|
||||
|
@ -574,12 +573,12 @@ void Sta_AskShowGblHits (void)
|
|||
/***** Clicks made from anywhere, current centre, current degree or current course *****/
|
||||
Tbl_StartRow ();
|
||||
|
||||
fprintf (Gbl.F.Out,"<td class=\"RIGHT_MIDDLE\">");
|
||||
Tbl_StartCellAttr ("class=\"RIGHT_MIDDLE\"");
|
||||
fprintf (Gbl.F.Out,"<label for=\"ScopeSta\" class=\"%s\">%s:</label>",
|
||||
The_ClassFormInBox[Gbl.Prefs.Theme],Txt_Scope);
|
||||
Tbl_EndCell ();
|
||||
|
||||
fprintf (Gbl.F.Out,"<td colspan=\"2\" class=\"LEFT_MIDDLE\">");
|
||||
Tbl_StartCellAttr ("colspan=\"2\" class=\"LEFT_MIDDLE\"");
|
||||
Gbl.Scope.Allowed = 1 << Hie_SYS |
|
||||
1 << Hie_CTY |
|
||||
1 << Hie_INS |
|
||||
|
@ -596,12 +595,12 @@ void Sta_AskShowGblHits (void)
|
|||
/***** Count type for the statistic *****/
|
||||
Tbl_StartRow ();
|
||||
|
||||
fprintf (Gbl.F.Out,"<td class=\"RIGHT_MIDDLE\">");
|
||||
Tbl_StartCellAttr ("class=\"RIGHT_MIDDLE\"");
|
||||
fprintf (Gbl.F.Out,"<label for=\"CountType\" class=\"%s\">%s:</label>",
|
||||
The_ClassFormInBox[Gbl.Prefs.Theme],Txt_Show);
|
||||
Tbl_EndCell ();
|
||||
|
||||
fprintf (Gbl.F.Out,"<td colspan=\"2\" class=\"LEFT_MIDDLE\">");
|
||||
Tbl_StartCellAttr ("colspan=\"2\" class=\"LEFT_MIDDLE\"");
|
||||
Sta_WriteSelectorCountType ();
|
||||
|
||||
/***** Type of statistic *****/
|
||||
|
@ -716,12 +715,12 @@ static void Sta_WriteSelectorAction (void)
|
|||
|
||||
Tbl_StartRow ();
|
||||
|
||||
fprintf (Gbl.F.Out,"<td class=\"RIGHT_MIDDLE\">");
|
||||
Tbl_StartCellAttr ("class=\"RIGHT_MIDDLE\"");
|
||||
fprintf (Gbl.F.Out,"<label for=\"StatAct\" class=\"%s\">%s:</label>",
|
||||
The_ClassFormInBox[Gbl.Prefs.Theme],Txt_Action);
|
||||
Tbl_EndCell ();
|
||||
|
||||
fprintf (Gbl.F.Out,"<td colspan=\"2\" class=\"LEFT_MIDDLE\">");
|
||||
Tbl_StartCellAttr ("colspan=\"2\" class=\"LEFT_MIDDLE\"");
|
||||
fprintf (Gbl.F.Out,"<select id=\"StatAct\" name=\"StatAct\""
|
||||
" style=\"width:375px;\">");
|
||||
for (Action = (Act_Action_t) 0;
|
||||
|
@ -1595,7 +1594,8 @@ static void Sta_ShowDetailedAccessesList (unsigned long NumRows,MYSQL_RES *mysql
|
|||
|
||||
/***** Put heading with backward and forward buttons *****/
|
||||
Tbl_StartRow ();
|
||||
fprintf (Gbl.F.Out,"<td colspan=\"7\" class=\"LEFT_MIDDLE\">");
|
||||
|
||||
Tbl_StartCellAttr ("colspan=\"7\" class=\"LEFT_MIDDLE\"");
|
||||
Tbl_StartTableWidePadding (2);
|
||||
Tbl_StartRow ();
|
||||
|
||||
|
@ -1611,7 +1611,7 @@ static void Sta_ShowDetailedAccessesList (unsigned long NumRows,MYSQL_RES *mysql
|
|||
Par_PutHiddenParamLong ("RowsPage",Gbl.Stat.RowsPerPage);
|
||||
Usr_PutHiddenParSelectedUsrsCods ();
|
||||
}
|
||||
fprintf (Gbl.F.Out,"<td class=\"LEFT_MIDDLE\" style=\"width:20%%;\">");
|
||||
Tbl_StartCellAttr ("class=\"LEFT_MIDDLE\" style=\"width:20%%;\"");
|
||||
if (FirstRow > 1)
|
||||
{
|
||||
snprintf (Gbl.Title,sizeof (Gbl.Title),
|
||||
|
@ -1626,7 +1626,7 @@ static void Sta_ShowDetailedAccessesList (unsigned long NumRows,MYSQL_RES *mysql
|
|||
Frm_EndForm ();
|
||||
|
||||
/* Write number of current page */
|
||||
fprintf (Gbl.F.Out,"<td class=\"DAT_N CENTER_MIDDLE\" style=\"width:60%%;\">");
|
||||
Tbl_StartCellAttr ("class=\"DAT_N CENTER_MIDDLE\" style=\"width:60%%;\"");
|
||||
fprintf (Gbl.F.Out,"<strong>"
|
||||
"%s %lu-%lu %s %lu (%s %ld %s %lu)"
|
||||
"</strong>",
|
||||
|
@ -1647,7 +1647,7 @@ static void Sta_ShowDetailedAccessesList (unsigned long NumRows,MYSQL_RES *mysql
|
|||
Par_PutHiddenParamUnsigned ("RowsPage" ,(unsigned) Gbl.Stat.RowsPerPage);
|
||||
Usr_PutHiddenParSelectedUsrsCods ();
|
||||
}
|
||||
fprintf (Gbl.F.Out,"<td class=\"RIGHT_MIDDLE\" style=\"width:20%%;\">");
|
||||
Tbl_StartCellAttr ("class=\"RIGHT_MIDDLE\" style=\"width:20%%;\"");
|
||||
if (LastRow < NumRows)
|
||||
{
|
||||
snprintf (Gbl.Title,sizeof (Gbl.Title),
|
||||
|
@ -1718,33 +1718,34 @@ static void Sta_ShowDetailedAccessesList (unsigned long NumRows,MYSQL_RES *mysql
|
|||
if (sscanf (row[2],"%u",&RoleFromLog) != 1)
|
||||
Rol_WrongRoleExit ();
|
||||
|
||||
/* Write the number of row */
|
||||
Tbl_StartRow ();
|
||||
fprintf (Gbl.F.Out,"<td class=\"LOG RIGHT_TOP COLOR%u\">",Gbl.RowEvenOdd);
|
||||
|
||||
/* Write the number of row */
|
||||
Tbl_StartCellAttr ("class=\"LOG RIGHT_TOP COLOR%u\"",Gbl.RowEvenOdd);
|
||||
fprintf (Gbl.F.Out,"%ld ",NumRow);
|
||||
Tbl_EndCell ();
|
||||
|
||||
/* Write the user's ID if user is a student */
|
||||
fprintf (Gbl.F.Out,"<td class=\"LOG CENTER_TOP COLOR%u\">",Gbl.RowEvenOdd);
|
||||
Tbl_StartCellAttr ("class=\"LOG CENTER_TOP COLOR%u\"",Gbl.RowEvenOdd);
|
||||
ID_WriteUsrIDs (&UsrDat,NULL);
|
||||
fprintf (Gbl.F.Out," ");
|
||||
Tbl_EndCell ();
|
||||
|
||||
/* Write the first name and the surnames */
|
||||
fprintf (Gbl.F.Out,"<td class=\"LOG LEFT_TOP COLOR%u\">",Gbl.RowEvenOdd);
|
||||
Tbl_StartCellAttr ("class=\"LOG LEFT_TOP COLOR%u\"",Gbl.RowEvenOdd);
|
||||
fprintf (Gbl.F.Out,"%s ",UsrDat.FullName);
|
||||
Tbl_EndCell ();
|
||||
|
||||
/* Write the user's role */
|
||||
fprintf (Gbl.F.Out,"<td class=\"LOG CENTER_TOP COLOR%u\">",Gbl.RowEvenOdd);
|
||||
Tbl_StartCellAttr ("class=\"LOG CENTER_TOP COLOR%u\"",Gbl.RowEvenOdd);
|
||||
fprintf (Gbl.F.Out,"%s ",
|
||||
RoleFromLog < Rol_NUM_ROLES ? Txt_ROLES_SINGUL_Abc[RoleFromLog][UsrDat.Sex] :
|
||||
"?");
|
||||
Tbl_EndCell ();
|
||||
|
||||
/* Write the date-time (row[3]) */
|
||||
fprintf (Gbl.F.Out,"<td id=\"log_date_%u\" class=\"LOG RIGHT_TOP COLOR%u\">",
|
||||
UniqueId,Gbl.RowEvenOdd);
|
||||
Tbl_StartCellAttr ("id=\"log_date_%u\" class=\"LOG RIGHT_TOP COLOR%u\"",
|
||||
UniqueId,Gbl.RowEvenOdd);
|
||||
fprintf (Gbl.F.Out,"<script type=\"text/javascript\">"
|
||||
"writeLocalDateHMSFromUTC('log_date_%u',%ld,"
|
||||
"%u,', ','%s',true,false,0x7);"
|
||||
|
@ -1758,20 +1759,21 @@ static void Sta_ShowDetailedAccessesList (unsigned long NumRows,MYSQL_RES *mysql
|
|||
Lay_ShowErrorAndExit ("Wrong action code.");
|
||||
if (ActCod >= 0)
|
||||
{
|
||||
fprintf (Gbl.F.Out,"<td class=\"LOG LEFT_TOP COLOR%u\">",Gbl.RowEvenOdd);
|
||||
Tbl_StartCellAttr ("class=\"LOG LEFT_TOP COLOR%u\"",Gbl.RowEvenOdd);
|
||||
fprintf (Gbl.F.Out,"%s ",Act_GetActionTextFromDB (ActCod,ActTxt));
|
||||
}
|
||||
else
|
||||
{
|
||||
fprintf (Gbl.F.Out,"<td class=\"LOG LEFT_TOP COLOR%u\">",Gbl.RowEvenOdd);
|
||||
Tbl_StartCellAttr ("class=\"LOG LEFT_TOP COLOR%u\"",Gbl.RowEvenOdd);
|
||||
fprintf (Gbl.F.Out,"? ");
|
||||
}
|
||||
Tbl_EndCell ();
|
||||
|
||||
/* Write the comments of the access */
|
||||
fprintf (Gbl.F.Out,"<td class=\"LOG LEFT_TOP COLOR%u\">",Gbl.RowEvenOdd);
|
||||
Tbl_StartCellAttr ("class=\"LOG LEFT_TOP COLOR%u\"",Gbl.RowEvenOdd);
|
||||
Sta_WriteLogComments (LogCod);
|
||||
Tbl_EndCell ();
|
||||
|
||||
Tbl_EndRow ();
|
||||
}
|
||||
|
||||
|
@ -1868,12 +1870,12 @@ static void Sta_ShowNumHitsPerUsr (unsigned long NumRows,MYSQL_RES *mysql_res)
|
|||
Tbl_StartRow ();
|
||||
|
||||
/* Write the number of row */
|
||||
fprintf (Gbl.F.Out,"<td class=\"LOG RIGHT_TOP COLOR%u\">",Gbl.RowEvenOdd);
|
||||
Tbl_StartCellAttr ("class=\"LOG RIGHT_TOP COLOR%u\"",Gbl.RowEvenOdd);
|
||||
fprintf (Gbl.F.Out,"%ld ",NumRow);
|
||||
Tbl_EndCell ();
|
||||
|
||||
/* Show the photo */
|
||||
fprintf (Gbl.F.Out,"<td class=\"CENTER_TOP COLOR%u\">",Gbl.RowEvenOdd);
|
||||
Tbl_StartCellAttr ("class=\"CENTER_TOP COLOR%u\"",Gbl.RowEvenOdd);
|
||||
ShowPhoto = Pho_ShowingUsrPhotoIsAllowed (&UsrDat,PhotoURL);
|
||||
Pho_ShowUsrPhoto (&UsrDat,ShowPhoto ? PhotoURL :
|
||||
NULL,
|
||||
|
@ -1881,18 +1883,18 @@ static void Sta_ShowNumHitsPerUsr (unsigned long NumRows,MYSQL_RES *mysql_res)
|
|||
Tbl_EndCell ();
|
||||
|
||||
/* Write the user's ID if user is a student in current course */
|
||||
fprintf (Gbl.F.Out,"<td class=\"LOG LEFT_TOP COLOR%u\">",Gbl.RowEvenOdd);
|
||||
Tbl_StartCellAttr ("class=\"LOG LEFT_TOP COLOR%u\"",Gbl.RowEvenOdd);
|
||||
ID_WriteUsrIDs (&UsrDat,NULL);
|
||||
fprintf (Gbl.F.Out," ");
|
||||
Tbl_EndCell ();
|
||||
|
||||
/* Write the name and the surnames */
|
||||
fprintf (Gbl.F.Out,"<td class=\"LOG LEFT_TOP COLOR%u\">",Gbl.RowEvenOdd);
|
||||
Tbl_StartCellAttr ("class=\"LOG LEFT_TOP COLOR%u\"",Gbl.RowEvenOdd);
|
||||
fprintf (Gbl.F.Out,"%s ",UsrDat.FullName);
|
||||
Tbl_EndCell ();
|
||||
|
||||
/* Write user's role */
|
||||
fprintf (Gbl.F.Out,"<td class=\"LOG CENTER_TOP COLOR%u\">",Gbl.RowEvenOdd);
|
||||
Tbl_StartCellAttr ("class=\"LOG CENTER_TOP COLOR%u\"",Gbl.RowEvenOdd);
|
||||
fprintf (Gbl.F.Out,"%s ",
|
||||
Txt_ROLES_SINGUL_Abc[UsrDat.Roles.InCurrentCrs.Role][UsrDat.Sex]);
|
||||
Tbl_EndCell ();
|
||||
|
@ -1909,7 +1911,8 @@ static void Sta_ShowNumHitsPerUsr (unsigned long NumRows,MYSQL_RES *mysql_res)
|
|||
}
|
||||
else
|
||||
BarWidth = 0;
|
||||
fprintf (Gbl.F.Out,"<td class=\"LOG LEFT_TOP COLOR%u\">",Gbl.RowEvenOdd);
|
||||
|
||||
Tbl_StartCellAttr ("class=\"LOG LEFT_TOP COLOR%u\"",Gbl.RowEvenOdd);
|
||||
if (BarWidth)
|
||||
fprintf (Gbl.F.Out,"<img src=\"%s/%c1x1.png\"" // Background
|
||||
" alt=\"\" title=\"\""
|
||||
|
@ -2003,16 +2006,16 @@ static void Sta_ShowNumHitsPerDay (unsigned long NumRows,MYSQL_RES *mysql_res)
|
|||
|
||||
/* Write the date */
|
||||
Dat_ConvDateToDateStr (&Date,StrDate);
|
||||
fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_TOP\">",
|
||||
NumDayWeek == 6 ? "LOG_R" :
|
||||
"LOG");
|
||||
Tbl_StartCellAttr ("class=\"%s RIGHT_TOP\"",
|
||||
NumDayWeek == 6 ? "LOG_R" :
|
||||
"LOG");
|
||||
fprintf (Gbl.F.Out,"%s ",StrDate);
|
||||
Tbl_EndCell ();
|
||||
|
||||
/* Write the day of the week */
|
||||
fprintf (Gbl.F.Out,"<td class=\"%s LEFT_TOP\">",
|
||||
NumDayWeek == 6 ? "LOG_R" :
|
||||
"LOG");
|
||||
Tbl_StartCellAttr ("class=\"%s LEFT_TOP\"",
|
||||
NumDayWeek == 6 ? "LOG_R" :
|
||||
"LOG");
|
||||
fprintf (Gbl.F.Out,"%s ",Txt_DAYS_SMALL[NumDayWeek]);
|
||||
Tbl_EndCell ();
|
||||
|
||||
|
@ -2044,16 +2047,16 @@ static void Sta_ShowNumHitsPerDay (unsigned long NumRows,MYSQL_RES *mysql_res)
|
|||
|
||||
/* Write the date */
|
||||
Dat_ConvDateToDateStr (&Date,StrDate);
|
||||
fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_TOP\">",
|
||||
NumDayWeek == 6 ? "LOG_R" :
|
||||
"LOG");
|
||||
Tbl_StartCellAttr ("class=\"%s RIGHT_TOP\"",
|
||||
NumDayWeek == 6 ? "LOG_R" :
|
||||
"LOG");
|
||||
fprintf (Gbl.F.Out,"%s ",StrDate);
|
||||
Tbl_EndCell ();
|
||||
|
||||
/* Write the day of the week */
|
||||
fprintf (Gbl.F.Out,"<td class=\"%s LEFT_TOP\">",
|
||||
NumDayWeek == 6 ? "LOG_R" :
|
||||
"LOG");
|
||||
Tbl_StartCellAttr ("class=\"%s LEFT_TOP\"",
|
||||
NumDayWeek == 6 ? "LOG_R" :
|
||||
"LOG");
|
||||
fprintf (Gbl.F.Out,"%s ",Txt_DAYS_SMALL[NumDayWeek]);
|
||||
Tbl_EndCell ();
|
||||
|
||||
|
@ -2108,7 +2111,8 @@ static void Sta_ShowDistrAccessesPerDayAndHour (unsigned long NumRows,MYSQL_RES
|
|||
|
||||
/***** Put a selector for the type of color *****/
|
||||
Tbl_StartRow ();
|
||||
fprintf (Gbl.F.Out,"<td colspan=\"26\" class=\"CENTER_MIDDLE\">");
|
||||
|
||||
Tbl_StartCellAttr ("colspan=\"26\" class=\"CENTER_MIDDLE\"");
|
||||
|
||||
Frm_StartFormAnchor (Gbl.Action.Act,Sta_STAT_RESULTS_SECTION_ID);
|
||||
Dat_WriteParamsIniEndDates ();
|
||||
|
@ -2175,8 +2179,8 @@ static void Sta_ShowDistrAccessesPerDayAndHour (unsigned long NumRows,MYSQL_RES
|
|||
Tbl_EndRow ();
|
||||
|
||||
Tbl_StartRow ();
|
||||
fprintf (Gbl.F.Out,"<td colspan=\"24\" class=\"LEFT_TOP\" style=\"width:%upx;\">",
|
||||
GRAPH_DISTRIBUTION_PER_HOUR_TOTAL_WIDTH);
|
||||
Tbl_StartCellAttr ("colspan=\"24\" class=\"LEFT_TOP\" style=\"width:%upx;\"",
|
||||
GRAPH_DISTRIBUTION_PER_HOUR_TOTAL_WIDTH);
|
||||
Sta_DrawBarColors (SelectedColorType,Hits.Max);
|
||||
Tbl_EndCell ();
|
||||
Tbl_EndRow ();
|
||||
|
@ -2186,8 +2190,8 @@ static void Sta_ShowDistrAccessesPerDayAndHour (unsigned long NumRows,MYSQL_RES
|
|||
Hour < 24;
|
||||
Hour++)
|
||||
{
|
||||
fprintf (Gbl.F.Out,"<td class=\"LOG CENTER_TOP\" style=\"width:%upx;\">",
|
||||
GRAPH_DISTRIBUTION_PER_HOUR_HOUR_WIDTH);
|
||||
Tbl_StartCellAttr ("class=\"LOG CENTER_TOP\" style=\"width:%upx;\"",
|
||||
GRAPH_DISTRIBUTION_PER_HOUR_HOUR_WIDTH);
|
||||
fprintf (Gbl.F.Out,"%02uh",Hour);
|
||||
Tbl_EndCell ();
|
||||
}
|
||||
|
@ -2232,19 +2236,20 @@ static void Sta_ShowDistrAccessesPerDayAndHour (unsigned long NumRows,MYSQL_RES
|
|||
{
|
||||
NumDayWeek = Dat_GetDayOfWeek (Date.Year,Date.Month,Date.Day);
|
||||
|
||||
Tbl_StartRow ();
|
||||
|
||||
/* Write the date */
|
||||
Dat_ConvDateToDateStr (&Date,StrDate);
|
||||
Tbl_StartRow ();
|
||||
fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_TOP\">",
|
||||
NumDayWeek == 6 ? "LOG_R" :
|
||||
"LOG");
|
||||
Tbl_StartCellAttr ("class=\"%s RIGHT_TOP\"",
|
||||
NumDayWeek == 6 ? "LOG_R" :
|
||||
"LOG");
|
||||
fprintf (Gbl.F.Out,"%s ",StrDate);
|
||||
Tbl_EndCell ();
|
||||
|
||||
/* Write the day of the week */
|
||||
fprintf (Gbl.F.Out,"<td class=\"%s LEFT_TOP\">",
|
||||
NumDayWeek == 6 ? "LOG_R" :
|
||||
"LOG");
|
||||
Tbl_StartCellAttr ("class=\"%s LEFT_TOP\"",
|
||||
NumDayWeek == 6 ? "LOG_R" :
|
||||
"LOG");
|
||||
fprintf (Gbl.F.Out,"%s ",Txt_DAYS_SMALL[NumDayWeek]);
|
||||
Tbl_EndCell ();
|
||||
|
||||
|
@ -2281,19 +2286,20 @@ static void Sta_ShowDistrAccessesPerDayAndHour (unsigned long NumRows,MYSQL_RES
|
|||
{
|
||||
NumDayWeek = Dat_GetDayOfWeek (Date.Year,Date.Month,Date.Day);
|
||||
|
||||
Tbl_StartRow ();
|
||||
|
||||
/* Write the date */
|
||||
Dat_ConvDateToDateStr (&Date,StrDate);
|
||||
Tbl_StartRow ();
|
||||
fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_TOP\">",
|
||||
NumDayWeek == 6 ? "LOG_R" :
|
||||
"LOG");
|
||||
Tbl_StartCellAttr ("class=\"%s RIGHT_TOP\"",
|
||||
NumDayWeek == 6 ? "LOG_R" :
|
||||
"LOG");
|
||||
fprintf (Gbl.F.Out,"%s ",StrDate);
|
||||
Tbl_EndCell ();
|
||||
|
||||
/* Write the day of the week */
|
||||
fprintf (Gbl.F.Out,"<td class=\"%s LEFT_TOP\">",
|
||||
NumDayWeek == 6 ? "LOG_R" :
|
||||
"LOG");
|
||||
Tbl_StartCellAttr ("class=\"%s LEFT_TOP\"",
|
||||
NumDayWeek == 6 ? "LOG_R" :
|
||||
"LOG");
|
||||
fprintf (Gbl.F.Out,"%s ",Txt_DAYS_SMALL[NumDayWeek]);
|
||||
Tbl_EndCell ();
|
||||
|
||||
|
@ -2322,16 +2328,16 @@ static void Sta_ShowDistrAccessesPerDayAndHour (unsigned long NumRows,MYSQL_RES
|
|||
|
||||
/* Write the date */
|
||||
Dat_ConvDateToDateStr (&Date,StrDate);
|
||||
fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_TOP\">",
|
||||
NumDayWeek == 6 ? "LOG_R" :
|
||||
"LOG");
|
||||
Tbl_StartCellAttr ("class=\"%s RIGHT_TOP\"",
|
||||
NumDayWeek == 6 ? "LOG_R" :
|
||||
"LOG");
|
||||
fprintf (Gbl.F.Out,"%s ",StrDate);
|
||||
Tbl_EndCell ();
|
||||
|
||||
/* Write the day of the week */
|
||||
fprintf (Gbl.F.Out,"<td class=\"%s LEFT_TOP\">",
|
||||
NumDayWeek == 6 ? "LOG_R" :
|
||||
"LOG");
|
||||
Tbl_StartCellAttr ("class=\"%s LEFT_TOP\"",
|
||||
NumDayWeek == 6 ? "LOG_R" :
|
||||
"LOG");
|
||||
fprintf (Gbl.F.Out,"%s ",Txt_DAYS_SMALL[NumDayWeek]);
|
||||
Tbl_EndCell ();
|
||||
|
||||
|
@ -2383,9 +2389,9 @@ static void Sta_DrawBarColors (Sta_ColorType_t ColorType,float HitsMax)
|
|||
Tbl_StartTableWide ();
|
||||
Tbl_StartRow ();
|
||||
|
||||
fprintf (Gbl.F.Out,"<td colspan=\"%u\" class=\"LOG LEFT_BOTTOM\" style=\"width:%upx;\">",
|
||||
(GRAPH_DISTRIBUTION_PER_HOUR_TOTAL_WIDTH/5)/2,
|
||||
(GRAPH_DISTRIBUTION_PER_HOUR_TOTAL_WIDTH/5)/2);
|
||||
Tbl_StartCellAttr ("colspan=\"%u\" class=\"LOG LEFT_BOTTOM\" style=\"width:%upx;\"",
|
||||
(GRAPH_DISTRIBUTION_PER_HOUR_TOTAL_WIDTH/5)/2,
|
||||
(GRAPH_DISTRIBUTION_PER_HOUR_TOTAL_WIDTH/5)/2);
|
||||
fprintf (Gbl.F.Out,"0");
|
||||
Tbl_EndCell ();
|
||||
|
||||
|
@ -2393,17 +2399,19 @@ static void Sta_DrawBarColors (Sta_ColorType_t ColorType,float HitsMax)
|
|||
Interval <= 4;
|
||||
Interval++)
|
||||
{
|
||||
fprintf (Gbl.F.Out,"<td colspan=\"%u\" class=\"LOG CENTER_BOTTOM\" style=\"width:%upx;\">",
|
||||
GRAPH_DISTRIBUTION_PER_HOUR_TOTAL_WIDTH/5,
|
||||
GRAPH_DISTRIBUTION_PER_HOUR_TOTAL_WIDTH/5);
|
||||
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);
|
||||
Str_WriteFloatNum (Gbl.F.Out,(float) Interval * HitsMax / 5.0);
|
||||
Tbl_EndCell ();
|
||||
}
|
||||
fprintf (Gbl.F.Out,"<td 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);
|
||||
|
||||
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);
|
||||
Str_WriteFloatNum (Gbl.F.Out,HitsMax);
|
||||
Tbl_EndCell ();
|
||||
|
||||
Tbl_EndRow ();
|
||||
|
||||
Tbl_StartRow ();
|
||||
|
@ -2414,9 +2422,8 @@ static void Sta_DrawBarColors (Sta_ColorType_t ColorType,float HitsMax)
|
|||
NumColor++)
|
||||
{
|
||||
Sta_SetColor (ColorType,(float) NumColor,(float) GRAPH_DISTRIBUTION_PER_HOUR_TOTAL_WIDTH,&R,&G,&B);
|
||||
fprintf (Gbl.F.Out,"<td class=\"LEFT_MIDDLE\" style=\"width:1px;"
|
||||
" background-color:#%02X%02X%02X;\">",
|
||||
R,G,B);
|
||||
Tbl_StartCellAttr ("class=\"LEFT_MIDDLE\" style=\"width:1px; background-color:#%02X%02X%02X;\">",
|
||||
R,G,B);
|
||||
fprintf (Gbl.F.Out,"<img src=\"%s/tr1x14.gif\" alt=\"\" title=\"\" />",
|
||||
Cfg_URL_ICON_PUBLIC);
|
||||
Tbl_EndCell ();
|
||||
|
@ -2443,8 +2450,7 @@ static void Sta_DrawAccessesPerHourForADay (Sta_ColorType_t ColorType,float Hits
|
|||
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]);
|
||||
fprintf (Gbl.F.Out,"\" style=\"width:%upx;"
|
||||
" background-color:#%02X%02X%02X;\">",
|
||||
fprintf (Gbl.F.Out,"\" style=\"width:%upx; background-color:#%02X%02X%02X;\">",
|
||||
GRAPH_DISTRIBUTION_PER_HOUR_HOUR_WIDTH,R,G,B);
|
||||
Tbl_EndCell ();
|
||||
}
|
||||
|
@ -2587,7 +2593,7 @@ static void Sta_ShowNumHitsPerWeek (unsigned long NumRows,
|
|||
Tbl_StartRow ();
|
||||
|
||||
/* Write week */
|
||||
fprintf (Gbl.F.Out,"<td class=\"LOG LEFT_TOP\">");
|
||||
Tbl_StartCellAttr ("class=\"LOG LEFT_TOP\"");
|
||||
fprintf (Gbl.F.Out,"%04u-%02u ",Date.Year,Date.Week);
|
||||
Tbl_EndCell ();
|
||||
|
||||
|
@ -2616,7 +2622,7 @@ static void Sta_ShowNumHitsPerWeek (unsigned long NumRows,
|
|||
Tbl_StartRow ();
|
||||
|
||||
/* Write week */
|
||||
fprintf (Gbl.F.Out,"<td class=\"LOG LEFT_TOP\">");
|
||||
Tbl_StartCellAttr ("class=\"LOG LEFT_TOP\"");
|
||||
fprintf (Gbl.F.Out,"%04u-%02u ",Date.Year,Date.Week);
|
||||
Tbl_EndCell ();
|
||||
|
||||
|
@ -2692,7 +2698,7 @@ static void Sta_ShowNumHitsPerMonth (unsigned long NumRows,
|
|||
Tbl_StartRow ();
|
||||
|
||||
/* Write the month */
|
||||
fprintf (Gbl.F.Out,"<td class=\"LOG LEFT_TOP\">");
|
||||
Tbl_StartCellAttr ("class=\"LOG LEFT_TOP\"");
|
||||
fprintf (Gbl.F.Out,"%04u-%02u ",Date.Year,Date.Month);
|
||||
Tbl_EndCell ();
|
||||
|
||||
|
@ -2720,7 +2726,7 @@ static void Sta_ShowNumHitsPerMonth (unsigned long NumRows,
|
|||
Tbl_StartRow ();
|
||||
|
||||
/* Write the month */
|
||||
fprintf (Gbl.F.Out,"<td class=\"LOG LEFT_TOP\">");
|
||||
Tbl_StartCellAttr ("class=\"LOG LEFT_TOP\"");
|
||||
fprintf (Gbl.F.Out,"%04u-%02u ",Date.Year,Date.Month);
|
||||
Tbl_EndCell ();
|
||||
|
||||
|
@ -2796,7 +2802,7 @@ static void Sta_ShowNumHitsPerYear (unsigned long NumRows,
|
|||
Tbl_StartRow ();
|
||||
|
||||
/* Write the year */
|
||||
fprintf (Gbl.F.Out,"<td class=\"LOG LEFT_TOP\">");
|
||||
Tbl_StartCellAttr ("class=\"LOG LEFT_TOP\"");
|
||||
fprintf (Gbl.F.Out,"%04u ",Date.Year);
|
||||
Tbl_EndCell ();
|
||||
|
||||
|
@ -2824,7 +2830,7 @@ static void Sta_ShowNumHitsPerYear (unsigned long NumRows,
|
|||
Tbl_StartRow ();
|
||||
|
||||
/* Write the year */
|
||||
fprintf (Gbl.F.Out,"<td class=\"LOG LEFT_TOP\">");
|
||||
Tbl_StartCellAttr ("class=\"LOG LEFT_TOP\"");
|
||||
fprintf (Gbl.F.Out,"%04u ",Date.Year);
|
||||
Tbl_EndCell ();
|
||||
|
||||
|
@ -2911,8 +2917,7 @@ static void Sta_WriteAccessHour (unsigned Hour,struct Sta_Hits *Hits,unsigned Co
|
|||
{
|
||||
unsigned BarHeight;
|
||||
|
||||
fprintf (Gbl.F.Out,"<td class=\"DAT_SMALL CENTER_BOTTOM\" style=\"width:%upx;\">",
|
||||
ColumnWidth);
|
||||
Tbl_StartCellAttr ("class=\"DAT_SMALL CENTER_BOTTOM\" style=\"width:%upx;\"",ColumnWidth);
|
||||
|
||||
/* Draw bar with a height porportional to the number of clicks */
|
||||
if (Hits->Num > 0.0)
|
||||
|
@ -3027,8 +3032,8 @@ static void Sta_ShowAverageAccessesPerMinute (unsigned long NumRows,MYSQL_RES *m
|
|||
Tbl_StartRow ();
|
||||
|
||||
/* First division (left) */
|
||||
fprintf (Gbl.F.Out,"<td class=\"LEFT_MIDDLE\" style=\"width:%upx;\">",
|
||||
Sta_WIDTH_SEMIDIVISION_GRAPHIC);
|
||||
Tbl_StartCellAttr ("class=\"LEFT_MIDDLE\" style=\"width:%upx;\"",
|
||||
Sta_WIDTH_SEMIDIVISION_GRAPHIC);
|
||||
fprintf (Gbl.F.Out,"<img src=\"%s/ejexizq24x1.gif\""
|
||||
" alt=\"\" title=\"\""
|
||||
" style=\"display:block; width:%upx; height:1px;\" />",
|
||||
|
@ -3041,8 +3046,8 @@ static void Sta_ShowAverageAccessesPerMinute (unsigned long NumRows,MYSQL_RES *m
|
|||
i < Sta_NUM_DIVISIONS_X * 2;
|
||||
i++)
|
||||
{
|
||||
fprintf (Gbl.F.Out,"<td class=\"LEFT_MIDDLE\" style=\"width:%upx;\">",
|
||||
Sta_WIDTH_SEMIDIVISION_GRAPHIC);
|
||||
Tbl_StartCellAttr ("class=\"LEFT_MIDDLE\" style=\"width:%upx;\"",
|
||||
Sta_WIDTH_SEMIDIVISION_GRAPHIC);
|
||||
fprintf (Gbl.F.Out,"<img src=\"%s/ejex24x1.gif\""
|
||||
" alt=\"\" title=\"\""
|
||||
" style=\"display:block;"
|
||||
|
@ -3053,8 +3058,8 @@ static void Sta_ShowAverageAccessesPerMinute (unsigned long NumRows,MYSQL_RES *m
|
|||
}
|
||||
|
||||
/* Last division (right) */
|
||||
fprintf (Gbl.F.Out,"<td class=\"LEFT_MIDDLE\" style=\"width:%upx;\">",
|
||||
Sta_WIDTH_SEMIDIVISION_GRAPHIC);
|
||||
Tbl_StartCellAttr ("class=\"LEFT_MIDDLE\" style=\"width:%upx;\"",
|
||||
Sta_WIDTH_SEMIDIVISION_GRAPHIC);
|
||||
fprintf (Gbl.F.Out,"<img src=\"%s/tr24x1.gif\""
|
||||
" alt=\"\" title=\"\""
|
||||
" style=\"display:block; width:%upx; height:1px;\" />",
|
||||
|
@ -3085,8 +3090,8 @@ static void Sta_WriteLabelsXAxisAccMin (float IncX,const char *Format)
|
|||
i <= Sta_NUM_DIVISIONS_X;
|
||||
i++, NumX += IncX)
|
||||
{
|
||||
fprintf (Gbl.F.Out,"<td colspan=\"2\" class=\"LOG CENTER_BOTTOM\" style=\"width:%upx;\">",
|
||||
Sta_WIDTH_DIVISION_GRAPHIC);
|
||||
Tbl_StartCellAttr ("colspan=\"2\" class=\"LOG CENTER_BOTTOM\" style=\"width:%upx;\"",
|
||||
Sta_WIDTH_DIVISION_GRAPHIC);
|
||||
fprintf (Gbl.F.Out,Format,NumX);
|
||||
Tbl_EndCell ();
|
||||
}
|
||||
|
@ -3110,11 +3115,11 @@ static void Sta_WriteAccessMinute (unsigned Minute,float HitsNum,float MaxX)
|
|||
if (!Minute)
|
||||
{
|
||||
// If minute 0
|
||||
fprintf (Gbl.F.Out,"<td rowspan=\"30\" class=\"LOG LEFT_TOP\""
|
||||
Tbl_StartCellAttr ("rowspan=\"30\" class=\"LOG LEFT_TOP\""
|
||||
" style=\"width:%upx;"
|
||||
" background-image:url('%s/ejey24x30.gif');"
|
||||
" background-size:30px 30px;"
|
||||
" background-repeat:repeat;\">",
|
||||
" background-repeat:repeat;\"",
|
||||
Sta_WIDTH_SEMIDIVISION_GRAPHIC,Cfg_URL_ICON_PUBLIC);
|
||||
fprintf (Gbl.F.Out,"00h");
|
||||
Tbl_EndCell ();
|
||||
|
@ -3122,11 +3127,11 @@ static void Sta_WriteAccessMinute (unsigned Minute,float HitsNum,float MaxX)
|
|||
else if (Minute == (Sta_NUM_MINUTES_PER_DAY - 30))
|
||||
{
|
||||
// If 23:30
|
||||
fprintf (Gbl.F.Out,"<td rowspan=\"30\" class=\"LOG LEFT_BOTTOM\""
|
||||
Tbl_StartCellAttr ("rowspan=\"30\" class=\"LOG LEFT_BOTTOM\""
|
||||
" style=\"width:%upx;"
|
||||
" background-image:url('%s/ejey24x30.gif');"
|
||||
" background-size:30px 30px;"
|
||||
" background-repeat:repeat;\">",
|
||||
" background-repeat:repeat;\"",
|
||||
Sta_WIDTH_SEMIDIVISION_GRAPHIC,Cfg_URL_ICON_PUBLIC);
|
||||
fprintf (Gbl.F.Out,"24h");
|
||||
Tbl_EndCell ();
|
||||
|
@ -3134,22 +3139,22 @@ static void Sta_WriteAccessMinute (unsigned Minute,float HitsNum,float MaxX)
|
|||
else if (!(Minute % 30) && (Minute % 60))
|
||||
{
|
||||
// If minute is multiple of 30 but not of 60 (i.e.: 30, 90, 150...)
|
||||
fprintf (Gbl.F.Out,"<td rowspan=\"60\" class=\"LOG LEFT_MIDDLE\""
|
||||
Tbl_StartCellAttr ("rowspan=\"60\" class=\"LOG LEFT_MIDDLE\""
|
||||
" style=\"width:%upx;"
|
||||
" background-image:url('%s/ejey24x60.gif');"
|
||||
" background-size:30px 60px;"
|
||||
" background-repeat:repeat;\">",
|
||||
" background-repeat:repeat;\"",
|
||||
Sta_WIDTH_SEMIDIVISION_GRAPHIC,Cfg_URL_ICON_PUBLIC);
|
||||
fprintf (Gbl.F.Out,"%02uh",(Minute + 30) / 60);
|
||||
Tbl_EndCell ();
|
||||
}
|
||||
|
||||
/***** Start cell for the graphic *****/
|
||||
fprintf (Gbl.F.Out,"<td colspan=\"%u\" class=\"LEFT_BOTTOM\""
|
||||
Tbl_StartCellAttr ("colspan=\"%u\" class=\"LEFT_BOTTOM\""
|
||||
" style=\"width:%upx; height:1px;"
|
||||
" background-image:url('%s/malla%c48x1.gif');"
|
||||
" background-size:60px 1px;"
|
||||
" background-repeat:repeat;\">",
|
||||
" background-repeat:repeat;\"",
|
||||
Sta_NUM_DIVISIONS_X * 2,Sta_WIDTH_GRAPHIC,Cfg_URL_ICON_PUBLIC,
|
||||
(Minute % 60) == 0 ? 'v' :
|
||||
'h');
|
||||
|
@ -3214,16 +3219,11 @@ static void Sta_ShowNumHitsPerAction (unsigned long NumRows,
|
|||
|
||||
Tbl_StartRow ();
|
||||
|
||||
Tbl_StartCellAttr ("class=\"LOG RIGHT_TOP\"");
|
||||
if (ActCod >= 0)
|
||||
{
|
||||
fprintf (Gbl.F.Out,"<td class=\"LOG RIGHT_TOP\">");
|
||||
fprintf (Gbl.F.Out,"%s ",Act_GetActionTextFromDB (ActCod,ActTxt));
|
||||
}
|
||||
else
|
||||
{
|
||||
fprintf (Gbl.F.Out,"<td class=\"LOG RIGHT_TOP\">");
|
||||
fprintf (Gbl.F.Out,"? ");
|
||||
}
|
||||
Tbl_EndCell ();
|
||||
|
||||
/* Draw bar proportional to number of hits */
|
||||
|
@ -3277,7 +3277,7 @@ static void Sta_ShowNumHitsPerPlugin (unsigned long NumRows,
|
|||
/* Write the plugin */
|
||||
if (sscanf (row[0],"%ld",&Plg.PlgCod) != 1)
|
||||
Lay_ShowErrorAndExit ("Wrong plugin code.");
|
||||
fprintf (Gbl.F.Out,"<td class=\"LOG RIGHT_TOP\">");
|
||||
Tbl_StartCellAttr ("class=\"LOG RIGHT_TOP\"");
|
||||
if (Plg_GetDataOfPluginByCod (&Plg))
|
||||
fprintf (Gbl.F.Out,"%s",Plg.Name);
|
||||
else
|
||||
|
@ -3337,7 +3337,7 @@ static void Sta_ShowNumHitsPerWSFunction (unsigned long NumRows,
|
|||
if (sscanf (row[0],"%ld",&FunCod) != 1)
|
||||
Lay_ShowErrorAndExit ("Wrong function code.");
|
||||
|
||||
fprintf (Gbl.F.Out,"<td class=\"LOG LEFT_TOP\">");
|
||||
Tbl_StartCellAttr ("class=\"LOG LEFT_TOP\"");
|
||||
fprintf (Gbl.F.Out,"%s ",API_GetFunctionNameFromFunCod (FunCod));
|
||||
Tbl_EndCell ();
|
||||
|
||||
|
@ -3406,7 +3406,7 @@ static void Sta_ShowNumHitsPerBanner (unsigned long NumRows,
|
|||
if (sscanf (row[0],"%ld",&(Ban.BanCod)) != 1)
|
||||
Lay_ShowErrorAndExit ("Wrong banner code.");
|
||||
Ban_GetDataOfBannerByCod (&Ban);
|
||||
fprintf (Gbl.F.Out,"<td class=\"LOG LEFT_TOP\">");
|
||||
Tbl_StartCellAttr ("class=\"LOG LEFT_TOP\"");
|
||||
fprintf (Gbl.F.Out,"<a href=\"%s\" title=\"%s\" class=\"DAT\" target=\"_blank\">"
|
||||
"<img src=\"%s/%s\""
|
||||
" alt=\"%s\" title=\"%s\""
|
||||
|
@ -3477,7 +3477,7 @@ static void Sta_ShowNumHitsPerCountry (unsigned long NumRows,
|
|||
Tbl_StartRow ();
|
||||
|
||||
/* Write ranking of this country */
|
||||
fprintf (Gbl.F.Out,"<td class=\"LOG RIGHT_MIDDLE\">");
|
||||
Tbl_StartCellAttr ("class=\"LOG RIGHT_MIDDLE\"");
|
||||
if (CtyCod > 0)
|
||||
fprintf (Gbl.F.Out,"%lu",++Ranking);
|
||||
fprintf (Gbl.F.Out," ");
|
||||
|
@ -3504,7 +3504,7 @@ static void Sta_WriteCountry (long CtyCod)
|
|||
struct Country Cty;
|
||||
|
||||
/***** Start cell *****/
|
||||
fprintf (Gbl.F.Out,"<td class=\"LOG LEFT_MIDDLE\">");
|
||||
Tbl_StartCellAttr ("class=\"LOG LEFT_MIDDLE\"");
|
||||
|
||||
if (CtyCod > 0) // Hit with a country selected
|
||||
{
|
||||
|
@ -3574,7 +3574,7 @@ static void Sta_ShowNumHitsPerInstitution (unsigned long NumRows,
|
|||
Tbl_StartRow ();
|
||||
|
||||
/* Write ranking of this institution */
|
||||
fprintf (Gbl.F.Out,"<td class=\"LOG RIGHT_TOP\">");
|
||||
Tbl_StartCellAttr ("class=\"LOG RIGHT_TOP\"");
|
||||
if (InsCod > 0)
|
||||
fprintf (Gbl.F.Out,"%lu",++Ranking);
|
||||
fprintf (Gbl.F.Out," ");
|
||||
|
@ -3608,8 +3608,7 @@ static void Sta_WriteInstitution (long InsCod)
|
|||
Ins_GetDataOfInstitutionByCod (&Ins,Ins_GET_BASIC_DATA);
|
||||
|
||||
/***** Title in cell *****/
|
||||
fprintf (Gbl.F.Out,"<td class=\"LOG LEFT_MIDDLE\" title=\"%s\">",
|
||||
Ins.FullName);
|
||||
Tbl_StartCellAttr ("class=\"LOG LEFT_MIDDLE\" title=\"%s\"",Ins.FullName);
|
||||
|
||||
/***** Form to go to institution *****/
|
||||
Ins_DrawInstitutionLogoAndNameWithLink (&Ins,ActSeeInsInf,
|
||||
|
@ -3618,7 +3617,7 @@ static void Sta_WriteInstitution (long InsCod)
|
|||
else // Hit with no institution selected
|
||||
{
|
||||
/***** No institution selected *****/
|
||||
fprintf (Gbl.F.Out,"<td class=\"LOG LEFT_MIDDLE\">");
|
||||
Tbl_StartCellAttr ("class=\"LOG LEFT_MIDDLE\"");
|
||||
fprintf (Gbl.F.Out," - ");
|
||||
}
|
||||
|
||||
|
@ -3674,7 +3673,7 @@ static void Sta_ShowNumHitsPerCentre (unsigned long NumRows,
|
|||
Tbl_StartRow ();
|
||||
|
||||
/* Write ranking of this centre */
|
||||
fprintf (Gbl.F.Out,"<td class=\"LOG RIGHT_TOP\">");
|
||||
Tbl_StartCellAttr ("class=\"LOG RIGHT_TOP\"");
|
||||
if (CtrCod > 0)
|
||||
fprintf (Gbl.F.Out,"%lu",++Ranking);
|
||||
fprintf (Gbl.F.Out," ");
|
||||
|
@ -3708,8 +3707,7 @@ static void Sta_WriteCentre (long CtrCod)
|
|||
Ctr_GetDataOfCentreByCod (&Ctr);
|
||||
|
||||
/***** Title in cell *****/
|
||||
fprintf (Gbl.F.Out,"<td class=\"LOG LEFT_MIDDLE\" title=\"%s\">",
|
||||
Ctr.FullName);
|
||||
Tbl_StartCellAttr ("class=\"LOG LEFT_MIDDLE\" title=\"%s\"",Ctr.FullName);
|
||||
|
||||
/***** Form to go to centre *****/
|
||||
Ctr_DrawCentreLogoAndNameWithLink (&Ctr,ActSeeCtrInf,
|
||||
|
@ -3718,7 +3716,7 @@ static void Sta_WriteCentre (long CtrCod)
|
|||
else // Hit with no centre selected
|
||||
{
|
||||
/***** No centre selected *****/
|
||||
fprintf (Gbl.F.Out,"<td class=\"LOG LEFT_MIDDLE\">");
|
||||
Tbl_StartCellAttr ("class=\"LOG LEFT_MIDDLE\"");
|
||||
fprintf (Gbl.F.Out," - ");
|
||||
}
|
||||
|
||||
|
@ -3774,7 +3772,7 @@ static void Sta_ShowNumHitsPerDegree (unsigned long NumRows,
|
|||
Tbl_StartRow ();
|
||||
|
||||
/* Write ranking of this degree */
|
||||
fprintf (Gbl.F.Out,"<td class=\"LOG RIGHT_TOP\">");
|
||||
Tbl_StartCellAttr ("class=\"LOG RIGHT_TOP\"");
|
||||
if (DegCod > 0)
|
||||
fprintf (Gbl.F.Out,"%lu",++Ranking);
|
||||
fprintf (Gbl.F.Out," ");
|
||||
|
@ -3808,8 +3806,7 @@ static void Sta_WriteDegree (long DegCod)
|
|||
Deg_GetDataOfDegreeByCod (&Deg);
|
||||
|
||||
/***** Title in cell *****/
|
||||
fprintf (Gbl.F.Out,"<td class=\"LOG LEFT_MIDDLE\" title=\"%s\">",
|
||||
Deg.FullName);
|
||||
Tbl_StartCellAttr ("class=\"LOG LEFT_MIDDLE\" title=\"%s\"",Deg.FullName);
|
||||
|
||||
/***** Form to go to degree *****/
|
||||
Deg_DrawDegreeLogoAndNameWithLink (&Deg,ActSeeDegInf,
|
||||
|
@ -3818,7 +3815,7 @@ static void Sta_WriteDegree (long DegCod)
|
|||
else // Hit with no degree selected
|
||||
{
|
||||
/***** No degree selected *****/
|
||||
fprintf (Gbl.F.Out,"<td class=\"LOG LEFT_MIDDLE\">");
|
||||
Tbl_StartCellAttr ("class=\"LOG LEFT_MIDDLE\"");
|
||||
fprintf (Gbl.F.Out," - ");
|
||||
}
|
||||
|
||||
|
@ -3892,7 +3889,7 @@ static void Sta_ShowNumHitsPerCourse (unsigned long NumRows,
|
|||
Tbl_StartRow ();
|
||||
|
||||
/* Write ranking of this course */
|
||||
fprintf (Gbl.F.Out,"<td class=\"LOG RIGHT_TOP\">");
|
||||
Tbl_StartCellAttr ("class=\"LOG RIGHT_TOP\"");
|
||||
if (CrsOK)
|
||||
fprintf (Gbl.F.Out,"%lu",++Ranking);
|
||||
fprintf (Gbl.F.Out," ");
|
||||
|
@ -3902,14 +3899,14 @@ static void Sta_ShowNumHitsPerCourse (unsigned long NumRows,
|
|||
Sta_WriteDegree (Crs.DegCod);
|
||||
|
||||
/* Write degree year */
|
||||
fprintf (Gbl.F.Out,"<td class=\"LOG CENTER_TOP\">");
|
||||
Tbl_StartCellAttr ("class=\"LOG CENTER_TOP\"");
|
||||
fprintf (Gbl.F.Out,"%s ",
|
||||
CrsOK ? Txt_YEAR_OF_DEGREE[Crs.Year] :
|
||||
"-");
|
||||
Tbl_EndCell ();
|
||||
|
||||
/* Write course, including link */
|
||||
fprintf (Gbl.F.Out,"<td class=\"LOG LEFT_TOP\">");
|
||||
Tbl_StartCellAttr ("class=\"LOG LEFT_TOP\"");
|
||||
if (CrsOK)
|
||||
{
|
||||
Frm_StartFormGoTo (ActSeeCrsInf);
|
||||
|
@ -3982,7 +3979,7 @@ static void Sta_DrawBarNumHits (char Color,
|
|||
{
|
||||
unsigned BarWidth;
|
||||
|
||||
fprintf (Gbl.F.Out,"<td class=\"LOG LEFT_MIDDLE\">");
|
||||
Tbl_StartCellAttr ("class=\"LOG LEFT_MIDDLE\"");
|
||||
|
||||
if (HitsNum != 0.0)
|
||||
{
|
||||
|
@ -4276,36 +4273,36 @@ void Sta_GetAndShowLastClicks (void)
|
|||
/* Print table row */
|
||||
Tbl_StartRow ();
|
||||
|
||||
fprintf (Gbl.F.Out,"<td class=\"%s LEFT_MIDDLE\">",ClassRow);
|
||||
Tbl_StartCellAttr ("class=\"%s LEFT_MIDDLE\"",ClassRow);
|
||||
fprintf (Gbl.F.Out,"%s",row[0]); // Click
|
||||
Tbl_EndCell ();
|
||||
|
||||
fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_MIDDLE\">",ClassRow); // Elapsed time
|
||||
Tbl_StartCellAttr ("class=\"%s RIGHT_MIDDLE\"",ClassRow); // Elapsed time
|
||||
Dat_WriteHoursMinutesSecondsFromSeconds (TimeDiff);
|
||||
Tbl_EndCell ();
|
||||
|
||||
fprintf (Gbl.F.Out,"<td class=\"%s LEFT_MIDDLE\">",ClassRow);
|
||||
Tbl_StartCellAttr ("class=\"%s LEFT_MIDDLE\"",ClassRow);
|
||||
fprintf (Gbl.F.Out,"%s", // Role
|
||||
Txt_ROLES_SINGUL_Abc[Rol_ConvertUnsignedStrToRole (row[3])][Usr_SEX_UNKNOWN]);
|
||||
Tbl_EndCell ();
|
||||
|
||||
fprintf (Gbl.F.Out,"<td class=\"%s LEFT_MIDDLE\">",ClassRow);
|
||||
Tbl_StartCellAttr ("class=\"%s LEFT_MIDDLE\"",ClassRow);
|
||||
fprintf (Gbl.F.Out,"%s",Cty.Name[Gbl.Prefs.Language]); // Country
|
||||
Tbl_EndCell ();
|
||||
|
||||
fprintf (Gbl.F.Out,"<td class=\"%s LEFT_MIDDLE\">",ClassRow);
|
||||
Tbl_StartCellAttr ("class=\"%s LEFT_MIDDLE\"",ClassRow);
|
||||
fprintf (Gbl.F.Out,"%s",Ins.ShrtName); // Institution
|
||||
Tbl_EndCell ();
|
||||
|
||||
fprintf (Gbl.F.Out,"<td class=\"%s LEFT_MIDDLE\">",ClassRow);
|
||||
Tbl_StartCellAttr ("class=\"%s LEFT_MIDDLE\"",ClassRow);
|
||||
fprintf (Gbl.F.Out,"%s",Ctr.ShrtName); // Centre
|
||||
Tbl_EndCell ();
|
||||
|
||||
fprintf (Gbl.F.Out,"<td class=\"%s LEFT_MIDDLE\">",ClassRow);
|
||||
Tbl_StartCellAttr ("class=\"%s LEFT_MIDDLE\"",ClassRow);
|
||||
fprintf (Gbl.F.Out,"%s",Deg.ShrtName); // Degree
|
||||
Tbl_EndCell ();
|
||||
|
||||
fprintf (Gbl.F.Out,"<td class=\"%s LEFT_MIDDLE\">",ClassRow);
|
||||
Tbl_StartCellAttr ("class=\"%s LEFT_MIDDLE\"",ClassRow);
|
||||
if (row[8])
|
||||
if (row[8][0])
|
||||
fprintf (Gbl.F.Out,"%s",row[8]); // Action
|
||||
|
|
184
swad_survey.c
184
swad_survey.c
|
@ -459,28 +459,35 @@ static void Svy_ShowOneSurvey (long SvyCod,struct SurveyQuestion *SvyQst,
|
|||
Tbl_StartTableWidePadding (2);
|
||||
|
||||
/***** Write first row of data of this assignment *****/
|
||||
/* Forms to remove/edit this assignment */
|
||||
Tbl_StartRow ();
|
||||
fprintf (Gbl.F.Out,"<td rowspan=\"2\" class=\"CONTEXT_COL");
|
||||
if (!ShowOnlyThisSvyComplete)
|
||||
fprintf (Gbl.F.Out," COLOR%u",Gbl.RowEvenOdd);
|
||||
fprintf (Gbl.F.Out,"\">");
|
||||
|
||||
/* Forms to remove/edit this assignment */
|
||||
if (ShowOnlyThisSvyComplete)
|
||||
fprintf (Gbl.F.Out,"<td rowspan=\"2\" class=\"CONTEXT_COL\">");
|
||||
else
|
||||
fprintf (Gbl.F.Out,"<td rowspan=\"2\" class=\"CONTEXT_COL COLOR%u\">",Gbl.RowEvenOdd);
|
||||
if (Svy.Status.ICanEdit)
|
||||
Svy_PutFormsToRemEditOneSvy (&Svy,Anchor);
|
||||
Tbl_EndCell ();
|
||||
|
||||
/* Start date/time */
|
||||
UniqueId++;
|
||||
fprintf (Gbl.F.Out,"<td id=\"svy_date_start_%u\" class=\"%s LEFT_TOP",
|
||||
UniqueId,
|
||||
Svy.Status.Visible ? (Svy.Status.Open ? "DATE_GREEN" :
|
||||
"DATE_RED") :
|
||||
(Svy.Status.Open ? "DATE_GREEN_LIGHT" :
|
||||
"DATE_RED_LIGHT"));
|
||||
if (!ShowOnlyThisSvyComplete)
|
||||
fprintf (Gbl.F.Out," COLOR%u",Gbl.RowEvenOdd);
|
||||
fprintf (Gbl.F.Out,"\">"
|
||||
"<script type=\"text/javascript\">"
|
||||
if (ShowOnlyThisSvyComplete)
|
||||
fprintf (Gbl.F.Out,"<td id=\"svy_date_start_%u\" class=\"%s LEFT_TOP\">",
|
||||
UniqueId,
|
||||
Svy.Status.Visible ? (Svy.Status.Open ? "DATE_GREEN" :
|
||||
"DATE_RED") :
|
||||
(Svy.Status.Open ? "DATE_GREEN_LIGHT" :
|
||||
"DATE_RED_LIGHT"));
|
||||
else
|
||||
fprintf (Gbl.F.Out,"<td id=\"svy_date_start_%u\" class=\"%s LEFT_TOP COLOR%u\">",
|
||||
UniqueId,
|
||||
Svy.Status.Visible ? (Svy.Status.Open ? "DATE_GREEN" :
|
||||
"DATE_RED") :
|
||||
(Svy.Status.Open ? "DATE_GREEN_LIGHT" :
|
||||
"DATE_RED_LIGHT"),
|
||||
Gbl.RowEvenOdd);
|
||||
fprintf (Gbl.F.Out,"<script type=\"text/javascript\">"
|
||||
"writeLocalDateHMSFromUTC('svy_date_start_%u',%ld,"
|
||||
"%u,'<br />','%s',true,true,0x7);"
|
||||
"</script>",
|
||||
|
@ -489,16 +496,22 @@ static void Svy_ShowOneSurvey (long SvyCod,struct SurveyQuestion *SvyQst,
|
|||
Tbl_EndCell ();
|
||||
|
||||
/* End date/time */
|
||||
fprintf (Gbl.F.Out,"<td id=\"svy_date_end_%u\" class=\"%s LEFT_TOP",
|
||||
UniqueId,
|
||||
Svy.Status.Visible ? (Svy.Status.Open ? "DATE_GREEN" :
|
||||
"DATE_RED") :
|
||||
(Svy.Status.Open ? "DATE_GREEN_LIGHT" :
|
||||
"DATE_RED_LIGHT"));
|
||||
if (!ShowOnlyThisSvyComplete)
|
||||
fprintf (Gbl.F.Out," COLOR%u",Gbl.RowEvenOdd);
|
||||
fprintf (Gbl.F.Out,"\">"
|
||||
"<script type=\"text/javascript\">"
|
||||
if (ShowOnlyThisSvyComplete)
|
||||
fprintf (Gbl.F.Out,"<td id=\"svy_date_end_%u\" class=\"%s LEFT_TOP\">",
|
||||
UniqueId,
|
||||
Svy.Status.Visible ? (Svy.Status.Open ? "DATE_GREEN" :
|
||||
"DATE_RED") :
|
||||
(Svy.Status.Open ? "DATE_GREEN_LIGHT" :
|
||||
"DATE_RED_LIGHT"));
|
||||
else
|
||||
fprintf (Gbl.F.Out,"<td id=\"svy_date_end_%u\" class=\"%s LEFT_TOP COLOR%u\">",
|
||||
UniqueId,
|
||||
Svy.Status.Visible ? (Svy.Status.Open ? "DATE_GREEN" :
|
||||
"DATE_RED") :
|
||||
(Svy.Status.Open ? "DATE_GREEN_LIGHT" :
|
||||
"DATE_RED_LIGHT"),
|
||||
Gbl.RowEvenOdd);
|
||||
fprintf (Gbl.F.Out,"<script type=\"text/javascript\">"
|
||||
"writeLocalDateHMSFromUTC('svy_date_end_%u',%ld,"
|
||||
"%u,'<br />','%s',false,true,0x7);"
|
||||
"</script>",
|
||||
|
@ -507,10 +520,10 @@ static void Svy_ShowOneSurvey (long SvyCod,struct SurveyQuestion *SvyQst,
|
|||
Tbl_EndCell ();
|
||||
|
||||
/* Survey title */
|
||||
fprintf (Gbl.F.Out,"<td class=\"LEFT_TOP");
|
||||
if (!ShowOnlyThisSvyComplete)
|
||||
fprintf (Gbl.F.Out," COLOR%u",Gbl.RowEvenOdd);
|
||||
fprintf (Gbl.F.Out,"\">");
|
||||
if (ShowOnlyThisSvyComplete)
|
||||
fprintf (Gbl.F.Out,"<td class=\"LEFT_TOP\">");
|
||||
else
|
||||
fprintf (Gbl.F.Out,"<td class=\"LEFT_TOP COLOR%u\">",Gbl.RowEvenOdd);
|
||||
Lay_StartArticle (Anchor);
|
||||
Frm_StartForm (ActSeeSvy);
|
||||
Svy_PutParamSvyCod (SvyCod);
|
||||
|
@ -536,10 +549,10 @@ static void Svy_ShowOneSurvey (long SvyCod,struct SurveyQuestion *SvyQst,
|
|||
Tbl_EndCell ();
|
||||
|
||||
/* Status of the survey */
|
||||
fprintf (Gbl.F.Out,"<td rowspan=\"2\" class=\"LEFT_TOP");
|
||||
if (!ShowOnlyThisSvyComplete)
|
||||
fprintf (Gbl.F.Out," COLOR%u",Gbl.RowEvenOdd);
|
||||
fprintf (Gbl.F.Out,"\">");
|
||||
if (ShowOnlyThisSvyComplete)
|
||||
fprintf (Gbl.F.Out,"<td rowspan=\"2\" class=\"LEFT_TOP\">");
|
||||
else
|
||||
fprintf (Gbl.F.Out,"<td rowspan=\"2\" class=\"LEFT_TOP COLOR%u\">",Gbl.RowEvenOdd);
|
||||
Svy_WriteStatus (&Svy);
|
||||
|
||||
if (!ShowOnlyThisSvyComplete)
|
||||
|
@ -582,20 +595,18 @@ static void Svy_ShowOneSurvey (long SvyCod,struct SurveyQuestion *SvyQst,
|
|||
/***** Write second row of data of this survey *****/
|
||||
Tbl_StartRow ();
|
||||
|
||||
fprintf (Gbl.F.Out,"<td colspan=\"2\" class=\"LEFT_TOP");
|
||||
if (!ShowOnlyThisSvyComplete)
|
||||
fprintf (Gbl.F.Out," COLOR%u",Gbl.RowEvenOdd);
|
||||
fprintf (Gbl.F.Out,"\">");
|
||||
|
||||
/* Author of the survey */
|
||||
if (ShowOnlyThisSvyComplete)
|
||||
fprintf (Gbl.F.Out,"<td colspan=\"2\" class=\"LEFT_TOP\">");
|
||||
else
|
||||
fprintf (Gbl.F.Out,"<td colspan=\"2\" class=\"LEFT_TOP COLOR%u\">",Gbl.RowEvenOdd);
|
||||
Svy_WriteAuthor (&Svy);
|
||||
|
||||
Tbl_EndCell ();
|
||||
|
||||
fprintf (Gbl.F.Out,"<td class=\"LEFT_TOP");
|
||||
if (!ShowOnlyThisSvyComplete)
|
||||
fprintf (Gbl.F.Out," COLOR%u",Gbl.RowEvenOdd);
|
||||
fprintf (Gbl.F.Out,"\">");
|
||||
if (ShowOnlyThisSvyComplete)
|
||||
fprintf (Gbl.F.Out,"<td class=\"LEFT_TOP\">");
|
||||
else
|
||||
fprintf (Gbl.F.Out,"<td class=\"LEFT_TOP COLOR%u\">",Gbl.RowEvenOdd);
|
||||
Tbl_EndCell ();
|
||||
|
||||
/* Scope of the survey */
|
||||
|
@ -1863,8 +1874,8 @@ void Svy_RequestCreatOrEditSvy (void)
|
|||
/***** Scope of the survey *****/
|
||||
Tbl_StartRow ();
|
||||
|
||||
fprintf (Gbl.F.Out,"<td class=\"RIGHT_MIDDLE\">"
|
||||
"<label for=\"ScopeSvy\" class=\"%s\">%s:</label>",
|
||||
fprintf (Gbl.F.Out,"<td class=\"RIGHT_MIDDLE\">");
|
||||
fprintf (Gbl.F.Out,"<label for=\"ScopeSvy\" class=\"%s\">%s:</label>",
|
||||
The_ClassFormInBox[Gbl.Prefs.Theme],
|
||||
Txt_Scope);
|
||||
Tbl_EndCell ();
|
||||
|
@ -1880,14 +1891,14 @@ void Svy_RequestCreatOrEditSvy (void)
|
|||
/***** Survey title *****/
|
||||
Tbl_StartRow ();
|
||||
|
||||
fprintf (Gbl.F.Out,"<td class=\"RIGHT_MIDDLE\">"
|
||||
"<label for=\"Title\" class=\"%s\">%s:</label>",
|
||||
fprintf (Gbl.F.Out,"<td class=\"RIGHT_MIDDLE\">");
|
||||
fprintf (Gbl.F.Out,"<label for=\"Title\" class=\"%s\">%s:</label>",
|
||||
The_ClassFormInBox[Gbl.Prefs.Theme],
|
||||
Txt_Title);
|
||||
Tbl_EndCell ();
|
||||
|
||||
fprintf (Gbl.F.Out,"<td class=\"LEFT_MIDDLE\">"
|
||||
"<input type=\"text\" id=\"Title\" name=\"Title\""
|
||||
fprintf (Gbl.F.Out,"<td class=\"LEFT_MIDDLE\">");
|
||||
fprintf (Gbl.F.Out,"<input type=\"text\" id=\"Title\" name=\"Title\""
|
||||
" size=\"45\" maxlength=\"%u\" value=\"%s\""
|
||||
" required=\"required\" />",
|
||||
Svy_MAX_CHARS_SURVEY_TITLE,Svy.Title);
|
||||
|
@ -1901,14 +1912,14 @@ void Svy_RequestCreatOrEditSvy (void)
|
|||
/***** Survey text *****/
|
||||
Tbl_StartRow ();
|
||||
|
||||
fprintf (Gbl.F.Out,"<td class=\"RIGHT_TOP\">"
|
||||
"<label for=\"Txt\" class=\"%s\">%s:</label>",
|
||||
fprintf (Gbl.F.Out,"<td class=\"RIGHT_TOP\">");
|
||||
fprintf (Gbl.F.Out,"<label for=\"Txt\" class=\"%s\">%s:</label>",
|
||||
The_ClassFormInBox[Gbl.Prefs.Theme],
|
||||
Txt_Description);
|
||||
Tbl_EndCell ();
|
||||
|
||||
fprintf (Gbl.F.Out,"<td class=\"LEFT_TOP\">"
|
||||
"<textarea id=\"Txt\" name=\"Txt\""
|
||||
fprintf (Gbl.F.Out,"<td class=\"LEFT_TOP\">");
|
||||
fprintf (Gbl.F.Out,"<textarea id=\"Txt\" name=\"Txt\""
|
||||
" cols=\"60\" rows=\"10\">");
|
||||
if (!ItsANewSurvey)
|
||||
fprintf (Gbl.F.Out,"%s",Txt);
|
||||
|
@ -1920,9 +1931,8 @@ void Svy_RequestCreatOrEditSvy (void)
|
|||
/***** Users' roles who can answer the survey *****/
|
||||
Tbl_StartRow ();
|
||||
|
||||
fprintf (Gbl.F.Out,"<td class=\"RIGHT_TOP %s\">%s:",
|
||||
The_ClassFormInBox[Gbl.Prefs.Theme],
|
||||
Txt_Users);
|
||||
fprintf (Gbl.F.Out,"<td class=\"RIGHT_TOP %s\">",The_ClassFormInBox[Gbl.Prefs.Theme]);
|
||||
fprintf (Gbl.F.Out,"%s:",Txt_Users);
|
||||
Tbl_EndCell ();
|
||||
|
||||
fprintf (Gbl.F.Out,"<td class=\"DAT LEFT_MIDDLE\">");
|
||||
|
@ -2053,10 +2063,8 @@ static void Svy_ShowLstGrpsToEditSurvey (long SvyCod)
|
|||
/***** Start box and table *****/
|
||||
Tbl_StartRow ();
|
||||
|
||||
fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_TOP\">"
|
||||
"%s:",
|
||||
The_ClassFormInBox[Gbl.Prefs.Theme],
|
||||
Txt_Groups);
|
||||
fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_TOP\">",The_ClassFormInBox[Gbl.Prefs.Theme]);
|
||||
fprintf (Gbl.F.Out,"%s:",Txt_Groups);
|
||||
Tbl_EndCell ();
|
||||
|
||||
fprintf (Gbl.F.Out,"<td class=\"LEFT_TOP\">");
|
||||
|
@ -2066,8 +2074,8 @@ static void Svy_ShowLstGrpsToEditSurvey (long SvyCod)
|
|||
/***** First row: checkbox to select the whole course *****/
|
||||
Tbl_StartRow ();
|
||||
|
||||
fprintf (Gbl.F.Out,"<td colspan=\"7\" class=\"DAT LEFT_MIDDLE\">"
|
||||
"<label>"
|
||||
fprintf (Gbl.F.Out,"<td colspan=\"7\" class=\"DAT LEFT_MIDDLE\">");
|
||||
fprintf (Gbl.F.Out,"<label>"
|
||||
"<input type=\"checkbox\""
|
||||
" id=\"WholeCrs\" name=\"WholeCrs\" value=\"Y\"");
|
||||
if (!Svy_CheckIfSvyIsAssociatedToGrps (SvyCod))
|
||||
|
@ -2700,14 +2708,13 @@ static void Svy_ShowFormEditOneQst (long SvyCod,struct SurveyQuestion *SvyQst,
|
|||
/***** Stem *****/
|
||||
Tbl_StartRow ();
|
||||
|
||||
fprintf (Gbl.F.Out,"<td class=\"RIGHT_TOP\">"
|
||||
"<label for=\"Txt\" class=\"%s\">%s:</label>",
|
||||
fprintf (Gbl.F.Out,"<td class=\"RIGHT_TOP\">");
|
||||
fprintf (Gbl.F.Out,"<label for=\"Txt\" class=\"%s\">%s:</label>",
|
||||
The_ClassFormInBox[Gbl.Prefs.Theme],Txt_Wording);
|
||||
Tbl_EndCell ();
|
||||
|
||||
fprintf (Gbl.F.Out,"<td class=\"LEFT_TOP\">"
|
||||
"<textarea id=\"Txt\" name=\"Txt\""
|
||||
" cols=\"60\" rows=\"4\">"
|
||||
fprintf (Gbl.F.Out,"<td class=\"LEFT_TOP\">");
|
||||
fprintf (Gbl.F.Out,"<textarea id=\"Txt\" name=\"Txt\" cols=\"60\" rows=\"4\">"
|
||||
"%s"
|
||||
"</textarea>",
|
||||
Txt);
|
||||
|
@ -2718,14 +2725,11 @@ static void Svy_ShowFormEditOneQst (long SvyCod,struct SurveyQuestion *SvyQst,
|
|||
/***** Type of answer *****/
|
||||
Tbl_StartRow ();
|
||||
|
||||
fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_TOP\">"
|
||||
"%s:",
|
||||
The_ClassFormInBox[Gbl.Prefs.Theme],
|
||||
Txt_Type);
|
||||
fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_TOP\">",The_ClassFormInBox[Gbl.Prefs.Theme]);
|
||||
fprintf (Gbl.F.Out,"%s:",Txt_Type);
|
||||
Tbl_EndCell ();
|
||||
|
||||
fprintf (Gbl.F.Out,"<td class=\"%s LEFT_TOP\">",
|
||||
The_ClassFormInBox[Gbl.Prefs.Theme]);
|
||||
fprintf (Gbl.F.Out,"<td class=\"%s LEFT_TOP\">",The_ClassFormInBox[Gbl.Prefs.Theme]);
|
||||
for (AnsType = (Svy_AnswerType_t) 0;
|
||||
AnsType < Svy_NUM_ANS_TYPES;
|
||||
AnsType++)
|
||||
|
@ -2760,14 +2764,14 @@ static void Svy_ShowFormEditOneQst (long SvyCod,struct SurveyQuestion *SvyQst,
|
|||
Tbl_StartRow ();
|
||||
|
||||
/* Label with the number of the answer */
|
||||
fprintf (Gbl.F.Out,"<td class=\"RIGHT_TOP\">"
|
||||
"<label for=\"AnsStr%u\" class=\"%s\">%u)</label>",
|
||||
fprintf (Gbl.F.Out,"<td class=\"RIGHT_TOP\">");
|
||||
fprintf (Gbl.F.Out,"<label for=\"AnsStr%u\" class=\"%s\">%u)</label>",
|
||||
NumAns,The_ClassFormInBox[Gbl.Prefs.Theme],NumAns + 1);
|
||||
Tbl_EndCell ();
|
||||
|
||||
/* Answer text */
|
||||
fprintf (Gbl.F.Out,"<td class=\"RIGHT_TOP\">"
|
||||
"<textarea id=\"AnsStr%u\" name=\"AnsStr%u\""
|
||||
fprintf (Gbl.F.Out,"<td class=\"RIGHT_TOP\">");
|
||||
fprintf (Gbl.F.Out,"<textarea id=\"AnsStr%u\" name=\"AnsStr%u\""
|
||||
" cols=\"50\" rows=\"1\">",
|
||||
NumAns,NumAns);
|
||||
if (SvyQst->AnsChoice[NumAns].Text)
|
||||
|
@ -3274,22 +3278,18 @@ static void Svy_ListSvyQuestions (struct Survey *Svy,
|
|||
/* Write index of question inside survey (row[1]) */
|
||||
if (sscanf (row[1],"%u",&(SvyQst->QstInd)) != 1)
|
||||
Lay_ShowErrorAndExit ("Error: wrong question index.");
|
||||
fprintf (Gbl.F.Out,"<td class=\"DAT_SMALL CENTER_TOP COLOR%u\">"
|
||||
"%u",
|
||||
Gbl.RowEvenOdd,SvyQst->QstInd + 1);
|
||||
fprintf (Gbl.F.Out,"<td class=\"DAT_SMALL CENTER_TOP COLOR%u\">",Gbl.RowEvenOdd);
|
||||
fprintf (Gbl.F.Out,"%u",SvyQst->QstInd + 1);
|
||||
Tbl_EndCell ();
|
||||
|
||||
/* Write the question type (row[2]) */
|
||||
SvyQst->AnswerType = Svy_ConvertFromStrAnsTypDBToAnsTyp (row[2]);
|
||||
fprintf (Gbl.F.Out,"<td class=\"DAT_SMALL CENTER_TOP COLOR%u\">"
|
||||
"%s",
|
||||
Gbl.RowEvenOdd,
|
||||
Txt_SURVEY_STR_ANSWER_TYPES[SvyQst->AnswerType]);
|
||||
fprintf (Gbl.F.Out,"<td class=\"DAT_SMALL CENTER_TOP COLOR%u\">",Gbl.RowEvenOdd);
|
||||
fprintf (Gbl.F.Out,"%s",Txt_SURVEY_STR_ANSWER_TYPES[SvyQst->AnswerType]);
|
||||
Tbl_EndCell ();
|
||||
|
||||
/* Write the stem (row[3]) and the answers of this question */
|
||||
fprintf (Gbl.F.Out,"<td class=\"DAT LEFT_TOP COLOR%u\">",
|
||||
Gbl.RowEvenOdd);
|
||||
fprintf (Gbl.F.Out,"<td class=\"DAT LEFT_TOP COLOR%u\">",Gbl.RowEvenOdd);
|
||||
Svy_WriteQstStem (row[3]);
|
||||
Svy_WriteAnswersOfAQst (Svy,SvyQst,PutFormAnswerSurvey);
|
||||
Tbl_EndCell ();
|
||||
|
@ -3437,8 +3437,8 @@ static void Svy_WriteAnswersOfAQst (struct Survey *Svy,
|
|||
if (PutFormAnswerSurvey)
|
||||
{
|
||||
/* Write selector to choice this answer */
|
||||
fprintf (Gbl.F.Out,"<td class=\"LEFT_TOP\">"
|
||||
"<input type=\"");
|
||||
fprintf (Gbl.F.Out,"<td class=\"LEFT_TOP\">");
|
||||
fprintf (Gbl.F.Out,"<input type=\"");
|
||||
if (SvyQst->AnswerType == Svy_ANS_UNIQUE_CHOICE)
|
||||
fprintf (Gbl.F.Out,"radio\""
|
||||
" onclick=\"selectUnselectRadio(this,this.form.Ans%010u,%u)\"",
|
||||
|
@ -3453,16 +3453,16 @@ static void Svy_WriteAnswersOfAQst (struct Survey *Svy,
|
|||
}
|
||||
|
||||
/* Write the number of option */
|
||||
fprintf (Gbl.F.Out,"<td class=\"LEFT_TOP\" style=\"width:50px;\">"
|
||||
"<label for=\"Ans%010u_%010u\" class=\"DAT\">"
|
||||
fprintf (Gbl.F.Out,"<td class=\"LEFT_TOP\" style=\"width:50px;\">");
|
||||
fprintf (Gbl.F.Out,"<label for=\"Ans%010u_%010u\" class=\"DAT\">"
|
||||
"%u)"
|
||||
"</label>",
|
||||
(unsigned) SvyQst->QstCod,NumAns,NumAns + 1);
|
||||
Tbl_EndCell ();
|
||||
|
||||
/* Write the text of the answer */
|
||||
fprintf (Gbl.F.Out,"<td class=\"LEFT_TOP\">"
|
||||
"<label for=\"Ans%010u_%010u\" class=\"DAT\">%s</label>",
|
||||
fprintf (Gbl.F.Out,"<td class=\"LEFT_TOP\">");
|
||||
fprintf (Gbl.F.Out,"<label for=\"Ans%010u_%010u\" class=\"DAT\">%s</label>",
|
||||
(unsigned) SvyQst->QstCod,NumAns,
|
||||
SvyQst->AnsChoice[NumAns].Text);
|
||||
Tbl_EndCell ();
|
||||
|
|
|
@ -601,8 +601,7 @@ static void Syl_ShowRowSyllabus (unsigned NumItem,
|
|||
{
|
||||
if (NewItem)
|
||||
{
|
||||
fprintf (Gbl.F.Out,"<td colspan=\"5\" class=\"COLOR%u\">",
|
||||
Gbl.RowEvenOdd);
|
||||
fprintf (Gbl.F.Out,"<td colspan=\"5\" class=\"COLOR%u\">",Gbl.RowEvenOdd);
|
||||
Tbl_EndCell ();
|
||||
}
|
||||
else
|
||||
|
@ -711,8 +710,7 @@ static void Syl_ShowRowSyllabus (unsigned NumItem,
|
|||
}
|
||||
|
||||
/***** Code of the item *****/
|
||||
fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_TOP COLOR%u\""
|
||||
" style=\"width:%dpx;\">",
|
||||
fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_TOP COLOR%u\" style=\"width:%dpx;\">",
|
||||
StyleSyllabus[Level],Gbl.RowEvenOdd,
|
||||
Level * Syl_WIDTH_NUM_SYLLABUS);
|
||||
if (Level == 1)
|
||||
|
@ -721,12 +719,11 @@ static void Syl_ShowRowSyllabus (unsigned NumItem,
|
|||
Tbl_EndCell ();
|
||||
|
||||
/***** Text of the item *****/
|
||||
fprintf (Gbl.F.Out,"<td colspan=\"%d\" class=\"%s LEFT_TOP COLOR%u\">"
|
||||
"%s",
|
||||
fprintf (Gbl.F.Out,"<td colspan=\"%d\" class=\"%s LEFT_TOP COLOR%u\">",
|
||||
LstItemsSyllabus.NumLevels - Level + 1,
|
||||
StyleSyllabus[Level],
|
||||
Gbl.RowEvenOdd,
|
||||
Text);
|
||||
Gbl.RowEvenOdd);
|
||||
fprintf (Gbl.F.Out,"%s",Text);
|
||||
Tbl_EndCell ();
|
||||
}
|
||||
|
||||
|
@ -905,8 +902,7 @@ static void Syl_PutFormItemSyllabus (bool NewItem,unsigned NumItem,int Level,int
|
|||
}
|
||||
else
|
||||
{
|
||||
fprintf (Gbl.F.Out,"<td class=\"%s LEFT_MIDDLE COLOR%u\""
|
||||
" style=\"width:%dpx;\">",
|
||||
fprintf (Gbl.F.Out,"<td class=\"%s LEFT_MIDDLE COLOR%u\" style=\"width:%dpx;\">",
|
||||
StyleSyllabus[Level],Gbl.RowEvenOdd,
|
||||
Level * Syl_WIDTH_NUM_SYLLABUS);
|
||||
if (Level == 1)
|
||||
|
|
|
@ -1018,11 +1018,10 @@ static void TsI_WriteRowImportedQst (struct XMLElement *StemElem,
|
|||
|
||||
/***** Put icon to indicate that a question does not exist in database *****/
|
||||
Tbl_StartRow ();
|
||||
fprintf (Gbl.F.Out,"<td class=\"BT%u CENTER_TOP\">"
|
||||
"<img src=\"%s/%s\""
|
||||
fprintf (Gbl.F.Out,"<td class=\"BT%u CENTER_TOP\">",Gbl.RowEvenOdd);
|
||||
fprintf (Gbl.F.Out,"<img src=\"%s/%s\""
|
||||
" alt=\"%s\" title=\"%s\""
|
||||
" class=\"CONTEXT_ICO_16x16\" />",
|
||||
Gbl.RowEvenOdd,
|
||||
Cfg_URL_ICON_PUBLIC,
|
||||
QuestionExists ? "tr16x16.gif" :
|
||||
"check-circle.svg",
|
||||
|
@ -1040,8 +1039,7 @@ static void TsI_WriteRowImportedQst (struct XMLElement *StemElem,
|
|||
Tbl_EndCell ();
|
||||
|
||||
/***** Write the question tags *****/
|
||||
fprintf (Gbl.F.Out,"<td class=\"LEFT_TOP COLOR%u\">",
|
||||
Gbl.RowEvenOdd);
|
||||
fprintf (Gbl.F.Out,"<td class=\"LEFT_TOP COLOR%u\">",Gbl.RowEvenOdd);
|
||||
if (Gbl.Test.Tags.Num)
|
||||
{
|
||||
/***** Write the tags *****/
|
||||
|
@ -1052,14 +1050,12 @@ static void TsI_WriteRowImportedQst (struct XMLElement *StemElem,
|
|||
{
|
||||
Tbl_StartRow ();
|
||||
|
||||
fprintf (Gbl.F.Out,"<td class=\"%s LEFT_TOP\">"
|
||||
" • ",
|
||||
ClassData);
|
||||
fprintf (Gbl.F.Out,"<td class=\"%s LEFT_TOP\">",ClassData);
|
||||
fprintf (Gbl.F.Out," • ");
|
||||
Tbl_EndCell ();
|
||||
|
||||
fprintf (Gbl.F.Out,"<td class=\"%s LEFT_TOP\">"
|
||||
"%s",
|
||||
ClassData,Gbl.Test.Tags.Txt[NumTag]);
|
||||
fprintf (Gbl.F.Out,"<td class=\"%s LEFT_TOP\">",ClassData);
|
||||
fprintf (Gbl.F.Out,"%s",Gbl.Test.Tags.Txt[NumTag]);
|
||||
Tbl_EndCell ();
|
||||
|
||||
Tbl_EndRow ();
|
||||
|
@ -1073,15 +1069,12 @@ static void TsI_WriteRowImportedQst (struct XMLElement *StemElem,
|
|||
Tbl_EndCell ();
|
||||
|
||||
/***** Write the question type *****/
|
||||
fprintf (Gbl.F.Out,"<td class=\"%s CENTER_TOP COLOR%u\">"
|
||||
"%s ",
|
||||
ClassData,Gbl.RowEvenOdd,
|
||||
Txt_TST_STR_ANSWER_TYPES[Gbl.Test.AnswerType]);
|
||||
fprintf (Gbl.F.Out,"<td class=\"%s CENTER_TOP COLOR%u\">",ClassData,Gbl.RowEvenOdd);
|
||||
fprintf (Gbl.F.Out,"%s ",Txt_TST_STR_ANSWER_TYPES[Gbl.Test.AnswerType]);
|
||||
Tbl_EndCell ();
|
||||
|
||||
/***** Write if shuffle is enabled *****/
|
||||
fprintf (Gbl.F.Out,"<td class=\"CENTER_TOP COLOR%u\">",
|
||||
Gbl.RowEvenOdd);
|
||||
fprintf (Gbl.F.Out,"<td class=\"CENTER_TOP COLOR%u\">",Gbl.RowEvenOdd);
|
||||
if (Gbl.Test.AnswerType == Tst_ANS_UNIQUE_CHOICE ||
|
||||
Gbl.Test.AnswerType == Tst_ANS_MULTIPLE_CHOICE)
|
||||
/* Put an icon that indicates whether shuffle is enabled or not */
|
||||
|
@ -1097,8 +1090,7 @@ static void TsI_WriteRowImportedQst (struct XMLElement *StemElem,
|
|||
Tbl_EndCell ();
|
||||
|
||||
/***** Write the stem and the answers *****/
|
||||
fprintf (Gbl.F.Out,"<td class=\"LEFT_TOP COLOR%u\">",
|
||||
Gbl.RowEvenOdd);
|
||||
fprintf (Gbl.F.Out,"<td class=\"LEFT_TOP COLOR%u\">",Gbl.RowEvenOdd);
|
||||
Tst_WriteQstStem (Stem,ClassStem);
|
||||
Tst_WriteQstFeedback (Feedback,"TEST_EDI_LIGHT");
|
||||
switch (Gbl.Test.AnswerType)
|
||||
|
@ -1153,8 +1145,7 @@ static void TsI_WriteRowImportedQst (struct XMLElement *StemElem,
|
|||
|
||||
/* Put an icon that indicates whether the answer is correct or wrong */
|
||||
Tbl_StartRow ();
|
||||
fprintf (Gbl.F.Out,"<td class=\"BT%u\">",
|
||||
Gbl.RowEvenOdd);
|
||||
fprintf (Gbl.F.Out,"<td class=\"BT%u\">",Gbl.RowEvenOdd);
|
||||
if (Gbl.Test.Answer.Options[NumOpt].Correct)
|
||||
fprintf (Gbl.F.Out,"<img src=\"%s/check.svg\""
|
||||
" alt=\"%s\" title=\"%s\""
|
||||
|
@ -1167,14 +1158,13 @@ static void TsI_WriteRowImportedQst (struct XMLElement *StemElem,
|
|||
Tbl_EndCell ();
|
||||
|
||||
/* Write the number of option */
|
||||
fprintf (Gbl.F.Out,"<td class=\"%s LEFT_TOP\">"
|
||||
"%c) ",
|
||||
ClassData,'a' + (char) NumOpt);
|
||||
fprintf (Gbl.F.Out,"<td class=\"%s LEFT_TOP\">",ClassData);
|
||||
fprintf (Gbl.F.Out,"%c) ",'a' + (char) NumOpt);
|
||||
Tbl_EndCell ();
|
||||
|
||||
/* Write the text and the feedback of the answer */
|
||||
fprintf (Gbl.F.Out,"<td class=\"LEFT_TOP\">"
|
||||
"<div class=\"%s\">"
|
||||
fprintf (Gbl.F.Out,"<td class=\"LEFT_TOP\">");
|
||||
fprintf (Gbl.F.Out,"<div class=\"%s\">"
|
||||
"%s"
|
||||
"</div>",
|
||||
ClassStem,AnswerText);
|
||||
|
|
|
@ -1135,10 +1135,9 @@ static void TT_DrawTimeTable (void)
|
|||
Tbl_StartRow ();
|
||||
|
||||
fprintf (Gbl.F.Out,"<td rowspan=\"2\" class=\"TT_HOUR_BIG RIGHT_MIDDLE\""
|
||||
" style=\"width:%u%%;\">"
|
||||
"%02u:00",
|
||||
TT_PERCENT_WIDTH_OF_AN_HOUR_COLUMN,
|
||||
Gbl.TimeTable.Config.Range.Hours.Start);
|
||||
" style=\"width:%u%%;\">",
|
||||
TT_PERCENT_WIDTH_OF_AN_HOUR_COLUMN);
|
||||
fprintf (Gbl.F.Out,"%02u:00",Gbl.TimeTable.Config.Range.Hours.Start);
|
||||
Tbl_EndCell ();
|
||||
|
||||
TT_DrawCellAlignTimeTable ();
|
||||
|
@ -1146,10 +1145,9 @@ static void TT_DrawTimeTable (void)
|
|||
TT_DrawCellAlignTimeTable ();
|
||||
|
||||
fprintf (Gbl.F.Out,"<td rowspan=\"2\" class=\"TT_HOUR_BIG LEFT_MIDDLE\""
|
||||
" style=\"width:%u%%;\">"
|
||||
"%02u:00",
|
||||
TT_PERCENT_WIDTH_OF_AN_HOUR_COLUMN,
|
||||
Gbl.TimeTable.Config.Range.Hours.Start);
|
||||
" style=\"width:%u%%;\">",
|
||||
TT_PERCENT_WIDTH_OF_AN_HOUR_COLUMN);
|
||||
fprintf (Gbl.F.Out,"%02u:00",Gbl.TimeTable.Config.Range.Hours.Start);
|
||||
Tbl_EndCell ();
|
||||
|
||||
Tbl_EndRow ();
|
||||
|
@ -1315,15 +1313,13 @@ static void TT_TimeTableDrawDaysCells (void)
|
|||
DayColumn++)
|
||||
{
|
||||
Weekday = (DayColumn + Gbl.Prefs.FirstDayOfWeek) % 7;
|
||||
fprintf (Gbl.F.Out,"<td colspan=\"%u\""
|
||||
" class=\"%s CENTER_MIDDLE\""
|
||||
" style=\"width:%u%%;\">"
|
||||
"%s",
|
||||
fprintf (Gbl.F.Out,"<td colspan=\"%u\" class=\"%s CENTER_MIDDLE\""
|
||||
" style=\"width:%u%%;\">",
|
||||
TT_NUM_MINICOLUMNS_PER_DAY,
|
||||
Weekday == 6 ? "TT_SUNDAY" : // Sunday drawn in red
|
||||
"TT_DAY", // Monday to Saturday
|
||||
TT_PERCENT_WIDTH_OF_A_DAY,
|
||||
Txt_DAYS_CAPS[Weekday]);
|
||||
TT_PERCENT_WIDTH_OF_A_DAY);
|
||||
fprintf (Gbl.F.Out,"%s",Txt_DAYS_CAPS[Weekday]);
|
||||
Tbl_EndCell ();
|
||||
}
|
||||
}
|
||||
|
@ -1334,12 +1330,11 @@ static void TT_TimeTableDrawDaysCells (void)
|
|||
|
||||
static void TT_TimeTableDrawHourCell (unsigned Hour,unsigned Min,const char *Align)
|
||||
{
|
||||
fprintf (Gbl.F.Out,"<td rowspan=\"2\" class=\"TT_HOUR %s %s\">"
|
||||
"%02u:%02u",
|
||||
fprintf (Gbl.F.Out,"<td rowspan=\"2\" class=\"TT_HOUR %s %s\">",
|
||||
Min ? "TT_HOUR_SMALL" :
|
||||
"TT_HOUR_BIG",
|
||||
Align,
|
||||
Hour,Min);
|
||||
Align);
|
||||
fprintf (Gbl.F.Out,"%02u:%02u",Hour,Min);
|
||||
Tbl_EndCell ();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue