Commit Graph

156 Commits

Author SHA1 Message Date
Mihail Geshoski 204178d646 MDL-61707 authentication: Remove presignup session upon user signup 2018-07-23 09:33:08 +08:00
Michael Hawkins c157e137ee MDL-62618 user: Display full names consistently on users page 2018-07-05 10:08:33 +08:00
sam marshall bef86c669c MDL-62273 Profile: Callback allows plugins to control profile access
Adds a new callback, <plugin>_control_view_profile. Plugins may
return core_user::VIEWPROFILE_PREVENT to prevent access,
core_user::VIEWPROFILE_DO_NOT_PREVENT to make no change, or
core_user::VIEWPROFILE_FORCE_ALLOW to allow access even when Moodle
would normally prevent it.

This allows third-party plugins to restrict (or allow) access to
profile pages in response to arbitrary business logic.
2018-06-01 09:59:01 +01: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
Jan Dageförde aa949cb2f9 MDL-61549 user: Remove $already columns because none were loaded yet 2018-02-27 14:47:44 +01: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
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
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
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 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
Marina Glancy b47fda7191 MDL-60029 core_user: new api functions rearranged 2017-10-10 10:34:55 +08:00
Mike Churchward 860f59b13c MDL-60029 core_user: Added new api function to reduce db calls. 2017-10-09 14:10:38 +08:00
Jake Dallimore eb01e70b91 MDL-58953 user: fix course checking logic in user_can_view_profile()
Make sure to check that $user in enrolled in $course before checking
whether the current user has capabilities in that course, and make sure
that we don't check user context caps when handling a specific course.
2017-09-07 10:53:33 +02:00
Jake Dallimore 067accce47 MDL-59825 user: user_can_view_profile() checks all of a $user's courses
This function used to check only those courses shared by both users
when it should have been checking all courses in which $user is
enrolled. Managers can view a user's course profile without necessarily
sharing the course (being enrolled in) with the $user.
2017-08-18 08:29:37 +08:00
Jake Dallimore 4d068a6708 MDL-59172 user: user_can_view_profile() now checks viewalldetails cap 2017-08-07 09:27:04 +08:00
Jun Pataleta 9651e491d8 MDL-59366 user: Create a unified filter for participants page
Part of MDL-59290.
2017-07-31 13:04:06 +08:00
Jun Pataleta fb7929677a MDL-59369 user: Add status column to the participants table 2017-07-26 09:42:38 +08:00
Andrew Nicols e18ebf3999 Merge branch 'MDL-59367-master' of git://github.com/damyon/moodle 2017-07-25 15:02:55 +08:00
Damyon Wiese 73d0d56284 MDL-59367 user: Tests and coding style
Add a unit test for user_roles_editable.
Coding style fixes.
Don't show duplicate roles.
2017-07-21 10:25:25 +08:00
Damyon Wiese 5d0b4765d8 MDL-59367 roles: Add roles to participants page. 2017-07-21 09:52:14 +08:00
Jun Pataleta a9991533fa MDL-59436 user: Render city and country based on $CFG->showuseridentity
* I also fixed the redundant generation of query fields in
  user_get_participants_sql().
2017-07-21 08:46:23 +08:00
Mark Nelson bc47b70667 MDL-59395 core_user: move participants table to own class
Removed the edit link variable which was used in the heading
'Users with the role ..' but was never displayed due to filters.

Other minor tidy ups as well.

