Version19.118.2

This commit is contained in:
Antonio Cañas Vargas 2020-01-23 22:49:58 +01:00
parent ac20c70f58
commit bf1b74c7da
3 changed files with 12 additions and 7 deletions

View File

@ -494,7 +494,7 @@ enscript -2 --landscape --color --file-align=2 --highlight --line-numbers -o - *
En OpenSWAD:
ps2pdf source.ps destination.pdf
*/
#define Log_PLATFORM_VERSION "SWAD 19.118.1 (2020-01-23)"
#define Log_PLATFORM_VERSION "SWAD 19.118.2 (2020-01-23)"
#define CSS_FILE "swad19.118.css"
#define JS_FILE "swad19.91.1.js"
/*
@ -502,6 +502,7 @@ ps2pdf source.ps destination.pdf
// TODO: Impedir la creación y edición de proyectos si no son editables.
// TODO: No se puede entrar con DNI '1' suponiendo que no tenga password ¿por qué?
Version 19.118.2: Jan 23, 2020 Fixed bug in enrolment notifications. (278559 lines)
Version 19.118.1: Jan 23, 2020 Fixed bug in marks, reported by Diana Alexandra Dumitru. (278554 lines)
Version 19.118: Jan 14, 2020 Responsive maps. (278546 lines)
Version 19.117: Jan 14, 2020 Column map moved in countries, institutions and centres. (278523 lines)

View File

@ -1943,6 +1943,7 @@ void Enr_SignUpInCrs (void)
MYSQL_RES *mysql_res;
MYSQL_ROW row;
Rol_Role_t RoleFromForm;
bool Notify;
long ReqCod = -1L;
/***** Check if I already belong to course *****/
@ -2005,12 +2006,15 @@ void Enr_SignUpInCrs (void)
Gbl.Hierarchy.Crs.FullName);
/***** Notify teachers or admins by email about the new enrolment request *****/
// If I want to be a teacher ==> send notification to other teachers, administrators or superusers
// If this course has teachers ==> send notification to teachers
// If this course has no teachers and I want to be a teacher ==> send notification to administrators or superusers
if (RoleFromForm == Rol_TCH) // TODO: What happens in user wants to enrole as a non-editing teacher?
if (Usr_GetNumUsrsInCrss (Hie_CRS,Gbl.Hierarchy.Crs.CrsCod,
1 << Rol_TCH)) // This course has teachers
Ntf_StoreNotifyEventsToAllUsrs (Ntf_EVENT_ENROLMENT_REQUEST,ReqCod);
if (RoleFromForm == Rol_TCH)
Notify = true;
else
Notify = (Usr_GetNumUsrsInCrss (Hie_CRS,Gbl.Hierarchy.Crs.CrsCod,
1 << Rol_TCH) != 0); // This course has teachers
if (Notify)
Ntf_StoreNotifyEventsToAllUsrs (Ntf_EVENT_ENROLMENT_REQUEST,ReqCod);
}
}

View File

@ -1248,7 +1248,7 @@ unsigned Ntf_StoreNotifyEventsToAllUsrs (Ntf_NotifyEvent_t NotifyEvent,long Cod)
1 << Rol_TCH))
// If this course has teachers ==> send notification to teachers
NumRows = DB_QuerySELECT (&mysql_res,"can not get users"
" to be notified",
" to be notified",
"SELECT UsrCod FROM crs_usr"
" WHERE CrsCod=%ld"
" AND UsrCod<>%ld"