Commit Graph

171 Commits

Author SHA1 Message Date
David Mudrák 31a3bcc933 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:32 +01:00
David Mudrák acade5443f 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:21 +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
Marina Glancy 1de1a6665c MDL-35661 Loading of plugin settings for filters plugins (plugininfo_filter) 2012-10-09 09:57:58 +08:00
Marina Glancy 087001ee42 MDL-35661 Loading of plugin settings for editor plugins (plugininfo_editor) 2012-10-09 09:57:57 +08:00
Marina Glancy 79c5c3fa96 MDL-35661 Loading of plugin settings for enrol plugins (plugininfo_enrol) 2012-10-09 09:57:57 +08:00
Marina Glancy cbe9f609f8 MDL-35661 Loading of plugin settings for auth plugins (plugininfo_auth) 2012-10-09 09:57:53 +08:00
Marina Glancy 870d42809a MDL-35661 Loading of plugin settings for blocks (plugininfo_block) 2012-10-09 09:56:46 +08:00
Marina Glancy fde6f79fae MDL-35661 Loading of plugin settings for modules (plugininfo_mod) 2012-10-09 09:56:42 +08:00
Marina Glancy 5cdb1893a9 MDL-35661 Add functionality to plugininfo_base to load settings and check the settings url
- added plugin_manager and plugininfo_base::load_settings(), get_settings_section_name()
2012-10-09 09:44:59 +08:00
Sam Hemelryk fd59389ca6 MDL-25290 cache: Plugins are now standard and strings tidied 2012-10-08 09:53:52 +13:00
Dan Poltawski 078929f40c Merge branch 'MDL-35442-master' of git://git.luns.net.uk/moodle 2012-09-24 11:19:34 +08:00
Ruslan Kabalin 888ce02a82 MDL-35442 Add settings and uninstall link for local plugins 2012-09-18 09:41:26 +01:00
Eloy Lafuente (stronk7) 5df0b25806 Merge branch 'MDL-35344-updates' of git://github.com/mudrd8mz/moodle 2012-09-17 18:02:46 +02:00
Petr Škoda fcae4a0ce3 MDL-35460 add offline feedback from mod_assign to standard plugins 2012-09-16 09:35:04 +02:00
David Mudrák c62580b9d0 MDL-35344 Ignore available updates info with invalid format
Previously when the server response validation had failed, the property
available_update_checker::recentresponse was left as NULL. This caused
problems in available_update_checker::compare_responses() that expects
proper arrays passed.

This patch makes invalid data being ignored by setting the property to
an empty array as if no data have been fetched yet. A debugging message
is thrown so the admins will be able to diagnose eventual problems in
the future.
2012-09-10 17:29:42 +02:00
David Mudrák 7092ea5da5 MDL-35109 Fix available_update_checker::cron_has_fresh_fetch()
For the purpose of cron based fetching, recently fetched data are valid
for 24 hours.
2012-08-28 22:59:33 +02:00
Dan Poltawski d642260cfe Merge branch 'w34_MDL-34954_m24_subplugins' of git://github.com/skodak/moodle 2012-08-21 10:34:28 +08:00