mirror of https://github.com/acanas/swad-core.git
Version 16.247.6
This commit is contained in:
parent
6588672a23
commit
217e09b698
|
@ -231,19 +231,19 @@
|
||||||
// TODO: Fix bug: Error when a link end in a dot. Example: "A guide to building..." --> "A guide to building._..url" (two dots)
|
// TODO: Fix bug: Error when a link end in a dot. Example: "A guide to building..." --> "A guide to building._..url" (two dots)
|
||||||
|
|
||||||
// TODO: Cuando sólo se cambian los grupos y no el rol de un profesor ya existente, no sale ningún mensaje. se haga lo que se haga en la edición debería salir un mensaje del tipo "Cambios realizados"
|
// TODO: Cuando sólo se cambian los grupos y no el rol de un profesor ya existente, no sale ningún mensaje. se haga lo que se haga en la edición debería salir un mensaje del tipo "Cambios realizados"
|
||||||
// TODO: Al inscribir un profesor, en la ficha de confirmación aparece como rol "Desconocido" en lugar de "Profesor"
|
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/****************************** Public constants *****************************/
|
/****************************** Public constants *****************************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
#define Log_PLATFORM_VERSION "SWAD 16.247.5 (2017-07-02)"
|
#define Log_PLATFORM_VERSION "SWAD 16.247.6 (2017-07-02)"
|
||||||
#define CSS_FILE "swad16.235.1.css"
|
#define CSS_FILE "swad16.235.1.css"
|
||||||
#define JS_FILE "swad16.206.3.js"
|
#define JS_FILE "swad16.206.3.js"
|
||||||
|
|
||||||
// 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 sql/swad*.sql | tail -1
|
// nl swad*.c swad*.h css/swad*.css py/swad*.py js/swad*.js soap/swad*?.h sql/swad*.sql | tail -1
|
||||||
/*
|
/*
|
||||||
|
Version 16.247.6: Jul 02, 2017 Fixed bug in user's enrolment. (222151 lines)
|
||||||
Version 16.247.5: Jul 02, 2017 Fixed error in layout when searching for courses. (222138 lines)
|
Version 16.247.5: Jul 02, 2017 Fixed error in layout when searching for courses. (222138 lines)
|
||||||
Version 16.247.4: Jul 02, 2017 Fixed bug in surveys. (222138 lines)
|
Version 16.247.4: Jul 02, 2017 Fixed bug in surveys. (222138 lines)
|
||||||
Version 16.247.3: Jul 02, 2017 Students can not view records of some users who do not share groups with them. (222132 lines)
|
Version 16.247.3: Jul 02, 2017 Students can not view records of some users who do not share groups with them. (222132 lines)
|
||||||
|
|
|
@ -225,15 +225,19 @@ void Enr_ModifyRoleInCurrentCrs (struct UsrData *UsrDat,Rol_Role_t NewRole)
|
||||||
(unsigned) NewRole,Gbl.CurrentCrs.Crs.CrsCod,UsrDat->UsrCod);
|
(unsigned) NewRole,Gbl.CurrentCrs.Crs.CrsCod,UsrDat->UsrCod);
|
||||||
DB_QueryUPDATE (Query,"can not modify user's role in course");
|
DB_QueryUPDATE (Query,"can not modify user's role in course");
|
||||||
|
|
||||||
/***** Create notification for this user.
|
/***** Flush caches *****/
|
||||||
If this user wants to receive notifications by email,
|
Usr_FlushCachesUsr ();
|
||||||
activate the sending of a notification *****/
|
|
||||||
Enr_NotifyAfterEnrolment (UsrDat,NewRole);
|
|
||||||
|
|
||||||
|
/***** Set user's roles *****/
|
||||||
UsrDat->Roles.InCurrentCrs.Role = NewRole;
|
UsrDat->Roles.InCurrentCrs.Role = NewRole;
|
||||||
UsrDat->Roles.InCurrentCrs.Valid = true;
|
UsrDat->Roles.InCurrentCrs.Valid = true;
|
||||||
UsrDat->Roles.InCrss = -1; // Force roles to be got from database
|
UsrDat->Roles.InCrss = -1; // Force roles to be got from database
|
||||||
Rol_GetRolesInAllCrssIfNotYetGot (UsrDat); // Get roles
|
Rol_GetRolesInAllCrssIfNotYetGot (UsrDat); // Get roles
|
||||||
|
|
||||||
|
/***** Create notification for this user.
|
||||||
|
If this user wants to receive notifications by email,
|
||||||
|
activate the sending of a notification *****/
|
||||||
|
Enr_NotifyAfterEnrolment (UsrDat,NewRole);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
@ -279,6 +283,11 @@ void Enr_RegisterUsrInCurrentCrs (struct UsrData *UsrDat,Rol_Role_t NewRole,
|
||||||
Usr_LIST_WITH_PHOTOS_DEF ? 'Y' :
|
Usr_LIST_WITH_PHOTOS_DEF ? 'Y' :
|
||||||
'N');
|
'N');
|
||||||
DB_QueryINSERT (Query,"can not register user in course");
|
DB_QueryINSERT (Query,"can not register user in course");
|
||||||
|
|
||||||
|
/***** Flush caches *****/
|
||||||
|
Usr_FlushCachesUsr ();
|
||||||
|
|
||||||
|
/***** Set roles *****/
|
||||||
UsrDat->Roles.InCurrentCrs.Role = NewRole;
|
UsrDat->Roles.InCurrentCrs.Role = NewRole;
|
||||||
UsrDat->Roles.InCurrentCrs.Valid = true;
|
UsrDat->Roles.InCurrentCrs.Valid = true;
|
||||||
UsrDat->Roles.InCrss = -1; // Force roles to be got from database
|
UsrDat->Roles.InCrss = -1; // Force roles to be got from database
|
||||||
|
@ -4171,22 +4180,11 @@ static void Enr_EffectivelyRemUsrFromCrs (struct UsrData *UsrDat,struct Course *
|
||||||
DB_QueryDELETE (Query,"can not remove a user from a course");
|
DB_QueryDELETE (Query,"can not remove a user from a course");
|
||||||
|
|
||||||
/***** Flush caches *****/
|
/***** Flush caches *****/
|
||||||
Usr_FlushCacheUsrBelongsToIns ();
|
Usr_FlushCachesUsr ();
|
||||||
Usr_FlushCacheUsrBelongsToCtr ();
|
|
||||||
Usr_FlushCacheUsrBelongsToDeg ();
|
|
||||||
Usr_FlushCacheUsrBelongsToCrs ();
|
|
||||||
Usr_FlushCacheUsrBelongsToCurrentCrs ();
|
|
||||||
Usr_FlushCacheUsrHasAcceptedInCurrentCrs ();
|
|
||||||
Usr_FlushCacheUsrSharesAnyOfMyCrs ();
|
|
||||||
Rol_FlushCacheRoleUsrInCrs ();
|
|
||||||
Grp_FlushCacheUsrSharesAnyOfMyGrpsInCurrentCrs ();
|
|
||||||
|
|
||||||
/***** If it's me, change my roles *****/
|
/***** If it's me, change my roles *****/
|
||||||
if (ItsMe)
|
if (ItsMe)
|
||||||
{
|
{
|
||||||
/* Flush caches */
|
|
||||||
Grp_FlushCacheIBelongToGrp ();
|
|
||||||
|
|
||||||
/* Now I don't belong to current course */
|
/* Now I don't belong to current course */
|
||||||
Gbl.Usrs.Me.IBelongToCurrentCrs =
|
Gbl.Usrs.Me.IBelongToCurrentCrs =
|
||||||
Gbl.Usrs.Me.UsrDat.Accepted = false;
|
Gbl.Usrs.Me.UsrDat.Accepted = false;
|
||||||
|
|
18
swad_user.c
18
swad_user.c
|
@ -777,6 +777,24 @@ void Usr_WriteFirstNameBRSurnames (const struct UsrData *UsrDat)
|
||||||
fprintf (Gbl.F.Out," %s",UsrDat->Surname2);
|
fprintf (Gbl.F.Out," %s",UsrDat->Surname2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
/********************* Flush all caches related to users *********************/
|
||||||
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
void Usr_FlushCachesUsr (void)
|
||||||
|
{
|
||||||
|
Usr_FlushCacheUsrBelongsToIns ();
|
||||||
|
Usr_FlushCacheUsrBelongsToCtr ();
|
||||||
|
Usr_FlushCacheUsrBelongsToDeg ();
|
||||||
|
Usr_FlushCacheUsrBelongsToCrs ();
|
||||||
|
Usr_FlushCacheUsrBelongsToCurrentCrs ();
|
||||||
|
Usr_FlushCacheUsrHasAcceptedInCurrentCrs ();
|
||||||
|
Usr_FlushCacheUsrSharesAnyOfMyCrs ();
|
||||||
|
Rol_FlushCacheRoleUsrInCrs ();
|
||||||
|
Grp_FlushCacheUsrSharesAnyOfMyGrpsInCurrentCrs ();
|
||||||
|
Grp_FlushCacheIBelongToGrp ();
|
||||||
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/***** Check if a user is an administrator of a degree/centre/institution ****/
|
/***** Check if a user is an administrator of a degree/centre/institution ****/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
|
@ -243,6 +243,8 @@ void Usr_BuildFullName (struct UsrData *UsrDat);
|
||||||
|
|
||||||
void Usr_WriteFirstNameBRSurnames (const struct UsrData *UsrDat);
|
void Usr_WriteFirstNameBRSurnames (const struct UsrData *UsrDat);
|
||||||
|
|
||||||
|
void Usr_FlushCachesUsr (void);
|
||||||
|
|
||||||
bool Usr_CheckIfUsrIsAdm (long UsrCod,Sco_Scope_t Scope,long Cod);
|
bool Usr_CheckIfUsrIsAdm (long UsrCod,Sco_Scope_t Scope,long Cod);
|
||||||
void Usr_FlushCacheUsrIsSuperuser (void);
|
void Usr_FlushCacheUsrIsSuperuser (void);
|
||||||
bool Usr_CheckIfUsrIsSuperuser (long UsrCod);
|
bool Usr_CheckIfUsrIsSuperuser (long UsrCod);
|
||||||
|
|
Loading…
Reference in New Issue