562 Commits

Author SHA1 Message Date
Peter Burnett
027c770eab
MDL-65471 upgrade: framework to reduce maintenance mode 2023-04-06 11:38:26 +10:00
Sujith Haridasan
73d604369d MDL-71062 core: Step 1 deprecation of print_error function 2022-07-13 08:20:54 +05:30
Jake Dallimore
19a296dfa0 MDL-74493 admin: add check for mbstring extension to prevent errors 2022-04-14 10:13:06 +08:00
Sujith Haridasan
aa1c2e2382 MDL-73848 administration: Fix the breadcrumbs and nav highlights
Create or update the breadcrumbs in the site administration
pages where it is required.
Highlight the corresponding site adminstration tab.
Highlight the primary nav to Site administration when user
is navigating to any of the site administration pages.

Also changed the boostnavbar so that the nodes in the secondary
navigation are not shown in the breadcrumbs when user is in site
administration page.
2022-03-25 17:44:47 +08:00
Huong Nguyen
683375af8b MDL-73270 admin: Warn about xmlrpc webservice protocol enabled
Co-authored-by: Andrew Lyons <andrew@nicols.co.uk>
2022-01-28 09:32:08 +07:00
Sara Arjona
e046c6e6ef MDL-73397 admin: Use method from new core_adminpresets
In MDL-73145, a new $CFG setting was added to let define the preset
to be installed.
This patch replaces the method call to the new one that has been
moved from tool_admin_presets plugin to core_adminpresets component.
2022-01-04 12:13:19 +01:00
Simey Lameze
9dc03a9e36 MDL-72845 core: add services and support content banner 2021-12-22 19:46:49 +08:00
Sara Arjona
42895003e4 MDL-73145 install: Apply site preset if defined in config
A new setting, $CFG->setsitepresetduringinstall, has been added to
config file, to let admins define the site admin preset to be applied
during the Moodle installation.

Besides, a new parameter, "--sitepreset" has been also added
to admin/cli/install.php, to let define it too when running the
upgrade process using CLI.
2021-12-09 09:48:44 +01:00
David Mudrák
9d171793d7 MDL-68558 admin: Allow to go back to plugins check page on failed deps
Once the admin reaches the Plugin dependencies check with a failed
plugin dependency, the "Continue" button should take him/her to the
previous page where the dependency can be sorted out, or the plugin
installation cancelled. Also the "Cancel this installation" should work
on this page, too.

None of this was happening correctly because the page with failed
dependencies is loaded with "confirmplugincheck" set to 1 as a result
of confirming the previous step. We must explicitly override it back to
0 to navigate the user back to the previous step.
2020-07-23 16:54:14 +02:00
Shamim Rezaie
06bbbbff27 MDL-69004 core: Encourage admins to enable user feedback
As part of this commit, the default for the user feedback feature
has changed to disable.
2020-06-11 11:24:30 +10:00
Simey Lameze
ed7cd552f8 MDL-68320 core: add campaign content to notifications page 2020-06-03 14:49:01 +08:00
Brendan Heywood
59a44a5bad MDL-47271 tool_task: Added Task API status checks 2020-04-08 14:35:33 +10:00
Tim Hunt
fb37a2d49d MDL-52319 install: Fix some coding style issues 2020-03-23 11:23:43 +01:00
Tim Hunt
f3d77f0c9e MDL-52319 upgrade: Also run environment checks if plugins need upgrades
Also perform the environment checks if a plugin triggers the upgrade.
Core upgrade and CLI upgrade was doing this already.
2020-03-23 11:23:43 +01: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
sam marshall
ff13ae5906 MDL-64454 Admin: Configuration option for cron frequency warning
This change makes the warning time (default 200 seconds) configurable
in config.php.
2019-01-14 17:07:37 +00:00
sam marshall
b18034ed67 MDL-64454 Admin: Warning if cron does not run frequently
There is an existing warning if cron doesn't run at all (hasn't run
for 24 hours). This commit adds a warning if cron hasn't run for 3
minutes, based on the recommendation that cron should run every
minute.
2019-01-14 17:07:36 +00:00
Juan Leyva
6078d420bf MDL-60572 admin: Enforce URLs in forgottenpasswordurl setting
Also display warnings for admins.
2017-10-27 11:15:01 +02:00
John Okely
cd1eb7ce9c MDL-42834 admin: Upgrade script and warning for loginhttps sites 2017-10-23 12:25:36 +08:00
David Monllao
b6b299ddae Merge branch 'wip-MDL-60108-master' of git://github.com/marinaglancy/moodle 2017-10-19 09:12:34 +02:00
Marina Glancy
1095afa4f7 MDL-60108 registration: Redirect to registration form
- when first installed
- when manual update of registration information is required
2017-10-17 15:00:17 +08:00
Andrew Nicols
9693821d9d MDL-59166 admin: Add moodle mobile configuration warning 2017-10-16 15:00:28 +08:00
Andrew Nicols
086d592d43 Merge branch 'MDL-60234-master' of https://github.com/abias/moodle 2017-10-03 13:10:17 +08:00
Marina Glancy
ef467fff04 MDL-59495 registration: register site on moodle.net only
Remove support for alternative hubs
2017-09-27 13:07:37 +08:00
Alexander Bias
f380743303 MDL-60234 core: Disable admin warning for developemnt libs 2017-09-26 22:05:19 +02:00
David Mudrák
911fcae895 MDL-59969 admin: Warn admins if a development libs directory exists
We can't really control the direct web access to directories in dirroot,
that is part of the server setup. So we at least warn admins as they may
not realize the risks of having directories like vendor or node_modules
exposed.

