2019-12-29 12:39:00 +01:00
|
|
|
|
// swad_course.h: edition of courses
|
2014-12-01 23:55:08 +01:00
|
|
|
|
|
|
|
|
|
#ifndef _SWAD_CRS
|
|
|
|
|
#define _SWAD_CRS
|
|
|
|
|
/*
|
|
|
|
|
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
|
2014-12-01 23:55:08 +01: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/>.
|
|
|
|
|
*/
|
|
|
|
|
/*****************************************************************************/
|
|
|
|
|
/********************************* Headers ***********************************/
|
|
|
|
|
/*****************************************************************************/
|
|
|
|
|
|
|
|
|
|
#include <mysql/mysql.h> // To access MySQL databases
|
2015-10-16 02:24:29 +02:00
|
|
|
|
#include <stdbool.h> // For boolean type
|
2014-12-01 23:55:08 +01:00
|
|
|
|
|
2021-02-11 22:57:09 +01:00
|
|
|
|
#include "swad_constant.h"
|
2014-12-01 23:55:08 +01:00
|
|
|
|
#include "swad_degree.h"
|
2023-09-20 20:07:04 +02:00
|
|
|
|
#include "swad_figure_cache.h"
|
2023-09-22 14:47:56 +02:00
|
|
|
|
#include "swad_hierarchy_type.h"
|
2023-10-10 19:12:17 +02:00
|
|
|
|
#include "swad_name.h"
|
2016-06-16 11:28:20 +02:00
|
|
|
|
#include "swad_user.h"
|
2014-12-01 23:55:08 +01:00
|
|
|
|
|
|
|
|
|
/*****************************************************************************/
|
|
|
|
|
/***************************** Public constants ******************************/
|
|
|
|
|
/*****************************************************************************/
|
|
|
|
|
|
|
|
|
|
#define Crs_MIN_MONTHS_WITHOUT_ACCESS_TO_REMOVE_OLD_CRSS 6
|
|
|
|
|
#define Crs_DEF_MONTHS_WITHOUT_ACCESS_TO_REMOVE_OLD_CRSS 12
|
|
|
|
|
#define Crs_MAX_MONTHS_WITHOUT_ACCESS_TO_REMOVE_OLD_CRSS 60
|
|
|
|
|
|
|
|
|
|
/*****************************************************************************/
|
|
|
|
|
/***************************** Public prototypes *****************************/
|
|
|
|
|
/*****************************************************************************/
|
|
|
|
|
|
|
|
|
|
void Crs_ShowIntroduction (void);
|
|
|
|
|
|
2021-09-10 10:19:46 +02:00
|
|
|
|
unsigned Crs_GetCachedNumCrssWithUsrs (Rol_Role_t Role);
|
2014-12-01 23:55:08 +01:00
|
|
|
|
|
2015-07-25 20:20:07 +02:00
|
|
|
|
void Crs_WriteSelectorOfCourse (void);
|
2014-12-01 23:55:08 +01:00
|
|
|
|
void Crs_ShowCrssOfCurrentDeg (void);
|
2018-10-09 17:56:18 +02:00
|
|
|
|
void Crs_WriteSelectorMyCoursesInBreadcrumb (void);
|
2014-12-01 23:55:08 +01:00
|
|
|
|
|
2017-04-30 12:44:53 +02:00
|
|
|
|
void Crs_EditCourses (void);
|
|
|
|
|
|
2024-03-20 09:39:04 +01:00
|
|
|
|
void Crs_ReceiveReqCrs (void);
|
|
|
|
|
void Crs_ReceiveNewCrs (void);
|
2014-12-01 23:55:08 +01:00
|
|
|
|
|
|
|
|
|
void Crs_RemoveCourse (void);
|
2023-09-18 15:15:29 +02:00
|
|
|
|
bool Crs_GetCourseDataByCod (struct Hie_Node *Crs);
|
2024-02-09 00:22:59 +01:00
|
|
|
|
void Crs_RemoveCourseCompletely (long HieCod);
|
2014-12-01 23:55:08 +01:00
|
|
|
|
void Crs_ChangeInsCrsCod (void);
|
|
|
|
|
void Crs_ChangeCrsYear (void);
|
2021-05-27 00:30:06 +02:00
|
|
|
|
|
2023-09-18 15:15:29 +02:00
|
|
|
|
void Crs_UpdateInstitutionalCrsCod (struct Hie_Node *Crs,
|
2021-05-27 00:30:06 +02:00
|
|
|
|
const char *NewInstitutionalCrsCod);
|
2023-09-18 15:15:29 +02:00
|
|
|
|
void Crs_UpdateCrsYear (struct Hie_Node *Crs,unsigned NewYear);
|
2021-05-27 00:30:06 +02:00
|
|
|
|
|
2024-04-23 23:54:23 +02:00
|
|
|
|
void Crs_RenameCourseShrt (void);
|
2014-12-01 23:55:08 +01:00
|
|
|
|
void Crs_RenameCourseFull (void);
|
2023-10-11 00:02:14 +02:00
|
|
|
|
void Crs_RenameCourse (struct Hie_Node *Crs,Nam_ShrtOrFullName_t ShrtOrFull);
|
2021-05-27 00:30:06 +02:00
|
|
|
|
|
2014-12-01 23:55:08 +01:00
|
|
|
|
void Crs_ChangeCrsStatus (void);
|
|
|
|
|
void Crs_ContEditAfterChgCrs (void);
|
|
|
|
|
|
2022-09-24 18:30:26 +02:00
|
|
|
|
void Crs_GetAndWriteCrssOfAUsr (const struct Usr_Data *UsrDat,Rol_Role_t Role);
|
2014-12-01 23:55:08 +01:00
|
|
|
|
|
2018-10-30 14:47:31 +01:00
|
|
|
|
void Crs_ListCrssFound (MYSQL_RES **mysql_res,unsigned NumCrss);
|
2014-12-01 23:55:08 +01:00
|
|
|
|
|
|
|
|
|
void Crs_UpdateCrsLast (void);
|
2017-03-27 01:14:38 +02:00
|
|
|
|
|
|
|
|
|
void Crs_PutLinkToRemoveOldCrss (void);
|
2014-12-01 23:55:08 +01:00
|
|
|
|
void Crs_AskRemoveOldCrss (void);
|
|
|
|
|
void Crs_RemoveOldCrss (void);
|
|
|
|
|
|
|
|
|
|
#endif
|