Version 16.241.1

This commit is contained in:
Antonio Cañas Vargas 2017-06-11 20:09:59 +02:00
parent 3994277e67
commit 086d3ade22
41 changed files with 406 additions and 277 deletions

View File

@ -50,7 +50,7 @@ OBJS = swad_account.o swad_action.o swad_agenda.o swad_alert.o \
swad_record.o swad_report.o swad_role.o swad_RSS.o \ swad_record.o swad_report.o swad_role.o swad_RSS.o \
swad_scope.o swad_search.o swad_session.o swad_setup.o swad_social.o \ swad_scope.o swad_search.o swad_session.o swad_setup.o swad_social.o \
swad_statistic.o swad_string.o swad_survey.o swad_syllabus.o \ swad_statistic.o swad_string.o swad_survey.o swad_syllabus.o \
swad_tab.o swad_test.o swad_test_import.o swad_theme.o swad_timetable.o \ swad_tab.o swad_table.o swad_test.o swad_test_import.o swad_theme.o swad_timetable.o \
swad_user.o \ swad_user.o \
swad_web_service.o \ swad_web_service.o \
swad_xml.o \ swad_xml.o \

View File

@ -37,6 +37,7 @@
#include "swad_ID.h" #include "swad_ID.h"
#include "swad_parameter.h" #include "swad_parameter.h"
#include "swad_QR.h" #include "swad_QR.h"
#include "swad_table.h"
#include "swad_user.h" #include "swad_user.h"
/*****************************************************************************/ /*****************************************************************************/
@ -415,7 +416,7 @@ bool ID_ICanSeeOtherUsrIDs (const struct UsrData *UsrDat)
/* Check 2: I can see the IDs of confirmed students */ /* Check 2: I can see the IDs of confirmed students */
if (UsrDat->Roles.InCurrentCrs.Role == Rol_STD && // A student if (UsrDat->Roles.InCurrentCrs.Role == Rol_STD && // A student
UsrDat->Accepted) // who accepted registration UsrDat->Accepted) // who accepted registration
return true; return true;
/* Check 3: I can see the IDs of users with user's data empty */ /* Check 3: I can see the IDs of users with user's data empty */
@ -441,7 +442,7 @@ bool ID_ICanSeeOtherUsrIDs (const struct UsrData *UsrDat)
} }
/*****************************************************************************/ /*****************************************************************************/
/****************** Put a link to confirm of another user's ID ***************/ /****************** Put a link to confirm another user's ID ******************/
/*****************************************************************************/ /*****************************************************************************/
static void ID_PutLinkToConfirmID (struct UsrData *UsrDat,unsigned NumID, static void ID_PutLinkToConfirmID (struct UsrData *UsrDat,unsigned NumID,
@ -558,10 +559,10 @@ void ID_ShowFormOthIDs (void)
&Gbl.Usrs.Other.UsrDat,NULL); &Gbl.Usrs.Other.UsrDat,NULL);
/***** Form with the user's ID *****/ /***** Form with the user's ID *****/
Lay_StartTableWide (2); Tbl_StartTableWide (2);
ID_ShowFormChangeUsrID (&Gbl.Usrs.Other.UsrDat, ID_ShowFormChangeUsrID (&Gbl.Usrs.Other.UsrDat,
(Gbl.Usrs.Other.UsrDat.UsrCod == Gbl.Usrs.Me.UsrDat.UsrCod)); // It's me? (Gbl.Usrs.Other.UsrDat.UsrCod == Gbl.Usrs.Me.UsrDat.UsrCod)); // It's me?
Lay_EndTable (); Tbl_EndTable ();
/***** End frame *****/ /***** End frame *****/
Box_EndBox (); Box_EndBox ();

View File

@ -2568,9 +2568,9 @@ struct Act_Actions Act_Actions[Act_NUM_ACTIONS] =
/* ActRcvFrmEnrSevNET*/{1643,-1,TabUnk,ActLstTch ,0x3C0,0x3C0, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Enr_ReceiveFormAdminNonEditTchs,NULL}, /* ActRcvFrmEnrSevNET*/{1643,-1,TabUnk,ActLstTch ,0x3C0,0x3C0, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Enr_ReceiveFormAdminNonEditTchs,NULL},
/* ActRcvFrmEnrSevTch*/{1429,-1,TabUnk,ActLstTch ,0x3C0,0x3C0, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Enr_ReceiveFormAdminTchs ,NULL}, /* ActRcvFrmEnrSevTch*/{1429,-1,TabUnk,ActLstTch ,0x3C0,0x3C0, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Enr_ReceiveFormAdminTchs ,NULL},
/* ActCnfID_Oth */{1568,-1,TabUnk,ActLstOth ,0x3E0,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,ID_ConfirmOtherUsrID ,NULL}, /* ActCnfID_Oth */{1568,-1,TabUnk,ActLstOth ,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,ID_ConfirmOtherUsrID ,NULL},
/* ActCnfID_Std */{1569,-1,TabUnk,ActLstStd ,0x3E0,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,ID_ConfirmOtherUsrID ,NULL}, /* ActCnfID_Std */{1569,-1,TabUnk,ActLstStd ,0x3F0,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,ID_ConfirmOtherUsrID ,NULL},
/* ActCnfID_Tch */{1570,-1,TabUnk,ActLstTch ,0x3E0,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,ID_ConfirmOtherUsrID ,NULL}, /* ActCnfID_Tch */{1570,-1,TabUnk,ActLstTch ,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,ID_ConfirmOtherUsrID ,NULL},
/* ActFrmIDsOth */{1447,-1,TabUnk,ActLstOth ,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,ID_ShowFormOthIDs ,NULL}, /* ActFrmIDsOth */{1447,-1,TabUnk,ActLstOth ,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,ID_ShowFormOthIDs ,NULL},
/* ActFrmIDsStd */{1448,-1,TabUnk,ActLstStd ,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,ID_ShowFormOthIDs ,NULL}, /* ActFrmIDsStd */{1448,-1,TabUnk,ActLstStd ,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,ID_ShowFormOthIDs ,NULL},

View File

@ -42,6 +42,7 @@
#include "swad_privacy.h" #include "swad_privacy.h"
#include "swad_QR.h" #include "swad_QR.h"
#include "swad_string.h" #include "swad_string.h"
#include "swad_table.h"
/*****************************************************************************/ /*****************************************************************************/
/************** External global variables from others modules ****************/ /************** External global variables from others modules ****************/
@ -477,7 +478,7 @@ static void Agd_ShowEvents (Agd_AgendaType_t AgendaType)
if (Gbl.Agenda.Num) if (Gbl.Agenda.Num)
{ {
/***** Start table *****/ /***** Start table *****/
Lay_StartTableWideMargin (2); Tbl_StartTableWideMargin (2);
/***** Table head *****/ /***** Table head *****/
Agd_WriteHeaderListEvents (AgendaType); Agd_WriteHeaderListEvents (AgendaType);
@ -489,7 +490,7 @@ static void Agd_ShowEvents (Agd_AgendaType_t AgendaType)
Agd_ShowOneEvent (AgendaType,Gbl.Agenda.LstAgdCods[NumEvent - 1]); Agd_ShowOneEvent (AgendaType,Gbl.Agenda.LstAgdCods[NumEvent - 1]);
/***** End table *****/ /***** End table *****/
Lay_EndTable (); Tbl_EndTable ();
} }
else else
Ale_ShowAlert (Ale_INFO,Txt_No_events); Ale_ShowAlert (Ale_INFO,Txt_No_events);

View File

@ -40,6 +40,7 @@
#include "swad_parameter.h" #include "swad_parameter.h"
#include "swad_photo.h" #include "swad_photo.h"
#include "swad_string.h" #include "swad_string.h"
#include "swad_table.h"
/*****************************************************************************/ /*****************************************************************************/
/************** External global variables from others modules ****************/ /************** External global variables from others modules ****************/
@ -147,7 +148,7 @@ static void Asg_ShowAllAssignments (void)
if (Gbl.Asgs.Num) if (Gbl.Asgs.Num)
{ {
/***** Table head *****/ /***** Table head *****/
Lay_StartTableWideMargin (2); Tbl_StartTableWideMargin (2);
Asg_PutHeadForSeeing (false); // Not print view Asg_PutHeadForSeeing (false); // Not print view
/***** Write all the assignments *****/ /***** Write all the assignments *****/
@ -158,7 +159,7 @@ static void Asg_ShowAllAssignments (void)
false); // Not print view false); // Not print view
/***** End table *****/ /***** End table *****/
Lay_EndTable (); Tbl_EndTable ();
} }
else // No assignments created else // No assignments created
Ale_ShowAlert (Ale_INFO,Txt_No_assignments); Ale_ShowAlert (Ale_INFO,Txt_No_assignments);
@ -331,7 +332,7 @@ void Asg_PrintOneAssignment (void)
Gbl.CurrentCrs.Crs.CrsCod); Gbl.CurrentCrs.Crs.CrsCod);
/***** Table head *****/ /***** Table head *****/
Lay_StartTableWideMargin (2); Tbl_StartTableWideMargin (2);
Asg_PutHeadForSeeing (true); // Print view Asg_PutHeadForSeeing (true); // Print view
/***** Write assignment *****/ /***** Write assignment *****/
@ -339,7 +340,7 @@ void Asg_PrintOneAssignment (void)
true); // Print view true); // Print view
/***** End table *****/ /***** End table *****/
Lay_EndTable (); Tbl_EndTable ();
} }
/*****************************************************************************/ /*****************************************************************************/

View File

@ -41,6 +41,7 @@
#include "swad_parameter.h" #include "swad_parameter.h"
#include "swad_photo.h" #include "swad_photo.h"
#include "swad_QR.h" #include "swad_QR.h"
#include "swad_table.h"
/*****************************************************************************/ /*****************************************************************************/
/*************** External global variables from others modules ***************/ /*************** External global variables from others modules ***************/
@ -236,7 +237,7 @@ static void Att_ShowAllAttEvents (void)
if (Gbl.AttEvents.Num) if (Gbl.AttEvents.Num)
{ {
/***** Table head *****/ /***** Table head *****/
Lay_StartTableWideMargin (2); Tbl_StartTableWideMargin (2);
fprintf (Gbl.F.Out,"<tr>" fprintf (Gbl.F.Out,"<tr>"
"<th class=\"CONTEXT_COL\"></th>"); // Column for contextual icons "<th class=\"CONTEXT_COL\"></th>"); // Column for contextual icons
for (Order = Dat_START_TIME; for (Order = Dat_START_TIME;
@ -275,7 +276,7 @@ static void Att_ShowAllAttEvents (void)
Att_ShowOneAttEvent (&Gbl.AttEvents.Lst[NumAttEvent - 1],false); Att_ShowOneAttEvent (&Gbl.AttEvents.Lst[NumAttEvent - 1],false);
/***** End table *****/ /***** End table *****/
Lay_EndTable (); Tbl_EndTable ();
} }
else // No events created else // No events created
Ale_ShowAlert (Ale_INFO,Txt_No_events); Ale_ShowAlert (Ale_INFO,Txt_No_events);
@ -1961,7 +1962,7 @@ static void Att_ListAttStudents (struct AttendanceEvent *Att)
Grp_PutParamsCodGrps (); Grp_PutParamsCodGrps ();
/***** List students' data *****/ /***** List students' data *****/
Lay_StartTableWideMargin (2); Tbl_StartTableWideMargin (2);
fprintf (Gbl.F.Out,"<tr>" fprintf (Gbl.F.Out,"<tr>"
"<th></th>" "<th></th>"
@ -1997,7 +1998,7 @@ static void Att_ListAttStudents (struct AttendanceEvent *Att)
Att_WriteRowStdToCallTheRoll (NumStd + 1,&UsrDat,Att); Att_WriteRowStdToCallTheRoll (NumStd + 1,&UsrDat,Att);
} }
Lay_EndTable (); Tbl_EndTable ();
/* Send button */ /* Send button */
Btn_PutConfirmButton (Txt_Save); Btn_PutConfirmButton (Txt_Save);
@ -2702,9 +2703,9 @@ void Usr_ReqListStdsAttendanceCrs (void)
Grp_PutParamsCodGrps (); Grp_PutParamsCodGrps ();
/* Write list of students to select some of them */ /* Write list of students to select some of them */
Lay_StartTableCenter (0); Tbl_StartTableCenter (0);
Usr_ListUsersToSelect (Rol_STD); Usr_ListUsersToSelect (Rol_STD);
Lay_EndTable (); Tbl_EndTable ();
/* Send button */ /* Send button */
Btn_PutConfirmButton (Txt_Show_list); Btn_PutConfirmButton (Txt_Show_list);
@ -3227,9 +3228,9 @@ static void Att_ListStdsAttendanceTable (Att_TypeOfView_t TypeOfView,
Hlp_USERS_Attendance_attendance_list, Hlp_USERS_Attendance_attendance_list,
false); // Not closable false); // Not closable
if (PutButtonShowDetails) if (PutButtonShowDetails)
Lay_StartTableWideMargin (2); Tbl_StartTableWideMargin (2);
else else
Lay_StartTableWide (2); Tbl_StartTableWide (2);
/***** Heading row *****/ /***** Heading row *****/
Att_WriteTableHeadSeveralAttEvents (); Att_WriteTableHeadSeveralAttEvents ();
@ -3277,7 +3278,7 @@ static void Att_ListStdsAttendanceTable (Att_TypeOfView_t TypeOfView,
} }
/***** End table *****/ /***** End table *****/
Lay_EndTable (); Tbl_EndTable ();
/***** Button to show more details *****/ /***** Button to show more details *****/
if (PutButtonShowDetails) if (PutButtonShowDetails)

View File

@ -36,6 +36,7 @@
#include "swad_global.h" #include "swad_global.h"
#include "swad_parameter.h" #include "swad_parameter.h"
#include "swad_photo.h" #include "swad_photo.h"
#include "swad_table.h"
#include "swad_text.h" #include "swad_text.h"
/*****************************************************************************/ /*****************************************************************************/
@ -382,7 +383,7 @@ static void Ban_ListBannersForEdition (void)
struct Banner *Ban; struct Banner *Ban;
/***** Start table *****/ /***** Start table *****/
Lay_StartTableWide (2); Tbl_StartTableWide (2);
/***** Table head *****/ /***** Table head *****/
Ban_PutHeadBanners (); Ban_PutHeadBanners ();
@ -478,7 +479,7 @@ static void Ban_ListBannersForEdition (void)
} }
/***** End table *****/ /***** End table *****/
Lay_EndTable (); Tbl_EndTable ();
} }
/*****************************************************************************/ /*****************************************************************************/

View File

