diff --git a/swad_changelog.h b/swad_changelog.h index 2cd269682..7fce58837 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -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) diff --git a/swad_forum.c b/swad_forum.c index 2f9ff7675..65d69ff4e 100644 --- a/swad_forum.c +++ b/swad_forum.c @@ -857,13 +857,13 @@ static void For_ShowThreadPosts (long ThrCod,char *LastSubject) /* Write thread title */ fprintf (Gbl.F.Out,"" - "" + "" "" ""); IsLastItemInLevel[2] = true; Msg_IndentDependingOnLevel (2,IsLastItemInLevel); - fprintf (Gbl.F.Out,"" - "" + "" + fprintf (Gbl.F.Out,"" + "
 " + "" ""); /***** 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,"" - "" - "" "", @@ -2044,7 +2057,7 @@ static void For_WriteLinkToForum (For_ForumType_t ForumType,Act_Action_t NextAct /***** Start row *****/ fprintf (Gbl.F.Out,"" - "" - "
" + fprintf (Gbl.F.Out,"" "\"\"" ", 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,"
" + "" ""); 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,"" - "", @@ -1042,7 +1043,8 @@ static void For_ShowAForumPost (struct ForumThread *Thr,unsigned PstNum,long Pst "MSG_TIT_BG"); /***** Write subject *****/ - fprintf (Gbl.F.Out,"" - "" - "
" + "" "\"\"" "", + fprintf (Gbl.F.Out,"", 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,"
"); + ""); 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,"" + "" ""); /* Write author */ @@ -1135,7 +1139,11 @@ static void For_ShowAForumPost (struct ForumThread *Thr,unsigned PstNum,long Pst } /***** Write post content *****/ - fprintf (Gbl.F.Out,"
"); + fprintf (Gbl.F.Out,"
" + "
" + ""); 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,"(%s)", Cfg_NETTIQUETE,Txt_Mandatory_rules_to_compose_messages); } - fprintf (Gbl.F.Out,"
 
"); + fprintf (Gbl.F.Out,""); /***** 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,"
", + "", 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,"
", + "", The_ClassFormul[Gbl.Prefs.Theme]); Act_FormStart (ActSeeFor); For_PutAllHiddenParamsForum (); @@ -1714,7 +1726,8 @@ void For_WriteLinkToTopLevelOfForums (void) fprintf (Gbl.F.Out,"\"%s\"" - " %s" + " %s" + "" "" "
" + "" "" ""); @@ -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,"" - "" - "" - "", + "" + "" + "", Txt_MSG_Subject); for (Order = For_FIRST_MSG; Order <= For_LAST_MSG; Order++) { - fprintf (Gbl.F.Out,""); } - fprintf (Gbl.F.Out,"" - "" - "" - "" + fprintf (Gbl.F.Out,"" + "" + "" + "" "", 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,"" - ""); /***** Put an icon with thread status *****/ - fprintf (Gbl.F.Out,""); /***** Write subject and links to thread pages *****/ - fprintf (Gbl.F.Out,"", + fprintf (Gbl.F.Out,"", Style, ThisThreadIsInMyClipboard ? LIGHT_GREEN : Gbl.ColorRows[Gbl.RowEvenOdd]); } /***** Write number of posts in this thread *****/ - fprintf (Gbl.F.Out,"", + fprintf (Gbl.F.Out,"", Style, ThisThreadIsInMyClipboard ? LIGHT_GREEN : Gbl.ColorRows[Gbl.RowEvenOdd], Thr.NumPosts); /***** Write number of new posts in this thread *****/ - fprintf (Gbl.F.Out,"", + fprintf (Gbl.F.Out,"", 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,"", + fprintf (Gbl.F.Out,"", Style, ThisThreadIsInMyClipboard ? LIGHT_GREEN : Gbl.ColorRows[Gbl.RowEvenOdd], Thr.NumWriters); /***** Write number of users who have read this thread *****/ - fprintf (Gbl.F.Out,"" + fprintf (Gbl.F.Out,"" "", Style, ThisThreadIsInMyClipboard ? LIGHT_GREEN : @@ -3454,8 +3503,9 @@ void For_WriteFormForumPst (bool IsReply,long ThrCod,const char *Subject) fprintf (Gbl.F.Out,"
" "
"); + fprintf (Gbl.F.Out,""); /* 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,"",Style); + fprintf (Gbl.F.Out,"", + 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,"
  %s" + " " + "" + " " + "" + "%s" + ""); + fprintf (Gbl.F.Out,""); Act_FormStart (For_ActionsSeeFor[Gbl.Forum.ForumType]); Pag_PutHiddenParamPagNum (PaginationThrs.CurrentPage); For_PutParamWhichForum (); @@ -2404,10 +2427,18 @@ void For_ShowForumThrs (void) "" "%s%s%s%s" + "%s" + "" + "%s" + "" + "%s" + "" + "%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,"" + fprintf (Gbl.F.Out,"" "\"\"", ThisThreadIsInMyClipboard ? LIGHT_GREEN : @@ -3083,7 +3116,8 @@ void For_ListForumThrs (long ThrCods[Pag_ITEMS_PER_PAGE],struct Pagination *Pagi fprintf (Gbl.F.Out,"", + fprintf (Gbl.F.Out,"", 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,"", + fprintf (Gbl.F.Out,"", 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,"" + "%u " + "%u " + "%u " + "%u " + "%u " + "%u " + "%u " + "%u " + "
" "" - "" - "" + "", 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,"" - "" ""); fprintf (Gbl.F.Out,"" - "" - "" + "" + "" "" "
%s" + "" + "%s" " (%s)
"); + ""); Msg_WriteLinkToNetiquette (); fprintf (Gbl.F.Out,"
%s: " + "" + "%s: " + "" "" + "" + "%s: " + "" + "" "
" diff --git a/swad_group.c b/swad_group.c index 9a6e141f9..ad10b0786 100644 --- a/swad_group.c +++ b/swad_group.c @@ -249,7 +249,8 @@ static void Grp_ShowFormSeveralGrps (Act_Action_t NextAction) /***** Select all groups *****/ fprintf (Gbl.F.Out,"
" + "" "" - "
", + "
" + "
", 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,"
"); + fprintf (Gbl.F.Out,""); Act_FormStart (ActRenGrpTyp); Grp_PutParamGrpTypCod (Gbl.CurrentCrs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp].GrpTypCod); fprintf (Gbl.F.Out,""); + fprintf (Gbl.F.Out,""); Act_FormStart (ActChgMdtGrpTyp); Grp_PutParamGrpTypCod (Gbl.CurrentCrs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp].GrpTypCod); fprintf (Gbl.F.Out,""); Act_FormStart (ActChgMulGrpTyp); Grp_PutParamGrpTypCod (Gbl.CurrentCrs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp].GrpTypCod); fprintf (Gbl.F.Out,""); Act_FormStart (ActChgTimGrpTyp); Grp_PutParamGrpTypCod (Gbl.CurrentCrs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp].GrpTypCod); fprintf (Gbl.F.Out,"" "" - "" - "" - ""); /* Number of groups of this type */ - fprintf (Gbl.F.Out,"" + fprintf (Gbl.F.Out,"" "", Gbl.CurrentCrs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp].NumGrps); } @@ -1356,7 +1368,8 @@ static void Grp_ListGroupsForEdition (void) Gbl.Title); /* Group type */ - fprintf (Gbl.F.Out,""); /* Group name */ - fprintf (Gbl.F.Out,"" + fprintf (Gbl.F.Out,"" "", 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,"" - "" - "" - "" - ""); /* Column closed/open */ - fprintf (Gbl.F.Out,""); + fprintf (Gbl.F.Out,""); /* Group name = students with no group */ - fprintf (Gbl.F.Out,"", + fprintf (Gbl.F.Out,"", Txt_students_with_no_group); /* Number of students who don't belong to any group of this type */ - fprintf (Gbl.F.Out,"", + fprintf (Gbl.F.Out,"", Grp_CountNumStdsInNoGrpsOfType (GrpTyp->GrpTypCod)); /* Last column */ - fprintf (Gbl.F.Out,"" + fprintf (Gbl.F.Out,"" ""); } @@ -1883,7 +1912,9 @@ static void Grp_WriteGrpHead (struct GroupType *GrpTyp) /***** Name of group type *****/ fprintf (Gbl.F.Out,"" - "" - "" - "" - "" - "" - "" + "" + "" + "" + "" + "" "", 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,""); /***** Group name *****/ - fprintf (Gbl.F.Out,"",Grp->GrpName); + fprintf (Gbl.F.Out," background-color:%s;",VERY_LIGHT_BLUE); + fprintf (Gbl.F.Out,"\">" + "%s " + "", + Grp->GrpName); /***** Max. number of students in this group *****/ - fprintf (Gbl.F.Out,""); + fprintf (Gbl.F.Out," " + ""); /***** Current number of students in this group *****/ - fprintf (Gbl.F.Out,"",Grp->NumStudents); + fprintf (Gbl.F.Out," background-color:%s;",VERY_LIGHT_BLUE); + fprintf (Gbl.F.Out,"\">" + "%d" + "", + Grp->NumStudents); /***** Vacants in this group *****/ - fprintf (Gbl.F.Out,"", 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,"
" + "" "" "", + "", 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,""); + ""); Dat_WriteFormHourMinute ("OpenHour","OpenMinute", &(Gbl.CurrentCrs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp].OpenTime.Time), true,false); @@ -1233,7 +1242,10 @@ static void Grp_ListGroupTypesForEdition (void) "%u" + "%u" + "
"); + fprintf (Gbl.F.Out,""); Act_FormStart (ActChgGrpTyp); Grp_PutParamGrpCod (Grp->GrpCod); fprintf (Gbl.F.Out,""); + fprintf (Gbl.F.Out,""); Act_FormStart (ActRenGrp); Grp_PutParamGrpCod (Grp->GrpCod); fprintf (Gbl.F.Out,"GrpName,Gbl.FormId); /* Maximum number of students of the group (row[3]) */ - fprintf (Gbl.F.Out,""); + fprintf (Gbl.F.Out,""); Act_FormStart (ActChgMaxStdGrp); Grp_PutParamGrpCod (Grp->GrpCod); fprintf (Gbl.F.Out,"%d" + "%d" + "
" + "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,"
" + "" - "" + "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,"
" + "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,"
" + "" "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')\" />" + "%s " + "%s " + "%u" + "%u" + "

%s", + "
" + "
%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,"
%s%s%s%s" + "%s" + "" + "%s" + "" + "%s" + "" + "%s" + "
\""," + "\"",Open ? "open" : "closed"); @@ -1935,30 +1976,39 @@ static void Grp_WriteRowGrp (struct Group *Grp,bool Highlight) "%s "); + fprintf (Gbl.F.Out," background-color:%s;",VERY_LIGHT_BLUE); + fprintf (Gbl.F.Out,"\">"); Grp_WriteMaxStdsGrp (Grp->MaxStudents); - fprintf (Gbl.F.Out," %d"); + 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,"" + fprintf (Gbl.F.Out,"" "" "" + fprintf (Gbl.F.Out,"" "" "" "" "" - "" - "" - ""); /***** Number of groups of this type *****/ - fprintf (Gbl.F.Out,"" + fprintf (Gbl.F.Out,"" ""); /***** Send button *****/ fprintf (Gbl.F.Out,"" - "" "", @@ -2128,7 +2179,7 @@ static void Grp_PutFormToCreateGroup (void) Gbl.Prefs.IconsURL); /***** Group type *****/ - fprintf (Gbl.F.Out,""); /***** Group name *****/ - fprintf (Gbl.F.Out,"", MAX_LENGTH_GROUP_NAME,Gbl.CurrentCrs.Grps.GrpName); /***** Maximum number of students *****/ - fprintf (Gbl.F.Out,""); /***** Current number of students in this group *****/ - fprintf (Gbl.F.Out,"" + fprintf (Gbl.F.Out,"" ""); /***** Send button *****/ fprintf (Gbl.F.Out,"" - "" "", @@ -4122,7 +4173,8 @@ void Grp_ShowSelectorWhichGrps (void) WhichGrps <= Grp_ALL_GROUPS; WhichGrps++) { - fprintf (Gbl.F.Out,"
" + "" "\"\"" "", + "", 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,""); + ""); Dat_WriteFormHourMinute ("OpenHour","OpenMinute", &(Gbl.CurrentCrs.Grps.GrpTyp.OpenTime.Time), false,false); @@ -2071,12 +2122,12 @@ static void Grp_PutFormToCreateGroupType (void) "
" + "" "" "
" + fprintf (Gbl.F.Out,"" "" + fprintf (Gbl.F.Out,"" "" + fprintf (Gbl.F.Out,"" "
" + "" "" "
" + fprintf (Gbl.F.Out,"" "