From 02d97f4fdb8bb1794d0d3495e888fd80d7fdeefd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonio=20Ca=C3=B1as=20Vargas?= Date: Thu, 9 Jun 2016 17:56:57 +0200 Subject: [PATCH] Version 15.222.3 --- swad_changelog.h | 3 ++- swad_degree_type.c | 14 ++++++++++---- swad_department.c | 10 ++++++++-- swad_indicator.c | 34 ++++++++++++++-------------------- swad_text.c | 21 --------------------- 5 files changed, 34 insertions(+), 48 deletions(-) diff --git a/swad_changelog.h b/swad_changelog.h index 9472f9aa..a496cd6d 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -135,13 +135,14 @@ /****************************** Public constants *****************************/ /*****************************************************************************/ -#define Log_PLATFORM_VERSION "SWAD 15.222.2 (2016-06-09)" +#define Log_PLATFORM_VERSION "SWAD 15.222.3 (2016-06-09)" #define CSS_FILE "swad15.218.css" #define JS_FILE "swad15.216.js" // 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 15.222.3: Jun 09, 2016 Indicators form is sended automatically when any parameter changes. (202214 lines) Version 15.222.2: Jun 09, 2016 Code refactoring in indicators. (202233 lines) Version 15.222.1: Jun 09, 2016 Optimization in number of indicators. (202230 lines) Version 15.222: Jun 09, 2016 Number of indicators is stored in table of courses. (202224 lines) diff --git a/swad_degree_type.c b/swad_degree_type.c index c1faaed2..5c352c78 100644 --- a/swad_degree_type.c +++ b/swad_degree_type.c @@ -88,15 +88,20 @@ void DT_WriteSelectorDegreeTypes (void) extern const char *Txt_Any_type_of_degree; unsigned NumDegTyp; - /***** Get list of degree types *****/ + /***** Form to select degree types *****/ + /* Get list of degree types */ DT_GetListDegreeTypes (); - /***** List degree types *****/ - fprintf (Gbl.F.Out,""); /***** Free list of degree types *****/ diff --git a/swad_department.c b/swad_department.c index b986eeef..52db92e1 100644 --- a/swad_department.c +++ b/swad_department.c @@ -1110,11 +1110,16 @@ void Dpt_WriteSelectorDepartment (long InsCod) /* Get list of departments */ Dpt_GetListDepartments (InsCod); - fprintf (Gbl.F.Out,""); /* Free list of departments */ diff --git a/swad_indicator.c b/swad_indicator.c index 0feffd38..19079f54 100644 --- a/swad_indicator.c +++ b/swad_indicator.c @@ -87,13 +87,11 @@ static unsigned long Ind_GetNumFilesInWorksZonesOfCrsFromDB (long CrsCod); void Ind_ReqIndicatorsCourses (void) { extern const char *The_ClassForm[The_NUM_THEMES]; - extern const char *The_ClassFormBold[The_NUM_THEMES]; extern const char *Txt_Scope; extern const char *Txt_Types_of_degree; extern const char *Txt_only_if_the_scope_is_X; extern const char *Txt_Department; extern const char *Txt_No_of_indicators; - extern const char *Txt_Update_indicators; extern const char *Txt_Indicators_of_courses; extern const char *Txt_Show_more_details; MYSQL_RES *mysql_res; @@ -114,11 +112,15 @@ void Ind_ReqIndicatorsCourses (void) Sco_GetScope (); /* Get degree type code */ - Gbl.Stat.DegTypCod = DT_GetParamOtherDegTypCod (); + Gbl.Stat.DegTypCod = (Gbl.Scope.Current == Sco_SCOPE_SYS) ? DT_GetParamOtherDegTypCod () : + -1L; /* Get department code */ Gbl.Stat.DptCod = Dpt_GetParamDptCod (); + /* Get number of indicators */ + Ind_GetParamNumIndicators (); + /***** Start frame *****/ Lay_StartRoundFrame (NULL,Txt_Indicators_of_courses,NULL); @@ -134,7 +136,7 @@ void Ind_ReqIndicatorsCourses (void) "" "", The_ClassForm[Gbl.Prefs.Theme],Txt_Scope); - Sco_PutSelectorScope (false); + Sco_PutSelectorScope (true); fprintf (Gbl.F.Out,"" ""); @@ -175,7 +177,6 @@ void Ind_ReqIndicatorsCourses (void) Ind_GetNumCoursesWithIndicators (NumCrssWithIndicatorYes,NumCrss,mysql_res); /* Selection of the number of indicators */ - Ind_GetParamNumIndicators (); fprintf (Gbl.F.Out,"" "" "" @@ -186,16 +187,8 @@ void Ind_ReqIndicatorsCourses (void) fprintf (Gbl.F.Out,"" ""); - /* Send button */ - fprintf (Gbl.F.Out,"" - ""); - Act_LinkFormSubmitAnimated (Txt_Update_indicators,The_ClassFormBold[Gbl.Prefs.Theme]); - Lay_PutCalculateIconWithText (Txt_Update_indicators,Txt_Update_indicators); - fprintf (Gbl.F.Out,"" - "" - ""); - /* End form */ + fprintf (Gbl.F.Out,""); Act_FormEnd (); /***** Show the stats of courses *****/ @@ -238,11 +231,11 @@ void Ind_ShowIndicatorsCourses (void) unsigned NumCrssWithIndicatorYes[1+Ind_NUM_INDICATORS]; /***** Get users range for statistics of courses *****/ - Gbl.Scope.Allowed = 1 << Sco_SCOPE_SYS | - 1 << Sco_SCOPE_CTY | + Gbl.Scope.Allowed = 1 << Sco_SCOPE_SYS | + 1 << Sco_SCOPE_CTY | 1 << Sco_SCOPE_INS | - 1 << Sco_SCOPE_CTR | - 1 << Sco_SCOPE_DEG | + 1 << Sco_SCOPE_CTR | + 1 << Sco_SCOPE_DEG | 1 << Sco_SCOPE_CRS; Gbl.Scope.Default = Sco_SCOPE_CRS; Sco_GetScope (); @@ -634,8 +627,9 @@ static void Ind_ShowNumCoursesWithIndicators (unsigned NumCrssWithIndicatorYes[1 Class,Ind); if (Gbl.Stat.IndicatorsSelected[Ind]) fprintf (Gbl.F.Out," checked=\"checked\""); - fprintf (Gbl.F.Out," />" - ""); + fprintf (Gbl.F.Out," onchange=\"document.getElementById('%s').submit();\" />" + "", + Gbl.Form.Id); } fprintf (Gbl.F.Out,"" "%u" diff --git a/swad_text.c b/swad_text.c index 53f4cb56..8328e87c 100644 --- a/swad_text.c +++ b/swad_text.c @@ -48577,27 +48577,6 @@ const char *Txt_Update_attendance_according_to_selected_events = "Atualizar presença de acordo com eventos selecionados"; #endif -const char *Txt_Update_indicators = -#if L==1 - "Actualitzar indicadors"; -#elif L==2 - "Update Indikatoren"; -#elif L==3 - "Update indicators"; -#elif L==4 - "Actualizar indicadores"; -#elif L==5 - "Mise à jour des indicateurs"; -#elif L==6 - "Actualizar indicadores"; // Okoteve traducción -#elif L==7 - "Aggiornamento indicatori"; -#elif L==8 - "Aktualizacja wskaźniki"; -#elif L==9 - "Atualizar indocadores"; -#endif - const char *Txt_Update_messages = #if L==1 "Actualitzar missatges";