2261 Commits

Author SHA1 Message Date
Eloy Lafuente (stronk7)
8c46d204a1 MDL-60548 tests: Get tests passing
This includes:

- changing all usernames in feature to lowercase, for cross-db passing. Fixes:
  - user/tests/behat/set_email_display.feature
- ensure that course_enrolment_manager::get_potential_users() and
  external always returns user->maildisplay attribute, so email
  visibility can be calculated by user_get_user_details(). Fixes:
  - enrol/tests/behat/enrol_user.feature
  - blocks/news_items/tests/behat/display_news.feature
  - course/tests/behat/course_creation.feature
2018-04-11 17:15:38 +02:00
Eloy Lafuente (stronk7)
2f27dca60d Merge branch 'MDL-60548-master-v4' of https://github.com/Dave-B/moodle 2018-04-10 17:14:46 +02:00
Sara Arjona
3449816e7f MDL-61736 user: Show correct status when enrol method is disabled
When disabling an enrolment method, the user status will be displayed
as "Not current" instead of "Active".
2018-04-09 08:45:57 +02:00
Farhan Karmali
6afa07edd1 MDL-61183 user: Added total participants count on paricipants page 2018-04-04 07:56:38 +05:30
David Mudrák
0c98acefc1 MDL-61658 user: Fix displaying of user's country name
In these cases we want to use the method get_list_of_countries() to
obtain translated names of all potential country codes. The country code
is already there in the database. So it does not matter if the country
is among those whitelisted in $CFG->allcountrycodes - we want to see its
name anyway.
2018-03-21 18:17:47 +01:00
Marina Glancy
1727c939ba MDL-61477 admin: sitepolicy handler API
- Define sitepolicy handler manager class, base class and the core handler
- Allow to set a plugin as sitepolicyhandler that implements the sitepolicy API
- Modify web services to return information from the 3rd party handler instead of core if needed
2018-03-15 11:32:55 +08:00
David Mudrák
0bdc578567 MDL-61477 admin: Allow plugins to act as alternate policy handlers
The patch introduces a new site setting 'sitepolicyhandler' that can be
either empty or contain a plugin component name. If it is empty, the
site policy feature keeps working as before and the core keeps the
control over it.

If a plugin is specified, it is expected to implement the callback
'site_policy_handler' in its lib.php file. The callback should return a
URL to a script where the user can accept the site policies. The plugin
itself is responsible for setting the 'policyagreed' flag in the users
table. The callback may return an empty value, in which case the user
can continue using the site without being redirected.

The patch adds support for a new pre-config flag NO_SITEPOLICY_CHECK.
This constant should be defined and set to true if we should not check
the user's policyagreed status during the require_login().

