Version 16.220.5

This commit is contained in:
Antonio Cañas Vargas 2017-05-21 18:52:02 +02:00
parent 03b66d6f49
commit 70fdd02903
4 changed files with 115 additions and 59 deletions

View File

@ -1066,8 +1066,10 @@ Users:
NEW. ActReqAccEnrNEdTch Confirm acceptation / refusion of enrolment as non-editing teacher in current course
873. ActReqAccEnrTch Confirm acceptation / refusion of enrolment as teacher in current course
874. ActAccEnrStd Accept enrolment as student in current course
NEW. ActAccEnrNEdTch Accept enrolment as non-editing teacher in current course
875. ActAccEnrTch Accept enrolment as teacher in current course
876. ActRemMe_Std Reject enrolment as student in current course
NEW. ActRemMe_NEdTch Reject enrolment as non-editing teacher in current course
877. ActRemMe_Tch Reject enrolment as teacher in current course
878. ActNewAdmIns Register an administrador in this institution
@ -2537,8 +2539,10 @@ struct Act_Actions Act_Actions[Act_NUM_ACTIONS] =
/* ActReqAccEnrNEdTch*/{1639,-1,TabUnk,ActLstTch ,0x3D0, 0, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Enr_ReqAcceptRegisterInCrs ,NULL},
/* ActReqAccEnrTch */{1457,-1,TabUnk,ActLstTch ,0x3E0, 0, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Enr_ReqAcceptRegisterInCrs ,NULL},
/* ActAccEnrStd */{1458,-1,TabUnk,ActLstStd ,0x3C8, 0, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Enr_AcceptRegisterMeInCrs ,NULL},
/* ActAccEnrNEdTch */{1640,-1,TabUnk,ActLstTch ,0x3D0, 0, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Enr_AcceptRegisterMeInCrs ,NULL},
/* ActAccEnrTch */{1459,-1,TabUnk,ActLstTch ,0x3E0, 0, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Enr_AcceptRegisterMeInCrs ,NULL},
/* ActRemMe_Std */{1460,-1,TabUnk,ActLstStd ,0x3C8, 0, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Enr_ReqRemMeFromCrs ,NULL},
/* ActRemMe_NEdTch */{1641,-1,TabUnk,ActLstTch ,0x3D0, 0, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Enr_ReqRemMeFromCrs ,NULL},
/* ActRemMe_Tch */{1461,-1,TabUnk,ActLstTch ,0x3E0, 0, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Enr_ReqRemMeFromCrs ,NULL},
/* ActNewAdmIns */{1337,-1,TabUnk,ActLstOth ,0x200,0x200,0x200,0x200,0x200,0x200,0x200,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Enr_AddAdmToIns ,NULL},
@ -4626,6 +4630,8 @@ Act_Action_t Act_FromActCodToAction[1 + Act_MAX_ACTION_COD] = // Do not reuse un
ActPrnOneAsg, // #1637
ActChgDatFmt, // #1638
ActReqAccEnrNEdTch, // #1639
ActAccEnrNEdTch, // #1640
ActRemMe_NEdTch, // #1641
};
/*****************************************************************************/

View File

