Version18.72.1

This commit is contained in:
Antonio Cañas Vargas 2019-03-11 14:16:55 +01:00
parent abfabdcf13
commit 4185208bd5
5 changed files with 98 additions and 57 deletions

View File

@ -2678,7 +2678,7 @@ void Usr_ReqListStdsAttendanceCrs (void)
extern const char *Hlp_USERS_Attendance_attendance_list;
extern const char *Txt_Attendance;
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 *****/
Att_GetListAttEvents (Att_OLDEST_FIRST);
@ -2729,7 +2729,7 @@ void Usr_ReqListStdsAttendanceCrs (void)
Tbl_EndTable ();
/* Send button */
Btn_PutConfirmButton (Txt_Show_list);
Btn_PutConfirmButton (Txt_Show_attendance);
/* End form */
Frm_EndForm ();
@ -2861,7 +2861,7 @@ static void Usr_ListOrPrintStdsAttendanceCrs (Att_TypeOfView_t TypeOfView)
/***** Get list of attendance events *****/
Att_GetListAttEvents (Att_OLDEST_FIRST);
/***** Get list of selected students *****/
/***** Get list of selected students if not already got *****/
Usr_GetListsSelectedUsrsCods ();
/* Check the number of students to list */

View File

@ -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: 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.
/*****************************************************************************/
@ -451,10 +453,11 @@ En OpenSWAD:
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 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.71: Mar 11, 2019 Listing of users now allow to do several actions. Not finished. (238920 lines)
3 changes necessary in database:

View File

@ -38501,6 +38501,27 @@ const char *Txt_Show_anyway =
"Mostrar de qualquer maneira";
#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 =
#if L==1 // ca
"Mostra calendari";
@ -38543,27 +38564,6 @@ const char *Txt_Show_hits = // hits = visits, clicks, page views...
"Mostrar visitas";
#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 =
#if L==1 // ca
"Mostra més detalls";

View File

@ -236,9 +236,10 @@ static void Usr_UpdateMyPrefAboutListWithPhotosPhotoInDB (void);
static void Usr_PutLinkToSeeAdmins (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_PutActionShowHomework (void);
static void Usr_PutActionShowAttendance (void);
static void Usr_PutActionFollowUsers (void);
static void Usr_StartListUsrsAction (Usr_ListUsrsAction_t ListUsrsAction);
static void Usr_EndListUsrsAction (void);
@ -8016,46 +8017,53 @@ void Usr_SeeTeachers (void)
/*****************************************************************************/
// 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];
bool ICanViewRecords;
bool ICanViewHomework;
bool ICanViewAttendance;
bool ICanFollow;
bool OptionsShown = false;
/***** Get the action to do *****/
Gbl.Usrs.Selected.Action = Usr_ListUsrsAction (Usr_LIST_USRS_DEFAULT_ACTION);
switch (Role)
switch (UsrsRole)
{
case Rol_GST:
ICanViewRecords = (Gbl.Usrs.Me.Role.Logged == Rol_SYS_ADM);
ICanViewHomework = false;
ICanFollow = false;
ICanViewRecords = (Gbl.Usrs.Me.Role.Logged == Rol_SYS_ADM);
ICanViewHomework =
ICanViewAttendance =
ICanFollow = false;
break;
case Rol_STD:
ICanViewRecords =
ICanFollow =
(Gbl.Scope.Current == Sco_SCOPE_CRS &&
(Gbl.Usrs.Me.IBelongToCurrentCrs ||
Gbl.Usrs.Me.Role.Logged == Rol_SYS_ADM));
ICanViewHomework = (Gbl.Usrs.Me.Role.Logged == Rol_NET ||
Gbl.Usrs.Me.Role.Logged == Rol_TCH ||
Gbl.Usrs.Me.Role.Logged == Rol_SYS_ADM);
ICanViewRecords =
ICanFollow = (Gbl.Scope.Current == Sco_SCOPE_CRS &&
(Gbl.Usrs.Me.IBelongToCurrentCrs ||
Gbl.Usrs.Me.Role.Logged == Rol_SYS_ADM));
ICanViewHomework =
ICanViewAttendance = (Gbl.Usrs.Me.Role.Logged == Rol_NET ||
Gbl.Usrs.Me.Role.Logged == Rol_TCH ||
Gbl.Usrs.Me.Role.Logged == Rol_SYS_ADM);
break;
case Rol_TCH:
ICanViewRecords =
ICanFollow =
(Gbl.Scope.Current == Sco_SCOPE_CRS);
ICanViewHomework = (Gbl.Usrs.Me.Role.Logged == Rol_NET ||
Gbl.Usrs.Me.Role.Logged == Rol_TCH ||
Gbl.Usrs.Me.Role.Logged == Rol_SYS_ADM);
ICanViewRecords =
ICanFollow = (Gbl.Scope.Current == Sco_SCOPE_CRS);
ICanViewHomework = (Gbl.Usrs.Me.Role.Logged == Rol_NET ||
Gbl.Usrs.Me.Role.Logged == Rol_TCH ||
Gbl.Usrs.Me.Role.Logged == Rol_SYS_ADM);
ICanViewAttendance = false;
break;
default:
ICanViewRecords =
ICanViewHomework =
ICanFollow = false;
ICanViewRecords =
ICanViewHomework =
ICanViewAttendance =
ICanFollow = false;
break;
}
@ -8077,6 +8085,13 @@ static bool Usr_PutActionsSeveralUsrs (Rol_Role_t Role)
OptionsShown = true;
}
/***** Attendance *****/
if (ICanViewAttendance)
{ // I can view users' attendance
Usr_PutActionShowAttendance ();
OptionsShown = true;
}
/***** Follow *****/
if (ICanFollow)
{ // I can follow users
@ -8116,6 +8131,19 @@ static void Usr_PutActionShowHomework (void)
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 **************************/
/*****************************************************************************/
@ -8185,17 +8213,14 @@ void Usr_DoActionOnSeveralUsrs1 (void)
case ActDoActOnSevGst:
Gbl.Action.Act = ActSeeRecSevGst;
Tab_SetCurrentTab ();
// Rec_ListRecordsGstsShow ();
break;
case ActDoActOnSevStd:
Gbl.Action.Act = ActSeeRecSevStd;
Tab_SetCurrentTab ();
// Rec_ListRecordsStdsShow ();
break;
case ActDoActOnSevTch:
Gbl.Action.Act = ActSeeRecSevTch;
Tab_SetCurrentTab ();
// Rec_ListRecordsTchsShow ();
break;
default:
Ale_CreateAlert (Ale_ERROR,NULL,
@ -8210,7 +8235,19 @@ void Usr_DoActionOnSeveralUsrs1 (void)
case ActDoActOnSevTch:
Gbl.Action.Act = ActAdmAsgWrkCrs;
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;
default:
Ale_CreateAlert (Ale_ERROR,NULL,

View File

@ -115,13 +115,14 @@ typedef enum
} Usr_ShowUsrsType_t;
#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
{
Usr_LIST_USRS_UNKNOWN_ACTION = 0,
Usr_SHOW_RECORDS = 1,
Usr_VIEW_HOMEWORK = 2,
Usr_FOLLOW_USERS = 3,
Usr_LIST_USRS_UNKNOWN_ACTION = 0,
Usr_SHOW_RECORDS = 1,
Usr_VIEW_HOMEWORK = 2,
Usr_SHOW_ATTENDANCE = 3,
Usr_FOLLOW_USERS = 4,
} Usr_ListUsrsAction_t;
#define Usr_LIST_USRS_DEFAULT_ACTION Usr_SHOW_RECORDS