111 Commits

Author SHA1 Message Date
David Mudrák
b4ef04e754 MDL-40759 icons: Fix the core_renderer::spacer() parameters 2017-03-22 13:44:20 +00:00
Damyon Wiese
663640f5b3 MDL-40759 icons: convert uses of pix_url to pix_icon
Also change filepicker to use scaled svgs instead of sets of custom pngs. The svgs are taken from font-awesome.
2017-03-17 15:52:17 +08:00
Jun Pataleta
5920f6338d MDL-57171 admin: Make environment check table look better
* Use Bootstrap label classes for the text under the status column.
* theme_bootstrapbase:
  - Cleanup unnecessary classes and make .error styles consistent
    with .warn styles
* theme_boost:
  - Set font color appropriate for success, warning and error strings.
* Enclose report text in div so that the feedback texts will be
  displayed right below it.
2016-12-01 22:55:10 +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
John Okely
a285d561ef MDL-45104 logging: Check if legacy log is enabled 2016-02-25 10:00:02 +08:00
John Okely
3f195ab7c8 MDL-45104 logging: Fix spelling of writing 2016-02-25 09:59:28 +08:00
Dan Poltawski
e8d908728d MDL-45104 admin: convert error to warning 2016-02-24 08:30:31 +00:00
Adrian Greeve
61f7b10b9a MDL-45104 logging: Deprecate writting to the legacy log store. 2016-02-23 11:55:30 +08: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
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
8726c07cd0 MDL-49329 admin: Use the new plugins management on Plugins overview page
The plugins overview page now uses the new plugins management features,
most notably the ability to install all available updates at once.
2015-10-09 09:50:45 +02:00
David Mudrák
c948b813ae MDL-49329 admin: Add plugin manager method for installing remote packs
The new method core_plugin_manager::install_remote_plugins() will serve
as a backend for all the ways of installing ZIP packages from the moodle
plugins directory, such as installing new plugins (by clicking the
Install button in the plugins directory), installing available updates
(single and bulk mode) and installing missing dependencies (single and
bulk mode).

The method should be used both for validation pre-check screen and,
after the confirmation, for actual installation. Note that we
intentionally repeat the whole procedure after confirmation. Unzipping
plugins is cheap and fast and the ZIPs themselves are already available
in the \core\update\code_manager's cache.

We will need to add support for archiving existing code to prevent
accidental data-loss.

This basically provides what mdeploy.php was doing, but better. We now
have consistent way of installing all remote ZIP packages, always
validate them and we can perform bulk operations, too.
2015-10-09 09:50:44 +02:00
David Mudrák
44371554a9 MDL-49329 admin: Improve plugins overview page rendering
Provides a bit more compact layout. Finally cleans up the relevant LESS
files and makes available updates info boxes consistent across all
screens where they are displayed.
2015-10-08 23:32:04 +02:00
David Mudrák
3bca7dbfa6 MDL-49329 admin: Get rid of mdeploy and \core\update\deployer class
The mdeploy.php standalone script (used to download and unzip plugins
into the dirroot) and the \core\update\deployer class (as a
communication bridge between the core and the mdeploy.php) was
originally designed and implemented with the assumption that it would be
eventually used for updating the Moodle core itself, too. Therefore it
was written as standalone utility without dependency on the Moodle core
libraries.

However, it never happened and there is no real demand for that. So now
there is no need to have and maintain a completely parallel solution for
common things like fetching and unzipping plugin ZIPs.

Additional reasoning for mdeploy.php was that the core is not very
reliable during the core upgrade and we could run into various troubles.
This does not seem to be that bad. We rely on a lot of core
functionality (such as output rendering, DB access etc) and plugins
deployment seems to work well (and better) with common core libraries.

So long mdeploy, and thanks for all the hard work you did for us.
2015-10-08 23:32:04 +02:00
David Mudrák
228cbda3ea MDL-49329 admin: Fix plugins check page if no plugins require attention
A legacy undefined variable was used here and there was no way to get to
the full list mode view.
2015-10-08 23:32:04 +02:00
David Mudrák
36977a6d08 MDL-49329 admin: If unable to install a plugin, display the reason 2015-10-08 23:32:04 +02:00
David Mudrák
35f2b67442 MDL-49329 admin: Fix the API for getting remote plugin info
The previous version of the plugin manager's method
get_remote_plugin_info() was suitable for installing missing
dependencies only. To make use of for installing new plugins and/or
available updates, it must be clear that we are requesting information
for the particular plugin version only, not "given or higher" version.
2015-10-08 23:32:04 +02:00
David Mudrák
0ec7d10128 MDL-49329 admin: Improve Plugins check page
Better inform about the number of plugins requiring attention vs total
plugins. Clean up the renderer.
2015-10-08 23:32:03 +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
5a92cd0b8d MDL-49329 admin: Display missing dependencies on plugins check screen
The patch improves the dependencies resolution in the plugin manager so
that the information about availability of the missing dependency is
included and can be displayed at the Plugins check screen during the
upgrade.
2015-10-08 23:32:03 +02:00
David Mudrák
7eb87eff65 MDL-49329 admin: Move requirements resolving to the plugin manager
The patch moves the resolving logic from the renderer (where it should
not really be) to the plugin manager (controller). This is needed
because we will need the very same logic to be used at other places.
2015-10-08 23:32:02 +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
fd17898c0c MDL-49329 admin: Improve the styling of the Plugins check screen
The intention here is to make the table a little bit more compact (using
less columns) and to make use of the bootstrap based label elements if
available.
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
David Mudrák
a277654f7f MDL-51261 admin: Fix the heading when displaying all plugins
Not directly related to the issue but spotted while developing it and it
is not worth of submitting in a separate issue.

