mirror of https://github.com/acanas/swad-core.git
Version19.128
This commit is contained in:
parent
37f343a10c
commit
8c6952869e
|
@ -497,7 +497,7 @@ enscript -2 --landscape --color --file-align=2 --highlight --line-numbers -o - *
|
||||||
En OpenSWAD:
|
En OpenSWAD:
|
||||||
ps2pdf source.ps destination.pdf
|
ps2pdf source.ps destination.pdf
|
||||||
*/
|
*/
|
||||||
#define Log_PLATFORM_VERSION "SWAD 19.127.1 (2020-02-19)"
|
#define Log_PLATFORM_VERSION "SWAD 19.128 (2020-02-19)"
|
||||||
#define CSS_FILE "swad19.118.css"
|
#define CSS_FILE "swad19.118.css"
|
||||||
#define JS_FILE "swad19.91.1.js"
|
#define JS_FILE "swad19.91.1.js"
|
||||||
/*
|
/*
|
||||||
|
@ -523,6 +523,19 @@ Param
|
||||||
// TODO: Sugerencia de Jesús González Peñalver: añadir un poco más de espacio entre pregunta y pregunta en las opciones de un juego
|
// TODO: Sugerencia de Jesús González Peñalver: añadir un poco más de espacio entre pregunta y pregunta en las opciones de un juego
|
||||||
// TODO: Remove Txt_Result
|
// TODO: Remove Txt_Result
|
||||||
|
|
||||||
|
Version 19.128: Feb 18, 2020 Changes in match results. (279175 lines)
|
||||||
|
Copy the following icons to icon public directory:
|
||||||
|
sudo cp -a icon/file-regular-red.svg /var/www/html/swad/icon/
|
||||||
|
sudo cp -a icon/file-alt-regular-green.svg /var/www/html/swad/icon/
|
||||||
|
sudo cp -a icon/file-regular-red.svg /var/www/html/swad/icon/
|
||||||
|
sudo cp -a icon/file-alt-regular-green.svg /var/www/html/swad/icon/
|
||||||
|
sudo cp -a icon/spell-red.svg /var/www/html/swad/icon/
|
||||||
|
sudo cp -a icon/spell-check-green.svg /var/www/html/swad/icon/
|
||||||
|
sudo cp -a icon/list-ul-red.svg /var/www/html/swad/icon/
|
||||||
|
sudo cp -a icon/tasks-green.svg /var/www/html/swad/icon/
|
||||||
|
sudo cp -a icon/circle-regular-red.svg /var/www/html/swad/icon/
|
||||||
|
sudo cp -a icon/check-circle-regular-green.svg /var/www/html/swad/icon/
|
||||||
|
|
||||||
Version 19.127.1: Feb 18, 2020 Changes in match results.
|
Version 19.127.1: Feb 18, 2020 Changes in match results.
|
||||||
Changes in icon. (279116 lines)
|
Changes in icon. (279116 lines)
|
||||||
Copy the following icons to icon public directory:
|
Copy the following icons to icon public directory:
|
||||||
|
|
|
@ -523,13 +523,15 @@ static void Gam_ShowOneGame (struct Game *Game,bool ShowOnlyThisGame)
|
||||||
HTM_BR ();
|
HTM_BR ();
|
||||||
HTM_TxtColonNBSP (Txt_Maximum_grade);
|
HTM_TxtColonNBSP (Txt_Maximum_grade);
|
||||||
HTM_Double (Game->MaxGrade);
|
HTM_Double (Game->MaxGrade);
|
||||||
|
HTM_BR ();
|
||||||
|
HTM_TxtColonNBSP (Txt_Result_visibility);
|
||||||
if (ShowOnlyThisGame)
|
if (ShowOnlyThisGame)
|
||||||
{
|
{
|
||||||
HTM_BR ();
|
HTM_BR ();
|
||||||
HTM_TxtColonNBSP (Txt_Result_visibility);
|
TsV_ShowVisibilityIconsAndTxt (Game->Visibility);
|
||||||
HTM_BR ();
|
|
||||||
TsV_ShowVisibility (Game->Visibility);
|
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
TsV_ShowVisibilityIcons (Game->Visibility);
|
||||||
HTM_DIV_End ();
|
HTM_DIV_End ();
|
||||||
|
|
||||||
/***** Number of matches in game *****/
|
/***** Number of matches in game *****/
|
||||||
|
|
|
@ -25,6 +25,9 @@
|
||||||
/*********************************** Headers *********************************/
|
/*********************************** Headers *********************************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
#define _GNU_SOURCE // For asprintf
|
||||||
|
#include <stdio.h> // For asprintf
|
||||||
|
|
||||||
#include "swad_HTML.h"
|
#include "swad_HTML.h"
|
||||||
#include "swad_parameter.h"
|
#include "swad_parameter.h"
|
||||||
#include "swad_test_visibility.h"
|
#include "swad_test_visibility.h"
|
||||||
|
@ -51,15 +54,64 @@ extern struct Globals Gbl;
|
||||||
/************************* Private global variables **************************/
|
/************************* Private global variables **************************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
static const char *TsV_Icons[TsV_NUM_ITEMS_VISIBILITY][2] =
|
||||||
|
{
|
||||||
|
[TsV_VISIBLE_QST_ANS_TXT ][0] = "file-regular-red.svg",
|
||||||
|
[TsV_VISIBLE_QST_ANS_TXT ][1] = "file-alt-regular-green.svg",
|
||||||
|
|
||||||
|
[TsV_VISIBLE_FEEDBACK_TXT ][0] = "file-regular-red.svg",
|
||||||
|
[TsV_VISIBLE_FEEDBACK_TXT ][1] = "file-alt-regular-green.svg",
|
||||||
|
|
||||||
|
[TsV_VISIBLE_CORRECT_ANSWER][0] = "spell-red.svg",
|
||||||
|
[TsV_VISIBLE_CORRECT_ANSWER][1] = "spell-check-green.svg",
|
||||||
|
|
||||||
|
[TsV_VISIBLE_EACH_QST_SCORE][0] = "list-ul-red.svg",
|
||||||
|
[TsV_VISIBLE_EACH_QST_SCORE][1] = "tasks-green.svg",
|
||||||
|
|
||||||
|
[TsV_VISIBLE_TOTAL_SCORE ][0] = "circle-regular-red.svg",
|
||||||
|
[TsV_VISIBLE_TOTAL_SCORE ][1] = "check-circle-regular-green.svg",
|
||||||
|
};
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/***************************** Private prototypes ****************************/
|
/***************************** Private prototypes ****************************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/************ Put checkboxes in form to select result visibility *************/
|
/******************************* Show visibility *****************************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
void TsV_ShowVisibility (unsigned SelectedVisibility)
|
void TsV_ShowVisibilityIcons (unsigned SelectedVisibility)
|
||||||
|
{
|
||||||
|
extern const char *Txt_Visible;
|
||||||
|
extern const char *Txt_Hidden;
|
||||||
|
extern const char *Txt_TST_STR_VISIBILITY[TsV_NUM_ITEMS_VISIBILITY];
|
||||||
|
TsV_Visibility_t Visibility;
|
||||||
|
bool ItemVisible;
|
||||||
|
char *Title;
|
||||||
|
|
||||||
|
for (Visibility = (TsV_Visibility_t) 0;
|
||||||
|
Visibility <= (TsV_Visibility_t) (TsV_NUM_ITEMS_VISIBILITY - 1);
|
||||||
|
Visibility++)
|
||||||
|
{
|
||||||
|
ItemVisible = (SelectedVisibility & (1 << Visibility)) != 0;
|
||||||
|
if (asprintf (&Title,"%s: %s",
|
||||||
|
Txt_TST_STR_VISIBILITY[Visibility],
|
||||||
|
ItemVisible ? Txt_Visible :
|
||||||
|
Txt_Hidden) < 0)
|
||||||
|
Lay_NotEnoughMemoryExit ();
|
||||||
|
Ico_PutIcon (ItemVisible ? TsV_Icons[Visibility][1] :
|
||||||
|
TsV_Icons[Visibility][0],
|
||||||
|
Title,
|
||||||
|
"CONTEXT_OPT CONTEXT_ICO_16x16");
|
||||||
|
free (Title);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
/*********************** Show visibility with text ***************************/
|
||||||
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
void TsV_ShowVisibilityIconsAndTxt (unsigned SelectedVisibility)
|
||||||
{
|
{
|
||||||
extern const char *Txt_Visible;
|
extern const char *Txt_Visible;
|
||||||
extern const char *Txt_Hidden;
|
extern const char *Txt_Hidden;
|
||||||
|
@ -73,11 +125,12 @@ void TsV_ShowVisibility (unsigned SelectedVisibility)
|
||||||
{
|
{
|
||||||
ItemVisible = (SelectedVisibility & (1 << Visibility)) != 0;
|
ItemVisible = (SelectedVisibility & (1 << Visibility)) != 0;
|
||||||
HTM_LABEL_Begin ("class=\"%s\"",ItemVisible ? "DAT_SMALL_GREEN" :
|
HTM_LABEL_Begin ("class=\"%s\"",ItemVisible ? "DAT_SMALL_GREEN" :
|
||||||
"DAT_SMALL_RED");
|
"DAT_SMALL_RED");
|
||||||
Ico_PutIconOff (ItemVisible ? "eye-green.svg" :
|
Ico_PutIcon (ItemVisible ? "eye-green.svg" :
|
||||||
"eye-slash-red.svg",
|
"eye-slash-red.svg",
|
||||||
ItemVisible ? Txt_Visible :
|
ItemVisible ? Txt_Visible :
|
||||||
Txt_Hidden);
|
Txt_Hidden,
|
||||||
|
"CONTEXT_OPT CONTEXT_ICO_16x16");
|
||||||
HTM_Txt (Txt_TST_STR_VISIBILITY[Visibility]);
|
HTM_Txt (Txt_TST_STR_VISIBILITY[Visibility]);
|
||||||
HTM_LABEL_End ();
|
HTM_LABEL_End ();
|
||||||
HTM_BR ();
|
HTM_BR ();
|
||||||
|
|
|
@ -54,7 +54,8 @@ typedef enum
|
||||||
/***************************** Public prototypes *****************************/
|
/***************************** Public prototypes *****************************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
void TsV_ShowVisibility (unsigned SelectedVisibility);
|
void TsV_ShowVisibilityIcons (unsigned SelectedVisibility);
|
||||||
|
void TsV_ShowVisibilityIconsAndTxt (unsigned SelectedVisibility);
|
||||||
void TsV_PutVisibilityCheckboxes (unsigned SelectedVisibility);
|
void TsV_PutVisibilityCheckboxes (unsigned SelectedVisibility);
|
||||||
unsigned TsV_GetVisibilityFromForm (void);
|
unsigned TsV_GetVisibilityFromForm (void);
|
||||||
unsigned TsV_GetVisibilityFromStr (const char *Str);
|
unsigned TsV_GetVisibilityFromStr (const char *Str);
|
||||||
|
|
Loading…
Reference in New Issue