From 1ded003286e1445f29084196f287c63519e2c7e4 Mon Sep 17 00:00:00 2001 From: acanas Date: Mon, 20 Dec 2021 11:10:24 +0100 Subject: [PATCH] Version 21.70.9: Dec 20, 2021 Fixed bug in user's IDs when listing match results. --- swad_changelog.h | 3 +-- swad_match_result.c | 11 +++++++---- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/swad_changelog.h b/swad_changelog.h index 6d98e8e0a..7a29d3314 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -606,8 +606,7 @@ TODO: En las encuestas, que los estudiantes no puedan ver los resultados hasta q #define CSS_FILE "swad21.70.7.css" #define JS_FILE "swad21.67.4.js" /* -// TODO: al ver los resultados de un juego como profesor, el rol del estudiante sale como desconocido y no se puede ver el DNI - + Version 21.70.9: Dec 20, 2021 Fixed bug in user's IDs when listing match results. (321929 lines) Version 21.70.8: Dec 20, 2021 Fixed bug showing calendar. (321927 lines) Version 21.70.7: Dec 20, 2021 Working on design of dark theme. (321926 lines) Version 21.70.7: Dec 20, 2021 Working on design of dark theme. (321926 lines) diff --git a/swad_match_result.c b/swad_match_result.c index 6fa509d99..903c38262 100644 --- a/swad_match_result.c +++ b/swad_match_result.c @@ -303,7 +303,7 @@ static void MchRes_ListAllMchResultsInSelectedGames (struct Gam_Games *Games) Usr_GetUsrCodFromEncryptedUsrCod (&Gbl.Usrs.Other.UsrDat); if (Usr_ChkUsrCodAndGetAllUsrDataFromUsrCod (&Gbl.Usrs.Other.UsrDat, Usr_DONT_GET_PREFS, - Usr_DONT_GET_ROLE_IN_CURRENT_CRS)) + Usr_GET_ROLE_IN_CURRENT_CRS)) if (Usr_CheckIfICanViewTstExaMchResult (&Gbl.Usrs.Other.UsrDat)) { /***** Show matches results *****/ @@ -403,7 +403,7 @@ static void MchRes_ListAllMchResultsInGam (struct Gam_Games *Games,long GamCod) if ((Gbl.Usrs.Other.UsrDat.UsrCod = DB_GetNextCode (mysql_res)) > 0) if (Usr_ChkUsrCodAndGetAllUsrDataFromUsrCod (&Gbl.Usrs.Other.UsrDat, Usr_DONT_GET_PREFS, - Usr_DONT_GET_ROLE_IN_CURRENT_CRS)) + Usr_GET_ROLE_IN_CURRENT_CRS)) if (Usr_CheckIfICanViewTstExaMchResult (&Gbl.Usrs.Other.UsrDat)) { /***** Show matches results *****/ @@ -478,7 +478,7 @@ static void MchRes_ListAllMchResultsInMch (struct Gam_Games *Games,long MchCod) if ((Gbl.Usrs.Other.UsrDat.UsrCod = DB_GetNextCode (mysql_res)) > 0) if (Usr_ChkUsrCodAndGetAllUsrDataFromUsrCod (&Gbl.Usrs.Other.UsrDat, Usr_DONT_GET_PREFS, - Usr_DONT_GET_ROLE_IN_CURRENT_CRS)) + Usr_GET_ROLE_IN_CURRENT_CRS)) if (Usr_CheckIfICanViewTstExaMchResult (&Gbl.Usrs.Other.UsrDat)) { /***** Show matches results *****/ @@ -1127,11 +1127,14 @@ void MchRes_ShowOneMchResult (void) /* Get data of the user who answer the match */ if (!Usr_ChkUsrCodAndGetAllUsrDataFromUsrCod (UsrDat, Usr_DONT_GET_PREFS, - Usr_DONT_GET_ROLE_IN_CURRENT_CRS)) + Usr_GET_ROLE_IN_CURRENT_CRS)) Err_WrongUserExit (); if (!Usr_CheckIfICanViewTstExaMchResult (UsrDat)) Err_NoPermissionExit (); + /* Get if user has accepted enrolment */ + UsrDat->Accepted = Enr_CheckIfUsrHasAcceptedInCurrentCrs (UsrDat); + /* User */ HTM_TR_Begin (NULL);