@ -32,6 +32,7 @@
#include "swad_box.h" #include "swad_box.h"
#include "swad_global.h" #include "swad_global.h"
#include "swad_help.h" #include "swad_help.h"
#include "swad_table.h"
/*****************************************************************************/ /*****************************************************************************/
/************** External global variables from others modules ****************/ /************** External global variables from others modules ****************/
@ -73,7 +74,7 @@ void Box_StartBoxTable (const char *Width,const char *Title,
Box_StartBox (Width,Title,FunctionToDrawContextualIcons, Box_StartBox (Width,Title,FunctionToDrawContextualIcons,
HelpLink, HelpLink,
Closable); Closable);
Lay_StartTableWide (CellPadding); Tbl_StartTableWide (CellPadding);
} }
void Box_StartBoxTableShadow (const char *Width,const char *Title, void Box_StartBoxTableShadow (const char *Width,const char *Title,
@ -84,7 +85,7 @@ void Box_StartBoxTableShadow (const char *Width,const char *Title,
Box_StartBoxShadow (Width,Title, Box_StartBoxShadow (Width,Title,
FunctionToDrawContextualIcons, FunctionToDrawContextualIcons,
HelpLink); HelpLink);
Lay_StartTableWide (CellPadding); Tbl_StartTableWide (CellPadding);
} }
void Box_StartBox (const char *Width,const char *Title, void Box_StartBox (const char *Width,const char *Title,
@ -192,13 +193,13 @@ static void Box_StartBoxInternal (const char *Width,const char *Title,
void Box_EndBoxTable (void) void Box_EndBoxTable (void)
{ {
Lay_EndTable (); Tbl_EndTable ();
Box_EndBox (); Box_EndBox ();
} }
void Box_EndBoxTableWithButton (Btn_Button_t Button,const char *TxtButton) void Box_EndBoxTableWithButton (Btn_Button_t Button,const char *TxtButton)
{ {
Lay_EndTable (); Tbl_EndTable ();
Box_EndBoxWithButton (Button,TxtButton); Box_EndBoxWithButton (Button,TxtButton);
} }

View File

@ -44,6 +44,7 @@
#include "swad_parameter.h" #include "swad_parameter.h"
#include "swad_QR.h" #include "swad_QR.h"
#include "swad_string.h" #include "swad_string.h"
#include "swad_table.h"
#include "swad_text.h" #include "swad_text.h"
/*****************************************************************************/ /*****************************************************************************/
@ -386,7 +387,7 @@ static void Ctr_Configuration (bool PrintView)
} }
/***** Start table *****/ /***** Start table *****/
Lay_StartTableWide (2); Tbl_StartTableWide (2);
/***** Institution *****/ /***** Institution *****/
fprintf (Gbl.F.Out,"<tr>" fprintf (Gbl.F.Out,"<tr>"
@ -630,7 +631,7 @@ static void Ctr_Configuration (bool PrintView)
} }
/***** End table *****/ /***** End table *****/
Lay_EndTable (); Tbl_EndTable ();
/***** End frame *****/ /***** End frame *****/
Box_EndBox (); Box_EndBox ();
@ -754,7 +755,7 @@ static void Ctr_ListCentres (void)
if (Gbl.Ctrs.Num) // There are centres in the current institution if (Gbl.Ctrs.Num) // There are centres in the current institution
{ {
/***** Start table *****/ /***** Start table *****/
Lay_StartTableWideMargin (2); Tbl_StartTableWideMargin (2);
Ctr_PutHeadCentresForSeeing (true); // Order selectable Ctr_PutHeadCentresForSeeing (true); // Order selectable
/***** Write all the centres and their nuber of teachers *****/ /***** Write all the centres and their nuber of teachers *****/
@ -764,7 +765,7 @@ static void Ctr_ListCentres (void)
Ctr_ListOneCentreForSeeing (&(Gbl.Ctrs.Lst[NumCtr]),NumCtr + 1); Ctr_ListOneCentreForSeeing (&(Gbl.Ctrs.Lst[NumCtr]),NumCtr + 1);
/***** End table *****/ /***** End table *****/
Lay_EndTable (); Tbl_EndTable ();
} }
else // No centres created in the current institution else // No centres created in the current institution
Ale_ShowAlert (Ale_INFO,Txt_No_centres); Ale_ShowAlert (Ale_INFO,Txt_No_centres);
@ -1410,7 +1411,7 @@ static void Ctr_ListCentresForEdition (void)
Usr_UsrDataConstructor (&UsrDat); Usr_UsrDataConstructor (&UsrDat);
/***** Write heading *****/ /***** Write heading *****/
Lay_StartTableWide (2); Tbl_StartTableWide (2);
Ctr_PutHeadCentresForEdition (); Ctr_PutHeadCentresForEdition ();
/***** Write all the centres *****/ /***** Write all the centres *****/
@ -1599,7 +1600,7 @@ static void Ctr_ListCentresForEdition (void)
} }
/***** End table *****/ /***** End table *****/
Lay_EndTable (); Tbl_EndTable ();
/***** Free memory used for user's data *****/ /***** Free memory used for user's data *****/
Usr_UsrDataDestructor (&UsrDat); Usr_UsrDataDestructor (&UsrDat);

View File

@ -237,19 +237,19 @@
// TODO: En listado de accesos, las fechas (no el día de la semana) deberían ir alineadas a la derecha. // TODO: En listado de accesos, las fechas (no el día de la semana) deberían ir alineadas a la derecha.
// TODO: Fix bug: un profesor no editor no puede confirmar DNI? Si es así, no le debería salir el enlace "Confirmar ID", y si queremos que pueda, hay que darle permisos
/*****************************************************************************/ /*****************************************************************************/
/****************************** Public constants *****************************/ /****************************** Public constants *****************************/
/*****************************************************************************/ /*****************************************************************************/
#define Log_PLATFORM_VERSION "SWAD 16.240.1 (2017-06-11)" #define Log_PLATFORM_VERSION "SWAD 16.241.1 (2017-06-11)"
#define CSS_FILE "swad16.235.1.css" #define CSS_FILE "swad16.235.1.css"
#define JS_FILE "swad16.206.3.js" #define JS_FILE "swad16.206.3.js"
// Number of lines (includes comments but not blank lines) has been got with the following command: // Number of lines (includes comments but not blank lines) has been got with the following command:
// nl swad*.c swad*.h css/swad*.css py/swad*.py js/swad*.js soap/swad*?.h sql/swad*.sql | tail -1 // nl swad*.c swad*.h css/swad*.css py/swad*.py js/swad*.js soap/swad*?.h sql/swad*.sql | tail -1
/* /*
Version 16.241.1: Jun 11, 2017 Fix bug confirming another user's ID. (222132 lines)
Version 16.241: Jun 11, 2017 New module swad_table to draw tables. (222132 lines)
Version 16.240.1: Jun 11, 2017 Some functions moved from swad_layout to swad_icon. (222024 lines) Version 16.240.1: Jun 11, 2017 Some functions moved from swad_layout to swad_icon. (222024 lines)
Version 16.240: Jun 11, 2017 New module swad_button to draw buttons. (222023 lines) Version 16.240: Jun 11, 2017 New module swad_button to draw buttons. (222023 lines)
Version 16.239: Jun 10, 2017 New module swad_box to draw boxes. (221970 lines) Version 16.239: Jun 10, 2017 New module swad_box to draw boxes. (221970 lines)

View File

@ -39,6 +39,7 @@
#include "swad_photo.h" #include "swad_photo.h"
#include "swad_role.h" #include "swad_role.h"
#include "swad_string.h" #include "swad_string.h"
#include "swad_table.h"
#include "swad_user.h" #include "swad_user.h"
/*****************************************************************************/ /*****************************************************************************/
@ -217,7 +218,7 @@ void Con_GetAndShowLastClicks (void)
NumRows = DB_QuerySELECT (Query,&mysql_res,"can not get last clicks"); NumRows = DB_QuerySELECT (Query,&mysql_res,"can not get last clicks");
/***** Write list of connected users *****/ /***** Write list of connected users *****/
Lay_StartTableCenter (1); Tbl_StartTableCenter (1);
fprintf (Gbl.F.Out,"<tr>" fprintf (Gbl.F.Out,"<tr>"
"<th class=\"LEFT_MIDDLE\"" "<th class=\"LEFT_MIDDLE\""
" style=\"width:85px;\">" " style=\"width:85px;\">"
@ -335,7 +336,7 @@ void Con_GetAndShowLastClicks (void)
ClassRow,Deg.ShrtName, ClassRow,Deg.ShrtName,
ClassRow,row[8]); ClassRow,row[8]);
} }
Lay_EndTable (); Tbl_EndTable ();
/***** Free structure that stores the query result *****/ /***** Free structure that stores the query result *****/
mysql_free_result (mysql_res); mysql_free_result (mysql_res);

View File

@ -40,6 +40,7 @@
#include "swad_language.h" #include "swad_language.h"
#include "swad_preference.h" #include "swad_preference.h"
#include "swad_QR.h" #include "swad_QR.h"
#include "swad_table.h"
#include "swad_text.h" #include "swad_text.h"
/*****************************************************************************/ /*****************************************************************************/
@ -304,7 +305,7 @@ static void Cty_Configuration (bool PrintView)
} }
/***** Start table *****/ /***** Start table *****/
Lay_StartTableWide (2); Tbl_StartTableWide (2);
/***** Country name (an link to WWW if exists) *****/ /***** Country name (an link to WWW if exists) *****/
fprintf (Gbl.F.Out,"<tr>" fprintf (Gbl.F.Out,"<tr>"
@ -440,7 +441,7 @@ static void Cty_Configuration (bool PrintView)
} }
/***** End table *****/ /***** End table *****/
Lay_EndTable (); Tbl_EndTable ();
/***** End frame *****/ /***** End frame *****/
Box_EndBox (); Box_EndBox ();
@ -1530,7 +1531,7 @@ static void Cty_ListCountriesForEdition (void)
Txt_Language_t Lan; Txt_Language_t Lan;
/***** Write heading *****/ /***** Write heading *****/
Lay_StartTableWide (2); Tbl_StartTableWide (2);
Cty_PutHeadCountriesForEdition (); Cty_PutHeadCountriesForEdition ();
/***** Write all the countries *****/ /***** Write all the countries *****/
@ -1629,7 +1630,7 @@ static void Cty_ListCountriesForEdition (void)
} }
/***** End table *****/ /***** End table *****/
Lay_EndTable (); Tbl_EndTable ();
} }
/*****************************************************************************/ /*****************************************************************************/

View File

@ -49,6 +49,7 @@
#include "swad_role.h" #include "swad_role.h"
#include "swad_RSS.h" #include "swad_RSS.h"
#include "swad_tab.h" #include "swad_tab.h"
#include "swad_table.h"
#include "swad_theme.h" #include "swad_theme.h"
/*****************************************************************************/ /*****************************************************************************/
@ -219,7 +220,7 @@ static void Crs_Configuration (bool PrintView)
Gbl.CurrentCrs.Crs.FullName); Gbl.CurrentCrs.Crs.FullName);
/***** Start table *****/ /***** Start table *****/
Lay_StartTableWide (2); Tbl_StartTableWide (2);
/***** Degree *****/ /***** Degree *****/
fprintf (Gbl.F.Out,"<tr>" fprintf (Gbl.F.Out,"<tr>"
@ -464,7 +465,7 @@ static void Crs_Configuration (bool PrintView)
} }
/***** End table *****/ /***** End table *****/
Lay_EndTable (); Tbl_EndTable ();
/***** End frame *****/ /***** End frame *****/
Box_EndBox (); Box_EndBox ();
@ -1144,7 +1145,7 @@ static void Crs_ListCourses (void)
if (Gbl.CurrentDeg.NumCrss) // There are courses in the current degree if (Gbl.CurrentDeg.NumCrss) // There are courses in the current degree
{ {
/***** Start table *****/ /***** Start table *****/
Lay_StartTableWideMargin (2); Tbl_StartTableWideMargin (2);
Crs_PutHeadCoursesForSeeing (); Crs_PutHeadCoursesForSeeing ();
/***** List the courses *****/ /***** List the courses *****/
@ -1156,7 +1157,7 @@ static void Crs_ListCourses (void)
Crs_ListCoursesOfAYearForSeeing (0); // Courses without a year selected Crs_ListCoursesOfAYearForSeeing (0); // Courses without a year selected
/***** End table *****/ /***** End table *****/
Lay_EndTable (); Tbl_EndTable ();
} }
else // No courses created in the current degree else // No courses created in the current degree
Ale_ShowAlert (Ale_INFO,Txt_No_courses); Ale_ShowAlert (Ale_INFO,Txt_No_courses);
@ -1376,7 +1377,7 @@ static void Crs_ListCoursesForEdition (void)
unsigned Year; unsigned Year;
/***** Write heading *****/ /***** Write heading *****/
Lay_StartTableWide (2); Tbl_StartTableWide (2);
Crs_PutHeadCoursesForEdition (); Crs_PutHeadCoursesForEdition ();
/***** List the courses *****/ /***** List the courses *****/
@ -1387,7 +1388,7 @@ static void Crs_ListCoursesForEdition (void)
Crs_ListCoursesOfAYearForEdition (0); Crs_ListCoursesOfAYearForEdition (0);
/***** End table *****/ /***** End table *****/
Lay_EndTable (); Tbl_EndTable ();
} }
/*****************************************************************************/ /*****************************************************************************/

View File

@ -52,6 +52,7 @@
#include "swad_RSS.h" #include "swad_RSS.h"
#include "swad_string.h" #include "swad_string.h"
#include "swad_tab.h" #include "swad_tab.h"
#include "swad_table.h"
#include "swad_text.h" #include "swad_text.h"
#include "swad_theme.h" #include "swad_theme.h"
@ -321,7 +322,7 @@ static void Deg_Configuration (bool PrintView)
fprintf (Gbl.F.Out,"</div>"); fprintf (Gbl.F.Out,"</div>");
/***** Start table *****/ /***** Start table *****/
Lay_StartTableWide (2); Tbl_StartTableWide (2);
/***** Centre *****/ /***** Centre *****/
fprintf (Gbl.F.Out,"<tr>" fprintf (Gbl.F.Out,"<tr>"
@ -526,7 +527,7 @@ static void Deg_Configuration (bool PrintView)
} }
/***** End table *****/ /***** End table *****/
Lay_EndTable (); Tbl_EndTable ();
/***** End frame *****/ /***** End frame *****/
Box_EndBox (); Box_EndBox ();
@ -684,7 +685,7 @@ static void Deg_ListDegreesForEdition (void)
Usr_UsrDataConstructor (&UsrDat); Usr_UsrDataConstructor (&UsrDat);
/***** Write heading *****/ /***** Write heading *****/
Lay_StartTableWide (2); Tbl_StartTableWide (2);
Deg_PutHeadDegreesForEdition (); Deg_PutHeadDegreesForEdition ();
/***** List the degrees *****/ /***** List the degrees *****/
@ -858,7 +859,7 @@ static void Deg_ListDegreesForEdition (void)
} }
/***** End table *****/ /***** End table *****/
Lay_EndTable (); Tbl_EndTable ();
/***** Free memory used for user's data *****/ /***** Free memory used for user's data *****/
Usr_UsrDataDestructor (&UsrDat); Usr_UsrDataDestructor (&UsrDat);
@ -1183,7 +1184,7 @@ static void Deg_ListDegrees (void)
if (Gbl.CurrentCtr.Ctr.Degs.Num) // There are degrees in the current centre if (Gbl.CurrentCtr.Ctr.Degs.Num) // There are degrees in the current centre
{ {
/***** Write heading *****/ /***** Write heading *****/
Lay_StartTableWideMargin (2); Tbl_StartTableWideMargin (2);
Deg_PutHeadDegreesForSeeing (); Deg_PutHeadDegreesForSeeing ();
/***** List the degrees *****/ /***** List the degrees *****/
@ -1193,7 +1194,7 @@ static void Deg_ListDegrees (void)
Deg_ListOneDegreeForSeeing (&(Gbl.CurrentCtr.Ctr.Degs.Lst[NumDeg]),NumDeg + 1); Deg_ListOneDegreeForSeeing (&(Gbl.CurrentCtr.Ctr.Degs.Lst[NumDeg]),NumDeg + 1);
/***** End table *****/ /***** End table *****/
Lay_EndTable (); Tbl_EndTable ();
} }
else // No degrees created in the current centre else // No degrees created in the current centre
Ale_ShowAlert (Ale_INFO,Txt_No_degrees); Ale_ShowAlert (Ale_INFO,Txt_No_degrees);

View File

@ -40,6 +40,7 @@
#include "swad_degree_type.h" #include "swad_degree_type.h"
#include "swad_global.h" #include "swad_global.h"
#include "swad_parameter.h" #include "swad_parameter.h"
#include "swad_table.h"
/*****************************************************************************/ /*****************************************************************************/
/************** External global variables from others modules ****************/ /************** External global variables from others modules ****************/
@ -225,14 +226,14 @@ static void DT_ListDegreeTypes (Act_Action_t NextAction,DT_Order_t SelectedOrder
if (Gbl.Degs.DegTypes.Num) if (Gbl.Degs.DegTypes.Num)
{ {
/***** Write heading *****/ /***** Write heading *****/
Lay_StartTableWideMargin (2); Tbl_StartTableWideMargin (2);
DT_PutHeadDegreeTypesForSeeing (NextAction,SelectedOrder); DT_PutHeadDegreeTypesForSeeing (NextAction,SelectedOrder);
/***** List current degree types for seeing *****/ /***** List current degree types for seeing *****/
DT_ListDegreeTypesForSeeing (); DT_ListDegreeTypesForSeeing ();
/***** End table *****/ /***** End table *****/
Lay_EndTable (); Tbl_EndTable ();
} }
else // No degree types created else // No degree types created
Ale_ShowAlert (Ale_INFO,Txt_No_types_of_degree); Ale_ShowAlert (Ale_INFO,Txt_No_types_of_degree);
@ -361,7 +362,7 @@ static void DT_ListDegreeTypesForEdition (void)
unsigned NumDegTyp; unsigned NumDegTyp;
/***** Write heading *****/ /***** Write heading *****/
Lay_StartTableWide (2); Tbl_StartTableWide (2);
DT_PutHeadDegreeTypesForEdition (); DT_PutHeadDegreeTypesForEdition ();
/***** List degree types with forms for edition *****/ /***** List degree types with forms for edition *****/
@ -411,7 +412,7 @@ static void DT_ListDegreeTypesForEdition (void)
} }
/***** End table *****/ /***** End table *****/
Lay_EndTable (); Tbl_EndTable ();
} }
/*****************************************************************************/ /*****************************************************************************/

View File

