mirror of https://github.com/acanas/swad-core.git
Version 21.39.2: Oct 22, 2021 Fixed bug in settings.
This commit is contained in:
parent
f207d0e1c6
commit
b8e24424ed
|
@ -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.
|
TODO: En las encuestas, que los estudiantes no puedan ver los resultados hasta que no finalice el plazo.
|
||||||
*/
|
*/
|
||||||
#define Log_PLATFORM_VERSION "SWAD 21.39.1 (2021-10-21)"
|
#define Log_PLATFORM_VERSION "SWAD 21.39.2 (2021-10-22)"
|
||||||
#define CSS_FILE "swad20.45.css"
|
#define CSS_FILE "swad20.45.css"
|
||||||
#define JS_FILE "swad20.69.1.js"
|
#define JS_FILE "swad20.69.1.js"
|
||||||
/*
|
/*
|
||||||
TODO: Rename CENTRE to CENTER in help wiki.
|
TODO: Rename CENTRE to CENTER in help wiki.
|
||||||
TODO: Rename ASSESSMENT.Announcements to ASSESSMENT.Calls_for_exams
|
TODO: Rename ASSESSMENT.Announcements to ASSESSMENT.Calls_for_exams
|
||||||
|
|
||||||
|
Version 21.39.2: Oct 22, 2021 Fixed bug in settings. (320544 lines)
|
||||||
Version 21.39.1: Oct 21, 2021 Queries moved to module swad_survey_database. (320540 lines)
|
Version 21.39.1: Oct 21, 2021 Queries moved to module swad_survey_database. (320540 lines)
|
||||||
Version 21.39: Oct 21, 2021 Fixed bug in nicknames. Reported by Ana Ollarves Reyes. (320487 lines)
|
Version 21.39: Oct 21, 2021 Fixed bug in nicknames. Reported by Ana Ollarves Reyes. (320487 lines)
|
||||||
Version 21.38.1: Oct 20, 2021 Queries moved to module swad_survey_database. (320522 lines)
|
Version 21.38.1: Oct 20, 2021 Queries moved to module swad_survey_database. (320522 lines)
|
||||||
|
|
|
@ -144,35 +144,37 @@ void Set_GetSettingsFromIP (void)
|
||||||
if (Gbl.IP[0])
|
if (Gbl.IP[0])
|
||||||
{
|
{
|
||||||
/***** Get settings from database *****/
|
/***** Get settings from database *****/
|
||||||
if (Set_DB_GetSettingsFromIP (&mysql_res) != 1)
|
if (Set_DB_GetSettingsFromIP (&mysql_res))
|
||||||
Err_ShowErrorAndExit ("Internal error while getting settings.");
|
|
||||||
|
|
||||||
/***** Get settings from database *****/
|
|
||||||
row = mysql_fetch_row (mysql_res);
|
|
||||||
|
|
||||||
/* Get first day of week (row[0]) */
|
|
||||||
Gbl.Prefs.FirstDayOfWeek = Cal_GetFirstDayOfWeekFromStr (row[0]);
|
|
||||||
|
|
||||||
/* Get date format (row[1]) */
|
|
||||||
Gbl.Prefs.DateFormat = Dat_GetDateFormatFromStr (row[1]);
|
|
||||||
|
|
||||||
/* Get theme (row[2]) */
|
|
||||||
Gbl.Prefs.Theme = The_GetThemeFromStr (row[2]);
|
|
||||||
|
|
||||||
/* Get icon set (row[3]) */
|
|
||||||
Gbl.Prefs.IconSet = Ico_GetIconSetFromStr (row[3]);
|
|
||||||
|
|
||||||
/* Get menu (row[4]) */
|
|
||||||
Gbl.Prefs.Menu = Mnu_GetMenuFromStr (row[4]);
|
|
||||||
|
|
||||||
/* Get if user wants to show side columns (row[5]) */
|
|
||||||
if (sscanf (row[5],"%u",&Gbl.Prefs.SideCols) == 1)
|
|
||||||
{
|
{
|
||||||
if (Gbl.Prefs.SideCols > Lay_SHOW_BOTH_COLUMNS)
|
row = mysql_fetch_row (mysql_res);
|
||||||
|
|
||||||
|
/* Get first day of week (row[0]) */
|
||||||
|
Gbl.Prefs.FirstDayOfWeek = Cal_GetFirstDayOfWeekFromStr (row[0]);
|
||||||
|
|
||||||
|
/* Get date format (row[1]) */
|
||||||
|
Gbl.Prefs.DateFormat = Dat_GetDateFormatFromStr (row[1]);
|
||||||
|
|
||||||
|
/* Get theme (row[2]) */
|
||||||
|
Gbl.Prefs.Theme = The_GetThemeFromStr (row[2]);
|
||||||
|
|
||||||
|
/* Get icon set (row[3]) */
|
||||||
|
Gbl.Prefs.IconSet = Ico_GetIconSetFromStr (row[3]);
|
||||||
|
|
||||||
|
/* Get menu (row[4]) */
|
||||||
|
Gbl.Prefs.Menu = Mnu_GetMenuFromStr (row[4]);
|
||||||
|
|
||||||
|
/* Get if user wants to show side columns (row[5]) */
|
||||||
|
if (sscanf (row[5],"%u",&Gbl.Prefs.SideCols) == 1)
|
||||||
|
{
|
||||||
|
if (Gbl.Prefs.SideCols > Lay_SHOW_BOTH_COLUMNS)
|
||||||
|
Gbl.Prefs.SideCols = Cfg_DEFAULT_COLUMNS;
|
||||||
|
}
|
||||||
|
else
|
||||||
Gbl.Prefs.SideCols = Cfg_DEFAULT_COLUMNS;
|
Gbl.Prefs.SideCols = Cfg_DEFAULT_COLUMNS;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
Gbl.Prefs.SideCols = Cfg_DEFAULT_COLUMNS;
|
/***** Free structure that stores the query result *****/
|
||||||
|
DB_FreeMySQLResult (&mysql_res);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -26,6 +26,7 @@
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
#include <stddef.h> // For NULL
|
#include <stddef.h> // For NULL
|
||||||
|
#include <stdlib.h> // For free
|
||||||
#include <string.h> // For string functions
|
#include <string.h> // For string functions
|
||||||
|
|
||||||
#include "swad_database.h"
|
#include "swad_database.h"
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
// #include <linux/limits.h> // For PATH_MAX
|
// #include <linux/limits.h> // For PATH_MAX
|
||||||
// #include <stddef.h> // For NULL
|
// #include <stddef.h> // For NULL
|
||||||
#include <stdio.h> // For asprintf
|
#include <stdio.h> // For asprintf
|
||||||
// #include <stdlib.h> // For calloc
|
#include <stdlib.h> // For free
|
||||||
// #include <string.h> // For string functions
|
// #include <string.h> // For string functions
|
||||||
|
|
||||||
// #include "swad_attendance.h"
|
// #include "swad_attendance.h"
|
||||||
|
|
Loading…
Reference in New Issue