From 7acc389a4fd33e705c1734ad1c7a995dcd4958fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonio=20Ca=C3=B1as=20Vargas?= Date: Thu, 27 Apr 2017 23:44:00 +0200 Subject: [PATCH] Version 16.193.5 --- swad_changelog.h | 3 ++- swad_enrolment.c | 11 ++++++++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/swad_changelog.h b/swad_changelog.h index cf6d42539..863dd3d96 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -221,13 +221,14 @@ /****************************** Public constants *****************************/ /*****************************************************************************/ -#define Log_PLATFORM_VERSION "SWAD 16.193.4 (2017-04-27)" +#define Log_PLATFORM_VERSION "SWAD 16.193.5 (2017-04-27)" #define CSS_FILE "swad16.193.4.css" #define JS_FILE "swad16.181.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.193.5: Apr 27, 2017 Changed dialog to remove user from course. (218316 lines) Version 16.193.4: Apr 27, 2017 Changes in layout of alerts. Changed dialog to remove user as administrator. (218311 lines) Version 16.193.3: Apr 27, 2017 Changes in layout of alerts. diff --git a/swad_enrolment.c b/swad_enrolment.c index f3d33b694..08b8c51fd 100644 --- a/swad_enrolment.c +++ b/swad_enrolment.c @@ -3882,15 +3882,18 @@ static void Enr_AskIfRemoveUsrFromCrs (struct UsrData *UsrDat,bool ItsMe) Gbl.CurrentCrs.Crs.CrsCod, false)) { + /***** Show question and button to remove user as administrator *****/ + /* Start alert */ sprintf (Gbl.Message, ItsMe ? Txt_Do_you_really_want_to_be_removed_from_the_course_X : Txt_Do_you_really_want_to_remove_the_following_user_from_the_course_X, Gbl.CurrentCrs.Crs.FullName); - Lay_ShowAlert (Lay_WARNING,Gbl.Message); + Lay_ShowAlertAndButton1 (Lay_QUESTION,Gbl.Message); + /* Show user's record */ Rec_ShowSharedRecordUnmodifiable (UsrDat); - fprintf (Gbl.F.Out,"
"); + /* Show form to request confirmation */ Act_FormStart (UsrDat->RoleInCurrentCrsDB == Rol_STUDENT ? ActRemStdCrs : ActRemTchCrs); Usr_PutParamUsrCodEncrypted (UsrDat->EncryptedUsrCod); @@ -3898,7 +3901,9 @@ static void Enr_AskIfRemoveUsrFromCrs (struct UsrData *UsrDat,bool ItsMe) Lay_PutRemoveButton (ItsMe ? Txt_Remove_me_from_this_course : Txt_Remove_user_from_this_course); Act_FormEnd (); - fprintf (Gbl.F.Out,"
"); + + /* End alert */ + Lay_ShowAlertAndButton2 (ActUnk,NULL,Lay_NO_BUTTON,NULL); } else Lay_ShowAlert (Lay_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);