mirror of https://github.com/acanas/swad-core.git
Version19.1
This commit is contained in:
parent
9312def60b
commit
9d4d1da3ec
4
Makefile
4
Makefile
|
@ -42,8 +42,8 @@ OBJS = swad_account.o swad_action.o swad_agenda.o swad_alert.o \
|
|||
swad_help.o swad_hierarchy.o swad_holiday.o \
|
||||
swad_icon.o swad_ID.o swad_indicator.o swad_info.o swad_institution.o \
|
||||
swad_language.o swad_layout.o swad_link.o swad_logo.o \
|
||||
swad_mail.o swad_main.o swad_mark.o swad_media.o swad_menu.o \
|
||||
swad_message.o swad_MFU.o \
|
||||
swad_mail.o swad_main.o swad_mark.o swad_match.o swad_media.o \
|
||||
swad_menu.o swad_message.o swad_MFU.o \
|
||||
swad_network.o swad_nickname.o swad_notice.o swad_notification.o \
|
||||
swad_pagination.o swad_parameter.o swad_password.o swad_photo.o \
|
||||
swad_place.o swad_plugin.o swad_privacy.o swad_profile.o swad_project.o \
|
||||
|
|
|
@ -56,6 +56,7 @@
|
|||
#include "swad_language.h"
|
||||
#include "swad_mail.h"
|
||||
#include "swad_mark.h"
|
||||
#include "swad_match.h"
|
||||
#include "swad_MFU.h"
|
||||
#include "swad_network.h"
|
||||
#include "swad_nickname.h"
|
||||
|
@ -2152,22 +2153,22 @@ struct Act_Actions Act_Actions[Act_NUM_ACTIONS] =
|
|||
|
||||
/* ActSeeGam */{1650,-1,TabUnk,ActSeeAllGam ,0x238,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Gam_SeeOneGame ,NULL},
|
||||
|
||||
/* ActReqRemMchTch */{1783,-1,TabUnk,ActSeeAllGam ,0x230,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Gam_RequestRemoveMatchTch ,NULL},
|
||||
/* ActRemMchTch */{1784,-1,TabUnk,ActSeeAllGam ,0x230,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Gam_RemoveMatchTch ,NULL},
|
||||
/* ActReqRemMchTch */{1783,-1,TabUnk,ActSeeAllGam ,0x230,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Mch_RequestRemoveMatchTch ,NULL},
|
||||
/* ActRemMchTch */{1784,-1,TabUnk,ActSeeAllGam ,0x230,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Mch_RemoveMatchTch ,NULL},
|
||||
/* ActReqNewMchTch */{1670,-1,TabUnk,ActSeeAllGam ,0x230,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Gam_RequestNewMatchTch ,NULL},
|
||||
/* ActNewMchTch */{1671,-1,TabUnk,ActSeeAllGam ,0x230,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_NEW_TAB,Gam_CreateNewMatchTch ,Gam_RequestStartResumeMatchTch ,NULL},
|
||||
/* ActResMchTch */{1785,-1,TabUnk,ActSeeAllGam ,0x230,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_NEW_TAB,Gam_GetMatchBeingPlayed ,Gam_RequestStartResumeMatchTch ,NULL},
|
||||
/* ActPauMchTch */{1791,-1,TabUnk,ActSeeAllGam ,0x230,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_2ND_TAB,Gam_GetMatchBeingPlayed ,Gam_PauseMatchTch ,NULL},
|
||||
/* ActPlyMchTch */{1789,-1,TabUnk,ActSeeAllGam ,0x230,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_2ND_TAB,Gam_GetMatchBeingPlayed ,Gam_ResumeMatchTch ,NULL},
|
||||
/* ActBckMchTch */{1790,-1,TabUnk,ActSeeAllGam ,0x230,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_2ND_TAB,Gam_GetMatchBeingPlayed ,Gam_BackMatchTch ,NULL},
|
||||
/* ActFwdMchTch */{1672,-1,TabUnk,ActSeeAllGam ,0x230,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_2ND_TAB,Gam_GetMatchBeingPlayed ,Gam_ForwardMatchTch ,NULL},
|
||||
/* ActShoResMchTch */{1795,-1,TabUnk,ActSeeAllGam ,0x230,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_2ND_TAB,Gam_GetMatchBeingPlayed ,Gam_ShowResultsQstMatchTch ,NULL},
|
||||
/* ActRefMchTch */{1788,-1,TabUnk,ActSeeAllGam ,0x230,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_AJAX_RFRESH,Gam_GetMatchBeingPlayed ,Gam_RefreshMatchTch ,NULL},
|
||||
/* ActShoMchTch */{1786,-1,TabUnk,ActSeeAllGam ,0x230,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Gam_ShowFinishedMatchResults ,NULL},
|
||||
/* ActNewMchTch */{1671,-1,TabUnk,ActSeeAllGam ,0x230,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_NEW_TAB,Mch_CreateNewMatchTch ,Mch_RequestStartResumeMatchTch ,NULL},
|
||||
/* ActResMchTch */{1785,-1,TabUnk,ActSeeAllGam ,0x230,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_NEW_TAB,Mch_GetMatchBeingPlayed ,Mch_RequestStartResumeMatchTch ,NULL},
|
||||
/* ActPauMchTch */{1791,-1,TabUnk,ActSeeAllGam ,0x230,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_2ND_TAB,Mch_GetMatchBeingPlayed ,Mch_PauseMatchTch ,NULL},
|
||||
/* ActPlyMchTch */{1789,-1,TabUnk,ActSeeAllGam ,0x230,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_2ND_TAB,Mch_GetMatchBeingPlayed ,Mch_ResumeMatchTch ,NULL},
|
||||
/* ActBckMchTch */{1790,-1,TabUnk,ActSeeAllGam ,0x230,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_2ND_TAB,Mch_GetMatchBeingPlayed ,Mch_BackMatchTch ,NULL},
|
||||
/* ActFwdMchTch */{1672,-1,TabUnk,ActSeeAllGam ,0x230,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_2ND_TAB,Mch_GetMatchBeingPlayed ,Mch_ForwardMatchTch ,NULL},
|
||||
/* ActShoResMchTch */{1795,-1,TabUnk,ActSeeAllGam ,0x230,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_2ND_TAB,Mch_GetMatchBeingPlayed ,Mch_ShowResultsQstMatchTch ,NULL},
|
||||
/* ActRefMchTch */{1788,-1,TabUnk,ActSeeAllGam ,0x230,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_AJAX_RFRESH,Mch_GetMatchBeingPlayed ,Mch_RefreshMatchTch ,NULL},
|
||||
/* ActShoMchTch */{1786,-1,TabUnk,ActSeeAllGam ,0x230,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Mch_ShowFinishedMatchResults ,NULL},
|
||||
|
||||
/* ActPlyMchStd */{1780,-1,TabUnk,ActSeeAllGam ,0x008, 0, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_NEW_TAB,Gam_GetMatchBeingPlayed ,Gam_ShowMatchToMeAsStd ,NULL},
|
||||
/* ActRefMchStd */{1782,-1,TabUnk,ActSeeAllGam ,0x008, 0, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_AJAX_RFRESH,Gam_GetMatchBeingPlayed ,Gam_RefreshMatchStd ,NULL},
|
||||
/* ActAnsMchQstStd */{1651,-1,TabUnk,ActSeeAllGam ,0x238,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_2ND_TAB,Gam_GetMatchBeingPlayed ,Gam_ReceiveQstAnsFromStd ,NULL},
|
||||
/* ActPlyMchStd */{1780,-1,TabUnk,ActSeeAllGam ,0x008, 0, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_NEW_TAB,Mch_GetMatchBeingPlayed ,Mch_ShowMatchToMeAsStd ,NULL},
|
||||
/* ActRefMchStd */{1782,-1,TabUnk,ActSeeAllGam ,0x008, 0, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_AJAX_RFRESH,Mch_GetMatchBeingPlayed ,Mch_RefreshMatchStd ,NULL},
|
||||
/* ActAnsMchQstStd */{1651,-1,TabUnk,ActSeeAllGam ,0x238,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_2ND_TAB,Mch_GetMatchBeingPlayed ,Mch_ReceiveQstAnsFromStd ,NULL},
|
||||
|
||||
/* ActFrmNewGam */{1652,-1,TabUnk,ActSeeAllGam ,0x238,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Gam_RequestCreatOrEditGame ,NULL},
|
||||
/* ActEdiOneGam */{1653,-1,TabUnk,ActSeeAllGam ,0x238,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Gam_RequestCreatOrEditGame ,NULL},
|
||||
|
|
|
@ -460,10 +460,11 @@ En OpenSWAD:
|
|||
ps2pdf source.ps destination.pdf
|
||||
*/
|
||||
|
||||
#define Log_PLATFORM_VERSION "SWAD 19.0.1 (2019-09-13)"
|
||||
#define Log_PLATFORM_VERSION "SWAD 19.1 (2019-09-14)"
|
||||
#define CSS_FILE "swad18.138.css"
|
||||
#define JS_FILE "swad18.130.2.js"
|
||||
/*
|
||||
Version 19.1: Sep 14, 2019 Game module splitted into game and match modules. (244572 lines)
|
||||
Version 19.0.1: Sep 13, 2019 Show results of questions in matches. (244583 lines)
|
||||
Version 19.0: Sep 12, 2019 Changes in behaviour of matches. (244585 lines)
|
||||
3 changes necessary in database:
|
||||
|
|
2391
swad_game.c
2391
swad_game.c
File diff suppressed because it is too large
Load Diff
38
swad_game.h
38
swad_game.h
|
@ -81,8 +81,13 @@ typedef enum
|
|||
|
||||
void Gam_SeeAllGames (void);
|
||||
void Gam_SeeOneGame (void);
|
||||
void Gam_ShowOneGame (long GamCod,
|
||||
bool ShowOnlyThisGame,
|
||||
bool ListGameQuestions,
|
||||
bool PutFormNewMatch);
|
||||
void Gam_PutHiddenParamGameOrder (void);
|
||||
void Gam_RequestCreatOrEditGame (void);
|
||||
void Gam_PutParams (void);
|
||||
void Gam_GetListGames (void);
|
||||
void Gam_GetDataOfGameByCod (struct Game *Gam);
|
||||
void Gam_GetDataOfGameByFolder (struct Game *Gam);
|
||||
|
@ -102,9 +107,15 @@ void Gam_RemoveGroup (long GrpCod);
|
|||
void Gam_RemoveGroupsOfType (long GrpTypCod);
|
||||
void Gam_RemoveGames (Hie_Level_t Scope,long Cod);
|
||||
|
||||
void Gam_RequestNewQuestion (void);
|
||||
unsigned Gam_GetNumQstsGame (long GamCod);
|
||||
|
||||
void Gam_GetAndDrawBarNumUsrsWhoAnswered (long MchCod,unsigned QstInd,unsigned AnsInd,unsigned NumUsrs);
|
||||
void Gam_RequestNewQuestion (void);
|
||||
void Gam_PutParamQstInd (unsigned QstInd);
|
||||
unsigned Gam_GetParamQstInd (void);
|
||||
unsigned Gam_GetQstIndFromStr (const char *UnsignedStr);
|
||||
long Gam_GetQstCodFromQstInd (long GamCod,unsigned QstInd);
|
||||
unsigned Gam_GetPrevQuestionIndexInGame (long GamCod,unsigned QstInd);
|
||||
unsigned Gam_GetNextQuestionIndexInGame (long GamCod,unsigned QstInd);
|
||||
|
||||
void Gam_AddTstQuestionsToGame (void);
|
||||
|
||||
|
@ -114,31 +125,8 @@ void Gam_RemoveQst (void);
|
|||
void Gam_MoveUpQst (void);
|
||||
void Gam_MoveDownQst (void);
|
||||
|
||||
void Gam_RequestRemoveMatchTch (void);
|
||||
void Gam_RemoveMatchTch (void);
|
||||
|
||||
void Gam_RequestNewMatchTch (void);
|
||||
|
||||
void Gam_CreateNewMatchTch (void);
|
||||
void Gam_RequestStartResumeMatchTch (void);
|
||||
void Gam_PauseMatchTch (void);
|
||||
void Gam_ResumeMatchTch (void);
|
||||
// void Gam_ShowStemQstMatchTch (void);
|
||||
// void Gam_ShowAnssQstMatchTch (void);
|
||||
void Gam_ShowResultsQstMatchTch (void);
|
||||
void Gam_BackMatchTch (void);
|
||||
void Gam_ForwardMatchTch (void);
|
||||
// void Gam_CurrQstMatchTch (void);
|
||||
|
||||
void Gam_ShowFinishedMatchResults (void);
|
||||
|
||||
void Gam_GetMatchBeingPlayed (void);
|
||||
void Gam_ShowMatchToMeAsStd (void);
|
||||
void Gam_RefreshMatchTch (void);
|
||||
void Gam_RefreshMatchStd (void);
|
||||
|
||||
void Gam_ReceiveQstAnsFromStd (void);
|
||||
|
||||
unsigned Gam_GetNumCoursesWithGames (Hie_Level_t Scope);
|
||||
unsigned Gam_GetNumGames (Hie_Level_t Scope);
|
||||
float Gam_GetNumQstsPerCrsGame (Hie_Level_t Scope);
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,68 @@
|
|||
// 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ñ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);
|
||||
|
||||
void Mch_RequestRemoveMatchTch (void);
|
||||
void Mch_RemoveMatchTch (void);
|
||||
|
||||
void Mch_CreateNewMatchTch (void);
|
||||
void Mch_RequestStartResumeMatchTch (void);
|
||||
void Mch_PauseMatchTch (void);
|
||||
void Mch_ResumeMatchTch (void);
|
||||
void Mch_ShowResultsQstMatchTch (void);
|
||||
void Mch_BackMatchTch (void);
|
||||
void Mch_ForwardMatchTch (void);
|
||||
|
||||
void Mch_ShowFinishedMatchResults (void);
|
||||
|
||||
void Mch_GetMatchBeingPlayed (void);
|
||||
void Mch_ShowMatchToMeAsStd (void);
|
||||
void Mch_RefreshMatchTch (void);
|
||||
void Mch_RefreshMatchStd (void);
|
||||
|
||||
void Mch_ReceiveQstAnsFromStd (void);
|
||||
|
||||
void Mch_GetAndDrawBarNumUsrsWhoAnswered (long MchCod,unsigned QstInd,unsigned AnsInd,unsigned NumUsrs);
|
||||
|
||||
#endif
|
|
@ -43,6 +43,7 @@
|
|||
#include "swad_global.h"
|
||||
#include "swad_ID.h"
|
||||
#include "swad_language.h"
|
||||
#include "swad_match.h"
|
||||
#include "swad_media.h"
|
||||
#include "swad_parameter.h"
|
||||
#include "swad_table.h"
|
||||
|
@ -4142,7 +4143,7 @@ static void Tst_WriteChoiceAnsViewGame (long MchCod,unsigned QstInd,long QstCod,
|
|||
"<td class=\"DAT LEFT_TOP\">");
|
||||
/* Get number of users who selected this answer
|
||||
and draw proportional bar */
|
||||
Gam_GetAndDrawBarNumUsrsWhoAnswered (MchCod,QstInd,AnsInd,
|
||||
Mch_GetAndDrawBarNumUsrsWhoAnswered (MchCod,QstInd,AnsInd,
|
||||
0); // TODO: NumUsrs
|
||||
fprintf (Gbl.F.Out,"</td>"
|
||||
"</tr>");
|
||||
|
|
Loading…
Reference in New Issue