2016-03-20 16:30:52 +01:00
|
|
|
|
// swad_degree_type.h: degree types
|
|
|
|
|
|
2021-05-27 23:30:16 +02:00
|
|
|
|
#ifndef _SWAD_DEG_TYP
|
|
|
|
|
#define _SWAD_DEG_TYP
|
2016-03-20 16:30:52 +01:00
|
|
|
|
/*
|
|
|
|
|
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
|
2016-03-20 16:30:52 +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 ***********************************/
|
|
|
|
|
/*****************************************************************************/
|
|
|
|
|
|
2017-03-24 13:22:54 +01:00
|
|
|
|
#include "swad_scope.h"
|
|
|
|
|
|
2016-03-20 16:30:52 +01:00
|
|
|
|
/*****************************************************************************/
|
|
|
|
|
/***************************** Public constants ******************************/
|
|
|
|
|
/*****************************************************************************/
|
|
|
|
|
|
2021-05-27 23:30:16 +02:00
|
|
|
|
#define DegTyp_MAX_CHARS_DEGREE_TYPE_NAME (32 - 1) // 31
|
|
|
|
|
#define DegTyp_MAX_BYTES_DEGREE_TYPE_NAME ((DegTyp_MAX_CHARS_DEGREE_TYPE_NAME + 1) * Str_MAX_BYTES_PER_CHAR - 1) // 511
|
2016-03-20 16:30:52 +01:00
|
|
|
|
|
|
|
|
|
/*****************************************************************************/
|
|
|
|
|
/******************************* Public types ********************************/
|
|
|
|
|
/*****************************************************************************/
|
|
|
|
|
|
2022-10-28 20:07:14 +02:00
|
|
|
|
struct DegTyp_DegreeType
|
2016-03-20 16:30:52 +01:00
|
|
|
|
{
|
2021-05-27 23:30:16 +02:00
|
|
|
|
long DegTypCod; // Degree type code
|
|
|
|
|
char DegTypName[DegTyp_MAX_BYTES_DEGREE_TYPE_NAME + 1]; // Degree type name
|
|
|
|
|
unsigned NumDegs; // Number of degrees of this type
|
2016-03-20 16:30:52 +01:00
|
|
|
|
};
|
|
|
|
|
|
2022-10-28 20:07:14 +02:00
|
|
|
|
struct DegTyp_DegTypes
|
|
|
|
|
{
|
|
|
|
|
unsigned Num; // Number of degree types
|
|
|
|
|
struct DegTyp_DegreeType *Lst; // List of degree types
|
|
|
|
|
};
|
|
|
|
|
|
2021-05-27 23:30:16 +02:00
|
|
|
|
#define DegTyp_NUM_ORDERS 2
|
2017-03-24 01:09:27 +01:00
|
|
|
|
typedef enum
|
|
|
|
|
{
|
2021-05-27 23:30:16 +02:00
|
|
|
|
DegTyp_ORDER_BY_DEGREE_TYPE = 0,
|
|
|
|
|
DegTyp_ORDER_BY_NUM_DEGREES = 1,
|
|
|
|
|
} DegTyp_Order_t;
|
2017-03-24 01:09:27 +01:00
|
|
|
|
|
2016-03-20 16:30:52 +01:00
|
|
|
|
/*****************************************************************************/
|
|
|
|
|
/***************************** Public prototypes *****************************/
|
|
|
|
|
/*****************************************************************************/
|
|
|
|
|
|
2021-05-27 23:30:16 +02:00
|
|
|
|
void DegTyp_WriteSelectorDegreeTypes (long SelectedDegTypCod);
|
2017-03-24 12:23:42 +01:00
|
|
|
|
|
2021-05-27 23:30:16 +02:00
|
|
|
|
void DegTyp_SeeDegreeTypesInDegTab (void);
|
|
|
|
|
void DegTyp_SeeDegreeTypesInStaTab (void);
|
2022-10-28 20:07:14 +02:00
|
|
|
|
void DegTyp_GetAndEditDegreeTypes (void);
|
|
|
|
|
void DegTyp_EditDegreeTypes (const struct DegTyp_DegTypes *DegTypes);
|
2018-11-15 12:52:56 +01:00
|
|
|
|
|
2021-05-27 23:30:16 +02:00
|
|
|
|
void DegTyp_PutIconToViewDegreeTypes (void);
|
2018-11-15 12:52:56 +01:00
|
|
|
|
|
2021-05-27 23:30:16 +02:00
|
|
|
|
bool DegTyp_CheckIfICanCreateDegreeTypes (void);
|
2016-03-20 16:30:52 +01:00
|
|
|
|
|
2022-10-28 20:07:14 +02:00
|
|
|
|
void DegTyp_GetListDegreeTypes (struct DegTyp_DegTypes *DegTypes,
|
2023-09-22 14:47:56 +02:00
|
|
|
|
Hie_Level_t Level,DegTyp_Order_t Order);
|
2022-10-28 20:07:14 +02:00
|
|
|
|
void DegTyp_FreeListDegreeTypes (struct DegTyp_DegTypes *DegTypes);
|
2016-03-20 16:30:52 +01:00
|
|
|
|
|
2021-05-27 23:30:16 +02:00
|
|
|
|
void DegTyp_ReceiveFormNewDegreeType (void);
|
2016-03-20 16:30:52 +01:00
|
|
|
|
|
2021-05-27 23:30:16 +02:00
|
|
|
|
void DegTyp_RemoveDegreeType (void);
|
2016-03-20 16:30:52 +01:00
|
|
|
|
|
2023-03-23 09:35:20 +01:00
|
|
|
|
bool DegTyp_GetDegreeTypeDataByCod (struct DegTyp_DegreeType *DegTyp);
|
2021-05-27 23:30:16 +02:00
|
|
|
|
void DegTyp_RenameDegreeType (void);
|
2016-03-20 16:30:52 +01:00
|
|
|
|
|
2021-05-27 23:30:16 +02:00
|
|
|
|
void DegTyp_ContEditAfterChgDegTyp (void);
|
2019-04-08 13:06:17 +02:00
|
|
|
|
|
2022-01-03 02:47:16 +01:00
|
|
|
|
//-------------------------------- Figures ------------------------------------
|
|
|
|
|
void DegTyp_GetAndShowDegreeTypesStats (void);
|
|
|
|
|
|
2016-03-20 16:30:52 +01:00
|
|
|
|
#endif
|