Commit Graph

223 Commits

Author SHA1 Message Date
Eloy Lafuente (stronk7) 29a541724f MDL-65292 style: Fix all the function declaration ordering
This has been generated running the following Sniff,
part of the Moodle's CodeSniffer standard:
- PSR2.Methods.MethodDeclaration

It just ensures all the function declarations have
the correct order for:
- abstract and final.
- visibility (public, protected, private).
- static.

So, all the lines modified by this commit are function declarations
and the only changes are in the positions of those keywords.
2024-02-28 23:47:47 +01:00
Eloy Lafuente (stronk7) ba1f804ffa MDL-65292 style: Fix all function declarations white space
This has been generated running the following Sniffs, all
them part of the Moodle's CodeSniffer standard:
- PSR12.Functions.ReturnTypeDeclaration
- PSR12.Functions.NullableTypeDeclaration
- moodle.Methods.MethodDeclarationSpacing
- Squiz.Whitespace.ScopeKeywordSpacing

All them are, exclusively, about correct spacing, so the changes
are, all them, only white space changes.

Only exceptions to the above are 3 changes what were setting the
return type in a new line, and, when that happens, the closing
parenthesis (bracket) has to go to the same line than the colon.
2024-02-28 23:33:26 +01:00
Huong Nguyen a2866d6833 MDL-72359 core_analytics: Better handling of MAX_TIME
We are limited by both PHP's max int value and DB (cross-db) max int allowed.
We need to use the smallest one
2023-08-29 20:36:58 +07:00
Daniel Poggenpohl 079a5fa104 MDL-72359 core: Changed MAX_TIME from 9999999999 to PHP_INT_MAX
This prevents automatic casting from int to double on 32 bit systems
(which have a maximum for integers of 2147483647)

Whilst Moodle will not support 32-bit systems for much longer, this is
still worth doing to prevent future issues.
2023-08-23 14:34:32 +08:00
Meirza a6894fc65e MDL-77337 analytics: Added class properties that are not declared.
In PHP 8.2 and later, setting a value to an undeclared class property is
deprecated and emits a deprecation notice.
So we need to add missing class properties that still need to be declared.
2023-03-16 09:46:07 +07:00
Sara Arjona ae53d04144 Merge branch 'MDL-75337-master' of https://github.com/laurentdavid/moodle 2023-01-24 16:07:35 +01:00
Laurent David fc72a1d7b1 MDL-75337 core: Single button - core changes
* Change all core calls toward single_button to use single_button::BUTTON_PRIMARY
    when needed
2023-01-24 06:01:35 +01:00
Marina Glancy b0a83aa7bd MDL-76362 various: Avoid passing nulls to functions that don't allow nulls
PHP 8.1 is more strict on the parameter type. Functions such as trim(), strlen(), str_replace(), etc
show notice when null is passed as an argument
2023-01-23 09:15:54 +08:00
Marina Glancy 594a8c5ab7 MDL-76356 various: avoid implicit conversion to arrays
PHP before version 8.1 automatically converted stdClass or 'false' to arrays if
function parameter expects array (for example, "reset").
PHP 8.1 shows notices in these situations
2023-01-10 12:16:52 +01:00
Kevin Pham 1495c10c26 MDL-49795 analytics: Add missing metadata providers for analytics tables
Affected tables:
- analytics_models
- analytics_models_log
2022-08-03 15:17:05 +10:00
Sujith Haridasan 73d604369d MDL-71062 core: Step 1 deprecation of print_error function 2022-07-13 08:20:54 +05:30
Jason den Dulk e7f51a3857 MDL-68199 setup: Fix invalid parameters to make_request_directory()
Added parameter type hint to make_request_directory()
Removed invalid parameters from calls to make_request_directory()

