From 7fe0920f74bf094b651cf310d0c57f137947ca89 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonio=20Ca=C3=B1as=20Vargas?= Date: Thu, 10 Oct 2019 01:01:16 +0200 Subject: [PATCH] Version19.31.35 --- swad_changelog.h | 3 +- swad_survey.c | 84 ++++++++++++++++++++++++------------------------ swad_syllabus.c | 46 +++++++++++++------------- 3 files changed, 67 insertions(+), 66 deletions(-) diff --git a/swad_changelog.h b/swad_changelog.h index aadf64613..b82c15c21 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -487,7 +487,7 @@ enscript -2 --landscape --color --file-align=2 --highlight --line-numbers -o - * En OpenSWAD: ps2pdf source.ps destination.pdf */ -#define Log_PLATFORM_VERSION "SWAD 19.31.34 (2019-10-10)" +#define Log_PLATFORM_VERSION "SWAD 19.31.35 (2019-10-10)" #define CSS_FILE "swad19.29.css" #define JS_FILE "swad19.30.js" /* @@ -495,6 +495,7 @@ ps2pdf source.ps destination.pdf // TODO: Un TFG preasignado sin estudiante tiene que salir un triángulo amarillo // TODO: Hacer un nuevo rol en los TFG: tutor externo (profesor de áreas no vinculadas con el centro, profesionales de empresas, etc.) + Version 19.31.35: Oct 10, 2019 Code refactoring in HTML tables. (246629 lines) Version 19.31.34: Oct 10, 2019 Code refactoring in HTML tables. (246628 lines) Version 19.31.33: Oct 09, 2019 Code refactoring in HTML tables. (246688 lines) Version 19.31.32: Oct 09, 2019 Code refactoring in HTML tables. (246718 lines) diff --git a/swad_survey.c b/swad_survey.c index 9d6019c4a..e5c0824db 100644 --- a/swad_survey.c +++ b/swad_survey.c @@ -463,9 +463,9 @@ static void Svy_ShowOneSurvey (long SvyCod,struct SurveyQuestion *SvyQst, /* Forms to remove/edit this assignment */ if (ShowOnlyThisSvyComplete) - fprintf (Gbl.F.Out,""); + Tbl_StartCellAttr ("rowspan=\"2\" class=\"CONTEXT_COL\""); else - fprintf (Gbl.F.Out,"",Gbl.RowEvenOdd); + Tbl_StartCellAttr ("rowspan=\"2\" class=\"CONTEXT_COL COLOR%u\"",Gbl.RowEvenOdd); if (Svy.Status.ICanEdit) Svy_PutFormsToRemEditOneSvy (&Svy,Anchor); Tbl_EndCell (); @@ -473,14 +473,14 @@ static void Svy_ShowOneSurvey (long SvyCod,struct SurveyQuestion *SvyQst, /* Start date/time */ UniqueId++; if (ShowOnlyThisSvyComplete) - fprintf (Gbl.F.Out,"", + Tbl_StartCellAttr ("id=\"svy_date_start_%u\" class=\"%s LEFT_TOP\"", UniqueId, Svy.Status.Visible ? (Svy.Status.Open ? "DATE_GREEN" : "DATE_RED") : (Svy.Status.Open ? "DATE_GREEN_LIGHT" : "DATE_RED_LIGHT")); else - fprintf (Gbl.F.Out,"", + Tbl_StartCellAttr ("id=\"svy_date_start_%u\" class=\"%s LEFT_TOP COLOR%u\"", UniqueId, Svy.Status.Visible ? (Svy.Status.Open ? "DATE_GREEN" : "DATE_RED") : @@ -497,14 +497,14 @@ static void Svy_ShowOneSurvey (long SvyCod,struct SurveyQuestion *SvyQst, /* End date/time */ if (ShowOnlyThisSvyComplete) - fprintf (Gbl.F.Out,"", + Tbl_StartCellAttr ("id=\"svy_date_end_%u\" class=\"%s LEFT_TOP\"", UniqueId, Svy.Status.Visible ? (Svy.Status.Open ? "DATE_GREEN" : "DATE_RED") : (Svy.Status.Open ? "DATE_GREEN_LIGHT" : "DATE_RED_LIGHT")); else - fprintf (Gbl.F.Out,"", + Tbl_StartCellAttr ("id=\"svy_date_end_%u\" class=\"%s LEFT_TOP COLOR%u\"", UniqueId, Svy.Status.Visible ? (Svy.Status.Open ? "DATE_GREEN" : "DATE_RED") : @@ -521,9 +521,9 @@ static void Svy_ShowOneSurvey (long SvyCod,struct SurveyQuestion *SvyQst, /* Survey title */ if (ShowOnlyThisSvyComplete) - fprintf (Gbl.F.Out,""); + Tbl_StartCellAttr ("class=\"LEFT_TOP\""); else - fprintf (Gbl.F.Out,"",Gbl.RowEvenOdd); + Tbl_StartCellAttr ("class=\"LEFT_TOP COLOR%u\"",Gbl.RowEvenOdd); Lay_StartArticle (Anchor); Frm_StartForm (ActSeeSvy); Svy_PutParamSvyCod (SvyCod); @@ -550,9 +550,9 @@ static void Svy_ShowOneSurvey (long SvyCod,struct SurveyQuestion *SvyQst, /* Status of the survey */ if (ShowOnlyThisSvyComplete) - fprintf (Gbl.F.Out,""); + Tbl_StartCellAttr ("rowspan=\"2\" class=\"LEFT_TOP\""); else - fprintf (Gbl.F.Out,"",Gbl.RowEvenOdd); + Tbl_StartCellAttr ("rowspan=\"2\" class=\"LEFT_TOP COLOR%u\"",Gbl.RowEvenOdd); Svy_WriteStatus (&Svy); if (!ShowOnlyThisSvyComplete) @@ -597,16 +597,16 @@ static void Svy_ShowOneSurvey (long SvyCod,struct SurveyQuestion *SvyQst, /* Author of the survey */ if (ShowOnlyThisSvyComplete) - fprintf (Gbl.F.Out,""); + Tbl_StartCellAttr ("colspan=\"2\" class=\"LEFT_TOP\""); else - fprintf (Gbl.F.Out,"",Gbl.RowEvenOdd); + Tbl_StartCellAttr ("colspan=\"2\" class=\"LEFT_TOP COLOR%u\"",Gbl.RowEvenOdd); Svy_WriteAuthor (&Svy); Tbl_EndCell (); if (ShowOnlyThisSvyComplete) - fprintf (Gbl.F.Out,""); + Tbl_StartCellAttr ("class=\"LEFT_TOP\""); else - fprintf (Gbl.F.Out,"",Gbl.RowEvenOdd); + Tbl_StartCellAttr ("class=\"LEFT_TOP COLOR%u\"",Gbl.RowEvenOdd); Tbl_EndCell (); /* Scope of the survey */ @@ -680,7 +680,7 @@ static void Svy_ShowOneSurvey (long SvyCod,struct SurveyQuestion *SvyQst, if (ShowOnlyThisSvyComplete) { Tbl_StartRow (); - fprintf (Gbl.F.Out,""); + Tbl_StartCellAttr ("colspan=\"5\""); Svy_ListSvyQuestions (&Svy,SvyQst); Tbl_EndCell (); Tbl_EndRow (); @@ -1874,13 +1874,13 @@ void Svy_RequestCreatOrEditSvy (void) /***** Scope of the survey *****/ Tbl_StartRow (); - fprintf (Gbl.F.Out,""); + Tbl_StartCellAttr ("class=\"RIGHT_MIDDLE\""); fprintf (Gbl.F.Out,"", The_ClassFormInBox[Gbl.Prefs.Theme], Txt_Scope); Tbl_EndCell (); - fprintf (Gbl.F.Out,""); + Tbl_StartCellAttr ("class=\"LEFT_MIDDLE\""); Svy_SetDefaultAndAllowedScope (&Svy); Sco_GetScope ("ScopeSvy"); Sco_PutSelectorScope ("ScopeSvy",false); @@ -1891,13 +1891,13 @@ void Svy_RequestCreatOrEditSvy (void) /***** Survey title *****/ Tbl_StartRow (); - fprintf (Gbl.F.Out,""); + Tbl_StartCellAttr ("class=\"RIGHT_MIDDLE\""); fprintf (Gbl.F.Out,"", The_ClassFormInBox[Gbl.Prefs.Theme], Txt_Title); Tbl_EndCell (); - fprintf (Gbl.F.Out,""); + Tbl_StartCellAttr ("class=\"LEFT_MIDDLE\""); fprintf (Gbl.F.Out,"", @@ -1912,13 +1912,13 @@ void Svy_RequestCreatOrEditSvy (void) /***** Survey text *****/ Tbl_StartRow (); - fprintf (Gbl.F.Out,""); + Tbl_StartCellAttr ("class=\"RIGHT_TOP\""); fprintf (Gbl.F.Out,"", The_ClassFormInBox[Gbl.Prefs.Theme], Txt_Description); Tbl_EndCell (); - fprintf (Gbl.F.Out,""); + Tbl_StartCellAttr ("class=\"LEFT_TOP\""); fprintf (Gbl.F.Out,"", @@ -2725,11 +2725,11 @@ static void Svy_ShowFormEditOneQst (long SvyCod,struct SurveyQuestion *SvyQst, /***** Type of answer *****/ Tbl_StartRow (); - fprintf (Gbl.F.Out,"",The_ClassFormInBox[Gbl.Prefs.Theme]); + Tbl_StartCellAttr ("class=\"%s RIGHT_TOP\"",The_ClassFormInBox[Gbl.Prefs.Theme]); fprintf (Gbl.F.Out,"%s:",Txt_Type); Tbl_EndCell (); - fprintf (Gbl.F.Out,"",The_ClassFormInBox[Gbl.Prefs.Theme]); + Tbl_StartCellAttr ("class=\"%s LEFT_TOP\"",The_ClassFormInBox[Gbl.Prefs.Theme]); for (AnsType = (Svy_AnswerType_t) 0; AnsType < Svy_NUM_ANS_TYPES; AnsType++) @@ -2755,7 +2755,7 @@ static void Svy_ShowFormEditOneQst (long SvyCod,struct SurveyQuestion *SvyQst, Tbl_PutEmptyCells (1); /* Unique or multiple choice answers */ - fprintf (Gbl.F.Out,""); + Tbl_StartCellAttr ("class=\"LEFT_TOP\""); Tbl_StartTablePadding (2); for (NumAns = 0; NumAns < Svy_MAX_ANSWERS_PER_QUESTION; @@ -2764,13 +2764,13 @@ static void Svy_ShowFormEditOneQst (long SvyCod,struct SurveyQuestion *SvyQst, Tbl_StartRow (); /* Label with the number of the answer */ - fprintf (Gbl.F.Out,""); + Tbl_StartCellAttr ("class=\"RIGHT_TOP\""); fprintf (Gbl.F.Out,"", NumAns,The_ClassFormInBox[Gbl.Prefs.Theme],NumAns + 1); Tbl_EndCell (); /* Answer text */ - fprintf (Gbl.F.Out,""); + Tbl_StartCellAttr ("class=\"RIGHT_TOP\""); fprintf (Gbl.F.Out,"