128 Commits

Author SHA1 Message Date
Marina Glancy
ef99a587d3 MDL-70967 enrol_meta: fix error in unittest 2021-02-22 18:04:14 +01:00
Vitaly
d7d1ed65a5 MDL-56653 enrol_meta: a single DB query in edit_instance_validation
The 'edit_instance_validation()' method checks for existing meta enrolment instances.
The fix replaces DB queries in a loop for each course with a single query for all courses.
Also, a new testing method 'test_edit_instance_validation_with_existing_courses()'
was added to /enrol/meta/tests/plugin_test.php to test if the new implementation
returns an error in case of trying to save the already linked courses in the 'customint1' field.
2020-11-12 15:14:44 +03:00
Eloy Lafuente (stronk7)
3a5641cb74 MDL-67673 phpunit: Remove deprecated assertEquals() params
The optional parameters of assertEquals() and assertNotEquals()
are deprecated in PHPUnit 8 (to be removed in PHPUnit 9):

- delta => use assertEqualsWithDelta()
- canonicalize => use assertEqualsCanonicalizing()
- ignoreCase => use assertEqualsIgnoringCase
- maxDepth => removed without replacement.

More info @ https://github.com/sebastianbergmann/phpunit/issues/3341

Initial search done with:

ag 'assert(Not)?Equals\(.*,.*,' --php

Then, running tests and fixing remaining cases.
2020-10-21 12:46:00 +02:00
Eloy Lafuente (stronk7)
fbb0767536 MDL-69475 versions: bump all versions and requires in master
version = 2021052500 release version
requires= 2021052500 same than version

Why 20210525? (25th May 2021) ?

Because master is going to be Moodle 4.0, to be released
on November 2021. And, until then, we are going to have
a couple of "intermediate" releases:

- Moodle 3.10 to be released 9th November 2020. (2020110900)

  This version will be using versions from today to 2020110900
  (once it's released the YYYYMMDD part stops advancing).

- Moodle 3.11 to be released 10th May 2021. (2021051000)

  This version will be using versions from 3.10 release to 2021051000
  (once it's released the YYYYMMDD part stops advancing).

That means that all versions from today to 2021051000 are going
to be used by those 2 "intermediate" releases (3.10 and 3.11).

And we cannot use them in master, because it's forbidden to have
any overlapping of versions between branches (or different upgrade
paths will fail).

So, get that 2021051000, let's add it a couple of weeks to cover
the on-sync period (or a 2 weeks delay max!) and, the first version
that master can "own" in exclusive (without any overlap) is, exactly,
25th May 2021, hence our 20210525.
2020-08-18 00:47:15 +02: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
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
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
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
Eloy Lafuente (stronk7)
085353b315 MDL-64282 versions: bump all versions and requires near release
version = 2018120300 release version
requires= 2018112800 current rc2 (week7roll1) version
2018-11-29 18:24:08 +01:00
Shamim Rezaie
e66a60b9c0 MDL-63500 enrol_meta: refactoring get_contexts_for_userid
This issue is part of the MDL-62560 Epic.
2018-10-22 12:48:29 +02:00
Shamim Rezaie
8091629306 MDL-63500 enrol_meta: Support for removal of multiple context users
This issue is part of the MDL-62560 Epic.
2018-10-22 12:48:27 +02:00
Víctor Déniz Falcón
02fda279ed MDL-57281 behat: deprecated step definition I navigate to node in
Definition step deprecated and affected tests modified.
2018-08-20 12:53:26 +01:00
cescobedo
267effaaa2 MDL-62356 enrol_meta: Add privacy implementation for enrol_meta 2018-05-14 10:55:52 +02:00
Eloy Lafuente (stronk7)
8e8ae80550 Merge branch 'MDL-62354-master-enfix' of git://github.com/mudrd8mz/moodle 2018-05-10 11:37:55 +02:00
Helen Foster
a5591614d5 MDL-62354 lang: Merge English strings from the en_fix language pack
Significant string changes:

* publishstate_help, core_notes - including GDPR guidance
* contactdataprotectionofficer_desc, tool_dataprivacy - removing mention
  of link on privacy policy page as it is not yet implemented
2018-05-09 22:39:21 +02:00
Eloy Lafuente (stronk7)
57ea6753d3 MDL-62361 versions: bump all versions and requires near release
version = 2018051400 release version
requires= 2018050800 current beta+ (week4roll1) version
2018-05-09 02:46:30 +02:00
cescobedo
980e85cd44 MDL-61915 enrol: Add privacy implementation for all enrol plugins
None of the Enrol plugins (except lti and paypal) have any user preference or database table.
They all implement the null provider.
2018-04-23 14:31:40 +02:00
Farhan Karmali
fe5b5be1dd MDL-61208 enrol: Standard enrol plugins should use tasks instead of cron 2018-04-10 09:16:17 +05:30
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
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
Jun Pataleta
18000c6d60 MDL-59811 enrol: Unit tests for get_user_enrolment_actions() 2017-10-09 10:29:02 +08:00
Andrew Nicols
2a77813b51 MDL-59882 behat: Update known uses of dialogue CSS 2017-10-02 12:44:37 +08:00
Eloy Lafuente (stronk7)
186a8c1572 Merge branch 'MDL-43176' of https://github.com/NeillM/moodle 2017-09-20 10:12:37 +02:00
Neill Magill
dbe7012475 MDL-43176 enrol_meta: enrol_meta_sync query is inefficient
Before this change the nested select did a full table scan of
either the enrol or user_enrolments table. This meant that
on large sites the query could be very slow.

This change ensures that there are no full table scans which
makes the query much more efficient.

In my testing the all courses version of the query changed
from ~15 s to ~ 5 s; the singles course version changed
from ~15 s to > 0.1 s
2017-09-15 14:12:32 +01:00
Andrew Nicols
030ede54f8 MDL-59759 enrol: Update behat tests for unenrol confirm dialogue 2017-09-07 10:53:35 +02:00
Damyon Wiese
5dd94c811d MDL-59370 behat: Behat fixes for enrolled users
We removed the enrolled users page, so we need to update the behats that were using it.
2017-08-14 11:06:22 +08:00
Andrew Nicols
3d4739ab64 MDL-59602 enrol: Correct course name for restored course 2017-08-02 13:02:29 +08:00
Andrew Nicols
5c5b130268 Merge branch 'MDL-58928-alt-attribute-enrolment-edit-delete-icons' of https://github.com/lucaboesch/moodle 2017-08-01 14:54:05 +08:00
Luca Bösch
da15576180 MDL-58928 enrol: delete and edit icon alt attribute 2017-07-31 17:31:07 +02:00
David Monllao
7190f330b4 Merge branch 'MDL-59602_coursenav' of https://github.com/mrmark/moodle 2017-07-31 13:21:09 +02:00
Jun Pataleta
06aa592315 MDL-59369 enrol: Behat tests for plugin enrol actions 2017-07-26 09:44:33 +08:00
Jun Pataleta
fd0a43be1b MDL-59369 enrol: Introduce data-action attribute for enrol action links 2017-07-26 09:44:33 +08:00
Mark Nielsen
197e2bca5b MDL-59602 behat: make use of new course nav steps 2017-07-21 13:50:47 -07:00
Eloy Lafuente (stronk7)
d989ee1e03 MDL-58853 versions: bump all versions and requires near release
version = 2017051500 release version
requires= 2017050500 current rc1 version
2017-05-09 02:58:28 +02:00
Simey Lameze
fdeeaff954 MDL-58265 core_test: replace I turn editing on steps
Also remove few more unnecessary steps that redirects behat to
site home page to actually get to the course.

Part of MDL-55611 epic.
2017-04-03 11:37:07 +08:00
Simey Lameze
c987d1b2ef MDL-58265 core_test: replace all uses of I follow course steps
Part of MDL-55611 epic.
2017-04-03 11:37:07 +08:00
Marina Glancy
e5287f9b3b MDL-56614 behat: navigate without navigation and admin blocks 2016-12-06 11:49:14 +08:00
Eloy Lafuente (stronk7)
04649747a4 MDL-57197 versions: bump all versions and requires near release
version = 2016120500 release version
requires= 2016112900 current rc4 version
2016-11-29 22:57:05 +01:00
Jun Pataleta
b62bebbf1c MDL-52186 enrol_meta: Sync only active enrol_meta instances
Thanks to Peter Klinka for the solution!
2016-11-17 10:40:54 +08:00
Frédéric Massart
77bec234e0 MDL-56282 enrol_meta: Fix error when editing existing instances
We had a few problems here.

1/ The auto complete element was displaying the picker though the
   field was frozen.
2/ Checking for existing enrolment including the courses chosen was
   not checking if the courses found were in the instance we edit.
3/ Upon creation we support multiple courses but when editing we
   should not expect more than the course in the instance being edited.
2016-10-31 12:15:02 +08:00
Russell Smith
1fcf0ca8a5 MDL-35628 performance: Remove dirname() where possible.
dirname() is a slow function compared with __DIR__ and using
'/../'.  Moodle has a large number of legacy files that are included
each time a page loads and is not able to use an autoloader as it is
functional code.  This allows those required includes to perform as
best as possible in this situation.
2016-06-10 08:06:49 +10:00
Eloy Lafuente (stronk7)
1abca11e0a MDL-54638 versions: bump all versions and requires near release
version = 2016052300 release version
requires= 2016051900 current rc1 version
2016-05-19 02:16:15 +02:00
Damyon Wiese
6b04655573 MDL-27628 enrol_meta: Set options to exclude existing courses, and the current course
When adding a new meta enrolment, you should not be able to select the current course,
or any courses with an existing meta link.
2016-03-10 13:17:10 +01:00
Damyon Wiese
6f326bd204 MDL-27628 enrol_meta: Use new multi-course selector
Allows adding multiple instances of the meta enrol plugin at once.

I had to add support to the autocomplete element for filling the field from behat
when it was not using tags. I also had to make the shortnames more easily searchable
and unique in the behat feature file.
2016-03-09 13:32:08 +08:00
Andrew Nicols
da45d10a51 MDL-48362 enrol: Correct singleselect use in behat test 2016-02-29 15:16:10 +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
Damyon Wiese
60010fd614 MDL-48362 enrol: Use a standard UI and validation for enrolment plugins
Convert core enrolment plugins to use standard editing ui.
2016-02-29 12:31:41 +08:00
Eloy Lafuente (stronk7)
2e144835bb MDL-52059 versions: bump all versions and requires near release
version = planned 2015111600 release version
requires= current 2015111000 rc3 version
2015-11-10 12:33:52 +01:00
Marina Glancy
7fdc469048 MDL-44640 enrol_meta: sync when enrol method is updated 2015-09-27 17:52:20 +08:00
Marina Glancy
5723dcdd85 MDL-34938 enrol_meta: sync enrolment start/end dates 2015-09-08 10:28:54 +08:00