mirror of
https://github.com/acanas/swad-core.git
synced 2024-06-01 06:15:31 +02:00
Version18.72.1
This commit is contained in:
parent
abfabdcf13
commit
4185208bd5
|
@ -2678,7 +2678,7 @@ void Usr_ReqListStdsAttendanceCrs (void)
|
||||||
extern const char *Hlp_USERS_Attendance_attendance_list;
|
extern const char *Hlp_USERS_Attendance_attendance_list;
|
||||||
extern const char *Txt_Attendance;
|
extern const char *Txt_Attendance;
|
||||||
extern const char *Txt_ROLES_PLURAL_Abc[Rol_NUM_ROLES][Usr_NUM_SEXS];
|
extern const char *Txt_ROLES_PLURAL_Abc[Rol_NUM_ROLES][Usr_NUM_SEXS];
|
||||||
extern const char *Txt_Show_list;
|
extern const char *Txt_Show_attendance;
|
||||||
|
|
||||||
/***** Get list of attendance events *****/
|
/***** Get list of attendance events *****/
|
||||||
Att_GetListAttEvents (Att_OLDEST_FIRST);
|
Att_GetListAttEvents (Att_OLDEST_FIRST);
|
||||||
|
@ -2729,7 +2729,7 @@ void Usr_ReqListStdsAttendanceCrs (void)
|
||||||
Tbl_EndTable ();
|
Tbl_EndTable ();
|
||||||
|
|
||||||
/* Send button */
|
/* Send button */
|
||||||
Btn_PutConfirmButton (Txt_Show_list);
|
Btn_PutConfirmButton (Txt_Show_attendance);
|
||||||
|
|
||||||
/* End form */
|
/* End form */
|
||||||
Frm_EndForm ();
|
Frm_EndForm ();
|
||||||
|
@ -2861,7 +2861,7 @@ static void Usr_ListOrPrintStdsAttendanceCrs (Att_TypeOfView_t TypeOfView)
|
||||||
/***** Get list of attendance events *****/
|
/***** Get list of attendance events *****/
|
||||||
Att_GetListAttEvents (Att_OLDEST_FIRST);
|
Att_GetListAttEvents (Att_OLDEST_FIRST);
|
||||||
|
|
||||||
/***** Get list of selected students *****/
|
/***** Get list of selected students if not already got *****/
|
||||||
Usr_GetListsSelectedUsrsCods ();
|
Usr_GetListsSelectedUsrsCods ();
|
||||||
|
|
||||||
/* Check the number of students to list */
|
/* Check the number of students to list */
|
||||||
|
|
|
@ -430,6 +430,8 @@ Lo de mutear anuncios, en principio prefiero hacer una opci
|
||||||
|
|
||||||
// TODO: Al pulsar sobre una convocatoria de examen / aviso --> ir a la sección de esa convocatoria/aviso en lugar de mostrarlo repetido y destacado arriba
|
// TODO: Al pulsar sobre una convocatoria de examen / aviso --> ir a la sección de esa convocatoria/aviso en lugar de mostrarlo repetido y destacado arriba
|
||||||
|
|
||||||
|
// TODO: Intentar aumentar la velocidad de carga del timeline (comprobar ralentización al mostrar la titulación de cada usuario)
|
||||||
|
|
||||||
// TODO: "Se podría poner un botón para seguir a todos los relacionados contigo en las asignaturas, en lugar de tener que agregarlos uno a uno" Suggested by José María girao Miras.
|
// TODO: "Se podría poner un botón para seguir a todos los relacionados contigo en las asignaturas, en lugar de tener que agregarlos uno a uno" Suggested by José María girao Miras.
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
@ -451,10 +453,11 @@ En OpenSWAD:
|
||||||
ps2pdf source.ps destination.pdf
|
ps2pdf source.ps destination.pdf
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define Log_PLATFORM_VERSION "SWAD 18.72 (2019-03-11)"
|
#define Log_PLATFORM_VERSION "SWAD 18.72.1 (2019-03-11)"
|
||||||
#define CSS_FILE "swad18.68.3.css"
|
#define CSS_FILE "swad18.68.3.css"
|
||||||
#define JS_FILE "swad18.64.js"
|
#define JS_FILE "swad18.64.js"
|
||||||
/*
|
/*
|
||||||
|
Version 18.72.1: Mar 11, 2019 Show attendance list from list of students. (239075 lines)
|
||||||
Version 18.72: Mar 11, 2019 Show homework from list of students and teachers. (239043 lines)
|
Version 18.72: Mar 11, 2019 Show homework from list of students and teachers. (239043 lines)
|
||||||
Version 18.71: Mar 11, 2019 Listing of users now allow to do several actions. Not finished. (238920 lines)
|
Version 18.71: Mar 11, 2019 Listing of users now allow to do several actions. Not finished. (238920 lines)
|
||||||
3 changes necessary in database:
|
3 changes necessary in database:
|
||||||
|
|
42
swad_text.c
42
swad_text.c
|
@ -38501,6 +38501,27 @@ const char *Txt_Show_anyway =
|
||||||
"Mostrar de qualquer maneira";
|
"Mostrar de qualquer maneira";
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
const char *Txt_Show_attendance =
|
||||||
|
#if L==1 // ca
|
||||||
|
"Mostrar assistència.";
|
||||||
|
#elif L==2 // de
|
||||||
|
"Anwesenheit zeigen";
|
||||||
|
#elif L==3 // en
|
||||||
|
"Show attendance";
|
||||||
|
#elif L==4 // es
|
||||||
|
"Ver asistencia";
|
||||||
|
#elif L==5 // fr
|
||||||
|
"Montrer la présence.";
|
||||||
|
#elif L==6 // gn
|
||||||
|
"Ver asistencia"; // Okoteve traducción
|
||||||
|
#elif L==7 // it
|
||||||
|
"Mostra presenze";
|
||||||
|
#elif L==8 // pl
|
||||||
|
"Pokaż frekwencję";
|
||||||
|
#elif L==9 // pt
|
||||||
|
"Mostrar atendimento";
|
||||||
|
#endif
|
||||||
|
|
||||||
const char *Txt_Show_calendar =
|
const char *Txt_Show_calendar =
|
||||||
#if L==1 // ca
|
#if L==1 // ca
|
||||||
"Mostra calendari";
|
"Mostra calendari";
|
||||||
|
@ -38543,27 +38564,6 @@ const char *Txt_Show_hits = // hits = visits, clicks, page views...
|
||||||
"Mostrar visitas";
|
"Mostrar visitas";
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
const char *Txt_Show_list =
|
|
||||||
#if L==1 // ca
|
|
||||||
"Mostra la llista";
|
|
||||||
#elif L==2 // de
|
|
||||||
"Liste anzeigen";
|
|
||||||
#elif L==3 // en
|
|
||||||
"Show list";
|
|
||||||
#elif L==4 // es
|
|
||||||
"Ver lista";
|
|
||||||
#elif L==5 // fr
|
|
||||||
"Afficher la liste";
|
|
||||||
#elif L==6 // gn
|
|
||||||
"Ver lista"; // Okoteve traducción
|
|
||||||
#elif L==7 // it
|
|
||||||
"Mostra elenco";
|
|
||||||
#elif L==8 // pl
|
|
||||||
"Pokaż listę";
|
|
||||||
#elif L==9 // pt
|
|
||||||
"Mostrar lista";
|
|
||||||
#endif
|
|
||||||
|
|
||||||
const char *Txt_Show_more_details =
|
const char *Txt_Show_more_details =
|
||||||
#if L==1 // ca
|
#if L==1 // ca
|
||||||
"Mostra més detalls";
|
"Mostra més detalls";
|
||||||
|
|
91
swad_user.c
91
swad_user.c
|
@ -236,9 +236,10 @@ static void Usr_UpdateMyPrefAboutListWithPhotosPhotoInDB (void);
|
||||||
static void Usr_PutLinkToSeeAdmins (void);
|
static void Usr_PutLinkToSeeAdmins (void);
|
||||||
static void Usr_PutLinkToSeeGuests (void);
|
static void Usr_PutLinkToSeeGuests (void);
|
||||||
|
|
||||||
static bool Usr_PutActionsSeveralUsrs (Rol_Role_t Role);
|
static bool Usr_PutActionsSeveralUsrs (Rol_Role_t UsrsRole);
|
||||||
static void Usr_PutActionShowRecords (void);
|
static void Usr_PutActionShowRecords (void);
|
||||||
static void Usr_PutActionShowHomework (void);
|
static void Usr_PutActionShowHomework (void);
|
||||||
|
static void Usr_PutActionShowAttendance (void);
|
||||||
static void Usr_PutActionFollowUsers (void);
|
static void Usr_PutActionFollowUsers (void);
|
||||||
static void Usr_StartListUsrsAction (Usr_ListUsrsAction_t ListUsrsAction);
|
static void Usr_StartListUsrsAction (Usr_ListUsrsAction_t ListUsrsAction);
|
||||||
static void Usr_EndListUsrsAction (void);
|
static void Usr_EndListUsrsAction (void);
|
||||||
|
@ -8016,46 +8017,53 @@ void Usr_SeeTeachers (void)
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
// Returns true if at least one action can be shown
|
// Returns true if at least one action can be shown
|
||||||
|
|
||||||
static bool Usr_PutActionsSeveralUsrs (Rol_Role_t Role)
|
static bool Usr_PutActionsSeveralUsrs (Rol_Role_t UsrsRole)
|
||||||
{
|
{
|
||||||
extern const char *The_ClassFormInBox[The_NUM_THEMES];
|
extern const char *The_ClassFormInBox[The_NUM_THEMES];
|
||||||
bool ICanViewRecords;
|
bool ICanViewRecords;
|
||||||
bool ICanViewHomework;
|
bool ICanViewHomework;
|
||||||
|
bool ICanViewAttendance;
|
||||||
bool ICanFollow;
|
bool ICanFollow;
|
||||||
bool OptionsShown = false;
|
bool OptionsShown = false;
|
||||||
|
|
||||||
/***** Get the action to do *****/
|
/***** Get the action to do *****/
|
||||||
Gbl.Usrs.Selected.Action = Usr_ListUsrsAction (Usr_LIST_USRS_DEFAULT_ACTION);
|
Gbl.Usrs.Selected.Action = Usr_ListUsrsAction (Usr_LIST_USRS_DEFAULT_ACTION);
|
||||||
|
|
||||||
switch (Role)
|
switch (UsrsRole)
|
||||||
{
|
{
|
||||||
case Rol_GST:
|
case Rol_GST:
|
||||||
ICanViewRecords = (Gbl.Usrs.Me.Role.Logged == Rol_SYS_ADM);
|
ICanViewRecords = (Gbl.Usrs.Me.Role.Logged == Rol_SYS_ADM);
|
||||||
ICanViewHomework = false;
|
|
||||||
ICanFollow = false;
|
ICanViewHomework =
|
||||||
|
ICanViewAttendance =
|
||||||
|
ICanFollow = false;
|
||||||
break;
|
break;
|
||||||
case Rol_STD:
|
case Rol_STD:
|
||||||
ICanViewRecords =
|
ICanViewRecords =
|
||||||
ICanFollow =
|
ICanFollow = (Gbl.Scope.Current == Sco_SCOPE_CRS &&
|
||||||
(Gbl.Scope.Current == Sco_SCOPE_CRS &&
|
(Gbl.Usrs.Me.IBelongToCurrentCrs ||
|
||||||
(Gbl.Usrs.Me.IBelongToCurrentCrs ||
|
Gbl.Usrs.Me.Role.Logged == Rol_SYS_ADM));
|
||||||
Gbl.Usrs.Me.Role.Logged == Rol_SYS_ADM));
|
|
||||||
ICanViewHomework = (Gbl.Usrs.Me.Role.Logged == Rol_NET ||
|
ICanViewHomework =
|
||||||
Gbl.Usrs.Me.Role.Logged == Rol_TCH ||
|
ICanViewAttendance = (Gbl.Usrs.Me.Role.Logged == Rol_NET ||
|
||||||
Gbl.Usrs.Me.Role.Logged == Rol_SYS_ADM);
|
Gbl.Usrs.Me.Role.Logged == Rol_TCH ||
|
||||||
|
Gbl.Usrs.Me.Role.Logged == Rol_SYS_ADM);
|
||||||
break;
|
break;
|
||||||
case Rol_TCH:
|
case Rol_TCH:
|
||||||
ICanViewRecords =
|
ICanViewRecords =
|
||||||
ICanFollow =
|
ICanFollow = (Gbl.Scope.Current == Sco_SCOPE_CRS);
|
||||||
(Gbl.Scope.Current == Sco_SCOPE_CRS);
|
|
||||||
ICanViewHomework = (Gbl.Usrs.Me.Role.Logged == Rol_NET ||
|
ICanViewHomework = (Gbl.Usrs.Me.Role.Logged == Rol_NET ||
|
||||||
Gbl.Usrs.Me.Role.Logged == Rol_TCH ||
|
Gbl.Usrs.Me.Role.Logged == Rol_TCH ||
|
||||||
Gbl.Usrs.Me.Role.Logged == Rol_SYS_ADM);
|
Gbl.Usrs.Me.Role.Logged == Rol_SYS_ADM);
|
||||||
|
|
||||||
|
ICanViewAttendance = false;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
ICanViewRecords =
|
ICanViewRecords =
|
||||||
ICanViewHomework =
|
ICanViewHomework =
|
||||||
ICanFollow = false;
|
ICanViewAttendance =
|
||||||
|
ICanFollow = false;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -8077,6 +8085,13 @@ static bool Usr_PutActionsSeveralUsrs (Rol_Role_t Role)
|
||||||
OptionsShown = true;
|
OptionsShown = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/***** Attendance *****/
|
||||||
|
if (ICanViewAttendance)
|
||||||
|
{ // I can view users' attendance
|
||||||
|
Usr_PutActionShowAttendance ();
|
||||||
|
OptionsShown = true;
|
||||||
|
}
|
||||||
|
|
||||||
/***** Follow *****/
|
/***** Follow *****/
|
||||||
if (ICanFollow)
|
if (ICanFollow)
|
||||||
{ // I can follow users
|
{ // I can follow users
|
||||||
|
@ -8116,6 +8131,19 @@ static void Usr_PutActionShowHomework (void)
|
||||||
Usr_EndListUsrsAction ();
|
Usr_EndListUsrsAction ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
/******************** Put action to show users' attendance *******************/
|
||||||
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
static void Usr_PutActionShowAttendance (void)
|
||||||
|
{
|
||||||
|
extern const char *Txt_Show_attendance;
|
||||||
|
|
||||||
|
Usr_StartListUsrsAction (Usr_SHOW_ATTENDANCE);
|
||||||
|
fprintf (Gbl.F.Out,"%s",Txt_Show_attendance);
|
||||||
|
Usr_EndListUsrsAction ();
|
||||||
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/*********************** Put action to follow users **************************/
|
/*********************** Put action to follow users **************************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
@ -8185,17 +8213,14 @@ void Usr_DoActionOnSeveralUsrs1 (void)
|
||||||
case ActDoActOnSevGst:
|
case ActDoActOnSevGst:
|
||||||
Gbl.Action.Act = ActSeeRecSevGst;
|
Gbl.Action.Act = ActSeeRecSevGst;
|
||||||
Tab_SetCurrentTab ();
|
Tab_SetCurrentTab ();
|
||||||
// Rec_ListRecordsGstsShow ();
|
|
||||||
break;
|
break;
|
||||||
case ActDoActOnSevStd:
|
case ActDoActOnSevStd:
|
||||||
Gbl.Action.Act = ActSeeRecSevStd;
|
Gbl.Action.Act = ActSeeRecSevStd;
|
||||||
Tab_SetCurrentTab ();
|
Tab_SetCurrentTab ();
|
||||||
// Rec_ListRecordsStdsShow ();
|
|
||||||
break;
|
break;
|
||||||
case ActDoActOnSevTch:
|
case ActDoActOnSevTch:
|
||||||
Gbl.Action.Act = ActSeeRecSevTch;
|
Gbl.Action.Act = ActSeeRecSevTch;
|
||||||
Tab_SetCurrentTab ();
|
Tab_SetCurrentTab ();
|
||||||
// Rec_ListRecordsTchsShow ();
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
Ale_CreateAlert (Ale_ERROR,NULL,
|
Ale_CreateAlert (Ale_ERROR,NULL,
|
||||||
|
@ -8210,7 +8235,19 @@ void Usr_DoActionOnSeveralUsrs1 (void)
|
||||||
case ActDoActOnSevTch:
|
case ActDoActOnSevTch:
|
||||||
Gbl.Action.Act = ActAdmAsgWrkCrs;
|
Gbl.Action.Act = ActAdmAsgWrkCrs;
|
||||||
Tab_SetCurrentTab ();
|
Tab_SetCurrentTab ();
|
||||||
// Brw_ShowFileBrowserOrWorks ();
|
break;
|
||||||
|
default:
|
||||||
|
Ale_CreateAlert (Ale_ERROR,NULL,
|
||||||
|
"Wrong action.");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case Usr_SHOW_ATTENDANCE:
|
||||||
|
switch (Gbl.Action.Act)
|
||||||
|
{
|
||||||
|
case ActDoActOnSevStd:
|
||||||
|
Gbl.Action.Act = ActSeeLstStdAtt;
|
||||||
|
Tab_SetCurrentTab ();
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
Ale_CreateAlert (Ale_ERROR,NULL,
|
Ale_CreateAlert (Ale_ERROR,NULL,
|
||||||
|
|
11
swad_user.h
11
swad_user.h
|
@ -115,13 +115,14 @@ typedef enum
|
||||||
} Usr_ShowUsrsType_t;
|
} Usr_ShowUsrsType_t;
|
||||||
#define Usr_SHOW_USRS_TYPE_DEFAULT Usr_LIST_AS_CLASS_PHOTO
|
#define Usr_SHOW_USRS_TYPE_DEFAULT Usr_LIST_AS_CLASS_PHOTO
|
||||||
|
|
||||||
#define Usr_LIST_USRS_NUM_ACTIONS 4
|
#define Usr_LIST_USRS_NUM_ACTIONS 5
|
||||||
typedef enum
|
typedef enum
|
||||||
{
|
{
|
||||||
Usr_LIST_USRS_UNKNOWN_ACTION = 0,
|
Usr_LIST_USRS_UNKNOWN_ACTION = 0,
|
||||||
Usr_SHOW_RECORDS = 1,
|
Usr_SHOW_RECORDS = 1,
|
||||||
Usr_VIEW_HOMEWORK = 2,
|
Usr_VIEW_HOMEWORK = 2,
|
||||||
Usr_FOLLOW_USERS = 3,
|
Usr_SHOW_ATTENDANCE = 3,
|
||||||
|
Usr_FOLLOW_USERS = 4,
|
||||||
} Usr_ListUsrsAction_t;
|
} Usr_ListUsrsAction_t;
|
||||||
#define Usr_LIST_USRS_DEFAULT_ACTION Usr_SHOW_RECORDS
|
#define Usr_LIST_USRS_DEFAULT_ACTION Usr_SHOW_RECORDS
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user