Version 14.72.4

This commit is contained in:
Antonio Cañas Vargas 2015-02-01 17:43:34 +01:00
parent d2291f1f04
commit 4e431a9be9
3 changed files with 101 additions and 478 deletions

View File

@ -39,11 +39,12 @@
/****************************** Public constants *****************************/ /****************************** Public constants *****************************/
/*****************************************************************************/ /*****************************************************************************/
#define Log_PLATFORM_VERSION "SWAD 14.72.3 (2015/02/01)" #define Log_PLATFORM_VERSION "SWAD 14.72.4 (2015/02/01)"
// Number of lines (includes comments but not blank lines) has been got with the following command: // 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 | tail -1 // nl swad*.c swad*.h css/swad*.css py/swad*.py js/swad*.js soap/swad*.h | tail -1
/* /*
Version 14.72.4: Feb 01, 2015 Refactoring of registering and removing admins. (176787 lines)
Version 14.72.3: Feb 01, 2015 Refactoring of registering and removing admins. (177139 lines) Version 14.72.3: Feb 01, 2015 Refactoring of registering and removing admins. (177139 lines)
Version 14.72.2: Feb 01, 2015 Refactoring of registering and removing admins. (177496 lines) Version 14.72.2: Feb 01, 2015 Refactoring of registering and removing admins. (177496 lines)
Version 14.72.1: Feb 01, 2015 New options to register and remove institution and centre admins. (177477 lines) Version 14.72.1: Feb 01, 2015 New options to register and remove institution and centre admins. (177477 lines)

View File

@ -107,18 +107,15 @@ static void Enr_AskIfRegRemUsr (struct ListUsrCods *ListUsrCods);
static void Enr_ShowFormToEditOtherUsr (void); static void Enr_ShowFormToEditOtherUsr (void);
static void Enr_RegisterAdminInCurrentIns (struct UsrData *UsrDat); static void Enr_AddAdm (Sco_Scope_t Scope,long Cod,const char *InsCtrDegName);
static void Enr_RegisterAdminInCurrentCtr (struct UsrData *UsrDat); static void Enr_RegisterAdmin (struct UsrData *UsrDat,Sco_Scope_t Scope,
static void Enr_RegisterAdminInCurrentDeg (struct UsrData *UsrDat); long Cod,const char *InsCtrDegName);
static void Enr_ReqRemOrRemUsrFromCrs (Enr_ReqDelOrDelUsr_t ReqDelOrDelUsr); static void Enr_ReqRemOrRemUsrFromCrs (Enr_ReqDelOrDelUsr_t ReqDelOrDelUsr);
static void Enr_ReqRemAdmOfDeg (void); static void Enr_ReqRemAdmOfDeg (void);
static void Enr_ReqRemOrRemAdm (Enr_ReqDelOrDelUsr_t ReqDelOrDelUsr,Sco_Scope_t Scope, static void Enr_ReqRemOrRemAdm (Enr_ReqDelOrDelUsr_t ReqDelOrDelUsr,Sco_Scope_t Scope,
long Cod,const char *InsCtrDegName); long Cod,const char *InsCtrDegName);
static void Enr_ReqAddAdmOfIns (void); static void Enr_ReqAddAdm (Sco_Scope_t Scope,long Cod,const char *InsCtrDegName);
static void Enr_ReqAddAdmOfCtr (void);
static void Enr_ReqAddAdmOfDeg (void);
static void Enr_AskIfRemoveUsrFromCrs (struct UsrData *UsrDat,bool ItsMe); static void Enr_AskIfRemoveUsrFromCrs (struct UsrData *UsrDat,bool ItsMe);
static void Enr_EffectivelyRemUsrFromCrs (struct UsrData *UsrDat,struct Course *Crs, static void Enr_EffectivelyRemUsrFromCrs (struct UsrData *UsrDat,struct Course *Crs,
Enr_RemoveUsrWorks_t RemoveUsrWorks,Cns_QuietOrVerbose_t QuietOrVerbose); Enr_RemoveUsrWorks_t RemoveUsrWorks,Cns_QuietOrVerbose_t QuietOrVerbose);
@ -2849,28 +2846,7 @@ static void Enr_ShowFormToEditOtherUsr (void)
void Enr_AddAdmToIns (void) void Enr_AddAdmToIns (void)
{ {
extern const char *Txt_User_not_found_or_you_do_not_have_permission_; Enr_AddAdm (Sco_SCOPE_INSTITUTION,Gbl.CurrentIns.Ins.InsCod,Gbl.CurrentIns.Ins.FullName);
if (Gbl.CurrentIns.Ins.InsCod > 0)
{
/***** Get plain user's ID of the user to add/modify *****/
if (Usr_GetParamOtherUsrCodEncryptedAndGetUsrData ())
{
/* Check if it's allowed to register this administrator in institution */
if (Gbl.Usrs.Me.LoggedRole == Rol_ROLE_SUPERUSER)
{
/***** Register administrator in current institution in database *****/
Enr_RegisterAdminInCurrentIns (&Gbl.Usrs.Other.UsrDat);
/***** Show user's record *****/
Rec_ShowCommonRecordUnmodifiable (&Gbl.Usrs.Other.UsrDat);
}
else
Lay_ShowAlert (Lay_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
}
else
Lay_ShowAlert (Lay_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
}
} }
/*****************************************************************************/ /*****************************************************************************/
@ -2879,28 +2855,7 @@ void Enr_AddAdmToIns (void)
void Enr_AddAdmToCtr (void) void Enr_AddAdmToCtr (void)
{ {
extern const char *Txt_User_not_found_or_you_do_not_have_permission_; Enr_AddAdm (Sco_SCOPE_CENTRE,Gbl.CurrentCtr.Ctr.CtrCod,Gbl.CurrentCtr.Ctr.FullName);
if (Gbl.CurrentCtr.Ctr.CtrCod > 0)
{
/***** Get plain user's ID of the user to add/modify *****/
if (Usr_GetParamOtherUsrCodEncryptedAndGetUsrData ())
{
/* Check if it's allowed to register this administrator in centre */
if (Gbl.Usrs.Me.LoggedRole == Rol_ROLE_SUPERUSER)
{
/***** Register administrator in current centre in database *****/
Enr_RegisterAdminInCurrentCtr (&Gbl.Usrs.Other.UsrDat);
/***** Show user's record *****/
Rec_ShowCommonRecordUnmodifiable (&Gbl.Usrs.Other.UsrDat);
}
else
Lay_ShowAlert (Lay_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
}
else
Lay_ShowAlert (Lay_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
}
} }
/*****************************************************************************/ /*****************************************************************************/
@ -2908,10 +2863,19 @@ void Enr_AddAdmToCtr (void)
/*****************************************************************************/ /*****************************************************************************/
void Enr_AddAdmToDeg (void) void Enr_AddAdmToDeg (void)
{
Enr_AddAdm (Sco_SCOPE_DEGREE,Gbl.CurrentDeg.Deg.DegCod,Gbl.CurrentDeg.Deg.FullName);
}
/*****************************************************************************/
/******************* Add an administrator to current degree ******************/
/*****************************************************************************/
static void Enr_AddAdm (Sco_Scope_t Scope,long Cod,const char *InsCtrDegName)
{ {
extern const char *Txt_User_not_found_or_you_do_not_have_permission_; extern const char *Txt_User_not_found_or_you_do_not_have_permission_;
if (Gbl.CurrentDeg.Deg.DegCod > 0) if (Cod > 0)
{ {
/***** Get plain user's ID of the user to add/modify *****/ /***** Get plain user's ID of the user to add/modify *****/
if (Usr_GetParamOtherUsrCodEncryptedAndGetUsrData ()) if (Usr_GetParamOtherUsrCodEncryptedAndGetUsrData ())
@ -2920,7 +2884,8 @@ void Enr_AddAdmToDeg (void)
if (Gbl.Usrs.Me.LoggedRole == Rol_ROLE_SUPERUSER) if (Gbl.Usrs.Me.LoggedRole == Rol_ROLE_SUPERUSER)
{ {
/***** Register administrator in current degree in database *****/ /***** Register administrator in current degree in database *****/
Enr_RegisterAdminInCurrentDeg (&Gbl.Usrs.Other.UsrDat); Enr_RegisterAdmin (&Gbl.Usrs.Other.UsrDat,Scope,
Cod,InsCtrDegName);
/***** Show user's record *****/ /***** Show user's record *****/
Rec_ShowCommonRecordUnmodifiable (&Gbl.Usrs.Other.UsrDat); Rec_ShowCommonRecordUnmodifiable (&Gbl.Usrs.Other.UsrDat);
@ -2937,88 +2902,27 @@ void Enr_AddAdmToDeg (void)
/**************** Register administrator in current institution **************/ /**************** Register administrator in current institution **************/
/*****************************************************************************/ /*****************************************************************************/
static void Enr_RegisterAdminInCurrentIns (struct UsrData *UsrDat) static void Enr_RegisterAdmin (struct UsrData *UsrDat,Sco_Scope_t Scope,long Cod,const char *InsCtrDegName)
{ {
extern const char *Txt_THE_USER_X_is_already_an_administrator_of_the_institution_Y; extern const char *Sco_ScopeAdminDB[Sco_NUM_SCOPES];
extern const char *Txt_THE_USER_X_has_been_enrolled_as_administrator_of_the_institution_Y; extern const char *Txt_THE_USER_X_is_already_an_administrator_of_Y;
extern const char *Txt_THE_USER_X_has_been_enrolled_as_administrator_of_Y;
char Query[512]; char Query[512];
/***** Check if user was and administrator of current institution *****/ /***** Check if user was and administrator of current institution/centre/degree *****/
if (Usr_CheckIfUsrIsAdm (UsrDat->UsrCod, if (Usr_CheckIfUsrIsAdm (UsrDat->UsrCod,Scope,Cod))
Sco_SCOPE_INSTITUTION, sprintf (Gbl.Message,Txt_THE_USER_X_is_already_an_administrator_of_Y,
Gbl.CurrentIns.Ins.InsCod)) UsrDat->FullName,InsCtrDegName);
sprintf (Gbl.Message,Txt_THE_USER_X_is_already_an_administrator_of_the_institution_Y, else // User was not administrator of current institution/centre/degree
UsrDat->FullName,Gbl.CurrentIns.Ins.FullName);
else // User was not administrator of current institution
{ {
/***** Insert or replace administrator in current institution *****/ /***** Insert or replace administrator in current institution/centre/degree *****/
sprintf (Query,"REPLACE INTO admin (UsrCod,Scope,Cod)" sprintf (Query,"REPLACE INTO admin (UsrCod,Scope,Cod)"
" VALUES ('%ld','Ins','%ld')", " VALUES ('%ld','%s','%ld')",
UsrDat->UsrCod,Gbl.CurrentIns.Ins.InsCod); UsrDat->UsrCod,Sco_ScopeAdminDB[Scope],Cod);
DB_QueryREPLACE (Query,"can not create administrator of institution"); DB_QueryREPLACE (Query,"can not create administrator");
sprintf (Gbl.Message,Txt_THE_USER_X_has_been_enrolled_as_administrator_of_the_institution_Y, sprintf (Gbl.Message,Txt_THE_USER_X_has_been_enrolled_as_administrator_of_Y,
UsrDat->FullName,Gbl.CurrentIns.Ins.FullName); UsrDat->FullName,InsCtrDegName);
}
Lay_ShowAlert (Lay_SUCCESS,Gbl.Message);
}
/*****************************************************************************/
/******************* Register administrator in current centre ****************/
/*****************************************************************************/
static void Enr_RegisterAdminInCurrentCtr (struct UsrData *UsrDat)
{
extern const char *Txt_THE_USER_X_is_already_an_administrator_of_the_centre_Y;
extern const char *Txt_THE_USER_X_has_been_enrolled_as_administrator_of_the_centre_Y;
char Query[512];
/***** Check if user was and administrator of current centre *****/
if (Usr_CheckIfUsrIsAdm (UsrDat->UsrCod,
Sco_SCOPE_CENTRE,
Gbl.CurrentCtr.Ctr.CtrCod))
sprintf (Gbl.Message,Txt_THE_USER_X_is_already_an_administrator_of_the_centre_Y,
UsrDat->FullName,Gbl.CurrentCtr.Ctr.FullName);
else // User was not administrator of current centre
{
/***** Insert or replace administrator in current centre *****/
sprintf (Query,"REPLACE INTO admin (UsrCod,Scope,Cod)"
" VALUES ('%ld','Ctr','%ld')",
UsrDat->UsrCod,Gbl.CurrentCtr.Ctr.CtrCod);
DB_QueryREPLACE (Query,"can not create administrator of centre");
sprintf (Gbl.Message,Txt_THE_USER_X_has_been_enrolled_as_administrator_of_the_centre_Y,
UsrDat->FullName,Gbl.CurrentCtr.Ctr.FullName);
}
Lay_ShowAlert (Lay_SUCCESS,Gbl.Message);
}
/*****************************************************************************/
/******************* Register administrator in current degree ****************/
/*****************************************************************************/
static void Enr_RegisterAdminInCurrentDeg (struct UsrData *UsrDat)
{
extern const char *Txt_THE_USER_X_is_already_an_administrator_of_the_degree_Y;
extern const char *Txt_THE_USER_X_has_been_enrolled_as_administrator_of_the_degree_Y;
char Query[512];
/***** Check if user was and administrator of current degree *****/
if (Usr_CheckIfUsrIsAdm (UsrDat->UsrCod,
Sco_SCOPE_DEGREE,
Gbl.CurrentDeg.Deg.DegCod))
sprintf (Gbl.Message,Txt_THE_USER_X_is_already_an_administrator_of_the_degree_Y,
UsrDat->FullName,Gbl.CurrentDeg.Deg.FullName);
else // User was not administrator of current degree
{
/***** Insert or replace administrator in current degree *****/
sprintf (Query,"REPLACE INTO admin (UsrCod,Scope,Cod)"
" VALUES ('%ld','Deg','%ld')",
UsrDat->UsrCod,Gbl.CurrentDeg.Deg.DegCod);
DB_QueryREPLACE (Query,"can not create administrator of degree");
sprintf (Gbl.Message,Txt_THE_USER_X_has_been_enrolled_as_administrator_of_the_degree_Y,
UsrDat->FullName,Gbl.CurrentDeg.Deg.FullName);
} }
Lay_ShowAlert (Lay_SUCCESS,Gbl.Message); Lay_ShowAlert (Lay_SUCCESS,Gbl.Message);
} }
@ -3205,142 +3109,46 @@ static void Enr_ReqRemOrRemAdm (Enr_ReqDelOrDelUsr_t ReqDelOrDelUsr,Sco_Scope_t
/**** Ask if really wanted to add an administrator to current institution ****/ /**** Ask if really wanted to add an administrator to current institution ****/
/*****************************************************************************/ /*****************************************************************************/
static void Enr_ReqAddAdmOfIns (void) static void Enr_ReqAddAdm (Sco_Scope_t Scope,long Cod,const char *InsCtrDegName)
{ {
extern const char *Txt_THE_USER_X_is_already_an_administrator_of_the_institution_Y; extern const char *Txt_THE_USER_X_is_already_an_administrator_of_Y;
extern const char *Txt_Do_you_really_want_to_register_the_following_user_as_an_administrator_of_the_institution_X; extern const char *Txt_Do_you_really_want_to_register_the_following_user_as_an_administrator_of_X;
extern const char *Txt_Register_user_IN_A_COURSE_OR_DEGREE; extern const char *Txt_Register_user_IN_A_COURSE_OR_DEGREE;
extern const char *Txt_User_not_found_or_you_do_not_have_permission_; extern const char *Txt_User_not_found_or_you_do_not_have_permission_;
static const Act_Action_t Enr_ActNewAdm[Sco_NUM_SCOPES] =
{
ActUnk, // Sco_SCOPE_NONE
ActUnk, // Sco_SCOPE_PLATFORM,
ActUnk, // Sco_SCOPE_COUNTRY,
ActNewAdmIns, // Sco_SCOPE_INSTITUTION,
ActNewAdmCtr, // Sco_SCOPE_CENTRE,
ActNewAdmDeg, // Sco_SCOPE_DEGREE,
ActUnk, // Sco_SCOPE_COURSE,
};
if (Gbl.CurrentIns.Ins.InsCod > 0) if (Cod > 0)
{ {
/***** Get user's identificator of the user to register as admin *****/ /***** Get user's identificator of the user to register as admin *****/
if (Usr_GetParamOtherUsrCodEncryptedAndGetUsrData ()) if (Usr_GetParamOtherUsrCodEncryptedAndGetUsrData ())
{ {
/* Check if it's allowed to register this administrator in institution */ /* Check if it's allowed to register this administrator in institution/centre/degree */
if (Gbl.Usrs.Me.LoggedRole == Rol_ROLE_SUPERUSER) if (Gbl.Usrs.Me.LoggedRole == Rol_ROLE_SUPERUSER)
{ {
if (Usr_CheckIfUsrIsAdm (Gbl.Usrs.Other.UsrDat.UsrCod, if (Usr_CheckIfUsrIsAdm (Gbl.Usrs.Other.UsrDat.UsrCod,Scope,Cod)) // User is yet an administrator of current institution/centre/degree
Sco_SCOPE_INSTITUTION,
Gbl.CurrentIns.Ins.InsCod)) // User is yet an administrator of current institution
{ {
sprintf (Gbl.Message,Txt_THE_USER_X_is_already_an_administrator_of_the_institution_Y, sprintf (Gbl.Message,Txt_THE_USER_X_is_already_an_administrator_of_Y,
Gbl.Usrs.Other.UsrDat.FullName,Gbl.CurrentIns.Ins.FullName); Gbl.Usrs.Other.UsrDat.FullName,InsCtrDegName);
Lay_ShowAlert (Lay_INFO,Gbl.Message); Lay_ShowAlert (Lay_INFO,Gbl.Message);
Rec_ShowCommonRecordUnmodifiable (&Gbl.Usrs.Other.UsrDat); Rec_ShowCommonRecordUnmodifiable (&Gbl.Usrs.Other.UsrDat);
} }
else else
{ {
sprintf (Gbl.Message,Txt_Do_you_really_want_to_register_the_following_user_as_an_administrator_of_the_institution_X, sprintf (Gbl.Message,Txt_Do_you_really_want_to_register_the_following_user_as_an_administrator_of_X,
Gbl.CurrentIns.Ins.FullName); InsCtrDegName);
Lay_ShowAlert (Lay_INFO,Gbl.Message); Lay_ShowAlert (Lay_INFO,Gbl.Message);
Rec_ShowCommonRecordUnmodifiable (&Gbl.Usrs.Other.UsrDat); Rec_ShowCommonRecordUnmodifiable (&Gbl.Usrs.Other.UsrDat);
Act_FormStart (ActNewAdmIns); Act_FormStart (Enr_ActNewAdm[Scope]);
Usr_PutParamOtherUsrCodEncrypted (Gbl.Usrs.Other.UsrDat.EncryptedUsrCod);
fprintf (Gbl.F.Out,"<div style=\"text-align:center;\">"
"<input type=\"submit\" value=\"%s\" />"
"</div>"
"</form>",
Txt_Register_user_IN_A_COURSE_OR_DEGREE);
}
}
else
Lay_ShowAlert (Lay_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
}
else
Lay_ShowAlert (Lay_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
}
}
/*****************************************************************************/
/****** Ask if really wanted to add an administrator to current centre *******/
/*****************************************************************************/
static void Enr_ReqAddAdmOfCtr (void)
{
extern const char *Txt_THE_USER_X_is_already_an_administrator_of_the_centre_Y;
extern const char *Txt_Do_you_really_want_to_register_the_following_user_as_an_administrator_of_the_centre_X;
extern const char *Txt_Register_user_IN_A_COURSE_OR_DEGREE;
extern const char *Txt_User_not_found_or_you_do_not_have_permission_;
if (Gbl.CurrentCtr.Ctr.CtrCod > 0)
{
/***** Get user's identificator of the user to register as admin *****/
if (Usr_GetParamOtherUsrCodEncryptedAndGetUsrData ())
{
/* Check if it's allowed to register this administrator in centre */
if (Gbl.Usrs.Me.LoggedRole == Rol_ROLE_SUPERUSER)
{
if (Usr_CheckIfUsrIsAdm (Gbl.Usrs.Other.UsrDat.UsrCod,
Sco_SCOPE_CENTRE,
Gbl.CurrentCtr.Ctr.CtrCod)) // User is yet an administrator of current centre
{
sprintf (Gbl.Message,Txt_THE_USER_X_is_already_an_administrator_of_the_centre_Y,
Gbl.Usrs.Other.UsrDat.FullName,Gbl.CurrentCtr.Ctr.FullName);
Lay_ShowAlert (Lay_INFO,Gbl.Message);
Rec_ShowCommonRecordUnmodifiable (&Gbl.Usrs.Other.UsrDat);
}
else
{
sprintf (Gbl.Message,Txt_Do_you_really_want_to_register_the_following_user_as_an_administrator_of_the_centre_X,
Gbl.CurrentCtr.Ctr.FullName);
Lay_ShowAlert (Lay_INFO,Gbl.Message);
Rec_ShowCommonRecordUnmodifiable (&Gbl.Usrs.Other.UsrDat);
Act_FormStart (ActNewAdmCtr);
Usr_PutParamOtherUsrCodEncrypted (Gbl.Usrs.Other.UsrDat.EncryptedUsrCod);
fprintf (Gbl.F.Out,"<div style=\"text-align:center;\">"
"<input type=\"submit\" value=\"%s\" />"
"</div>"
"</form>",
Txt_Register_user_IN_A_COURSE_OR_DEGREE);
}
}
else
Lay_ShowAlert (Lay_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
}
else
Lay_ShowAlert (Lay_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
}
}
/*****************************************************************************/
/****** Ask if really wanted to add an administrator to current degree *******/
/*****************************************************************************/
static void Enr_ReqAddAdmOfDeg (void)
{
extern const char *Txt_THE_USER_X_is_already_an_administrator_of_the_degree_Y;
extern const char *Txt_Do_you_really_want_to_register_the_following_user_as_an_administrator_of_the_degree_X;
extern const char *Txt_Register_user_IN_A_COURSE_OR_DEGREE;
extern const char *Txt_User_not_found_or_you_do_not_have_permission_;
if (Gbl.CurrentDeg.Deg.DegCod > 0)
{
/***** Get user's identificator of the user to register as admin *****/
if (Usr_GetParamOtherUsrCodEncryptedAndGetUsrData ())
{
/* Check if it's allowed to register this administrator in degree */
if (Gbl.Usrs.Me.LoggedRole == Rol_ROLE_SUPERUSER)
{
if (Usr_CheckIfUsrIsAdm (Gbl.Usrs.Other.UsrDat.UsrCod,
Sco_SCOPE_DEGREE,
Gbl.CurrentDeg.Deg.DegCod)) // User is yet an administrator of current degree
{
sprintf (Gbl.Message,Txt_THE_USER_X_is_already_an_administrator_of_the_degree_Y,
Gbl.Usrs.Other.UsrDat.FullName,Gbl.CurrentDeg.Deg.FullName);
Lay_ShowAlert (Lay_INFO,Gbl.Message);
Rec_ShowCommonRecordUnmodifiable (&Gbl.Usrs.Other.UsrDat);
}
else
{
sprintf (Gbl.Message,Txt_Do_you_really_want_to_register_the_following_user_as_an_administrator_of_the_degree_X,
Gbl.CurrentDeg.Deg.FullName);
Lay_ShowAlert (Lay_INFO,Gbl.Message);
Rec_ShowCommonRecordUnmodifiable (&Gbl.Usrs.Other.UsrDat);
Act_FormStart (ActNewAdmDeg);
Usr_PutParamOtherUsrCodEncrypted (Gbl.Usrs.Other.UsrDat.EncryptedUsrCod); Usr_PutParamOtherUsrCodEncrypted (Gbl.Usrs.Other.UsrDat.EncryptedUsrCod);
fprintf (Gbl.F.Out,"<div style=\"text-align:center;\">" fprintf (Gbl.F.Out,"<div style=\"text-align:center;\">"
"<input type=\"submit\" value=\"%s\" />" "<input type=\"submit\" value=\"%s\" />"
@ -3502,19 +3310,22 @@ void Enr_ModifAndShowUsrCardAndRegInCrsAndGrps (void)
break; break;
case Enr_REGISTER_ONE_DEGREE_ADMIN: case Enr_REGISTER_ONE_DEGREE_ADMIN:
if (Gbl.Usrs.Me.LoggedRole == Rol_ROLE_SUPERUSER) if (Gbl.Usrs.Me.LoggedRole == Rol_ROLE_SUPERUSER)
Enr_ReqAddAdmOfDeg (); Enr_ReqAddAdm (Sco_SCOPE_DEGREE,Gbl.CurrentDeg.Deg.DegCod,
Gbl.CurrentDeg.Deg.FullName);
else else
Error = true; Error = true;
break; break;
case Enr_REGISTER_ONE_CENTRE_ADMIN: case Enr_REGISTER_ONE_CENTRE_ADMIN:
if (Gbl.Usrs.Me.LoggedRole == Rol_ROLE_SUPERUSER) if (Gbl.Usrs.Me.LoggedRole == Rol_ROLE_SUPERUSER)
Enr_ReqAddAdmOfCtr (); Enr_ReqAddAdm (Sco_SCOPE_CENTRE,Gbl.CurrentCtr.Ctr.CtrCod,
Gbl.CurrentCtr.Ctr.FullName);
else else
Error = true; Error = true;
break; break;
case Enr_REGISTER_ONE_INSTITUTION_ADMIN: case Enr_REGISTER_ONE_INSTITUTION_ADMIN:
if (Gbl.Usrs.Me.LoggedRole == Rol_ROLE_SUPERUSER) if (Gbl.Usrs.Me.LoggedRole == Rol_ROLE_SUPERUSER)
Enr_ReqAddAdmOfIns (); Enr_ReqAddAdm (Sco_SCOPE_INSTITUTION,Gbl.CurrentIns.Ins.InsCod,
Gbl.CurrentIns.Ins.FullName);
else else
Error = true; Error = true;
break; break;

View File

@ -8247,94 +8247,34 @@ const char *Txt_Do_you_really_want_to_delete_the_unread_messages_received_from_U
" from %s from %s related to <strong>%s</strong>?"; // Necessita de tradução " from %s from %s related to <strong>%s</strong>?"; // Necessita de tradução
#endif #endif
const char *Txt_Do_you_really_want_to_register_the_following_user_as_an_administrator_of_the_centre_X = // Warning: it is very important to include %s in the following sentences const char *Txt_Do_you_really_want_to_register_the_following_user_as_an_administrator_of_X = // Warning: it is very important to include %s in the following sentences
#if L==0 #if L==0
"&iquest;Realmente desea inscribir el siguiente usuario" "&iquest;Realmente desea inscribir el siguiente usuario"
" como administrador del centro <strong>%s</strong>?"; // Necessita traduccio " como administrador de <strong>%s</strong>?"; // Necessita traduccio
#elif L==1 #elif L==1
"Do you really want to register the following user" "Do you really want to register the following user"
" as an administrator of the centre <strong>%s</strong>?"; // Need Übersetzung " as an administrator of <strong>%s</strong>?"; // Need Übersetzung
#elif L==2 #elif L==2
"Do you really want to register the following user" "Do you really want to register the following user"
" as an administrator of the centre <strong>%s</strong>?"; " as an administrator of <strong>%s</strong>?";
#elif L==3 #elif L==3
"&iquest;Realmente desea inscribir el siguiente usuario" "&iquest;Realmente desea inscribir el siguiente usuario"
" como administrador del centro <strong>%s</strong>?"; " como administrador de <strong>%s</strong>?";
#elif L==4 #elif L==4
"Do you really want to register the following user" "Do you really want to register the following user"
" as an administrator of the centre <strong>%s</strong>?"; // Besoin de traduction " as an administrator of <strong>%s</strong>?"; // Besoin de traduction
#elif L==5 #elif L==5
"&iquest;Realmente desea inscribir el siguiente usuario" "&iquest;Realmente desea inscribir el siguiente usuario"
" como administrador del centro <strong>%s</strong>?"; // Okoteve traducción " como administrador de <strong>%s</strong>?"; // Okoteve traducción
#elif L==6 #elif L==6
"Vuoi realmente registrare il seguente utente" "Vuoi realmente registrare il seguente utente"
" come amministratore del centro <strong>%s</strong>?"; " come amministratore de <strong>%s</strong>?";
#elif L==7 #elif L==7
"Czy na pewno chcesz sie zarejestrowac nastepujace u&zdot;ytkownika" "Czy na pewno chcesz sie zarejestrowac nastepujace u&zdot;ytkownika"
" jako administratora centrum <strong>%s</strong>?"; " jako administratora <strong>%s</strong>?";
#elif L==8 #elif L==8
"Do you really want to register the following user" "Do you really want to register the following user"
" as an administrator of the centre <strong>%s</strong>?"; // Necessita de tradução " as an administrator of <strong>%s</strong>?"; // Necessita de tradução
#endif
const char *Txt_Do_you_really_want_to_register_the_following_user_as_an_administrator_of_the_degree_X = // Warning: it is very important to include %s in the following sentences
#if L==0
"&iquest;Realmente desea inscribir el siguiente usuario"
" como administrador de la titulaci&oacute;n <strong>%s</strong>?"; // Necessita traduccio
#elif L==1
"Do you really want to register the following user"
" as an administrator of the degree <strong>%s</strong>?"; // Need Übersetzung
#elif L==2
"Do you really want to register the following user"
" as an administrator of the degree <strong>%s</strong>?";
#elif L==3
"&iquest;Realmente desea inscribir el siguiente usuario"
" como administrador de la titulaci&oacute;n <strong>%s</strong>?";
#elif L==4
"Do you really want to register the following user"
" as an administrator of the degree <strong>%s</strong>?"; // Besoin de traduction
#elif L==5
"&iquest;Realmente desea inscribir el siguiente usuario"
" como administrador de la titulaci&oacute;n <strong>%s</strong>?"; // Okoteve traducción
#elif L==6
"Vuoi realmente registrare il seguente utente"
" come amministratore della laurea <strong>%s</strong>?";
#elif L==7
"Czy na pewno chcesz sie zarejestrowac nastepujace u&zdot;ytkownika"
" jako administratora stopnia <strong>%s</strong>?";
#elif L==8
"Do you really want to register the following user"
" as an administrator of the degree <strong>%s</strong>?"; // Necessita de tradução
#endif
const char *Txt_Do_you_really_want_to_register_the_following_user_as_an_administrator_of_the_institution_X = // Warning: it is very important to include %s in the following sentences
#if L==0
"&iquest;Realmente desea inscribir el siguiente usuario"
" como administrador de la instituci&oacute;n <strong>%s</strong>?"; // Necessita traduccio
#elif L==1
"Do you really want to register the following user"
" as an administrator of the institution <strong>%s</strong>?"; // Need Übersetzung
#elif L==2
"Do you really want to register the following user"
" as an administrator of the institution <strong>%s</strong>?";
#elif L==3
"&iquest;Realmente desea inscribir el siguiente usuario"
" como administrador de la instituci&oacute;n <strong>%s</strong>?";
#elif L==4
"Do you really want to register the following user"
" as an administrator of the institution <strong>%s</strong>?"; // Besoin de traduction
#elif L==5
"&iquest;Realmente desea inscribir el siguiente usuario"
" como administrador de la instituci&oacute;n <strong>%s</strong>?"; // Okoteve traducción
#elif L==6
"Vuoi realmente registrare il seguente utente"
" come amministratore della istituzione <strong>%s</strong>?";
#elif L==7
"Czy na pewno chcesz sie zarejestrowac nastepujace u&zdot;ytkownika"
" jako administratora instytucji <strong>%s</strong>?";
#elif L==8
"Do you really want to register the following user"
" as an administrator of the institution <strong>%s</strong>?"; // Necessita de tradução
#endif #endif
const char *Txt_Do_you_really_want_to_reject_the_enrollment_request_ = // Warning: it is very important to include three %s in the following sentences const char *Txt_Do_you_really_want_to_reject_the_enrollment_request_ = // Warning: it is very important to include three %s in the following sentences
@ -41842,94 +41782,34 @@ const char *Txt_THE_USER_X_already_exists_in_Y_but_is_not_yet_enrolled_in_the_co
" in the course <strong>%s</strong>."; // Necessita de tradução " in the course <strong>%s</strong>."; // Necessita de tradução
#endif #endif
const char *Txt_THE_USER_X_has_been_enrolled_as_administrator_of_the_centre_Y = // Warning: it is very important to include two %s in the following sentences const char *Txt_THE_USER_X_has_been_enrolled_as_administrator_of_Y = // Warning: it is very important to include two %s in the following sentences
#if L==0 #if L==0
"<strong>%s</strong> ha sido a&ntilde;adido/a como administrador/a" "<strong>%s</strong> ha sido a&ntilde;adido/a"
" del centro <strong>%s</strong>."; // Necessita traduccio " como administrador/a de <strong>%s</strong>."; // Necessita traduccio
#elif L==1 #elif L==1
"<strong>%s</strong> has been enrolled as administrator" "<strong>%s</strong> has been enrolled"
" of the centre <strong>%s</strong>."; // Übersetzung notwendig " as administrator of <strong>%s</strong>."; // Übersetzung notwendig
#elif L==2 #elif L==2
"<strong>%s</strong> has been enrolled as administrator" "<strong>%s</strong> has been enrolled"
" of the centre <strong>%s</strong>."; " as administrator of <strong>%s</strong>.";
#elif L==3 #elif L==3
"<strong>%s</strong> ha sido a&ntilde;adido/a como administrador/a" "<strong>%s</strong> ha sido a&ntilde;adido/a"
" del centro <strong>%s</strong>."; " como administrador/a de <strong>%s</strong>.";
#elif L==4 #elif L==4
"<strong>%s</strong> has been enrolled as administrator" "<strong>%s</strong> has been enrolled"
" of the centre <strong>%s</strong>."; // Besoin de traduction " as administrator of <strong>%s</strong>."; // Besoin de traduction
#elif L==5 #elif L==5
"<strong>%s</strong> ha sido a&ntilde;adido/a como administrador/a" "<strong>%s</strong> ha sido a&ntilde;adido/a"
" del centro <strong>%s</strong>."; // Okoteve traducción " como administrador/a de <strong>%s</strong>."; // Okoteve traducción
#elif L==6 #elif L==6
"<strong>%s</strong> &egrave; stato registrato come amministratore" "<strong>%s</strong> &egrave; stato registrato"
" del centro <strong>%s</strong>."; " come amministratore de <strong>%s</strong>.";
#elif L==7 #elif L==7
"<strong>%s</strong> has been enrolled as administrator" "<strong>%s</strong> has been enrolled"
" of the centre <strong>%s</strong>."; // Potrzebujesz tlumaczenie " as administrator of <strong>%s</strong>."; // Potrzebujesz tlumaczenie
#elif L==8 #elif L==8
"<strong>%s</strong> has been enrolled as administrator" "<strong>%s</strong> has been enrolled"
" of the centre <strong>%s</strong>."; // Necessita de tradução " as administrator of <strong>%s</strong>."; // Necessita de tradução
#endif
const char *Txt_THE_USER_X_has_been_enrolled_as_administrator_of_the_degree_Y = // Warning: it is very important to include two %s in the following sentences
#if L==0
"<strong>%s</strong> ha sido a&ntilde;adido/a como administrador/a"
" de la titulaci&oacute;n <strong>%s</strong>."; // Necessita traduccio
#elif L==1
"<strong>%s</strong> has been enrolled as administrator"
" of the degree <strong>%s</strong>."; // Übersetzung notwendig
#elif L==2
"<strong>%s</strong> has been enrolled as administrator"
" of the degree <strong>%s</strong>.";
#elif L==3
"<strong>%s</strong> ha sido a&ntilde;adido/a como administrador/a"
" de la titulaci&oacute;n <strong>%s</strong>.";
#elif L==4
"<strong>%s</strong> has been enrolled as administrator"
" of the degree <strong>%s</strong>."; // Besoin de traduction
#elif L==5
"<strong>%s</strong> ha sido a&ntilde;adido/a como administrador/a"
" de la titulaci&oacute;n <strong>%s</strong>."; // Okoteve traducción
#elif L==6
"<strong>%s</strong> &egrave; stato registrato come amministratore"
" della laurea <strong>%s</strong>.";
#elif L==7
"<strong>%s</strong> has been enrolled as administrator"
" of the degree <strong>%s</strong>."; // Potrzebujesz tlumaczenie
#elif L==8
"<strong>%s</strong> has been enrolled as administrator"
" of the degree <strong>%s</strong>."; // Necessita de tradução
#endif
const char *Txt_THE_USER_X_has_been_enrolled_as_administrator_of_the_institution_Y = // Warning: it is very important to include two %s in the following sentences
#if L==0
"<strong>%s</strong> ha sido a&ntilde;adido/a como administrador/a"
" de la instituci&oacute;n <strong>%s</strong>."; // Necessita traduccio
#elif L==1
"<strong>%s</strong> has been enrolled as administrator"
" of the institution <strong>%s</strong>."; // Übersetzung notwendig
#elif L==2
"<strong>%s</strong> has been enrolled as administrator"
" of the institution <strong>%s</strong>.";
#elif L==3
"<strong>%s</strong> ha sido a&ntilde;adido/a como administrador/a"
" de la instituci&oacute;n <strong>%s</strong>.";
#elif L==4
"<strong>%s</strong> has been enrolled as administrator"
" of the institution <strong>%s</strong>."; // Besoin de traduction
#elif L==5
"<strong>%s</strong> ha sido a&ntilde;adido/a como administrador/a"
" de la instituci&oacute;n <strong>%s</strong>."; // Okoteve traducción
#elif L==6
"<strong>%s</strong> &egrave; stato registrato come amministratore"
" della istituzione <strong>%s</strong>.";
#elif L==7
"<strong>%s</strong> has been enrolled as administrator"
" of the institution <strong>%s</strong>."; // Potrzebujesz tlumaczenie
#elif L==8
"<strong>%s</strong> has been enrolled as administrator"
" of the institution <strong>%s</strong>."; // Necessita de tradução
#endif #endif
const char *Txt_THE_USER_X_has_been_enrolled_in_the_course_Y = // Warning: it is very important to include two %s in the following sentences const char *Txt_THE_USER_X_has_been_enrolled_in_the_course_Y = // Warning: it is very important to include two %s in the following sentences
@ -42256,94 +42136,25 @@ const char *Txt_THE_USER_X_has_not_been_removed_from_any_group = // Warning: it
" from any group."; // Necessita de tradução " from any group."; // Necessita de tradução
#endif #endif
const char *Txt_THE_USER_X_is_already_an_administrator_of_the_centre_Y = // Warning: it is very important to include two %s in the following sentences const char *Txt_THE_USER_X_is_already_an_administrator_of_Y = // Warning: it is very important to include two %s in the following sentences
#if L==0 #if L==0
"<strong>%s</strong> ya es administrador/a" "<strong>%s</strong> ya es administrador/a de <strong>%s</strong>."; // Necessita traduccio
" del centro <strong>%s</strong>."; // Necessita traduccio
#elif L==1 #elif L==1
"<strong>%s</strong> is already an administrator" "<strong>%s</strong> is already an administrator of <strong>%s</strong>."; // Übersetzung notwendig
" of the centre <strong>%s</strong>."; // Übersetzung notwendig
#elif L==2 #elif L==2
"<strong>%s</strong> is already an administrator" "<strong>%s</strong> is already an administrator of <strong>%s</strong>.";
" of the centre <strong>%s</strong>.";
#elif L==3 #elif L==3
"<strong>%s</strong> ya es administrador/a" "<strong>%s</strong> ya es administrador/a de <strong>%s</strong>.";
" de la titulaci&oacute;n <strong>%s</strong>.";
#elif L==4 #elif L==4
"<strong>%s</strong> is already an administrator" "<strong>%s</strong> is already an administrator of <strong>%s</strong>."; // Besoin de traduction
" of the centre <strong>%s</strong>."; // Besoin de traduction
#elif L==5 #elif L==5
"<strong>%s</strong> ya es administrador/a" "<strong>%s</strong> ya es administrador/a de <strong>%s</strong>."; // Okoteve traducción
" del centro <strong>%s</strong>."; // Okoteve traducción
#elif L==6 #elif L==6
"<strong>%s</strong> &egrave; gi&agrave; un amministratore" "<strong>%s</strong> &egrave; gi&agrave; un amministratore de <strong>%s</strong>.";
" del centro <strong>%s</strong>.";
#elif L==7 #elif L==7
"<strong>%s</strong> is already an administrator" "<strong>%s</strong> is already an administrator of <strong>%s</strong>."; // Potrzebujesz tlumaczenie
" of the centre <strong>%s</strong>."; // Potrzebujesz tlumaczenie
#elif L==8 #elif L==8
"<strong>%s</strong> is already an administrator" "<strong>%s</strong> is already an administrator of <strong>%s</strong>."; // Necessita de tradução
" of the centre <strong>%s</strong>."; // Necessita de tradução
#endif
const char *Txt_THE_USER_X_is_already_an_administrator_of_the_degree_Y = // Warning: it is very important to include two %s in the following sentences
#if L==0
"<strong>%s</strong> ya es administrador/a"
" de la titulaci&oacute;n <strong>%s</strong>."; // Necessita traduccio
#elif L==1
"<strong>%s</strong> is already an administrator"
" of the degree <strong>%s</strong>."; // Übersetzung notwendig
#elif L==2
"<strong>%s</strong> is already an administrator"
" of the degree <strong>%s</strong>.";
#elif L==3
"<strong>%s</strong> ya es administrador/a"
" de la titulaci&oacute;n <strong>%s</strong>.";
#elif L==4
"<strong>%s</strong> is already an administrator"
" of the degree <strong>%s</strong>."; // Besoin de traduction
#elif L==5
"<strong>%s</strong> ya es administrador/a"
" de la titulaci&oacute;n <strong>%s</strong>."; // Okoteve traducción
#elif L==6
"<strong>%s</strong> &egrave; gi&agrave; un amministratore"
" della laurea <strong>%s</strong>.";
#elif L==7
"<strong>%s</strong> is already an administrator"
" of the degree <strong>%s</strong>."; // Potrzebujesz tlumaczenie
#elif L==8
"<strong>%s</strong> is already an administrator"
" of the degree <strong>%s</strong>."; // Necessita de tradução
#endif
const char *Txt_THE_USER_X_is_already_an_administrator_of_the_institution_Y = // Warning: it is very important to include two %s in the following sentences
#if L==0
"<strong>%s</strong> ya es administrador/a"
" de la instituci&oacute;n <strong>%s</strong>."; // Necessita traduccio
#elif L==1
"<strong>%s</strong> is already an administrator"
" of the institution <strong>%s</strong>."; // Übersetzung notwendig
#elif L==2
"<strong>%s</strong> is already an administrator"
" of the institution <strong>%s</strong>.";
#elif L==3
"<strong>%s</strong> ya es administrador/a"
" de la instituci&oacute;n <strong>%s</strong>.";
#elif L==4
"<strong>%s</strong> is already an administrator"
" of the institution <strong>%s</strong>."; // Besoin de traduction
#elif L==5
"<strong>%s</strong> ya es administrador/a"
" de la instituci&oacute;n <strong>%s</strong>."; // Okoteve traducción
#elif L==6
"<strong>%s</strong> &egrave; gi&agrave; un amministratore"
" della istituzione <strong>%s</strong>.";
#elif L==7
"<strong>%s</strong> is already an administrator"
" of the institution <strong>%s</strong>."; // Potrzebujesz tlumaczenie
#elif L==8
"<strong>%s</strong> is already an administrator"
" of the institution <strong>%s</strong>."; // Necessita de tradução
#endif #endif
const char *Txt_THE_USER_X_is_already_in_the_course_Y_but_has_not_yet_accepted_the_enrollment = // Warning: it is very important to include %s in the following sentences const char *Txt_THE_USER_X_is_already_in_the_course_Y_but_has_not_yet_accepted_the_enrollment = // Warning: it is very important to include %s in the following sentences