Part of MDL-59290.
2017-07-05 14:51:41 +08:00
Simey Lameze f3dacc3860 MDL-58617 core_output: add mapping for dashboard on user menu 2017-04-20 13:56:13 +08:00
Eloy Lafuente (stronk7) 79262cb681 Merge branch 'MDL-57840-33-get_users_by_field' of https://github.com/roperto/moodle 2017-03-21 01:05:47 +01:00
Ankit Agarwal 58d85af209 MDL-56526 userlib: Do not allow not loggedin users if forceloginforprofile is set 2017-03-10 18:03:52 +00:00
Daniel Thee Roperto b80caca188 MDL-57840 libraries: Fixed missing fields in get_users_by_field(). 2017-02-22 16:07:14 +11:00
Ankit Agarwal 3e40dc8c61 MDL-58032 core_user: Fix case when acting user is a visitor 2017-02-22 09:00:45 +05:30
Jake Dallimore fa30dd8c6e MDL-57182 navigation: fix login failures display in page footer.
A bug introduced with MDL-45893 meant that the failure count was being
reset, causing the footer code to be skipped. This patch fixes that
bug and adds behat tests covering the displayloginfailures feature.
2016-12-13 07:19:58 +08:00
David Monllao 4de871f4ca Merge branch 'MDL-57001-master' of git://github.com/damyon/moodle 2016-11-24 15:29:04 +08:00
Damyon Wiese 7dba450fd4 MDL-57001 user_menu: Hide switch roles students
Check that there are switchable roles before showing the link in the user menu.
2016-11-24 15:11:19 +08:00
Damyon Wiese 70b03eff02 MDL-57001 switchroles: Move to user menu
Take this out of the navigation and force it in the user menu.
2016-11-24 15:11:19 +08:00
Damyon Wiese 7095f5be97 MDL-57001 usermenu: Add switch role to the bottom of the user menu 2016-11-24 15:11:19 +08:00
Mark Nelson cb8057531f MDL-56871 core_message: fix inconsistent online status between panels 2016-11-23 16:32:46 +08:00
Simey Lameze 8490014955 MDL-31465 core_user: Suspended field must be boolean 2016-10-14 10:44:08 +08:00
Andrew Solomon 511db62153 MDL-31465 core_user: Incorporate user suspension into webservices 2016-10-14 10:13:49 +08:00
Andrew Nicols 21e8b48d13 MDL-51758 libraries: Remove password_compat library from core 2016-07-18 10:06:57 +08:00
Andrew Nicols 6ab41abd3e Merge branch 'MDL-52781-master' of git://github.com/lameze/moodle 2016-04-21 15:54:45 +08:00
Simey Lameze ac9768fc1b MDL-52781 core_user: replace direct PARAM_ usages.
This commit replace as much as possible of clean_param and PARAM_ usages related to user object.
Also few unit tests has been changed to match the new validation
2016-04-21 15:24:36 +08:00
Simey Lameze 7a06720604 MDL-52781 core_user: add validation to user insertion and updating method
The new validation were added to user_create_user and user_update_user,
displaying debug message if some invalid data has been found.
Also the unit tests of those methods has been changed to match the methods behaviour.
2016-04-21 15:24:35 +08:00
Damyon Wiese 65a67e238d MDL-51040 cbe: Fixes from peer review
No logic changes here - only small refactorings based on feedback from
peer review.
2016-04-18 10:58:48 +08:00
Damyon Wiese 3c659fc202 MDL-51648 cbe: Add a user competency plan summary page (allows grading) 2016-04-18 10:58:47 +08:00
Andrew Nicols d7dbef7366 MDL-53181 core: Add selectors to user menu items 2016-03-22 09:20:21 +08:00
Marina Glancy e11d7380c2 MDL-51283 core_tag: change tagtype to isstandard
Change 'official' to 'standard' in UI
2016-02-02 17:31:14 +08:00
Marina Glancy c4e868d5f0 MDL-50851 user: use new tag API for interests 2016-01-10 15:25:47 +08:00
Dani Palou 1f7273af6a MDL-51685 user: Support gravatar images in user_get_user_details 2015-11-04 08:40:19 +01:00
David Monllao 07d370849b MDL-42639 user: user:viewalldetails enough to view some fields
The fields are:
- username
- idnumber
- institution
- department
2015-09-29 16:55:14 +08:00
Dan Poltawski f1352da1ba Merge branch 'wip-MDL-27177-master' of git://github.com/abgreeve/moodle 2015-08-25 09:55:00 +01:00
Adrian Greeve 66a43cd543 MDL-27177 roles: Allow students to see co-students profiles.
If the student shares a course with another student then let them
see the same detail on the full profile page as they do on the
course profile page.
2015-08-25 09:43:17 +08:00
David Monllao c68b32067e MDL-50839 user: realuseravatar should also read avatarsize 2015-08-12 08:39:07 +08:00
David Balch 9dcd50358a MDL-50839 user_menu: Allow themes to set User menu avatar size.
Added an @array "options" parameter to user_get_user_navigation_info(),
for passing in avatarsize, and possibly other options in future.

Also removed an errant parameter in the /lib/outputrenderers.php
user_get_user_navigation_info() call, as there was no corresponding
parameter in the function definition.

(Test written by Jetha Chan.)
2015-08-11 13:57:17 +01:00