2021-10-18 23:16:56 +02:00
|
|
|
|
// swad_setting_database.h: user's settings / preferences, operations with database
|
|
|
|
|
|
|
|
|
|
#ifndef _SWAD_SET_DB
|
|
|
|
|
#define _SWAD_SET_DB
|
|
|
|
|
/*
|
|
|
|
|
SWAD (Shared Workspace At a Distance in Spanish),
|
|
|
|
|
is a web platform developed at the University of Granada (Spain),
|
|
|
|
|
and used to support university teaching.
|
|
|
|
|
|
|
|
|
|
This file is part of SWAD core.
|
2024-02-07 00:40:28 +01:00
|
|
|
|
Copyright (C) 1999-2024 Antonio Ca<EFBFBD>as Vargas
|
2021-10-18 23:16:56 +02:00
|
|
|
|
|
|
|
|
|
This program is free software: you can redistribute it and/or modify
|
|
|
|
|
it under the terms of the GNU Affero General Public License as
|
|
|
|
|
published by the Free Software Foundation, either version 3 of the
|
|
|
|
|
License, or (at your option) any later version.
|
|
|
|
|
|
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
GNU Affero General Public License for more details.
|
|
|
|
|
|
|
|
|
|
You should have received a copy of the GNU Affero General Public License
|
|
|
|
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
*/
|
|
|
|
|
/*****************************************************************************/
|
|
|
|
|
/***************************** Public prototypes *****************************/
|
|
|
|
|
/*****************************************************************************/
|
|
|
|
|
|
|
|
|
|
//--------------------------- Global user settings ----------------------------
|
|
|
|
|
void Set_DB_UpdateMySettingsAboutLanguage (void);
|
|
|
|
|
void Set_DB_UpdateMySettingsAboutDateFormat (Dat_Format_t DateFormat);
|
|
|
|
|
void Set_DB_UpdateMySettingsAboutFirstDayOfWeek (unsigned FirstDayOfWeek);
|
|
|
|
|
void Set_DB_UpdateMySettingsAboutIconSet (const char *IconSetId);
|
|
|
|
|
void Set_DB_UpdateMySettingsAboutMenu (Mnu_Menu_t Menu);
|
2021-10-24 20:32:09 +02:00
|
|
|
|
void Set_DB_UpdateMySettingsAboutTheme (const char *ThemeId);
|
|
|
|
|
void Set_DB_UpdateMySettingsAboutSideCols (void);
|
2021-12-02 08:39:18 +01:00
|
|
|
|
void Set_DB_UpdateMySettingsAboutPhotoShape (void);
|
2021-12-01 01:43:13 +01:00
|
|
|
|
void Set_DB_UpdateMySettingsAboutPhotoVisibility (void);
|
2021-10-18 23:16:56 +02:00
|
|
|
|
void Set_DB_UpdateMySettingsAboutBasicProfile (void);
|
|
|
|
|
void Set_DB_UpdateMySettingsAboutExtendedProfile (void);
|
|
|
|
|
void Set_DB_UpdateMySettingsAboutNotifyEvents (void);
|
|
|
|
|
|
2021-11-08 20:52:40 +01:00
|
|
|
|
unsigned Set_DB_GetMyLanguage (MYSQL_RES **mysql_res);
|
|
|
|
|
|
2021-10-18 23:16:56 +02:00
|
|
|
|
//-------------------- User settings in the current course --------------------
|
2024-02-09 00:22:59 +01:00
|
|
|
|
void Set_DB_InsertUsrInCrsSettings (long UsrCod,long HieCod);
|
2021-10-18 23:16:56 +02:00
|
|
|
|
|
2021-11-03 21:31:16 +01:00
|
|
|
|
void Set_DB_UpdateGrpMyLastAccZone (const char *FieldNameDB,long GrpCod);
|
|
|
|
|
void Set_DB_UpdateMyUsrListType (void);
|
|
|
|
|
void Set_DB_UpdateMyColsClassPhoto (void);
|
|
|
|
|
void Set_DB_UpdateMyPrefAboutListWithPhotosPhoto (void);
|
2021-10-18 23:16:56 +02:00
|
|
|
|
|
2021-11-08 20:52:40 +01:00
|
|
|
|
unsigned Set_DB_GetMyUsrListType (MYSQL_RES **mysql_res);
|
|
|
|
|
unsigned Set_DB_GetMyColsClassPhoto (MYSQL_RES **mysql_res);
|
|
|
|
|
unsigned Set_DB_GetMyPrefAboutListWithPhotosPhoto (MYSQL_RES **mysql_res);
|
|
|
|
|
|
2024-02-09 00:22:59 +01:00
|
|
|
|
void Set_DB_RemUsrFromCrsSettings (long UsrCod,long HieCod);
|
2021-10-18 23:16:56 +02:00
|
|
|
|
void Set_DB_RemUsrFromAllCrssSettings (long UsrCod);
|
2024-02-09 00:22:59 +01:00
|
|
|
|
void Set_DB_RemAllUsrsFromCrsSettings (long HieCod);
|
2021-10-18 23:16:56 +02:00
|
|
|
|
|
|
|
|
|
//------------------- IP settings (when no user logged) -----------------------
|
2021-12-02 08:39:18 +01:00
|
|
|
|
void Set_DB_UpdateMyIPSettingsForCurrentIP (void);
|
|
|
|
|
void Set_DB_UpdateMyIPSettingsForAllMyIPs (void);
|
2021-10-18 23:16:56 +02:00
|
|
|
|
|
|
|
|
|
unsigned Set_DB_GetSettingsFromIP (MYSQL_RES **mysql_res);
|
|
|
|
|
|
|
|
|
|
void Set_DB_RemoveOldSettingsFromIP (void);
|
|
|
|
|
|
|
|
|
|
#endif
|