mirror of https://github.com/acanas/swad-core.git
Version19.41.1
This commit is contained in:
parent
8822f87c6b
commit
5fdecdbed4
|
@ -615,9 +615,10 @@ Assessment:
|
|||
465. ActResMch Resume an unfinished match showing current question in a new browser tab
|
||||
466. ActBckMch Go back when playing a match
|
||||
467. ActPlyPauMch Play/pause current match
|
||||
469. ActFwdMch Go forward when playing a match
|
||||
471. ActChgVisResMchQst Change visibility of question results when playing a match
|
||||
470. ActRefMchTch Refresh current question when playing a match (as teacher)
|
||||
468. ActFwdMch Go forward when playing a match
|
||||
469. ActChgNumColMch Change number of columns when playing a match
|
||||
470. ActChgVisResMchQst Change visibility of question results when playing a match
|
||||
471. ActRefMchTch Refresh current question when playing a match (as teacher)
|
||||
|
||||
473. ActJoiMch Show current question when playing a game (as student)
|
||||
474. ActAnsMchQstStd Answer a match question (as student)
|
||||
|
@ -2164,6 +2165,7 @@ struct Act_Actions Act_Actions[Act_NUM_ACTIONS] =
|
|||
/* ActBckMch */{1790,-1,TabUnk,ActSeeAllGam ,0x230,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_2ND_TAB,Mch_GetMatchBeingPlayed ,Mch_BackMatch ,NULL},
|
||||
/* ActPlyPauMch */{1789,-1,TabUnk,ActSeeAllGam ,0x230,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_2ND_TAB,Mch_GetMatchBeingPlayed ,Mch_PlayPauseMatch ,NULL},
|
||||
/* ActFwdMch */{1672,-1,TabUnk,ActSeeAllGam ,0x230,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_2ND_TAB,Mch_GetMatchBeingPlayed ,Mch_ForwardMatch ,NULL},
|
||||
/* ActChgNumColMch */{1802,-1,TabUnk,ActSeeAllGam ,0x230,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_2ND_TAB,Mch_GetMatchBeingPlayed ,Mch_ChangeNumColsMch ,NULL},
|
||||
/* ActChgVisResMchQst*/{1794,-1,TabUnk,ActSeeAllGam ,0x230,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_2ND_TAB,Mch_GetMatchBeingPlayed ,Mch_ToggleVisibilResultsMchQst ,NULL},
|
||||
/* ActRefMchTch */{1788,-1,TabUnk,ActSeeAllGam ,0x230,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_AJAX_RFRESH,Mch_GetMatchBeingPlayed ,Mch_RefreshMatchTch ,NULL},
|
||||
|
||||
|
@ -5030,6 +5032,7 @@ Act_Action_t Act_FromActCodToAction[1 + Act_MAX_ACTION_COD] = // Do not reuse un
|
|||
ActSeeUsrMchRes, // #1799
|
||||
ActSeeOneMchResOth, // #1800
|
||||
ActChgVisResMchUsr, // #1801
|
||||
ActChgNumColMch, // #1802
|
||||
};
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
109
swad_action.h
109
swad_action.h
|
@ -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
|
||||
|
||||
#define Act_NUM_ACTIONS (1 + 4 + 64 + 38 + 12 + 42 + 36 + 19 + 110 + 176 + 437 + 176 + 169 + 16 + 68)
|
||||
#define Act_NUM_ACTIONS (1 + 4 + 64 + 38 + 12 + 42 + 36 + 19 + 110 + 177 + 437 + 176 + 169 + 16 + 68)
|
||||
|
||||
#define Act_MAX_ACTION_COD 1801
|
||||
#define Act_MAX_ACTION_COD 1802
|
||||
|
||||
#define Act_MAX_OPTIONS_IN_MENU_PER_TAB 13
|
||||
|
||||
|
@ -615,64 +615,65 @@ typedef signed int Act_Action_t; // Must be a signed type, because -1 is used to
|
|||
#define ActBckMch (ActChgCrsTT1stDay + 122)
|
||||
#define ActPlyPauMch (ActChgCrsTT1stDay + 123)
|
||||
#define ActFwdMch (ActChgCrsTT1stDay + 124)
|
||||
#define ActChgVisResMchQst (ActChgCrsTT1stDay + 125)
|
||||
#define ActRefMchTch (ActChgCrsTT1stDay + 126)
|
||||
#define ActChgNumColMch (ActChgCrsTT1stDay + 125)
|
||||
#define ActChgVisResMchQst (ActChgCrsTT1stDay + 126)
|
||||
#define ActRefMchTch (ActChgCrsTT1stDay + 127)
|
||||
|
||||
#define ActJoiMch (ActChgCrsTT1stDay + 127)
|
||||
#define ActAnsMchQstStd (ActChgCrsTT1stDay + 128)
|
||||
#define ActRefMchStd (ActChgCrsTT1stDay + 129)
|
||||
#define ActJoiMch (ActChgCrsTT1stDay + 128)
|
||||
#define ActAnsMchQstStd (ActChgCrsTT1stDay + 129)
|
||||
#define ActRefMchStd (ActChgCrsTT1stDay + 130)
|
||||
|
||||
#define ActReqSeeMyMchRes (ActChgCrsTT1stDay + 130)
|
||||
#define ActSeeMyMchRes (ActChgCrsTT1stDay + 131)
|
||||
#define ActSeeOneMchResMe (ActChgCrsTT1stDay + 132)
|
||||
#define ActReqSeeMyMchRes (ActChgCrsTT1stDay + 131)
|
||||
#define ActSeeMyMchRes (ActChgCrsTT1stDay + 132)
|
||||
#define ActSeeOneMchResMe (ActChgCrsTT1stDay + 133)
|
||||
|
||||
#define ActReqSeeUsrMchRes (ActChgCrsTT1stDay + 133)
|
||||
#define ActSeeUsrMchRes (ActChgCrsTT1stDay + 134)
|
||||
#define ActSeeOneMchResOth (ActChgCrsTT1stDay + 135)
|
||||
#define ActChgVisResMchUsr (ActChgCrsTT1stDay + 136)
|
||||
#define ActReqSeeUsrMchRes (ActChgCrsTT1stDay + 134)
|
||||
#define ActSeeUsrMchRes (ActChgCrsTT1stDay + 135)
|
||||
#define ActSeeOneMchResOth (ActChgCrsTT1stDay + 136)
|
||||
#define ActChgVisResMchUsr (ActChgCrsTT1stDay + 137)
|
||||
|
||||
#define ActFrmNewGam (ActChgCrsTT1stDay + 137)
|
||||
#define ActEdiOneGam (ActChgCrsTT1stDay + 138)
|
||||
#define ActNewGam (ActChgCrsTT1stDay + 139)
|
||||
#define ActChgGam (ActChgCrsTT1stDay + 140)
|
||||
#define ActReqRemGam (ActChgCrsTT1stDay + 141)
|
||||
#define ActRemGam (ActChgCrsTT1stDay + 142)
|
||||
#define ActHidGam (ActChgCrsTT1stDay + 143)
|
||||
#define ActShoGam (ActChgCrsTT1stDay + 144)
|
||||
#define ActAddOneGamQst (ActChgCrsTT1stDay + 145)
|
||||
#define ActGamLstTstQst (ActChgCrsTT1stDay + 146)
|
||||
#define ActAddTstQstToGam (ActChgCrsTT1stDay + 147)
|
||||
#define ActReqRemGamQst (ActChgCrsTT1stDay + 148)
|
||||
#define ActRemGamQst (ActChgCrsTT1stDay + 149)
|
||||
#define ActUp_GamQst (ActChgCrsTT1stDay + 150)
|
||||
#define ActDwnGamQst (ActChgCrsTT1stDay + 151)
|
||||
#define ActFrmNewGam (ActChgCrsTT1stDay + 138)
|
||||
#define ActEdiOneGam (ActChgCrsTT1stDay + 139)
|
||||
#define ActNewGam (ActChgCrsTT1stDay + 140)
|
||||
#define ActChgGam (ActChgCrsTT1stDay + 141)
|
||||
#define ActReqRemGam (ActChgCrsTT1stDay + 142)
|
||||
#define ActRemGam (ActChgCrsTT1stDay + 143)
|
||||
#define ActHidGam (ActChgCrsTT1stDay + 144)
|
||||
#define ActShoGam (ActChgCrsTT1stDay + 145)
|
||||
#define ActAddOneGamQst (ActChgCrsTT1stDay + 146)
|
||||
#define ActGamLstTstQst (ActChgCrsTT1stDay + 147)
|
||||
#define ActAddTstQstToGam (ActChgCrsTT1stDay + 148)
|
||||
#define ActReqRemGamQst (ActChgCrsTT1stDay + 149)
|
||||
#define ActRemGamQst (ActChgCrsTT1stDay + 150)
|
||||
#define ActUp_GamQst (ActChgCrsTT1stDay + 151)
|
||||
#define ActDwnGamQst (ActChgCrsTT1stDay + 152)
|
||||
|
||||
#define ActSeeSvy (ActChgCrsTT1stDay + 152)
|
||||
#define ActAnsSvy (ActChgCrsTT1stDay + 153)
|
||||
#define ActFrmNewSvy (ActChgCrsTT1stDay + 154)
|
||||
#define ActEdiOneSvy (ActChgCrsTT1stDay + 155)
|
||||
#define ActNewSvy (ActChgCrsTT1stDay + 156)
|
||||
#define ActChgSvy (ActChgCrsTT1stDay + 157)
|
||||
#define ActReqRemSvy (ActChgCrsTT1stDay + 158)
|
||||
#define ActRemSvy (ActChgCrsTT1stDay + 159)
|
||||
#define ActReqRstSvy (ActChgCrsTT1stDay + 160)
|
||||
#define ActRstSvy (ActChgCrsTT1stDay + 161)
|
||||
#define ActHidSvy (ActChgCrsTT1stDay + 162)
|
||||
#define ActShoSvy (ActChgCrsTT1stDay + 163)
|
||||
#define ActEdiOneSvyQst (ActChgCrsTT1stDay + 164)
|
||||
#define ActRcvSvyQst (ActChgCrsTT1stDay + 165)
|
||||
#define ActReqRemSvyQst (ActChgCrsTT1stDay + 166)
|
||||
#define ActRemSvyQst (ActChgCrsTT1stDay + 167)
|
||||
#define ActSeeSvy (ActChgCrsTT1stDay + 153)
|
||||
#define ActAnsSvy (ActChgCrsTT1stDay + 154)
|
||||
#define ActFrmNewSvy (ActChgCrsTT1stDay + 155)
|
||||
#define ActEdiOneSvy (ActChgCrsTT1stDay + 156)
|
||||
#define ActNewSvy (ActChgCrsTT1stDay + 157)
|
||||
#define ActChgSvy (ActChgCrsTT1stDay + 158)
|
||||
#define ActReqRemSvy (ActChgCrsTT1stDay + 159)
|
||||
#define ActRemSvy (ActChgCrsTT1stDay + 160)
|
||||
#define ActReqRstSvy (ActChgCrsTT1stDay + 161)
|
||||
#define ActRstSvy (ActChgCrsTT1stDay + 162)
|
||||
#define ActHidSvy (ActChgCrsTT1stDay + 163)
|
||||
#define ActShoSvy (ActChgCrsTT1stDay + 164)
|
||||
#define ActEdiOneSvyQst (ActChgCrsTT1stDay + 165)
|
||||
#define ActRcvSvyQst (ActChgCrsTT1stDay + 166)
|
||||
#define ActReqRemSvyQst (ActChgCrsTT1stDay + 167)
|
||||
#define ActRemSvyQst (ActChgCrsTT1stDay + 168)
|
||||
|
||||
#define ActSeeOneExaAnn (ActChgCrsTT1stDay + 168)
|
||||
#define ActSeeDatExaAnn (ActChgCrsTT1stDay + 169)
|
||||
#define ActEdiExaAnn (ActChgCrsTT1stDay + 170)
|
||||
#define ActRcvExaAnn (ActChgCrsTT1stDay + 171)
|
||||
#define ActPrnExaAnn (ActChgCrsTT1stDay + 172)
|
||||
#define ActReqRemExaAnn (ActChgCrsTT1stDay + 173)
|
||||
#define ActRemExaAnn (ActChgCrsTT1stDay + 174)
|
||||
#define ActHidExaAnn (ActChgCrsTT1stDay + 175)
|
||||
#define ActShoExaAnn (ActChgCrsTT1stDay + 176)
|
||||
#define ActSeeOneExaAnn (ActChgCrsTT1stDay + 169)
|
||||
#define ActSeeDatExaAnn (ActChgCrsTT1stDay + 170)
|
||||
#define ActEdiExaAnn (ActChgCrsTT1stDay + 171)
|
||||
#define ActRcvExaAnn (ActChgCrsTT1stDay + 172)
|
||||
#define ActPrnExaAnn (ActChgCrsTT1stDay + 173)
|
||||
#define ActReqRemExaAnn (ActChgCrsTT1stDay + 174)
|
||||
#define ActRemExaAnn (ActChgCrsTT1stDay + 175)
|
||||
#define ActHidExaAnn (ActChgCrsTT1stDay + 176)
|
||||
#define ActShoExaAnn (ActChgCrsTT1stDay + 177)
|
||||
|
||||
/*****************************************************************************/
|
||||
/******************************** Files tab **********************************/
|
||||
|
|
|
@ -495,6 +495,10 @@ ps2pdf source.ps destination.pdf
|
|||
// TODO: Hacer un nuevo rol en los TFG: tutor externo (profesor de áreas no vinculadas con el centro, profesionales de empresas, etc.)
|
||||
// TODO: Change icon to upload file in timeline to photo-video.svg
|
||||
|
||||
Version 19.41.1: Oct 22, 2019 Change number of columns from form. (245944 lines)
|
||||
1 change necessary in database:
|
||||
INSERT INTO actions (ActCod,Language,Obsolete,Txt) VALUES ('1802','es','N','Cambiar número de columnas en partida');
|
||||
|
||||
Version 19.41: Oct 22, 2019 Number of columns in match is stored in database. (245930 lines)
|
||||
1 change necessary in database:
|
||||
ALTER TABLE mch_matches ADD COLUMN NumCols INT NOT NULL DEFAULT 1 AFTER Showing;
|
||||
|
|
|
@ -705,6 +705,7 @@ static void Lay_WriteScriptInit (void)
|
|||
case ActBckMch:
|
||||
case ActPlyPauMch:
|
||||
case ActFwdMch:
|
||||
case ActChgNumColMch:
|
||||
case ActChgVisResMchQst:
|
||||
RefreshMatchTch = true;
|
||||
break;
|
||||
|
@ -841,6 +842,7 @@ static void Lay_WriteScriptParamsAJAX (void)
|
|||
case ActBckMch:
|
||||
case ActPlyPauMch:
|
||||
case ActFwdMch:
|
||||
case ActChgNumColMch:
|
||||
case ActChgVisResMchQst:
|
||||
// Handle keys in keyboard/presenter
|
||||
fprintf (Gbl.F.Out,"document.addEventListener(\"keydown\",handleMatchKeys);\n");
|
||||
|
|
82
swad_match.c
82
swad_match.c
|
@ -160,7 +160,8 @@ static void Mch_ShowRightColumnStd (struct Match *Match);
|
|||
static void Mch_ShowNumQstInMatch (struct Match *Match);
|
||||
static void Mch_PutMatchControlButtons (struct Match *Match);
|
||||
static void Mch_ShowFormColumns (struct Match *Match);
|
||||
// static void Mch_PutCheckboxResult (struct Match *Match);
|
||||
static void Mch_PutParamNumCols (unsigned NumCols);
|
||||
|
||||
static void Mch_ShowMatchTitle (struct Match *Match);
|
||||
static void Mch_ShowFormViewResult (struct Match *Match);
|
||||
static void Mch_ShowQuestionAndAnswersTch (struct Match *Match);
|
||||
|
@ -1782,6 +1783,39 @@ void Mch_PlayPauseMatch (void)
|
|||
fprintf (Gbl.F.Out,"</div>");
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/******* Change number of columns in answers of a match (by a teacher) *******/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Mch_ChangeNumColsMch (void)
|
||||
{
|
||||
struct Match Match;
|
||||
|
||||
/***** Remove old players.
|
||||
This function must be called by a teacher
|
||||
before getting match status. *****/
|
||||
Mch_RemoveOldPlayers ();
|
||||
|
||||
/***** Get data of the match from database *****/
|
||||
Match.MchCod = Gbl.Games.MchCodBeingPlayed;
|
||||
Mch_GetDataOfMatchByCod (&Match);
|
||||
|
||||
/***** Get number of columns *****/
|
||||
Match.Status.NumCols = (unsigned)
|
||||
Par_GetParToUnsignedLong ("NumCols",
|
||||
1,
|
||||
Mch_MAX_COLS,
|
||||
Mch_NUM_COLS_DEFAULT);
|
||||
|
||||
/***** Update match status in database *****/
|
||||
Mch_UpdateMatchStatusInDB (&Match);
|
||||
|
||||
/***** Show current match status *****/
|
||||
fprintf (Gbl.F.Out,"<div id=\"match\" class=\"MCH_CONT\">");
|
||||
Mch_ShowMatchStatusForTch (&Match);
|
||||
fprintf (Gbl.F.Out,"</div>");
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/********* Toggle the display of results in a match (by a teacher) ***********/
|
||||
/*****************************************************************************/
|
||||
|
@ -2336,8 +2370,9 @@ static void Mch_ShowFormColumns (struct Match *Match)
|
|||
(Match->Status.NumCols == NumCols) ? "PREF_ON" :
|
||||
"PREF_OFF");
|
||||
/***** Begin form *****/
|
||||
Frm_StartForm (ActChgVisResMchQst);
|
||||
Frm_StartForm (ActChgNumColMch);
|
||||
Mch_PutParamMchCod (Match->MchCod); // Current match being played
|
||||
Mch_PutParamNumCols (NumCols); // Number of columns
|
||||
|
||||
snprintf (Gbl.Title,sizeof (Gbl.Title),
|
||||
"%u %s",
|
||||
|
@ -2356,43 +2391,18 @@ static void Mch_ShowFormColumns (struct Match *Match)
|
|||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/***************** Put checkbox to select if show results ********************/
|
||||
/******** Write parameter with number of columns in answers of match *********/
|
||||
/*****************************************************************************/
|
||||
/*
|
||||
static void Mch_PutCheckboxResult (struct Match *Match)
|
||||
|
||||
static void Mch_PutParamNumCols (unsigned NumCols) // Number of columns
|
||||
{
|
||||
extern const char *Txt_View_results;
|
||||
|
||||
***** Start container *****
|
||||
fprintf (Gbl.F.Out,"<div class=\"MCH_SHOW_RESULTS\">");
|
||||
|
||||
***** Begin form *****
|
||||
Frm_StartForm (ActChgVisResMchQst);
|
||||
Mch_PutParamMchCod (Match->MchCod); // Current match being played
|
||||
|
||||
***** Put icon with link *****
|
||||
fprintf (Gbl.F.Out,"<div class=\"CONTEXT_OPT\">"
|
||||
"<a href=\"\" class=\"ICO_HIGHLIGHT\""
|
||||
" title=\"%s\" "
|
||||
" onclick=\"document.getElementById('%s').submit();"
|
||||
" return false;\">"
|
||||
"<i class=\"%s\"></i>"
|
||||
" %s"
|
||||
"</a>"
|
||||
"</div>",
|
||||
Txt_View_results,
|
||||
Gbl.Form.Id,
|
||||
Match->Status.ShowQstResults ? "fas fa-toggle-on" :
|
||||
"fas fa-toggle-off",
|
||||
Txt_View_results);
|
||||
|
||||
***** End form *****
|
||||
Frm_EndForm ();
|
||||
|
||||
***** End container *****
|
||||
fprintf (Gbl.F.Out,"</div>");
|
||||
Par_PutHiddenParamUnsigned ("NumCols",NumCols);
|
||||
}
|
||||
*/
|
||||
|
||||
/*****************************************************************************/
|
||||
/******************* Put form to select if show results **********************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void Mch_ShowFormViewResult (struct Match *Match)
|
||||
{
|
||||
extern const char *Txt_View_results;
|
||||
|
|
|
@ -103,6 +103,7 @@ void Mch_RemoveGroup (long GrpCod);
|
|||
void Mch_RemoveGroupsOfType (long GrpTypCod);
|
||||
|
||||
void Mch_PlayPauseMatch (void);
|
||||
void Mch_ChangeNumColsMch (void);
|
||||
void Mch_ToggleVisibilResultsMchQst (void);
|
||||
void Mch_BackMatch (void);
|
||||
void Mch_ForwardMatch (void);
|
||||
|
|
Loading…
Reference in New Issue