153 Commits

Author SHA1 Message Date
Alexander Bias
8471a0db42 MDL-61804 admin: Add setting for course visibility sorting 2019-10-08 11:58:39 +02:00
Andrew Nicols
6047801767 Merge branch 'MDL-64032-master' of https://github.com/HuongNV13/moodle 2019-08-05 12:55:35 +08:00
Huong Nguyen
0fc30827dc MDL-64032 enrol_manual: Make consistent the UI for setting enrolment
Add end date/duration for the UI for setting enrolment should be consistent
2019-07-23 14:21:43 +07:00
Ryan Wyllie
00a66396c7 MDL-66144 course: add function to calculate user course dates 2019-07-17 15:52:51 +08:00
Julien Boulen
b1d1369dff MDL-46803 course: Prevent unenrol users with multiple roles during reset 2019-03-18 11:20:08 +01:00
Peter
7dcb274c9e MDL-63457 block_myoverview: Update getters for enrolled courses
* Update the enrol courses getter to accept an 'exclude course' id array
* Use the db query to filter hidden courses
2018-10-29 08:36:59 +08:00
Bas Brands
6481a21fc3 MDL-63337 block_myoverview: enrol_get_my_courses sort ul.timeaccess 2018-10-15 08:42:08 +02:00
Andrew Nicols
20f9b981f9 Merge branch 'dashboard-split-overview-block' of https://github.com/ryanwyllie/moodle 2018-09-27 14:08:55 +08:00
Ryan Wyllie
2c1d19fde6 MDL-63044 course: add get_enrolled_courses_by_timeline_classification 2018-09-27 13:10:44 +08:00
Eloy Lafuente (stronk7)
b687205e27 Merge branch 'MDL-60028' of https://github.com/paulholden/moodle 2018-09-25 16:57:58 +02:00
David Monllao
85d4b77cd3 Merge branch 'MDL-61967-master' of git://github.com/sarjona/moodle 2018-09-25 11:08:53 +02:00
Sara Arjona
5290d0604b MDL-61967 core_user: Allow filtering by No groups on participants page
A new optional parameter $context has been added to the
core_group::groups_get_members_join() function.
Besides, some core_group methods now accept -1 (USERSWITHOUTHGROUP) for
the groupid field.
2018-09-24 18:33:45 +02:00
Jonathan Champ
1d049e08e5 MDL-54035 accesslib: add mark_user_dirty helper
Instead of marking an entire context dirty and affecting all users
of those contexts, mark the user as dirty when the change only
affects that user.
2018-09-21 09:17:43 -04:00
Paul Holden
f56e695883 MDL-60028 enrol: fix counting of enrolled users in a given context.
Previously users enrolled in a course via multiple enrolment methods
would be counted multiple times.
2018-09-21 10:14:55 +01:00
Marina Glancy
442f12f81a MDL-62742 core: rename coursecat->core_course_category
Also rename course_in_list -> core_course_list_element
Deprecate class coursecat_sortable_records
2018-08-28 11:36:23 +02:00
David Mudrák
9cefe2f2b2 MDL-57564 enrol: Fix typos and copy&paste mistake in the exception msg 2017-12-06 23:15:17 +01:00
David Mudrák
a3d003603a MDL-57564 enrol: Change the default sort in other two functions
Similarly to what the previous patch does, we now change the default
sorting in functions enrol_get_users_courses() and
enrol_get_all_users_courses() too.

The patch also adds missing phpDocs for the functions, improves the
readability of some existing bits and mentions the changes in the
enrol/upgrade.txt file.
2017-12-05 22:58:51 +01:00
Daniel Thee Roperto
ee2187273f MDL-57564 enrol: Change the default sort in enrol_get_my_courses()
The new default value (null) now respects the navsortmycoursessort
behaviour and should be consistently used whenever we are displaying the
courses in the UI.
2017-12-05 22:01:18 +01:00
Shamim Rezaie
0897d6588e MDL-60188 groups: cache user's groups and groupings
The function groups_get_user_groups is called too often both before rendering the page and after the page is rendered (using ajax).
The function was executing a query joining 3 tables in each call. The plementation of the function has now modified to store the
query result in a request cache.
2017-11-27 10:46:35 +08:00
David Monllao
43b8618b40 Merge branch 'MDL-60179_master' of git://github.com/markn86/moodle 2017-10-19 15:26:27 +02:00
Mark Nelson
af835c24b2 MDL-60179 core: make it clear what enrolment instance is being edited 2017-10-19 14:57:23 +08:00
Jun Pataleta
d1b55a33e6 MDL-59984 enrol: Fix parameter naming for enrol conditions sql
* The character "." can't be used for sql named parameters.
2017-10-16 09:31:25 +08:00
Jun Pataleta
4047fccba7 MDL-59811 enrol: Move get_user_enrolment_actions logic to parent class
* These duplicated implementations can be simplified where the logic
  can be moved to enrol_plugin::get_user_enrolment_actions() method
  itself.
