diff --git a/swad_changelog.h b/swad_changelog.h index 1ef74d1c..1e62b736 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -602,13 +602,14 @@ TODO: FIX BUG, URGENT! En las fechas como par TODO: En las encuestas, que los estudiantes no puedan ver los resultados hasta que no finalice el plazo. */ -#define Log_PLATFORM_VERSION "SWAD 21.33.1 (2021-10-15)" +#define Log_PLATFORM_VERSION "SWAD 21.33.2 (2021-10-15)" #define CSS_FILE "swad20.45.css" #define JS_FILE "swad20.69.1.js" /* TODO: Rename CENTRE to CENTER in help wiki. TODO: Rename ASSESSMENT.Announcements to ASSESSMENT.Calls_for_exams + Version 21.33.2: Oct 15, 2021 Fixed bug getting name of degree. (319950 lines) Version 21.33.1: Oct 15, 2021 Number of users/courses to show big-list warning increased from 500 to 1000. (319944 lines) Version 21.33: Oct 15, 2021 Queries moved from search to other modules. (319942 lines) Version 21.32.3: Oct 14, 2021 Fixed bug in institutional links. (319792 lines) diff --git a/swad_degree_database.c b/swad_degree_database.c index c3777b96..b08d7526 100644 --- a/swad_degree_database.c +++ b/swad_degree_database.c @@ -284,7 +284,7 @@ long Deg_DB_GetCtrCodOfDegreeByCod (long DegCod) void Deg_DB_GetShortNameOfDegreeByCod (long DegCod,char ShrtName[Cns_HIERARCHY_MAX_BYTES_SHRT_NAME + 1]) { /***** Trivial check: degree code should be > 0 *****/ - if (DegCod > 0) + if (DegCod <= 0) { ShrtName[0] = '\0'; return; diff --git a/swad_log.c b/swad_log.c index b28309f8..da4cfdc1 100644 --- a/swad_log.c +++ b/swad_log.c @@ -203,17 +203,17 @@ void Log_GetAndShowLastClicks (void) /***** Write list of connected users *****/ HTM_TABLE_BeginCenterPadding (1); - HTM_TR_Begin (NULL); + /* Heading row */ + HTM_TR_Begin (NULL); HTM_TH (1,1,"LC_CLK",Txt_Click); // Click HTM_TH (1,1,"LC_TIM",Txt_ELAPSED_TIME); // Elapsed time HTM_TH (1,1,"LC_ROL",Txt_Role); // Role HTM_TH (1,1,"LC_CTY",Txt_Country); // Country - HTM_TH (1,1,"LC_INS",Txt_Institution); // Institution + HTM_TH (1,1,"LC_INS",Txt_Institution); // Institution HTM_TH (1,1,"LC_CTR",Txt_Center); // Center HTM_TH (1,1,"LC_DEG",Txt_Degree); // Degree HTM_TH (1,1,"LC_ACT",Txt_Action); // Action - HTM_TR_End (); for (NumClick = 0; @@ -243,16 +243,14 @@ void Log_GetAndShowLastClicks (void) Cty_GetCountryName (Hie.Cty.CtyCod,Gbl.Prefs.Language, Hie.Cty.Name[Gbl.Prefs.Language]); - /* Get institution code (row[5]) */ + /* Get institution code (row[5]), + center code (row[6]) + and degree code (row[7]) */ Hie.Ins.InsCod = Str_ConvertStrCodToLongCod (row[5]); - Ins_DB_GetShortNameOfInstitution (Hie.Ins.InsCod,Hie.Ins.ShrtName); - - /* Get center code (row[6]) */ Hie.Ctr.CtrCod = Str_ConvertStrCodToLongCod (row[6]); - Ctr_DB_GetShortNameOfCenterByCod (Hie.Ctr.CtrCod,Hie.Ctr.ShrtName); - - /* Get degree code (row[7]) */ Hie.Deg.DegCod = Str_ConvertStrCodToLongCod (row[7]); + Ins_DB_GetShortNameOfInstitution (Hie.Ins.InsCod,Hie.Ins.ShrtName); + Ctr_DB_GetShortNameOfCenterByCod (Hie.Ctr.CtrCod,Hie.Ctr.ShrtName); Deg_DB_GetShortNameOfDegreeByCod (Hie.Deg.DegCod,Hie.Deg.ShrtName); /* Print table row */ @@ -283,7 +281,7 @@ void Log_GetAndShowLastClicks (void) HTM_TD_End (); HTM_TD_Begin ("class=\"LC_DEG %s\"",ClassRow); - HTM_Txt (Hie.Deg.ShrtName); // Degree + HTM_Txt (Hie.Deg.ShrtName); // Degree HTM_TD_End (); HTM_TD_Begin ("class=\"LC_ACT %s\"",ClassRow); @@ -292,6 +290,7 @@ void Log_GetAndShowLastClicks (void) HTM_TR_End (); } + HTM_TABLE_End (); /***** Free structure that stores the query result *****/ diff --git a/swad_match_database.c b/swad_match_database.c index 5b3ab3ba..a9906f5e 100644 --- a/swad_match_database.c +++ b/swad_match_database.c @@ -27,6 +27,7 @@ #define _GNU_SOURCE // For asprintf #include // For asprintf +#include // For free #include // For string functions #include "swad_database.h" diff --git a/swad_message_database.c b/swad_message_database.c index f56eb077..ce8dce27 100644 --- a/swad_message_database.c +++ b/swad_message_database.c @@ -27,6 +27,7 @@ #define _GNU_SOURCE // For asprintf #include // For asprintf +#include // For free #include // For string functions #include "swad_database.h" diff --git a/swad_password_database.c b/swad_password_database.c index b205871b..4ee12d42 100644 --- a/swad_password_database.c +++ b/swad_password_database.c @@ -27,6 +27,7 @@ #define _GNU_SOURCE // For asprintf #include // For asprintf +#include // For free #include "swad_config.h" #include "swad_database.h" diff --git a/swad_project_database.c b/swad_project_database.c index 81c8493a..cbc42bcd 100644 --- a/swad_project_database.c +++ b/swad_project_database.c @@ -27,6 +27,7 @@ #define _GNU_SOURCE // For asprintf #include // For asprintf +#include // For free #include "swad_database.h" #include "swad_error.h"