2021-09-22 14:42:25 +02:00
|
|
|
|
// swad_log_database.h: access log, operations with database
|
|
|
|
|
|
|
|
|
|
#ifndef _SWAD_LOG_DB
|
|
|
|
|
#define _SWAD_LOG_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.
|
2023-03-10 17:21:04 +01:00
|
|
|
|
Copyright (C) 1999-2023 Antonio Ca<EFBFBD>as Vargas
|
2021-09-22 14:42:25 +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 *****************************/
|
|
|
|
|
/*****************************************************************************/
|
|
|
|
|
|
|
|
|
|
long Log_DB_LogAccessInHistoricalLog (long ActCod,Rol_Role_t RoleToStore);
|
|
|
|
|
void Log_DB_LogAccessInRecentLog (long LogCod,long ActCod,Rol_Role_t RoleToStore);
|
|
|
|
|
void Log_DB_LogComments (long LogCod,const char *CommentsDB);
|
2022-10-29 12:20:54 +02:00
|
|
|
|
void Log_DB_LogSearchString (long LogCod,const struct Sch_Search *Search);
|
2021-09-22 14:42:25 +02:00
|
|
|
|
void Log_DB_LogAPI (long LogCod);
|
|
|
|
|
void Log_DB_LogBanner (long LogCod,long BanCodClicked);
|
|
|
|
|
|
|
|
|
|
unsigned Log_DB_GetLastClicks (MYSQL_RES **mysql_res);
|
2021-10-07 01:21:23 +02:00
|
|
|
|
unsigned Log_DB_GetUsrFirstClick (MYSQL_RES **mysql_res,long UsrCod);
|
|
|
|
|
unsigned Log_DB_GetUsrNumClicks (long UsrCod);
|
2021-10-13 14:38:51 +02:00
|
|
|
|
unsigned Log_DB_GetMyClicksGroupedByAction (MYSQL_RES **mysql_res,
|
|
|
|
|
time_t FirstClickTimeUTC,
|
|
|
|
|
unsigned MaxActions);
|
|
|
|
|
unsigned Log_DB_GetMyMaxHitsPerYear (MYSQL_RES **mysql_res,
|
|
|
|
|
time_t FirstClickTimeUTC);
|
|
|
|
|
unsigned Log_DB_GetMyCrssAndHitsPerCrs (MYSQL_RES **mysql_res,Rol_Role_t Role);
|
2021-10-13 15:37:14 +02:00
|
|
|
|
unsigned Log_DB_GetMyHistoricCrss (MYSQL_RES **mysql_res,
|
|
|
|
|
Rol_Role_t Role,unsigned MinClicksCrs);
|
|
|
|
|
unsigned Log_DB_GetMyHitsPerYear (MYSQL_RES **mysql_res,
|
|
|
|
|
bool AnyCourse,long CrsCod,Rol_Role_t Role,
|
|
|
|
|
time_t FirstClickTimeUTC);
|
2021-10-19 18:18:50 +02:00
|
|
|
|
void Log_DB_GetLogComments (long LogCod,char Comments[Cns_MAX_BYTES_TEXT + 1]);
|
2021-09-22 14:42:25 +02:00
|
|
|
|
|
|
|
|
|
void Log_DB_RemoveOldEntriesRecentLog (void);
|
|
|
|
|
|
|
|
|
|
#endif
|