At the Plugins check page, when the "Display the full list of installed
plugins" link was followed, the heading at the next page read something
like "Number of plugins requiring your attention: 357". That is
misleading as this is actually not the number of displayed plugins, not
the number of plugins requiring attention.
2015-09-24 21:02:33 +02:00
David Mudrák
657cb5ab62 MDL-49377 admin: Recommend keeping the site updated to latest version 2015-03-30 23:15:54 +02:00
David Mudrák
2cdea9c7ac MDL-47069 admin: Add option to upload required ZIP at the check page
The plugins check page displays other plugins that the current one
depends on.  Previously, we always displayed the other plugin as a link
to the plugins directory. This did not work well in two scenarios:

* The admin wants/needs to upload the other plugin from the ZIP file
  (e.g. it is not available in the plugins directory),

* the other plugin is actually a standard plugin that is not supposed to
  be registered with the plugins directory.

This patch displays the Install or Upload or Check for updates links
next to the required plugin instead, as appropriate.
2014-09-25 16:54:21 +02:00
Petr Skoda
40cba608a6 MDL-39840 environment: add support for environment.xml in plugins
New features:

* environment.xml files in all types of plugins
* support for plugin strings via new optional plugin attribute in FEEDBACK
* support for class_name::method_name custom callbacks and classloader
2014-08-05 20:18:18 +12:00
Sam Hemelryk
915140c9b5 MDL-45724 cache: added cache API warnings to the admin notifications page 2014-07-21 09:48:33 +12:00
Michael de Raadt
cae7b8882a MDL-44309 Administration - correcting inproperly assigned column classes in environment table 2014-06-05 10:59:34 +08:00
Matteo Scaramuccia
ed25d7c411 MDL-44312 Administration Take care of cronclionly and cronremotepassword. 2014-03-03 21:46:31 +01:00
David Scotson
7f52dbd8d5 MDL-44139 admin: standardise warning renderer use
Take three handcoded warnings and convert them to calling
the 'warning' renderer like rest of the file.

Then remove redundant CSS and/or move specific CSS to generic
places so it's shared.
2014-02-14 11:39:04 +00:00
Petr Škoda
fc28111316 MDL-42973 fix multiple addon update issues 2013-12-06 09:36:38 +08:00
Petr Škoda
2f98f5d541 MDL-43117 Add release column to Plugins Overview page
This patch is based on previous patch by Marko Vidberg, thanks a lot!
2013-12-01 18:57:49 +08:00
Petr Škoda
e87214bda7 MDL-42078 multiple uninstall improvements and cleanup
Includes:
* update checker refactored to \core\update\ namespace
* plugininfo classes refactored to \core\plugininfo\ namespace
* plugin_manager renamed to core_plugin_manager
* redirect back to original page after plugin uninstall
* fixed assign subplugin uninstall
* move assign subplugins under the assignment in admin tree
* fixed plugininfo for all question related plugin types
* auth uninstall support
* added missing block dependencies
* added theme uninstall
* subplugin types are following the plugin on plugin overview page
* several performance improvements in plugin manager
* new warnigns when plugininfo are outdated or missing
* multiple fixes and other improvements
2013-10-07 13:10:36 +02:00
David Monllao
6e09cf98fa MDL-41342 admin: Adding warning when upgrading a test site 2013-09-19 14:57:53 +08:00
Damyon Wiese
ca83aa0b99 Merge branch 'MDL-37564' of https://github.com/nebgor/moodle 2013-09-03 14:49:42 +08:00
Petr Škoda
2612e75e2b MDL-41245 fix redirect and missing string when cannot automatically delete uninstalled plugin 2013-08-28 08:00:19 +02:00
Petr Škoda
82b1cf00b0 MDL-41245 fix multiple install, upgrade and uninstallation issues
Includes rework of cache parameter detection on admin/index.php.

Another problem is that uninstall does not leave system in consistent state,
we need to force users to go through upgrade after any type of uninstall.

This fixes also add-on installation redirect and other issues.
2013-08-24 16:08:11 +02:00
Petr Škoda
2f87bb0315 MDL-39088 add new general uninstall url support to plugin manager 2013-06-27 22:20:34 +02:00
Petr Škoda
e2e35e71f9 MDL-39343 disable all caching in install and upgrades
This should resolve all problem on developer machines when switching branches or when restoring previous Moodle databases. It also prevents any potential problems during upgrades such as concurrent DB modification and resolves chicken egg problems in future caching upgrades.
2013-04-30 10:27:34 +02:00
Dan Poltawski
789ce8202b Merge branch 'MDL-39148-uninstall' of git://github.com/mudrd8mz/moodle
Conflicts:
	theme/bootstrap/style/generated.css
2013-04-22 14:33:28 +01:00
Dan Poltawski
816659ed9e Merge branch 'MDL-39249-upgrade-wizard' of git://github.com/mudrd8mz/moodle 2013-04-22 13:12:48 +01:00
David Mudrák
5d7a4bab3f MDL-39249 Return to the correct page after successful update deployment
The method available_update_deployer::make_execution_widget() used to
have hard-coded return URL. Now it accepts the return URL as the second
parameter and passes it to the mdeploy.php utility.

The callerurl parameter is now correctly passed and used.
2013-04-20 03:00:19 +02:00