How to see the bug:
- Create a new RSS feed;
- Open the created RSS feed for editing;
- Turn off the Enable auto-discovery of feeds and save the result.
- Re-open the RSS feed for editing, the result was not saved.
Why is this happening?
The $mform->get_data() function does not return null or empty values.
How it is possible to correct a bug?
Add additional checks in the file editfeed.php:
--- a/blocks/rss_client/editfeed.php
|
+++ b/blocks/rss_client/editfeed.php
|
@@ -49,7 +49,7 @@ class feed_edit_form extends moodleform {
|
$mform->setType('url', PARAM_URL);
|
$mform->addRule('url', null, 'required');
|
|
- $mform->addElement('checkbox', 'autodiscovery', get_string('enableautodiscovery', 'block_rss_client'));
|
+ $mform->addElement('advcheckbox', 'autodiscovery', get_string('enableautodiscovery', 'block_rss_client'));
|
$mform->setDefault('autodiscovery', 1);
|
$mform->setAdvanced('autodiscovery');
|
$mform->addHelpButton('autodiscovery', 'enableautodiscovery', 'block_rss_client');
|