This is for pages where the user actually accepts the site policies and
helps to avoid the redirect loop.
2018-03-15 09:31:41 +08:00
Andrew Nicols
3452ea4265 Merge branch 'MDL-60828-master' of git://github.com/sarjona/moodle 2018-03-13 14:18:59 +08:00
Andrew Nicols
d300abab0e Merge branch 'MDL-61365-master' of git://github.com/sarjona/moodle 2018-03-12 13:44:17 +08:00
Sara Arjona
bb4a79234b MDL-60828 user: Reset current page when filtering/searching users
Added baseurl parameter to core_user\output\unified_filter to let specify
different URL, instead of using always $PAGE->url.
2018-03-09 08:30:24 +01:00
Jan Dageförde
aa949cb2f9
MDL-61549 user: Remove $already columns because none were loaded yet 2018-02-27 14:47:44 +01:00
M Kassaei
7ce538be0f MDL-61402 Core: Add a cancel button to edit profile page 2018-02-16 09:34:23 +00:00
Sara Arjona
58af736dec MDL-61365 group: Fix default filter when group mode is visible 2018-02-07 18:02:56 +01:00
David Monllao
02e6350222 Merge branch 'MDL-61027-master' of git://github.com/rezaies/moodle 2018-02-05 11:56:18 +01:00
David Monllao
1cc79637c7 Merge branch 'MDL-42764_master' of git://github.com/markn86/moodle 2018-02-05 11:18:34 +01:00
David Monllao
e9fd486eb6 Merge branch 'MDL-60646-master' of git://github.com/junpataleta/moodle 2018-02-01 10:33:16 +08:00
Mark Nelson
b02295039e MDL-42764 core: added missing string definition
Also changed the string index so it was not
vague. The index 'emailempty' appears as if it
could belong to a validation method for a form.
2018-01-29 19:07:57 +08:00
Igor Sazonov
358b10a337 MDL-58410 user: add support for alternative name search
The solution about searching all external names fields (middlename etc) from course enrolment page (enrolled and enrolling pages)
2018-01-24 11:15:45 +08:00
Shamim Rezaie
425817793a MDL-61027 calendar: Fix datetime profile field issue with non-Gregorian 2018-01-22 18:47:06 +11:00
Jun Pataleta
4369677af2 MDL-60646 user_portfolio: Fix action icons in Show / hide column
* Refactor the code to make it look cleaner and easier to read.
* Fixed incorrect alt-text for the configure icon.
* Fixed missing alt-text for show/hide icon.
2018-01-18 15:26:21 +08:00
David Balch
d2bba97d77 MDL-60548 profile: Clarify some users can always see email addresses. 2018-01-15 12:21:09 +00:00
David Balch
565f3f25f0 MDL-60548 profile: Show profile email when 'maildisplay' allows it.
Adds 'email' to hiddenuserfields, which allows:
 * user to view email on their own profile,
 * users with cap site:viewuseridentity to view email on any profile (admins/teachers)
 * admin to veto display of email to users without site:viewuseridentity (except viewing their own)
 * unprivileged users to view if the profile's maildisplay permits it.

Changes in user/lib.php include removal of is_siteadmin() test, which
is redundant due to checks via has_capability().

Fixes regression from 2.9 (MDL-45774).
2018-01-15 12:21:09 +00:00
David Balch
224796f0fa MDL-60548 profile: Behat tests for email display in profiles. 2018-01-12 11:36:43 +00:00
Andrew Nicols
4b55982446 MDL-61204 user: Fix random failure in behat
We need to get into the habit of not using usernames like 'student1'
and 'student10' as our matches are non-strict, and the tests become
dependent upon DB sort order.

