mirror of https://github.com/acanas/swad-core.git
Version 14.34.3
This commit is contained in:
parent
051d219475
commit
5502ec4092
|
@ -246,12 +246,8 @@ static void Ctr_Configuration (bool PrintView)
|
|||
(unsigned) Gbl.CurrentCtr.Ctr.CtrCod);
|
||||
PhotoExists = Fil_CheckIfPathExists (PathPhoto);
|
||||
|
||||
if (PrintView)
|
||||
{
|
||||
/* Calendar head */
|
||||
Lay_StartSquareFrameTable (NULL,NULL,NULL,2);
|
||||
}
|
||||
else
|
||||
/***** Links to print view and upload photo *****/
|
||||
if (!PrintView)
|
||||
{
|
||||
fprintf (Gbl.F.Out,"<div align=\"center\">");
|
||||
|
||||
|
@ -264,11 +260,11 @@ static void Ctr_Configuration (bool PrintView)
|
|||
Ctr_PutFormToChangeCtrPhoto (PhotoExists);
|
||||
|
||||
fprintf (Gbl.F.Out,"</div>");
|
||||
|
||||
/* Frame head */
|
||||
Lay_StartRoundFrameTable10 (NULL,2,NULL);
|
||||
}
|
||||
|
||||
/***** Start frame *****/
|
||||
Lay_StartRoundFrameTable10 (NULL,2,NULL);
|
||||
|
||||
/***** Title *****/
|
||||
fprintf (Gbl.F.Out,"<tr>"
|
||||
"<td colspan=\"2\" align=\"center\" class=\"TITLE_LOCATION\">");
|
||||
|
@ -402,9 +398,6 @@ static void Ctr_Configuration (bool PrintView)
|
|||
QR_LinkToCentre (200);
|
||||
fprintf (Gbl.F.Out,"</td>"
|
||||
"</tr>");
|
||||
|
||||
/***** End of the frame *****/
|
||||
Lay_EndSquareFrameTable ();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -443,10 +436,10 @@ static void Ctr_Configuration (bool PrintView)
|
|||
The_ClassFormul[Gbl.Prefs.Theme],
|
||||
Txt_ROLES_PLURAL_Abc[Rol_ROLE_STUDENT][Usr_SEX_UNKNOWN],
|
||||
Usr_GetNumUsrsInCrssOfCtr (Rol_ROLE_STUDENT,Gbl.CurrentCtr.Ctr.CtrCod));
|
||||
|
||||
/***** End of the frame *****/
|
||||
Lay_EndRoundFrameTable10 ();
|
||||
}
|
||||
|
||||
/***** End frame *****/
|
||||
Lay_EndRoundFrameTable10 ();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -35,12 +35,13 @@
|
|||
/****************************** Public constants *****************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
#define Log_PLATFORM_VERSION "SWAD 14.34.2 (2014/12/08)"
|
||||
#define Log_PLATFORM_VERSION "SWAD 14.34.3 (2014/12/08)"
|
||||
|
||||
// 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 | tail -1
|
||||
|
||||
/*
|
||||
Version 14.34.3 :Dic 08, 2014 Tables are printed with rounded corners. (170602 lines)
|
||||
Version 14.34.2 :Dic 08, 2014 Button to show more details on list of attendances. (170728 lines)
|
||||
Version 14.34.1 :Dic 08, 2014 Translation of a message when refreshing list of attendances. (170710 lines)
|
||||
Version 14.34 :Dic 08, 2014 Teachers can refresh list of attendances after selecting events. (170688 lines)
|
||||
|
|
|
@ -224,23 +224,18 @@ static void Cty_Configuration (bool PrintView)
|
|||
|
||||
if (Gbl.CurrentCty.Cty.CtyCod > 0)
|
||||
{
|
||||
if (PrintView)
|
||||
/***** Link to print view *****/
|
||||
if (!PrintView)
|
||||
{
|
||||
/* Calendar head */
|
||||
Lay_StartSquareFrameTable (NULL,NULL,NULL,2);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Link to print view */
|
||||
fprintf (Gbl.F.Out,"<div align=\"center\">");
|
||||
Lay_PutLinkToPrintView1 (ActPrnCtyInf);
|
||||
Lay_PutLinkToPrintView2 ();
|
||||
fprintf (Gbl.F.Out,"</div>");
|
||||
|
||||
/* Frame head */
|
||||
Lay_StartRoundFrameTable10 (NULL,2,NULL);
|
||||
}
|
||||
|
||||
/***** Start frame *****/
|
||||
Lay_StartRoundFrameTable10 (NULL,2,NULL);
|
||||
|
||||
/***** Title *****/
|
||||
fprintf (Gbl.F.Out,"<tr>"
|
||||
"<td colspan=\"2\" align=\"center\" class=\"TITLE_LOCATION\">");
|
||||
|
@ -352,9 +347,6 @@ static void Cty_Configuration (bool PrintView)
|
|||
QR_LinkToCountry (200);
|
||||
fprintf (Gbl.F.Out,"</td>"
|
||||
"</tr>");
|
||||
|
||||
/***** End of the frame *****/
|
||||
Lay_EndSquareFrameTable ();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -411,10 +403,10 @@ static void Cty_Configuration (bool PrintView)
|
|||
The_ClassFormul[Gbl.Prefs.Theme],
|
||||
Txt_ROLES_PLURAL_Abc[Rol_ROLE_STUDENT][Usr_SEX_UNKNOWN],
|
||||
Usr_GetNumUsrsInCrssOfCty (Rol_ROLE_STUDENT,Gbl.CurrentCty.Cty.CtyCod));
|
||||
|
||||
/***** End of the frame *****/
|
||||
Lay_EndRoundFrameTable10 ();
|
||||
}
|
||||
|
||||
/***** End frame *****/
|
||||
Lay_EndRoundFrameTable10 ();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -157,10 +157,8 @@ static void Crs_Configuration (bool PrintView)
|
|||
bool IsForm = (!PrintView && Gbl.Usrs.Me.LoggedRole >= Rol_ROLE_TEACHER);
|
||||
bool PutLink = !PrintView && Gbl.CurrentDeg.Deg.WWW[0];
|
||||
|
||||
if (PrintView)
|
||||
/* Calendar head */
|
||||
Lay_StartSquareFrameTable (NULL,NULL,NULL,2);
|
||||
else
|
||||
/***** Messages and links above the frame *****/
|
||||
if (!PrintView)
|
||||
{
|
||||
/* Get indicators and show warning */
|
||||
Ind_GetIndicatorsCrs (Gbl.CurrentCrs.Crs.CrsCod,&Indicators);
|
||||
|
@ -189,11 +187,11 @@ static void Crs_Configuration (bool PrintView)
|
|||
/* Start form */
|
||||
if (IsForm)
|
||||
Act_FormStart (ActChgCrsLog);
|
||||
|
||||
/* Frame head */
|
||||
Lay_StartRoundFrameTable10 (NULL,2,NULL);
|
||||
}
|
||||
|
||||
/***** Start frame *****/
|
||||
Lay_StartRoundFrameTable10 (NULL,2,NULL);
|
||||
|
||||
/***** Title *****/
|
||||
fprintf (Gbl.F.Out,"<tr>"
|
||||
"<td colspan=\"2\" align=\"center\" class=\"TITLE_LOCATION\">");
|
||||
|
@ -331,9 +329,6 @@ static void Crs_Configuration (bool PrintView)
|
|||
QR_LinkToCourse (200);
|
||||
fprintf (Gbl.F.Out,"</td>"
|
||||
"</tr>");
|
||||
|
||||
/***** End of the frame *****/
|
||||
Lay_EndSquareFrameTable ();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -373,16 +368,16 @@ static void Crs_Configuration (bool PrintView)
|
|||
Gbl.Prefs.IconsURL,
|
||||
(Indicators.CountIndicators == Ind_NUM_INDICATORS) ? "ok_green" :
|
||||
"warning");
|
||||
}
|
||||
|
||||
/***** End of the frame *****/
|
||||
Lay_EndRoundFrameTable10 ();
|
||||
/***** End of the frame *****/
|
||||
Lay_EndRoundFrameTable10 ();
|
||||
|
||||
if (IsForm)
|
||||
{
|
||||
/***** End form *****/
|
||||
Lay_PutSendButton (Txt_Save);
|
||||
fprintf (Gbl.F.Out,"</form>");
|
||||
}
|
||||
/***** End form *****/
|
||||
if (IsForm)
|
||||
{
|
||||
Lay_PutSendButton (Txt_Save);
|
||||
fprintf (Gbl.F.Out,"</form>");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
51
swad_date.c
51
swad_date.c
|
@ -233,11 +233,10 @@ void Dat_DrawCalendar (void)
|
|||
5, // December --> May
|
||||
};
|
||||
unsigned Row,Col;
|
||||
// unsigned Month = (unsigned) (((((int) (Gbl.Now.Date.Month - 1) / 4) - 1) * 4 + 12) % 12 + 1); // Start one row before current month
|
||||
unsigned Month = StartingMonth[Gbl.Now.Date.Month];
|
||||
unsigned Year = (Month < Gbl.Now.Date.Month) ? Gbl.Now.Date.Year :
|
||||
Gbl.Now.Date.Year - 1;
|
||||
bool PutLinkToEvents = (Gbl.CurrentAct == ActSeeCal);
|
||||
bool PrintView = (Gbl.CurrentAct == ActPrnCal);
|
||||
|
||||
/***** Get list of holidays *****/
|
||||
if (!Gbl.Hlds.LstIsRead)
|
||||
|
@ -247,31 +246,19 @@ void Dat_DrawCalendar (void)
|
|||
}
|
||||
|
||||
/***** Start of table and title *****/
|
||||
switch (Gbl.CurrentAct)
|
||||
if (!PrintView)
|
||||
{
|
||||
case ActSeeCal:
|
||||
/* Link to print view */
|
||||
fprintf (Gbl.F.Out,"<div align=\"center\">");
|
||||
Lay_PutLinkToPrintView1 (ActPrnCal);
|
||||
Lay_PutLinkToPrintView2 ();
|
||||
fprintf (Gbl.F.Out,"</div>");
|
||||
|
||||
/* Calendar head */
|
||||
Lay_StartRoundFrameTable10 (NULL,0,NULL);
|
||||
Lay_WriteHeaderClassPhoto (1,false,false,
|
||||
Gbl.CurrentIns.Ins.InsCod,
|
||||
Gbl.CurrentDeg.Deg.DegCod,
|
||||
Gbl.CurrentCrs.Crs.CrsCod);
|
||||
break;
|
||||
case ActPrnCal:
|
||||
/* Calendar head */
|
||||
Lay_StartSquareFrameTable (DARK_BLUE,"white",NULL,0);
|
||||
Lay_WriteHeaderClassPhoto (1,true,false,
|
||||
Gbl.CurrentIns.Ins.InsCod,
|
||||
Gbl.CurrentDeg.Deg.DegCod,
|
||||
Gbl.CurrentCrs.Crs.CrsCod);
|
||||
break;
|
||||
/* Link to print view */
|
||||
fprintf (Gbl.F.Out,"<div align=\"center\">");
|
||||
Lay_PutLinkToPrintView1 (ActPrnCal);
|
||||
Lay_PutLinkToPrintView2 ();
|
||||
fprintf (Gbl.F.Out,"</div>");
|
||||
}
|
||||
Lay_StartRoundFrameTable10 (NULL,0,NULL);
|
||||
Lay_WriteHeaderClassPhoto (1,PrintView,false,
|
||||
Gbl.CurrentIns.Ins.InsCod,
|
||||
Gbl.CurrentDeg.Deg.DegCod,
|
||||
Gbl.CurrentCrs.Crs.CrsCod);
|
||||
|
||||
/***** Create list of calls for examination *****/
|
||||
Exa_CreateListOfExamAnnouncements ();
|
||||
|
@ -290,7 +277,7 @@ void Dat_DrawCalendar (void)
|
|||
Col++)
|
||||
{
|
||||
fprintf (Gbl.F.Out,"<td align=\"center\" valign=\"top\" width=\"120\">");
|
||||
Dat_DrawMonth (Year,Month,true,PutLinkToEvents,(Gbl.CurrentAct == ActPrnCal));
|
||||
Dat_DrawMonth (Year,Month,true,!PrintView,(Gbl.CurrentAct == ActPrnCal));
|
||||
fprintf (Gbl.F.Out,"</td>");
|
||||
if (++Month == 13)
|
||||
{
|
||||
|
@ -307,16 +294,8 @@ void Dat_DrawCalendar (void)
|
|||
/***** Free list of dates of exam announcements *****/
|
||||
Exa_FreeListExamAnnouncements ();
|
||||
|
||||
/***** End of the frame *****/
|
||||
switch (Gbl.CurrentAct)
|
||||
{
|
||||
case ActSeeCal:
|
||||
Lay_EndRoundFrameTable10 ();
|
||||
break;
|
||||
case ActPrnCal:
|
||||
Lay_EndSquareFrameTable ();
|
||||
break;
|
||||
}
|
||||
/***** End frame *****/
|
||||
Lay_EndRoundFrameTable10 ();
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
|
@ -284,23 +284,18 @@ static void Deg_Configuration (bool PrintView)
|
|||
|
||||
if (Gbl.CurrentDeg.Deg.DegCod > 0)
|
||||
{
|
||||
if (PrintView)
|
||||
{
|
||||
/* Calendar head */
|
||||
Lay_StartSquareFrameTable (NULL,NULL,NULL,2);
|
||||
}
|
||||
else
|
||||
if (!PrintView)
|
||||
{
|
||||
/* Link to print view */
|
||||
fprintf (Gbl.F.Out,"<div align=\"center\">");
|
||||
Lay_PutLinkToPrintView1 (ActPrnDegInf);
|
||||
Lay_PutLinkToPrintView2 ();
|
||||
fprintf (Gbl.F.Out,"</div>");
|
||||
|
||||
/* Frame head */
|
||||
Lay_StartRoundFrameTable10 (NULL,2,NULL);
|
||||
}
|
||||
|
||||
/***** Start frame *****/
|
||||
Lay_StartRoundFrameTable10 (NULL,2,NULL);
|
||||
|
||||
/***** Title *****/
|
||||
fprintf (Gbl.F.Out,"<tr>"
|
||||
"<td colspan=\"2\" align=\"center\" class=\"TITLE_LOCATION\">");
|
||||
|
@ -387,9 +382,6 @@ static void Deg_Configuration (bool PrintView)
|
|||
QR_LinkToDegree (200);
|
||||
fprintf (Gbl.F.Out,"</td>"
|
||||
"</tr>");
|
||||
|
||||
/***** End of the frame *****/
|
||||
Lay_EndSquareFrameTable ();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -418,10 +410,10 @@ static void Deg_Configuration (bool PrintView)
|
|||
The_ClassFormul[Gbl.Prefs.Theme],
|
||||
Txt_ROLES_PLURAL_Abc[Rol_ROLE_STUDENT][Usr_SEX_UNKNOWN],
|
||||
Usr_GetNumUsrsInCrssOfDeg (Rol_ROLE_STUDENT,Gbl.CurrentDeg.Deg.DegCod));
|
||||
|
||||
/***** End of the frame *****/
|
||||
Lay_EndRoundFrameTable10 ();
|
||||
}
|
||||
|
||||
/***** End frame *****/
|
||||
Lay_EndRoundFrameTable10 ();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
14
swad_exam.c
14
swad_exam.c
|
@ -761,14 +761,11 @@ static void Exa_ShowExamAnnouncement (long ExaCod,Exa_tTypeViewExamAnnouncement_
|
|||
Par_PutHiddenParamLong ("ExaCod",ExaCod);
|
||||
Lay_PutLinkToPrintView2 ();
|
||||
fprintf (Gbl.F.Out,"</div>");
|
||||
|
||||
Lay_StartRoundFrameTable10 ("500px",0,NULL);
|
||||
break;
|
||||
case Exa_PRINT_VIEW:
|
||||
StyleTitle = "CONV_TIT_IMPR";
|
||||
StyleForm = "CONV_NEG_IMPR";
|
||||
StyleNormal = "CONV_IMPR";
|
||||
Lay_StartSquareFrameTable (DARK_GRAY,"white","500px",0);
|
||||
break;
|
||||
case Exa_FORM_VIEW:
|
||||
StyleForm = The_ClassFormul[Gbl.Prefs.Theme];
|
||||
|
@ -776,11 +773,11 @@ static void Exa_ShowExamAnnouncement (long ExaCod,Exa_tTypeViewExamAnnouncement_
|
|||
Act_FormStart (ActRcvExaAnn);
|
||||
if (ExaCod >= 0)
|
||||
Par_PutHiddenParamLong ("ExaCod",ExaCod);
|
||||
Lay_StartRoundFrameTable10 ("500px",0,NULL);
|
||||
break;
|
||||
}
|
||||
|
||||
/***** Start table *****/
|
||||
/***** Start frame *****/
|
||||
Lay_StartRoundFrameTable10 ("500px",0,NULL);
|
||||
fprintf (Gbl.F.Out,"<tr>" \
|
||||
"<td align=\"center\">" \
|
||||
"<table cellspacing=\"0\" cellpadding=\"20\" width=\"100%%\">" \
|
||||
|
@ -1186,24 +1183,23 @@ static void Exa_ShowExamAnnouncement (long ExaCod,Exa_tTypeViewExamAnnouncement_
|
|||
break;
|
||||
}
|
||||
|
||||
/***** End of table *****/
|
||||
/***** End frame *****/
|
||||
fprintf (Gbl.F.Out,"</table>" \
|
||||
"</td>" \
|
||||
"</tr>" \
|
||||
"</table>" \
|
||||
"</td>" \
|
||||
"</tr>");
|
||||
Lay_EndRoundFrameTable10 ();
|
||||
|
||||
switch (TypeViewExamAnnouncement)
|
||||
{
|
||||
case Exa_NORMAL_VIEW:
|
||||
Lay_EndRoundFrameTable10 ();
|
||||
break;
|
||||
case Exa_PRINT_VIEW:
|
||||
Lay_EndSquareFrameTable ();
|
||||
QR_ExamAnnnouncement ();
|
||||
break;
|
||||
case Exa_FORM_VIEW:
|
||||
Lay_EndRoundFrameTable10 ();
|
||||
Lay_PutSendButton (Txt_Send_announcement_of_exam);
|
||||
fprintf (Gbl.F.Out,"</form>");
|
||||
break;
|
||||
|
|
|
@ -229,23 +229,18 @@ static void Ins_Configuration (bool PrintView)
|
|||
|
||||
if (Gbl.CurrentIns.Ins.InsCod > 0)
|
||||
{
|
||||
if (PrintView)
|
||||
/***** Link to print view *****/
|
||||
if (!PrintView)
|
||||
{
|
||||
/* Calendar head */
|
||||
Lay_StartSquareFrameTable (NULL,NULL,NULL,2);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Link to print view */
|
||||
fprintf (Gbl.F.Out,"<div align=\"center\">");
|
||||
Lay_PutLinkToPrintView1 (ActPrnInsInf);
|
||||
Lay_PutLinkToPrintView2 ();
|
||||
fprintf (Gbl.F.Out,"</div>");
|
||||
|
||||
/* Frame head */
|
||||
Lay_StartRoundFrameTable10 (NULL,2,NULL);
|
||||
}
|
||||
|
||||
/***** Start frame *****/
|
||||
Lay_StartRoundFrameTable10 (NULL,2,NULL);
|
||||
|
||||
/***** Title *****/
|
||||
fprintf (Gbl.F.Out,"<tr>"
|
||||
"<td colspan=\"2\" align=\"center\" class=\"TITLE_LOCATION\">");
|
||||
|
@ -331,9 +326,6 @@ static void Ins_Configuration (bool PrintView)
|
|||
QR_LinkToInstitution (200);
|
||||
fprintf (Gbl.F.Out,"</td>"
|
||||
"</tr>");
|
||||
|
||||
/***** End of the frame *****/
|
||||
Lay_EndSquareFrameTable ();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -390,10 +382,10 @@ static void Ins_Configuration (bool PrintView)
|
|||
The_ClassFormul[Gbl.Prefs.Theme],
|
||||
Txt_ROLES_PLURAL_Abc[Rol_ROLE_STUDENT][Usr_SEX_UNKNOWN],
|
||||
Usr_GetNumUsrsInCrssOfIns (Rol_ROLE_STUDENT,Gbl.CurrentIns.Ins.InsCod));
|
||||
|
||||
/***** End of the frame *****/
|
||||
Lay_EndRoundFrameTable10 ();
|
||||
}
|
||||
|
||||
/***** End of the frame *****/
|
||||
Lay_EndRoundFrameTable10 ();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1522,36 +1522,6 @@ void Lay_WriteTitle (const char *Title)
|
|||
fprintf (Gbl.F.Out,"<div class=\"TIT\">%s</div>",Title);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/*********************** Start and end a table with frame ********************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Lay_StartSquareFrameTable (const char *BorderColor,const char *BgColor,const char *Width,unsigned CellPadding)
|
||||
{
|
||||
fprintf (Gbl.F.Out,"<div align=\"center\">"
|
||||
"<table cellspacing=\"1\" cellpadding=\"0\"");
|
||||
if (BorderColor)
|
||||
fprintf (Gbl.F.Out," bgcolor=\"%s\"",BorderColor);
|
||||
if (Width)
|
||||
fprintf (Gbl.F.Out," style=\"width:%s;\"",
|
||||
Width);
|
||||
fprintf (Gbl.F.Out,"><tr>"
|
||||
"<td align=\"center\" valign=\"top\"");
|
||||
if (BgColor)
|
||||
fprintf (Gbl.F.Out," bgcolor=\"%s\"",BgColor);
|
||||
fprintf (Gbl.F.Out,"><table cellspacing=\"0\" cellpadding=\"%u\" width=\"100%%\">",
|
||||
CellPadding);
|
||||
}
|
||||
|
||||
void Lay_EndSquareFrameTable (void)
|
||||
{
|
||||
fprintf (Gbl.F.Out,"</table>"
|
||||
"</td>"
|
||||
"</tr>"
|
||||
"</table>"
|
||||
"</div>");
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/****************** Start and end a table with rounded frame *****************/
|
||||
/*****************************************************************************/
|
||||
|
|
|
@ -87,8 +87,6 @@ void Lay_DisableIncompatibleTabs (void);
|
|||
void Lay_PutFormToEdit (Act_Action_t Action);
|
||||
void Lay_PutSendIcon (const char *Icon,const char *Alt,const char *Text);
|
||||
void Lay_PutSendButton (const char *TextSendButton);
|
||||
void Lay_StartSquareFrameTable (const char *BorderColor,const char *BgColor,const char *Width,unsigned CellPadding);
|
||||
void Lay_EndSquareFrameTable (void);
|
||||
void Lay_StartRoundFrameTable10 (const char *Width,unsigned CellPadding,const char *Title);
|
||||
void Lay_StartRoundFrameTable10Shadow (const char *Width,unsigned CellPadding);
|
||||
void Lay_EndRoundFrameTable10 (void);
|
||||
|
|
21
swad_photo.c
21
swad_photo.c
|
@ -1727,17 +1727,11 @@ static void Pho_ShowOrPrintClassPhotoDegrees (Pho_AvgPhotoSeeOrPrint_t SeeOrPrin
|
|||
struct Date DateAvgPhoto;
|
||||
bool TRIsOpen = false;
|
||||
|
||||
/***** Start frame *****/
|
||||
Lay_StartRoundFrameTable10 (NULL,0,Txt_Degrees);
|
||||
|
||||
/***** Class photo start *****/
|
||||
if (SeeOrPrint == Pho_DEGREES_SEE)
|
||||
{
|
||||
Lay_StartRoundFrameTable10 (NULL,0,Txt_Degrees);
|
||||
Lay_WriteHeaderClassPhoto (Gbl.Usrs.ClassPhoto.Cols,false,true,-1L,-1L,-1L);
|
||||
}
|
||||
else
|
||||
{
|
||||
Lay_StartSquareFrameTable (DARK_BLUE,"white",NULL,0);
|
||||
Lay_WriteHeaderClassPhoto (Gbl.Usrs.ClassPhoto.Cols,true,true,-1L,-1L,-1L);
|
||||
}
|
||||
Lay_WriteHeaderClassPhoto (Gbl.Usrs.ClassPhoto.Cols,SeeOrPrint == Pho_DEGREES_PRINT,true,-1L,-1L,-1L);
|
||||
|
||||
/***** Get degrees from database *****/
|
||||
Pho_BuildQueryOfDegrees (Query);
|
||||
|
@ -1791,11 +1785,8 @@ static void Pho_ShowOrPrintClassPhotoDegrees (Pho_AvgPhotoSeeOrPrint_t SeeOrPrin
|
|||
/***** Free structure that stores the query result *****/
|
||||
DB_FreeMySQLResult (&mysql_res);
|
||||
|
||||
/***** Photos end *****/
|
||||
if (SeeOrPrint == Pho_DEGREES_SEE)
|
||||
Lay_EndRoundFrameTable10 ();
|
||||
else
|
||||
Lay_EndSquareFrameTable ();
|
||||
/***** End frame *****/
|
||||
Lay_EndRoundFrameTable10 ();
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
|
@ -1490,12 +1490,9 @@ void Rec_ShowCrsRecord (Rec_RecordViewType_t TypeOfView,struct UsrData *UsrDat)
|
|||
|
||||
Col2Width = RecordWidth - FrameWidth*2 - Col1Width;
|
||||
|
||||
/***** Start table *****/
|
||||
/***** Start frame *****/
|
||||
sprintf (StrRecordWidth,"%upx",RecordWidth);
|
||||
if (TypeOfView == Rec_RECORD_PRINT)
|
||||
Lay_StartSquareFrameTable (DARK_BLUE,"white",StrRecordWidth,2);
|
||||
else
|
||||
Lay_StartRoundFrameTable10 (StrRecordWidth,2,NULL);
|
||||
Lay_StartRoundFrameTable10 (StrRecordWidth,2,NULL);
|
||||
|
||||
/***** Header *****/
|
||||
fprintf (Gbl.F.Out,"<tr>"
|
||||
|
@ -1585,11 +1582,8 @@ void Rec_ShowCrsRecord (Rec_RecordViewType_t TypeOfView,struct UsrData *UsrDat)
|
|||
DB_FreeMySQLResult (&mysql_res);
|
||||
}
|
||||
|
||||
/***** End of table *****/
|
||||
if (TypeOfView == Rec_RECORD_PRINT)
|
||||
Lay_EndSquareFrameTable ();
|
||||
else
|
||||
Lay_EndRoundFrameTable10 ();
|
||||
/***** End frame *****/
|
||||
Lay_EndRoundFrameTable10 ();
|
||||
|
||||
if (DataForm)
|
||||
{
|
||||
|
@ -2106,12 +2100,9 @@ void Rec_ShowCommonRecord (Rec_RecordViewType_t TypeOfView,
|
|||
Col2Width = Cols1and2Width - Col1Width;
|
||||
Cols2and3Width = Col2Width + Col3Width;
|
||||
|
||||
/***** Start record frame *****/
|
||||
/***** Start frame *****/
|
||||
sprintf (StrRecordWidth,"%upx",RecordWidth);
|
||||
if (TypeOfView == Rec_RECORD_PRINT)
|
||||
Lay_StartSquareFrameTable (DARK_BLUE,"white",StrRecordWidth,2);
|
||||
else
|
||||
Lay_StartRoundFrameTable10 (StrRecordWidth,2,NULL);
|
||||
Lay_StartRoundFrameTable10 (StrRecordWidth,2,NULL);
|
||||
|
||||
/***** Institution *****/
|
||||
fprintf (Gbl.F.Out,"<tr>"
|
||||
|
@ -2778,11 +2769,8 @@ void Rec_ShowCommonRecord (Rec_RecordViewType_t TypeOfView,
|
|||
"</tr>");
|
||||
}
|
||||
|
||||
/***** End of table *****/
|
||||
if (TypeOfView == Rec_RECORD_PRINT)
|
||||
Lay_EndSquareFrameTable ();
|
||||
else
|
||||
Lay_EndRoundFrameTable10 ();
|
||||
/***** End frame *****/
|
||||
Lay_EndRoundFrameTable10 ();
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
|
@ -225,8 +225,8 @@ void TT_ShowClassTimeTable (void)
|
|||
Gbl.Usrs.Me.LoggedRole >= Rol_ROLE_TEACHER);
|
||||
bool PutEditOfficeHours = (Gbl.CurrentAct == ActSeeMyTimTbl &&
|
||||
(Gbl.Usrs.Me.AvailableRoles & (1 << Rol_ROLE_TEACHER)));
|
||||
bool PutPrintButton = (Gbl.CurrentAct == ActSeeCrsTimTbl ||
|
||||
Gbl.CurrentAct == ActSeeMyTimTbl);
|
||||
bool PrintView = (Gbl.CurrentAct == ActSeeCrsTimTbl ||
|
||||
Gbl.CurrentAct == ActSeeMyTimTbl);
|
||||
|
||||
/***** Get whether to show only my groups or all groups *****/
|
||||
Grp_GetParamWhichGrps ();
|
||||
|
@ -245,7 +245,7 @@ void TT_ShowClassTimeTable (void)
|
|||
}
|
||||
|
||||
/***** Put buttons *****/
|
||||
if (PutEditButton || PutEditOfficeHours || PutPrintButton)
|
||||
if (PutEditButton || PutEditOfficeHours || PrintView)
|
||||
{
|
||||
fprintf (Gbl.F.Out,"<div align=\"center\">");
|
||||
|
||||
|
@ -266,7 +266,7 @@ void TT_ShowClassTimeTable (void)
|
|||
fprintf (Gbl.F.Out,"</form>");
|
||||
}
|
||||
|
||||
if (PutPrintButton)
|
||||
if (PrintView)
|
||||
{
|
||||
Lay_PutLinkToPrintView1 (Gbl.CurrentAct == ActSeeCrsTimTbl ? ActPrnCrsTimTbl :
|
||||
ActPrnMyTimTbl);
|
||||
|
@ -276,37 +276,28 @@ void TT_ShowClassTimeTable (void)
|
|||
fprintf (Gbl.F.Out,"</div>");
|
||||
}
|
||||
|
||||
switch (Gbl.CurrentAct)
|
||||
/***** Start frame *****/
|
||||
Lay_StartRoundFrameTable10 (NULL,0,NULL);
|
||||
|
||||
/***** Start time table drawing *****/
|
||||
if (TimeTableType == TT_COURSE_TIMETABLE)
|
||||
Lay_WriteHeaderClassPhoto (1,PrintView,false,
|
||||
Gbl.CurrentIns.Ins.InsCod,Gbl.CurrentDeg.Deg.DegCod,Gbl.CurrentCrs.Crs.CrsCod);
|
||||
|
||||
if (PrintView)
|
||||
{
|
||||
case ActSeeCrsTimTbl:
|
||||
case ActSeeMyTimTbl:
|
||||
/***** Start time table drawing *****/
|
||||
Lay_StartRoundFrameTable10 ("98%",0,NULL);
|
||||
if (TimeTableType == TT_COURSE_TIMETABLE)
|
||||
Lay_WriteHeaderClassPhoto (1,false,false,
|
||||
Gbl.CurrentIns.Ins.InsCod,Gbl.CurrentDeg.Deg.DegCod,Gbl.CurrentCrs.Crs.CrsCod);
|
||||
|
||||
/***** Select whether show only my groups or all groups *****/
|
||||
fprintf (Gbl.F.Out,"<tr>"
|
||||
"<td align=\"center\">");
|
||||
Act_FormStart (Gbl.CurrentAct);
|
||||
Grp_ShowSelectorWhichGrps ();
|
||||
fprintf (Gbl.F.Out,"</form>"
|
||||
"</td>"
|
||||
"</tr>");
|
||||
break;
|
||||
case ActPrnCrsTimTbl:
|
||||
case ActPrnMyTimTbl:
|
||||
/***** Start time table drawing *****/
|
||||
Lay_StartSquareFrameTable (DARK_BLUE,"white","90%",0);
|
||||
if (TimeTableType == TT_COURSE_TIMETABLE)
|
||||
Lay_WriteHeaderClassPhoto (1,true,false,
|
||||
Gbl.CurrentIns.Ins.InsCod,Gbl.CurrentDeg.Deg.DegCod,Gbl.CurrentCrs.Crs.CrsCod);
|
||||
|
||||
/***** Show whether only my groups or all groups are selected *****/
|
||||
TT_ShowTimeTableGrpsSelected ();
|
||||
break;
|
||||
/***** Select whether show only my groups or all groups *****/
|
||||
fprintf (Gbl.F.Out,"<tr>"
|
||||
"<td align=\"center\">");
|
||||
Act_FormStart (Gbl.CurrentAct);
|
||||
Grp_ShowSelectorWhichGrps ();
|
||||
fprintf (Gbl.F.Out,"</form>"
|
||||
"</td>"
|
||||
"</tr>");
|
||||
}
|
||||
else
|
||||
/***** Show whether only my groups or all groups are selected *****/
|
||||
TT_ShowTimeTableGrpsSelected ();
|
||||
|
||||
/***** Show the time table *****/
|
||||
fprintf (Gbl.F.Out,"<tr>"
|
||||
|
@ -315,18 +306,8 @@ void TT_ShowClassTimeTable (void)
|
|||
fprintf (Gbl.F.Out,"</td>"
|
||||
"</tr>");
|
||||
|
||||
/***** End of frame *****/
|
||||
switch (Gbl.CurrentAct)
|
||||
{
|
||||
case ActSeeCrsTimTbl:
|
||||
case ActSeeMyTimTbl:
|
||||
Lay_EndRoundFrameTable10 ();
|
||||
break;
|
||||
case ActPrnCrsTimTbl:
|
||||
case ActPrnMyTimTbl:
|
||||
Lay_EndSquareFrameTable ();
|
||||
break;
|
||||
}
|
||||
/***** End frame *****/
|
||||
Lay_EndRoundFrameTable10 ();
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
34
swad_user.c
34
swad_user.c
|
@ -6902,13 +6902,11 @@ void Usr_ListAllDataGsts (void)
|
|||
NumColumnsCommonCard = Usr_NUM_ALL_FIELDS_DATA_INV;
|
||||
|
||||
/***** Start table with list of guests *****/
|
||||
Lay_StartSquareFrameTable (NULL,NULL,NULL,0);
|
||||
|
||||
/***** Heading row with column names *****/
|
||||
/* Start row */
|
||||
fprintf (Gbl.F.Out,"<tr>");
|
||||
fprintf (Gbl.F.Out,"<table cellspacing=\"0\" cellpadding=\"0\" width=\"100%%\">"
|
||||
"<tr>");
|
||||
|
||||
/* Columns fot the data */
|
||||
/* Columns for the data */
|
||||
for (NumCol = (Gbl.Usrs.Listing.WithPhotos ? 0 :
|
||||
1);
|
||||
NumCol < NumColumnsCommonCard;
|
||||
|
@ -6941,7 +6939,7 @@ void Usr_ListAllDataGsts (void)
|
|||
Usr_UsrDataDestructor (&UsrDat);
|
||||
|
||||
/***** End of table *****/
|
||||
Lay_EndSquareFrameTable ();
|
||||
fprintf (Gbl.F.Out,"</table>");
|
||||
}
|
||||
else // Gbl.Usrs.LstGsts.NumUsrs == 0
|
||||
Usr_ShowWarningNoUsersFound (Rol_ROLE_GUEST);
|
||||
|
@ -7036,7 +7034,7 @@ void Usr_ListAllDataStds (void)
|
|||
Lay_ShowErrorAndExit ("Not enough memory to store names of groups.");
|
||||
|
||||
/***** Start table with list of students *****/
|
||||
Lay_StartSquareFrameTable (NULL,NULL,NULL,0);
|
||||
fprintf (Gbl.F.Out,"<table cellspacing=\"0\" cellpadding=\"0\" width=\"100%%\">");
|
||||
if (!Gbl.Usrs.ClassPhoto.AllGroups)
|
||||
{
|
||||
fprintf (Gbl.F.Out,"<tr>"
|
||||
|
@ -7117,7 +7115,7 @@ void Usr_ListAllDataStds (void)
|
|||
Usr_UsrDataDestructor (&UsrDat);
|
||||
|
||||
/***** End of table *****/
|
||||
Lay_EndSquareFrameTable ();
|
||||
fprintf (Gbl.F.Out,"</table>");
|
||||
|
||||
/***** Free memory used by the string with the list of group names where student belongs to *****/
|
||||
if (Gbl.Scope.Current == Sco_SCOPE_COURSE)
|
||||
|
@ -7263,11 +7261,9 @@ void Usr_ListAllDataTchs (void)
|
|||
NumColumns = Usr_NUM_ALL_FIELDS_DATA_TCH;
|
||||
|
||||
/***** Start table with list of teachers *****/
|
||||
Lay_StartSquareFrameTable (NULL,NULL,NULL,0);
|
||||
|
||||
/***** Heading row with column names *****/
|
||||
/* Start row */
|
||||
fprintf (Gbl.F.Out,"<tr>");
|
||||
fprintf (Gbl.F.Out,"<table cellspacing=\"0\" cellpadding=\"0\" width=\"100%%\">"
|
||||
"<tr>");
|
||||
for (NumCol = (Gbl.Usrs.Listing.WithPhotos ? 0 :
|
||||
1);
|
||||
NumCol < NumColumns;
|
||||
|
@ -7298,7 +7294,7 @@ void Usr_ListAllDataTchs (void)
|
|||
Usr_UsrDataDestructor (&UsrDat);
|
||||
|
||||
/***** End of table *****/
|
||||
Lay_EndSquareFrameTable ();
|
||||
fprintf (Gbl.F.Out,"</table>");
|
||||
}
|
||||
else // Gbl.Usrs.LstTchs.NumUsrs == 0
|
||||
Lay_ShowAlert (Lay_INFO,Txt_No_users_found[Rol_ROLE_TEACHER]);
|
||||
|
@ -8336,14 +8332,14 @@ void Usr_SeeGstClassPhotoPrn (void)
|
|||
if (Gbl.Usrs.LstGsts.NumUsrs)
|
||||
{
|
||||
/***** Draw the guests' class photo *****/
|
||||
Lay_StartSquareFrameTable (DARK_BLUE,"white",NULL,0);
|
||||
Lay_StartRoundFrameTable10 (NULL,0,NULL);
|
||||
Lay_WriteHeaderClassPhoto (Gbl.Usrs.ClassPhoto.Cols,true,true,
|
||||
(Gbl.Scope.Current == Sco_SCOPE_CENTRE ||
|
||||
Gbl.Scope.Current == Sco_SCOPE_INSTITUTION) ? Gbl.CurrentIns.Ins.InsCod :
|
||||
-1L,
|
||||
-1L,-1L);
|
||||
Usr_DrawClassPhoto (Usr_CLASS_PHOTO_PRN,Rol_ROLE_GUEST);
|
||||
Lay_EndSquareFrameTable ();
|
||||
Lay_EndRoundFrameTable10 ();
|
||||
}
|
||||
else
|
||||
Usr_ShowWarningNoUsersFound (Rol_ROLE_GUEST);
|
||||
|
@ -8376,7 +8372,7 @@ void Usr_SeeStdClassPhotoPrn (void)
|
|||
if (Gbl.Usrs.LstStds.NumUsrs)
|
||||
{
|
||||
/***** Draw the students' class photo *****/
|
||||
Lay_StartSquareFrameTable (DARK_BLUE,"white",NULL,0);
|
||||
Lay_StartRoundFrameTable10 (NULL,0,NULL);
|
||||
Lay_WriteHeaderClassPhoto (Gbl.Usrs.ClassPhoto.Cols,true,true,
|
||||
(Gbl.Scope.Current == Sco_SCOPE_COURSE ||
|
||||
Gbl.Scope.Current == Sco_SCOPE_DEGREE ||
|
||||
|
@ -8389,7 +8385,7 @@ void Usr_SeeStdClassPhotoPrn (void)
|
|||
Gbl.Scope.Current == Sco_SCOPE_COURSE ? Gbl.CurrentCrs.Crs.CrsCod :
|
||||
-1L);
|
||||
Usr_DrawClassPhoto (Usr_CLASS_PHOTO_PRN,Rol_ROLE_STUDENT);
|
||||
Lay_EndSquareFrameTable ();
|
||||
Lay_EndRoundFrameTable10 ();
|
||||
}
|
||||
else
|
||||
Usr_ShowWarningNoUsersFound (Rol_ROLE_STUDENT);
|
||||
|
@ -8430,7 +8426,7 @@ void Usr_SeeTchClassPhotoPrn (void)
|
|||
if (Gbl.Usrs.LstTchs.NumUsrs)
|
||||
{
|
||||
/***** Draw the teachers' class photo *****/
|
||||
Lay_StartSquareFrameTable (DARK_BLUE,"white",NULL,0);
|
||||
Lay_StartRoundFrameTable10 (NULL,0,NULL);
|
||||
Lay_WriteHeaderClassPhoto (Gbl.Usrs.ClassPhoto.Cols,true,true,
|
||||
(Gbl.Scope.Current == Sco_SCOPE_COURSE ||
|
||||
Gbl.Scope.Current == Sco_SCOPE_DEGREE ||
|
||||
|
@ -8443,7 +8439,7 @@ void Usr_SeeTchClassPhotoPrn (void)
|
|||
Gbl.Scope.Current == Sco_SCOPE_COURSE ? Gbl.CurrentCrs.Crs.CrsCod :
|
||||
-1L);
|
||||
Usr_DrawClassPhoto (Usr_CLASS_PHOTO_PRN,Rol_ROLE_TEACHER);
|
||||
Lay_EndSquareFrameTable ();
|
||||
Lay_EndRoundFrameTable10 ();
|
||||
}
|
||||
else
|
||||
Lay_ShowAlert (Lay_INFO,Txt_No_users_found[Rol_ROLE_TEACHER]);
|
||||
|
|
Loading…
Reference in New Issue