mirror of
https://github.com/acanas/swad-core.git
synced 2024-06-02 06:45:30 +02:00
Version18.139.4
This commit is contained in:
parent
06e32d48f9
commit
1d0ee04450
|
@ -2678,6 +2678,11 @@ a:hover img.CENTRE_PHOTO_SHOW
|
||||||
height:100px;
|
height:100px;
|
||||||
vertical-align:middle;
|
vertical-align:middle;
|
||||||
}
|
}
|
||||||
|
.MATCH_BUTTON_CONTAINER a
|
||||||
|
{
|
||||||
|
text-decoration:none;
|
||||||
|
color:#404040;
|
||||||
|
}
|
||||||
.MATCH_BUTTON
|
.MATCH_BUTTON
|
||||||
{
|
{
|
||||||
display:table-cell;
|
display:table-cell;
|
||||||
|
@ -2686,11 +2691,11 @@ a:hover img.CENTRE_PHOTO_SHOW
|
||||||
text-align:center;
|
text-align:center;
|
||||||
vertical-align:middle;
|
vertical-align:middle;
|
||||||
margin:auto;
|
margin:auto;
|
||||||
|
opacity:0.7;
|
||||||
}
|
}
|
||||||
.MATCH_BUTTON_CONTAINER a
|
.MATCH_BUTTON:hover
|
||||||
{
|
{
|
||||||
text-decoration:none;
|
opacity:1;
|
||||||
color:#404040;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.MATCH_TCH_QST
|
.MATCH_TCH_QST
|
||||||
|
|
|
@ -460,10 +460,11 @@ En OpenSWAD:
|
||||||
ps2pdf source.ps destination.pdf
|
ps2pdf source.ps destination.pdf
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define Log_PLATFORM_VERSION "SWAD 18.139.3 (2019-09-09)"
|
#define Log_PLATFORM_VERSION "SWAD 18.139.4 (2019-09-09)"
|
||||||
#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.139.4: Sep 09, 2019 Changes in layout of matches buttons. Removed unused code. (244239 lines)
|
||||||
Version 18.139.3: Sep 09, 2019 Changes in layout of matches buttons. (244305 lines)
|
Version 18.139.3: Sep 09, 2019 Changes in layout of matches buttons. (244305 lines)
|
||||||
Version 18.139.2: Sep 05, 2019 Number of match players is not displayed for students.
|
Version 18.139.2: Sep 05, 2019 Number of match players is not displayed for students.
|
||||||
Changes in layout of matches buttons (not finished).
|
Changes in layout of matches buttons (not finished).
|
||||||
|
|
130
swad_game.c
130
swad_game.c
|
@ -76,6 +76,15 @@ const char *Gam_StrAnswerTypesDB[Gam_NUM_ANS_TYPES] =
|
||||||
|
|
||||||
#define Gam_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
|
#define Gam_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
|
||||||
|
|
||||||
|
#define Gam_ICON_CLOSE "❎" // Alternatives: "✕" "❌" "×"
|
||||||
|
#define Gam_ICON_PLAY "🏁" // Alternatives: "‣" "⏩" "▶" "▸" "⇥" "▸"
|
||||||
|
#define Gam_ICON_STEM "⏪" // Alternatives: "⇤"
|
||||||
|
#define Gam_ICON_START "⏪" // Alternatives: "⇤"
|
||||||
|
#define Gam_ICON_PREVIOUS "⏪" // Alternatives: "⇤"
|
||||||
|
#define Gam_ICON_FINISH "⏩" // Alternatives: "⇥"
|
||||||
|
#define Gam_ICON_NEXT "⏩" // Alternatives: "⇥"
|
||||||
|
#define Gam_ICON_ANSWERS "⏩" // Alternatives: "⇥"
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/******************************* Private types *******************************/
|
/******************************* Private types *******************************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
@ -3738,11 +3747,8 @@ static void Gam_ShowLeftColumnTch (struct Match *Match)
|
||||||
{
|
{
|
||||||
if (Match->Status.ShowingAnswers)
|
if (Match->Status.ShowingAnswers)
|
||||||
/* Put button to hide answers */
|
/* Put button to hide answers */
|
||||||
// Gam_PutBigButton (ActCurMchTch,Match->MchCod,
|
|
||||||
// "step-backward.svg",Txt_Stem);
|
|
||||||
Gam_PutBigButton (ActCurMchTch,Match->MchCod,
|
Gam_PutBigButton (ActCurMchTch,Match->MchCod,
|
||||||
"⏪", // "⇤"
|
Gam_ICON_STEM,Txt_Stem);
|
||||||
Txt_Stem);
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* Get index of the previous question */
|
/* Get index of the previous question */
|
||||||
|
@ -3750,18 +3756,12 @@ static void Gam_ShowLeftColumnTch (struct Match *Match)
|
||||||
Match->Status.QstInd);
|
Match->Status.QstInd);
|
||||||
if (PrvQstInd == 0) // There is not a previous question
|
if (PrvQstInd == 0) // There is not a previous question
|
||||||
/* Put button to resume match before first question */
|
/* Put button to resume match before first question */
|
||||||
// Gam_PutBigButton (ActPrvMchTch,Match->MchCod,
|
|
||||||
// "step-backward.svg",Txt_MATCH_Start);
|
|
||||||
Gam_PutBigButton (ActPrvMchTch,Match->MchCod,
|
Gam_PutBigButton (ActPrvMchTch,Match->MchCod,
|
||||||
"⏪", // "⇤"
|
Gam_ICON_START,Txt_MATCH_Start);
|
||||||
Txt_MATCH_Start);
|
|
||||||
else // There is a previous question
|
else // There is a previous question
|
||||||
/* Put button to show previous question */
|
/* Put button to show previous question */
|
||||||
// Gam_PutBigButton (ActPrvMchTch,Match->MchCod,
|
|
||||||
// "step-backward.svg",Txt_Previous_QUESTION);
|
|
||||||
Gam_PutBigButton (ActPrvMchTch,Match->MchCod,
|
Gam_PutBigButton (ActPrvMchTch,Match->MchCod,
|
||||||
"⏪", // "⇤"
|
Gam_ICON_PREVIOUS,Txt_Previous_QUESTION);
|
||||||
Txt_Previous_QUESTION);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else // Not being played
|
else // Not being played
|
||||||
|
@ -3770,11 +3770,8 @@ static void Gam_ShowLeftColumnTch (struct Match *Match)
|
||||||
}
|
}
|
||||||
else // Finished
|
else // Finished
|
||||||
/* Put button to show last question */
|
/* Put button to show last question */
|
||||||
// Gam_PutBigButton (ActPrvMchTch,Match->MchCod,
|
|
||||||
// "step-backward.svg",Txt_Previous_QUESTION);
|
|
||||||
Gam_PutBigButton (ActPrvMchTch,Match->MchCod,
|
Gam_PutBigButton (ActPrvMchTch,Match->MchCod,
|
||||||
"⏪", // "⇤"
|
Gam_ICON_PREVIOUS,Txt_Previous_QUESTION);
|
||||||
Txt_Previous_QUESTION);
|
|
||||||
|
|
||||||
fprintf (Gbl.F.Out,"</div>");
|
fprintf (Gbl.F.Out,"</div>");
|
||||||
|
|
||||||
|
@ -3792,39 +3789,24 @@ static void Gam_ShowLeftColumnTch (struct Match *Match)
|
||||||
Match->Status.QstInd);
|
Match->Status.QstInd);
|
||||||
if (NxtQstInd >= Gam_AFTER_LAST_QUESTION) // No more questions
|
if (NxtQstInd >= Gam_AFTER_LAST_QUESTION) // No more questions
|
||||||
/* Put button to finish */
|
/* Put button to finish */
|
||||||
// Gam_PutBigButton (ActNxtMchTch,Match->MchCod,
|
|
||||||
// "step-forward.svg",Txt_Finish);
|
|
||||||
Gam_PutBigButton (ActNxtMchTch,Match->MchCod,
|
Gam_PutBigButton (ActNxtMchTch,Match->MchCod,
|
||||||
"⏩", // "⇤"
|
Gam_ICON_FINISH,Txt_Finish);
|
||||||
Txt_Finish);
|
|
||||||
else // There are more questions
|
else // There are more questions
|
||||||
/* Put button to show next question */
|
/* Put button to show next question */
|
||||||
// Gam_PutBigButton (ActNxtMchTch,Match->MchCod,
|
|
||||||
// "step-forward.svg",Txt_Next_QUESTION);
|
|
||||||
Gam_PutBigButton (ActNxtMchTch,Match->MchCod,
|
Gam_PutBigButton (ActNxtMchTch,Match->MchCod,
|
||||||
"⏩", // "⇤"
|
Gam_ICON_NEXT,Txt_Next_QUESTION);
|
||||||
Txt_Next_QUESTION);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
/* Put button to show answers */
|
/* Put button to show answers */
|
||||||
// Gam_PutBigButton (ActNxtMchTch,Match->MchCod,
|
|
||||||
// "step-forward.svg",Txt_Answers);
|
|
||||||
Gam_PutBigButton (ActNxtMchTch,Match->MchCod,
|
Gam_PutBigButton (ActNxtMchTch,Match->MchCod,
|
||||||
"⏩", // "⇤"
|
Gam_ICON_ANSWERS,Txt_Answers);
|
||||||
Txt_Answers);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
/* Put button to start / resume match */
|
/* Put button to start / resume match */
|
||||||
// Gam_PutBigButton (ActCurMchTch,
|
|
||||||
// Match->MchCod,
|
|
||||||
// "play.svg",
|
|
||||||
// Match->Status.QstInd == 0 ? Txt_Start :
|
|
||||||
// Txt_Resume);
|
|
||||||
Gam_PutBigButton (ActCurMchTch,
|
Gam_PutBigButton (ActCurMchTch,
|
||||||
Match->MchCod,
|
Match->MchCod,
|
||||||
"⏩", // "⇥", // "▸", // "▶", // "‣", //"⇥", // "▸",
|
Gam_ICON_PLAY,Match->Status.QstInd == 0 ? Txt_Start :
|
||||||
Match->Status.QstInd == 0 ? Txt_Start :
|
Txt_Resume);
|
||||||
Txt_Resume);
|
|
||||||
|
|
||||||
fprintf (Gbl.F.Out,"</div>");
|
fprintf (Gbl.F.Out,"</div>");
|
||||||
|
|
||||||
|
@ -4116,38 +4098,6 @@ static void Gam_ShowQuestionAndAnswersStd (struct Match *Match)
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/*********************** Put a big button to do action ***********************/
|
/*********************** Put a big button to do action ***********************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/*
|
|
||||||
static void Gam_PutBigButton (Act_Action_t NextAction,long MchCod,
|
|
||||||
const char *Icon,const char *Txt)
|
|
||||||
{
|
|
||||||
***** Start form *****
|
|
||||||
Frm_StartForm (NextAction);
|
|
||||||
Gam_PutParamMatchCod (MchCod);
|
|
||||||
|
|
||||||
***** Put icon with link *****
|
|
||||||
* Submitting onmousedown instead of default onclick
|
|
||||||
is necessary in order to be fast
|
|
||||||
and not lose clicks due to refresh *
|
|
||||||
fprintf (Gbl.F.Out,"<a href=\"\"");
|
|
||||||
fprintf (Gbl.F.Out," title=\"%s\"",Txt);
|
|
||||||
fprintf (Gbl.F.Out," class=\"%s\"","MATCH_BUTTON ICO_HIGHLIGHT");
|
|
||||||
fprintf (Gbl.F.Out," onmousedown=\"");
|
|
||||||
fprintf (Gbl.F.Out,"document.getElementById('%s').submit();"
|
|
||||||
"return false;\">",
|
|
||||||
Gbl.Form.Id);
|
|
||||||
fprintf (Gbl.F.Out,"<img src=\"%s/%s\""
|
|
||||||
" alt=\"%s\" title=\"%s\" class=\"ICO64x64\" />"
|
|
||||||
"<br />"
|
|
||||||
"%s",
|
|
||||||
Cfg_URL_ICON_PUBLIC,Icon,
|
|
||||||
Txt,Txt,
|
|
||||||
Txt);
|
|
||||||
fprintf (Gbl.F.Out,"</a>");
|
|
||||||
|
|
||||||
***** End form *****
|
|
||||||
Frm_EndForm ();
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
static void Gam_PutBigButton (Act_Action_t NextAction,long MchCod,
|
static void Gam_PutBigButton (Act_Action_t NextAction,long MchCod,
|
||||||
const char *Icon,const char *Txt)
|
const char *Icon,const char *Txt)
|
||||||
|
@ -4160,41 +4110,18 @@ static void Gam_PutBigButton (Act_Action_t NextAction,long MchCod,
|
||||||
/* Submitting onmousedown instead of default onclick
|
/* Submitting onmousedown instead of default onclick
|
||||||
is necessary in order to be fast
|
is necessary in order to be fast
|
||||||
and not lose clicks due to refresh */
|
and not lose clicks due to refresh */
|
||||||
fprintf (Gbl.F.Out,"<div class=\"MATCH_BUTTON_CONTAINER\">");
|
fprintf (Gbl.F.Out,"<div class=\"MATCH_BUTTON_CONTAINER\">"
|
||||||
fprintf (Gbl.F.Out,"<a href=\"\" title=\"%s\" class=\"MATCH_BUTTON ICO_HIGHLIGHT\""
|
"<a href=\"\" title=\"%s\" class=\"MATCH_BUTTON\""
|
||||||
" onmousedown=\"document.getElementById('%s').submit();"
|
" onmousedown=\"document.getElementById('%s').submit();"
|
||||||
" return false;\">%s</a>",
|
" return false;\">%s</a>"
|
||||||
|
"</div>",
|
||||||
Txt,
|
Txt,
|
||||||
Gbl.Form.Id,
|
Gbl.Form.Id,
|
||||||
Icon);
|
Icon);
|
||||||
fprintf (Gbl.F.Out,"</div>");
|
|
||||||
|
|
||||||
/***** End form *****/
|
/***** End form *****/
|
||||||
Frm_EndForm ();
|
Frm_EndForm ();
|
||||||
}
|
}
|
||||||
/*
|
|
||||||
static void Gam_PutBigButtonClose (void)
|
|
||||||
{
|
|
||||||
extern const char *Txt_Close;
|
|
||||||
|
|
||||||
***** Put icon with link *****
|
|
||||||
* onmousedown instead of default onclick
|
|
||||||
is necessary in order to be fast
|
|
||||||
and not lose clicks due to refresh *
|
|
||||||
fprintf (Gbl.F.Out,"<a href=\"\"");
|
|
||||||
fprintf (Gbl.F.Out," title=\"%s\"",Txt_Close);
|
|
||||||
fprintf (Gbl.F.Out," class=\"%s\"","MATCH_BUTTON ICO_HIGHLIGHT");
|
|
||||||
fprintf (Gbl.F.Out," onmousedown=\"window.close();\"\">");
|
|
||||||
fprintf (Gbl.F.Out,"<img src=\"%s/close.svg\""
|
|
||||||
" alt=\"%s\" title=\"%s\" class=\"ICO64x64\" />"
|
|
||||||
"<br />"
|
|
||||||
"%s",
|
|
||||||
Cfg_URL_ICON_PUBLIC,
|
|
||||||
Txt_Close,Txt_Close,
|
|
||||||
Txt_Close);
|
|
||||||
fprintf (Gbl.F.Out,"</a>");
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
static void Gam_PutBigButtonClose (void)
|
static void Gam_PutBigButtonClose (void)
|
||||||
{
|
{
|
||||||
|
@ -4204,13 +4131,12 @@ static void Gam_PutBigButtonClose (void)
|
||||||
/* onmousedown instead of default onclick
|
/* onmousedown instead of default onclick
|
||||||
is necessary in order to be fast
|
is necessary in order to be fast
|
||||||
and not lose clicks due to refresh */
|
and not lose clicks due to refresh */
|
||||||
fprintf (Gbl.F.Out,"<div class=\"MATCH_BUTTON_CONTAINER\">");
|
fprintf (Gbl.F.Out,"<div class=\"MATCH_BUTTON_CONTAINER\">"
|
||||||
fprintf (Gbl.F.Out,"<a href=\"\" title=\"%s\" class=\"MATCH_BUTTON ICO_HIGHLIGHT\""
|
"<a href=\"\" title=\"%s\" class=\"MATCH_BUTTON\""
|
||||||
" onmousedown=\"window.close(); return false;\"\">"
|
" onmousedown=\"window.close();"
|
||||||
"❎" // "❌" // "×" // "✕"
|
" return false;\"\">%s</a>"
|
||||||
"</a>",
|
"</div>",
|
||||||
Txt_Close);
|
Txt_Close,Gam_ICON_CLOSE);
|
||||||
fprintf (Gbl.F.Out,"</div>");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
Loading…
Reference in New Issue
Block a user