2017-10-09 10:29:02 +08:00
Eloy Lafuente (stronk7)
7ab0993265 MDL-53169 database: use bound empty strings for cross-db 2017-09-21 19:27:59 +02:00
sam marshall
22ef155087 MDL-53169 Lib: enrol_get_my_courses can list available courses too 2017-09-19 12:19:49 +01:00
Damyon Wiese
4b50765bd5 MDL-59370 enrol: Kill the enrol/users page. 2017-08-14 11:06:16 +08:00
Jun Pataleta
bb1c6f85f5 MDL-59366 core: New enrolid param for get_enrolled_* functions
* New optional parameter $enrolid for the following functions:
  - get_enrolled_join()
  - get_enrolled_sql()
  - get_enrolled_with_capabilities_join()
  Setting this parameter to a non-zero value will add a condition
  to the query such that only users that were enrolled with this
  enrolment method will be returned.

Part of MDL-59290.
2017-07-28 11:32:13 +08:00
Jun Pataleta
fd0a43be1b MDL-59369 enrol: Introduce data-action attribute for enrol action links 2017-07-26 09:44:33 +08:00
Jun Pataleta
5719f2ca50 MDL-59369 enrol: Edit user enrolment fragment 2017-07-26 09:44:02 +08:00
David Monllao
b3d6879489 MDL-59212 analytics: Analyser and static methods tests
Part of MDL-57791 epic.
2017-07-24 08:36:59 +02:00
David Monllao
413f19bc49 MDL-59211 analytics: Make cibot happy
Part of MDL-57791 epic.
2017-07-24 08:36:49 +02:00
David Monllao
58f86c4cc5 MDL-59174 enrollib: More flexibility for enrol_get_course_users
Part of MDL-57791 epic.
2017-07-24 08:36:46 +02:00
David Monllao
8970ff91bb MDL-59174 analytics: Analyser queries to enrollib
Part of MDL-57791 epic.
2017-07-24 08:36:46 +02:00
David Monllao
fba4052685 MDL-59057 enrol: New enrol API method - by_ue_id
Part of MDL-57791 epic.
2017-07-24 08:36:43 +02:00
barrasroger
499d37755c MDL-58116 core_enrol: fix handling of users on different methods 2017-04-18 13:28:08 +02:00
Jun Pataleta
966cbed632 MDL-58386 core: Fixed CI issues
Part of MDL-55611 epic.
2017-04-04 11:01:46 +01:00
Ryan Wyllie
1ef06b4335 MDL-57503 enrol: allow course ids for enrol_get_my_courses
Allow enrol_get_my_courses to be filtered by a set of known course ids
that the user may or may not be enrolled on.

The result will be a subset of the given course ids that the user is
enrolled in.

Part of MDL-55611 epic.
2017-04-03 11:36:34 +08:00
Darko Miletic
ed63ffc715 MDL-58079 core_enrol: Implementing fix and unit test 2017-03-16 14:23:34 -03:00
John Beedell
8b0d254f05 MDL-57511 Quiz: Attempts report shows non-unique debugging 2017-01-19 14:27:55 +00:00
Michael Aherne
ef97f1a24e MDL-56971 enrol: Use autoloading in enrol_get_plugin() 2016-11-15 12:22:54 +00:00
Eric Merrill
880fc15bf0 MDL-47162 core_message: Updating all uses of messaging to add courseid 2016-10-31 14:13:13 -04:00
Amanda Doughty
cc350fd9c8 MDL-47162 core_message: Add course id to message eventdata 2016-10-27 18:11:27 +02:00
Simey Lameze
0ab8b33754 MDL-29110 enrol_self: improve send course welcome message setting
This commit change send course welcome message to a drop-down that now supports sending emails from:
- Course contact
- Enrolment key holder
- No reply address
Also moves part of the logic of handling send welcome email from to a new method get_welcome_email_contact() and unit test for this new method.
2016-10-26 09:38:09 +08:00
John Beedell
10c4fce520 MDL-27072 Quiz: Remove get_users_by_capability from quiz reports 2016-10-10 11:05:15 +01:00
John Beedell
905953909f MDL-31243 access/enrol libs: rename new groups functions 2016-09-30 09:27:59 +01:00
John Beedell
9121bb2d23 MDL-31243 access/enrol libs: new fns returning useful SQL fragments
Refactor similar SQL generation code from get_users_by_capability
and get_enrolled_uses to make get_with_capability_sql.
Modified files: accesslib.php, enrollib.php, grouplib.php, new tests.
2016-09-30 09:27:56 +01:00
John Beedell
9f5170e955 MDL-31243 access/enrol libs: move enrol functions 2016-09-30 09:27:53 +01:00
Damyon Wiese
8eb15a38ef MDL-54042 user: Fix debugging in core_user_get_users_by_field
The course object returned by enrol_get_all_users_courses does not include the defaultgroupingid.

This course object is passed to user_get_user_details - which does need
the defaultgroupingid.

All the other group info is returned (groupmode) etc - so it makes sense to also return this extra field.
2016-05-06 14:07:48 +01:00
Damyon Wiese
f758951565 MDL-48362 enrol: Convert guest to standard enrolment ui
Also - provide automatic course navigation links when using the standard ui.
2016-02-29 14:33:06 +08:00
Damyon Wiese
51c736f037 MDL-48362 enrol: Auto generate the edit action icons when using the new ui 2016-02-29 14:00:31 +08:00