@ -34,6 +34,7 @@
#include "swad_layout.h" #include "swad_layout.h"
#include "swad_profile.h" #include "swad_profile.h"
#include "swad_role_type.h" #include "swad_role_type.h"
#include "swad_table.h"
#include "swad_user.h" #include "swad_user.h"
/*****************************************************************************/ /*****************************************************************************/
@ -161,7 +162,7 @@ void Dup_ListDuplicateUsrs (void)
Usr_UsrDataConstructor (&UsrDat); Usr_UsrDataConstructor (&UsrDat);
/***** Start table *****/ /***** Start table *****/
Lay_StartTableCenter (2); Tbl_StartTableCenter (2);
/***** Heading row with column names *****/ /***** Heading row with column names *****/
Gbl.Usrs.Listing.WithPhotos = true; Gbl.Usrs.Listing.WithPhotos = true;
@ -220,7 +221,7 @@ void Dup_ListDuplicateUsrs (void)
} }
/***** End table *****/ /***** End table *****/
Lay_EndTable (); Tbl_EndTable ();
/***** Free memory used for user's data *****/ /***** Free memory used for user's data *****/
Usr_UsrDataDestructor (&UsrDat); Usr_UsrDataDestructor (&UsrDat);
@ -294,7 +295,7 @@ static void Dup_ListSimilarUsrs (void)
Usr_UsrDataConstructor (&UsrDat); Usr_UsrDataConstructor (&UsrDat);
/***** Start table *****/ /***** Start table *****/
Lay_StartTableCenter (2); Tbl_StartTableCenter (2);
/***** Heading row with column names *****/ /***** Heading row with column names *****/
Gbl.Usrs.Listing.WithPhotos = true; Gbl.Usrs.Listing.WithPhotos = true;
@ -362,7 +363,7 @@ static void Dup_ListSimilarUsrs (void)
} }
/***** End table *****/ /***** End table *****/
Lay_EndTable (); Tbl_EndTable ();
/***** Free memory used for user's data *****/ /***** Free memory used for user's data *****/
Usr_UsrDataDestructor (&UsrDat); Usr_UsrDataDestructor (&UsrDat);

View File

@ -39,6 +39,7 @@
#include "swad_notification.h" #include "swad_notification.h"
#include "swad_parameter.h" #include "swad_parameter.h"
#include "swad_role.h" #include "swad_role.h"
#include "swad_table.h"
#include "swad_user.h" #include "swad_user.h"
/*****************************************************************************/ /*****************************************************************************/
@ -917,7 +918,7 @@ static void Enr_PutAreaToEnterUsrsIDs (void)
extern const char *Txt_List_of_nicks_emails_or_IDs; extern const char *Txt_List_of_nicks_emails_or_IDs;
/***** Text area for users' IDs *****/ /***** Text area for users' IDs *****/
Lay_StartTableCenter (2); Tbl_StartTableCenter (2);
fprintf (Gbl.F.Out,"<tr>" fprintf (Gbl.F.Out,"<tr>"
"<td class=\"RIGHT_TOP\">" "<td class=\"RIGHT_TOP\">"
"<label for=\"UsrsIDs\" class=\"%s\">%s:</label>" "<label for=\"UsrsIDs\" class=\"%s\">%s:</label>"
@ -930,7 +931,7 @@ static void Enr_PutAreaToEnterUsrsIDs (void)
"</tr>", "</tr>",
The_ClassForm[Gbl.Prefs.Theme], The_ClassForm[Gbl.Prefs.Theme],
Txt_List_of_nicks_emails_or_IDs); Txt_List_of_nicks_emails_or_IDs);
Lay_EndTable (); Tbl_EndTable ();
} }
/*****************************************************************************/ /*****************************************************************************/
@ -2314,7 +2315,7 @@ static void Enr_ShowEnrolmentRequestsGivenRoles (unsigned RolesSelected)
/***** Selection of scope and roles *****/ /***** Selection of scope and roles *****/
/* Start form and table */ /* Start form and table */
Act_FormStart (ActUpdSignUpReq); Act_FormStart (ActUpdSignUpReq);
Lay_StartTableWideMargin (2); Tbl_StartTableWideMargin (2);
/* Scope (whole platform, current centre, current degree or current course) */ /* Scope (whole platform, current centre, current degree or current course) */
fprintf (Gbl.F.Out,"<tr>" fprintf (Gbl.F.Out,"<tr>"
@ -2343,7 +2344,7 @@ static void Enr_ShowEnrolmentRequestsGivenRoles (unsigned RolesSelected)
"</tr>"); "</tr>");
/* End table and form */ /* End table and form */
Lay_EndTable (); Tbl_EndTable ();
Act_FormEnd (); Act_FormEnd ();
/***** Build query *****/ /***** Build query *****/
@ -2786,7 +2787,7 @@ static void Enr_ShowEnrolmentRequestsGivenRoles (unsigned RolesSelected)
Usr_UsrDataConstructor (&UsrDat); Usr_UsrDataConstructor (&UsrDat);
/* Start table */ /* Start table */
Lay_StartTableCenter (2); Tbl_StartTableCenter (2);
fprintf (Gbl.F.Out,"<th></th>" fprintf (Gbl.F.Out,"<th></th>"
"<th class=\"LEFT_TOP\">" "<th class=\"LEFT_TOP\">"
"%s" "%s"
@ -2943,7 +2944,7 @@ static void Enr_ShowEnrolmentRequestsGivenRoles (unsigned RolesSelected)
} }
/* End table */ /* End table */
Lay_EndTable (); Tbl_EndTable ();
/* Free memory used for user's data */ /* Free memory used for user's data */
Usr_UsrDataDestructor (&UsrDat); Usr_UsrDataDestructor (&UsrDat);

View File

@ -50,6 +50,7 @@
#include "swad_profile.h" #include "swad_profile.h"
#include "swad_social.h" #include "swad_social.h"
#include "swad_string.h" #include "swad_string.h"
#include "swad_table.h"
#include "swad_zip.h" #include "swad_zip.h"
/*****************************************************************************/ /*****************************************************************************/
@ -3146,11 +3147,11 @@ void Brw_AskEditWorksCrs (void)
Brw_PutHiddenParamFullTreeIfSelected (); Brw_PutHiddenParamFullTreeIfSelected ();
/* Put list of users to select some of them */ /* Put list of users to select some of them */
Lay_StartTableCenter (0); Tbl_StartTableCenter (0);
Usr_ListUsersToSelect (Rol_TCH); Usr_ListUsersToSelect (Rol_TCH);
Usr_ListUsersToSelect (Rol_NET); Usr_ListUsersToSelect (Rol_NET);
Usr_ListUsersToSelect (Rol_STD); Usr_ListUsersToSelect (Rol_STD);
Lay_EndTable (); Tbl_EndTable ();
/* Send button */ /* Send button */
Btn_PutConfirmButton (Txt_View_homework); Btn_PutConfirmButton (Txt_View_homework);

View File

@ -44,6 +44,7 @@
#include "swad_profile.h" #include "swad_profile.h"
#include "swad_role.h" #include "swad_role.h"
#include "swad_social.h" #include "swad_social.h"
#include "swad_table.h"
/*****************************************************************************/ /*****************************************************************************/
/************** External global variables from others modules ****************/ /************** External global variables from others modules ****************/
@ -1067,7 +1068,7 @@ static void For_ShowPostsOfAThread (Ale_AlertType_t AlertType,const char *Messag
&PaginationPsts); &PaginationPsts);
/***** Start table *****/ /***** Start table *****/
Lay_StartTableWide (2); Tbl_StartTableWide (2);
/***** Show posts from this page, the author and the date of last reply *****/ /***** Show posts from this page, the author and the date of last reply *****/
mysql_data_seek (mysql_res,(my_ulonglong) (PaginationPsts.FirstItemVisible - 1)); mysql_data_seek (mysql_res,(my_ulonglong) (PaginationPsts.FirstItemVisible - 1));
@ -1119,7 +1120,7 @@ static void For_ShowPostsOfAThread (Ale_AlertType_t AlertType,const char *Messag
} }
/***** End table *****/ /***** End table *****/
Lay_EndTable (); Tbl_EndTable ();
/***** Write again links to pages *****/ /***** Write again links to pages *****/
if (PaginationPsts.MoreThanOnePage) if (PaginationPsts.MoreThanOnePage)
@ -2587,7 +2588,7 @@ static void For_ShowForumThreadsHighlightingOneThread (long ThrCodHighlighted,
&PaginationThrs); &PaginationThrs);
/***** Heading row *****/ /***** Heading row *****/
Lay_StartTableWideMargin (2); Tbl_StartTableWideMargin (2);
fprintf (Gbl.F.Out,"<tr>" fprintf (Gbl.F.Out,"<tr>"
"<th style=\"width:20px;\"></th>" "<th style=\"width:20px;\"></th>"
"<th class=\"CONTEXT_COL\"></th>" // Column for contextual icons "<th class=\"CONTEXT_COL\"></th>" // Column for contextual icons
@ -2639,7 +2640,7 @@ static void For_ShowForumThreadsHighlightingOneThread (long ThrCodHighlighted,
For_ListForumThrs (ThrCods,ThrCodHighlighted,&PaginationThrs); For_ListForumThrs (ThrCods,ThrCodHighlighted,&PaginationThrs);
/***** End table *****/ /***** End table *****/
Lay_EndTable (); Tbl_EndTable ();
/***** Write links to all the pages in the listing of threads *****/ /***** Write links to all the pages in the listing of threads *****/
if (PaginationThrs.MoreThanOnePage) if (PaginationThrs.MoreThanOnePage)
@ -3881,7 +3882,7 @@ static void For_WriteFormForumPst (bool IsReply,const char *Subject)
} }
/***** Subject and content *****/ /***** Subject and content *****/
Lay_StartTableCenter (2); Tbl_StartTableCenter (2);
// If writing a reply to a message of an existing thread ==> write subject // If writing a reply to a message of an existing thread ==> write subject
/* Subject */ /* Subject */
@ -3915,7 +3916,7 @@ static void For_WriteFormForumPst (bool IsReply,const char *Subject)
"</tr>", "</tr>",
The_ClassForm[Gbl.Prefs.Theme],Txt_MSG_Content); The_ClassForm[Gbl.Prefs.Theme],Txt_MSG_Content);
Lay_EndTable (); Tbl_EndTable ();
/***** Help for text editor *****/ /***** Help for text editor *****/
Lay_HelpPlainEditor (); Lay_HelpPlainEditor ();

View File

@ -36,6 +36,7 @@
#include "swad_group.h" #include "swad_group.h"
#include "swad_notification.h" #include "swad_notification.h"
#include "swad_parameter.h" #include "swad_parameter.h"
#include "swad_table.h"
/*****************************************************************************/ /*****************************************************************************/
/*************************** Internal constants ******************************/ /*************************** Internal constants ******************************/
@ -386,13 +387,13 @@ void Grp_ShowFormToSelectSeveralGroups (Act_Action_t NextAction)
Grp_GetListGrpTypesAndGrpsInThisCrs (Grp_ONLY_GROUP_TYPES_WITH_GROUPS); Grp_GetListGrpTypesAndGrpsInThisCrs (Grp_ONLY_GROUP_TYPES_WITH_GROUPS);
/***** List the groups for each group type *****/ /***** List the groups for each group type *****/
Lay_StartTableWide (2); Tbl_StartTableWide (2);
for (NumGrpTyp = 0; for (NumGrpTyp = 0;
NumGrpTyp < Gbl.CurrentCrs.Grps.GrpTypes.Num; NumGrpTyp < Gbl.CurrentCrs.Grps.GrpTypes.Num;
NumGrpTyp++) NumGrpTyp++)
if (Gbl.CurrentCrs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp].NumGrps) if (Gbl.CurrentCrs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp].NumGrps)
Grp_ListGrpsForMultipleSelection (&Gbl.CurrentCrs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp]); Grp_ListGrpsForMultipleSelection (&Gbl.CurrentCrs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp]);
Lay_EndTable (); Tbl_EndTable ();
/***** Free list of groups types and groups in this course *****/ /***** Free list of groups types and groups in this course *****/
Grp_FreeListGrpTypesAndGrps (); Grp_FreeListGrpTypesAndGrps ();
@ -1243,7 +1244,7 @@ static void Grp_ListGroupTypesForEdition (void)
char Id[32]; char Id[32];
/***** Write heading *****/ /***** Write heading *****/
Lay_StartTableWide (2); Tbl_StartTableWide (2);
Grp_WriteHeadingGroupTypes (); Grp_WriteHeadingGroupTypes ();
/***** List group types with forms for edition *****/ /***** List group types with forms for edition *****/
@ -1321,7 +1322,7 @@ static void Grp_ListGroupTypesForEdition (void)
fprintf (Gbl.F.Out,"<td class=\"LEFT_MIDDLE\">"); fprintf (Gbl.F.Out,"<td class=\"LEFT_MIDDLE\">");
Act_FormStartAnchor (ActChgTimGrpTyp,Grp_GROUP_TYPES_SECTION_ID); Act_FormStartAnchor (ActChgTimGrpTyp,Grp_GROUP_TYPES_SECTION_ID);
Grp_PutParamGrpTypCod (Gbl.CurrentCrs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp].GrpTypCod); Grp_PutParamGrpTypCod (Gbl.CurrentCrs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp].GrpTypCod);
Lay_StartTableCenter (2); Tbl_StartTableCenter (2);
fprintf (Gbl.F.Out,"<tr>" fprintf (Gbl.F.Out,"<tr>"
"<td class=\"LEFT_MIDDLE\" style=\"width:20px;\">" "<td class=\"LEFT_MIDDLE\" style=\"width:20px;\">"
"<img src=\"%s/%s16x16.gif\"" "<img src=\"%s/%s16x16.gif\""
@ -1347,7 +1348,7 @@ static void Grp_ListGroupTypesForEdition (void)
true); // Submit on change true); // Submit on change
fprintf (Gbl.F.Out,"</td>" fprintf (Gbl.F.Out,"</td>"
"</tr>"); "</tr>");
Lay_EndTable (); Tbl_EndTable ();
Act_FormEnd (); Act_FormEnd ();
fprintf (Gbl.F.Out,"</td>"); fprintf (Gbl.F.Out,"</td>");
@ -1360,7 +1361,7 @@ static void Grp_ListGroupTypesForEdition (void)
} }
/***** End table *****/ /***** End table *****/
Lay_EndTable (); Tbl_EndTable ();
} }
/*****************************************************************************/ /*****************************************************************************/
@ -1449,7 +1450,7 @@ static void Grp_ListGroupsForEdition (void)
Rol_Role_t Role; Rol_Role_t Role;
/***** Write heading *****/ /***** Write heading *****/
Lay_StartTableWide (2); Tbl_StartTableWide (2);
Grp_WriteHeadingGroups (); Grp_WriteHeadingGroups ();
/***** List the groups *****/ /***** List the groups *****/
@ -1572,7 +1573,7 @@ static void Grp_ListGroupsForEdition (void)
} }
/***** End table *****/ /***** End table *****/
Lay_EndTable (); Tbl_EndTable ();
} }
/*****************************************************************************/ /*****************************************************************************/
@ -1739,7 +1740,7 @@ void Grp_ShowLstGrpsToChgMyGrps (void)
Act_FormStart (ActChgGrp); Act_FormStart (ActChgGrp);
/***** List the groups the user belongs to for change *****/ /***** List the groups the user belongs to for change *****/
Lay_StartTableWide (2); Tbl_StartTableWide (2);
for (NumGrpTyp = 0; for (NumGrpTyp = 0;
NumGrpTyp < Gbl.CurrentCrs.Grps.GrpTypes.Num; NumGrpTyp < Gbl.CurrentCrs.Grps.GrpTypes.Num;
NumGrpTyp++) NumGrpTyp++)
@ -1749,7 +1750,7 @@ void Grp_ShowLstGrpsToChgMyGrps (void)
&NumGrpsThisTypeIBelong); &NumGrpsThisTypeIBelong);
NumGrpsIBelong += NumGrpsThisTypeIBelong; NumGrpsIBelong += NumGrpsThisTypeIBelong;
} }
Lay_EndTable (); Tbl_EndTable ();
/***** End form *****/ /***** End form *****/
if (PutFormToChangeGrps) if (PutFormToChangeGrps)
@ -2405,7 +2406,7 @@ static void Grp_PutFormToCreateGroupType (void)
/***** Open time *****/ /***** Open time *****/
fprintf (Gbl.F.Out,"<td class=\"LEFT_MIDDLE\">"); fprintf (Gbl.F.Out,"<td class=\"LEFT_MIDDLE\">");
Lay_StartTable (2); Tbl_StartTable (2);
fprintf (Gbl.F.Out,"<tr>" fprintf (Gbl.F.Out,"<tr>"
"<td class=\"LEFT_MIDDLE\" style=\"width:20px;\">" "<td class=\"LEFT_MIDDLE\" style=\"width:20px;\">"
"<img src=\"%s/%s16x16.gif\"" "<img src=\"%s/%s16x16.gif\""
@ -2430,7 +2431,7 @@ static void Grp_PutFormToCreateGroupType (void)
false); // Don't submit on change false); // Don't submit on change
fprintf (Gbl.F.Out,"</td>" fprintf (Gbl.F.Out,"</td>"
"</tr>"); "</tr>");
Lay_EndTable (); Tbl_EndTable ();
fprintf (Gbl.F.Out,"</td>"); fprintf (Gbl.F.Out,"</td>");
/***** Number of groups of this type *****/ /***** Number of groups of this type *****/

View File

@ -32,6 +32,7 @@
#include "swad_degree.h" #include "swad_degree.h"
#include "swad_global.h" #include "swad_global.h"
#include "swad_logo.h" #include "swad_logo.h"
#include "swad_table.h"
#include "swad_theme.h" #include "swad_theme.h"
/*****************************************************************************/ /*****************************************************************************/
@ -97,7 +98,7 @@ void Hie_WriteMenuHierarchy (void)
extern const char *Txt_Course; extern const char *Txt_Course;
/***** Start of table *****/ /***** Start of table *****/
Lay_StartTableCenter (2); Tbl_StartTableCenter (2);
/***** Write a 1st selector /***** Write a 1st selector
with all the countries *****/ with all the countries *****/
@ -172,7 +173,7 @@ void Hie_WriteMenuHierarchy (void)
} }
/***** End of table *****/ /***** End of table *****/
Lay_EndTable (); Tbl_EndTable ();
} }
/*****************************************************************************/ /*****************************************************************************/

