92958 Commits

Author SHA1 Message Date
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
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
Adrian Greeve
878c88df95 Merge branch 'MDL-65050-master-fix' of git://github.com/lameze/moodle 2019-04-01 16:05:34 +08:00
Simey Lameze
6e049bdbc6 MDL-65050 core: add missing lib file include 2019-04-01 15:59:03 +08:00
Damyon Wiese
647fd16ec9 MDL-65144 output: Add img-fluid to logo
Extra wide logos do not scale to the screen size - this change adds the bootstrap class
img-fluid to logos on the loginpage, signupform and in the context header.

Thanks to Maksud R for working on this.
2019-04-01 15:49:29 +08:00
Simey Lameze
73fabadadd MDL-65138 course: add a setting for course publishing 2019-04-01 15:39:07 +08:00
Jake Dallimore
4a2ee121fc Merge branch 'MDL-65089_master' of https://github.com/dvdcastro/moodle 2019-04-01 15:28:48 +08:00
Jake Dallimore
9f32a85852 Merge branch 'MDL-64194-37_block_myoverview_incorrect_pagination' of https://github.com/tomdickman/moodle 2019-04-01 14:36:01 +08:00
Jun Pataleta
a8c91e88bf Merge branch 'MDL-64524-master' of git://github.com/damyon/moodle 2019-04-01 13:46:48 +08:00
Adrian Greeve
d15b5340cc Merge branch 'MDL-65050-master' of git://github.com/lameze/moodle 2019-04-01 13:32:38 +08:00
Simey Lameze
d499cb3593 MDL-65050 core: delete orphaned files and functions 2019-04-01 12:57:05 +08:00
Simey Lameze
9c164d26fc MDL-65050 core: add question_stats_cleanup_task scheduled task
This commit also removes orphaned question/engine/statisticslib.php
2019-04-01 12:57:05 +08:00
Simey Lameze
10810f421b MDL-65050 core: move function code to question_preview_cleanup_task
This commit also deletes the legacy question_preview_cron() function.
2019-04-01 12:57:05 +08:00
Simey Lameze
5a01c2409a MDL-65050 core: rename task to question_preview_cleanup_task 2019-04-01 12:57:01 +08:00
Damyon Wiese
4b9c3e44e0 MDL-64524 gradingform_guide: Marking guide comments
When there are too many comments, scroll the list so they still fit in the dialogue.
2019-04-01 12:17:27 +08:00
Damyon Wiese
284babb0d7 MDL-64524 assign: Styles editpdf comments
Properly display the list of comments, but limiting their size (use title to indicate the full comments).
When there are too many comments, show a scrollbar in the menu.
2019-04-01 12:17:27 +08:00
Jun Pataleta
db3527c2cc Merge branch 'MDL-63906_master' of git://github.com/dmonllao/moodle 2019-04-01 10:32:10 +08:00