Commit Graph

186 Commits

Author SHA1 Message Date
Damyon Wiese
c2eb74df47 Merge branch 'MDL-34401-muc-pluginlib' of git://github.com/mudrd8mz/moodle
Conflicts:
	lib/db/caches.php
	version.php
2013-03-20 14:08:55 +08:00
Eloy Lafuente (stronk7)
613eebfc6a MDL-38212 fix related unit tests.
For statslib tests was enough to require cronlib.php as
far as all the tests there are using ob-capture / output
expectations, so the new function does not bork anything.

For pluginlib tests finally the use was deleted because
it's a part of cron not interesting (should be always "cheap")
and to keep it there we should be adding a bunch of output
expectations under some cases, for practically nothing.
2013-03-12 19:35:16 +01:00
Eloy Lafuente (stronk7)
63b738a177 Merge branch 'MDL-38212' of git://github.com/timhunt/moodle 2013-03-12 16:02:39 +01:00
David Mudrák
9d6eb027b4 MDL-34401 Cache the contents of version.php files
This saves many inclusions of version.php files.
2013-03-11 12:51:30 +01:00
David Mudrák
ad3ed98b05 MDL-34401 Replace ad-hoc plugin request caches with proper application caches
Data cached in these caches change only at well defined places (during
need for upgrade checks, at the plugin management screen etc). So it
makes sense to use proper application caches instead of request caches.

This saves couple of database queries at almost every page in Moodle.
2013-03-11 12:48:53 +01:00
David Mudrák
b8a6f26ee3 MDL-34401 Replace static variables in pluginlib with ad-hoc request caches
Where the static variable was not really needed (as in case of arrays
defined by the hard-coded list of items), non-static variable is used as
I believe that there is no real performance gain.
2013-03-11 12:48:07 +01:00
Rajesh Taneja
5c9e8898c0 MDL-35716: Added performance to core plugin list 2013-03-11 14:30:02 +08:00
Tim Hunt
658b9372ee MDL-38212 cron: display time and memory usage before each task.
This helps diagnose problems.

Also, call gc_collect_cycles between tasks, which may reduce the
frequency of out-of-memory errors.
2013-03-08 10:24:41 +00:00
Jean-Michel Vedrine
4f315786e8 MDL-37897 Remove useless Blackboard question import format 2013-02-28 17:46:29 +01:00
Petr Škoda
bdbcb6d7fa MDL-38121 tell admins when plugin installed into wrong dir 2013-02-23 18:16:42 +01:00
David Monllao
ff2ec29bb1 MDL-37046 behat: Added to standard plugins list 2013-01-29 08:40:38 +08:00
Petr Škoda
c7a3399041 MDL-37257 improve enrol overview page and enrol plugin info 2013-01-19 13:14:41 +01:00
Petr Škoda
8d21130267 MDL-29996 cleanup filter plugin info 2013-01-07 12:42:13 +01:00
Sam Hemelryk
b8459c0267 MDL-29996 filters: fixed bug when upgrading filter plugin names 2013-01-07 17:40:41 +13:00
Petr Škoda
0662bd677c MDL-29996 remove deprecated stuff from filter code 2012-12-30 17:02:18 +01:00
David Mudrák
fa1415f193 MDL-37003 Fix repeated line in update notification email
There was a problem experienced after 2.4.0 release because the version
of the 2.4.0 release was the same as 2.5dev release. So the version
value matched twice in the loop and the line was repeated in the email.
2012-12-06 01:50:48 +01:00
David Mudrák
d2713eff38 MDL-36943 Do not notify about already installed updates
Before this patch, the available_update_checker::cron_notifications()
method accessed the availableupdates property. But for plugins, that property
basically contains the most recent version available. So we were missing
the check against the actual version installed.

The fix was simple - obtain available updates via the available_updates()
method that performs the check.
2012-12-06 01:50:42 +01:00
Dan Poltawski
0dcae7cd14 MDL-36950 pluginlib - add MDL to comment 2012-12-03 15:47:35 +08:00
David Mudrák
63def597a6 MDL-36950 Pass the Moodle proxy setting to the mdeploy.php utility 2012-11-30 16:12:34 +01:00
David Mudrák
30e2682756 MDL-36903 Pre-check the ZIP download before executing the mdeploy.php utility
This patch makes Moodle call HTTP HEAD method via cURL to see if the ZIP
is expected to be downloadable by mdeploy.php. This is mainly intended
for SSL certificates check.
2012-11-30 16:09:58 +01:00
David Mudrák
4785c45dd8 MDL-36903 Verify the SSL certificate of available updates provider
From now on, Moodle verifies the available updates provider server. To
make it work, either there must be a valid CA certificate available in
the operating system, or the administrator has to upload the valid CA
certificate to moodledata/moodleorgca.crt (PEM format) file manually.
2012-11-30 16:09:58 +01:00
David Mudrák
40a9c2e531 MDL-36720 Fetch available updates info via HTTPS 2012-11-20 15:51:35 +01:00
Dan Poltawski
f58c96f842 Merge branch 'MDL-36369' of git://github.com/timhunt/moodle 2012-11-14 09:29:51 +08:00
Dan Poltawski
59d332ea71 Merge branch 'MDL-36494-invalid-update-debugging' of git://github.com/mudrd8mz/moodle 2012-11-14 08:31:29 +08:00
Tim Hunt
837e181225 MDL-36369 qtypes and qbehaviour settings permissions.
The correct policy is that users with moodle/question:config can set the
default settings for particular qtypes. However, it requires
moodle/site:config in order to do manage qbehaviours or manage qtypes.
2012-11-13 16:07:28 +00:00
David Mudrák
a22de4ce99 MDL-36494 Do not display a debugging message about invalid update info
It turned out that this well-meant debugging message just caused a lot
of false alarm with no good reason. It seems to be better just ignore it
at the moment.
2012-11-13 11:24:55 +01:00
Marina Glancy
3776335ce2 MDL-35260 Course formats may have settings, be enabled, disabled and uninstalled 2012-11-10 15:34:29 +08:00
David Mudrák
0daa642894 MDL-35238 Inform the admin if the update can not be deployed due to write permissions 2012-11-09 00:20:18 +01:00
David Mudrák
56c05088e5 MDL-35238 Accept $CFG->alternativeupdateproviderurl from config.php file only
There was a potential security risk that someone with access to the Moodle
database could update mdl_config table and use it as a vector to
install malicious code on the server.

