Version 15.232

This commit is contained in:
Antonio Cañas Vargas 2016-06-27 12:35:15 +02:00
parent fdbe90405c
commit 7a38e83e9f
7 changed files with 868 additions and 685 deletions

View File

@ -121,6 +121,7 @@
// TODO: Messages in msg_content_deleted older than a certain time should be deleted to ensure the protection of personal data // TODO: Messages in msg_content_deleted older than a certain time should be deleted to ensure the protection of personal data
// 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: 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: Add Stack Exchange to webs/networks // TODO: Add Stack Exchange to webs/networks
// TODO: Degree in list of notifications should link to internal degree
// 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: 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 // TODO: Add a new WS function to count the nunmber of users to return in call to function getUsers
@ -129,13 +130,14 @@
/****************************** Public constants *****************************/ /****************************** Public constants *****************************/
/*****************************************************************************/ /*****************************************************************************/
#define Log_PLATFORM_VERSION "SWAD 15.231.4 (2016-06-24)" #define Log_PLATFORM_VERSION "SWAD 15.232 (2016-06-27)"
#define CSS_FILE "swad15.229.css" #define CSS_FILE "swad15.229.css"
#define JS_FILE "swad15.226.js" #define JS_FILE "swad15.226.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 15.232: Jun 27, 2015 Search any user, independently on role. (203657 lines)
Version 15.231.4: Jun 24, 2015 Fix bug (buffer overflow) when getting users. (203474 lines) Version 15.231.4: Jun 24, 2015 Fix bug (buffer overflow) when getting users. (203474 lines)
Version 15.231.3: Jun 24, 2015 Parameter name used for "Scope" now depends on context. (203472 lines) Version 15.231.3: Jun 24, 2015 Parameter name used for "Scope" now depends on context. (203472 lines)
Version 15.231.2: Jun 24, 2015 Search is restricted by default to the smaller (down in hierarchy) scope. (203475 lines) Version 15.231.2: Jun 24, 2015 Search is restricted by default to the smaller (down in hierarchy) scope. (203475 lines)

View File

@ -334,7 +334,7 @@ void Con_ShowGlobalConnectedUsrs (void)
extern const char *Txt_session; extern const char *Txt_session;
extern const char *Txt_sessions; extern const char *Txt_sessions;
extern const char *Txt_user[Usr_NUM_SEXS]; extern const char *Txt_user[Usr_NUM_SEXS];
extern const char *Txt_users; extern const char *Txt_users[Usr_NUM_SEXS];
extern const char *Txt_ROLES_SINGUL_abc[Rol_NUM_ROLES][Usr_NUM_SEXS]; extern const char *Txt_ROLES_SINGUL_abc[Rol_NUM_ROLES][Usr_NUM_SEXS];
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];
unsigned StdsTotal = Con_GetConnectedStdsTotal (); unsigned StdsTotal = Con_GetConnectedStdsTotal ();
@ -369,7 +369,7 @@ void Con_ShowGlobalConnectedUsrs (void)
fprintf (Gbl.F.Out,"%u %s:", fprintf (Gbl.F.Out,"%u %s:",
UsrsTotal, UsrsTotal,
(UsrsTotal == 1) ? Txt_user[Usr_SEX_UNKNOWN] : (UsrsTotal == 1) ? Txt_user[Usr_SEX_UNKNOWN] :
Txt_users); Txt_users[Usr_SEX_UNKNOWN]);
/***** Write total number of students *****/ /***** Write total number of students *****/
if (StdsTotal) if (StdsTotal)

View File

