185 Commits

Author SHA1 Message Date
Charles Fulton
66ba391e82 MDL-58931 dml: add support for aurora mysql 2020-07-01 22:56:20 +02:00
Jun Pataleta
51939f6feb Merge branch 'MDL-68261-cli-config-log' of https://github.com/brendanheywood/moodle 2020-05-13 10:36:54 +08:00
cescobedo
079736ccb3 MDL-63580 core_task: Deprecation CLI scripts from admin/tool/task/cli
Copy the CLI scripts from admin/tool/task/cli to admin/cli (schedule_task.php and adhoc_task.php)
and rename to scheduled_task.php and to improve in order to use cron_run_inner_scheduled_task.
2020-05-11 10:53:17 +02:00
Brendan Heywood
76de190c25 MDL-68261 report_configlog: Log changes from admin/cli/cfg.php 2020-05-05 17:52:27 +10:00
Brendan Heywood
20167daf89 MDL-47271 report_status: Added System status report 2020-04-08 14:35:31 +10:00
Adrian Greeve
c282319a35 Merge branch 'MDL-59594-SIGINT' of https://github.com/brendanheywood/moodle 2020-01-20 10:39:20 +08:00
[Peter Burnett]
147a895ad0 MDL-59562 upgrade: Plugins can declare supported moodle versions
* Plugins can now explicitly declare supported and incompatible Moodle
  versions in version.php
  - $plugin->supported[37,39];
    supported takes an array of ascending numbers, that correspond to a
    range of branch numbers of supported versions, inclusive. Moodle
    versions that are outside of this range will produce a message
    notifying at install time, but will allow for installation.

  - $plugin->incompatible = 36;
    incompatible takes a single int corresponding to the first incompatible
    branch. Any Moodle versions including and below this will be prevented
    from installing the plugin, and a message will be given when
    attempting installation.
2020-01-15 14:38:27 +10:00
Brendan Heywood
b15c53f4fa MDL-59594 cron: Allow graceful exit of cron and adhoc task cli's 2020-01-12 01:24:03 +11:00
Brendan Heywood
0bcc273f63 MDL-65229 cron: Add cli option --stop to notify all cron to stop 2019-12-03 17:51:56 +11:00
David Mudrák
469d4b7f35 MDL-67250 setup: Revert removal of the httpswwwroot setting
It is still used widely in the plugins that would stop working suddenly
without being warned via a debugging message. We must keep it forever as
an alias for the wwwroot.
2019-11-13 19:58:10 +01:00
Shamim Rezaie
fffb043eae MDL-43189 core: improve validating db settings during cli install 2019-11-01 15:44:40 +08:00
Sara Arjona
117d2fd56e Merge branch 'mdl_66123' of https://github.com/Peterburnett/moodle 2019-08-01 09:59:08 +08:00
[Peter Burnett]
ad9c96e531 MDL-66123 core: check_password_policy takes $user argument 2019-07-29 14:37:50 +10:00
Jun Pataleta
9320787005 MDL-46267 core: Remove $CFG->httpswwwroot
* It's unnecessary since $CFG->loginhttps has already been removed and
  it's no longer being used in core anymore.
2019-07-22 10:59:42 +08:00
Brendan Heywood
8918cc75c1 MDL-65208 admin: Add upgrade cli --is-pending option 2019-06-03 14:33:07 +10:00
Ryan Wyllie
c32af3a710 MDL-65446 admin: fix admin email option for cli install 2019-04-30 13:29:56 +08:00
Mathew May
e00f1c663c MDL-64506 phpunit: Update unit tests to use classic 2019-04-03 19:34:20 +08:00
Charles Fulton
032d98a148 MDL-64561 install: show help text before database check 2019-02-25 16:43:14 +11:00
Dmitrii Metelkin
d00f04fd53 MDL-63623 admin_cli: add a script to uninstall plugins 2019-01-07 10:58:30 +11:00
Matt Porritt
d5adb60fa3 MDL-62777 Administration: CLI upgrade new setting notification
During a CLI upgrade when there are new settings in core or in
a plugin, the settings are set to the defined defaults
automatically. There is no ouput shown on the CLI about which
new settings have been introduced or what default values the
setting are set to.

This patch outputs the name of the new setting and what the
default value being is set is to the CLI during an upgrade.
Objects and arrays are expanded into a human readable format.
This plugin also makes the function that sets the defaults to
be more robust so it isno longer required to be called multiple
times to ensure all settings are set.
2018-10-22 14:28:06 +11:00
Mark Johnson
e3389c83b2 MDL-61244 caching: Allow granular purging of caches 2018-06-14 15:04:42 +01:00
Andrew Nicols
f8ad868fad Merge branch 'm35_MDL-60923_New_BackupDir_Setting-v2' of https://github.com/scara/moodle 2018-04-17 09:44:44 +08:00
Matteo Scaramuccia
ef844148a9 MDL-60923 backup: Added $CFG->backuptempdir
The new setting will allow to host the temporary backup files
into a specific target directory. Defaults to '$CFG->tempdir/backup'.

