2257 Commits

Author SHA1 Message Date
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
Andrew Nicols
b6a226f96f MDL-64032 user: Comment out failing behat tests
These are failing because of an unrelated issue which is possibly quite
an edge case.
2019-08-08 09:31:00 +08: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
195ea4480b MDL-62497 javascript: build AMD modules with new transpiler 2019-07-19 14:12:49 +08:00
Helen Foster
08a114cf40 MDL-66003 lang: Import fixed English strings (en_fix)
Significant string changes:

* moodleorghubname,core_admin and
  sitemustberegistered,message_airnotifier - 'Moodle.net' changed to
  'Moodle'

* registration_help,core_admin and registermoochtips,core_hub - removed
  erroneous 'access to Moodle.net our course sharing platform'

* trackingtype_help,mod_forum and formnotavailable,core_grading and
  showgrades_help,core and rolewarning_help,core_rating -
  'Administration block' changed to 'Actions menu or admin block',
  'navigation block' changed to 'navigation drawer or block'
2019-06-25 18:00:51 +02:00
cescobedo
e094614d7c MDL-58268 enrol_ldap: Remove enrol/ldap/cli/sync deprecated in 3.3 2019-05-31 09:40:47 +02:00
Marina Glancy
ff51af495f MDL-65726 core_roles: allow to create roles in install.php 2019-05-29 10:48:51 +02:00
Mihail Geshoski
1fc5c588a4 MDL-57729 enrol_lti: Escape the property values of the xpath elements 2019-05-29 09:55:23 +08:00
Eloy Lafuente (stronk7)
3572a25cc3 MDL-65644 upgrade: add 3.7.0 separation line to all upgrade scripts 2019-05-20 19:35:05 +02:00
Eloy Lafuente (stronk7)
c9a1a6341c MDL-65571 versions: bump all versions and requires near release
version = 2019052000 release version
requires= 2019051100 current beta (week6roll2) version
2019-05-12 23:46:34 +02:00
Andrew Nicols
80d5636595 MDL-65558 enrol_database: use , as port separator 2019-05-10 12:24:05 +08:00
Jun Pataleta
f22d0153c2 Merge branch 'MDL-65260' of https://github.com/timhunt/moodle 2019-05-01 10:22:32 +08:00
David Monllaó
45c8b226be Merge branch 'MDL-64782-master' of git://github.com/rezaies/moodle 2019-04-24 17:37:45 +02:00
David Monllaó
6dbe565998 Merge branch 'MDL-65211-master' of git://github.com/jleyva/moodle 2019-04-23 13:42:33 +02:00
Shamim Rezaie
1916f2be8f MDL-64782 core_enrol: Performance improvement 2019-04-23 17:01:48 +10:00
Tim Hunt
ab2474726d MDL-65260 users policies: allow username in Show user identity
This commit is based on Brendan Heywood's work for MDL-52908.
2019-04-03 11:51:14 +01:00
Juan Leyva
dfcf8342fb MDL-65211 enrol: Return if user is being completion tracked 2019-04-01 18:45:14 +02:00
Julien Boulen
b1d1369dff MDL-46803 course: Prevent unenrol users with multiple roles during reset 2019-03-18 11:20:08 +01:00
Marina Glancy
beff3806d6 MDL-10965 courses: capability to browse course list 2019-04-10 12:35:28 +02:00
Mathew May
5cac5fa428 MDL-64506 templates: BS2 m-x-x to BS4 mx-x 2019-04-03 19:47:11 +08:00
Eloy Lafuente (stronk7)
c93eedf8dd Merge branch 'MDL-64084-master' of git://github.com/jleyva/moodle 2019-03-12 00:29:58 +01:00
Eloy Lafuente (stronk7)
8ab1bd2f5e Merge branch 'MDL-64943-master-enfix' of git://github.com/mudrd8mz/moodle 2019-03-05 11:08:32 +01:00
Andrew Nicols
264fdc2cae Merge branch 'MDL-64886_master' of https://github.com/marxjohnson/moodle 2019-03-05 10:04:15 +08:00
Juan Leyva
1f87a7f653 MDL-64084 core_enrol: Return expect last access course time 2019-02-28 11:11:35 +01:00
Helen Foster
38dc5b9677 MDL-64943 lang: Import fixed English strings (en_fix)
Significant string changes:

* importgroups_help,core_group - Correcting optional fieldnames
  (removing picture, hidepicture and adding groupidnumber, groupingname
  and enablemessaging)

* penaltyforeachincorrecttry_help,core_question - additional paragraph
  about scoring logic

* resultdownloadready,tool_dataprivacy - wording corrected (no need to
  go to a download page)

* auth_dbfielduser,auth_db - varchar data type requirement
2019-02-28 09:50:18 +01:00