Version 21.1: Sep 13, 2021 New module swad_browser_database for database queries related to file browsers.

This commit is contained in:
acanas 2021-09-13 23:55:28 +02:00
parent d239a2eb2b
commit 60a9c2ab2b
19 changed files with 1190 additions and 1042 deletions

View File

@ -31,8 +31,9 @@ OBJS = swad_account.o swad_account_database.o swad_action.o swad_admin.o \
swad_announcement.o swad_announcement_database.o swad_API.o \
swad_assignment.o swad_assignment_database.o swad_attendance.o \
swad_attendance_database.o \
swad_banner.o swad_banner_database.o swad_box.o swad_building.o \
swad_building_database.o swad_button.o \
swad_banner.o swad_banner_database.o swad_box.o swad_browser.o \
swad_browser_database.o swad_building.o swad_building_database.o \
swad_button.o \
swad_calendar.o swad_call_for_exam.o swad_call_for_exam_database.o \
swad_center.o swad_center_config.o swad_center_database.o swad_chat.o \
swad_chat_database.o swad_config.o swad_connected.o \
@ -47,9 +48,8 @@ OBJS = swad_account.o swad_account_database.o swad_action.o swad_admin.o \
swad_exam_database.o swad_exam_log.o swad_exam_print.o \
swad_exam_result.o swad_exam_session.o swad_exam_set.o \
swad_figure.o swad_figure_cache.o swad_figure_database.o swad_file.o \
swad_file_browser.o swad_file_extension.o swad_file_MIME.o \
swad_firewall.o swad_follow.o swad_follow_database.o swad_form.o \
swad_forum.o \
swad_file_extension.o swad_file_MIME.o swad_firewall.o swad_follow.o \
swad_follow_database.o swad_form.o swad_forum.o \
swad_game.o swad_global.o swad_group.o swad_group_database.o \
swad_help.o swad_hierarchy.o swad_hierarchy_config.o swad_holiday.o \
swad_HTML.o \

View File

@ -104,9 +104,9 @@ cp -f /home/acanas/swad/swad/swad /var/www/cgi-bin/
#include "swad_account.h"
#include "swad_API.h"
#include "swad_attendance_database.h"
#include "swad_browser.h"
#include "swad_database.h"
#include "swad_error.h"
#include "swad_file_browser.h"
#include "swad_forum.h"
#include "swad_global.h"
#include "swad_group_database.h"

View File

@ -27,8 +27,8 @@
/********************************* Headers ***********************************/
/*****************************************************************************/
#include "swad_browser.h"
#include "swad_date.h"
#include "swad_file_browser.h"
#include "swad_notification.h"
#include "swad_user.h"

View File

@ -30,7 +30,7 @@
#include <mysql/mysql.h> // To access MySQL databases
#include "swad_assignment.h"
#include "swad_file_browser.h"
#include "swad_browser.h"
#include "swad_group.h"
/*****************************************************************************/

File diff suppressed because it is too large Load Diff

View File

@ -1,7 +1,7 @@
// swad_file_browser.h: file browsers
// swad_browser.h: file browsers
#ifndef _SWAD_FILE_BROWSER
#define _SWAD_FILE_BROWSER
#ifndef _SWAD_BROWSER
#define _SWAD_BROWSER
/*
SWAD (Shared Workspace At a Distance in Spanish),
is a web platform developed at the University of Granada (Spain),
@ -276,8 +276,4 @@ void Brw_RemoveOldFilesBriefcase (void);
Act_Action_t Brw_GetActionExpand (void);
Act_Action_t Brw_GetActionContract (void);
void Brw_DB_GetSizeOfFileZone (MYSQL_RES **mysql_res,
Brw_FileBrowser_t FileBrowser);
unsigned Brw_DB_GetNumberOfOERs (MYSQL_RES **mysql_res,Brw_License_t License);
#endif

1110
swad_browser_database.c Normal file

File diff suppressed because it is too large Load Diff

54
swad_browser_database.h Normal file
View File

@ -0,0 +1,54 @@
// swad_browser_database.h: file browsers operations with database
#ifndef _SWAD_BROWSER_DATABASE
#define _SWAD_BROWSER_DATABASE
/*
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.
Copyright (C) 1999-2021 Antonio Cañas Vargas
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/>.
*/
/*****************************************************************************/
/********************************* Headers ***********************************/
/*****************************************************************************/
// #include <linux/limits.h> // For PATH_MAX
#include <mysql/mysql.h> // To access MySQL databases
#include "swad_browser.h"
// #include "swad_course.h"
// #include "swad_group.h"
// #include "swad_notification.h"
/*****************************************************************************/
/************************ Public types and constants *************************/
/*****************************************************************************/
/*****************************************************************************/
/****************************** Public constants *****************************/
/*****************************************************************************/
/*****************************************************************************/
/***************************** Public prototypes *****************************/
/*****************************************************************************/
void Brw_DB_GetSizeOfFileZone (MYSQL_RES **mysql_res,
Brw_FileBrowser_t FileBrowser);
unsigned Brw_DB_GetNumberOfOERs (MYSQL_RES **mysql_res,Brw_License_t License);
#endif

