Version 14.125.2

This commit is contained in:
Antonio Cañas Vargas 2015-09-04 17:10:27 +02:00
parent ef7765e47e
commit 3eae59bf5a
12 changed files with 189 additions and 244 deletions

View File

@ -837,8 +837,9 @@ a:hover img.CENTRE_PHOTO_SHOW
.RIGHT_BOTTOM {text-align:right; vertical-align:bottom;}
/************************** Lists with alternating colors ********************/
.COLOR0 {background-color:#F4F2EA;}
.COLOR1 {background-color:#FBFAF7;}
.COLOR0 {background-color:#F4F2EA;}
.COLOR1 {background-color:#FBFAF7;}
.VERY_LIGHT_BLUE {background-color:#DDECF1;}
/********************************* Course info *******************************/
#crs_info

View File

@ -646,8 +646,9 @@ a:hover img.CENTRE_PHOTO_SHOW
.RIGHT_BOTTOM {text-align:right; vertical-align:bottom;}
/************************** Lists with alternating colors ********************/
.COLOR0 {background-color:#F4F2EA;}
.COLOR1 {background-color:#FBFAF7;}
.COLOR0 {background-color:#F4F2EA;}
.COLOR1 {background-color:#FBFAF7;}
.VERY_LIGHT_BLUE {background-color:#DDECF1;}
/********************************* Course info *******************************/
#crs_info

View File

@ -108,7 +108,7 @@ void Ctr_SeeCtrWithPendingDegs (void)
unsigned NumCtrs;
unsigned NumCtr;
struct Centre Ctr;
const char *BgColor;
char BgColor[32];
/***** Get centres with pending degrees *****/
switch (Gbl.Usrs.Me.LoggedRole)
@ -161,16 +161,17 @@ void Ctr_SeeCtrWithPendingDegs (void)
/* Get centre code (row[0]) */
Ctr.CtrCod = Str_ConvertStrCodToLongCod (row[0]);
BgColor = (Ctr.CtrCod == Gbl.CurrentCtr.Ctr.CtrCod) ? VERY_LIGHT_BLUE :
Gbl.ColorRows[Gbl.RowEvenOdd];
if (Ctr.CtrCod == Gbl.CurrentCtr.Ctr.CtrCod)
strcpy (BgColor,"VERY_LIGHT_BLUE");
else
sprintf (BgColor,"COLOR%u",Gbl.RowEvenOdd);
/* Get data of centre */
Ctr_GetDataOfCentreByCod (&Ctr);
/* Centre logo */
fprintf (Gbl.F.Out,"<tr>"
"<td class=\"DAT CENTER_MIDDLE\""
" style=\"background-color:%s;\">"
"<td class=\"DAT CENTER_MIDDLE %s\">"
"<a href=\"%s\" title=\"%s\" class=\"DAT\" target=\"_blank\">",
BgColor,Ctr.WWW,Ctr.FullName);
Log_DrawLogo (Sco_SCOPE_CTR,Ctr.CtrCod,Ctr.ShortName,
@ -179,8 +180,7 @@ void Ctr_SeeCtrWithPendingDegs (void)
"</td>");
/* Centre full name */
fprintf (Gbl.F.Out,"<td class=\"DAT LEFT_MIDDLE\""
" style=\"background-color:%s;\">",
fprintf (Gbl.F.Out,"<td class=\"DAT LEFT_MIDDLE %s\">",
BgColor);
Act_FormGoToStart (ActSeeDeg);
Ctr_PutParamCtrCod (Ctr.CtrCod);
@ -193,8 +193,7 @@ void Ctr_SeeCtrWithPendingDegs (void)
fprintf (Gbl.F.Out,"</td>");
/* Number of pending degrees (row[1]) */
fprintf (Gbl.F.Out,"<td class=\"DAT RIGHT_MIDDLE\""
" style=\"background-color:%s;\">"
fprintf (Gbl.F.Out,"<td class=\"DAT RIGHT_MIDDLE %s\">"
"%s"
"</td>"
"</tr>",
@ -578,7 +577,7 @@ static void Ctr_ListOneCentreForSeeing (struct Centre *Ctr,unsigned NumCtr)
extern const char *Txt_CENTRE_STATUS[Ctr_NUM_STATUS_TXT];
struct Place Plc;
const char *TxtClass;
const char *BgColor;
char BgColor[32];
Crs_StatusTxt_t StatusTxt;
/***** Get data of place of this centre *****/
@ -587,21 +586,21 @@ static void Ctr_ListOneCentreForSeeing (struct Centre *Ctr,unsigned NumCtr)
TxtClass = (Ctr->Status & Ctr_STATUS_BIT_PENDING) ? "DAT_LIGHT" :
"DAT";
BgColor = (Ctr->CtrCod == Gbl.CurrentCtr.Ctr.CtrCod) ? VERY_LIGHT_BLUE :
Gbl.ColorRows[Gbl.RowEvenOdd];
if (Ctr->CtrCod == Gbl.CurrentCtr.Ctr.CtrCod)
strcpy (BgColor,"VERY_LIGHT_BLUE");
else
sprintf (BgColor,"COLOR%u",Gbl.RowEvenOdd);
/***** Number of centre in this list *****/
fprintf (Gbl.F.Out,"<tr>"
"<td class=\"%s RIGHT_MIDDLE\""
" style=\"background-color:%s;\">"
"<td class=\"%s RIGHT_MIDDLE %s\">"
"%u"
"</td>",
TxtClass,BgColor,
NumCtr);
/***** Centre logo *****/
fprintf (Gbl.F.Out,"<td class=\"%s CENTER_TOP\""
" style=\"background-color:%s;\">"
fprintf (Gbl.F.Out,"<td class=\"%s CENTER_TOP %s\">"
"<a href=\"%s\" title=\"%s\" class=\"DAT\" target=\"_blank\">",
TxtClass,BgColor,
Ctr->WWW,Ctr->FullName);
@ -611,8 +610,7 @@ static void Ctr_ListOneCentreForSeeing (struct Centre *Ctr,unsigned NumCtr)
"</td>");
/***** Place *****/
fprintf (Gbl.F.Out,"<td class=\"%s LEFT_MIDDLE\""
" style=\"background-color:%s;\">"
fprintf (Gbl.F.Out,"<td class=\"%s LEFT_MIDDLE %s\">"
"%s"
"</td>",
TxtClass,BgColor,
@ -620,8 +618,7 @@ static void Ctr_ListOneCentreForSeeing (struct Centre *Ctr,unsigned NumCtr)
Txt_Another_place);
/***** Centre name *****/
fprintf (Gbl.F.Out,"<td class=\"%s LEFT_MIDDLE\""
" style=\"background-color:%s;\">",
fprintf (Gbl.F.Out,"<td class=\"%s LEFT_MIDDLE %s\">",
TxtClass,BgColor);
Act_FormGoToStart (ActSeeCtrInf);
Ctr_PutParamCtrCod (Ctr->CtrCod);
@ -633,16 +630,14 @@ static void Ctr_ListOneCentreForSeeing (struct Centre *Ctr,unsigned NumCtr)
fprintf (Gbl.F.Out,"</td>");
/***** Number of teachers *****/
fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_MIDDLE\""
" style=\"background-color:%s;\">"
fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_MIDDLE %s\">"
"%u"
"</td>",
TxtClass,BgColor,
Ctr->NumTchs);
/***** Number of degrees *****/
fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_MIDDLE\""
" style=\"background-color:%s;\">"
fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_MIDDLE %s\">"
"%u"
"</td>",
TxtClass,BgColor,
@ -650,8 +645,7 @@ static void Ctr_ListOneCentreForSeeing (struct Centre *Ctr,unsigned NumCtr)
/***** Centre status *****/
StatusTxt = Ctr_GetStatusTxtFromStatusBits (Ctr->Status);
fprintf (Gbl.F.Out,"<td class=\"%s LEFT_MIDDLE\""
" style=\"background-color:%s;\">"
fprintf (Gbl.F.Out,"<td class=\"%s LEFT_MIDDLE %s\">"
"%s"
"</td>"
"</tr>",

View File

@ -103,11 +103,12 @@
/****************************** Public constants *****************************/
/*****************************************************************************/
#define Log_PLATFORM_VERSION "SWAD 14.125.1 (2015/09/03)"
#define Log_PLATFORM_VERSION "SWAD 14.125.2 (2015/09/04)"
// Number of lines (includes comments but not blank lines) has been got with the following command:
// nl swad*.c swad*.h css/swad*.css py/swad*.py js/swad*.js soap/swad*.h sql/swad*.sql | tail -1
/*
Version 14.125.2: Sep 04, 2015 Changes in styles. (184344 lines)
Version 14.125.1: Sep 03, 2015 Changes in styles. (184399 lines)
Version 14.125: Sep 03, 2015 Changes in styles. (184521 lines)
Version 14.124.10:Sep 02, 2015 Changes in styles. (184571 lines)

View File

@ -94,7 +94,7 @@ void Cty_SeeCtyWithPendingInss (void)
unsigned NumCtys;
unsigned NumCty;
struct Country Cty;
const char *BgColor;
char BgColor[32];
/***** Get countries with pending institutions *****/
switch (Gbl.Usrs.Me.LoggedRole)
@ -139,16 +139,17 @@ void Cty_SeeCtyWithPendingInss (void)
/* Get country code (row[0]) */
Cty.CtyCod = Str_ConvertStrCodToLongCod (row[0]);
BgColor = (Cty.CtyCod == Gbl.CurrentCty.Cty.CtyCod) ? VERY_LIGHT_BLUE :
Gbl.ColorRows[Gbl.RowEvenOdd];
if (Cty.CtyCod == Gbl.CurrentCty.Cty.CtyCod)
strcpy (BgColor,"VERY_LIGHT_BLUE");
else
sprintf (BgColor,"COLOR%u",Gbl.RowEvenOdd);
/* Get data of country */
Cty_GetDataOfCountryByCod (&Cty);
/* Country map */
fprintf (Gbl.F.Out,"<tr>"
"<td class=\"CENTER_MIDDLE\""
" style=\"background-color:%s;\">",
"<td class=\"CENTER_MIDDLE %s\">",
BgColor);
if (Cty_CheckIfCountryMapExists (&Cty))
{
@ -160,8 +161,7 @@ void Cty_SeeCtyWithPendingInss (void)
fprintf (Gbl.F.Out,"</td>");
/* Country name */
fprintf (Gbl.F.Out,"<td class=\"DAT LEFT_MIDDLE\""
" style=\"background-color:%s;\">",
fprintf (Gbl.F.Out,"<td class=\"DAT LEFT_MIDDLE %s\">",
BgColor);
Act_FormGoToStart (ActSeeIns);
Cty_PutParamCtyCod (Cty.CtyCod);
@ -173,8 +173,7 @@ void Cty_SeeCtyWithPendingInss (void)
fprintf (Gbl.F.Out,"</td>");
/* Number of pending institutions (row[1]) */
fprintf (Gbl.F.Out,"<td class=\"DAT RIGHT_MIDDLE\""
" style=\"background-color:%s;\">"
fprintf (Gbl.F.Out,"<td class=\"DAT RIGHT_MIDDLE %s\">"
"%s"
"</td>"
"</tr>",
@ -486,7 +485,7 @@ void Cty_ListCountries2 (void)
unsigned NumInssWithCountry = 0;
unsigned NumUsrsInOtherCtys;
unsigned NumInssInOtherCtys;
const char *BgColor;
char BgColor[32];
/***** Put link (form) to edit countries *****/
if (Gbl.Usrs.Me.LoggedRole == Rol_SYS_ADM)
@ -532,14 +531,14 @@ void Cty_ListCountries2 (void)
NumCty < Gbl.Ctys.Num;
NumCty++)
{
BgColor = (Gbl.Ctys.Lst[NumCty].CtyCod ==
Gbl.CurrentCty.Cty.CtyCod) ? VERY_LIGHT_BLUE :
Gbl.ColorRows[Gbl.RowEvenOdd];
if (Gbl.Ctys.Lst[NumCty].CtyCod == Gbl.CurrentCty.Cty.CtyCod)
strcpy (BgColor,"VERY_LIGHT_BLUE");
else
sprintf (BgColor,"COLOR%u",Gbl.RowEvenOdd);
/***** Country map (and link to WWW if exists) *****/
fprintf (Gbl.F.Out,"<tr>"
"<td class=\"COUNTRY_MAP_SMALL CENTER_MIDDLE\""
" style=\"background-color:%s;\">",
"<td class=\"COUNTRY_MAP_SMALL CENTER_MIDDLE %s\">",
BgColor);
if (Cty_CheckIfCountryMapExists (&Gbl.Ctys.Lst[NumCty]))
{
@ -556,8 +555,7 @@ void Cty_ListCountries2 (void)
fprintf (Gbl.F.Out,"</td>");
/* Name and link to go to this country */
fprintf (Gbl.F.Out,"<td class=\"DAT LEFT_MIDDLE\""
" style=\"background-color:%s;\">",
fprintf (Gbl.F.Out,"<td class=\"DAT LEFT_MIDDLE %s\">",
BgColor);
Act_FormGoToStart (ActSeeCtyInf);
Cty_PutParamCtyCod (Gbl.Ctys.Lst[NumCty].CtyCod);
@ -573,20 +571,16 @@ void Cty_ListCountries2 (void)
/* Write stats of this country */
NumStds = Usr_GetNumUsrsInCountry (Rol_STUDENT,Gbl.Ctys.Lst[NumCty].CtyCod);
NumTchs = Usr_GetNumUsrsInCountry (Rol_TEACHER,Gbl.Ctys.Lst[NumCty].CtyCod);
fprintf (Gbl.F.Out,"<td class=\"DAT RIGHT_MIDDLE\""
" style=\"background-color:%s;\">"
fprintf (Gbl.F.Out,"<td class=\"DAT RIGHT_MIDDLE %s\">"
"%u"
"</td>"
"<td class=\"DAT RIGHT_MIDDLE\""
" style=\"background-color:%s;\">"
"<td class=\"DAT RIGHT_MIDDLE %s\">"
"%u"
"</td>"
"<td class=\"DAT RIGHT_MIDDLE\""
" style=\"background-color:%s;\">"
"<td class=\"DAT RIGHT_MIDDLE %s\">"
"%u"
"</td>"
"<td class=\"DAT RIGHT_MIDDLE\""
" style=\"background-color:%s;\">"
"<td class=\"DAT RIGHT_MIDDLE %s\">"
"%u"
"</td>"
"</tr>",

View File

@ -1265,7 +1265,7 @@ static void Crs_ListCoursesForSeeing (void)
unsigned Year;
unsigned NumCrs;
const char *TxtClass;
const char *BgColor;
char BgColor[32];
Crs_StatusTxt_t StatusTxt;
/***** Write heading *****/
@ -1288,13 +1288,14 @@ static void Crs_ListCoursesForSeeing (void)
{
TxtClass = (Crs->Status & Crs_STATUS_BIT_PENDING) ? "DAT_LIGHT" :
"DAT";
BgColor = (Crs->CrsCod == Gbl.CurrentCrs.Crs.CrsCod) ? VERY_LIGHT_BLUE :
Gbl.ColorRows[Gbl.RowEvenOdd];
if (Crs->CrsCod == Gbl.CurrentCrs.Crs.CrsCod)
strcpy (BgColor,"VERY_LIGHT_BLUE");
else
sprintf (BgColor,"COLOR%u",Gbl.RowEvenOdd);
/* Put green tip if course has users */
fprintf (Gbl.F.Out,"<tr>"
"<td class=\"CENTER_MIDDLE\""
" style=\"background-color:%s;\">"
"<td class=\"CENTER_MIDDLE %s\">"
"<img src=\"%s/%s16x16.gif\""
" alt=\"%s\" title=\"%s\" class=\"ICON16x16\" />"
"</td>",
@ -1308,32 +1309,28 @@ static void Crs_ListCoursesForSeeing (void)
Txt_COURSE_Without_users);
/* Institutional code of the course */
fprintf (Gbl.F.Out,"<td class=\"%s CENTER_MIDDLE\""
" style=\"background-color:%s;\">"
fprintf (Gbl.F.Out,"<td class=\"%s CENTER_MIDDLE %s\">"
"%s"
"</td>",
TxtClass,BgColor,
Crs->InstitutionalCrsCod);
/* Course year */
fprintf (Gbl.F.Out,"<td class=\"%s CENTER_MIDDLE\""
" style=\"background-color:%s;\">"
fprintf (Gbl.F.Out,"<td class=\"%s CENTER_MIDDLE %s\">"
"%s"
"</td>",
TxtClass,BgColor,
Txt_YEAR_OF_DEGREE[Crs->Year]);
/* Course semester */
fprintf (Gbl.F.Out,"<td class=\"%s CENTER_MIDDLE\""
" style=\"background-color:%s;\">"
fprintf (Gbl.F.Out,"<td class=\"%s CENTER_MIDDLE %s\">"
"%s"
"</td>",
TxtClass,BgColor,
Txt_SEMESTER_OF_YEAR[Crs->Semester]);
/* Course full name */
fprintf (Gbl.F.Out,"<td class=\"%s LEFT_MIDDLE\""
" style=\"background-color:%s;\">",
fprintf (Gbl.F.Out,"<td class=\"%s LEFT_MIDDLE %s\">",
TxtClass,BgColor);
Act_FormGoToStart (ActSeeCrsInf);
Crs_PutParamCrsCod (Crs->CrsCod);
@ -1345,23 +1342,20 @@ static void Crs_ListCoursesForSeeing (void)
fprintf (Gbl.F.Out,"</td>");
/* Current number of students in this course */
fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_MIDDLE\""
" style=\"background-color:%s;\">"
fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_MIDDLE %s\">"
"%u"
"</td>",
TxtClass,BgColor,Crs->NumStds);
/* Current number of teachers in this course */
fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_MIDDLE\""
" style=\"background-color:%s;\">"
fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_MIDDLE %s\">"
"%u"
"</td>",
TxtClass,BgColor,Crs->NumTchs);
/* Course status */
StatusTxt = Crs_GetStatusTxtFromStatusBits (Crs->Status);
fprintf (Gbl.F.Out,"<td class=\"%s LEFT_MIDDLE\""
" style=\"background-color:%s;\">"
fprintf (Gbl.F.Out,"<td class=\"%s LEFT_MIDDLE %s\">"
"%s"
"</td>"
"</tr>",
@ -3265,7 +3259,7 @@ static void Crs_WriteRowCrsData (unsigned NumCrs,MYSQL_ROW row,bool WriteColumnA
unsigned NumTchs;
const char *Style;
const char *StyleNoBR;
const char *BgColor;
char BgColor[32];
bool Accepted;
/*
@ -3302,8 +3296,10 @@ static void Crs_WriteRowCrsData (unsigned NumCrs,MYSQL_ROW row,bool WriteColumnA
Style = "DAT";
StyleNoBR = "DAT_NOBR";
}
BgColor = (CrsCod == Gbl.CurrentCrs.Crs.CrsCod) ? VERY_LIGHT_BLUE :
Gbl.ColorRows[Gbl.RowEvenOdd];
if (CrsCod == Gbl.CurrentCrs.Crs.CrsCod)
strcpy (BgColor,"VERY_LIGHT_BLUE");
else
sprintf (BgColor,"COLOR%u",Gbl.RowEvenOdd);
/***** Start row *****/
fprintf (Gbl.F.Out,"<tr>");
@ -3312,7 +3308,7 @@ static void Crs_WriteRowCrsData (unsigned NumCrs,MYSQL_ROW row,bool WriteColumnA
if (WriteColumnAccepted)
{
Accepted = (Str_ConvertToUpperLetter (row[8][0]) == 'Y');
fprintf (Gbl.F.Out,"<td class=\"BT\" style=\"background-color:%s;\">"
fprintf (Gbl.F.Out,"<td class=\"BT %s\">"
"<img src=\"%s/%s16x16.gif\""
" alt=\"%s\" title=\"%s\" class=\"ICON16x16\" />"
"</td>",
@ -3327,15 +3323,14 @@ static void Crs_WriteRowCrsData (unsigned NumCrs,MYSQL_ROW row,bool WriteColumnA
}
/***** Write number of course in this search *****/
fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_TOP\""
" style=\"background-color:%s;\">"
fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_TOP %s\">"
"%u"
"</td>",
StyleNoBR,BgColor,NumCrs);
/***** Write degree logo, degree short name (row[2]) and centre short name (row[7]) *****/
fprintf (Gbl.F.Out,"<td class=\"%s LEFT_TOP\""
" style=\"background-color:%s;\">",
/***** Write degree logo, degree short name (row[2])
and centre short name (row[7]) *****/
fprintf (Gbl.F.Out,"<td class=\"%s LEFT_TOP %s\">",
StyleNoBR,BgColor);
Act_FormGoToStart (ActSeeDegInf);
Deg_PutParamDegCod (Deg.DegCod);
@ -3350,22 +3345,19 @@ static void Crs_WriteRowCrsData (unsigned NumCrs,MYSQL_ROW row,bool WriteColumnA
fprintf (Gbl.F.Out,"</td>");
/***** Write year (row[4]) *****/
fprintf (Gbl.F.Out,"<td class=\"%s CENTER_TOP\""
" style=\"background-color:%s;\">"
fprintf (Gbl.F.Out,"<td class=\"%s CENTER_TOP %s\">"
"%s"
"</td>",
Style,BgColor,Txt_YEAR_OF_DEGREE[Deg_ConvStrToYear (row[4])]);
/***** Write semester (row[5]) *****/
fprintf (Gbl.F.Out,"<td class=\"%s CENTER_TOP\""
" style=\"background-color:%s;\">"
fprintf (Gbl.F.Out,"<td class=\"%s CENTER_TOP %s\">"
"%s"
"</td>",
Style,BgColor,Txt_SEMESTER_OF_YEAR[Deg_ConvStrToSemester (row[5])]);
/***** Write course full name (row[6]) *****/
fprintf (Gbl.F.Out,"<td class=\"%s LEFT_TOP\""
" style=\"background-color:%s;\">",
fprintf (Gbl.F.Out,"<td class=\"%s LEFT_TOP %s\">",
Style,BgColor);
Act_FormGoToStart (ActSeeCrsInf);
Crs_PutParamCrsCod (CrsCod);
@ -3376,15 +3368,13 @@ static void Crs_WriteRowCrsData (unsigned NumCrs,MYSQL_ROW row,bool WriteColumnA
fprintf (Gbl.F.Out,"</td>");
/***** Write number of students in course *****/
fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_TOP\""
" style=\"background-color:%s;\">"
fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_TOP %s\">"
"%u"
"</td>",
Style,BgColor,NumStds);
/***** Write number of teachers in course *****/
fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_TOP\""
" style=\"background-color:%s;\">"
fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_TOP %s\">"
"%u"
"</td>"
"</tr>",

View File

@ -157,7 +157,7 @@ void Deg_SeeDegWithPendingCrss (void)
unsigned NumDegs;
unsigned NumDeg;
struct Degree Deg;
const char *BgColor;
char BgColor[32];
/***** Get degrees with pending courses *****/
switch (Gbl.Usrs.Me.LoggedRole)
@ -211,16 +211,17 @@ void Deg_SeeDegWithPendingCrss (void)
/* Get degree code (row[0]) */
Deg.DegCod = Str_ConvertStrCodToLongCod (row[0]);
BgColor = (Deg.DegCod == Gbl.CurrentDeg.Deg.DegCod) ? VERY_LIGHT_BLUE :
Gbl.ColorRows[Gbl.RowEvenOdd];
if (Deg.DegCod == Gbl.CurrentDeg.Deg.DegCod)
strcpy (BgColor,"VERY_LIGHT_BLUE");
else
sprintf (BgColor,"COLOR%u",Gbl.RowEvenOdd);
/* Get data of degree */
Deg_GetDataOfDegreeByCod (&Deg);
/* Degree logo */
fprintf (Gbl.F.Out,"<tr>"
"<td class=\"DAT CENTER_MIDDLE\""
" style=\"background-color:%s;\">"
"<td class=\"DAT CENTER_MIDDLE %s\">"
"<a href=\"%s\" title=\"%s\" class=\"DAT\""
" target=\"_blank\">",
BgColor,Deg.WWW,Deg.FullName);
@ -230,8 +231,7 @@ void Deg_SeeDegWithPendingCrss (void)
"</td>");
/* Degree full name */
fprintf (Gbl.F.Out,"<td class=\"DAT LEFT_MIDDLE\""
" style=\"background-color:%s;\">",
fprintf (Gbl.F.Out,"<td class=\"DAT LEFT_MIDDLE %s\">",
BgColor);
Act_FormGoToStart (ActSeeCrs);
Deg_PutParamDegCod (Deg.DegCod);
@ -244,8 +244,7 @@ void Deg_SeeDegWithPendingCrss (void)
fprintf (Gbl.F.Out,"</td>");
/* Number of pending courses (row[1]) */
fprintf (Gbl.F.Out,"<td class=\"DAT RIGHT_MIDDLE\""
" style=\"background-color:%s;\">"
fprintf (Gbl.F.Out,"<td class=\"DAT RIGHT_MIDDLE %s\">"
"%s"
"</td>"
"</tr>",
@ -1066,7 +1065,7 @@ static void Deg_ListDegreeTypesForSeeing (void)
extern const char *Txt_Direct_authentication_allowed;
extern const char *Txt_Direct_authentication_not_allowed;
unsigned NumDegTyp;
const char *BgColor;
char BgColor[32];
Lay_StartRoundFrameTable (NULL,2,Txt_Types_of_degree);
@ -1078,12 +1077,14 @@ static void Deg_ListDegreeTypesForSeeing (void)
NumDegTyp < Gbl.Degs.DegTypes.Num;
NumDegTyp++)
{
BgColor = (Gbl.Degs.DegTypes.Lst[NumDegTyp].DegTypCod == Gbl.CurrentDegTyp.DegTyp.DegTypCod) ? VERY_LIGHT_BLUE :
Gbl.ColorRows[Gbl.RowEvenOdd];
if (Gbl.Degs.DegTypes.Lst[NumDegTyp].DegTypCod == Gbl.CurrentDegTyp.DegTyp.DegTypCod)
strcpy (BgColor,"VERY_LIGHT_BLUE");
else
sprintf (BgColor,"COLOR%u",Gbl.RowEvenOdd);
/* Put green tip if degree type has degrees */
fprintf (Gbl.F.Out,"<tr>"
"<td style=\"background-color:%s;\">"
"<td class=\"%s\">"
"<img src=\"%s/%s16x16.gif\""
" alt=\"%s\" title=\"%s\" class=\"ICON16x16\" />"
"</td>",
@ -1097,15 +1098,13 @@ static void Deg_ListDegreeTypesForSeeing (void)
Txt_TYPES_OF_DEGREE_Without_degrees);
/* Name of degree type */
fprintf (Gbl.F.Out,"<td class=\"DAT LEFT_MIDDLE\""
" style=\"background-color:%s;\">"
fprintf (Gbl.F.Out,"<td class=\"DAT LEFT_MIDDLE %s\">"
"%s"
"</td>",
BgColor,Gbl.Degs.DegTypes.Lst[NumDegTyp].DegTypName);
/* Direct log in is allowed for this degree type? */
fprintf (Gbl.F.Out,"<td class=\"CENTER_MIDDLE\""
" style=\"background-color:%s;\">"
fprintf (Gbl.F.Out,"<td class=\"CENTER_MIDDLE %s\">"
"<img src=\"%s/%s16x16.gif\""
" alt=\"%s\" title=\"%s\" class=\"ICON16x16\" />"
"</td>",
@ -1119,8 +1118,7 @@ static void Deg_ListDegreeTypesForSeeing (void)
Txt_Direct_authentication_not_allowed);
/* Number of degrees of this type */
fprintf (Gbl.F.Out,"<td class=\"DAT CENTER_MIDDLE\""
" style=\"background-color:%s;\">"
fprintf (Gbl.F.Out,"<td class=\"DAT CENTER_MIDDLE %s\">"
"%u"
"</td>"
"</tr>",
@ -1244,7 +1242,7 @@ static void Deg_ListOneDegreeForSeeing (struct Degree *Deg,unsigned NumDeg)
extern const char *Txt_DEGREE_STATUS[Deg_NUM_STATUS_TXT];
struct DegreeType DegTyp;
const char *TxtClass;
const char *BgColor;
char BgColor[32];
Crs_StatusTxt_t StatusTxt;
/***** Get data of type of degree of this degree *****/
@ -1254,13 +1252,14 @@ static void Deg_ListOneDegreeForSeeing (struct Degree *Deg,unsigned NumDeg)
TxtClass = (Deg->Status & Deg_STATUS_BIT_PENDING) ? "DAT_LIGHT" :
"DAT";
BgColor = (Deg->DegCod == Gbl.CurrentDeg.Deg.DegCod) ? VERY_LIGHT_BLUE :
Gbl.ColorRows[Gbl.RowEvenOdd];
if (Deg->DegCod == Gbl.CurrentDeg.Deg.DegCod)
strcpy (BgColor,"VERY_LIGHT_BLUE");
else
sprintf (BgColor,"COLOR%u",Gbl.RowEvenOdd);
/***** Put green tip if degree has courses *****/
fprintf (Gbl.F.Out,"<tr>"
"<td class=\"CENTER_MIDDLE\""
" style=\"background-color:%s;\">"
"<td class=\"CENTER_MIDDLE %s\">"
"<img src=\"%s/%s16x16.gif\""
" alt=\"%s\" title=\"%s\" class=\"ICON16x16\" />"
"</td>",
@ -1274,16 +1273,14 @@ static void Deg_ListOneDegreeForSeeing (struct Degree *Deg,unsigned NumDeg)
Txt_DEGREE_Without_courses);
/***** Number of degree in this list *****/
fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_MIDDLE\""
" style=\"background-color:%s;\">"
fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_MIDDLE %s\">"
"%u"
"</td>",
TxtClass,BgColor,
NumDeg);
/***** Degree logo *****/
fprintf (Gbl.F.Out,"<td class=\"CENTER_MIDDLE\""
" style=\"background-color:%s;\">"
fprintf (Gbl.F.Out,"<td class=\"CENTER_MIDDLE %s\">"
"<a href=\"%s\" title=\"%s\" target=\"_blank\">",
BgColor,
Deg->WWW,Deg->FullName);
@ -1293,8 +1290,7 @@ static void Deg_ListOneDegreeForSeeing (struct Degree *Deg,unsigned NumDeg)
"</td>");
/* Degree full name */
fprintf (Gbl.F.Out,"<td class=\"%s LEFT_MIDDLE\""
" style=\"background-color:%s;\">",
fprintf (Gbl.F.Out,"<td class=\"%s LEFT_MIDDLE %s\">",
TxtClass,BgColor);
Act_FormGoToStart (ActSeeDegInf);
Deg_PutParamDegCod (Deg->DegCod);
@ -1305,29 +1301,25 @@ static void Deg_ListOneDegreeForSeeing (struct Degree *Deg,unsigned NumDeg)
fprintf (Gbl.F.Out,"</td>");
/* Type of degree */
fprintf (Gbl.F.Out,"<td class=\"%s LEFT_MIDDLE\""
" style=\"background-color:%s;\">"
fprintf (Gbl.F.Out,"<td class=\"%s LEFT_MIDDLE %s\">"
"%s"
"</td>",
TxtClass,BgColor,DegTyp.DegTypName);
/* Degree first year */
fprintf (Gbl.F.Out,"<td class=\"%s CENTER_MIDDLE\""
" style=\"background-color:%s;\">"
fprintf (Gbl.F.Out,"<td class=\"%s CENTER_MIDDLE %s\">"
"%u"
"</td>",
TxtClass,BgColor,Deg->FirstYear);
/* Degree last year */
fprintf (Gbl.F.Out,"<td class=\"%s CENTER_MIDDLE\""
" style=\"background-color:%s;\">"
fprintf (Gbl.F.Out,"<td class=\"%s CENTER_MIDDLE %s\">"
"%u"
"</td>",
TxtClass,BgColor,Deg->LastYear);
/* Degree optional year */
fprintf (Gbl.F.Out,"<td class=\"CENTER_MIDDLE\""
" style=\"background-color:%s;\">"
fprintf (Gbl.F.Out,"<td class=\"CENTER_MIDDLE %s\">"
"<img src=\"%s/%s16x16.gif\""
" alt=\"%s\" title=\"%s\" class=\"ICON16x16\" />"
"</td>",
@ -1341,16 +1333,14 @@ static void Deg_ListOneDegreeForSeeing (struct Degree *Deg,unsigned NumDeg)
Txt_DEGREE_Without_year_for_optional_courses);
/* Current number of courses in this degree */
fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_MIDDLE\""
" style=\"background-color:%s;\">"
fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_MIDDLE %s\">"
"%u"
"</td>",
TxtClass,BgColor,Deg->NumCourses);
/* Degree status */
StatusTxt = Deg_GetStatusTxtFromStatusBits (Deg->Status);
fprintf (Gbl.F.Out,"<td class=\"%s LEFT_MIDDLE\""
" style=\"background-color:%s;\">"
fprintf (Gbl.F.Out,"<td class=\"%s LEFT_MIDDLE %s\">"
"%s"
"</td>"
"</tr>",

View File

@ -10934,7 +10934,7 @@ static void Brw_WriteRowDocData (unsigned *NumDocsNotHidden,MYSQL_ROW row)
const char *CtrShortName;
const char *DegShortName;
const char *CrsShortName;
const char *BgColor;
char BgColor[32];
const char *Title;
char PathUntilFileName[PATH_MAX+1];
char FileName[NAME_MAX+1];
@ -10978,21 +10978,20 @@ static void Brw_WriteRowDocData (unsigned *NumDocsNotHidden,MYSQL_ROW row)
GrpCod = Str_ConvertStrCodToLongCod (row[10]);
/***** Set row color *****/
BgColor = Gbl.ColorRows[Gbl.RowEvenOdd];
if (CrsCod > 0 && CrsCod == Gbl.CurrentCrs.Crs.CrsCod)
BgColor = VERY_LIGHT_BLUE;
strcpy (BgColor,"VERY_LIGHT_BLUE");
else
sprintf (BgColor,"COLOR%u",Gbl.RowEvenOdd);
/***** Write number of document in this search *****/
fprintf (Gbl.F.Out,"<tr>"
"<td class=\"DAT RIGHT_TOP\""
" style=\"background-color:%s;\">"
"<td class=\"DAT RIGHT_TOP %s\">"
"%u"
"</td>",
BgColor,++(*NumDocsNotHidden));
/***** Write institution logo, institution short name *****/
fprintf (Gbl.F.Out,"<td class=\"DAT LEFT_TOP\""
" style=\"background-color:%s;\">",
fprintf (Gbl.F.Out,"<td class=\"DAT LEFT_TOP %s\">",
BgColor);
if (InsCod > 0)
{
@ -11008,8 +11007,7 @@ static void Brw_WriteRowDocData (unsigned *NumDocsNotHidden,MYSQL_ROW row)
fprintf (Gbl.F.Out,"</td>");
/***** Write centre logo, centre short name *****/
fprintf (Gbl.F.Out,"<td class=\"DAT LEFT_TOP\""
" style=\"background-color:%s;\">",
fprintf (Gbl.F.Out,"<td class=\"DAT LEFT_TOP %s\">",
BgColor);
if (CtrCod > 0)
{
@ -11025,8 +11023,7 @@ static void Brw_WriteRowDocData (unsigned *NumDocsNotHidden,MYSQL_ROW row)
fprintf (Gbl.F.Out,"</td>");
/***** Write degree logo, degree short name *****/
fprintf (Gbl.F.Out,"<td class=\"DAT LEFT_TOP\""
" style=\"background-color:%s;\">",
fprintf (Gbl.F.Out,"<td class=\"DAT LEFT_TOP %s\">",
BgColor);
if (DegCod > 0)
{
@ -11042,8 +11039,7 @@ static void Brw_WriteRowDocData (unsigned *NumDocsNotHidden,MYSQL_ROW row)
fprintf (Gbl.F.Out,"</td>");
/***** Write course short name *****/
fprintf (Gbl.F.Out,"<td class=\"DAT LEFT_TOP\""
" style=\"background-color:%s;\">",
fprintf (Gbl.F.Out,"<td class=\"DAT LEFT_TOP %s\">",
BgColor);
if (CrsCod > 0)
{
@ -11090,8 +11086,7 @@ static void Brw_WriteRowDocData (unsigned *NumDocsNotHidden,MYSQL_ROW row)
Title = "";
break;
}
fprintf (Gbl.F.Out,"<td class=\"DAT LEFT_TOP\""
" style=\"background-color:%s;\">"
fprintf (Gbl.F.Out,"<td class=\"DAT LEFT_TOP %s\">"
"%s"
"</td>",
BgColor,Title);
@ -11103,8 +11098,7 @@ static void Brw_WriteRowDocData (unsigned *NumDocsNotHidden,MYSQL_ROW row)
Brw_LimitLengthFileNameToShow (FileMetadata.FileType,FileName,FileNameToShow);
/***** Write file name using path (row[1]) *****/
fprintf (Gbl.F.Out,"<td class=\"DAT_N LEFT_TOP\""
" style=\"background-color:%s;\">",
fprintf (Gbl.F.Out,"<td class=\"DAT_N LEFT_TOP %s\">",
BgColor);
/* Start form */

View File

@ -98,7 +98,7 @@ void Ins_SeeInsWithPendingCtrs (void)
unsigned NumInss;
unsigned NumIns;
struct Institution Ins;
const char *BgColor;
char BgColor[32];
/***** Get institutions with pending centres *****/
switch (Gbl.Usrs.Me.LoggedRole)
@ -151,16 +151,17 @@ void Ins_SeeInsWithPendingCtrs (void)
/* Get institution code (row[0]) */
Ins.InsCod = Str_ConvertStrCodToLongCod (row[0]);
BgColor = (Ins.InsCod == Gbl.CurrentIns.Ins.InsCod) ? VERY_LIGHT_BLUE :
Gbl.ColorRows[Gbl.RowEvenOdd];
if (Ins.InsCod == Gbl.CurrentIns.Ins.InsCod)
strcpy (BgColor,"VERY_LIGHT_BLUE");
else
sprintf (BgColor,"COLOR%u",Gbl.RowEvenOdd);
/* Get data of institution */
Ins_GetDataOfInstitutionByCod (&Ins,Ins_GET_MINIMAL_DATA);
/* Institution logo */
fprintf (Gbl.F.Out,"<tr>"
"<td class=\"CENTER_MIDDLE\""
" style=\"background-color:%s;\">"
"<td class=\"CENTER_MIDDLE %s\">"
"<a href=\"%s\" title=\"%s\" class=\"DAT\" target=\"_blank\">",
BgColor,Ins.WWW,Ins.FullName);
Log_DrawLogo (Sco_SCOPE_INS,Ins.InsCod,Ins.ShortName,
@ -169,8 +170,7 @@ void Ins_SeeInsWithPendingCtrs (void)
"</td>");
/* Institution full name */
fprintf (Gbl.F.Out,"<td class=\"LEFT_MIDDLE\""
" style=\"background-color:%s;\">",
fprintf (Gbl.F.Out,"<td class=\"LEFT_MIDDLE %s\">",
BgColor);
Act_FormGoToStart (ActSeeCtr);
Ins_PutParamInsCod (Ins.InsCod);
@ -182,8 +182,7 @@ void Ins_SeeInsWithPendingCtrs (void)
fprintf (Gbl.F.Out,"</td>");
/* Number of pending centres (row[1]) */
fprintf (Gbl.F.Out,"<td class=\"DAT RIGHT_MIDDLE\""
" style=\"background-color:%s;\">"
fprintf (Gbl.F.Out,"<td class=\"DAT RIGHT_MIDDLE %s\">"
"%s"
"</td>"
"</tr>",
@ -511,26 +510,27 @@ static void Ins_ListOneInstitutionForSeeing (struct Institution *Ins,unsigned Nu
extern const char *Txt_Go_to_X;
extern const char *Txt_INSTITUTION_STATUS[Ins_NUM_STATUS_TXT];
const char *TxtClass;
const char *BgColor;
char BgColor[32];
Crs_StatusTxt_t StatusTxt;
TxtClass = (Ins->Status & Ins_STATUS_BIT_PENDING) ? "DAT_LIGHT" :
"DAT";
BgColor = (Ins->InsCod == Gbl.CurrentIns.Ins.InsCod) ? VERY_LIGHT_BLUE :
Gbl.ColorRows[Gbl.RowEvenOdd];
if (Ins->InsCod == Gbl.CurrentIns.Ins.InsCod)
strcpy (BgColor,"VERY_LIGHT_BLUE");
else
sprintf (BgColor,"COLOR%u",Gbl.RowEvenOdd);
/***** Number of institution in this list *****/
fprintf (Gbl.F.Out,"<tr>"
"<td class=\"%s RIGHT_MIDDLE\""
" style=\"background-color:%s;\">"
"<td class=\"%s RIGHT_MIDDLE %s\">"
"%u"
"</td>",
TxtClass,BgColor,
NumIns);
/***** Icon *****/
fprintf (Gbl.F.Out,"<td class=\"LEFT_MIDDLE\""
" style=\"width:20px; background-color:%s;\">"
fprintf (Gbl.F.Out,"<td class=\"LEFT_MIDDLE %s\""
" style=\"width:20px;\">"
"<a href=\"%s\" target=\"_blank\" title=\"%s\">",
BgColor,
Ins->WWW,Ins->FullName);
@ -540,8 +540,7 @@ static void Ins_ListOneInstitutionForSeeing (struct Institution *Ins,unsigned Nu
"</td>");
/***** Name and link to go to this institution *****/
fprintf (Gbl.F.Out,"<td class=\"%s LEFT_MIDDLE\""
" style=\"background-color:%s;\">",
fprintf (Gbl.F.Out,"<td class=\"%s LEFT_MIDDLE %s\">",
TxtClass,BgColor);
Act_FormGoToStart (ActSeeInsInf);
Ins_PutParamInsCod (Ins->InsCod);
@ -553,41 +552,34 @@ static void Ins_ListOneInstitutionForSeeing (struct Institution *Ins,unsigned Nu
fprintf (Gbl.F.Out,"</td>");
/***** Stats *****/
fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_MIDDLE\""
" style=\"background-color:%s;\">"
fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_MIDDLE %s\">"
"%u"
"</td>",
TxtClass,BgColor,Ins->NumUsrs);
fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_MIDDLE\""
" style=\"background-color:%s;\">"
fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_MIDDLE %s\">"
"%u"
"</td>",
TxtClass,BgColor,Ins->NumStds);
fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_MIDDLE\""
" style=\"background-color:%s;\">"
fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_MIDDLE %s\">"
"%u"
"</td>",
TxtClass,BgColor,Ins->NumTchs);
fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_MIDDLE\""
" style=\"background-color:%s;\">"
fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_MIDDLE %s\">"
"%u"
"</td>",
TxtClass,BgColor,Ins->NumCtrs);
fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_MIDDLE\""
" style=\"background-color:%s;\">"
fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_MIDDLE %s\">"
"%u"
"</td>",
TxtClass,BgColor,Ins->NumDegs);
fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_MIDDLE\""
" style=\"background-color:%s;\">"
fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_MIDDLE %s\">"
"%u"
"</td>",
TxtClass,BgColor,Ins->NumDpts);
/***** Institution status *****/
StatusTxt = Ins_GetStatusTxtFromStatusBits (Ins->Status);
fprintf (Gbl.F.Out,"<td class=\"%s LEFT_MIDDLE\""
" style=\"background-color:%s;\">"
fprintf (Gbl.F.Out,"<td class=\"%s LEFT_MIDDLE %s\">"
"%s"
"</td>"
"</tr>",

View File

@ -2831,11 +2831,10 @@ void Msg_WriteMsgAuthor (struct UsrData *UsrDat,unsigned WidthOfNameColumn,unsig
bool WriteAuthor = false;
/***** Start first column *****/
fprintf (Gbl.F.Out,"<td class=\"%s CENTER_TOP\" style=\"width:24px;",
Style);
fprintf (Gbl.F.Out,"<td class=\"%s CENTER_TOP",Style);
if (BgColor)
fprintf (Gbl.F.Out," background-color:%s;",BgColor);
fprintf (Gbl.F.Out,"\">");
fprintf (Gbl.F.Out," %s",BgColor);
fprintf (Gbl.F.Out,"\" style=\"width:24px;\">");
/***** Write author name or don't write it? *****/
if (Enabled)
@ -2852,11 +2851,10 @@ void Msg_WriteMsgAuthor (struct UsrData *UsrDat,unsigned WidthOfNameColumn,unsig
fprintf (Gbl.F.Out,"</td>");
/***** Second column with user name (if author has a web page, put a link to it) *****/
fprintf (Gbl.F.Out,"<td class=\"%s LEFT_TOP\" style=\"width:%upx;",
Style,WidthOfNameColumn);
fprintf (Gbl.F.Out,"<td class=\"%s LEFT_TOP",Style);
if (BgColor)
fprintf (Gbl.F.Out," background-color:%s;",BgColor);
fprintf (Gbl.F.Out,"\">");
fprintf (Gbl.F.Out," %s",BgColor);
fprintf (Gbl.F.Out,"\" style=\"width:%upx;\">",WidthOfNameColumn);
/* Restrict length of firstname and surnames */
Usr_RestrictLengthAndWriteName (UsrDat,MaxCharsInName);
@ -2867,14 +2865,15 @@ void Msg_WriteMsgAuthor (struct UsrData *UsrDat,unsigned WidthOfNameColumn,unsig
" alt=\"%s\" title=\"%s\""
" class=\"PHOTO24x32\" />"
"</td>"
"<td class=\"%s LEFT_MIDDLE\""
" style=\"width:%upx;",
"<td class=\"%s LEFT_MIDDLE",
Gbl.Prefs.IconsURL,
Txt_Unknown_or_without_photo,Txt_Unknown_or_without_photo,
Style,WidthOfNameColumn);
Style);
if (BgColor)
fprintf (Gbl.F.Out," background-color:%s;",BgColor);
fprintf (Gbl.F.Out,"\">&nbsp;");
fprintf (Gbl.F.Out," %s",BgColor);
fprintf (Gbl.F.Out,"\" style=\"width:%upx;\">"
"&nbsp;",
WidthOfNameColumn);
}
/***** End seconf column *****/

View File

@ -105,7 +105,7 @@ static void Syl_LoadToMemory (Inf_InfoType_t InfoType);
static void Syl_ShowSyllabus (Inf_InfoType_t InfoType);
static void Syl_ShowRowSyllabus (Inf_InfoType_t InfoType,unsigned NumItem,int Level,int *CodItem,const char *Text,bool NewItem);
static void Syl_WriteSyllabusIntoHTMLTmpFile (Inf_InfoType_t InfoType,FILE *FileHTMLTmp);
static void Syl_PutFormItemSyllabus (Inf_InfoType_t InfoType,bool NewItem,unsigned NumItem,int Level,int *CodItem,const char *Text,const char *Color);
static void Syl_PutFormItemSyllabus (Inf_InfoType_t InfoType,bool NewItem,unsigned NumItem,int Level,int *CodItem,const char *Text);
/*****************************************************************************/
/******************** Get parameter to select a syllabus *********************/
@ -681,8 +681,7 @@ static void Syl_ShowRowSyllabus (Inf_InfoType_t InfoType,unsigned NumItem,int Le
}
if (Gbl.CurrentCrs.Syllabus.EditionIsActive)
Syl_PutFormItemSyllabus (InfoType,NewItem,NumItem,Level,CodItem,Text,
Gbl.ColorRows[Gbl.RowEvenOdd]);
Syl_PutFormItemSyllabus (InfoType,NewItem,NumItem,Level,CodItem,Text);
else
{
/***** Indent depending on the level *****/
@ -868,7 +867,7 @@ static void Syl_WriteSyllabusIntoHTMLTmpFile (Inf_InfoType_t InfoType,FILE *File
/*************** Show a form to modify an item of the syllabus ***************/
/*****************************************************************************/
static void Syl_PutFormItemSyllabus (Inf_InfoType_t InfoType,bool NewItem,unsigned NumItem,int Level,int *CodItem,const char *Text,const char *BgColor)
static void Syl_PutFormItemSyllabus (Inf_InfoType_t InfoType,bool NewItem,unsigned NumItem,int Level,int *CodItem,const char *Text)
{
extern const char *Txt_Enter_a_new_item_here;
@ -877,21 +876,21 @@ static void Syl_PutFormItemSyllabus (Inf_InfoType_t InfoType,bool NewItem,unsign
/***** Indent depending on the level *****/
if (Level > 1)
fprintf (Gbl.F.Out,"<td colspan=\"%d\" style=\"background-color:%s;\">"
fprintf (Gbl.F.Out,"<td colspan=\"%d\" class=\"COLOR%u\">"
"</td>",
Level - 1,BgColor);
Level - 1,Gbl.RowEvenOdd);
/***** Write the code of the item *****/
if (NewItem) // If the item is new (not stored in the file) ==> it has not a number
fprintf (Gbl.F.Out,"<td style=\"width:%dpx; background-color:%s;\">"
fprintf (Gbl.F.Out,"<td class=\"COLOR%u\" style=\"width:%dpx;\">"
"</td>",
Level * Syl_WIDTH_NUM_SYLLABUS,BgColor);
Gbl.RowEvenOdd,Level * Syl_WIDTH_NUM_SYLLABUS);
else
{
fprintf (Gbl.F.Out,"<td class=\"%s LEFT_MIDDLE\""
" style=\"width:%dpx; background-color:%s;\">",
StyleSyllabus[Level],
Level * Syl_WIDTH_NUM_SYLLABUS,BgColor);
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)
fprintf (Gbl.F.Out,"&nbsp;");
Syl_WriteNumItem (NULL,Gbl.F.Out,Level,CodItem);
@ -899,9 +898,8 @@ static void Syl_PutFormItemSyllabus (Inf_InfoType_t InfoType,bool NewItem,unsign
}
/***** Text of the item *****/
fprintf (Gbl.F.Out,"<td colspan=\"%d LEFT_MIDDLE\""
" style=\"background-color:%s;\">",
LstItemsSyllabus.NumLevels - Level + 1,BgColor);
fprintf (Gbl.F.Out,"<td colspan=\"%d LEFT_MIDDLE COLOR%u\">",
LstItemsSyllabus.NumLevels - Level + 1,Gbl.RowEvenOdd);
Act_FormStart (NewItem ? (InfoType == Inf_LECTURES ? ActInsIteSylLec :
ActInsIteSylPra) :
(InfoType == Inf_LECTURES ? ActModIteSylLec :

View File

@ -2677,7 +2677,7 @@ void Usr_WriteRowStdMainData (unsigned NumUsr,struct UsrData *UsrDat,bool PutChe
{
extern const char *Txt_Enrollment_confirmed;
extern const char *Txt_Enrollment_not_confirmed;
const char *BgColor;
char BgColor[32];
char PhotoURL[PATH_MAX+1];
bool ShowPhoto;
bool UsrIsTheMsgSender = false;
@ -2694,13 +2694,13 @@ void Usr_WriteRowStdMainData (unsigned NumUsr,struct UsrData *UsrDat,bool PutChe
if (PutCheckBoxToSelectUsr)
UsrIsTheMsgSender = (UsrDat->UsrCod == Gbl.Usrs.Other.UsrDat.UsrCod);
// Two colors are used alternatively to better distinguish the rows
BgColor = UsrIsTheMsgSender ? LIGHT_GREEN :
Gbl.ColorRows[Gbl.RowEvenOdd];
if (UsrIsTheMsgSender)
strcpy (BgColor,"LIGHT_GREEN");
else
sprintf (BgColor,"COLOR%u",Gbl.RowEvenOdd);
if (PutCheckBoxToSelectUsr)
{
fprintf (Gbl.F.Out,"<td class=\"CENTER_MIDDLE\""
" style=\"background-color:%s;\">",
BgColor);
fprintf (Gbl.F.Out,"<td class=\"CENTER_MIDDLE %s\">",BgColor);
Usr_PutCheckboxToSelectUser (Rol_STUDENT,UsrDat->EncryptedUsrCod,UsrIsTheMsgSender);
fprintf (Gbl.F.Out,"</td>");
}
@ -2725,8 +2725,7 @@ void Usr_WriteRowStdMainData (unsigned NumUsr,struct UsrData *UsrDat,bool PutChe
Txt_Enrollment_not_confirmed);
/***** Write number of student in the list *****/
fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_MIDDLE\""
" style=\"background-color:%s;\">"
fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_MIDDLE %s\">"
"&nbsp;%u&nbsp;"
"</td>",
UsrDat->Accepted ? "DAT_SMALL_N" :
@ -2737,9 +2736,7 @@ void Usr_WriteRowStdMainData (unsigned NumUsr,struct UsrData *UsrDat,bool PutChe
if (Gbl.Usrs.Listing.WithPhotos)
{
/***** Show student's photo *****/
fprintf (Gbl.F.Out,"<td class=\"LEFT_MIDDLE\""
" style=\"background-color:%s;\">",
BgColor);
fprintf (Gbl.F.Out,"<td class=\"LEFT_MIDDLE %s\">",BgColor);
ShowPhoto = Pho_ShowUsrPhotoIsAllowed (UsrDat,PhotoURL);
Pho_ShowUsrPhoto (UsrDat,ShowPhoto ? PhotoURL :
NULL,
@ -2751,8 +2748,7 @@ void Usr_WriteRowStdMainData (unsigned NumUsr,struct UsrData *UsrDat,bool PutChe
Usr_RestrictLengthMainData (ShowEmail,UsrDat,MailLink);
/****** Write user's ID ******/
fprintf (Gbl.F.Out,"<td class=\"%s LEFT_MIDDLE\""
" style=\"background-color:%s;\">",
fprintf (Gbl.F.Out,"<td class=\"%s LEFT_MIDDLE %s\">",
UsrDat->Accepted ? "DAT_SMALL_N" :
"DAT_SMALL",
BgColor);
@ -2996,10 +2992,10 @@ static void Usr_WriteRowTchMainData (unsigned NumUsr,struct UsrData *UsrDat,bool
{
extern const char *Txt_Enrollment_confirmed;
extern const char *Txt_Enrollment_not_confirmed;
const char *BgColor;
char BgColor[32];
char PhotoURL[PATH_MAX+1];
bool ShowPhoto;
bool UsrIsTheMsgSender = false;
bool UsrIsTheMsgSender;
char MailLink[7+Usr_MAX_BYTES_USR_EMAIL+1]; // mailto:mail_address
struct Institution Ins;
bool ShowEmail = UsrDat->Accepted ||
@ -3010,15 +3006,15 @@ static void Usr_WriteRowTchMainData (unsigned NumUsr,struct UsrData *UsrDat,bool
fprintf (Gbl.F.Out,"<tr>");
/***** Checkbox to select user *****/
if (PutCheckBoxToSelectUsr)
UsrIsTheMsgSender = (UsrDat->UsrCod == Gbl.Usrs.Other.UsrDat.UsrCod);
BgColor = UsrIsTheMsgSender ? LIGHT_GREEN :
Gbl.ColorRows[Gbl.RowEvenOdd]; // Two colors are used alternatively to better distinguish the rows
UsrIsTheMsgSender = PutCheckBoxToSelectUsr &&
(UsrDat->UsrCod == Gbl.Usrs.Other.UsrDat.UsrCod);
if (UsrIsTheMsgSender)
strcpy (BgColor,"LIGHT_GREEN");
else
sprintf (BgColor,"COLOR%u",Gbl.RowEvenOdd); // Two colors are used alternatively to better distinguish the rows
if (PutCheckBoxToSelectUsr)
{
fprintf (Gbl.F.Out,"<td class=\"CENTER_MIDDLE\""
" style=\"background-color:%s;\">",
BgColor);
fprintf (Gbl.F.Out,"<td class=\"CENTER_MIDDLE %s\">",BgColor);
Usr_PutCheckboxToSelectUser (Rol_TEACHER,UsrDat->EncryptedUsrCod,UsrIsTheMsgSender);
fprintf (Gbl.F.Out,"</td>");
}
@ -3043,8 +3039,7 @@ static void Usr_WriteRowTchMainData (unsigned NumUsr,struct UsrData *UsrDat,bool
Txt_Enrollment_not_confirmed);
/***** Write number of user *****/
fprintf (Gbl.F.Out,"<td class=\"DAT_SMALL_N RIGHT_MIDDLE\""
" style=\"background-color:%s;\">"
fprintf (Gbl.F.Out,"<td class=\"DAT_SMALL_N RIGHT_MIDDLE %s\">"
"&nbsp;%u&nbsp;"
"</td>",
BgColor,NumUsr);
@ -3052,9 +3047,7 @@ static void Usr_WriteRowTchMainData (unsigned NumUsr,struct UsrData *UsrDat,bool
if (Gbl.Usrs.Listing.WithPhotos)
{
/***** Show teacher's photo *****/
fprintf (Gbl.F.Out,"<td class=\"LEFT_MIDDLE\""
" style=\"background-color:%s;\">",
BgColor);
fprintf (Gbl.F.Out,"<td class=\"LEFT_MIDDLE %s\">",BgColor);
ShowPhoto = Pho_ShowUsrPhotoIsAllowed (UsrDat,PhotoURL);
Pho_ShowUsrPhoto (UsrDat,ShowPhoto ? PhotoURL :
NULL,
@ -3066,8 +3059,7 @@ static void Usr_WriteRowTchMainData (unsigned NumUsr,struct UsrData *UsrDat,bool
Usr_RestrictLengthMainData (ShowEmail,UsrDat,MailLink);
/****** Write the user's ID ******/
fprintf (Gbl.F.Out,"<td class=\"%s LEFT_MIDDLE\""
" style=\"background-color:%s;\">",
fprintf (Gbl.F.Out,"<td class=\"%s LEFT_MIDDLE %s\">",
UsrDat->Accepted ? "DAT_SMALL_N" :
"DAT_SMALL",
BgColor);
@ -3282,8 +3274,7 @@ static void Usr_WriteMainUsrDataExceptUsrID (struct UsrData *UsrDat,const char *
static void Usr_WriteUsrData (const char *BgColor,const char *Data,const char *Link,bool NonBreak,bool Accepted)
{
fprintf (Gbl.F.Out,"<td class=\"%s LEFT_MIDDLE\""
" style=\"background-color:%s;\">",
fprintf (Gbl.F.Out,"<td class=\"%s LEFT_MIDDLE %s\">",
Accepted ? (NonBreak ? "DAT_SMALL_NOBR_N" :
"DAT_SMALL_N") :
(NonBreak ? "DAT_SMALL_NOBR" :