View File

@ -34,6 +34,7 @@
#include "swad_global.h" #include "swad_global.h"
#include "swad_holiday.h" #include "swad_holiday.h"
#include "swad_parameter.h" #include "swad_parameter.h"
#include "swad_table.h"
#include "swad_text.h" #include "swad_text.h"
/*****************************************************************************/ /*****************************************************************************/
@ -107,7 +108,7 @@ void Hld_SeeHolidays (void)
false); // Not closable false); // Not closable
if (Gbl.Hlds.Num) if (Gbl.Hlds.Num)
{ {
Lay_StartTableWideMargin (2); Tbl_StartTableWideMargin (2);
fprintf (Gbl.F.Out,"<tr>"); fprintf (Gbl.F.Out,"<tr>");
for (Order = Hld_ORDER_BY_PLACE; for (Order = Hld_ORDER_BY_PLACE;
Order <= Hld_ORDER_BY_START_DATE; Order <= Hld_ORDER_BY_START_DATE;
@ -171,7 +172,7 @@ void Hld_SeeHolidays (void)
"</tr>", "</tr>",
Gbl.Hlds.Lst[NumHld].Name); Gbl.Hlds.Lst[NumHld].Name);
} }
Lay_EndTable (); Tbl_EndTable ();
} }
else // No holidays created in the current institution else // No holidays created in the current institution
Ale_ShowAlert (Ale_INFO,Txt_No_holidays); Ale_ShowAlert (Ale_INFO,Txt_No_holidays);

View File

@ -35,6 +35,7 @@
#include "swad_global.h" #include "swad_global.h"
#include "swad_indicator.h" #include "swad_indicator.h"
#include "swad_parameter.h" #include "swad_parameter.h"
#include "swad_table.h"
#include "swad_theme.h" #include "swad_theme.h"
/*****************************************************************************/ /*****************************************************************************/
@ -113,7 +114,7 @@ void Ind_ReqIndicatorsCourses (void)
/***** Form to update indicators *****/ /***** Form to update indicators *****/
/* Start form and table */ /* Start form and table */
Act_FormStart (ActReqStaCrs); Act_FormStart (ActReqStaCrs);
Lay_StartTableWide (2); Tbl_StartTableWide (2);
/* Scope */ /* Scope */
fprintf (Gbl.F.Out,"<tr>" fprintf (Gbl.F.Out,"<tr>"
@ -175,7 +176,7 @@ void Ind_ReqIndicatorsCourses (void)
"</tr>"); "</tr>");
/* End table and form */ /* End table and form */
Lay_EndTable (); Tbl_EndTable ();
Act_FormEnd (); Act_FormEnd ();
/***** Show the stats of courses *****/ /***** Show the stats of courses *****/
@ -593,7 +594,7 @@ static void Ind_ShowNumCoursesWithIndicators (unsigned NumCrssWithIndicatorYes[1
const char *ClassHighlight = "DAT RIGHT_MIDDLE LIGHT_BLUE"; const char *ClassHighlight = "DAT RIGHT_MIDDLE LIGHT_BLUE";
/***** Write number of courses with each number of indicators valid *****/ /***** Write number of courses with each number of indicators valid *****/
Lay_StartTable (2); Tbl_StartTable (2);
fprintf (Gbl.F.Out,"<tr>"); fprintf (Gbl.F.Out,"<tr>");
if (PutForm) if (PutForm)
@ -665,7 +666,7 @@ static void Ind_ShowNumCoursesWithIndicators (unsigned NumCrssWithIndicatorYes[1
NumCrss, NumCrss,
100.0); 100.0);
Lay_EndTable (); Tbl_EndTable ();
} }
/*****************************************************************************/ /*****************************************************************************/

View File

@ -40,6 +40,7 @@
#include "swad_logo.h" #include "swad_logo.h"
#include "swad_parameter.h" #include "swad_parameter.h"
#include "swad_QR.h" #include "swad_QR.h"
#include "swad_table.h"
#include "swad_text.h" #include "swad_text.h"
#include "swad_user.h" #include "swad_user.h"
@ -330,7 +331,7 @@ static void Ins_Configuration (bool PrintView)
fprintf (Gbl.F.Out,"</div>"); fprintf (Gbl.F.Out,"</div>");
/***** Start table *****/ /***** Start table *****/
Lay_StartTableWide (2); Tbl_StartTableWide (2);
/***** Country *****/ /***** Country *****/
fprintf (Gbl.F.Out,"<tr>" fprintf (Gbl.F.Out,"<tr>"
@ -585,7 +586,7 @@ static void Ins_Configuration (bool PrintView)
} }
/***** End table *****/ /***** End table *****/
Lay_EndTable (); Tbl_EndTable ();
/***** End frame *****/ /***** End frame *****/
Box_EndBox (); Box_EndBox ();
@ -677,7 +678,7 @@ static void Ins_ListInstitutions (void)
if (Gbl.Inss.Num) // There are institutions in the current country if (Gbl.Inss.Num) // There are institutions in the current country
{ {
/***** Start table *****/ /***** Start table *****/
Lay_StartTableWideMargin (2); Tbl_StartTableWideMargin (2);
Ins_PutHeadInstitutionsForSeeing (true); // Order selectable Ins_PutHeadInstitutionsForSeeing (true); // Order selectable
/***** Write all the institutions and their nuber of users *****/ /***** Write all the institutions and their nuber of users *****/
@ -687,7 +688,7 @@ static void Ins_ListInstitutions (void)
Ins_ListOneInstitutionForSeeing (&(Gbl.Inss.Lst[NumIns]),NumIns + 1); Ins_ListOneInstitutionForSeeing (&(Gbl.Inss.Lst[NumIns]),NumIns + 1);
/***** End table *****/ /***** End table *****/
Lay_EndTable (); Tbl_EndTable ();
} }
else // No insrtitutions created in the current country else // No insrtitutions created in the current country
Ale_ShowAlert (Ale_INFO,Txt_No_institutions); Ale_ShowAlert (Ale_INFO,Txt_No_institutions);
@ -1405,7 +1406,7 @@ static void Ins_ListInstitutionsForEdition (void)
Usr_UsrDataConstructor (&UsrDat); Usr_UsrDataConstructor (&UsrDat);
/***** Write heading *****/ /***** Write heading *****/
Lay_StartTableWide (2); Tbl_StartTableWide (2);
Ins_PutHeadInstitutionsForEdition (); Ins_PutHeadInstitutionsForEdition ();
/***** Write all the institutions *****/ /***** Write all the institutions *****/
@ -1566,7 +1567,7 @@ static void Ins_ListInstitutionsForEdition (void)
} }
/***** End table *****/ /***** End table *****/
Lay_EndTable (); Tbl_EndTable ();
/***** Free memory used for user's data *****/ /***** Free memory used for user's data *****/
Usr_UsrDataDestructor (&UsrDat); Usr_UsrDataDestructor (&UsrDat);

View File

@ -1154,47 +1154,6 @@ void Lay_PutContextualCheckbox (Act_Action_t NextAction,
// jumping to the next line on narrow screens // jumping to the next line on narrow screens
} }
/*****************************************************************************/
/******************************* Start/end table *****************************/
/*****************************************************************************/
void Lay_StartTable (unsigned CellPadding)
{
fprintf (Gbl.F.Out,"<table");
if (CellPadding)
fprintf (Gbl.F.Out," class=\"CELLS_PAD_%u\"",CellPadding); // CellPadding must be 0, 1, 2, 5 or 10
fprintf (Gbl.F.Out,">");
}
void Lay_StartTableCenter (unsigned CellPadding)
{
fprintf (Gbl.F.Out,"<table class=\"FRAME_TBL_CENTER");
if (CellPadding)
fprintf (Gbl.F.Out," CELLS_PAD_%u",CellPadding); // CellPadding must be 0, 1, 2, 5 or 10
fprintf (Gbl.F.Out,"\">");
}
void Lay_StartTableWide (unsigned CellPadding)
{
fprintf (Gbl.F.Out,"<table class=\"FRAME_TBL_WIDE");
if (CellPadding)
fprintf (Gbl.F.Out," CELLS_PAD_%u",CellPadding); // CellPadding must be 0, 1, 2, 5 or 10
fprintf (Gbl.F.Out,"\">");
}
void Lay_StartTableWideMargin (unsigned CellPadding)
{
fprintf (Gbl.F.Out,"<table class=\"FRAME_TBL_WIDE_MARGIN");
if (CellPadding)
fprintf (Gbl.F.Out," CELLS_PAD_%u",CellPadding); // CellPadding must be 0, 1, 2, 5 or 10
fprintf (Gbl.F.Out,"\">");
}
void Lay_EndTable (void)
{
fprintf (Gbl.F.Out,"</table>");
}
/*****************************************************************************/ /*****************************************************************************/
/****************************** Start/end section ****************************/ /****************************** Start/end section ****************************/
/*****************************************************************************/ /*****************************************************************************/

View File

@ -61,12 +61,6 @@ void Lay_PutContextualCheckbox (Act_Action_t NextAction,
bool Checked,bool Disabled, bool Checked,bool Disabled,
const char *Title,const char *Text); const char *Title,const char *Text);
void Lay_StartTable (unsigned CellPadding);
void Lay_StartTableCenter (unsigned CellPadding);
void Lay_StartTableWide (unsigned CellPadding);
void Lay_StartTableWideMargin (unsigned CellPadding);
void Lay_EndTable (void);
void Lay_StartSection (const char *SectionId); void Lay_StartSection (const char *SectionId);
void Lay_EndSection (void); void Lay_EndSection (void);

View File

@ -35,6 +35,7 @@
#include "swad_global.h" #include "swad_global.h"
#include "swad_link.h" #include "swad_link.h"
#include "swad_parameter.h" #include "swad_parameter.h"
#include "swad_table.h"
#include "swad_text.h" #include "swad_text.h"
/*****************************************************************************/ /*****************************************************************************/
@ -390,7 +391,7 @@ static void Lnk_ListLinksForEdition (void)
struct Link *Lnk; struct Link *Lnk;
/***** Start table *****/ /***** Start table *****/
Lay_StartTableWide (2); Tbl_StartTableWide (2);
/***** Table head *****/ /***** Table head *****/
Lnk_PutHeadLinks (); Lnk_PutHeadLinks ();
@ -459,7 +460,7 @@ static void Lnk_ListLinksForEdition (void)
} }
/***** End table *****/ /***** End table *****/
Lay_EndTable (); Tbl_EndTable ();
} }
/*****************************************************************************/ /*****************************************************************************/

View File

