From ef7765e47e1468dd89530efeb4d09bd9a0b7c43f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonio=20Ca=C3=B1as=20Vargas?= Date: Thu, 3 Sep 2015 17:14:30 +0200 Subject: [PATCH] Version 14.125.1 --- swad_changelog.h | 5 +- swad_indicator.c | 152 ++++++++++++---------------- swad_mark.c | 26 +++-- swad_photo.c | 15 ++- swad_profile.c | 31 +++--- swad_record.c | 12 +-- swad_statistic.c | 70 ++++++------- swad_survey.c | 64 +++++------- swad_syllabus.c | 24 ++--- swad_test.c | 239 +++++++++++++++++++-------------------------- swad_test_import.c | 25 ++--- swad_user.c | 129 ++++++++++-------------- 12 files changed, 335 insertions(+), 457 deletions(-) diff --git a/swad_changelog.h b/swad_changelog.h index 9ec0c012f..3b7d6cc99 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -103,12 +103,13 @@ /****************************** Public constants *****************************/ /*****************************************************************************/ -#define Log_PLATFORM_VERSION "SWAD 14.125 (2015/09/03)" +#define Log_PLATFORM_VERSION "SWAD 14.125.1 (2015/09/03)" // 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: Sep 03, 2015 Changes in styles. (? lines) + Version 14.125.1: Sep 03, 2015 Changes in styles. (184399 lines) + Version 14.125: Sep 03, 2015 Changes in styles. (184521 lines) Version 14.124.10:Sep 02, 2015 Changes in styles. (184571 lines) Version 14.124.9: Sep 02, 2015 Changes in styles. (184584 lines) Version 14.124.8: Sep 02, 2015 Changes in styles. (184635 lines) diff --git a/swad_indicator.c b/swad_indicator.c index ef4b95ab7..086be8f0a 100644 --- a/swad_indicator.c +++ b/swad_indicator.c @@ -1021,254 +1021,224 @@ static void Ind_ShowTableOfCoursesWithIndicators (Ind_IndicatorsLayout_t Indicat NumTchs = Usr_GetNumUsrsInCrs (Rol_TEACHER,CrsCod); fprintf (Gbl.F.Out,"" - "" + "" "%s" "" - "" + "" "%s" "" - "" + "" "%s" "" - "" + "" "" "%s/?crs=%ld&act=%ld" "" "" - "" + "" "%u" "" - "" + "" "%u" "" - "" + "" "%u" "" - "" + "" "%s" "" - "" + "" "%s" "" - "" + "" "%s" "" - "" + "" "%s" "" - "" + "" "%s" "" - "" + "" "%s" "" - "" + "" "%s" "" - "" + "" "%u" "" - "" + "" "%lu" "" - "" + "" "%lu" "" - "" + "" "%s" "" - "" + "" "%s" "" - "" + "" "%u" "" - "" + "" "%u" "" - "" + "" "%u" "" - "" + "" "%s" "" - "" + "" "%s" "" - "" + "" "%lu" "" - "" + "" "%lu" "" - "" + "" "%s" "" - "" + "" "%s" "" - "" + "" "%s" "" - "" + "" "%s" "" "", Indicators.CourseAllOK ? "DAT_SMALL_GREEN" : (Indicators.CoursePartiallyOK ? "DAT_SMALL" : "DAT_SMALL_RED"), - Gbl.ColorRows[Gbl.RowEvenOdd], + Gbl.RowEvenOdd, row[0], Indicators.CourseAllOK ? "DAT_SMALL_GREEN" : (Indicators.CoursePartiallyOK ? "DAT_SMALL" : "DAT_SMALL_RED"), - Gbl.ColorRows[Gbl.RowEvenOdd], + Gbl.RowEvenOdd, row[1], Indicators.CourseAllOK ? "DAT_SMALL_GREEN" : (Indicators.CoursePartiallyOK ? "DAT_SMALL" : "DAT_SMALL_RED"), - Gbl.ColorRows[Gbl.RowEvenOdd], + Gbl.RowEvenOdd, row[3], - Gbl.ColorRows[Gbl.RowEvenOdd],Cfg_HTTPS_URL_SWAD_CGI,CrsCod,Act_Actions[ActReqStaCrs].ActCod, - Cfg_HTTPS_URL_SWAD_CGI,CrsCod,Act_Actions[ActReqStaCrs].ActCod, + Gbl.RowEvenOdd,Cfg_HTTPS_URL_SWAD_CGI,CrsCod,Act_Actions[ActReqStaCrs].ActCod, + Cfg_HTTPS_URL_SWAD_CGI,CrsCod,Act_Actions[ActReqStaCrs].ActCod, NumTchs != 0 ? "DAT_SMALL_GREEN" : "DAT_SMALL_RED", - Gbl.ColorRows[Gbl.RowEvenOdd], + Gbl.RowEvenOdd, NumTchs, NumStds != 0 ? "DAT_SMALL_GREEN" : "DAT_SMALL_RED", - Gbl.ColorRows[Gbl.RowEvenOdd], + Gbl.RowEvenOdd, NumStds, Indicators.CourseAllOK ? "DAT_SMALL_GREEN" : (Indicators.CoursePartiallyOK ? "DAT_SMALL" : "DAT_SMALL_RED"), - Gbl.ColorRows[Gbl.RowEvenOdd], + Gbl.RowEvenOdd, Indicators.CountIndicators, - "DAT_SMALL_GREEN",Gbl.ColorRows[Gbl.RowEvenOdd], + "DAT_SMALL_GREEN",Gbl.RowEvenOdd, Indicators.ThereIsSyllabus ? Txt_YES : "", - "DAT_SMALL_RED",Gbl.ColorRows[Gbl.RowEvenOdd], + "DAT_SMALL_RED",Gbl.RowEvenOdd, Indicators.ThereIsSyllabus ? "" : Txt_NO, (Indicators.SyllabusLecSrc != Inf_INFO_SRC_NONE) ? "DAT_SMALL_GREEN" : "DAT_SMALL_RED", - Gbl.ColorRows[Gbl.RowEvenOdd], + Gbl.RowEvenOdd, Txt_INFO_SRC_SHORT_TEXT[Indicators.SyllabusLecSrc], (Indicators.SyllabusPraSrc != Inf_INFO_SRC_NONE) ? "DAT_SMALL_GREEN" : "DAT_SMALL_RED", - Gbl.ColorRows[Gbl.RowEvenOdd], + Gbl.RowEvenOdd, Txt_INFO_SRC_SHORT_TEXT[Indicators.SyllabusPraSrc], (Indicators.TeachingGuideSrc != Inf_INFO_SRC_NONE) ? "DAT_SMALL_GREEN" : "DAT_SMALL_RED", - Gbl.ColorRows[Gbl.RowEvenOdd], + Gbl.RowEvenOdd, Txt_INFO_SRC_SHORT_TEXT[Indicators.TeachingGuideSrc], - "DAT_SMALL_GREEN",Gbl.ColorRows[Gbl.RowEvenOdd], + "DAT_SMALL_GREEN",Gbl.RowEvenOdd, Indicators.ThereAreAssignments ? Txt_YES : "", - "DAT_SMALL_RED",Gbl.ColorRows[Gbl.RowEvenOdd], + "DAT_SMALL_RED",Gbl.RowEvenOdd, Indicators.ThereAreAssignments ? "" : Txt_NO, (Indicators.NumAssignments != 0) ? "DAT_SMALL_GREEN" : "DAT_SMALL_RED", - Gbl.ColorRows[Gbl.RowEvenOdd], + Gbl.RowEvenOdd, Indicators.NumAssignments, (Indicators.NumFilesAssignments != 0) ? "DAT_SMALL_GREEN" : "DAT_SMALL_RED", - Gbl.ColorRows[Gbl.RowEvenOdd], + Gbl.RowEvenOdd, Indicators.NumFilesAssignments, (Indicators.NumFilesWorks != 0) ? "DAT_SMALL_GREEN" : "DAT_SMALL_RED", - Gbl.ColorRows[Gbl.RowEvenOdd], + Gbl.RowEvenOdd, Indicators.NumFilesWorks, - "DAT_SMALL_GREEN",Gbl.ColorRows[Gbl.RowEvenOdd], + "DAT_SMALL_GREEN",Gbl.RowEvenOdd, Indicators.ThereIsOnlineTutoring ? Txt_YES : "", - "DAT_SMALL_RED",Gbl.ColorRows[Gbl.RowEvenOdd], + "DAT_SMALL_RED",Gbl.RowEvenOdd, Indicators.ThereIsOnlineTutoring ? "" : Txt_NO, (Indicators.NumThreads != 0) ? "DAT_SMALL_GREEN" : "DAT_SMALL_RED", - Gbl.ColorRows[Gbl.RowEvenOdd], + Gbl.RowEvenOdd, Indicators.NumThreads, (Indicators.NumPosts != 0) ? "DAT_SMALL_GREEN" : "DAT_SMALL_RED", - Gbl.ColorRows[Gbl.RowEvenOdd], + Gbl.RowEvenOdd, Indicators.NumPosts, (Indicators.NumMsgsSentByTchs != 0) ? "DAT_SMALL_GREEN" : "DAT_SMALL_RED", - Gbl.ColorRows[Gbl.RowEvenOdd], + Gbl.RowEvenOdd, Indicators.NumMsgsSentByTchs, - "DAT_SMALL_GREEN",Gbl.ColorRows[Gbl.RowEvenOdd], + "DAT_SMALL_GREEN",Gbl.RowEvenOdd, Indicators.ThereAreMaterials ? Txt_YES : "", - "DAT_SMALL_RED",Gbl.ColorRows[Gbl.RowEvenOdd], + "DAT_SMALL_RED",Gbl.RowEvenOdd, Indicators.ThereAreMaterials ? "" : Txt_NO, (Indicators.NumFilesInDownloadZones != 0) ? "DAT_SMALL_GREEN" : "DAT_SMALL_RED", - Gbl.ColorRows[Gbl.RowEvenOdd], + Gbl.RowEvenOdd, Indicators.NumFilesInDownloadZones, (Indicators.NumFilesInCommonZones != 0) ? "DAT_SMALL_GREEN" : "DAT_SMALL_RED", - Gbl.ColorRows[Gbl.RowEvenOdd], + Gbl.RowEvenOdd, Indicators.NumFilesInCommonZones, - "DAT_SMALL_GREEN",Gbl.ColorRows[Gbl.RowEvenOdd], + "DAT_SMALL_GREEN",Gbl.RowEvenOdd, Indicators.ThereIsAssessment ? Txt_YES : "", - "DAT_SMALL_RED",Gbl.ColorRows[Gbl.RowEvenOdd], + "DAT_SMALL_RED",Gbl.RowEvenOdd, Indicators.ThereIsAssessment ? "" : Txt_NO, (Indicators.AssessmentSrc != Inf_INFO_SRC_NONE) ? "DAT_SMALL_GREEN" : "DAT_SMALL_RED", - Gbl.ColorRows[Gbl.RowEvenOdd], + Gbl.RowEvenOdd, Txt_INFO_SRC_SHORT_TEXT[Indicators.AssessmentSrc], (Indicators.TeachingGuideSrc != Inf_INFO_SRC_NONE) ? "DAT_SMALL_GREEN" : "DAT_SMALL_RED", - Gbl.ColorRows[Gbl.RowEvenOdd], + Gbl.RowEvenOdd, Txt_INFO_SRC_SHORT_TEXT[Indicators.TeachingGuideSrc]); break; } diff --git a/swad_mark.c b/swad_mark.c index 4447cc3b2..06cafa386 100644 --- a/swad_mark.c +++ b/swad_mark.c @@ -112,20 +112,19 @@ void Mrk_GetAndWriteNumRowsHeaderAndFooter (Brw_FileType_t FileType, struct MarksProperties Marks; if (FileType == Brw_IS_FOLDER) - fprintf (Gbl.F.Out,"" - "", - Gbl.ColorRows[Gbl.RowEvenOdd], - Gbl.ColorRows[Gbl.RowEvenOdd]); + fprintf (Gbl.F.Out,"" + "", + Gbl.RowEvenOdd, + Gbl.RowEvenOdd); else // File or link { /***** Get number of rows in header or footer *****/ Mrk_GetNumRowsHeaderAndFooter (&Marks); /***** Write the number of rows of header *****/ - fprintf (Gbl.F.Out,"", + fprintf (Gbl.F.Out,"", The_ClassFormNoWrap[Gbl.Prefs.Theme], - Gbl.ColorRows[Gbl.RowEvenOdd]); + Gbl.RowEvenOdd); if (Gbl.CurrentCrs.Grps.GrpCod > 0) // Group zone { @@ -138,22 +137,21 @@ void Mrk_GetAndWriteNumRowsHeaderAndFooter (Brw_FileType_t FileType, fprintf (Gbl.F.Out," %s: " "", Txt_TABLE_Header, Mrk_HeadOrFootStr[Brw_HEADER],Marks.Header, Gbl.FileBrowser.InputStyle, - Gbl.ColorRows[Gbl.RowEvenOdd], + Gbl.RowEvenOdd, Gbl.FormId); Brw_ParamListFiles (FileType,PathInTree,FileName); Act_FormEnd (); fprintf (Gbl.F.Out,""); /***** Write the number of rows of footer *****/ - fprintf (Gbl.F.Out,"", + fprintf (Gbl.F.Out,"", The_ClassFormNoWrap[Gbl.Prefs.Theme], - Gbl.ColorRows[Gbl.RowEvenOdd]); + Gbl.RowEvenOdd); if (Gbl.CurrentCrs.Grps.GrpCod > 0) // Group zone { @@ -166,12 +164,12 @@ void Mrk_GetAndWriteNumRowsHeaderAndFooter (Brw_FileType_t FileType, fprintf (Gbl.F.Out," %s: " "", Txt_TABLE_Footer, Mrk_HeadOrFootStr[Brw_FOOTER],Marks.Footer, Gbl.FileBrowser.InputStyle, - Gbl.ColorRows[Gbl.RowEvenOdd], + Gbl.RowEvenOdd, Gbl.FormId); Brw_ParamListFiles (FileType,PathInTree,FileName); Act_FormEnd (); diff --git a/swad_photo.c b/swad_photo.c index ac17540f0..0af6c7fcf 100644 --- a/swad_photo.c +++ b/swad_photo.c @@ -1999,16 +1999,14 @@ static void Pho_ShowOrPrintListDegrees (Pho_AvgPhotoSeeOrPrint_t SeeOrPrint) /***** Show logo and name of this degree *****/ fprintf (Gbl.F.Out,"" - "" + "" "%u" "", - Gbl.ColorRows[Gbl.RowEvenOdd],++NumDegsNotEmpty); + Gbl.RowEvenOdd,++NumDegsNotEmpty); /***** Show logo and name of this degree *****/ - fprintf (Gbl.F.Out,"", - Gbl.ColorRows[Gbl.RowEvenOdd]); + fprintf (Gbl.F.Out,"", + Gbl.RowEvenOdd); if (SeeOrPrint == Pho_DEGREES_SEE) fprintf (Gbl.F.Out,"", Deg.WWW,Deg.FullName); @@ -2026,9 +2024,8 @@ static void Pho_ShowOrPrintListDegrees (Pho_AvgPhotoSeeOrPrint_t SeeOrPrint) { /***** Show average photo of students belonging to this degree *****/ Pho_GetNumStdsInDegree (Deg.DegCod,Sex,&NumStds,&NumStdsWithPhoto); - fprintf (Gbl.F.Out,"", - Gbl.ColorRows[Gbl.RowEvenOdd]); + fprintf (Gbl.F.Out,"", + Gbl.RowEvenOdd); if (Gbl.Usrs.Listing.WithPhotos) Pho_ShowDegreeAvgPhotoAndStat (&Deg,SeeOrPrint,Sex,NumStds,NumStdsWithPhoto,&DateAvgPhoto); else diff --git a/swad_profile.c b/swad_profile.c index febe71c32..d0cf843ef 100644 --- a/swad_profile.c +++ b/swad_profile.c @@ -1318,10 +1318,13 @@ void Prf_ShowRankingFigure (const char *Query) /***** Show row *****/ fprintf (Gbl.F.Out,""); Prf_ShowUsrInRanking (&UsrDat,Rank); - fprintf (Gbl.F.Out,"%ld" + fprintf (Gbl.F.Out,"" + "%ld" + "" "", - Gbl.ColorRows[Gbl.RowEvenOdd],Figure); + Gbl.RowEvenOdd, + Figure); } fprintf (Gbl.F.Out,""); @@ -1460,9 +1463,9 @@ void Prf_GetAndShowRankingClicksPerDay (void) /***** Show row *****/ fprintf (Gbl.F.Out,""); Prf_ShowUsrInRanking (&UsrDat,Rank); - fprintf (Gbl.F.Out,"", - Gbl.ColorRows[Gbl.RowEvenOdd]); + fprintf (Gbl.F.Out,"", + Gbl.RowEvenOdd); Str_WriteFloatNum (NumClicksPerDay); fprintf (Gbl.F.Out,"" ""); @@ -1489,15 +1492,15 @@ void Prf_ShowUsrInRanking (const struct UsrData *UsrDat,unsigned Rank) char PhotoURL[PATH_MAX+1]; bool Visible = Pri_ShowIsAllowed (UsrDat->ProfileVisibility,UsrDat->UsrCod); - fprintf (Gbl.F.Out,"" + fprintf (Gbl.F.Out,"" "#%u" "" - "", - Gbl.ColorRows[Gbl.RowEvenOdd], + "", + Gbl.RowEvenOdd, Rank, - Gbl.ColorRows[Gbl.RowEvenOdd]); + Gbl.RowEvenOdd); /***** Check if I can see the public profile *****/ if (Visible) @@ -1510,8 +1513,8 @@ void Prf_ShowUsrInRanking (const struct UsrData *UsrDat,unsigned Rank) } fprintf (Gbl.F.Out,"" - "", - Gbl.ColorRows[Gbl.RowEvenOdd]); + "", + Gbl.RowEvenOdd); /***** Put form to go to public profile *****/ if (Visible) diff --git a/swad_record.c b/swad_record.c index b09683bcb..e727f1685 100644 --- a/swad_record.c +++ b/swad_record.c @@ -1567,12 +1567,12 @@ void Rec_ShowCrsRecord (Rec_RecordViewType_t TypeOfView,struct UsrData *UsrDat) /* Name of the field */ fprintf (Gbl.F.Out,"" - "" + "" "%s:", ICanEdit ? The_ClassForm[Gbl.Prefs.Theme] : "DAT_REC_SMALL", - Col1Width,Gbl.ColorRows[Gbl.RowEvenOdd], + Gbl.RowEvenOdd,Col1Width, Gbl.CurrentCrs.Records.LstFields.Lst[NumField].Name); if (TypeOfView == Rec_RECORD_LIST) fprintf (Gbl.F.Out," (%s)", @@ -1589,9 +1589,9 @@ void Rec_ShowCrsRecord (Rec_RecordViewType_t TypeOfView,struct UsrData *UsrDat) ThisFieldHasText = false; /***** Write form, text, or nothing depending on the user's role and the visibility of the field... */ - fprintf (Gbl.F.Out,"", - ClassData,Col2Width,Gbl.ColorRows[Gbl.RowEvenOdd]); + fprintf (Gbl.F.Out,"", + ClassData,Gbl.RowEvenOdd,Col2Width); if (ICanEdit) // Show with form { fprintf (Gbl.F.Out,"