View File

@ -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.0.2 (2021-09-13)"
#define Log_PLATFORM_VERSION "SWAD 21.1 (2021-09-13)"
#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.1: Sep 13, 2021 New module swad_browser_database for database queries related to file browsers. (315050 lines)
Version 21.0.2: Sep 13, 2021 Queries moved to module swad_notification. (314927 lines)
Version 21.0.1: Sep 13, 2021 Queries moved to module swad_follow_database. (314910 lines)
Version 21.0: Sep 13, 2021 Fixed bug in degrees photo. (314914 lines)

View File

@ -34,12 +34,12 @@
#include "swad_agenda_database.h"
#include "swad_assignment_database.h"
#include "swad_box.h"
#include "swad_browser_database.h"
#include "swad_database.h"
#include "swad_error.h"
#include "swad_exam_database.h"
#include "swad_figure.h"
#include "swad_figure_cache.h"
#include "swad_file_browser.h"
#include "swad_follow.h"
#include "swad_follow_database.h"
#include "swad_form.h"

View File

@ -36,6 +36,7 @@
#include "swad_API.h"
#include "swad_assignment.h"
#include "swad_box.h"
#include "swad_browser.h"
#include "swad_center.h"
#include "swad_connected.h"
#include "swad_config.h"
@ -45,7 +46,6 @@
#include "swad_degree_type.h"
#include "swad_enrolment.h"
#include "swad_file.h"
#include "swad_file_browser.h"
#include "swad_icon.h"
#include "swad_institution.h"
#include "swad_layout.h"

View File

@ -29,7 +29,7 @@
#include <stdbool.h> // For boolean type
#include "swad_file_browser.h"
#include "swad_browser.h"
/*****************************************************************************/
/******************************* Public types ********************************/

View File

@ -37,12 +37,12 @@
#include <unistd.h> // For unlink, lstat
#include "swad_box.h"
#include "swad_browser.h"
#include "swad_config.h"
#include "swad_cookie.h"
#include "swad_database.h"
#include "swad_error.h"
#include "swad_file.h"
#include "swad_file_browser.h"
#include "swad_form.h"
#include "swad_global.h"
#include "swad_HTML.h"

View File

@ -37,12 +37,12 @@
#include "swad_action.h"
#include "swad_box.h"
#include "swad_browser.h"
#include "swad_config.h"
#include "swad_database.h"
#include "swad_enrolment.h"
#include "swad_error.h"
#include "swad_file.h"
#include "swad_file_browser.h"
#include "swad_follow.h"
#include "swad_form.h"
#include "swad_global.h"

View File

@ -27,8 +27,8 @@
/********************************* Headers ***********************************/
/*****************************************************************************/
#include "swad_browser.h"
#include "swad_date.h"
#include "swad_file_browser.h"
#include "swad_notification.h"
#include "swad_user.h"

View File

@ -58,6 +58,7 @@
#include "swad_action.h"
#include "swad_assignment.h"
#include "swad_browser.h"
#include "swad_building.h"
#include "swad_center.h"
#include "swad_config.h"
@ -69,7 +70,6 @@
#include "swad_department.h"
#include "swad_exam_log.h"
#include "swad_figure.h"
#include "swad_file_browser.h"
#include "swad_forum.h"
#include "swad_holiday.h"
#include "swad_info.h"

View File

@ -27,8 +27,8 @@
/********************************** Headers **********************************/
/*****************************************************************************/
#include "swad_browser.h"
#include "swad_database.h"
#include "swad_file_browser.h"
#include "swad_timeline_comment.h"
#include "swad_timeline_favourite.h"
#include "swad_timeline_note.h"

View File

@ -30,6 +30,7 @@
#include "swad_error.h"
#include "swad_follow.h"
#include "swad_follow_database.h"
#include "swad_global.h"
#include "swad_profile.h"
#include "swad_timeline.h"

View File

@ -37,9 +37,9 @@
#include <unistd.h> // For chdir...
#include "swad_box.h"
#include "swad_browser.h"
#include "swad_config.h"
#include "swad_error.h"
#include "swad_file_browser.h"
#include "swad_form.h"
#include "swad_global.h"
#include "swad_HTML.h"