mirror of https://github.com/acanas/swad-core.git
Version19.31.18
This commit is contained in:
parent
3cfb2c0753
commit
0d2202bb72
|
@ -279,17 +279,16 @@ static void Acc_WriteRowEmptyAccount (unsigned NumUsr,const char *ID,struct UsrD
|
|||
|
||||
/***** Write number of user in the list *****/
|
||||
Tbl_StartRow ();
|
||||
fprintf (Gbl.F.Out,"<td rowspan=\"2\""
|
||||
" class=\"USR_LIST_NUM_N RIGHT_TOP COLOR%u\">"
|
||||
"%u",
|
||||
Gbl.RowEvenOdd,NumUsr);
|
||||
|
||||
Tbl_StartCellAttr ("rowspan=\"2\" class=\"USR_LIST_NUM_N RIGHT_TOP COLOR%u\"",
|
||||
Gbl.RowEvenOdd);
|
||||
fprintf (Gbl.F.Out,"%u",NumUsr);
|
||||
Tbl_EndCell ();
|
||||
|
||||
/***** Write user's ID and name *****/
|
||||
fprintf (Gbl.F.Out,"<td class=\"DAT_N LEFT_TOP COLOR%u\">"
|
||||
"%s: %s<br />"
|
||||
Tbl_StartCellAttr ("class=\"DAT_N LEFT_TOP COLOR%u\"",Gbl.RowEvenOdd);
|
||||
fprintf (Gbl.F.Out,"%s: %s<br />"
|
||||
"%s: ",
|
||||
Gbl.RowEvenOdd,
|
||||
Txt_ID,ID,
|
||||
Txt_Name);
|
||||
if (UsrDat->FullName[0])
|
||||
|
@ -299,24 +298,24 @@ static void Acc_WriteRowEmptyAccount (unsigned NumUsr,const char *ID,struct UsrD
|
|||
Tbl_EndCell ();
|
||||
|
||||
/***** Button to login with this account *****/
|
||||
fprintf (Gbl.F.Out,"<td class=\"RIGHT_TOP COLOR%u\">",
|
||||
Gbl.RowEvenOdd);
|
||||
Tbl_StartCellAttr ("class=\"RIGHT_TOP COLOR%u\"",Gbl.RowEvenOdd);
|
||||
Frm_StartForm (ActLogInNew);
|
||||
Usr_PutParamUsrCodEncrypted (UsrDat->EncryptedUsrCod);
|
||||
Btn_PutCreateButtonInline (Txt_Its_me);
|
||||
Frm_EndForm ();
|
||||
Tbl_EndCell ();
|
||||
|
||||
Tbl_EndRow ();
|
||||
Tbl_StartRow ();
|
||||
|
||||
/***** Courses of this user *****/
|
||||
Tbl_StartRow ();
|
||||
fprintf (Gbl.F.Out,"<td colspan=\"2\" class=\"LEFT_TOP COLOR%u\">",
|
||||
Gbl.RowEvenOdd);
|
||||
Tbl_StartCellAttr ("colspan=\"2\" class=\"LEFT_TOP COLOR%u\"",Gbl.RowEvenOdd);
|
||||
UsrDat->Sex = Usr_SEX_UNKNOWN;
|
||||
Crs_GetAndWriteCrssOfAUsr (UsrDat,Rol_TCH);
|
||||
Crs_GetAndWriteCrssOfAUsr (UsrDat,Rol_NET);
|
||||
Crs_GetAndWriteCrssOfAUsr (UsrDat,Rol_STD);
|
||||
Tbl_EndCell ();
|
||||
|
||||
Tbl_EndRow ();
|
||||
}
|
||||
|
||||
|
@ -368,13 +367,15 @@ static void Acc_ShowFormRequestNewAccountWithParams (const char *NewNicknameWith
|
|||
else
|
||||
NewNicknameWithArroba[0] = '\0';
|
||||
Tbl_StartRow ();
|
||||
fprintf (Gbl.F.Out,"<td class=\"RIGHT_MIDDLE\">"
|
||||
"<label for=\"NewNick\" class=\"%s\">%s:</label>",
|
||||
|
||||
Tbl_StartCellAttr ("class=\"RIGHT_MIDDLE\"");
|
||||
fprintf (Gbl.F.Out,"<label for=\"NewNick\" class=\"%s\">%s:</label>",
|
||||
The_ClassFormInBox[Gbl.Prefs.Theme],
|
||||
Txt_Nickname);
|
||||
Tbl_EndCell ();
|
||||
fprintf (Gbl.F.Out,"<td class=\"LEFT_MIDDLE\">"
|
||||
"<input type=\"text\" id=\"NewNick\" name=\"NewNick\""
|
||||
|
||||
Tbl_StartCellAttr ("class=\"LEFT_MIDDLE\"");
|
||||
fprintf (Gbl.F.Out,"<input type=\"text\" id=\"NewNick\" name=\"NewNick\""
|
||||
" size=\"18\" maxlength=\"%u\""
|
||||
" placeholder=\"%s\" value=\"%s\""
|
||||
" required=\"required\" />",
|
||||
|
@ -382,17 +383,20 @@ static void Acc_ShowFormRequestNewAccountWithParams (const char *NewNicknameWith
|
|||
Txt_HELP_nickname,
|
||||
NewNicknameWithArroba);
|
||||
Tbl_EndCell ();
|
||||
|
||||
Tbl_EndRow ();
|
||||
|
||||
/***** Email *****/
|
||||
Tbl_StartRow ();
|
||||
fprintf (Gbl.F.Out,"<td class=\"RIGHT_MIDDLE\">"
|
||||
"<label for=\"NewEmail\" class=\"%s\">%s:</label>",
|
||||
|
||||
Tbl_StartCellAttr ("class=\"RIGHT_MIDDLE\"");
|
||||
fprintf (Gbl.F.Out,"<label for=\"NewEmail\" class=\"%s\">%s:</label>",
|
||||
The_ClassFormInBox[Gbl.Prefs.Theme],
|
||||
Txt_Email);
|
||||
Tbl_EndCell ();
|
||||
fprintf (Gbl.F.Out,"<td class=\"LEFT_MIDDLE\">"
|
||||
"<input type=\"email\" id=\"NewEmail\" name=\"NewEmail\""
|
||||
|
||||
Tbl_StartCellAttr ("class=\"LEFT_MIDDLE\"");
|
||||
fprintf (Gbl.F.Out,"<input type=\"email\" id=\"NewEmail\" name=\"NewEmail\""
|
||||
" size=\"18\" maxlength=\"%u\""
|
||||
" placeholder=\"%s\" value=\"%s\""
|
||||
" required=\"required\" />",
|
||||
|
@ -400,6 +404,7 @@ static void Acc_ShowFormRequestNewAccountWithParams (const char *NewNicknameWith
|
|||
Txt_HELP_email,
|
||||
NewEmail);
|
||||
Tbl_EndCell ();
|
||||
|
||||
Tbl_EndRow ();
|
||||
|
||||
/***** Password *****/
|
||||
|
|
|
@ -748,16 +748,15 @@ static void Agd_ShowOneEvent (Agd_AgendaType_t AgendaType,long AgdCod)
|
|||
StartEndTime <= (Dat_StartEndTime_t) (Dat_NUM_START_END_TIME - 1);
|
||||
StartEndTime++)
|
||||
{
|
||||
fprintf (Gbl.F.Out,"<td id=\"agd_date_%u_%u\""
|
||||
" class=\"%s LEFT_BOTTOM COLOR%u\">"
|
||||
"<script type=\"text/javascript\">"
|
||||
"writeLocalDateHMSFromUTC('agd_date_%u_%u',%ld,"
|
||||
"%u,'<br />','%s',true,true,0x6);"
|
||||
"</script>",
|
||||
Tbl_StartCellAttr ("id=\"agd_date_%u_%u\" class=\"%s LEFT_BOTTOM COLOR%u\"",
|
||||
(unsigned) StartEndTime,UniqueId,
|
||||
AgdEvent.Hidden ? Dat_TimeStatusClassHidden[AgdEvent.TimeStatus] :
|
||||
Dat_TimeStatusClassVisible[AgdEvent.TimeStatus],
|
||||
Gbl.RowEvenOdd,
|
||||
Gbl.RowEvenOdd);
|
||||
fprintf (Gbl.F.Out,"<script type=\"text/javascript\">"
|
||||
"writeLocalDateHMSFromUTC('agd_date_%u_%u',%ld,"
|
||||
"%u,'<br />','%s',true,true,0x6);"
|
||||
"</script>",
|
||||
(unsigned) StartEndTime,UniqueId,
|
||||
AgdEvent.TimeUTC[StartEndTime],
|
||||
(unsigned) Gbl.Prefs.DateFormat,Txt_Today);
|
||||
|
@ -765,7 +764,7 @@ static void Agd_ShowOneEvent (Agd_AgendaType_t AgendaType,long AgdCod)
|
|||
}
|
||||
|
||||
/* Event */
|
||||
fprintf (Gbl.F.Out,"<td class=\"%s LEFT_TOP COLOR%u\">",
|
||||
Tbl_StartCellAttr ("class=\"%s LEFT_TOP COLOR%u\"",
|
||||
AgdEvent.Hidden ? "ASG_TITLE_LIGHT" :
|
||||
"ASG_TITLE",
|
||||
Gbl.RowEvenOdd);
|
||||
|
@ -775,9 +774,8 @@ static void Agd_ShowOneEvent (Agd_AgendaType_t AgendaType,long AgdCod)
|
|||
Tbl_EndCell ();
|
||||
|
||||
/* Location */
|
||||
fprintf (Gbl.F.Out,"<td class=\"LEFT_TOP COLOR%u\">"
|
||||
"<div class=\"%s\">%s</div>",
|
||||
Gbl.RowEvenOdd,
|
||||
Tbl_StartCellAttr ("class=\"LEFT_TOP COLOR%u\"",Gbl.RowEvenOdd);
|
||||
fprintf (Gbl.F.Out,"<div class=\"%s\">%s</div>",
|
||||
AgdEvent.Hidden ? "ASG_TITLE_LIGHT" :
|
||||
"ASG_TITLE",
|
||||
AgdEvent.Location);
|
||||
|
@ -787,20 +785,18 @@ static void Agd_ShowOneEvent (Agd_AgendaType_t AgendaType,long AgdCod)
|
|||
|
||||
/***** Write second row of data of this event *****/
|
||||
Tbl_StartRow ();
|
||||
fprintf (Gbl.F.Out,"<td colspan=\"2\" class=\"LEFT_TOP COLOR%u\">",
|
||||
Gbl.RowEvenOdd);
|
||||
|
||||
/* Forms to remove/edit this event */
|
||||
Tbl_StartCellAttr ("colspan=\"2\" class=\"LEFT_TOP COLOR%u\"",Gbl.RowEvenOdd);
|
||||
switch (AgendaType)
|
||||
{
|
||||
case Agd_MY_AGENDA_TODAY:
|
||||
case Agd_MY_AGENDA:
|
||||
/* Forms to remove/edit this event */
|
||||
Agd_PutFormsToRemEditOneEvent (&AgdEvent,Anchor);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
Tbl_EndCell ();
|
||||
|
||||
/* Text of the event */
|
||||
|
@ -808,13 +804,14 @@ static void Agd_ShowOneEvent (Agd_AgendaType_t AgendaType,long AgdCod)
|
|||
Str_ChangeFormat (Str_FROM_HTML,Str_TO_RIGOROUS_HTML,
|
||||
Txt,Cns_MAX_BYTES_TEXT,false); // Convert from HTML to recpectful HTML
|
||||
Str_InsertLinks (Txt,Cns_MAX_BYTES_TEXT,60); // Insert links
|
||||
fprintf (Gbl.F.Out,"<td colspan=\"2\" class=\"LEFT_TOP COLOR%u\">"
|
||||
"<div class=\"PAR %s\">%s</div>",
|
||||
Gbl.RowEvenOdd,
|
||||
|
||||
Tbl_StartCellAttr ("colspan=\"2\" class=\"LEFT_TOP COLOR%u\"",Gbl.RowEvenOdd);
|
||||
fprintf (Gbl.F.Out,"<div class=\"PAR %s\">%s</div>",
|
||||
AgdEvent.Hidden ? "DAT_LIGHT" :
|
||||
"DAT",
|
||||
Txt);
|
||||
Tbl_EndCell ();
|
||||
|
||||
Tbl_EndRow ();
|
||||
|
||||
/***** Free anchor string *****/
|
||||
|
@ -1503,32 +1500,38 @@ void Agd_RequestCreatOrEditEvent (void)
|
|||
|
||||
/***** Event *****/
|
||||
Tbl_StartRow ();
|
||||
fprintf (Gbl.F.Out,"<td class=\"RIGHT_MIDDLE\">"
|
||||
"<label for=\"Event\" class=\"%s\">%s:</label>",
|
||||
|
||||
Tbl_StartCellAttr ("class=\"RIGHT_MIDDLE\"");
|
||||
fprintf (Gbl.F.Out,"<label for=\"Event\" class=\"%s\">%s:</label>",
|
||||
The_ClassFormInBox[Gbl.Prefs.Theme],
|
||||
Txt_Event);
|
||||
Tbl_EndCell ();
|
||||
fprintf (Gbl.F.Out,"<td class=\"LEFT_MIDDLE\">"
|
||||
"<input type=\"text\" id=\"Event\" name=\"Event\""
|
||||
|
||||
Tbl_StartCellAttr ("class=\"LEFT_MIDDLE\"");
|
||||
fprintf (Gbl.F.Out,"<input type=\"text\" id=\"Event\" name=\"Event\""
|
||||
" size=\"45\" maxlength=\"%u\" value=\"%s\""
|
||||
" required=\"required\" />",
|
||||
Agd_MAX_CHARS_EVENT,AgdEvent.Event);
|
||||
Tbl_EndCell ();
|
||||
|
||||
Tbl_EndRow ();
|
||||
|
||||
/***** Location *****/
|
||||
Tbl_StartRow ();
|
||||
fprintf (Gbl.F.Out,"<td class=\"RIGHT_MIDDLE\">"
|
||||
"<label for=\"Location\" class=\"%s\">%s:</label>",
|
||||
|
||||
Tbl_StartCellAttr ("class=\"RIGHT_MIDDLE\"");
|
||||
fprintf (Gbl.F.Out,"<label for=\"Location\" class=\"%s\">%s:</label>",
|
||||
The_ClassFormInBox[Gbl.Prefs.Theme],
|
||||
Txt_Location);
|
||||
Tbl_EndCell ();
|
||||
fprintf (Gbl.F.Out,"<td class=\"LEFT_MIDDLE\">"
|
||||
"<input type=\"text\" id=\"Location\" name=\"Location\""
|
||||
|
||||
Tbl_StartCellAttr ("class=\"LEFT_MIDDLE\"");
|
||||
fprintf (Gbl.F.Out,"<input type=\"text\" id=\"Location\" name=\"Location\""
|
||||
" size=\"45\" maxlength=\"%u\" value=\"%s\""
|
||||
" required=\"required\" />",
|
||||
Agd_MAX_CHARS_LOCATION,AgdEvent.Location);
|
||||
Tbl_EndCell ();
|
||||
|
||||
Tbl_EndRow ();
|
||||
|
||||
/***** Start and end dates *****/
|
||||
|
@ -1537,18 +1540,21 @@ void Agd_RequestCreatOrEditEvent (void)
|
|||
|
||||
/***** Text *****/
|
||||
Tbl_StartRow ();
|
||||
fprintf (Gbl.F.Out,"<td class=\"RIGHT_TOP\">"
|
||||
"<label for=\"Txt\" class=\"%s\">%s:</label>",
|
||||
|
||||
Tbl_StartCellAttr ("class=\"RIGHT_TOP\"");
|
||||
fprintf (Gbl.F.Out,"<label for=\"Txt\" class=\"%s\">%s:</label>",
|
||||
The_ClassFormInBox[Gbl.Prefs.Theme],
|
||||
Txt_Description);
|
||||
Tbl_EndCell ();
|
||||
fprintf (Gbl.F.Out,"<td class=\"LEFT_TOP\">"
|
||||
"<textarea id=\"Txt\" name=\"Txt\""
|
||||
|
||||
Tbl_StartCellAttr ("class=\"LEFT_TOP\"");
|
||||
fprintf (Gbl.F.Out,"<textarea id=\"Txt\" name=\"Txt\""
|
||||
" cols=\"60\" rows=\"10\">");
|
||||
if (!ItsANewEvent)
|
||||
fprintf (Gbl.F.Out,"%s",Txt);
|
||||
fprintf (Gbl.F.Out,"</textarea>");
|
||||
Tbl_EndCell ();
|
||||
|
||||
Tbl_EndRow ();
|
||||
|
||||
/***** End table, send button and end box *****/
|
||||
|
|
|
@ -414,12 +414,12 @@ void Ann_ShowFormAnnouncement (void)
|
|||
|
||||
/***** Users' roles who can view the announcement *****/
|
||||
Tbl_StartRow ();
|
||||
fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_TOP\">"
|
||||
"%s: ",
|
||||
The_ClassFormInBox[Gbl.Prefs.Theme],
|
||||
Txt_Users);
|
||||
|
||||
Tbl_StartCellAttr ("class=\"%s RIGHT_TOP\"",The_ClassFormInBox[Gbl.Prefs.Theme]);
|
||||
fprintf (Gbl.F.Out,"%s: ",Txt_Users);
|
||||
Tbl_EndCell ();
|
||||
fprintf (Gbl.F.Out,"<td class=\"DAT LEFT_TOP\">");
|
||||
|
||||
Tbl_StartCellAttr ("class=\"DAT LEFT_TOP\"");
|
||||
Rol_WriteSelectorRoles (1 << Rol_UNK |
|
||||
1 << Rol_GST |
|
||||
1 << Rol_STD |
|
||||
|
@ -432,6 +432,7 @@ void Ann_ShowFormAnnouncement (void)
|
|||
1 << Rol_TCH,
|
||||
false,false);
|
||||
Tbl_EndCell ();
|
||||
|
||||
Tbl_EndRow ();
|
||||
|
||||
/***** End table, send button and end box *****/
|
||||
|
@ -451,16 +452,19 @@ static void Ann_PutSubjectMessage (const char *Field,const char *Label,
|
|||
extern const char *The_ClassFormInBox[The_NUM_THEMES];
|
||||
|
||||
Tbl_StartRow ();
|
||||
fprintf (Gbl.F.Out,"<td class=\"RIGHT_TOP\">"
|
||||
"<label for=\"%s\" class=\"%s\">%s:</label>",
|
||||
|
||||
Tbl_StartCellAttr ("class=\"RIGHT_TOP\"");
|
||||
fprintf (Gbl.F.Out,"<label for=\"%s\" class=\"%s\">%s:</label>",
|
||||
Field,The_ClassFormInBox[Gbl.Prefs.Theme],Label);
|
||||
Tbl_EndCell ();
|
||||
fprintf (Gbl.F.Out,"<td class=\"LEFT_TOP\">"
|
||||
"<textarea id=\"%s\" name=\"%s\""
|
||||
|
||||
Tbl_StartCellAttr ("class=\"LEFT_TOP\"");
|
||||
fprintf (Gbl.F.Out,"<textarea id=\"%s\" name=\"%s\""
|
||||
" cols=\"75\" rows=\"%u\">"
|
||||
"</textarea>",
|
||||
Field,Field,Rows);
|
||||
Tbl_EndCell ();
|
||||
|
||||
Tbl_EndRow ();
|
||||
}
|
||||
|
||||
|
|
|
@ -358,12 +358,12 @@ static void Asg_ShowOneAssignment (long AsgCod,bool PrintView)
|
|||
/***** Write first row of data of this assignment *****/
|
||||
/* Forms to remove/edit this assignment */
|
||||
Tbl_StartRow ();
|
||||
fprintf (Gbl.F.Out,"<td rowspan=\"2\" class=\"CONTEXT_COL");
|
||||
|
||||
if (PrintView)
|
||||
fprintf (Gbl.F.Out,"\">");
|
||||
Tbl_StartCellAttr ("rowspan=\"2\" class=\"CONTEXT_COL\"");
|
||||
else
|
||||
{
|
||||
fprintf (Gbl.F.Out," COLOR%u\">",Gbl.RowEvenOdd);
|
||||
Tbl_StartCellAttr ("rowspan=\"2\" class=\"CONTEXT_COL COLOR%u\"",Gbl.RowEvenOdd);
|
||||
Asg_PutFormsToRemEditOneAsg (&Asg,Anchor);
|
||||
}
|
||||
Tbl_EndCell ();
|
||||
|
@ -375,16 +375,22 @@ static void Asg_ShowOneAssignment (long AsgCod,bool PrintView)
|
|||
StartEndTime <= (Dat_StartEndTime_t) (Dat_NUM_START_END_TIME - 1);
|
||||
StartEndTime++)
|
||||
{
|
||||
fprintf (Gbl.F.Out,"<td id=\"asg_date_%u_%u\" class=\"%s LEFT_BOTTOM",
|
||||
if (PrintView)
|
||||
Tbl_StartCellAttr ("id=\"asg_date_%u_%u\" class=\"%s LEFT_BOTTOM\"",
|
||||
(unsigned) StartEndTime,UniqueId,
|
||||
Asg.Hidden ? (Asg.Open ? "DATE_GREEN_LIGHT" :
|
||||
"DATE_RED_LIGHT") :
|
||||
(Asg.Open ? "DATE_GREEN" :
|
||||
"DATE_RED"));
|
||||
if (!PrintView)
|
||||
fprintf (Gbl.F.Out," COLOR%u",Gbl.RowEvenOdd);
|
||||
fprintf (Gbl.F.Out,"\">"
|
||||
"<script type=\"text/javascript\">"
|
||||
else
|
||||
Tbl_StartCellAttr ("id=\"asg_date_%u_%u\" class=\"%s LEFT_BOTTOM COLOR%u\"",
|
||||
(unsigned) StartEndTime,UniqueId,
|
||||
Asg.Hidden ? (Asg.Open ? "DATE_GREEN_LIGHT" :
|
||||
"DATE_RED_LIGHT") :
|
||||
(Asg.Open ? "DATE_GREEN" :
|
||||
"DATE_RED"),
|
||||
Gbl.RowEvenOdd);
|
||||
fprintf (Gbl.F.Out,"<script type=\"text/javascript\">"
|
||||
"writeLocalDateHMSFromUTC('asg_date_%u_%u',%ld,"
|
||||
"%u,'<br />','%s',true,true,0x7);"
|
||||
"</script>",
|
||||
|
@ -394,37 +400,40 @@ static void Asg_ShowOneAssignment (long AsgCod,bool PrintView)
|
|||
}
|
||||
|
||||
/* Assignment title */
|
||||
fprintf (Gbl.F.Out,"<td class=\"%s LEFT_TOP",
|
||||
if (PrintView)
|
||||
Tbl_StartCellAttr ("class=\"%s LEFT_TOP\"",
|
||||
Asg.Hidden ? "ASG_TITLE_LIGHT" :
|
||||
"ASG_TITLE");
|
||||
if (!PrintView)
|
||||
fprintf (Gbl.F.Out," COLOR%u",Gbl.RowEvenOdd);
|
||||
fprintf (Gbl.F.Out,"\">");
|
||||
else
|
||||
Tbl_StartCellAttr ("class=\"%s LEFT_TOP COLOR%u\"",
|
||||
Asg.Hidden ? "ASG_TITLE_LIGHT" :
|
||||
"ASG_TITLE",
|
||||
Gbl.RowEvenOdd);
|
||||
Lay_StartArticle (Anchor);
|
||||
fprintf (Gbl.F.Out,"%s",Asg.Title);
|
||||
Lay_EndArticle ();
|
||||
Tbl_EndCell ();
|
||||
|
||||
/* Assignment folder */
|
||||
fprintf (Gbl.F.Out,"<td class=\"DAT LEFT_TOP");
|
||||
Tbl_StartCellAttr ("class=\"DAT LEFT_TOP");
|
||||
if (!PrintView)
|
||||
fprintf (Gbl.F.Out," COLOR%u",Gbl.RowEvenOdd);
|
||||
fprintf (Gbl.F.Out,"\">");
|
||||
if (Asg.SendWork == Asg_SEND_WORK)
|
||||
Asg_WriteAssignmentFolder (&Asg,PrintView);
|
||||
Tbl_EndCell ();
|
||||
|
||||
Tbl_EndRow ();
|
||||
|
||||
/***** Write second row of data of this assignment *****/
|
||||
Tbl_StartRow ();
|
||||
fprintf (Gbl.F.Out,"<td colspan=\"2\" class=\"LEFT_TOP");
|
||||
if (!PrintView)
|
||||
fprintf (Gbl.F.Out," COLOR%u",Gbl.RowEvenOdd);
|
||||
fprintf (Gbl.F.Out,"\">");
|
||||
|
||||
/* Author of the assignment */
|
||||
if (PrintView)
|
||||
Tbl_StartCellAttr ("colspan=\"2\" class=\"LEFT_TOP\"");
|
||||
else
|
||||
Tbl_StartCellAttr ("colspan=\"2\" class=\"LEFT_TOP COLOR%u\"",Gbl.RowEvenOdd);
|
||||
Asg_WriteAsgAuthor (&Asg);
|
||||
|
||||
Tbl_EndCell ();
|
||||
|
||||
/* Text of the assignment */
|
||||
|
@ -432,19 +441,18 @@ static void Asg_ShowOneAssignment (long AsgCod,bool PrintView)
|
|||
Str_ChangeFormat (Str_FROM_HTML,Str_TO_RIGOROUS_HTML,
|
||||
Txt,Cns_MAX_BYTES_TEXT,false); // Convert from HTML to recpectful HTML
|
||||
Str_InsertLinks (Txt,Cns_MAX_BYTES_TEXT,60); // Insert links
|
||||
fprintf (Gbl.F.Out,"<td colspan=\"2\" class=\"LEFT_TOP");
|
||||
if (!PrintView)
|
||||
fprintf (Gbl.F.Out," COLOR%u",Gbl.RowEvenOdd);
|
||||
fprintf (Gbl.F.Out,"\">");
|
||||
|
||||
if (PrintView)
|
||||
Tbl_StartCellAttr ("colspan=\"2\" class=\"LEFT_TOP\"");
|
||||
else
|
||||
Tbl_StartCellAttr ("colspan=\"2\" class=\"LEFT_TOP COLOR%u\"",Gbl.RowEvenOdd);
|
||||
if (Gbl.Crs.Grps.NumGrps)
|
||||
Asg_GetAndWriteNamesOfGrpsAssociatedToAsg (&Asg);
|
||||
|
||||
fprintf (Gbl.F.Out,"<div class=\"PAR %s\">%s</div>",
|
||||
Asg.Hidden ? "DAT_LIGHT" :
|
||||
"DAT",
|
||||
Txt);
|
||||
Tbl_EndCell ();
|
||||
|
||||
Tbl_EndRow ();
|
||||
|
||||
/***** Free anchor string *****/
|
||||
|
@ -1159,16 +1167,19 @@ void Asg_RequestCreatOrEditAsg (void)
|
|||
|
||||
/***** Assignment title *****/
|
||||
Tbl_StartRow ();
|
||||
fprintf (Gbl.F.Out,"<td class=\"RIGHT_MIDDLE\">"
|
||||
"<label for=\"Title\" class=\"%s\">%s:</label>",
|
||||
|
||||
Tbl_StartCellAttr ("class=\"RIGHT_MIDDLE\"");
|
||||
fprintf (Gbl.F.Out,"<label for=\"Title\" class=\"%s\">%s:</label>",
|
||||
The_ClassFormInBox[Gbl.Prefs.Theme],Txt_Title);
|
||||
Tbl_EndCell ();
|
||||
fprintf (Gbl.F.Out,"<td class=\"LEFT_MIDDLE\">"
|
||||
"<input type=\"text\" id=\"Title\" name=\"Title\""
|
||||
|
||||
Tbl_StartCellAttr ("class=\"LEFT_MIDDLE\"");
|
||||
fprintf (Gbl.F.Out,"<input type=\"text\" id=\"Title\" name=\"Title\""
|
||||
" size=\"45\" maxlength=\"%u\" value=\"%s\""
|
||||
" required=\"required\" />",
|
||||
Asg_MAX_CHARS_ASSIGNMENT_TITLE,Asg.Title);
|
||||
Tbl_EndCell ();
|
||||
|
||||
Tbl_EndRow ();
|
||||
|
||||
/***** Assignment start and end dates *****/
|
||||
|
@ -1176,34 +1187,38 @@ void Asg_RequestCreatOrEditAsg (void)
|
|||
|
||||
/***** Send work? *****/
|
||||
Tbl_StartRow ();
|
||||
fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_MIDDLE\">"
|
||||
"%s:",
|
||||
The_ClassFormInBox[Gbl.Prefs.Theme],
|
||||
Txt_Upload_files_QUESTION);
|
||||
|
||||
Tbl_StartCellAttr ("class=\"%s RIGHT_MIDDLE\"",The_ClassFormInBox[Gbl.Prefs.Theme]);
|
||||
fprintf (Gbl.F.Out,"%s:",Txt_Upload_files_QUESTION);
|
||||
Tbl_EndCell ();
|
||||
fprintf (Gbl.F.Out,"<td class=\"LEFT_MIDDLE\">"
|
||||
"<label class=\"DAT\">%s:"
|
||||
|
||||
Tbl_StartCellAttr ("class=\"LEFT_MIDDLE\"");
|
||||
fprintf (Gbl.F.Out,"<label class=\"DAT\">%s:"
|
||||
"<input type=\"text\" name=\"Folder\""
|
||||
" size=\"30\" maxlength=\"%u\" value=\"%s\" />"
|
||||
"</label>",
|
||||
Txt_Folder,
|
||||
Brw_MAX_CHARS_FOLDER,Asg.Folder);
|
||||
Tbl_EndCell ();
|
||||
|
||||
Tbl_EndRow ();
|
||||
|
||||
/***** Assignment text *****/
|
||||
Tbl_StartRow ();
|
||||
fprintf (Gbl.F.Out,"<td class=\"RIGHT_TOP\">"
|
||||
"<label for=\"Txt\" class=\"%s\">%s:</label>",
|
||||
|
||||
Tbl_StartCellAttr ("class=\"RIGHT_TOP\"");
|
||||
fprintf (Gbl.F.Out,"<label for=\"Txt\" class=\"%s\">%s:</label>",
|
||||
The_ClassFormInBox[Gbl.Prefs.Theme],Txt_Description);
|
||||
Tbl_EndCell ();
|
||||
fprintf (Gbl.F.Out,"<td class=\"LEFT_TOP\">"
|
||||
"<textarea id=\"Txt\" name=\"Txt\""
|
||||
|
||||
Tbl_StartCellAttr ("class=\"LEFT_TOP\"");
|
||||
fprintf (Gbl.F.Out,"<textarea id=\"Txt\" name=\"Txt\""
|
||||
" cols=\"60\" rows=\"10\">");
|
||||
if (!ItsANewAssignment)
|
||||
fprintf (Gbl.F.Out,"%s",Txt);
|
||||
fprintf (Gbl.F.Out,"</textarea>");
|
||||
Tbl_EndCell ();
|
||||
|
||||
Tbl_EndRow ();
|
||||
|
||||
/***** Groups *****/
|
||||
|
@ -1241,19 +1256,20 @@ static void Asg_ShowLstGrpsToEditAssignment (long AsgCod)
|
|||
{
|
||||
/***** Start box and table *****/
|
||||
Tbl_StartRow ();
|
||||
fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_TOP\">"
|
||||
"%s:",
|
||||
The_ClassFormInBox[Gbl.Prefs.Theme],
|
||||
Txt_Groups);
|
||||
|
||||
Tbl_StartCellAttr ("class=\"%s RIGHT_TOP\"",The_ClassFormInBox[Gbl.Prefs.Theme]);
|
||||
fprintf (Gbl.F.Out,"%s:",Txt_Groups);
|
||||
Tbl_EndCell ();
|
||||
fprintf (Gbl.F.Out,"<td class=\"LEFT_TOP\">");
|
||||
|
||||
Tbl_StartCellAttr ("class=\"LEFT_TOP\"");
|
||||
Box_StartBoxTable ("100%",NULL,NULL,
|
||||
Hlp_USERS_Groups,Box_NOT_CLOSABLE,0);
|
||||
|
||||
/***** First row: checkbox to select the whole course *****/
|
||||
Tbl_StartRow ();
|
||||
fprintf (Gbl.F.Out,"<td colspan=\"7\" class=\"DAT LEFT_MIDDLE\">"
|
||||
"<label>"
|
||||
|
||||
Tbl_StartCellAttr ("colspan=\"7\" class=\"DAT LEFT_MIDDLE\"");
|
||||
fprintf (Gbl.F.Out,"<label>"
|
||||
"<input type=\"checkbox\" id=\"WholeCrs\" name=\"WholeCrs\" value=\"Y\"");
|
||||
if (!Asg_CheckIfAsgIsAssociatedToGrps (AsgCod))
|
||||
fprintf (Gbl.F.Out," checked=\"checked\"");
|
||||
|
@ -1262,6 +1278,7 @@ static void Asg_ShowLstGrpsToEditAssignment (long AsgCod)
|
|||
"</label>",
|
||||
Txt_The_whole_course,Gbl.Hierarchy.Crs.ShrtName);
|
||||
Tbl_EndCell ();
|
||||
|
||||
Tbl_EndRow ();
|
||||
|
||||
/***** List the groups for each group type *****/
|
||||
|
@ -1275,6 +1292,7 @@ static void Asg_ShowLstGrpsToEditAssignment (long AsgCod)
|
|||
/***** End table and box *****/
|
||||
Box_EndBoxTable ();
|
||||
Tbl_EndCell ();
|
||||
|
||||
Tbl_EndRow ();
|
||||
}
|
||||
|
||||
|
|
|
@ -388,10 +388,11 @@ static void Att_ShowOneAttEvent (struct AttendanceEvent *Att,bool ShowOnlyThisAt
|
|||
/***** Write first row of data of this attendance event *****/
|
||||
/* Forms to remove/edit this attendance event */
|
||||
Tbl_StartRow ();
|
||||
fprintf (Gbl.F.Out,"<td rowspan=\"2\" class=\"CONTEXT_COL");
|
||||
if (!ShowOnlyThisAttEventComplete)
|
||||
fprintf (Gbl.F.Out," COLOR%u",Gbl.RowEvenOdd);
|
||||
fprintf (Gbl.F.Out,"\">");
|
||||
|
||||
if (ShowOnlyThisAttEventComplete)
|
||||
Tbl_StartCellAttr ("rowspan=\"2\" class=\"CONTEXT_COL\"");
|
||||
else
|
||||
Tbl_StartCellAttr ("rowspan=\"2\" class=\"CONTEXT_COL COLOR%u\"",Gbl.RowEvenOdd);
|
||||
switch (Gbl.Usrs.Me.Role.Logged)
|
||||
{
|
||||
case Rol_TCH:
|
||||
|
@ -417,8 +418,8 @@ static void Att_ShowOneAttEvent (struct AttendanceEvent *Att,bool ShowOnlyThisAt
|
|||
"DATE_RED"));
|
||||
if (!ShowOnlyThisAttEventComplete)
|
||||
fprintf (Gbl.F.Out," COLOR%u",Gbl.RowEvenOdd);
|
||||
fprintf (Gbl.F.Out,"\">"
|
||||
"<script type=\"text/javascript\">"
|
||||
fprintf (Gbl.F.Out,"\">");
|
||||
fprintf (Gbl.F.Out,"<script type=\"text/javascript\">"
|
||||
"writeLocalDateHMSFromUTC('att_date_%u_%u',%ld,"
|
||||
"%u,'<br />','%s',true,true,0x7);"
|
||||
"</script>",
|
||||
|
@ -454,6 +455,7 @@ static void Att_ShowOneAttEvent (struct AttendanceEvent *Att,bool ShowOnlyThisAt
|
|||
|
||||
/***** Write second row of data of this attendance event *****/
|
||||
Tbl_StartRow ();
|
||||
|
||||
fprintf (Gbl.F.Out,"<td colspan=\"2\" class=\"LEFT_TOP");
|
||||
if (!ShowOnlyThisAttEventComplete)
|
||||
fprintf (Gbl.F.Out," COLOR%u",Gbl.RowEvenOdd);
|
||||
|
@ -469,6 +471,7 @@ static void Att_ShowOneAttEvent (struct AttendanceEvent *Att,bool ShowOnlyThisAt
|
|||
Str_ChangeFormat (Str_FROM_HTML,Str_TO_RIGOROUS_HTML,
|
||||
Description,Cns_MAX_BYTES_TEXT,false); // Convert from HTML to recpectful HTML
|
||||
Str_InsertLinks (Description,Cns_MAX_BYTES_TEXT,60); // Insert links
|
||||
|
||||
fprintf (Gbl.F.Out,"<td colspan=\"2\" class=\"LEFT_TOP");
|
||||
if (!ShowOnlyThisAttEventComplete)
|
||||
fprintf (Gbl.F.Out," COLOR%u",Gbl.RowEvenOdd);
|
||||
|
@ -483,6 +486,7 @@ static void Att_ShowOneAttEvent (struct AttendanceEvent *Att,bool ShowOnlyThisAt
|
|||
Description);
|
||||
|
||||
Tbl_EndCell ();
|
||||
|
||||
Tbl_EndRow ();
|
||||
|
||||
/***** Free anchor string *****/
|
||||
|
@ -1096,16 +1100,19 @@ void Att_RequestCreatOrEditAttEvent (void)
|
|||
|
||||
/***** Attendance event title *****/
|
||||
Tbl_StartRow ();
|
||||
fprintf (Gbl.F.Out,"<td class=\"RIGHT_TOP\">"
|
||||
"<label for=\"Title\" class=\"%s\">%s:</label>",
|
||||
|
||||
fprintf (Gbl.F.Out,"<td class=\"RIGHT_TOP\">");
|
||||
fprintf (Gbl.F.Out,"<label for=\"Title\" class=\"%s\">%s:</label>",
|
||||
The_ClassFormInBox[Gbl.Prefs.Theme],Txt_Title);
|
||||
Tbl_EndCell ();
|
||||
fprintf (Gbl.F.Out,"<td class=\"LEFT_TOP\">"
|
||||
"<input type=\"text\" id=\"Title\" name=\"Title\""
|
||||
|
||||
fprintf (Gbl.F.Out,"<td class=\"LEFT_TOP\">");
|
||||
fprintf (Gbl.F.Out,"<input type=\"text\" id=\"Title\" name=\"Title\""
|
||||
" size=\"45\" maxlength=\"%u\" value=\"%s\""
|
||||
" required=\"required\" />",
|
||||
Att_MAX_CHARS_ATTENDANCE_EVENT_TITLE,Att.Title);
|
||||
Tbl_EndCell ();
|
||||
|
||||
Tbl_EndRow ();
|
||||
|
||||
/***** Assignment start and end dates *****/
|
||||
|
@ -1113,13 +1120,14 @@ void Att_RequestCreatOrEditAttEvent (void)
|
|||
|
||||
/***** Visibility of comments *****/
|
||||
Tbl_StartRow ();
|
||||
fprintf (Gbl.F.Out,"<td class=\"RIGHT_TOP\">"
|
||||
"<label for=\"ComTchVisible\" class=\"%s\">%s:</label>",
|
||||
|
||||
fprintf (Gbl.F.Out,"<td class=\"RIGHT_TOP\">");
|
||||
fprintf (Gbl.F.Out,"<label for=\"ComTchVisible\" class=\"%s\">%s:</label>",
|
||||
The_ClassFormInBox[Gbl.Prefs.Theme],Txt_Teachers_comment);
|
||||
Tbl_EndCell ();
|
||||
|
||||
fprintf (Gbl.F.Out,"<td class=\"LEFT_TOP\">"
|
||||
"<select id=\"ComTchVisible\" name=\"ComTchVisible\">");
|
||||
fprintf (Gbl.F.Out,"<td class=\"LEFT_TOP\">");
|
||||
fprintf (Gbl.F.Out,"<select id=\"ComTchVisible\" name=\"ComTchVisible\">");
|
||||
|
||||
fprintf (Gbl.F.Out,"<option value=\"N\"");
|
||||
if (!Att.CommentTchVisible)
|
||||
|
@ -1139,17 +1147,20 @@ void Att_RequestCreatOrEditAttEvent (void)
|
|||
|
||||
/***** Attendance event description *****/
|
||||
Tbl_StartRow ();
|
||||
fprintf (Gbl.F.Out,"<td class=\"RIGHT_TOP\">"
|
||||
"<label for=\"Txt\" class=\"%s\">%s:</label>",
|
||||
|
||||
fprintf (Gbl.F.Out,"<td class=\"RIGHT_TOP\">");
|
||||
fprintf (Gbl.F.Out,"<label for=\"Txt\" class=\"%s\">%s:</label>",
|
||||
The_ClassFormInBox[Gbl.Prefs.Theme],Txt_Description);
|
||||
Tbl_EndCell ();
|
||||
fprintf (Gbl.F.Out,"<td class=\"LEFT_TOP\">"
|
||||
"<textarea id=\"Txt\" name=\"Txt\""
|
||||
|
||||
fprintf (Gbl.F.Out,"<td class=\"LEFT_TOP\">");
|
||||
fprintf (Gbl.F.Out,"<textarea id=\"Txt\" name=\"Txt\""
|
||||
" cols=\"60\" rows=\"5\">");
|
||||
if (!ItsANewAttEvent)
|
||||
fprintf (Gbl.F.Out,"%s",Description);
|
||||
fprintf (Gbl.F.Out,"</textarea>");
|
||||
Tbl_EndCell ();
|
||||
|
||||
Tbl_EndRow ();
|
||||
|
||||
/***** Groups *****/
|
||||
|
@ -1187,18 +1198,21 @@ static void Att_ShowLstGrpsToEditAttEvent (long AttCod)
|
|||
{
|
||||
/***** Start box and table *****/
|
||||
Tbl_StartRow ();
|
||||
fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_TOP\">"
|
||||
"%s:",
|
||||
The_ClassFormInBox[Gbl.Prefs.Theme],Txt_Groups);
|
||||
|
||||
fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_TOP\">",
|
||||
The_ClassFormInBox[Gbl.Prefs.Theme]);
|
||||
fprintf (Gbl.F.Out,"%s:",Txt_Groups);
|
||||
Tbl_EndCell ();
|
||||
|
||||
fprintf (Gbl.F.Out,"<td class=\"LEFT_TOP\">");
|
||||
Box_StartBoxTable ("100%",NULL,NULL,
|
||||
NULL,Box_NOT_CLOSABLE,0);
|
||||
|
||||
/***** First row: checkbox to select the whole course *****/
|
||||
Tbl_StartRow ();
|
||||
fprintf (Gbl.F.Out,"<td colspan=\"7\" class=\"DAT LEFT_MIDDLE\">"
|
||||
"<label>"
|
||||
|
||||
fprintf (Gbl.F.Out,"<td colspan=\"7\" class=\"DAT LEFT_MIDDLE\">");
|
||||
fprintf (Gbl.F.Out,"<label>"
|
||||
"<input type=\"checkbox\" id=\"WholeCrs\" name=\"WholeCrs\" value=\"Y\"");
|
||||
if (!Att_CheckIfAttEventIsAssociatedToGrps (AttCod))
|
||||
fprintf (Gbl.F.Out," checked=\"checked\"");
|
||||
|
@ -1207,6 +1221,7 @@ static void Att_ShowLstGrpsToEditAttEvent (long AttCod)
|
|||
"</label>",
|
||||
Txt_The_whole_course,Gbl.Hierarchy.Crs.ShrtName);
|
||||
Tbl_EndCell ();
|
||||
|
||||
Tbl_EndRow ();
|
||||
|
||||
/***** List the groups for each group type *****/
|
||||
|
@ -2082,18 +2097,21 @@ static void Att_WriteRowUsrToCallTheRoll (unsigned NumUsr,
|
|||
|
||||
/***** Icon to show if the user is already present *****/
|
||||
Tbl_StartRow ();
|
||||
fprintf (Gbl.F.Out,"<td class=\"BT%u\">"
|
||||
"<label for=\"Std%u\">",
|
||||
Gbl.RowEvenOdd,NumUsr);
|
||||
|
||||
fprintf (Gbl.F.Out,"<td class=\"BT%u\">",
|
||||
Gbl.RowEvenOdd);
|
||||
fprintf (Gbl.F.Out,"<label for=\"Std%u\">",
|
||||
NumUsr);
|
||||
Att_PutCheckOrCross (Present);
|
||||
fprintf (Gbl.F.Out,"</label>");
|
||||
Tbl_EndCell ();
|
||||
|
||||
/***** Checkbox to select user *****/
|
||||
fprintf (Gbl.F.Out,"<td class=\"CENTER_TOP COLOR%u\">"
|
||||
"<input type=\"checkbox\" id=\"Std%u\" name=\"UsrCodStd\""
|
||||
fprintf (Gbl.F.Out,"<td class=\"CENTER_TOP COLOR%u\">",
|
||||
Gbl.RowEvenOdd);
|
||||
fprintf (Gbl.F.Out,"<input type=\"checkbox\" id=\"Std%u\" name=\"UsrCodStd\""
|
||||
" value=\"%s\"",
|
||||
Gbl.RowEvenOdd,NumUsr,
|
||||
NumUsr,
|
||||
UsrDat->EncryptedUsrCod);
|
||||
if (Present) // This student has attended to the event?
|
||||
fprintf (Gbl.F.Out," checked=\"checked\"");
|
||||
|
@ -2103,12 +2121,11 @@ static void Att_WriteRowUsrToCallTheRoll (unsigned NumUsr,
|
|||
Tbl_EndCell ();
|
||||
|
||||
/***** Write number of student in the list *****/
|
||||
fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_TOP COLOR%u\">"
|
||||
"%u",
|
||||
fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_TOP COLOR%u\">",
|
||||
UsrDat->Accepted ? "DAT_N" :
|
||||
"DAT",
|
||||
Gbl.RowEvenOdd,
|
||||
NumUsr);
|
||||
Gbl.RowEvenOdd);
|
||||
fprintf (Gbl.F.Out,"%u",NumUsr);
|
||||
Tbl_EndCell ();
|
||||
|
||||
/***** Show student's photo *****/
|
||||
|
@ -2132,15 +2149,14 @@ static void Att_WriteRowUsrToCallTheRoll (unsigned NumUsr,
|
|||
Tbl_EndCell ();
|
||||
|
||||
/***** Write student's name *****/
|
||||
fprintf (Gbl.F.Out,"<td class=\"%s LEFT_TOP COLOR%u\">%s",
|
||||
fprintf (Gbl.F.Out,"<td class=\"%s LEFT_TOP COLOR%u\">",
|
||||
UsrDat->Accepted ? "DAT_SMALL_N" :
|
||||
"DAT_SMALL",
|
||||
Gbl.RowEvenOdd,
|
||||
UsrDat->Surname1);
|
||||
Gbl.RowEvenOdd);
|
||||
fprintf (Gbl.F.Out,"%s",UsrDat->Surname1);
|
||||
if (UsrDat->Surname2[0])
|
||||
fprintf (Gbl.F.Out," %s",UsrDat->Surname2);
|
||||
fprintf (Gbl.F.Out,", %s",
|
||||
UsrDat->FirstName);
|
||||
fprintf (Gbl.F.Out,", %s",UsrDat->FirstName);
|
||||
Tbl_EndCell ();
|
||||
|
||||
/***** Student's comment: write form or text */
|
||||
|
@ -3129,44 +3145,48 @@ static void Att_ListEventsToSelect (Att_TypeOfView_t TypeOfView)
|
|||
|
||||
/* Write a row for this event */
|
||||
Tbl_StartRow ();
|
||||
fprintf (Gbl.F.Out,"<td class=\"DAT CENTER_TOP COLOR%u\">"
|
||||
"<input type=\"checkbox\""
|
||||
|
||||
fprintf (Gbl.F.Out,"<td class=\"DAT CENTER_TOP COLOR%u\">",
|
||||
Gbl.RowEvenOdd);
|
||||
fprintf (Gbl.F.Out,"<input type=\"checkbox\""
|
||||
" id=\"Att%u\" name=\"AttCods\" value=\"%ld\"",
|
||||
Gbl.RowEvenOdd,
|
||||
NumAttEvent,
|
||||
Gbl.AttEvents.Lst[NumAttEvent].AttCod);
|
||||
if (Gbl.AttEvents.Lst[NumAttEvent].Selected)
|
||||
fprintf (Gbl.F.Out," checked=\"checked\"");
|
||||
fprintf (Gbl.F.Out," />");
|
||||
Tbl_EndCell ();
|
||||
fprintf (Gbl.F.Out,"<td class=\"DAT RIGHT_TOP COLOR%u\">"
|
||||
"<label for=\"Att%u\">%u:</label>",
|
||||
Gbl.RowEvenOdd,
|
||||
|
||||
fprintf (Gbl.F.Out,"<td class=\"DAT RIGHT_TOP COLOR%u\">",
|
||||
Gbl.RowEvenOdd);
|
||||
fprintf (Gbl.F.Out,"<label for=\"Att%u\">%u:</label>",
|
||||
NumAttEvent,NumAttEvent + 1);
|
||||
Tbl_EndCell ();
|
||||
fprintf (Gbl.F.Out,"<td class=\"DAT LEFT_TOP COLOR%u\">"
|
||||
"<label for=\"Att%u\">"
|
||||
|
||||
fprintf (Gbl.F.Out,"<td class=\"DAT LEFT_TOP COLOR%u\">",
|
||||
Gbl.RowEvenOdd);
|
||||
fprintf (Gbl.F.Out,"<label for=\"Att%u\">"
|
||||
"<span id=\"att_date_start_%u\"></span>"
|
||||
"</label>"
|
||||
"<script type=\"text/javascript\">"
|
||||
"writeLocalDateHMSFromUTC('att_date_start_%u',%ld,"
|
||||
"%u,', ','%s',true,true,0x7);"
|
||||
"</script>",
|
||||
Gbl.RowEvenOdd,
|
||||
NumAttEvent,UniqueId,
|
||||
UniqueId,Gbl.AttEvents.Lst[NumAttEvent].TimeUTC[Att_START_TIME],
|
||||
(unsigned) Gbl.Prefs.DateFormat,Txt_Today);
|
||||
Tbl_EndCell ();
|
||||
fprintf (Gbl.F.Out,"<td class=\"DAT LEFT_TOP COLOR%u\">"
|
||||
"%s",
|
||||
Gbl.RowEvenOdd,
|
||||
Gbl.AttEvents.Lst[NumAttEvent].Title);
|
||||
|
||||
fprintf (Gbl.F.Out,"<td class=\"DAT LEFT_TOP COLOR%u\">",
|
||||
Gbl.RowEvenOdd);
|
||||
fprintf (Gbl.F.Out,"%s",Gbl.AttEvents.Lst[NumAttEvent].Title);
|
||||
Tbl_EndCell ();
|
||||
fprintf (Gbl.F.Out,"<td class=\"DAT RIGHT_TOP COLOR%u\">"
|
||||
"%u",
|
||||
Gbl.RowEvenOdd,
|
||||
Gbl.AttEvents.Lst[NumAttEvent].NumStdsTotal);
|
||||
|
||||
fprintf (Gbl.F.Out,"<td class=\"DAT RIGHT_TOP COLOR%u\">",
|
||||
Gbl.RowEvenOdd);
|
||||
fprintf (Gbl.F.Out,"%u",Gbl.AttEvents.Lst[NumAttEvent].NumStdsTotal);
|
||||
Tbl_EndCell ();
|
||||
|
||||
Tbl_EndRow ();
|
||||
}
|
||||
|
||||
|
@ -3174,12 +3194,14 @@ static void Att_ListEventsToSelect (Att_TypeOfView_t TypeOfView)
|
|||
if (NormalView)
|
||||
{
|
||||
Tbl_StartRow ();
|
||||
|
||||
fprintf (Gbl.F.Out,"<td colspan=\"5\" class=\"CENTER_MIDDLE\">");
|
||||
Frm_LinkFormSubmitAnimated (Txt_Update_attendance,
|
||||
The_ClassFormInBoxBold[Gbl.Prefs.Theme],
|
||||
NULL);
|
||||
Ico_PutCalculateIconWithText (Txt_Update_attendance);
|
||||
Tbl_EndCell ();
|
||||
|
||||
Tbl_EndRow ();
|
||||
}
|
||||
|
||||
|
@ -3258,27 +3280,30 @@ static void Att_ListUsrsAttendanceTable (Att_TypeOfView_t TypeOfView,
|
|||
if (NumUsrsInList > 1)
|
||||
{
|
||||
Tbl_StartRow ();
|
||||
fprintf (Gbl.F.Out,"<td colspan=\"%u\" class=\"DAT_N_LINE_TOP RIGHT_MIDDLE\">"
|
||||
"%s:",
|
||||
|
||||
fprintf (Gbl.F.Out,"<td colspan=\"%u\" class=\"DAT_N_LINE_TOP RIGHT_MIDDLE\">",
|
||||
Gbl.Usrs.Listing.WithPhotos ? 4 :
|
||||
3,
|
||||
Txt_Number_of_users);
|
||||
3);
|
||||
fprintf (Gbl.F.Out,"%s:",Txt_Number_of_users);
|
||||
Tbl_EndCell ();
|
||||
|
||||
for (NumAttEvent = 0, Total = 0;
|
||||
NumAttEvent < Gbl.AttEvents.Num;
|
||||
NumAttEvent++)
|
||||
if (Gbl.AttEvents.Lst[NumAttEvent].Selected)
|
||||
{
|
||||
fprintf (Gbl.F.Out,"<td class=\"DAT_N_LINE_TOP RIGHT_MIDDLE\">"
|
||||
"%u",
|
||||
fprintf (Gbl.F.Out,"<td class=\"DAT_N_LINE_TOP RIGHT_MIDDLE\">");
|
||||
fprintf (Gbl.F.Out,"%u",
|
||||
Gbl.AttEvents.Lst[NumAttEvent].NumStdsFromList);
|
||||
Tbl_EndCell ();
|
||||
|
||||
Total += Gbl.AttEvents.Lst[NumAttEvent].NumStdsFromList;
|
||||
}
|
||||
fprintf (Gbl.F.Out,"<td class=\"DAT_N_LINE_TOP RIGHT_MIDDLE\">"
|
||||
"%u",
|
||||
Total);
|
||||
|
||||
fprintf (Gbl.F.Out,"<td class=\"DAT_N_LINE_TOP RIGHT_MIDDLE\">");
|
||||
fprintf (Gbl.F.Out,"%u",Total);
|
||||
Tbl_EndCell ();
|
||||
|
||||
Tbl_EndRow ();
|
||||
}
|
||||
|
||||
|
@ -3357,12 +3382,12 @@ static void Att_WriteRowUsrSeveralAttEvents (unsigned NumUsr,struct UsrData *Usr
|
|||
|
||||
/***** Write number of user in the list *****/
|
||||
Tbl_StartRow ();
|
||||
fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_MIDDLE COLOR%u\">"
|
||||
"%u",
|
||||
|
||||
fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_MIDDLE COLOR%u\">",
|
||||
UsrDat->Accepted ? "DAT_N" :
|
||||
"DAT",
|
||||
Gbl.RowEvenOdd,
|
||||
NumUsr + 1);
|
||||
Gbl.RowEvenOdd);
|
||||
fprintf (Gbl.F.Out,"%u",NumUsr + 1);
|
||||
Tbl_EndCell ();
|
||||
|
||||
/***** Show user's photo *****/
|
||||
|
@ -3387,12 +3412,11 @@ static void Att_WriteRowUsrSeveralAttEvents (unsigned NumUsr,struct UsrData *Usr
|
|||
Tbl_EndCell ();
|
||||
|
||||
/***** Write user's name *****/
|
||||
fprintf (Gbl.F.Out,"<td class=\"%s LEFT_MIDDLE COLOR%u\">"
|
||||
"%s",
|
||||
fprintf (Gbl.F.Out,"<td class=\"%s LEFT_MIDDLE COLOR%u\">",
|
||||
UsrDat->Accepted ? "DAT_SMALL_N" :
|
||||
"DAT_SMALL",
|
||||
Gbl.RowEvenOdd,
|
||||
UsrDat->Surname1);
|
||||
Gbl.RowEvenOdd);
|
||||
fprintf (Gbl.F.Out,"%s",UsrDat->Surname1);
|
||||
if (UsrDat->Surname2[0])
|
||||
fprintf (Gbl.F.Out," %s",UsrDat->Surname2);
|
||||
fprintf (Gbl.F.Out,", %s",
|
||||
|
@ -3411,8 +3435,7 @@ static void Att_WriteRowUsrSeveralAttEvents (unsigned NumUsr,struct UsrData *Usr
|
|||
UsrDat->UsrCod);
|
||||
|
||||
/* Write check or cross */
|
||||
fprintf (Gbl.F.Out,"<td class=\"BM%u\">",
|
||||
Gbl.RowEvenOdd);
|
||||
fprintf (Gbl.F.Out,"<td class=\"BM%u\">",Gbl.RowEvenOdd);
|
||||
Att_PutCheckOrCross (Present);
|
||||
Tbl_EndCell ();
|
||||
|
||||
|
@ -3421,11 +3444,11 @@ static void Att_WriteRowUsrSeveralAttEvents (unsigned NumUsr,struct UsrData *Usr
|
|||
}
|
||||
|
||||
/***** Last column with the number of times this user is present *****/
|
||||
fprintf (Gbl.F.Out,"<td class=\"DAT_N RIGHT_MIDDLE COLOR%u\">"
|
||||
"%u",
|
||||
Gbl.RowEvenOdd,
|
||||
NumTimesPresent);
|
||||
fprintf (Gbl.F.Out,"<td class=\"DAT_N RIGHT_MIDDLE COLOR%u\">",
|
||||
Gbl.RowEvenOdd);
|
||||
fprintf (Gbl.F.Out,"%u",NumTimesPresent);
|
||||
Tbl_EndCell ();
|
||||
|
||||
Tbl_EndRow ();
|
||||
|
||||
Gbl.RowEvenOdd = 1 - Gbl.RowEvenOdd;
|
||||
|
@ -3521,12 +3544,12 @@ static void Att_ListAttEventsForAStd (unsigned NumUsr,struct UsrData *UsrDat)
|
|||
/***** Write number of student in the list *****/
|
||||
NumUsr++;
|
||||
Tbl_StartRow ();
|
||||
fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_MIDDLE COLOR%u\">"
|
||||
"%u:",
|
||||
|
||||
fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_MIDDLE COLOR%u\">",
|
||||
UsrDat->Accepted ? "DAT_N" :
|
||||
"DAT",
|
||||
Gbl.RowEvenOdd,
|
||||
NumUsr);
|
||||
Gbl.RowEvenOdd);
|
||||
fprintf (Gbl.F.Out,"%u:",NumUsr);
|
||||
Tbl_EndCell ();
|
||||
|
||||
/***** Show student's photo *****/
|
||||
|
@ -3543,6 +3566,7 @@ static void Att_ListAttEventsForAStd (unsigned NumUsr,struct UsrData *UsrDat)
|
|||
Gbl.RowEvenOdd);
|
||||
Tbl_StartTable ();
|
||||
Tbl_StartRow ();
|
||||
|
||||
fprintf (Gbl.F.Out,"<td class=\"%s LEFT_MIDDLE\">",
|
||||
UsrDat->Accepted ? "DAT_N" :
|
||||
"DAT");
|
||||
|
@ -3550,15 +3574,15 @@ static void Att_ListAttEventsForAStd (unsigned NumUsr,struct UsrData *UsrDat)
|
|||
Tbl_EndCell ();
|
||||
|
||||
/***** Write student's name *****/
|
||||
fprintf (Gbl.F.Out,"<td class=\"%s LEFT_MIDDLE\">%s",
|
||||
fprintf (Gbl.F.Out,"<td class=\"%s LEFT_MIDDLE\">",
|
||||
UsrDat->Accepted ? "DAT_SMALL_N" :
|
||||
"DAT_SMALL",
|
||||
UsrDat->Surname1);
|
||||
"DAT_SMALL");
|
||||
fprintf (Gbl.F.Out,"%s",UsrDat->Surname1);
|
||||
if (UsrDat->Surname2[0])
|
||||
fprintf (Gbl.F.Out," %s",UsrDat->Surname2);
|
||||
fprintf (Gbl.F.Out,", %s",
|
||||
UsrDat->FirstName);
|
||||
fprintf (Gbl.F.Out,", %s",UsrDat->FirstName);
|
||||
Tbl_EndCell ();
|
||||
|
||||
Tbl_EndRow ();
|
||||
Tbl_EndTable ();
|
||||
Tbl_EndCell ();
|
||||
|
@ -3586,12 +3610,11 @@ static void Att_ListAttEventsForAStd (unsigned NumUsr,struct UsrData *UsrDat)
|
|||
|
||||
Tbl_PutEmptyColouredCells (1);
|
||||
|
||||
fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_TOP COLOR%u\">"
|
||||
"%u:",
|
||||
fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_TOP COLOR%u\">",
|
||||
Present ? "DAT_GREEN" :
|
||||
"DAT_RED",
|
||||
Gbl.RowEvenOdd,
|
||||
NumAttEvent + 1);
|
||||
Gbl.RowEvenOdd);
|
||||
fprintf (Gbl.F.Out,"%u:",NumAttEvent + 1);
|
||||
Tbl_EndCell ();
|
||||
|
||||
fprintf (Gbl.F.Out,"<td class=\"BT%u\">",
|
||||
|
@ -3599,14 +3622,14 @@ static void Att_ListAttEventsForAStd (unsigned NumUsr,struct UsrData *UsrDat)
|
|||
Att_PutCheckOrCross (Present);
|
||||
Tbl_EndCell ();
|
||||
|
||||
fprintf (Gbl.F.Out,"<td class=\"DAT LEFT_TOP COLOR%u\">"
|
||||
"<span id=\"att_date_start_%u_%u\"></span>"
|
||||
fprintf (Gbl.F.Out,"<td class=\"DAT LEFT_TOP COLOR%u\">",
|
||||
Gbl.RowEvenOdd);
|
||||
fprintf (Gbl.F.Out,"<span id=\"att_date_start_%u_%u\"></span>"
|
||||
"<br />%s"
|
||||
"<script type=\"text/javascript\">"
|
||||
"writeLocalDateHMSFromUTC('att_date_start_%u_%u',%ld,"
|
||||
"%u,', ','%s',true,true,0x7);"
|
||||
"</script>",
|
||||
Gbl.RowEvenOdd,
|
||||
NumUsr,UniqueId,
|
||||
Gbl.AttEvents.Lst[NumAttEvent].Title,
|
||||
NumUsr,UniqueId,
|
||||
|
@ -3627,9 +3650,9 @@ static void Att_ListAttEventsForAStd (unsigned NumUsr,struct UsrData *UsrDat)
|
|||
Gbl.RowEvenOdd);
|
||||
Tbl_EndCell ();
|
||||
|
||||
fprintf (Gbl.F.Out,"<td class=\"DAT LEFT_MIDDLE COLOR%u\">"
|
||||
"<dl>",
|
||||
fprintf (Gbl.F.Out,"<td class=\"DAT LEFT_MIDDLE COLOR%u\">",
|
||||
Gbl.RowEvenOdd);
|
||||
fprintf (Gbl.F.Out,"<dl>");
|
||||
if (ShowCommentStd)
|
||||
{
|
||||
Str_ChangeFormat (Str_FROM_HTML,Str_TO_RIGOROUS_HTML,
|
||||
|
|
|
@ -487,7 +487,7 @@ enscript -2 --landscape --color --file-align=2 --highlight --line-numbers -o - *
|
|||
En OpenSWAD:
|
||||
ps2pdf source.ps destination.pdf
|
||||
*/
|
||||
#define Log_PLATFORM_VERSION "SWAD 19.31.17 (2019-10-07)"
|
||||
#define Log_PLATFORM_VERSION "SWAD 19.31.18 (2019-10-07)"
|
||||
#define CSS_FILE "swad19.29.css"
|
||||
#define JS_FILE "swad19.30.js"
|
||||
/*
|
||||
|
@ -495,6 +495,7 @@ ps2pdf source.ps destination.pdf
|
|||
// TODO: Un TFG preasignado sin estudiante tiene que salir un triángulo amarillo
|
||||
// TODO: Hacer un nuevo rol en los TFG: tutor externo (profesor de áreas no vinculadas con el centro, profesionales de empresas, etc.)
|
||||
|
||||
Version 19.31.18: Oct 07, 2019 Code refactoring in HTML tables. (247239 lines)
|
||||
Version 19.31.17: Oct 07, 2019 Code refactoring in HTML tables. (247221 lines)
|
||||
Version 19.31.16: Oct 07, 2019 Code refactoring in HTML tables. (247185 lines)
|
||||
Version 19.31.15: Oct 07, 2019 Code refactoring in HTML tables. (247153 lines)
|
||||
|
|
38
swad_table.c
38
swad_table.c
|
@ -213,6 +213,44 @@ void Tbl_EndRow (void)
|
|||
/********************************* Table cells *******************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Tbl_StartCellAttr (const char *fmt,...)
|
||||
{
|
||||
va_list ap;
|
||||
int NumBytesPrinted;
|
||||
char *Attr;
|
||||
|
||||
if (fmt)
|
||||
{
|
||||
if (fmt[0])
|
||||
{
|
||||
va_start (ap,fmt);
|
||||
NumBytesPrinted = vasprintf (&Attr,fmt,ap);
|
||||
va_end (ap);
|
||||
|
||||
if (NumBytesPrinted < 0) // If memory allocation wasn't possible,
|
||||
// or some other error occurs,
|
||||
// vasprintf will return -1
|
||||
Lay_NotEnoughMemoryExit ();
|
||||
|
||||
/***** Print HTML *****/
|
||||
fprintf (Gbl.F.Out,
|
||||
"<tr %s>",Attr);
|
||||
|
||||
free ((void *) Attr);
|
||||
}
|
||||
else
|
||||
Tbl_StartCell ();
|
||||
}
|
||||
else
|
||||
Tbl_StartCell ();
|
||||
}
|
||||
|
||||
void Tbl_StartCell (void)
|
||||
{
|
||||
fprintf (Gbl.F.Out,
|
||||
"<td>");
|
||||
}
|
||||
|
||||
void Tbl_EndCell (void)
|
||||
{
|
||||
fprintf (Gbl.F.Out,
|
||||
|
|
|
@ -54,6 +54,8 @@ void Tbl_StartRowAttr (const char *fmt,...);
|
|||
void Tbl_StartRow (void);
|
||||
void Tbl_EndRow (void);
|
||||
|
||||
void Tbl_StartCellAttr (const char *fmt,...);
|
||||
void Tbl_StartCell (void);
|
||||
void Tbl_EndCell (void);
|
||||
void Tbl_PutEmptyCells (unsigned NumColumns);
|
||||
void Tbl_PutEmptyColouredCells (unsigned NumColumns);
|
||||
|
|
Loading…
Reference in New Issue