mirror of
https://github.com/acanas/swad-core.git
synced 2024-06-03 15:25:22 +02:00
Version20.10.3
This commit is contained in:
parent
cd134a5281
commit
982745ffa2
|
@ -553,7 +553,7 @@ enscript -2 --landscape --color --file-align=2 --highlight --line-numbers -o - *
|
||||||
En OpenSWAD:
|
En OpenSWAD:
|
||||||
ps2pdf source.ps destination.pdf
|
ps2pdf source.ps destination.pdf
|
||||||
*/
|
*/
|
||||||
#define Log_PLATFORM_VERSION "SWAD 20.10.2 (2021-02-02)"
|
#define Log_PLATFORM_VERSION "SWAD 20.10.3 (2021-02-07)"
|
||||||
#define CSS_FILE "swad20.8.css"
|
#define CSS_FILE "swad20.8.css"
|
||||||
#define JS_FILE "swad20.6.2.js"
|
#define JS_FILE "swad20.6.2.js"
|
||||||
/*
|
/*
|
||||||
|
@ -600,8 +600,9 @@ Juan Miguel.
|
||||||
TODO: Fix bug: un profesor editor no puede ver las carpetas de TFG (proyectos) de otros. Debería poder.
|
TODO: Fix bug: un profesor editor no puede ver las carpetas de TFG (proyectos) de otros. Debería poder.
|
||||||
TODO: DNI de un estudiante sale erróneamente como ******* en lugar de mostrarse al ver los accesos de un estudiante a la asignatura.
|
TODO: DNI de un estudiante sale erróneamente como ******* en lugar de mostrarse al ver los accesos de un estudiante a la asignatura.
|
||||||
|
|
||||||
TODO: Reportado por Javier Fernández Baldomero. Un profesor debería poder cambiar la foto de un estudiante confirmado. Sale el icono, pero luego dice ue no hay permiso
|
TODO: BUG: Cuando un tipo de grupo sólo tiene un grupo, inscribirse es voluntario, el estudiante sólo puede pertenecer a un grupo, y se inscribe en él, debería poder desapuntarse. Ahora no puede.
|
||||||
|
|
||||||
|
Version 20.10.3: Feb 07, 2021 Fixed bug when a teacher changes a student's photo. Reported by Javier Fernández Baldomero. (304871 lines)
|
||||||
Version 20.10.2: Feb 02, 2021 Pending password is deleted when used for the first time. (304870 lines)
|
Version 20.10.2: Feb 02, 2021 Pending password is deleted when used for the first time. (304870 lines)
|
||||||
Version 20.10.1: Jan 28, 2021 Exam print returns to the main tab to avoid bug when the student changes the course. (304864 lines)
|
Version 20.10.1: Jan 28, 2021 Exam print returns to the main tab to avoid bug when the student changes the course. (304864 lines)
|
||||||
Version 20.10: Jan 27, 2021 Exam print is visible just after answering it. (304863 lines)
|
Version 20.10: Jan 27, 2021 Exam print is visible just after answering it. (304863 lines)
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
/** Uncomment one of the following installations of SWAD or create your own **/
|
/** Uncomment one of the following installations of SWAD or create your own **/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
ls -#define LOCALHOST_UBUNTU // Comment this line if not applicable
|
#define LOCALHOST_UBUNTU // Comment this line if not applicable
|
||||||
//#define OPENSWAD_ORG // Comment this line if not applicable
|
//#define OPENSWAD_ORG // Comment this line if not applicable
|
||||||
//#define SWAD_UGR_ES // Comment this line if not applicable
|
//#define SWAD_UGR_ES // Comment this line if not applicable
|
||||||
//#define SWADBERRY_UGR_ES // Comment this line if not applicable
|
//#define SWADBERRY_UGR_ES // Comment this line if not applicable
|
||||||
|
|
49
swad_photo.c
49
swad_photo.c
|
@ -146,7 +146,7 @@ static void Pho_ComputePhotoSize (const struct Pho_DegPhotos *DegPhotos,
|
||||||
/************** Check if I can change the photo of another user **************/
|
/************** Check if I can change the photo of another user **************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
bool Pho_ICanChangeOtherUsrPhoto (const struct UsrData *UsrDat)
|
bool Pho_ICanChangeOtherUsrPhoto (struct UsrData *UsrDat)
|
||||||
{
|
{
|
||||||
bool ItsMe = Usr_ItsMe (UsrDat->UsrCod);
|
bool ItsMe = Usr_ItsMe (UsrDat->UsrCod);
|
||||||
|
|
||||||
|
@ -158,11 +158,13 @@ bool Pho_ICanChangeOtherUsrPhoto (const struct UsrData *UsrDat)
|
||||||
{
|
{
|
||||||
case Rol_TCH:
|
case Rol_TCH:
|
||||||
/* A teacher can change the photo of confirmed students */
|
/* A teacher can change the photo of confirmed students */
|
||||||
if (UsrDat->Roles.InCurrentCrs.Role == Rol_STD && // A student
|
if (UsrDat->Roles.InCurrentCrs.Role != Rol_STD) // Not a student
|
||||||
UsrDat->Accepted) // who accepted registration
|
return false;
|
||||||
return true;
|
|
||||||
|
|
||||||
return false;
|
/* It's a student in this course,
|
||||||
|
check if he/she has accepted registration */
|
||||||
|
UsrDat->Accepted = Usr_CheckIfUsrHasAcceptedInCurrentCrs (UsrDat);
|
||||||
|
return UsrDat->Accepted;
|
||||||
case Rol_DEG_ADM:
|
case Rol_DEG_ADM:
|
||||||
case Rol_CTR_ADM:
|
case Rol_CTR_ADM:
|
||||||
case Rol_INS_ADM:
|
case Rol_INS_ADM:
|
||||||
|
@ -366,27 +368,26 @@ static void Pho_ReqPhoto (const struct UsrData *UsrDat)
|
||||||
|
|
||||||
void Pho_SendPhotoUsr (void)
|
void Pho_SendPhotoUsr (void)
|
||||||
{
|
{
|
||||||
bool ItsMe;
|
|
||||||
|
|
||||||
/***** Get user whose photo must be sent or removed *****/
|
/***** Get user whose photo must be sent or removed *****/
|
||||||
if (Usr_GetParamOtherUsrCodEncryptedAndGetUsrData ())
|
if (!Usr_GetParamOtherUsrCodEncryptedAndGetUsrData ())
|
||||||
{
|
{ // User not found
|
||||||
if (Pho_ICanChangeOtherUsrPhoto (&Gbl.Usrs.Other.UsrDat)) // If I have permission to change user's photo...
|
|
||||||
{
|
|
||||||
Gbl.Usrs.Other.UsrDat.Accepted = Usr_CheckIfUsrHasAcceptedInCurrentCrs (&Gbl.Usrs.Other.UsrDat);
|
|
||||||
ItsMe = Usr_ItsMe (Gbl.Usrs.Other.UsrDat.UsrCod);
|
|
||||||
if (ItsMe)
|
|
||||||
/***** Form to send my photo *****/
|
|
||||||
Pho_ReqMyPhoto ();
|
|
||||||
else // Not me
|
|
||||||
/***** Form to send another user's photo *****/
|
|
||||||
Pho_ReqOtherUsrPhoto ();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
Ale_ShowAlertUserNotFoundOrYouDoNotHavePermission ();
|
|
||||||
}
|
|
||||||
else // User not found
|
|
||||||
Ale_ShowAlertUserNotFoundOrYouDoNotHavePermission ();
|
Ale_ShowAlertUserNotFoundOrYouDoNotHavePermission ();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
/***** Check if I have permission to change user's photo *****/
|
||||||
|
if (!Pho_ICanChangeOtherUsrPhoto (&Gbl.Usrs.Other.UsrDat))
|
||||||
|
{
|
||||||
|
Ale_ShowAlertUserNotFoundOrYouDoNotHavePermission ();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (Usr_ItsMe (Gbl.Usrs.Other.UsrDat.UsrCod))
|
||||||
|
/***** Form to send my photo *****/
|
||||||
|
Pho_ReqMyPhoto ();
|
||||||
|
else // Not me
|
||||||
|
/***** Form to send another user's photo *****/
|
||||||
|
Pho_ReqOtherUsrPhoto ();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
|
@ -93,7 +93,7 @@ struct Pho_DegPhotos
|
||||||
/***************************** Public prototypes *****************************/
|
/***************************** Public prototypes *****************************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
bool Pho_ICanChangeOtherUsrPhoto (const struct UsrData *UsrDat);
|
bool Pho_ICanChangeOtherUsrPhoto (struct UsrData *UsrDat);
|
||||||
void Pho_PutIconToChangeUsrPhoto (void);
|
void Pho_PutIconToChangeUsrPhoto (void);
|
||||||
void Pho_ReqMyPhoto (void);
|
void Pho_ReqMyPhoto (void);
|
||||||
void Pho_SendPhotoUsr (void);
|
void Pho_SendPhotoUsr (void);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user