2282 Commits

Author SHA1 Message Date
Jake Dallimore
af331f08d4 Merge branch 'MDL-45849-selfenrol' of https://github.com/Peterburnett/moodle 2020-07-16 16:27:01 +02:00
Jun Pataleta
c5438f982c MDL-57678 enrol_ldap: Replace usage of make_categories_options()
Replace with core_course_category::make_categories_list() instead.
2020-07-15 18:26:03 +08:00
Peter Burnett
37c99bd07e MDL-45849 enrol_self: Added self enrol capability 2020-07-10 11:52:10 +10:00
Víctor Déniz Falcón
d07fb8b9e8 MDL-69093 enrol_manual: added check for allowed roles a user can assign 2020-07-07 08:32:39 +02:00
Helen Foster
38d5e3db1b MDL-69130 lang: Import fixed English strings (en_fix)
Significant string change:

- presentationoraltrequired,atto_image - wording changed to mention
  'decorative only' checkbox
2020-06-25 21:54:13 +02:00
Eloy Lafuente (stronk7)
b764343e5a MDL-69044 upgrade: add 3.9.0 separation line to all upgrade scripts 2020-06-14 13:08:09 +02:00
Jake Dallimore
337e2e2b23 Merge branch 'MDL-68973' of https://github.com/stronk7/moodle 2020-06-10 16:13:57 +08:00
Andrew Nicols
a9075379d8 MDL-68977 enrol_manual: Add pending promises to enrol modal 2020-06-10 08:16:03 +08:00
Eloy Lafuente (stronk7)
115cc0214f MDL-68973 versions: bump all versions and requires near release
version = 2020061500 release version
requires= 2020060900 current rc1 (week7roll1) version
2020-06-09 16:23:09 +02:00
Andrew Nicols
eb087fc5de MDL-68951 user: Add appropriate exceptions for table/participants 2020-06-08 09:35:39 +08:00
Bas Brands
6a4ce7b0a3 MDL-67386 theme_boost: upgrade bootstrap to version 4.5.0 2020-05-25 15:48:17 +02:00
Adrian Greeve
1c1fd15b18 Merge branch 'MDL-68333-master' of git://github.com/marinaglancy/moodle 2020-05-20 13:17:58 +08:00
Marina Glancy
5b529aca15 MDL-68333 testing: trigger user_created event in user generator 2020-05-19 19:11:54 +02:00
Andrew Nicols
abc83c40b5 MDL-68464 enrol_manual: Comment out buggy behat line
This is commented out because auto-hidden toasts currently call `hide()`
and trigger the `bs.toast.hide` event immediately, and _then_ apply the
autohide delay.

Since we automatically add M.util.pending_js calls when we _start_ to
hide, and resolve them when the hide _finishes_, this means that we do:
- addToast called
- trigger `bs.toast.show` event
- add to pending_js
- [pending_js queue not empty - behat waits]
- message is shown in UI
- `hide()` called
- trigger `bs.toast.hide` event
- add to pending_js
- [pending_js queue not empty - behat waits]
- start autohide delay
- [pending_js queue not empty - behat waits]
- [pending_js queue not empty - behat waits]
- [pending_js queue not empty - behat waits]
- [pending_js queue not empty - behat waits]
- end autohide delay
- remove message (no longer present in DOM)
- trigger `bs.toast.hidden` event
- resolve pending_js
- [pending_js queue empty - behat stops waiting]
- Behat runs next step: And I should see "1 enrolled users"
-- Step fails beacuse the message has been shown, and has then been removed

The conversation should have been:
- addToast called
- trigger `bs.toast.show` event
- add to pending_js
- [pending_js queue not empty - behat waits]
- message is shown in UI
- start autohide delay
- trigger `bs.toast.shown` event
- resolve pending_js
- [pending_js queue empty - behat stops waiting]
- Behat runs next step: And I should see "1 enrolled users"
-- Step passes
- autohide delay ends and calls `hide()`
- trigger bs.toast.hide event
- add to pending_js
- [behat waits]
- end autohide delay
- remove message (no longer present in DOM)
- trigger `bs.toast.hidden` event
- resolve pending_js
- [pending_js queue empty - behat stops waiting]
- Behat run continues

