Version 14.40.3

This commit is contained in:
Antonio Cañas Vargas 2014-12-22 23:18:56 +01:00
parent ed553d2df9
commit 08f0851023
3 changed files with 220 additions and 110 deletions

View File

@ -35,11 +35,12 @@
/****************************** Public constants *****************************/
/*****************************************************************************/
#define Log_PLATFORM_VERSION "SWAD 14.40.2 (2014/12/22)"
#define Log_PLATFORM_VERSION "SWAD 14.40.3 (2014/12/22)"
// Number of lines (includes comments but not blank lines) has been got with the following command:
// nl swad*.c swad*.h css/swad*.css py/swad*.py js/swad*.js soap/swad*.h | tail -1
/*
Version 14.40.3 :Dic 22, 2014 Changes in HTML and CSS to validate HTML5 in W3C validator. (171698 lines)
Version 14.40.2 :Dic 22, 2014 Changes in HTML and CSS to validate HTML5 in W3C validator. (171588 lines)
Version 14.40.1 :Dic 22, 2014 Changes in HTML and CSS to validate HTML5 in W3C validator.
Fixed problem in edition of departaments. (171417 lines)

View File

@ -857,13 +857,13 @@ static void For_ShowThreadPosts (long ThrCod,char *LastSubject)
/* Write thread title */
fprintf (Gbl.F.Out,"<tr>"
"<td align=\"left\" valign=\"top\">"
"<td style=\"text-align:left; vertical-align:top;\">"
"<table>"
"<tr>");
IsLastItemInLevel[2] = true;
Msg_IndentDependingOnLevel (2,IsLastItemInLevel);
fprintf (Gbl.F.Out,"<td align=\"left\" class=\"TIT\">"
fprintf (Gbl.F.Out,"<td class=\"TIT\" style=\"text-align:left;\">"
"<img src=\"%s/%s16x16.gif\" alt=\"\""
" class=\"ICON16x16\" style=\"vertical-align:top;\" /> ",
Gbl.Prefs.IconsURL,
@ -928,7 +928,7 @@ static void For_ShowThreadPosts (long ThrCod,char *LastSubject)
/***** Show posts from this page, the author and the date of last reply *****/
Lay_StartRoundFrameTable10 (NULL,0,NULL);
fprintf (Gbl.F.Out,"<tr>"
"<td align=\"center\" width=\"100%%\">"
"<td style=\"width:100%%; text-align:center;\">"
"<table class=\"CELLS_PAD_2\" style=\"width:100%%;\">");
mysql_data_seek (mysql_res,(my_ulonglong) (Pagination.FirstItemVisible-1));
@ -1024,7 +1024,8 @@ static void For_ShowAForumPost (struct ForumThread *Thr,unsigned PstNum,long Pst
/***** Put an icon with post status *****/
fprintf (Gbl.F.Out,"<tr>"
"<td align=\"center\" valign=\"top\" width=\"24\" class=\"%s\">"
"<td class=\"%s\" style=\"width:24px;"
" text-align:center; vertical-align:top;\">"
"<img src=\"%s/%s16x16.gif\""
" alt=\"\" class=\"ICON16x16\" />"
"</td>",
@ -1042,7 +1043,8 @@ static void For_ShowAForumPost (struct ForumThread *Thr,unsigned PstNum,long Pst
"MSG_TIT_BG");
/***** Write subject *****/
fprintf (Gbl.F.Out,"<td align=\"left\" valign=\"top\" class=\"%s\">",
fprintf (Gbl.F.Out,"<td class=\"%s\""
" style=\"text-align:left; vertical-align:top;\">",
NewPst ? "MSG_TIT_BG_NEW" :
"MSG_TIT_BG");
if (Enabled)
@ -1059,7 +1061,8 @@ static void For_ShowAForumPost (struct ForumThread *Thr,unsigned PstNum,long Pst
/***** Form to remove post *****/
fprintf (Gbl.F.Out,"<tr>"
"<td width=\"18\" align=\"center\" valign=\"top\">");
"<td style=\"width:18px;"
" text-align:center; vertical-align:top;\">");
if (LastPst && Gbl.Usrs.Me.UsrDat.UsrCod == UsrDat.UsrCod)
// Post can be removed if post is the last (without answers) and it's mine
{
@ -1118,7 +1121,8 @@ static void For_ShowAForumPost (struct ForumThread *Thr,unsigned PstNum,long Pst
/***** Write author or destinatary, and form to reply (in case of received post) *****/
fprintf (Gbl.F.Out,"</td>"
"<td align=\"left\" width=\"120\" colspan=\"2\" valign=\"top\">"
"<td colspan=\"2\" style=\"width:120px;"
" text-align:left; vertical-align:top;\">"
"<table class=\"CELLS_PAD_2\" style=\"width:120px;\">");
/* Write author */
@ -1135,7 +1139,11 @@ static void For_ShowAForumPost (struct ForumThread *Thr,unsigned PstNum,long Pst
}
/***** Write post content *****/
fprintf (Gbl.F.Out,"</table></td><td align=\"left\" valign=\"top\" class=\"MSG_TXT\"><tt>");
fprintf (Gbl.F.Out,"</table>"
"</td>"
"<td class=\"MSG_TXT\""
" style=\"text-align:left; vertical-align:top;\">"
"<tt>");
if (Enabled)
{
strncpy (Content,OriginalContent,Cns_MAX_BYTES_LONG_TEXT);
@ -1148,7 +1156,9 @@ static void For_ShowAForumPost (struct ForumThread *Thr,unsigned PstNum,long Pst
fprintf (Gbl.F.Out,"(<a href=\"%s\" target=\"_blank\">%s</a>)",
Cfg_NETTIQUETE,Txt_Mandatory_rules_to_compose_messages);
}
fprintf (Gbl.F.Out,"</tt><br />&nbsp;</td>"
fprintf (Gbl.F.Out,"</tt>"
"<br />&nbsp;"
"</td>"
"</tr>");
/***** Free memory used for user's data *****/
@ -1249,7 +1259,9 @@ void For_WriteNumberOfPosts (For_ForumType_t ForumType,long UsrCod)
unsigned NumPsts;
/***** Star table cell *****/
fprintf (Gbl.F.Out,"<td width=\"120\" colspan=\"2\" align=\"center\" valign=\"top\" class=\"MSG_AUT\">");
fprintf (Gbl.F.Out,"<td colspan=\"2\" class=\"MSG_AUT\""
" style=\"width:120px;"
" text-align:center; vertical-align:top;\">");
/***** Get number of posts from database *****/
switch (ForumType)
@ -1675,7 +1687,7 @@ static void For_PutFormWhichForums (void)
/***** Form to select which forums I want to see
(all my forums or only the forums of current institution/degree/course) *****/
fprintf (Gbl.F.Out,"<tr>"
"<td align=\"center\" class=\"%s\">",
"<td class=\"%s\" style=\"text-align:center;\">",
The_ClassFormul[Gbl.Prefs.Theme]);
Act_FormStart (ActSeeFor);
For_PutParamForumOrder ();
@ -1706,7 +1718,7 @@ void For_WriteLinkToTopLevelOfForums (void)
extern const char *Txt_Forums;
fprintf (Gbl.F.Out,"<tr>"
"<td align=\"left\" class=\"%s\">",
"<td class=\"%s\" style=\"text-align:left;\">",
The_ClassFormul[Gbl.Prefs.Theme]);
Act_FormStart (ActSeeFor);
For_PutAllHiddenParamsForum ();
@ -1714,7 +1726,8 @@ void For_WriteLinkToTopLevelOfForums (void)
fprintf (Gbl.F.Out,"<img src=\"%s/forum16x16.gif\""
" alt=\"%s\" title=\"%s\""
" class=\"ICON16x16\" style=\"vertical-align:top;\" />"
"&nbsp;%s</a>"
"&nbsp;%s"
"</a>"
"</form>"
"</td>"
"</tr>",
@ -2044,7 +2057,7 @@ static void For_WriteLinkToForum (For_ForumType_t ForumType,Act_Action_t NextAct
/***** Start row *****/
fprintf (Gbl.F.Out,"<tr>"
"<td align=\"left\" valign=\"top\">"
"<td style=\"text-align:left; vertical-align:top;\">"
"<table>"
"<tr>");
@ -2054,7 +2067,7 @@ static void For_WriteLinkToForum (For_ForumType_t ForumType,Act_Action_t NextAct
/***** Write paste button used to move a thread in clipboard to this forum *****/
if (Gbl.Forum.ThreadToMove >= 0) // If I have permission to paste threads and there is a thread ready to be pasted...
{
fprintf (Gbl.F.Out,"<td align=\"center\" width=\"16\">");
fprintf (Gbl.F.Out,"<td style=\"width:16px; text-align:center;\">");
/* Check if thread to move is yet in current forum */
if (For_CheckIfThrBelongsToForum (Gbl.Forum.ThreadToMove,ForumType))
@ -2079,7 +2092,9 @@ static void For_WriteLinkToForum (For_ForumType_t ForumType,Act_Action_t NextAct
}
/***** Write link to forum *****/
fprintf (Gbl.F.Out,"<td align=\"left\" valign=\"middle\" class=\"%s\">",Style);
fprintf (Gbl.F.Out,"<td class=\"%s\""
" style=\"text-align:left; vertical-align:middle;\">",
Style);
Act_FormStart (NextAct);
For_PutAllHiddenParamsForum ();
Act_LinkFormSubmit (Act_GetActionTextFromDB (Act_Actions[NextAct].ActCod,ActTxt),Style);
@ -2380,15 +2395,23 @@ void For_ShowForumThrs (void)
/***** Heading row *****/
fprintf (Gbl.F.Out,"<tr>"
"<td width=\"14\" align=\"left\" class=\"TIT_TBL\">&nbsp;</td>"
"<td width=\"18\" align=\"left\" class=\"TIT_TBL\">&nbsp;</td>"
"<td align=\"left\" class=\"TIT_TBL\">%s</td>",
"<td class=\"TIT_TBL\""
" style=\"width:14px; text-align:left;\">"
"&nbsp;"
"</td>"
"<td class=\"TIT_TBL\""
" style=\"width:18px; text-align:left;\">"
"&nbsp;"
"</td>"
"<td class=\"TIT_TBL\" style=\"text-align:left;\">"
"%s"
"</td>",
Txt_MSG_Subject);
for (Order = For_FIRST_MSG;
Order <= For_LAST_MSG;
Order++)
{
fprintf (Gbl.F.Out,"<td colspan=\"3\" align=\"center\">");
fprintf (Gbl.F.Out,"<td colspan=\"3\" style=\"text-align:center;\">");
Act_FormStart (For_ActionsSeeFor[Gbl.Forum.ForumType]);
Pag_PutHiddenParamPagNum (PaginationThrs.CurrentPage);
For_PutParamWhichForum ();
@ -2404,10 +2427,18 @@ void For_ShowForumThrs (void)
"</form>"
"</td>");
}
fprintf (Gbl.F.Out,"<td align=\"right\" class=\"TIT_TBL\">%s</td>"
"<td align=\"right\" class=\"TIT_TBL\">%s</td>"
"<td align=\"right\" class=\"TIT_TBL\">%s</td>"
"<td align=\"right\" class=\"TIT_TBL\">%s</td>"
fprintf (Gbl.F.Out,"<td class=\"TIT_TBL\" style=\"text-align:right;\">"
"%s"
"</td>"
"<td class=\"TIT_TBL\" style=\"text-align:right;\">"
"%s"
"</td>"
"<td class=\"TIT_TBL\" style=\"text-align:right;\">"
"%s"
"</td>"
"<td class=\"TIT_TBL\" style=\"text-align:right;\">"
"%s"
"</td>"
"</tr>",
Txt_No_BR_msgs,
Txt_Unread_BR_msgs,
@ -3016,7 +3047,8 @@ void For_ListForumThrs (long ThrCods[Pag_ITEMS_PER_PAGE],struct Pagination *Pagi
/***** Show my photo if I have any posts in this thread *****/
fprintf (Gbl.F.Out,"<tr>"
"<td align=\"left\" valign=\"top\" width=\"14\" bgcolor=\"%s\">",
"<td style=\"width:14px; text-align:right;"
" vertical-align:top; background-color:%s;\">",
ThisThreadIsInMyClipboard ? LIGHT_GREEN :
Gbl.ColorRows[Gbl.RowEvenOdd]);
if (Thr.NumMyPosts)
@ -3038,7 +3070,8 @@ void For_ListForumThrs (long ThrCods[Pag_ITEMS_PER_PAGE],struct Pagination *Pagi
fprintf (Gbl.F.Out,"</td>");
/***** Put an icon with thread status *****/
fprintf (Gbl.F.Out,"<td align=\"left\" valign=\"top\" width=\"24\" bgcolor=\"%s\">"
fprintf (Gbl.F.Out,"<td style=\"width:24px; text-align:left;"
" vertical-align:top; background-color:%s;\">"
"<img src=\"%s/%s16x16.gif\" alt=\"\" title=\"%s\""
" class=\"ICON16x16\" />",
ThisThreadIsInMyClipboard ? LIGHT_GREEN :
@ -3083,7 +3116,8 @@ void For_ListForumThrs (long ThrCods[Pag_ITEMS_PER_PAGE],struct Pagination *Pagi
fprintf (Gbl.F.Out,"</td>");
/***** Write subject and links to thread pages *****/
fprintf (Gbl.F.Out,"<td align=\"left\" valign=\"top\" bgcolor=\"%s\">",
fprintf (Gbl.F.Out,"<td style=\"text-align:left; vertical-align:top;"
" background-color:%s;\">",
ThisThreadIsInMyClipboard ? LIGHT_GREEN :
Gbl.ColorRows[Gbl.RowEvenOdd]);
PaginationPsts.NumItems = Thr.NumPosts;
@ -3113,7 +3147,8 @@ void For_ListForumThrs (long ThrCods[Pag_ITEMS_PER_PAGE],struct Pagination *Pagi
Gbl.ColorRows[Gbl.RowEvenOdd]);
/* Write the date of first or last message (it's in YYYYMMDDHHMMSS format) */
fprintf (Gbl.F.Out,"<td align=\"left\" valign=\"top\" class=\"%s\" bgcolor=\"%s\">",
fprintf (Gbl.F.Out,"<td class=\"%s\" style=\"text-align:left;"
" vertical-align:top; background-color:%s;\">",
Style,
ThisThreadIsInMyClipboard ? LIGHT_GREEN :
Gbl.ColorRows[Gbl.RowEvenOdd]);
@ -3127,35 +3162,49 @@ void For_ListForumThrs (long ThrCods[Pag_ITEMS_PER_PAGE],struct Pagination *Pagi
for (Column = 1;
Column <= 3;
Column++)
fprintf (Gbl.F.Out,"<td align=\"left\" valign=\"top\" class=\"%s\" bgcolor=\"%s\"></td>",
fprintf (Gbl.F.Out,"<td class=\"%s\" style=\"text-align:left;"
" vertical-align:top; background-color:%s;\">"
"</td>",
Style,
ThisThreadIsInMyClipboard ? LIGHT_GREEN :
Gbl.ColorRows[Gbl.RowEvenOdd]);
}
/***** Write number of posts in this thread *****/
fprintf (Gbl.F.Out,"<td align=\"right\" valign=\"top\" class=\"%s\" bgcolor=\"%s\">%u&nbsp;</td>",
fprintf (Gbl.F.Out,"<td class=\"%s\" style=\"text-align:right;"
" vertical-align:top; background-color:%s;\">"
"%u&nbsp;"
"</td>",
Style,
ThisThreadIsInMyClipboard ? LIGHT_GREEN :
Gbl.ColorRows[Gbl.RowEvenOdd],
Thr.NumPosts);
/***** Write number of new posts in this thread *****/
fprintf (Gbl.F.Out,"<td align=\"right\" valign=\"top\" class=\"%s\" bgcolor=\"%s\">%u&nbsp;</td>",
fprintf (Gbl.F.Out,"<td class=\"%s\" style=\"text-align:right;"
" vertical-align:top; background-color:%s;\">"
"%u&nbsp;"
"</td>",
Style,
ThisThreadIsInMyClipboard ? LIGHT_GREEN :
Gbl.ColorRows[Gbl.RowEvenOdd],
Thr.NumUnreadPosts);
/***** Write number of users who have write posts in this thread *****/
fprintf (Gbl.F.Out,"<td align=\"right\" valign=\"top\" class=\"%s\" bgcolor=\"%s\">%u&nbsp;</td>",
fprintf (Gbl.F.Out,"<td class=\"%s\" style=\"text-align:right;"
" vertical-align:top; background-color:%s;\">"
"%u&nbsp;"
"</td>",
Style,
ThisThreadIsInMyClipboard ? LIGHT_GREEN :
Gbl.ColorRows[Gbl.RowEvenOdd],
Thr.NumWriters);
/***** Write number of users who have read this thread *****/
fprintf (Gbl.F.Out,"<td align=\"right\" valign=\"top\" class=\"%s\" bgcolor=\"%s\">%u&nbsp;</td>"
fprintf (Gbl.F.Out,"<td class=\"%s\" style=\"text-align:right;"
" vertical-align:top; background-color:%s;\">"
"%u&nbsp;"
"</td>"
"</tr>",
Style,
ThisThreadIsInMyClipboard ? LIGHT_GREEN :
@ -3454,8 +3503,9 @@ void For_WriteFormForumPst (bool IsReply,long ThrCod,const char *Subject)
fprintf (Gbl.F.Out,"<div align=\"center\">"
"<table>"
"<tr>"
"<td align=\"left\"></td>"
"<td align=\"left\"><span class=\"%s\">%s</span>"
"<td></td>"
"<td style=\"text-align:left;\">"
"<span class=\"%s\">%s</span>"
"<span class=\"DAT\"> (%s)</span></td>",
The_ClassFormul[Gbl.Prefs.Theme],
IsReply ? Txt_New_message :
@ -3463,14 +3513,17 @@ void For_WriteFormForumPst (bool IsReply,long ThrCod,const char *Subject)
Txt_If_you_send_this_message_you_will_appear_as_its_author);
fprintf (Gbl.F.Out,"<tr>"
"<td align=\"center\" colspan=\"2\">");
"<td colspan=\"2\" style=\"text-align:center;\">");
Msg_WriteLinkToNetiquette ();
fprintf (Gbl.F.Out,"</td>"
"</tr>");
fprintf (Gbl.F.Out,"<tr>"
"<td align=\"right\" valign=\"top\" class=\"%s\">%s: </td>"
"<td align=\"left\">"
"<td class=\"%s\""
" style=\"text-align:right; vertical-align:top;\">"
"%s: "
"</td>"
"<td style=\"text-align:left;\">"
"<textarea name=\"Subject\" cols=\"75\" rows=\"2\">",
The_ClassFormul[Gbl.Prefs.Theme],
Txt_MSG_Subject);
@ -3480,9 +3533,13 @@ void For_WriteFormForumPst (bool IsReply,long ThrCod,const char *Subject)
"</td>"
"</tr>"
"<tr>"
"<td align=\"right\" valign=\"top\" class=\"%s\">%s: </td>"
"<td align=\"left\">"
"<textarea name=\"Content\" cols=\"75\" rows=\"15\"></textarea>"
"<td class=\"%s\""
" style=\"text-align:right; vertical-align:top;\">"
"%s: "
"</td>"
"<td style=\"text-align:left;\">"
"<textarea name=\"Content\" cols=\"75\" rows=\"15\">"
"</textarea>"
"</td>"
"</tr>"
"</table>"

View File

@ -249,7 +249,8 @@ static void Grp_ShowFormSeveralGrps (Act_Action_t NextAction)
/***** Select all groups *****/
fprintf (Gbl.F.Out,"<tr>"
"<td align=\"center\" valign=\"middle\" colspan=\"7\" class=\"%s\">"
"<td colspan=\"7\" class=\"%s\""
" style=\"text-align:center; vertical-align:middle;\">"
"<input type=\"checkbox\" id=\"AllGroups\" name=\"AllGroups\" value=\"Y\"",
The_ClassFormul[Gbl.Prefs.Theme]);
if (Gbl.Usrs.ClassPhoto.AllGroups)
@ -275,7 +276,9 @@ static void Grp_ShowFormSeveralGrps (Act_Action_t NextAction)
/***** Submit button *****/
fprintf (Gbl.F.Out,"<tr>"
"<td align=\"center\" colspan=\"7\" class=\"%s\"><br />",
"<td colspan=\"7\" class=\"%s\""
" style=\"text-align:center;\">"
"<br />",
The_ClassFormul[Gbl.Prefs.Theme]);
Act_LinkFormSubmit (Txt_Update_students_according_to_selected_groups,The_ClassFormul[Gbl.Prefs.Theme]);
Lay_PutSendIcon ("recycle",Txt_Update_students_according_to_selected_groups,Txt_Update_students);
@ -1148,7 +1151,7 @@ static void Grp_ListGroupTypesForEdition (void)
Txt_Remove_type_of_group);
/* Name of group type */
fprintf (Gbl.F.Out,"<td align=\"left\" valign=\"middle\">");
fprintf (Gbl.F.Out,"<td style=\"text-align:left; vertical-align:middle;\">");
Act_FormStart (ActRenGrpTyp);
Grp_PutParamGrpTypCod (Gbl.CurrentCrs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp].GrpTypCod);
fprintf (Gbl.F.Out,"<input type=\"text\" name=\"GrpTypName\" size=\"20\" maxlength=\"%u\" value=\"%s\""
@ -1160,7 +1163,8 @@ static void Grp_ListGroupTypesForEdition (void)
Gbl.FormId);
/* Is it mandatory to register in any group? */
fprintf (Gbl.F.Out,"<td align=\"center\" valign=\"middle\">");
fprintf (Gbl.F.Out,"<td style=\"text-align:center;"
" vertical-align:middle;\">");
Act_FormStart (ActChgMdtGrpTyp);
Grp_PutParamGrpTypCod (Gbl.CurrentCrs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp].GrpTypCod);
fprintf (Gbl.F.Out,"<select name=\"MandatoryEnrollment\" style=\"width:120px;\""
@ -1181,7 +1185,8 @@ static void Grp_ListGroupTypesForEdition (void)
Txt_It_is_mandatory_to_choose_a_group);
/* Is it possible to register in multiple groups? */
fprintf (Gbl.F.Out,"<td align=\"center\" valign=\"middle\">");
fprintf (Gbl.F.Out,"<td style=\"text-align:center;"
" vertical-align:middle;\">");
Act_FormStart (ActChgMulGrpTyp);
Grp_PutParamGrpTypCod (Gbl.CurrentCrs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp].GrpTypCod);
fprintf (Gbl.F.Out,"<select name=\"MultipleEnrollment\" style=\"width:120px;\""
@ -1202,16 +1207,19 @@ static void Grp_ListGroupTypesForEdition (void)
Txt_A_student_can_belong_to_several_groups);
/* Open time */
fprintf (Gbl.F.Out,"<td align=\"left\" valign=\"middle\">");
fprintf (Gbl.F.Out,"<td style=\"text-align:left;"
" vertical-align:middle;\">");
Act_FormStart (ActChgTimGrpTyp);
Grp_PutParamGrpTypCod (Gbl.CurrentCrs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp].GrpTypCod);
fprintf (Gbl.F.Out,"<table class=\"CELLS_PAD_2\">"
"<tr>"
"<td width=\"16\" align=\"left\" valign=\"middle\">"
"<td style=\"width:16px;"
" text-align:left; vertical-align:middle;\">"
"<img src=\"%s/%s16x16.gif\" title=\"%s\""
" class=\"ICON16x16\" />"
"</td>"
"<td align=\"left\" valign=\"middle\">",
"<td style=\"text-align:left;"
" vertical-align:middle;\">",
Gbl.Prefs.IconsURL,
Gbl.CurrentCrs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp].MustBeOpened ? "time" :
"time-off",
@ -1222,7 +1230,8 @@ static void Grp_ListGroupTypesForEdition (void)
&(Gbl.CurrentCrs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp].OpenTime.Date),
true,false);
fprintf (Gbl.F.Out,"</td>"
"<td align=\"left\" valign=\"middle\">");
"<td style=\"text-align:left;"
" vertical-align:middle;\">");
Dat_WriteFormHourMinute ("OpenHour","OpenMinute",
&(Gbl.CurrentCrs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp].OpenTime.Time),
true,false);
@ -1233,7 +1242,10 @@ static void Grp_ListGroupTypesForEdition (void)
"</td>");
/* Number of groups of this type */
fprintf (Gbl.F.Out,"<td align=\"center\" valign=\"middle\" class=\"DAT\">%u</td>"
fprintf (Gbl.F.Out,"<td class=\"DAT\""
" style=\"text-align:center; vertical-align:middle;\">"
"%u"
"</td>"
"</tr>",
Gbl.CurrentCrs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp].NumGrps);
}
@ -1356,7 +1368,8 @@ static void Grp_ListGroupsForEdition (void)
Gbl.Title);
/* Group type */
fprintf (Gbl.F.Out,"<td align=\"center\" valign=\"middle\">");
fprintf (Gbl.F.Out,"<td style=\"text-align:center;"
" vertical-align:middle;\">");
Act_FormStart (ActChgGrpTyp);
Grp_PutParamGrpCod (Grp->GrpCod);
fprintf (Gbl.F.Out,"<select name=\"GrpTypCod\""
@ -1375,7 +1388,8 @@ static void Grp_ListGroupsForEdition (void)
fprintf (Gbl.F.Out,"</select></form></td>");
/* Group name */
fprintf (Gbl.F.Out,"<td align=\"center\" valign=\"middle\">");
fprintf (Gbl.F.Out,"<td style=\"text-align:center;"
" vertical-align:middle;\">");
Act_FormStart (ActRenGrp);
Grp_PutParamGrpCod (Grp->GrpCod);
fprintf (Gbl.F.Out,"<input type=\"text\" name=\"GrpName\" size=\"40\" maxlength=\"%u\" value=\"%s\""
@ -1385,7 +1399,8 @@ static void Grp_ListGroupsForEdition (void)
MAX_LENGTH_GROUP_NAME,Grp->GrpName,Gbl.FormId);
/* Maximum number of students of the group (row[3]) */
fprintf (Gbl.F.Out,"<td align=\"center\" valign=\"middle\">");
fprintf (Gbl.F.Out,"<td style=\"text-align:center;"
" vertical-align:middle;\">");
Act_FormStart (ActChgMaxStdGrp);
Grp_PutParamGrpCod (Grp->GrpCod);
fprintf (Gbl.F.Out,"<input type=\"text\" name=\"MaxStudents\" size=\"3\" maxlength=\"10\" value=\"");
@ -1396,7 +1411,10 @@ static void Grp_ListGroupsForEdition (void)
Gbl.FormId);
/* Current number of students in this group */
fprintf (Gbl.F.Out,"<td align=\"center\" valign=\"middle\" class=\"DAT\">%d</td>"
fprintf (Gbl.F.Out,"<td class=\"DAT\""
" style=\"text-align:center; vertical-align:middle;\">"
"%d"
"</td>"
"</tr>",
Grp->NumStudents);
}
@ -1461,10 +1479,11 @@ void Grp_ListGrpsToEditAsgAttOrSvy (struct GroupType *GrpTyp,long Cod,Grp_AsgOrS
/* Put checkbox to select the group */
fprintf (Gbl.F.Out,"<tr>"
"<td align=\"left\" valign=\"middle\"");
"<td style=\"text-align:left; vertical-align:middle;");
if (IBelongToThisGroup)
fprintf (Gbl.F.Out," bgcolor=\"%s\"",VERY_LIGHT_BLUE);
fprintf (Gbl.F.Out,"><input type=\"checkbox\" name=\"GrpCods\" value=\"%ld\"",
fprintf (Gbl.F.Out," background-color:%s;",VERY_LIGHT_BLUE);
fprintf (Gbl.F.Out,"\">"
"<input type=\"checkbox\" name=\"GrpCods\" value=\"%ld\"",
Grp->GrpCod);
if (Cod > 0) // Cod == -1L means new assignment or survey
{
@ -1646,10 +1665,11 @@ static unsigned Grp_ListGrpsForChange (struct GroupType *GrpTyp)
/* Put icon to select the group */
fprintf (Gbl.F.Out,"<tr>"
"<td align=\"left\" valign=\"middle\"");
"<td style=\"text-align:left; vertical-align:middle;");
if (IBelongToThisGroup)
fprintf (Gbl.F.Out," bgcolor=\"%s\"",VERY_LIGHT_BLUE);
fprintf (Gbl.F.Out,"><input type=\"");
fprintf (Gbl.F.Out," background-color:%s;",VERY_LIGHT_BLUE);
fprintf (Gbl.F.Out,"\">"
"<input type=\"");
// If user is a student and the enrollment is single
// and there are more than a group, put a radio item
@ -1754,10 +1774,11 @@ static void Grp_ListGrpsToAddOrRemUsrs (struct GroupType *GrpTyp,long UsrCod)
/* Put checkbox to select the group */
fprintf (Gbl.F.Out,"<tr>"
"<td align=\"left\" valign=\"middle\"");
"<td style=\"text-align:left; vertical-align:middle;");
if (UsrBelongsToThisGroup)
fprintf (Gbl.F.Out," bgcolor=\"%s\"",VERY_LIGHT_BLUE);
fprintf (Gbl.F.Out,"><input type=\"checkbox\" name=\"GrpCod%ld\" value=\"%ld\"",
fprintf (Gbl.F.Out," background-color:%s;",VERY_LIGHT_BLUE);
fprintf (Gbl.F.Out,"\">"
"<input type=\"checkbox\" name=\"GrpCod%ld\" value=\"%ld\"",
GrpTyp->GrpTypCod,Grp->GrpCod);
if (UsrBelongsToThisGroup)
fprintf (Gbl.F.Out," checked=\"checked\"");
@ -1807,10 +1828,11 @@ static void Grp_ListGrpsForMultipleSelection (struct GroupType *GrpTyp)
/* Put checkbox to select the group */
fprintf (Gbl.F.Out,"<tr>"
"<td align=\"left\" valign=\"middle\"");
"<td style=\"text-align:left; vertical-align:middle;");
if (IBelongToThisGroup)
fprintf (Gbl.F.Out," bgcolor=\"%s\"",VERY_LIGHT_BLUE);
fprintf (Gbl.F.Out,"><input type=\"checkbox\" name=\"GrpCods\" value=\"%ld\"",
fprintf (Gbl.F.Out," background-color:%s;",VERY_LIGHT_BLUE);
fprintf (Gbl.F.Out,"\">"
"<input type=\"checkbox\" name=\"GrpCods\" value=\"%ld\"",
Grp->GrpCod);
if (Gbl.Usrs.ClassPhoto.AllGroups)
fprintf (Gbl.F.Out," checked=\"checked\"");
@ -1837,7 +1859,7 @@ static void Grp_ListGrpsForMultipleSelection (struct GroupType *GrpTyp)
/* To get the students who don't belong to a type of group, use group code -(GrpTyp->GrpTypCod) */
/* Write checkbox to select the group */
fprintf (Gbl.F.Out,"<tr>"
"<td align=\"left\" valign=\"middle\">"
"<td style=\"text-align:left; vertical-align:middle;\">"
"<input type=\"checkbox\" name=\"GrpCods\" value=\"%ld\"",
-(GrpTyp->GrpTypCod));
if (Gbl.Usrs.ClassPhoto.AllGroups)
@ -1854,18 +1876,25 @@ static void Grp_ListGrpsForMultipleSelection (struct GroupType *GrpTyp)
fprintf (Gbl.F.Out," onclick=\"checkParent(this,'AllGroups')\" /></td>");
/* Column closed/open */
fprintf (Gbl.F.Out,"<td align=\"left\"></td>");
fprintf (Gbl.F.Out,"<td style=\"text-align:left;\">"
"</td>");
/* Group name = students with no group */
fprintf (Gbl.F.Out,"<td align=\"left\" valign=\"middle\" colspan=\"2\" class=\"DAT\">%s&nbsp;</td>",
fprintf (Gbl.F.Out,"<td colspan=\"2\" class=\"DAT\""
" style=\"text-align:left; vertical-align:middle;\">"
"%s&nbsp;"
"</td>",
Txt_students_with_no_group);
/* Number of students who don't belong to any group of this type */
fprintf (Gbl.F.Out,"<td align=\"center\" valign=\"middle\" class=\"DAT\">%u</td>",
fprintf (Gbl.F.Out,"<td class=\"DAT\""
" style=\"text-align:center; vertical-align:middle;\">"
"%u"
"</td>",
Grp_CountNumStdsInNoGrpsOfType (GrpTyp->GrpTypCod));
/* Last column */
fprintf (Gbl.F.Out,"<td align=\"left\"></td>"
fprintf (Gbl.F.Out,"<td></td>"
"</tr>");
}
@ -1883,7 +1912,9 @@ static void Grp_WriteGrpHead (struct GroupType *GrpTyp)
/***** Name of group type *****/
fprintf (Gbl.F.Out,"<tr>"
"<td colspan=\"6\" align=\"left\" class=\"GRP_TITLE\"><br />%s",
"<td colspan=\"6\" class=\"GRP_TITLE\""
" style=\"text-align:left;\">"
"<br />%s",
GrpTyp->GrpTypName);
if (GrpTyp->MustBeOpened)
{
@ -1897,11 +1928,19 @@ static void Grp_WriteGrpHead (struct GroupType *GrpTyp)
/***** Head row with title of each column *****/
fprintf (Gbl.F.Out,"<tr>"
"<td align=\"left\" colspan=\"2\"></td>"
"<td align=\"left\" class=\"TIT_TBL\">%s</td>"
"<td align=\"center\" class=\"TIT_TBL\">%s</td>"
"<td align=\"center\" class=\"TIT_TBL\">%s</td>"
"<td align=\"center\" class=\"TIT_TBL\">%s</td>"
"<td colspan=\"2\"></td>"
"<td class=\"TIT_TBL\" style=\"text-align:left;\">"
"%s"
"</td>"
"<td class=\"TIT_TBL\" style=\"text-align:center;\">"
"%s"
"</td>"
"<td class=\"TIT_TBL\" style=\"text-align:center;\">"
"%s"
"</td>"
"<td class=\"TIT_TBL\" style=\"text-align:center;\">"
"%s"
"</td>"
"</tr>",
Txt_Group,
Txt_Max_BR_students,
@ -1920,10 +1959,12 @@ static void Grp_WriteRowGrp (struct Group *Grp,bool Highlight)
int Vacant;
/***** Write icon to show if group is open or closed *****/
fprintf (Gbl.F.Out,"<td align=\"left\" valign=\"middle\" width=\"12\"");
fprintf (Gbl.F.Out,"<td style=\"width:12px;"
" text-align:left; vertical-align:middle;");
if (Highlight)
fprintf (Gbl.F.Out," bgcolor=\"%s\"",VERY_LIGHT_BLUE);
fprintf (Gbl.F.Out,"><img src=\"%s/%s_off16x16.gif\" alt=\"",
fprintf (Gbl.F.Out," background-color:%s",VERY_LIGHT_BLUE);
fprintf (Gbl.F.Out,"\">"
"<img src=\"%s/%s_off16x16.gif\" alt=\"",
Gbl.Prefs.IconsURL,
Grp->Open ? "open" :
"closed");
@ -1935,30 +1976,39 @@ static void Grp_WriteRowGrp (struct Group *Grp,bool Highlight)
"</td>");
/***** Group name *****/
fprintf (Gbl.F.Out,"<td align=\"left\" valign=\"middle\"");
fprintf (Gbl.F.Out,"<td class=\"DAT\""
" style=\"text-align:left; vertical-align:middle;");
if (Highlight)
fprintf (Gbl.F.Out," bgcolor=\"%s\"",VERY_LIGHT_BLUE);
fprintf (Gbl.F.Out," class=\"DAT\">%s&nbsp;</td>",Grp->GrpName);
fprintf (Gbl.F.Out," background-color:%s;",VERY_LIGHT_BLUE);
fprintf (Gbl.F.Out,"\">"
"%s&nbsp;"
"</td>",
Grp->GrpName);
/***** Max. number of students in this group *****/
fprintf (Gbl.F.Out,"<td align=\"center\" valign=\"middle\"");
fprintf (Gbl.F.Out,"<td class=\"DAT\""
" style=\"text-align:center; vertical-align:middle;");
if (Highlight)
fprintf (Gbl.F.Out," bgcolor=\"%s\"",VERY_LIGHT_BLUE);
fprintf (Gbl.F.Out," class=\"DAT\">");
fprintf (Gbl.F.Out," background-color:%s;",VERY_LIGHT_BLUE);
fprintf (Gbl.F.Out,"\">");
Grp_WriteMaxStdsGrp (Grp->MaxStudents);
fprintf (Gbl.F.Out,"&nbsp;</td>");
fprintf (Gbl.F.Out,"&nbsp;"
"</td>");
/***** Current number of students in this group *****/
fprintf (Gbl.F.Out,"<td align=\"center\" valign=\"middle\"");
fprintf (Gbl.F.Out,"<td class=\"DAT\" style=\"text-align:center; vertical-align:middle;");
if (Highlight)
fprintf (Gbl.F.Out," bgcolor=\"%s\"",VERY_LIGHT_BLUE);
fprintf (Gbl.F.Out," class=\"DAT\">%d</td>",Grp->NumStudents);
fprintf (Gbl.F.Out," background-color:%s;",VERY_LIGHT_BLUE);
fprintf (Gbl.F.Out,"\">"
"%d"
"</td>",
Grp->NumStudents);
/***** Vacants in this group *****/
fprintf (Gbl.F.Out,"<td align=\"center\" valign=\"middle\"");
fprintf (Gbl.F.Out,"<td class=\"DAT\" style=\"text-align:center; vertical-align:middle;");
if (Highlight)
fprintf (Gbl.F.Out," bgcolor=\"%s\"",VERY_LIGHT_BLUE);
fprintf (Gbl.F.Out," class=\"DAT\">");
fprintf (Gbl.F.Out," background-color:%s;",VERY_LIGHT_BLUE);
fprintf (Gbl.F.Out,"\">");
if (Grp->MaxStudents > Grp_MAX_STUDENTS_IN_A_GROUP)
fprintf (Gbl.F.Out,"-");
else
@ -2005,13 +2055,13 @@ static void Grp_PutFormToCreateGroupType (void)
Gbl.Prefs.IconsURL);
/***** Name of group type *****/
fprintf (Gbl.F.Out,"<td align=\"left\" valign=\"middle\">"
fprintf (Gbl.F.Out,"<td style=\"text-align:left; vertical-align:middle;\">"
"<input type=\"text\" name=\"GrpTypName\" size=\"20\" maxlength=\"%u\" value=\"%s\" />"
"</td>",
MAX_LENGTH_GROUP_TYPE_NAME,Gbl.CurrentCrs.Grps.GrpTyp.GrpTypName);
/***** Is it mandatory to register in any groups of this type? *****/
fprintf (Gbl.F.Out,"<td align=\"center\" valign=\"middle\">"
fprintf (Gbl.F.Out,"<td style=\"text-align:center; vertical-align:middle;\">"
"<select name=\"MandatoryEnrollment\" style=\"width:120px;\">"
"<option value=\"N\"");
if (!Gbl.CurrentCrs.Grps.GrpTyp.MandatoryEnrollment)
@ -2027,7 +2077,7 @@ static void Grp_PutFormToCreateGroupType (void)
Txt_It_is_mandatory_to_choose_a_group);
/***** Is it possible to register in multiple groups of this type? *****/
fprintf (Gbl.F.Out,"<td align=\"center\" valign=\"middle\">"
fprintf (Gbl.F.Out,"<td style=\"text-align:center; vertical-align:middle;\">"
"<select name=\"MultipleEnrollment\" style=\"width:120px;\">"
"<option value=\"N\"");
if (!Gbl.CurrentCrs.Grps.GrpTyp.MultipleEnrollment)
@ -2043,14 +2093,15 @@ static void Grp_PutFormToCreateGroupType (void)
Txt_A_student_can_belong_to_several_groups);
/***** Open time *****/
fprintf (Gbl.F.Out,"<td align=\"left\" valign=\"middle\">"
fprintf (Gbl.F.Out,"<td style=\"text-align:left; vertical-align:middle;\">"
"<table class=\"CELLS_PAD_2\">"
"<tr>"
"<td align=\"left\" valign=\"middle\">"
"<td style=\"text-align:left; vertical-align:middle;\">"
"<img src=\"%s/%s16x16.gif\" alt=\"\" title=\"%s\""
" class=\"ICON16x16\" />"
"</td>"
"<td width=\"16\" align=\"left\" valign=\"bottom\">",
"<td style=\"width:16px;"
" text-align:left; vertical-align:bottom;\">",
Gbl.Prefs.IconsURL,
Gbl.CurrentCrs.Grps.GrpTyp.MustBeOpened ? "time" :
"time-off",
@ -2061,7 +2112,7 @@ static void Grp_PutFormToCreateGroupType (void)
&(Gbl.CurrentCrs.Grps.GrpTyp.OpenTime.Date),
false,false);
fprintf (Gbl.F.Out,"</td>"
"<td align=\"left\" valign=\"middle\">");
"<td style=\"text-align:left; vertical-align:middle;\">");
Dat_WriteFormHourMinute ("OpenHour","OpenMinute",
&(Gbl.CurrentCrs.Grps.GrpTyp.OpenTime.Time),
false,false);
@ -2071,12 +2122,12 @@ static void Grp_PutFormToCreateGroupType (void)
"</td>");
/***** Number of groups of this type *****/
fprintf (Gbl.F.Out,"<td align=\"center\" valign=\"middle\" class=\"DAT\"></td>"
fprintf (Gbl.F.Out,"<td></td>"
"</tr>");
/***** Send button *****/
fprintf (Gbl.F.Out,"<tr>"
"<td align=\"center\" colspan=\"6\">"
"<td colspan=\"6\" style=\"text-align:center;\">"
"<input type=\"submit\" value=\"%s\" />"
"</td>"
"</tr>",
@ -2128,7 +2179,7 @@ static void Grp_PutFormToCreateGroup (void)
Gbl.Prefs.IconsURL);
/***** Group type *****/
fprintf (Gbl.F.Out,"<td align=\"center\" valign=\"middle\">"
fprintf (Gbl.F.Out,"<td style=\"text-align:center; vertical-align:middle;\">"
"<select name=\"GrpTypCod\">");
for (NumGrpTyp = 0;
NumGrpTyp < Gbl.CurrentCrs.Grps.GrpTypes.Num;
@ -2145,23 +2196,23 @@ static void Grp_PutFormToCreateGroup (void)
"</td>");
/***** Group name *****/
fprintf (Gbl.F.Out,"<td align=\"center\" valign=\"middle\">"
fprintf (Gbl.F.Out,"<td style=\"text-align:center; vertical-align:middle;\">"
"<input type=\"text\" name=\"GrpName\" size=\"40\" maxlength=\"%u\" value=\"%s\" /></td>",
MAX_LENGTH_GROUP_NAME,Gbl.CurrentCrs.Grps.GrpName);
/***** Maximum number of students *****/
fprintf (Gbl.F.Out,"<td align=\"center\" valign=\"middle\">"
fprintf (Gbl.F.Out,"<td style=\"text-align:center; vertical-align:middle;\">"
"<input type=\"text\" name=\"MaxStudents\" size=\"3\" maxlength=\"10\" value=\"");
Grp_WriteMaxStdsGrp (Gbl.CurrentCrs.Grps.MaxStudents);
fprintf (Gbl.F.Out,"\" /></td>");
/***** Current number of students in this group *****/
fprintf (Gbl.F.Out,"<td align=\"center\" valign=\"middle\" class=\"DAT\"></td>"
fprintf (Gbl.F.Out,"<td></td>"
"</tr>");
/***** Send button *****/
fprintf (Gbl.F.Out,"<tr>"
"<td align=\"center\" colspan=\"7\">"
"<td colspan=\"7\" style=\"text-align:center;\">"
"<input type=\"submit\" value=\"%s\" />"
"</td>"
"</tr>",
@ -4122,7 +4173,8 @@ void Grp_ShowSelectorWhichGrps (void)
WhichGrps <= Grp_ALL_GROUPS;
WhichGrps++)
{
fprintf (Gbl.F.Out,"<td align=\"left\" valign=\"middle\" class=\"DAT\">"
fprintf (Gbl.F.Out,"<td class=\"DAT\""
" style=\"text-align:left; vertical-align:middle;\">"
"<input type=\"radio\" name=\"WhichGrps\" value=\"%u\"",
(unsigned) WhichGrps);
if (WhichGrps == Gbl.CurrentCrs.Grps.WhichGrps)