From 9f0e64f886a9211c45316040ef4aea3d03fec510 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonio=20Ca=C3=B1as=20Vargas?= Date: Fri, 4 Sep 2015 17:43:18 +0200 Subject: [PATCH] Version 14.125.3 --- swad_changelog.h | 3 +- swad_file_browser.c | 4 +- swad_forum.c | 68 ++++------- swad_global.c | 4 +- swad_indicator.c | 285 ++++++++++++++++++-------------------------- swad_user.c | 13 +- 6 files changed, 148 insertions(+), 229 deletions(-) diff --git a/swad_changelog.h b/swad_changelog.h index b75546c9b..e5a21e6c6 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -103,11 +103,12 @@ /****************************** Public constants *****************************/ /*****************************************************************************/ -#define Log_PLATFORM_VERSION "SWAD 14.125.2 (2015/09/04)" +#define Log_PLATFORM_VERSION "SWAD 14.125.3 (2015/09/04)" // 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 sql/swad*.sql | tail -1 /* + Version 14.125.3: Sep 04, 2015 Changes in styles. (184263 lines) Version 14.125.2: Sep 04, 2015 Changes in styles. (184344 lines) Version 14.125.1: Sep 03, 2015 Changes in styles. (184399 lines) Version 14.125: Sep 03, 2015 Changes in styles. (184521 lines) diff --git a/swad_file_browser.c b/swad_file_browser.c index ba44eeccf..7550debe0 100644 --- a/swad_file_browser.c +++ b/swad_file_browser.c @@ -5586,10 +5586,10 @@ static void Brw_WriteFileName (unsigned Level,bool IsPublic,Brw_FileType_t FileT { fprintf (Gbl.F.Out,"", FileName,Gbl.FileBrowser.InputStyle, - Gbl.FileBrowser.Clipboard.IsThisFile ? LIGHT_GREEN : + Gbl.FileBrowser.Clipboard.IsThisFile ? "LIGHT_GREEN" : Gbl.ColorRows[Gbl.RowEvenOdd], Gbl.FormId); Act_FormEnd (); diff --git a/swad_forum.c b/swad_forum.c index 077ec40c2..104db14ca 100644 --- a/swad_forum.c +++ b/swad_forum.c @@ -3219,8 +3219,8 @@ void For_ListForumThrs (long ThrCods[Pag_ITEMS_PER_PAGE],struct Pagination *Pagi const char *Style; bool ICanMoveThreads = (Gbl.Usrs.Me.LoggedRole == Rol_SYS_ADM); // If I have permission to move threads... long ThreadInMyClipboard = -1L; - bool ThisThreadIsInMyClipboard; unsigned Column; + const char *BgColor; /***** Get if there is a thread ready to be moved *****/ if (ICanMoveThreads) @@ -3238,14 +3238,13 @@ void For_ListForumThrs (long ThrCods[Pag_ITEMS_PER_PAGE],struct Pagination *Pagi For_GetThrData (&Thr); Style = (Thr.NumUnreadPosts ? "MSG_AUT_NEW" : "MSG_AUT"); - ThisThreadIsInMyClipboard = (Thr.ThrCod == ThreadInMyClipboard); + BgColor = (Thr.ThrCod == ThreadInMyClipboard) ? "LIGHT_GREEN" : + Gbl.ColorRows[Gbl.RowEvenOdd]; /***** Show my photo if I have any posts in this thread *****/ fprintf (Gbl.F.Out,"" - "", - ThisThreadIsInMyClipboard ? LIGHT_GREEN : - Gbl.ColorRows[Gbl.RowEvenOdd]); + "", + BgColor); if (Thr.NumMyPosts) { fprintf (Gbl.F.Out,""); /***** Put an icon with thread status *****/ - fprintf (Gbl.F.Out,"" + fprintf (Gbl.F.Out,"" "\"%s\"", - ThisThreadIsInMyClipboard ? LIGHT_GREEN : - Gbl.ColorRows[Gbl.RowEvenOdd], + BgColor, Gbl.Prefs.IconsURL, Thr.NumUnreadPosts ? "msg-unread" : "msg-open", @@ -3316,10 +3313,7 @@ void For_ListForumThrs (long ThrCods[Pag_ITEMS_PER_PAGE],struct Pagination *Pagi fprintf (Gbl.F.Out,""); /***** Write subject and links to thread pages *****/ - fprintf (Gbl.F.Out,"", - ThisThreadIsInMyClipboard ? LIGHT_GREEN : - Gbl.ColorRows[Gbl.RowEvenOdd]); + fprintf (Gbl.F.Out,"",BgColor); PaginationPsts.NumItems = Thr.NumPosts; PaginationPsts.CurrentPage = 1; // First page Pag_CalculatePagination (&PaginationPsts); @@ -3342,16 +3336,11 @@ void For_ListForumThrs (long ThrCods[Pag_ITEMS_PER_PAGE],struct Pagination *Pagi /* Write the author of first or last message */ UsrDat.UsrCod = Thr.UsrCod[Order]; Usr_ChkUsrCodAndGetAllUsrDataFromUsrCod (&UsrDat); - Msg_WriteMsgAuthor (&UsrDat,55,9,Style,Thr.Enabled[Order], - ThisThreadIsInMyClipboard ? LIGHT_GREEN : - Gbl.ColorRows[Gbl.RowEvenOdd]); + Msg_WriteMsgAuthor (&UsrDat,55,9,Style,Thr.Enabled[Order],BgColor); /* Write the date of first or last message (it's in YYYYMMDDHHMMSS format) */ - fprintf (Gbl.F.Out,"", - Style, - ThisThreadIsInMyClipboard ? LIGHT_GREEN : - Gbl.ColorRows[Gbl.RowEvenOdd]); + fprintf (Gbl.F.Out,"", + Style,BgColor); DateTime = Thr.WriteTime[Order]; Dat_WriteDate (DateTime); fprintf (Gbl.F.Out,"
"); @@ -3362,53 +3351,38 @@ void For_ListForumThrs (long ThrCods[Pag_ITEMS_PER_PAGE],struct Pagination *Pagi for (Column = 1; Column <= 3; Column++) - fprintf (Gbl.F.Out,"" + fprintf (Gbl.F.Out,"" "", - Style, - ThisThreadIsInMyClipboard ? LIGHT_GREEN : - Gbl.ColorRows[Gbl.RowEvenOdd]); + Style,BgColor); } /***** Write number of posts in this thread *****/ - fprintf (Gbl.F.Out,"" + fprintf (Gbl.F.Out,"" "%u " "", - Style, - ThisThreadIsInMyClipboard ? LIGHT_GREEN : - Gbl.ColorRows[Gbl.RowEvenOdd], + Style,BgColor, Thr.NumPosts); /***** Write number of new posts in this thread *****/ - fprintf (Gbl.F.Out,"" + fprintf (Gbl.F.Out,"" "%u " "", - Style, - ThisThreadIsInMyClipboard ? LIGHT_GREEN : - Gbl.ColorRows[Gbl.RowEvenOdd], + Style,BgColor, Thr.NumUnreadPosts); /***** Write number of users who have write posts in this thread *****/ - fprintf (Gbl.F.Out,"" + fprintf (Gbl.F.Out,"" "%u " "", - Style, - ThisThreadIsInMyClipboard ? LIGHT_GREEN : - Gbl.ColorRows[Gbl.RowEvenOdd], + Style,BgColor, Thr.NumWriters); /***** Write number of users who have read this thread *****/ - fprintf (Gbl.F.Out,"" + fprintf (Gbl.F.Out,"" "%u " "" "", - Style, - ThisThreadIsInMyClipboard ? LIGHT_GREEN : - Gbl.ColorRows[Gbl.RowEvenOdd], + Style,BgColor, Thr.NumReaders); } diff --git a/swad_global.c b/swad_global.c index 07e0cc54b..692d69c3b 100644 --- a/swad_global.c +++ b/swad_global.c @@ -433,8 +433,8 @@ void Gbl_InitializeGlobals (void) /* To alternate colors where listing rows */ Gbl.RowEvenOdd = 0; - Gbl.ColorRows[0] = "#F4F2EA"; // Darker - Gbl.ColorRows[1] = "#FBFAF7"; // Lighter + Gbl.ColorRows[0] = "COLOR0"; // Darker + Gbl.ColorRows[1] = "COLOR1"; // Lighter /* Related to imported data from external site */ Gbl.Imported.ExternalUsrId[0] = '\0'; diff --git a/swad_indicator.c b/swad_indicator.c index 086be8f0a..94b5fbdb9 100644 --- a/swad_indicator.c +++ b/swad_indicator.c @@ -551,324 +551,267 @@ static void Ind_ShowTableOfCoursesWithIndicators (Ind_IndicatorsLayout_t Indicat { case Ind_INDICATORS_BRIEF: fprintf (Gbl.F.Out,"" - "" + "" "%s" "" - "" + "" "%s" "" - "" + "" "%s" "" - "" + "" "%s" "" - "" + "" "%s" "" "" "" - "" + "" "%s" "" - "" + "" "(A) %s" "" - "" + "" "(B) %s" "" - "" + "" "(C) %s" "" - "" + "" "(D) %s" "" - "" + "" "(E) %s" "" "" "" - "" + "" "%s" "" - "" + "" "%s" "" - "" + "" "%s" "" - "" + "" "%s" "" - "" + "" "%s" "" - "" + "" "%s" "" - "" + "" "%s" "" - "" + "" "%s" "" - "" + "" "%s" "" - "" + "" "%s" "" "", - Gbl.ColorRows[0],Txt_Degree, - Gbl.ColorRows[0],Txt_Course, - Gbl.ColorRows[0],Txt_Institutional_BR_code, - Gbl.ColorRows[0],Txt_Web_page_of_the_course, - Gbl.ColorRows[0],Txt_Indicators, + Txt_Degree, + Txt_Course, + Txt_Institutional_BR_code, + Txt_Web_page_of_the_course, + Txt_Indicators, - Gbl.ColorRows[0],Txt_No_INDEX, - Gbl.ColorRows[0],Txt_Syllabus_of_the_course, - Gbl.ColorRows[0],Txt_Guided_academic_assignments, - Gbl.ColorRows[0],Txt_Online_tutoring, - Gbl.ColorRows[0],Txt_Materials, - Gbl.ColorRows[0],Txt_Assessment_criteria, + Txt_No_INDEX, + Txt_Syllabus_of_the_course, + Txt_Guided_academic_assignments, + Txt_Online_tutoring, + Txt_Materials, + Txt_Assessment_criteria, - Gbl.ColorRows[0],Txt_YES, - Gbl.ColorRows[0],Txt_NO, + Txt_YES, + Txt_NO, - Gbl.ColorRows[0],Txt_YES, - Gbl.ColorRows[0],Txt_NO, + Txt_YES, + Txt_NO, - Gbl.ColorRows[0],Txt_YES, - Gbl.ColorRows[0],Txt_NO, + Txt_YES, + Txt_NO, - Gbl.ColorRows[0],Txt_YES, - Gbl.ColorRows[0],Txt_NO, + Txt_YES, + Txt_NO, - Gbl.ColorRows[0],Txt_YES, - Gbl.ColorRows[0],Txt_NO); + Txt_YES, + Txt_NO); break; case Ind_INDICATORS_FULL: fprintf (Gbl.F.Out,"" - "" + "" "%s" "" - "" + "" "%s" "" - "" + "" "%s" "" - "" + "" "%s" "" - "" + "" "%s" "" - "" + "" "%s" "" - "" + "" "%s" "" "" "" - "" + "" "%s" "" - "" + "" "(A) %s" "" - "" + "" "(B) %s" "" - "" + "" "(C) %s" "" - "" + "" "(D) %s" "" - "" + "" "(E) %s" "" "" "" - "" + "" "%s" "" - "" + "" "%s" "" - "" + "" "%s" "" - "" + "" "%s" "" - "" + "" "%s" "" - "" + "" "%s" "" - "" + "" "%s" "" - "" + "" "%s" "" - "" + "" "%s" "" - "" + "" "%s" "" - "" + "" "%s" "" - "" + "" "%s" "" - "" + "" "%s" "" - "" + "" "%s" "" - "" + "" "%s" "" - "" + "" "%s" "" - "" + "" "%s" "" - "" + "" "%s" "" - "" + "" "%s" "" - "" + "" "%s" "" - "" + "" "%s" "" - "" + "" "%s" "" - "" + "" "%s" "" "", - Gbl.ColorRows[0],Txt_Degree, - Gbl.ColorRows[0],Txt_Course, - Gbl.ColorRows[0],Txt_Institutional_BR_code, - Gbl.ColorRows[0],Txt_Web_page_of_the_course, - Gbl.ColorRows[0],Txt_Teachers_ABBREVIATION, - Gbl.ColorRows[0],Txt_Students_ABBREVIATION, - Gbl.ColorRows[0],Txt_Indicators, + Txt_Degree, + Txt_Course, + Txt_Institutional_BR_code, + Txt_Web_page_of_the_course, + Txt_Teachers_ABBREVIATION, + Txt_Students_ABBREVIATION, + Txt_Indicators, - Gbl.ColorRows[0],Txt_No_INDEX, - Gbl.ColorRows[0],Txt_Syllabus_of_the_course, - Gbl.ColorRows[0],Txt_Guided_academic_assignments, - Gbl.ColorRows[0],Txt_Online_tutoring, - Gbl.ColorRows[0],Txt_Materials, - Gbl.ColorRows[0],Txt_Assessment_criteria, + Txt_No_INDEX, + Txt_Syllabus_of_the_course, + Txt_Guided_academic_assignments, + Txt_Online_tutoring, + Txt_Materials, + Txt_Assessment_criteria, - Gbl.ColorRows[0],Txt_YES, - Gbl.ColorRows[0],Txt_NO, - Gbl.ColorRows[0],Txt_INFO_TITLE[Inf_LECTURES], - Gbl.ColorRows[0],Txt_INFO_TITLE[Inf_PRACTICALS], - Gbl.ColorRows[0],Txt_INFO_TITLE[Inf_TEACHING_GUIDE], + Txt_YES, + Txt_NO, + Txt_INFO_TITLE[Inf_LECTURES], + Txt_INFO_TITLE[Inf_PRACTICALS], + Txt_INFO_TITLE[Inf_TEACHING_GUIDE], - Gbl.ColorRows[0],Txt_YES, - Gbl.ColorRows[0],Txt_NO, - Gbl.ColorRows[0],Txt_Assignments, - Gbl.ColorRows[0],Txt_Files_assignments, - Gbl.ColorRows[0],Txt_Files_works, + Txt_YES, + Txt_NO, + Txt_Assignments, + Txt_Files_assignments, + Txt_Files_works, - Gbl.ColorRows[0],Txt_YES, - Gbl.ColorRows[0],Txt_NO, - Gbl.ColorRows[0],Txt_Forum_threads, - Gbl.ColorRows[0],Txt_Forum_posts, - Gbl.ColorRows[0],Txt_Messages_sent_by_teachers, + Txt_YES, + Txt_NO, + Txt_Forum_threads, + Txt_Forum_posts, + Txt_Messages_sent_by_teachers, - Gbl.ColorRows[0],Txt_YES, - Gbl.ColorRows[0],Txt_NO, - Gbl.ColorRows[0],Txt_No_of_files_in_DOCUM_zones, - Gbl.ColorRows[0],Txt_No_of_files_in_SHARE_zones, + Txt_YES, + Txt_NO, + Txt_No_of_files_in_DOCUM_zones, + Txt_No_of_files_in_SHARE_zones, - Gbl.ColorRows[0],Txt_YES, - Gbl.ColorRows[0],Txt_NO, - Gbl.ColorRows[0],Txt_INFO_TITLE[Inf_ASSESSMENT], - Gbl.ColorRows[0],Txt_INFO_TITLE[Inf_TEACHING_GUIDE]); + Txt_YES, + Txt_NO, + Txt_INFO_TITLE[Inf_ASSESSMENT], + Txt_INFO_TITLE[Inf_TEACHING_GUIDE]); break; } diff --git a/swad_user.c b/swad_user.c index 5aa96fb23..ce0246e73 100644 --- a/swad_user.c +++ b/swad_user.c @@ -2807,7 +2807,8 @@ static void Usr_WriteRowGstAllData (struct UsrData *UsrDat) /***** Write rest of guest's main data *****/ Ins.InsCod = UsrDat->InsCod; Ins_GetDataOfInstitutionByCod (&Ins,Ins_GET_MINIMAL_DATA); - Usr_WriteMainUsrDataExceptUsrID (UsrDat,Gbl.ColorRows[Gbl.RowEvenOdd],true,NULL,Ins.ShortName,NULL); + Usr_WriteMainUsrDataExceptUsrID (UsrDat,Gbl.ColorRows[Gbl.RowEvenOdd],true, + NULL,Ins.ShortName,NULL); /***** Write the rest of the data of the guest *****/ if (UsrDat->Tch.CtrCod > 0) @@ -2914,12 +2915,12 @@ void Usr_WriteRowStdAllData (struct UsrData *UsrDat,char *GroupNames) /***** Write the rest of the data of the student *****/ Usr_WriteUsrData (Gbl.ColorRows[Gbl.RowEvenOdd], - UsrDat->LocalAddress[0] ? (ShowData ? UsrDat->LocalAddress : + UsrDat->LocalAddress[0] ? (ShowData ? UsrDat->LocalAddress : "********") : " ", NULL,true,UsrDat->Accepted); Usr_WriteUsrData (Gbl.ColorRows[Gbl.RowEvenOdd], - UsrDat->LocalPhone[0] ? (ShowData ? UsrDat->LocalPhone : + UsrDat->LocalPhone[0] ? (ShowData ? UsrDat->LocalPhone : "********") : " ", NULL,true,UsrDat->Accepted); @@ -2929,17 +2930,17 @@ void Usr_WriteRowStdAllData (struct UsrData *UsrDat,char *GroupNames) " ", NULL,true,UsrDat->Accepted); Usr_WriteUsrData (Gbl.ColorRows[Gbl.RowEvenOdd], - UsrDat->FamilyPhone[0] ? (ShowData ? UsrDat->FamilyPhone : + UsrDat->FamilyPhone[0] ? (ShowData ? UsrDat->FamilyPhone : "********") : " ", NULL,true,UsrDat->Accepted); Usr_WriteUsrData (Gbl.ColorRows[Gbl.RowEvenOdd], - UsrDat->OriginPlace[0] ? (ShowData ? UsrDat->OriginPlace : + UsrDat->OriginPlace[0] ? (ShowData ? UsrDat->OriginPlace : "********") : " ", NULL,true,UsrDat->Accepted); Usr_WriteUsrData (Gbl.ColorRows[Gbl.RowEvenOdd], - UsrDat->StrBirthday[0] ? (ShowData ? UsrDat->StrBirthday : + UsrDat->StrBirthday[0] ? (ShowData ? UsrDat->StrBirthday : "********") : " ", NULL,true,UsrDat->Accepted);