Version19.47

This commit is contained in:
Antonio Cañas Vargas 2019-10-31 08:47:16 +01:00
parent 79a6ae8d4a
commit 399283f720
3 changed files with 52 additions and 13 deletions

View File

@ -2722,7 +2722,7 @@ a:hover img.CENTRE_PHOTO_SHOW
.MCH_SHOW_RESULTS
{
text-align:center;
padding-bottom:16pt;
padding:16pt 0;
font-size:13pt;
}
.MCH_NUM_ANSWERERS

View File

@ -487,13 +487,14 @@ enscript -2 --landscape --color --file-align=2 --highlight --line-numbers -o - *
En OpenSWAD:
ps2pdf source.ps destination.pdf
*/
#define Log_PLATFORM_VERSION "SWAD 19.46.10 (2019-10-31)"
#define CSS_FILE "swad19.45.css"
#define Log_PLATFORM_VERSION "SWAD 19.47 (2019-10-31)"
#define CSS_FILE "swad19.47.css"
#define JS_FILE "swad19.39.js"
/*
// TODO: Hacer un nuevo rol en los TFG: tutor externo (profesor de áreas no vinculadas con el centro, profesionales de empresas, etc.)
// TODO: Impedir la creación y edición de proyectos si no son editables.
Version 19.47: Oct 31, 2019 Return to old way to activate showing of results in match question. (246230 lines)
Version 19.46.10: Oct 31, 2019 Code refactoring in HTML images. (246196 lines)
Version 19.46.9: Oct 30, 2019 Code refactoring in HTML images. (246241 lines)
Version 19.46.8: Oct 30, 2019 Code refactoring in HTML images. (246244 lines)

View File

@ -163,7 +163,8 @@ static void Mch_ShowFormColumns (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_ShowFormViewResult (struct Match *Match);
static void Mch_PutCheckboxResult (struct Match *Match);
static void Mch_ShowQuestionAndAnswersTch (struct Match *Match);
static void Mch_WriteAnswersMatchResult (struct Match *Match,
const char *Class,bool ShowResult);
@ -2120,11 +2121,11 @@ static void Mch_ShowLeftColumnTch (struct Match *Match)
/* 1st. row */
Set_StartSettingsHead ();
Mch_ShowFormColumns (Match);
Mch_ShowFormViewResult (Match);
// Mch_ShowFormViewResult (Match);
Set_EndSettingsHead ();
/***** Write button to request viewing results *****/
// Mch_PutCheckboxResult (Match);
Mch_PutCheckboxResult (Match);
/***** End left container *****/
HTM_DIV_End ();
@ -2406,28 +2407,66 @@ static void Mch_PutParamNumCols (unsigned NumCols) // Number of columns
/*****************************************************************************/
/******************* Put form to select if show results **********************/
/*****************************************************************************/
/*
static void Mch_ShowFormViewResult (struct Match *Match)
{
extern const char *Txt_View_results;
/***** Begin selector *****/
***** Begin selector *****
Set_StartOneSettingSelector ();
HTM_DIV_Begin ("class=\"%s\"",(Match->Status.ShowQstResults) ? "PREF_ON" :
"PREF_OFF");
/***** Begin form *****/
***** Begin form *****
Frm_StartForm (ActChgVisResMchQst);
Mch_PutParamMchCod (Match->MchCod); // Current match being played
Ico_PutSettingIconLink ("poll-h.svg",Txt_View_results);
***** End form *****
Frm_EndForm ();
***** End selector *****
HTM_DIV_End ();
Set_EndOneSettingSelector ();
}
*/
/*****************************************************************************/
/***************** Put checkbox to select if show results ********************/
/*****************************************************************************/
static void Mch_PutCheckboxResult (struct Match *Match)
{
extern const char *Txt_View_results;
/***** Start container *****/
fprintf (Gbl.F.Out,"<div class=\"MCH_SHOW_RESULTS\">");
/***** Start 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>"
"&nbsp;%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 selector *****/
HTM_DIV_End ();
Set_EndOneSettingSelector ();
/***** End container *****/
fprintf (Gbl.F.Out,"</div>");
}
/*****************************************************************************/
@ -2449,7 +2488,6 @@ static void Mch_ShowMatchTitle (struct Match *Match)
static void Mch_ShowQuestionAndAnswersTch (struct Match *Match)
{
extern const char *Txt_MATCH_Paused;
extern const char *Txt_View_results;
MYSQL_RES *mysql_res;
MYSQL_ROW row;