diff --git a/css/swad17.0.css b/css/swad17.0.css
index 885e6dd68..890b341c1 100644
--- a/css/swad17.0.css
+++ b/css/swad17.0.css
@@ -2258,9 +2258,9 @@ a:hover img.CENTRE_PHOTO_SHOW
.TAG_SEL {box-sizing:border-box; width:346px;}
.TAG_TXT {box-sizing:border-box; width:346px;}
.STEM {box-sizing:border-box; width:700px;}
-.ANS {color:#404040; font-size:13pt; font-weight:bold;}
-.ANS_OK {color:#008000; font-size:13pt; font-weight:bold;}
-.ANS_BAD {color:red; font-size:13pt; font-weight:bold;}
+.ANS {color:#404040; font-size:12pt;}
+.ANS_OK {color:#008000; font-size:12pt; font-weight:bold;}
+.ANS_BAD {color:red; font-size:12pt; font-weight:bold;}
.ANS_STR {box-sizing:border-box; width:600px;}
.TEST_SUBTITLE
{
@@ -2271,7 +2271,6 @@ a:hover img.CENTRE_PHOTO_SHOW
vertical-align:middle;
}
.TEST_NUM_QST {color:#808080; font-size:20pt; font-weight:bold;}
-.TEST {color:#404040; font-size:12pt;}
.TEST_EXA {color:#404040; font-size:12pt;}
.TEST_EXA_LIGHT {color:#A0A0A0; font-size:12pt;}
.TEST_EDI {color:#404040; font-size:12pt;}
diff --git a/swad_changelog.h b/swad_changelog.h
index 1f12629b9..60ea906a0 100644
--- a/swad_changelog.h
+++ b/swad_changelog.h
@@ -232,6 +232,8 @@
// TODO: Cuando sólo se cambian los grupos y no el rol de un profesor ya existente, no sale ningún mensaje. se haga lo que se haga en la edición debería salir un mensaje del tipo "Cambios realizados"
+// TODO: Debería haber un modo "ver" en las actividades, como en los documentos, para que el profesor tenga la visión del estudiante.
+
// TODO: "Solicitar inscripción" como superusuario: "Usted no tiene permiso para realizar esta acción"
// TODO: Poner icono con enlace a días festivos en calendario de centro, titulación y asignatura, además del actual calendario de institución
@@ -250,13 +252,14 @@
/****************************** Public constants *****************************/
/*****************************************************************************/
-#define Log_PLATFORM_VERSION "SWAD 17.0.3 (2017-09-14)"
+#define Log_PLATFORM_VERSION "SWAD 17.0.4 (2017-09-15)"
#define CSS_FILE "swad17.0.css"
#define JS_FILE "swad16.206.3.js"
// Number of lines (includes comments but not blank lines) has been got with the following command:
// nl swad*.c swad*.h css/swad*.css py/swad*.py js/swad*.js soap/swad*?.h sql/swad*.sql | tail -1
/*
+ Version 17.0.4: Sep 14, 2017 Show current question with answers when playing a game. (227379 lines)
Version 17.0.3: Sep 14, 2017 Action to show current question with answers when playing a game. (227350 lines)
1 change necessary in database:
INSERT INTO actions (ActCod,Language,Obsolete,Txt) VALUES ('1673','es','N','Mostrar respuestas de pregunta juego');
diff --git a/swad_game.c b/swad_game.c
index 856a1d377..e63aedb02 100644
--- a/swad_game.c
+++ b/swad_game.c
@@ -2954,7 +2954,8 @@ static void Gam_ListOneOrMoreQuestionsForEdition (struct Game *Game,
"TEST_IMG_EDIT_LIST_STEM_CONTAINER",
"TEST_IMG_EDIT_LIST_STEM");
Tst_WriteQstFeedback (row[3],"TEST_EDI_LIGHT");
- Tst_WriteAnswersGameResult (Game,NumQst,QstCod);
+ Tst_WriteAnswersGameResult (Game,NumQst,QstCod,
+ "TEST_EDI",true); // Show result
fprintf (Gbl.F.Out,""
"");
@@ -3535,12 +3536,13 @@ void Gam_PlayGameShowAnswers (void)
static void Gam_PlayGameShowQuestionAndAnswers (bool ShowAnswers)
{
- char Query[256];
+ char Query[512];
MYSQL_RES *mysql_res;
MYSQL_ROW row;
struct Game Game;
unsigned QstInd;
int NxtQstInd;
+ long QstCod;
/***** Get parameters *****/
/* Get game code */
@@ -3552,14 +3554,17 @@ static void Gam_PlayGameShowQuestionAndAnswers (bool ShowAnswers)
/***** Get data of question from database *****/
/*
- row[0] QstCod
- row[1] Stem
- row[2] ImageName
- row[3] ImageTitle
- row[4] ImageURL
+ row[0] AnsType
+ row[1] QstCod
+ row[2] Stem
+ row[3] ImageName
+ row[4] ImageTitle
+ row[5] ImageURL
*/
- sprintf (Query,"SELECT tst_questions.QstCod,"
- "tst_questions.Stem,"
+ sprintf (Query,"SELECT "
+ "tst_questions.QstCod,"
+ "tst_questions.AnsType,"
+ "tst_questions.Stem,"
"tst_questions.ImageName,"
"tst_questions.ImageTitle,"
"tst_questions.ImageURL"
@@ -3580,15 +3585,28 @@ static void Gam_PlayGameShowQuestionAndAnswers (bool ShowAnswers)
fprintf (Gbl.F.Out,"
%u
",
QstInd + 1);
- /* Write the stem (row[1]) and the image (row[2], row[3], row[4]) */
+ /* Write the stem (row[2]) and the image (row[3], row[4], row[5]) */
fprintf (Gbl.F.Out,"
");
- /* Get number of users who selected this answer and draw proportional bar */
- Gam_GetAndDrawBarNumUsrsWhoAnswered (Game,QstCod,AnsInd);
+ /***** Show result (number of users who answered? *****/
+ if (ShowResult)
+ /* Get number of users who selected this answer
+ and draw proportional bar */
+ Gam_GetAndDrawBarNumUsrsWhoAnswered (Game,QstCod,AnsInd);
+
fprintf (Gbl.F.Out,"