@ -57,9 +57,9 @@ typedef enum
typedef signed int Act_Action_t; // Must be a signed type, because -1 is used to indicate obsolete action
#define Act_NUM_ACTIONS (1 + 9 + 43 + 17 + 47 + 32 + 24 + 115 + 72 + 416 + 157 + 172 + 42 + 14 + 97)
#define Act_NUM_ACTIONS (1 + 9 + 43 + 17 + 47 + 32 + 24 + 115 + 72 + 416 + 159 + 172 + 42 + 14 + 97)
#define Act_MAX_ACTION_COD 1639
#define Act_MAX_ACTION_COD 1641
#define Act_MAX_OPTIONS_IN_MENU_PER_TAB 12
@ -1083,64 +1083,66 @@ typedef signed int Act_Action_t; // Must be a signed type, because -1 is used to
#define ActReqAccEnrNEdTch (ActChgNumRowFooGrp + 106)
#define ActReqAccEnrTch (ActChgNumRowFooGrp + 107)
#define ActAccEnrStd (ActChgNumRowFooGrp + 108)
#define ActAccEnrTch (ActChgNumRowFooGrp + 109)
#define ActRemMe_Std (ActChgNumRowFooGrp + 110)
#define ActRemMe_Tch (ActChgNumRowFooGrp + 111)
#define ActAccEnrNEdTch (ActChgNumRowFooGrp + 109)
#define ActAccEnrTch (ActChgNumRowFooGrp + 110)
#define ActRemMe_Std (ActChgNumRowFooGrp + 111)
#define ActRemMe_NEdTch (ActChgNumRowFooGrp + 112)
#define ActRemMe_Tch (ActChgNumRowFooGrp + 113)
#define ActNewAdmIns (ActChgNumRowFooGrp + 112)
#define ActRemAdmIns (ActChgNumRowFooGrp + 113)
#define ActNewAdmCtr (ActChgNumRowFooGrp + 114)
#define ActRemAdmCtr (ActChgNumRowFooGrp + 115)
#define ActNewAdmDeg (ActChgNumRowFooGrp + 116)
#define ActRemAdmDeg (ActChgNumRowFooGrp + 117)
#define ActNewAdmIns (ActChgNumRowFooGrp + 114)
#define ActRemAdmIns (ActChgNumRowFooGrp + 115)
#define ActNewAdmCtr (ActChgNumRowFooGrp + 116)
#define ActRemAdmCtr (ActChgNumRowFooGrp + 117)
#define ActNewAdmDeg (ActChgNumRowFooGrp + 118)
#define ActRemAdmDeg (ActChgNumRowFooGrp + 119)
#define ActRcvFrmEnrSevStd (ActChgNumRowFooGrp + 118)
#define ActRcvFrmEnrSevTch (ActChgNumRowFooGrp + 119)
#define ActRcvFrmEnrSevStd (ActChgNumRowFooGrp + 120)
#define ActRcvFrmEnrSevTch (ActChgNumRowFooGrp + 121)
#define ActCnfID_Oth (ActChgNumRowFooGrp + 120)
#define ActCnfID_Std (ActChgNumRowFooGrp + 121)
#define ActCnfID_Tch (ActChgNumRowFooGrp + 122)
#define ActCnfID_Oth (ActChgNumRowFooGrp + 122)
#define ActCnfID_Std (ActChgNumRowFooGrp + 123)
#define ActCnfID_Tch (ActChgNumRowFooGrp + 124)
#define ActFrmIDsOth (ActChgNumRowFooGrp + 123)
#define ActFrmIDsStd (ActChgNumRowFooGrp + 124)
#define ActFrmIDsTch (ActChgNumRowFooGrp + 125)
#define ActRemID_Oth (ActChgNumRowFooGrp + 126)
#define ActRemID_Std (ActChgNumRowFooGrp + 127)
#define ActRemID_Tch (ActChgNumRowFooGrp + 128)
#define ActNewID_Oth (ActChgNumRowFooGrp + 129)
#define ActNewID_Std (ActChgNumRowFooGrp + 130)
#define ActNewID_Tch (ActChgNumRowFooGrp + 131)
#define ActFrmPwdOth (ActChgNumRowFooGrp + 132)
#define ActFrmPwdStd (ActChgNumRowFooGrp + 133)
#define ActFrmPwdTch (ActChgNumRowFooGrp + 134)
#define ActChgPwdOth (ActChgNumRowFooGrp + 135)
#define ActChgPwdStd (ActChgNumRowFooGrp + 136)
#define ActChgPwdTch (ActChgNumRowFooGrp + 137)
#define ActFrmMaiOth (ActChgNumRowFooGrp + 138)
#define ActFrmMaiStd (ActChgNumRowFooGrp + 139)
#define ActFrmMaiTch (ActChgNumRowFooGrp + 140)
#define ActRemMaiOth (ActChgNumRowFooGrp + 141)
#define ActRemMaiStd (ActChgNumRowFooGrp + 142)
#define ActRemMaiTch (ActChgNumRowFooGrp + 143)
#define ActNewMaiOth (ActChgNumRowFooGrp + 144)
#define ActNewMaiStd (ActChgNumRowFooGrp + 145)
#define ActNewMaiTch (ActChgNumRowFooGrp + 146)
#define ActFrmIDsOth (ActChgNumRowFooGrp + 125)
#define ActFrmIDsStd (ActChgNumRowFooGrp + 126)
#define ActFrmIDsTch (ActChgNumRowFooGrp + 127)
#define ActRemID_Oth (ActChgNumRowFooGrp + 128)
#define ActRemID_Std (ActChgNumRowFooGrp + 129)
#define ActRemID_Tch (ActChgNumRowFooGrp + 130)
#define ActNewID_Oth (ActChgNumRowFooGrp + 131)
#define ActNewID_Std (ActChgNumRowFooGrp + 132)
#define ActNewID_Tch (ActChgNumRowFooGrp + 133)
#define ActFrmPwdOth (ActChgNumRowFooGrp + 134)
#define ActFrmPwdStd (ActChgNumRowFooGrp + 135)
#define ActFrmPwdTch (ActChgNumRowFooGrp + 136)
#define ActChgPwdOth (ActChgNumRowFooGrp + 137)
#define ActChgPwdStd (ActChgNumRowFooGrp + 138)
#define ActChgPwdTch (ActChgNumRowFooGrp + 139)
#define ActFrmMaiOth (ActChgNumRowFooGrp + 140)
#define ActFrmMaiStd (ActChgNumRowFooGrp + 141)
#define ActFrmMaiTch (ActChgNumRowFooGrp + 142)
#define ActRemMaiOth (ActChgNumRowFooGrp + 143)
#define ActRemMaiStd (ActChgNumRowFooGrp + 144)
#define ActRemMaiTch (ActChgNumRowFooGrp + 145)
#define ActNewMaiOth (ActChgNumRowFooGrp + 146)
#define ActNewMaiStd (ActChgNumRowFooGrp + 147)
#define ActNewMaiTch (ActChgNumRowFooGrp + 148)
#define ActRemStdCrs (ActChgNumRowFooGrp + 147)
#define ActRemTchCrs (ActChgNumRowFooGrp + 148)
#define ActRemUsrGbl (ActChgNumRowFooGrp + 149)
#define ActRemStdCrs (ActChgNumRowFooGrp + 149)
#define ActRemTchCrs (ActChgNumRowFooGrp + 150)
#define ActRemUsrGbl (ActChgNumRowFooGrp + 151)
#define ActReqRemAllStdCrs (ActChgNumRowFooGrp + 150)
#define ActRemAllStdCrs (ActChgNumRowFooGrp + 151)
#define ActReqRemAllStdCrs (ActChgNumRowFooGrp + 152)
#define ActRemAllStdCrs (ActChgNumRowFooGrp + 153)
#define ActReqRemOldUsr (ActChgNumRowFooGrp + 152)
#define ActRemOldUsr (ActChgNumRowFooGrp + 153)
#define ActReqRemOldUsr (ActChgNumRowFooGrp + 154)
#define ActRemOldUsr (ActChgNumRowFooGrp + 155)
#define ActLstDupUsr (ActChgNumRowFooGrp + 154)
#define ActLstSimUsr (ActChgNumRowFooGrp + 155)
#define ActRemDupUsr (ActChgNumRowFooGrp + 156)
#define ActLstDupUsr (ActChgNumRowFooGrp + 156)
#define ActLstSimUsr (ActChgNumRowFooGrp + 157)
#define ActRemDupUsr (ActChgNumRowFooGrp + 158)
#define ActLstClk (ActChgNumRowFooGrp + 157)
#define ActLstClk (ActChgNumRowFooGrp + 159)
/*****************************************************************************/
/******************************** Social tab *********************************/