@ -39,6 +39,7 @@
#include "swad_parameter.h" #include "swad_parameter.h"
#include "swad_QR.h" #include "swad_QR.h"
#include "swad_tab.h" #include "swad_tab.h"
#include "swad_table.h"
#include "swad_text.h" #include "swad_text.h"
/*****************************************************************************/ /*****************************************************************************/
@ -1197,10 +1198,10 @@ void Mai_ShowFormOthEmail (void)
&Gbl.Usrs.Other.UsrDat,NULL); &Gbl.Usrs.Other.UsrDat,NULL);
/***** Form with the user's email *****/ /***** Form with the user's email *****/
Lay_StartTableCenter (2); Tbl_StartTableCenter (2);
Mai_ShowFormChangeUsrEmail (&Gbl.Usrs.Other.UsrDat, Mai_ShowFormChangeUsrEmail (&Gbl.Usrs.Other.UsrDat,
(Gbl.Usrs.Other.UsrDat.UsrCod == Gbl.Usrs.Me.UsrDat.UsrCod)); // It's me? (Gbl.Usrs.Other.UsrDat.UsrCod == Gbl.Usrs.Me.UsrDat.UsrCod)); // It's me?
Lay_EndTable (); Tbl_EndTable ();
/***** End frame *****/ /***** End frame *****/
Box_EndBox (); Box_EndBox ();

View File

@ -45,6 +45,7 @@
#include "swad_parameter.h" #include "swad_parameter.h"
#include "swad_photo.h" #include "swad_photo.h"
#include "swad_profile.h" #include "swad_profile.h"
#include "swad_table.h"
#include "swad_user.h" #include "swad_user.h"
/*****************************************************************************/ /*****************************************************************************/
@ -283,7 +284,7 @@ static void Msg_PutFormMsgUsrs (char Content[Cns_MAX_BYTES_LONG_TEXT + 1])
} }
/***** Start table *****/ /***** Start table *****/
Lay_StartTableCenter (2); Tbl_StartTableCenter (2);
/***** "To:" section (recipients) *****/ /***** "To:" section (recipients) *****/
fprintf (Gbl.F.Out,"<tr>" fprintf (Gbl.F.Out,"<tr>"
@ -298,7 +299,7 @@ static void Msg_PutFormMsgUsrs (char Content[Cns_MAX_BYTES_LONG_TEXT + 1])
else else
{ {
/***** Show potential recipients *****/ /***** Show potential recipients *****/
Lay_StartTableWide (0); Tbl_StartTableWide (0);
if (ShowUsrsInCrs) if (ShowUsrsInCrs)
{ {
Usr_ListUsersToSelect (Rol_TCH); // All teachers in course Usr_ListUsersToSelect (Rol_TCH); // All teachers in course
@ -306,7 +307,7 @@ static void Msg_PutFormMsgUsrs (char Content[Cns_MAX_BYTES_LONG_TEXT + 1])
Usr_ListUsersToSelect (Rol_STD); // All students in selected groups Usr_ListUsersToSelect (Rol_STD); // All students in selected groups
} }
Msg_WriteFormUsrsIDsOrNicksOtherRecipients (); // Other users (nicknames) Msg_WriteFormUsrsIDsOrNicksOtherRecipients (); // Other users (nicknames)
Lay_EndTable (); Tbl_EndTable ();
} }
fprintf (Gbl.F.Out,"</td>" fprintf (Gbl.F.Out,"</td>"
@ -316,7 +317,7 @@ static void Msg_PutFormMsgUsrs (char Content[Cns_MAX_BYTES_LONG_TEXT + 1])
Msg_WriteFormSubjectAndContentMsgToUsrs (Content); Msg_WriteFormSubjectAndContentMsgToUsrs (Content);
/***** End table *****/ /***** End table *****/
Lay_EndTable (); Tbl_EndTable ();
/***** Help for text editor and send button *****/ /***** Help for text editor and send button *****/
Lay_HelpPlainEditor (); Lay_HelpPlainEditor ();
@ -1827,7 +1828,7 @@ static void Msg_ShowSentOrReceivedMessages (void)
&Pagination); &Pagination);
/***** Show received / sent messages in this page *****/ /***** Show received / sent messages in this page *****/
Lay_StartTableWide (2); Tbl_StartTableWide (2);
mysql_data_seek (mysql_res,(my_ulonglong) (Pagination.FirstItemVisible - 1)); mysql_data_seek (mysql_res,(my_ulonglong) (Pagination.FirstItemVisible - 1));
for (NumRow = Pagination.FirstItemVisible; for (NumRow = Pagination.FirstItemVisible;
@ -1842,7 +1843,7 @@ static void Msg_ShowSentOrReceivedMessages (void)
Msg_ShowASentOrReceivedMessage (NumMsg,MsgCod); Msg_ShowASentOrReceivedMessage (NumMsg,MsgCod);
} }
Lay_EndTable (); Tbl_EndTable ();
/***** Write again links to pages *****/ /***** Write again links to pages *****/
if (Pagination.MoreThanOnePage) if (Pagination.MoreThanOnePage)
@ -2579,7 +2580,7 @@ void Msg_ShowFormToFilterMsgs (void)
}; };
/***** Table start *****/ /***** Table start *****/
Lay_StartTableCenter (2); Tbl_StartTableCenter (2);
/***** Filter authors/recipients *****/ /***** Filter authors/recipients *****/
fprintf (Gbl.F.Out,"<tr>" fprintf (Gbl.F.Out,"<tr>"
@ -2608,7 +2609,7 @@ void Msg_ShowFormToFilterMsgs (void)
Msg_MAX_CHARS_FILTER_CONTENT,Gbl.Msg.FilterContent); Msg_MAX_CHARS_FILTER_CONTENT,Gbl.Msg.FilterContent);
/***** End table *****/ /***** End table *****/
Lay_EndTable (); Tbl_EndTable ();
} }
/*****************************************************************************/ /*****************************************************************************/
@ -2937,7 +2938,7 @@ static void Msg_ShowASentOrReceivedMessage (long MsgNum,long MsgCod)
{ {
fprintf (Gbl.F.Out,"<tr>" fprintf (Gbl.F.Out,"<tr>"
"<td rowspan=\"3\" colspan=\"2\" class=\"LEFT_TOP\">"); "<td rowspan=\"3\" colspan=\"2\" class=\"LEFT_TOP\">");
Lay_StartTable (2); Tbl_StartTable (2);
/***** Write course origin of message *****/ /***** Write course origin of message *****/
fprintf (Gbl.F.Out,"<tr>" fprintf (Gbl.F.Out,"<tr>"
@ -2956,7 +2957,7 @@ static void Msg_ShowASentOrReceivedMessage (long MsgNum,long MsgCod)
fprintf (Gbl.F.Out,"</td>" fprintf (Gbl.F.Out,"</td>"
"</tr>"); "</tr>");
Lay_EndTable (); Tbl_EndTable ();
fprintf (Gbl.F.Out,"</td>"); fprintf (Gbl.F.Out,"</td>");
/***** Write "From:" *****/ /***** Write "From:" *****/
@ -3131,7 +3132,7 @@ void Msg_WriteMsgAuthor (struct UsrData *UsrDat,bool Enabled,const char *BgColor
bool WriteAuthor = false; bool WriteAuthor = false;
/***** Start table *****/ /***** Start table *****/
Lay_StartTable (2); Tbl_StartTable (2);
/***** Start first column *****/ /***** Start first column *****/
fprintf (Gbl.F.Out,"<tr>" fprintf (Gbl.F.Out,"<tr>"
@ -3182,7 +3183,7 @@ void Msg_WriteMsgAuthor (struct UsrData *UsrDat,bool Enabled,const char *BgColor
"</tr>"); "</tr>");
/***** End table *****/ /***** End table *****/
Lay_EndTable (); Tbl_EndTable ();
} }
/*****************************************************************************/ /*****************************************************************************/

View File

@ -45,6 +45,7 @@
#include "swad_notification.h" #include "swad_notification.h"
#include "swad_parameter.h" #include "swad_parameter.h"
#include "swad_social.h" #include "swad_social.h"
#include "swad_table.h"
/*****************************************************************************/ /*****************************************************************************/
/************** External global variables from others modules ****************/ /************** External global variables from others modules ****************/
@ -400,7 +401,7 @@ void Ntf_ShowMyNotifications (void)
Usr_UsrDataConstructor (&UsrDat); Usr_UsrDataConstructor (&UsrDat);
/***** Start table *****/ /***** Start table *****/
Lay_StartTableWideMargin (2); Tbl_StartTableWideMargin (2);
fprintf (Gbl.F.Out,"<tr>" fprintf (Gbl.F.Out,"<tr>"
"<th colspan=\"2\" class=\"LEFT_MIDDLE\">" "<th colspan=\"2\" class=\"LEFT_MIDDLE\">"
"%s" "%s"
@ -636,7 +637,7 @@ void Ntf_ShowMyNotifications (void)
} }
/***** End table *****/ /***** End table *****/
Lay_EndTable (); Tbl_EndTable ();
/***** Free memory used for user's data *****/ /***** Free memory used for user's data *****/
Usr_UsrDataDestructor (&UsrDat); Usr_UsrDataDestructor (&UsrDat);
@ -1910,7 +1911,7 @@ void Ntf_PutFormChangeNotifSentByEMail (void)
Mai_WriteWarningEmailNotifications (); Mai_WriteWarningEmailNotifications ();
/***** List of notifications *****/ /***** List of notifications *****/
Lay_StartTableCenter (2); Tbl_StartTableCenter (2);
fprintf (Gbl.F.Out,"<tr>" fprintf (Gbl.F.Out,"<tr>"
"<th></th>" "<th></th>"
"<th class=\"CENTER_MIDDLE\">" "<th class=\"CENTER_MIDDLE\">"
@ -1952,7 +1953,7 @@ void Ntf_PutFormChangeNotifSentByEMail (void)
"</tr>"); "</tr>");
} }
Lay_EndTable (); Tbl_EndTable ();
/***** Button to save changes *****/ /***** Button to save changes *****/
Btn_PutConfirmButton (Txt_Save_changes); Btn_PutConfirmButton (Txt_Save_changes);

View File

@ -37,6 +37,7 @@
#include "swad_ID.h" #include "swad_ID.h"
#include "swad_password.h" #include "swad_password.h"
#include "swad_parameter.h" #include "swad_parameter.h"
#include "swad_table.h"
#include "swad_user.h" #include "swad_user.h"
/*****************************************************************************/ /*****************************************************************************/
@ -854,9 +855,9 @@ void Pwd_ShowFormOthPwd (void)
Usr_PutParamOtherUsrCodEncrypted (); Usr_PutParamOtherUsrCodEncrypted ();
/* New password */ /* New password */
Lay_StartTableCenter (2); Tbl_StartTableCenter (2);
Pwd_PutFormToGetNewPasswordTwice (); Pwd_PutFormToGetNewPasswordTwice ();
Lay_EndTable (); Tbl_EndTable ();
/* End form */ /* End form */
Btn_PutConfirmButton (Txt_Change_password); Btn_PutConfirmButton (Txt_Change_password);

View File

@ -45,6 +45,7 @@
#include "swad_parameter.h" #include "swad_parameter.h"
#include "swad_photo.h" #include "swad_photo.h"
#include "swad_privacy.h" #include "swad_privacy.h"
#include "swad_table.h"
#include "swad_theme.h" #include "swad_theme.h"
#include "swad_user.h" #include "swad_user.h"
@ -901,7 +902,7 @@ static void Pho_UpdatePhoto2 (void)
unsigned NumPhoto; unsigned NumPhoto;
/***** Show the three images resulting of the processing *****/ /***** Show the three images resulting of the processing *****/
Lay_StartTableWide (0); Tbl_StartTableWide (0);
fprintf (Gbl.F.Out,"<tr>"); fprintf (Gbl.F.Out,"<tr>");
for (NumPhoto = 0; for (NumPhoto = 0;
NumPhoto < 3; NumPhoto < 3;
@ -919,7 +920,7 @@ static void Pho_UpdatePhoto2 (void)
Pho_PHOTO_REAL_WIDTH,Pho_PHOTO_REAL_HEIGHT, Pho_PHOTO_REAL_WIDTH,Pho_PHOTO_REAL_HEIGHT,
Txt_PHOTO_PROCESSING_CAPTIONS[NumPhoto]); Txt_PHOTO_PROCESSING_CAPTIONS[NumPhoto]);
fprintf (Gbl.F.Out,"</tr>"); fprintf (Gbl.F.Out,"</tr>");
Lay_EndTable (); Tbl_EndTable ();
/***** Show message *****/ /***** Show message *****/
Ale_ShowPendingAlert (); Ale_ShowPendingAlert ();
@ -1696,7 +1697,7 @@ void Pho_ShowOrPrintPhotoDegree (Pho_AvgPhotoSeeOrPrint_t SeeOrPrint)
Pho_PutIconToPrintDegreeStats, Pho_PutIconToPrintDegreeStats,
Hlp_STATS_Degrees, Hlp_STATS_Degrees,
false); // Not closable false); // Not closable
Lay_StartTableCenter (2); Tbl_StartTableCenter (2);
/***** Put a selector for the type of average *****/ /***** Put a selector for the type of average *****/
Pho_PutSelectorForTypeOfAvg (); Pho_PutSelectorForTypeOfAvg ();
@ -1707,7 +1708,7 @@ void Pho_ShowOrPrintPhotoDegree (Pho_AvgPhotoSeeOrPrint_t SeeOrPrint)
/***** Put a selector for the order of degrees *****/ /***** Put a selector for the order of degrees *****/
Pho_PutSelectorForHowOrderDegrees (); Pho_PutSelectorForHowOrderDegrees ();
Lay_EndTable (); Tbl_EndTable ();
break; break;
case Pho_DEGREES_PRINT: case Pho_DEGREES_PRINT:
/***** Start frame *****/ /***** Start frame *****/
@ -2091,7 +2092,7 @@ static void Pho_ShowOrPrintClassPhotoDegrees (Pho_AvgPhotoSeeOrPrint_t SeeOrPrin
/***** Form to select type of list used to display degree photos *****/ /***** Form to select type of list used to display degree photos *****/
if (SeeOrPrint == Pho_DEGREES_SEE) if (SeeOrPrint == Pho_DEGREES_SEE)
Usr_ShowFormsToSelectUsrListType (ActSeePhoDeg); Usr_ShowFormsToSelectUsrListType (ActSeePhoDeg);
Lay_StartTableCenter (0); Tbl_StartTableCenter (0);
/***** Get and print degrees *****/ /***** Get and print degrees *****/
for (NumRow = 0, NumDegsNotEmpty = 0; for (NumRow = 0, NumDegsNotEmpty = 0;
@ -2134,7 +2135,7 @@ static void Pho_ShowOrPrintClassPhotoDegrees (Pho_AvgPhotoSeeOrPrint_t SeeOrPrin
if (TRIsOpen) if (TRIsOpen)
fprintf (Gbl.F.Out,"</tr>"); fprintf (Gbl.F.Out,"</tr>");
Lay_EndTable (); Tbl_EndTable ();
} }
else // No degrees with students found else // No degrees with students found
/***** Show warning indicating no students found *****/ /***** Show warning indicating no students found *****/
@ -2176,7 +2177,7 @@ static void Pho_ShowOrPrintListDegrees (Pho_AvgPhotoSeeOrPrint_t SeeOrPrint)
Usr_ShowFormsToSelectUsrListType (ActSeePhoDeg); Usr_ShowFormsToSelectUsrListType (ActSeePhoDeg);
/***** Write heading *****/ /***** Write heading *****/
Lay_StartTableCenter (2); Tbl_StartTableCenter (2);
fprintf (Gbl.F.Out,"<tr>" fprintf (Gbl.F.Out,"<tr>"
"<th class=\"RIGHT_TOP\">" "<th class=\"RIGHT_TOP\">"
"%s" "%s"
@ -2248,7 +2249,7 @@ static void Pho_ShowOrPrintListDegrees (Pho_AvgPhotoSeeOrPrint_t SeeOrPrint)
} }
/***** Photos end *****/ /***** Photos end *****/
Lay_EndTable (); Tbl_EndTable ();
} }
else // No degrees with students found! else // No degrees with students found!
/***** Show warning indicating no students found *****/ /***** Show warning indicating no students found *****/

View File

@ -35,6 +35,7 @@
#include "swad_global.h" #include "swad_global.h"
#include "swad_parameter.h" #include "swad_parameter.h"
#include "swad_place.h" #include "swad_place.h"
#include "swad_table.h"
#include "swad_text.h" #include "swad_text.h"
/*****************************************************************************/ /*****************************************************************************/
@ -122,7 +123,7 @@ void Plc_SeePlaces (void)
NULL, NULL,
Hlp_INSTITUTION_Places, Hlp_INSTITUTION_Places,
false); // Not closable false); // Not closable
Lay_StartTableWideMargin (2); Tbl_StartTableWideMargin (2);
fprintf (Gbl.F.Out,"<tr>"); fprintf (Gbl.F.Out,"<tr>");
for (Order = Plc_ORDER_BY_PLACE; for (Order = Plc_ORDER_BY_PLACE;
Order <= Plc_ORDER_BY_NUM_CTRS; Order <= Plc_ORDER_BY_NUM_CTRS;
@ -196,7 +197,7 @@ void Plc_SeePlaces (void)
NumCtrsWithPlc); NumCtrsWithPlc);
/***** End table *****/ /***** End table *****/
Lay_EndTable (); Tbl_EndTable ();
/***** Button to create place *****/ /***** Button to create place *****/
if (ICanEdit) if (ICanEdit)
@ -465,7 +466,7 @@ static void Plc_ListPlacesForEdition (void)
struct Place *Plc; struct Place *Plc;
/***** Write heading *****/ /***** Write heading *****/
Lay_StartTableWide (2); Tbl_StartTableWide (2);
Plc_PutHeadPlaces (); Plc_PutHeadPlaces ();
/***** Write all the places *****/ /***** Write all the places *****/
@ -528,7 +529,7 @@ static void Plc_ListPlacesForEdition (void)
} }
/***** End table *****/ /***** End table *****/
Lay_EndTable (); Tbl_EndTable ();
} }
/*****************************************************************************/ /*****************************************************************************/

View File

