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_MIDDLE {text-align:right; vertical-align:middle;}
.RIGHT_BOTTOM {text-align:right; vertical-align:bottom;} .RIGHT_BOTTOM {text-align:right; vertical-align:bottom;}
/************************** Lists with alternating colors ********************/
.COLOR0 {background-color:#F4F2EA;}
.COLOR1 {background-color:#FBFAF7;}
/********************************* Course info *******************************/ /********************************* Course info *******************************/
#crs_info #crs_info
{ {

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -3934,22 +3934,20 @@ void Deg_GetAndWriteDegreesAdminBy (long UsrCod,unsigned ColSpan)
{ {
/***** Indent *****/ /***** Indent *****/
fprintf (Gbl.F.Out,"<tr>" fprintf (Gbl.F.Out,"<tr>"
"<td class=\"RIGHT_TOP\"" "<td class=\"RIGHT_TOP COLOR%u\">"
" style=\"background-color:%s;\">"
"<img src=\"%s/%s20x20.gif\"" "<img src=\"%s/%s20x20.gif\""
" alt=\"\" title=\"\"" " alt=\"\" title=\"\""
" style=\"width:20px; height:20px;" " style=\"width:20px; height:20px;"
" vertical-align:top;\" />" " vertical-align:top;\" />"
"</td>", "</td>",
Gbl.ColorRows[Gbl.RowEvenOdd],Gbl.Prefs.IconsURL, Gbl.RowEvenOdd,Gbl.Prefs.IconsURL,
NumRow == NumRows ? "subend" : NumRow == NumRows ? "subend" :
"submid"); "submid");
/***** Write degree *****/ /***** Write degree *****/
fprintf (Gbl.F.Out,"<td colspan=\"%u\"" fprintf (Gbl.F.Out,"<td colspan=\"%u\""
" class=\"DAT_SMALL_NOBR LEFT_TOP\"" " class=\"DAT_SMALL_NOBR LEFT_TOP COLOR%u\">",
" style=\"background-color:%s;\">", ColSpan - 1,Gbl.RowEvenOdd);
ColSpan - 1,Gbl.ColorRows[Gbl.RowEvenOdd]);
/* Get next degree */ /* Get next degree */
row = mysql_fetch_row (mysql_res); 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 *****/ /***** Indentation depending on level, icon, and file/folder name *****/
/* Start of the column */ /* Start of the column */
fprintf (Gbl.F.Out,"<td class=\"NO_BR LEFT_TOP\"" fprintf (Gbl.F.Out,"<td class=\"NO_BR LEFT_TOP COLOR%u\""
" style=\"width:99%%; background-color:%s;\">" " style=\"width:99%%;\">"
"<table>" "<table>"
"<tr>", "<tr>",
Gbl.ColorRows[Gbl.RowEvenOdd]); Gbl.RowEvenOdd);
/* Indent depending on level */ /* Indent depending on level */
if (Level) if (Level)
@ -4842,7 +4842,7 @@ static bool Brw_WriteRowFileBrowser (unsigned Level,
else else
{ {
/* Icon with file type or link */ /* 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); Brw_PutIconFileWithLinkToViewMetadata (16,FileType,PathInTree,FileName,FileNameToShow);
fprintf (Gbl.F.Out,"</td>"); 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... if (Gbl.Usrs.Me.LoggedRole >= Rol_STUDENT && // Only ZIP folders if I am student, teacher...
!SeeMarks) // Do not ZIP folders when seeing marks !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 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) !(SeeDocsZone && RowSetAsHidden)) // When seeing docs, if folder is not hidden (this could happen for Level == 0)
ZIP_PutButtonToDownloadZIPOfAFolder (PathInTree,FileName); ZIP_PutButtonToDownloadZIPOfAFolder (PathInTree,FileName);
@ -4946,7 +4946,7 @@ static void Brw_PutIconsRemoveCopyPaste (unsigned Level,Brw_FileType_t FileType,
Brw_PutIconPasteOff (); Brw_PutIconPasteOff ();
} }
else // File or link. Can't paste in a file or link. 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; 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? 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; 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? 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_FOLDER_FILE_OR_LINK_X;
extern const char *Txt_Copy_not_allowed; 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) 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; 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 *****/ /***** Form to paste the content of the clipboard *****/
Act_FormStart (Brw_ActPaste[Gbl.FileBrowser.Type]); Act_FormStart (Brw_ActPaste[Gbl.FileBrowser.Type]);
@ -5168,7 +5168,7 @@ static void Brw_PutIconPasteOff (void)
{ {
extern const char *Txt_Copy_not_allowed; 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\"" "<img src=\"%s/paste_off16x16.gif\""
" alt=\"%s\" title=\"%s\" class=\"ICON16x16B\" />" " alt=\"%s\" title=\"%s\" class=\"ICON16x16B\" />"
"</td>", "</td>",
@ -5191,7 +5191,7 @@ static void Brw_IndentAndWriteIconExpandContract (unsigned Level,Brw_ExpandTree_
"<table>" "<table>"
"<tr>"); "<tr>");
Brw_IndentDependingOnLevel (Level); 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) 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; 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]); Act_FormStart (Brw_ActShow[Gbl.FileBrowser.Type]);
switch (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; 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]); Act_FormStart (Brw_ActHide[Gbl.FileBrowser.Type]);
switch (Gbl.FileBrowser.Type) switch (Gbl.FileBrowser.Type)
{ {
@ -5439,7 +5439,7 @@ static void Brw_PutIconNewFileOrFolder (void)
extern const char *Txt_New_FILE_OR_FOLDER; extern const char *Txt_New_FILE_OR_FOLDER;
/***** Icon that indicates new file *****/ /***** 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\"" "<img src=\"%s/star16x16.gif\""
" alt=\"%s\" title=\"%s\" class=\"ICON16x16B\" />" " alt=\"%s\" title=\"%s\" class=\"ICON16x16B\" />"
"</td>", "</td>",
@ -5737,9 +5737,8 @@ static void Brw_WriteDatesAssignment (void)
extern const char *Txt_unknown_assignment; extern const char *Txt_unknown_assignment;
fprintf (Gbl.F.Out,"<td colspan=\"4\"" fprintf (Gbl.F.Out,"<td colspan=\"4\""
" class=\"ASG_LST_DATE_GREEN RIGHT_MIDDLE\"" " class=\"ASG_LST_DATE_GREEN RIGHT_MIDDLE COLOR%u\">",
" style=\"background-color:%s;\">", Gbl.RowEvenOdd);
Gbl.ColorRows[Gbl.RowEvenOdd]);
if (Gbl.FileBrowser.Asg.AsgCod > 0) 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) static void Brw_WriteFileSizeAndDate (Brw_FileType_t FileType,struct FileMetadata *FileMetadata)
{ {
/***** Write the file size *****/ /***** Write the file size *****/
fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_MIDDLE\"" fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_MIDDLE COLOR%u\">"
" style=\"background-color:%s;\">"
"&nbsp;", "&nbsp;",
Gbl.FileBrowser.TxtStyle,Gbl.ColorRows[Gbl.RowEvenOdd]); Gbl.FileBrowser.TxtStyle,Gbl.RowEvenOdd);
if (FileType == Brw_IS_FILE) if (FileType == Brw_IS_FILE)
Str_WriteSizeInBytesBrief ((double) FileMetadata->Size); Str_WriteSizeInBytesBrief ((double) FileMetadata->Size);
fprintf (Gbl.F.Out,"</td>"); fprintf (Gbl.F.Out,"</td>");
/***** Write the date *****/ /***** Write the date *****/
fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_MIDDLE\"" fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_MIDDLE COLOR%u\">"
" style=\"background-color:%s;\">"
"&nbsp;", "&nbsp;",
Gbl.FileBrowser.TxtStyle,Gbl.ColorRows[Gbl.RowEvenOdd]); Gbl.FileBrowser.TxtStyle,Gbl.RowEvenOdd);
if (FileType == Brw_IS_FILE || if (FileType == Brw_IS_FILE ||
FileType == Brw_IS_LINK) 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 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) if (ShowUsr)
{ {
/***** Show photo *****/ /***** Show photo *****/

View File

@ -3401,7 +3401,8 @@ void For_ListForumThrs (long ThrCods[Pag_ITEMS_PER_PAGE],struct Pagination *Pagi
Thr.NumWriters); Thr.NumWriters);
/***** Write number of users who have read this thread *****/ /***** 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;" "%u&nbsp;"
"</td>" "</td>"
"</tr>", "</tr>",

View File

@ -159,7 +159,7 @@ struct Globals
struct Date Yesterday; struct Date Yesterday;
char Message[Lay_MAX_BYTES_ALERT]; // String for alerts char Message[Lay_MAX_BYTES_ALERT]; // String for alerts
char Title[Lay_MAX_BYTES_TITLE]; // String for the help message in a link 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]; char *ColorRows[2];
const char *XMLPtr; const char *XMLPtr;
struct struct

View File

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

View File

@ -197,7 +197,7 @@ void Rec_ListFieldsRecordsForEdition (void)
fprintf (Gbl.F.Out,"<tr>"); fprintf (Gbl.F.Out,"<tr>");
/* Write icon to remove the field */ /* 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); Act_FormStart (ActReqRemFie);
Par_PutHiddenParamLong ("FieldCod",Gbl.CurrentCrs.Records.LstFields.Lst[NumField].FieldCod); Par_PutHiddenParamLong ("FieldCod",Gbl.CurrentCrs.Records.LstFields.Lst[NumField].FieldCod);
Lay_PutIconRemove (); Lay_PutIconRemove ();

View File

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

View File

@ -553,7 +553,7 @@ static void Syl_ShowRowSyllabus (Inf_InfoType_t InfoType,unsigned NumItem,int Le
else else
{ {
/***** Icon to remove the row *****/ /***** 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) if (LstItemsSyllabus.Lst[NumItem].HasChildren)
Lay_PutIconRemovalNotAllowed (); Lay_PutIconRemovalNotAllowed ();
else else
@ -568,7 +568,7 @@ static void Syl_ShowRowSyllabus (Inf_InfoType_t InfoType,unsigned NumItem,int Le
/***** Icon to get up an item *****/ /***** Icon to get up an item *****/
Syl_CalculateUpSubtreeSyllabus (&Subtree,NumItem); 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) if (Subtree.MovAllowed)
{ {
Act_FormStart (InfoType == Inf_LECTURES ? ActUp_IteSylLec : 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 *****/ /***** Icon to get down item *****/
Syl_CalculateDownSubtreeSyllabus (&Subtree,NumItem); 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) if (Subtree.MovAllowed)
{ {
Act_FormStart (InfoType == Inf_LECTURES ? ActDwnIteSylLec : 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>"); fprintf (Gbl.F.Out,"</td>");
/***** Icon to increase the level of an item *****/ /***** 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) if (Level > 1)
{ {
Act_FormStart (InfoType == Inf_LECTURES ? ActRgtIteSylLec : 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>"); fprintf (Gbl.F.Out,"</td>");
/***** Icon to decrease level item *****/ /***** 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 && if (Level < LastLevel + 1 &&
Level < Syl_MAX_LEVELS_SYLLABUS) 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 */ /* Write icon to remove the question */
fprintf (Gbl.F.Out,"<tr>" fprintf (Gbl.F.Out,"<tr>"
"<td class=\"BT%d\">", "<td class=\"BT%u\">",
Gbl.RowEvenOdd); Gbl.RowEvenOdd);
Act_FormStart (ActRemTstQst); Act_FormStart (ActRemTstQst);
Sta_WriteParamsDatesSeeAccesses (); Sta_WriteParamsDatesSeeAccesses ();
@ -2497,7 +2497,7 @@ static void Tst_ListOneOrMoreQuestionsToEdit (unsigned long NumRows,MYSQL_RES *m
fprintf (Gbl.F.Out,"</td>"); fprintf (Gbl.F.Out,"</td>");
/* Write icon to edit the question */ /* Write icon to edit the question */
fprintf (Gbl.F.Out,"<td class=\"BT%d\">", fprintf (Gbl.F.Out,"<td class=\"BT%u\">",
Gbl.RowEvenOdd); Gbl.RowEvenOdd);
Act_FormStart (ActEdiOneTstQst); Act_FormStart (ActEdiOneTstQst);
Par_PutHiddenParamLong ("QstCod",QstCod); 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 */ /* Put an icon that indicates whether the answer is correct or wrong */
fprintf (Gbl.F.Out,"<tr>" fprintf (Gbl.F.Out,"<tr>"
"<td class=\"BT%d\">",Gbl.RowEvenOdd); "<td class=\"BT%u\">",Gbl.RowEvenOdd);
if (Str_ConvertToUpperLetter (row[2][0]) == 'Y') if (Str_ConvertToUpperLetter (row[2][0]) == 'Y')
fprintf (Gbl.F.Out,"<img src=\"%s/ok_on16x16.gif\"" fprintf (Gbl.F.Out,"<img src=\"%s/ok_on16x16.gif\""
" alt=\"%s\" title=\"%s\"" " 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 *****/ /***** Put icon to indicate that a question does not exist in database *****/
fprintf (Gbl.F.Out,"<tr>" fprintf (Gbl.F.Out,"<tr>"
"<td class=\"BT%d CENTER_TOP\">" "<td class=\"BT%u CENTER_TOP\">"
"<img src=\"%s/%s16x16.gif\"" "<img src=\"%s/%s16x16.gif\""
" alt=\"%s\" title=\"%s\"" " alt=\"%s\" title=\"%s\""
" class=\"ICON16x16\" />" " 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 */ /* Put an icon that indicates whether the answer is correct or wrong */
fprintf (Gbl.F.Out,"<tr>" fprintf (Gbl.F.Out,"<tr>"
"<td class=\"BT%d\">",Gbl.RowEvenOdd); "<td class=\"BT%u\">",Gbl.RowEvenOdd);
if (Gbl.Test.Answer.Options[NumOpt].Correct) if (Gbl.Test.Answer.Options[NumOpt].Correct)
fprintf (Gbl.F.Out,"<img src=\"%s/%s16x16.gif\"" fprintf (Gbl.F.Out,"<img src=\"%s/%s16x16.gif\""
" alt=\"%s\" title=\"%s\"" " alt=\"%s\" title=\"%s\""

View File

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