From d0c4ec10b4150bab69b3db7008f142ef6810c24f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonio=20Ca=C3=B1as=20Vargas?= Date: Fri, 26 Dec 2014 16:55:46 +0100 Subject: [PATCH] Version 14.41 --- swad_changelog.h | 5 +- swad_group.c | 14 +-- swad_timetable.c | 66 ++++++++--- swad_user.c | 283 +++++++++++++++++++++++++++++++++-------------- swad_zip.c | 18 ++- 5 files changed, 269 insertions(+), 117 deletions(-) diff --git a/swad_changelog.h b/swad_changelog.h index 3e5fc6b1c..825a0df37 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -35,12 +35,13 @@ /****************************** Public constants *****************************/ /*****************************************************************************/ -#define Log_PLATFORM_VERSION "SWAD 14.40.11 (2014/12/25)" +#define Log_PLATFORM_VERSION "SWAD 14.41 (2014/12/26)" // 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.12 :Dic 25, 2014 Changes in HTML and CSS to validate HTML5 in W3C validator. (173478 lines) + Version 14.41 :Dic 26, 2014 Changes in HTML and CSS to validate HTML5 in W3C validator. (173630 lines) + Version 14.40.12 :Dic 26, 2014 Changes in HTML and CSS to validate HTML5 in W3C validator. (173478 lines) Version 14.40.11 :Dic 25, 2014 Changes in HTML and CSS to validate HTML5 in W3C validator. (173288 lines) Version 14.40.10 :Dic 25, 2014 Changes in HTML and CSS to validate HTML5 in W3C validator. (173201 lines) Version 14.40.9 :Dic 25, 2014 Changes in HTML and CSS to validate HTML5 in W3C validator. (172986 lines) diff --git a/swad_group.c b/swad_group.c index ad10b0786..583597983 100644 --- a/swad_group.c +++ b/swad_group.c @@ -4167,24 +4167,24 @@ void Grp_ShowSelectorWhichGrps (void) extern const char *Txt_Show_WHICH_groups[2]; Grp_WhichGroups_t WhichGrps; - fprintf (Gbl.F.Out,"" - ""); + fprintf (Gbl.F.Out,"", + " %s" + "", Gbl.FormId,Txt_Show_WHICH_groups[WhichGrps]); } - fprintf (Gbl.F.Out,"" - "
" + fprintf (Gbl.F.Out,"
  • " "" - " %s
  • "); + fprintf (Gbl.F.Out,""); } /*****************************************************************************/ diff --git a/swad_timetable.c b/swad_timetable.c index c3c791aa5..602c246e5 100644 --- a/swad_timetable.c +++ b/swad_timetable.c @@ -136,7 +136,8 @@ static void TT_ShowTimeTableGrpsSelected (void) extern const char *Txt_All_groups; fprintf (Gbl.F.Out,"" - ""); + ""); switch (Gbl.CurrentCrs.Grps.WhichGrps) { case Grp_ONLY_MY_GROUPS: @@ -288,7 +289,7 @@ void TT_ShowClassTimeTable (void) { /***** Select whether show only my groups or all groups *****/ fprintf (Gbl.F.Out,"" - ""); + ""); Act_FormStart (Gbl.CurrentAct); Grp_ShowSelectorWhichGrps (); fprintf (Gbl.F.Out,"" @@ -301,7 +302,7 @@ void TT_ShowClassTimeTable (void) /***** Show the time table *****/ fprintf (Gbl.F.Out,"" - ""); + ""); TT_ShowTimeTable (TimeTableType,Gbl.Usrs.Me.UsrDat.UsrCod); fprintf (Gbl.F.Out,"" ""); @@ -332,7 +333,7 @@ void TT_EditCrsTimeTable (void) /***** Editable time table *****/ fprintf (Gbl.F.Out,"" - ""); + ""); TT_ShowTimeTable (TT_COURSE_TIMETABLE,Gbl.Usrs.Me.UsrDat.UsrCod); fprintf (Gbl.F.Out,"" ""); @@ -362,7 +363,7 @@ void TT_ShowMyTutTimeTable (void) /***** Time table *****/ Lay_StartRoundFrameTable10 ("98%",0,Txt_Office_hours); fprintf (Gbl.F.Out,"" - ""); + ""); TT_ShowTimeTable (TT_TUTOR_TIMETABLE,Gbl.Usrs.Me.UsrDat.UsrCod); fprintf (Gbl.F.Out,"" ""); @@ -786,12 +787,18 @@ static void TT_DrawTimeTable (void) /***** Row with day names *****/ fprintf (Gbl.F.Out,"" - "%u:00", + "" + "%u:00" + "", TT_PERCENT_WIDTH_OF_AN_HOUR_COLUMN,TT_START_HOUR); TT_DrawCellAlignTimeTable (); TT_TimeTableDrawDaysCells (); TT_DrawCellAlignTimeTable (); - fprintf (Gbl.F.Out,"%u:00" + fprintf (Gbl.F.Out,"" + "%u:00" + "" "", TT_PERCENT_WIDTH_OF_AN_HOUR_COLUMN,TT_START_HOUR); @@ -809,7 +816,11 @@ static void TT_DrawTimeTable (void) /* Hour */ if (Hour % 2) - fprintf (Gbl.F.Out,"%2u:00", + fprintf (Gbl.F.Out,"" + "%2u:00" + "", TT_PERCENT_WIDTH_OF_AN_HOUR_COLUMN,TT_START_HOUR + (Hour+1)/2); /* Empty column used to adjust height */ @@ -864,7 +875,11 @@ static void TT_DrawTimeTable (void) /* Hour */ if (Hour % 2) - fprintf (Gbl.F.Out,"%2u:00", + fprintf (Gbl.F.Out,"" + "%2u:00" + "", TT_PERCENT_WIDTH_OF_AN_HOUR_COLUMN,TT_START_HOUR + (Hour+1)/2); fprintf (Gbl.F.Out,""); @@ -898,7 +913,10 @@ static void TT_TimeTableDrawAdjustRow (void) unsigned Minicolumn; fprintf (Gbl.F.Out,"" - " ", + "" + " " + "", TT_PERCENT_WIDTH_OF_AN_HOUR_COLUMN); TT_DrawCellAlignTimeTable (); for (Day = 0; @@ -907,10 +925,16 @@ static void TT_TimeTableDrawAdjustRow (void) for (Minicolumn = 0; Minicolumn < TT_NUM_MINICOLUMNS_PER_DAY; Minicolumn++) - fprintf (Gbl.F.Out," ", + fprintf (Gbl.F.Out,"" + " " + "", TT_PERCENT_WIDTH_OF_A_MINICOLUMN); TT_DrawCellAlignTimeTable (); - fprintf (Gbl.F.Out," " + fprintf (Gbl.F.Out,"" + " " + "" "", TT_PERCENT_WIDTH_OF_AN_HOUR_COLUMN); } @@ -927,8 +951,12 @@ static void TT_TimeTableDrawDaysCells (void) for (Day = 0; Day < TT_DAYS; Day++) - fprintf (Gbl.F.Out,"%s", - TT_PERCENT_WIDTH_OF_A_DAY,TT_NUM_MINICOLUMNS_PER_DAY,Txt_DAYS_CAPS[Day]); + fprintf (Gbl.F.Out,"" + "%s" + "", + TT_NUM_MINICOLUMNS_PER_DAY,TT_PERCENT_WIDTH_OF_A_DAY, + Txt_DAYS_CAPS[Day]); } /*****************************************************************************/ @@ -992,7 +1020,10 @@ static unsigned TT_TimeTableCalculateColsToDraw (unsigned Day,unsigned Hour) static void TT_DrawCellAlignTimeTable (void) { - fprintf (Gbl.F.Out," ", + fprintf (Gbl.F.Out,"" + " " + "", TT_PERCENT_WIDTH_OF_A_SEPARATION_COLUMN); } @@ -1080,11 +1111,12 @@ static void TT_TimeTableDrawCell (unsigned Day,unsigned Hour,unsigned Column,uns } /***** Cell start *****/ - fprintf (Gbl.F.Out,""); + fprintf (Gbl.F.Out,"\" style=\"text-align:center;" + " vertical-align:middle;\">"); /***** Form to modify this cell *****/ if (TimeTableView == TT_CRS_EDIT) diff --git a/swad_user.c b/swad_user.c index 7c6c60fc5..371d8e1a8 100644 --- a/swad_user.c +++ b/swad_user.c @@ -1263,22 +1263,24 @@ void Usr_WriteFormLogin (void) /***** User's ID/nickname and password *****/ fprintf (Gbl.F.Out,"" - "" - "%s:" - "" - "" - "" - "" + "" + "%s:" + "" + "" + "" + "" "" "" - "" - "%s:" - "" - "" - "" - "" + "" + "%s:" + "" + "" + "" + "" "", The_ClassFormul[Gbl.Prefs.Theme], Txt_nick_email_or_ID, @@ -1290,7 +1292,7 @@ void Usr_WriteFormLogin (void) /***** Send button and form end *****/ fprintf (Gbl.F.Out,"" - "" + "" "" "" "", @@ -2430,7 +2432,9 @@ static void Usr_WriteRowGstMainData (unsigned NumUsr,struct UsrData *UsrDat) /***** Checkbox to select user *****/ // Two colors are used alternatively to better distinguish the rows BgColor = Gbl.ColorRows[Gbl.RowEvenOdd]; - fprintf (Gbl.F.Out,"",BgColor); + fprintf (Gbl.F.Out,"", + BgColor); Usr_PutCheckboxToSelectUser (Rol_ROLE_GUEST,UsrDat->EncryptedUsrCod,false); fprintf (Gbl.F.Out,""); @@ -2443,13 +2447,17 @@ static void Usr_WriteRowGstMainData (unsigned NumUsr,struct UsrData *UsrDat) Gbl.Prefs.IconsURL); /***** Write number of user in the list *****/ - fprintf (Gbl.F.Out," %u ", + fprintf (Gbl.F.Out,"" + " %u " + "", BgColor,NumUsr); if (Gbl.Usrs.Listing.WithPhotos) { /***** Show student's photo *****/ - fprintf (Gbl.F.Out,"",BgColor); + fprintf (Gbl.F.Out,"", + BgColor); ShowPhoto = Pho_ShowUsrPhotoIsAllowed (UsrDat,PhotoURL); Pho_ShowUsrPhoto (UsrDat, ShowPhoto ? PhotoURL : @@ -2463,10 +2471,11 @@ static void Usr_WriteRowGstMainData (unsigned NumUsr,struct UsrData *UsrDat) Usr_RestrictLengthMainData (true,UsrDat,MailLink); /****** Write user's IDs ******/ - fprintf (Gbl.F.Out,"", - BgColor, + fprintf (Gbl.F.Out,"", UsrDat->Accepted ? "DAT_SMALL_N" : - "DAT_SMALL"); + "DAT_SMALL", + BgColor); ID_WriteUsrIDs (UsrDat,(Gbl.Usrs.Me.LoggedRole >= Rol_ROLE_TEACHER)); fprintf (Gbl.F.Out,""); @@ -2515,7 +2524,9 @@ void Usr_WriteRowStdMainData (unsigned NumUsr,struct UsrData *UsrDat,bool PutChe Gbl.ColorRows[Gbl.RowEvenOdd]; if (PutCheckboxToSelectUsr) { - fprintf (Gbl.F.Out,"",BgColor); + fprintf (Gbl.F.Out,"", + BgColor); Usr_PutCheckboxToSelectUser (Rol_ROLE_STUDENT,UsrDat->EncryptedUsrCod,UsrIsTheMsgSender); fprintf (Gbl.F.Out,""); } @@ -2537,16 +2548,20 @@ void Usr_WriteRowStdMainData (unsigned NumUsr,struct UsrData *UsrDat,bool PutChe Txt_Enrollment_not_confirmed); /***** Write number of student in the list *****/ - fprintf (Gbl.F.Out," %u ", - BgColor, + fprintf (Gbl.F.Out,"" + " %u " + "", UsrDat->Accepted ? "DAT_SMALL_N" : "DAT_SMALL", + BgColor, NumUsr); if (Gbl.Usrs.Listing.WithPhotos) { /***** Show student's photo *****/ - fprintf (Gbl.F.Out,"",BgColor); + fprintf (Gbl.F.Out,"", + BgColor); ShowPhoto = Pho_ShowUsrPhotoIsAllowed (UsrDat,PhotoURL); Pho_ShowUsrPhoto (UsrDat, ShowPhoto ? PhotoURL : @@ -2560,10 +2575,11 @@ void Usr_WriteRowStdMainData (unsigned NumUsr,struct UsrData *UsrDat,bool PutChe Usr_RestrictLengthMainData (ShowEmail,UsrDat,MailLink); /****** Write user's ID ******/ - fprintf (Gbl.F.Out,"", - BgColor, + fprintf (Gbl.F.Out,"", UsrDat->Accepted ? "DAT_SMALL_N" : - "DAT_SMALL"); + "DAT_SMALL", + BgColor); ID_WriteUsrIDs (UsrDat,(Gbl.Usrs.Me.LoggedRole >= Rol_ROLE_TEACHER)); fprintf (Gbl.F.Out,""); @@ -2603,7 +2619,8 @@ static void Usr_WriteRowGstAllData (struct UsrData *UsrDat) if (Gbl.Usrs.Listing.WithPhotos) { /***** Show guest's photo *****/ - fprintf (Gbl.F.Out,"",BgColor); + fprintf (Gbl.F.Out,"", + BgColor); ShowPhoto = Pho_ShowUsrPhotoIsAllowed (UsrDat,PhotoURL); Pho_ShowUsrPhoto (UsrDat, ShowPhoto ? PhotoURL : @@ -2614,7 +2631,8 @@ static void Usr_WriteRowGstAllData (struct UsrData *UsrDat) } /****** Write user's ID ******/ - fprintf (Gbl.F.Out,"", + fprintf (Gbl.F.Out,"", BgColor); ID_WriteUsrIDs (UsrDat,true); fprintf (Gbl.F.Out," "); @@ -2707,7 +2725,8 @@ void Usr_WriteRowStdAllData (struct UsrData *UsrDat,char *GroupNames) if (Gbl.Usrs.Listing.WithPhotos) { /***** Show student's photo *****/ - fprintf (Gbl.F.Out,"",BgColor); + fprintf (Gbl.F.Out,"", + BgColor); ShowPhoto = Pho_ShowUsrPhotoIsAllowed (UsrDat,PhotoURL); Pho_ShowUsrPhoto (UsrDat, ShowPhoto ? PhotoURL : @@ -2718,10 +2737,11 @@ void Usr_WriteRowStdAllData (struct UsrData *UsrDat,char *GroupNames) } /****** Write user's ID ******/ - fprintf (Gbl.F.Out,"", - BgColor, + fprintf (Gbl.F.Out,"", UsrDat->Accepted ? "DAT_SMALL_N" : - "DAT_SMALL"); + "DAT_SMALL", + BgColor); ID_WriteUsrIDs (UsrDat,(Gbl.Usrs.Me.LoggedRole >= Rol_ROLE_TEACHER)); fprintf (Gbl.F.Out," "); @@ -2830,7 +2850,9 @@ static void Usr_WriteRowTchMainData (unsigned NumUsr,struct UsrData *UsrDat,bool Gbl.ColorRows[Gbl.RowEvenOdd]; // Two colors are used alternatively to better distinguish the rows if (PutCheckboxToSelectUsr) { - fprintf (Gbl.F.Out,"",BgColor); + fprintf (Gbl.F.Out,"", + BgColor); Usr_PutCheckboxToSelectUser (Rol_ROLE_TEACHER,UsrDat->EncryptedUsrCod,UsrIsTheMsgSender); fprintf (Gbl.F.Out,""); } @@ -2841,7 +2863,8 @@ static void Usr_WriteRowTchMainData (unsigned NumUsr,struct UsrData *UsrDat,bool fprintf (Gbl.F.Out,"BM_SEL"); else fprintf (Gbl.F.Out,"BM%d",Gbl.RowEvenOdd); - fprintf (Gbl.F.Out,"\">" + "\"\"" "", Gbl.Prefs.IconsURL, @@ -2851,13 +2874,17 @@ static void Usr_WriteRowTchMainData (unsigned NumUsr,struct UsrData *UsrDat,bool Txt_Enrollment_not_confirmed); /***** Write number of user *****/ - fprintf (Gbl.F.Out," %u ", + fprintf (Gbl.F.Out,"" + " %u " + "", BgColor,NumUsr); if (Gbl.Usrs.Listing.WithPhotos) { /***** Show teacher's photo *****/ - fprintf (Gbl.F.Out,"",BgColor); + fprintf (Gbl.F.Out,"", + BgColor); ShowPhoto = Pho_ShowUsrPhotoIsAllowed (UsrDat,PhotoURL); Pho_ShowUsrPhoto (UsrDat, ShowPhoto ? PhotoURL : @@ -2871,10 +2898,11 @@ static void Usr_WriteRowTchMainData (unsigned NumUsr,struct UsrData *UsrDat,bool Usr_RestrictLengthMainData (ShowEmail,UsrDat,MailLink); /****** Write the user's ID ******/ - fprintf (Gbl.F.Out,"", - BgColor, + fprintf (Gbl.F.Out,"", UsrDat->Accepted ? "DAT_SMALL_N" : - "DAT_SMALL"); + "DAT_SMALL", + BgColor); ID_WriteUsrIDs (UsrDat,ID_ICanSeeTeacherID (UsrDat)); fprintf (Gbl.F.Out," "); fprintf (Gbl.F.Out,""); @@ -2916,7 +2944,8 @@ void Usr_WriteRowTchAllData (struct UsrData *UsrDat) if (Gbl.Usrs.Listing.WithPhotos) { /***** Show teacher's photo *****/ - fprintf (Gbl.F.Out,"",BgColor); + fprintf (Gbl.F.Out,"", + BgColor); ShowPhoto = Pho_ShowUsrPhotoIsAllowed (UsrDat,PhotoURL); Pho_ShowUsrPhoto (UsrDat, ShowPhoto ? PhotoURL : @@ -2927,10 +2956,11 @@ void Usr_WriteRowTchAllData (struct UsrData *UsrDat) } /****** Write the user's ID ******/ - fprintf (Gbl.F.Out,"", - BgColor, + fprintf (Gbl.F.Out,"", UsrDat->Accepted ? "DAT_SMALL_N" : - "DAT_SMALL"); + "DAT_SMALL", + BgColor); ID_WriteUsrIDs (UsrDat,ID_ICanSeeTeacherID (UsrDat)); fprintf (Gbl.F.Out," "); @@ -2989,12 +3019,17 @@ void Usr_WriteRowAdmData (unsigned NumUsr,struct UsrData *UsrDat) fprintf (Gbl.F.Out,""); /***** Write number of user *****/ - fprintf (Gbl.F.Out," %u ",BgColor,NumUsr); + fprintf (Gbl.F.Out,"" + " %u " + "", + BgColor,NumUsr); if (Gbl.Usrs.Listing.WithPhotos) { /***** Show administrator's photo *****/ - fprintf (Gbl.F.Out,"",BgColor); + fprintf (Gbl.F.Out,"", + BgColor); ShowPhoto = Pho_ShowUsrPhotoIsAllowed (UsrDat,PhotoURL); Pho_ShowUsrPhoto (UsrDat, ShowPhoto ? PhotoURL : @@ -3008,10 +3043,11 @@ void Usr_WriteRowAdmData (unsigned NumUsr,struct UsrData *UsrDat) Usr_RestrictLengthMainData (true,UsrDat,MailLink); /****** Write the user's ID ******/ - fprintf (Gbl.F.Out,"", - BgColor, + fprintf (Gbl.F.Out,"", UsrDat->Accepted ? "DAT_SMALL_N" : - "DAT_SMALL"); + "DAT_SMALL", + BgColor); ID_WriteUsrIDs (UsrDat,(Gbl.Usrs.Me.LoggedRole == Rol_ROLE_SUPERUSER)); fprintf (Gbl.F.Out," "); @@ -3089,11 +3125,13 @@ static void Usr_WriteMainUsrDataExceptUsrID (struct UsrData *UsrDat,const char * static void Usr_WriteUsrData (const char *BgColor,const char *Data,const char *Link,bool NonBreak,bool Accepted) { - fprintf (Gbl.F.Out,"",BgColor, + fprintf (Gbl.F.Out,"", Accepted ? (NonBreak ? "DAT_SMALL_NOBR_N" : "DAT_SMALL_N") : (NonBreak ? "DAT_SMALL_NOBR" : - "DAT_SMALL")); + "DAT_SMALL"), + BgColor); if (Link != NULL) fprintf (Gbl.F.Out,"",Link); fprintf (Gbl.F.Out,"%s",Data); @@ -4528,7 +4566,8 @@ void Usr_ShowFormsToSelectUsrListType (Act_Action_t NextAction) /***** 1st row *****/ /* Put a button to select USR_CLASS_ROOM */ fprintf (Gbl.F.Out,"" - "", + "", Gbl.Usrs.Me.ListType == Usr_CLASS_PHOTO ? "USR_LIST_TYPE_ON" : "USR_LIST_TYPE_OFF"); Usr_FormToSelectUsrListType (NextAction,Usr_CLASS_PHOTO); @@ -4547,7 +4586,8 @@ void Usr_ShowFormsToSelectUsrListType (Act_Action_t NextAction) /***** 2nd row *****/ /* Put a button to select Usr_LIST */ fprintf (Gbl.F.Out,"" - "", + "", Gbl.Usrs.Me.ListType == Usr_LIST ? "USR_LIST_TYPE_ON" : "USR_LIST_TYPE_OFF"); Usr_FormToSelectUsrListType (NextAction,Usr_LIST); @@ -4675,7 +4715,8 @@ void Usr_PutCheckboxToSelectAllTheUsers (Rol_Role_t Role) Usr_Sex_t Sex; fprintf (Gbl.F.Out,"" - "", + "", Usr_GetColumnsForSelectUsrs (),VERY_LIGHT_BLUE); if (Role == Rol_ROLE_STUDENT) { @@ -4817,7 +4858,10 @@ static void Usr_ListMainDataGsts (bool PutCheckBoxToSelectUsr) /* First column used for selection */ if (PutCheckBoxToSelectUsr) - fprintf (Gbl.F.Out," ", + fprintf (Gbl.F.Out,"" + " " + "", VERY_LIGHT_BLUE); /* Columns for the data */ @@ -4825,7 +4869,10 @@ static void Usr_ListMainDataGsts (bool PutCheckBoxToSelectUsr) NumCol < Usr_NUM_MAIN_FIELDS_DATA_USR; NumCol++) if (NumCol != 2 || Gbl.Usrs.Listing.WithPhotos) // Skip photo column if I don't want this column - fprintf (Gbl.F.Out,"%s ", + fprintf (Gbl.F.Out,"" + "%s " + "", VERY_LIGHT_BLUE,Usr_UsrDatMainFieldNames[NumCol]); /* End row */ @@ -4885,7 +4932,8 @@ static void Usr_ListMainDataStds (bool PutCheckBoxToSelectUsr) if (!Gbl.Usrs.ClassPhoto.AllGroups) { fprintf (Gbl.F.Out,"" - "", + "", 1 + Usr_NUM_MAIN_FIELDS_DATA_USR); Grp_WriteNamesOfSelectedGrps (); fprintf (Gbl.F.Out,"" @@ -4898,7 +4946,10 @@ static void Usr_ListMainDataStds (bool PutCheckBoxToSelectUsr) /* First column used for selection */ if (PutCheckBoxToSelectUsr) - fprintf (Gbl.F.Out," ", + fprintf (Gbl.F.Out,"" + " " + "", VERY_LIGHT_BLUE); /* Columns for the data */ @@ -4906,7 +4957,10 @@ static void Usr_ListMainDataStds (bool PutCheckBoxToSelectUsr) NumCol < Usr_NUM_MAIN_FIELDS_DATA_USR; NumCol++) if (NumCol != 2 || Gbl.Usrs.Listing.WithPhotos) // Skip photo column if I don't want this column - fprintf (Gbl.F.Out,"%s ", + fprintf (Gbl.F.Out,"" + "%s " + "", VERY_LIGHT_BLUE,Usr_UsrDatMainFieldNames[NumCol]); /* End row */ @@ -4967,7 +5021,10 @@ static void Usr_ListMainDataTchs (bool PutCheckBoxToSelectUsr) /* First column used for selection */ if (PutCheckBoxToSelectUsr) - fprintf (Gbl.F.Out," ", + fprintf (Gbl.F.Out,"" + " " + "", VERY_LIGHT_BLUE); /* Columns for the data */ @@ -4975,7 +5032,10 @@ static void Usr_ListMainDataTchs (bool PutCheckBoxToSelectUsr) NumCol < NumColumns; NumCol++) if (NumCol != 2 || Gbl.Usrs.Listing.WithPhotos) // Skip photo column if I don't want this column - fprintf (Gbl.F.Out,"%s ", + fprintf (Gbl.F.Out,"" + "%s " + "", VERY_LIGHT_BLUE,Usr_UsrDatMainFieldNames[NumCol]); /* End row */ @@ -5079,7 +5139,10 @@ void Usr_ListAllDataGsts (void) 1); NumCol < NumColumnsCommonCard; NumCol++) - fprintf (Gbl.F.Out,"%s ", + fprintf (Gbl.F.Out,"" + "%s " + "", VERY_LIGHT_BLUE,FieldNames[NumCol]); /* End row */ @@ -5207,7 +5270,8 @@ void Usr_ListAllDataStds (void) if (!Gbl.Usrs.ClassPhoto.AllGroups) { fprintf (Gbl.F.Out,"" - "", + "", NumColumnsTotal); Grp_WriteNamesOfSelectedGrps (); fprintf (Gbl.F.Out,"" @@ -5223,7 +5287,10 @@ void Usr_ListAllDataStds (void) 1); NumCol < NumColumnsCommonCard; NumCol++) - fprintf (Gbl.F.Out,"%s ", + fprintf (Gbl.F.Out,"" + "%s " + "", VERY_LIGHT_BLUE,FieldNames[NumCol]); /* 2. Columns for the groups */ @@ -5234,7 +5301,11 @@ void Usr_ListAllDataStds (void) NumGrpTyp < Gbl.CurrentCrs.Grps.GrpTypes.Num; NumGrpTyp++) if (Gbl.CurrentCrs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp].NumGrps) // If current course tiene groups of este type - fprintf (Gbl.F.Out,"%s %s ", + fprintf (Gbl.F.Out,"" + "%s %s " + "", VERY_LIGHT_BLUE,Txt_Group, Gbl.CurrentCrs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp].GrpTypName); @@ -5244,7 +5315,11 @@ void Usr_ListAllDataStds (void) for (NumField = 0; NumField < Gbl.CurrentCrs.Records.LstFields.Num; NumField++) - fprintf (Gbl.F.Out,"%s ", + fprintf (Gbl.F.Out,"" + "%s " + "", VERY_LIGHT_BLUE,Gbl.CurrentCrs.Records.LstFields.Lst[NumField].Name); /* 4. Visibility type for the record fields that depend on the course, in other row */ fprintf (Gbl.F.Out,""); @@ -5252,12 +5327,18 @@ void Usr_ListAllDataStds (void) NumCol < NumColumnsCardAndGroups; NumCol++) if (NumCol != 1 || Gbl.Usrs.Listing.WithPhotos) // Skip photo column if I don't want it in listing - fprintf (Gbl.F.Out,"",LIGHTEST_BLUE); + fprintf (Gbl.F.Out,"", + LIGHTEST_BLUE); for (NumField = 0; NumField < Gbl.CurrentCrs.Records.LstFields.Num; NumField++) - fprintf (Gbl.F.Out,"(%s) ", - LIGHTEST_BLUE,Txt_RECORD_FIELD_VISIBILITY_RECORD[Gbl.CurrentCrs.Records.LstFields.Lst[NumField].Visibility]); + fprintf (Gbl.F.Out,"" + "(%s) " + "", + LIGHTEST_BLUE, + Txt_RECORD_FIELD_VISIBILITY_RECORD[Gbl.CurrentCrs.Records.LstFields.Lst[NumField].Visibility]); } } @@ -5319,14 +5400,20 @@ void Usr_ListUsrsForSelection (Rol_Role_t Role) /***** Heading row with column names *****/ /* Start row and first column used for selection */ fprintf (Gbl.F.Out,"" - " ", + "" + " " + "", VERY_LIGHT_BLUE); /* Columns for the data */ for (NumCol = 0; NumCol < Usr_NUM_MAIN_FIELDS_DATA_USR; NumCol++) if (NumCol != 2 || Gbl.Usrs.Listing.WithPhotos) // Skip photo column if I don't want this column - fprintf (Gbl.F.Out,"%s ", + fprintf (Gbl.F.Out,"" + "%s " + "", VERY_LIGHT_BLUE,Usr_UsrDatMainFieldNames[NumCol]); /* End row */ fprintf (Gbl.F.Out,""); @@ -5437,7 +5524,10 @@ void Usr_ListAllDataTchs (void) 1); NumCol < NumColumns; NumCol++) - fprintf (Gbl.F.Out,"%s ", + fprintf (Gbl.F.Out,"" + "%s " + "", VERY_LIGHT_BLUE,FieldNames[NumCol]); /* End row */ @@ -5507,7 +5597,8 @@ unsigned Usr_ListUsrsFound (Rol_Role_t Role,const char *UsrQuery) /* Number of users found */ fprintf (Gbl.F.Out,"" - "", + "", Usr_NUM_MAIN_FIELDS_DATA_USR); if (NumUsrs == 1) fprintf (Gbl.F.Out,"1 %s", @@ -5525,7 +5616,8 @@ unsigned Usr_ListUsrsFound (Rol_Role_t Role,const char *UsrQuery) for (NumCol = 0; NumCol < Usr_NUM_MAIN_FIELDS_DATA_USR; NumCol++) - fprintf (Gbl.F.Out,"" + fprintf (Gbl.F.Out,"" "%s " "", VERY_LIGHT_BLUE, @@ -5556,8 +5648,8 @@ unsigned Usr_ListUsrsFound (Rol_Role_t Role,const char *UsrQuery) if (Role != Rol_ROLE_GUEST) { fprintf (Gbl.F.Out,"" - "" - "", + "" + "", Usr_NUM_MAIN_FIELDS_DATA_USR-3); Lay_StartRoundFrameTable10 (NULL,2,NULL); Crs_GetAndWriteCrssOfAUsr (UsrDat.UsrCod,Role); @@ -5664,7 +5756,10 @@ void Usr_ListDataAdms (void) NumCol < NumColumns; NumCol++) if (NumCol != 1 || Gbl.Usrs.Listing.WithPhotos) // Skip photo column if I don't want this column - fprintf (Gbl.F.Out,"%s ", + fprintf (Gbl.F.Out,"" + "%s " + "", VERY_LIGHT_BLUE,FieldNames[NumCol]); /* End row */ @@ -6705,16 +6800,18 @@ static void Usr_DrawClassPhoto (Usr_ClassPhotoType_t ClassPhotoType, Gbl.Usrs.Me.LoggedRole == Rol_ROLE_SUPERUSER); /***** Begin user's cell *****/ - fprintf (Gbl.F.Out,""); + fprintf (Gbl.F.Out,"\">"); /***** Checkbox to select this user *****/ if (PutCheckBoxToSelectUsr) @@ -6797,7 +6894,9 @@ static void Usr_DrawClassPhoto (Usr_ClassPhotoType_t ClassPhotoType, ClassPhotoType != Usr_CLASS_PHOTO_PRN) { fprintf (Gbl.F.Out,"" - "(", + "" + "(", Gbl.Usrs.ClassPhoto.Cols); if (Gbl.Usrs.Me.MyPhotoExists) { @@ -6925,10 +7024,22 @@ void Usr_GetAndShowNumUsrsInPlatform (Rol_Role_t Role) /***** Write the total number of users *****/ fprintf (Gbl.F.Out,"" - "%s" - "%u" - "%.2f" - "%.2f" + "" + "%s" + "" + "" + "%u" + "" + "" + "%.2f" + "" + "" + "%.2f" + "" "", Txt_ROLES_PLURAL_Abc[Role][Usr_SEX_UNKNOWN], NumUsrs, diff --git a/swad_zip.c b/swad_zip.c index e24df035f..13bc5bbf4 100644 --- a/swad_zip.c +++ b/swad_zip.c @@ -531,7 +531,7 @@ static void ZIP_ShowLinkToDownloadZIP (const char *FileName,const char *URL, /***** Start frame *****/ Lay_StartRoundFrameTable10Shadow (NULL,0); fprintf (Gbl.F.Out,"" - "" + "" ""); /***** Link to download the file *****/ @@ -556,8 +556,12 @@ static void ZIP_ShowLinkToDownloadZIP (const char *FileName,const char *URL, /***** Filename *****/ fprintf (Gbl.F.Out,"" - "" - "" + "" "", @@ -566,8 +570,12 @@ static void ZIP_ShowLinkToDownloadZIP (const char *FileName,const char *URL, /***** Write the file size *****/ fprintf (Gbl.F.Out,"" - "" - "" + "
    %s:" + "" + "%s:" + "" "%s" "
    %s:", + "" + "%s:" + "", The_ClassFormul[Gbl.Prefs.Theme],Txt_File_size); Str_WriteSizeInBytesFull ((double) FileSize); if (UncompressedSize)