swad-core/swad_match.h

88 lines
3.3 KiB
C
Raw Normal View History

2019-09-14 12:59:34 +02:00
// swad_match.h: matches in games using remote control
#ifndef _SWAD_MCH
#define _SWAD_MCH
/*
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-2019 Antonio Ca<EFBFBD>as Vargas
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 "swad_scope.h"
/*****************************************************************************/
/************************** Public types and constants ***********************/
/*****************************************************************************/
#define Mch_NEW_MATCH_SECTION_ID "new_match"
#define Mch_AFTER_LAST_QUESTION ((unsigned)((1UL << 31) - 1)) // 2^31 - 1, don't change this number because it is used in database to indicate that a match is finished
/*****************************************************************************/
/***************************** Public prototypes *****************************/
/*****************************************************************************/
void Mch_ListMatches (struct Game *Game,bool PutFormNewMatch);
2019-09-25 21:58:12 +02:00
void Mch_ToggleVisibilResultsMchUsr (void);
2019-09-14 12:59:34 +02:00
void Mch_RequestRemoveMatchTch (void);
void Mch_RemoveMatchTch (void);
2019-09-27 21:45:53 +02:00
void Mch_RemoveMatchInGameFromAllTables (long GamCod);
2019-09-14 12:59:34 +02:00
void Mch_CreateNewMatchTch (void);
void Mch_RequestStartResumeMatchTch (void);
2019-09-24 01:41:51 +02:00
void Mch_GetIndexes (long MchCod,unsigned QstInd,
unsigned Indexes[Tst_MAX_OPTIONS_PER_QUESTION]);
2019-09-27 20:22:32 +02:00
void Mch_RemoveGroup (long GrpCod);
void Mch_RemoveGroupsOfType (long GrpTypCod);
2019-09-14 12:59:34 +02:00
void Mch_PauseMatchTch (void);
void Mch_ResumeMatchTch (void);
2019-09-25 21:58:12 +02:00
void Mch_ToggleVisibilResultsMchQst (void);
2019-09-14 12:59:34 +02:00
void Mch_BackMatchTch (void);
void Mch_ForwardMatchTch (void);
2019-09-26 01:15:21 +02:00
unsigned Gam_GetNumMchsGame (long GamCod);
2019-09-14 12:59:34 +02:00
void Mch_GetMatchBeingPlayed (void);
void Mch_ShowMatchToMeAsStd (void);
void Mch_RefreshMatchTch (void);
void Mch_RefreshMatchStd (void);
void Mch_ReceiveQstAnsFromStd (void);
2019-09-16 00:15:40 +02:00
void Mch_GetAndDrawBarNumUsrsWhoHaveChosenAns (long MchCod,unsigned QstInd,unsigned AnsInd,
unsigned NumAnswerersQst,bool Correct);
unsigned Mch_GetNumUsrsWhoHaveAnswerQst (long MchCod,unsigned QstInd);
2019-09-14 12:59:34 +02:00
2019-09-18 23:49:07 +02:00
void Mch_PutFormToViewMchResults (Act_Action_t Action);
2019-09-22 13:54:11 +02:00
void Mch_SelDatesToSeeMyMchResults (void);
void Mch_ShowMyMchResults (void);
2019-09-18 23:49:07 +02:00
void Mch_SelUsrsToViewUsrsMchResults (void);
2019-09-22 13:54:11 +02:00
void Mch_ShowUsrsMchResults (void);
void Mch_ShowOneMchResult (void);
2019-09-18 00:28:55 +02:00
2019-09-14 12:59:34 +02:00
#endif