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 *****/
|
/***** Write number of user in the list *****/
|
||||||
Tbl_StartRow ();
|
Tbl_StartRow ();
|
||||||
fprintf (Gbl.F.Out,"<td rowspan=\"2\""
|
|
||||||
" class=\"USR_LIST_NUM_N RIGHT_TOP COLOR%u\">"
|
Tbl_StartCellAttr ("rowspan=\"2\" class=\"USR_LIST_NUM_N RIGHT_TOP COLOR%u\"",
|
||||||
"%u",
|
Gbl.RowEvenOdd);
|
||||||
Gbl.RowEvenOdd,NumUsr);
|
fprintf (Gbl.F.Out,"%u",NumUsr);
|
||||||
Tbl_EndCell ();
|
Tbl_EndCell ();
|
||||||
|
|
||||||
/***** Write user's ID and name *****/
|
/***** Write user's ID and name *****/
|
||||||
fprintf (Gbl.F.Out,"<td class=\"DAT_N LEFT_TOP COLOR%u\">"
|
Tbl_StartCellAttr ("class=\"DAT_N LEFT_TOP COLOR%u\"",Gbl.RowEvenOdd);
|
||||||
"%s: %s<br />"
|
fprintf (Gbl.F.Out,"%s: %s<br />"
|
||||||
"%s: ",
|
"%s: ",
|
||||||
Gbl.RowEvenOdd,
|
|
||||||
Txt_ID,ID,
|
Txt_ID,ID,
|
||||||
Txt_Name);
|
Txt_Name);
|
||||||
if (UsrDat->FullName[0])
|
if (UsrDat->FullName[0])
|
||||||
|
@ -299,24 +298,24 @@ static void Acc_WriteRowEmptyAccount (unsigned NumUsr,const char *ID,struct UsrD
|
||||||
Tbl_EndCell ();
|
Tbl_EndCell ();
|
||||||
|
|
||||||
/***** Button to login with this account *****/
|
/***** Button to login with this account *****/
|
||||||
fprintf (Gbl.F.Out,"<td class=\"RIGHT_TOP COLOR%u\">",
|
Tbl_StartCellAttr ("class=\"RIGHT_TOP COLOR%u\"",Gbl.RowEvenOdd);
|
||||||
Gbl.RowEvenOdd);
|
|
||||||
Frm_StartForm (ActLogInNew);
|
Frm_StartForm (ActLogInNew);
|
||||||
Usr_PutParamUsrCodEncrypted (UsrDat->EncryptedUsrCod);
|
Usr_PutParamUsrCodEncrypted (UsrDat->EncryptedUsrCod);
|
||||||
Btn_PutCreateButtonInline (Txt_Its_me);
|
Btn_PutCreateButtonInline (Txt_Its_me);
|
||||||
Frm_EndForm ();
|
Frm_EndForm ();
|
||||||
Tbl_EndCell ();
|
Tbl_EndCell ();
|
||||||
|
|
||||||
Tbl_EndRow ();
|
Tbl_EndRow ();
|
||||||
|
Tbl_StartRow ();
|
||||||
|
|
||||||
/***** Courses of this user *****/
|
/***** Courses of this user *****/
|
||||||
Tbl_StartRow ();
|
Tbl_StartCellAttr ("colspan=\"2\" class=\"LEFT_TOP COLOR%u\"",Gbl.RowEvenOdd);
|
||||||
fprintf (Gbl.F.Out,"<td colspan=\"2\" class=\"LEFT_TOP COLOR%u\">",
|
|
||||||
Gbl.RowEvenOdd);
|
|
||||||
UsrDat->Sex = Usr_SEX_UNKNOWN;
|
UsrDat->Sex = Usr_SEX_UNKNOWN;
|
||||||
Crs_GetAndWriteCrssOfAUsr (UsrDat,Rol_TCH);
|
Crs_GetAndWriteCrssOfAUsr (UsrDat,Rol_TCH);
|
||||||
Crs_GetAndWriteCrssOfAUsr (UsrDat,Rol_NET);
|
Crs_GetAndWriteCrssOfAUsr (UsrDat,Rol_NET);
|
||||||
Crs_GetAndWriteCrssOfAUsr (UsrDat,Rol_STD);
|
Crs_GetAndWriteCrssOfAUsr (UsrDat,Rol_STD);
|
||||||
Tbl_EndCell ();
|
Tbl_EndCell ();
|
||||||
|
|
||||||
Tbl_EndRow ();
|
Tbl_EndRow ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -368,13 +367,15 @@ static void Acc_ShowFormRequestNewAccountWithParams (const char *NewNicknameWith
|
||||||
else
|
else
|
||||||
NewNicknameWithArroba[0] = '\0';
|
NewNicknameWithArroba[0] = '\0';
|
||||||
Tbl_StartRow ();
|
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],
|
The_ClassFormInBox[Gbl.Prefs.Theme],
|
||||||
Txt_Nickname);
|
Txt_Nickname);
|
||||||
Tbl_EndCell ();
|
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\""
|
" size=\"18\" maxlength=\"%u\""
|
||||||
" placeholder=\"%s\" value=\"%s\""
|
" placeholder=\"%s\" value=\"%s\""
|
||||||
" required=\"required\" />",
|
" required=\"required\" />",
|
||||||
|
@ -382,17 +383,20 @@ static void Acc_ShowFormRequestNewAccountWithParams (const char *NewNicknameWith
|
||||||
Txt_HELP_nickname,
|
Txt_HELP_nickname,
|
||||||
NewNicknameWithArroba);
|
NewNicknameWithArroba);
|
||||||
Tbl_EndCell ();
|
Tbl_EndCell ();
|
||||||
|
|
||||||
Tbl_EndRow ();
|
Tbl_EndRow ();
|
||||||
|
|
||||||
/***** Email *****/
|
/***** Email *****/
|
||||||
Tbl_StartRow ();
|
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],
|
The_ClassFormInBox[Gbl.Prefs.Theme],
|
||||||
Txt_Email);
|
Txt_Email);
|
||||||
Tbl_EndCell ();
|
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\""
|
" size=\"18\" maxlength=\"%u\""
|
||||||
" placeholder=\"%s\" value=\"%s\""
|
" placeholder=\"%s\" value=\"%s\""
|
||||||
" required=\"required\" />",
|
" required=\"required\" />",
|
||||||
|
@ -400,6 +404,7 @@ static void Acc_ShowFormRequestNewAccountWithParams (const char *NewNicknameWith
|
||||||
Txt_HELP_email,
|
Txt_HELP_email,
|
||||||
NewEmail);
|
NewEmail);
|
||||||
Tbl_EndCell ();
|
Tbl_EndCell ();
|
||||||
|
|
||||||
Tbl_EndRow ();
|
Tbl_EndRow ();
|
||||||
|
|
||||||
/***** Password *****/
|
/***** Password *****/
|
||||||
|
|
|
@ -748,36 +748,34 @@ static void Agd_ShowOneEvent (Agd_AgendaType_t AgendaType,long AgdCod)
|
||||||
StartEndTime <= (Dat_StartEndTime_t) (Dat_NUM_START_END_TIME - 1);
|
StartEndTime <= (Dat_StartEndTime_t) (Dat_NUM_START_END_TIME - 1);
|
||||||
StartEndTime++)
|
StartEndTime++)
|
||||||
{
|
{
|
||||||
fprintf (Gbl.F.Out,"<td id=\"agd_date_%u_%u\""
|
Tbl_StartCellAttr ("id=\"agd_date_%u_%u\" class=\"%s LEFT_BOTTOM COLOR%u\"",
|
||||||
" class=\"%s LEFT_BOTTOM COLOR%u\">"
|
(unsigned) StartEndTime,UniqueId,
|
||||||
"<script type=\"text/javascript\">"
|
AgdEvent.Hidden ? Dat_TimeStatusClassHidden[AgdEvent.TimeStatus] :
|
||||||
|
Dat_TimeStatusClassVisible[AgdEvent.TimeStatus],
|
||||||
|
Gbl.RowEvenOdd);
|
||||||
|
fprintf (Gbl.F.Out,"<script type=\"text/javascript\">"
|
||||||
"writeLocalDateHMSFromUTC('agd_date_%u_%u',%ld,"
|
"writeLocalDateHMSFromUTC('agd_date_%u_%u',%ld,"
|
||||||
"%u,'<br />','%s',true,true,0x6);"
|
"%u,'<br />','%s',true,true,0x6);"
|
||||||
"</script>",
|
"</script>",
|
||||||
(unsigned) StartEndTime,UniqueId,
|
(unsigned) StartEndTime,UniqueId,
|
||||||
AgdEvent.Hidden ? Dat_TimeStatusClassHidden[AgdEvent.TimeStatus] :
|
|
||||||
Dat_TimeStatusClassVisible[AgdEvent.TimeStatus],
|
|
||||||
Gbl.RowEvenOdd,
|
|
||||||
(unsigned) StartEndTime,UniqueId,
|
|
||||||
AgdEvent.TimeUTC[StartEndTime],
|
AgdEvent.TimeUTC[StartEndTime],
|
||||||
(unsigned) Gbl.Prefs.DateFormat,Txt_Today);
|
(unsigned) Gbl.Prefs.DateFormat,Txt_Today);
|
||||||
Tbl_EndCell ();
|
Tbl_EndCell ();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Event */
|
/* 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" :
|
AgdEvent.Hidden ? "ASG_TITLE_LIGHT" :
|
||||||
"ASG_TITLE",
|
"ASG_TITLE",
|
||||||
Gbl.RowEvenOdd);
|
Gbl.RowEvenOdd);
|
||||||
Lay_StartArticle (Anchor);
|
Lay_StartArticle (Anchor);
|
||||||
fprintf (Gbl.F.Out,"%s",AgdEvent.Event);
|
fprintf (Gbl.F.Out,"%s",AgdEvent.Event);
|
||||||
Lay_EndArticle ();
|
Lay_EndArticle ();
|
||||||
Tbl_EndCell ();
|
Tbl_EndCell ();
|
||||||
|
|
||||||
/* Location */
|
/* Location */
|
||||||
fprintf (Gbl.F.Out,"<td class=\"LEFT_TOP COLOR%u\">"
|
Tbl_StartCellAttr ("class=\"LEFT_TOP COLOR%u\"",Gbl.RowEvenOdd);
|
||||||
"<div class=\"%s\">%s</div>",
|
fprintf (Gbl.F.Out,"<div class=\"%s\">%s</div>",
|
||||||
Gbl.RowEvenOdd,
|
|
||||||
AgdEvent.Hidden ? "ASG_TITLE_LIGHT" :
|
AgdEvent.Hidden ? "ASG_TITLE_LIGHT" :
|
||||||
"ASG_TITLE",
|
"ASG_TITLE",
|
||||||
AgdEvent.Location);
|
AgdEvent.Location);
|
||||||
|
@ -787,20 +785,18 @@ static void Agd_ShowOneEvent (Agd_AgendaType_t AgendaType,long AgdCod)
|
||||||
|
|
||||||
/***** Write second row of data of this event *****/
|
/***** Write second row of data of this event *****/
|
||||||
Tbl_StartRow ();
|
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)
|
switch (AgendaType)
|
||||||
{
|
{
|
||||||
case Agd_MY_AGENDA_TODAY:
|
case Agd_MY_AGENDA_TODAY:
|
||||||
case Agd_MY_AGENDA:
|
case Agd_MY_AGENDA:
|
||||||
|
/* Forms to remove/edit this event */
|
||||||
Agd_PutFormsToRemEditOneEvent (&AgdEvent,Anchor);
|
Agd_PutFormsToRemEditOneEvent (&AgdEvent,Anchor);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
Tbl_EndCell ();
|
Tbl_EndCell ();
|
||||||
|
|
||||||
/* Text of the event */
|
/* 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,
|
Str_ChangeFormat (Str_FROM_HTML,Str_TO_RIGOROUS_HTML,
|
||||||
Txt,Cns_MAX_BYTES_TEXT,false); // Convert from HTML to recpectful HTML
|
Txt,Cns_MAX_BYTES_TEXT,false); // Convert from HTML to recpectful HTML
|
||||||
Str_InsertLinks (Txt,Cns_MAX_BYTES_TEXT,60); // Insert links
|
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>",
|
Tbl_StartCellAttr ("colspan=\"2\" class=\"LEFT_TOP COLOR%u\"",Gbl.RowEvenOdd);
|
||||||
Gbl.RowEvenOdd,
|
fprintf (Gbl.F.Out,"<div class=\"PAR %s\">%s</div>",
|
||||||
AgdEvent.Hidden ? "DAT_LIGHT" :
|
AgdEvent.Hidden ? "DAT_LIGHT" :
|
||||||
"DAT",
|
"DAT",
|
||||||
Txt);
|
Txt);
|
||||||
Tbl_EndCell ();
|
Tbl_EndCell ();
|
||||||
|
|
||||||
Tbl_EndRow ();
|
Tbl_EndRow ();
|
||||||
|
|
||||||
/***** Free anchor string *****/
|
/***** Free anchor string *****/
|
||||||
|
@ -1503,32 +1500,38 @@ void Agd_RequestCreatOrEditEvent (void)
|
||||||
|
|
||||||
/***** Event *****/
|
/***** Event *****/
|
||||||
Tbl_StartRow ();
|
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],
|
The_ClassFormInBox[Gbl.Prefs.Theme],
|
||||||
Txt_Event);
|
Txt_Event);
|
||||||
Tbl_EndCell ();
|
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\""
|
" size=\"45\" maxlength=\"%u\" value=\"%s\""
|
||||||
" required=\"required\" />",
|
" required=\"required\" />",
|
||||||
Agd_MAX_CHARS_EVENT,AgdEvent.Event);
|
Agd_MAX_CHARS_EVENT,AgdEvent.Event);
|
||||||
Tbl_EndCell ();
|
Tbl_EndCell ();
|
||||||
|
|
||||||
Tbl_EndRow ();
|
Tbl_EndRow ();
|
||||||
|
|
||||||
/***** Location *****/
|
/***** Location *****/
|
||||||
Tbl_StartRow ();
|
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],
|
The_ClassFormInBox[Gbl.Prefs.Theme],
|
||||||
Txt_Location);
|
Txt_Location);
|
||||||
Tbl_EndCell ();
|
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\""
|
" size=\"45\" maxlength=\"%u\" value=\"%s\""
|
||||||
" required=\"required\" />",
|
" required=\"required\" />",
|
||||||
Agd_MAX_CHARS_LOCATION,AgdEvent.Location);
|
Agd_MAX_CHARS_LOCATION,AgdEvent.Location);
|
||||||
Tbl_EndCell ();
|
Tbl_EndCell ();
|
||||||
|
|
||||||
Tbl_EndRow ();
|
Tbl_EndRow ();
|
||||||
|
|
||||||
/***** Start and end dates *****/
|
/***** Start and end dates *****/
|
||||||
|
@ -1537,18 +1540,21 @@ void Agd_RequestCreatOrEditEvent (void)
|
||||||
|
|
||||||
/***** Text *****/
|
/***** Text *****/
|
||||||
Tbl_StartRow ();
|
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],
|
The_ClassFormInBox[Gbl.Prefs.Theme],
|
||||||
Txt_Description);
|
Txt_Description);
|
||||||
Tbl_EndCell ();
|
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\">");
|
" cols=\"60\" rows=\"10\">");
|
||||||
if (!ItsANewEvent)
|
if (!ItsANewEvent)
|
||||||
fprintf (Gbl.F.Out,"%s",Txt);
|
fprintf (Gbl.F.Out,"%s",Txt);
|
||||||
fprintf (Gbl.F.Out,"</textarea>");
|
fprintf (Gbl.F.Out,"</textarea>");
|
||||||
Tbl_EndCell ();
|
Tbl_EndCell ();
|
||||||
|
|
||||||
Tbl_EndRow ();
|
Tbl_EndRow ();
|
||||||
|
|
||||||
/***** End table, send button and end box *****/
|
/***** End table, send button and end box *****/
|
||||||
|
|
|
@ -414,12 +414,12 @@ void Ann_ShowFormAnnouncement (void)
|
||||||
|
|
||||||
/***** Users' roles who can view the announcement *****/
|
/***** Users' roles who can view the announcement *****/
|
||||||
Tbl_StartRow ();
|
Tbl_StartRow ();
|
||||||
fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_TOP\">"
|
|
||||||
"%s: ",
|
Tbl_StartCellAttr ("class=\"%s RIGHT_TOP\"",The_ClassFormInBox[Gbl.Prefs.Theme]);
|
||||||
The_ClassFormInBox[Gbl.Prefs.Theme],
|
fprintf (Gbl.F.Out,"%s: ",Txt_Users);
|
||||||
Txt_Users);
|
|
||||||
Tbl_EndCell ();
|
Tbl_EndCell ();
|
||||||
fprintf (Gbl.F.Out,"<td class=\"DAT LEFT_TOP\">");
|
|
||||||
|
Tbl_StartCellAttr ("class=\"DAT LEFT_TOP\"");
|
||||||
Rol_WriteSelectorRoles (1 << Rol_UNK |
|
Rol_WriteSelectorRoles (1 << Rol_UNK |
|
||||||
1 << Rol_GST |
|
1 << Rol_GST |
|
||||||
1 << Rol_STD |
|
1 << Rol_STD |
|
||||||
|
@ -432,6 +432,7 @@ void Ann_ShowFormAnnouncement (void)
|
||||||
1 << Rol_TCH,
|
1 << Rol_TCH,
|
||||||
false,false);
|
false,false);
|
||||||
Tbl_EndCell ();
|
Tbl_EndCell ();
|
||||||
|
|
||||||
Tbl_EndRow ();
|
Tbl_EndRow ();
|
||||||
|
|
||||||
/***** End table, send button and end box *****/
|
/***** 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];
|
extern const char *The_ClassFormInBox[The_NUM_THEMES];
|
||||||
|
|
||||||
Tbl_StartRow ();
|
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);
|
Field,The_ClassFormInBox[Gbl.Prefs.Theme],Label);
|
||||||
Tbl_EndCell ();
|
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\">"
|
" cols=\"75\" rows=\"%u\">"
|
||||||
"</textarea>",
|
"</textarea>",
|
||||||
Field,Field,Rows);
|
Field,Field,Rows);
|
||||||
Tbl_EndCell ();
|
Tbl_EndCell ();
|
||||||
|
|
||||||
Tbl_EndRow ();
|
Tbl_EndRow ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -358,12 +358,12 @@ static void Asg_ShowOneAssignment (long AsgCod,bool PrintView)
|
||||||
/***** 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 */
|
||||||
Tbl_StartRow ();
|
Tbl_StartRow ();
|
||||||
fprintf (Gbl.F.Out,"<td rowspan=\"2\" class=\"CONTEXT_COL");
|
|
||||||
if (PrintView)
|
if (PrintView)
|
||||||
fprintf (Gbl.F.Out,"\">");
|
Tbl_StartCellAttr ("rowspan=\"2\" class=\"CONTEXT_COL\"");
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
fprintf (Gbl.F.Out," COLOR%u\">",Gbl.RowEvenOdd);
|
Tbl_StartCellAttr ("rowspan=\"2\" class=\"CONTEXT_COL COLOR%u\"",Gbl.RowEvenOdd);
|
||||||
Asg_PutFormsToRemEditOneAsg (&Asg,Anchor);
|
Asg_PutFormsToRemEditOneAsg (&Asg,Anchor);
|
||||||
}
|
}
|
||||||
Tbl_EndCell ();
|
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 <= (Dat_StartEndTime_t) (Dat_NUM_START_END_TIME - 1);
|
||||||
StartEndTime++)
|
StartEndTime++)
|
||||||
{
|
{
|
||||||
fprintf (Gbl.F.Out,"<td id=\"asg_date_%u_%u\" class=\"%s LEFT_BOTTOM",
|
if (PrintView)
|
||||||
(unsigned) StartEndTime,UniqueId,
|
Tbl_StartCellAttr ("id=\"asg_date_%u_%u\" class=\"%s LEFT_BOTTOM\"",
|
||||||
Asg.Hidden ? (Asg.Open ? "DATE_GREEN_LIGHT" :
|
(unsigned) StartEndTime,UniqueId,
|
||||||
"DATE_RED_LIGHT") :
|
Asg.Hidden ? (Asg.Open ? "DATE_GREEN_LIGHT" :
|
||||||
(Asg.Open ? "DATE_GREEN" :
|
"DATE_RED_LIGHT") :
|
||||||
"DATE_RED"));
|
(Asg.Open ? "DATE_GREEN" :
|
||||||
if (!PrintView)
|
"DATE_RED"));
|
||||||
fprintf (Gbl.F.Out," COLOR%u",Gbl.RowEvenOdd);
|
else
|
||||||
fprintf (Gbl.F.Out,"\">"
|
Tbl_StartCellAttr ("id=\"asg_date_%u_%u\" class=\"%s LEFT_BOTTOM COLOR%u\"",
|
||||||
"<script type=\"text/javascript\">"
|
(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,"
|
"writeLocalDateHMSFromUTC('asg_date_%u_%u',%ld,"
|
||||||
"%u,'<br />','%s',true,true,0x7);"
|
"%u,'<br />','%s',true,true,0x7);"
|
||||||
"</script>",
|
"</script>",
|
||||||
|
@ -394,37 +400,40 @@ static void Asg_ShowOneAssignment (long AsgCod,bool PrintView)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Assignment title */
|
/* Assignment title */
|
||||||
fprintf (Gbl.F.Out,"<td class=\"%s LEFT_TOP",
|
if (PrintView)
|
||||||
Asg.Hidden ? "ASG_TITLE_LIGHT" :
|
Tbl_StartCellAttr ("class=\"%s LEFT_TOP\"",
|
||||||
"ASG_TITLE");
|
Asg.Hidden ? "ASG_TITLE_LIGHT" :
|
||||||
if (!PrintView)
|
"ASG_TITLE");
|
||||||
fprintf (Gbl.F.Out," COLOR%u",Gbl.RowEvenOdd);
|
else
|
||||||
fprintf (Gbl.F.Out,"\">");
|
Tbl_StartCellAttr ("class=\"%s LEFT_TOP COLOR%u\"",
|
||||||
|
Asg.Hidden ? "ASG_TITLE_LIGHT" :
|
||||||
|
"ASG_TITLE",
|
||||||
|
Gbl.RowEvenOdd);
|
||||||
Lay_StartArticle (Anchor);
|
Lay_StartArticle (Anchor);
|
||||||
fprintf (Gbl.F.Out,"%s",Asg.Title);
|
fprintf (Gbl.F.Out,"%s",Asg.Title);
|
||||||
Lay_EndArticle ();
|
Lay_EndArticle ();
|
||||||
Tbl_EndCell ();
|
Tbl_EndCell ();
|
||||||
|
|
||||||
/* Assignment folder */
|
/* Assignment folder */
|
||||||
fprintf (Gbl.F.Out,"<td class=\"DAT LEFT_TOP");
|
Tbl_StartCellAttr ("class=\"DAT LEFT_TOP");
|
||||||
if (!PrintView)
|
if (!PrintView)
|
||||||
fprintf (Gbl.F.Out," COLOR%u",Gbl.RowEvenOdd);
|
fprintf (Gbl.F.Out," COLOR%u",Gbl.RowEvenOdd);
|
||||||
fprintf (Gbl.F.Out,"\">");
|
fprintf (Gbl.F.Out,"\">");
|
||||||
if (Asg.SendWork == Asg_SEND_WORK)
|
if (Asg.SendWork == Asg_SEND_WORK)
|
||||||
Asg_WriteAssignmentFolder (&Asg,PrintView);
|
Asg_WriteAssignmentFolder (&Asg,PrintView);
|
||||||
Tbl_EndCell ();
|
Tbl_EndCell ();
|
||||||
|
|
||||||
Tbl_EndRow ();
|
Tbl_EndRow ();
|
||||||
|
|
||||||
/***** Write second row of data of this assignment *****/
|
/***** Write second row of data of this assignment *****/
|
||||||
Tbl_StartRow ();
|
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 */
|
/* 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);
|
Asg_WriteAsgAuthor (&Asg);
|
||||||
|
|
||||||
Tbl_EndCell ();
|
Tbl_EndCell ();
|
||||||
|
|
||||||
/* Text of the assignment */
|
/* 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,
|
Str_ChangeFormat (Str_FROM_HTML,Str_TO_RIGOROUS_HTML,
|
||||||
Txt,Cns_MAX_BYTES_TEXT,false); // Convert from HTML to recpectful HTML
|
Txt,Cns_MAX_BYTES_TEXT,false); // Convert from HTML to recpectful HTML
|
||||||
Str_InsertLinks (Txt,Cns_MAX_BYTES_TEXT,60); // Insert links
|
Str_InsertLinks (Txt,Cns_MAX_BYTES_TEXT,60); // Insert links
|
||||||
fprintf (Gbl.F.Out,"<td colspan=\"2\" class=\"LEFT_TOP");
|
if (PrintView)
|
||||||
if (!PrintView)
|
Tbl_StartCellAttr ("colspan=\"2\" class=\"LEFT_TOP\"");
|
||||||
fprintf (Gbl.F.Out," COLOR%u",Gbl.RowEvenOdd);
|
else
|
||||||
fprintf (Gbl.F.Out,"\">");
|
Tbl_StartCellAttr ("colspan=\"2\" class=\"LEFT_TOP COLOR%u\"",Gbl.RowEvenOdd);
|
||||||
|
|
||||||
if (Gbl.Crs.Grps.NumGrps)
|
if (Gbl.Crs.Grps.NumGrps)
|
||||||
Asg_GetAndWriteNamesOfGrpsAssociatedToAsg (&Asg);
|
Asg_GetAndWriteNamesOfGrpsAssociatedToAsg (&Asg);
|
||||||
|
|
||||||
fprintf (Gbl.F.Out,"<div class=\"PAR %s\">%s</div>",
|
fprintf (Gbl.F.Out,"<div class=\"PAR %s\">%s</div>",
|
||||||
Asg.Hidden ? "DAT_LIGHT" :
|
Asg.Hidden ? "DAT_LIGHT" :
|
||||||
"DAT",
|
"DAT",
|
||||||
Txt);
|
Txt);
|
||||||
Tbl_EndCell ();
|
Tbl_EndCell ();
|
||||||
|
|
||||||
Tbl_EndRow ();
|
Tbl_EndRow ();
|
||||||
|
|
||||||
/***** Free anchor string *****/
|
/***** Free anchor string *****/
|
||||||
|
@ -1159,16 +1167,19 @@ void Asg_RequestCreatOrEditAsg (void)
|
||||||
|
|
||||||
/***** Assignment title *****/
|
/***** Assignment title *****/
|
||||||
Tbl_StartRow ();
|
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);
|
The_ClassFormInBox[Gbl.Prefs.Theme],Txt_Title);
|
||||||
Tbl_EndCell ();
|
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\""
|
" size=\"45\" maxlength=\"%u\" value=\"%s\""
|
||||||
" required=\"required\" />",
|
" required=\"required\" />",
|
||||||
Asg_MAX_CHARS_ASSIGNMENT_TITLE,Asg.Title);
|
Asg_MAX_CHARS_ASSIGNMENT_TITLE,Asg.Title);
|
||||||
Tbl_EndCell ();
|
Tbl_EndCell ();
|
||||||
|
|
||||||
Tbl_EndRow ();
|
Tbl_EndRow ();
|
||||||
|
|
||||||
/***** Assignment start and end dates *****/
|
/***** Assignment start and end dates *****/
|
||||||
|
@ -1176,34 +1187,38 @@ void Asg_RequestCreatOrEditAsg (void)
|
||||||
|
|
||||||
/***** Send work? *****/
|
/***** Send work? *****/
|
||||||
Tbl_StartRow ();
|
Tbl_StartRow ();
|
||||||
fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_MIDDLE\">"
|
|
||||||
"%s:",
|
Tbl_StartCellAttr ("class=\"%s RIGHT_MIDDLE\"",The_ClassFormInBox[Gbl.Prefs.Theme]);
|
||||||
The_ClassFormInBox[Gbl.Prefs.Theme],
|
fprintf (Gbl.F.Out,"%s:",Txt_Upload_files_QUESTION);
|
||||||
Txt_Upload_files_QUESTION);
|
|
||||||
Tbl_EndCell ();
|
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\""
|
"<input type=\"text\" name=\"Folder\""
|
||||||
" size=\"30\" maxlength=\"%u\" value=\"%s\" />"
|
" size=\"30\" maxlength=\"%u\" value=\"%s\" />"
|
||||||
"</label>",
|
"</label>",
|
||||||
Txt_Folder,
|
Txt_Folder,
|
||||||
Brw_MAX_CHARS_FOLDER,Asg.Folder);
|
Brw_MAX_CHARS_FOLDER,Asg.Folder);
|
||||||
Tbl_EndCell ();
|
Tbl_EndCell ();
|
||||||
|
|
||||||
Tbl_EndRow ();
|
Tbl_EndRow ();
|
||||||
|
|
||||||
/***** Assignment text *****/
|
/***** Assignment text *****/
|
||||||
Tbl_StartRow ();
|
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);
|
The_ClassFormInBox[Gbl.Prefs.Theme],Txt_Description);
|
||||||
Tbl_EndCell ();
|
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\">");
|
" cols=\"60\" rows=\"10\">");
|
||||||
if (!ItsANewAssignment)
|
if (!ItsANewAssignment)
|
||||||
fprintf (Gbl.F.Out,"%s",Txt);
|
fprintf (Gbl.F.Out,"%s",Txt);
|
||||||
fprintf (Gbl.F.Out,"</textarea>");
|
fprintf (Gbl.F.Out,"</textarea>");
|
||||||
Tbl_EndCell ();
|
Tbl_EndCell ();
|
||||||
|
|
||||||
Tbl_EndRow ();
|
Tbl_EndRow ();
|
||||||
|
|
||||||
/***** Groups *****/
|
/***** Groups *****/
|
||||||
|
@ -1241,19 +1256,20 @@ static void Asg_ShowLstGrpsToEditAssignment (long AsgCod)
|
||||||
{
|
{
|
||||||
/***** Start box and table *****/
|
/***** Start box and table *****/
|
||||||
Tbl_StartRow ();
|
Tbl_StartRow ();
|
||||||
fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_TOP\">"
|
|
||||||
"%s:",
|
Tbl_StartCellAttr ("class=\"%s RIGHT_TOP\"",The_ClassFormInBox[Gbl.Prefs.Theme]);
|
||||||
The_ClassFormInBox[Gbl.Prefs.Theme],
|
fprintf (Gbl.F.Out,"%s:",Txt_Groups);
|
||||||
Txt_Groups);
|
|
||||||
Tbl_EndCell ();
|
Tbl_EndCell ();
|
||||||
fprintf (Gbl.F.Out,"<td class=\"LEFT_TOP\">");
|
|
||||||
|
Tbl_StartCellAttr ("class=\"LEFT_TOP\"");
|
||||||
Box_StartBoxTable ("100%",NULL,NULL,
|
Box_StartBoxTable ("100%",NULL,NULL,
|
||||||
Hlp_USERS_Groups,Box_NOT_CLOSABLE,0);
|
Hlp_USERS_Groups,Box_NOT_CLOSABLE,0);
|
||||||
|
|
||||||
/***** First row: checkbox to select the whole course *****/
|
/***** First row: checkbox to select the whole course *****/
|
||||||
Tbl_StartRow ();
|
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\"");
|
"<input type=\"checkbox\" id=\"WholeCrs\" name=\"WholeCrs\" value=\"Y\"");
|
||||||
if (!Asg_CheckIfAsgIsAssociatedToGrps (AsgCod))
|
if (!Asg_CheckIfAsgIsAssociatedToGrps (AsgCod))
|
||||||
fprintf (Gbl.F.Out," checked=\"checked\"");
|
fprintf (Gbl.F.Out," checked=\"checked\"");
|
||||||
|
@ -1262,6 +1278,7 @@ static void Asg_ShowLstGrpsToEditAssignment (long AsgCod)
|
||||||
"</label>",
|
"</label>",
|
||||||
Txt_The_whole_course,Gbl.Hierarchy.Crs.ShrtName);
|
Txt_The_whole_course,Gbl.Hierarchy.Crs.ShrtName);
|
||||||
Tbl_EndCell ();
|
Tbl_EndCell ();
|
||||||
|
|
||||||
Tbl_EndRow ();
|
Tbl_EndRow ();
|
||||||
|
|
||||||
/***** List the groups for each group type *****/
|
/***** List the groups for each group type *****/
|
||||||
|
@ -1275,6 +1292,7 @@ static void Asg_ShowLstGrpsToEditAssignment (long AsgCod)
|
||||||
/***** End table and box *****/
|
/***** End table and box *****/
|
||||||
Box_EndBoxTable ();
|
Box_EndBoxTable ();
|
||||||
Tbl_EndCell ();
|
Tbl_EndCell ();
|
||||||
|
|
||||||
Tbl_EndRow ();
|
Tbl_EndRow ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -388,10 +388,11 @@ static void Att_ShowOneAttEvent (struct AttendanceEvent *Att,bool ShowOnlyThisAt
|
||||||
/***** Write first row of data of this attendance event *****/
|
/***** Write first row of data of this attendance event *****/
|
||||||
/* Forms to remove/edit this attendance event */
|
/* Forms to remove/edit this attendance event */
|
||||||
Tbl_StartRow ();
|
Tbl_StartRow ();
|
||||||
fprintf (Gbl.F.Out,"<td rowspan=\"2\" class=\"CONTEXT_COL");
|
|
||||||
if (!ShowOnlyThisAttEventComplete)
|
if (ShowOnlyThisAttEventComplete)
|
||||||
fprintf (Gbl.F.Out," COLOR%u",Gbl.RowEvenOdd);
|
Tbl_StartCellAttr ("rowspan=\"2\" class=\"CONTEXT_COL\"");
|
||||||
fprintf (Gbl.F.Out,"\">");
|
else
|
||||||
|
Tbl_StartCellAttr ("rowspan=\"2\" class=\"CONTEXT_COL COLOR%u\"",Gbl.RowEvenOdd);
|
||||||
switch (Gbl.Usrs.Me.Role.Logged)
|
switch (Gbl.Usrs.Me.Role.Logged)
|
||||||
{
|
{
|
||||||
case Rol_TCH:
|
case Rol_TCH:
|
||||||
|
@ -417,8 +418,8 @@ static void Att_ShowOneAttEvent (struct AttendanceEvent *Att,bool ShowOnlyThisAt
|
||||||
"DATE_RED"));
|
"DATE_RED"));
|
||||||
if (!ShowOnlyThisAttEventComplete)
|
if (!ShowOnlyThisAttEventComplete)
|
||||||
fprintf (Gbl.F.Out," COLOR%u",Gbl.RowEvenOdd);
|
fprintf (Gbl.F.Out," COLOR%u",Gbl.RowEvenOdd);
|
||||||
fprintf (Gbl.F.Out,"\">"
|
fprintf (Gbl.F.Out,"\">");
|
||||||
"<script type=\"text/javascript\">"
|
fprintf (Gbl.F.Out,"<script type=\"text/javascript\">"
|
||||||
"writeLocalDateHMSFromUTC('att_date_%u_%u',%ld,"
|
"writeLocalDateHMSFromUTC('att_date_%u_%u',%ld,"
|
||||||
"%u,'<br />','%s',true,true,0x7);"
|
"%u,'<br />','%s',true,true,0x7);"
|
||||||
"</script>",
|
"</script>",
|
||||||
|
@ -454,6 +455,7 @@ static void Att_ShowOneAttEvent (struct AttendanceEvent *Att,bool ShowOnlyThisAt
|
||||||
|
|
||||||
/***** Write second row of data of this attendance event *****/
|
/***** Write second row of data of this attendance event *****/
|
||||||
Tbl_StartRow ();
|
Tbl_StartRow ();
|
||||||
|
|
||||||
fprintf (Gbl.F.Out,"<td colspan=\"2\" class=\"LEFT_TOP");
|
fprintf (Gbl.F.Out,"<td colspan=\"2\" class=\"LEFT_TOP");
|
||||||
if (!ShowOnlyThisAttEventComplete)
|
if (!ShowOnlyThisAttEventComplete)
|
||||||
fprintf (Gbl.F.Out," COLOR%u",Gbl.RowEvenOdd);
|
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,
|
Str_ChangeFormat (Str_FROM_HTML,Str_TO_RIGOROUS_HTML,
|
||||||
Description,Cns_MAX_BYTES_TEXT,false); // Convert from HTML to recpectful HTML
|
Description,Cns_MAX_BYTES_TEXT,false); // Convert from HTML to recpectful HTML
|
||||||
Str_InsertLinks (Description,Cns_MAX_BYTES_TEXT,60); // Insert links
|
Str_InsertLinks (Description,Cns_MAX_BYTES_TEXT,60); // Insert links
|
||||||
|
|
||||||
fprintf (Gbl.F.Out,"<td colspan=\"2\" class=\"LEFT_TOP");
|
fprintf (Gbl.F.Out,"<td colspan=\"2\" class=\"LEFT_TOP");
|
||||||
if (!ShowOnlyThisAttEventComplete)
|
if (!ShowOnlyThisAttEventComplete)
|
||||||
fprintf (Gbl.F.Out," COLOR%u",Gbl.RowEvenOdd);
|
fprintf (Gbl.F.Out," COLOR%u",Gbl.RowEvenOdd);
|
||||||
|
@ -483,6 +486,7 @@ static void Att_ShowOneAttEvent (struct AttendanceEvent *Att,bool ShowOnlyThisAt
|
||||||
Description);
|
Description);
|
||||||
|
|
||||||
Tbl_EndCell ();
|
Tbl_EndCell ();
|
||||||
|
|
||||||
Tbl_EndRow ();
|
Tbl_EndRow ();
|
||||||
|
|
||||||
/***** Free anchor string *****/
|
/***** Free anchor string *****/
|
||||||
|
@ -1096,16 +1100,19 @@ void Att_RequestCreatOrEditAttEvent (void)
|
||||||
|
|
||||||
/***** Attendance event title *****/
|
/***** Attendance event title *****/
|
||||||
Tbl_StartRow ();
|
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);
|
The_ClassFormInBox[Gbl.Prefs.Theme],Txt_Title);
|
||||||
Tbl_EndCell ();
|
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\""
|
" size=\"45\" maxlength=\"%u\" value=\"%s\""
|
||||||
" required=\"required\" />",
|
" required=\"required\" />",
|
||||||
Att_MAX_CHARS_ATTENDANCE_EVENT_TITLE,Att.Title);
|
Att_MAX_CHARS_ATTENDANCE_EVENT_TITLE,Att.Title);
|
||||||
Tbl_EndCell ();
|
Tbl_EndCell ();
|
||||||
|
|
||||||
Tbl_EndRow ();
|
Tbl_EndRow ();
|
||||||
|
|
||||||
/***** Assignment start and end dates *****/
|
/***** Assignment start and end dates *****/
|
||||||
|
@ -1113,13 +1120,14 @@ void Att_RequestCreatOrEditAttEvent (void)
|
||||||
|
|
||||||
/***** Visibility of comments *****/
|
/***** Visibility of comments *****/
|
||||||
Tbl_StartRow ();
|
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);
|
The_ClassFormInBox[Gbl.Prefs.Theme],Txt_Teachers_comment);
|
||||||
Tbl_EndCell ();
|
Tbl_EndCell ();
|
||||||
|
|
||||||
fprintf (Gbl.F.Out,"<td class=\"LEFT_TOP\">"
|
fprintf (Gbl.F.Out,"<td class=\"LEFT_TOP\">");
|
||||||
"<select id=\"ComTchVisible\" name=\"ComTchVisible\">");
|
fprintf (Gbl.F.Out,"<select id=\"ComTchVisible\" name=\"ComTchVisible\">");
|
||||||
|
|
||||||
fprintf (Gbl.F.Out,"<option value=\"N\"");
|
fprintf (Gbl.F.Out,"<option value=\"N\"");
|
||||||
if (!Att.CommentTchVisible)
|
if (!Att.CommentTchVisible)
|
||||||
|
@ -1139,17 +1147,20 @@ void Att_RequestCreatOrEditAttEvent (void)
|
||||||
|
|
||||||
/***** Attendance event description *****/
|
/***** Attendance event description *****/
|
||||||
Tbl_StartRow ();
|
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);
|
The_ClassFormInBox[Gbl.Prefs.Theme],Txt_Description);
|
||||||
Tbl_EndCell ();
|
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\">");
|
" cols=\"60\" rows=\"5\">");
|
||||||
if (!ItsANewAttEvent)
|
if (!ItsANewAttEvent)
|
||||||
fprintf (Gbl.F.Out,"%s",Description);
|
fprintf (Gbl.F.Out,"%s",Description);
|
||||||
fprintf (Gbl.F.Out,"</textarea>");
|
fprintf (Gbl.F.Out,"</textarea>");
|
||||||
Tbl_EndCell ();
|
Tbl_EndCell ();
|
||||||
|
|
||||||
Tbl_EndRow ();
|
Tbl_EndRow ();
|
||||||
|
|
||||||
/***** Groups *****/
|
/***** Groups *****/
|
||||||
|
@ -1187,18 +1198,21 @@ static void Att_ShowLstGrpsToEditAttEvent (long AttCod)
|
||||||
{
|
{
|
||||||
/***** Start box and table *****/
|
/***** Start box and table *****/
|
||||||
Tbl_StartRow ();
|
Tbl_StartRow ();
|
||||||
fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_TOP\">"
|
|
||||||
"%s:",
|
fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_TOP\">",
|
||||||
The_ClassFormInBox[Gbl.Prefs.Theme],Txt_Groups);
|
The_ClassFormInBox[Gbl.Prefs.Theme]);
|
||||||
|
fprintf (Gbl.F.Out,"%s:",Txt_Groups);
|
||||||
Tbl_EndCell ();
|
Tbl_EndCell ();
|
||||||
|
|
||||||
fprintf (Gbl.F.Out,"<td class=\"LEFT_TOP\">");
|
fprintf (Gbl.F.Out,"<td class=\"LEFT_TOP\">");
|
||||||
Box_StartBoxTable ("100%",NULL,NULL,
|
Box_StartBoxTable ("100%",NULL,NULL,
|
||||||
NULL,Box_NOT_CLOSABLE,0);
|
NULL,Box_NOT_CLOSABLE,0);
|
||||||
|
|
||||||
/***** First row: checkbox to select the whole course *****/
|
/***** First row: checkbox to select the whole course *****/
|
||||||
Tbl_StartRow ();
|
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\"");
|
"<input type=\"checkbox\" id=\"WholeCrs\" name=\"WholeCrs\" value=\"Y\"");
|
||||||
if (!Att_CheckIfAttEventIsAssociatedToGrps (AttCod))
|
if (!Att_CheckIfAttEventIsAssociatedToGrps (AttCod))
|
||||||
fprintf (Gbl.F.Out," checked=\"checked\"");
|
fprintf (Gbl.F.Out," checked=\"checked\"");
|
||||||
|
@ -1207,6 +1221,7 @@ static void Att_ShowLstGrpsToEditAttEvent (long AttCod)
|
||||||
"</label>",
|
"</label>",
|
||||||
Txt_The_whole_course,Gbl.Hierarchy.Crs.ShrtName);
|
Txt_The_whole_course,Gbl.Hierarchy.Crs.ShrtName);
|
||||||
Tbl_EndCell ();
|
Tbl_EndCell ();
|
||||||
|
|
||||||
Tbl_EndRow ();
|
Tbl_EndRow ();
|
||||||
|
|
||||||
/***** List the groups for each group type *****/
|
/***** 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 *****/
|
/***** Icon to show if the user is already present *****/
|
||||||
Tbl_StartRow ();
|
Tbl_StartRow ();
|
||||||
fprintf (Gbl.F.Out,"<td class=\"BT%u\">"
|
|
||||||
"<label for=\"Std%u\">",
|
fprintf (Gbl.F.Out,"<td class=\"BT%u\">",
|
||||||
Gbl.RowEvenOdd,NumUsr);
|
Gbl.RowEvenOdd);
|
||||||
|
fprintf (Gbl.F.Out,"<label for=\"Std%u\">",
|
||||||
|
NumUsr);
|
||||||
Att_PutCheckOrCross (Present);
|
Att_PutCheckOrCross (Present);
|
||||||
fprintf (Gbl.F.Out,"</label>");
|
fprintf (Gbl.F.Out,"</label>");
|
||||||
Tbl_EndCell ();
|
Tbl_EndCell ();
|
||||||
|
|
||||||
/***** Checkbox to select user *****/
|
/***** Checkbox to select user *****/
|
||||||
fprintf (Gbl.F.Out,"<td class=\"CENTER_TOP COLOR%u\">"
|
fprintf (Gbl.F.Out,"<td class=\"CENTER_TOP COLOR%u\">",
|
||||||
"<input type=\"checkbox\" id=\"Std%u\" name=\"UsrCodStd\""
|
Gbl.RowEvenOdd);
|
||||||
|
fprintf (Gbl.F.Out,"<input type=\"checkbox\" id=\"Std%u\" name=\"UsrCodStd\""
|
||||||
" value=\"%s\"",
|
" value=\"%s\"",
|
||||||
Gbl.RowEvenOdd,NumUsr,
|
NumUsr,
|
||||||
UsrDat->EncryptedUsrCod);
|
UsrDat->EncryptedUsrCod);
|
||||||
if (Present) // This student has attended to the event?
|
if (Present) // This student has attended to the event?
|
||||||
fprintf (Gbl.F.Out," checked=\"checked\"");
|
fprintf (Gbl.F.Out," checked=\"checked\"");
|
||||||
|
@ -2103,12 +2121,11 @@ static void Att_WriteRowUsrToCallTheRoll (unsigned NumUsr,
|
||||||
Tbl_EndCell ();
|
Tbl_EndCell ();
|
||||||
|
|
||||||
/***** Write number of student in the list *****/
|
/***** Write number of student in the list *****/
|
||||||
fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_TOP COLOR%u\">"
|
fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_TOP COLOR%u\">",
|
||||||
"%u",
|
|
||||||
UsrDat->Accepted ? "DAT_N" :
|
UsrDat->Accepted ? "DAT_N" :
|
||||||
"DAT",
|
"DAT",
|
||||||
Gbl.RowEvenOdd,
|
Gbl.RowEvenOdd);
|
||||||
NumUsr);
|
fprintf (Gbl.F.Out,"%u",NumUsr);
|
||||||
Tbl_EndCell ();
|
Tbl_EndCell ();
|
||||||
|
|
||||||
/***** Show student's photo *****/
|
/***** Show student's photo *****/
|
||||||
|
@ -2132,15 +2149,14 @@ static void Att_WriteRowUsrToCallTheRoll (unsigned NumUsr,
|
||||||
Tbl_EndCell ();
|
Tbl_EndCell ();
|
||||||
|
|
||||||
/***** Write student's name *****/
|
/***** 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" :
|
UsrDat->Accepted ? "DAT_SMALL_N" :
|
||||||
"DAT_SMALL",
|
"DAT_SMALL",
|
||||||
Gbl.RowEvenOdd,
|
Gbl.RowEvenOdd);
|
||||||
UsrDat->Surname1);
|
fprintf (Gbl.F.Out,"%s",UsrDat->Surname1);
|
||||||
if (UsrDat->Surname2[0])
|
if (UsrDat->Surname2[0])
|
||||||
fprintf (Gbl.F.Out," %s",UsrDat->Surname2);
|
fprintf (Gbl.F.Out," %s",UsrDat->Surname2);
|
||||||
fprintf (Gbl.F.Out,", %s",
|
fprintf (Gbl.F.Out,", %s",UsrDat->FirstName);
|
||||||
UsrDat->FirstName);
|
|
||||||
Tbl_EndCell ();
|
Tbl_EndCell ();
|
||||||
|
|
||||||
/***** Student's comment: write form or text */
|
/***** 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 */
|
/* Write a row for this event */
|
||||||
Tbl_StartRow ();
|
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\"",
|
" id=\"Att%u\" name=\"AttCods\" value=\"%ld\"",
|
||||||
Gbl.RowEvenOdd,
|
|
||||||
NumAttEvent,
|
NumAttEvent,
|
||||||
Gbl.AttEvents.Lst[NumAttEvent].AttCod);
|
Gbl.AttEvents.Lst[NumAttEvent].AttCod);
|
||||||
if (Gbl.AttEvents.Lst[NumAttEvent].Selected)
|
if (Gbl.AttEvents.Lst[NumAttEvent].Selected)
|
||||||
fprintf (Gbl.F.Out," checked=\"checked\"");
|
fprintf (Gbl.F.Out," checked=\"checked\"");
|
||||||
fprintf (Gbl.F.Out," />");
|
fprintf (Gbl.F.Out," />");
|
||||||
Tbl_EndCell ();
|
Tbl_EndCell ();
|
||||||
fprintf (Gbl.F.Out,"<td class=\"DAT RIGHT_TOP COLOR%u\">"
|
|
||||||
"<label for=\"Att%u\">%u:</label>",
|
fprintf (Gbl.F.Out,"<td class=\"DAT RIGHT_TOP COLOR%u\">",
|
||||||
Gbl.RowEvenOdd,
|
Gbl.RowEvenOdd);
|
||||||
|
fprintf (Gbl.F.Out,"<label for=\"Att%u\">%u:</label>",
|
||||||
NumAttEvent,NumAttEvent + 1);
|
NumAttEvent,NumAttEvent + 1);
|
||||||
Tbl_EndCell ();
|
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>"
|
"<span id=\"att_date_start_%u\"></span>"
|
||||||
"</label>"
|
"</label>"
|
||||||
"<script type=\"text/javascript\">"
|
"<script type=\"text/javascript\">"
|
||||||
"writeLocalDateHMSFromUTC('att_date_start_%u',%ld,"
|
"writeLocalDateHMSFromUTC('att_date_start_%u',%ld,"
|
||||||
"%u,', ','%s',true,true,0x7);"
|
"%u,', ','%s',true,true,0x7);"
|
||||||
"</script>",
|
"</script>",
|
||||||
Gbl.RowEvenOdd,
|
|
||||||
NumAttEvent,UniqueId,
|
NumAttEvent,UniqueId,
|
||||||
UniqueId,Gbl.AttEvents.Lst[NumAttEvent].TimeUTC[Att_START_TIME],
|
UniqueId,Gbl.AttEvents.Lst[NumAttEvent].TimeUTC[Att_START_TIME],
|
||||||
(unsigned) Gbl.Prefs.DateFormat,Txt_Today);
|
(unsigned) Gbl.Prefs.DateFormat,Txt_Today);
|
||||||
Tbl_EndCell ();
|
Tbl_EndCell ();
|
||||||
fprintf (Gbl.F.Out,"<td class=\"DAT LEFT_TOP COLOR%u\">"
|
|
||||||
"%s",
|
fprintf (Gbl.F.Out,"<td class=\"DAT LEFT_TOP COLOR%u\">",
|
||||||
Gbl.RowEvenOdd,
|
Gbl.RowEvenOdd);
|
||||||
Gbl.AttEvents.Lst[NumAttEvent].Title);
|
fprintf (Gbl.F.Out,"%s",Gbl.AttEvents.Lst[NumAttEvent].Title);
|
||||||
Tbl_EndCell ();
|
Tbl_EndCell ();
|
||||||
fprintf (Gbl.F.Out,"<td class=\"DAT RIGHT_TOP COLOR%u\">"
|
|
||||||
"%u",
|
fprintf (Gbl.F.Out,"<td class=\"DAT RIGHT_TOP COLOR%u\">",
|
||||||
Gbl.RowEvenOdd,
|
Gbl.RowEvenOdd);
|
||||||
Gbl.AttEvents.Lst[NumAttEvent].NumStdsTotal);
|
fprintf (Gbl.F.Out,"%u",Gbl.AttEvents.Lst[NumAttEvent].NumStdsTotal);
|
||||||
Tbl_EndCell ();
|
Tbl_EndCell ();
|
||||||
|
|
||||||
Tbl_EndRow ();
|
Tbl_EndRow ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3174,12 +3194,14 @@ static void Att_ListEventsToSelect (Att_TypeOfView_t TypeOfView)
|
||||||
if (NormalView)
|
if (NormalView)
|
||||||
{
|
{
|
||||||
Tbl_StartRow ();
|
Tbl_StartRow ();
|
||||||
|
|
||||||
fprintf (Gbl.F.Out,"<td colspan=\"5\" class=\"CENTER_MIDDLE\">");
|
fprintf (Gbl.F.Out,"<td colspan=\"5\" class=\"CENTER_MIDDLE\">");
|
||||||
Frm_LinkFormSubmitAnimated (Txt_Update_attendance,
|
Frm_LinkFormSubmitAnimated (Txt_Update_attendance,
|
||||||
The_ClassFormInBoxBold[Gbl.Prefs.Theme],
|
The_ClassFormInBoxBold[Gbl.Prefs.Theme],
|
||||||
NULL);
|
NULL);
|
||||||
Ico_PutCalculateIconWithText (Txt_Update_attendance);
|
Ico_PutCalculateIconWithText (Txt_Update_attendance);
|
||||||
Tbl_EndCell ();
|
Tbl_EndCell ();
|
||||||
|
|
||||||
Tbl_EndRow ();
|
Tbl_EndRow ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3258,27 +3280,30 @@ static void Att_ListUsrsAttendanceTable (Att_TypeOfView_t TypeOfView,
|
||||||
if (NumUsrsInList > 1)
|
if (NumUsrsInList > 1)
|
||||||
{
|
{
|
||||||
Tbl_StartRow ();
|
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 :
|
Gbl.Usrs.Listing.WithPhotos ? 4 :
|
||||||
3,
|
3);
|
||||||
Txt_Number_of_users);
|
fprintf (Gbl.F.Out,"%s:",Txt_Number_of_users);
|
||||||
Tbl_EndCell ();
|
Tbl_EndCell ();
|
||||||
|
|
||||||
for (NumAttEvent = 0, Total = 0;
|
for (NumAttEvent = 0, Total = 0;
|
||||||
NumAttEvent < Gbl.AttEvents.Num;
|
NumAttEvent < Gbl.AttEvents.Num;
|
||||||
NumAttEvent++)
|
NumAttEvent++)
|
||||||
if (Gbl.AttEvents.Lst[NumAttEvent].Selected)
|
if (Gbl.AttEvents.Lst[NumAttEvent].Selected)
|
||||||
{
|
{
|
||||||
fprintf (Gbl.F.Out,"<td class=\"DAT_N_LINE_TOP RIGHT_MIDDLE\">"
|
fprintf (Gbl.F.Out,"<td class=\"DAT_N_LINE_TOP RIGHT_MIDDLE\">");
|
||||||
"%u",
|
fprintf (Gbl.F.Out,"%u",
|
||||||
Gbl.AttEvents.Lst[NumAttEvent].NumStdsFromList);
|
Gbl.AttEvents.Lst[NumAttEvent].NumStdsFromList);
|
||||||
Tbl_EndCell ();
|
Tbl_EndCell ();
|
||||||
|
|
||||||
Total += Gbl.AttEvents.Lst[NumAttEvent].NumStdsFromList;
|
Total += Gbl.AttEvents.Lst[NumAttEvent].NumStdsFromList;
|
||||||
}
|
}
|
||||||
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\">");
|
||||||
Total);
|
fprintf (Gbl.F.Out,"%u",Total);
|
||||||
Tbl_EndCell ();
|
Tbl_EndCell ();
|
||||||
|
|
||||||
Tbl_EndRow ();
|
Tbl_EndRow ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3357,12 +3382,12 @@ static void Att_WriteRowUsrSeveralAttEvents (unsigned NumUsr,struct UsrData *Usr
|
||||||
|
|
||||||
/***** Write number of user in the list *****/
|
/***** Write number of user in the list *****/
|
||||||
Tbl_StartRow ();
|
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" :
|
UsrDat->Accepted ? "DAT_N" :
|
||||||
"DAT",
|
"DAT",
|
||||||
Gbl.RowEvenOdd,
|
Gbl.RowEvenOdd);
|
||||||
NumUsr + 1);
|
fprintf (Gbl.F.Out,"%u",NumUsr + 1);
|
||||||
Tbl_EndCell ();
|
Tbl_EndCell ();
|
||||||
|
|
||||||
/***** Show user's photo *****/
|
/***** Show user's photo *****/
|
||||||
|
@ -3387,12 +3412,11 @@ static void Att_WriteRowUsrSeveralAttEvents (unsigned NumUsr,struct UsrData *Usr
|
||||||
Tbl_EndCell ();
|
Tbl_EndCell ();
|
||||||
|
|
||||||
/***** Write user's name *****/
|
/***** Write user's name *****/
|
||||||
fprintf (Gbl.F.Out,"<td class=\"%s LEFT_MIDDLE COLOR%u\">"
|
fprintf (Gbl.F.Out,"<td class=\"%s LEFT_MIDDLE COLOR%u\">",
|
||||||
"%s",
|
|
||||||
UsrDat->Accepted ? "DAT_SMALL_N" :
|
UsrDat->Accepted ? "DAT_SMALL_N" :
|
||||||
"DAT_SMALL",
|
"DAT_SMALL",
|
||||||
Gbl.RowEvenOdd,
|
Gbl.RowEvenOdd);
|
||||||
UsrDat->Surname1);
|
fprintf (Gbl.F.Out,"%s",UsrDat->Surname1);
|
||||||
if (UsrDat->Surname2[0])
|
if (UsrDat->Surname2[0])
|
||||||
fprintf (Gbl.F.Out," %s",UsrDat->Surname2);
|
fprintf (Gbl.F.Out," %s",UsrDat->Surname2);
|
||||||
fprintf (Gbl.F.Out,", %s",
|
fprintf (Gbl.F.Out,", %s",
|
||||||
|
@ -3411,8 +3435,7 @@ static void Att_WriteRowUsrSeveralAttEvents (unsigned NumUsr,struct UsrData *Usr
|
||||||
UsrDat->UsrCod);
|
UsrDat->UsrCod);
|
||||||
|
|
||||||
/* Write check or cross */
|
/* Write check or cross */
|
||||||
fprintf (Gbl.F.Out,"<td class=\"BM%u\">",
|
fprintf (Gbl.F.Out,"<td class=\"BM%u\">",Gbl.RowEvenOdd);
|
||||||
Gbl.RowEvenOdd);
|
|
||||||
Att_PutCheckOrCross (Present);
|
Att_PutCheckOrCross (Present);
|
||||||
Tbl_EndCell ();
|
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 *****/
|
/***** Last column with the number of times this user is present *****/
|
||||||
fprintf (Gbl.F.Out,"<td class=\"DAT_N RIGHT_MIDDLE COLOR%u\">"
|
fprintf (Gbl.F.Out,"<td class=\"DAT_N RIGHT_MIDDLE COLOR%u\">",
|
||||||
"%u",
|
Gbl.RowEvenOdd);
|
||||||
Gbl.RowEvenOdd,
|
fprintf (Gbl.F.Out,"%u",NumTimesPresent);
|
||||||
NumTimesPresent);
|
|
||||||
Tbl_EndCell ();
|
Tbl_EndCell ();
|
||||||
|
|
||||||
Tbl_EndRow ();
|
Tbl_EndRow ();
|
||||||
|
|
||||||
Gbl.RowEvenOdd = 1 - Gbl.RowEvenOdd;
|
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 *****/
|
/***** Write number of student in the list *****/
|
||||||
NumUsr++;
|
NumUsr++;
|
||||||
Tbl_StartRow ();
|
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" :
|
UsrDat->Accepted ? "DAT_N" :
|
||||||
"DAT",
|
"DAT",
|
||||||
Gbl.RowEvenOdd,
|
Gbl.RowEvenOdd);
|
||||||
NumUsr);
|
fprintf (Gbl.F.Out,"%u:",NumUsr);
|
||||||
Tbl_EndCell ();
|
Tbl_EndCell ();
|
||||||
|
|
||||||
/***** Show student's photo *****/
|
/***** Show student's photo *****/
|
||||||
|
@ -3543,6 +3566,7 @@ static void Att_ListAttEventsForAStd (unsigned NumUsr,struct UsrData *UsrDat)
|
||||||
Gbl.RowEvenOdd);
|
Gbl.RowEvenOdd);
|
||||||
Tbl_StartTable ();
|
Tbl_StartTable ();
|
||||||
Tbl_StartRow ();
|
Tbl_StartRow ();
|
||||||
|
|
||||||
fprintf (Gbl.F.Out,"<td class=\"%s LEFT_MIDDLE\">",
|
fprintf (Gbl.F.Out,"<td class=\"%s LEFT_MIDDLE\">",
|
||||||
UsrDat->Accepted ? "DAT_N" :
|
UsrDat->Accepted ? "DAT_N" :
|
||||||
"DAT");
|
"DAT");
|
||||||
|
@ -3550,15 +3574,15 @@ static void Att_ListAttEventsForAStd (unsigned NumUsr,struct UsrData *UsrDat)
|
||||||
Tbl_EndCell ();
|
Tbl_EndCell ();
|
||||||
|
|
||||||
/***** Write student's name *****/
|
/***** 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" :
|
UsrDat->Accepted ? "DAT_SMALL_N" :
|
||||||
"DAT_SMALL",
|
"DAT_SMALL");
|
||||||
UsrDat->Surname1);
|
fprintf (Gbl.F.Out,"%s",UsrDat->Surname1);
|
||||||
if (UsrDat->Surname2[0])
|
if (UsrDat->Surname2[0])
|
||||||
fprintf (Gbl.F.Out," %s",UsrDat->Surname2);
|
fprintf (Gbl.F.Out," %s",UsrDat->Surname2);
|
||||||
fprintf (Gbl.F.Out,", %s",
|
fprintf (Gbl.F.Out,", %s",UsrDat->FirstName);
|
||||||
UsrDat->FirstName);
|
|
||||||
Tbl_EndCell ();
|
Tbl_EndCell ();
|
||||||
|
|
||||||
Tbl_EndRow ();
|
Tbl_EndRow ();
|
||||||
Tbl_EndTable ();
|
Tbl_EndTable ();
|
||||||
Tbl_EndCell ();
|
Tbl_EndCell ();
|
||||||
|
@ -3586,12 +3610,11 @@ static void Att_ListAttEventsForAStd (unsigned NumUsr,struct UsrData *UsrDat)
|
||||||
|
|
||||||
Tbl_PutEmptyColouredCells (1);
|
Tbl_PutEmptyColouredCells (1);
|
||||||
|
|
||||||
fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_TOP COLOR%u\">"
|
fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_TOP COLOR%u\">",
|
||||||
"%u:",
|
|
||||||
Present ? "DAT_GREEN" :
|
Present ? "DAT_GREEN" :
|
||||||
"DAT_RED",
|
"DAT_RED",
|
||||||
Gbl.RowEvenOdd,
|
Gbl.RowEvenOdd);
|
||||||
NumAttEvent + 1);
|
fprintf (Gbl.F.Out,"%u:",NumAttEvent + 1);
|
||||||
Tbl_EndCell ();
|
Tbl_EndCell ();
|
||||||
|
|
||||||
fprintf (Gbl.F.Out,"<td class=\"BT%u\">",
|
fprintf (Gbl.F.Out,"<td class=\"BT%u\">",
|
||||||
|
@ -3599,14 +3622,14 @@ static void Att_ListAttEventsForAStd (unsigned NumUsr,struct UsrData *UsrDat)
|
||||||
Att_PutCheckOrCross (Present);
|
Att_PutCheckOrCross (Present);
|
||||||
Tbl_EndCell ();
|
Tbl_EndCell ();
|
||||||
|
|
||||||
fprintf (Gbl.F.Out,"<td class=\"DAT LEFT_TOP COLOR%u\">"
|
fprintf (Gbl.F.Out,"<td class=\"DAT LEFT_TOP COLOR%u\">",
|
||||||
"<span id=\"att_date_start_%u_%u\"></span>"
|
Gbl.RowEvenOdd);
|
||||||
|
fprintf (Gbl.F.Out,"<span id=\"att_date_start_%u_%u\"></span>"
|
||||||
"<br />%s"
|
"<br />%s"
|
||||||
"<script type=\"text/javascript\">"
|
"<script type=\"text/javascript\">"
|
||||||
"writeLocalDateHMSFromUTC('att_date_start_%u_%u',%ld,"
|
"writeLocalDateHMSFromUTC('att_date_start_%u_%u',%ld,"
|
||||||
"%u,', ','%s',true,true,0x7);"
|
"%u,', ','%s',true,true,0x7);"
|
||||||
"</script>",
|
"</script>",
|
||||||
Gbl.RowEvenOdd,
|
|
||||||
NumUsr,UniqueId,
|
NumUsr,UniqueId,
|
||||||
Gbl.AttEvents.Lst[NumAttEvent].Title,
|
Gbl.AttEvents.Lst[NumAttEvent].Title,
|
||||||
NumUsr,UniqueId,
|
NumUsr,UniqueId,
|
||||||
|
@ -3627,9 +3650,9 @@ static void Att_ListAttEventsForAStd (unsigned NumUsr,struct UsrData *UsrDat)
|
||||||
Gbl.RowEvenOdd);
|
Gbl.RowEvenOdd);
|
||||||
Tbl_EndCell ();
|
Tbl_EndCell ();
|
||||||
|
|
||||||
fprintf (Gbl.F.Out,"<td class=\"DAT LEFT_MIDDLE COLOR%u\">"
|
fprintf (Gbl.F.Out,"<td class=\"DAT LEFT_MIDDLE COLOR%u\">",
|
||||||
"<dl>",
|
|
||||||
Gbl.RowEvenOdd);
|
Gbl.RowEvenOdd);
|
||||||
|
fprintf (Gbl.F.Out,"<dl>");
|
||||||
if (ShowCommentStd)
|
if (ShowCommentStd)
|
||||||
{
|
{
|
||||||
Str_ChangeFormat (Str_FROM_HTML,Str_TO_RIGOROUS_HTML,
|
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:
|
En OpenSWAD:
|
||||||
ps2pdf source.ps destination.pdf
|
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 CSS_FILE "swad19.29.css"
|
||||||
#define JS_FILE "swad19.30.js"
|
#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: 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.)
|
// 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.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.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)
|
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 *******************************/
|
/********************************* 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)
|
void Tbl_EndCell (void)
|
||||||
{
|
{
|
||||||
fprintf (Gbl.F.Out,
|
fprintf (Gbl.F.Out,
|
||||||
|
|
|
@ -54,6 +54,8 @@ void Tbl_StartRowAttr (const char *fmt,...);
|
||||||
void Tbl_StartRow (void);
|
void Tbl_StartRow (void);
|
||||||
void Tbl_EndRow (void);
|
void Tbl_EndRow (void);
|
||||||
|
|
||||||
|
void Tbl_StartCellAttr (const char *fmt,...);
|
||||||
|
void Tbl_StartCell (void);
|
||||||
void Tbl_EndCell (void);
|
void Tbl_EndCell (void);
|
||||||
void Tbl_PutEmptyCells (unsigned NumColumns);
|
void Tbl_PutEmptyCells (unsigned NumColumns);
|
||||||
void Tbl_PutEmptyColouredCells (unsigned NumColumns);
|
void Tbl_PutEmptyColouredCells (unsigned NumColumns);
|
||||||
|
|
Loading…
Reference in New Issue