mirror of https://github.com/acanas/swad-core.git
Version 16.42
This commit is contained in:
parent
ccb4d85fc8
commit
d22b315c73
|
@ -140,8 +140,6 @@
|
||||||
// TODO: Create a table with IPs to block temporarily multiple access to the action used to check ID for empty accounts
|
// TODO: Create a table with IPs to block temporarily multiple access to the action used to check ID for empty accounts
|
||||||
// TODO: Every action should have a minimum time between two clicks on it (for example "Generate a report" should have 60 s)
|
// TODO: Every action should have a minimum time between two clicks on it (for example "Generate a report" should have 60 s)
|
||||||
|
|
||||||
// TODO: FIX BUG: Centre and degree admins should see buttons to admin users even a course is not selected
|
|
||||||
|
|
||||||
// TODO: Generar informe -> ¿Realmente desea generar un informe... (puede tardar varios segundos...)? -> Generar informe.
|
// TODO: Generar informe -> ¿Realmente desea generar un informe... (puede tardar varios segundos...)? -> Generar informe.
|
||||||
|
|
||||||
// TODO: Writing a message to several recipients: include message to indicate that list of nicknames must be comma separated
|
// TODO: Writing a message to several recipients: include message to indicate that list of nicknames must be comma separated
|
||||||
|
@ -151,13 +149,14 @@
|
||||||
/****************************** Public constants *****************************/
|
/****************************** Public constants *****************************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
#define Log_PLATFORM_VERSION "SWAD 16.41.10 (2016-10-24)"
|
#define Log_PLATFORM_VERSION "SWAD 16.42 (2016-10-24)"
|
||||||
#define CSS_FILE "swad16.32.1.css"
|
#define CSS_FILE "swad16.32.1.css"
|
||||||
#define JS_FILE "swad15.238.1.js"
|
#define JS_FILE "swad15.238.1.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.42: Oct 24, 2016 Changres in rules to admin other user and change other user's photo. (205481 lines)
|
||||||
Version 16.41.10: Oct 24, 2016 Column ID in statistic of hits in a course is now left aligned. (205474 lines)
|
Version 16.41.10: Oct 24, 2016 Column ID in statistic of hits in a course is now left aligned. (205474 lines)
|
||||||
Version 16.41.9: Oct 24, 2016 Changed permissions to edit institution logo and institution WWW. (205474 lines)
|
Version 16.41.9: Oct 24, 2016 Changed permissions to edit institution logo and institution WWW. (205474 lines)
|
||||||
Version 16.41.8: Oct 24, 2016 Changed permissions to edit degree logo and degree WWW. (205472 lines)
|
Version 16.41.8: Oct 24, 2016 Changed permissions to edit degree logo and degree WWW. (205472 lines)
|
||||||
|
|
|
@ -2890,13 +2890,12 @@ static bool Enr_CheckIfICanAdminOtherUsrs (void)
|
||||||
case Rol_STUDENT:
|
case Rol_STUDENT:
|
||||||
return false;
|
return false;
|
||||||
case Rol_TEACHER:
|
case Rol_TEACHER:
|
||||||
|
// A teacher can be logged as teacher outside of his/her courses
|
||||||
|
// TODO: Teachers/students should be teachers/students only inside their courses
|
||||||
return (Gbl.CurrentCrs.Crs.CrsCod > 0);
|
return (Gbl.CurrentCrs.Crs.CrsCod > 0);
|
||||||
case Rol_DEG_ADM:
|
case Rol_DEG_ADM:
|
||||||
return (Gbl.CurrentDeg.Deg.DegCod > 0);
|
|
||||||
case Rol_CTR_ADM:
|
case Rol_CTR_ADM:
|
||||||
return (Gbl.CurrentCtr.Ctr.CtrCod > 0);
|
|
||||||
case Rol_INS_ADM:
|
case Rol_INS_ADM:
|
||||||
return (Gbl.CurrentIns.Ins.InsCod > 0);
|
|
||||||
case Rol_SYS_ADM:
|
case Rol_SYS_ADM:
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -3106,7 +3105,8 @@ static void Enr_ShowFormToEditOtherUsr (void)
|
||||||
Mai_PutLinkToChangeOtherUsrEmail (); // Put link (form) to change user's e-mail
|
Mai_PutLinkToChangeOtherUsrEmail (); // Put link (form) to change user's e-mail
|
||||||
ID_PutLinkToChangeUsrIDs (); // Put link (form) to change user's IDs
|
ID_PutLinkToChangeUsrIDs (); // Put link (form) to change user's IDs
|
||||||
}
|
}
|
||||||
Pho_PutLinkToChangeOtherUsrPhoto (); // Put link (form) to change user's photo
|
if (Pho_CheckIfICanChangeOtherUsrPhoto (&Gbl.Usrs.Other.UsrDat))
|
||||||
|
Pho_PutLinkToChangeOtherUsrPhoto (); // Put link (form) to change user's photo
|
||||||
fprintf (Gbl.F.Out,"</div>");
|
fprintf (Gbl.F.Out,"</div>");
|
||||||
|
|
||||||
/***** User's record *****/
|
/***** User's record *****/
|
||||||
|
|
|
@ -142,10 +142,9 @@ bool Pho_CheckIfICanChangeOtherUsrPhoto (const struct UsrData *UsrDat)
|
||||||
{
|
{
|
||||||
case Rol_TEACHER:
|
case Rol_TEACHER:
|
||||||
/* If I am a teacher in current course,
|
/* If I am a teacher in current course,
|
||||||
I only can change the photo of users from current course */
|
I only can change the photo of students from current course */
|
||||||
return Usr_CheckIfUsrBelongsToCrs (UsrDat->UsrCod,
|
return (UsrDat->RoleInCurrentCrsDB == Rol_STUDENT &&
|
||||||
Gbl.CurrentCrs.Crs.CrsCod,
|
UsrDat->Accepted);
|
||||||
true);
|
|
||||||
case Rol_DEG_ADM:
|
case Rol_DEG_ADM:
|
||||||
/* If I am an administrator of current degree,
|
/* If I am an administrator of current degree,
|
||||||
I only can change the photo of users from current degree */
|
I only can change the photo of users from current degree */
|
||||||
|
|
|
@ -44,6 +44,9 @@
|
||||||
as user permanent roles in courses,
|
as user permanent roles in courses,
|
||||||
but a user may be logged temporarily as other roles
|
but a user may be logged temporarily as other roles
|
||||||
*/
|
*/
|
||||||
|
// TODO: Teachers/students should be teachers/students only inside their courses
|
||||||
|
// Outside their courses a user (not logged as admin) should be Rol_VISITOR
|
||||||
|
// (with similar permissions as Rol_VISITOR but labeled as "User")
|
||||||
#define Rol_NUM_ROLES 9
|
#define Rol_NUM_ROLES 9
|
||||||
typedef enum
|
typedef enum
|
||||||
{
|
{
|
||||||
|
|
32
swad_text.c
32
swad_text.c
|
@ -46195,9 +46195,9 @@ const char *Txt_There_are_no_centres_with_requests_for_degrees_to_be_confirmed =
|
||||||
#if L==1
|
#if L==1
|
||||||
"No hi ha centres amb sol·licituds de titulacions pendents de confirmar.";
|
"No hi ha centres amb sol·licituds de titulacions pendents de confirmar.";
|
||||||
#elif L==2
|
#elif L==2
|
||||||
"There are no centres with requests for degrees to be confirmed"; // Need Übersetzung
|
"There are no centres with requests for degrees to be confirmed."; // Need Übersetzung
|
||||||
#elif L==3
|
#elif L==3
|
||||||
"There are no centres with requests for degrees to be confirmed";
|
"There are no centres with requests for degrees to be confirmed.";
|
||||||
#elif L==4
|
#elif L==4
|
||||||
"No hay centros con solicitudes de titulaciones pendientes de confirmar.";
|
"No hay centros con solicitudes de titulaciones pendientes de confirmar.";
|
||||||
#elif L==5
|
#elif L==5
|
||||||
|
@ -46207,18 +46207,18 @@ const char *Txt_There_are_no_centres_with_requests_for_degrees_to_be_confirmed =
|
||||||
#elif L==7
|
#elif L==7
|
||||||
"Non ci sono centri con richieste di gradi pendenti de confermare.";
|
"Non ci sono centri con richieste di gradi pendenti de confermare.";
|
||||||
#elif L==8
|
#elif L==8
|
||||||
"There are no centres with requests for degrees to be confirmed"; // Potrzebujesz tlumaczenie
|
"There are no centres with requests for degrees to be confirmed."; // Potrzebujesz tlumaczenie
|
||||||
#elif L==9
|
#elif L==9
|
||||||
"There are no centres with requests for degrees to be confirmed"; // Necessita de tradução
|
"There are no centres with requests for degrees to be confirmed."; // Necessita de tradução
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
const char *Txt_There_are_no_countries_with_requests_for_institutions_to_be_confirmed =
|
const char *Txt_There_are_no_countries_with_requests_for_institutions_to_be_confirmed =
|
||||||
#if L==1
|
#if L==1
|
||||||
"No hi ha països amb sol·licituds de institucions pendents de confirmar.";
|
"No hi ha països amb sol·licituds de institucions pendents de confirmar.";
|
||||||
#elif L==2
|
#elif L==2
|
||||||
"There are no countries with requests for institutions to be confirmed"; // Need Übersetzung
|
"There are no countries with requests for institutions to be confirmed."; // Need Übersetzung
|
||||||
#elif L==3
|
#elif L==3
|
||||||
"There are no countries with requests for institutions to be confirmed";
|
"There are no countries with requests for institutions to be confirmed.";
|
||||||
#elif L==4
|
#elif L==4
|
||||||
"No hay países con solicitudes de instituciones pendientes de confirmar.";
|
"No hay países con solicitudes de instituciones pendientes de confirmar.";
|
||||||
#elif L==5
|
#elif L==5
|
||||||
|
@ -46228,18 +46228,18 @@ const char *Txt_There_are_no_countries_with_requests_for_institutions_to_be_conf
|
||||||
#elif L==7
|
#elif L==7
|
||||||
"Non ci sono paesi con richieste di istituzioni pendenti de confermare.";
|
"Non ci sono paesi con richieste di istituzioni pendenti de confermare.";
|
||||||
#elif L==8
|
#elif L==8
|
||||||
"There are no countries with requests for institutions to be confirmed"; // Potrzebujesz tlumaczenie
|
"There are no countries with requests for institutions to be confirmed."; // Potrzebujesz tlumaczenie
|
||||||
#elif L==9
|
#elif L==9
|
||||||
"There are no countries with requests for institutions to be confirmed"; // Necessita de tradução
|
"There are no countries with requests for institutions to be confirmed."; // Necessita de tradução
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
const char *Txt_There_are_no_degrees_with_requests_for_courses_to_be_confirmed =
|
const char *Txt_There_are_no_degrees_with_requests_for_courses_to_be_confirmed =
|
||||||
#if L==1
|
#if L==1
|
||||||
"No hi ha titulacions amb sol·licituds d'assignatures pendents de confirmar.";
|
"No hi ha titulacions amb sol·licituds d'assignatures pendents de confirmar.";
|
||||||
#elif L==2
|
#elif L==2
|
||||||
"There are no degrees with requests for courses to be confirmed"; // Need Übersetzung
|
"There are no degrees with requests for courses to be confirmed."; // Need Übersetzung
|
||||||
#elif L==3
|
#elif L==3
|
||||||
"There are no degrees with requests for courses to be confirmed";
|
"There are no degrees with requests for courses to be confirmed.";
|
||||||
#elif L==4
|
#elif L==4
|
||||||
"No hay titulaciones con solicitudes de asignaturas pendientes de confirmar.";
|
"No hay titulaciones con solicitudes de asignaturas pendientes de confirmar.";
|
||||||
#elif L==5
|
#elif L==5
|
||||||
|
@ -46249,18 +46249,18 @@ const char *Txt_There_are_no_degrees_with_requests_for_courses_to_be_confirmed =
|
||||||
#elif L==7
|
#elif L==7
|
||||||
"Non ci sono gradi con richieste di corsi pendenti de confermare.";
|
"Non ci sono gradi con richieste di corsi pendenti de confermare.";
|
||||||
#elif L==8
|
#elif L==8
|
||||||
"There are no degrees with requests for courses to be confirmed"; // Potrzebujesz tlumaczenie
|
"There are no degrees with requests for courses to be confirmed."; // Potrzebujesz tlumaczenie
|
||||||
#elif L==9
|
#elif L==9
|
||||||
"There are no degrees with requests for courses to be confirmed"; // Necessita de tradução
|
"There are no degrees with requests for courses to be confirmed."; // Necessita de tradução
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
const char *Txt_There_are_no_institutions_with_requests_for_centres_to_be_confirmed =
|
const char *Txt_There_are_no_institutions_with_requests_for_centres_to_be_confirmed =
|
||||||
#if L==1
|
#if L==1
|
||||||
"No hi ha institucions amb sol·licituds de centres pendents de confirmar.";
|
"No hi ha institucions amb sol·licituds de centres pendents de confirmar.";
|
||||||
#elif L==2
|
#elif L==2
|
||||||
"There are no institutions with requests for centres to be confirmed"; // Need Übersetzung
|
"There are no institutions with requests for centres to be confirmed."; // Need Übersetzung
|
||||||
#elif L==3
|
#elif L==3
|
||||||
"There are no institutions with requests for centres to be confirmed";
|
"There are no institutions with requests for centres to be confirmed.";
|
||||||
#elif L==4
|
#elif L==4
|
||||||
"No hay instituciones con solicitudes de centros pendientes de confirmar.";
|
"No hay instituciones con solicitudes de centros pendientes de confirmar.";
|
||||||
#elif L==5
|
#elif L==5
|
||||||
|
@ -46270,9 +46270,9 @@ const char *Txt_There_are_no_institutions_with_requests_for_centres_to_be_confir
|
||||||
#elif L==7
|
#elif L==7
|
||||||
"Non ci sono istituzioni con richieste di centri pendenti de confermare.";
|
"Non ci sono istituzioni con richieste di centri pendenti de confermare.";
|
||||||
#elif L==8
|
#elif L==8
|
||||||
"There are no institutions with requests for centres to be confirmed"; // Potrzebujesz tlumaczenie
|
"There are no institutions with requests for centres to be confirmed."; // Potrzebujesz tlumaczenie
|
||||||
#elif L==9
|
#elif L==9
|
||||||
"There are no institutions with requests for centres to be confirmed"; // Necessita de tradução
|
"There are no institutions with requests for centres to be confirmed."; // Necessita de tradução
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
const char *Txt_There_are_no_departments =
|
const char *Txt_There_are_no_departments =
|
||||||
|
|
57
swad_user.c
57
swad_user.c
|
@ -6073,21 +6073,25 @@ void Usr_ListDataAdms (void)
|
||||||
const char *FieldNames[Usr_NUM_MAIN_FIELDS_DATA_ADM];
|
const char *FieldNames[Usr_NUM_MAIN_FIELDS_DATA_ADM];
|
||||||
|
|
||||||
/***** Put contextual links *****/
|
/***** Put contextual links *****/
|
||||||
if (Gbl.Usrs.Me.LoggedRole == Rol_SYS_ADM)
|
if (Gbl.Usrs.Me.LoggedRole >= Rol_TEACHER)
|
||||||
{
|
{
|
||||||
fprintf (Gbl.F.Out,"<div class=\"CONTEXT_MENU\">");
|
fprintf (Gbl.F.Out,"<div class=\"CONTEXT_MENU\">");
|
||||||
|
|
||||||
/* Put link to remove old users */
|
if (Gbl.Usrs.Me.LoggedRole == Rol_SYS_ADM)
|
||||||
Usr_PutLinkToSeeGuests ();
|
/* Put link to remove old users */
|
||||||
|
Usr_PutLinkToSeeGuests ();
|
||||||
|
|
||||||
/* Put link to go to admin one user */
|
/* Put link to go to admin one user */
|
||||||
Enr_PutLinkToAdminOneUsr (ActReqMdfOneOth);
|
Enr_PutLinkToAdminOneUsr (ActReqMdfOneOth);
|
||||||
|
|
||||||
/* Put link to list possible duplicate users */
|
if (Gbl.Usrs.Me.LoggedRole == Rol_SYS_ADM)
|
||||||
Dup_PutLinkToListDupUsrs ();
|
{
|
||||||
|
/* Put link to list possible duplicate users */
|
||||||
|
Dup_PutLinkToListDupUsrs ();
|
||||||
|
|
||||||
/* Put link to remove old users */
|
/* Put link to remove old users */
|
||||||
Enr_PutLinkToRemOldUsrs ();
|
Enr_PutLinkToRemOldUsrs ();
|
||||||
|
}
|
||||||
|
|
||||||
fprintf (Gbl.F.Out,"</div>");
|
fprintf (Gbl.F.Out,"</div>");
|
||||||
}
|
}
|
||||||
|
@ -6690,28 +6694,27 @@ void Usr_SeeStudents (void)
|
||||||
bool ICanViewRecords;
|
bool ICanViewRecords;
|
||||||
|
|
||||||
/***** Put contextual links *****/
|
/***** Put contextual links *****/
|
||||||
if (Gbl.CurrentCrs.Crs.CrsCod > 0 && // Course selected
|
if (Gbl.Usrs.Me.LoggedRole >= Rol_STUDENT)
|
||||||
Gbl.Usrs.Me.LoggedRole >= Rol_TEACHER) // I am logged as teacher or admin
|
|
||||||
{
|
{
|
||||||
fprintf (Gbl.F.Out,"<div class=\"CONTEXT_MENU\">");
|
fprintf (Gbl.F.Out,"<div class=\"CONTEXT_MENU\">");
|
||||||
|
|
||||||
/* Put link to go to admin one user */
|
if (Gbl.Usrs.Me.LoggedRole >= Rol_TEACHER) // I am logged as teacher or admin
|
||||||
Enr_PutLinkToAdminOneUsr (ActReqMdfOneStd);
|
{
|
||||||
|
/* Put link to go to admin one user */
|
||||||
|
Enr_PutLinkToAdminOneUsr (ActReqMdfOneStd);
|
||||||
|
|
||||||
/* Put link to go to admin several users */
|
if (Gbl.CurrentCrs.Crs.CrsCod > 0) // Course selected
|
||||||
Enr_PutLinkToAdminSeveralUsrs (Rol_STUDENT);
|
{
|
||||||
|
/* Put link to go to admin several users */
|
||||||
|
Enr_PutLinkToAdminSeveralUsrs (Rol_STUDENT);
|
||||||
|
|
||||||
/* Put link to edit record fields */
|
/* Put link to edit record fields */
|
||||||
Rec_PutLinkToEditRecordFields ();
|
Rec_PutLinkToEditRecordFields ();
|
||||||
|
}
|
||||||
fprintf (Gbl.F.Out,"</div>");
|
}
|
||||||
}
|
else
|
||||||
else if (Gbl.Usrs.Me.LoggedRole == Rol_STUDENT)
|
/* Put link to go to admin one user */
|
||||||
{
|
Enr_PutLinkToAdminOneUsr (ActReqMdfOneStd);
|
||||||
fprintf (Gbl.F.Out,"<div class=\"CONTEXT_MENU\">");
|
|
||||||
|
|
||||||
/* Put link to go to admin one user */
|
|
||||||
Enr_PutLinkToAdminOneUsr (ActReqMdfOneStd);
|
|
||||||
|
|
||||||
fprintf (Gbl.F.Out,"</div>");
|
fprintf (Gbl.F.Out,"</div>");
|
||||||
}
|
}
|
||||||
|
@ -6863,8 +6866,7 @@ void Usr_SeeTeachers (void)
|
||||||
bool ICanViewRecords;
|
bool ICanViewRecords;
|
||||||
|
|
||||||
/***** Put contextual links *****/
|
/***** Put contextual links *****/
|
||||||
if (Gbl.CurrentCrs.Crs.CrsCod > 0 && // Course selected
|
if (Gbl.Usrs.Me.LoggedRole >= Rol_TEACHER) // I am logged as teacher or admin
|
||||||
Gbl.Usrs.Me.LoggedRole >= Rol_TEACHER) // ...or I am logged as teacher or admin
|
|
||||||
{
|
{
|
||||||
fprintf (Gbl.F.Out,"<div class=\"CONTEXT_MENU\">");
|
fprintf (Gbl.F.Out,"<div class=\"CONTEXT_MENU\">");
|
||||||
|
|
||||||
|
@ -6872,7 +6874,8 @@ void Usr_SeeTeachers (void)
|
||||||
Enr_PutLinkToAdminOneUsr (ActReqMdfOneTch);
|
Enr_PutLinkToAdminOneUsr (ActReqMdfOneTch);
|
||||||
|
|
||||||
/* Put link to go to admin several users */
|
/* Put link to go to admin several users */
|
||||||
if (Gbl.Usrs.Me.LoggedRole >= Rol_DEG_ADM) // I am logged as admin
|
if (Gbl.CurrentCrs.Crs.CrsCod > 0 && // Course selected
|
||||||
|
Gbl.Usrs.Me.LoggedRole >= Rol_DEG_ADM) // I am logged as admin
|
||||||
Enr_PutLinkToAdminSeveralUsrs (Rol_TEACHER);
|
Enr_PutLinkToAdminSeveralUsrs (Rol_TEACHER);
|
||||||
|
|
||||||
fprintf (Gbl.F.Out,"</div>");
|
fprintf (Gbl.F.Out,"</div>");
|
||||||
|
|
Loading…
Reference in New Issue