@ -47,6 +47,7 @@
#include "swad_QR.h" #include "swad_QR.h"
#include "swad_record.h" #include "swad_record.h"
#include "swad_role.h" #include "swad_role.h"
#include "swad_table.h"
#include "swad_user.h" #include "swad_user.h"
/*****************************************************************************/ /*****************************************************************************/
@ -1786,7 +1787,7 @@ static void Rec_ShowCrsRecord (Rec_CourseRecordViewType_t TypeOfView,
/***** Header *****/ /***** Header *****/
fprintf (Gbl.F.Out,"<tr>" fprintf (Gbl.F.Out,"<tr>"
"<td colspan=\"2\" class=\"LEFT_TOP\">"); "<td colspan=\"2\" class=\"LEFT_TOP\">");
Lay_StartTableWide (0); Tbl_StartTableWide (0);
fprintf (Gbl.F.Out,"<tr>" fprintf (Gbl.F.Out,"<tr>"
"<td class=\"LEFT_MIDDLE\" style=\"width:%upx;\">", "<td class=\"LEFT_MIDDLE\" style=\"width:%upx;\">",
Rec_DEGREE_LOGO_SIZE); Rec_DEGREE_LOGO_SIZE);
@ -1799,7 +1800,7 @@ static void Rec_ShowCrsRecord (Rec_CourseRecordViewType_t TypeOfView,
"</tr>", "</tr>",
Gbl.CurrentDeg.Deg.FullName,Gbl.CurrentCrs.Crs.FullName, Gbl.CurrentDeg.Deg.FullName,Gbl.CurrentCrs.Crs.FullName,
UsrDat->FullName); UsrDat->FullName);
Lay_EndTable (); Tbl_EndTable ();
fprintf (Gbl.F.Out,"</td>" fprintf (Gbl.F.Out,"</td>"
"</tr>"); "</tr>");
@ -2355,7 +2356,7 @@ void Rec_ShowSharedUsrRecord (Rec_SharedRecordViewType_t TypeOfView,
/***** Show email and user's IDs *****/ /***** Show email and user's IDs *****/
if (ShowIDRows) if (ShowIDRows)
{ {
Lay_StartTableWide (2); Tbl_StartTableWide (2);
/* Show email */ /* Show email */
Rec_ShowEmail (UsrDat,ClassForm); Rec_ShowEmail (UsrDat,ClassForm);
@ -2363,7 +2364,7 @@ void Rec_ShowSharedUsrRecord (Rec_SharedRecordViewType_t TypeOfView,
/* Show user's IDs */ /* Show user's IDs */
Rec_ShowUsrIDs (UsrDat,ClassForm,Anchor); Rec_ShowUsrIDs (UsrDat,ClassForm,Anchor);
Lay_EndTable (); Tbl_EndTable ();
} }
/***** Start form *****/ /***** Start form *****/
@ -2417,7 +2418,7 @@ void Rec_ShowSharedUsrRecord (Rec_SharedRecordViewType_t TypeOfView,
break; break;
} }
Lay_StartTableWide (2); Tbl_StartTableWide (2);
if (ShowIDRows) if (ShowIDRows)
{ {
@ -2476,7 +2477,7 @@ void Rec_ShowSharedUsrRecord (Rec_SharedRecordViewType_t TypeOfView,
Rec_ShowOfficePhone (UsrDat,ShowData,ClassForm); Rec_ShowOfficePhone (UsrDat,ShowData,ClassForm);
} }
Lay_EndTable (); Tbl_EndTable ();
/***** Button and end form *****/ /***** Button and end form *****/
switch (TypeOfView) switch (TypeOfView)

View File

@ -52,6 +52,7 @@
#include "swad_social.h" #include "swad_social.h"
#include "swad_statistic.h" #include "swad_statistic.h"
#include "swad_tab.h" #include "swad_tab.h"
#include "swad_table.h"
#include "swad_web_service.h" #include "swad_web_service.h"
/*****************************************************************************/ /*****************************************************************************/
@ -503,7 +504,7 @@ void Sta_AskShowCrsHits (void)
Par_PutHiddenParamLong ("LastRow",0); Par_PutHiddenParamLong ("LastRow",0);
/***** Put list of users to select some of them *****/ /***** Put list of users to select some of them *****/
Lay_StartTableCenter (2); Tbl_StartTableCenter (2);
fprintf (Gbl.F.Out,"<tr>" fprintf (Gbl.F.Out,"<tr>"
"<td class=\"RIGHT_TOP %s\">%s:" "<td class=\"RIGHT_TOP %s\">%s:"
"</td>" "</td>"
@ -595,7 +596,7 @@ void Sta_AskShowCrsHits (void)
"</label>" "</label>"
"</td>" "</td>"
"</tr>"); "</tr>");
Lay_EndTable (); Tbl_EndTable ();
/***** Hidden param used to get client time zone *****/ /***** Hidden param used to get client time zone *****/
Dat_PutHiddenParBrowserTZDiff (); Dat_PutHiddenParBrowserTZDiff ();
@ -1653,7 +1654,7 @@ static void Sta_ShowDetailedAccessesList (unsigned long NumRows,MYSQL_RES *mysql
/***** Put heading with backward and forward buttons *****/ /***** Put heading with backward and forward buttons *****/
fprintf (Gbl.F.Out,"<tr>" fprintf (Gbl.F.Out,"<tr>"
"<td colspan=\"7\" class=\"LEFT_MIDDLE\">"); "<td colspan=\"7\" class=\"LEFT_MIDDLE\">");
Lay_StartTableWide (2); Tbl_StartTableWide (2);
fprintf (Gbl.F.Out,"<tr>"); fprintf (Gbl.F.Out,"<tr>");
/* Put link to jump to previous page (older clicks) */ /* Put link to jump to previous page (older clicks) */
@ -1718,7 +1719,7 @@ static void Sta_ShowDetailedAccessesList (unsigned long NumRows,MYSQL_RES *mysql
Act_FormEnd (); Act_FormEnd ();
fprintf (Gbl.F.Out,"</tr>"); fprintf (Gbl.F.Out,"</tr>");
Lay_EndTable (); Tbl_EndTable ();
fprintf (Gbl.F.Out,"</td>" fprintf (Gbl.F.Out,"</td>"
"</tr>"); "</tr>");
@ -2431,7 +2432,7 @@ static void Sta_DrawBarColors (Sta_ColorType_t ColorType,float HitsMax)
unsigned B; unsigned B;
/***** Write numbers from 0 to Hits.Max *****/ /***** Write numbers from 0 to Hits.Max *****/
Lay_StartTableWide (0); Tbl_StartTableWide (0);
fprintf (Gbl.F.Out,"<tr>" fprintf (Gbl.F.Out,"<tr>"
"<td colspan=\"%u\" class=\"LOG LEFT_BOTTOM\"" "<td colspan=\"%u\" class=\"LOG LEFT_BOTTOM\""
" style=\"width:%upx;\">" " style=\"width:%upx;\">"
@ -2473,7 +2474,7 @@ static void Sta_DrawBarColors (Sta_ColorType_t ColorType,float HitsMax)
R,G,B,Gbl.Prefs.IconsURL); R,G,B,Gbl.Prefs.IconsURL);
} }
fprintf (Gbl.F.Out,"</tr>"); fprintf (Gbl.F.Out,"</tr>");
Lay_EndTable (); Tbl_EndTable ();
} }
/*****************************************************************************/ /*****************************************************************************/

View File