Calling make_backup_temp_directory() checks that the required sub-directory
will be properly created under the new target directory.
2018-04-16 23:50:28 +02:00
Luca Bösch
c3c8cc40be MDL-39035 admin: show old and new version after upgrade in CLI 2018-04-12 18:02:12 +02:00
Jake Dallimore
811808b3d2 MDL-59581 database: removal of mssql bits from admin/ 2018-04-09 01:59:06 +02:00
sam marshall
a938e4096c MDL-60174 core_dml: fix miscellaneous incorrect recordset usage
The new recordset support for Postgres requires transactions and
will cause errors if recordsets are not closed correctly. This
commit fixes problems that were identified during unit tests, and
via some basic code analysis, across all core code. Most of these
are incorrect usage of recordset (forgetting to close them).
2017-11-27 11:10:33 +00:00
Alexander Bias
af25a2b739 MDL-60094 administration: Add CLI script to kill all sessions 2017-09-14 16:03:39 +02:00
Luca Bösch
3437a77552 MDL-59662 database: Typo in variable name. 2017-08-04 10:30:11 +02:00
David Monllao
f510788b44 Merge branch 'MDL-59150-master-3' of git://github.com/ryanwyllie/moodle 2017-07-18 08:27:13 +02:00
Ryan Wyllie
0f268f5db9 MDL-59150 admin: build site theme after CLI install or upgrade 2017-07-18 06:13:07 +00:00
Dan Poltawski
64e57937be MDL-57432 lib: unify PHP version checks
* Introduce a new php compatible library which can be used
  early in execution, without Moodle dependencies
* Use it where we previously had hardcoded checks

This was originally suggested in MDL-39007.
2017-07-10 09:16:55 +01:00
Ryan Wyllie
5dd40ec4b4 MDL-59123 admin: add cli script to compile theme CSS
Added a script to selectively compile theme CSS. In order to allow
compiling on per theme basis without purging all theme CSS in the
local cache I have made some changes to how CSS is compiled and
how it is accessed via local cache.
2017-06-27 06:48:45 +00:00
Adrian Greeve
c05dc071b0 MDL-58729 database: Improve performance of CLI tool.
Imporve the speed with which mysql_collation converts to
a different collation.
2017-06-12 14:03:36 +08:00
Adrian Greeve
0bbefd81cd MDL-48228 database: Make utf8mb4 the default character set for mysql.
Thanks to Jetha Chan for providing the initial patch that this is
based on.
2017-03-01 09:03:12 +08:00
David Mudrák
00eeb686bf MDL-57896 admin: Prevent cfg.php from trying to change hard-set value
Credit goes to Andrew Nicols for spotting and suggesting this check.
2017-02-15 09:23:02 +01:00
David Mudrák
dfefcef2f1 MDL-57896 admin: Introduce the new admin/cli/cfg.php utility 2017-02-09 12:51:19 +01:00
Damyon Wiese
644fcbb629 MDL-55837 themes: base and canvas themes removed
Look for them in the plugins DB if you still need them.
2016-09-19 13:35:13 +08:00
Jun Pataleta
49ccaee5a9 MDL-55206 admin: Some code cleanup
* Removed unnecessary TODOs.
* Changed message prompt case to sentence case.
2016-07-15 14:44:35 +08:00
Jun Pataleta
36b88f2486 MDL-55206 admin: Remove div tags in password policy error message 2016-07-15 14:40:54 +08:00
David Monllao
c68010eaee MDL-55048 cli: Add example using new cool options
Also added short option for ignore password policy.
2016-07-11 15:17:57 +02:00
David Monllao
34127afdb6 Merge branch 'MDL-55084' of git://github.com/prg3/moodle 2016-07-11 15:06:38 +02:00
Paul Greidanus
c248c3f07f MDL-55084 admin: CLI driven password reset
This patch allows for changing a user's password via the command line.
This allows for scripted password changes easily.
2016-07-06 07:00:57 -06:00
Eloy Lafuente (stronk7)
ae96cf6246 MDL-53019 php: bump all harcoded versions to new 5.6.5 requirement
Moodle 3.2 and up will require PHP >= 5.6.5. Hopefully some day we'll
have this centralized with MDL-39007, just it's not done yet.

Thanks to Stephen Bourget for raising this!
2016-07-05 01:50:43 +02: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
Jun Pataleta
54285c3ff5 MDL-53260 upgrade: Fix lang help text description. 2016-03-23 14:13:36 +08:00
Jun Pataleta
830f8bc780 MDL-53260 upgrade: Make lang option default to the site language 2016-03-21 15:08:59 +08:00
Nadav Kavalerchik
14aaa2d75b MDL-53260 upgrade: Option to display CLI upgrade messages in English 2016-03-21 11:59:50 +08:00
David Mudrák
6ef02f8479 MDL-51261 admin: Add option to define upgradekey via cli installer 2015-09-24 21:02:33 +02:00
David Mudrák
7d62bc2417 MDL-51403 install: Improve the language validation in the CLI installer
There are two essential improvements here. Firstly, by replacing the
file_exists() check with array_key_exists() we make sure that only
actual language code will be written into the config.php file (and not
the empty value in case of input that does not pass the PARAM_SAFEDIR
cleaning).

Additionally, we no longer display the full list of available languages
by default. The list can be displayed in the interactive mode by typing
the ? character instead of the language code. This makes the overall
interface cleaner, does not cause the header information (such as the
Moodle version) to scroll away and makes the nice cli logo more visible
(which was the main motivation for the whole patch anyway ;-).
2015-09-17 21:06:32 +02:00
Charles Fulton
096fd59653 MDL-46167 admin_cli: allow skipping of database installation 2015-07-04 19:15:50 +00:00