mirror of
https://github.com/acanas/swad-core.git
synced 2024-06-12 11:44:13 +02:00
Version18.127.2
This commit is contained in:
parent
3ba9647b4f
commit
d617a29b6e
|
@ -611,6 +611,7 @@ Assessment:
|
||||||
456. ActNewMch Create a new match showing first question in a new browser tab (by a teacher)
|
456. ActNewMch Create a new match showing first question in a new browser tab (by a teacher)
|
||||||
NEW. ActResMch Resume an unfinished match showing current question in a new browser tab (by a teacher)
|
NEW. ActResMch Resume an unfinished match showing current question in a new browser tab (by a teacher)
|
||||||
457. ActNxtMch Show next question when playing a game (by a teacher)
|
457. ActNxtMch Show next question when playing a game (by a teacher)
|
||||||
|
NEW. ActShoMch Show finished match results
|
||||||
|
|
||||||
NEW. ActPlyMchStd Play a game (by a student)
|
NEW. ActPlyMchStd Play a game (by a student)
|
||||||
NEW. ActGamStdCurQst Show current question when playing a game (by a student)
|
NEW. ActGamStdCurQst Show current question when playing a game (by a student)
|
||||||
|
@ -2148,6 +2149,7 @@ struct Act_Actions Act_Actions[Act_NUM_ACTIONS] =
|
||||||
/* ActNewMch */{1671,-1,TabUnk,ActSeeAllGam ,0x230,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_NEW_TAB,NULL ,Gam_CreateAndStartNewMatch ,NULL},
|
/* ActNewMch */{1671,-1,TabUnk,ActSeeAllGam ,0x230,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_NEW_TAB,NULL ,Gam_CreateAndStartNewMatch ,NULL},
|
||||||
/* ActResMch */{1785,-1,TabUnk,ActSeeAllGam ,0x230,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_NEW_TAB,NULL ,Gam_ResumeUnfinishedMatch ,NULL},
|
/* ActResMch */{1785,-1,TabUnk,ActSeeAllGam ,0x230,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_NEW_TAB,NULL ,Gam_ResumeUnfinishedMatch ,NULL},
|
||||||
/* ActNxtMch */{1672,-1,TabUnk,ActSeeAllGam ,0x230,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_2ND_TAB,NULL ,Gam_NextStatusMatch ,NULL},
|
/* ActNxtMch */{1672,-1,TabUnk,ActSeeAllGam ,0x230,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_2ND_TAB,NULL ,Gam_NextStatusMatch ,NULL},
|
||||||
|
/* ActShoMch */{1786,-1,TabUnk,ActSeeAllGam ,0x230,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Gam_ShowFinishedMatchResults ,NULL},
|
||||||
|
|
||||||
/* ActPlyMchStd */{1779,-1,TabUnk,ActSeeAllGam ,0x008, 0, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Gam_PlayMatchStd ,NULL},
|
/* ActPlyMchStd */{1779,-1,TabUnk,ActSeeAllGam ,0x008, 0, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Gam_PlayMatchStd ,NULL},
|
||||||
/* ActGamStdCurQst */{1780,-1,TabUnk,ActSeeAllGam ,0x008, 0, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_NEW_TAB,Gam_GetMatchBeingPlayed ,Gam_ShowNewMatchToMeAsStd ,NULL},
|
/* ActGamStdCurQst */{1780,-1,TabUnk,ActSeeAllGam ,0x008, 0, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_NEW_TAB,Gam_GetMatchBeingPlayed ,Gam_ShowNewMatchToMeAsStd ,NULL},
|
||||||
|
@ -4989,6 +4991,7 @@ Act_Action_t Act_FromActCodToAction[1 + Act_MAX_ACTION_COD] = // Do not reuse un
|
||||||
ActReqRemMch, // #1783
|
ActReqRemMch, // #1783
|
||||||
ActRemMch, // #1784
|
ActRemMch, // #1784
|
||||||
ActResMch, // #1785
|
ActResMch, // #1785
|
||||||
|
ActShoMch, // #1786
|
||||||
};
|
};
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
|
@ -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 + 64 + 38 + 12 + 42 + 36 + 19 + 110 + 168 + 437 + 176 + 169 + 16 + 67)
|
#define Act_NUM_ACTIONS (1 + 4 + 64 + 38 + 12 + 42 + 36 + 19 + 110 + 169 + 437 + 176 + 169 + 16 + 67)
|
||||||
|
|
||||||
#define Act_MAX_ACTION_COD 1785
|
#define Act_MAX_ACTION_COD 1786
|
||||||
|
|
||||||
#define Act_MAX_OPTIONS_IN_MENU_PER_TAB 13
|
#define Act_MAX_OPTIONS_IN_MENU_PER_TAB 13
|
||||||
|
|
||||||
|
@ -613,54 +613,55 @@ typedef signed int Act_Action_t; // Must be a signed type, because -1 is used to
|
||||||
#define ActNewMch (ActChgCrsTT1stDay + 120)
|
#define ActNewMch (ActChgCrsTT1stDay + 120)
|
||||||
#define ActResMch (ActChgCrsTT1stDay + 121)
|
#define ActResMch (ActChgCrsTT1stDay + 121)
|
||||||
#define ActNxtMch (ActChgCrsTT1stDay + 122)
|
#define ActNxtMch (ActChgCrsTT1stDay + 122)
|
||||||
#define ActPlyMchStd (ActChgCrsTT1stDay + 123)
|
#define ActShoMch (ActChgCrsTT1stDay + 123)
|
||||||
#define ActGamStdCurQst (ActChgCrsTT1stDay + 124)
|
#define ActPlyMchStd (ActChgCrsTT1stDay + 124)
|
||||||
#define ActRefGamStd (ActChgCrsTT1stDay + 125)
|
#define ActGamStdCurQst (ActChgCrsTT1stDay + 125)
|
||||||
#define ActAnsGam (ActChgCrsTT1stDay + 126)
|
#define ActRefGamStd (ActChgCrsTT1stDay + 126)
|
||||||
#define ActFrmNewGam (ActChgCrsTT1stDay + 127)
|
#define ActAnsGam (ActChgCrsTT1stDay + 127)
|
||||||
#define ActEdiOneGam (ActChgCrsTT1stDay + 128)
|
#define ActFrmNewGam (ActChgCrsTT1stDay + 128)
|
||||||
#define ActNewGam (ActChgCrsTT1stDay + 129)
|
#define ActEdiOneGam (ActChgCrsTT1stDay + 129)
|
||||||
#define ActChgGam (ActChgCrsTT1stDay + 130)
|
#define ActNewGam (ActChgCrsTT1stDay + 130)
|
||||||
#define ActReqRemGam (ActChgCrsTT1stDay + 131)
|
#define ActChgGam (ActChgCrsTT1stDay + 131)
|
||||||
#define ActRemGam (ActChgCrsTT1stDay + 132)
|
#define ActReqRemGam (ActChgCrsTT1stDay + 132)
|
||||||
#define ActReqRstGam (ActChgCrsTT1stDay + 133)
|
#define ActRemGam (ActChgCrsTT1stDay + 133)
|
||||||
#define ActRstGam (ActChgCrsTT1stDay + 134)
|
#define ActReqRstGam (ActChgCrsTT1stDay + 134)
|
||||||
#define ActHidGam (ActChgCrsTT1stDay + 135)
|
#define ActRstGam (ActChgCrsTT1stDay + 135)
|
||||||
#define ActShoGam (ActChgCrsTT1stDay + 136)
|
#define ActHidGam (ActChgCrsTT1stDay + 136)
|
||||||
#define ActAddOneGamQst (ActChgCrsTT1stDay + 137)
|
#define ActShoGam (ActChgCrsTT1stDay + 137)
|
||||||
#define ActGamLstTstQst (ActChgCrsTT1stDay + 138)
|
#define ActAddOneGamQst (ActChgCrsTT1stDay + 138)
|
||||||
#define ActAddTstQstToGam (ActChgCrsTT1stDay + 139)
|
#define ActGamLstTstQst (ActChgCrsTT1stDay + 139)
|
||||||
#define ActReqRemGamQst (ActChgCrsTT1stDay + 140)
|
#define ActAddTstQstToGam (ActChgCrsTT1stDay + 140)
|
||||||
#define ActRemGamQst (ActChgCrsTT1stDay + 141)
|
#define ActReqRemGamQst (ActChgCrsTT1stDay + 141)
|
||||||
#define ActUp_GamQst (ActChgCrsTT1stDay + 142)
|
#define ActRemGamQst (ActChgCrsTT1stDay + 142)
|
||||||
#define ActDwnGamQst (ActChgCrsTT1stDay + 143)
|
#define ActUp_GamQst (ActChgCrsTT1stDay + 143)
|
||||||
|
#define ActDwnGamQst (ActChgCrsTT1stDay + 144)
|
||||||
|
|
||||||
#define ActSeeSvy (ActChgCrsTT1stDay + 144)
|
#define ActSeeSvy (ActChgCrsTT1stDay + 145)
|
||||||
#define ActAnsSvy (ActChgCrsTT1stDay + 145)
|
#define ActAnsSvy (ActChgCrsTT1stDay + 146)
|
||||||
#define ActFrmNewSvy (ActChgCrsTT1stDay + 146)
|
#define ActFrmNewSvy (ActChgCrsTT1stDay + 147)
|
||||||
#define ActEdiOneSvy (ActChgCrsTT1stDay + 147)
|
#define ActEdiOneSvy (ActChgCrsTT1stDay + 148)
|
||||||
#define ActNewSvy (ActChgCrsTT1stDay + 148)
|
#define ActNewSvy (ActChgCrsTT1stDay + 149)
|
||||||
#define ActChgSvy (ActChgCrsTT1stDay + 149)
|
#define ActChgSvy (ActChgCrsTT1stDay + 150)
|
||||||
#define ActReqRemSvy (ActChgCrsTT1stDay + 150)
|
#define ActReqRemSvy (ActChgCrsTT1stDay + 151)
|
||||||
#define ActRemSvy (ActChgCrsTT1stDay + 151)
|
#define ActRemSvy (ActChgCrsTT1stDay + 152)
|
||||||
#define ActReqRstSvy (ActChgCrsTT1stDay + 152)
|
#define ActReqRstSvy (ActChgCrsTT1stDay + 153)
|
||||||
#define ActRstSvy (ActChgCrsTT1stDay + 153)
|
#define ActRstSvy (ActChgCrsTT1stDay + 154)
|
||||||
#define ActHidSvy (ActChgCrsTT1stDay + 154)
|
#define ActHidSvy (ActChgCrsTT1stDay + 155)
|
||||||
#define ActShoSvy (ActChgCrsTT1stDay + 155)
|
#define ActShoSvy (ActChgCrsTT1stDay + 156)
|
||||||
#define ActEdiOneSvyQst (ActChgCrsTT1stDay + 156)
|
#define ActEdiOneSvyQst (ActChgCrsTT1stDay + 157)
|
||||||
#define ActRcvSvyQst (ActChgCrsTT1stDay + 157)
|
#define ActRcvSvyQst (ActChgCrsTT1stDay + 158)
|
||||||
#define ActReqRemSvyQst (ActChgCrsTT1stDay + 158)
|
#define ActReqRemSvyQst (ActChgCrsTT1stDay + 159)
|
||||||
#define ActRemSvyQst (ActChgCrsTT1stDay + 159)
|
#define ActRemSvyQst (ActChgCrsTT1stDay + 160)
|
||||||
|
|
||||||
#define ActSeeOneExaAnn (ActChgCrsTT1stDay + 160)
|
#define ActSeeOneExaAnn (ActChgCrsTT1stDay + 161)
|
||||||
#define ActSeeDatExaAnn (ActChgCrsTT1stDay + 161)
|
#define ActSeeDatExaAnn (ActChgCrsTT1stDay + 162)
|
||||||
#define ActEdiExaAnn (ActChgCrsTT1stDay + 162)
|
#define ActEdiExaAnn (ActChgCrsTT1stDay + 163)
|
||||||
#define ActRcvExaAnn (ActChgCrsTT1stDay + 163)
|
#define ActRcvExaAnn (ActChgCrsTT1stDay + 164)
|
||||||
#define ActPrnExaAnn (ActChgCrsTT1stDay + 164)
|
#define ActPrnExaAnn (ActChgCrsTT1stDay + 165)
|
||||||
#define ActReqRemExaAnn (ActChgCrsTT1stDay + 165)
|
#define ActReqRemExaAnn (ActChgCrsTT1stDay + 166)
|
||||||
#define ActRemExaAnn (ActChgCrsTT1stDay + 166)
|
#define ActRemExaAnn (ActChgCrsTT1stDay + 167)
|
||||||
#define ActHidExaAnn (ActChgCrsTT1stDay + 167)
|
#define ActHidExaAnn (ActChgCrsTT1stDay + 168)
|
||||||
#define ActShoExaAnn (ActChgCrsTT1stDay + 168)
|
#define ActShoExaAnn (ActChgCrsTT1stDay + 169)
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/******************************** Files tab **********************************/
|
/******************************** Files tab **********************************/
|
||||||
|
|
|
@ -456,10 +456,15 @@ En OpenSWAD:
|
||||||
ps2pdf source.ps destination.pdf
|
ps2pdf source.ps destination.pdf
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define Log_PLATFORM_VERSION "SWAD 18.127.1 (2019-05-31)"
|
#define Log_PLATFORM_VERSION "SWAD 18.127.2 (2019-05-31)"
|
||||||
#define CSS_FILE "swad18.123.css"
|
#define CSS_FILE "swad18.123.css"
|
||||||
#define JS_FILE "swad18.123.js"
|
#define JS_FILE "swad18.123.js"
|
||||||
/*
|
/*
|
||||||
|
Version 18.127.2: May 31, 2019 Question index is shown in match status.
|
||||||
|
New action to show results of a finished match. (243493 lines)
|
||||||
|
1 change necessary in database:
|
||||||
|
INSERT INTO actions (ActCod,Language,Obsolete,Txt) VALUES ('1785','es','N','Ver resultados partida');
|
||||||
|
|
||||||
Version 18.127.1: May 31, 2019 Removed action to end a match. (243464 lines)
|
Version 18.127.1: May 31, 2019 Removed action to end a match. (243464 lines)
|
||||||
1 change necessary in database:
|
1 change necessary in database:
|
||||||
UPDATE actions SET Obsolete='Y' WHERE ActCod=1781;
|
UPDATE actions SET Obsolete='Y' WHERE ActCod=1781;
|
||||||
|
|
37
swad_game.c
37
swad_game.c
|
@ -169,7 +169,8 @@ static void Gam_ExchangeQuestions (long GamCod,
|
||||||
|
|
||||||
static void Gam_ListPlayedMatches (struct Game *Game,bool PutFormNewMatch);
|
static void Gam_ListPlayedMatches (struct Game *Game,bool PutFormNewMatch);
|
||||||
static void Gam_PutIconToPlayNewMatch (void);
|
static void Gam_PutIconToPlayNewMatch (void);
|
||||||
static void Gam_ListOneOrMoreMatchesForEdition (unsigned NumMatches,
|
static void Gam_ListOneOrMoreMatchesForEdition (struct Game *Game,
|
||||||
|
unsigned NumMatches,
|
||||||
MYSQL_RES *mysql_res);
|
MYSQL_RES *mysql_res);
|
||||||
static void Gam_GetMatchDataFromRow (MYSQL_RES *mysql_res,
|
static void Gam_GetMatchDataFromRow (MYSQL_RES *mysql_res,
|
||||||
struct Match *Match);
|
struct Match *Match);
|
||||||
|
@ -2912,7 +2913,7 @@ static void Gam_ListPlayedMatches (struct Game *Game,bool PutFormNewMatch)
|
||||||
|
|
||||||
if (NumMatches)
|
if (NumMatches)
|
||||||
/***** Show the table with the matches *****/
|
/***** Show the table with the matches *****/
|
||||||
Gam_ListOneOrMoreMatchesForEdition (NumMatches,mysql_res);
|
Gam_ListOneOrMoreMatchesForEdition (Game,NumMatches,mysql_res);
|
||||||
|
|
||||||
/***** Free structure that stores the query result *****/
|
/***** Free structure that stores the query result *****/
|
||||||
DB_FreeMySQLResult (&mysql_res);
|
DB_FreeMySQLResult (&mysql_res);
|
||||||
|
@ -2996,7 +2997,8 @@ static void Gam_PutIconToPlayNewMatch (void)
|
||||||
/*********************** List game matches for edition ***********************/
|
/*********************** List game matches for edition ***********************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
static void Gam_ListOneOrMoreMatchesForEdition (unsigned NumMatches,
|
static void Gam_ListOneOrMoreMatchesForEdition (struct Game *Game,
|
||||||
|
unsigned NumMatches,
|
||||||
MYSQL_RES *mysql_res)
|
MYSQL_RES *mysql_res)
|
||||||
{
|
{
|
||||||
extern const char *Txt_No_INDEX;
|
extern const char *Txt_No_INDEX;
|
||||||
|
@ -3030,7 +3032,7 @@ static void Gam_ListOneOrMoreMatchesForEdition (unsigned NumMatches,
|
||||||
"<th class=\"LEFT_TOP\">"
|
"<th class=\"LEFT_TOP\">"
|
||||||
"%s"
|
"%s"
|
||||||
"</th>"
|
"</th>"
|
||||||
"<th class=\"LEFT_TOP\">"
|
"<th class=\"RIGHT_TOP\">"
|
||||||
"%s"
|
"%s"
|
||||||
"</th>"
|
"</th>"
|
||||||
"</tr>",
|
"</tr>",
|
||||||
|
@ -3062,6 +3064,7 @@ static void Gam_ListOneOrMoreMatchesForEdition (unsigned NumMatches,
|
||||||
Frm_EndForm ();
|
Frm_EndForm ();
|
||||||
|
|
||||||
/* Put icon to continue playing an unfinished match */
|
/* Put icon to continue playing an unfinished match */
|
||||||
|
/*
|
||||||
if (!Match.Status.Finished)
|
if (!Match.Status.Finished)
|
||||||
{
|
{
|
||||||
Gam_CurrentMchCod = Match.MchCod;
|
Gam_CurrentMchCod = Match.MchCod;
|
||||||
|
@ -3070,6 +3073,7 @@ static void Gam_ListOneOrMoreMatchesForEdition (unsigned NumMatches,
|
||||||
"play.svg",
|
"play.svg",
|
||||||
Txt_Resume);
|
Txt_Resume);
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
fprintf (Gbl.F.Out,"</td>");
|
fprintf (Gbl.F.Out,"</td>");
|
||||||
|
|
||||||
|
@ -3127,11 +3131,21 @@ static void Gam_ListOneOrMoreMatchesForEdition (unsigned NumMatches,
|
||||||
fprintf (Gbl.F.Out,"</td>");
|
fprintf (Gbl.F.Out,"</td>");
|
||||||
|
|
||||||
/***** Match status ******/
|
/***** Match status ******/
|
||||||
fprintf (Gbl.F.Out,"<td class=\"DAT LEFT_TOP COLOR%u\">",Gbl.RowEvenOdd);
|
fprintf (Gbl.F.Out,"<td class=\"DAT RIGHT_TOP COLOR%u\">",Gbl.RowEvenOdd);
|
||||||
if (Match.Status.Finished)
|
if (Match.Status.Finished)
|
||||||
Ico_PutIconOff ("flag-checkered.svg",Txt_Finished_match);
|
/* Icon to inform about finished match */
|
||||||
|
// Ico_PutIconOff ("flag-checkered.svg",Txt_Finished_match);
|
||||||
|
Lay_PutContextualLinkOnlyIcon (ActShoMch,NULL,
|
||||||
|
Gam_PutParamCurrentMchCod,
|
||||||
|
"flag-checkered.svg",
|
||||||
|
Txt_Finished_match);
|
||||||
else // Unfinished match
|
else // Unfinished match
|
||||||
{
|
{
|
||||||
|
/* Current question index / total of questions */
|
||||||
|
fprintf (Gbl.F.Out,"<div class=\"DAT\">%u/%u</div>",
|
||||||
|
Match.Status.QstInd,Game->NumQsts);
|
||||||
|
|
||||||
|
/* Icon to resume */
|
||||||
Gam_CurrentMchCod = Match.MchCod;
|
Gam_CurrentMchCod = Match.MchCod;
|
||||||
Lay_PutContextualLinkOnlyIcon (ActResMch,NULL,
|
Lay_PutContextualLinkOnlyIcon (ActResMch,NULL,
|
||||||
Gam_PutParamCurrentMchCod,
|
Gam_PutParamCurrentMchCod,
|
||||||
|
@ -3811,7 +3825,16 @@ static void Gam_PutBigButtonToFinishMatch (long MchCod)
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/********************** Get code of match being played ************************/
|
/******************* Show the results of a finished match ********************/
|
||||||
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
void Gam_ShowFinishedMatchResults (void)
|
||||||
|
{
|
||||||
|
Ale_ShowAlert (Ale_INFO,"To be implemented...");
|
||||||
|
}
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
/********************** Get code of match being played ***********************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
void Gam_GetMatchBeingPlayed (void)
|
void Gam_GetMatchBeingPlayed (void)
|
||||||
|
|
|
@ -130,6 +130,8 @@ void Gam_CreateAndStartNewMatch (void);
|
||||||
void Gam_ResumeUnfinishedMatch (void);
|
void Gam_ResumeUnfinishedMatch (void);
|
||||||
void Gam_NextStatusMatch (void);
|
void Gam_NextStatusMatch (void);
|
||||||
|
|
||||||
|
void Gam_ShowFinishedMatchResults (void);
|
||||||
|
|
||||||
void Gam_GetMatchBeingPlayed (void);
|
void Gam_GetMatchBeingPlayed (void);
|
||||||
void Gam_ShowNewMatchToMeAsStd (void);
|
void Gam_ShowNewMatchToMeAsStd (void);
|
||||||
void Gam_RefreshCurrentMatchStd (void);
|
void Gam_RefreshCurrentMatchStd (void);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user