This change adds a character after the varying value to act as a
delimter for all of these tests.
2018-01-12 09:35:56 +08:00
Mark Nelson
e8a1a5868a MDL-40613 auth_ldap: removed usage of profile_load_custom_fields()
Also reverted profile_load_custom_fields() signature and changed
behaviour of the new function profile_save_custom_fields().
2018-01-03 18:13:01 +08:00
Jun Pataleta
1588837a9d Merge branch 'MDL-40613_master' of git://github.com/markn86/moodle 2018-01-02 16:50:29 +08:00
Albert Gasset
2c977ceb29 MDL-40613 auth_ldap: sync custom profile fields 2017-12-19 14:13:34 +08:00
Andrew Hancox
a63cd3e2ca MDL-50666 core: Add function get_viewable_roles to set role visibility 2017-12-19 13:53:23 +13:00
Eloy Lafuente (stronk7)
25e9c56117 Merge branch 'MDL-60738-master' of git://github.com/jleyva/moodle 2017-11-28 20:59:22 +01:00
Juan Leyva
6db2423551 MDL-60738 webservice: Clean theme and lang properly
Sometimes the "theme" and "lang" fields in the user and course tables
in the database are set to incorrect values (uninstalled or
non-existent themes and language packs).
This makes Web Services functions to fail because the WS server
validate the returned data using the validate_param function that clean
parameters.
2017-11-20 09:37:30 +01:00
David Mudrák
88f4b6c75d MDL-60824 profile: Fix handling of to-be-created user id
The script user/editadvanced.php uses special value of userid = -1 for
the case when a new user is being created. Such a value passes the
non-empty check and would lead to "invaliduser" error.
2017-11-16 22:14:16 +01:00
Damyon Wiese
a571aa9b85 Merge branch 'wip-MDL-59876-master' of git://github.com/abgreeve/moodle 2017-11-15 10:35:30 +01:00
Adrian Greeve
2c97abeff2 MDL-59876 core_user: Add required library for function.
The external service create_users has a function call to
useredit_update_user_preference() that requires editlib.php
2017-11-15 11:43:19 +08:00
Damyon Wiese
dbf0819d92 Merge branch 'MDL-59876-master' of git://github.com/jleyva/moodle 2017-11-13 10:47:49 +08:00
Eloy Lafuente (stronk7)
ba854606e6 MDL-60764 versions: bump all versions and requires near release
version = 2017111300 release version
requires= 2017110800 current rc2 version
2017-11-10 02:52:53 +01:00
Sara Arjona
4bcb0a9a1d MDL-60550 user: Add more restrictions in keyword searches
Original patch provided by Tim Schroeder.
2017-11-09 16:29:29 +08:00
Damyon Wiese
56f05f23c6 MDL-60579 user: Don't lose text filters
When replacing a group filter with a different group filter - don't forget all the current text filters that have
been applied.
2017-11-09 11:06:30 +08:00
Damyon Wiese
bb869f05e8 MDL-60579 user: Move defines into library
Entry page user/index.php was defining constants that were used by the renderer.
This means the renderer was tied to user/index.php.
2017-11-09 11:06:30 +08:00
Andrew Nicols
7cf4331a6f MDL-60579 user: Correct PARAM type for filters
Damyon pointed out during the integration of this fixset, that the
PARAM type is incorrect.
2017-11-09 10:07:13 +08:00
Andrew Nicols
762f8dc1db MDL-60579 user: Add missing case breaks 2017-11-09 09:07:34 +08:00
Andrew Nicols
a997dc9da5 MDL-60579 user: Correct search for strings 2017-11-09 09:07:21 +08:00
Andrew Nicols
446b21b512 MDL-60579 user: Check filter strings have correct part count 2017-11-09 09:07:02 +08:00
Andrew Nicols
3968d2ca7e MDL-60579 user: Prevent behat from interacting til setup complete 2017-11-09 09:05:22 +08:00
David Monllao
ed0e2cea00 Merge branch 'MDL-60732-master' of git://github.com/damyon/moodle 2017-11-08 17:48:07 +01:00
David Monllao
4e73acf3cf Merge branch 'MDL-60579-master' of https://github.com/mihailges/moodle 2017-11-08 12:16:20 +01:00
Damyon Wiese
a471bc4971 MDL-60732 core_user: Show group filters
Always show the group filters, even if the course is in NO_GROUPS mode.
2017-11-08 16:45:42 +08:00
Juan Leyva
abdb8f59a5 MDL-59876 webservice: Fix the user preference name field type
Web Services from user and enrol components has been updated to change
the user preference name field type from PARAM_ALPHANUMEXT to
PARAM_RAW.
The old type was not matching the core functionality.
2017-11-07 16:44:48 +01:00
David Monllao
57c9b7fc37 MDL-59758 user: Notes publish state adapted to ws 2017-11-07 13:53:21 +01:00
David Monllao
cae37299f3 Merge branch 'MDL-59758-master' of git://github.com/damyon/moodle 2017-11-07 12:37:30 +01:00
Mihail Geshoski
c835126185 MDL-60579 enrolments: Applied filters lost on certain actions
AMOS BEGIN
    CPY [invalidrequest,enrol_lti],[invalidrequest,enrol]
AMOS END
2017-11-07 16:17:00 +08:00