diff --git a/swad_changelog.h b/swad_changelog.h index 5f1f8d1e1..4bee8d9a4 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -487,7 +487,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.65.4 (2019-11-12)" +#define Log_PLATFORM_VERSION "SWAD 19.65.5 (2019-11-12)" #define CSS_FILE "swad19.47.css" #define JS_FILE "swad19.65.js" /* @@ -496,6 +496,7 @@ ps2pdf source.ps destination.pdf // TODO: Importante: filtrar proyectos por usuarios (igual que en trabajos o en asistencia) // TODO: Code refactoring in HTML h1, title, meta, video, p, iframe, input hidden, area + Version 19.65.5: Nov 12, 2019 Changes in selection of which users in projects. (246519 lines) Version 19.65.4: Nov 12, 2019 Fixed bug in HTML input texts. (246505 lines) Version 19.65.3: Nov 12, 2019 Fixed bug in listing of students' works. (246455 lines) Version 19.65.2: Nov 12, 2019 Fixed bug in JavaScript. (246454 lines) diff --git a/swad_project.c b/swad_project.c index 10d97e604..73777ae35 100644 --- a/swad_project.c +++ b/swad_project.c @@ -227,7 +227,7 @@ static void Prj_LockProjectEditionInDB (long PrjCod); static void Prj_UnlockProjectEditionInDB (long PrjCod); /*****************************************************************************/ -/***************************** List all projects *****************************/ +/******************************* List projects *******************************/ /*****************************************************************************/ void Prj_SeeProjects (void) @@ -235,6 +235,10 @@ void Prj_SeeProjects (void) /***** Get parameters *****/ Prj_GetParams (); + /***** Select users? *****/ + if (Gbl.Prjs.Filter.SelUsrs) + Ale_ShowAlert (Ale_INFO,"Vamos a seleccionar usuarios..."); + /***** Show all the projects *****/ Prj_ShowProjectsInCurrentPage (); } @@ -760,6 +764,11 @@ static void Prj_GetParamWho (void) /***** If parameter Who is unknown, set it to default *****/ if (Gbl.Prjs.Filter.Who == Usr_WHO_UNKNOWN) Gbl.Prjs.Filter.Who = Prj_FILTER_WHO_DEFAULT; + + /***** Select users? *****/ + Gbl.Prjs.Filter.SelUsrs = false; + if (Gbl.Prjs.Filter.Who == Usr_WHO_SELECTED) + Gbl.Prjs.Filter.SelUsrs = Par_GetParToBool ("SelUsrs"); } /*****************************************************************************/ diff --git a/swad_project.h b/swad_project.h index ebc8b2af0..10530be1f 100644 --- a/swad_project.h +++ b/swad_project.h @@ -90,6 +90,7 @@ typedef enum struct Prj_Filter { Usr_Who_t Who; // Show my / selected users' / all projects + bool SelUsrs; // Select users to view their projects? unsigned Assign; // Show assigned / non assigned projects unsigned Hidden; // Show hidden / visible projects unsigned Faulti; // Show faulty / faultless projects diff --git a/swad_user.c b/swad_user.c index 15e8368a7..50a7c726b 100644 --- a/swad_user.c +++ b/swad_user.c @@ -9747,6 +9747,11 @@ void Usr_PutWhoIcon (Usr_Who_t Who) "ICO_HIGHLIGHT PHOTO15x20"); break; case Usr_WHO_SELECTED: + Par_PutHiddenParamChar ("SelUsrs",'Y'); + HTM_INPUT_IMAGE (Cfg_URL_ICON_PUBLIC,"user-check.svg", + Txt_WHO[Who], + "ICO_HIGHLIGHT ICOx20"); + break; case Usr_WHO_FOLLOWED: HTM_INPUT_IMAGE (Cfg_URL_ICON_PUBLIC,"user-check.svg", Txt_WHO[Who],