See MDL-67386 for futher information.
2020-05-19 12:37:21 +08:00
Andrew Nicols
e0e7b19f9c MDL-68464 enrol_manual: Reload participants table after enroling 2020-05-19 12:37:21 +08:00
Andrew Nicols
c50f5af248 MDL-68464 enrol_manual: Rewrite quickenrolment to use ES6 2020-05-19 12:33:40 +08:00
Andrew Nicols
7afd16ad84 MDL-66109 behat: Require newline at EOF
This change enables the gherkinlint rule to require a new line at the
end of the file. This change is in keeping with existing Moodle coding
style guidelines.
2020-05-11 11:07:49 +08:00
Mihail Geshoski
9fa46e8a8c MDL-67845 enrol_database: Remove enrol_database_admin_setting_category
This class was only used by the database enrolment plugin settings and
was replaced by admin_settings_coursecat_select. Also, this class is in
a plugin which we do not expect to be extended and therefore it can be
simply removed without going through the deprecation process.
2020-05-06 10:50:05 +08:00
Mihail Geshoski
b16f5398a5 MDL-67845 enrol_database: Use course category selection setting
We should use admin_settings_coursecat_select instead of
enrol_database_admin_setting_category as the second class is only
being used by the database enrolment plugin settings and can be
removed after this change.
2020-05-06 10:50:05 +08:00
Shamim Rezaie
3dec4c6ce3 MDL-68148 core_user: avoid multiple enrol buttons with the same id 2020-04-08 11:22:34 +10:00
Eloy Lafuente (stronk7)
9dc5d5ce0b Merge branch 'MDL-67827-master' of git://github.com/andrewnicols/moodle 2020-03-09 20:36:09 +01:00
Sara Arjona
6185f1ce24 Merge branch 'MDL-66671-master' of https://github.com/dthies/moodle 2020-03-09 18:49:02 +01:00
Andrew Nicols
604887ce8f MDL-67827 behat: Pending JS improvements for dialogues 2020-03-06 12:59:38 +08:00
Daniel Thies
158898254c MDL-66671 enrol_lti: Skip grade sync when cm deleted 2020-02-28 09:32:24 -06:00
Anthony Forth
bcc3a463f6 MDL-67945 enrol: missing $DB in edit_instance_form 2020-02-26 16:22:36 +01:00
Jun Pataleta
a762f048b8 Merge branch 'MDL-67118' of https://github.com/stronk7/moodle 2020-01-23 15:12:58 +08:00
Eloy Lafuente (stronk7)
011d55dd62 MDL-67118 enrol_ldap: add pagesize/subcontexts provider
With that provider we'll be explicitly checking that any
pagesize and subcontexts search is returning results consistently
so the internal paging/servercontrols work as expected.
2020-01-16 19:16:14 +01:00
Eloy Lafuente (stronk7)
ba62f54ef2 MDL-67118 enrol_ldap: paged results functions deprecated php74 and up
Starting with php74 the following functions are deprecated:
- ldap_control_paged_result()
- ldap_control_paged_result_response()

Starting with php73, ldap servercontrols were included. One of those
servercontrols, LDAP_CONTROL_PAGEDRESULTS, is the one in charge of
controlling paged results.

So, we are going to add some conditional code here:

1) if php < 7.3, use old paged result functions.
2) if php >= 7.3, switch to LDAP_CONTROL_PAGEDRESULTS servercontrol.

With a TODO about removing 1) in Moodle 4.1, once php73 becomes required.
2020-01-16 19:16:14 +01:00
David Mudrák
0845825659 MDL-66712 enrol: Fix the reported days of inactivity on unenrolment
There were two problems here. Firstly, the $days was not correctly
calculated due to missing parentheses. Secondly, the sentence had
grammar issues.
2020-01-16 13:35:01 +01:00
Eloy Lafuente (stronk7)
4621917c62 MDL-67114 core: php74 fix. Fix use of scalar as array in core
There are various places where it's not guaranteed that the
variable being used is array, and instead, can be null, bool, int...

We need to check that because php74 warns about it.

Where possible we have used the coalesce operator as
replacement for isset() ternary operations.
2020-01-03 11:33:15 +01:00
Adrian Greeve
42d7f7f9e4 Merge branch 'MDL-65809-master' of git://github.com/sarjona/moodle 2019-12-24 14:53:03 +08:00
Adrian Greeve
f00542c485 Merge branch 'MDL-66999-master' of git://github.com/bmbrands/moodle 2019-12-23 14:26:39 +08:00
Sara Arjona
a26cfe71d3 MDL-65809 upgrade: clean < 3.5.0 upgrade steps
This just deletes all the upgrade steps previous to 3.5.0. Some
small adjustments, like tweaking globals can also be applied
when needed.

Also includes an upgrade step to prevent upgrading from any
version < 2018051700 (v3.5.0) as anti-cheating measure.

Previous commits have removed/deprecated all the upgradelib functions
not used anymore in codebase. Deletion has been documented in corresponding
upgrade.txt files:

- upgrade_fix_block_instance_configuration()
- upgrade_theme_is_from_family(), upgrade_find_theme_location()
and linkcoursesectionsupgradescriptwasrun setting
- upgrade_block_positions
- upgrade_fix_config_auth_plugin_names()
 and upgrade_fix_config_auth_plugin_defaults()
