From 0262b9d76e1fff712e1e1dfa55b20e7f912346e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonio=20Ca=C3=B1as=20Vargas?= Date: Mon, 8 May 2017 20:13:27 +0200 Subject: [PATCH] Version 16.208.3 --- swad_ID.c | 8 ++++---- swad_changelog.h | 3 ++- swad_record.c | 14 ++++++++++++-- 3 files changed, 18 insertions(+), 7 deletions(-) diff --git a/swad_ID.c b/swad_ID.c index ded3724ee..aa65630aa 100644 --- a/swad_ID.c +++ b/swad_ID.c @@ -70,7 +70,7 @@ typedef enum static bool ID_CheckIfUsrIDIsValidUsingMinDigits (const char *UsrID,unsigned MinDigits); -static void ID_PutButtonToReqConfirmID (struct UsrData *UsrDat,unsigned NumID); +static void ID_PutLinkToReqConfirmID (struct UsrData *UsrDat,unsigned NumID); static void ID_PutButtonToConfirmID (unsigned NumID); static void ID_PutParamsConfirmID (void); @@ -399,7 +399,7 @@ void ID_WriteUsrIDs (struct UsrData *UsrDat) if (ICanConfirmUsrID && !UsrDat->IDs.List[NumID].Confirmed) - ID_PutButtonToReqConfirmID (UsrDat,NumID); + ID_PutLinkToReqConfirmID (UsrDat,NumID); } } @@ -448,10 +448,10 @@ bool ID_ICanSeeOtherUsrIDs (const struct UsrData *UsrDat) } /*****************************************************************************/ -/******* Put a button to request the confirmation of another user's ID *******/ +/******** Put a link to request the confirmation of another user's ID ********/ /*****************************************************************************/ -static void ID_PutButtonToReqConfirmID (struct UsrData *UsrDat,unsigned NumID) +static void ID_PutLinkToReqConfirmID (struct UsrData *UsrDat,unsigned NumID) { extern const char *The_ClassFormBold[The_NUM_THEMES]; extern const char *Txt_Confirm_ID; diff --git a/swad_changelog.h b/swad_changelog.h index 9c536e7e0..6e555b2dd 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -234,13 +234,14 @@ /****************************** Public constants *****************************/ /*****************************************************************************/ -#define Log_PLATFORM_VERSION "SWAD 16.208.2 (2017-05-08)" +#define Log_PLATFORM_VERSION "SWAD 16.208.3 (2017-05-08)" #define CSS_FILE "swad16.207.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 16.208.3: May 08, 2017 Changes in edition of students records. (218713 lines) Version 16.208.2: May 08, 2017 Changes in confirmation of user's ID. (218704 lines) Version 16.208.1: May 08, 2017 Fixed problem in character encoding in files of marks, reported by Sandra Daniela Tazzioli Barroso. (218696 lines) Version 16.208: May 07, 2017 New module swad_language for preference on language. (218695 lines) diff --git a/swad_record.c b/swad_record.c index 49fea014b..c44d9e814 100644 --- a/swad_record.c +++ b/swad_record.c @@ -1216,6 +1216,11 @@ static void Rec_ListRecordsStds (Rec_SharedRecordViewType_t ShaTypeOfView, fprintf (Gbl.F.Out,"page-break-before:always;"); fprintf (Gbl.F.Out,"\">"); + /* Show optional alert */ + if (UsrDat.UsrCod == Gbl.Usrs.Other.UsrDat.UsrCod) // Selected user + if (Gbl.Message[0]) + Lay_ShowAlert (Gbl.AlertType,Gbl.Message); + /* Shared record */ Rec_ShowSharedUsrRecord (ShaTypeOfView,&UsrDat); @@ -1224,7 +1229,7 @@ static void Rec_ListRecordsStds (Rec_SharedRecordViewType_t ShaTypeOfView, if ( Gbl.Usrs.Me.LoggedRole == Rol_TEACHER || Gbl.Usrs.Me.LoggedRole == Rol_SYS_ADM || (Gbl.Usrs.Me.LoggedRole == Rol_STUDENT && // I am student in this course... - Gbl.Usrs.Me.UsrDat.UsrCod == UsrDat.UsrCod)) // ...and it's me + UsrDat.UsrCod == Gbl.Usrs.Me.UsrDat.UsrCod)) // ...and it's me Rec_ShowCrsRecord (CrsTypeOfView,&UsrDat,Anchor); fprintf (Gbl.F.Out,""); @@ -1559,6 +1564,10 @@ void Rec_UpdateAndShowOtherCrsRecord (void) { extern const char *Txt_Student_record_card_in_this_course_has_been_updated; + /***** Initialize alert type and message *****/ + Gbl.AlertType = Lay_INFO; // No error, no success + Gbl.Message[0] = '\0'; // Do not write anything + /***** Get the user whose record we want to modify *****/ Usr_GetParamOtherUsrCodEncryptedAndGetListIDs (); Usr_ChkUsrCodAndGetAllUsrDataFromUsrCod (&Gbl.Usrs.Other.UsrDat); @@ -1576,7 +1585,8 @@ void Rec_UpdateAndShowOtherCrsRecord (void) Rec_UpdateCrsRecord (Gbl.Usrs.Other.UsrDat.UsrCod); /***** Show records again (including the updated one) *****/ - Lay_ShowAlert (Lay_SUCCESS,Txt_Student_record_card_in_this_course_has_been_updated); + Gbl.AlertType = Lay_SUCCESS; + sprintf (Gbl.Message,"%s",Txt_Student_record_card_in_this_course_has_been_updated); Rec_ListRecordsStdsForEdit (); /***** Free memory used for some fields *****/