swad-core/swad_degree_type.h

95 lines
3.5 KiB
C
Raw Permalink Normal View History

2016-03-20 16:30:52 +01:00
// swad_degree_type.h: degree types
#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.
Copyright (C) 1999-2024 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 ******************************/
/*****************************************************************************/
#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 ********************************/
/*****************************************************************************/
struct DegTyp_DegType
2016-03-20 16:30:52 +01: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
};
struct DegTyp_DegTypes
{
unsigned Num; // Number of degree types
struct DegTyp_DegType *Lst; // List of degree types
};
#define DegTyp_NUM_ORDERS 2
2017-03-24 01:09:27 +01:00
typedef enum
{
DegTyp_ORDER_BY_DEG_TYPE = 0,
DegTyp_ORDER_BY_NUM_DEGS = 1,
} DegTyp_Order_t;
2017-03-24 01:09:27 +01:00
2016-03-20 16:30:52 +01:00
/*****************************************************************************/
/***************************** Public prototypes *****************************/
/*****************************************************************************/
void DegTyp_WriteSelectorDegTypes (long SelectedDegTypCod);
2017-03-24 12:23:42 +01:00
void DegTyp_SeeDegTypesInDegTab (void);
void DegTyp_SeeDegTypesInStaTab (void);
void DegTyp_GetAndEditDegTypes (void);
void DegTyp_EditDegTypes (const struct DegTyp_DegTypes *DegTypes);
2018-11-15 12:52:56 +01:00
void DegTyp_PutIconToViewDegTypes (void);
2018-11-15 12:52:56 +01:00
Usr_Can_t DegTyp_CheckIfICanCreateDegTypes (void);
2016-03-20 16:30:52 +01:00
void DegTyp_GetListDegTypes (struct DegTyp_DegTypes *DegTypes,
Hie_Level_t Level,DegTyp_Order_t Order);
void DegTyp_FreeListDegTypes (struct DegTyp_DegTypes *DegTypes);
2016-03-20 16:30:52 +01:00
void DegTyp_ReceiveNewDegTyp (void);
2016-03-20 16:30:52 +01:00
void DegTyp_RemoveDegTyp (void);
2016-03-20 16:30:52 +01:00
bool DegTyp_GetDegTypeDataByCod (struct DegTyp_DegType *DegTyp);
void DegTyp_RenameDegTyp (void);
2016-03-20 16:30:52 +01:00
void DegTyp_ContEditAfterChgDegTyp (void);
2019-04-08 13:06:17 +02:00
//-------------------------------- Figures ------------------------------------
void DegTyp_GetAndShowDegTypesStats (void);
2016-03-20 16:30:52 +01:00
#endif