mirror of
https://github.com/acanas/swad-core.git
synced 2024-05-31 22:05:23 +02:00
Version18.132.3
This commit is contained in:
parent
bcef02f59f
commit
8a7b07a3e3
|
@ -2570,7 +2570,7 @@ a:hover img.CENTRE_PHOTO_SHOW
|
|||
display:table;
|
||||
margin:5%;
|
||||
width:90%;
|
||||
text-align:center;
|
||||
/* text-align:center; */
|
||||
}
|
||||
|
||||
.GAM_PLAY_TCH_NUM_QST
|
||||
|
@ -2676,7 +2676,7 @@ a:hover img.CENTRE_PHOTO_SHOW
|
|||
}
|
||||
.GAM_PLAY_STD_ANSWER_SELECTED
|
||||
{
|
||||
box-shadow: 0px 0px 24px 12px rgba(0,180,0,1);
|
||||
box-shadow: 0px 0px 18px 12px rgba(0,128,0,1);
|
||||
}
|
||||
.GAM_PLAY_TCH_BUTTON:hover, .GAM_PLAY_STD_BUTTON:hover
|
||||
{
|
||||
|
|
|
@ -2154,7 +2154,7 @@ struct Act_Actions Act_Actions[Act_NUM_ACTIONS] =
|
|||
|
||||
/* 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_RefreshCurrentMatchStd ,NULL},
|
||||
/* ActAnsMchQstStd */{1651,-1,TabUnk,ActSeeAllGam ,0x238,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_204_NO_CONT,NULL ,Gam_ReceiveQstAnsFromStd ,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},
|
||||
|
||||
/* 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},
|
||||
|
|
|
@ -458,10 +458,12 @@ En OpenSWAD:
|
|||
ps2pdf source.ps destination.pdf
|
||||
*/
|
||||
|
||||
#define Log_PLATFORM_VERSION "SWAD 18.132.2 (2019-07-15)"
|
||||
#define Log_PLATFORM_VERSION "SWAD 18.132.3 (2019-07-15)"
|
||||
#define CSS_FILE "swad18.132.2.css"
|
||||
#define JS_FILE "swad18.130.2.js"
|
||||
/*
|
||||
TODO: Poner cronómetro o algo que se vaya actualizando para ver que va cambiando la respuesta del estudiante
|
||||
Version 18.132.3: Jul 15, 2019 Reception of student answer to a match question. (243470 lines)
|
||||
Version 18.132.2: Jul 15, 2019 Reception of student answer to a match question. Not finished. (243456 lines)
|
||||
Version 18.132.1: Jul 15, 2019 Reception of student answer to a match question. Not finished. (243405 lines)
|
||||
2 changes necessary in database:
|
||||
|
|
|
@ -1105,12 +1105,12 @@ void Con_WriteScriptClockConnected (void)
|
|||
{
|
||||
unsigned NumUsr;
|
||||
|
||||
fprintf (Gbl.F.Out," NumUsrsCon = %u;\n",
|
||||
fprintf (Gbl.F.Out,"\tNumUsrsCon = %u;\n",
|
||||
Gbl.Usrs.Connected.NumUsrsToList);
|
||||
for (NumUsr = 0;
|
||||
NumUsr < Gbl.Usrs.Connected.NumUsrsToList;
|
||||
NumUsr++)
|
||||
fprintf (Gbl.F.Out," ListSeconds[%u] = %ld;\n",
|
||||
fprintf (Gbl.F.Out,"\tListSeconds[%u] = %ld;\n",
|
||||
NumUsr,Gbl.Usrs.Connected.Lst[NumUsr].TimeDiff);
|
||||
fprintf (Gbl.F.Out," writeClockConnected();\n");
|
||||
fprintf (Gbl.F.Out,"\twriteClockConnected();\n");
|
||||
}
|
||||
|
|
|
@ -1533,7 +1533,7 @@ void Dat_WriteScriptMonths (void)
|
|||
extern const char *Txt_MONTHS_SMALL_SHORT[12];
|
||||
unsigned NumMonth;
|
||||
|
||||
fprintf (Gbl.F.Out,"var Months = [");
|
||||
fprintf (Gbl.F.Out,"\tvar Months = [");
|
||||
for (NumMonth = 0;
|
||||
NumMonth < 12;
|
||||
NumMonth++)
|
||||
|
@ -1544,7 +1544,7 @@ void Dat_WriteScriptMonths (void)
|
|||
}
|
||||
fprintf (Gbl.F.Out,"];\n");
|
||||
|
||||
fprintf (Gbl.F.Out,"var MonthsShort = [");
|
||||
fprintf (Gbl.F.Out,"\tvar MonthsShort = [");
|
||||
for (NumMonth = 0;
|
||||
NumMonth < 12;
|
||||
NumMonth++)
|
||||
|
|
14
swad_game.c
14
swad_game.c
|
@ -3805,11 +3805,8 @@ void Gam_ReceiveQstAnsFromStd (void)
|
|||
unsigned StdAnsInd;
|
||||
int PreviousStdAnsInd;
|
||||
|
||||
/***** Get match code *****/
|
||||
if ((Match.MchCod = Gam_GetParamMatchCod ()) == -1L)
|
||||
Lay_ShowErrorAndExit ("Code of match is missing.");
|
||||
|
||||
/***** Get data of the match from database *****/
|
||||
Match.MchCod = Gbl.Games.MchCodBeingPlayed;
|
||||
Gam_GetDataOfMatchByCod (&Match);
|
||||
|
||||
/***** Get question index from form *****/
|
||||
|
@ -3849,6 +3846,15 @@ void Gam_ReceiveQstAnsFromStd (void)
|
|||
" (%ld,%ld,%u,%u)",
|
||||
Match.MchCod,Gbl.Usrs.Me.UsrDat.UsrCod,QstInd,StdAnsInd);
|
||||
}
|
||||
|
||||
/***** Start container for match status *****/
|
||||
fprintf (Gbl.F.Out,"<div id=\"game\" class=\"GAM_PLAY_CONTAINER\">");
|
||||
|
||||
/***** Show current question *****/
|
||||
Gam_ShowMatchStatusForStd (&Match);
|
||||
|
||||
/***** End container for match status *****/
|
||||
fprintf (Gbl.F.Out,"</div>");
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
|
@ -268,6 +268,7 @@ void Lay_WriteStartOfPage (void)
|
|||
Cfg_URL_ICON_PUBLIC);
|
||||
break;
|
||||
case Act_BRW_NEW_TAB:
|
||||
case Act_BRW_2ND_TAB:
|
||||
fprintf (Gbl.F.Out,"<body onload=\"init();\">\n");
|
||||
Gbl.Layout.WritingHTMLStart = false;
|
||||
Gbl.Layout.HTMLStartWritten =
|
||||
|
@ -662,10 +663,14 @@ static void Lay_WriteScriptMathJax (void)
|
|||
static void Lay_WriteScriptInit (void)
|
||||
{
|
||||
extern const char *Lan_STR_LANG_ID[1 + Lan_NUM_LANGUAGES];
|
||||
bool RefreshConnected;
|
||||
bool RefreshNewTimeline = false;
|
||||
bool RefreshGame = false;
|
||||
bool RefreshLastClicks = false;
|
||||
|
||||
RefreshConnected = Act_GetBrowserTab (Gbl.Action.Act) == Act_BRW_1ST_TAB &&
|
||||
(Gbl.Prefs.SideCols & Lay_SHOW_RIGHT_COLUMN); // Right column visible
|
||||
|
||||
switch (Gbl.Action.Act)
|
||||
{
|
||||
case ActSeeSocTmlGbl:
|
||||
|
@ -678,6 +683,7 @@ static void Lay_WriteScriptInit (void)
|
|||
RefreshNewTimeline = true;
|
||||
break;
|
||||
case ActPlyMchStd:
|
||||
case ActAnsMchQstStd:
|
||||
RefreshGame = true;
|
||||
break;
|
||||
case ActLstClk:
|
||||
|
@ -692,29 +698,31 @@ static void Lay_WriteScriptInit (void)
|
|||
Dat_WriteScriptMonths ();
|
||||
|
||||
if (RefreshNewTimeline)
|
||||
fprintf (Gbl.F.Out,"var delayNewTimeline = %lu;\n",
|
||||
fprintf (Gbl.F.Out,"\tvar delayNewTimeline = %lu;\n",
|
||||
Cfg_TIME_TO_REFRESH_TIMELINE);
|
||||
else if (RefreshGame) // Refresh game via AJAX
|
||||
fprintf (Gbl.F.Out,"var delayGame = %lu;\n",
|
||||
fprintf (Gbl.F.Out,"\tvar delayGame = %lu;\n",
|
||||
Cfg_TIME_TO_REFRESH_GAME);
|
||||
|
||||
fprintf (Gbl.F.Out,"function init(){\n");
|
||||
|
||||
if ((Gbl.Prefs.SideCols & Lay_SHOW_RIGHT_COLUMN)) // Right column visible
|
||||
Con_WriteScriptClockConnected ();
|
||||
fprintf (Gbl.F.Out,"\tActionAJAX = \"%s\";\n",
|
||||
Lan_STR_LANG_ID[Gbl.Prefs.Language]);
|
||||
|
||||
fprintf (Gbl.F.Out," ActionAJAX = \"%s\";\n"
|
||||
" setTimeout(\"refreshConnected()\",%lu);\n",
|
||||
Lan_STR_LANG_ID[Gbl.Prefs.Language],
|
||||
if (RefreshConnected) // Refresh connected users via AJAX
|
||||
{
|
||||
Con_WriteScriptClockConnected ();
|
||||
fprintf (Gbl.F.Out,"\tsetTimeout(\"refreshConnected()\",%lu);\n",
|
||||
Gbl.Usrs.Connected.TimeToRefreshInMs);
|
||||
}
|
||||
|
||||
if (RefreshLastClicks) // Refresh last clicks via AJAX
|
||||
fprintf (Gbl.F.Out," setTimeout(\"refreshLastClicks()\",%lu);\n",
|
||||
fprintf (Gbl.F.Out,"\tsetTimeout(\"refreshLastClicks()\",%lu);\n",
|
||||
Cfg_TIME_TO_REFRESH_LAST_CLICKS);
|
||||
else if (RefreshGame) // Refresh game via AJAX
|
||||
fprintf (Gbl.F.Out," setTimeout(\"refreshGame()\",delayGame);\n");
|
||||
fprintf (Gbl.F.Out,"\tsetTimeout(\"refreshGame()\",delayGame);\n");
|
||||
else if (RefreshNewTimeline) // Refresh timeline via AJAX
|
||||
fprintf (Gbl.F.Out," setTimeout(\"refreshNewTimeline()\",delayNewTimeline);\n");
|
||||
fprintf (Gbl.F.Out,"\tsetTimeout(\"refreshNewTimeline()\",delayNewTimeline);\n");
|
||||
|
||||
fprintf (Gbl.F.Out,"}\n"
|
||||
"</script>\n");
|
||||
|
@ -791,6 +799,7 @@ static void Lay_WriteScriptParamsAJAX (void)
|
|||
break;
|
||||
/* Parameters related with game refreshing */
|
||||
case ActPlyMchStd:
|
||||
case ActAnsMchQstStd:
|
||||
fprintf (Gbl.F.Out,"var RefreshParamNxtActGam = \"act=%ld\";\n"
|
||||
"var RefreshParamMchCod = \"MchCod=%ld\";\n",
|
||||
Act_GetActCod (ActRefMchStd),
|
||||
|
|
Loading…
Reference in New Issue
Block a user