From 4838c07663942033f31d7afaf3c6f21f9aa043e4 Mon Sep 17 00:00:00 2001 From: acanas Date: Fri, 19 Jun 2020 13:37:45 +0200 Subject: [PATCH] Version19.252.1 --- swad_changelog.h | 5 ++++- swad_exam_result.c | 13 ++++++------- swad_match_result.c | 6 +++--- 3 files changed, 13 insertions(+), 11 deletions(-) diff --git a/swad_changelog.h b/swad_changelog.h index 1724e4687..dccf65569 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -556,7 +556,7 @@ enscript -2 --landscape --color --file-align=2 --highlight --line-numbers -o - * En OpenSWAD: ps2pdf source.ps destination.pdf */ -#define Log_PLATFORM_VERSION "SWAD 19.252 (2020-06-19)" +#define Log_PLATFORM_VERSION "SWAD 19.252.1 (2020-06-19)" #define CSS_FILE "swad19.250.css" #define JS_FILE "swad19.246.1.js" /* @@ -566,7 +566,10 @@ TODO: Fix bug: Un estudiante recibe una notificaci TODO: Fix bug: Cuando se pulsa en ver fichas, y luego en una ficha en "Ver trabajos" o "Ver exámenes", o lo que sea, sale dos veces ese estudiante. TODO: No limitar el número de preguntas en un examen a ExaPrn_MAX_QUESTIONS_PER_EXAM_PRINT, sino asignar PrintedQuestions dinámicamente con malloc TODO: Que al generar un examen sólo se cojan preguntas válidas. Y si ya está generado, al entrar de nuevo, que se vean en rojo. +TODO: Refactorizar MchRes_CheckIfICanSeeMatchResult y MchRes_CheckIfICanViewScore uniéndolas en una función como ExaRes_CheckIfICanSeePrintResult + Y dentro de las funciones TstPrn_ShowUsrPrints y TstPrn_ShowOnePrint crear y llamar a una función común similar a ExaRes_CheckIfICanSeePrintResult + Version 19.252.1: Jun 19, 2020 Changes in listing of exams and matches results. (303245 lines) Version 19.252: Jun 19, 2020 Fixed bug in exam results, reported by Francisco Ligero Ligero. (303243 lines) Version 19.251: Jun 18, 2020 Changes in test, exam and match results. (303263 lines) Version 19.250.3: Jun 18, 2020 Show valid score and valid grade in listing of exam results. (303113 lines) diff --git a/swad_exam_result.c b/swad_exam_result.c index b06988d31..a61cc98a3 100644 --- a/swad_exam_result.c +++ b/swad_exam_result.c @@ -1461,13 +1461,12 @@ static void ExaRes_CheckIfICanSeePrintResult (const struct Exa_Exam *Exam, case Rol_STD: // Depends on visibility of exam, session and result (eye icons) ItsMe = Usr_ItsMe (UsrCod); - if (ItsMe && // The result is mine - !Exam->Hidden && // The exam is visible - !Session->Hidden && // The session is visible - Session->ShowUsrResults) // The results of the session are visible to users - ICanView->Result = ExaSes_CheckIfICanListThisSessionBasedOnGrps (Session->SesCod); - else - ICanView->Result = false; + ICanView->Result = (ItsMe && // The result is mine + !Exam->Hidden && // The exam is visible + !Session->Hidden && // The session is visible + Session->ShowUsrResults); // The results of the session are visible to users + // Whether I belong or not to groups of session is not checked here... + // ...because I should be able to see old exams made in old groups to which I belonged if (ICanView->Result) // Depends on 5 visibility icons associated to exam diff --git a/swad_match_result.c b/swad_match_result.c index 722895799..6b1a551c2 100644 --- a/swad_match_result.c +++ b/swad_match_result.c @@ -1436,9 +1436,9 @@ static bool MchRes_CheckIfICanSeeMatchResult (struct Mch_Match *Match,long UsrCo { case Rol_STD: ItsMe = Usr_ItsMe (UsrCod); - if (ItsMe && Match->Status.ShowUsrResults) - return Mch_CheckIfICanPlayThisMatchBasedOnGrps (Match); - return false; + return ItsMe && Match->Status.ShowUsrResults; + // Whether I belong or not to groups of match is not checked here... + // ...because I should be able to see old matches made in old groups to which I belonged case Rol_NET: case Rol_TCH: case Rol_DEG_ADM: