Commit graph

93091 commits

Author SHA1 Message Date
Mathew May
a5a6df54cc MDL-64506 theme: Update BSB references and upgrade texts 2019-04-03 19:34:20 +08:00
Mathew May
cf89ac3d1a MDL-64506 Grunt: Remove old Bootstrapbase tasks 2019-04-03 19:34:20 +08:00
Mathew May
e00f1c663c MDL-64506 phpunit: Update unit tests to use classic 2019-04-03 19:34:20 +08:00
Mathew May
c8edee421e MDL-64506 theme_bootstrapbase: Remove bootstrapbase from core 2019-04-03 19:34:17 +08:00
Jun Pataleta
f3971a2d88 Merge branch 'MDL-62307_master' of https://github.com/maksudr/moodle 2019-04-03 16:50:31 +08:00
Jun Pataleta
ad4d995f19 Merge branch 'MDL-65168' of git://github.com/stronk7/moodle 2019-04-03 16:42:41 +08:00
Jun Pataleta
dcdea70fca Merge branch 'MDL-65112-master' of https://github.com/dmitriim/moodle 2019-04-03 16:19:35 +08:00
Adrian Greeve
af53b33756 Merge branch 'session-debug' of https://github.com/tsmilan/moodle 2019-04-03 14:57:38 +08:00
Jake Dallimore
143122bfcc Merge branch 'MDL-65087-master' of git://github.com/sarjona/moodle 2019-04-03 14:12:24 +08:00
Jake Dallimore
0ffba48cbd Merge branch 'MDL-65247-master' of git://github.com/junpataleta/moodle 2019-04-03 13:46:05 +08:00
Adrian Greeve
df4d6b0696 Merge branch 'MDL-65130-master' of git://github.com/andrewnicols/moodle 2019-04-03 13:39:28 +08:00
Trisha Milan
fdb9c3217d MDL-64449 core: Added Session lock debugging option 2019-04-03 14:20:57 +11:00
Jun Pataleta
1b011cdbda Merge branch 'MDL-65204-master' of git://github.com/junpataleta/moodle 2019-04-03 10:57:12 +08:00
Jun Pataleta
6bcc5dfdb4 MDL-65204 phpunit: Fix valid CiBoT errors and warnings 2019-04-03 10:44:24 +08:00
Eloy Lafuente (stronk7)
032c75ec43 MDL-65204 phpunit: tweak constraint_object_is_equal_with_exceptions
In PHPUnit 7.x and above, IsEqual->value became private and, as far
as our with exceptions class inherits from it, we cannot access to
that anymore.

So, in order to avoid that, we are overriding the constructor, capturing
the original value for own use and forgetting.

A more formal, alternative, solution would be to make our
exceptional class to inherit from Constraint and make the
class a pure dispatcher to different constraints, with IsEqual being
just one of them.

But we followed the easiest path here. Not ideal, but efective.
2019-04-03 10:39:19 +08:00
Eloy Lafuente (stronk7)
85f47bae7f MDL-65204 phpunit: various fixes to assertions
Namely:
   - 3rd param of assertEquals() cannot be null.
   - Some incorrect uses of assertNotEmpty().
   - Comparing 2 strings now uses strict (===) evaluation.
       Link: https://github.com/sebastianbergmann/phpunit/issues/3185
     Solution here is one of:
       a) Return to the previous situation, making the comparison
          softer. That can achieved by forcing different types, so
          float == string works.
       b) Changing APIs (both forms and database return strings) to
          perform some conversion to floats. That would make float
          comparison (with floats or strings) to work too.
     The patch here follows the a) approach. Changing all the internals
     for proper float handling sounds excesive when it has been working
     perfectly since ever. So we went the easier route, just getting
     rid of the new === comparisons when needed by changing expectation
     types to float.
2019-04-03 10:39:19 +08:00
Eloy Lafuente (stronk7)
26218b7852 MDL-65204 phpunit: make testcases match their expected signature 2019-04-03 10:39:19 +08:00
Eloy Lafuente (stronk7)
be81130189 MDL-65204 phpunit: update composer to use phpunit 7.5.x
To generate a new composer.lock for a given Moodle branch:
- Remove composer.lock
- Remove vendor
- Remove composer caches:
      php composer.phar clearcache
- Using lower PHP version supported (7.1.x for Moodle 3.7), update:
      php composer.phar update

https://docs.moodle.org/dev/Composer#How_to_prepare_and_submit_composer_changes
2019-04-03 10:39:19 +08:00
Mathew May
485932602d MDL-64506 theme: Move templates from lib/form 2019-04-03 10:07:41 +08:00
Mathew May
e969e96279 MDL-64506 theme: Create empty form templates 2019-04-03 10:07:41 +08:00
Mathew May
cc1e1d8ffc MDL-64506 theme_clean: Remove Clean from core 2019-04-03 10:07:38 +08:00
Mathew May
7204a990e5 MDL-64506 theme_more: Remove More from core 2019-04-03 10:07:08 +08:00
Jun Pataleta
ea0d5fd732 Merge branch 'MDL-65214' of git://github.com/stronk7/moodle 2019-04-03 09:48:00 +08:00
Jake Dallimore
849d2e5dad Merge branch 'MDL-63569-email-header-master' of https://github.com/pauldamiani/moodle 2019-04-03 09:43:51 +08:00
Jun Pataleta
88159721ec MDL-65247 core: Fix action_modal Behat tests 2019-04-03 08:45:29 +08:00
Eloy Lafuente (stronk7)
2f8276622f Merge branch 'MDL-65213-master' of git://github.com/sarjona/moodle 2019-04-03 00:22:54 +02:00
Eloy Lafuente (stronk7)
e342bae090 Merge branch 'MDL-64994-master-pythonmlversion' of git://github.com/mudrd8mz/moodle 2019-04-03 00:09:28 +02:00
Eloy Lafuente (stronk7)
78397b51aa Merge branch 'MDL-64693-master' of https://github.com/vmdef/moodle 2019-04-02 23:46:24 +02:00
Eloy Lafuente (stronk7)
481c1ae4ce Merge branch 'MDL-64779_master' of git://github.com/dmonllao/moodle 2019-04-02 23:23:13 +02:00
Sara Arjona
199167f590 MDL-65213 core_message: fix random failures when declining contacts 2019-04-02 20:26:26 +02:00
Víctor Déniz Falcón
525cee739d MDL-64693 analytics: new course_competencies target
Added new target to predict which students are at risk of not achieving the
competencies assigned to a course.
2019-04-02 17:46:39 +01:00
Eloy Lafuente (stronk7)
280cfdf05c on-demand release 3.7dev+ 2019-04-02 15:54:35 +02:00
Eloy Lafuente (stronk7)
7c2ff50e9c Merge branch 'install_master' of https://git.in.moodle.com/amosbot/moodle-install 2019-04-02 15:54:29 +02:00
Jun Pataleta
d9be4a7829 Merge branch 'MDL-64331-master' of git://github.com/damyon/moodle 2019-04-02 10:58:15 +08:00
Adrian Greeve
a5b79e4b85 Merge branch 'MDL-65138-master' of git://github.com/lameze/moodle 2019-04-02 10:37:34 +08:00
Adrian Greeve
59a73b7b73 Merge branch 'MDL-65144-master' of git://github.com/damyon/moodle 2019-04-02 10:15:18 +08:00
Damyon Wiese
cdc7390446 MDL-64331 modals: Be careful closing modals
Don't close a modal when the user clicks outside of it and the modal contains a form.
2019-04-02 10:02:26 +08:00
Paul Damiani
9ffbb78668 MDL-63569 email: New setting to prefix the subject of outgoing emails 2019-04-02 11:02:03 +11:00
Eloy Lafuente (stronk7)
ed7fa60946 Merge branch 'MDL-61667-master-modelsinstall' of git://github.com/mudrd8mz/moodle 2019-04-02 00:20:47 +02:00
Eloy Lafuente (stronk7)
6d9b3e0cd7 Merge branch 'MDL-64636-master' of https://github.com/vmdef/moodle 2019-04-02 00:01:22 +02:00
Leon Stringer
36b6444420 MDL-64719 cache: Implement purge_current_user() in \cache
\cache::make() may return a cache_disabled subclass but callers, specifically
user/lib.php:user_create_user(), invoke \cache::purge_current_user() which was
only implemented by the cache_session subclass.  Added empty
\cache::purge_current_user() which subclasses can implement, i.e.
cache_session, or not, i.e. cache_disabled.
2019-04-01 15:29:39 +01:00
David Monllaó
f54a4092c7 MDL-61667 analytics: Remove duplicated capability checks
\core_analytics\model::create and \core_analytics\model::enable methods
are called from install/upgrade scripts. Therefore, they should not
include any capability check. Their capability checks are actually
redundant, as the user capabilities are already checked in the
entry-point scripts.
2019-04-01 14:57:57 +02:00
David Mudrák
d887b0c7f7 MDL-61667 analytics: Fix coding style issues in the existing code
These coding style issues were spotted while working on the issue. No
real changes here, just the coding style fixes attached to the patchset
for convenience.
2019-04-01 14:23:06 +02:00
David Mudrák
606c3be0f6 MDL-61667 analytics: Create missing models on install/upgrade
Similarly to how the scheduled tasks work, we now automatically check
and make sure that all the models specified in the component's
db/analytics.php file exist during the installation or upgrade of the
component.
2019-04-01 14:23:06 +02:00
David Mudrák
aa8af6fcfc MDL-61667 analytics: Fix checking that a given model does not exist
The original implementation did not work well for checking that the
given model does NOT exist. If no record was found in the
analytics_models table, the code execution continued and it reached the
moment when indicators were checked. If no indicators were provided, the
call ended up with error 'array_keys() expects parameter 1 to be array,
boolean given' (because indicators were set to false).
2019-04-01 14:23:06 +02:00
David Mudrák
3b7c7918f3 MDL-61667 analytics: Deprecate the add_builtin_models() method
The functionality of the \core_analytics\manager::add_builtin_models()
method is to be replaced with automatic update of models provided by the
core moodle component. There is no need to call this method explicitly
any more. Instead, adding new models will be done by updating the
lib/db/analytics.php file and bumping the core version.
2019-04-01 14:23:06 +02:00
David Mudrák
6187213f39 MDL-61667 analytics: Add method to actually create a declared model
This is simply a wrapper around the model's create() method that works
with the model declaration syntax from the db/analytics.php file.
2019-04-01 14:23:06 +02:00
David Mudrák
f05840451e MDL-61667 analytics: Add methods to read and validate model declarations
Allow every component to declare prediction models it provides via the
db/analytics.php file.
2019-04-01 14:23:06 +02:00
David Mudrák
4de4d1652b MDL-61667 analytics: Don't autoenable models with time splitting defined
When the API had originally been designed, it was assumed that the
presence of the time splitting method implies no requirement for the
machine learning backend and that it is a sign of less performance
demanding models. So it seemed to be safe and useful to have such models
automatically enabled. That assumption did not prove to be valid. Most
of the time is spent calculating indicators that depend on log tables.

We realized it would be useful to be able to specify the default time
splitting method without the need to have such models auto-enabled.
2019-04-01 14:23:06 +02:00
David Monllaó
75dfc588b5 MDL-64779 tool_analytics: Export selector 2019-04-01 13:56:37 +02:00