- format_xxx_upgrade_remove_numsections(), format_xxx_upgrade_hide_extra_sections()
and format_xxx_upgrade_add_empty_sections()
- filter_mathjaxloader_upgrade_cdn_cloudflare()
and filter_mathjaxloader_upgrade_mathjaxconfig_equal()
- get_assignments_with_rescaled_null_grades()

These have been kept because continue being used by restore:

- \core\task\refresh_mod_calendar_events_task
2019-12-20 12:20:43 +01:00
Felice Candilio
4a4a73467c MDL-67410 Enrolments: Casting the perpage parameter to INT
On the course's Participants page, when manually enrolling users
the AJAX call might get excesively slow, due to the treatment
of the perpage parameter as a string, which gets concatenated with the
number 1 (perpage: parseInt(perpage) + 1) instead of performing a
numerical addition.

If there are for example 1500+ users on the site, the method
core_enrol_get_potential_users will be executed with a value of 15001
for the perpage parameter, rendering painfully slow.
2019-12-12 22:21:58 +01:00
Bas Brands
40ea67534c MDL-66999 theme_boost: @extend remove extends for tables 2019-12-12 11:27:56 +01:00
Eloy Lafuente (stronk7)
492d047d11 MDL-67284 upgrade: add 3.8.0 separation line to all upgrade scripts 2019-11-17 11:40:19 +01:00
Eloy Lafuente (stronk7)
d5be859063 MDL-67199 versions: bump all versions and requires near release
version = 2019111800 release version
requires= 2019111200 current beta (week7roll1) version
2019-11-12 17:57:08 +01:00
Paul Holden
7455b741c9 MDL-66762 user: escape extra/email user fields. 2019-11-07 09:00:19 +08:00
Eloy Lafuente (stronk7)
88d29a1bb8 MDL-66965 core: php74 curly 2 square braces changes
Note this only modified core files, still there are a lot
of curly brace uses but all them are within 3rd part
libraries and will be handled apart.
2019-10-25 17:41:10 +02:00
Jun Pataleta
c23313f6e8 Merge branch 'MDL-66968' of https://github.com/stronk7/moodle 2019-10-25 10:20:05 +08:00
Eloy Lafuente (stronk7)
f4feabb83f MDL-66968 php74: array_key_exists() for objects is deprecated
Replace it for correct property_exists() when the element
being inspected is a property of object/class.

Amended and squased changes:
- keep mongo unmodified. The information is array, hence correct.
- fix a couple of messaging phpdocs that were incorrect.

Amended take#2:
- As far as mongo resturns BSONDocument that is ArrayObject, aka
implements ArrayAccess, we have decided to explicitly cast results
to array so existing array_key_exists() and other accesses will
continue working the same.
2019-10-25 00:49:04 +02:00
Willian Mano
7a27c90102 MDL-62485 enrol: Success message after enroll/unenroll user in a course 2019-10-24 13:43:27 -03:00
Alexander Bias
8471a0db42 MDL-61804 admin: Add setting for course visibility sorting 2019-10-08 11:58:39 +02:00
Simey Lameze
6d76fc107a MDL-66075 enrol: add unit tests for search_users webservice 2019-09-23 13:07:40 +08:00
Simey Lameze
1de4baf1f1 MDL-66075 core: various fixes & code polishing
* Removes unnecessary comment in search_users() WS.
* Replaces DB call by get_course() in search_users() WS.
* Fix discussionids handling on export.php.
* Coding style fix in test_search_users unit test.
* Add missing version bump.
* phpDOc fixes in post vault.
* Fix in the dataformat callback to handle different data types.
2019-09-23 13:07:30 +08:00
Shamim Rezaie
0f308fcda7 MDL-66269 enrol: A new webservice to search course participants
Part of MDL-66075.
2019-09-20 08:19:01 +08:00
Shamim Rezaie
151ef39cd8 MDL-66269 enrol: added search_users method to course_enrolment_manager
Part of MDL-66075.
2019-09-20 08:19:01 +08:00
Paul Holden
b15bb419ba MDL-63293 enrol_manual: observe user paging config in enrol dialog. 2019-09-15 21:48:03 +01:00
Shamim Rezaie
3919150d37 MDL-66489 enrol: prevent warning when the duration field is disabled 2019-09-11 20:18:43 +10:00
Shamim Rezaie
2d4ce64dde MDL-66489 enrol: Send all form data to WS and do all busines logic there
It is discouraged to use JS Date functions. We should pass all raw data to PHP.
2019-09-11 20:18:26 +10:00