mirror of https://github.com/acanas/swad-core.git
Version 20.87.1: Jun 01, 2021 Database function moved from swad_calendar to swad_setting.
This commit is contained in:
parent
535385c27f
commit
9ea5a0eeec
|
@ -151,12 +151,7 @@ void Cal_ChangeFirstDayOfWeek (void)
|
|||
|
||||
/***** Store icon first day of week database *****/
|
||||
if (Gbl.Usrs.Me.Logged)
|
||||
DB_QueryUPDATE ("can not update your setting about first day of week",
|
||||
"UPDATE usr_data"
|
||||
" SET FirstDayOfWeek=%u"
|
||||
" WHERE UsrCod=%ld",
|
||||
Gbl.Prefs.FirstDayOfWeek,
|
||||
Gbl.Usrs.Me.UsrDat.UsrCod);
|
||||
Set_DB_ChangeFirstDayOfWeek (Gbl.Prefs.FirstDayOfWeek);
|
||||
|
||||
/***** Set settings from current IP *****/
|
||||
Set_SetSettingsFromIP ();
|
||||
|
@ -258,6 +253,8 @@ static void Cal_DrawCalendar (Act_Action_t ActionSeeCalendar,
|
|||
FunctionToDrawContextualIcons,Args,
|
||||
PrintView ? NULL :
|
||||
Hlp_START_Calendar,Box_NOT_CLOSABLE);
|
||||
|
||||
/***** Write header *****/
|
||||
Lay_WriteHeaderClassPhoto (PrintView,false,
|
||||
Gbl.Hierarchy.Ins.InsCod,
|
||||
Gbl.Hierarchy.Deg.DegCod,
|
||||
|
|
|
@ -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 20.87 (2021-06-01)"
|
||||
#define Log_PLATFORM_VERSION "SWAD 20.87.1 (2021-06-01)"
|
||||
#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 20.87.1: Jun 01, 2021 Database function moved from swad_calendar to swad_setting. (312549 lines)
|
||||
Version 20.87: Jun 01, 2021 New module swad_building_database for database queries related to buildings. (312538 lines)
|
||||
Version 20.86.1: May 31, 2021 Queries moved to module swad_call_for_exam_database. (312420 lines)
|
||||
Version 20.86: May 31, 2021 New module swad_call_for_exam_database for database queries related to calls for exams. (312415 lines)
|
||||
|
|
|
@ -208,7 +208,7 @@ void Dat_ChangeDateFormat (void)
|
|||
|
||||
/***** Store date format in database *****/
|
||||
if (Gbl.Usrs.Me.Logged)
|
||||
Set_DB_UpdateMySettingsAboutDateFormat ();
|
||||
Set_DB_UpdateMySettingsAboutDateFormat (Gbl.Prefs.DateFormat);
|
||||
|
||||
/***** Set settings from current IP *****/
|
||||
Set_SetSettingsFromIP ();
|
||||
|
|
|
@ -343,13 +343,27 @@ unsigned Set_GetParamSideCols (void)
|
|||
/******************** Update my settings about date format *******************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Set_DB_UpdateMySettingsAboutDateFormat (void)
|
||||
void Set_DB_UpdateMySettingsAboutDateFormat (Dat_Format_t DateFormat)
|
||||
{
|
||||
DB_QueryUPDATE ("can not update your setting about date format",
|
||||
"UPDATE usr_data"
|
||||
" SET DateFormat=%u"
|
||||
" WHERE UsrCod=%ld",
|
||||
(unsigned) Gbl.Prefs.DateFormat,
|
||||
(unsigned) DateFormat,
|
||||
Gbl.Usrs.Me.UsrDat.UsrCod);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/***************** Update my settings about first day of week ****************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Set_DB_ChangeFirstDayOfWeek (unsigned FirstDayOfWeek)
|
||||
{
|
||||
DB_QueryUPDATE ("can not update your setting about first day of week",
|
||||
"UPDATE usr_data"
|
||||
" SET FirstDayOfWeek=%u"
|
||||
" WHERE UsrCod=%ld",
|
||||
Gbl.Prefs.FirstDayOfWeek,
|
||||
Gbl.Usrs.Me.UsrDat.UsrCod);
|
||||
}
|
||||
|
||||
|
|
|
@ -27,6 +27,8 @@
|
|||
/********************************* Headers ***********************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
#include "swad_date.h"
|
||||
|
||||
/*****************************************************************************/
|
||||
/***************************** Public constants ******************************/
|
||||
/*****************************************************************************/
|
||||
|
@ -48,7 +50,8 @@ void Set_RemoveOldSettingsFromIP (void);
|
|||
void Set_ChangeSideCols (void);
|
||||
unsigned Set_GetParamSideCols (void);
|
||||
|
||||
void Set_DB_UpdateMySettingsAboutDateFormat (void);
|
||||
void Set_DB_UpdateMySettingsAboutDateFormat (Dat_Format_t DateFormat);
|
||||
void Set_DB_ChangeFirstDayOfWeek (unsigned FirstDayOfWeek);
|
||||
|
||||
void Set_BeginSettingsHead (void);
|
||||
void Set_EndSettingsHead (void);
|
||||
|
|
Loading…
Reference in New Issue