2014-12-01 23:55:08 +01:00
|
|
|
|
// swad_search.c: edition of courses
|
|
|
|
|
|
|
|
|
|
#ifndef _SWAD_SCH
|
|
|
|
|
#define _SWAD_SCH
|
|
|
|
|
/*
|
|
|
|
|
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.
|
2016-01-01 20:19:43 +01:00
|
|
|
|
Copyright (C) 1999-2016 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 **********************************/
|
|
|
|
|
/*****************************************************************************/
|
|
|
|
|
|
|
|
|
|
/*****************************************************************************/
|
|
|
|
|
/****************************** Public constants *****************************/
|
|
|
|
|
/*****************************************************************************/
|
|
|
|
|
|
2016-06-29 18:27:49 +02:00
|
|
|
|
#define Sch_MAX_LENGTH_STRING_TO_FIND 255
|
|
|
|
|
#define Sch_MAX_WORDS_IN_SEARCH 10
|
|
|
|
|
#define Sch_MAX_LENGTH_SEARCH_WORD 255
|
|
|
|
|
#define Sch_MAX_LENGTH_SEARCH_QUERY (Sch_MAX_WORDS_IN_SEARCH*Sch_MAX_LENGTH_SEARCH_WORD)
|
2014-12-01 23:55:08 +01:00
|
|
|
|
|
|
|
|
|
/*****************************************************************************/
|
|
|
|
|
/******************************** Public types *******************************/
|
|
|
|
|
/*****************************************************************************/
|
|
|
|
|
|
2016-06-27 12:35:15 +02:00
|
|
|
|
#define Sch_NUM_WHAT_TO_SEARCH 12
|
2014-12-01 23:55:08 +01:00
|
|
|
|
typedef enum
|
|
|
|
|
{
|
|
|
|
|
Sch_SEARCH_ALL = 0,
|
|
|
|
|
Sch_SEARCH_INSTITUTIONS = 1,
|
|
|
|
|
Sch_SEARCH_CENTRES = 2,
|
|
|
|
|
Sch_SEARCH_DEGREES = 3,
|
|
|
|
|
Sch_SEARCH_COURSES = 4,
|
2016-06-27 12:35:15 +02:00
|
|
|
|
Sch_SEARCH_USERS = 5,
|
|
|
|
|
Sch_SEARCH_TEACHERS = 6,
|
|
|
|
|
Sch_SEARCH_STUDENTS = 7,
|
|
|
|
|
Sch_SEARCH_GUESTS = 8,
|
|
|
|
|
Sch_SEARCH_OPEN_DOCUMENTS = 9,
|
|
|
|
|
Sch_SEARCH_DOCUM_IN_MY_COURSES = 10,
|
|
|
|
|
Sch_SEARCH_MY_DOCUMENTS = 11,
|
2014-12-01 23:55:08 +01:00
|
|
|
|
} Sch_WhatToSearch_t;
|
|
|
|
|
|
|
|
|
|
/*****************************************************************************/
|
|
|
|
|
/****************************** Public prototypes ****************************/
|
|
|
|
|
/*****************************************************************************/
|
|
|
|
|
|
|
|
|
|
void Sch_ReqSysSearch (void);
|
|
|
|
|
void Sch_ReqCtySearch (void);
|
|
|
|
|
void Sch_ReqInsSearch (void);
|
|
|
|
|
void Sch_ReqCtrSearch (void);
|
|
|
|
|
void Sch_ReqDegSearch (void);
|
|
|
|
|
void Sch_ReqCrsSearch (void);
|
2016-06-24 20:16:06 +02:00
|
|
|
|
|
|
|
|
|
void Sch_PutFormToSearchInPageTopHeading (void);
|
|
|
|
|
|
2016-04-18 10:22:56 +02:00
|
|
|
|
void Sch_PutInputStringToSearch (const char *IdInputText);
|
|
|
|
|
void Sch_PutMagnifyingGlassButton (const char *Icon);
|
2014-12-13 21:38:31 +01:00
|
|
|
|
void Sch_GetParamWhatToSearch (void);
|
2014-12-01 23:55:08 +01:00
|
|
|
|
void Sch_GetParamsSearch (void);
|
|
|
|
|
void Sch_SysSearch (void);
|
|
|
|
|
void Sch_CtySearch (void);
|
|
|
|
|
void Sch_InsSearch (void);
|
|
|
|
|
void Sch_CtrSearch (void);
|
|
|
|
|
void Sch_DegSearch (void);
|
|
|
|
|
void Sch_CrsSearch (void);
|
|
|
|
|
|
2016-06-29 18:27:49 +02:00
|
|
|
|
bool Sch_BuildSearchQuery (char *SearchQuery,const char *FieldName,
|
|
|
|
|
const char *CharSet,const char *Collate);
|
|
|
|
|
|
2014-12-01 23:55:08 +01:00
|
|
|
|
#endif
|