Version 16.208.3

This commit is contained in:
Antonio Cañas Vargas 2017-05-08 20:13:27 +02:00
parent 6e73ea98ac
commit 0262b9d76e
3 changed files with 18 additions and 7 deletions

View File

@ -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;

View File

@ -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)

View File

@ -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,"</section>");
@ -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 *****/