@ -39,6 +39,7 @@
#include "swad_parameter.h" #include "swad_parameter.h"
#include "swad_role.h" #include "swad_role.h"
#include "swad_survey.h" #include "swad_survey.h"
#include "swad_table.h"
/*****************************************************************************/ /*****************************************************************************/
/************** External global variables from others modules ****************/ /************** External global variables from others modules ****************/
@ -224,7 +225,7 @@ static void Svy_ListAllSurveys (struct SurveyQuestion *SvyQst)
if (Gbl.Svys.Num) if (Gbl.Svys.Num)
{ {
/***** Table head *****/ /***** Table head *****/
Lay_StartTableWideMargin (2); Tbl_StartTableWideMargin (2);
fprintf (Gbl.F.Out,"<tr>" fprintf (Gbl.F.Out,"<tr>"
"<th class=\"CONTEXT_COL\"></th>"); // Column for contextual icons "<th class=\"CONTEXT_COL\"></th>"); // Column for contextual icons
for (Order = Svy_ORDER_BY_START_DATE; for (Order = Svy_ORDER_BY_START_DATE;
@ -266,7 +267,7 @@ static void Svy_ListAllSurveys (struct SurveyQuestion *SvyQst)
Svy_ShowOneSurvey (Gbl.Svys.LstSvyCods[NumSvy - 1],SvyQst,false); Svy_ShowOneSurvey (Gbl.Svys.LstSvyCods[NumSvy - 1],SvyQst,false);
/***** End table *****/ /***** End table *****/
Lay_EndTable (); Tbl_EndTable ();
} }
else // No surveys created else // No surveys created
Ale_ShowAlert (Ale_INFO,Txt_No_surveys); Ale_ShowAlert (Ale_INFO,Txt_No_surveys);
@ -443,7 +444,7 @@ static void Svy_ShowOneSurvey (long SvyCod,struct SurveyQuestion *SvyQst,
/***** Start table *****/ /***** Start table *****/
if (ShowOnlyThisSvyComplete) if (ShowOnlyThisSvyComplete)
Lay_StartTableWide (2); Tbl_StartTableWide (2);
/***** Write first row of data of this assignment *****/ /***** Write first row of data of this assignment *****/
/* Forms to remove/edit this assignment */ /* Forms to remove/edit this assignment */
@ -671,7 +672,7 @@ static void Svy_ShowOneSurvey (long SvyCod,struct SurveyQuestion *SvyQst,
if (ShowOnlyThisSvyComplete) if (ShowOnlyThisSvyComplete)
{ {
/***** End table *****/ /***** End table *****/
Lay_EndTable (); Tbl_EndTable ();
/***** End frame *****/ /***** End frame *****/
Box_EndBox (); Box_EndBox ();
@ -2673,7 +2674,7 @@ static void Svy_ShowFormEditOneQst (long SvyCod,struct SurveyQuestion *SvyQst,
Svy_PutParamQstCod (SvyQst->QstCod); Svy_PutParamQstCod (SvyQst->QstCod);
/***** Start table *****/ /***** Start table *****/
Lay_StartTableWide (2); Tbl_StartTableWide (2);
/***** Stem *****/ /***** Stem *****/
fprintf (Gbl.F.Out,"<tr>" fprintf (Gbl.F.Out,"<tr>"
@ -2722,7 +2723,7 @@ static void Svy_ShowFormEditOneQst (long SvyCod,struct SurveyQuestion *SvyQst,
fprintf (Gbl.F.Out,"<tr>" fprintf (Gbl.F.Out,"<tr>"
"<td></td>" "<td></td>"
"<td class=\"LEFT_TOP\">"); "<td class=\"LEFT_TOP\">");
Lay_StartTable (2); Tbl_StartTable (2);
for (NumAns = 0; for (NumAns = 0;
NumAns < Svy_MAX_ANSWERS_PER_QUESTION; NumAns < Svy_MAX_ANSWERS_PER_QUESTION;
NumAns++) NumAns++)
@ -2745,12 +2746,12 @@ static void Svy_ShowFormEditOneQst (long SvyCod,struct SurveyQuestion *SvyQst,
"</td>" "</td>"
"</tr>"); "</tr>");
} }
Lay_EndTable (); Tbl_EndTable ();
fprintf (Gbl.F.Out,"</td>" fprintf (Gbl.F.Out,"</td>"
"</tr>"); "</tr>");
/***** End table *****/ /***** End table *****/
Lay_EndTable (); Tbl_EndTable ();
/***** Send button *****/ /***** Send button *****/
if (SvyQst->QstCod > 0) // If the question already has assigned a code if (SvyQst->QstCod > 0) // If the question already has assigned a code
@ -3195,7 +3196,7 @@ static void Svy_ListSvyQuestions (struct Survey *Svy,struct SurveyQuestion *SvyQ
} }
/***** Write the heading *****/ /***** Write the heading *****/
Lay_StartTableWideMargin (2); Tbl_StartTableWideMargin (2);
fprintf (Gbl.F.Out,"<tr>"); fprintf (Gbl.F.Out,"<tr>");
if (Svy->Status.ICanEdit) if (Svy->Status.ICanEdit)
fprintf (Gbl.F.Out,"<th colspan=\"2\"></th>"); fprintf (Gbl.F.Out,"<th colspan=\"2\"></th>");
@ -3279,7 +3280,7 @@ static void Svy_ListSvyQuestions (struct Survey *Svy,struct SurveyQuestion *SvyQ
"</tr>"); "</tr>");
} }
Lay_EndTable (); Tbl_EndTable ();
if (PutFormAnswerSurvey) if (PutFormAnswerSurvey)
{ {
@ -3379,7 +3380,7 @@ static void Svy_WriteAnswersOfAQst (struct Survey *Svy,struct SurveyQuestion *Sv
/***** Write the answers *****/ /***** Write the answers *****/
if (NumAnswers) if (NumAnswers)
{ {
Lay_StartTable (5); Tbl_StartTable (5);
for (NumAns = 0; for (NumAns = 0;
NumAns < NumAnswers; NumAns < NumAnswers;
NumAns++) NumAns++)
@ -3443,7 +3444,7 @@ static void Svy_WriteAnswersOfAQst (struct Survey *Svy,struct SurveyQuestion *Sv
/* Free memory allocated for the answer */ /* Free memory allocated for the answer */
free ((void *) Answer); free ((void *) Answer);
} }
Lay_EndTable (); Tbl_EndTable ();
} }
/***** Free structure that stores the query result *****/ /***** Free structure that stores the query result *****/

94
swad_table.c Normal file
View File

@ -0,0 +1,94 @@
// swad_table.c: tables
/*
SWAD (Shared Workspace At a Distance),
is a web platform developed at the University of Granada (Spain),
and used to support university teaching.
This file is part of SWAD core.
Copyright (C) 1999-2017 Antonio Cañas Vargas
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/*****************************************************************************/
/********************************* Headers ***********************************/
/*****************************************************************************/
#include <stdio.h> // For fprintf
#include "swad_table.h"
#include "swad_global.h"
/*****************************************************************************/
/************** External global variables from others modules ****************/
/*****************************************************************************/
extern struct Globals Gbl;
/*****************************************************************************/
/****************************** Public constants *****************************/
/*****************************************************************************/
/*****************************************************************************/
/***************************** Private constants *****************************/
/*****************************************************************************/
/*****************************************************************************/
/******************************* Private types *******************************/
/*****************************************************************************/
/*****************************************************************************/
/***************************** Private prototypes ****************************/
/*****************************************************************************/
/*****************************************************************************/
/******************************* Start/end table *****************************/
/*****************************************************************************/
void Tbl_StartTable (unsigned CellPadding)
{
fprintf (Gbl.F.Out,"<table");
if (CellPadding)
fprintf (Gbl.F.Out," class=\"CELLS_PAD_%u\"",CellPadding); // CellPadding must be 0, 1, 2, 5 or 10
fprintf (Gbl.F.Out,">");
}
void Tbl_StartTableCenter (unsigned CellPadding)
{
fprintf (Gbl.F.Out,"<table class=\"FRAME_TBL_CENTER");
if (CellPadding)
fprintf (Gbl.F.Out," CELLS_PAD_%u",CellPadding); // CellPadding must be 0, 1, 2, 5 or 10
fprintf (Gbl.F.Out,"\">");
}
void Tbl_StartTableWide (unsigned CellPadding)
{
fprintf (Gbl.F.Out,"<table class=\"FRAME_TBL_WIDE");
if (CellPadding)
fprintf (Gbl.F.Out," CELLS_PAD_%u",CellPadding); // CellPadding must be 0, 1, 2, 5 or 10
fprintf (Gbl.F.Out,"\">");
}
void Tbl_StartTableWideMargin (unsigned CellPadding)
{
fprintf (Gbl.F.Out,"<table class=\"FRAME_TBL_WIDE_MARGIN");
if (CellPadding)
fprintf (Gbl.F.Out," CELLS_PAD_%u",CellPadding); // CellPadding must be 0, 1, 2, 5 or 10
fprintf (Gbl.F.Out,"\">");
}
void Tbl_EndTable (void)
{
fprintf (Gbl.F.Out,"</table>");
}

48
swad_table.h Normal file
View File

@ -0,0 +1,48 @@
// swad_table.h: tables
#ifndef _SWAD_TBL
#define _SWAD_TBL
/*
SWAD (Shared Workspace At a Distance in Spanish),
is a web platform developed at the University of Granada (Spain),
and used to support university teaching.
This file is part of SWAD core.
Copyright (C) 1999-2017 Antonio Cañas Vargas
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/*****************************************************************************/
/********************************* Headers ***********************************/
/*****************************************************************************/
/*****************************************************************************/
/****************************** Public constants *****************************/
/*****************************************************************************/
/*****************************************************************************/
/********************************* Public types ******************************/
/*****************************************************************************/
/*****************************************************************************/
/****************************** Public prototypes ****************************/
/*****************************************************************************/
void Tbl_StartTable (unsigned CellPadding);
void Tbl_StartTableCenter (unsigned CellPadding);
void Tbl_StartTableWide (unsigned CellPadding);
void Tbl_StartTableWideMargin (unsigned CellPadding);
void Tbl_EndTable (void);
#endif

View File

@ -43,6 +43,7 @@
#include "swad_ID.h" #include "swad_ID.h"
#include "swad_image.h" #include "swad_image.h"
#include "swad_parameter.h" #include "swad_parameter.h"
#include "swad_table.h"
#include "swad_theme.h" #include "swad_theme.h"
#include "swad_test.h" #include "swad_test.h"
#include "swad_test_import.h" #include "swad_test_import.h"
@ -328,7 +329,7 @@ void Tst_ShowFormAskTst (void)
{ {
Act_FormStart (ActSeeTst); Act_FormStart (ActSeeTst);
Lay_StartTable (2); Tbl_StartTable (2);
/***** Selection of tags *****/ /***** Selection of tags *****/
Tst_ShowFormSelTags (NumRows,mysql_res,true,1); Tst_ShowFormSelTags (NumRows,mysql_res,true,1);
@ -357,7 +358,7 @@ void Tst_ShowFormAskTst (void)
"</td>" "</td>"
"</tr>"); "</tr>");
Lay_EndTable (); Tbl_EndTable ();
/***** Send button *****/ /***** Send button *****/
Btn_PutConfirmButton (Txt_Generate_test); Btn_PutConfirmButton (Txt_Generate_test);
@ -450,9 +451,9 @@ void Tst_ShowNewTest (void)
Par_PutHiddenParamUnsigned ("NumQst",Gbl.Test.NumQsts); Par_PutHiddenParamUnsigned ("NumQst",Gbl.Test.NumQsts);
/***** List the questions *****/ /***** List the questions *****/
Lay_StartTableWideMargin (10); Tbl_StartTableWideMargin (10);
Tst_ShowTestQuestionsWhenSeeing (mysql_res); Tst_ShowTestQuestionsWhenSeeing (mysql_res);
Lay_EndTable (); Tbl_EndTable ();
/***** Test result will be saved? *****/ /***** Test result will be saved? *****/
fprintf (Gbl.F.Out,"<div class=\"CENTER_MIDDLE\"" fprintf (Gbl.F.Out,"<div class=\"CENTER_MIDDLE\""
@ -552,9 +553,9 @@ void Tst_AssessTest (void)
} }
/***** Write answers and solutions *****/ /***** Write answers and solutions *****/
Lay_StartTableWideMargin (10); Tbl_StartTableWideMargin (10);
Tst_ShowTestResultAfterAssess (TstCod,&NumQstsNotBlank,&TotalScore); Tst_ShowTestResultAfterAssess (TstCod,&NumQstsNotBlank,&TotalScore);
Lay_EndTable (); Tbl_EndTable ();
/***** Write total mark of test *****/ /***** Write total mark of test *****/
if (Gbl.Test.Config.FeedbackType != Tst_FEEDBACK_NOTHING) if (Gbl.Test.Config.FeedbackType != Tst_FEEDBACK_NOTHING)
@ -1290,7 +1291,7 @@ void Tst_ShowFormAskEditTsts (void)
Act_FormStart (ActLstTstQst); Act_FormStart (ActLstTstQst);
Par_PutHiddenParamUnsigned ("Order",(unsigned) Tst_ORDER_STEM); Par_PutHiddenParamUnsigned ("Order",(unsigned) Tst_ORDER_STEM);
Lay_StartTable (2); Tbl_StartTable (2);
/***** Selection of tags *****/ /***** Selection of tags *****/
Tst_ShowFormSelTags (NumRows,mysql_res,false,2); Tst_ShowFormSelTags (NumRows,mysql_res,false,2);
@ -1301,7 +1302,7 @@ void Tst_ShowFormAskEditTsts (void)
/***** Starting and ending dates in the search *****/ /***** Starting and ending dates in the search *****/
Dat_PutFormStartEndClientLocalDateTimesWithYesterdayToday (false); Dat_PutFormStartEndClientLocalDateTimesWithYesterdayToday (false);
Lay_EndTable (); Tbl_EndTable ();
/***** Send button *****/ /***** Send button *****/
Btn_PutConfirmButton (Txt_Show_questions); Btn_PutConfirmButton (Txt_Show_questions);
@ -1651,7 +1652,7 @@ static void Tst_ShowFormSelTags (unsigned long NumRows,MYSQL_RES *mysql_res,
if (NumCols > 1) if (NumCols > 1)
fprintf (Gbl.F.Out," colspan=\"%u\"",NumCols); fprintf (Gbl.F.Out," colspan=\"%u\"",NumCols);
fprintf (Gbl.F.Out," class=\"LEFT_TOP\">"); fprintf (Gbl.F.Out," class=\"LEFT_TOP\">");
Lay_StartTable (2); Tbl_StartTable (2);
fprintf (Gbl.F.Out,"<tr>"); fprintf (Gbl.F.Out,"<tr>");
if (!ShowOnlyEnabledTags) if (!ShowOnlyEnabledTags)
fprintf (Gbl.F.Out,"<td></td>"); fprintf (Gbl.F.Out,"<td></td>");
@ -1714,7 +1715,7 @@ static void Tst_ShowFormSelTags (unsigned long NumRows,MYSQL_RES *mysql_res,
row[1]); row[1]);
} }
Lay_EndTable (); Tbl_EndTable ();
fprintf (Gbl.F.Out,"</td>" fprintf (Gbl.F.Out,"</td>"
"</tr>"); "</tr>");
} }
@ -1860,7 +1861,7 @@ static void Tst_ShowFormConfigTst (void)
Act_FormStart (ActRcvCfgTst); Act_FormStart (ActRcvCfgTst);
/***** Tests are visible from plugins? *****/ /***** Tests are visible from plugins? *****/
Lay_StartTable (2); Tbl_StartTable (2);
fprintf (Gbl.F.Out,"<tr>" fprintf (Gbl.F.Out,"<tr>"
"<td class=\"%s RIGHT_TOP\">" "<td class=\"%s RIGHT_TOP\">"
"%s:" "%s:"
@ -1893,14 +1894,14 @@ static void Tst_ShowFormConfigTst (void)
"<td class=\"LEFT_BOTTOM\">", "<td class=\"LEFT_BOTTOM\">",
The_ClassForm[Gbl.Prefs.Theme], The_ClassForm[Gbl.Prefs.Theme],
Txt_No_of_questions); Txt_No_of_questions);
Lay_StartTable (2); Tbl_StartTable (2);
Tst_PutInputFieldNumQst ("NumQstMin",Txt_minimum, Tst_PutInputFieldNumQst ("NumQstMin",Txt_minimum,
Gbl.Test.Config.Min); // Minimum number of questions Gbl.Test.Config.Min); // Minimum number of questions
Tst_PutInputFieldNumQst ("NumQstDef",Txt_default, Tst_PutInputFieldNumQst ("NumQstDef",Txt_default,
Gbl.Test.Config.Def); // Default number of questions Gbl.Test.Config.Def); // Default number of questions
Tst_PutInputFieldNumQst ("NumQstMax",Txt_maximum, Tst_PutInputFieldNumQst ("NumQstMax",Txt_maximum,
Gbl.Test.Config.Max); // Maximum number of questions Gbl.Test.Config.Max); // Maximum number of questions
Lay_EndTable (); Tbl_EndTable ();
fprintf (Gbl.F.Out,"</td>" fprintf (Gbl.F.Out,"</td>"
"</tr>"); "</tr>");
@ -1945,7 +1946,7 @@ static void Tst_ShowFormConfigTst (void)
} }
fprintf (Gbl.F.Out,"</td>" fprintf (Gbl.F.Out,"</td>"
"</tr>"); "</tr>");
Lay_EndTable (); Tbl_EndTable ();
/***** Send button *****/ /***** Send button *****/
Btn_PutConfirmButton (Txt_Save); Btn_PutConfirmButton (Txt_Save);
@ -2270,7 +2271,7 @@ static void Tst_ShowFormAnswerTypes (unsigned NumCols)
if (NumCols > 1) if (NumCols > 1)
fprintf (Gbl.F.Out," colspan=\"%u\"",NumCols); fprintf (Gbl.F.Out," colspan=\"%u\"",NumCols);
fprintf (Gbl.F.Out," class=\"LEFT_TOP\">"); fprintf (Gbl.F.Out," class=\"LEFT_TOP\">");
Lay_StartTable (2); Tbl_StartTable (2);
fprintf (Gbl.F.Out,"<tr>" fprintf (Gbl.F.Out,"<tr>"
"<td class=\"LEFT_MIDDLE\">" "<td class=\"LEFT_MIDDLE\">"
"<label class=\"%s\">" "<label class=\"%s\">"
@ -2310,7 +2311,7 @@ static void Tst_ShowFormAnswerTypes (unsigned NumCols)
Txt_TST_STR_ANSWER_TYPES[AnsType]); Txt_TST_STR_ANSWER_TYPES[AnsType]);
} }
Lay_EndTable (); Tbl_EndTable ();
fprintf (Gbl.F.Out,"</td>" fprintf (Gbl.F.Out,"</td>"
"</tr>"); "</tr>");
} }
@ -2738,7 +2739,7 @@ static void Tst_ListOneOrMoreQuestionsToEdit (unsigned long NumRows,MYSQL_RES *m
false); // Not closable false); // Not closable
/***** Write the heading *****/ /***** Write the heading *****/
Lay_StartTableWideMargin (2); Tbl_StartTableWideMargin (2);
fprintf (Gbl.F.Out,"<tr>" fprintf (Gbl.F.Out,"<tr>"
"<th colspan=\"2\"></th>" "<th colspan=\"2\"></th>"
"<th class=\"CENTER_TOP\">" "<th class=\"CENTER_TOP\">"
@ -2983,7 +2984,7 @@ static void Tst_ListOneOrMoreQuestionsToEdit (unsigned long NumRows,MYSQL_RES *m
} }
/***** End table *****/ /***** End table *****/
Lay_EndTable (); Tbl_EndTable ();
/***** Button to add a new question *****/ /***** Button to add a new question *****/
Tst_PutButtonToAddQuestion (); Tst_PutButtonToAddQuestion ();
@ -3092,7 +3093,7 @@ static void Tst_WriteAnswersOfAQstEdit (long QstCod)
case Tst_ANS_UNIQUE_CHOICE: case Tst_ANS_UNIQUE_CHOICE:
case Tst_ANS_MULTIPLE_CHOICE: case Tst_ANS_MULTIPLE_CHOICE:
case Tst_ANS_TEXT: case Tst_ANS_TEXT:
Lay_StartTable (2); Tbl_StartTable (2);
for (NumOpt = 0; for (NumOpt = 0;
NumOpt < Gbl.Test.Answer.NumOptions; NumOpt < Gbl.Test.Answer.NumOptions;
NumOpt++) NumOpt++)
@ -3168,7 +3169,7 @@ static void Tst_WriteAnswersOfAQstEdit (long QstCod)
if (LengthFeedback) if (LengthFeedback)
free ((void *) Feedback); free ((void *) Feedback);
} }
Lay_EndTable (); Tbl_EndTable ();
break; break;
default: default:
break; break;
@ -3340,7 +3341,7 @@ static void Tst_WriteTFAnsAssessTest (unsigned NumQst,MYSQL_RES *mysql_res,
} }
/***** Header with the title of each column *****/ /***** Header with the title of each column *****/
Lay_StartTable (2); Tbl_StartTable (2);
fprintf (Gbl.F.Out,"<tr>"); fprintf (Gbl.F.Out,"<tr>");
Tst_WriteHeadUserCorrect (); Tst_WriteHeadUserCorrect ();
fprintf (Gbl.F.Out,"</tr>"); fprintf (Gbl.F.Out,"</tr>");
@ -3381,7 +3382,7 @@ static void Tst_WriteTFAnsAssessTest (unsigned NumQst,MYSQL_RES *mysql_res,
Tst_WriteScoreEnd (); Tst_WriteScoreEnd ();
} }
Lay_EndTable (); Tbl_EndTable ();
} }
/*****************************************************************************/ /*****************************************************************************/
@ -3410,7 +3411,7 @@ static void Tst_WriteChoiceAnsViewTest (unsigned NumQst,long QstCod,bool Shuffle
*/ */
/***** Start table *****/ /***** Start table *****/
Lay_StartTable (2); Tbl_StartTable (2);
for (NumOpt = 0; for (NumOpt = 0;
NumOpt < Gbl.Test.Answer.NumOptions; NumOpt < Gbl.Test.Answer.NumOptions;
@ -3484,7 +3485,7 @@ static void Tst_WriteChoiceAnsViewTest (unsigned NumQst,long QstCod,bool Shuffle
} }
/***** End table *****/ /***** End table *****/
Lay_EndTable (); Tbl_EndTable ();
/***** Free structure that stores the query result *****/ /***** Free structure that stores the query result *****/
DB_FreeMySQLResult (&mysql_res); DB_FreeMySQLResult (&mysql_res);
@ -3590,7 +3591,7 @@ static void Tst_WriteChoiceAnsAssessTest (unsigned NumQst,MYSQL_RES *mysql_res,
} }
/***** Start table *****/ /***** Start table *****/
Lay_StartTable (2); Tbl_StartTable (2);
fprintf (Gbl.F.Out,"<tr>"); fprintf (Gbl.F.Out,"<tr>");
Tst_WriteHeadUserCorrect (); Tst_WriteHeadUserCorrect ();
fprintf (Gbl.F.Out,"<td></td>" fprintf (Gbl.F.Out,"<td></td>"
@ -3727,7 +3728,7 @@ static void Tst_WriteChoiceAnsAssessTest (unsigned NumQst,MYSQL_RES *mysql_res,
} }
/***** End of table *****/ /***** End of table *****/
Lay_EndTable (); Tbl_EndTable ();
} }
/*****************************************************************************/ /*****************************************************************************/
@ -3799,7 +3800,7 @@ static void Tst_WriteTextAnsAssessTest (unsigned NumQst,MYSQL_RES *mysql_res,
} }
/***** Header with the title of each column *****/ /***** Header with the title of each column *****/
Lay_StartTable (2); Tbl_StartTable (2);
fprintf (Gbl.F.Out,"<tr>"); fprintf (Gbl.F.Out,"<tr>");
Tst_WriteHeadUserCorrect (); Tst_WriteHeadUserCorrect ();
fprintf (Gbl.F.Out,"</tr>"); fprintf (Gbl.F.Out,"</tr>");
@ -3854,7 +3855,7 @@ static void Tst_WriteTextAnsAssessTest (unsigned NumQst,MYSQL_RES *mysql_res,
Gbl.Test.Config.FeedbackType == Tst_FEEDBACK_FULL_FEEDBACK) Gbl.Test.Config.FeedbackType == Tst_FEEDBACK_FULL_FEEDBACK)
{ {
fprintf (Gbl.F.Out,"<td class=\"CENTER_TOP\">"); fprintf (Gbl.F.Out,"<td class=\"CENTER_TOP\">");
Lay_StartTable (2); Tbl_StartTable (2);
for (NumOpt = 0; for (NumOpt = 0;
NumOpt < Gbl.Test.Answer.NumOptions; NumOpt < Gbl.Test.Answer.NumOptions;
@ -3883,7 +3884,7 @@ static void Tst_WriteTextAnsAssessTest (unsigned NumQst,MYSQL_RES *mysql_res,
"</tr>"); "</tr>");
} }
Lay_EndTable (); Tbl_EndTable ();
} }
else else
fprintf (Gbl.F.Out,"<td class=\"ANS CENTER_TOP\">" fprintf (Gbl.F.Out,"<td class=\"ANS CENTER_TOP\">"
@ -3921,7 +3922,7 @@ static void Tst_WriteTextAnsAssessTest (unsigned NumQst,MYSQL_RES *mysql_res,
Tst_WriteScoreEnd (); Tst_WriteScoreEnd ();
} }
Lay_EndTable (); Tbl_EndTable ();
} }
/*****************************************************************************/ /*****************************************************************************/
@ -3963,7 +3964,7 @@ static void Tst_WriteIntAnsAssessTest (unsigned NumQst,MYSQL_RES *mysql_res,
Lay_ShowErrorAndExit ("Wrong integer answer."); Lay_ShowErrorAndExit ("Wrong integer answer.");
/***** Header with the title of each column *****/ /***** Header with the title of each column *****/
Lay_StartTable (2); Tbl_StartTable (2);
fprintf (Gbl.F.Out,"<tr>"); fprintf (Gbl.F.Out,"<tr>");
Tst_WriteHeadUserCorrect (); Tst_WriteHeadUserCorrect ();
fprintf (Gbl.F.Out,"</tr>"); fprintf (Gbl.F.Out,"</tr>");
@ -4033,7 +4034,7 @@ static void Tst_WriteIntAnsAssessTest (unsigned NumQst,MYSQL_RES *mysql_res,
Tst_WriteScoreEnd (); Tst_WriteScoreEnd ();
} }
Lay_EndTable (); Tbl_EndTable ();
} }
/*****************************************************************************/ /*****************************************************************************/
@ -4089,7 +4090,7 @@ static void Tst_WriteFloatAnsAssessTest (unsigned NumQst,MYSQL_RES *mysql_res,
} }
/***** Header with the title of each column *****/ /***** Header with the title of each column *****/
Lay_StartTable (2); Tbl_StartTable (2);
fprintf (Gbl.F.Out,"<tr>"); fprintf (Gbl.F.Out,"<tr>");
Tst_WriteHeadUserCorrect (); Tst_WriteHeadUserCorrect ();
fprintf (Gbl.F.Out,"</tr>"); fprintf (Gbl.F.Out,"</tr>");
@ -4158,7 +4159,7 @@ static void Tst_WriteFloatAnsAssessTest (unsigned NumQst,MYSQL_RES *mysql_res,
Tst_WriteScoreEnd (); Tst_WriteScoreEnd ();
} }
Lay_EndTable (); Tbl_EndTable ();
} }
/*****************************************************************************/ /*****************************************************************************/
@ -4255,7 +4256,7 @@ static void Tst_GetAndWriteTagsQst (long QstCod)
if ((NumRows = Tst_GetTagsQst (QstCod,&mysql_res))) // Result: TagTxt if ((NumRows = Tst_GetTagsQst (QstCod,&mysql_res))) // Result: TagTxt
{ {
/***** Write the tags *****/ /***** Write the tags *****/
Lay_StartTable (2); Tbl_StartTable (2);
for (NumRow = 0; for (NumRow = 0;
NumRow < NumRows; NumRow < NumRows;
@ -4273,7 +4274,7 @@ static void Tst_GetAndWriteTagsQst (long QstCod)
row[0]); row[0]);
} }
Lay_EndTable (); Tbl_EndTable ();
} }
else else
fprintf (Gbl.F.Out,"<span class=\"DAT_SMALL\">&nbsp;(%s)&nbsp;</span>", fprintf (Gbl.F.Out,"<span class=\"DAT_SMALL\">&nbsp;(%s)&nbsp;</span>",
@ -4540,7 +4541,7 @@ static void Tst_PutFormEditOneQst (char Stem[Cns_MAX_BYTES_TEXT + 1],
Tst_PutParamQstCod (); Tst_PutParamQstCod ();
/***** Start table *****/ /***** Start table *****/
Lay_StartTable (2); // Table for this question Tbl_StartTable (2); // Table for this question
/***** Help for text editor *****/ /***** Help for text editor *****/
fprintf (Gbl.F.Out,"<tr>" fprintf (Gbl.F.Out,"<tr>"
@ -4559,7 +4560,7 @@ static void Tst_PutFormEditOneQst (char Stem[Cns_MAX_BYTES_TEXT + 1],
"</td>" "</td>"
"<td class=\"LEFT_TOP\">", "<td class=\"LEFT_TOP\">",
The_ClassForm[Gbl.Prefs.Theme],Txt_Tags); The_ClassForm[Gbl.Prefs.Theme],Txt_Tags);
Lay_StartTable (2); // Table for tags Tbl_StartTable (2); // Table for tags
for (NumTag = 0; for (NumTag = 0;
NumTag < Tst_MAX_TAGS_PER_QUESTION; NumTag < Tst_MAX_TAGS_PER_QUESTION;
@ -4609,7 +4610,7 @@ static void Tst_PutFormEditOneQst (char Stem[Cns_MAX_BYTES_TEXT + 1],
fprintf (Gbl.F.Out,"</tr>"); fprintf (Gbl.F.Out,"</tr>");
} }
Lay_EndTable (); // Table for tags Tbl_EndTable (); // Table for tags
fprintf (Gbl.F.Out,"</td>" fprintf (Gbl.F.Out,"</td>"
"</tr>"); "</tr>");
@ -4739,7 +4740,7 @@ static void Tst_PutFormEditOneQst (char Stem[Cns_MAX_BYTES_TEXT + 1],
fprintf (Gbl.F.Out,"<tr>" fprintf (Gbl.F.Out,"<tr>"
"<td></td>" "<td></td>"
"<td class=\"LEFT_TOP\">"); "<td class=\"LEFT_TOP\">");
Lay_StartTable (2); // Table with choice answers Tbl_StartTable (2); // Table with choice answers
OptionsDisabled = Gbl.Test.AnswerType != Tst_ANS_UNIQUE_CHOICE && OptionsDisabled = Gbl.Test.AnswerType != Tst_ANS_UNIQUE_CHOICE &&
Gbl.Test.AnswerType != Tst_ANS_MULTIPLE_CHOICE && Gbl.Test.AnswerType != Tst_ANS_MULTIPLE_CHOICE &&
@ -4864,12 +4865,12 @@ static void Tst_PutFormEditOneQst (char Stem[Cns_MAX_BYTES_TEXT + 1],
"</td>" "</td>"
"</tr>"); "</tr>");
} }
Lay_EndTable (); // Table with choice answers Tbl_EndTable (); // Table with choice answers
fprintf (Gbl.F.Out,"</td>" fprintf (Gbl.F.Out,"</td>"
"</tr>"); "</tr>");
/***** End table *****/ /***** End table *****/
Lay_EndTable (); // Table for this question Tbl_EndTable (); // Table for this question
/***** Send button *****/ /***** Send button *****/
if (Gbl.Test.QstCod > 0) // The question already has assigned a code if (Gbl.Test.QstCod > 0) // The question already has assigned a code
@ -7013,7 +7014,7 @@ void Tst_SelUsrsToSeeUsrsTestResults (void)
Grp_PutParamsCodGrps (); Grp_PutParamsCodGrps ();
/***** Put list of users to select some of them *****/ /***** Put list of users to select some of them *****/
Lay_StartTableCenter (2); Tbl_StartTableCenter (2);
fprintf (Gbl.F.Out,"<tr>" fprintf (Gbl.F.Out,"<tr>"
"<td class=\"%s RIGHT_TOP\">" "<td class=\"%s RIGHT_TOP\">"
"%s:" "%s:"
@ -7021,18 +7022,18 @@ void Tst_SelUsrsToSeeUsrsTestResults (void)
"<td colspan=\"2\" class=\"%s LEFT_TOP\">", "<td colspan=\"2\" class=\"%s LEFT_TOP\">",
The_ClassForm[Gbl.Prefs.Theme],Txt_Users, The_ClassForm[Gbl.Prefs.Theme],Txt_Users,
The_ClassForm[Gbl.Prefs.Theme]); The_ClassForm[Gbl.Prefs.Theme]);
Lay_StartTable (2); Tbl_StartTable (2);
Usr_ListUsersToSelect (Rol_TCH); Usr_ListUsersToSelect (Rol_TCH);
Usr_ListUsersToSelect (Rol_NET); Usr_ListUsersToSelect (Rol_NET);
Usr_ListUsersToSelect (Rol_STD); Usr_ListUsersToSelect (Rol_STD);
Lay_EndTable (); Tbl_EndTable ();
fprintf (Gbl.F.Out,"</td>" fprintf (Gbl.F.Out,"</td>"
"</tr>"); "</tr>");
/***** Starting and ending dates in the search *****/ /***** Starting and ending dates in the search *****/
Dat_PutFormStartEndClientLocalDateTimesWithYesterdayToday (false); Dat_PutFormStartEndClientLocalDateTimesWithYesterdayToday (false);
Lay_EndTable (); Tbl_EndTable ();
/***** Send button *****/ /***** Send button *****/
Btn_PutConfirmButton (Txt_View_test_results); Btn_PutConfirmButton (Txt_View_test_results);
@ -7724,7 +7725,7 @@ void Tst_ShowOneTestResult (void)
Gbl.CurrentCrs.Crs.CrsCod); Gbl.CurrentCrs.Crs.CrsCod);
/***** Start table *****/ /***** Start table *****/
Lay_StartTableWideMargin (10); Tbl_StartTableWideMargin (10);
/***** Header row *****/ /***** Header row *****/
/* Get data of the user who made the test */ /* Get data of the user who made the test */
@ -7821,7 +7822,7 @@ void Tst_ShowOneTestResult (void)
Tst_ShowTstTotalMark (TotalScore); Tst_ShowTstTotalMark (TotalScore);
/***** End table *****/ /***** End table *****/
Lay_EndTable (); Tbl_EndTable ();
/***** End frame *****/ /***** End frame *****/
Box_EndBox (); Box_EndBox ();

View File

@ -34,6 +34,7 @@
#include "swad_database.h" #include "swad_database.h"
#include "swad_global.h" #include "swad_global.h"
#include "swad_parameter.h" #include "swad_parameter.h"
#include "swad_table.h"
#include "swad_test.h" #include "swad_test.h"
#include "swad_xml.h" #include "swad_xml.h"
@ -536,7 +537,7 @@ static void TsI_ImportQuestionsFromXMLBuffer (const char *XMLBuffer)
/* Current element is <test> */ /* Current element is <test> */
/***** Write heading of list of imported questions *****/ /***** Write heading of list of imported questions *****/
Lay_StartTableWideMargin (2); Tbl_StartTableWideMargin (2);
TsI_WriteHeadingListImportedQst (); TsI_WriteHeadingListImportedQst ();
/***** For each question... *****/ /***** For each question... *****/
@ -671,7 +672,7 @@ static void TsI_ImportQuestionsFromXMLBuffer (const char *XMLBuffer)
} }
} }
Lay_EndTable (); Tbl_EndTable ();
} }
else // TestElem not found else // TestElem not found
Ale_ShowAlert (Ale_ERROR,"Root element &lt;test&gt; not found."); Ale_ShowAlert (Ale_ERROR,"Root element &lt;test&gt; not found.");