Credit goes to Dan Poltawski for raising this.
2012-11-08 22:33:08 +01:00
David Mudrák
dc11af1903 MDL-35238 Add support for explicit singleton reset
This may be needed during PHPUnit testing.
2012-11-08 22:33:08 +01:00
David Mudrák
6b75106a75 MDL-35238 Compare the ZIP package content hash with the expected value
The expected value is returned as a part of available update info
(requires API version 1.1).
2012-11-08 22:33:07 +01:00
David Mudrák
85d7516313 MDL-35238 Fetch available updates using the 1.1 version of the API
If the stored response has still 1.0 version (which is expected during
the upgrade to 2.4), a debugging message is displayed. Added a string to
explain what's going on and how to recover from the state.
2012-11-08 22:33:07 +01:00
David Mudrák
08c3bc006d MDL-35238 Warn the admin if they are about to overwrite a SCM checkout 2012-11-08 22:33:07 +01:00
David Mudrák
23137c4ac4 MDL-35238 Unzip the downloaded package and redirect to the upgrade page 2012-11-08 22:33:07 +01:00
David Mudrák
4c72f55516 MDL-35238 Fetch the package and store it in a temporary location 2012-11-08 22:33:07 +01:00
David Mudrák
3daedb5c5a MDL-35238 Implement deployment authorization
The caller of the mdeploy.php utility is expected to create a file in
the data directory. The name of such file and the passphrase in it are
then sent to mdeploy.php as a part of the request. The submitted and
stored values are then compared.
2012-11-08 22:33:07 +01:00
David Mudrák
7683e550ac MDL-35238 Introduce available_update_deployer class
This class represents the communication bridge from Moodle UI to the
(standalone) mdeploy.php utility. It consists of various helper methods
useful when dealing with user interface, update confirmation etc.

The class is implemented as a singleton. This allows us easily
transfer required data from top level scripts (like /admin/index.php)
into the rendering methods deep in the stack without the need to change
the API of many methods on the way.
2012-11-08 22:33:06 +01:00
Dan Poltawski
cdf9b0c86f Merge branch 'MDL-36266-notification-subject' of git://github.com/mudrd8mz/moodle 2012-11-06 11:59:24 +08:00
David Mudrák
2399585f7f MDL-36266 Improve update notification message subject 2012-10-30 12:00:03 +01:00
Petr Škoda
9854743221 MDL-36199 reset plugin manager singletons 2012-10-25 00:55:10 +08:00
Dan Poltawski
ac088b1c21 Merge branch 'w42_MDL-35904_m24_mainadmin' of git://github.com/skodak/moodle 2012-10-16 14:50:30 +08:00
Marina Glancy
dddbbac3f7 MDL-35661 Check that plugin is installed before including settings.php 2012-10-15 15:47:41 +08:00
Dan Poltawski
6bea7da1ab Merge branch 'wip-MDL-35661-master' of git://github.com/marinaglancy/moodle 2012-10-15 13:31:10 +08:00
Petr Škoda
550790153a MDL-35904 send notifications from main admin and improve coding style 2012-10-13 09:52:45 +02:00
Marina Glancy
2567584d5e MDL-35661 Loading of plugin settings for webservices plugins (plugininfo_webservice)
- webservicesettings must be only created if user has site:config capability, otherwise the nodes are added to non-existing parent
2012-10-09 09:58:00 +08:00
Marina Glancy
c517dd68f7 MDL-35661 Loading of plugin settings for repositories plugins (plugininfo_repository) 2012-10-09 09:57:59 +08:00
Marina Glancy
eb30df1e5f MDL-35661 Removed function plugininfo_local::get_settings_url() introduced in MDL-35442
Local plugins do not create settings node with particular name, there is no standard way to
return the settings url
2012-10-09 09:57:59 +08:00
Marina Glancy
e8d169320b MDL-35661 Loading of plugin settings for message processors (plugininfo_message) 2012-10-09 09:57:59 +08:00
Marina Glancy
d98305bdda MDL-35661 Loading of plugin settings for plagiarism plugins (plugininfo_plagiarism) 2012-10-09 09:57:58 +08:00
Marina Glancy
66f3684a38 MDL-35661 Loading of plugin settings for qtype plugins (plugininfo_qtype) 2012-10-09 09:57:58 +08:00