From c8df6e53dcbcb53119fcb6891790a8c59c8cc334 Mon Sep 17 00:00:00 2001 From: acanas Date: Wed, 20 May 2020 03:12:21 +0200 Subject: [PATCH] Version19.239.4 --- swad_changelog.h | 3 ++- swad_user.c | 40 +++++++++++++++++++++++++++++----------- 2 files changed, 31 insertions(+), 12 deletions(-) diff --git a/swad_changelog.h b/swad_changelog.h index d7695393c..ecf078d75 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -557,10 +557,11 @@ enscript -2 --landscape --color --file-align=2 --highlight --line-numbers -o - * En OpenSWAD: ps2pdf source.ps destination.pdf */ -#define Log_PLATFORM_VERSION "SWAD 19.239.3 (2020-05-20)" +#define Log_PLATFORM_VERSION "SWAD 19.239.4 (2020-05-20)" #define CSS_FILE "swad19.238.2.css" #define JS_FILE "swad19.239.js" /* + Version 19.239.4: May 20, 2020 Fixed bug listing user's exam prints. (301332 lines) Version 19.239.3: May 20, 2020 Fixed bugs removing exam prints in a course. Don't remove user's production in a course when removing the user individually. (301316 lines) Version 19.239.2: May 20, 2020 Fixed bug removing media. (301301 lines) diff --git a/swad_user.c b/swad_user.c index 7371a7c8e..3a01f19ab 100644 --- a/swad_user.c +++ b/swad_user.c @@ -9972,7 +9972,7 @@ void Usr_ShowTableCellWithUsrData (struct UsrData *UsrDat,unsigned NumRows) char PhotoURL[PATH_MAX + 1]; Act_Action_t NextAction; - /***** Show user's photo and name *****/ + /***** Show user's photo *****/ if (NumRows) HTM_TD_Begin ("rowspan=\"%u\" class=\"LT COLOR%u\"", NumRows + 1,Gbl.RowEvenOdd); @@ -9984,12 +9984,15 @@ void Usr_ShowTableCellWithUsrData (struct UsrData *UsrDat,unsigned NumRows) "PHOTO45x60",Pho_ZOOM,false); HTM_TD_End (); - /***** Begin form to go to user's record card *****/ + /***** User's IDs and name *****/ + /* Begin cell */ if (NumRows) HTM_TD_Begin ("rowspan=\"%u\" class=\"LT COLOR%u\"", NumRows + 1,Gbl.RowEvenOdd); else HTM_TD_Begin ("class=\"LT COLOR%u\"",Gbl.RowEvenOdd); + + /* Action to go to user's record depending on role in course */ switch (UsrDat->Roles.InCurrentCrs.Role) { case Rol_STD: @@ -10001,17 +10004,24 @@ void Usr_ShowTableCellWithUsrData (struct UsrData *UsrDat,unsigned NumRows) break; default: NextAction = ActUnk; - Rol_WrongRoleExit (); break; } - Frm_StartForm (NextAction); - Usr_PutParamUsrCodEncrypted (UsrDat->EncryptedUsrCod); - HTM_BUTTON_SUBMIT_Begin (UsrDat->FullName,"BT_LINK LT AUTHOR_TXT",NULL); - /***** Show user's ID *****/ + if (NextAction == ActUnk) + /* Begin div */ + HTM_DIV_Begin ("class=\"LT AUTHOR_TXT\""); + else + { + /* Begin form to go to user's record card */ + Frm_StartForm (NextAction); + Usr_PutParamUsrCodEncrypted (UsrDat->EncryptedUsrCod); + HTM_BUTTON_SUBMIT_Begin (UsrDat->FullName,"BT_LINK LT AUTHOR_TXT",NULL); + } + + /* User's ID */ ID_WriteUsrIDs (UsrDat,NULL); - /***** Show user's name *****/ + /* User's name */ HTM_BR (); HTM_Txt (UsrDat->Surname1); if (UsrDat->Surname2[0]) @@ -10023,9 +10033,17 @@ void Usr_ShowTableCellWithUsrData (struct UsrData *UsrDat,unsigned NumRows) HTM_Txt (UsrDat->FirstName); } - /***** End form *****/ - HTM_BUTTON_End (); - Frm_EndForm (); + if (NextAction == ActUnk) + /* End div */ + HTM_DIV_End (); + else + { + /* End form */ + HTM_BUTTON_End (); + Frm_EndForm (); + } + + /* End cell */ HTM_TD_End (); }