mirror of
https://github.com/acanas/swad-core.git
synced 2024-06-02 06:45:30 +02:00
Version18.142.3
This commit is contained in:
parent
21efd53862
commit
bbd30962ce
|
@ -2624,14 +2624,14 @@ a:hover img.CENTRE_PHOTO_SHOW
|
||||||
.MATCH_NUM_PLAYERS
|
.MATCH_NUM_PLAYERS
|
||||||
{
|
{
|
||||||
text-align:center;
|
text-align:center;
|
||||||
padding:16pt 0;
|
padding:8pt 0;
|
||||||
color:#808080;
|
color:#808080;
|
||||||
font-size:16pt;
|
font-size:16pt;
|
||||||
}
|
}
|
||||||
.MATCH_NUM_ANSWERERS
|
.MATCH_NUM_ANSWERERS
|
||||||
{
|
{
|
||||||
text-align:center;
|
text-align:center;
|
||||||
padding:16pt 0;
|
padding:8pt 0;
|
||||||
color:#808080;
|
color:#808080;
|
||||||
font-size:16pt;
|
font-size:16pt;
|
||||||
}
|
}
|
||||||
|
@ -2704,12 +2704,12 @@ a:hover img.CENTRE_PHOTO_SHOW
|
||||||
font-size:24pt;
|
font-size:24pt;
|
||||||
}
|
}
|
||||||
|
|
||||||
.MATCH_STD_WAIT_CONTAINER
|
.MATCH_WAIT_CONTAINER
|
||||||
{
|
{
|
||||||
box-sizing:border-box;
|
box-sizing:border-box;
|
||||||
text-align:center;
|
text-align:center;
|
||||||
}
|
}
|
||||||
.MATCH_STD_WAIT_IMAGE
|
.MATCH_WAIT_IMAGE
|
||||||
{
|
{
|
||||||
box-sizing:border-box;
|
box-sizing:border-box;
|
||||||
width:50%;
|
width:50%;
|
||||||
|
|
|
@ -460,10 +460,12 @@ En OpenSWAD:
|
||||||
ps2pdf source.ps destination.pdf
|
ps2pdf source.ps destination.pdf
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define Log_PLATFORM_VERSION "SWAD 18.142.2 (2019-09-10)"
|
#define Log_PLATFORM_VERSION "SWAD 18.142.3 (2019-09-10)"
|
||||||
#define CSS_FILE "swad18.138.css"
|
#define CSS_FILE "swad18.138.css"
|
||||||
#define JS_FILE "swad18.130.2.js"
|
#define JS_FILE "swad18.130.2.js"
|
||||||
/*
|
/*
|
||||||
|
Version 18.142.3: Sep 10, 2019 Animation on teacher's screen when match paused.
|
||||||
|
Code refactoring in matches. (244454 lines)
|
||||||
Version 18.142.2: Sep 10, 2019 Elapsed time in question not shown in start and end. (244391 lines)
|
Version 18.142.2: Sep 10, 2019 Elapsed time in question not shown in start and end. (244391 lines)
|
||||||
Version 18.142.1: Sep 10, 2019 When a match is paused, backward/forward buttons go to previous/next question. (244386 lines)
|
Version 18.142.1: Sep 10, 2019 When a match is paused, backward/forward buttons go to previous/next question. (244386 lines)
|
||||||
1 change necessary in database:
|
1 change necessary in database:
|
||||||
|
|
152
swad_game.c
152
swad_game.c
|
@ -88,14 +88,14 @@ const char *Gam_StrAnswerTypesDB[Gam_NUM_ANS_TYPES] =
|
||||||
#define Gam_ICON_CLOSE "fas fa-times"
|
#define Gam_ICON_CLOSE "fas fa-times"
|
||||||
#define Gam_ICON_PLAY "fas fa-play"
|
#define Gam_ICON_PLAY "fas fa-play"
|
||||||
#define Gam_ICON_PAUSE "fas fa-pause"
|
#define Gam_ICON_PAUSE "fas fa-pause"
|
||||||
// #define Gam_ICON_STEM "fas fa-step-backward"
|
#define Gam_ICON_STEM "fas fa-step-backward"
|
||||||
#define Gam_ICON_STEM "fas fa-angle-up"
|
// #define Gam_ICON_STEM "fas fa-angle-up"
|
||||||
#define Gam_ICON_START "fas fa-step-backward"
|
#define Gam_ICON_START "fas fa-step-backward"
|
||||||
#define Gam_ICON_PREVIOUS "fas fa-step-backward"
|
#define Gam_ICON_PREVIOUS "fas fa-step-backward"
|
||||||
#define Gam_ICON_FINISH "fas fa-step-forward"
|
#define Gam_ICON_FINISH "fas fa-step-forward"
|
||||||
#define Gam_ICON_NEXT "fas fa-step-forward"
|
#define Gam_ICON_NEXT "fas fa-step-forward"
|
||||||
// #define Gam_ICON_ANSWERS "fas fa-step-forward"
|
#define Gam_ICON_ANSWERS "fas fa-step-forward"
|
||||||
#define Gam_ICON_ANSWERS "fas fa-angle-down"
|
// #define Gam_ICON_ANSWERS "fas fa-angle-down"
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/******************************* Private types *******************************/
|
/******************************* Private types *******************************/
|
||||||
|
@ -223,6 +223,7 @@ static void Gam_ShowMatchStatusForTch (struct Match *Match);
|
||||||
static void Gam_ShowMatchStatusForStd (struct Match *Match);
|
static void Gam_ShowMatchStatusForStd (struct Match *Match);
|
||||||
static void Gam_ShowLeftColumnTch (struct Match *Match);
|
static void Gam_ShowLeftColumnTch (struct Match *Match);
|
||||||
static void Gam_ShowLeftColumnStd (struct Match *Match);
|
static void Gam_ShowLeftColumnStd (struct Match *Match);
|
||||||
|
static void Gam_ShowButtons (struct Match *Match);
|
||||||
static void Gam_ShowNumQstInGame (struct Match *Match);
|
static void Gam_ShowNumQstInGame (struct Match *Match);
|
||||||
static void Gam_ShowNumPlayers (struct Match *Match);
|
static void Gam_ShowNumPlayers (struct Match *Match);
|
||||||
static void Gam_ShowMatchTitle (struct Match *Match);
|
static void Gam_ShowMatchTitle (struct Match *Match);
|
||||||
|
@ -234,6 +235,8 @@ static void Gam_PutBigButton (Act_Action_t NextAction,long MchCod,
|
||||||
static void Gam_PutBigButtonOff (const char *Icon);
|
static void Gam_PutBigButtonOff (const char *Icon);
|
||||||
static void Gam_PutBigButtonClose (void);
|
static void Gam_PutBigButtonClose (void);
|
||||||
|
|
||||||
|
static void Gam_ShowWaitImage (const char *Txt);
|
||||||
|
|
||||||
static void Gam_RemoveOldPlayers (void);
|
static void Gam_RemoveOldPlayers (void);
|
||||||
static void Gam_UpdateMatchAsBeingPlayed (long MchCod);
|
static void Gam_UpdateMatchAsBeingPlayed (long MchCod);
|
||||||
static void Gam_SetMatchAsNotBeingPlayed (long MchCod);
|
static void Gam_SetMatchAsNotBeingPlayed (long MchCod);
|
||||||
|
@ -3687,6 +3690,8 @@ static void Gam_SetMatchStatusToNextQuestion (struct Match *Match)
|
||||||
|
|
||||||
static void Gam_ShowMatchStatusForTch (struct Match *Match)
|
static void Gam_ShowMatchStatusForTch (struct Match *Match)
|
||||||
{
|
{
|
||||||
|
extern const char *Txt_MATCH_Paused;
|
||||||
|
|
||||||
/***** Get current number of players *****/
|
/***** Get current number of players *****/
|
||||||
Gam_GetNumPlayers (Match);
|
Gam_GetNumPlayers (Match);
|
||||||
|
|
||||||
|
@ -3697,13 +3702,15 @@ static void Gam_ShowMatchStatusForTch (struct Match *Match)
|
||||||
/* Start right container */
|
/* Start right container */
|
||||||
fprintf (Gbl.F.Out,"<div class=\"MATCH_RIGHT\">");
|
fprintf (Gbl.F.Out,"<div class=\"MATCH_RIGHT\">");
|
||||||
|
|
||||||
/***** Top row *****/
|
/* Top row */
|
||||||
Gam_ShowMatchTitle (Match);
|
Gam_ShowMatchTitle (Match);
|
||||||
|
|
||||||
/***** Bottom row *****/
|
/* Bottom row */
|
||||||
if (Match->Status.BeingPlayed)
|
if (Match->Status.BeingPlayed)
|
||||||
/* Show current question and possible answers */
|
/* Show current question and possible answers */
|
||||||
Gam_ShowQuestionAndAnswersTch (Match);
|
Gam_ShowQuestionAndAnswersTch (Match);
|
||||||
|
else // Not being played
|
||||||
|
Gam_ShowWaitImage (Txt_MATCH_Paused);
|
||||||
|
|
||||||
/* End right container */
|
/* End right container */
|
||||||
fprintf (Gbl.F.Out,"</div>");
|
fprintf (Gbl.F.Out,"</div>");
|
||||||
|
@ -3749,14 +3756,7 @@ static void Gam_ShowMatchStatusForStd (struct Match *Match)
|
||||||
/* Show current question and possible answers */
|
/* Show current question and possible answers */
|
||||||
Gam_ShowQuestionAndAnswersStd (Match);
|
Gam_ShowQuestionAndAnswersStd (Match);
|
||||||
else // Not being played
|
else // Not being played
|
||||||
fprintf (Gbl.F.Out,"<div class=\"MATCH_STD_WAIT_CONTAINER\">"
|
Gam_ShowWaitImage (Txt_Please_wait_);
|
||||||
"<img src=\"%s/wait.gif\""
|
|
||||||
" alt=\"%s\" title=\"%s\""
|
|
||||||
" class=\"MATCH_STD_WAIT_IMAGE\" />"
|
|
||||||
"</div>",
|
|
||||||
Cfg_URL_ICON_PUBLIC,
|
|
||||||
Txt_Please_wait_,
|
|
||||||
Txt_Please_wait_);
|
|
||||||
|
|
||||||
fprintf (Gbl.F.Out,"</div>");
|
fprintf (Gbl.F.Out,"</div>");
|
||||||
}
|
}
|
||||||
|
@ -3771,18 +3771,8 @@ static void Gam_ShowMatchStatusForStd (struct Match *Match)
|
||||||
|
|
||||||
static void Gam_ShowLeftColumnTch (struct Match *Match)
|
static void Gam_ShowLeftColumnTch (struct Match *Match)
|
||||||
{
|
{
|
||||||
extern const char *Txt_Stem;
|
extern const char *Txt_MATCH_respond;
|
||||||
extern const char *Txt_MATCH_Start;
|
|
||||||
extern const char *Txt_Previous_QUESTION;
|
|
||||||
extern const char *Txt_Pause;
|
|
||||||
extern const char *Txt_Start;
|
|
||||||
extern const char *Txt_Resume;
|
|
||||||
extern const char *Txt_Next_QUESTION;
|
|
||||||
extern const char *Txt_Finish;
|
|
||||||
extern const char *Txt_Answers;
|
|
||||||
struct Time Time;
|
struct Time Time;
|
||||||
unsigned PrvQstInd; // Previous question index
|
|
||||||
unsigned NxtQstInd; // Next question index
|
|
||||||
unsigned NumAnswerers;
|
unsigned NumAnswerers;
|
||||||
|
|
||||||
/***** Start left container *****/
|
/***** Start left container *****/
|
||||||
|
@ -3813,6 +3803,65 @@ static void Gam_ShowLeftColumnTch (struct Match *Match)
|
||||||
fprintf (Gbl.F.Out,"</div>");
|
fprintf (Gbl.F.Out,"</div>");
|
||||||
|
|
||||||
/***** Buttons *****/
|
/***** Buttons *****/
|
||||||
|
Gam_ShowButtons (Match);
|
||||||
|
|
||||||
|
/***** Number of players *****/
|
||||||
|
Gam_ShowNumPlayers (Match);
|
||||||
|
|
||||||
|
/***** Number of users who have answered *****/
|
||||||
|
if (Match->Status.BeingPlayed &&
|
||||||
|
Match->Status.ShowingAnswers)
|
||||||
|
{
|
||||||
|
NumAnswerers = Gam_GetNumAnswerers (Match);
|
||||||
|
fprintf (Gbl.F.Out,"<div class=\"MATCH_NUM_ANSWERERS\">"
|
||||||
|
"%s<br />"
|
||||||
|
"<strong>%u/%u</strong>"
|
||||||
|
"</div>",
|
||||||
|
Txt_MATCH_respond,
|
||||||
|
NumAnswerers,Match->Status.NumPlayers);
|
||||||
|
}
|
||||||
|
|
||||||
|
/***** End left container *****/
|
||||||
|
fprintf (Gbl.F.Out,"</div>");
|
||||||
|
}
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
/******** Show left botton column when playing a match (as a student) ********/
|
||||||
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
static void Gam_ShowLeftColumnStd (struct Match *Match)
|
||||||
|
{
|
||||||
|
/***** Start left container *****/
|
||||||
|
fprintf (Gbl.F.Out,"<div class=\"MATCH_LEFT\">");
|
||||||
|
|
||||||
|
/***** Top *****/
|
||||||
|
fprintf (Gbl.F.Out,"<div class=\"MATCH_TOP\"></div>");
|
||||||
|
|
||||||
|
/***** Write number of question *****/
|
||||||
|
Gam_ShowNumQstInGame (Match);
|
||||||
|
|
||||||
|
/***** End left container *****/
|
||||||
|
fprintf (Gbl.F.Out,"</div>");
|
||||||
|
}
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
/********************* Show buttons to control a match ***********************/
|
||||||
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
static void Gam_ShowButtons (struct Match *Match)
|
||||||
|
{
|
||||||
|
extern const char *Txt_Stem;
|
||||||
|
extern const char *Txt_MATCH_Start;
|
||||||
|
extern const char *Txt_Previous_QUESTION;
|
||||||
|
extern const char *Txt_Pause;
|
||||||
|
extern const char *Txt_Start;
|
||||||
|
extern const char *Txt_Resume;
|
||||||
|
extern const char *Txt_Next_QUESTION;
|
||||||
|
extern const char *Txt_Answers;
|
||||||
|
extern const char *Txt_Finish;
|
||||||
|
unsigned PrvQstInd; // Previous question index
|
||||||
|
unsigned NxtQstInd; // Next question index
|
||||||
|
|
||||||
/* Start buttons container */
|
/* Start buttons container */
|
||||||
fprintf (Gbl.F.Out,"<div class=\"MATCH_BUTTONS_CONTAINER\">");
|
fprintf (Gbl.F.Out,"<div class=\"MATCH_BUTTONS_CONTAINER\">");
|
||||||
|
|
||||||
|
@ -3915,43 +3964,6 @@ static void Gam_ShowLeftColumnTch (struct Match *Match)
|
||||||
|
|
||||||
/* End buttons container */
|
/* End buttons container */
|
||||||
fprintf (Gbl.F.Out,"</div>");
|
fprintf (Gbl.F.Out,"</div>");
|
||||||
|
|
||||||
/***** Number of players *****/
|
|
||||||
Gam_ShowNumPlayers (Match);
|
|
||||||
|
|
||||||
/***** Number of users who have answered *****/
|
|
||||||
if (Match->Status.BeingPlayed &&
|
|
||||||
Match->Status.ShowingAnswers)
|
|
||||||
{
|
|
||||||
NumAnswerers = Gam_GetNumAnswerers (Match);
|
|
||||||
fprintf (Gbl.F.Out,"<div class=\"MATCH_NUM_ANSWERERS\">"
|
|
||||||
"responden<br />" // TODO: Need translation!!!
|
|
||||||
"<strong>%u/%u</strong>"
|
|
||||||
"</div>",
|
|
||||||
NumAnswerers,Match->Status.NumPlayers);
|
|
||||||
}
|
|
||||||
|
|
||||||
/***** End left container *****/
|
|
||||||
fprintf (Gbl.F.Out,"</div>");
|
|
||||||
}
|
|
||||||
|
|
||||||
/*****************************************************************************/
|
|
||||||
/******** Show left botton column when playing a match (as a student) ********/
|
|
||||||
/*****************************************************************************/
|
|
||||||
|
|
||||||
static void Gam_ShowLeftColumnStd (struct Match *Match)
|
|
||||||
{
|
|
||||||
/***** Start left container *****/
|
|
||||||
fprintf (Gbl.F.Out,"<div class=\"MATCH_LEFT\">");
|
|
||||||
|
|
||||||
/***** Top *****/
|
|
||||||
fprintf (Gbl.F.Out,"<div class=\"MATCH_TOP\"></div>");
|
|
||||||
|
|
||||||
/***** Write number of question *****/
|
|
||||||
Gam_ShowNumQstInGame (Match);
|
|
||||||
|
|
||||||
/***** End left container *****/
|
|
||||||
fprintf (Gbl.F.Out,"</div>");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
@ -4220,6 +4232,22 @@ static void Gam_PutBigButtonClose (void)
|
||||||
Txt_Close,Gam_ICON_CLOSE);
|
Txt_Close,Gam_ICON_CLOSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
/****************************** Show wait image ******************************/
|
||||||
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
static void Gam_ShowWaitImage (const char *Txt)
|
||||||
|
{
|
||||||
|
fprintf (Gbl.F.Out,"<div class=\"MATCH_WAIT_CONTAINER\">"
|
||||||
|
"<img src=\"%s/wait.gif\""
|
||||||
|
" alt=\"%s\" title=\"%s\""
|
||||||
|
" class=\"MATCH_WAIT_IMAGE\" />"
|
||||||
|
"</div>",
|
||||||
|
Cfg_URL_ICON_PUBLIC,
|
||||||
|
Txt,
|
||||||
|
Txt);
|
||||||
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/**************************** Remove old players *****************************/
|
/**************************** Remove old players *****************************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
42
swad_text.c
42
swad_text.c
|
@ -17972,6 +17972,27 @@ const char *Txt_MATCH_End =
|
||||||
"Fim";
|
"Fim";
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
const char *Txt_MATCH_Paused =
|
||||||
|
#if L==1 // ca
|
||||||
|
"En pausa";
|
||||||
|
#elif L==2 // de
|
||||||
|
"Angehalten";
|
||||||
|
#elif L==3 // en
|
||||||
|
"Paused";
|
||||||
|
#elif L==4 // es
|
||||||
|
"En pausa";
|
||||||
|
#elif L==5 // fr
|
||||||
|
"En pause";
|
||||||
|
#elif L==6 // gn
|
||||||
|
"En pausa"; // Okoteve traducción
|
||||||
|
#elif L==7 // it
|
||||||
|
"In pausa";
|
||||||
|
#elif L==8 // pl
|
||||||
|
"Wstrzymany";
|
||||||
|
#elif L==9 // pt
|
||||||
|
"Pausado";
|
||||||
|
#endif
|
||||||
|
|
||||||
const char *Txt_MATCH_Start =
|
const char *Txt_MATCH_Start =
|
||||||
#if L==1 // ca
|
#if L==1 // ca
|
||||||
"Inici";
|
"Inici";
|
||||||
|
@ -18014,6 +18035,27 @@ const char *Txt_Match_X_removed = // Warning: it is very important to include %s
|
||||||
"Jogo <strong>%s</strong> removido.";
|
"Jogo <strong>%s</strong> removido.";
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
const char *Txt_MATCH_respond =
|
||||||
|
#if L==1 // ca
|
||||||
|
"responen";
|
||||||
|
#elif L==2 // de
|
||||||
|
"antworten";
|
||||||
|
#elif L==3 // en
|
||||||
|
"respond";
|
||||||
|
#elif L==4 // es
|
||||||
|
"responden";
|
||||||
|
#elif L==5 // fr
|
||||||
|
"répondent";
|
||||||
|
#elif L==6 // gn
|
||||||
|
"responden"; // Okoteve traducción
|
||||||
|
#elif L==7 // it
|
||||||
|
"rispondono";
|
||||||
|
#elif L==8 // pl
|
||||||
|
"odpowiadają";
|
||||||
|
#elif L==9 // pt
|
||||||
|
"respondem";
|
||||||
|
#endif
|
||||||
|
|
||||||
const char *Txt_Matches = // of a game
|
const char *Txt_Matches = // of a game
|
||||||
#if L==1 // ca
|
#if L==1 // ca
|
||||||
"Partides";
|
"Partides";
|
||||||
|
|
Loading…
Reference in New Issue
Block a user