mirror of
https://github.com/acanas/swad-core.git
synced 2024-06-27 02:45:56 +02:00
Version19.31
This commit is contained in:
parent
7e7137d1bf
commit
7ecc561d2d
|
@ -44,6 +44,7 @@
|
|||
#include "swad_parameter.h"
|
||||
#include "swad_profile.h"
|
||||
#include "swad_report.h"
|
||||
#include "swad_table.h"
|
||||
#include "swad_timeline.h"
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -277,8 +278,8 @@ static void Acc_WriteRowEmptyAccount (unsigned NumUsr,const char *ID,struct UsrD
|
|||
extern const char *Txt_Its_me;
|
||||
|
||||
/***** Write number of user in the list *****/
|
||||
fprintf (Gbl.F.Out,"<tr>"
|
||||
"<td rowspan=\"2\""
|
||||
Tbl_StartRow ();
|
||||
fprintf (Gbl.F.Out,"<td rowspan=\"2\""
|
||||
" class=\"USR_LIST_NUM_N RIGHT_TOP COLOR%u\">"
|
||||
"%u"
|
||||
"</td>",
|
||||
|
@ -304,19 +305,19 @@ static void Acc_WriteRowEmptyAccount (unsigned NumUsr,const char *ID,struct UsrD
|
|||
Usr_PutParamUsrCodEncrypted (UsrDat->EncryptedUsrCod);
|
||||
Btn_PutCreateButtonInline (Txt_Its_me);
|
||||
Frm_EndForm ();
|
||||
fprintf (Gbl.F.Out,"</td>"
|
||||
"</tr>");
|
||||
fprintf (Gbl.F.Out,"</td>");
|
||||
Tbl_EndRow ();
|
||||
|
||||
/***** Courses of this user *****/
|
||||
fprintf (Gbl.F.Out,"<tr>"
|
||||
"<td colspan=\"2\" class=\"LEFT_TOP COLOR%u\">",
|
||||
Tbl_StartRow ();
|
||||
fprintf (Gbl.F.Out,"<td colspan=\"2\" class=\"LEFT_TOP COLOR%u\">",
|
||||
Gbl.RowEvenOdd);
|
||||
UsrDat->Sex = Usr_SEX_UNKNOWN;
|
||||
Crs_GetAndWriteCrssOfAUsr (UsrDat,Rol_TCH);
|
||||
Crs_GetAndWriteCrssOfAUsr (UsrDat,Rol_NET);
|
||||
Crs_GetAndWriteCrssOfAUsr (UsrDat,Rol_STD);
|
||||
fprintf (Gbl.F.Out,"</td>"
|
||||
"</tr>");
|
||||
fprintf (Gbl.F.Out,"</td>");
|
||||
Tbl_EndRow ();
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -366,8 +367,8 @@ static void Acc_ShowFormRequestNewAccountWithParams (const char *NewNicknameWith
|
|||
NewNicknameWithoutArroba);
|
||||
else
|
||||
NewNicknameWithArroba[0] = '\0';
|
||||
fprintf (Gbl.F.Out,"<tr>"
|
||||
"<td class=\"RIGHT_MIDDLE\">"
|
||||
Tbl_StartRow ();
|
||||
fprintf (Gbl.F.Out,"<td class=\"RIGHT_MIDDLE\">"
|
||||
"<label for=\"NewNick\" class=\"%s\">%s:</label>"
|
||||
"</td>"
|
||||
"<td class=\"LEFT_MIDDLE\">"
|
||||
|
@ -375,17 +376,17 @@ static void Acc_ShowFormRequestNewAccountWithParams (const char *NewNicknameWith
|
|||
" size=\"18\" maxlength=\"%u\""
|
||||
" placeholder=\"%s\" value=\"%s\""
|
||||
" required=\"required\" />"
|
||||
"</td>"
|
||||
"</tr>",
|
||||
"</td>",
|
||||
The_ClassFormInBox[Gbl.Prefs.Theme],
|
||||
Txt_Nickname,
|
||||
1 + Nck_MAX_CHARS_NICKNAME_WITHOUT_ARROBA,
|
||||
Txt_HELP_nickname,
|
||||
NewNicknameWithArroba);
|
||||
Tbl_EndRow ();
|
||||
|
||||
/***** Email *****/
|
||||
fprintf (Gbl.F.Out,"<tr>"
|
||||
"<td class=\"RIGHT_MIDDLE\">"
|
||||
Tbl_StartRow ();
|
||||
fprintf (Gbl.F.Out,"<td class=\"RIGHT_MIDDLE\">"
|
||||
"<label for=\"NewEmail\" class=\"%s\">%s:</label>"
|
||||
"</td>"
|
||||
"<td class=\"LEFT_MIDDLE\">"
|
||||
|
@ -393,13 +394,13 @@ static void Acc_ShowFormRequestNewAccountWithParams (const char *NewNicknameWith
|
|||
" size=\"18\" maxlength=\"%u\""
|
||||
" placeholder=\"%s\" value=\"%s\""
|
||||
" required=\"required\" />"
|
||||
"</td>"
|
||||
"</tr>",
|
||||
"</td>",
|
||||
The_ClassFormInBox[Gbl.Prefs.Theme],
|
||||
Txt_Email,
|
||||
Cns_MAX_CHARS_EMAIL_ADDRESS,
|
||||
Txt_HELP_email,
|
||||
NewEmail);
|
||||
Tbl_EndRow ();
|
||||
|
||||
/***** Password *****/
|
||||
Pwd_PutFormToGetNewPasswordOnce ();
|
||||
|
|
|
@ -566,7 +566,7 @@ static void Agd_WriteHeaderListEvents (Agd_AgendaType_t AgendaType)
|
|||
Agd_Order_t Order;
|
||||
|
||||
/***** Table head *****/
|
||||
fprintf (Gbl.F.Out,"<tr>");
|
||||
Tbl_StartRow ();
|
||||
for (Order = Agd_ORDER_BY_START_DATE;
|
||||
Order <= Agd_ORDER_BY_END_DATE;
|
||||
Order++)
|
||||
|
@ -602,10 +602,10 @@ static void Agd_WriteHeaderListEvents (Agd_AgendaType_t AgendaType)
|
|||
"</th>"
|
||||
"<th class=\"LEFT_MIDDLE\">"
|
||||
"%s"
|
||||
"</th>"
|
||||
"</tr>",
|
||||
"</th>",
|
||||
Txt_Event,
|
||||
Txt_Location);
|
||||
Tbl_EndRow ();
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -740,7 +740,7 @@ static void Agd_ShowOneEvent (Agd_AgendaType_t AgendaType,long AgdCod)
|
|||
Frm_SetAnchorStr (AgdEvent.AgdCod,&Anchor);
|
||||
|
||||
/***** Write first row of data of this event *****/
|
||||
fprintf (Gbl.F.Out,"<tr>");
|
||||
Tbl_StartRow ();
|
||||
|
||||
/* Start/end date/time */
|
||||
UniqueId++;
|
||||
|
@ -781,11 +781,11 @@ static void Agd_ShowOneEvent (Agd_AgendaType_t AgendaType,long AgdCod)
|
|||
"ASG_TITLE",
|
||||
AgdEvent.Location);
|
||||
|
||||
fprintf (Gbl.F.Out,"</tr>");
|
||||
Tbl_EndRow ();
|
||||
|
||||
/***** Write second row of data of this event *****/
|
||||
fprintf (Gbl.F.Out,"<tr>"
|
||||
"<td colspan=\"2\" class=\"LEFT_TOP COLOR%u\">",
|
||||
Tbl_StartRow ();
|
||||
fprintf (Gbl.F.Out,"<td colspan=\"2\" class=\"LEFT_TOP COLOR%u\">",
|
||||
Gbl.RowEvenOdd);
|
||||
|
||||
/* Forms to remove/edit this event */
|
||||
|
@ -808,12 +808,12 @@ static void Agd_ShowOneEvent (Agd_AgendaType_t AgendaType,long AgdCod)
|
|||
Str_InsertLinks (Txt,Cns_MAX_BYTES_TEXT,60); // Insert links
|
||||
fprintf (Gbl.F.Out,"<td colspan=\"2\" class=\"LEFT_TOP COLOR%u\">"
|
||||
"<div class=\"PAR %s\">%s</div>"
|
||||
"</td>"
|
||||
"</tr>",
|
||||
"</td>",
|
||||
Gbl.RowEvenOdd,
|
||||
AgdEvent.Hidden ? "DAT_LIGHT" :
|
||||
"DAT",
|
||||
Txt);
|
||||
Tbl_EndRow ();
|
||||
|
||||
/***** Free anchor string *****/
|
||||
Frm_FreeAnchorStr (Anchor);
|
||||
|
@ -1500,42 +1500,42 @@ void Agd_RequestCreatOrEditEvent (void)
|
|||
Hlp_PROFILE_Agenda_edit_event,Box_NOT_CLOSABLE,2);
|
||||
|
||||
/***** Event *****/
|
||||
fprintf (Gbl.F.Out,"<tr>"
|
||||
"<td class=\"RIGHT_MIDDLE\">"
|
||||
Tbl_StartRow ();
|
||||
fprintf (Gbl.F.Out,"<td class=\"RIGHT_MIDDLE\">"
|
||||
"<label for=\"Event\" class=\"%s\">%s:</label>"
|
||||
"</td>"
|
||||
"<td class=\"LEFT_MIDDLE\">"
|
||||
"<input type=\"text\" id=\"Event\" name=\"Event\""
|
||||
" size=\"45\" maxlength=\"%u\" value=\"%s\""
|
||||
" required=\"required\" />"
|
||||
"</td>"
|
||||
"</tr>",
|
||||
"</td>",
|
||||
The_ClassFormInBox[Gbl.Prefs.Theme],
|
||||
Txt_Event,
|
||||
Agd_MAX_CHARS_EVENT,AgdEvent.Event);
|
||||
Tbl_EndRow ();
|
||||
|
||||
/***** Location *****/
|
||||
fprintf (Gbl.F.Out,"<tr>"
|
||||
"<td class=\"RIGHT_MIDDLE\">"
|
||||
Tbl_StartRow ();
|
||||
fprintf (Gbl.F.Out,"<td class=\"RIGHT_MIDDLE\">"
|
||||
"<label for=\"Location\" class=\"%s\">%s:</label>"
|
||||
"</td>"
|
||||
"<td class=\"LEFT_MIDDLE\">"
|
||||
"<input type=\"text\" id=\"Location\" name=\"Location\""
|
||||
" size=\"45\" maxlength=\"%u\" value=\"%s\""
|
||||
" required=\"required\" />"
|
||||
"</td>"
|
||||
"</tr>",
|
||||
"</td>",
|
||||
The_ClassFormInBox[Gbl.Prefs.Theme],
|
||||
Txt_Location,
|
||||
Agd_MAX_CHARS_LOCATION,AgdEvent.Location);
|
||||
Tbl_EndRow ();
|
||||
|
||||
/***** Start and end dates *****/
|
||||
Dat_PutFormStartEndClientLocalDateTimes (AgdEvent.TimeUTC,
|
||||
Dat_FORM_SECONDS_OFF);
|
||||
|
||||
/***** Text *****/
|
||||
fprintf (Gbl.F.Out,"<tr>"
|
||||
"<td class=\"RIGHT_TOP\">"
|
||||
Tbl_StartRow ();
|
||||
fprintf (Gbl.F.Out,"<td class=\"RIGHT_TOP\">"
|
||||
"<label for=\"Txt\" class=\"%s\">%s:</label>"
|
||||
"</td>"
|
||||
"<td class=\"LEFT_TOP\">"
|
||||
|
@ -1546,8 +1546,8 @@ void Agd_RequestCreatOrEditEvent (void)
|
|||
if (!ItsANewEvent)
|
||||
fprintf (Gbl.F.Out,"%s",Txt);
|
||||
fprintf (Gbl.F.Out,"</textarea>"
|
||||
"</td>"
|
||||
"</tr>");
|
||||
"</td>");
|
||||
Tbl_EndRow ();
|
||||
|
||||
/***** End table, send button and end box *****/
|
||||
if (ItsANewEvent)
|
||||
|
|
|
@ -412,8 +412,8 @@ void Ann_ShowFormAnnouncement (void)
|
|||
Ann_PutSubjectMessage ("Content",Txt_MSG_Content,20);
|
||||
|
||||
/***** Users' roles who can view the announcement *****/
|
||||
fprintf (Gbl.F.Out,"<tr>"
|
||||
"<td class=\"%s RIGHT_TOP\">"
|
||||
Tbl_StartRow ();
|
||||
fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_TOP\">"
|
||||
"%s: "
|
||||
"</td>"
|
||||
"<td class=\"DAT LEFT_TOP\">",
|
||||
|
@ -430,8 +430,8 @@ void Ann_ShowFormAnnouncement (void)
|
|||
1 << Rol_NET |
|
||||
1 << Rol_TCH,
|
||||
false,false);
|
||||
fprintf (Gbl.F.Out,"</td>"
|
||||
"</tr>");
|
||||
fprintf (Gbl.F.Out,"</td>");
|
||||
Tbl_EndRow ();
|
||||
|
||||
/***** End table, send button and end box *****/
|
||||
Box_EndBoxTableWithButton (Btn_CREATE_BUTTON,Txt_Create_announcement);
|
||||
|
@ -449,18 +449,18 @@ static void Ann_PutSubjectMessage (const char *Field,const char *Label,
|
|||
{
|
||||
extern const char *The_ClassFormInBox[The_NUM_THEMES];
|
||||
|
||||
fprintf (Gbl.F.Out,"<tr>"
|
||||
"<td class=\"RIGHT_TOP\">"
|
||||
Tbl_StartRow ();
|
||||
fprintf (Gbl.F.Out,"<td class=\"RIGHT_TOP\">"
|
||||
"<label for=\"%s\" class=\"%s\">%s:</label>"
|
||||
"</td>"
|
||||
"<td class=\"LEFT_TOP\">"
|
||||
"<textarea id=\"%s\" name=\"%s\""
|
||||
" cols=\"75\" rows=\"%u\">"
|
||||
"</textarea>"
|
||||
"</td>"
|
||||
"</tr>",
|
||||
"</td>",
|
||||
Field,The_ClassFormInBox[Gbl.Prefs.Theme],Label,
|
||||
Field,Field,Rows);
|
||||
Tbl_EndRow ();
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
|
@ -202,8 +202,8 @@ static void Asg_PutHeadForSeeing (bool PrintView)
|
|||
extern const char *Txt_Folder;
|
||||
Dat_StartEndTime_t Order;
|
||||
|
||||
fprintf (Gbl.F.Out,"<tr>"
|
||||
"<th class=\"CONTEXT_COL\"></th>"); // Column for contextual icons
|
||||
Tbl_StartRow ();
|
||||
fprintf (Gbl.F.Out,"<th class=\"CONTEXT_COL\"></th>"); // Column for contextual icons
|
||||
for (Order = Dat_START_TIME;
|
||||
Order <= Dat_END_TIME;
|
||||
Order++)
|
||||
|
@ -236,10 +236,10 @@ static void Asg_PutHeadForSeeing (bool PrintView)
|
|||
"</th>"
|
||||
"<th class=\"LEFT_MIDDLE\">"
|
||||
"%s"
|
||||
"</th>"
|
||||
"</tr>",
|
||||
"</th>",
|
||||
Txt_Assignment,
|
||||
Txt_Folder);
|
||||
Tbl_EndRow ();
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -357,8 +357,8 @@ static void Asg_ShowOneAssignment (long AsgCod,bool PrintView)
|
|||
|
||||
/***** Write first row of data of this assignment *****/
|
||||
/* Forms to remove/edit this assignment */
|
||||
fprintf (Gbl.F.Out,"<tr>"
|
||||
"<td rowspan=\"2\" class=\"CONTEXT_COL");
|
||||
Tbl_StartRow ();
|
||||
fprintf (Gbl.F.Out,"<td rowspan=\"2\" class=\"CONTEXT_COL");
|
||||
if (PrintView)
|
||||
fprintf (Gbl.F.Out,"\">");
|
||||
else
|
||||
|
@ -412,12 +412,12 @@ static void Asg_ShowOneAssignment (long AsgCod,bool PrintView)
|
|||
fprintf (Gbl.F.Out,"\">");
|
||||
if (Asg.SendWork == Asg_SEND_WORK)
|
||||
Asg_WriteAssignmentFolder (&Asg,PrintView);
|
||||
fprintf (Gbl.F.Out,"</td>"
|
||||
"</tr>");
|
||||
fprintf (Gbl.F.Out,"</td>");
|
||||
Tbl_EndRow ();
|
||||
|
||||
/***** Write second row of data of this assignment *****/
|
||||
fprintf (Gbl.F.Out,"<tr>"
|
||||
"<td colspan=\"2\" class=\"LEFT_TOP");
|
||||
Tbl_StartRow ();
|
||||
fprintf (Gbl.F.Out,"<td colspan=\"2\" class=\"LEFT_TOP");
|
||||
if (!PrintView)
|
||||
fprintf (Gbl.F.Out," COLOR%u",Gbl.RowEvenOdd);
|
||||
fprintf (Gbl.F.Out,"\">");
|
||||
|
@ -441,11 +441,11 @@ static void Asg_ShowOneAssignment (long AsgCod,bool PrintView)
|
|||
Asg_GetAndWriteNamesOfGrpsAssociatedToAsg (&Asg);
|
||||
|
||||
fprintf (Gbl.F.Out,"<div class=\"PAR %s\">%s</div>"
|
||||
"</td>"
|
||||
"</tr>",
|
||||
"</td>",
|
||||
Asg.Hidden ? "DAT_LIGHT" :
|
||||
"DAT",
|
||||
Txt);
|
||||
Tbl_EndRow ();
|
||||
|
||||
/***** Free anchor string *****/
|
||||
Frm_FreeAnchorStr (Anchor);
|
||||
|
@ -1158,25 +1158,25 @@ void Asg_RequestCreatOrEditAsg (void)
|
|||
|
||||
|
||||
/***** Assignment title *****/
|
||||
fprintf (Gbl.F.Out,"<tr>"
|
||||
"<td class=\"RIGHT_MIDDLE\">"
|
||||
Tbl_StartRow ();
|
||||
fprintf (Gbl.F.Out,"<td class=\"RIGHT_MIDDLE\">"
|
||||
"<label for=\"Title\" class=\"%s\">%s:</label>"
|
||||
"</td>"
|
||||
"<td class=\"LEFT_MIDDLE\">"
|
||||
"<input type=\"text\" id=\"Title\" name=\"Title\""
|
||||
" size=\"45\" maxlength=\"%u\" value=\"%s\""
|
||||
" required=\"required\" />"
|
||||
"</td>"
|
||||
"</tr>",
|
||||
"</td>",
|
||||
The_ClassFormInBox[Gbl.Prefs.Theme],Txt_Title,
|
||||
Asg_MAX_CHARS_ASSIGNMENT_TITLE,Asg.Title);
|
||||
Tbl_EndRow ();
|
||||
|
||||
/***** Assignment start and end dates *****/
|
||||
Dat_PutFormStartEndClientLocalDateTimes (Asg.TimeUTC,Dat_FORM_SECONDS_ON);
|
||||
|
||||
/***** Send work? *****/
|
||||
fprintf (Gbl.F.Out,"<tr>"
|
||||
"<td class=\"%s RIGHT_MIDDLE\">"
|
||||
Tbl_StartRow ();
|
||||
fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_MIDDLE\">"
|
||||
"%s:"
|
||||
"</td>"
|
||||
"<td class=\"LEFT_MIDDLE\">"
|
||||
|
@ -1184,16 +1184,16 @@ void Asg_RequestCreatOrEditAsg (void)
|
|||
"<input type=\"text\" name=\"Folder\""
|
||||
" size=\"30\" maxlength=\"%u\" value=\"%s\" />"
|
||||
"</label>"
|
||||
"</td>"
|
||||
"</tr>",
|
||||
"</td>",
|
||||
The_ClassFormInBox[Gbl.Prefs.Theme],
|
||||
Txt_Upload_files_QUESTION,
|
||||
Txt_Folder,
|
||||
Brw_MAX_CHARS_FOLDER,Asg.Folder);
|
||||
Tbl_EndRow ();
|
||||
|
||||
/***** Assignment text *****/
|
||||
fprintf (Gbl.F.Out,"<tr>"
|
||||
"<td class=\"RIGHT_TOP\">"
|
||||
Tbl_StartRow ();
|
||||
fprintf (Gbl.F.Out,"<td class=\"RIGHT_TOP\">"
|
||||
"<label for=\"Txt\" class=\"%s\">%s:</label>"
|
||||
"</td>"
|
||||
"<td class=\"LEFT_TOP\">"
|
||||
|
@ -1203,8 +1203,8 @@ void Asg_RequestCreatOrEditAsg (void)
|
|||
if (!ItsANewAssignment)
|
||||
fprintf (Gbl.F.Out,"%s",Txt);
|
||||
fprintf (Gbl.F.Out,"</textarea>"
|
||||
"</td>"
|
||||
"</tr>");
|
||||
"</td>");
|
||||
Tbl_EndRow ();
|
||||
|
||||
/***** Groups *****/
|
||||
Asg_ShowLstGrpsToEditAssignment (Asg.AsgCod);
|
||||
|
@ -1240,8 +1240,8 @@ static void Asg_ShowLstGrpsToEditAssignment (long AsgCod)
|
|||
if (Gbl.Crs.Grps.GrpTypes.Num)
|
||||
{
|
||||
/***** Start box and table *****/
|
||||
fprintf (Gbl.F.Out,"<tr>"
|
||||
"<td class=\"%s RIGHT_TOP\">"
|
||||
Tbl_StartRow ();
|
||||
fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_TOP\">"
|
||||
"%s:"
|
||||
"</td>"
|
||||
"<td class=\"LEFT_TOP\">",
|
||||
|
@ -1251,8 +1251,8 @@ static void Asg_ShowLstGrpsToEditAssignment (long AsgCod)
|
|||
Hlp_USERS_Groups,Box_NOT_CLOSABLE,0);
|
||||
|
||||
/***** First row: checkbox to select the whole course *****/
|
||||
fprintf (Gbl.F.Out,"<tr>"
|
||||
"<td colspan=\"7\" class=\"DAT LEFT_MIDDLE\">"
|
||||
Tbl_StartRow ();
|
||||
fprintf (Gbl.F.Out,"<td colspan=\"7\" class=\"DAT LEFT_MIDDLE\">"
|
||||
"<label>"
|
||||
"<input type=\"checkbox\" id=\"WholeCrs\" name=\"WholeCrs\" value=\"Y\"");
|
||||
if (!Asg_CheckIfAsgIsAssociatedToGrps (AsgCod))
|
||||
|
@ -1260,9 +1260,9 @@ static void Asg_ShowLstGrpsToEditAssignment (long AsgCod)
|
|||
fprintf (Gbl.F.Out," onclick=\"uncheckChildren(this,'GrpCods')\" />"
|
||||
"%s %s"
|
||||
"</label>"
|
||||
"</td>"
|
||||
"</tr>",
|
||||
"</td>",
|
||||
Txt_The_whole_course,Gbl.Hierarchy.Crs.ShrtName);
|
||||
Tbl_EndRow ();
|
||||
|
||||
/***** List the groups for each group type *****/
|
||||
for (NumGrpTyp = 0;
|
||||
|
@ -1274,8 +1274,8 @@ static void Asg_ShowLstGrpsToEditAssignment (long AsgCod)
|
|||
|
||||
/***** End table and box *****/
|
||||
Box_EndBoxTable ();
|
||||
fprintf (Gbl.F.Out,"</td>"
|
||||
"</tr>");
|
||||
fprintf (Gbl.F.Out,"</td>");
|
||||
Tbl_EndRow ();
|
||||
}
|
||||
|
||||
/***** Free list of groups types and groups in this course *****/
|
||||
|
|
|
@ -238,8 +238,8 @@ static void Att_ShowAllAttEvents (void)
|
|||
{
|
||||
/***** Table head *****/
|
||||
Tbl_StartTableWideMarginPadding (2);
|
||||
fprintf (Gbl.F.Out,"<tr>"
|
||||
"<th class=\"CONTEXT_COL\"></th>"); // Column for contextual icons
|
||||
Tbl_StartRow ();
|
||||
fprintf (Gbl.F.Out,"<th class=\"CONTEXT_COL\"></th>"); // Column for contextual icons
|
||||
for (Order = Dat_START_TIME;
|
||||
Order <= Dat_END_TIME;
|
||||
Order++)
|
||||
|
@ -264,10 +264,10 @@ static void Att_ShowAllAttEvents (void)
|
|||
"</th>"
|
||||
"<th class=\"RIGHT_MIDDLE\">"
|
||||
"%s"
|
||||
"</th>"
|
||||
"</tr>",
|
||||
"</th>",
|
||||
Txt_Event,
|
||||
Txt_ROLES_PLURAL_Abc[Rol_STD][Usr_SEX_UNKNOWN]);
|
||||
Tbl_EndRow ();
|
||||
|
||||
/***** Write all the attendance events *****/
|
||||
for (NumAttEvent = Pagination.FirstItemVisible, Gbl.RowEvenOdd = 0;
|
||||
|
@ -387,8 +387,8 @@ static void Att_ShowOneAttEvent (struct AttendanceEvent *Att,bool ShowOnlyThisAt
|
|||
|
||||
/***** Write first row of data of this attendance event *****/
|
||||
/* Forms to remove/edit this attendance event */
|
||||
fprintf (Gbl.F.Out,"<tr>"
|
||||
"<td rowspan=\"2\" class=\"CONTEXT_COL");
|
||||
Tbl_StartRow ();
|
||||
fprintf (Gbl.F.Out,"<td rowspan=\"2\" class=\"CONTEXT_COL");
|
||||
if (!ShowOnlyThisAttEventComplete)
|
||||
fprintf (Gbl.F.Out," COLOR%u",Gbl.RowEvenOdd);
|
||||
fprintf (Gbl.F.Out,"\">");
|
||||
|
@ -447,13 +447,13 @@ static void Att_ShowOneAttEvent (struct AttendanceEvent *Att,bool ShowOnlyThisAt
|
|||
fprintf (Gbl.F.Out," COLOR%u",Gbl.RowEvenOdd);
|
||||
fprintf (Gbl.F.Out,"\">"
|
||||
"%u"
|
||||
"</td>"
|
||||
"</tr>",
|
||||
"</td>",
|
||||
Att->NumStdsTotal);
|
||||
Tbl_EndRow ();
|
||||
|
||||
/***** Write second row of data of this attendance event *****/
|
||||
fprintf (Gbl.F.Out,"<tr>"
|
||||
"<td colspan=\"2\" class=\"LEFT_TOP");
|
||||
Tbl_StartRow ();
|
||||
fprintf (Gbl.F.Out,"<td colspan=\"2\" class=\"LEFT_TOP");
|
||||
if (!ShowOnlyThisAttEventComplete)
|
||||
fprintf (Gbl.F.Out," COLOR%u",Gbl.RowEvenOdd);
|
||||
fprintf (Gbl.F.Out,"\">");
|
||||
|
@ -481,8 +481,8 @@ static void Att_ShowOneAttEvent (struct AttendanceEvent *Att,bool ShowOnlyThisAt
|
|||
"DAT",
|
||||
Description);
|
||||
|
||||
fprintf (Gbl.F.Out,"</td>"
|
||||
"</tr>");
|
||||
fprintf (Gbl.F.Out,"</td>");
|
||||
Tbl_EndRow ();
|
||||
|
||||
/***** Free anchor string *****/
|
||||
Frm_FreeAnchorStr (Anchor);
|
||||
|
@ -1094,25 +1094,25 @@ void Att_RequestCreatOrEditAttEvent (void)
|
|||
Hlp_USERS_Attendance_edit_event,Box_NOT_CLOSABLE,2);
|
||||
|
||||
/***** Attendance event title *****/
|
||||
fprintf (Gbl.F.Out,"<tr>"
|
||||
"<td class=\"RIGHT_TOP\">"
|
||||
Tbl_StartRow ();
|
||||
fprintf (Gbl.F.Out,"<td class=\"RIGHT_TOP\">"
|
||||
"<label for=\"Title\" class=\"%s\">%s:</label>"
|
||||
"</td>"
|
||||
"<td class=\"LEFT_TOP\">"
|
||||
"<input type=\"text\" id=\"Title\" name=\"Title\""
|
||||
" size=\"45\" maxlength=\"%u\" value=\"%s\""
|
||||
" required=\"required\" />"
|
||||
"</td>"
|
||||
"</tr>",
|
||||
"</td>",
|
||||
The_ClassFormInBox[Gbl.Prefs.Theme],Txt_Title,
|
||||
Att_MAX_CHARS_ATTENDANCE_EVENT_TITLE,Att.Title);
|
||||
Tbl_EndRow ();
|
||||
|
||||
/***** Assignment start and end dates *****/
|
||||
Dat_PutFormStartEndClientLocalDateTimes (Att.TimeUTC,Dat_FORM_SECONDS_ON);
|
||||
|
||||
/***** Visibility of comments *****/
|
||||
fprintf (Gbl.F.Out,"<tr>"
|
||||
"<td class=\"RIGHT_TOP\">"
|
||||
Tbl_StartRow ();
|
||||
fprintf (Gbl.F.Out,"<td class=\"RIGHT_TOP\">"
|
||||
"<label for=\"ComTchVisible\" class=\"%s\">%s:</label>"
|
||||
"</td>"
|
||||
"<td class=\"LEFT_TOP\">"
|
||||
|
@ -1132,12 +1132,12 @@ void Att_RequestCreatOrEditAttEvent (void)
|
|||
Txt_Visible_MALE_PLURAL);
|
||||
|
||||
fprintf (Gbl.F.Out,"</select>"
|
||||
"</td>"
|
||||
"</tr>");
|
||||
"</td>");
|
||||
Tbl_EndRow ();
|
||||
|
||||
/***** Attendance event description *****/
|
||||
fprintf (Gbl.F.Out,"<tr>"
|
||||
"<td class=\"RIGHT_TOP\">"
|
||||
Tbl_StartRow ();
|
||||
fprintf (Gbl.F.Out,"<td class=\"RIGHT_TOP\">"
|
||||
"<label for=\"Txt\" class=\"%s\">%s:</label>"
|
||||
"</td>"
|
||||
"<td class=\"LEFT_TOP\">"
|
||||
|
@ -1147,8 +1147,8 @@ void Att_RequestCreatOrEditAttEvent (void)
|
|||
if (!ItsANewAttEvent)
|
||||
fprintf (Gbl.F.Out,"%s",Description);
|
||||
fprintf (Gbl.F.Out,"</textarea>"
|
||||
"</td>"
|
||||
"</tr>");
|
||||
"</td>");
|
||||
Tbl_EndRow ();
|
||||
|
||||
/***** Groups *****/
|
||||
Att_ShowLstGrpsToEditAttEvent (Att.AttCod);
|
||||
|
@ -1184,8 +1184,8 @@ static void Att_ShowLstGrpsToEditAttEvent (long AttCod)
|
|||
if (Gbl.Crs.Grps.GrpTypes.Num)
|
||||
{
|
||||
/***** Start box and table *****/
|
||||
fprintf (Gbl.F.Out,"<tr>"
|
||||
"<td class=\"%s RIGHT_TOP\">"
|
||||
Tbl_StartRow ();
|
||||
fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_TOP\">"
|
||||
"%s:"
|
||||
"</td>"
|
||||
"<td class=\"LEFT_TOP\">",
|
||||
|
@ -1194,8 +1194,8 @@ static void Att_ShowLstGrpsToEditAttEvent (long AttCod)
|
|||
NULL,Box_NOT_CLOSABLE,0);
|
||||
|
||||
/***** First row: checkbox to select the whole course *****/
|
||||
fprintf (Gbl.F.Out,"<tr>"
|
||||
"<td colspan=\"7\" class=\"DAT LEFT_MIDDLE\">"
|
||||
Tbl_StartRow ();
|
||||
fprintf (Gbl.F.Out,"<td colspan=\"7\" class=\"DAT LEFT_MIDDLE\">"
|
||||
"<label>"
|
||||
"<input type=\"checkbox\" id=\"WholeCrs\" name=\"WholeCrs\" value=\"Y\"");
|
||||
if (!Att_CheckIfAttEventIsAssociatedToGrps (AttCod))
|
||||
|
@ -1203,9 +1203,9 @@ static void Att_ShowLstGrpsToEditAttEvent (long AttCod)
|
|||
fprintf (Gbl.F.Out," onclick=\"uncheckChildren(this,'GrpCods')\" />"
|
||||
"%s %s"
|
||||
"</label>"
|
||||
"</td>"
|
||||
"</tr>",
|
||||
"</td>",
|
||||
Txt_The_whole_course,Gbl.Hierarchy.Crs.ShrtName);
|
||||
Tbl_EndRow ();
|
||||
|
||||
/***** List the groups for each group type *****/
|
||||
for (NumGrpTyp = 0;
|
||||
|
@ -1217,8 +1217,8 @@ static void Att_ShowLstGrpsToEditAttEvent (long AttCod)
|
|||
|
||||
/***** End table and box *****/
|
||||
Box_EndBoxTable ();
|
||||
fprintf (Gbl.F.Out,"</td>"
|
||||
"</tr>");
|
||||
fprintf (Gbl.F.Out,"</td>");
|
||||
Tbl_EndRow ();
|
||||
}
|
||||
|
||||
/***** Free list of groups types and groups in this course *****/
|
||||
|
@ -1878,8 +1878,8 @@ static void Att_ListAttOnlyMeAsStudent (struct AttendanceEvent *Att)
|
|||
Tbl_StartTableWideMarginPadding (2);
|
||||
|
||||
/* Header */
|
||||
fprintf (Gbl.F.Out,"<tr>"
|
||||
"<th></th>"
|
||||
Tbl_StartRow ();
|
||||
fprintf (Gbl.F.Out,"<th></th>"
|
||||
"<th></th>"
|
||||
"<th></th>");
|
||||
if (Gbl.Usrs.Listing.WithPhotos)
|
||||
|
@ -1892,11 +1892,11 @@ static void Att_ListAttOnlyMeAsStudent (struct AttendanceEvent *Att)
|
|||
"</th>"
|
||||
"<th class=\"LEFT_MIDDLE\">"
|
||||
"%s"
|
||||
"</th>"
|
||||
"</tr>",
|
||||
"</th>",
|
||||
Txt_ROLES_SINGUL_Abc[Rol_STD][Usr_SEX_UNKNOWN],
|
||||
Txt_Student_comment,
|
||||
Txt_Teachers_comment);
|
||||
Tbl_EndRow ();
|
||||
|
||||
/* List of students (only me) */
|
||||
Att_WriteRowUsrToCallTheRoll (1,&Gbl.Usrs.Me.UsrDat,Att);
|
||||
|
@ -1965,8 +1965,8 @@ static void Att_ListAttStudents (struct AttendanceEvent *Att)
|
|||
Tbl_StartTableWideMarginPadding (2);
|
||||
|
||||
/* Header */
|
||||
fprintf (Gbl.F.Out,"<tr>"
|
||||
"<th></th>"
|
||||
Tbl_StartRow ();
|
||||
fprintf (Gbl.F.Out,"<th></th>"
|
||||
"<th></th>"
|
||||
"<th></th>");
|
||||
if (Gbl.Usrs.Listing.WithPhotos)
|
||||
|
@ -1979,11 +1979,11 @@ static void Att_ListAttStudents (struct AttendanceEvent *Att)
|
|||
"</th>"
|
||||
"<th class=\"LEFT_MIDDLE\">"
|
||||
"%s"
|
||||
"</th>"
|
||||
"</tr>",
|
||||
"</th>",
|
||||
Txt_ROLES_SINGUL_Abc[Rol_STD][Usr_SEX_UNKNOWN],
|
||||
Txt_Student_comment,
|
||||
Txt_Teachers_comment);
|
||||
Tbl_EndRow ();
|
||||
|
||||
/* List of students */
|
||||
for (NumUsr = 0, Gbl.RowEvenOdd = 0;
|
||||
|
@ -2079,8 +2079,8 @@ static void Att_WriteRowUsrToCallTheRoll (unsigned NumUsr,
|
|||
Present = Att_CheckIfUsrIsPresentInAttEventAndGetComments (Att->AttCod,UsrDat->UsrCod,CommentStd,CommentTch);
|
||||
|
||||
/***** Icon to show if the user is already present *****/
|
||||
fprintf (Gbl.F.Out,"<tr>"
|
||||
"<td class=\"BT%u\">"
|
||||
Tbl_StartRow ();
|
||||
fprintf (Gbl.F.Out,"<td class=\"BT%u\">"
|
||||
"<label for=\"Std%u\">",
|
||||
Gbl.RowEvenOdd,NumUsr);
|
||||
Att_PutCheckOrCross (Present);
|
||||
|
@ -2172,8 +2172,8 @@ static void Att_WriteRowUsrToCallTheRoll (unsigned NumUsr,
|
|||
CommentTch,Cns_MAX_BYTES_TEXT,false);
|
||||
fprintf (Gbl.F.Out,"%s",CommentTch);
|
||||
}
|
||||
fprintf (Gbl.F.Out,"</td>"
|
||||
"</tr>");
|
||||
fprintf (Gbl.F.Out,"</td>");
|
||||
Tbl_EndRow ();
|
||||
|
||||
Gbl.RowEvenOdd = 1 - Gbl.RowEvenOdd;
|
||||
}
|
||||
|
@ -3104,16 +3104,16 @@ static void Att_ListEventsToSelect (Att_TypeOfView_t TypeOfView)
|
|||
Tbl_StartTableWidePadding (2);
|
||||
|
||||
/***** Heading row *****/
|
||||
fprintf (Gbl.F.Out,"<tr>"
|
||||
"<th colspan=\"4\" class=\"LEFT_MIDDLE\">"
|
||||
Tbl_StartRow ();
|
||||
fprintf (Gbl.F.Out,"<th colspan=\"4\" class=\"LEFT_MIDDLE\">"
|
||||
"%s"
|
||||
"</th>"
|
||||
"<th class=\"RIGHT_MIDDLE\">"
|
||||
"%s"
|
||||
"</th>"
|
||||
"</tr>",
|
||||
"</th>",
|
||||
Txt_Event,
|
||||
Txt_ROLES_PLURAL_Abc[Rol_STD][Usr_SEX_UNKNOWN]);
|
||||
Tbl_EndRow ();
|
||||
|
||||
/***** List the events *****/
|
||||
for (NumAttEvent = 0, UniqueId = 1, Gbl.RowEvenOdd = 0;
|
||||
|
@ -3125,8 +3125,8 @@ static void Att_ListEventsToSelect (Att_TypeOfView_t TypeOfView)
|
|||
Att_GetNumStdsTotalWhoAreInAttEvent (&Gbl.AttEvents.Lst[NumAttEvent]);
|
||||
|
||||
/* Write a row for this event */
|
||||
fprintf (Gbl.F.Out,"<tr>"
|
||||
"<td class=\"DAT CENTER_TOP COLOR%u\">"
|
||||
Tbl_StartRow ();
|
||||
fprintf (Gbl.F.Out,"<td class=\"DAT CENTER_TOP COLOR%u\">"
|
||||
"<input type=\"checkbox\""
|
||||
" id=\"Att%u\" name=\"AttCods\" value=\"%ld\"",
|
||||
Gbl.RowEvenOdd,
|
||||
|
@ -3153,8 +3153,7 @@ static void Att_ListEventsToSelect (Att_TypeOfView_t TypeOfView)
|
|||
"</td>"
|
||||
"<td class=\"DAT RIGHT_TOP COLOR%u\">"
|
||||
"%u"
|
||||
"</td>"
|
||||
"</tr>",
|
||||
"</td>",
|
||||
Gbl.RowEvenOdd,
|
||||
NumAttEvent,NumAttEvent + 1,
|
||||
Gbl.RowEvenOdd,
|
||||
|
@ -3165,19 +3164,20 @@ static void Att_ListEventsToSelect (Att_TypeOfView_t TypeOfView)
|
|||
Gbl.AttEvents.Lst[NumAttEvent].Title,
|
||||
Gbl.RowEvenOdd,
|
||||
Gbl.AttEvents.Lst[NumAttEvent].NumStdsTotal);
|
||||
Tbl_EndRow ();
|
||||
}
|
||||
|
||||
/***** Put button to refresh *****/
|
||||
if (NormalView)
|
||||
{
|
||||
fprintf (Gbl.F.Out,"<tr>"
|
||||
"<td colspan=\"5\" class=\"CENTER_MIDDLE\">");
|
||||
Tbl_StartRow ();
|
||||
fprintf (Gbl.F.Out,"<td colspan=\"5\" class=\"CENTER_MIDDLE\">");
|
||||
Frm_LinkFormSubmitAnimated (Txt_Update_attendance,
|
||||
The_ClassFormInBoxBold[Gbl.Prefs.Theme],
|
||||
NULL);
|
||||
Ico_PutCalculateIconWithText (Txt_Update_attendance);
|
||||
fprintf (Gbl.F.Out,"</td>"
|
||||
"</tr>");
|
||||
fprintf (Gbl.F.Out,"</td>");
|
||||
Tbl_EndRow ();
|
||||
}
|
||||
|
||||
/***** End table *****/
|
||||
|
@ -3254,8 +3254,8 @@ static void Att_ListUsrsAttendanceTable (Att_TypeOfView_t TypeOfView,
|
|||
/***** Last row with the total of users present in each event *****/
|
||||
if (NumUsrsInList > 1)
|
||||
{
|
||||
fprintf (Gbl.F.Out,"<tr>"
|
||||
"<td colspan=\"%u\" class=\"DAT_N_LINE_TOP RIGHT_MIDDLE\">"
|
||||
Tbl_StartRow ();
|
||||
fprintf (Gbl.F.Out,"<td colspan=\"%u\" class=\"DAT_N_LINE_TOP RIGHT_MIDDLE\">"
|
||||
"%s:"
|
||||
"</td>",
|
||||
Gbl.Usrs.Listing.WithPhotos ? 4 :
|
||||
|
@ -3274,9 +3274,9 @@ static void Att_ListUsrsAttendanceTable (Att_TypeOfView_t TypeOfView,
|
|||
}
|
||||
fprintf (Gbl.F.Out,"<td class=\"DAT_N_LINE_TOP RIGHT_MIDDLE\">"
|
||||
"%u"
|
||||
"</td>"
|
||||
"</tr>",
|
||||
"</td>",
|
||||
Total);
|
||||
Tbl_EndRow ();
|
||||
}
|
||||
|
||||
/***** End table *****/
|
||||
|
@ -3304,8 +3304,8 @@ static void Att_WriteTableHeadSeveralAttEvents (void)
|
|||
unsigned NumAttEvent;
|
||||
char StrNumAttEvent[10 + 1];
|
||||
|
||||
fprintf (Gbl.F.Out,"<tr>"
|
||||
"<th colspan=\"%u\" class=\"LEFT_MIDDLE\">"
|
||||
Tbl_StartRow ();
|
||||
fprintf (Gbl.F.Out,"<th colspan=\"%u\" class=\"LEFT_MIDDLE\">"
|
||||
"%s"
|
||||
"</th>",
|
||||
Gbl.Usrs.Listing.WithPhotos ? 4 :
|
||||
|
@ -3335,9 +3335,9 @@ static void Att_WriteTableHeadSeveralAttEvents (void)
|
|||
|
||||
fprintf (Gbl.F.Out,"<th class=\"RIGHT_MIDDLE\">"
|
||||
"%s"
|
||||
"</th>"
|
||||
"</tr>",
|
||||
"</th>",
|
||||
Txt_Attendance);
|
||||
Tbl_EndRow ();
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -3353,8 +3353,8 @@ static void Att_WriteRowUsrSeveralAttEvents (unsigned NumUsr,struct UsrData *Usr
|
|||
unsigned NumTimesPresent;
|
||||
|
||||
/***** Write number of user in the list *****/
|
||||
fprintf (Gbl.F.Out,"<tr>"
|
||||
"<td class=\"%s RIGHT_MIDDLE COLOR%u\">"
|
||||
Tbl_StartRow ();
|
||||
fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_MIDDLE COLOR%u\">"
|
||||
"%u"
|
||||
"</td>",
|
||||
UsrDat->Accepted ? "DAT_N" :
|
||||
|
@ -3419,10 +3419,10 @@ static void Att_WriteRowUsrSeveralAttEvents (unsigned NumUsr,struct UsrData *Usr
|
|||
/***** Last column with the number of times this user is present *****/
|
||||
fprintf (Gbl.F.Out,"<td class=\"DAT_N RIGHT_MIDDLE COLOR%u\">"
|
||||
"%u"
|
||||
"</td>"
|
||||
"</tr>",
|
||||
"</td>",
|
||||
Gbl.RowEvenOdd,
|
||||
NumTimesPresent);
|
||||
Tbl_EndRow ();
|
||||
|
||||
Gbl.RowEvenOdd = 1 - Gbl.RowEvenOdd;
|
||||
}
|
||||
|
@ -3516,8 +3516,8 @@ static void Att_ListAttEventsForAStd (unsigned NumUsr,struct UsrData *UsrDat)
|
|||
|
||||
/***** Write number of student in the list *****/
|
||||
NumUsr++;
|
||||
fprintf (Gbl.F.Out,"<tr>"
|
||||
"<td class=\"%s RIGHT_MIDDLE COLOR%u\">"
|
||||
Tbl_StartRow ();
|
||||
fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_MIDDLE COLOR%u\">"
|
||||
"%u:"
|
||||
"</td>",
|
||||
UsrDat->Accepted ? "DAT_N" :
|
||||
|
@ -3538,8 +3538,8 @@ static void Att_ListAttEventsForAStd (unsigned NumUsr,struct UsrData *UsrDat)
|
|||
fprintf (Gbl.F.Out,"<td class=\"LEFT_MIDDLE COLOR%u\">",
|
||||
Gbl.RowEvenOdd);
|
||||
Tbl_StartTable ();
|
||||
fprintf (Gbl.F.Out,"<tr>"
|
||||
"<td class=\"%s LEFT_MIDDLE\">",
|
||||
Tbl_StartRow ();
|
||||
fprintf (Gbl.F.Out,"<td class=\"%s LEFT_MIDDLE\">",
|
||||
UsrDat->Accepted ? "DAT_N" :
|
||||
"DAT");
|
||||
ID_WriteUsrIDs (UsrDat,NULL);
|
||||
|
@ -3552,12 +3552,12 @@ static void Att_ListAttEventsForAStd (unsigned NumUsr,struct UsrData *UsrDat)
|
|||
UsrDat->Surname1);
|
||||
if (UsrDat->Surname2[0])
|
||||
fprintf (Gbl.F.Out," %s",UsrDat->Surname2);
|
||||
fprintf (Gbl.F.Out,", %s</td>"
|
||||
"</tr>",
|
||||
fprintf (Gbl.F.Out,", %s</td>",
|
||||
UsrDat->FirstName);
|
||||
Tbl_EndRow ();
|
||||
Tbl_EndTable ();
|
||||
fprintf (Gbl.F.Out,"</td>"
|
||||
"</tr>");
|
||||
fprintf (Gbl.F.Out,"</td>");
|
||||
Tbl_EndRow ();
|
||||
|
||||
/***** List the events with students *****/
|
||||
for (NumAttEvent = 0, UniqueId = 1;
|
||||
|
@ -3577,7 +3577,7 @@ static void Att_ListAttEventsForAStd (unsigned NumUsr,struct UsrData *UsrDat)
|
|||
Gbl.AttEvents.Lst[NumAttEvent].CommentTchVisible);
|
||||
|
||||
/***** Write a row for this event *****/
|
||||
fprintf (Gbl.F.Out,"<tr>");
|
||||
Tbl_StartRow ();
|
||||
Tbl_PutEmptyCells (1);
|
||||
fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_TOP COLOR%u\">"
|
||||
"%u:"
|
||||
|
@ -3597,19 +3597,19 @@ static void Att_ListAttEventsForAStd (unsigned NumUsr,struct UsrData *UsrDat)
|
|||
"writeLocalDateHMSFromUTC('att_date_start_%u_%u',%ld,"
|
||||
"%u,', ','%s',true,true,0x7);"
|
||||
"</script>"
|
||||
"</td>"
|
||||
"</tr>",
|
||||
"</td>",
|
||||
Gbl.RowEvenOdd,
|
||||
NumUsr,UniqueId,
|
||||
Gbl.AttEvents.Lst[NumAttEvent].Title,
|
||||
NumUsr,UniqueId,
|
||||
Gbl.AttEvents.Lst[NumAttEvent].TimeUTC[Att_START_TIME],
|
||||
(unsigned) Gbl.Prefs.DateFormat,Txt_Today);
|
||||
Tbl_EndRow ();
|
||||
|
||||
/***** Write comments for this student *****/
|
||||
if (ShowCommentStd || ShowCommentTch)
|
||||
{
|
||||
fprintf (Gbl.F.Out,"<tr>");
|
||||
Tbl_StartRow ();
|
||||
Tbl_PutEmptyCells (2);
|
||||
fprintf (Gbl.F.Out,"<td class=\"BT%u\"></td>"
|
||||
"<td class=\"DAT LEFT_MIDDLE COLOR%u\">"
|
||||
|
@ -3634,8 +3634,8 @@ static void Att_ListAttEventsForAStd (unsigned NumUsr,struct UsrData *UsrDat)
|
|||
CommentTch);
|
||||
}
|
||||
fprintf (Gbl.F.Out,"</dl>"
|
||||
"</td>"
|
||||
"</tr>");
|
||||
"</td>");
|
||||
Tbl_EndRow ();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -421,8 +421,8 @@ static void Ban_ListBannersForEdition (void)
|
|||
Frm_SetAnchorStr (Ban->BanCod,&Anchor);
|
||||
|
||||
/* Put icon to remove banner */
|
||||
fprintf (Gbl.F.Out,"<tr>"
|
||||
"<td class=\"BM\">");
|
||||
Tbl_StartRow ();
|
||||
fprintf (Gbl.F.Out,"<td class=\"BM\">");
|
||||
Ico_PutContextualIconToRemove (ActRemBan,Ban_PutParamBanCodToEdit);
|
||||
fprintf (Gbl.F.Out,"</td>");
|
||||
|
||||
|
@ -488,8 +488,8 @@ static void Ban_ListBannersForEdition (void)
|
|||
" onchange=\"document.getElementById('%s').submit();\" />",
|
||||
Cns_MAX_CHARS_WWW,Ban->WWW,Gbl.Form.Id);
|
||||
Frm_EndForm ();
|
||||
fprintf (Gbl.F.Out,"</td>"
|
||||
"</tr>");
|
||||
fprintf (Gbl.F.Out,"</td>");
|
||||
Tbl_EndRow ();
|
||||
|
||||
/* Free anchor string */
|
||||
Frm_FreeAnchorStr (Anchor);
|
||||
|
@ -864,8 +864,8 @@ static void Ban_PutFormToCreateBanner (void)
|
|||
Ban_PutHeadBanners ();
|
||||
|
||||
/***** Banner code *****/
|
||||
fprintf (Gbl.F.Out,"<tr>"
|
||||
"<td class=\"BM\"></td>"
|
||||
Tbl_StartRow ();
|
||||
fprintf (Gbl.F.Out,"<td class=\"BM\"></td>"
|
||||
"<td class=\"BM\"></td>"
|
||||
"<td></td>");
|
||||
|
||||
|
@ -901,9 +901,9 @@ static void Ban_PutFormToCreateBanner (void)
|
|||
" maxlength=\"%u\" value=\"%s\""
|
||||
" class=\"INPUT_WWW\""
|
||||
" required=\"required\" />"
|
||||
"</td>"
|
||||
"</tr>",
|
||||
"</td>",
|
||||
Cns_MAX_CHARS_WWW,Ban_EditingBan->WWW);
|
||||
Tbl_EndRow ();
|
||||
|
||||
/***** End table, send button and end box *****/
|
||||
Box_EndBoxTableWithButton (Btn_CREATE_BUTTON,Txt_Create_banner);
|
||||
|
@ -924,20 +924,20 @@ static void Ban_PutHeadBanners (void)
|
|||
extern const char *Txt_Image;
|
||||
extern const char *Txt_WWW;
|
||||
|
||||
fprintf (Gbl.F.Out,"<tr>"
|
||||
"<th class=\"BM\"></th>"
|
||||
Tbl_StartRow ();
|
||||
fprintf (Gbl.F.Out,"<th class=\"BM\"></th>"
|
||||
"<th class=\"BM\"></th>"
|
||||
"<th class=\"RIGHT_MIDDLE\">%s</th>"
|
||||
"<th class=\"LEFT_MIDDLE\">%s</th>"
|
||||
"<th class=\"LEFT_MIDDLE\">%s</th>"
|
||||
"<th class=\"LEFT_MIDDLE\">%s</th>"
|
||||
"<th class=\"LEFT_MIDDLE\">%s</th>"
|
||||
"</tr>",
|
||||
"<th class=\"LEFT_MIDDLE\">%s</th>",
|
||||
Txt_Code,
|
||||
Txt_Short_name,
|
||||
Txt_Full_name,
|
||||
Txt_Image,
|
||||
Txt_WWW);
|
||||
Tbl_EndRow ();
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
144
swad_centre.c
144
swad_centre.c
|
@ -180,16 +180,16 @@ void Ctr_SeeCtrWithPendingDegs (void)
|
|||
Hlp_SYSTEM_Hierarchy_pending,Box_NOT_CLOSABLE,2);
|
||||
|
||||
/***** Wrtie heading *****/
|
||||
fprintf (Gbl.F.Out,"<tr>"
|
||||
"<th class=\"LEFT_MIDDLE\">"
|
||||
Tbl_StartRow ();
|
||||
fprintf (Gbl.F.Out,"<th class=\"LEFT_MIDDLE\">"
|
||||
"%s"
|
||||
"</th>"
|
||||
"<th class=\"RIGHT_MIDDLE\">"
|
||||
"%s"
|
||||
"</th>"
|
||||
"</tr>",
|
||||
"</th>",
|
||||
Txt_Centre,
|
||||
Txt_Degrees_ABBREVIATION);
|
||||
Tbl_EndRow ();
|
||||
|
||||
/***** List the centres *****/
|
||||
for (NumCtr = 0;
|
||||
|
@ -208,8 +208,8 @@ void Ctr_SeeCtrWithPendingDegs (void)
|
|||
Ctr_GetDataOfCentreByCod (&Ctr);
|
||||
|
||||
/* Centre logo and full name */
|
||||
fprintf (Gbl.F.Out,"<tr>"
|
||||
"<td class=\"LEFT_MIDDLE %s\">",
|
||||
Tbl_StartRow ();
|
||||
fprintf (Gbl.F.Out,"<td class=\"LEFT_MIDDLE %s\">",
|
||||
BgColor);
|
||||
Ctr_DrawCentreLogoAndNameWithLink (&Ctr,ActSeeDeg,
|
||||
"DAT_NOBR","CENTER_MIDDLE");
|
||||
|
@ -218,11 +218,11 @@ void Ctr_SeeCtrWithPendingDegs (void)
|
|||
/* Number of pending degrees (row[1]) */
|
||||
fprintf (Gbl.F.Out,"<td class=\"DAT RIGHT_MIDDLE %s\">"
|
||||
"%s"
|
||||
"</td>"
|
||||
"</tr>",
|
||||
"</td>",
|
||||
BgColor,row[1]);
|
||||
|
||||
Gbl.RowEvenOdd = 1 - Gbl.RowEvenOdd;
|
||||
Tbl_EndRow ();
|
||||
}
|
||||
|
||||
/***** End table and box *****/
|
||||
|
@ -408,8 +408,8 @@ static void Ctr_Configuration (bool PrintView)
|
|||
Tbl_StartTableWidePadding (2);
|
||||
|
||||
/***** Institution *****/
|
||||
fprintf (Gbl.F.Out,"<tr>"
|
||||
"<td class=\"RIGHT_MIDDLE\">"
|
||||
Tbl_StartRow ();
|
||||
fprintf (Gbl.F.Out,"<td class=\"RIGHT_MIDDLE\">"
|
||||
"<label for=\"OthInsCod\" class=\"%s\">%s:</label>"
|
||||
"</td>"
|
||||
"<td class=\"DAT_N LEFT_MIDDLE\">",
|
||||
|
@ -446,12 +446,12 @@ static void Ctr_Configuration (bool PrintView)
|
|||
else // I can not move centre to another institution
|
||||
fprintf (Gbl.F.Out,"%s",Gbl.Hierarchy.Ins.FullName);
|
||||
|
||||
fprintf (Gbl.F.Out,"</td>"
|
||||
"</tr>");
|
||||
fprintf (Gbl.F.Out,"</td>");
|
||||
Tbl_EndRow ();
|
||||
|
||||
/***** Centre full name *****/
|
||||
fprintf (Gbl.F.Out,"<tr>"
|
||||
"<td class=\"RIGHT_MIDDLE\">"
|
||||
Tbl_StartRow ();
|
||||
fprintf (Gbl.F.Out,"<td class=\"RIGHT_MIDDLE\">"
|
||||
"<label for=\"FullName\" class=\"%s\">%s:</label>"
|
||||
"</td>"
|
||||
"<td class=\"DAT_N LEFT_MIDDLE\">",
|
||||
|
@ -475,12 +475,12 @@ static void Ctr_Configuration (bool PrintView)
|
|||
}
|
||||
else // I can not edit centre full name
|
||||
fprintf (Gbl.F.Out,"%s",Gbl.Hierarchy.Ctr.FullName);
|
||||
fprintf (Gbl.F.Out,"</td>"
|
||||
"</tr>");
|
||||
fprintf (Gbl.F.Out,"</td>");
|
||||
Tbl_EndRow ();
|
||||
|
||||
/***** Centre short name *****/
|
||||
fprintf (Gbl.F.Out,"<tr>"
|
||||
"<td class=\"RIGHT_MIDDLE\">"
|
||||
Tbl_StartRow ();
|
||||
fprintf (Gbl.F.Out,"<td class=\"RIGHT_MIDDLE\">"
|
||||
"<label for=\"ShortName\" class=\"%s\">%s:</label>"
|
||||
"</td>"
|
||||
"<td class=\"DAT_N LEFT_MIDDLE\">",
|
||||
|
@ -504,14 +504,14 @@ static void Ctr_Configuration (bool PrintView)
|
|||
}
|
||||
else // I can not edit centre short name
|
||||
fprintf (Gbl.F.Out,"%s",Gbl.Hierarchy.Ctr.ShrtName);
|
||||
fprintf (Gbl.F.Out,"</td>"
|
||||
"</tr>");
|
||||
fprintf (Gbl.F.Out,"</td>");
|
||||
Tbl_EndRow ();
|
||||
|
||||
/***** Place *****/
|
||||
Plc.PlcCod = Gbl.Hierarchy.Ctr.PlcCod;
|
||||
Plc_GetDataOfPlaceByCod (&Plc);
|
||||
fprintf (Gbl.F.Out,"<tr>"
|
||||
"<td class=\"%s RIGHT_MIDDLE\">"
|
||||
Tbl_StartRow ();
|
||||
fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_MIDDLE\">"
|
||||
"%s:"
|
||||
"</td>"
|
||||
"<td class=\"DAT LEFT_MIDDLE\">",
|
||||
|
@ -551,12 +551,12 @@ static void Ctr_Configuration (bool PrintView)
|
|||
}
|
||||
else // I can not change centre place
|
||||
fprintf (Gbl.F.Out,"%s",Plc.FullName);
|
||||
fprintf (Gbl.F.Out,"</td>"
|
||||
"</tr>");
|
||||
fprintf (Gbl.F.Out,"</td>");
|
||||
Tbl_EndRow ();
|
||||
|
||||
/***** Centre WWW *****/
|
||||
fprintf (Gbl.F.Out,"<tr>"
|
||||
"<td class=\"RIGHT_MIDDLE\">"
|
||||
Tbl_StartRow ();
|
||||
fprintf (Gbl.F.Out,"<td class=\"RIGHT_MIDDLE\">"
|
||||
"<label for=\"WWW\" class=\"%s\">%s:</label>"
|
||||
"</td>"
|
||||
"<td class=\"LEFT_MIDDLE\">",
|
||||
|
@ -586,20 +586,19 @@ static void Ctr_Configuration (bool PrintView)
|
|||
"</div>",
|
||||
Gbl.Hierarchy.Ctr.WWW,
|
||||
Gbl.Hierarchy.Ctr.WWW);
|
||||
fprintf (Gbl.F.Out,"</td>"
|
||||
"</tr>");
|
||||
fprintf (Gbl.F.Out,"</td>");
|
||||
Tbl_EndRow ();
|
||||
|
||||
/***** Shortcut to the centre *****/
|
||||
fprintf (Gbl.F.Out,"<tr>"
|
||||
"<td class=\"%s RIGHT_MIDDLE\">"
|
||||
Tbl_StartRow ();
|
||||
fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_MIDDLE\">"
|
||||
"%s:"
|
||||
"</td>"
|
||||
"<td class=\"DAT LEFT_MIDDLE\">"
|
||||
"<a href=\"%s/%s?ctr=%ld\" class=\"DAT\" target=\"_blank\">"
|
||||
"%s/%s?ctr=%ld"
|
||||
"</a>"
|
||||
"</td>"
|
||||
"</tr>",
|
||||
"</td>",
|
||||
The_ClassFormInBox[Gbl.Prefs.Theme],
|
||||
Txt_Shortcut,
|
||||
Cfg_URL_SWAD_CGI,
|
||||
|
@ -608,39 +607,40 @@ static void Ctr_Configuration (bool PrintView)
|
|||
Cfg_URL_SWAD_CGI,
|
||||
Lan_STR_LANG_ID[Gbl.Prefs.Language],
|
||||
Gbl.Hierarchy.Ctr.CtrCod);
|
||||
Tbl_EndRow ();
|
||||
|
||||
if (PrintView)
|
||||
{
|
||||
/***** QR code with link to the centre *****/
|
||||
fprintf (Gbl.F.Out,"<tr>"
|
||||
"<td class=\"%s RIGHT_MIDDLE\">"
|
||||
Tbl_StartRow ();
|
||||
fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_MIDDLE\">"
|
||||
"%s:"
|
||||
"</td>"
|
||||
"<td class=\"DAT LEFT_MIDDLE\">",
|
||||
The_ClassFormInBox[Gbl.Prefs.Theme],
|
||||
Txt_QR_code);
|
||||
QR_LinkTo (250,"ctr",Gbl.Hierarchy.Ctr.CtrCod);
|
||||
fprintf (Gbl.F.Out,"</td>"
|
||||
"</tr>");
|
||||
fprintf (Gbl.F.Out,"</td>");
|
||||
Tbl_EndRow ();
|
||||
}
|
||||
else
|
||||
{
|
||||
/***** Number of users who claim to belong to this centre *****/
|
||||
fprintf (Gbl.F.Out,"<tr>"
|
||||
"<td class=\"%s RIGHT_MIDDLE\">"
|
||||
Tbl_StartRow ();
|
||||
fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_MIDDLE\">"
|
||||
"%s:"
|
||||
"</td>"
|
||||
"<td class=\"DAT LEFT_MIDDLE\">"
|
||||
"%u"
|
||||
"</td>"
|
||||
"</tr>",
|
||||
"</td>",
|
||||
The_ClassFormInBox[Gbl.Prefs.Theme],
|
||||
Txt_Users_of_the_centre,
|
||||
Usr_GetNumUsrsWhoClaimToBelongToCtr (Gbl.Hierarchy.Ctr.CtrCod));
|
||||
Tbl_EndRow ();
|
||||
|
||||
/***** Number of degrees *****/
|
||||
fprintf (Gbl.F.Out,"<tr>"
|
||||
"<td class=\"%s RIGHT_MIDDLE\">"
|
||||
Tbl_StartRow ();
|
||||
fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_MIDDLE\">"
|
||||
"%s:"
|
||||
"</td>"
|
||||
"<td class=\"LEFT_MIDDLE\">",
|
||||
|
@ -658,21 +658,21 @@ static void Ctr_Configuration (bool PrintView)
|
|||
Deg_GetNumDegsInCtr (Gbl.Hierarchy.Ctr.CtrCod));
|
||||
Frm_EndForm ();
|
||||
|
||||
fprintf (Gbl.F.Out,"</td>"
|
||||
"</tr>");
|
||||
fprintf (Gbl.F.Out,"</td>");
|
||||
Tbl_EndRow ();
|
||||
|
||||
/***** Number of courses *****/
|
||||
fprintf (Gbl.F.Out,"<tr>"
|
||||
"<td class=\"%s RIGHT_MIDDLE\">"
|
||||
Tbl_StartRow ();
|
||||
fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_MIDDLE\">"
|
||||
"%s:"
|
||||
"</td>"
|
||||
"<td class=\"DAT LEFT_MIDDLE\">"
|
||||
"%u"
|
||||
"</td>"
|
||||
"</tr>",
|
||||
"</td>",
|
||||
The_ClassFormInBox[Gbl.Prefs.Theme],
|
||||
Txt_Courses,
|
||||
Crs_GetNumCrssInCtr (Gbl.Hierarchy.Ctr.CtrCod));
|
||||
Tbl_EndRow ();
|
||||
|
||||
/***** Number of users in courses of this centre *****/
|
||||
Ctr_ShowNumUsrsInCrssOfCtr (Rol_TCH);
|
||||
|
@ -747,18 +747,18 @@ static void Ctr_ShowNumUsrsInCrssOfCtr (Rol_Role_t Role)
|
|||
extern const char *Txt_Users_in_courses;
|
||||
extern const char *Txt_ROLES_PLURAL_Abc[Rol_NUM_ROLES][Usr_NUM_SEXS];
|
||||
|
||||
fprintf (Gbl.F.Out,"<tr>"
|
||||
"<td class=\"%s RIGHT_MIDDLE\">"
|
||||
Tbl_StartRow ();
|
||||
fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_MIDDLE\">"
|
||||
"%s:"
|
||||
"</td>"
|
||||
"<td class=\"DAT LEFT_MIDDLE\">"
|
||||
"%u"
|
||||
"</td>"
|
||||
"</tr>",
|
||||
"</td>",
|
||||
The_ClassFormInBox[Gbl.Prefs.Theme],
|
||||
(Role == Rol_UNK) ? Txt_Users_in_courses :
|
||||
Txt_ROLES_PLURAL_Abc[Role][Usr_SEX_UNKNOWN],
|
||||
Usr_GetNumUsrsInCrssOfCtr (Role,Gbl.Hierarchy.Ctr.CtrCod));
|
||||
Tbl_EndRow ();
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -905,8 +905,8 @@ static void Ctr_ListOneCentreForSeeing (struct Centre *Ctr,unsigned NumCtr)
|
|||
Gbl.ColorRows[Gbl.RowEvenOdd];
|
||||
|
||||
/***** Number of centre in this list *****/
|
||||
fprintf (Gbl.F.Out,"<tr>"
|
||||
"<td class=\"%s RIGHT_MIDDLE %s\">"
|
||||
Tbl_StartRow ();
|
||||
fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_MIDDLE %s\">"
|
||||
"%u"
|
||||
"</td>",
|
||||
TxtClassNormal,BgColor,
|
||||
|
@ -959,8 +959,8 @@ static void Ctr_ListOneCentreForSeeing (struct Centre *Ctr,unsigned NumCtr)
|
|||
TxtClassNormal,BgColor);
|
||||
if (StatusTxt != Ctr_STATUS_ACTIVE) // If active ==> do not show anything
|
||||
fprintf (Gbl.F.Out,"%s",Txt_CENTRE_STATUS[StatusTxt]);
|
||||
fprintf (Gbl.F.Out,"</td>"
|
||||
"</tr>");
|
||||
fprintf (Gbl.F.Out,"</td>");
|
||||
Tbl_EndRow ();
|
||||
|
||||
Gbl.RowEvenOdd = 1 - Gbl.RowEvenOdd;
|
||||
}
|
||||
|
@ -1496,8 +1496,8 @@ static void Ctr_ListCentresForEdition (void)
|
|||
ICanEdit = Ctr_CheckIfICanEditACentre (Ctr);
|
||||
|
||||
/* Put icon to remove centre */
|
||||
fprintf (Gbl.F.Out,"<tr>"
|
||||
"<td class=\"BM\">");
|
||||
Tbl_StartRow ();
|
||||
fprintf (Gbl.F.Out,"<td class=\"BM\">");
|
||||
if (Ctr->Degs.Num ||
|
||||
Ctr->NumUsrsWhoClaimToBelongToCtr ||
|
||||
Ctr->NumUsrs || // Centre has degrees or users ==> deletion forbidden
|
||||
|
@ -1667,8 +1667,8 @@ static void Ctr_ListCentresForEdition (void)
|
|||
}
|
||||
else if (StatusTxt != Ctr_STATUS_ACTIVE) // If active ==> do not show anything
|
||||
fprintf (Gbl.F.Out,"%s",Txt_CENTRE_STATUS[StatusTxt]);
|
||||
fprintf (Gbl.F.Out,"</td>"
|
||||
"</tr>");
|
||||
fprintf (Gbl.F.Out,"</td>");
|
||||
Tbl_EndRow ();
|
||||
}
|
||||
|
||||
/***** End table *****/
|
||||
|
@ -2521,8 +2521,8 @@ static void Ctr_PutFormToCreateCentre (void)
|
|||
Ctr_PutHeadCentresForEdition ();
|
||||
|
||||
/***** Column to remove centre, disabled here *****/
|
||||
fprintf (Gbl.F.Out,"<tr>"
|
||||
"<td class=\"BM\"></td>");
|
||||
Tbl_StartRow ();
|
||||
fprintf (Gbl.F.Out,"<td class=\"BM\"></td>");
|
||||
|
||||
/***** Centre code *****/
|
||||
fprintf (Gbl.F.Out,"<td class=\"CODE\"></td>");
|
||||
|
@ -2599,8 +2599,8 @@ static void Ctr_PutFormToCreateCentre (void)
|
|||
|
||||
/***** Centre status *****/
|
||||
fprintf (Gbl.F.Out,"<td class=\"DAT LEFT_MIDDLE\">"
|
||||
"</td>"
|
||||
"</tr>");
|
||||
"</td>");
|
||||
Tbl_EndRow ();
|
||||
|
||||
/***** End table, send button and end box *****/
|
||||
Box_EndBoxTableWithButton (Btn_CREATE_BUTTON,Txt_Create_centre);
|
||||
|
@ -2623,8 +2623,8 @@ static void Ctr_PutHeadCentresForSeeing (bool OrderSelectable)
|
|||
extern const char *Txt_ROLES_PLURAL_BRIEF_Abc[Rol_NUM_ROLES];
|
||||
Ctr_Order_t Order;
|
||||
|
||||
fprintf (Gbl.F.Out,"<tr>"
|
||||
"<th></th>");
|
||||
Tbl_StartRow ();
|
||||
fprintf (Gbl.F.Out,"<th></th>");
|
||||
for (Order = Ctr_ORDER_BY_CENTRE;
|
||||
Order <= Ctr_ORDER_BY_NUM_TCHS;
|
||||
Order++)
|
||||
|
@ -2663,13 +2663,13 @@ static void Ctr_PutHeadCentresForSeeing (bool OrderSelectable)
|
|||
"%s+<br />%s"
|
||||
"</th>"
|
||||
"<th class=\"LEFT_MIDDLE\">"
|
||||
"</th>"
|
||||
"</tr>",
|
||||
"</th>",
|
||||
Txt_Place,
|
||||
Txt_Degrees_ABBREVIATION,
|
||||
Txt_Courses_ABBREVIATION,
|
||||
Txt_ROLES_PLURAL_BRIEF_Abc[Rol_TCH],
|
||||
Txt_ROLES_PLURAL_BRIEF_Abc[Rol_STD]);
|
||||
Tbl_EndRow ();
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -2688,8 +2688,8 @@ static void Ctr_PutHeadCentresForEdition (void)
|
|||
extern const char *Txt_ROLES_PLURAL_BRIEF_Abc[Rol_NUM_ROLES];
|
||||
extern const char *Txt_Requester;
|
||||
|
||||
fprintf (Gbl.F.Out,"<tr>"
|
||||
"<th></th>"
|
||||
Tbl_StartRow ();
|
||||
fprintf (Gbl.F.Out,"<th></th>"
|
||||
"<th class=\"RIGHT_MIDDLE\">"
|
||||
"%s"
|
||||
"</th>"
|
||||
|
@ -2719,8 +2719,7 @@ static void Ctr_PutHeadCentresForEdition (void)
|
|||
"%s"
|
||||
"</th>"
|
||||
"<th class=\"LEFT_MIDDLE\">"
|
||||
"</th>"
|
||||
"</tr>",
|
||||
"</th>",
|
||||
Txt_Code,
|
||||
Txt_Place,
|
||||
Txt_Short_name_of_the_centre,
|
||||
|
@ -2731,6 +2730,7 @@ static void Ctr_PutHeadCentresForEdition (void)
|
|||
Txt_ROLES_PLURAL_BRIEF_Abc[Rol_TCH],
|
||||
Txt_ROLES_PLURAL_BRIEF_Abc[Rol_STD],
|
||||
Txt_Requester);
|
||||
Tbl_EndRow ();
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
|
@ -487,12 +487,13 @@ enscript -2 --landscape --color --file-align=2 --highlight --line-numbers -o - *
|
|||
En OpenSWAD:
|
||||
ps2pdf source.ps destination.pdf
|
||||
*/
|
||||
#define Log_PLATFORM_VERSION "SWAD 19.30.6 (2019-10-03)"
|
||||
#define Log_PLATFORM_VERSION "SWAD 19.31 (2019-10-04)"
|
||||
#define CSS_FILE "swad19.29.css"
|
||||
#define JS_FILE "swad19.30.js"
|
||||
/*
|
||||
// TODO: Perico: poner un candado de bloqueo de creación/edición de proyectos (por ejemplo en asignaturas obsoletas)
|
||||
|
||||
Version 19.31 : Oct 04, 2019 Code refactoring in HTML tables. (246967 lines)
|
||||
Version 19.30.6: Oct 03, 2019 Code refactoring in HTML tables. (246928 lines)
|
||||
Version 19.30.5: Oct 03, 2019 Code refactoring in HTML tables. (246922 lines)
|
||||
Version 19.30.4: Oct 03, 2019 Code refactoring in HTML tables. (246897 lines)
|
||||
|
|
17
swad_chat.c
17
swad_chat.c
|
@ -39,6 +39,7 @@
|
|||
#include "swad_logo.h"
|
||||
#include "swad_parameter.h"
|
||||
#include "swad_string.h"
|
||||
#include "swad_table.h"
|
||||
|
||||
/*****************************************************************************/
|
||||
/************** External global variables from others modules ****************/
|
||||
|
@ -282,16 +283,16 @@ void Cht_ShowListOfChatRoomsWithUsrs (void)
|
|||
NULL,Box_NOT_CLOSABLE,2);
|
||||
|
||||
/***** Write heading *****/
|
||||
fprintf (Gbl.F.Out,"<tr>"
|
||||
"<th class=\"CENTER_MIDDLE LIGHT_BLUE\">"
|
||||
Tbl_StartRow ();
|
||||
fprintf (Gbl.F.Out,"<th class=\"CENTER_MIDDLE LIGHT_BLUE\">"
|
||||
"%s"
|
||||
"</th>"
|
||||
"<th class=\"LEFT_MIDDLE LIGHT_BLUE\">"
|
||||
"%s"
|
||||
"</th>"
|
||||
"</tr>",
|
||||
"</th>",
|
||||
Txt_CHAT_Room_code,
|
||||
Txt_No_of_users);
|
||||
Tbl_EndRow ();
|
||||
|
||||
/***** Loop over chat rooms *****/
|
||||
for (NumRow = 0;
|
||||
|
@ -300,15 +301,15 @@ void Cht_ShowListOfChatRoomsWithUsrs (void)
|
|||
{
|
||||
/* Get next chat room */
|
||||
row = mysql_fetch_row (mysql_res);
|
||||
fprintf (Gbl.F.Out,"<tr>"
|
||||
"<td class=\"DAT LEFT_MIDDLE\">"
|
||||
Tbl_StartRow ();
|
||||
fprintf (Gbl.F.Out,"<td class=\"DAT LEFT_MIDDLE\">"
|
||||
"%s"
|
||||
"</td>"
|
||||
"<td class=\"DAT RIGHT_MIDDLE\">"
|
||||
"%s"
|
||||
"</td>"
|
||||
"</tr>",
|
||||
"</td>",
|
||||
row[0],row[1]);
|
||||
Tbl_EndRow ();
|
||||
}
|
||||
|
||||
/***** End table and box *****/
|
||||
|
|
|
@ -115,7 +115,7 @@ void Cla_SeeClassrooms (void)
|
|||
Box_StartBox (NULL,Txt_Classrooms,Cla_PutIconsListingClassrooms,
|
||||
Hlp_CENTRE_Classrooms,Box_NOT_CLOSABLE);
|
||||
Tbl_StartTableWideMarginPadding (2);
|
||||
fprintf (Gbl.F.Out,"<tr>");
|
||||
Tbl_StartRow ();
|
||||
for (Order = (Cla_Order_t) 0;
|
||||
Order <= (Cla_Order_t) (Cla_NUM_ORDERS - 1);
|
||||
Order++)
|
||||
|
@ -133,7 +133,7 @@ void Cla_SeeClassrooms (void)
|
|||
Frm_EndForm ();
|
||||
fprintf (Gbl.F.Out,"</th>");
|
||||
}
|
||||
fprintf (Gbl.F.Out,"</tr>");
|
||||
Tbl_EndRow ();
|
||||
|
||||
/***** Write list of classrooms *****/
|
||||
for (NumCla = 0, RowEvenOdd = 1;
|
||||
|
@ -141,8 +141,8 @@ void Cla_SeeClassrooms (void)
|
|||
NumCla++, RowEvenOdd = 1 - RowEvenOdd)
|
||||
{
|
||||
/* Short name */
|
||||
fprintf (Gbl.F.Out,"<tr>"
|
||||
"<td class=\"DAT LEFT_MIDDLE %s\">"
|
||||
Tbl_StartRow ();
|
||||
fprintf (Gbl.F.Out,"<td class=\"DAT LEFT_MIDDLE %s\">"
|
||||
"%s"
|
||||
"</td>",
|
||||
Gbl.ColorRows[RowEvenOdd],
|
||||
|
@ -164,10 +164,10 @@ void Cla_SeeClassrooms (void)
|
|||
/* Location */
|
||||
fprintf (Gbl.F.Out,"<td class=\"DAT LEFT_MIDDLE %s\">"
|
||||
"%s"
|
||||
"</td>"
|
||||
"</tr>",
|
||||
"</td>",
|
||||
Gbl.ColorRows[RowEvenOdd],
|
||||
Gbl.Classrooms.Lst[NumCla].Location);
|
||||
Tbl_EndRow ();
|
||||
}
|
||||
|
||||
/***** End table *****/
|
||||
|
@ -485,8 +485,8 @@ static void Cla_ListClassroomsForEdition (void)
|
|||
Cla = &Gbl.Classrooms.Lst[NumCla];
|
||||
|
||||
/* Put icon to remove classroom */
|
||||
fprintf (Gbl.F.Out,"<tr>"
|
||||
"<td class=\"BM\">");
|
||||
Tbl_StartRow ();
|
||||
fprintf (Gbl.F.Out,"<td class=\"BM\">");
|
||||
Frm_StartForm (ActRemCla);
|
||||
Cla_PutParamClaCod (Cla->ClaCod);
|
||||
Ico_PutIconRemove ();
|
||||
|
@ -545,8 +545,8 @@ static void Cla_ListClassroomsForEdition (void)
|
|||
" onchange=\"document.getElementById('%s').submit();\" />",
|
||||
Cla_MAX_CHARS_LOCATION,Cla->Location,Gbl.Form.Id);
|
||||
Frm_EndForm ();
|
||||
fprintf (Gbl.F.Out,"</td>"
|
||||
"</tr>");
|
||||
fprintf (Gbl.F.Out,"</td>");
|
||||
Tbl_EndRow ();
|
||||
}
|
||||
|
||||
/***** End table *****/
|
||||
|
@ -901,8 +901,8 @@ static void Cla_PutFormToCreateClassroom (void)
|
|||
Cla_PutHeadClassrooms ();
|
||||
|
||||
/***** Column to remove classroom, disabled here *****/
|
||||
fprintf (Gbl.F.Out,"<tr>"
|
||||
"<td class=\"BM\"></td>");
|
||||
Tbl_StartRow ();
|
||||
fprintf (Gbl.F.Out,"<td class=\"BM\"></td>");
|
||||
|
||||
/***** Classroom code *****/
|
||||
fprintf (Gbl.F.Out,"<td class=\"CODE\"></td>");
|
||||
|
@ -938,9 +938,9 @@ static void Cla_PutFormToCreateClassroom (void)
|
|||
"<input type=\"text\" name=\"Location\""
|
||||
" size=\"15\" maxlength=\"%u\" value=\"%s\""
|
||||
" class=\"INPUT_FULL_NAME\" />"
|
||||
"</td>"
|
||||
"</tr>",
|
||||
"</td>",
|
||||
Cla_MAX_CHARS_LOCATION,Cla_EditingCla->Location);
|
||||
Tbl_EndRow ();
|
||||
|
||||
/***** End table, send button and end box *****/
|
||||
Box_EndBoxTableWithButton (Btn_CREATE_BUTTON,Txt_Create_classroom);
|
||||
|
@ -961,8 +961,8 @@ static void Cla_PutHeadClassrooms (void)
|
|||
extern const char *Txt_Capacity_OF_A_CLASSROOM;
|
||||
extern const char *Txt_Location;
|
||||
|
||||
fprintf (Gbl.F.Out,"<tr>"
|
||||
"<th class=\"BM\"></th>"
|
||||
Tbl_StartRow ();
|
||||
fprintf (Gbl.F.Out,"<th class=\"BM\"></th>"
|
||||
"<th class=\"RIGHT_MIDDLE\">"
|
||||
"%s"
|
||||
"</th>"
|
||||
|
@ -977,13 +977,13 @@ static void Cla_PutHeadClassrooms (void)
|
|||
"</th>"
|
||||
"<th class=\"LEFT_MIDDLE\">"
|
||||
"%s"
|
||||
"</th>"
|
||||
"</tr>",
|
||||
"</th>",
|
||||
Txt_Code,
|
||||
Txt_Short_name,
|
||||
Txt_Full_name,
|
||||
Txt_Capacity_OF_A_CLASSROOM,
|
||||
Txt_Location);
|
||||
Tbl_EndRow ();
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
|
@ -282,7 +282,7 @@ static void Con_ShowConnectedUsrsBelongingToLocation (void)
|
|||
fprintf (Gbl.F.Out,"</div>");
|
||||
|
||||
/***** Number of teachers and students *****/
|
||||
fprintf (Gbl.F.Out,"<table class=\"CONNECTED_LIST\">");
|
||||
Tbl_StartTableClass ("CONNECTED_LIST");
|
||||
Con_ShowConnectedUsrsWithARoleBelongingToCurrentLocationOnMainZone (Rol_TCH);
|
||||
Con_ShowConnectedUsrsWithARoleBelongingToCurrentLocationOnMainZone (Rol_NET);
|
||||
Con_ShowConnectedUsrsWithARoleBelongingToCurrentLocationOnMainZone (Rol_STD);
|
||||
|
@ -330,7 +330,7 @@ void Con_ShowConnectedUsrsBelongingToCurrentCrs (void)
|
|||
Frm_EndForm ();
|
||||
|
||||
/***** Number of teachers and students *****/
|
||||
fprintf (Gbl.F.Out,"<table class=\"CONNECTED_LIST\">");
|
||||
Tbl_StartTableClass ("CONNECTED_LIST");
|
||||
Gbl.Usrs.Connected.NumUsr = 0;
|
||||
Gbl.Usrs.Connected.NumUsrs = 0;
|
||||
Gbl.Usrs.Connected.NumUsrsToList = 0;
|
||||
|
@ -357,14 +357,14 @@ static void Con_ShowConnectedUsrsWithARoleBelongingToCurrentLocationOnMainZone (
|
|||
Con_GetNumConnectedUsrsWithARoleBelongingCurrentLocation (Role,&Usrs);
|
||||
if (Usrs.NumUsrs)
|
||||
{
|
||||
fprintf (Gbl.F.Out,"<tr>"
|
||||
"<td colspan=\"3\" class=\"CENTER_TOP\">"
|
||||
Tbl_StartRow ();
|
||||
fprintf (Gbl.F.Out,"<td colspan=\"3\" class=\"CENTER_TOP\">"
|
||||
"%u %s"
|
||||
"</td>"
|
||||
"</tr>",
|
||||
"</td>",
|
||||
Usrs.NumUsrs,
|
||||
(Usrs.NumUsrs == 1) ? Txt_ROLES_SINGUL_abc[Role][Usrs.Sex] :
|
||||
Txt_ROLES_PLURAL_abc[Role][Usrs.Sex]);
|
||||
Tbl_EndRow ();
|
||||
|
||||
/***** I can see connected users *****/
|
||||
Con_ShowConnectedUsrsCurrentLocationOneByOneOnMainZone (Role);
|
||||
|
@ -391,14 +391,14 @@ static void Con_ShowConnectedUsrsWithARoleBelongingToCurrentCrsOnRightColumn (Ro
|
|||
if (Gbl.Usrs.Connected.NumUsrsToList > Cfg_MAX_CONNECTED_SHOWN)
|
||||
Gbl.Usrs.Connected.NumUsrsToList = Cfg_MAX_CONNECTED_SHOWN;
|
||||
|
||||
fprintf (Gbl.F.Out,"<tr>"
|
||||
"<td colspan=\"3\" class=\"CON_USR_NARROW_TIT\">"
|
||||
Tbl_StartRow ();
|
||||
fprintf (Gbl.F.Out,"<td colspan=\"3\" class=\"CON_USR_NARROW_TIT\">"
|
||||
"%u %s"
|
||||
"</td>"
|
||||
"</tr>",
|
||||
"</td>",
|
||||
NumUsrsThisRole,
|
||||
(NumUsrsThisRole == 1) ? Txt_ROLES_SINGUL_abc[Role][UsrSex] :
|
||||
Txt_ROLES_PLURAL_abc[Role][UsrSex]);
|
||||
Tbl_EndRow ();
|
||||
|
||||
/***** I can see connected users *****/
|
||||
Con_ShowConnectedUsrsCurrentCrsOneByOneOnRightColumn (Role);
|
||||
|
@ -406,8 +406,8 @@ static void Con_ShowConnectedUsrsWithARoleBelongingToCurrentCrsOnRightColumn (Ro
|
|||
/***** Write message with number of users not listed *****/
|
||||
if (Gbl.Usrs.Connected.NumUsrsToList < Gbl.Usrs.Connected.NumUsrs)
|
||||
{
|
||||
fprintf (Gbl.F.Out,"<tr>"
|
||||
"<td colspan=\"3\" class=\"CENTER_TOP\">");
|
||||
Tbl_StartRow ();
|
||||
fprintf (Gbl.F.Out,"<td colspan=\"3\" class=\"CENTER_TOP\">");
|
||||
Frm_StartFormUnique (ActLstCon); // Must be unique because
|
||||
// the list of connected users
|
||||
// is dynamically updated via AJAX
|
||||
|
@ -419,8 +419,8 @@ static void Con_ShowConnectedUsrsWithARoleBelongingToCurrentCrsOnRightColumn (Ro
|
|||
Cfg_URL_ICON_PUBLIC,
|
||||
Txt_Connected_users,Txt_Connected_users);
|
||||
Frm_EndForm ();
|
||||
fprintf (Gbl.F.Out,"</td>"
|
||||
"</tr>");
|
||||
fprintf (Gbl.F.Out,"</td>");
|
||||
Tbl_EndRow ();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -816,8 +816,8 @@ static void Con_WriteRowConnectedUsrOnRightColumn (Rol_Role_t Role)
|
|||
}
|
||||
|
||||
/***** Show photo *****/
|
||||
fprintf (Gbl.F.Out,"<tr>"
|
||||
"<td class=\"CON_PHOTO COLOR%u\">",
|
||||
Tbl_StartRow ();
|
||||
fprintf (Gbl.F.Out,"<td class=\"CON_PHOTO COLOR%u\">",
|
||||
Gbl.RowEvenOdd);
|
||||
ShowPhoto = Pho_ShowingUsrPhotoIsAllowed (UsrDat,PhotoURL);
|
||||
Pho_ShowUsrPhoto (UsrDat,ShowPhoto ? PhotoURL :
|
||||
|
@ -867,8 +867,8 @@ static void Con_WriteRowConnectedUsrOnRightColumn (Rol_Role_t Role)
|
|||
Dat_WriteHoursMinutesSecondsFromSeconds (Gbl.Usrs.Connected.Lst[Gbl.Usrs.Connected.NumUsr].TimeDiff);
|
||||
fprintf (Gbl.F.Out,"</div>"); // Used for automatic update, only when displayed on right column
|
||||
|
||||
fprintf (Gbl.F.Out,"</td>"
|
||||
"</tr>");
|
||||
fprintf (Gbl.F.Out,"</td>");
|
||||
Tbl_EndRow ();
|
||||
|
||||
if (!ItsMe)
|
||||
/***** Free memory used for user's data *****/
|
||||
|
@ -1036,8 +1036,8 @@ static void Con_ShowConnectedUsrsCurrentLocationOneByOneOnMainZone (Rol_Role_t R
|
|||
TimeDiff = (time_t) 0;
|
||||
|
||||
/***** Show photo *****/
|
||||
fprintf (Gbl.F.Out,"<tr>"
|
||||
"<td class=\"CON_PHOTO COLOR%u\">",
|
||||
Tbl_StartRow ();
|
||||
fprintf (Gbl.F.Out,"<td class=\"CON_PHOTO COLOR%u\">",
|
||||
Gbl.RowEvenOdd);
|
||||
ShowPhoto = Pho_ShowingUsrPhotoIsAllowed (&UsrDat,PhotoURL);
|
||||
Pho_ShowUsrPhoto (&UsrDat,ShowPhoto ? PhotoURL :
|
||||
|
@ -1083,8 +1083,8 @@ static void Con_ShowConnectedUsrsCurrentLocationOneByOneOnMainZone (Rol_Role_t R
|
|||
fprintf (Gbl.F.Out,"<td class=\"%s COLOR%u\">",
|
||||
Font,Gbl.RowEvenOdd);
|
||||
Dat_WriteHoursMinutesSecondsFromSeconds (TimeDiff);
|
||||
fprintf (Gbl.F.Out,"</td>"
|
||||
"</tr>");
|
||||
fprintf (Gbl.F.Out,"</td>");
|
||||
Tbl_EndRow ();
|
||||
|
||||
Gbl.RowEvenOdd = 1 - Gbl.RowEvenOdd;
|
||||
}
|
||||
|
|
168
swad_country.c
168
swad_country.c
|
@ -155,16 +155,16 @@ void Cty_SeeCtyWithPendingInss (void)
|
|||
Hlp_SYSTEM_Hierarchy_pending,Box_NOT_CLOSABLE,2);
|
||||
|
||||
/***** Write heading *****/
|
||||
fprintf (Gbl.F.Out,"<tr>"
|
||||
"<th class=\"LEFT_MIDDLE\">"
|
||||
Tbl_StartRow ();
|
||||
fprintf (Gbl.F.Out,"<th class=\"LEFT_MIDDLE\">"
|
||||
"%s"
|
||||
"</th>"
|
||||
"<th class=\"RIGHT_MIDDLE\">"
|
||||
"%s"
|
||||
"</th>"
|
||||
"</tr>",
|
||||
"</th>",
|
||||
Txt_Country,
|
||||
Txt_Institutions_ABBREVIATION);
|
||||
Tbl_EndRow ();
|
||||
|
||||
/***** List the countries *****/
|
||||
for (NumCty = 0;
|
||||
|
@ -183,8 +183,8 @@ void Cty_SeeCtyWithPendingInss (void)
|
|||
Cty_GetDataOfCountryByCod (&Cty,Cty_GET_BASIC_DATA);
|
||||
|
||||
/* Country map */
|
||||
fprintf (Gbl.F.Out,"<tr>"
|
||||
"<td class=\"LEFT_MIDDLE %s\">",
|
||||
Tbl_StartRow ();
|
||||
fprintf (Gbl.F.Out,"<td class=\"LEFT_MIDDLE %s\">",
|
||||
BgColor);
|
||||
Cty_DrawCountryMapAndNameWithLink (&Cty,ActSeeIns,
|
||||
"COUNTRY_SMALL",
|
||||
|
@ -195,9 +195,9 @@ void Cty_SeeCtyWithPendingInss (void)
|
|||
/* Number of pending institutions (row[1]) */
|
||||
fprintf (Gbl.F.Out,"<td class=\"DAT RIGHT_MIDDLE %s\">"
|
||||
"%s"
|
||||
"</td>"
|
||||
"</tr>",
|
||||
"</td>",
|
||||
BgColor,row[1]);
|
||||
Tbl_EndRow ();
|
||||
|
||||
Gbl.RowEvenOdd = 1 - Gbl.RowEvenOdd;
|
||||
}
|
||||
|
@ -325,8 +325,8 @@ static void Cty_Configuration (bool PrintView)
|
|||
Tbl_StartTableWidePadding (2);
|
||||
|
||||
/***** Country name (an link to WWW if exists) *****/
|
||||
fprintf (Gbl.F.Out,"<tr>"
|
||||
"<td class=\"%s RIGHT_MIDDLE\">"
|
||||
Tbl_StartRow ();
|
||||
fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_MIDDLE\">"
|
||||
"%s:"
|
||||
"</td>"
|
||||
"<td class=\"DAT_N LEFT_MIDDLE\">",
|
||||
|
@ -338,19 +338,18 @@ static void Cty_Configuration (bool PrintView)
|
|||
fprintf (Gbl.F.Out,"%s",Gbl.Hierarchy.Cty.Name[Gbl.Prefs.Language]);
|
||||
if (!PrintView && Gbl.Hierarchy.Cty.WWW[Gbl.Prefs.Language][0])
|
||||
fprintf (Gbl.F.Out,"</a>");
|
||||
fprintf (Gbl.F.Out,"</td>"
|
||||
"</tr>");
|
||||
fprintf (Gbl.F.Out,"</td>");
|
||||
Tbl_EndRow ();
|
||||
|
||||
/***** Link to the country inside platform *****/
|
||||
fprintf (Gbl.F.Out,"<tr>"
|
||||
"<td class=\"%s RIGHT_MIDDLE\">"
|
||||
Tbl_StartRow ();
|
||||
fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_MIDDLE\">"
|
||||
"%s:"
|
||||
"</td>"
|
||||
"<td class=\"DAT LEFT_MIDDLE\">"
|
||||
"<a href=\"%s/%s?cty=%ld\" class=\"DAT\" target=\"_blank\">"
|
||||
"%s/%s?cty=%ld</a>"
|
||||
"</td>"
|
||||
"</tr>",
|
||||
"</td>",
|
||||
The_ClassFormInBox[Gbl.Prefs.Theme],
|
||||
Txt_Shortcut,
|
||||
Cfg_URL_SWAD_CGI,
|
||||
|
@ -359,39 +358,40 @@ static void Cty_Configuration (bool PrintView)
|
|||
Cfg_URL_SWAD_CGI,
|
||||
Lan_STR_LANG_ID[Gbl.Prefs.Language],
|
||||
Gbl.Hierarchy.Cty.CtyCod);
|
||||
Tbl_EndRow ();
|
||||
|
||||
if (PrintView)
|
||||
{
|
||||
/***** QR code with link to the country *****/
|
||||
fprintf (Gbl.F.Out,"<tr>"
|
||||
"<td class=\"%s RIGHT_MIDDLE\">"
|
||||
Tbl_StartRow ();
|
||||
fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_MIDDLE\">"
|
||||
"%s:"
|
||||
"</td>"
|
||||
"<td class=\"DAT LEFT_MIDDLE\">",
|
||||
The_ClassFormInBox[Gbl.Prefs.Theme],
|
||||
Txt_QR_code);
|
||||
QR_LinkTo (250,"cty",Gbl.Hierarchy.Cty.CtyCod);
|
||||
fprintf (Gbl.F.Out,"</td>"
|
||||
"</tr>");
|
||||
fprintf (Gbl.F.Out,"</td>");
|
||||
Tbl_EndRow ();
|
||||
}
|
||||
else
|
||||
{
|
||||
/***** Number of users who claim to belong to this country *****/
|
||||
fprintf (Gbl.F.Out,"<tr>"
|
||||
"<td class=\"%s RIGHT_MIDDLE\">"
|
||||
Tbl_StartRow ();
|
||||
fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_MIDDLE\">"
|
||||
"%s:"
|
||||
"</td>"
|
||||
"<td class=\"DAT LEFT_MIDDLE\">"
|
||||
"%u"
|
||||
"</td>"
|
||||
"</tr>",
|
||||
"</td>",
|
||||
The_ClassFormInBox[Gbl.Prefs.Theme],
|
||||
Txt_Users_of_the_country,
|
||||
Usr_GetNumUsrsWhoClaimToBelongToCty (Gbl.Hierarchy.Cty.CtyCod));
|
||||
Tbl_EndRow ();
|
||||
|
||||
/***** Number of institutions *****/
|
||||
fprintf (Gbl.F.Out,"<tr>"
|
||||
"<td class=\"%s RIGHT_MIDDLE\">"
|
||||
Tbl_StartRow ();
|
||||
fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_MIDDLE\">"
|
||||
"%s:"
|
||||
"</td>"
|
||||
"<td class=\"LEFT_MIDDLE\">",
|
||||
|
@ -409,47 +409,47 @@ static void Cty_Configuration (bool PrintView)
|
|||
Ins_GetNumInssInCty (Gbl.Hierarchy.Cty.CtyCod));
|
||||
Frm_EndForm ();
|
||||
|
||||
fprintf (Gbl.F.Out,"</td>"
|
||||
"</tr>");
|
||||
fprintf (Gbl.F.Out,"</td>");
|
||||
Tbl_EndRow ();
|
||||
|
||||
/***** Number of centres *****/
|
||||
fprintf (Gbl.F.Out,"<tr>"
|
||||
"<td class=\"%s RIGHT_MIDDLE\">"
|
||||
Tbl_StartRow ();
|
||||
fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_MIDDLE\">"
|
||||
"%s:"
|
||||
"</td>"
|
||||
"<td class=\"DAT LEFT_MIDDLE\">"
|
||||
"%u"
|
||||
"</td>"
|
||||
"</tr>",
|
||||
"</td>",
|
||||
The_ClassFormInBox[Gbl.Prefs.Theme],
|
||||
Txt_Centres,
|
||||
Ctr_GetNumCtrsInCty (Gbl.Hierarchy.Cty.CtyCod));
|
||||
Tbl_EndRow ();
|
||||
|
||||
/***** Number of degrees *****/
|
||||
fprintf (Gbl.F.Out,"<tr>"
|
||||
"<td class=\"%s RIGHT_MIDDLE\">"
|
||||
Tbl_StartRow ();
|
||||
fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_MIDDLE\">"
|
||||
"%s:"
|
||||
"</td>"
|
||||
"<td class=\"DAT LEFT_MIDDLE\">"
|
||||
"%u"
|
||||
"</td>"
|
||||
"</tr>",
|
||||
"</td>",
|
||||
The_ClassFormInBox[Gbl.Prefs.Theme],
|
||||
Txt_Degrees,
|
||||
Deg_GetNumDegsInCty (Gbl.Hierarchy.Cty.CtyCod));
|
||||
Tbl_EndRow ();
|
||||
|
||||
/***** Number of courses *****/
|
||||
fprintf (Gbl.F.Out,"<tr>"
|
||||
"<td class=\"%s RIGHT_MIDDLE\">"
|
||||
Tbl_StartRow ();
|
||||
fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_MIDDLE\">"
|
||||
"%s:"
|
||||
"</td>"
|
||||
"<td class=\"DAT LEFT_MIDDLE\">"
|
||||
"%u"
|
||||
"</td>"
|
||||
"</tr>",
|
||||
"</td>",
|
||||
The_ClassFormInBox[Gbl.Prefs.Theme],
|
||||
Txt_Courses,
|
||||
Crs_GetNumCrssInCty (Gbl.Hierarchy.Cty.CtyCod));
|
||||
Tbl_EndRow ();
|
||||
|
||||
/***** Number of users in courses of this country *****/
|
||||
Cty_ShowNumUsrsInCrssOfCty (Rol_TCH);
|
||||
|
@ -484,18 +484,18 @@ static void Cty_ShowNumUsrsInCrssOfCty (Rol_Role_t Role)
|
|||
extern const char *Txt_Users_in_courses;
|
||||
extern const char *Txt_ROLES_PLURAL_Abc[Rol_NUM_ROLES][Usr_NUM_SEXS];
|
||||
|
||||
fprintf (Gbl.F.Out,"<tr>"
|
||||
"<td class=\"%s RIGHT_MIDDLE\">"
|
||||
Tbl_StartRow ();
|
||||
fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_MIDDLE\">"
|
||||
"%s:"
|
||||
"</td>"
|
||||
"<td class=\"DAT LEFT_MIDDLE\">"
|
||||
"%u"
|
||||
"</td>"
|
||||
"</tr>",
|
||||
"</td>",
|
||||
The_ClassFormInBox[Gbl.Prefs.Theme],
|
||||
(Role == Rol_UNK) ? Txt_Users_in_courses :
|
||||
Txt_ROLES_PLURAL_Abc[Role][Usr_SEX_UNKNOWN],
|
||||
Usr_GetNumUsrsInCrssOfCty (Role,Gbl.Hierarchy.Cty.CtyCod));
|
||||
Tbl_EndRow ();
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -546,15 +546,15 @@ void Cty_ListCountries2 (void)
|
|||
Cty_ListOneCountryForSeeing (&Gbl.Hierarchy.Sys.Ctys.Lst[NumCty],NumCty + 1);
|
||||
|
||||
/***** Separation row *****/
|
||||
fprintf (Gbl.F.Out,"<tr>"
|
||||
"<td colspan=\"8\" class=\"DAT CENTER_MIDDLE\">"
|
||||
Tbl_StartRow ();
|
||||
fprintf (Gbl.F.Out,"<td colspan=\"8\" class=\"DAT CENTER_MIDDLE\">"
|
||||
" "
|
||||
"</td>"
|
||||
"</tr>");
|
||||
"</td>");
|
||||
Tbl_EndRow ();
|
||||
|
||||
/***** Write users and institutions in other countries *****/
|
||||
fprintf (Gbl.F.Out,"<tr>"
|
||||
"<td class=\"DAT RIGHT_MIDDLE\">"
|
||||
Tbl_StartRow ();
|
||||
fprintf (Gbl.F.Out,"<td class=\"DAT RIGHT_MIDDLE\">"
|
||||
"</td>"
|
||||
"<td class=\"DAT LEFT_MIDDLE\">"
|
||||
"%s"
|
||||
|
@ -576,8 +576,7 @@ void Cty_ListCountries2 (void)
|
|||
"</td>"
|
||||
"<td class=\"DAT RIGHT_MIDDLE\">"
|
||||
"%u"
|
||||
"</td>"
|
||||
"</tr>",
|
||||
"</td>",
|
||||
Txt_Other_countries,
|
||||
Cty_GetNumUsrsWhoClaimToBelongToCty (0),
|
||||
Ins_GetNumInssInCty (0),
|
||||
|
@ -585,10 +584,11 @@ void Cty_ListCountries2 (void)
|
|||
Deg_GetNumDegsInCty (0),
|
||||
Crs_GetNumCrssInCty (0),
|
||||
Usr_GetNumUsrsInCrssOfCty (Rol_TCH,0));
|
||||
Tbl_EndRow ();
|
||||
|
||||
/***** Write users and institutions with unknown country *****/
|
||||
fprintf (Gbl.F.Out,"<tr>"
|
||||
"<td class=\"DAT RIGHT_MIDDLE\">"
|
||||
Tbl_StartRow ();
|
||||
fprintf (Gbl.F.Out,"<td class=\"DAT RIGHT_MIDDLE\">"
|
||||
"</td>"
|
||||
"<td class=\"DAT LEFT_MIDDLE\">"
|
||||
"%s"
|
||||
|
@ -610,14 +610,14 @@ void Cty_ListCountries2 (void)
|
|||
"</td>"
|
||||
"<td class=\"DAT RIGHT_MIDDLE\">"
|
||||
"0"
|
||||
"</td>"
|
||||
"</tr>",
|
||||
"</td>",
|
||||
Txt_Country_unspecified,
|
||||
Cty_GetNumUsrsWhoClaimToBelongToCty (-1L),
|
||||
Ins_GetNumInssInCty (-1L),
|
||||
Ctr_GetNumCtrsInCty (-1L),
|
||||
Deg_GetNumDegsInCty (-1L),
|
||||
Crs_GetNumCrssInCty (-1L));
|
||||
Tbl_EndRow ();
|
||||
|
||||
/***** End table and box *****/
|
||||
Box_EndBoxTable ();
|
||||
|
@ -649,8 +649,8 @@ static void Cty_PutHeadCountriesForSeeing (bool OrderSelectable)
|
|||
extern const char *Txt_ROLES_PLURAL_BRIEF_Abc[Rol_NUM_ROLES];
|
||||
Cty_Order_t Order;
|
||||
|
||||
fprintf (Gbl.F.Out,"<tr>"
|
||||
"<th></th>");
|
||||
Tbl_StartRow ();
|
||||
fprintf (Gbl.F.Out,"<th></th>");
|
||||
for (Order = Cty_ORDER_BY_COUNTRY;
|
||||
Order <= Cty_ORDER_BY_NUM_USRS;
|
||||
Order++)
|
||||
|
@ -690,14 +690,14 @@ static void Cty_PutHeadCountriesForSeeing (bool OrderSelectable)
|
|||
"</th>"
|
||||
"<th class=\"RIGHT_MIDDLE\">"
|
||||
"%s+<br />%s"
|
||||
"</th>"
|
||||
"</tr>",
|
||||
"</th>",
|
||||
Txt_Institutions_ABBREVIATION,
|
||||
Txt_Centres_ABBREVIATION,
|
||||
Txt_Degrees_ABBREVIATION,
|
||||
Txt_Courses_ABBREVIATION,
|
||||
Txt_ROLES_PLURAL_BRIEF_Abc[Rol_TCH],
|
||||
Txt_ROLES_PLURAL_BRIEF_Abc[Rol_STD]);
|
||||
Tbl_EndRow ();
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -712,8 +712,8 @@ static void Cty_ListOneCountryForSeeing (struct Country *Cty,unsigned NumCty)
|
|||
Gbl.ColorRows[Gbl.RowEvenOdd];
|
||||
|
||||
/***** Number of country in this list *****/
|
||||
fprintf (Gbl.F.Out,"<tr>"
|
||||
"<td class=\"DAT RIGHT_MIDDLE %s\">"
|
||||
Tbl_StartRow ();
|
||||
fprintf (Gbl.F.Out,"<td class=\"DAT RIGHT_MIDDLE %s\">"
|
||||
"%u"
|
||||
"</td>",
|
||||
BgColor,NumCty);
|
||||
|
@ -744,14 +744,14 @@ static void Cty_ListOneCountryForSeeing (struct Country *Cty,unsigned NumCty)
|
|||
"</td>"
|
||||
"<td class=\"DAT RIGHT_MIDDLE %s\">"
|
||||
"%u"
|
||||
"</td>"
|
||||
"</tr>",
|
||||
"</td>",
|
||||
BgColor,Cty->NumUsrsWhoClaimToBelongToCty,
|
||||
BgColor,Cty->Inss.Num,
|
||||
BgColor,Cty->NumCtrs,
|
||||
BgColor,Cty->NumDegs,
|
||||
BgColor,Cty->NumCrss,
|
||||
BgColor,Cty->NumUsrs);
|
||||
Tbl_EndRow ();
|
||||
|
||||
Gbl.RowEvenOdd = 1 - Gbl.RowEvenOdd;
|
||||
}
|
||||
|
@ -1611,8 +1611,8 @@ static void Cty_ListCountriesForEdition (void)
|
|||
Cty = &Gbl.Hierarchy.Sys.Ctys.Lst[NumCty];
|
||||
|
||||
/* Put icon to remove country */
|
||||
fprintf (Gbl.F.Out,"<tr>"
|
||||
"<td rowspan=\"%u\" class=\"BT\">",
|
||||
Tbl_StartRow ();
|
||||
fprintf (Gbl.F.Out,"<td rowspan=\"%u\" class=\"BT\">",
|
||||
1 + Lan_NUM_LANGUAGES);
|
||||
if (Cty->Inss.Num ||
|
||||
Cty->NumUsrsWhoClaimToBelongToCty ||
|
||||
|
@ -1652,9 +1652,9 @@ static void Cty_ListCountriesForEdition (void)
|
|||
/* Number of institutions */
|
||||
fprintf (Gbl.F.Out,"<td rowspan=\"%u\" class=\"DAT RIGHT_TOP\">"
|
||||
"%u"
|
||||
"</td>"
|
||||
"</tr>",
|
||||
"</td>",
|
||||
1 + Lan_NUM_LANGUAGES,Cty->Inss.Num);
|
||||
Tbl_EndRow ();
|
||||
|
||||
/* Country name in several languages */
|
||||
for (Lan = (Lan_Language_t) 1;
|
||||
|
@ -1662,8 +1662,8 @@ static void Cty_ListCountriesForEdition (void)
|
|||
Lan++)
|
||||
{
|
||||
/* Language */
|
||||
fprintf (Gbl.F.Out,"<tr>"
|
||||
"<td class=\"DAT RIGHT_MIDDLE\">"
|
||||
Tbl_StartRow ();
|
||||
fprintf (Gbl.F.Out,"<td class=\"DAT RIGHT_MIDDLE\">"
|
||||
"%s:"
|
||||
"</td>",
|
||||
Txt_STR_LANG_NAME[Lan]);
|
||||
|
@ -1693,8 +1693,8 @@ static void Cty_ListCountriesForEdition (void)
|
|||
Cns_MAX_CHARS_WWW,
|
||||
Cty->WWW[Lan],Gbl.Form.Id);
|
||||
Frm_EndForm ();
|
||||
fprintf (Gbl.F.Out,"</td>"
|
||||
"</tr>");
|
||||
fprintf (Gbl.F.Out,"</td>");
|
||||
Tbl_EndRow ();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2049,8 +2049,8 @@ static void Cty_PutFormToCreateCountry (void)
|
|||
Cty_PutHeadCountriesForEdition ();
|
||||
|
||||
/***** Column to remove country, disabled here *****/
|
||||
fprintf (Gbl.F.Out,"<tr>"
|
||||
"<td rowspan=\"%u\" class=\"BT\"></td>",
|
||||
Tbl_StartRow ();
|
||||
fprintf (Gbl.F.Out,"<td rowspan=\"%u\" class=\"BT\"></td>",
|
||||
1 + Lan_NUM_LANGUAGES);
|
||||
|
||||
/***** Numerical country code (ISO 3166-1) *****/
|
||||
|
@ -2084,9 +2084,9 @@ static void Cty_PutFormToCreateCountry (void)
|
|||
/* Number of institutions */
|
||||
fprintf (Gbl.F.Out,"<td rowspan=\"%u\" class=\"DAT RIGHT_TOP\">"
|
||||
"0"
|
||||
"</td>"
|
||||
"</tr>",
|
||||
"</td>",
|
||||
1 + Lan_NUM_LANGUAGES);
|
||||
Tbl_EndRow ();
|
||||
|
||||
/***** Country name in several languages *****/
|
||||
for (Lan = (Lan_Language_t) 1;
|
||||
|
@ -2094,8 +2094,8 @@ static void Cty_PutFormToCreateCountry (void)
|
|||
Lan++)
|
||||
{
|
||||
/* Language */
|
||||
fprintf (Gbl.F.Out,"<tr>"
|
||||
"<td class=\"DAT RIGHT_TOP\">"
|
||||
Tbl_StartRow ();
|
||||
fprintf (Gbl.F.Out,"<td class=\"DAT RIGHT_TOP\">"
|
||||
"%s"
|
||||
"</td>",
|
||||
Txt_STR_LANG_NAME[Lan]);
|
||||
|
@ -2115,11 +2115,11 @@ static void Cty_PutFormToCreateCountry (void)
|
|||
"<input type=\"url\" name=\"WWW_%s\""
|
||||
" maxlength=\"%u\" value=\"%s\""
|
||||
" class=\"INPUT_WWW\" />"
|
||||
"</td>"
|
||||
"</tr>",
|
||||
"</td>",
|
||||
Lan_STR_LANG_ID[Lan],
|
||||
Cns_MAX_CHARS_WWW,
|
||||
Cty_EditingCty->WWW[Lan]);
|
||||
Tbl_EndRow ();
|
||||
}
|
||||
|
||||
/***** End table, send button and end box *****/
|
||||
|
@ -2142,8 +2142,8 @@ static void Cty_PutHeadCountriesForEdition (void)
|
|||
extern const char *Txt_Users;
|
||||
extern const char *Txt_Institutions_ABBREVIATION;
|
||||
|
||||
fprintf (Gbl.F.Out,"<tr>"
|
||||
"<th class=\"BM\"></th>"
|
||||
Tbl_StartRow ();
|
||||
fprintf (Gbl.F.Out,"<th class=\"BM\"></th>"
|
||||
"<th class=\"RIGHT_MIDDLE\">"
|
||||
"%s"
|
||||
"</th>"
|
||||
|
@ -2162,14 +2162,14 @@ static void Cty_PutHeadCountriesForEdition (void)
|
|||
"</th>"
|
||||
"<th class=\"RIGHT_MIDDLE\">"
|
||||
"%s"
|
||||
"</th>"
|
||||
"</tr>",
|
||||
"</th>",
|
||||
Txt_Numeric_BR_code_BR_ISO_3166_1,
|
||||
Txt_Alphabetic_BR_code_BR_ISO_3166_1,
|
||||
Txt_Name,
|
||||
Txt_WWW,
|
||||
Txt_Users,
|
||||
Txt_Institutions_ABBREVIATION);
|
||||
Tbl_EndRow ();
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
151
swad_course.c
151
swad_course.c
|
@ -238,8 +238,8 @@ static void Crs_Configuration (bool PrintView)
|
|||
Tbl_StartTableWidePadding (2);
|
||||
|
||||
/***** Degree *****/
|
||||
fprintf (Gbl.F.Out,"<tr>"
|
||||
"<td class=\"RIGHT_MIDDLE\">"
|
||||
Tbl_StartRow ();
|
||||
fprintf (Gbl.F.Out,"<td class=\"RIGHT_MIDDLE\">"
|
||||
"<label for=\"OthDegCod\" class=\"%s\">%s:</label>"
|
||||
"</td>"
|
||||
"<td class=\"DAT LEFT_MIDDLE\">",
|
||||
|
@ -276,12 +276,12 @@ static void Crs_Configuration (bool PrintView)
|
|||
else // I can not move course to another degree
|
||||
fprintf (Gbl.F.Out,"%s",Gbl.Hierarchy.Deg.FullName);
|
||||
|
||||
fprintf (Gbl.F.Out,"</td>"
|
||||
"</tr>");
|
||||
fprintf (Gbl.F.Out,"</td>");
|
||||
Tbl_EndRow ();
|
||||
|
||||
/***** Course full name *****/
|
||||
fprintf (Gbl.F.Out,"<tr>"
|
||||
"<td class=\"RIGHT_MIDDLE\">"
|
||||
Tbl_StartRow ();
|
||||
fprintf (Gbl.F.Out,"<td class=\"RIGHT_MIDDLE\">"
|
||||
"<label for=\"FullName\" class=\"%s\">%s:</label>"
|
||||
"</td>"
|
||||
"<td class=\"DAT_N LEFT_MIDDLE\">",
|
||||
|
@ -305,12 +305,12 @@ static void Crs_Configuration (bool PrintView)
|
|||
}
|
||||
else // I can not edit course full name
|
||||
fprintf (Gbl.F.Out,"%s",Gbl.Hierarchy.Crs.FullName);
|
||||
fprintf (Gbl.F.Out,"</td>"
|
||||
"</tr>");
|
||||
fprintf (Gbl.F.Out,"</td>");
|
||||
Tbl_EndRow ();
|
||||
|
||||
/***** Course short name *****/
|
||||
fprintf (Gbl.F.Out,"<tr>"
|
||||
"<td class=\"RIGHT_MIDDLE\">"
|
||||
Tbl_StartRow ();
|
||||
fprintf (Gbl.F.Out,"<td class=\"RIGHT_MIDDLE\">"
|
||||
"<label for=\"ShortName\" class=\"%s\">%s:</label>"
|
||||
"</td>"
|
||||
"<td class=\"DAT_N LEFT_MIDDLE\">",
|
||||
|
@ -334,13 +334,13 @@ static void Crs_Configuration (bool PrintView)
|
|||
}
|
||||
else // I can not edit course short name
|
||||
fprintf (Gbl.F.Out,"%s",Gbl.Hierarchy.Crs.ShrtName);
|
||||
fprintf (Gbl.F.Out,"</td>"
|
||||
"</tr>");
|
||||
fprintf (Gbl.F.Out,"</td>");
|
||||
Tbl_EndRow ();
|
||||
|
||||
/***** Course year *****/
|
||||
IsForm = (!PrintView && Gbl.Usrs.Me.Role.Logged >= Rol_TCH);
|
||||
fprintf (Gbl.F.Out,"<tr>"
|
||||
"<td class=\"RIGHT_MIDDLE\">"
|
||||
Tbl_StartRow ();
|
||||
fprintf (Gbl.F.Out,"<td class=\"RIGHT_MIDDLE\">"
|
||||
"<label for=\"OthCrsYear\" class=\"%s\">%s:</label>"
|
||||
"</td>"
|
||||
"<td class=\"DAT LEFT_MIDDLE\">",
|
||||
|
@ -367,14 +367,14 @@ static void Crs_Configuration (bool PrintView)
|
|||
fprintf (Gbl.F.Out,"%s",
|
||||
Gbl.Hierarchy.Crs.Year ? Txt_YEAR_OF_DEGREE[Gbl.Hierarchy.Crs.Year] :
|
||||
Txt_Not_applicable);
|
||||
fprintf (Gbl.F.Out,"</td>"
|
||||
"</tr>");
|
||||
fprintf (Gbl.F.Out,"</td>");
|
||||
Tbl_EndRow ();
|
||||
|
||||
if (!PrintView)
|
||||
{
|
||||
/***** Institutional code of the course *****/
|
||||
fprintf (Gbl.F.Out,"<tr>"
|
||||
"<td class=\"RIGHT_MIDDLE\">"
|
||||
Tbl_StartRow ();
|
||||
fprintf (Gbl.F.Out,"<td class=\"RIGHT_MIDDLE\">"
|
||||
"<label for=\"InsCrsCod\" class=\"%s\">%s:</label>"
|
||||
"</td>"
|
||||
"<td class=\"DAT LEFT_MIDDLE\">",
|
||||
|
@ -395,33 +395,32 @@ static void Crs_Configuration (bool PrintView)
|
|||
}
|
||||
else
|
||||
fprintf (Gbl.F.Out,"%s",Gbl.Hierarchy.Crs.InstitutionalCrsCod);
|
||||
fprintf (Gbl.F.Out,"</td>"
|
||||
"</tr>");
|
||||
fprintf (Gbl.F.Out,"</td>");
|
||||
Tbl_EndRow ();
|
||||
|
||||
/***** Internal code of the course *****/
|
||||
fprintf (Gbl.F.Out,"<tr>"
|
||||
"<td class=\"%s RIGHT_MIDDLE\">"
|
||||
Tbl_StartRow ();
|
||||
fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_MIDDLE\">"
|
||||
"%s:"
|
||||
"</td>"
|
||||
"<td class=\"DAT LEFT_MIDDLE\">"
|
||||
"%ld"
|
||||
"</td>"
|
||||
"</tr>",
|
||||
"</td>",
|
||||
The_ClassFormInBox[Gbl.Prefs.Theme],
|
||||
Txt_Internal_code,
|
||||
Gbl.Hierarchy.Crs.CrsCod);
|
||||
Tbl_EndRow ();
|
||||
}
|
||||
|
||||
/***** Link to the course *****/
|
||||
fprintf (Gbl.F.Out,"<tr>"
|
||||
"<td class=\"%s RIGHT_MIDDLE\">"
|
||||
Tbl_StartRow ();
|
||||
fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_MIDDLE\">"
|
||||
"%s:"
|
||||
"</td>"
|
||||
"<td class=\"DAT LEFT_MIDDLE\">"
|
||||
"<a href=\"%s/%s?crs=%ld\" class=\"DAT\" target=\"_blank\">"
|
||||
"%s/%s?crs=%ld</a>"
|
||||
"</td>"
|
||||
"</tr>",
|
||||
"</td>",
|
||||
The_ClassFormInBox[Gbl.Prefs.Theme],
|
||||
Txt_Shortcut,
|
||||
Cfg_URL_SWAD_CGI,
|
||||
|
@ -430,20 +429,21 @@ static void Crs_Configuration (bool PrintView)
|
|||
Cfg_URL_SWAD_CGI,
|
||||
Lan_STR_LANG_ID[Gbl.Prefs.Language],
|
||||
Gbl.Hierarchy.Crs.CrsCod);
|
||||
Tbl_EndRow ();
|
||||
|
||||
if (PrintView)
|
||||
{
|
||||
/***** QR code with link to the course *****/
|
||||
fprintf (Gbl.F.Out,"<tr>"
|
||||
"<td class=\"%s RIGHT_MIDDLE\">"
|
||||
Tbl_StartRow ();
|
||||
fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_MIDDLE\">"
|
||||
"%s:"
|
||||
"</td>"
|
||||
"<td class=\"DAT LEFT_MIDDLE\">",
|
||||
The_ClassFormInBox[Gbl.Prefs.Theme],
|
||||
Txt_QR_code);
|
||||
QR_LinkTo (250,"crs",Gbl.Hierarchy.Crs.CrsCod);
|
||||
fprintf (Gbl.F.Out,"</td>"
|
||||
"</tr>");
|
||||
fprintf (Gbl.F.Out,"</td>");
|
||||
Tbl_EndRow ();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -456,8 +456,8 @@ static void Crs_Configuration (bool PrintView)
|
|||
NumIndicatorsFromDB = Ind_GetNumIndicatorsCrsFromDB (Gbl.Hierarchy.Crs.CrsCod);
|
||||
Ind_ComputeAndStoreIndicatorsCrs (Gbl.Hierarchy.Crs.CrsCod,
|
||||
NumIndicatorsFromDB,&Indicators);
|
||||
fprintf (Gbl.F.Out,"<tr>"
|
||||
"<td class=\"%s RIGHT_MIDDLE\">"
|
||||
Tbl_StartRow ();
|
||||
fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_MIDDLE\">"
|
||||
"%s:"
|
||||
"</td>"
|
||||
"<td class=\"LEFT_MIDDLE\">",
|
||||
|
@ -478,8 +478,8 @@ static void Crs_Configuration (bool PrintView)
|
|||
"exclamation-triangle.svg",
|
||||
Gbl.Title);
|
||||
Frm_EndForm ();
|
||||
fprintf (Gbl.F.Out,"</td>"
|
||||
"</tr>");
|
||||
fprintf (Gbl.F.Out,"</td>");
|
||||
Tbl_EndRow ();
|
||||
}
|
||||
|
||||
/***** End table *****/
|
||||
|
@ -507,17 +507,17 @@ static void Crs_ShowNumUsrsInCrs (Rol_Role_t Role)
|
|||
extern const char *The_ClassFormInBox[The_NUM_THEMES];
|
||||
extern const char *Txt_ROLES_PLURAL_Abc[Rol_NUM_ROLES][Usr_NUM_SEXS];
|
||||
|
||||
fprintf (Gbl.F.Out,"<tr>"
|
||||
"<td class=\"%s RIGHT_MIDDLE\">"
|
||||
Tbl_StartRow ();
|
||||
fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_MIDDLE\">"
|
||||
"%s:"
|
||||
"</td>"
|
||||
"<td class=\"DAT LEFT_MIDDLE\">"
|
||||
"%u"
|
||||
"</td>"
|
||||
"</tr>",
|
||||
"</td>",
|
||||
The_ClassFormInBox[Gbl.Prefs.Theme],
|
||||
Txt_ROLES_PLURAL_Abc[Role][Usr_SEX_UNKNOWN],
|
||||
Gbl.Hierarchy.Crs.NumUsrs[Role]);
|
||||
Tbl_EndRow ();
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -1273,8 +1273,8 @@ static bool Crs_ListCoursesOfAYearForSeeing (unsigned Year)
|
|||
Gbl.ColorRows[Gbl.RowEvenOdd];
|
||||
|
||||
/* Put green tip if course has users */
|
||||
fprintf (Gbl.F.Out,"<tr>"
|
||||
"<td class=\"%s CENTER_MIDDLE %s\" title=\"%s\">"
|
||||
Tbl_StartRow ();
|
||||
fprintf (Gbl.F.Out,"<td class=\"%s CENTER_MIDDLE %s\" title=\"%s\">"
|
||||
"%s"
|
||||
"</td>",
|
||||
TxtClassNormal,BgColor,
|
||||
|
@ -1332,8 +1332,8 @@ static bool Crs_ListCoursesOfAYearForSeeing (unsigned Year)
|
|||
TxtClassNormal,BgColor);
|
||||
if (StatusTxt != Crs_STATUS_ACTIVE) // If active ==> do not show anything
|
||||
fprintf (Gbl.F.Out,"%s",Txt_COURSE_STATUS[StatusTxt]);
|
||||
fprintf (Gbl.F.Out,"</td>"
|
||||
"</tr>");
|
||||
fprintf (Gbl.F.Out,"</td>");
|
||||
Tbl_EndRow ();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1473,8 +1473,8 @@ static void Crs_ListCoursesOfAYearForEdition (unsigned Year)
|
|||
ICanEdit = Crs_CheckIfICanEdit (Crs);
|
||||
|
||||
/* Put icon to remove course */
|
||||
fprintf (Gbl.F.Out,"<tr>"
|
||||
"<td class=\"BM\">");
|
||||
Tbl_StartRow ();
|
||||
fprintf (Gbl.F.Out,"<td class=\"BM\">");
|
||||
if (Crs->NumUsrs[Rol_UNK] || // Course has users ==> deletion forbidden
|
||||
!ICanEdit)
|
||||
Ico_PutIconRemovalNotAllowed ();
|
||||
|
@ -1615,8 +1615,8 @@ static void Crs_ListCoursesOfAYearForEdition (unsigned Year)
|
|||
}
|
||||
else if (StatusTxt != Crs_STATUS_ACTIVE) // If active ==> do not show anything
|
||||
fprintf (Gbl.F.Out,"%s",Txt_COURSE_STATUS[StatusTxt]);
|
||||
fprintf (Gbl.F.Out,"</td>"
|
||||
"</tr>");
|
||||
fprintf (Gbl.F.Out,"</td>");
|
||||
Tbl_EndRow ();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1704,8 +1704,8 @@ static void Crs_PutFormToCreateCourse (void)
|
|||
Crs_PutHeadCoursesForEdition ();
|
||||
|
||||
/***** Column to remove course, disabled here *****/
|
||||
fprintf (Gbl.F.Out,"<tr>"
|
||||
"<td class=\"BM\"></td>");
|
||||
Tbl_StartRow ();
|
||||
fprintf (Gbl.F.Out,"<td class=\"BM\"></td>");
|
||||
|
||||
/***** Course code *****/
|
||||
fprintf (Gbl.F.Out,"<td class=\"CODE\"></td>");
|
||||
|
@ -1768,8 +1768,8 @@ static void Crs_PutFormToCreateCourse (void)
|
|||
|
||||
/***** Course status *****/
|
||||
fprintf (Gbl.F.Out,"<td class=\"DAT LEFT_MIDDLE\">"
|
||||
"</td>"
|
||||
"</tr>");
|
||||
"</td>");
|
||||
Tbl_EndRow ();
|
||||
|
||||
/***** End table, send button and end box *****/
|
||||
Box_EndBoxTableWithButton (Btn_CREATE_BUTTON,Txt_Create_course);
|
||||
|
@ -1789,8 +1789,8 @@ static void Crs_PutHeadCoursesForSeeing (void)
|
|||
extern const char *Txt_Course;
|
||||
extern const char *Txt_ROLES_PLURAL_BRIEF_Abc[Rol_NUM_ROLES];
|
||||
|
||||
fprintf (Gbl.F.Out,"<tr>"
|
||||
"<th class=\"BM\"></th>"
|
||||
Tbl_StartRow ();
|
||||
fprintf (Gbl.F.Out,"<th class=\"BM\"></th>"
|
||||
"<th class=\"CENTER_MIDDLE\">"
|
||||
"%s"
|
||||
"</th>"
|
||||
|
@ -1807,13 +1807,13 @@ static void Crs_PutHeadCoursesForSeeing (void)
|
|||
"%s"
|
||||
"</th>"
|
||||
"<th class=\"LEFT_MIDDLE\">"
|
||||
"</th>"
|
||||
"</tr>",
|
||||
"</th>",
|
||||
Txt_Institutional_BR_code,
|
||||
Txt_Year_OF_A_DEGREE,
|
||||
Txt_Course,
|
||||
Txt_ROLES_PLURAL_BRIEF_Abc[Rol_TCH],
|
||||
Txt_ROLES_PLURAL_BRIEF_Abc[Rol_STD]);
|
||||
Tbl_EndRow ();
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -1831,8 +1831,8 @@ static void Crs_PutHeadCoursesForEdition (void)
|
|||
extern const char *Txt_ROLES_PLURAL_BRIEF_Abc[Rol_NUM_ROLES];
|
||||
extern const char *Txt_Requester;
|
||||
|
||||
fprintf (Gbl.F.Out,"<tr>"
|
||||
"<th class=\"BM\"></th>"
|
||||
Tbl_StartRow ();
|
||||
fprintf (Gbl.F.Out,"<th class=\"BM\"></th>"
|
||||
"<th class=\"RIGHT_MIDDLE\">"
|
||||
"%s"
|
||||
"</th>"
|
||||
|
@ -1858,8 +1858,7 @@ static void Crs_PutHeadCoursesForEdition (void)
|
|||
"%s"
|
||||
"</th>"
|
||||
"<th class=\"LEFT_MIDDLE\">"
|
||||
"</th>"
|
||||
"</tr>",
|
||||
"</th>",
|
||||
Txt_Code,
|
||||
Txt_Institutional_code,Txt_optional,
|
||||
Txt_Year_OF_A_DEGREE,
|
||||
|
@ -1868,6 +1867,7 @@ static void Crs_PutHeadCoursesForEdition (void)
|
|||
Txt_ROLES_PLURAL_BRIEF_Abc[Rol_TCH],
|
||||
Txt_ROLES_PLURAL_BRIEF_Abc[Rol_STD],
|
||||
Txt_Requester);
|
||||
Tbl_EndRow ();
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -3095,11 +3095,13 @@ void Crs_GetAndWriteCrssOfAUsr (const struct UsrData *UsrDat,Rol_Role_t Role)
|
|||
Txt_USER_in_COURSE,
|
||||
Role == Rol_UNK ? Txt_User[Usr_SEX_UNKNOWN] : // Role == Rol_UNK ==> any role
|
||||
Txt_ROLES_SINGUL_Abc[Role][UsrDat->Sex]);
|
||||
fprintf (Gbl.F.Out,"<tr>"
|
||||
"<th colspan=\"7\" class=\"LEFT_MIDDLE\">%s:</th>"
|
||||
"</tr>"
|
||||
"<tr>"
|
||||
"<th class=\"BM\"></th>"
|
||||
Tbl_StartRow ();
|
||||
fprintf (Gbl.F.Out,"<th colspan=\"7\" class=\"LEFT_MIDDLE\">%s:</th>",
|
||||
Gbl.Title);
|
||||
Tbl_EndRow ();
|
||||
|
||||
Tbl_StartRow ();
|
||||
fprintf (Gbl.F.Out,"<th class=\"BM\"></th>"
|
||||
"<th class=\"BM\"></th>"
|
||||
"<th class=\"LEFT_MIDDLE\">"
|
||||
"%s"
|
||||
|
@ -3115,14 +3117,13 @@ void Crs_GetAndWriteCrssOfAUsr (const struct UsrData *UsrDat,Rol_Role_t Role)
|
|||
"</th>"
|
||||
"<th class=\"RIGHT_MIDDLE\">"
|
||||
"%s"
|
||||
"</th>"
|
||||
"</tr>",
|
||||
Gbl.Title,
|
||||
"</th>",
|
||||
Txt_Degree,
|
||||
Txt_Year_OF_A_DEGREE,
|
||||
Txt_Course,
|
||||
Txt_ROLES_PLURAL_BRIEF_Abc[Rol_TCH],
|
||||
Txt_ROLES_PLURAL_BRIEF_Abc[Rol_STD]);
|
||||
Tbl_EndRow ();
|
||||
|
||||
/* Write courses */
|
||||
for (NumCrs = 1;
|
||||
|
@ -3172,8 +3173,8 @@ void Crs_ListCrssFound (MYSQL_RES **mysql_res,unsigned NumCrss)
|
|||
NULL,Box_NOT_CLOSABLE,2);
|
||||
|
||||
/***** Heading row *****/
|
||||
fprintf (Gbl.F.Out,"<tr>"
|
||||
"<th class=\"BM\"></th>"
|
||||
Tbl_StartRow ();
|
||||
fprintf (Gbl.F.Out,"<th class=\"BM\"></th>"
|
||||
"<th class=\"LEFT_MIDDLE\">"
|
||||
"%s"
|
||||
"</th>"
|
||||
|
@ -3188,13 +3189,13 @@ void Crs_ListCrssFound (MYSQL_RES **mysql_res,unsigned NumCrss)
|
|||
"</th>"
|
||||
"<th class=\"RIGHT_MIDDLE\">"
|
||||
"%s"
|
||||
"</th>"
|
||||
"</tr>",
|
||||
"</th>",
|
||||
Txt_Degree,
|
||||
Txt_Year_OF_A_DEGREE,
|
||||
Txt_Course,
|
||||
Txt_ROLES_PLURAL_BRIEF_Abc[Rol_TCH],
|
||||
Txt_ROLES_PLURAL_BRIEF_Abc[Rol_STD]);
|
||||
Tbl_EndRow ();
|
||||
|
||||
/***** Write courses *****/
|
||||
for (NumCrs = 1;
|
||||
|
@ -3275,7 +3276,7 @@ static void Crs_WriteRowCrsData (unsigned NumCrs,MYSQL_ROW row,bool WriteColumnA
|
|||
Gbl.ColorRows[RowEvenOdd];
|
||||
|
||||
/***** Start row *****/
|
||||
fprintf (Gbl.F.Out,"<tr>");
|
||||
Tbl_StartRow ();
|
||||
|
||||
/***** User has accepted joining to this course/to any course in degree/to any course? *****/
|
||||
if (WriteColumnAccepted)
|
||||
|
@ -3342,9 +3343,9 @@ static void Crs_WriteRowCrsData (unsigned NumCrs,MYSQL_ROW row,bool WriteColumnA
|
|||
/***** Write number of students in course *****/
|
||||
fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_TOP %s\">"
|
||||
"%u"
|
||||
"</td>"
|
||||
"</tr>",
|
||||
"</td>",
|
||||
Style,BgColor,NumStds);
|
||||
Tbl_EndRow ();
|
||||
|
||||
RowEvenOdd = 1 - RowEvenOdd;
|
||||
}
|
||||
|
|
|
@ -551,7 +551,7 @@ void Dat_WriteFormClientLocalDateTimeFromTimeUTC (const char *Id,
|
|||
|
||||
/***** Start table *****/
|
||||
Tbl_StartTable ();
|
||||
fprintf (Gbl.F.Out,"<tr>");
|
||||
Tbl_StartRow ();
|
||||
|
||||
/***** Year *****/
|
||||
fprintf (Gbl.F.Out,"<td class=\"RIGHT_MIDDLE\">"
|
||||
|
@ -818,7 +818,7 @@ void Dat_WriteFormDate (unsigned FirstYear,unsigned LastYear,
|
|||
|
||||
/***** Start table *****/
|
||||
Tbl_StartTable ();
|
||||
fprintf (Gbl.F.Out,"<tr>");
|
||||
Tbl_StartRow ();
|
||||
|
||||
/***** Year *****/
|
||||
fprintf (Gbl.F.Out,"<td class=\"CENTER_MIDDLE\">"
|
||||
|
|
|
@ -120,7 +120,7 @@ void Dpt_SeeDepts (void)
|
|||
Hlp_INSTITUTION_Departments,Box_NOT_CLOSABLE,2);
|
||||
|
||||
/***** Write heading *****/
|
||||
fprintf (Gbl.F.Out,"<tr>");
|
||||
Tbl_StartRow ();
|
||||
for (Order = Dpt_ORDER_BY_DEPARTMENT;
|
||||
Order <= Dpt_ORDER_BY_NUM_TCHS;
|
||||
Order++)
|
||||
|
|
|
@ -48,6 +48,7 @@
|
|||
#include "swad_QR.h"
|
||||
#include "swad_RSS.h"
|
||||
#include "swad_string.h"
|
||||
#include "swad_table.h"
|
||||
#include "swad_timeline.h"
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -1039,8 +1040,8 @@ static void Exa_ShowExamAnnouncement (long ExaCod,
|
|||
}
|
||||
|
||||
/***** Start table *****/
|
||||
fprintf (Gbl.F.Out,"<table class=\"%s CELLS_PAD_2\">",
|
||||
ClassExaAnnouncement[TypeViewExamAnnouncement][Gbl.ExamAnns.ExaDat.Status]);
|
||||
Tbl_StartTableClass ("%s CELLS_PAD_2\">",
|
||||
ClassExaAnnouncement[TypeViewExamAnnouncement][Gbl.ExamAnns.ExaDat.Status]);
|
||||
|
||||
/***** Institution logo *****/
|
||||
fprintf (Gbl.F.Out,"<tr>"
|
||||
|
|
|
@ -1439,7 +1439,7 @@ static void Fig_ShowInss (MYSQL_RES **mysql_res,unsigned NumInss,
|
|||
{
|
||||
if ((NumIns % Gbl.Usrs.ClassPhoto.Cols) == 0)
|
||||
{
|
||||
fprintf (Gbl.F.Out,"<tr>");
|
||||
Tbl_StartRow ();
|
||||
TRIsOpen = true;
|
||||
}
|
||||
|
||||
|
|
|
@ -3184,7 +3184,7 @@ static void Brw_ShowFileBrowsersAsgWrkCrs (void)
|
|||
if (Usr_CheckIfICanViewAsgWrk (&Gbl.Usrs.Other.UsrDat))
|
||||
{
|
||||
/***** Show a row with the data of the owner of the works *****/
|
||||
fprintf (Gbl.F.Out,"<tr>");
|
||||
Tbl_StartRow ();
|
||||
Brw_ShowDataOwnerAsgWrk (&Gbl.Usrs.Other.UsrDat);
|
||||
|
||||
fprintf (Gbl.F.Out,"<td class=\"LEFT_TOP\">");
|
||||
|
@ -3656,7 +3656,7 @@ static void Brw_ShowFileBrowser (void)
|
|||
Brw_WriteSubtitleOfFileBrowser ();
|
||||
|
||||
/***** List recursively the directory *****/
|
||||
fprintf (Gbl.F.Out,"<table class=\"BROWSER_TABLE\">");
|
||||
Tbl_StartTableClass ("BROWSER_TABLE");
|
||||
Str_Copy (Gbl.FileBrowser.FilFolLnk.Path,Brw_RootFolderInternalNames[Gbl.FileBrowser.Type],
|
||||
PATH_MAX);
|
||||
Str_Copy (Gbl.FileBrowser.FilFolLnk.Name,".",
|
||||
|
@ -5592,7 +5592,7 @@ static bool Brw_WriteRowFileBrowser (unsigned Level,const char *RowId,
|
|||
" style=\"width:99%%;\">",
|
||||
Gbl.RowEvenOdd);
|
||||
Tbl_StartTable ();
|
||||
fprintf (Gbl.F.Out,"<tr>");
|
||||
Tbl_StartRow ();
|
||||
|
||||
/* Indent depending on level */
|
||||
if (Level)
|
||||
|
@ -5820,7 +5820,7 @@ static void Brw_IndentAndWriteIconExpandContract (unsigned Level,
|
|||
{
|
||||
fprintf (Gbl.F.Out,"<td class=\"LEFT_MIDDLE\">");
|
||||
Tbl_StartTable ();
|
||||
fprintf (Gbl.F.Out,"<tr>");
|
||||
Tbl_StartRow ();
|
||||
Brw_IndentDependingOnLevel (Level);
|
||||
|
||||
/***** Icon to expand/contract *****/
|
||||
|
|
|
@ -165,7 +165,7 @@ void Fol_SuggestUsrsToFollowMainZone (void)
|
|||
|
||||
/***** Show user *****/
|
||||
if ((NumUsr % Fol_NUM_COLUMNS_FOLLOW) == 0)
|
||||
fprintf (Gbl.F.Out,"<tr>");
|
||||
Tbl_StartRow ();
|
||||
if (Usr_ChkUsrCodAndGetAllUsrDataFromUsrCod (&UsrDat,Usr_DONT_GET_PREFS))
|
||||
Fol_ShowFollowedOrFollower (&UsrDat);
|
||||
if ((NumUsr % Fol_NUM_COLUMNS_FOLLOW) == (Fol_NUM_COLUMNS_FOLLOW-1) ||
|
||||
|
@ -717,7 +717,7 @@ static void Fol_ListFollowingUsr (struct UsrData *UsrDat)
|
|||
|
||||
/***** Show user *****/
|
||||
if ((NumUsr % Fol_NUM_COLUMNS_FOLLOW) == 0)
|
||||
fprintf (Gbl.F.Out,"<tr>");
|
||||
Tbl_StartRow ();
|
||||
if (Usr_ChkUsrCodAndGetAllUsrDataFromUsrCod (&FollowingUsrDat,Usr_DONT_GET_PREFS))
|
||||
Fol_ShowFollowedOrFollower (&FollowingUsrDat);
|
||||
if ((NumUsr % Fol_NUM_COLUMNS_FOLLOW) == (Fol_NUM_COLUMNS_FOLLOW-1) ||
|
||||
|
@ -800,7 +800,7 @@ static void Fol_ListFollowersUsr (struct UsrData *UsrDat)
|
|||
|
||||
/***** Show user *****/
|
||||
if ((NumUsr % Fol_NUM_COLUMNS_FOLLOW) == 0)
|
||||
fprintf (Gbl.F.Out,"<tr>");
|
||||
Tbl_StartRow ();
|
||||
if (Usr_ChkUsrCodAndGetAllUsrDataFromUsrCod (&FollowerUsrDat,Usr_DONT_GET_PREFS))
|
||||
Fol_ShowFollowedOrFollower (&FollowerUsrDat);
|
||||
if ((NumUsr % Fol_NUM_COLUMNS_FOLLOW) == (Fol_NUM_COLUMNS_FOLLOW-1) ||
|
||||
|
|
|
@ -210,7 +210,7 @@ static void Gam_ListAllGames (void)
|
|||
{
|
||||
/***** Table head *****/
|
||||
Tbl_StartTableWideMarginPadding (2);
|
||||
fprintf (Gbl.F.Out,"<tr>");
|
||||
Tbl_StartRow ();
|
||||
if (Gam_CheckIfICanEditGames ())
|
||||
fprintf (Gbl.F.Out,"<th class=\"CONTEXT_COL\"></th>"); // Column for contextual icons
|
||||
|
||||
|
@ -397,7 +397,7 @@ void Gam_ShowOneGame (long GamCod,
|
|||
Tbl_StartTableWidePadding (2);
|
||||
|
||||
/***** Start first row of this game *****/
|
||||
fprintf (Gbl.F.Out,"<tr>");
|
||||
Tbl_StartRow ();
|
||||
|
||||
/***** Icons related to this game *****/
|
||||
if (Gam_CheckIfICanEditGames ())
|
||||
|
@ -488,7 +488,7 @@ void Gam_ShowOneGame (long GamCod,
|
|||
fprintf (Gbl.F.Out,"</tr>");
|
||||
|
||||
/***** Start 2nd row of this game *****/
|
||||
fprintf (Gbl.F.Out,"<tr>");
|
||||
Tbl_StartRow ();
|
||||
|
||||
/***** Author of the game *****/
|
||||
fprintf (Gbl.F.Out,"<td colspan=\"2\" class=\"LEFT_TOP");
|
||||
|
|
|
@ -2145,7 +2145,7 @@ static void Grp_ListGrpsToAddOrRemUsrs (struct GroupType *GrpTyp,long UsrCod)
|
|||
false;
|
||||
|
||||
/* Start row */
|
||||
fprintf (Gbl.F.Out,"<tr>");
|
||||
Tbl_StartRow ();
|
||||
|
||||
/* Start cell for checkbox */
|
||||
fprintf (Gbl.F.Out,"<td class=\"LEFT_MIDDLE");
|
||||
|
|
|
@ -115,7 +115,7 @@ void Hld_SeeHolidays (void)
|
|||
if (Gbl.Hlds.Num)
|
||||
{
|
||||
Tbl_StartTableWideMarginPadding (2);
|
||||
fprintf (Gbl.F.Out,"<tr>");
|
||||
Tbl_StartRow ();
|
||||
for (Order = Hld_ORDER_BY_PLACE;
|
||||
Order <= Hld_ORDER_BY_START_DATE;
|
||||
Order++)
|
||||
|
|
|
@ -632,7 +632,7 @@ static void Ind_ShowNumCoursesWithIndicators (unsigned NumCrssWithIndicatorYes[1
|
|||
/***** Write number of courses with each number of indicators valid *****/
|
||||
Tbl_StartTablePadding (2);
|
||||
|
||||
fprintf (Gbl.F.Out,"<tr>");
|
||||
Tbl_StartRow ();
|
||||
if (PutForm)
|
||||
fprintf (Gbl.F.Out,"<th></th>");
|
||||
fprintf (Gbl.F.Out,"<th class=\"RIGHT_MIDDLE\">"
|
||||
|
@ -650,7 +650,7 @@ static void Ind_ShowNumCoursesWithIndicators (unsigned NumCrssWithIndicatorYes[1
|
|||
{
|
||||
Class = Gbl.Stat.IndicatorsSelected[Ind] ? ClassHighlight :
|
||||
ClassNormal;
|
||||
fprintf (Gbl.F.Out,"<tr>");
|
||||
Tbl_StartRow ();
|
||||
if (PutForm)
|
||||
{
|
||||
fprintf (Gbl.F.Out,"<td class=\"%s\">"
|
||||
|
@ -684,7 +684,7 @@ static void Ind_ShowNumCoursesWithIndicators (unsigned NumCrssWithIndicatorYes[1
|
|||
}
|
||||
|
||||
/***** Write total of courses *****/
|
||||
fprintf (Gbl.F.Out,"<tr>");
|
||||
Tbl_StartRow ();
|
||||
if (PutForm)
|
||||
fprintf (Gbl.F.Out,"<td>"
|
||||
"</td>");
|
||||
|
@ -747,7 +747,7 @@ static void Ind_ShowTableOfCoursesWithIndicators (Ind_IndicatorsLayout_t Indicat
|
|||
long ActCod;
|
||||
|
||||
/***** Start table *****/
|
||||
fprintf (Gbl.F.Out,"<table class=\"INDICATORS\">");
|
||||
Tbl_StartTableClass ("INDICATORS");
|
||||
|
||||
/***** Write table heading *****/
|
||||
switch (IndicatorsLayout)
|
||||
|
|
|
@ -1616,8 +1616,8 @@ void Lay_WriteHeaderClassPhoto (bool PrintView,bool DrawingClassPhoto,
|
|||
Crs_GetDataOfCourseByCod (&Crs);
|
||||
|
||||
/***** Start table *****/
|
||||
fprintf (Gbl.F.Out,"<table style=\"width:100%%; padding:12px;\">"
|
||||
"<tr>");
|
||||
fprintf (Gbl.F.Out,"<table style=\"width:100%%; padding:12px;\">"); // TODO: Change inline style to class
|
||||
Tbl_StartRow ();
|
||||
|
||||
/***** First column: institution logo *****/
|
||||
fprintf (Gbl.F.Out,"<td class=\"LEFT_TOP\" style=\"width:80px;\">");
|
||||
|
|
|
@ -128,7 +128,7 @@ void Mai_SeeMailDomains (void)
|
|||
Hlp_START_Domains,Box_NOT_CLOSABLE,2);
|
||||
|
||||
/***** Write heading *****/
|
||||
fprintf (Gbl.F.Out,"<tr>");
|
||||
Tbl_StartRow ();
|
||||
for (Order = Mai_ORDER_BY_DOMAIN;
|
||||
Order <= Mai_ORDER_BY_USERS;
|
||||
Order++)
|
||||
|
@ -1282,7 +1282,7 @@ static void Mai_ShowFormChangeUsrEmail (const struct UsrData *UsrDat,bool ItsMe,
|
|||
Txt_Current_email);
|
||||
else // NumEmail >= 2
|
||||
{
|
||||
fprintf (Gbl.F.Out,"<tr>");
|
||||
Tbl_StartRow ();
|
||||
if (NumEmail == 2)
|
||||
fprintf (Gbl.F.Out,"<td rowspan=\"%u\" class=\"REC_C1_BOT RIGHT_TOP\">"
|
||||
"<label for=\"Email\" class=\"%s\">"
|
||||
|
|
|
@ -383,7 +383,7 @@ static void Mch_ListOneOrMoreMatches (struct Game *Game,
|
|||
ICanPlayThisMatchBasedOnGrps = Mch_CheckIfICanPlayThisMatchBasedOnGrps (Match.MchCod);
|
||||
|
||||
/***** Write row for this match ****/
|
||||
fprintf (Gbl.F.Out,"<tr>");
|
||||
Tbl_StartRow ();
|
||||
|
||||
/* Icons */
|
||||
if (ICanEditMatches)
|
||||
|
@ -430,7 +430,7 @@ static void Mch_ListOneOrMoreMatchesHeading (bool ICanEditMatches)
|
|||
extern const char *Txt_Result;
|
||||
|
||||
/***** Start row *****/
|
||||
fprintf (Gbl.F.Out,"<tr>");
|
||||
Tbl_StartRow ();
|
||||
|
||||
/***** Column for icons *****/
|
||||
if (ICanEditMatches)
|
||||
|
@ -2488,7 +2488,7 @@ static void Mch_ShowQuestionAndAnswersStd (struct Match *Match)
|
|||
NumOpt++)
|
||||
{
|
||||
/***** Start row *****/
|
||||
fprintf (Gbl.F.Out,"<tr>");
|
||||
Tbl_StartRow ();
|
||||
|
||||
/***** Write letter for this option *****/
|
||||
/* Start table cell */
|
||||
|
|
|
@ -421,7 +421,7 @@ static void McR_ShowMchResults (Usr_MeOrOther_t MeOrOther)
|
|||
(long) Gbl.DateRange.TimeUTC[Dat_END_TIME]);
|
||||
|
||||
/***** Show user's data *****/
|
||||
fprintf (Gbl.F.Out,"<tr>");
|
||||
Tbl_StartRow ();
|
||||
Usr_ShowTableCellWithUsrData (UsrDat,NumResults);
|
||||
|
||||
/***** Get and print matches results *****/
|
||||
|
@ -443,7 +443,7 @@ static void McR_ShowMchResults (Usr_MeOrOther_t MeOrOther)
|
|||
ShowSummaryResults = ShowSummaryResults && ShowResultThisMatch;
|
||||
|
||||
if (NumResult)
|
||||
fprintf (Gbl.F.Out,"<tr>");
|
||||
Tbl_StartRow ();
|
||||
|
||||
/* Write start/end times (row[1], row[2] hold UTC start/end times) */
|
||||
for (StartEndTime = (Dat_StartEndTime_t) 0;
|
||||
|
@ -584,7 +584,7 @@ static void McR_ShowMchResultsSummaryRow (bool ShowSummaryResults,
|
|||
extern const char *Txt_Matches;
|
||||
|
||||
/***** Start row *****/
|
||||
fprintf (Gbl.F.Out,"<tr>");
|
||||
Tbl_StartRow ();
|
||||
|
||||
/***** Row title *****/
|
||||
fprintf (Gbl.F.Out,"<td colspan=\"3\""
|
||||
|
|
|
@ -281,7 +281,7 @@ static void Nck_ShowFormChangeUsrNickname (const struct UsrData *UsrDat,bool Its
|
|||
Txt_Current_nickname);
|
||||
else // NumNick >= 2
|
||||
{
|
||||
fprintf (Gbl.F.Out,"<tr>");
|
||||
Tbl_StartRow ();
|
||||
if (NumNick == 2)
|
||||
fprintf (Gbl.F.Out,"<td rowspan=\"%u\""
|
||||
" class=\"REC_C1_BOT RIGHT_TOP\">"
|
||||
|
|
|
@ -892,7 +892,7 @@ static void Pho_UpdatePhoto2 (void)
|
|||
|
||||
/***** Show the three images resulting of the processing *****/
|
||||
Tbl_StartTableWide ();
|
||||
fprintf (Gbl.F.Out,"<tr>");
|
||||
Tbl_StartRow ();
|
||||
for (NumPhoto = 0;
|
||||
NumPhoto < 3;
|
||||
NumPhoto++)
|
||||
|
@ -2145,7 +2145,7 @@ static void Pho_ShowOrPrintClassPhotoDegrees (Pho_AvgPhotoSeeOrPrint_t SeeOrPrin
|
|||
{
|
||||
if ((NumDegsNotEmpty % Gbl.Usrs.ClassPhoto.Cols) == 0)
|
||||
{
|
||||
fprintf (Gbl.F.Out,"<tr>");
|
||||
Tbl_StartRow ();
|
||||
TRIsOpen = true;
|
||||
}
|
||||
|
||||
|
|
|
@ -114,7 +114,7 @@ void Plc_SeePlaces (void)
|
|||
Box_StartBox (NULL,Txt_Places,Plc_PutIconsListingPlaces,
|
||||
Hlp_INSTITUTION_Places,Box_NOT_CLOSABLE);
|
||||
Tbl_StartTableWideMarginPadding (2);
|
||||
fprintf (Gbl.F.Out,"<tr>");
|
||||
Tbl_StartRow ();
|
||||
for (Order = Plc_ORDER_BY_PLACE;
|
||||
Order <= Plc_ORDER_BY_NUM_CTRS;
|
||||
Order++)
|
||||
|
|
|
@ -1562,7 +1562,7 @@ void Prf_ShowRankingFigure (MYSQL_RES **mysql_res,unsigned NumUsrs)
|
|||
}
|
||||
|
||||
/***** Show row *****/
|
||||
fprintf (Gbl.F.Out,"<tr>");
|
||||
Tbl_StartRow ();
|
||||
Prf_ShowUsrInRanking (&UsrDat,Rank);
|
||||
fprintf (Gbl.F.Out,"<td class=\"RIGHT_MIDDLE COLOR%u\""
|
||||
" style=\"height:50px;\">"
|
||||
|
@ -1729,7 +1729,7 @@ void Prf_GetAndShowRankingClicksPerDay (void)
|
|||
}
|
||||
|
||||
/***** Show row *****/
|
||||
fprintf (Gbl.F.Out,"<tr>");
|
||||
Tbl_StartRow ();
|
||||
Prf_ShowUsrInRanking (&UsrDat,Rank);
|
||||
fprintf (Gbl.F.Out,"<td class=\"RIGHT_MIDDLE COLOR%u\""
|
||||
" style=\"height:50px;\">",
|
||||
|
|
|
@ -685,7 +685,7 @@ static void Prj_ShowProjectsHead (Prj_ProjectView_t ProjectView)
|
|||
extern const char *Txt_PROJECT_ORDER[Prj_NUM_ORDERS];
|
||||
Prj_Order_t Order;
|
||||
|
||||
fprintf (Gbl.F.Out,"<tr>");
|
||||
Tbl_StartRow ();
|
||||
|
||||
/***** Column for number of project *****/
|
||||
switch (ProjectView)
|
||||
|
@ -756,7 +756,7 @@ static void Prj_ShowTableAllProjectsHead (void)
|
|||
Prj_Order_t Order;
|
||||
unsigned NumRoleToShow;
|
||||
|
||||
fprintf (Gbl.F.Out,"<tr>");
|
||||
Tbl_StartRow ();
|
||||
|
||||
for (Order = (Prj_Order_t) 0;
|
||||
Order <= (Prj_Order_t) (Prj_NUM_ORDERS - 1);
|
||||
|
@ -982,7 +982,7 @@ static void Prj_ShowOneProject (unsigned NumIndex,struct Project *Prj,
|
|||
Frm_SetAnchorStr (Prj->PrjCod,&Anchor);
|
||||
|
||||
/***** Write first row of data of this project *****/
|
||||
fprintf (Gbl.F.Out,"<tr>");
|
||||
Tbl_StartRow ();
|
||||
|
||||
/* Number of project */
|
||||
switch (ProjectView)
|
||||
|
@ -1077,7 +1077,7 @@ static void Prj_ShowOneProject (unsigned NumIndex,struct Project *Prj,
|
|||
Prj_ShowOneProjectDepartment (Prj,ProjectView);
|
||||
|
||||
/***** Preassigned? *****/
|
||||
fprintf (Gbl.F.Out,"<tr>");
|
||||
Tbl_StartRow ();
|
||||
switch (ProjectView)
|
||||
{
|
||||
case Prj_LIST_PROJECTS:
|
||||
|
@ -1116,7 +1116,7 @@ static void Prj_ShowOneProject (unsigned NumIndex,struct Project *Prj,
|
|||
"</tr>");
|
||||
|
||||
/***** Number of students *****/
|
||||
fprintf (Gbl.F.Out,"<tr>");
|
||||
Tbl_StartRow ();
|
||||
switch (ProjectView)
|
||||
{
|
||||
case Prj_LIST_PROJECTS:
|
||||
|
@ -1285,7 +1285,7 @@ static void Prj_ShowTableAllProjectsOneRow (struct Project *Prj)
|
|||
Prj_GetDataOfProjectByCod (Prj);
|
||||
|
||||
/***** Start row *****/
|
||||
fprintf (Gbl.F.Out,"<tr>");
|
||||
Tbl_StartRow ();
|
||||
|
||||
/***** Start date/time *****/
|
||||
UniqueId++;
|
||||
|
@ -1642,7 +1642,7 @@ static void Prj_ShowOneProjectMembersWithARole (const struct Project *Prj,
|
|||
if (WriteRow)
|
||||
{
|
||||
/***** Start row with label and listing of users *****/
|
||||
fprintf (Gbl.F.Out,"<tr>");
|
||||
Tbl_StartRow ();
|
||||
|
||||
/* Column for label */
|
||||
switch (ProjectView)
|
||||
|
@ -1717,7 +1717,7 @@ static void Prj_ShowOneProjectMembersWithARole (const struct Project *Prj,
|
|||
if (Usr_ChkUsrCodAndGetAllUsrDataFromUsrCod (&Gbl.Usrs.Other.UsrDat,Usr_DONT_GET_PREFS))
|
||||
{
|
||||
/* Start row for this user */
|
||||
fprintf (Gbl.F.Out,"<tr>");
|
||||
Tbl_StartRow ();
|
||||
|
||||
/* Icon to remove user */
|
||||
if (ProjectView == Prj_EDIT_ONE_PROJECT)
|
||||
|
|
|
@ -295,7 +295,7 @@ void Rec_ListFieldsRecordsForEdition (void)
|
|||
NumField < Gbl.Crs.Records.LstFields.Num;
|
||||
NumField++)
|
||||
{
|
||||
fprintf (Gbl.F.Out,"<tr>");
|
||||
Tbl_StartRow ();
|
||||
|
||||
/* Write icon to remove the field */
|
||||
fprintf (Gbl.F.Out,"<td class=\"BM\">");
|
||||
|
@ -2260,23 +2260,23 @@ void Rec_ShowSharedUsrRecord (Rec_SharedRecordViewType_t TypeOfView,
|
|||
Rec_RecordHelp[TypeOfView],Box_NOT_CLOSABLE,2);
|
||||
|
||||
/***** Institution and user's photo *****/
|
||||
fprintf (Gbl.F.Out,"<tr>");
|
||||
Tbl_StartRow ();
|
||||
Rec_ShowInstitutionInHead (&Ins,PutFormLinks);
|
||||
Rec_ShowPhoto (UsrDat);
|
||||
fprintf (Gbl.F.Out,"</tr>");
|
||||
|
||||
/***** Full name *****/
|
||||
fprintf (Gbl.F.Out,"<tr>");
|
||||
Tbl_StartRow ();
|
||||
Rec_ShowFullName (UsrDat);
|
||||
fprintf (Gbl.F.Out,"</tr>");
|
||||
|
||||
/***** User's nickname *****/
|
||||
fprintf (Gbl.F.Out,"<tr>");
|
||||
Tbl_StartRow ();
|
||||
Rec_ShowNickname (UsrDat,PutFormLinks);
|
||||
fprintf (Gbl.F.Out,"</tr>");
|
||||
|
||||
/***** User's country, web and social networks *****/
|
||||
fprintf (Gbl.F.Out,"<tr>");
|
||||
Tbl_StartRow ();
|
||||
Rec_ShowCountryInHead (UsrDat,ShowData);
|
||||
Rec_ShowWebsAndSocialNets (UsrDat,TypeOfView);
|
||||
fprintf (Gbl.F.Out,"</tr>");
|
||||
|
|
|
@ -1399,12 +1399,7 @@ static void Sta_ShowHits (Sta_GlobalOrCourseAccesses_t GlobalOrCourse)
|
|||
Box_StartBox (NULL,Txt_STAT_TYPE_COUNT_CAPS[Gbl.Stat.CountType],NULL,
|
||||
NULL,Box_NOT_CLOSABLE);
|
||||
|
||||
fprintf (Gbl.F.Out,"<table");
|
||||
if (Sta_CellPadding[Gbl.Stat.ClicksGroupedBy])
|
||||
fprintf (Gbl.F.Out," class=\"CELLS_PAD_%u\"",
|
||||
Sta_CellPadding[Gbl.Stat.ClicksGroupedBy]);
|
||||
fprintf (Gbl.F.Out,">");
|
||||
|
||||
Tbl_StartTablePadding (Sta_CellPadding[Gbl.Stat.ClicksGroupedBy]);
|
||||
switch (Gbl.Stat.ClicksGroupedBy)
|
||||
{
|
||||
case Sta_CLICKS_CRS_DETAILED_LIST:
|
||||
|
@ -1583,7 +1578,7 @@ static void Sta_ShowDetailedAccessesList (unsigned long NumRows,MYSQL_RES *mysql
|
|||
fprintf (Gbl.F.Out,"<tr>"
|
||||
"<td colspan=\"7\" class=\"LEFT_MIDDLE\">");
|
||||
Tbl_StartTableWidePadding (2);
|
||||
fprintf (Gbl.F.Out,"<tr>");
|
||||
Tbl_StartRow ();
|
||||
|
||||
/* Put link to jump to previous page (older clicks) */
|
||||
if (FirstRow > 1)
|
||||
|
@ -2851,7 +2846,7 @@ static void Sta_ShowNumHitsPerHour (unsigned long NumRows,
|
|||
/***** Draw the graphic *****/
|
||||
mysql_data_seek (mysql_res,0);
|
||||
NumRow = 1;
|
||||
fprintf (Gbl.F.Out,"<tr>");
|
||||
Tbl_StartRow ();
|
||||
while (Hour < 24)
|
||||
{
|
||||
Hits.Num = 0.0;
|
||||
|
@ -3050,7 +3045,7 @@ static void Sta_WriteLabelsXAxisAccMin (float IncX,const char *Format)
|
|||
unsigned i;
|
||||
float NumX;
|
||||
|
||||
fprintf (Gbl.F.Out,"<tr>");
|
||||
Tbl_StartRow ();
|
||||
for (i = 0, NumX = 0;
|
||||
i <= Sta_NUM_DIVISIONS_X;
|
||||
i++, NumX += IncX)
|
||||
|
@ -3075,7 +3070,7 @@ static void Sta_WriteAccessMinute (unsigned Minute,float HitsNum,float MaxX)
|
|||
unsigned BarWidth;
|
||||
|
||||
/***** Start row *****/
|
||||
fprintf (Gbl.F.Out,"<tr>");
|
||||
Tbl_StartRow ();
|
||||
|
||||
/***** Labels of the Y axis, and Y axis *****/
|
||||
if (!Minute)
|
||||
|
|
|
@ -3189,7 +3189,7 @@ static void Svy_ListSvyQuestions (struct Survey *Svy,
|
|||
|
||||
/***** Write the heading *****/
|
||||
Tbl_StartTableWideMarginPadding (2);
|
||||
fprintf (Gbl.F.Out,"<tr>");
|
||||
Tbl_StartRow ();
|
||||
if (Svy->Status.ICanEdit)
|
||||
fprintf (Gbl.F.Out,"<th></th>");
|
||||
fprintf (Gbl.F.Out,"<th class=\"CENTER_TOP\">"
|
||||
|
@ -3219,7 +3219,7 @@ static void Svy_ListSvyQuestions (struct Survey *Svy,
|
|||
if (sscanf (row[0],"%ld",&(SvyQst->QstCod)) != 1)
|
||||
Lay_ShowErrorAndExit ("Wrong code of question.");
|
||||
|
||||
fprintf (Gbl.F.Out,"<tr>");
|
||||
Tbl_StartRow ();
|
||||
|
||||
if (Svy->Status.ICanEdit)
|
||||
{
|
||||
|
@ -3401,7 +3401,7 @@ static void Svy_WriteAnswersOfAQst (struct Survey *Svy,
|
|||
SvyQst->AnsChoice[NumAns].Text,Svy_MAX_BYTES_ANSWER,false);
|
||||
|
||||
/* Selectors and label with the letter of the answer */
|
||||
fprintf (Gbl.F.Out,"<tr>");
|
||||
Tbl_StartRow ();
|
||||
|
||||
if (PutFormAnswerSurvey)
|
||||
{
|
||||
|
|
|
@ -595,7 +595,7 @@ static void Syl_ShowRowSyllabus (unsigned NumItem,
|
|||
Syl_WriteNumItem (StrItemCod,NULL,Level,CodItem);
|
||||
|
||||
/***** Start the row *****/
|
||||
fprintf (Gbl.F.Out,"<tr>");
|
||||
Tbl_StartRow ();
|
||||
|
||||
if (Gbl.Syllabus.EditionIsActive)
|
||||
{
|
||||
|
|
45
swad_table.c
45
swad_table.c
|
@ -25,7 +25,9 @@
|
|||
/********************************* Headers ***********************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
#include <stdio.h> // For fprintf
|
||||
#define _GNU_SOURCE // For vasprintf
|
||||
#include <stdarg.h> // For va_start, va_end
|
||||
#include <stdio.h> // For fprintf, vasprintf
|
||||
|
||||
#include "swad_table.h"
|
||||
#include "swad_global.h"
|
||||
|
@ -56,6 +58,37 @@ extern struct Globals Gbl;
|
|||
/******************************* Start/end table *****************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Tbl_StartTableClass (const char *fmt,...)
|
||||
{
|
||||
va_list ap;
|
||||
int NumBytesPrinted;
|
||||
char *Class;
|
||||
|
||||
if (fmt)
|
||||
{
|
||||
if (fmt[0])
|
||||
{
|
||||
va_start (ap,fmt);
|
||||
NumBytesPrinted = vasprintf (&Class,fmt,ap);
|
||||
va_end (ap);
|
||||
|
||||
if (NumBytesPrinted < 0) // If memory allocation wasn't possible,
|
||||
// or some other error occurs,
|
||||
// vasprintf will return -1
|
||||
Lay_NotEnoughMemoryExit ();
|
||||
|
||||
/***** Print HTML *****/
|
||||
fprintf (Gbl.F.Out,"<table class=\"%s\">",Class);
|
||||
|
||||
free ((void *) Class);
|
||||
}
|
||||
else
|
||||
Tbl_StartTable ();
|
||||
}
|
||||
else
|
||||
Tbl_StartTable ();
|
||||
}
|
||||
|
||||
void Tbl_StartTablePadding (unsigned CellPadding)
|
||||
{
|
||||
if (CellPadding)
|
||||
|
@ -117,6 +150,16 @@ void Tbl_EndTable (void)
|
|||
fprintf (Gbl.F.Out,"</table>");
|
||||
}
|
||||
|
||||
void Tbl_StartRow (void)
|
||||
{
|
||||
Tbl_StartRow ();
|
||||
}
|
||||
|
||||
void Tbl_EndRow (void)
|
||||
{
|
||||
fprintf (Gbl.F.Out,"</tr>");
|
||||
}
|
||||
|
||||
void Tbl_PutEmptyCells (unsigned NumColumns)
|
||||
{
|
||||
unsigned NumCol;
|
||||
|
|
|
@ -39,6 +39,8 @@
|
|||
/****************************** Public prototypes ****************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Tbl_StartTableClass (const char *fmt,...);
|
||||
|
||||
void Tbl_StartTablePadding (unsigned CellPadding);
|
||||
void Tbl_StartTable (void);
|
||||
|
||||
|
@ -53,6 +55,9 @@ void Tbl_StartTableWideMargin (void);
|
|||
|
||||
void Tbl_EndTable (void);
|
||||
|
||||
void Tbl_StartRow (void);
|
||||
void Tbl_EndRow (void);
|
||||
|
||||
void Tbl_PutEmptyCells (unsigned NumColumns);
|
||||
|
||||
#endif
|
||||
|
|
28
swad_test.c
28
swad_test.c
|
@ -1705,7 +1705,7 @@ static void Tst_ShowFormSelTags (unsigned long NumRows,MYSQL_RES *mysql_res,
|
|||
fprintf (Gbl.F.Out," colspan=\"%u\"",NumCols);
|
||||
fprintf (Gbl.F.Out," class=\"LEFT_TOP\">");
|
||||
Tbl_StartTablePadding (2);
|
||||
fprintf (Gbl.F.Out,"<tr>");
|
||||
Tbl_StartRow ();
|
||||
if (!ShowOnlyEnabledTags)
|
||||
fprintf (Gbl.F.Out,"<td></td>");
|
||||
fprintf (Gbl.F.Out,"<td class=\"LEFT_MIDDLE\">"
|
||||
|
@ -1727,7 +1727,7 @@ static void Tst_ShowFormSelTags (unsigned long NumRows,MYSQL_RES *mysql_res,
|
|||
NumRow++)
|
||||
{
|
||||
row = mysql_fetch_row (mysql_res);
|
||||
fprintf (Gbl.F.Out,"<tr>");
|
||||
Tbl_StartRow ();
|
||||
if (!ShowOnlyEnabledTags)
|
||||
{
|
||||
TagHidden = (row[2][0] == 'Y');
|
||||
|
@ -1807,7 +1807,7 @@ static void Tst_ShowFormEditTags (void)
|
|||
if ((TagCod = Str_ConvertStrCodToLongCod (row[0])) < 0)
|
||||
Lay_ShowErrorAndExit ("Wrong code of tag.");
|
||||
|
||||
fprintf (Gbl.F.Out,"<tr>");
|
||||
Tbl_StartRow ();
|
||||
|
||||
/* Form to enable / disable this tag */
|
||||
if (row[2][0] == 'Y') // Tag disabled
|
||||
|
@ -3654,7 +3654,7 @@ static void Tst_WriteTFAnsAssessTest (struct UsrData *UsrDat,
|
|||
|
||||
/***** Header with the title of each column *****/
|
||||
Tbl_StartTablePadding (2);
|
||||
fprintf (Gbl.F.Out,"<tr>");
|
||||
Tbl_StartRow ();
|
||||
Tst_WriteHeadUserCorrect (UsrDat);
|
||||
fprintf (Gbl.F.Out,"</tr>");
|
||||
|
||||
|
@ -3840,7 +3840,7 @@ static void Tst_WriteChoiceAnsAssessTest (struct UsrData *UsrDat,
|
|||
|
||||
/***** Start table *****/
|
||||
Tbl_StartTablePadding (2);
|
||||
fprintf (Gbl.F.Out,"<tr>");
|
||||
Tbl_StartRow ();
|
||||
Tst_WriteHeadUserCorrect (UsrDat);
|
||||
fprintf (Gbl.F.Out,"<td></td>"
|
||||
"<td></td>"
|
||||
|
@ -3851,7 +3851,7 @@ static void Tst_WriteChoiceAnsAssessTest (struct UsrData *UsrDat,
|
|||
NumOpt < Gbl.Test.Answer.NumOptions;
|
||||
NumOpt++)
|
||||
{
|
||||
fprintf (Gbl.F.Out,"<tr>");
|
||||
Tbl_StartRow ();
|
||||
|
||||
/* Draw icon depending on user's answer */
|
||||
if (AnswersUsr[Indexes[NumOpt]] == true) // This answer has been selected by the user
|
||||
|
@ -4204,7 +4204,7 @@ static void Tst_WriteChoiceAnsViewMatch (long MchCod,unsigned QstInd,long QstCod
|
|||
NumOpt++)
|
||||
{
|
||||
/***** Start row for this option *****/
|
||||
fprintf (Gbl.F.Out,"<tr>");
|
||||
Tbl_StartRow ();
|
||||
|
||||
/***** Write letter for this option *****/
|
||||
fprintf (Gbl.F.Out,"<td class=\"MATCH_TCH_BUTTON_TD\">"
|
||||
|
@ -4315,7 +4315,7 @@ static void Tst_WriteTextAnsAssessTest (struct UsrData *UsrDat,
|
|||
|
||||
/***** Header with the title of each column *****/
|
||||
Tbl_StartTablePadding (2);
|
||||
fprintf (Gbl.F.Out,"<tr>");
|
||||
Tbl_StartRow ();
|
||||
Tst_WriteHeadUserCorrect (UsrDat);
|
||||
fprintf (Gbl.F.Out,"</tr>");
|
||||
|
||||
|
@ -4478,7 +4478,7 @@ static void Tst_WriteIntAnsAssessTest (struct UsrData *UsrDat,
|
|||
|
||||
/***** Header with the title of each column *****/
|
||||
Tbl_StartTablePadding (2);
|
||||
fprintf (Gbl.F.Out,"<tr>");
|
||||
Tbl_StartRow ();
|
||||
Tst_WriteHeadUserCorrect (UsrDat);
|
||||
fprintf (Gbl.F.Out,"</tr>");
|
||||
|
||||
|
@ -4603,7 +4603,7 @@ static void Tst_WriteFloatAnsAssessTest (struct UsrData *UsrDat,
|
|||
|
||||
/***** Header with the title of each column *****/
|
||||
Tbl_StartTablePadding (2);
|
||||
fprintf (Gbl.F.Out,"<tr>");
|
||||
Tbl_StartRow ();
|
||||
Tst_WriteHeadUserCorrect (UsrDat);
|
||||
fprintf (Gbl.F.Out,"</tr>");
|
||||
|
||||
|
@ -5092,7 +5092,7 @@ static void Tst_PutFormEditOneQst (char Stem[Cns_MAX_BYTES_TEXT + 1],
|
|||
NumTag < Tst_MAX_TAGS_PER_QUESTION;
|
||||
NumTag++)
|
||||
{
|
||||
fprintf (Gbl.F.Out,"<tr>");
|
||||
Tbl_StartRow ();
|
||||
|
||||
/***** Write the tags already existing in a selector *****/
|
||||
fprintf (Gbl.F.Out,"<td class=\"LEFT_MIDDLE\">"
|
||||
|
@ -7741,7 +7741,7 @@ static void Tst_ShowTstResults (struct UsrData *UsrDat)
|
|||
(long) Gbl.DateRange.TimeUTC[1]);
|
||||
|
||||
/***** Show user's data *****/
|
||||
fprintf (Gbl.F.Out,"<tr>");
|
||||
Tbl_StartRow ();
|
||||
Usr_ShowTableCellWithUsrData (UsrDat,NumExams);
|
||||
|
||||
/***** Get and print test results *****/
|
||||
|
@ -7789,7 +7789,7 @@ static void Tst_ShowTstResults (struct UsrData *UsrDat)
|
|||
}
|
||||
|
||||
if (NumTest)
|
||||
fprintf (Gbl.F.Out,"<tr>");
|
||||
Tbl_StartRow ();
|
||||
|
||||
/* Write date and time (row[2] holds UTC date-time) */
|
||||
TimeUTC = Dat_GetUNIXTimeFromStr (row[2]);
|
||||
|
@ -7953,7 +7953,7 @@ static void Tst_ShowTestResultsSummaryRow (bool ItsMe,
|
|||
}
|
||||
|
||||
/***** Start row *****/
|
||||
fprintf (Gbl.F.Out,"<tr>");
|
||||
Tbl_StartRow ();
|
||||
|
||||
/***** Row title *****/
|
||||
fprintf (Gbl.F.Out,"<td class=\"DAT_N_LINE_TOP RIGHT_MIDDLE COLOR%u\">"
|
||||
|
|
|
@ -1162,7 +1162,7 @@ static void TT_DrawTimeTable (void)
|
|||
Min = (Min + Gbl.TimeTable.Config.Range.MinutesPerInterval) %
|
||||
TT_SECONDS_PER_MINUTE)
|
||||
{
|
||||
fprintf (Gbl.F.Out,"<tr>");
|
||||
Tbl_StartRow ();
|
||||
|
||||
/* Left hour:minutes cell */
|
||||
if (Interval % 2)
|
||||
|
@ -1250,7 +1250,7 @@ static void TT_DrawTimeTable (void)
|
|||
Grp_FreeListGrpTypesAndGrps ();
|
||||
|
||||
/***** Row with day names *****/
|
||||
fprintf (Gbl.F.Out,"<tr>");
|
||||
Tbl_StartRow ();
|
||||
TT_DrawCellAlignTimeTable ();
|
||||
TT_TimeTableDrawDaysCells ();
|
||||
TT_DrawCellAlignTimeTable ();
|
||||
|
|
24
swad_user.c
24
swad_user.c
|
@ -3631,7 +3631,7 @@ void Usr_WriteRowUsrMainData (unsigned NumUsr,struct UsrData *UsrDat,
|
|||
struct Instit Ins;
|
||||
|
||||
/***** Start row *****/
|
||||
fprintf (Gbl.F.Out,"<tr>");
|
||||
Tbl_StartRow ();
|
||||
|
||||
/***** Checkbox to select user *****/
|
||||
// Two colors are used alternatively to better distinguish the rows
|
||||
|
@ -3719,7 +3719,7 @@ static void Usr_WriteRowGstAllData (struct UsrData *UsrDat)
|
|||
struct Department Dpt;
|
||||
|
||||
/***** Start row *****/
|
||||
fprintf (Gbl.F.Out,"<tr>");
|
||||
Tbl_StartRow ();
|
||||
|
||||
if (Gbl.Usrs.Listing.WithPhotos)
|
||||
{
|
||||
|
@ -3821,7 +3821,7 @@ static void Usr_WriteRowStdAllData (struct UsrData *UsrDat,char *GroupNames)
|
|||
Gbl.Usrs.Me.Role.Logged >= Rol_DEG_ADM;
|
||||
|
||||
/***** Start row *****/
|
||||
fprintf (Gbl.F.Out,"<tr>");
|
||||
Tbl_StartRow ();
|
||||
|
||||
if (Gbl.Usrs.Listing.WithPhotos)
|
||||
{
|
||||
|
@ -3941,7 +3941,7 @@ static void Usr_WriteRowTchAllData (struct UsrData *UsrDat)
|
|||
struct Department Dpt;
|
||||
|
||||
/***** Start row *****/
|
||||
fprintf (Gbl.F.Out,"<tr>");
|
||||
Tbl_StartRow ();
|
||||
if (Gbl.Usrs.Listing.WithPhotos)
|
||||
{
|
||||
/***** Show teacher's photo *****/
|
||||
|
@ -4013,7 +4013,7 @@ static void Usr_WriteRowAdmData (unsigned NumUsr,struct UsrData *UsrDat)
|
|||
struct Instit Ins;
|
||||
|
||||
/***** Start row *****/
|
||||
fprintf (Gbl.F.Out,"<tr>");
|
||||
Tbl_StartRow ();
|
||||
|
||||
/***** Write number of user *****/
|
||||
fprintf (Gbl.F.Out,"<td class=\"USR_LIST_NUM_N CENTER_MIDDLE COLOR%u\">"
|
||||
|
@ -6459,7 +6459,7 @@ void Usr_WriteHeaderFieldsUsrDat (bool PutCheckBoxToSelectUsr)
|
|||
{
|
||||
unsigned NumCol;
|
||||
|
||||
fprintf (Gbl.F.Out,"<tr>");
|
||||
Tbl_StartRow ();
|
||||
|
||||
/***** First column used for selection *****/
|
||||
if (PutCheckBoxToSelectUsr)
|
||||
|
@ -6623,7 +6623,7 @@ static void Usr_ListMainDataTchs (Rol_Role_t Role,bool PutCheckBoxToSelectUsr)
|
|||
|
||||
/***** Heading row with column names *****/
|
||||
/* Start row */
|
||||
fprintf (Gbl.F.Out,"<tr>");
|
||||
Tbl_StartRow ();
|
||||
|
||||
/* First column used for selection */
|
||||
if (PutCheckBoxToSelectUsr)
|
||||
|
@ -6735,7 +6735,7 @@ void Usr_ListAllDataGsts (void)
|
|||
Tbl_StartTableWide ();
|
||||
|
||||
/* Start row */
|
||||
fprintf (Gbl.F.Out,"<tr>");
|
||||
Tbl_StartRow ();
|
||||
|
||||
/* Columns for the data */
|
||||
for (NumCol = (Gbl.Usrs.Listing.WithPhotos ? 0 :
|
||||
|
@ -6893,7 +6893,7 @@ void Usr_ListAllDataStds (void)
|
|||
|
||||
/***** Heading row with column names *****/
|
||||
/* Start row */
|
||||
fprintf (Gbl.F.Out,"<tr>");
|
||||
Tbl_StartRow ();
|
||||
|
||||
/* 1. Columns for the data */
|
||||
for (NumCol = (Gbl.Usrs.Listing.WithPhotos ? 0 :
|
||||
|
@ -7134,7 +7134,7 @@ static void Usr_ListRowsAllDataTchs (Rol_Role_t Role,
|
|||
unsigned NumUsr;
|
||||
|
||||
/***** Heading row *****/
|
||||
fprintf (Gbl.F.Out,"<tr>");
|
||||
Tbl_StartRow ();
|
||||
for (NumCol = (Gbl.Usrs.Listing.WithPhotos ? 0 :
|
||||
1);
|
||||
NumCol < NumColumns;
|
||||
|
@ -7383,7 +7383,7 @@ void Usr_ListDataAdms (void)
|
|||
|
||||
/***** Heading row with column names *****/
|
||||
Tbl_StartTable ();
|
||||
fprintf (Gbl.F.Out,"<tr>");
|
||||
Tbl_StartRow ();
|
||||
for (NumCol = 0;
|
||||
NumCol < Usr_NUM_MAIN_FIELDS_DATA_ADM;
|
||||
NumCol++)
|
||||
|
@ -8927,7 +8927,7 @@ static void Usr_DrawClassPhoto (Usr_ClassPhotoType_t ClassPhotoType,
|
|||
{
|
||||
if ((NumUsr % Gbl.Usrs.ClassPhoto.Cols) == 0)
|
||||
{
|
||||
fprintf (Gbl.F.Out,"<tr>");
|
||||
Tbl_StartRow ();
|
||||
TRIsOpen = true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user