Credit goes to Petr Škoda for mentioning the PHPUnit issue CVE-2017-9841
to me.
2017-09-07 10:53:35 +02: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
Andrew Nicols
a011effb49 MDL-58857 admin: Terminate the session if a major upgrade is required 2017-05-09 15:00:00 +08:00
Andrew Nicols
ea10a0319b MDL-56602 core: Lock themerev during upgrade
This also changes install to use a fixed themerev.
2016-11-11 14:15:00 +08:00
Dan Poltawski
586cf92909 MDL-45388 admin: warn of themedesignermode in /admin/ and perf footer
This is:
a) To help avoid devs going on a wild goose chase to find a perf issue
when it's caused by css building
b) To make it clearer that this should never be enabled on production
sites (we already have a warning in the performance report, but who
looks at that)

Now that boost is the default theme and builds css itself, it's more
critical.
2016-10-06 11:49:17 +01:00
tunele
f029401b36 MDL-55083 admin: provide friendly error in case phpxml is missing 2016-07-12 23:35:15 +02: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
David Monllao
356e235459 MDL-48621 admin: Warning about events 1 API deprecation 2016-01-19 15:19:13 +08:00
David Mudrák
30c264211e MDL-49329 admin: Fix reported coding style warnings 2015-10-10 09:15:27 +02:00
David Mudrák
aa1d100c2d MDL-49329 admin: Fix checking for available updates
This was a regression of my recent improvement of rendering the "Check
for updates" button. There is now unified parameter ?fetchupdates=1 that
can be used on either admin/index.php or admin/plugins.php, so that we
can use a common UI widget for both locations (without the need to pass
the URL explicitly).
2015-10-10 09:15:27 +02:00
David Mudrák
b0fc789878 MDL-49329 admin: Clean up disabling of plugins code management features
The admin setting updateautodeploy no longer exists. The two existing
config.php flags $CFG->disableupdateautodeploy and
$CFG->disableonclickaddoninstall merged into a single one.
2015-10-10 09:11:19 +02:00
David Mudrák
c20e9ae836 MDL-49329 admin: Add ability to cancel upgrade of the plugin
If there is an available archived zip with the version of the plugin
currently installed, we can use it to cancel/abort the upgrade of the
plugin. This is internally handled as the installation of the archived
zip and goes through all the validation and confirmation.

Additionally, some other parts were improved. Most notably, renderer no
longer decides itself if some installation can be cancelled but it
always asks the controller (plugin manager).

The button for installation was moved to the left so there should be
first buttons to add things, and then buttons to cancel things (which is
common in normal forms).
2015-10-09 23:37:32 +02:00
David Mudrák
4d7528f9bc MDL-49329 admin: Require confirmation before cancelling plugin install 2015-10-09 09:50:46 +02:00
David Mudrák
2d00be61f1 MDL-49329 admin: Make plugin manager able to install from local zips too
The plugin manager's method install_remote_plugins() has been changed to
install_plugins() and it is now able to install plugins from the
provided list of locally available ZIP files, too. This is used by the
Install plugins admin tool.
2015-10-09 09:50:46 +02:00
David Mudrák
531381f914 MDL-49329 admin: Support plugins installation during upgrade
The plugins check screen (displayed during core upgrade and/or plugins
upgrade) now supports installation of remote plugins. This includes
installation of missing dependencies (both single and bulk mode) and
installation of available updates (both single and bulk mode).

