Version 14.125

This commit is contained in:
Antonio Cañas Vargas 2015-09-03 00:59:03 +02:00
parent a7974f0be9
commit 65718d4e7b
18 changed files with 194 additions and 246 deletions

View File

@ -836,6 +836,10 @@ a:hover img.CENTRE_PHOTO_SHOW
.RIGHT_MIDDLE {text-align:right; vertical-align:middle;}
.RIGHT_BOTTOM {text-align:right; vertical-align:bottom;}
/************************** Lists with alternating colors ********************/
.COLOR0 {background-color:#F4F2EA;}
.COLOR1 {background-color:#FBFAF7;}
/********************************* Course info *******************************/
#crs_info
{

View File

@ -645,6 +645,10 @@ a:hover img.CENTRE_PHOTO_SHOW
.RIGHT_MIDDLE {text-align:right; vertical-align:middle;}
.RIGHT_BOTTOM {text-align:right; vertical-align:bottom;}
/************************** Lists with alternating colors ********************/
.COLOR0 {background-color:#F4F2EA;}
.COLOR1 {background-color:#FBFAF7;}
/********************************* Course info *******************************/
#crs_info
{

View File

@ -163,7 +163,7 @@ void Ann_ShowMyAnnouncementsNotMarkedAsSeen (void)
/***** Show the announcements *****/
if (NumAnnouncements)
{
fprintf (Gbl.F.Out,"<div style=\"text-align:center;\">");
fprintf (Gbl.F.Out,"<div class=\"CENTER_MIDDLE\">");
for (NumAnn = 0;
NumAnn < NumAnnouncements;
@ -220,7 +220,7 @@ static void Ann_ShowAnnouncement (long AnnCod,const char *Subject,const char *Co
Content);
/***** Write form *****/
fprintf (Gbl.F.Out,"<div style=\"text-align:center; margin:10px;\">");
fprintf (Gbl.F.Out,"<div class=\"CENTER_MIDDLE\" style=\"margin:10px;\">");
if (ShowAllAnnouncements)
{

View File

@ -239,8 +239,7 @@ static void Asg_ShowOneAssignment (long AsgCod)
/***** Write first row of data of this assignment *****/
/* Start date/time */
fprintf (Gbl.F.Out,"<tr>"
"<td class=\"%s LEFT_TOP\""
" style=\"background-color:%s;\">"
"<td class=\"%s LEFT_TOP COLOR%u\">"
"%02u/%02u/%02u<br />"
"%02u:%02u h"
"</td>",
@ -248,7 +247,7 @@ static void Asg_ShowOneAssignment (long AsgCod)
"DATE_RED_LIGHT") :
(Asg.Open ? "DATE_GREEN" :
"DATE_RED"),
Gbl.ColorRows[Gbl.RowEvenOdd],
Gbl.RowEvenOdd,
Asg.DateTimes[Asg_START_TIME].Date.Day,
Asg.DateTimes[Asg_START_TIME].Date.Month,
Asg.DateTimes[Asg_START_TIME].Date.Year % 100,
@ -256,8 +255,7 @@ static void Asg_ShowOneAssignment (long AsgCod)
Asg.DateTimes[Asg_START_TIME].Time.Minute);
/* End date/time */
fprintf (Gbl.F.Out,"<td class=\"%s LEFT_TOP\""
" style=\"background-color:%s;\">"
fprintf (Gbl.F.Out,"<td class=\"%s LEFT_TOP COLOR%u\">"
"%02u/%02u/%02u<br />"
"%02u:%02u h"
"</td>",
@ -265,7 +263,7 @@ static void Asg_ShowOneAssignment (long AsgCod)
"DATE_RED_LIGHT") :
(Asg.Open ? "DATE_GREEN" :
"DATE_RED"),
Gbl.ColorRows[Gbl.RowEvenOdd],
Gbl.RowEvenOdd,
Asg.DateTimes[Asg_END_TIME].Date.Day,
Asg.DateTimes[Asg_END_TIME].Date.Month,
Asg.DateTimes[Asg_END_TIME].Date.Year % 100,
@ -273,24 +271,23 @@ static void Asg_ShowOneAssignment (long AsgCod)
Asg.DateTimes[Asg_END_TIME].Time.Minute);
/* Assignment title */
fprintf (Gbl.F.Out,"<td class=\"LEFT_TOP\" style=\"background-color:%s;\">"
fprintf (Gbl.F.Out,"<td class=\"LEFT_TOP COLOR%u\">"
"<div class=\"%s\">%s</div>",
Gbl.ColorRows[Gbl.RowEvenOdd],
Gbl.RowEvenOdd,
Asg.Hidden ? "ASG_TITLE_LIGHT" :
"ASG_TITLE",
Asg.Title);
fprintf (Gbl.F.Out,"</td>");
/* Send work? */
fprintf (Gbl.F.Out,"<td rowspan=\"2\" class=\"%s CENTER_TOP\""
" style=\"background-color:%s;\">"
fprintf (Gbl.F.Out,"<td rowspan=\"2\" class=\"%s CENTER_TOP COLOR%u\">"
"<img src=\"%s/%s16x16.gif\""
" alt=\"%s\" title=\"%s\" class=\"ICON16x16\" />"
"<br />%s"
"</td>",
(Asg.SendWork == Asg_SEND_WORK) ? "DAT_N" :
"DAT",
Gbl.ColorRows[Gbl.RowEvenOdd],
Gbl.RowEvenOdd,
Gbl.Prefs.IconsURL,
(Asg.SendWork == Asg_SEND_WORK) ? "file_on" :
"file_off",
@ -300,18 +297,16 @@ static void Asg_ShowOneAssignment (long AsgCod)
Txt_No);
/* Assignment folder */
fprintf (Gbl.F.Out,"<td rowspan=\"2\" class=\"LEFT_TOP\""
" style=\"background-color:%s;\">",
Gbl.ColorRows[Gbl.RowEvenOdd]);
fprintf (Gbl.F.Out,"<td rowspan=\"2\" class=\"LEFT_TOP COLOR%u\">",
Gbl.RowEvenOdd);
Asg_WriteAssignmentFolder (&Asg);
fprintf (Gbl.F.Out,"</td>"
"</tr>");
/***** Write second row of data of this assignment *****/
fprintf (Gbl.F.Out,"<tr>"
"<td colspan=\"2\" class=\"LEFT_TOP\""
" style=\"background-color:%s;\">",
Gbl.ColorRows[Gbl.RowEvenOdd]);
"<td colspan=\"2\" class=\"LEFT_TOP COLOR%u\">",
Gbl.RowEvenOdd);
/* Author of the assignment */
Asg_WriteAsgAuthor (&Asg);
@ -333,8 +328,8 @@ static void Asg_ShowOneAssignment (long AsgCod)
Str_ChangeFormat (Str_FROM_HTML,Str_TO_RIGOROUS_HTML,
Txt,Cns_MAX_BYTES_TEXT,false); // Convert from HTML to recpectful HTML
Str_InsertLinkInURLs (Txt,Cns_MAX_BYTES_TEXT,60); // Insert links
fprintf (Gbl.F.Out,"<td class=\"LEFT_TOP\" style=\"background-color:%s;\">",
Gbl.ColorRows[Gbl.RowEvenOdd]);
fprintf (Gbl.F.Out,"<td class=\"LEFT_TOP COLOR%u\">",
Gbl.RowEvenOdd);
if (Gbl.CurrentCrs.Grps.NumGrps)
Asg_GetAndWriteNamesOfGrpsAssociatedToAsg (&Asg);

View File

@ -266,15 +266,14 @@ static void Att_ShowOneAttEvent (struct AttendanceEvent *Att,bool ShowOnlyThisAt
/***** Start date/time *****/
fprintf (Gbl.F.Out,"<tr>" \
"<td class=\"%s LEFT_TOP\"",
"<td class=\"%s LEFT_TOP",
Att->Hidden ? (Att->Open ? "DATE_GREEN_LIGHT" :
"DATE_RED_LIGHT") :
(Att->Open ? "DATE_GREEN" :
"DATE_RED"));
if (!ShowOnlyThisAttEventComplete)
fprintf (Gbl.F.Out," style=\"background-color:%s;\"",
Gbl.ColorRows[Gbl.RowEvenOdd]);
fprintf (Gbl.F.Out,">"
fprintf (Gbl.F.Out," COLOR%u",Gbl.RowEvenOdd);
fprintf (Gbl.F.Out,"\">"
"%02u/%02u/%02u<br />"
"%02u:%02u h"
"</td>",
@ -285,15 +284,14 @@ static void Att_ShowOneAttEvent (struct AttendanceEvent *Att,bool ShowOnlyThisAt
Att->DateTimes[Att_START_TIME].Time.Minute);
/***** End date/time *****/
fprintf (Gbl.F.Out,"<td class=\"%s LEFT_TOP\"",
fprintf (Gbl.F.Out,"<td class=\"%s LEFT_TOP",
Att->Hidden ? (Att->Open ? "DATE_GREEN_LIGHT" :
"DATE_RED_LIGHT") :
(Att->Open ? "DATE_GREEN" :
"DATE_RED"));
if (!ShowOnlyThisAttEventComplete)
fprintf (Gbl.F.Out," style=\"background-color:%s;\"",
Gbl.ColorRows[Gbl.RowEvenOdd]);
fprintf (Gbl.F.Out,">"
fprintf (Gbl.F.Out," COLOR%u",Gbl.RowEvenOdd);
fprintf (Gbl.F.Out,"\">"
"%02u/%02u/%02u<br />"
"%02u:%02u h"
"</td>",
@ -304,11 +302,10 @@ static void Att_ShowOneAttEvent (struct AttendanceEvent *Att,bool ShowOnlyThisAt
Att->DateTimes[Att_END_TIME ].Time.Minute);
/***** Attendance event title *****/
fprintf (Gbl.F.Out,"<td class=\"LEFT_TOP\"");
fprintf (Gbl.F.Out,"<td class=\"LEFT_TOP");
if (!ShowOnlyThisAttEventComplete)
fprintf (Gbl.F.Out," style=\"background-color:%s;\"",
Gbl.ColorRows[Gbl.RowEvenOdd]);
fprintf (Gbl.F.Out,">");
fprintf (Gbl.F.Out," COLOR%u",Gbl.RowEvenOdd);
fprintf (Gbl.F.Out,"\">");
/* Put form to view attendance event */
Act_FormStart (ActSeeOneAtt);
@ -321,11 +318,10 @@ static void Att_ShowOneAttEvent (struct AttendanceEvent *Att,bool ShowOnlyThisAt
fprintf (Gbl.F.Out,"</td>");
/***** Number of students in this event *****/
fprintf (Gbl.F.Out,"<td class=\"DAT_N RIGHT_TOP\"");
fprintf (Gbl.F.Out,"<td class=\"DAT_N RIGHT_TOP");
if (!ShowOnlyThisAttEventComplete)
fprintf (Gbl.F.Out," style=\"background-color:%s;\"",
Gbl.ColorRows[Gbl.RowEvenOdd]);
fprintf (Gbl.F.Out,">"
fprintf (Gbl.F.Out," COLOR%u",Gbl.RowEvenOdd);
fprintf (Gbl.F.Out,"\">"
"%u"
"</td>"
"</tr>",
@ -333,9 +329,8 @@ static void Att_ShowOneAttEvent (struct AttendanceEvent *Att,bool ShowOnlyThisAt
/***** Write second row of data of this attendance event *****/
fprintf (Gbl.F.Out,"<tr>"
"<td colspan=\"2\" class=\"LEFT_TOP\""
" style=\"background-color:%s;\">",
Gbl.ColorRows[Gbl.RowEvenOdd]);
"<td colspan=\"2\" class=\"LEFT_TOP COLOR%u\">",
Gbl.RowEvenOdd);
/* Author of the attendance event */
Att_WriteAttEventAuthor (Att);
@ -357,9 +352,8 @@ static void Att_ShowOneAttEvent (struct AttendanceEvent *Att,bool ShowOnlyThisAt
Str_ChangeFormat (Str_FROM_HTML,Str_TO_RIGOROUS_HTML,
Txt,Cns_MAX_BYTES_TEXT,false); // Convert from HTML to recpectful HTML
Str_InsertLinkInURLs (Txt,Cns_MAX_BYTES_TEXT,60); // Insert links
fprintf (Gbl.F.Out,"<td colspan=\"2\" class=\"LEFT_TOP\""
" style=\"background-color:%s;\">",
Gbl.ColorRows[Gbl.RowEvenOdd]);
fprintf (Gbl.F.Out,"<td colspan=\"2\" class=\"LEFT_TOP COLOR%u\">",
Gbl.RowEvenOdd);
if (Gbl.CurrentCrs.Grps.NumGrps)
Att_GetAndWriteNamesOfGrpsAssociatedToAttEvent (Att);
@ -2018,20 +2012,17 @@ static void Att_WriteRowStdToCallTheRoll (unsigned NumStd,struct UsrData *UsrDat
extern const char *Txt_Present;
extern const char *Txt_Absent;
bool Present;
const char *BgColor;
char PhotoURL[PATH_MAX+1];
bool ShowPhoto;
char CommentStd[Cns_MAX_BYTES_TEXT+1];
char CommentTch[Cns_MAX_BYTES_TEXT+1];
BgColor = Gbl.ColorRows[Gbl.RowEvenOdd];
/***** Check if this student is already registered in the current event *****/
Present = Att_CheckIfUsrIsPresentInAttEventAndGetComments (Att->AttCod,UsrDat->UsrCod,CommentStd,CommentTch);
/***** Icon to show if the user is already registered *****/
fprintf (Gbl.F.Out,"<tr>"
"<td class=\"BT%d",Gbl.RowEvenOdd);
"<td class=\"BT%u",Gbl.RowEvenOdd);
fprintf (Gbl.F.Out,"\">"
"<img src=\"%s/%s16x16.gif\""
" alt=\"%s\" title=\"%s\" class=\"ICON16x16\" />"
@ -2045,10 +2036,10 @@ static void Att_WriteRowStdToCallTheRoll (unsigned NumStd,struct UsrData *UsrDat
Txt_Absent);
/***** Checkbox to select user *****/
fprintf (Gbl.F.Out,"<td class=\"CENTER_TOP\""
" style=\"background-color:%s;\">"
fprintf (Gbl.F.Out,"<td class=\"CENTER_TOP COLOR%u\">"
"<input type=\"checkbox\" name=\"UsrCodStd\" value=\"%s\"",
BgColor,UsrDat->EncryptedUsrCod);
Gbl.RowEvenOdd,
UsrDat->EncryptedUsrCod);
if (Present) // This student has attended to the event?
fprintf (Gbl.F.Out," checked=\"checked\"");
if (Gbl.Usrs.Me.LoggedRole == Rol_STUDENT) // A student can not change his attendance
@ -2057,21 +2048,19 @@ static void Att_WriteRowStdToCallTheRoll (unsigned NumStd,struct UsrData *UsrDat
"</td>");
/***** Write number of student in the list *****/
fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_TOP\""
" style=\"background-color:%s;\">"
fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_TOP COLOR%u\">"
"%u"
"</td>",
UsrDat->Accepted ? "DAT_SMALL_N" :
"DAT_SMALL",
BgColor,
Gbl.RowEvenOdd,
NumStd);
/***** Show student's photo *****/
if (Gbl.Usrs.Listing.WithPhotos)
{
fprintf (Gbl.F.Out,"<td class=\"LEFT_TOP\""
" style=\"background-color:%s;\">",
BgColor);
fprintf (Gbl.F.Out,"<td class=\"LEFT_TOP COLOR%u\">",
Gbl.RowEvenOdd);
ShowPhoto = Pho_ShowUsrPhotoIsAllowed (UsrDat,PhotoURL);
Pho_ShowUsrPhoto (UsrDat,ShowPhoto ? PhotoURL :
NULL,
@ -2080,20 +2069,18 @@ static void Att_WriteRowStdToCallTheRoll (unsigned NumStd,struct UsrData *UsrDat
}
/***** Write user's ID ******/
fprintf (Gbl.F.Out,"<td class=\"%s LEFT_TOP\""
" style=\"background-color:%s;\">",
fprintf (Gbl.F.Out,"<td class=\"%s LEFT_TOP COLOR%u\">",
UsrDat->Accepted ? "DAT_SMALL_N" :
"DAT_SMALL",
BgColor);
Gbl.RowEvenOdd);
ID_WriteUsrIDs (UsrDat,true);
fprintf (Gbl.F.Out,"</td>");
/***** Write student's name *****/
fprintf (Gbl.F.Out,"<td class=\"%s LEFT_TOP\""
" style=\"background-color:%s;\">%s",
fprintf (Gbl.F.Out,"<td class=\"%s LEFT_TOP COLOR%u\">%s",
UsrDat->Accepted ? "DAT_SMALL_N" :
"DAT_SMALL",
BgColor,
Gbl.RowEvenOdd,
UsrDat->Surname1);
if (UsrDat->Surname2[0])
fprintf (Gbl.F.Out," %s",UsrDat->Surname2);
@ -2101,9 +2088,8 @@ static void Att_WriteRowStdToCallTheRoll (unsigned NumStd,struct UsrData *UsrDat
UsrDat->FirstName);
/***** Student's comment: write form or text */
fprintf (Gbl.F.Out,"<td class=\"DAT_SMALL LEFT_TOP\""
" style=\"background-color:%s;\">",
BgColor);
fprintf (Gbl.F.Out,"<td class=\"DAT_SMALL LEFT_TOP COLOR%u\">",
Gbl.RowEvenOdd);
if (Gbl.Usrs.Me.LoggedRole == Rol_STUDENT && Att->Open) // Show with form
fprintf (Gbl.F.Out,"<textarea name=\"CommentStd%ld\" cols=\"40\" rows=\"3\">%s</textarea>",
UsrDat->UsrCod,CommentStd);
@ -2116,9 +2102,8 @@ static void Att_WriteRowStdToCallTheRoll (unsigned NumStd,struct UsrData *UsrDat
fprintf (Gbl.F.Out,"</td>");
/***** Teacher's comment: write form, text or nothing */
fprintf (Gbl.F.Out,"<td class=\"DAT_SMALL LEFT_TOP\""
" style=\"background-color:%s;\">",
BgColor);
fprintf (Gbl.F.Out,"<td class=\"DAT_SMALL LEFT_TOP COLOR%u\">",
Gbl.RowEvenOdd);
if (Gbl.Usrs.Me.LoggedRole == Rol_TEACHER) // Show with form
fprintf (Gbl.F.Out,"<textarea name=\"CommentTch%ld\" cols=\"40\" rows=\"3\">%s</textarea>",
UsrDat->UsrCod,CommentTch);
@ -2934,7 +2919,6 @@ static void Att_ListEventsToSelect (void)
extern const char *Txt_ROLES_PLURAL_Abc[Rol_NUM_ROLES][Usr_NUM_SEXS];
extern const char *Txt_Update_attendance_according_to_selected_events;
extern const char *Txt_Update_attendance;
const char *BgColor;
unsigned NumAttEvent;
/***** Start form to update the attendance
@ -2966,46 +2950,40 @@ static void Att_ListEventsToSelect (void)
NumAttEvent < Gbl.AttEvents.Num;
NumAttEvent++)
{
BgColor = Gbl.ColorRows[Gbl.RowEvenOdd];
/* Get data of the attendance event from database */
Att_GetDataOfAttEventByCodAndCheckCrs (&Gbl.AttEvents.Lst[NumAttEvent]);
Att_GetNumStdsTotalWhoAreInAttEvent (&Gbl.AttEvents.Lst[NumAttEvent]);
/* Write a row for this event */
fprintf (Gbl.F.Out,"<tr>"
"<td class=\"DAT CENTER_MIDDLE\""
" style=\"background-color:%s;\">"
"<td class=\"DAT CENTER_MIDDLE COLOR%u\">"
"<input type=\"checkbox\" name=\"AttCods\" value=\"%ld\"",
BgColor,
Gbl.RowEvenOdd,
Gbl.AttEvents.Lst[NumAttEvent].AttCod);
if (Gbl.AttEvents.Lst[NumAttEvent].Selected)
fprintf (Gbl.F.Out," checked=\"checked\"");
fprintf (Gbl.F.Out," />"
"</td>"
"<td class=\"DAT RIGHT_MIDDLE\""
" style=\"background-color:%s;\">"
"<td class=\"DAT RIGHT_MIDDLE COLOR%u\">"
"%u:"
"</td>"
"<td class=\"DAT LEFT_MIDDLE\""
" style=\"background-color:%s;\">"
"<td class=\"DAT LEFT_MIDDLE COLOR%u\">"
"%02u/%02u/%04u %02u:%02u h %s"
"</td>"
"<td class=\"DAT RIGHT_MIDDLE\""
" style=\"background-color:%s;\">"
"<td class=\"DAT RIGHT_MIDDLE COLOR%u\">"
"%u"
"</td>"
"</tr>",
BgColor,
Gbl.RowEvenOdd,
NumAttEvent + 1,
BgColor,
Gbl.RowEvenOdd,
Gbl.AttEvents.Lst[NumAttEvent].DateTimes[Att_START_TIME].Date.Day,
Gbl.AttEvents.Lst[NumAttEvent].DateTimes[Att_START_TIME].Date.Month,
Gbl.AttEvents.Lst[NumAttEvent].DateTimes[Att_START_TIME].Date.Year,
Gbl.AttEvents.Lst[NumAttEvent].DateTimes[Att_START_TIME].Time.Hour,
Gbl.AttEvents.Lst[NumAttEvent].DateTimes[Att_START_TIME].Time.Minute,
Gbl.AttEvents.Lst[NumAttEvent].Title,
BgColor,
Gbl.RowEvenOdd,
Gbl.AttEvents.Lst[NumAttEvent].NumStdsTotal);
Gbl.RowEvenOdd = 1 - Gbl.RowEvenOdd;
@ -3162,32 +3140,28 @@ static void Att_WriteRowStdSeveralAttEvents (unsigned NumStd,struct UsrData *Usr
{
extern const char *Txt_Present;
extern const char *Txt_Absent;
const char *BgColor;
char PhotoURL[PATH_MAX+1];
bool ShowPhoto;
unsigned NumAttEvent;
bool Present;
unsigned NumTimesPresent;
BgColor = Gbl.ColorRows[Gbl.RowEvenOdd];
/***** Write number of student in the list *****/
fprintf (Gbl.F.Out,"<tr>"
"<td class=\"%s RIGHT_MIDDLE\""
" style=\"background-color:%s;\">"
"<td class=\"%s RIGHT_MIDDLE COLOR%u\">"
"%u"
"</td>",
UsrDat->Accepted ? "DAT_SMALL_N" :
"DAT_SMALL",
BgColor,
Gbl.RowEvenOdd,
NumStd + 1);
/***** Show student's photo *****/
if (Gbl.Usrs.Listing.WithPhotos)
{
fprintf (Gbl.F.Out,"<td class=\"LEFT_MIDDLE\""
" style=\"width:18px; background-color:%s;\">",
BgColor);
fprintf (Gbl.F.Out,"<td class=\"LEFT_MIDDLE COLOR%u\""
" style=\"width:18px;\">",
Gbl.RowEvenOdd);
ShowPhoto = Pho_ShowUsrPhotoIsAllowed (UsrDat,PhotoURL);
Pho_ShowUsrPhoto (UsrDat,ShowPhoto ? PhotoURL :
NULL,
@ -3196,21 +3170,19 @@ static void Att_WriteRowStdSeveralAttEvents (unsigned NumStd,struct UsrData *Usr
}
/***** 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 COLOR%u\">",
UsrDat->Accepted ? "DAT_SMALL_N" :
"DAT_SMALL",
BgColor);
Gbl.RowEvenOdd);
ID_WriteUsrIDs (UsrDat,true);
fprintf (Gbl.F.Out,"</td>");
/***** Write student's name *****/
fprintf (Gbl.F.Out,"<td class=\"%s LEFT_MIDDLE\""
" style=\"background-color:%s;\">"
fprintf (Gbl.F.Out,"<td class=\"%s LEFT_MIDDLE COLOR%u\">"
"%s",
UsrDat->Accepted ? "DAT_SMALL_N" :
"DAT_SMALL",
BgColor,
Gbl.RowEvenOdd,
UsrDat->Surname1);
if (UsrDat->Surname2[0])
fprintf (Gbl.F.Out," %s",UsrDat->Surname2);
@ -3227,7 +3199,7 @@ static void Att_WriteRowStdSeveralAttEvents (unsigned NumStd,struct UsrData *Usr
// Here it is not necessary to get comments
Present = Att_CheckIfUsrIsPresentInAttEvent (Gbl.AttEvents.Lst[NumAttEvent].AttCod,UsrDat->UsrCod);
fprintf (Gbl.F.Out,"<td class=\"BM%d\">"
fprintf (Gbl.F.Out,"<td class=\"BM%u\">"
"<img src=\"%s/%s16x16.gif\""
" alt=\"%s\" title=\"%s\" class=\"ICON16x16\" />"
"</td>",
@ -3245,12 +3217,11 @@ static void Att_WriteRowStdSeveralAttEvents (unsigned NumStd,struct UsrData *Usr
}
/***** Last column with the number of times this user is present *****/
fprintf (Gbl.F.Out,"<td class=\"DAT_N RIGHT_MIDDLE\""
" style=\"background-color:%s;\">"
fprintf (Gbl.F.Out,"<td class=\"DAT_N RIGHT_MIDDLE COLOR%u\">"
"%u"
"</td>"
"</tr>",
BgColor,
Gbl.RowEvenOdd,
NumTimesPresent);
Gbl.RowEvenOdd = 1 - Gbl.RowEvenOdd;
@ -3302,7 +3273,6 @@ static void Att_ListAttEventsForAStd (unsigned NumStd,struct UsrData *UsrDat)
extern const char *Txt_Absent;
extern const char *Txt_Student_comment;
extern const char *Txt_Teachers_comment;
const char *BgColor;
char PhotoURL[PATH_MAX+1];
bool ShowPhoto;
unsigned NumAttEvent;
@ -3310,23 +3280,20 @@ static void Att_ListAttEventsForAStd (unsigned NumStd,struct UsrData *UsrDat)
char CommentStd[Cns_MAX_BYTES_TEXT+1];
char CommentTch[Cns_MAX_BYTES_TEXT+1];
BgColor = Gbl.ColorRows[Gbl.RowEvenOdd];
/***** Write number of student in the list *****/
fprintf (Gbl.F.Out,"<tr>"
"<td class=\"%s RIGHT_MIDDLE\""
" style=\"background-color:%s;\">"
"<td class=\"%s RIGHT_MIDDLE COLOR%u\">"
"%u:"
"</td>",
UsrDat->Accepted ? "DAT_SMALL_N" :
"DAT_SMALL",
BgColor,
Gbl.RowEvenOdd,
NumStd + 1);
/***** Show student's photo *****/
fprintf (Gbl.F.Out,"<td class=\"LEFT_MIDDLE\""
" style=\"width:18px; background-color:%s;\">",
BgColor);
fprintf (Gbl.F.Out,"<td class=\"LEFT_MIDDLE COLOR%u\""
" style=\"width:18px;\">",
Gbl.RowEvenOdd);
ShowPhoto = Pho_ShowUsrPhotoIsAllowed (UsrDat,PhotoURL);
Pho_ShowUsrPhoto (UsrDat,ShowPhoto ? PhotoURL :
NULL,
@ -3334,12 +3301,11 @@ static void Att_ListAttEventsForAStd (unsigned NumStd,struct UsrData *UsrDat)
fprintf (Gbl.F.Out,"</td>");
/***** Write user's ID ******/
fprintf (Gbl.F.Out,"<td class=\"LEFT_MIDDLE\""
" style=\"background-color:%s;\">"
fprintf (Gbl.F.Out,"<td class=\"LEFT_MIDDLE COLOR%u\">"
"<table>"
"<tr>"
"<td class=\"%s LEFT_MIDDLE\">",
BgColor,
Gbl.RowEvenOdd,
UsrDat->Accepted ? "DAT_SMALL_N" :
"DAT_SMALL");
ID_WriteUsrIDs (UsrDat,true);
@ -3374,21 +3340,19 @@ static void Att_ListAttEventsForAStd (unsigned NumStd,struct UsrData *UsrDat)
/***** Write a row for this event *****/
fprintf (Gbl.F.Out,"<tr>"
"<td style=\"background-color:%s;\"></td>"
"<td class=\"DAT RIGHT_MIDDLE\""
" style=\"background-color:%s;\">"
"<td class=\"COLOR%u\"></td>"
"<td class=\"DAT RIGHT_MIDDLE COLOR%u\">"
"%u:"
"</td>"
"<td class=\"DAT LEFT_MIDDLE\""
" style=\"background-color:%s;\">"
"<td class=\"DAT LEFT_MIDDLE COLOR%u\">"
"<img src=\"%s/%s16x16.gif\""
" alt=\"%s\" title=\"%s\" class=\"ICON16x16\" />"
" %02u/%02u/%04u %02u:%02u h %s</td>"
"</tr>",
BgColor,
BgColor,
Gbl.RowEvenOdd,
Gbl.RowEvenOdd,
NumAttEvent + 1,
BgColor,
Gbl.RowEvenOdd,
Gbl.Prefs.IconsURL,
Present ? "check" :
"check-empty",
@ -3408,14 +3372,13 @@ static void Att_ListAttEventsForAStd (unsigned NumStd,struct UsrData *UsrDat)
CommentTch[0])
{
fprintf (Gbl.F.Out,"<tr>"
"<td style=\"background-color:%s;\"></td>"
"<td style=\"background-color:%s;\"></td>"
"<td class=\"DAT LEFT_MIDDLE\""
" style=\"background-color:%s;\">"
"<td class=\"COLOR%u\"></td>"
"<td class=\"COLOR%u\"></td>"
"<td class=\"DAT LEFT_MIDDLE COLOR%u\">"
"<dl>",
BgColor,
BgColor,
BgColor);
Gbl.RowEvenOdd,
Gbl.RowEvenOdd,
Gbl.RowEvenOdd);
if (CommentStd[0])
{
Str_ChangeFormat (Str_FROM_HTML,Str_TO_RIGOROUS_HTML,
@ -3428,7 +3391,8 @@ static void Att_ListAttEventsForAStd (unsigned NumStd,struct UsrData *UsrDat)
{
Str_ChangeFormat (Str_FROM_HTML,Str_TO_RIGOROUS_HTML,
CommentTch,Cns_MAX_BYTES_TEXT,false);
fprintf (Gbl.F.Out,"<dt>%s:</dt><dd>%s</dd>",
fprintf (Gbl.F.Out,"<dt>%s:</dt>"
"<dd>%s</dd>",
Txt_Teachers_comment,
CommentTch);
}

View File

@ -103,11 +103,12 @@
/****************************** Public constants *****************************/
/*****************************************************************************/
#define Log_PLATFORM_VERSION "SWAD 14.124.10 (2015/09/02)"
#define Log_PLATFORM_VERSION "SWAD 14.125 (2015/09/03)"
// 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: Sep 03, 2015 Changes in styles. (? lines)
Version 14.124.10:Sep 02, 2015 Changes in styles. (184571 lines)
Version 14.124.9: Sep 02, 2015 Changes in styles. (184584 lines)
Version 14.124.8: Sep 02, 2015 Changes in styles. (184635 lines)

View File

@ -983,7 +983,6 @@ static void Con_ShowConnectedUsrsCurrentCrsOneByOneOnRightColumn (Rol_Role_t Rol
static void Con_WriteRowConnectedUsrOnRightColumn (Rol_Role_t Role)
{
extern const char *Txt_View_record_for_this_course;
const char *Color = Gbl.ColorRows[Gbl.RowEvenOdd];
bool ShowPhoto;
char PhotoURL[PATH_MAX+1];
const char *Font = (Gbl.Usrs.Connected.Lst[Gbl.Usrs.Connected.NumUsr].ThisCrs ? "CON_CRS" :
@ -1002,9 +1001,9 @@ static void Con_WriteRowConnectedUsrOnRightColumn (Rol_Role_t Role)
/***** Show photo *****/
fprintf (Gbl.F.Out,"<tr>"
"<td class=\"LEFT_MIDDLE\""
" style=\"width:18px; background-color:%s;\">",
Color);
"<td class=\"LEFT_MIDDLE COLOR%u\""
" style=\"width:18px;\">",
Gbl.RowEvenOdd);
sprintf (Gbl.FormId,"form_con_%d",++Gbl.NumFormConnectedUsrs);
Act_FormStartId (ActSeePubPrf,Gbl.FormId);
Usr_PutParamUsrCodEncrypted (UsrDat.EncryptedUsrCod);
@ -1018,12 +1017,12 @@ static void Con_WriteRowConnectedUsrOnRightColumn (Rol_Role_t Role)
fprintf (Gbl.F.Out,"</td>");
/***** Write full name and link *****/
fprintf (Gbl.F.Out,"<td class=\"%s LEFT_MIDDLE\""
" style=\"width:54px; background-color:%s;\">",
Font,Color);
fprintf (Gbl.F.Out,"<td class=\"%s LEFT_MIDDLE COLOR%u\""
" style=\"width:54px;\">",
Font,Gbl.RowEvenOdd);
sprintf (Gbl.FormId,"form_con_%d",++Gbl.NumFormConnectedUsrs);
Act_FormStartId ((Role == Rol_STUDENT) ? ActSeeRecOneStd :
ActSeeRecOneTch,
ActSeeRecOneTch,
Gbl.FormId);
Usr_PutParamUsrCodEncrypted (UsrDat.EncryptedUsrCod);
Act_LinkFormSubmitId (Txt_View_record_for_this_course,Font,Gbl.FormId);
@ -1033,9 +1032,9 @@ static void Con_WriteRowConnectedUsrOnRightColumn (Rol_Role_t Role)
fprintf (Gbl.F.Out,"</td>");
/***** Write time from last access *****/
fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_MIDDLE\""
" style=\"width:38px; background-color:%s;\">",
Font,Color);
fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_MIDDLE COLOR%u\""
" style=\"width:38px;\">",
Font,Gbl.RowEvenOdd);
fprintf (Gbl.F.Out,"<div id=\"hm%u\">",
Gbl.Usrs.Connected.NumUsr); // Used for automatic update, only when displayed on right column
@ -1199,9 +1198,9 @@ static void Con_ShowConnectedUsrsCurrentLocationOneByOneOnMainZone (Rol_Role_t R
/***** Show photo *****/
fprintf (Gbl.F.Out,"<tr>"
"<td class=\"LEFT_MIDDLE\""
" style=\"width:18px; background-color:%s;\">",
Gbl.ColorRows[Gbl.RowEvenOdd]);
"<td class=\"LEFT_MIDDLE COLOR%u\""
" style=\"width:18px;\">",
Gbl.RowEvenOdd);
ShowPhoto = Pho_ShowUsrPhotoIsAllowed (&UsrDat,PhotoURL);
Pho_ShowUsrPhoto (&UsrDat,ShowPhoto ? PhotoURL :
NULL,
@ -1209,9 +1208,9 @@ static void Con_ShowConnectedUsrsCurrentLocationOneByOneOnMainZone (Rol_Role_t R
fprintf (Gbl.F.Out,"</td>");
/***** Write full name and link *****/
fprintf (Gbl.F.Out,"<td class=\"%s LEFT_MIDDLE\""
" style=\"width:256px; background-color:%s;\">",
Font,Gbl.ColorRows[Gbl.RowEvenOdd]);
fprintf (Gbl.F.Out,"<td class=\"%s LEFT_MIDDLE COLOR%u\""
" style=\"width:256px;\">",
Font,Gbl.RowEvenOdd);
if (PutLinkToRecord)
{
Act_FormStart ((Role == Rol_STUDENT) ? ActSeeRecOneStd :
@ -1228,9 +1227,9 @@ static void Con_ShowConnectedUsrsCurrentLocationOneByOneOnMainZone (Rol_Role_t R
fprintf (Gbl.F.Out,"</td>");
/***** Write time from last access *****/
fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_MIDDLE\""
" style=\"width:38px; background-color:%s;\">",
Font,Gbl.ColorRows[Gbl.RowEvenOdd]);
fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_MIDDLE COLOR%u\""
" style=\"width:38px;\">",
Font,Gbl.RowEvenOdd);
Hours = Seconds / (60 * 60);
Minutes = (Seconds / 60) % 60;
Seconds %= 60;

View File

@ -3934,22 +3934,20 @@ void Deg_GetAndWriteDegreesAdminBy (long UsrCod,unsigned ColSpan)
{
/***** Indent *****/
fprintf (Gbl.F.Out,"<tr>"
"<td class=\"RIGHT_TOP\""
" style=\"background-color:%s;\">"
"<td class=\"RIGHT_TOP COLOR%u\">"
"<img src=\"%s/%s20x20.gif\""
" alt=\"\" title=\"\""
" style=\"width:20px; height:20px;"
" vertical-align:top;\" />"
"</td>",
Gbl.ColorRows[Gbl.RowEvenOdd],Gbl.Prefs.IconsURL,
Gbl.RowEvenOdd,Gbl.Prefs.IconsURL,
NumRow == NumRows ? "subend" :
"submid");
/***** Write degree *****/
fprintf (Gbl.F.Out,"<td colspan=\"%u\""
" class=\"DAT_SMALL_NOBR LEFT_TOP\""
" style=\"background-color:%s;\">",
ColSpan - 1,Gbl.ColorRows[Gbl.RowEvenOdd]);
" class=\"DAT_SMALL_NOBR LEFT_TOP COLOR%u\">",
ColSpan - 1,Gbl.RowEvenOdd);
/* Get next degree */
row = mysql_fetch_row (mysql_res);

View File

@ -4812,11 +4812,11 @@ static bool Brw_WriteRowFileBrowser (unsigned Level,
/***** Indentation depending on level, icon, and file/folder name *****/
/* Start of the column */
fprintf (Gbl.F.Out,"<td class=\"NO_BR LEFT_TOP\""
" style=\"width:99%%; background-color:%s;\">"
fprintf (Gbl.F.Out,"<td class=\"NO_BR LEFT_TOP COLOR%u\""
" style=\"width:99%%;\">"
"<table>"
"<tr>",
Gbl.ColorRows[Gbl.RowEvenOdd]);
Gbl.RowEvenOdd);
/* Indent depending on level */
if (Level)
@ -4842,7 +4842,7 @@ static bool Brw_WriteRowFileBrowser (unsigned Level,
else
{
/* Icon with file type or link */
fprintf (Gbl.F.Out,"<td class=\"BM%d\">",Gbl.RowEvenOdd);
fprintf (Gbl.F.Out,"<td class=\"BM%u\">",Gbl.RowEvenOdd);
Brw_PutIconFileWithLinkToViewMetadata (16,FileType,PathInTree,FileName,FileNameToShow);
fprintf (Gbl.F.Out,"</td>");
}
@ -4865,7 +4865,7 @@ static bool Brw_WriteRowFileBrowser (unsigned Level,
if (Gbl.Usrs.Me.LoggedRole >= Rol_STUDENT && // Only ZIP folders if I am student, teacher...
!SeeMarks) // Do not ZIP folders when seeing marks
{
fprintf (Gbl.F.Out,"<td class=\"BM%d\">",Gbl.RowEvenOdd);
fprintf (Gbl.F.Out,"<td class=\"BM%u\">",Gbl.RowEvenOdd);
if (FileType == Brw_IS_FOLDER && // If it is a folder
!(SeeDocsZone && RowSetAsHidden)) // When seeing docs, if folder is not hidden (this could happen for Level == 0)
ZIP_PutButtonToDownloadZIPOfAFolder (PathInTree,FileName);
@ -4946,7 +4946,7 @@ static void Brw_PutIconsRemoveCopyPaste (unsigned Level,Brw_FileType_t FileType,
Brw_PutIconPasteOff ();
}
else // File or link. Can't paste in a file or link.
fprintf (Gbl.F.Out,"<td class=\"BM%d\"></td>",Gbl.RowEvenOdd);
fprintf (Gbl.F.Out,"<td class=\"BM%u\"></td>",Gbl.RowEvenOdd);
}
/*****************************************************************************/
@ -4992,7 +4992,7 @@ static void Brw_PutIconRemoveFile (Brw_FileType_t FileType,
{
extern const char *Txt_Remove_FILE_OR_LINK_X;
fprintf (Gbl.F.Out,"<td class=\"BM%d\">",Gbl.RowEvenOdd);
fprintf (Gbl.F.Out,"<td class=\"BM%u\">",Gbl.RowEvenOdd);
if (Gbl.FileBrowser.ICanRemoveFileOrFolder) // Can I remove this file?
{
@ -5036,7 +5036,7 @@ static void Brw_PutIconRemoveDir (const char *PathInTree,const char *FileName,co
{
extern const char *Txt_Remove_folder_X;
fprintf (Gbl.F.Out,"<td class=\"BM%d\">",Gbl.RowEvenOdd);
fprintf (Gbl.F.Out,"<td class=\"BM%u\">",Gbl.RowEvenOdd);
if (Gbl.FileBrowser.ICanRemoveFileOrFolder) // Can I remove this folder?
{
@ -5082,7 +5082,7 @@ static void Brw_PutIconCopy (Brw_FileType_t FileType,
extern const char *Txt_Copy_FOLDER_FILE_OR_LINK_X;
extern const char *Txt_Copy_not_allowed;
fprintf (Gbl.F.Out,"<td class=\"BM%d\">",Gbl.RowEvenOdd);
fprintf (Gbl.F.Out,"<td class=\"BM%u\">",Gbl.RowEvenOdd);
if (Gbl.FileBrowser.ICanEditFileOrFolder)
{
@ -5130,7 +5130,7 @@ static void Brw_PutIconPasteOn (const char *PathInTree,const char *FileName,cons
{
extern const char *Txt_Paste_in_X;
fprintf (Gbl.F.Out,"<td class=\"BM%d\">",Gbl.RowEvenOdd);
fprintf (Gbl.F.Out,"<td class=\"BM%u\">",Gbl.RowEvenOdd);
/***** Form to paste the content of the clipboard *****/
Act_FormStart (Brw_ActPaste[Gbl.FileBrowser.Type]);
@ -5168,7 +5168,7 @@ static void Brw_PutIconPasteOff (void)
{
extern const char *Txt_Copy_not_allowed;
fprintf (Gbl.F.Out,"<td class=\"BM%d\">"
fprintf (Gbl.F.Out,"<td class=\"BM%u\">"
"<img src=\"%s/paste_off16x16.gif\""
" alt=\"%s\" title=\"%s\" class=\"ICON16x16B\" />"
"</td>",
@ -5191,7 +5191,7 @@ static void Brw_IndentAndWriteIconExpandContract (unsigned Level,Brw_ExpandTree_
"<table>"
"<tr>");
Brw_IndentDependingOnLevel (Level);
fprintf (Gbl.F.Out,"<td class=\"BM%d\">",Gbl.RowEvenOdd);
fprintf (Gbl.F.Out,"<td class=\"BM%u\">",Gbl.RowEvenOdd);
switch (ExpandTree)
{
@ -5295,7 +5295,7 @@ static void Brw_PutIconShow (unsigned Level,Brw_FileType_t FileType,
{
extern const char *Txt_Show_FOLDER_FILE_OR_LINK_X;
fprintf (Gbl.F.Out,"<td class=\"BM%d\">",Gbl.RowEvenOdd);
fprintf (Gbl.F.Out,"<td class=\"BM%u\">",Gbl.RowEvenOdd);
Act_FormStart (Brw_ActShow[Gbl.FileBrowser.Type]);
switch (Gbl.FileBrowser.Type)
{
@ -5328,7 +5328,7 @@ static void Brw_PutIconHide (unsigned Level,Brw_FileType_t FileType,
{
extern const char *Txt_Hide_FOLDER_FILE_OR_LINK_X;
fprintf (Gbl.F.Out,"<td class=\"BM%d\">",Gbl.RowEvenOdd);
fprintf (Gbl.F.Out,"<td class=\"BM%u\">",Gbl.RowEvenOdd);
Act_FormStart (Brw_ActHide[Gbl.FileBrowser.Type]);
switch (Gbl.FileBrowser.Type)
{
@ -5439,7 +5439,7 @@ static void Brw_PutIconNewFileOrFolder (void)
extern const char *Txt_New_FILE_OR_FOLDER;
/***** Icon that indicates new file *****/
fprintf (Gbl.F.Out,"<td class=\"BM%d\">"
fprintf (Gbl.F.Out,"<td class=\"BM%u\">"
"<img src=\"%s/star16x16.gif\""
" alt=\"%s\" title=\"%s\" class=\"ICON16x16B\" />"
"</td>",
@ -5737,9 +5737,8 @@ static void Brw_WriteDatesAssignment (void)
extern const char *Txt_unknown_assignment;
fprintf (Gbl.F.Out,"<td colspan=\"4\""
" class=\"ASG_LST_DATE_GREEN RIGHT_MIDDLE\""
" style=\"background-color:%s;\">",
Gbl.ColorRows[Gbl.RowEvenOdd]);
" class=\"ASG_LST_DATE_GREEN RIGHT_MIDDLE COLOR%u\">",
Gbl.RowEvenOdd);
if (Gbl.FileBrowser.Asg.AsgCod > 0)
{
@ -5796,19 +5795,17 @@ static void Brw_WriteDatesAssignment (void)
static void Brw_WriteFileSizeAndDate (Brw_FileType_t FileType,struct FileMetadata *FileMetadata)
{
/***** Write the file size *****/
fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_MIDDLE\""
" style=\"background-color:%s;\">"
fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_MIDDLE COLOR%u\">"
"&nbsp;",
Gbl.FileBrowser.TxtStyle,Gbl.ColorRows[Gbl.RowEvenOdd]);
Gbl.FileBrowser.TxtStyle,Gbl.RowEvenOdd);
if (FileType == Brw_IS_FILE)
Str_WriteSizeInBytesBrief ((double) FileMetadata->Size);
fprintf (Gbl.F.Out,"</td>");
/***** Write the date *****/
fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_MIDDLE\""
" style=\"background-color:%s;\">"
fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_MIDDLE COLOR%u\">"
"&nbsp;",
Gbl.FileBrowser.TxtStyle,Gbl.ColorRows[Gbl.RowEvenOdd]);
Gbl.FileBrowser.TxtStyle,Gbl.RowEvenOdd);
if (FileType == Brw_IS_FILE ||
FileType == Brw_IS_LINK)
{
@ -5840,7 +5837,7 @@ static void Brw_WriteFileOrFolderPublisher (unsigned Level,unsigned long UsrCod)
ShowUsr = Usr_ChkUsrCodAndGetAllUsrDataFromUsrCod (&UsrDat); // Get user's data from database
}
fprintf (Gbl.F.Out,"<td class=\"BM%d\">",Gbl.RowEvenOdd);
fprintf (Gbl.F.Out,"<td class=\"BM%u\">",Gbl.RowEvenOdd);
if (ShowUsr)
{
/***** Show photo *****/

View File

@ -3401,7 +3401,8 @@ void For_ListForumThrs (long ThrCods[Pag_ITEMS_PER_PAGE],struct Pagination *Pagi
Thr.NumWriters);
/***** Write number of users who have read this thread *****/
fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_TOP\" style=\"background-color:%s;\">"
fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_TOP\""
" style=\"background-color:%s;\">"
"%u&nbsp;"
"</td>"
"</tr>",

View File

@ -159,7 +159,7 @@ struct Globals
struct Date Yesterday;
char Message[Lay_MAX_BYTES_ALERT]; // String for alerts
char Title[Lay_MAX_BYTES_TITLE]; // String for the help message in a link
int RowEvenOdd; // To alternate row colors in listings
unsigned RowEvenOdd; // To alternate row colors in listings
char *ColorRows[2];
const char *XMLPtr;
struct

View File

@ -902,131 +902,116 @@ static void Ind_ShowTableOfCoursesWithIndicators (Ind_IndicatorsLayout_t Indicat
{
case Ind_INDICATORS_BRIEF:
fprintf (Gbl.F.Out,"<tr>"
"<td class=\"%s LEFT_MIDDLE\""
" style=\"background-color:%s;\">"
"<td class=\"%s LEFT_MIDDLE COLOR%u\">"
"%s"
"</td>"
"<td class=\"%s LEFT_MIDDLE\""
" style=\"background-color:%s;\">"
"<td class=\"%s LEFT_MIDDLE COLOR%u\">"
"%s"
"</td>"
"<td class=\"%s LEFT_MIDDLE\""
" style=\"background-color:%s;\">"
"<td class=\"%s LEFT_MIDDLE COLOR%u\">"
"%s"
"</td>"
"<td class=\"DAT_SMALL LEFT_MIDDLE\""
" style=\"background-color:%s;\">"
"<td class=\"DAT_SMALL LEFT_MIDDLE COLOR%u\">"
"<a href=\"%s/?crs=%ld&amp;act=%ld\" target=\"_blank\">"
"%s/?crs=%ld&amp;act=%ld"
"</a>"
"</td>"
"<td class=\"%s RIGHT_MIDDLE\""
" style=\"background-color:%s;\">"
"<td class=\"%s RIGHT_MIDDLE COLOR%u\">"
"%u"
"</td>"
"<td class=\"%s CENTER_MIDDLE\""
" style=\"background-color:%s;\">"
"<td class=\"%s CENTER_MIDDLE COLOR%u\">"
"%s"
"</td>"
"<td class=\"%s CENTER_MIDDLE\""
" style=\"background-color:%s;\">"
"<td class=\"%s CENTER_MIDDLE COLOR%u\">"
"%s"
"</td>"
"<td class=\"%s CENTER_MIDDLE\""
" style=\"background-color:%s;\">"
"<td class=\"%s CENTER_MIDDLE COLOR%u\">"
"%s"
"</td>"
"<td class=\"%s CENTER_MIDDLE\""
" style=\"background-color:%s;\">"
"<td class=\"%s CENTER_MIDDLE COLOR%u\">"
"%s"
"</td>"
"<td class=\"%s CENTER_MIDDLE\""
" style=\"background-color:%s;\">"
"<td class=\"%s CENTER_MIDDLE COLOR%u\">"
"%s"
"</td>"
"<td class=\"%s CENTER_MIDDLE\""
" style=\"background-color:%s;\">"
"<td class=\"%s CENTER_MIDDLE COLOR%u\">"
"%s"
"</td>"
"<td class=\"%s CENTER_MIDDLE\""
" style=\"background-color:%s;\">"
"<td class=\"%s CENTER_MIDDLE COLOR%u\">"
"%s"
"</td>"
"<td class=\"%s CENTER_MIDDLE\""
" style=\"background-color:%s;\">"
"<td class=\"%s CENTER_MIDDLE COLOR%u\">"
"%s"
"</td>"
"<td class=\"%s CENTER_MIDDLE\""
" style=\"background-color:%s;\">"
"<td class=\"%s CENTER_MIDDLE COLOR%u\">"
"%s"
"</td>"
"<td class=\"%s CENTER_MIDDLE\""
" style=\"background-color:%s;\">"
"<td class=\"%s CENTER_MIDDLE COLOR%u\">"
"%s"
"</td>"
"</tr>",
Indicators.CourseAllOK ? "DAT_SMALL_GREEN" :
(Indicators.CoursePartiallyOK ? "DAT_SMALL" :
"DAT_SMALL_RED"),
Gbl.ColorRows[Gbl.RowEvenOdd],
Gbl.RowEvenOdd,
row[0],
Indicators.CourseAllOK ? "DAT_SMALL_GREEN" :
(Indicators.CoursePartiallyOK ? "DAT_SMALL" :
"DAT_SMALL_RED"),
Gbl.ColorRows[Gbl.RowEvenOdd],
Gbl.RowEvenOdd,
row[1],
Indicators.CourseAllOK ? "DAT_SMALL_GREEN" :
(Indicators.CoursePartiallyOK ? "DAT_SMALL" :
"DAT_SMALL_RED"),
Gbl.ColorRows[Gbl.RowEvenOdd],
Gbl.RowEvenOdd,
row[3],
Gbl.ColorRows[Gbl.RowEvenOdd],Cfg_HTTPS_URL_SWAD_CGI,CrsCod,Act_Actions[ActReqStaCrs].ActCod,
Cfg_HTTPS_URL_SWAD_CGI,CrsCod,Act_Actions[ActReqStaCrs].ActCod,
Gbl.RowEvenOdd,Cfg_HTTPS_URL_SWAD_CGI,CrsCod,Act_Actions[ActReqStaCrs].ActCod,
Cfg_HTTPS_URL_SWAD_CGI,CrsCod,Act_Actions[ActReqStaCrs].ActCod,
Indicators.CourseAllOK ? "DAT_SMALL_GREEN" :
(Indicators.CoursePartiallyOK ? "DAT_SMALL" :
"DAT_SMALL_RED"),
Gbl.ColorRows[Gbl.RowEvenOdd],
Gbl.RowEvenOdd,
Indicators.CountIndicators,
"DAT_SMALL_GREEN",Gbl.ColorRows[Gbl.RowEvenOdd],
"DAT_SMALL_GREEN",Gbl.RowEvenOdd,
Indicators.ThereIsSyllabus ? Txt_YES :
"",
"DAT_SMALL_RED",Gbl.ColorRows[Gbl.RowEvenOdd],
"DAT_SMALL_RED",Gbl.RowEvenOdd,
Indicators.ThereIsSyllabus ? "" :
Txt_NO,
"DAT_SMALL_GREEN",Gbl.ColorRows[Gbl.RowEvenOdd],
"DAT_SMALL_GREEN",Gbl.RowEvenOdd,
Indicators.ThereAreAssignments ? Txt_YES :
"",
"DAT_SMALL_RED",Gbl.ColorRows[Gbl.RowEvenOdd],
"DAT_SMALL_RED",Gbl.RowEvenOdd,
Indicators.ThereAreAssignments ? "" :
Txt_NO,
"DAT_SMALL_GREEN",Gbl.ColorRows[Gbl.RowEvenOdd],
"DAT_SMALL_GREEN",Gbl.RowEvenOdd,
Indicators.ThereIsOnlineTutoring ? Txt_YES :
"",
"DAT_SMALL_RED",Gbl.ColorRows[Gbl.RowEvenOdd],
"DAT_SMALL_RED",Gbl.RowEvenOdd,
Indicators.ThereIsOnlineTutoring ? "" :
Txt_NO,
"DAT_SMALL_GREEN",Gbl.ColorRows[Gbl.RowEvenOdd],
"DAT_SMALL_GREEN",Gbl.RowEvenOdd,
Indicators.ThereAreMaterials ? Txt_YES :
"",
"DAT_SMALL_RED",Gbl.ColorRows[Gbl.RowEvenOdd],
"DAT_SMALL_RED",Gbl.RowEvenOdd,
Indicators.ThereAreMaterials ? "" :
Txt_NO,
"DAT_SMALL_GREEN",Gbl.ColorRows[Gbl.RowEvenOdd],
"DAT_SMALL_GREEN",Gbl.RowEvenOdd,
Indicators.ThereIsAssessment ? Txt_YES :
"",
"DAT_SMALL_RED",Gbl.ColorRows[Gbl.RowEvenOdd],
"DAT_SMALL_RED",Gbl.RowEvenOdd,
Indicators.ThereIsAssessment ? "" :
Txt_NO);
break;

View File

@ -197,7 +197,7 @@ void Rec_ListFieldsRecordsForEdition (void)
fprintf (Gbl.F.Out,"<tr>");
/* Write icon to remove the field */
fprintf (Gbl.F.Out,"<td class=\"BM%d\">",Gbl.RowEvenOdd);
fprintf (Gbl.F.Out,"<td class=\"BM%u\">",Gbl.RowEvenOdd);
Act_FormStart (ActReqRemFie);
Par_PutHiddenParamLong ("FieldCod",Gbl.CurrentCrs.Records.LstFields.Lst[NumField].FieldCod);
Lay_PutIconRemove ();

View File

@ -2987,7 +2987,7 @@ static void Svy_ListSvyQuestions (struct Survey *Svy,struct SurveyQuestion *SvyQ
if (Svy->Status.ICanEdit)
{
/* Write icon to remove the question */
fprintf (Gbl.F.Out,"<td class=\"BT%d\">",
fprintf (Gbl.F.Out,"<td class=\"BT%u\">",
Gbl.RowEvenOdd);
Act_FormStart (ActRemSvyQst);
Svy_PutParamSvyCod (Svy->SvyCod);
@ -2999,7 +2999,7 @@ static void Svy_ListSvyQuestions (struct Survey *Svy,struct SurveyQuestion *SvyQ
fprintf (Gbl.F.Out,"</td>");
/* Write icon to edit the question */
fprintf (Gbl.F.Out,"<td class=\"BT%d\">",
fprintf (Gbl.F.Out,"<td class=\"BT%u\">",
Gbl.RowEvenOdd);
Act_FormStart (ActEdiOneSvyQst);
Svy_PutParamSvyCod (Svy->SvyCod);

View File

@ -553,7 +553,7 @@ static void Syl_ShowRowSyllabus (Inf_InfoType_t InfoType,unsigned NumItem,int Le
else
{
/***** Icon to remove the row *****/
fprintf (Gbl.F.Out,"<td class=\"BM%d\">",Gbl.RowEvenOdd);
fprintf (Gbl.F.Out,"<td class=\"BM%u\">",Gbl.RowEvenOdd);
if (LstItemsSyllabus.Lst[NumItem].HasChildren)
Lay_PutIconRemovalNotAllowed ();
else
@ -568,7 +568,7 @@ static void Syl_ShowRowSyllabus (Inf_InfoType_t InfoType,unsigned NumItem,int Le
/***** Icon to get up an item *****/
Syl_CalculateUpSubtreeSyllabus (&Subtree,NumItem);
fprintf (Gbl.F.Out,"<td class=\"BM%d\">",Gbl.RowEvenOdd);
fprintf (Gbl.F.Out,"<td class=\"BM%u\">",Gbl.RowEvenOdd);
if (Subtree.MovAllowed)
{
Act_FormStart (InfoType == Inf_LECTURES ? ActUp_IteSylLec :
@ -596,7 +596,7 @@ static void Syl_ShowRowSyllabus (Inf_InfoType_t InfoType,unsigned NumItem,int Le
/***** Icon to get down item *****/
Syl_CalculateDownSubtreeSyllabus (&Subtree,NumItem);
fprintf (Gbl.F.Out,"<td class=\"BM%d\">",Gbl.RowEvenOdd);
fprintf (Gbl.F.Out,"<td class=\"BM%u\">",Gbl.RowEvenOdd);
if (Subtree.MovAllowed)
{
Act_FormStart (InfoType == Inf_LECTURES ? ActDwnIteSylLec :
@ -624,7 +624,7 @@ static void Syl_ShowRowSyllabus (Inf_InfoType_t InfoType,unsigned NumItem,int Le
fprintf (Gbl.F.Out,"</td>");
/***** Icon to increase the level of an item *****/
fprintf (Gbl.F.Out,"<td class=\"BM%d\">",Gbl.RowEvenOdd);
fprintf (Gbl.F.Out,"<td class=\"BM%u\">",Gbl.RowEvenOdd);
if (Level > 1)
{
Act_FormStart (InfoType == Inf_LECTURES ? ActRgtIteSylLec :
@ -650,7 +650,7 @@ static void Syl_ShowRowSyllabus (Inf_InfoType_t InfoType,unsigned NumItem,int Le
fprintf (Gbl.F.Out,"</td>");
/***** Icon to decrease level item *****/
fprintf (Gbl.F.Out,"<td class=\"BM%d\">",Gbl.RowEvenOdd);
fprintf (Gbl.F.Out,"<td class=\"BM%u\">",Gbl.RowEvenOdd);
if (Level < LastLevel + 1 &&
Level < Syl_MAX_LEVELS_SYLLABUS)
{

View File

@ -2483,7 +2483,7 @@ static void Tst_ListOneOrMoreQuestionsToEdit (unsigned long NumRows,MYSQL_RES *m
/* Write icon to remove the question */
fprintf (Gbl.F.Out,"<tr>"
"<td class=\"BT%d\">",
"<td class=\"BT%u\">",
Gbl.RowEvenOdd);
Act_FormStart (ActRemTstQst);
Sta_WriteParamsDatesSeeAccesses ();
@ -2497,7 +2497,7 @@ static void Tst_ListOneOrMoreQuestionsToEdit (unsigned long NumRows,MYSQL_RES *m
fprintf (Gbl.F.Out,"</td>");
/* Write icon to edit the question */
fprintf (Gbl.F.Out,"<td class=\"BT%d\">",
fprintf (Gbl.F.Out,"<td class=\"BT%u\">",
Gbl.RowEvenOdd);
Act_FormStart (ActEdiOneTstQst);
Par_PutHiddenParamLong ("QstCod",QstCod);
@ -2765,7 +2765,7 @@ static void Tst_WriteAnswersOfAQstEdit (long QstCod)
/* Put an icon that indicates whether the answer is correct or wrong */
fprintf (Gbl.F.Out,"<tr>"
"<td class=\"BT%d\">",Gbl.RowEvenOdd);
"<td class=\"BT%u\">",Gbl.RowEvenOdd);
if (Str_ConvertToUpperLetter (row[2][0]) == 'Y')
fprintf (Gbl.F.Out,"<img src=\"%s/ok_on16x16.gif\""
" alt=\"%s\" title=\"%s\""

View File

@ -1018,7 +1018,7 @@ static void TsI_WriteRowImportedQst (struct XMLElement *StemElem,
/***** Put icon to indicate that a question does not exist in database *****/
fprintf (Gbl.F.Out,"<tr>"
"<td class=\"BT%d CENTER_TOP\">"
"<td class=\"BT%u CENTER_TOP\">"
"<img src=\"%s/%s16x16.gif\""
" alt=\"%s\" title=\"%s\""
" class=\"ICON16x16\" />"
@ -1152,7 +1152,7 @@ static void TsI_WriteRowImportedQst (struct XMLElement *StemElem,
/* Put an icon that indicates whether the answer is correct or wrong */
fprintf (Gbl.F.Out,"<tr>"
"<td class=\"BT%d\">",Gbl.RowEvenOdd);
"<td class=\"BT%u\">",Gbl.RowEvenOdd);
if (Gbl.Test.Answer.Options[NumOpt].Correct)
fprintf (Gbl.F.Out,"<img src=\"%s/%s16x16.gif\""
" alt=\"%s\" title=\"%s\""

View File

@ -2619,7 +2619,7 @@ static void Usr_WriteRowGstMainData (unsigned NumUsr,struct UsrData *UsrDat)
fprintf (Gbl.F.Out,"</td>");
/***** Student has accepted enrollment in current course? *****/
fprintf (Gbl.F.Out,"<td class=\"BM%d\">"
fprintf (Gbl.F.Out,"<td class=\"BM%u\">"
"<img src=\"%s/tr16x16.gif\""
" alt=\"\" title=\"\""
" class=\"ICON16x16\" />"
@ -2716,7 +2716,7 @@ void Usr_WriteRowStdMainData (unsigned NumUsr,struct UsrData *UsrDat,bool PutChe
if (UsrIsTheMsgSender)
fprintf (Gbl.F.Out,"BM_SEL");
else
fprintf (Gbl.F.Out,"BM%d",Gbl.RowEvenOdd);
fprintf (Gbl.F.Out,"BM%u",Gbl.RowEvenOdd);
fprintf (Gbl.F.Out,"\">"
"<img src=\"%s/%s16x16.gif\""
" alt=\"%s\" title=\"%s\""
@ -3042,7 +3042,7 @@ static void Usr_WriteRowTchMainData (unsigned NumUsr,struct UsrData *UsrDat,bool
if (UsrIsTheMsgSender)
fprintf (Gbl.F.Out,"BM_SEL");
else
fprintf (Gbl.F.Out,"BM%d",Gbl.RowEvenOdd);
fprintf (Gbl.F.Out,"BM%u",Gbl.RowEvenOdd);
fprintf (Gbl.F.Out,"\">"
"<img src=\"%s/%s16x16.gif\""
" alt=\"%s\" title=\"%s\""