@ -9187,7 +9187,7 @@ void Brw_ShowFileMetadata (void)
extern const char *Txt_Identified_views; extern const char *Txt_Identified_views;
extern const char *Txt_Public_views; extern const char *Txt_Public_views;
extern const char *Txt_user[Usr_NUM_SEXS]; extern const char *Txt_user[Usr_NUM_SEXS];
extern const char *Txt_users; extern const char *Txt_users[Usr_NUM_SEXS];
extern const char *Txt_Save_file_properties; extern const char *Txt_Save_file_properties;
struct FileMetadata FileMetadata; struct FileMetadata FileMetadata;
struct UsrData PublisherUsrDat; struct UsrData PublisherUsrDat;
@ -9487,7 +9487,7 @@ void Brw_ShowFileMetadata (void)
FileMetadata.NumViewsFromLoggedUsrs, FileMetadata.NumViewsFromLoggedUsrs,
FileMetadata.NumLoggedUsrs, FileMetadata.NumLoggedUsrs,
(FileMetadata.NumLoggedUsrs == 1) ? Txt_user[Usr_SEX_UNKNOWN] : (FileMetadata.NumLoggedUsrs == 1) ? Txt_user[Usr_SEX_UNKNOWN] :
Txt_users); Txt_users[Usr_SEX_UNKNOWN]);
/***** Write number of public views *****/ /***** Write number of public views *****/
fprintf (Gbl.F.Out,"<tr>" fprintf (Gbl.F.Out,"<tr>"

View File

@ -209,6 +209,7 @@ static void Sch_PutFormToSearchWithWhatToSearchAndScope (Act_Action_t Action,Sco
extern const char *Txt_centres; extern const char *Txt_centres;
extern const char *Txt_degrees; extern const char *Txt_degrees;
extern const char *Txt_courses; extern const char *Txt_courses;
extern const char *Txt_users[Usr_NUM_SEXS];
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_my_documents; extern const char *Txt_my_documents;
extern const char *Txt_documents_in_my_courses; extern const char *Txt_documents_in_my_courses;
@ -221,6 +222,7 @@ static void Sch_PutFormToSearchWithWhatToSearchAndScope (Act_Action_t Action,Sco
Txt_centres, // Sch_SEARCH_CENTRES Txt_centres, // Sch_SEARCH_CENTRES
Txt_degrees, // Sch_SEARCH_DEGREES Txt_degrees, // Sch_SEARCH_DEGREES
Txt_courses, // Sch_SEARCH_COURSES Txt_courses, // Sch_SEARCH_COURSES
Txt_users[Usr_SEX_UNKNOWN], // Sch_SEARCH_USERS
Txt_ROLES_PLURAL_abc[Rol_TEACHER][Usr_SEX_UNKNOWN], // Sch_SEARCH_TEACHERS Txt_ROLES_PLURAL_abc[Rol_TEACHER][Usr_SEX_UNKNOWN], // Sch_SEARCH_TEACHERS
Txt_ROLES_PLURAL_abc[Rol_STUDENT][Usr_SEX_UNKNOWN], // Sch_SEARCH_STUDENTS Txt_ROLES_PLURAL_abc[Rol_STUDENT][Usr_SEX_UNKNOWN], // Sch_SEARCH_STUDENTS
Txt_ROLES_PLURAL_abc[Rol__GUEST_][Usr_SEX_UNKNOWN], // Sch_SEARCH_GUESTS Txt_ROLES_PLURAL_abc[Rol__GUEST_][Usr_SEX_UNKNOWN], // Sch_SEARCH_GUESTS
@ -296,6 +298,7 @@ static bool Sch_CheckIfIHavePermissionToSearch (Sch_WhatToSearch_t WhatToSearch)
0x1FF, // Sch_SEARCH_CENTRES 0x1FF, // Sch_SEARCH_CENTRES
0x1FF, // Sch_SEARCH_DEGREES 0x1FF, // Sch_SEARCH_DEGREES
0x1FF, // Sch_SEARCH_COURSES 0x1FF, // Sch_SEARCH_COURSES
0x1FF, // Sch_SEARCH_USERS
0x1FF, // Sch_SEARCH_TEACHERS 0x1FF, // Sch_SEARCH_TEACHERS
0x1FF, // Sch_SEARCH_STUDENTS 0x1FF, // Sch_SEARCH_STUDENTS
0x1FF, // Sch_SEARCH_GUESTS 0x1FF, // Sch_SEARCH_GUESTS
@ -627,6 +630,9 @@ static void Sch_SearchInDB (void)
case Sch_SEARCH_COURSES: case Sch_SEARCH_COURSES:
NumResults = Sch_SearchCoursesInDB (RangeQuery); NumResults = Sch_SearchCoursesInDB (RangeQuery);
break; break;
case Sch_SEARCH_USERS:
NumResults = Sch_SearchUsrsInDB (Rol_UNKNOWN); // Here Rol_UNKNOWN means any user
break;
case Sch_SEARCH_TEACHERS: case Sch_SEARCH_TEACHERS:
NumResults = Sch_SearchUsrsInDB (Rol_TEACHER); NumResults = Sch_SearchUsrsInDB (Rol_TEACHER);
break; break;

View File

@ -37,7 +37,7 @@
/******************************** Public types *******************************/ /******************************** Public types *******************************/
/*****************************************************************************/ /*****************************************************************************/
#define Sch_NUM_WHAT_TO_SEARCH 11 #define Sch_NUM_WHAT_TO_SEARCH 12
typedef enum typedef enum
{ {
Sch_SEARCH_ALL = 0, Sch_SEARCH_ALL = 0,
@ -45,12 +45,13 @@ typedef enum
Sch_SEARCH_CENTRES = 2, Sch_SEARCH_CENTRES = 2,
Sch_SEARCH_DEGREES = 3, Sch_SEARCH_DEGREES = 3,
Sch_SEARCH_COURSES = 4, Sch_SEARCH_COURSES = 4,
Sch_SEARCH_TEACHERS = 5, Sch_SEARCH_USERS = 5,
Sch_SEARCH_STUDENTS = 6, Sch_SEARCH_TEACHERS = 6,
Sch_SEARCH_GUESTS = 7, Sch_SEARCH_STUDENTS = 7,
Sch_SEARCH_OPEN_DOCUMENTS = 8, Sch_SEARCH_GUESTS = 8,
Sch_SEARCH_DOCUM_IN_MY_COURSES = 9, Sch_SEARCH_OPEN_DOCUMENTS = 9,
Sch_SEARCH_MY_DOCUMENTS = 10, Sch_SEARCH_DOCUM_IN_MY_COURSES = 10,
Sch_SEARCH_MY_DOCUMENTS = 11,
} Sch_WhatToSearch_t; } Sch_WhatToSearch_t;
/*****************************************************************************/ /*****************************************************************************/

View File

@ -49433,26 +49433,88 @@ const char *Txt_Users =
"Utilizadores"; "Utilizadores";
#endif #endif
const char *Txt_users = const char *Txt_users[Usr_NUM_SEXS] =
{ // Usr_SEX_UNKNOWN
#if L==1 #if L==1
"usuaris"; "usuaris"
#elif L==2 #elif L==2
"Benutzer"; "Benutzer"
#elif L==3 #elif L==3
"users"; "users"
#elif L==4 #elif L==4
"usuarios"; "usuarios"
#elif L==5 #elif L==5
"utilisateurs"; "utilisateurs"
#elif L==6 #elif L==6
"puruh&aacute;ra"; "puruh&aacute;ra"
#elif L==7 #elif L==7
"utenti"; "utenti"
#elif L==8 #elif L==8
"u&zdot;ytkownicy"; "u&zdot;ytkownicy"
#elif L==9 #elif L==9
"utilizadores"; "utilizadores"
#endif #endif
, // Usr_SEX_FEMALE
#if L==1
"usuarias"
#elif L==2
"Benutzer"
#elif L==3
"users"
#elif L==4
"usuarias"
#elif L==5
"utilisateuses"
#elif L==6
"usuarias" // Okoteve traducción
#elif L==7
"utenti"
#elif L==8
"u&zdot;ytkownicy"
#elif L==9
"utilizadoras"
#endif
, // Usr_SEX_MALE
#if L==1
"usuaris"
#elif L==2
"Benutzer"
#elif L==3
"users"
#elif L==4
"usuarios"
#elif L==5
"utilisateurs"
#elif L==6
"puruh&aacute;ra"
#elif L==7
"utenti"
#elif L==8
"u&zdot;ytkownicy"
#elif L==9
"utilizadores"
#endif
, // Usr_SEX_ALL
#if L==1
"usuaris"
#elif L==2
"Benutzer"
#elif L==3
"users"
#elif L==4
"usuarios"
#elif L==5
"utilisateurs"
#elif L==6
"puruh&aacute;ra"
#elif L==7
"utenti"
#elif L==8
"u&zdot;ytkownicy"
#elif L==9
"utilizadores"
#endif
};
const char *Txt_X_users_have_been_eliminated = // Warning: it is very important to include %u in the following sentences const char *Txt_X_users_have_been_eliminated = // Warning: it is very important to include %u in the following sentences
#if L==1 #if L==1

File diff suppressed because it is too large Load Diff