Commit Graph

110 Commits

Author SHA1 Message Date
Paul Holden
7ee4e2afa0 MDL-73138 group: remove double encoding of group/role names. 2023-05-26 10:25:33 +01:00
Laurent David
183d97a956 MDL-76386 core_user: Add/remove users dialog improvement
* Use language string to customise user information in the group Add/Remove dialog
2023-02-20 09:37:06 +01:00
Marina Glancy
a800e7e62f MDL-74853 various: add second parameter to htmlentities functions
Default value of the $flag argument changed in PHP 8.1 from ENT_COMPAT to ENT_QUOTES | ENT_SUBSTITUTE
To ensure consistent behavior across different PHP version the second parameter is now required for the functions:
htmlspecialchars(), htmlentities(), htmlspecialchars_decode(), html_entity_decode() and get_html_translation_table()
2022-11-28 16:12:20 +01:00
Sujith Haridasan
73d604369d MDL-71062 core: Step 1 deprecation of print_error function 2022-07-13 08:20:54 +05:30
Paul Holden
492b19db2c MDL-72192 user: observe fullname capability in selector context. 2021-08-31 12:17:28 +01:00
Paul Holden
dc9e6cb8f7 MDL-71647 user: allow searching user selector by identity fields.
Fixes regression from d916cd77, which passed empty extra fields when
not including custom fields.
2021-05-17 16:01:07 +01:00
Katie Ransom
d916cd77ca MDL-71186 core_user: show custom user fields in group management screens 2021-04-15 15:28:17 +01:00
sam marshall
5e72715e4f MDL-71099 Lib: Move new user_fields class from core to core_user
This class would belong more appropriately within the 'user' API
(core_user) instead of within the 'core' API, since it is
directly related to user data.

Since the class has only just been added to Moodle, now is a good
time to move it.
2021-03-25 13:47:23 +00:00
sam marshall
558cc1b85e MDL-45242 Lib: Replace calls to deprecated functions
In all cases changes have been kept to a minimum while not making
the code completely horrible. For example, there are many instances
where it would probably be better to rewrite a query entirely, but
I have not done that (in order to reduce the risk of changes).
2021-03-10 10:57:10 +00:00
Paul Holden
be60a5d096 MDL-66471 user: fix user_selector debug about extra identity fields. 2020-05-19 19:12:35 +01:00
Paul Holden
7455b741c9 MDL-66762 user: escape extra/email user fields. 2019-11-07 09:00:19 +08:00
Paul Holden
d19a7b2794 MDL-62161 user: preserve all selected users between searches. 2019-08-30 14:37:11 +01:00
Huong Nguyen
afcc7a723d MDL-64258 Group: Performance problem on the enrol group members page 2019-07-03 15:08:51 +07:00
Mathew May
5cac5fa428 MDL-64506 templates: BS2 m-x-x to BS4 mx-x 2019-04-03 19:47:11 +08:00
David Mudrák
afa3e0ff32 MDL-59847 core: Stop supporting custom identity fields in user selectors
The user_selector classes supported custom list of extra identity
fields. But they should obey the configured user policy and respect the
privacy setting made by site administrators. So the list of user
identifiers should never be hard-coded, but the setting
$CFG->showuseridentity should be always respected.
2018-08-02 10:22:07 +08:00
David Mudrák
ef65e09af0 MDL-59847 core: Fix display of hidden identity fields in user selectors
User selectors now respect the user's permission to view other users'
hidden profile fields.
2018-08-02 10:22:05 +08:00
Shamim Rezaie
ee8f39b7a2 MDL-55915 core_user: let fullname() know if user has viewfullnames cap
Added $viewfullnames property to the user_selector_base class so anyone using a child class of this class can
let it know if user has viewfullnames capability or not.
2017-01-20 20:30:09 +11:00
Simey Lameze
c1584e154c MDL-56785 theme_boost: apply bs4 styles to search options checkboxes 2016-11-15 09:07:39 +00:00
Damyon Wiese
2f3f8e45da MDL-56657 admin: Style all admin/role pages for boost 2016-11-14 15:11:15 +08:00
Sam Wilson
813c0590f7 MDL-29774 core_user: Update group-membership summaries on AJAX calls 2016-10-18 09:31:36 +08:00
Russell Smith
1fcf0ca8a5 MDL-35628 performance: Remove dirname() where possible.
dirname() is a slow function compared with __DIR__ and using
'/../'.  Moodle has a large number of legacy files that are included
each time a page loads and is not able to use an autoloader as it is
functional code.  This allows those required includes to perform as
best as possible in this situation.
2016-06-10 08:06:49 +10:00
Andrew Nicols
64e7aa4de1 MDL-28286 JavaScript: Convert all uses of M.str to M.util.get_string 2014-12-01 08:32:04 +13:00
Sam Hemelryk
a2ed6e69f9 MDL-44255 user: tidied up phpdocs and coding style 2014-02-24 09:23:47 +13:00
Tim Lock
4c1bac5c75 MDL-42998: Fix user selection search options autoselectunique. 2013-11-21 09:17:04 +10:30
Mark Nelson
4e829d48d1 MDL-40468 libraries: removed usages of get_related_contexts_string() in core
Also tidied up the functions by removing unused parameters.
2013-07-19 15:17:50 +08:00
Adrian Greeve
a327f25ef1 MDL-31776 - lib: Alternate name fields
Add support for additional name fields and flexible formating of
user names.
2013-07-09 11:45:50 +08:00
Dan Poltawski
12313d6125 MDL-26925 User selector: Set label when no results
Thanks to Jonathon Fowler for the fix!
2013-06-06 14:07:27 +08:00
Tim Hunt
d2e32121b0 MDL-26956 user selector: fix regressions sam caused. 2013-04-03 11:44:23 +01:00
sam marshall
b2ec866fc7 MDL-26956 (1) Library: Move search SQL function to datalib
This function used to be in the user selector, but it is useful in
other areas where we want to search for users as it handles a number
of search options (including extra fields, etc.) and returns SQL
which can be included in a joined query.