View File

@ -233,13 +233,19 @@
/****************************** Public constants *****************************/
/*****************************************************************************/
#define Log_PLATFORM_VERSION "SWAD 16.220.4 (2017-05-21)"
#define Log_PLATFORM_VERSION "SWAD 16.220.5 (2017-05-21)"
#define CSS_FILE "swad16.209.3.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.220.5: May 21, 2017 Changes related with new role. Not finished. (219452 lines)
3 changes necessary in database:
INSERT INTO actions (ActCod,Language,Obsolete,Txt) VALUES ('1639','es','N','Solicitar acept. inscrip. profesor no editor');
INSERT INTO actions (ActCod,Language,Obsolete,Txt) VALUES ('1640','es','N','Aceptar inscrip. como profesor no editor');
INSERT INTO actions (ActCod,Language,Obsolete,Txt) VALUES ('1641','es','N','Rechazar inscrip. como profesor no editor');
Version 16.220.4: May 21, 2017 Changes related with new role. Not finished. (219401 lines)
Version 16.220.3: May 21, 2017 Changes related with new role. Not finished. (219327 lines)
Version 16.220.2: May 21, 2017 Changes related with new role. Not finished. (219319 lines)

View File

@ -306,6 +306,9 @@ static void Enr_NotifyAfterEnrolment (struct UsrData *UsrDat,Rol_Role_t NewRole)
case Rol_STD:
NotifyEvent = Ntf_EVENT_ENROLMENT_STD;
break;
case Rol_NED_TCH:
NotifyEvent = Ntf_EVENT_ENROLMENT_NED_TCH;
break;
case Rol_TCH:
NotifyEvent = Ntf_EVENT_ENROLMENT_TCH;
break;
@ -371,6 +374,7 @@ void Enr_ReqAcceptRegisterInCrs (void)
extern const char *Txt_ROLES_SINGUL_abc[Rol_NUM_ROLES][Usr_NUM_SEXS];
extern const char *Txt_Confirm_my_enrolment;
extern const char *Txt_Remove_me_from_this_course;
Ntf_NotifyEvent_t NotifyEvent;
/***** Start frame *****/
Lay_StartRoundFrame (NULL,Txt_Enrolment,NULL,
@ -383,14 +387,38 @@ void Enr_ReqAcceptRegisterInCrs (void)
Ale_ShowAlert (Ale_INFO,Gbl.Alert.Txt);
/***** Send button to accept register in the current course *****/
Act_FormStart (Gbl.Usrs.Me.UsrDat.RoleInCurrentCrsDB == Rol_STD ? ActAccEnrStd :
ActAccEnrTch);
switch (Gbl.Usrs.Me.UsrDat.RoleInCurrentCrsDB)
{
case Rol_STD:
Act_FormStart (ActAccEnrStd);
break;
case Rol_NED_TCH:
Act_FormStart (ActAccEnrNEdTch);
break;
case Rol_TCH:
Act_FormStart (ActAccEnrTch);
break;
default:
Lay_ShowErrorAndExit ("Wrong role.");
}
Lay_PutCreateButtonInline (Txt_Confirm_my_enrolment);
Act_FormEnd ();
/***** Send button to refuse register in the current course *****/
Act_FormStart (Gbl.Usrs.Me.UsrDat.RoleInCurrentCrsDB == Rol_STD ? ActRemMe_Std :
ActRemMe_Tch);
switch (Gbl.Usrs.Me.UsrDat.RoleInCurrentCrsDB)
{
case Rol_STD:
Act_FormStart (ActRemMe_Std);
break;
case Rol_NED_TCH:
Act_FormStart (ActRemMe_NEdTch);
break;
case Rol_TCH:
Act_FormStart (ActRemMe_Tch);
break;
default:
Lay_ShowErrorAndExit ("Wrong role.");
}
Lay_PutRemoveButtonInline (Txt_Remove_me_from_this_course);
Act_FormEnd ();
@ -398,9 +426,23 @@ void Enr_ReqAcceptRegisterInCrs (void)
Lay_EndRoundFrame ();
/***** Mark possible notification as seen *****/
Ntf_MarkNotifAsSeen (Gbl.Usrs.Me.UsrDat.RoleInCurrentCrsDB == Rol_STD ? Ntf_EVENT_ENROLMENT_STD :
Ntf_EVENT_ENROLMENT_TCH,
-1L,Gbl.CurrentCrs.Crs.CrsCod,
switch (Gbl.Usrs.Me.UsrDat.RoleInCurrentCrsDB)
{
case Rol_STD:
NotifyEvent = Ntf_EVENT_ENROLMENT_STD;
break;
case Rol_NED_TCH:
NotifyEvent = Ntf_EVENT_ENROLMENT_NED_TCH;
break;
case Rol_TCH:
NotifyEvent = Ntf_EVENT_ENROLMENT_TCH;
break;
default:
NotifyEvent = Ntf_EVENT_UNKNOWN;
Lay_ShowErrorAndExit ("Wrong role.");
break;
}
Ntf_MarkNotifAsSeen (NotifyEvent,-1L,Gbl.CurrentCrs.Crs.CrsCod,
Gbl.Usrs.Me.UsrDat.UsrCod);
}