From fa50ce6e35fc5ae83404f851d6dc47ce2d9eb8f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonio=20Ca=C3=B1as=20Vargas?= Date: Thu, 17 Sep 2015 20:58:10 +0200 Subject: [PATCH] Version 14.134.1 --- swad_action.c | 11 ++++++++--- swad_action.h | 37 +++++++++++++++++++------------------ swad_changelog.h | 7 ++++++- swad_enrollment.c | 3 ++- 4 files changed, 35 insertions(+), 23 deletions(-) diff --git a/swad_action.c b/swad_action.c index 31a3336e4..233a4f7c1 100644 --- a/swad_action.c +++ b/swad_action.c @@ -974,7 +974,8 @@ Users: 783. ActFrmPwdOthUsr Show form to the change of the password of another user 784. ActChgPwdOthUsr Change the password of another user - 785. ActRemUsrCrs Remove a user from the current course + 785b. ActRemStdCrs Remove a student from the current course + 785c. ActRemTchCrs Remove a teacher from the current course 786. ActRemUsrGbl Eliminate completely a user from the platform 787. ActReqRemAllStdCrs Request the removal of all the students from the current course 788. ActRemAllStdCrs Remove all the students from the current course @@ -2402,7 +2403,9 @@ struct Act_Actions Act_Actions[Act_NUM_ACTIONS] = /* ActFrmPwdOthUsr */{ 598,-1,TabUsr,ActLstStd ,0x1E0,0x1E0,0x1E0,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Pwd_ShowFormOthPwd ,NULL}, /* ActChgPwdOthUsr */{ 82,-1,TabUsr,ActLstStd ,0x1E0,0x1E0,0x1E0,Act_CONTENT_NORM,Act_MAIN_WINDOW,Pwd_UpdateOtherPwd1 ,Pwd_UpdateOtherPwd2 ,NULL}, - /* ActRemUsrCrs */{ 58,-1,TabUsr,ActLstStd ,0x1F8,0x1E0,0x000,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Enr_RemUsrFromCrs ,NULL}, + /* ActRemStdCrs */{1462,-1,TabUsr,ActLstStd ,0x1E8,0x1E0,0x000,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Enr_RemUsrFromCrs ,NULL}, + /* ActRemTchCrs */{1463,-1,TabUsr,ActLstTch ,0x1F0,0x1E0,0x000,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Enr_RemUsrFromCrs ,NULL}, + /* ActRemUsrGbl */{ 62,-1,TabUsr,ActLstStd ,0x1FE,0x1FE,0x1FE,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Acc_RemUsrGbl ,NULL}, /* ActReqRemAllStdCrs*/{ 88,-1,TabUsr,ActLstStd ,0x110,0x100,0x000,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Enr_AskRemAllStdsThisCrs ,NULL}, @@ -2809,7 +2812,7 @@ Act_Action_t Act_FromActCodToAction[1+Act_MAX_ACTION_COD] = // Do not reuse uniq -1, // #55 (obsolete action) -1, // #56 (obsolete action) -1, // #57 (obsolete action) - ActRemUsrCrs, // #58 * SuperSIC forever! + -1, // #58 (obsolete action) ActWriNot, // #59 ActRcvNot, // #60 -1, // #61 (obsolete action) @@ -4216,6 +4219,8 @@ Act_Action_t Act_FromActCodToAction[1+Act_MAX_ACTION_COD] = // Do not reuse uniq ActAccEnrTch, // #1459 ActRemMe_Std, // #1460 ActRemMe_Tch, // #1461 + ActRemStdCrs, // #1462 + ActRemTchCrs, // #1463 }; /*****************************************************************************/ diff --git a/swad_action.h b/swad_action.h index dda5f1da4..e0d006d1b 100644 --- a/swad_action.h +++ b/swad_action.h @@ -69,9 +69,9 @@ typedef enum typedef int Act_Action_t; // Must be a signed type, because -1 is used to indicate obsolete action -#define Act_NUM_ACTIONS (7+52+15+90+73+68+204+182+137+168+28+79) +#define Act_NUM_ACTIONS (7+52+15+90+73+68+204+182+138+168+28+79) -#define Act_MAX_ACTION_COD 1461 +#define Act_MAX_ACTION_COD 1463 #define Act_MAX_OPTIONS_IN_MENU_PER_TAB 20 @@ -1002,26 +1002,27 @@ typedef int Act_Action_t; // Must be a signed type, because -1 is used to indica #define ActNewID_Tch (ActChgNumRowFooGrp+119) #define ActFrmPwdOthUsr (ActChgNumRowFooGrp+120) #define ActChgPwdOthUsr (ActChgNumRowFooGrp+121) -#define ActRemUsrCrs (ActChgNumRowFooGrp+122) -#define ActRemUsrGbl (ActChgNumRowFooGrp+123) +#define ActRemStdCrs (ActChgNumRowFooGrp+122) +#define ActRemTchCrs (ActChgNumRowFooGrp+123) +#define ActRemUsrGbl (ActChgNumRowFooGrp+124) -#define ActReqRemAllStdCrs (ActChgNumRowFooGrp+124) -#define ActRemAllStdCrs (ActChgNumRowFooGrp+125) +#define ActReqRemAllStdCrs (ActChgNumRowFooGrp+125) +#define ActRemAllStdCrs (ActChgNumRowFooGrp+126) -#define ActReqRemOldUsr (ActChgNumRowFooGrp+126) -#define ActRemOldUsr (ActChgNumRowFooGrp+127) +#define ActReqRemOldUsr (ActChgNumRowFooGrp+127) +#define ActRemOldUsr (ActChgNumRowFooGrp+128) -#define ActSeePubPrf (ActChgNumRowFooGrp+128) -#define ActCal1stClkTim (ActChgNumRowFooGrp+129) -#define ActCalNumClk (ActChgNumRowFooGrp+130) -#define ActCalNumFilVie (ActChgNumRowFooGrp+131) -#define ActCalNumForPst (ActChgNumRowFooGrp+132) -#define ActCalNumMsgSnt (ActChgNumRowFooGrp+133) +#define ActSeePubPrf (ActChgNumRowFooGrp+129) +#define ActCal1stClkTim (ActChgNumRowFooGrp+130) +#define ActCalNumClk (ActChgNumRowFooGrp+131) +#define ActCalNumFilVie (ActChgNumRowFooGrp+132) +#define ActCalNumForPst (ActChgNumRowFooGrp+133) +#define ActCalNumMsgSnt (ActChgNumRowFooGrp+134) -#define ActFolUsr (ActChgNumRowFooGrp+134) -#define ActUnfUsr (ActChgNumRowFooGrp+135) -#define ActSeeFlg (ActChgNumRowFooGrp+136) -#define ActSeeFlr (ActChgNumRowFooGrp+137) +#define ActFolUsr (ActChgNumRowFooGrp+135) +#define ActUnfUsr (ActChgNumRowFooGrp+136) +#define ActSeeFlg (ActChgNumRowFooGrp+137) +#define ActSeeFlr (ActChgNumRowFooGrp+138) /*****************************************************************************/ /******************************* Messages tab ********************************/ diff --git a/swad_changelog.h b/swad_changelog.h index fe41a198a..40d9b6f0f 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -98,11 +98,16 @@ /****************************** Public constants *****************************/ /*****************************************************************************/ -#define Log_PLATFORM_VERSION "SWAD 14.134 (2015/09/17)" +#define Log_PLATFORM_VERSION "SWAD 14.134.1 (2015/09/17)" // 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 14.134.1: Sep 17, 2015 Changes in user enrollment. (184833 lines) +UPDATE actions SET Obsolete='Y' WHERE ActCod='58'; +INSERT INTO actions (ActCod,Language,Obsolete,Txt) VALUES ('1462','es','N','Eliminar estudiante asignatura'); +INSERT INTO actions (ActCod,Language,Obsolete,Txt) VALUES ('1463','es','N','Eliminar profesor asignatura'); + Version 14.134: Sep 17, 2015 Changes in user enrollment. Changes in notifications about enrollment. (184823 lines) 25 changes necessary in database: diff --git a/swad_enrollment.c b/swad_enrollment.c index bc04f7550..7a9630e71 100644 --- a/swad_enrollment.c +++ b/swad_enrollment.c @@ -3475,7 +3475,8 @@ static void Enr_AskIfRemoveUsrFromCrs (struct UsrData *UsrDat,bool ItsMe) Rec_ShowCommonRecordUnmodifiable (UsrDat); fprintf (Gbl.F.Out,"
"); - Act_FormStart (ActRemUsrCrs); + Act_FormStart (UsrDat->RoleInCurrentCrsDB == Rol_STUDENT ? ActRemStdCrs : + ActRemTchCrs); Usr_PutParamUsrCodEncrypted (UsrDat->EncryptedUsrCod); Pwd_AskForConfirmationOnDangerousAction (); Lay_PutRemoveButton (ItsMe ? Txt_Remove_me_from_this_course :