From ec4b166e32dcbeaf5341fb2bba0402118ce9a892 Mon Sep 17 00:00:00 2001 From: acanas Date: Sun, 27 Sep 2020 17:38:51 +0200 Subject: [PATCH] Version20.2.1 --- swad_changelog.h | 3 ++- swad_config.h | 4 ++-- swad_exam_print.c | 12 +++++++----- 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/swad_changelog.h b/swad_changelog.h index 0f716614a..49bc23100 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -555,7 +555,7 @@ enscript -2 --landscape --color --file-align=2 --highlight --line-numbers -o - * En OpenSWAD: ps2pdf source.ps destination.pdf */ -#define Log_PLATFORM_VERSION "SWAD 20.2 (2020-09-26)" +#define Log_PLATFORM_VERSION "SWAD 20.2.1 (2020-09-27)" #define CSS_FILE "swad20.1.1.css" #define JS_FILE "swad19.254.js" /* @@ -573,6 +573,7 @@ TODO: Que al generar un examen s TODO: Create module swad_test_result "sudo apt install webp" en Ubuntu, y "yum install libwebp libwebp-tools" en CentOS, para decodificar imágenes Web/ug reportado por Javier Fernández Baldomero. + Version 20.2.1: Sep 27, 2020 Fixed bug in exam, reported by Nuria Torres Rosell. (304442 lines) Version 20.2: Sep 26, 2020 Removed unused action. Contextual menu in box used to write a new message. Changes in help links. (304440 lines) diff --git a/swad_config.h b/swad_config.h index f1b9ce1df..1c1ede28c 100644 --- a/swad_config.h +++ b/swad_config.h @@ -28,9 +28,9 @@ /** Uncomment one of the following installations of SWAD or create your own **/ /*****************************************************************************/ -#define LOCALHOST_UBUNTU // Comment this line if not applicable +//#define LOCALHOST_UBUNTU // Comment this line if not applicable //#define OPENSWAD_ORG // Comment this line if not applicable -//#define SWAD_UGR_ES // Comment this line if not applicable +#define SWAD_UGR_ES // Comment this line if not applicable //#define SWADBERRY_UGR_ES // Comment this line if not applicable /*****************************************************************************/ diff --git a/swad_exam_print.c b/swad_exam_print.c index 28a257764..1225995d2 100644 --- a/swad_exam_print.c +++ b/swad_exam_print.c @@ -195,10 +195,9 @@ void ExaPrn_ShowExamPrint (void) /***** Check if I can access to this session *****/ if (ExaSes_CheckIfICanAnswerThisSession (&Exam,&Session)) { - /***** Get print data from database *****/ + /***** Set basic data of exam print *****/ Print.SesCod = Session.SesCod; Print.UsrCod = Gbl.Usrs.Me.UsrDat.UsrCod; - ExaPrn_GetDataOfPrintBySesCodAndUsrCod (&Print); if (Print.PrnCod <= 0) // Print does not exists ==> create it { @@ -215,9 +214,12 @@ void ExaPrn_ShowExamPrint (void) ExaLog_SetAction (ExaLog_START_EXAM); ExaLog_SetIfCanAnswer (true); } - } + } else // Print exists - { + { + /***** Get exam print data from database *****/ + ExaPrn_GetDataOfPrintBySesCodAndUsrCod (&Print); + /***** Get questions and current user's answers from database *****/ ExaPrn_GetPrintQuestionsFromDB (&Print); @@ -578,7 +580,7 @@ static void ExaPrn_CreatePrintInDB (struct ExaPrn_Print *Print) " VALUES" " (%ld,%ld,NOW(),NOW(),%u,0,'N',0)", Print->SesCod, - Gbl.Usrs.Me.UsrDat.UsrCod, + Print->UsrCod, Print->NumQsts.All); /***** Store all questions (with blank answers)