View File

@ -61,6 +61,7 @@
#include "swad_record.h" #include "swad_record.h"
#include "swad_role.h" #include "swad_role.h"
#include "swad_tab.h" #include "swad_tab.h"
#include "swad_table.h"
#include "swad_user.h" #include "swad_user.h"
/*****************************************************************************/ /*****************************************************************************/
@ -6199,7 +6200,7 @@ void Usr_ListAllDataGsts (void)
NumColumnsCommonCard = Usr_NUM_ALL_FIELDS_DATA_GST; NumColumnsCommonCard = Usr_NUM_ALL_FIELDS_DATA_GST;
/***** Start table with list of guests *****/ /***** Start table with list of guests *****/
Lay_StartTableWide (0); Tbl_StartTableWide (0);
/* Start row */ /* Start row */
fprintf (Gbl.F.Out,"<tr>"); fprintf (Gbl.F.Out,"<tr>");
@ -6241,7 +6242,7 @@ void Usr_ListAllDataGsts (void)
Usr_UsrDataDestructor (&UsrDat); Usr_UsrDataDestructor (&UsrDat);
/***** End of table *****/ /***** End of table *****/
Lay_EndTable (); Tbl_EndTable ();
} }
else // Gbl.Usrs.LstUsrs[Rol_GST].NumUsrs == 0 else // Gbl.Usrs.LstUsrs[Rol_GST].NumUsrs == 0
/***** Show warning indicating no guests found *****/ /***** Show warning indicating no guests found *****/
@ -6347,7 +6348,7 @@ void Usr_ListAllDataStds (void)
} }
/***** Start table with list of students *****/ /***** Start table with list of students *****/
Lay_StartTableWide (0); Tbl_StartTableWide (0);
if (!Gbl.Usrs.ClassPhoto.AllGroups) if (!Gbl.Usrs.ClassPhoto.AllGroups)
{ {
fprintf (Gbl.F.Out,"<tr>" fprintf (Gbl.F.Out,"<tr>"
@ -6441,7 +6442,7 @@ void Usr_ListAllDataStds (void)
Usr_UsrDataDestructor (&UsrDat); Usr_UsrDataDestructor (&UsrDat);
/***** End of table *****/ /***** End of table *****/
Lay_EndTable (); Tbl_EndTable ();
/***** Free memory used by the string with the list of group names where student belongs to *****/ /***** Free memory used by the string with the list of group names where student belongs to *****/
if (Gbl.Scope.Current == Sco_SCOPE_CRS) if (Gbl.Scope.Current == Sco_SCOPE_CRS)
@ -6569,7 +6570,7 @@ void Usr_ListAllDataTchs (void)
NumColumns = Usr_NUM_ALL_FIELDS_DATA_TCH; NumColumns = Usr_NUM_ALL_FIELDS_DATA_TCH;
/***** Start table with lists of teachers *****/ /***** Start table with lists of teachers *****/
Lay_StartTableWide (0); Tbl_StartTableWide (0);
/***** List teachers and non-editing teachers *****/ /***** List teachers and non-editing teachers *****/
Gbl.RowEvenOdd = 0; Gbl.RowEvenOdd = 0;
@ -6577,7 +6578,7 @@ void Usr_ListAllDataTchs (void)
Usr_ListRowsAllDataTchs (Rol_NET,FieldNames,NumColumns); Usr_ListRowsAllDataTchs (Rol_NET,FieldNames,NumColumns);
/***** End of table *****/ /***** End of table *****/
Lay_EndTable (); Tbl_EndTable ();
} }
else // NumUsrs == 0 else // NumUsrs == 0
/***** Show warning indicating no teachers found *****/ /***** Show warning indicating no teachers found *****/
@ -7346,7 +7347,7 @@ void Usr_SeeGuests (void)
Act_FormStart (ActSeeRecSevGst); Act_FormStart (ActSeeRecSevGst);
/* Start table */ /* Start table */
Lay_StartTableWide (0); Tbl_StartTableWide (0);
/* Draw the classphoto/list */ /* Draw the classphoto/list */
switch (Gbl.Usrs.Me.ListType) switch (Gbl.Usrs.Me.ListType)
@ -7363,7 +7364,7 @@ void Usr_SeeGuests (void)
} }
/* End table */ /* End table */
Lay_EndTable (); Tbl_EndTable ();
/* Send button */ /* Send button */
Btn_PutConfirmButton (Txt_Show_records); Btn_PutConfirmButton (Txt_Show_records);
@ -7514,7 +7515,7 @@ void Usr_SeeStudents (void)
} }
/* Start table */ /* Start table */
Lay_StartTableWide (0); Tbl_StartTableWide (0);
/* Draw the classphoto/list */ /* Draw the classphoto/list */
switch (Gbl.Usrs.Me.ListType) switch (Gbl.Usrs.Me.ListType)
@ -7532,7 +7533,7 @@ void Usr_SeeStudents (void)
} }
/* End table */ /* End table */
Lay_EndTable (); Tbl_EndTable ();
if (ICanViewRecords) if (ICanViewRecords)
{ {
@ -7685,7 +7686,7 @@ void Usr_SeeTeachers (void)
Act_FormStart (ActSeeRecSevTch); Act_FormStart (ActSeeRecSevTch);
/* Start table */ /* Start table */
Lay_StartTableWide (0); Tbl_StartTableWide (0);
/***** Draw the classphoto/list *****/ /***** Draw the classphoto/list *****/
switch (Gbl.Usrs.Me.ListType) switch (Gbl.Usrs.Me.ListType)
@ -7712,7 +7713,7 @@ void Usr_SeeTeachers (void)
} }
/* End table */ /* End table */
Lay_EndTable (); Tbl_EndTable ();
if (ICanViewRecords) if (ICanViewRecords)
{ {
@ -7919,10 +7920,10 @@ void Usr_SeeGstClassPhotoPrn (void)
Gbl.Scope.Current == Sco_SCOPE_INS) ? Gbl.CurrentIns.Ins.InsCod : Gbl.Scope.Current == Sco_SCOPE_INS) ? Gbl.CurrentIns.Ins.InsCod :
-1L, -1L,
-1L,-1L); -1L,-1L);
Lay_StartTableWide (0); Tbl_StartTableWide (0);
Usr_DrawClassPhoto (Usr_CLASS_PHOTO_PRN, Usr_DrawClassPhoto (Usr_CLASS_PHOTO_PRN,
Rol_GST,false); Rol_GST,false);
Lay_EndTable (); Tbl_EndTable ();
} }
else // Gbl.Usrs.LstUsrs[Rol_GST].NumUsrs else // Gbl.Usrs.LstUsrs[Rol_GST].NumUsrs
/***** Show warning indicating no guests found *****/ /***** Show warning indicating no guests found *****/
@ -7967,10 +7968,10 @@ void Usr_SeeStdClassPhotoPrn (void)
-1L, -1L,
Gbl.Scope.Current == Sco_SCOPE_CRS ? Gbl.CurrentCrs.Crs.CrsCod : Gbl.Scope.Current == Sco_SCOPE_CRS ? Gbl.CurrentCrs.Crs.CrsCod :
-1L); -1L);
Lay_StartTableWide (0); Tbl_StartTableWide (0);
Usr_DrawClassPhoto (Usr_CLASS_PHOTO_PRN, Usr_DrawClassPhoto (Usr_CLASS_PHOTO_PRN,
Rol_STD,false); Rol_STD,false);
Lay_EndTable (); Tbl_EndTable ();
} }
else // Gbl.Usrs.LstUsrs[Rol_STD].NumUsrs == 0 else // Gbl.Usrs.LstUsrs[Rol_STD].NumUsrs == 0
/***** Show warning indicating no students found *****/ /***** Show warning indicating no students found *****/
@ -8034,7 +8035,7 @@ void Usr_SeeTchClassPhotoPrn (void)
-1L, -1L,
Gbl.Scope.Current == Sco_SCOPE_CRS ? Gbl.CurrentCrs.Crs.CrsCod : Gbl.Scope.Current == Sco_SCOPE_CRS ? Gbl.CurrentCrs.Crs.CrsCod :
-1L); -1L);
Lay_StartTableWide (0); Tbl_StartTableWide (0);
/* List teachers and non-editing teachers */ /* List teachers and non-editing teachers */
Usr_DrawClassPhoto (Usr_CLASS_PHOTO_PRN, Usr_DrawClassPhoto (Usr_CLASS_PHOTO_PRN,
@ -8042,7 +8043,7 @@ void Usr_SeeTchClassPhotoPrn (void)
Usr_DrawClassPhoto (Usr_CLASS_PHOTO_PRN, Usr_DrawClassPhoto (Usr_CLASS_PHOTO_PRN,
Rol_NET,false); Rol_NET,false);
Lay_EndTable (); Tbl_EndTable ();
} }
else // NumUsrs == 0 else // NumUsrs == 0
/***** Show warning indicating no teachers found *****/ /***** Show warning indicating no teachers found *****/