A unit test has been added to check the results of these searches.
2013-03-28 10:45:12 +00:00
Eloy Lafuente (stronk7)
bab8a6724f Merge branch 'MDL-33680-m' of git://github.com/andrewnicols/moodle 2013-03-19 18:27:57 +01:00
Andrew Robert Nicols
c2f47c19ad MDL-33680 JavaScript: Improve error handling on user selector
Since the previous commit to this issue removes the built-in debugging
tests, I've added these back using the M.core libraries.
2013-03-16 10:52:02 +00:00
Andrew Robert Nicols
28037331fb MDL-33680 JavaScript: Use the correct Content-Type for AJAX scripts
The repository_ajax.php script was returning a text/plain Content-Type and
user/selector/search.php was setting the content-type when this should be
handled by with the definition of AJAX_SCRIPT.
2013-03-16 10:52:02 +00:00
Rajesh Taneja
9a51c3d95c MDL-36395: Converted hard-coded MAX_USER_PER_PAGE to config setting
course, cohort, enrol, role, groups and forum used to use hard-coded
MAX_USERS_PER_PAGE=100 for rendering user list. This has been converted
to $CFG->maxusersperpage.
2013-03-12 17:14:53 +08:00
Nicolas Connault
dd15ef0e1b MDL-36413 Added "this->" to exclude variable assignment
The this-> keyword was missing from the $exclude = array() statement.
2012-11-07 14:48:40 +08:00
Aparup Banerjee
84c04ff295 Merge branch 'MDL-35776' of git://github.com/timhunt/moodle 2012-10-09 11:53:12 +08:00
Eloy Lafuente (stronk7)
b5d155a417 MDL-34657 gropus UI: delete unused var. 2012-10-04 23:49:12 +02:00
Tim Hunt
70f5ed370f MDL-34657 gropus UI: sort existing group memebers. 2012-10-04 11:45:56 +01:00
Tim Hunt
c62488c22f MDL-35776 user ajax: fix sort order in chrome.
It seems that Chrome orders fields of objects in order of array key.
Therefore we must stop using user.id in the PHP arrays, and instead
ensure that we use sequential numbers.

This commit fixes the user selector.
2012-10-03 18:46:07 +01:00
Dan Poltawski
624feda48d Merge branch 'MDL-35680' of git://github.com/timhunt/moodle 2012-10-02 09:52:12 +08:00
Tim Hunt
e783cc45ae MDL-35680 user selector: more usable when queries are slow.
The problem is to do when you pause a bit, so a search starts, and then
type a bit more before the search finishes. It was behaving like this:

1. Type a bit, then pause.
2. First search request sent.
3. Type a bit more, then pause.
4. Second search request sent.
5. First search request completes.
6. You try to select one result.
7. Second search request comples, overwriting what you are selecting.

This fix works by cancelling the first request before sending the
second.
2012-09-27 19:03:34 +01:00
Tim Hunt
de867fa36e MDL-34657 user selector: bug with "keep non-matching selected users" 2012-09-27 16:41:50 +01:00
Tim Hunt
9695ff811b MDL-34657 user sorting: consistent sorting everywhere.
This commit coverts everything in the codebase to use the new
users_order_by_sql function when sorting lists of users. More details in
the bug.

Note that this does not change places where users are displayed in a
sortable table, and the sort order comes from the table.
2012-09-27 12:41:42 +01:00
Eloy Lafuente (stronk7)
519fb0b878 Merge branch 'wip-mdl-34606' of git://github.com/rajeshtaneja/moodle 2012-09-04 02:08:54 +02:00
Rajesh Taneja
25ac6d30f2 MDl-34606 Administration: id for clear button is set properly, and disabled on page load 2012-08-27 15:13:52 +08:00
sam marshall
1d1917aeaa MDL-31973 Groups: groups_members table should have 'component', 'itemid' fields 2012-08-24 15:30:13 +01:00
Petr Škoda
cb94adc252 MDL-34776 improve multiple "NOT IN" enrolment and role related queries 2012-08-18 09:56:25 +02:00
Frederic Massart
4373103084 MDL-34460 Librairies: Replaced deprecated get_context_instance() 2012-07-26 13:23:28 +08:00
Rajesh Taneja
1e12c1203b MDL-30651 libraries: Replaced deprecated PARAM_INTEGER with PARAM_INT 2012-07-19 15:37:46 +08:00
Petr Skoda
c52551dc3c MDL-8249 localise standard role names and descriptions if empty 2012-07-06 08:22:34 +02:00
Marina Glancy
3c2ed2d7ce MDL-31072: Fixed bug causing memory overflow for many-user systems:
when function find_users was supposed to be used for user validation but no userids were passed to it, it retrieved all users in the system.
This caused memory overflow on systems with too many users (like moodle.org).
Now we make sure that find_users is not called for validation if there is nobody to validate.

Also improved query inside find_users to make it work faster
2012-01-13 10:12:17 +08:00