All the HTTP query parameters supported by admin/index.php are now
explicitly enlisted. Previously, the \core\update\deployer used
its own additional parameters (and was source of some serious problems
in the past).

The implementation uses the plugin manager as the controller and
provides an unified interface for installing any remote plugin or
plugins (be it available update or missing dependency).

As a side effect, we now validate available updates which was not
happening before.
2015-10-09 09:50:45 +02:00
David Mudrák
9137a89a1a MDL-49329 admin: Improve the UI for installing dependencies 2015-10-08 23:32:03 +02:00
David Mudrák
2f29cf6e63 MDL-49329 admin: Add ability to cancel installation of a new plugin
The plugins check screen now provides buttons to cancel installation of
a plugin. Available only for new installations (not upgrades) and for
additional plugins (not standard), given that the web server process has
write access to the plugin folder.

This has also been reported as MDL-48535.

As a part of the patch, there is improved processing of page URLs during
the upgrade. All this dancing around $reload URL is not needed once the
$PAGE->url is properly set to guide the admin on the correct page during
the upgrade process.
2015-10-08 23:32:03 +02:00
David Mudrák
30d8bc5f66 MDL-49329 admin: Do not always load info about available updates
Before this patch, whenever core_plugin_manager::get_plugins() was
called, it always attached info about available updates. But this is
needed only in quite rare cases, such as when the admin is looking at
the Plugins overview and Plugins check screens. There is no need to load
this on other places and for non-admin users.

The patch removes the loading from the method
core_plugin_manager::get_plugins_of_type() and implements lazy loading
directly in the plugininfo classes so that it is loaded only when
\core\plugininfo\base::available_updates() is actually called.
2015-10-08 23:32:02 +02:00
David Mudrák
e9d3c21228 MDL-49329 admin: Fix \core\update\checker::enabled() logic
The method should check against $CFG->disableupdatenotifications and not
$CFG->disableupdateautodeploy. This had to be a copy&paste mistake from
the \core\update\deployer::enabled().

While looking at it, I also fixed couple of places where this method
should and could be used.
2015-10-08 23:32:02 +02:00
David Mudrák
98b32c9e7e MDL-51261 admin: Support upgrade key requirement on the site upgrade
The upgrade key can be defined in the main config.php as
$CFG->upgradekey.  If it is defined there, then its value must be
provided every time the site is being upgraded, regardless the
administrator is logged in or not.
2015-09-24 21:02:33 +02:00
Marina Glancy
336a843391 MDL-50973 admin: do not throw exception on /admin/ 2015-08-01 17:37:24 +08:00
Frederic Massart
ca6f3a8b5f MDL-49911 admin: Prevent notices when updatenotifications is disabled 2015-04-28 10:13:36 +01:00
Petr Skoda
d6e7a63d9a MDL-49684 timezones: rewrite timezone support
This patch replaces all homegrown timezone
stuff with standard PHP date/time code.

The main change is the introduction of core_date
class that returns normalised user and server
timezones. From now on nobody should be using
$CFG->timezone or $user->timezone directly!

Other new features and fixes:
* admins are prompted for timezone during install
* editing of other users is finally fixed
* timezones are displayed in user profile
* new $this->setTimezone() in phpunit
* time locale is now automatically reset in phpunit
* timezone is now automatically reset in phpunit
* phpunit has Australia/Perth as default timezone
2015-04-06 13:53:51 +12:00
Andrew Davis
858e92fefe MDL-49164 admin: removed unused registration config setting 2015-03-04 08:50:39 +08:00
Dan Poltawski
d5fcf4b42c MDL-47182 admin: warn about delayed scheduled tasks
Rather than using module cron, use scheduled tasks to work out
if cron has been running recently.

This is not perfect, the admin could disble all tasks, or reschedule
them - but its not complex to compute.
2014-09-16 17:49:23 +01:00