2014-12-01 23:55:08 +01:00
|
|
|
|
// swad_syllabus.h: syllabus
|
|
|
|
|
|
|
|
|
|
#ifndef _SWAD_SYL
|
|
|
|
|
#define _SWAD_SYL
|
|
|
|
|
/*
|
|
|
|
|
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.
|
2018-04-24 13:21:53 +02:00
|
|
|
|
Copyright (C) 1999-2018 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 ***********************************/
|
|
|
|
|
/*****************************************************************************/
|
|
|
|
|
|
|
|
|
|
/*****************************************************************************/
|
2014-12-27 21:09:34 +01:00
|
|
|
|
/************************ Public constants and types *************************/
|
2014-12-01 23:55:08 +01:00
|
|
|
|
/*****************************************************************************/
|
|
|
|
|
|
2014-12-27 21:09:34 +01:00
|
|
|
|
#define Syl_NUM_WHICH_SYLLABUS 2
|
|
|
|
|
typedef enum
|
|
|
|
|
{
|
|
|
|
|
Syl_LECTURES = 0,
|
|
|
|
|
Syl_PRACTICALS = 1,
|
|
|
|
|
} Syl_WhichSyllabus_t; // Which syllabus I want to see
|
2014-12-28 02:42:41 +01:00
|
|
|
|
#define Syl_DEFAULT_WHICH_SYLLABUS Syl_LECTURES
|
2014-12-27 21:09:34 +01:00
|
|
|
|
|
2014-12-01 23:55:08 +01:00
|
|
|
|
typedef enum
|
|
|
|
|
{
|
|
|
|
|
Syl_GET_UP,
|
|
|
|
|
Syl_GET_DOWN,
|
|
|
|
|
} Syl_ChangePosItem_t;
|
|
|
|
|
|
|
|
|
|
typedef enum
|
|
|
|
|
{
|
|
|
|
|
Syl_INCREASE_LEVEL,
|
|
|
|
|
Syl_DECREASE_LEVEL,
|
|
|
|
|
} Syl_ChangeLevelItem_t;
|
|
|
|
|
|
|
|
|
|
// Structure used to get the limits (number of items) of the subtrees to exchange in a syllabus
|
|
|
|
|
struct MoveSubtrees
|
|
|
|
|
{
|
|
|
|
|
struct
|
|
|
|
|
{
|
|
|
|
|
unsigned Ini,End;
|
|
|
|
|
} ToGetUp,ToGetDown; // Number of initial and ending items of the two subtrees to get up and get down
|
|
|
|
|
bool MovAllowed;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/*****************************************************************************/
|
|
|
|
|
/***************************** Public prototypes *****************************/
|
|
|
|
|
/*****************************************************************************/
|
|
|
|
|
|
2014-12-28 02:42:41 +01:00
|
|
|
|
void Syl_GetParamWhichSyllabus (void);
|
2014-12-27 21:09:34 +01:00
|
|
|
|
void Syl_PutFormWhichSyllabus (void);
|
|
|
|
|
|
2014-12-01 23:55:08 +01:00
|
|
|
|
void Syl_GetParamItemNumber (void);
|
2016-05-30 14:27:10 +02:00
|
|
|
|
|
2016-05-30 15:25:21 +02:00
|
|
|
|
bool Syl_CheckSyllabus (long CrsCod,Inf_InfoType_t InfoType);
|
2016-05-30 14:27:10 +02:00
|
|
|
|
bool Syl_CheckAndEditSyllabus (void);
|
2014-12-01 23:55:08 +01:00
|
|
|
|
void Syl_EditSyllabus (void);
|
2016-05-30 14:27:10 +02:00
|
|
|
|
|
2016-05-30 15:25:21 +02:00
|
|
|
|
void Syl_LoadListItemsSyllabusIntoMemory (long CrsCod);
|
2014-12-01 23:55:08 +01:00
|
|
|
|
void Syl_FreeListItemsSyllabus (void);
|
2016-05-30 15:25:21 +02:00
|
|
|
|
|
2014-12-01 23:55:08 +01:00
|
|
|
|
int Syl_ReadLevelItemSyllabus (void);
|
2016-03-17 10:39:23 +01:00
|
|
|
|
int Syl_WriteSyllabusIntoHTMLBuffer (char **HTMLBuffer);
|
2017-01-16 01:51:01 +01:00
|
|
|
|
|
2014-12-01 23:55:08 +01:00
|
|
|
|
void Syl_RemoveItemSyllabus (void);
|
|
|
|
|
void Syl_UpItemSyllabus (void);
|
|
|
|
|
void Syl_DownItemSyllabus (void);
|
|
|
|
|
void Syl_ChangePlaceItemSyllabus (Syl_ChangePosItem_t UpOrDownPos);
|
|
|
|
|
void Syl_CalculateUpSubtreeSyllabus (struct MoveSubtrees *Subtree,unsigned NumItem);
|
|
|
|
|
void Syl_CalculateDownSubtreeSyllabus (struct MoveSubtrees *Subtree,unsigned NumItem);
|
|
|
|
|
void Syl_RightItemSyllabus (void);
|
|
|
|
|
void Syl_LeftItemSyllabus (void);
|
|
|
|
|
void Syl_ChangeLevelItemSyllabus (Syl_ChangeLevelItem_t IncreaseOrDecreaseLevel);
|
|
|
|
|
void Syl_InsertItemSyllabus (void);
|
|
|
|
|
void Syl_ModifyItemSyllabus (void);
|
|
|
|
|
void Syl_BuildPathFileSyllabus (char *PathFile);
|
|
|
|
|
void Syl_OpenSyllabusFile (const char *PathDir,char *PathFile);
|
|
|
|
|
void Syl_WriteStartFileSyllabus (FILE *FileSyllabus);
|
|
|
|
|
void Syl_WriteAllItemsFileSyllabus (FILE *FileSyllabus);
|
|
|
|
|
void Syl_WriteItemFileSyllabus (FILE *FileSyllabus,int Level,const char *Text);
|
|
|
|
|
void Syl_WriteEndFileSyllabus (FILE *FileSyllabus);
|
|
|
|
|
|
|
|
|
|
#endif
|