Removing these parameters should have no effect on behaviour.
2021-12-02 07:49:28 +11:00
Dan Marsden 34bdef0b62 MDL-70006 analytics: Don't send notifications to suspended enrolments. 2021-08-03 10:52:53 +12:00
Amaia Anabitarte 5af5368059 MDL-65553 core_analytics: Don't allow to flag predictions several times
Even if a prediction is hidden from the report once is flagged,
it can be flagged several times if the user visits detailed view via URL.
We remove the checkbox to select a prediction and flag it
once it has already been flagged.
2021-04-15 16:39:09 +02:00
Marina Glancy 0af0a96bb1 MDL-70898 various: private functions can not be declared final 2021-02-15 16:20:06 +01:00
Amaia Anabitarte 46927df906 MDL-65284 analytics: Final deprecation get_analysables() 2020-12-16 12:47:52 +01:00
Ilya Tregubov 2cc84a792b MDL-65186 analytics: Deprecate add_builtin_models 2020-12-08 09:12:00 +02:00
Jake Dallimore c196068cc4 Merge branch 'MDL-65086-master' of git://github.com/peterRd/moodle 2020-12-03 10:15:19 +08:00
Dan Marsden 9ae716734f MDL-68052 analytics: Clean up analytics_indicator_calc records. 2020-11-17 20:27:00 +13:00
Peter Dias a726e52e80 MDL-65086 analytics: Deprecate get_enabled_time_splitting_methods 2020-11-17 13:55:26 +08:00
Paul Holden cecd90ffec MDL-66392 analytics: make model output directory default to empty.
Falling back to path within $CFG->dataroot/models.
2020-10-21 18:04:26 +01:00
Eloy Lafuente (stronk7) 74ee34fd87 MDL-69521 core: Move all comments in code from 4.1 to 3.11 2020-09-08 18:59:30 +02:00
Matt Clarkson 7f55289912 MDL-67440 analytics: optimse delete's in clean up task. 2020-07-08 11:16:36 +12:00
David Monllaó 47b506e2f7 MDL-67039 analytics: Unidimensional array if no predictions 2019-11-04 09:32:05 +08:00
David Monllaó ef05f29267 MDL-67038 analytics: Remove null strings from the DB 2019-10-30 12:40:32 +08:00
David Monllaó 06579b18cc MDL-64739 analytics: Contexts autocomplete with ajax 2019-10-21 15:33:29 +08:00
David Monllaó 76b5ee4545 MDL-64739 tool_analytics: Restrict models to specific contexts 2019-10-21 09:54:39 +08:00
David Monllaó c22fb4bd4b MDL-64739 core_analytics: Contexts param for get_analysables_iterator 2019-10-21 09:54:34 +08:00
David Monllaó bf25fb166c MDL-65585 analytics: Global on/off switch 2019-10-10 10:06:31 +08:00
Eloy Lafuente (stronk7) 20502fa30c Merge branch 'MDL-66004_master' of git://github.com/dmonllao/moodle 2019-10-02 20:53:24 +02:00
David Monllaó aa5b705607 MDL-66004 mlbackend_python: Package installed on a separate server 2019-10-02 08:41:14 +08:00
David Monllaó 386d109172 MDL-62191 analytics: Support for bulk actions 2019-09-27 14:13:52 +08:00
Eloy Lafuente (stronk7) 08a6375507 Merge branch 'MDL-65588_master' of git://github.com/dmonllao/moodle 2019-09-23 22:51:10 +02:00
Sara Arjona 1445f82315 Merge branch 'MDL-66090_master' of git://github.com/dmonllao/moodle 2019-09-20 12:46:16 +02:00
David Monllaó 2d9280e0df MDL-65588 analytics: New models for student accesses 2019-09-20 08:14:13 +08:00
David Monllaó 16cb4f32a0 MDL-66536 analytics: Indicators can add extra data for targets 2019-09-18 13:07:21 +08:00
David Monllaó b024720499 MDL-66536 analytics: Bulk-fetch samples data
For one_sample_per_analysable models.
2019-09-18 13:04:30 +08:00
David Monllaó 93e71c712d MDL-66091 report_insights: Unify contextwithinsights cache sets 2019-09-18 13:00:06 +08:00
David Monllaó 486e797c5f MDL-66091 analytics: Targets choose if there should be a report or not 2019-09-17 13:58:55 +08:00
David Monllaó 21202090f7 MDL-66091 report_insights: Usability improvements
- More feedback provided for the user once they click on useful/notuseful from the email.
- Replace the indicator calculations table headers for the table caption and
  replace the text by just "Indicators"
- Replace "System" for the site name for insights generated at system
  level
- Replace "$modelname prediction" for "$modelname" in report/insights/prediction.php
  heading

MDL-66091
2019-09-17 13:57:36 +08:00
David Monllaó d3d1615eee MDL-66090 analytics: Support user for notifications 2019-09-17 07:54:01 +08:00
David Monllaó abc745fbd0 MDL-66498 analytics: get_samples() with no params limit 2019-09-11 12:44:55 +08:00
David Monllaó 4fd74fba6f MDL-66498 analytics: Avoid get_in_or_equal for big arrays
Also, join directly with context table.
2019-09-11 12:44:55 +08:00
David Monllao 500111c5d3 MDL-66498 analytics: SQL IN in chunks 2019-09-11 12:44:55 +08:00
Jun Pataleta 7c50f31dad Merge branch 'MDL-66210_master' of git://github.com/dmonllao/moodle 2019-08-21 19:48:10 +08:00
David Monllaó ca61e4d4f0 MDL-66210 analytics: Update references to ->options 2019-08-14 14:31:54 +08:00
David Monllaó d1af71c35d MDL-65993 analytics: Fix --filter option for by_course models 2019-08-14 14:30:20 +08:00
David Monllaó c430def90d MDL-66234 analytics: Extra GC during analysis 2019-07-29 18:36:42 +02:00
David Monllaó 5ef49c591a MDL-65633 tool_analytics: Notification for invalid analysis intervals 2019-07-18 18:38:13 +02:00
David Monllaó 3cb0aaaa8c MDL-65633 analytics: New interfaces for time-splitting methods 2019-07-18 18:38:13 +02:00