mirror of
https://github.com/acanas/swad-core.git
synced 2024-05-31 22:05:23 +02:00
Version19.86
This commit is contained in:
parent
6215c5456c
commit
190f1fffd8
|
@ -631,10 +631,12 @@ Assessment:
|
||||||
478. ActAnsMchQstStd Answer a match question (as student)
|
478. ActAnsMchQstStd Answer a match question (as student)
|
||||||
479. ActRefMchStd Refresh current question when playing a game (as student)
|
479. ActRefMchStd Refresh current question when playing a game (as student)
|
||||||
|
|
||||||
481. ActSeeMyMchRes Show my matches results
|
481. ActSeeAllMyMchRes Show all my matches results
|
||||||
482. ActReqSeeUsrMchRes Select users and range of dates to see matches results
|
NEW. ActSeeGamMyMchRes Show my matches results in a given game
|
||||||
|
|
||||||
483. ActSeeUsrMchRes Show matches results of several users
|
482. ActReqSeeAllMchRes Select users and range of dates to see matches results
|
||||||
|
483. ActSeeAllMchRes Show matches results of several users in a given game
|
||||||
|
NEW. ActSeeGamMchRes Show matches results of several users
|
||||||
484. ActSeeOneMchResMe Show one match result of me as student
|
484. ActSeeOneMchResMe Show one match result of me as student
|
||||||
485. ActSeeOneMchResOth Show one match result of other user
|
485. ActSeeOneMchResOth Show one match result of other user
|
||||||
476. ActChgVisResMchUsr Change visibility of match results for students
|
476. ActChgVisResMchUsr Change visibility of match results for students
|
||||||
|
@ -2165,11 +2167,13 @@ const struct Act_Actions Act_Actions[Act_NUM_ACTIONS] =
|
||||||
[ActAnsMchQstStd ] = {1651,-1,TabUnk,ActSeeAllGam ,0x008, 0, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_2ND_TAB,Mch_GetMatchBeingPlayed ,Mch_ReceiveQuestionAnswer ,NULL},
|
[ActAnsMchQstStd ] = {1651,-1,TabUnk,ActSeeAllGam ,0x008, 0, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_2ND_TAB,Mch_GetMatchBeingPlayed ,Mch_ReceiveQuestionAnswer ,NULL},
|
||||||
[ActRefMchStd ] = {1782,-1,TabUnk,ActSeeAllGam ,0x008, 0, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_AJAX_RFRESH,Mch_GetMatchBeingPlayed ,Mch_RefreshMatchStd ,NULL},
|
[ActRefMchStd ] = {1782,-1,TabUnk,ActSeeAllGam ,0x008, 0, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_AJAX_RFRESH,Mch_GetMatchBeingPlayed ,Mch_RefreshMatchStd ,NULL},
|
||||||
|
|
||||||
[ActSeeMyMchRes ] = {1796,-1,TabUnk,ActSeeAllGam ,0x208,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,McR_ShowMyMchResults ,NULL},
|
[ActSeeAllMyMchRes ] = {1796,-1,TabUnk,ActSeeAllGam ,0x208,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,McR_ShowAllMyMchRes ,NULL},
|
||||||
|
[ActSeeGamMyMchRes ] = {1810,-1,TabUnk,ActSeeAllGam ,0x208,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,McR_ShowAllMyMchResInGame ,NULL},
|
||||||
[ActSeeOneMchResMe ] = {1797,-1,TabUnk,ActSeeAllGam ,0x208,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,McR_ShowOneMchResult ,NULL},
|
[ActSeeOneMchResMe ] = {1797,-1,TabUnk,ActSeeAllGam ,0x208,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,McR_ShowOneMchResult ,NULL},
|
||||||
|
|
||||||
[ActReqSeeUsrMchRes ] = {1798,-1,TabUnk,ActSeeAllGam ,0x230,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,Dat_SetIniEndDates ,McR_SelUsrsToViewUsrsMchResults,NULL},
|
[ActReqSeeAllMchRes ] = {1798,-1,TabUnk,ActSeeAllGam ,0x230,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,Dat_SetIniEndDates ,McR_SelUsrsToViewUsrsMchRes ,NULL},
|
||||||
[ActSeeUsrMchRes ] = {1799,-1,TabUnk,ActSeeAllGam ,0x230,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,McR_GetUsrsAndShowMchResults ,NULL},
|
[ActSeeAllMchRes ] = {1799,-1,TabUnk,ActSeeAllGam ,0x230,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,McR_GetUsrsAndShowMchRes ,NULL},
|
||||||
|
[ActSeeGamMchRes ] = {1811,-1,TabUnk,ActSeeAllGam ,0x208,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,McR_GetUsrsAndShowMchResInGame ,NULL},
|
||||||
[ActSeeOneMchResOth ] = {1800,-1,TabUnk,ActSeeAllGam ,0x230,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,McR_ShowOneMchResult ,NULL},
|
[ActSeeOneMchResOth ] = {1800,-1,TabUnk,ActSeeAllGam ,0x230,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,McR_ShowOneMchResult ,NULL},
|
||||||
[ActChgVisResMchUsr ] = {1801,-1,TabUnk,ActSeeAllGam ,0x230,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Mch_ToggleVisibilResultsMchUsr ,NULL},
|
[ActChgVisResMchUsr ] = {1801,-1,TabUnk,ActSeeAllGam ,0x230,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Mch_ToggleVisibilResultsMchUsr ,NULL},
|
||||||
|
|
||||||
|
@ -5017,10 +5021,10 @@ Act_Action_t Act_FromActCodToAction[1 + Act_MAX_ACTION_COD] = // Do not reuse un
|
||||||
-1, // #1793 (obsolete action)
|
-1, // #1793 (obsolete action)
|
||||||
ActChgVisResMchQst, // #1794
|
ActChgVisResMchQst, // #1794
|
||||||
-1, // #1795
|
-1, // #1795
|
||||||
ActSeeMyMchRes, // #1796
|
ActSeeAllMyMchRes, // #1796
|
||||||
ActSeeOneMchResMe, // #1797
|
ActSeeOneMchResMe, // #1797
|
||||||
ActReqSeeUsrMchRes, // #1798
|
ActReqSeeAllMchRes, // #1798
|
||||||
ActSeeUsrMchRes, // #1799
|
ActSeeAllMchRes, // #1799
|
||||||
ActSeeOneMchResOth, // #1800
|
ActSeeOneMchResOth, // #1800
|
||||||
ActChgVisResMchUsr, // #1801
|
ActChgVisResMchUsr, // #1801
|
||||||
ActChgNumColMch, // #1802
|
ActChgNumColMch, // #1802
|
||||||
|
@ -5031,6 +5035,8 @@ Act_Action_t Act_FromActCodToAction[1 + Act_MAX_ACTION_COD] = // Do not reuse un
|
||||||
ActShoHidSocComUsr, // #1807
|
ActShoHidSocComUsr, // #1807
|
||||||
ActSeeMchAnsQstStd, // #1808
|
ActSeeMchAnsQstStd, // #1808
|
||||||
ActRemMchAnsQstStd, // #1809
|
ActRemMchAnsQstStd, // #1809
|
||||||
|
ActSeeGamMyMchRes, // #1810
|
||||||
|
ActSeeGamMchRes, // #1811
|
||||||
};
|
};
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
|
@ -64,9 +64,9 @@ typedef enum
|
||||||
|
|
||||||
typedef signed int Act_Action_t; // Must be a signed type, because -1 is used to indicate obsolete action
|
typedef signed int Act_Action_t; // Must be a signed type, because -1 is used to indicate obsolete action
|
||||||
|
|
||||||
#define Act_NUM_ACTIONS (1 + 4 + 66 + 38 + 12 + 42 + 36 + 19 + 110 + 181 + 437 + 176 + 169 + 16 + 68)
|
#define Act_NUM_ACTIONS (1 + 4 + 66 + 38 + 12 + 42 + 36 + 19 + 110 + 183 + 437 + 176 + 169 + 16 + 68)
|
||||||
|
|
||||||
#define Act_MAX_ACTION_COD 1809
|
#define Act_MAX_ACTION_COD 1811
|
||||||
|
|
||||||
#define Act_MAX_OPTIONS_IN_MENU_PER_TAB 13
|
#define Act_MAX_OPTIONS_IN_MENU_PER_TAB 13
|
||||||
|
|
||||||
|
@ -630,56 +630,58 @@ typedef signed int Act_Action_t; // Must be a signed type, because -1 is used to
|
||||||
#define ActAnsMchQstStd (ActChgCrsTT1stDay + 134)
|
#define ActAnsMchQstStd (ActChgCrsTT1stDay + 134)
|
||||||
#define ActRefMchStd (ActChgCrsTT1stDay + 135)
|
#define ActRefMchStd (ActChgCrsTT1stDay + 135)
|
||||||
|
|
||||||
#define ActSeeMyMchRes (ActChgCrsTT1stDay + 136)
|
#define ActSeeAllMyMchRes (ActChgCrsTT1stDay + 136)
|
||||||
#define ActSeeOneMchResMe (ActChgCrsTT1stDay + 137)
|
#define ActSeeGamMyMchRes (ActChgCrsTT1stDay + 137)
|
||||||
|
#define ActSeeOneMchResMe (ActChgCrsTT1stDay + 138)
|
||||||
|
|
||||||
#define ActReqSeeUsrMchRes (ActChgCrsTT1stDay + 138)
|
#define ActReqSeeAllMchRes (ActChgCrsTT1stDay + 139)
|
||||||
#define ActSeeUsrMchRes (ActChgCrsTT1stDay + 139)
|
#define ActSeeAllMchRes (ActChgCrsTT1stDay + 140)
|
||||||
#define ActSeeOneMchResOth (ActChgCrsTT1stDay + 140)
|
#define ActSeeGamMchRes (ActChgCrsTT1stDay + 141)
|
||||||
#define ActChgVisResMchUsr (ActChgCrsTT1stDay + 141)
|
#define ActSeeOneMchResOth (ActChgCrsTT1stDay + 142)
|
||||||
|
#define ActChgVisResMchUsr (ActChgCrsTT1stDay + 143)
|
||||||
|
|
||||||
#define ActFrmNewGam (ActChgCrsTT1stDay + 142)
|
#define ActFrmNewGam (ActChgCrsTT1stDay + 144)
|
||||||
#define ActEdiOneGam (ActChgCrsTT1stDay + 143)
|
#define ActEdiOneGam (ActChgCrsTT1stDay + 145)
|
||||||
#define ActNewGam (ActChgCrsTT1stDay + 144)
|
#define ActNewGam (ActChgCrsTT1stDay + 146)
|
||||||
#define ActChgGam (ActChgCrsTT1stDay + 145)
|
#define ActChgGam (ActChgCrsTT1stDay + 147)
|
||||||
#define ActReqRemGam (ActChgCrsTT1stDay + 146)
|
#define ActReqRemGam (ActChgCrsTT1stDay + 148)
|
||||||
#define ActRemGam (ActChgCrsTT1stDay + 147)
|
#define ActRemGam (ActChgCrsTT1stDay + 149)
|
||||||
#define ActHidGam (ActChgCrsTT1stDay + 148)
|
#define ActHidGam (ActChgCrsTT1stDay + 150)
|
||||||
#define ActShoGam (ActChgCrsTT1stDay + 149)
|
#define ActShoGam (ActChgCrsTT1stDay + 151)
|
||||||
#define ActAddOneGamQst (ActChgCrsTT1stDay + 150)
|
#define ActAddOneGamQst (ActChgCrsTT1stDay + 152)
|
||||||
#define ActGamLstTstQst (ActChgCrsTT1stDay + 151)
|
#define ActGamLstTstQst (ActChgCrsTT1stDay + 153)
|
||||||
#define ActAddTstQstToGam (ActChgCrsTT1stDay + 152)
|
#define ActAddTstQstToGam (ActChgCrsTT1stDay + 154)
|
||||||
#define ActReqRemGamQst (ActChgCrsTT1stDay + 153)
|
#define ActReqRemGamQst (ActChgCrsTT1stDay + 155)
|
||||||
#define ActRemGamQst (ActChgCrsTT1stDay + 154)
|
#define ActRemGamQst (ActChgCrsTT1stDay + 156)
|
||||||
#define ActUp_GamQst (ActChgCrsTT1stDay + 155)
|
#define ActUp_GamQst (ActChgCrsTT1stDay + 157)
|
||||||
#define ActDwnGamQst (ActChgCrsTT1stDay + 156)
|
#define ActDwnGamQst (ActChgCrsTT1stDay + 158)
|
||||||
|
|
||||||
#define ActSeeSvy (ActChgCrsTT1stDay + 157)
|
#define ActSeeSvy (ActChgCrsTT1stDay + 159)
|
||||||
#define ActAnsSvy (ActChgCrsTT1stDay + 158)
|
#define ActAnsSvy (ActChgCrsTT1stDay + 160)
|
||||||
#define ActFrmNewSvy (ActChgCrsTT1stDay + 159)
|
#define ActFrmNewSvy (ActChgCrsTT1stDay + 161)
|
||||||
#define ActEdiOneSvy (ActChgCrsTT1stDay + 160)
|
#define ActEdiOneSvy (ActChgCrsTT1stDay + 162)
|
||||||
#define ActNewSvy (ActChgCrsTT1stDay + 161)
|
#define ActNewSvy (ActChgCrsTT1stDay + 163)
|
||||||
#define ActChgSvy (ActChgCrsTT1stDay + 162)
|
#define ActChgSvy (ActChgCrsTT1stDay + 164)
|
||||||
#define ActReqRemSvy (ActChgCrsTT1stDay + 163)
|
#define ActReqRemSvy (ActChgCrsTT1stDay + 165)
|
||||||
#define ActRemSvy (ActChgCrsTT1stDay + 164)
|
#define ActRemSvy (ActChgCrsTT1stDay + 166)
|
||||||
#define ActReqRstSvy (ActChgCrsTT1stDay + 165)
|
#define ActReqRstSvy (ActChgCrsTT1stDay + 167)
|
||||||
#define ActRstSvy (ActChgCrsTT1stDay + 166)
|
#define ActRstSvy (ActChgCrsTT1stDay + 168)
|
||||||
#define ActHidSvy (ActChgCrsTT1stDay + 167)
|
#define ActHidSvy (ActChgCrsTT1stDay + 169)
|
||||||
#define ActShoSvy (ActChgCrsTT1stDay + 168)
|
#define ActShoSvy (ActChgCrsTT1stDay + 170)
|
||||||
#define ActEdiOneSvyQst (ActChgCrsTT1stDay + 169)
|
#define ActEdiOneSvyQst (ActChgCrsTT1stDay + 171)
|
||||||
#define ActRcvSvyQst (ActChgCrsTT1stDay + 170)
|
#define ActRcvSvyQst (ActChgCrsTT1stDay + 172)
|
||||||
#define ActReqRemSvyQst (ActChgCrsTT1stDay + 171)
|
#define ActReqRemSvyQst (ActChgCrsTT1stDay + 173)
|
||||||
#define ActRemSvyQst (ActChgCrsTT1stDay + 172)
|
#define ActRemSvyQst (ActChgCrsTT1stDay + 174)
|
||||||
|
|
||||||
#define ActSeeOneExaAnn (ActChgCrsTT1stDay + 173)
|
#define ActSeeOneExaAnn (ActChgCrsTT1stDay + 175)
|
||||||
#define ActSeeDatExaAnn (ActChgCrsTT1stDay + 174)
|
#define ActSeeDatExaAnn (ActChgCrsTT1stDay + 176)
|
||||||
#define ActEdiExaAnn (ActChgCrsTT1stDay + 175)
|
#define ActEdiExaAnn (ActChgCrsTT1stDay + 177)
|
||||||
#define ActRcvExaAnn (ActChgCrsTT1stDay + 176)
|
#define ActRcvExaAnn (ActChgCrsTT1stDay + 178)
|
||||||
#define ActPrnExaAnn (ActChgCrsTT1stDay + 177)
|
#define ActPrnExaAnn (ActChgCrsTT1stDay + 179)
|
||||||
#define ActReqRemExaAnn (ActChgCrsTT1stDay + 178)
|
#define ActReqRemExaAnn (ActChgCrsTT1stDay + 180)
|
||||||
#define ActRemExaAnn (ActChgCrsTT1stDay + 179)
|
#define ActRemExaAnn (ActChgCrsTT1stDay + 181)
|
||||||
#define ActHidExaAnn (ActChgCrsTT1stDay + 180)
|
#define ActHidExaAnn (ActChgCrsTT1stDay + 182)
|
||||||
#define ActShoExaAnn (ActChgCrsTT1stDay + 181)
|
#define ActShoExaAnn (ActChgCrsTT1stDay + 183)
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/******************************** Files tab **********************************/
|
/******************************** Files tab **********************************/
|
||||||
|
|
|
@ -490,7 +490,7 @@ enscript -2 --landscape --color --file-align=2 --highlight --line-numbers -o - *
|
||||||
En OpenSWAD:
|
En OpenSWAD:
|
||||||
ps2pdf source.ps destination.pdf
|
ps2pdf source.ps destination.pdf
|
||||||
*/
|
*/
|
||||||
#define Log_PLATFORM_VERSION "SWAD 19.85.1 (2019-12-06)"
|
#define Log_PLATFORM_VERSION "SWAD 19.86 (2019-12-07)"
|
||||||
#define CSS_FILE "swad19.85.css"
|
#define CSS_FILE "swad19.85.css"
|
||||||
#define JS_FILE "swad19.70.js"
|
#define JS_FILE "swad19.70.js"
|
||||||
/*
|
/*
|
||||||
|
@ -498,6 +498,11 @@ ps2pdf source.ps destination.pdf
|
||||||
// TODO: Impedir la creación y edición de proyectos si no son editables.
|
// TODO: Impedir la creación y edición de proyectos si no son editables.
|
||||||
// TODO: En cada juego, poder listar los resultados en una tabla como la de resultados globales
|
// TODO: En cada juego, poder listar los resultados en una tabla como la de resultados globales
|
||||||
|
|
||||||
|
Version 19.86: Dec 07, 2019 New actions to show the matches results in a game. (247905 lines)
|
||||||
|
2 changes necessary in database:
|
||||||
|
INSERT INTO actions (ActCod,Language,Obsolete,Txt) VALUES ('1810','es','N','Ver mis resultados en un juego');
|
||||||
|
INSERT INTO actions (ActCod,Language,Obsolete,Txt) VALUES ('1811','es','N','Ver resultados en un juego');
|
||||||
|
|
||||||
Version 19.85.1: Dec 06, 2019 Contextual icon to show users' attendance. (247840 lines)
|
Version 19.85.1: Dec 06, 2019 Contextual icon to show users' attendance. (247840 lines)
|
||||||
Version 19.85: Dec 06, 2019 Changes in layout of pagination.
|
Version 19.85: Dec 06, 2019 Changes in layout of pagination.
|
||||||
Code refactoring in surveys. (247855 lines)
|
Code refactoring in surveys. (247855 lines)
|
||||||
|
|
88
swad_game.c
88
swad_game.c
|
@ -115,11 +115,13 @@ static void Gam_PutIconsListGames (void);
|
||||||
static void Gam_PutIconToCreateNewGame (void);
|
static void Gam_PutIconToCreateNewGame (void);
|
||||||
static void Gam_PutButtonToCreateNewGame (void);
|
static void Gam_PutButtonToCreateNewGame (void);
|
||||||
static void Gam_PutParamsToCreateNewGame (void);
|
static void Gam_PutParamsToCreateNewGame (void);
|
||||||
|
static void Gam_PutIconToShowResultsOfGame (void);
|
||||||
static void Gam_WriteAuthor (struct Game *Game);
|
static void Gam_WriteAuthor (struct Game *Game);
|
||||||
|
|
||||||
static void Gam_PutFormsToRemEditOneGame (const struct Game *Game,
|
static void Gam_PutFormsToRemEditOneGame (const struct Game *Game,
|
||||||
const char *Anchor);
|
const char *Anchor);
|
||||||
|
|
||||||
|
static void Gam_PutParamCurrentGamCod (void);
|
||||||
static void Gam_PutHiddenParamOrder (void);
|
static void Gam_PutHiddenParamOrder (void);
|
||||||
static void Gam_GetParamOrder (void);
|
static void Gam_GetParamOrder (void);
|
||||||
|
|
||||||
|
@ -308,12 +310,12 @@ static void Gam_PutIconsListGames (void)
|
||||||
switch (Gbl.Usrs.Me.Role.Logged)
|
switch (Gbl.Usrs.Me.Role.Logged)
|
||||||
{
|
{
|
||||||
case Rol_STD:
|
case Rol_STD:
|
||||||
Ico_PutContextualIconToShowResults (ActSeeMyMchRes,NULL);
|
Ico_PutContextualIconToShowResults (ActSeeAllMyMchRes,NULL);
|
||||||
break;
|
break;
|
||||||
case Rol_NET:
|
case Rol_NET:
|
||||||
case Rol_TCH:
|
case Rol_TCH:
|
||||||
case Rol_SYS_ADM:
|
case Rol_SYS_ADM:
|
||||||
Ico_PutContextualIconToShowResults (ActReqSeeUsrMchRes,NULL);
|
Ico_PutContextualIconToShowResults (ActReqSeeAllMchRes,NULL);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
@ -403,8 +405,11 @@ void Gam_ShowOneGame (long GamCod,
|
||||||
|
|
||||||
/***** Begin box *****/
|
/***** Begin box *****/
|
||||||
if (ShowOnlyThisGame)
|
if (ShowOnlyThisGame)
|
||||||
Box_BoxBegin (NULL,Txt_Game,NULL,
|
{
|
||||||
|
Gam_SetParamCurrentGamCod (GamCod);
|
||||||
|
Box_BoxBegin (NULL,Txt_Game,Gam_PutIconToShowResultsOfGame,
|
||||||
Hlp_ASSESSMENT_Games,Box_NOT_CLOSABLE);
|
Hlp_ASSESSMENT_Games,Box_NOT_CLOSABLE);
|
||||||
|
}
|
||||||
|
|
||||||
/***** Get data of this game *****/
|
/***** Get data of this game *****/
|
||||||
Game.GamCod = GamCod;
|
Game.GamCod = GamCod;
|
||||||
|
@ -565,6 +570,28 @@ void Gam_ShowOneGame (long GamCod,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
/************* Put icon to show results of matches in a game *****************/
|
||||||
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
static void Gam_PutIconToShowResultsOfGame (void)
|
||||||
|
{
|
||||||
|
/***** Put icon to view matches results *****/
|
||||||
|
switch (Gbl.Usrs.Me.Role.Logged)
|
||||||
|
{
|
||||||
|
case Rol_STD:
|
||||||
|
Ico_PutContextualIconToShowResults (ActSeeGamMyMchRes,Gam_PutParamCurrentGamCod);
|
||||||
|
break;
|
||||||
|
case Rol_NET:
|
||||||
|
case Rol_TCH:
|
||||||
|
case Rol_SYS_ADM:
|
||||||
|
Ico_PutContextualIconToShowResults (ActSeeGamMchRes,Gam_PutParamCurrentGamCod);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/*********************** Write the author of a game ************************/
|
/*********************** Write the author of a game ************************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
@ -610,15 +637,42 @@ static void Gam_PutFormsToRemEditOneGame (const struct Game *Game,
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
void Gam_PutParams (void)
|
void Gam_PutParams (void)
|
||||||
|
{
|
||||||
|
Gam_PutParamCurrentGamCod ();
|
||||||
|
Gam_PutHiddenParamOrder ();
|
||||||
|
Grp_PutParamWhichGrps ();
|
||||||
|
Pag_PutHiddenParamPagNum (Pag_GAMES,Gbl.Games.CurrentPage);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
/******************** Write parameter with code of game **********************/
|
||||||
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
static void Gam_PutParamCurrentGamCod (void)
|
||||||
{
|
{
|
||||||
long CurrentGamCod = Gam_GetParamCurrentGamCod ();
|
long CurrentGamCod = Gam_GetParamCurrentGamCod ();
|
||||||
|
|
||||||
if (CurrentGamCod > 0)
|
if (CurrentGamCod > 0)
|
||||||
Gam_PutParamGameCod (CurrentGamCod);
|
Gam_PutParamGameCod (CurrentGamCod);
|
||||||
|
}
|
||||||
|
|
||||||
Gam_PutHiddenParamOrder ();
|
/*****************************************************************************/
|
||||||
Grp_PutParamWhichGrps ();
|
/******************** Write parameter with code of game **********************/
|
||||||
Pag_PutHiddenParamPagNum (Pag_GAMES,Gbl.Games.CurrentPage);
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
void Gam_PutParamGameCod (long GamCod)
|
||||||
|
{
|
||||||
|
Par_PutHiddenParamLong (NULL,"GamCod",GamCod);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
/********************* Get parameter with code of game ***********************/
|
||||||
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
long Gam_GetParamGameCod (void)
|
||||||
|
{
|
||||||
|
/***** Get code of game *****/
|
||||||
|
return Par_GetParToLong ("GamCod");
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
@ -641,7 +695,8 @@ long Gam_GetParams (void)
|
||||||
|
|
||||||
static void Gam_PutHiddenParamOrder (void)
|
static void Gam_PutHiddenParamOrder (void)
|
||||||
{
|
{
|
||||||
Par_PutHiddenParamUnsigned (NULL,"Order",(unsigned) Gbl.Games.SelectedOrder);
|
if (Gbl.Games.SelectedOrder != Gam_ORDER_DEFAULT)
|
||||||
|
Par_PutHiddenParamUnsigned (NULL,"Order",(unsigned) Gbl.Games.SelectedOrder);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
@ -974,25 +1029,6 @@ static void Gam_GetGameTxtFromDB (long GamCod,char Txt[Cns_MAX_BYTES_TEXT + 1])
|
||||||
Lay_ShowErrorAndExit ("Error when getting game text.");
|
Lay_ShowErrorAndExit ("Error when getting game text.");
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
|
||||||
/******************** Write parameter with code of game **********************/
|
|
||||||
/*****************************************************************************/
|
|
||||||
|
|
||||||
void Gam_PutParamGameCod (long GamCod)
|
|
||||||
{
|
|
||||||
Par_PutHiddenParamLong (NULL,"GamCod",GamCod);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*****************************************************************************/
|
|
||||||
/********************* Get parameter with code of game ***********************/
|
|
||||||
/*****************************************************************************/
|
|
||||||
|
|
||||||
long Gam_GetParamGameCod (void)
|
|
||||||
{
|
|
||||||
/***** Get code of game *****/
|
|
||||||
return Par_GetParToLong ("GamCod");
|
|
||||||
}
|
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/*************** Ask for confirmation of removing of a game ******************/
|
/*************** Ask for confirmation of removing of a game ******************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
|
@ -89,6 +89,8 @@ void Gam_PutHiddenParamGameOrder (void);
|
||||||
void Gam_RequestCreatOrEditGame (void);
|
void Gam_RequestCreatOrEditGame (void);
|
||||||
|
|
||||||
void Gam_PutParams (void);
|
void Gam_PutParams (void);
|
||||||
|
void Gam_PutParamGameCod (long GamCod);
|
||||||
|
long Gam_GetParamGameCod (void);
|
||||||
long Gam_GetParams (void);
|
long Gam_GetParams (void);
|
||||||
|
|
||||||
void Gam_GetListGames (Gam_Order_t SelectedOrder);
|
void Gam_GetListGames (Gam_Order_t SelectedOrder);
|
||||||
|
@ -97,9 +99,6 @@ void Gam_GetDataOfGameByCod (struct Game *Gam);
|
||||||
void Gam_GetDataOfGameByFolder (struct Game *Gam);
|
void Gam_GetDataOfGameByFolder (struct Game *Gam);
|
||||||
void Gam_FreeListGames (void);
|
void Gam_FreeListGames (void);
|
||||||
|
|
||||||
void Gam_PutParamGameCod (long GamCod);
|
|
||||||
long Gam_GetParamGameCod (void);
|
|
||||||
|
|
||||||
void Gam_AskRemGame (void);
|
void Gam_AskRemGame (void);
|
||||||
void Gam_RemoveGame (void);
|
void Gam_RemoveGame (void);
|
||||||
void Gam_RemoveGamesCrs (long CrsCod);
|
void Gam_RemoveGamesCrs (long CrsCod);
|
||||||
|
|
|
@ -4939,7 +4939,8 @@ void Grp_PutParamWhichGrps (void)
|
||||||
{
|
{
|
||||||
Grp_GetParamWhichGrps ();
|
Grp_GetParamWhichGrps ();
|
||||||
|
|
||||||
Par_PutHiddenParamUnsigned (NULL,"WhichGrps",(unsigned) Gbl.Crs.Grps.WhichGrps);
|
if (Gbl.Crs.Grps.WhichGrps != Grp_WHICH_GROUPS_DEFAULT)
|
||||||
|
Par_PutHiddenParamUnsigned (NULL,"WhichGrps",(unsigned) Gbl.Crs.Grps.WhichGrps);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Grp_PutParamWhichGrpsOnlyMyGrps (void)
|
void Grp_PutParamWhichGrpsOnlyMyGrps (void)
|
||||||
|
|
18
swad_match.c
18
swad_match.c
|
@ -96,6 +96,7 @@ long Mch_CurrentMchCod = -1L; // Used as parameter in contextual links
|
||||||
/***************************** Private prototypes ****************************/
|
/***************************** Private prototypes ****************************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
static void Mch_PutIconsInListOfMatches (void);
|
||||||
static void Mch_PutIconToCreateNewMatch (void);
|
static void Mch_PutIconToCreateNewMatch (void);
|
||||||
|
|
||||||
static void Mch_ListOneOrMoreMatches (const struct Game *Game,
|
static void Mch_ListOneOrMoreMatches (const struct Game *Game,
|
||||||
|
@ -225,7 +226,6 @@ void Mch_ListMatches (struct Game *Game,bool PutFormNewMatch)
|
||||||
char *SubQuery;
|
char *SubQuery;
|
||||||
MYSQL_RES *mysql_res;
|
MYSQL_RES *mysql_res;
|
||||||
unsigned NumMatches;
|
unsigned NumMatches;
|
||||||
bool ICanEditMatches = Mch_CheckIfICanEditMatches ();
|
|
||||||
|
|
||||||
/***** Get data of matches from database *****/
|
/***** Get data of matches from database *****/
|
||||||
/* Fill subquery for game */
|
/* Fill subquery for game */
|
||||||
|
@ -272,8 +272,7 @@ void Mch_ListMatches (struct Game *Game,bool PutFormNewMatch)
|
||||||
|
|
||||||
/***** Begin box *****/
|
/***** Begin box *****/
|
||||||
Gam_SetParamCurrentGamCod (Game->GamCod); // Used to pass parameter
|
Gam_SetParamCurrentGamCod (Game->GamCod); // Used to pass parameter
|
||||||
Box_BoxBegin (NULL,Txt_Matches,ICanEditMatches ? Mch_PutIconToCreateNewMatch :
|
Box_BoxBegin (NULL,Txt_Matches,Mch_PutIconsInListOfMatches,
|
||||||
NULL,
|
|
||||||
Hlp_ASSESSMENT_Games_matches,Box_NOT_CLOSABLE);
|
Hlp_ASSESSMENT_Games_matches,Box_NOT_CLOSABLE);
|
||||||
|
|
||||||
/***** Select whether show only my groups or all groups *****/
|
/***** Select whether show only my groups or all groups *****/
|
||||||
|
@ -370,6 +369,19 @@ void Mch_GetDataOfMatchByCod (struct Match *Match)
|
||||||
DB_FreeMySQLResult (&mysql_res);
|
DB_FreeMySQLResult (&mysql_res);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
/****************** Put icons in list of matches of a game *******************/
|
||||||
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
static void Mch_PutIconsInListOfMatches (void)
|
||||||
|
{
|
||||||
|
bool ICanEditMatches = Mch_CheckIfICanEditMatches ();
|
||||||
|
|
||||||
|
/***** Put icon to create a new match in current game *****/
|
||||||
|
if (ICanEditMatches)
|
||||||
|
Mch_PutIconToCreateNewMatch ();
|
||||||
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/********************* Put icon to create a new match ************************/
|
/********************* Put icon to create a new match ************************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
|
@ -94,7 +94,7 @@ static bool McR_GetVisibilityMchResultFromDB (long MchCod);
|
||||||
/*************************** Show my matches results *************************/
|
/*************************** Show my matches results *************************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
void McR_ShowMyMchResults (void)
|
void McR_ShowAllMyMchRes (void)
|
||||||
{
|
{
|
||||||
extern const char *Hlp_ASSESSMENT_Games_results;
|
extern const char *Hlp_ASSESSMENT_Games_results;
|
||||||
extern const char *Hlp_ASSESSMENT_Games_results;
|
extern const char *Hlp_ASSESSMENT_Games_results;
|
||||||
|
@ -149,11 +149,16 @@ void McR_ShowMyMchResults (void)
|
||||||
Gam_FreeListGames ();
|
Gam_FreeListGames ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void McR_ShowAllMyMchResInGame (void)
|
||||||
|
{
|
||||||
|
// TODO: Implement!!!!
|
||||||
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/*********** Select users and dates to show their matches results ************/
|
/*********** Select users and dates to show their matches results ************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
void McR_SelUsrsToViewUsrsMchResults (void)
|
void McR_SelUsrsToViewUsrsMchRes (void)
|
||||||
{
|
{
|
||||||
extern const char *Hlp_ASSESSMENT_Games_results;
|
extern const char *Hlp_ASSESSMENT_Games_results;
|
||||||
extern const char *The_ClassFormInBox[The_NUM_THEMES];
|
extern const char *The_ClassFormInBox[The_NUM_THEMES];
|
||||||
|
@ -197,7 +202,7 @@ void McR_SelUsrsToViewUsrsMchResults (void)
|
||||||
Usr_ShowFormsToSelectUsrListType (NULL);
|
Usr_ShowFormsToSelectUsrListType (NULL);
|
||||||
|
|
||||||
/***** Begin form *****/
|
/***** Begin form *****/
|
||||||
Frm_StartForm (ActSeeUsrMchRes);
|
Frm_StartForm (ActSeeAllMchRes);
|
||||||
Grp_PutParamsCodGrps ();
|
Grp_PutParamsCodGrps ();
|
||||||
|
|
||||||
/***** Put list of users to select some of them *****/
|
/***** Put list of users to select some of them *****/
|
||||||
|
@ -253,11 +258,16 @@ void McR_SelUsrsToViewUsrsMchResults (void)
|
||||||
/****************** Get users and show their matches results *****************/
|
/****************** Get users and show their matches results *****************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
void McR_GetUsrsAndShowMchResults (void)
|
void McR_GetUsrsAndShowMchRes (void)
|
||||||
{
|
{
|
||||||
Usr_GetSelectedUsrsAndGoToAct (&Gbl.Usrs.Selected,
|
Usr_GetSelectedUsrsAndGoToAct (&Gbl.Usrs.Selected,
|
||||||
McR_ShowUsrsMchResults,
|
McR_ShowUsrsMchResults,
|
||||||
McR_SelUsrsToViewUsrsMchResults);
|
McR_SelUsrsToViewUsrsMchRes);
|
||||||
|
}
|
||||||
|
|
||||||
|
void McR_GetUsrsAndShowMchResInGame (void)
|
||||||
|
{
|
||||||
|
// TODO: Implement!!!
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
|
@ -35,9 +35,11 @@
|
||||||
/***************************** Public prototypes *****************************/
|
/***************************** Public prototypes *****************************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
void McR_ShowMyMchResults (void);
|
void McR_ShowAllMyMchRes (void);
|
||||||
void McR_SelUsrsToViewUsrsMchResults (void);
|
void McR_ShowAllMyMchResInGame (void);
|
||||||
void McR_GetUsrsAndShowMchResults (void);
|
void McR_SelUsrsToViewUsrsMchRes (void);
|
||||||
|
void McR_GetUsrsAndShowMchRes (void);
|
||||||
|
void McR_GetUsrsAndShowMchResInGame (void);
|
||||||
void McR_ShowOneMchResult (void);
|
void McR_ShowOneMchResult (void);
|
||||||
void McR_GetMatchResultQuestionsFromDB (long MchCod,long UsrCod,
|
void McR_GetMatchResultQuestionsFromDB (long MchCod,long UsrCod,
|
||||||
unsigned *NumQsts,unsigned *NumQstsNotBlank);
|
unsigned *NumQsts,unsigned *NumQstsNotBlank);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user