Version 15.223.1

This commit is contained in:
Antonio Cañas Vargas 2016-06-12 13:20:52 +02:00
parent 3989031fce
commit d963ae5f54
2 changed files with 11 additions and 3 deletions

View File

@ -125,8 +125,6 @@
// TODO: Messages in msg_content_deleted older than a certain time should be deleted to ensure the protection of personal data
// TODO: Request confirmation to remove user's photo
// TODO: FIX BUG: A teacher uploads a document in course documents zone, then he/she unregister from course, then he/she search for his/her documents, a document is shown in results but he/she can not view it
// TODO: Do not show users without name in users to follow
// TODO: Link to indicators in course configuration should go to the same tab/session
// TODO: Modify WS function getUsers changing: userRole to indicate all users, and a new parameter filter (search string (name, @nickname, mail)) to restring number of users
// TODO: Add a new WS function to count the nunmber of users to return in call to function getUsers
@ -135,13 +133,14 @@
/****************************** Public constants *****************************/
/*****************************************************************************/
#define Log_PLATFORM_VERSION "SWAD 15.223 (2016-06-12)"
#define Log_PLATFORM_VERSION "SWAD 15.223.1 (2016-06-12)"
#define CSS_FILE "swad15.218.css"
#define JS_FILE "swad15.216.js"
// 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
/*
Version 15.223.1: Jun 12, 2016 Show only users to follow with first name and surname 1. (202276 lines)
Version 15.223: Jun 12, 2016 New forms to change course configuration. (202268 lines)
4 changes necessary in database:
UPDATE actions SET Txt='Cambiar cód. institucional asignatura' WHERE ActCod='1024' AND Language='es';

View File

@ -109,6 +109,7 @@ void Fol_SuggestWhoToFollow (void)
Prf_PutLinkRequestUserProfile ();
/***** First try: build query to get users to follow *****/
// Get only users with surname 1 and first name
sprintf (Query,"SELECT DISTINCT UsrCod FROM"
" ("
/***** Likely known users *****/
@ -126,6 +127,8 @@ void Fol_SuggestWhoToFollow (void)
" AND usr_follow.FollowedCod<>'%ld'"
" AND usr_follow.FollowedCod=usr_data.UsrCod"
" AND usr_data.ProfileVisibility IN ('%s','%s')"
" AND usr_data.Surname1<>''" // Surname 1 not empty
" AND usr_data.FirstName<>''" // First name not empty
")"
" UNION "
// Users who share any course with me
@ -141,6 +144,8 @@ void Fol_SuggestWhoToFollow (void)
" AND crs_usr.UsrCod<>'%ld'"
" AND crs_usr.UsrCod=usr_data.UsrCod"
" AND usr_data.ProfileVisibility IN ('%s','%s','%s')"
" AND usr_data.Surname1<>''" // Surname 1 not empty
" AND usr_data.FirstName<>''" // First name not empty
")"
" UNION "
// Users who share any course with me with another role
@ -155,6 +160,8 @@ void Fol_SuggestWhoToFollow (void)
" AND crs_usr.Role<>my_crs_role.Role"
" AND crs_usr.UsrCod=usr_data.UsrCod"
" AND usr_data.ProfileVisibility='%s'"
" AND usr_data.Surname1<>''" // Surname 1 not empty
" AND usr_data.FirstName<>''" // First name not empty
")"
") AS LikelyKnownUsrsToFollow"
// Do not select my followed
@ -172,6 +179,8 @@ void Fol_SuggestWhoToFollow (void)
"SELECT UsrCod FROM usr_data"
" WHERE UsrCod<>'%ld'"
" AND ProfileVisibility IN ('%s','%s')"
" AND Surname1<>''" // Surname 1 not empty
" AND FirstName<>''" // First name not empty
// Do not select my followed
" AND UsrCod NOT IN"
" (SELECT FollowedCod FROM usr_follow"