Skip to content

Concerns about the handling of the original wwwroot #57

@abias

Description

@abias

Tasks:

  • if this is a fresh install, assume we are prod and set the root. worse case it will mean it won't run on a fresh stage box which hasn't been refreshed
  • also set this via upgrade script
  • only ever set it if it is not currently set
  • expose the original data root on the index.php page
  • have the ability to reset it the site we are currently on, the same as we can with envbar

Hi,

I have some concerns about the handling of the original wwwroot setting in this plugin. These concerns are targeted at the latest version of the plugin published on https://moodle.org/plugins/pluginversion.php?id=12918 and may be superseded by recent commits here in Github.

[...] Note that you MUST visit the DataCleaner config page to save the current wwwroot, or the cleaner will not run later in the other environments.
** Well, what's the DataCleaner config page? It's /local/datacleaner/index.php, but you won't know without looking at the code.
** The DataCleaner config page stores the original wwwroot automatically when the page is visited. But this page does not output any information that the original wwwroot has now been stored when you visit the page.

  • There is no possibility to check that the original wwwroot is set correctly and / or to check which value it has without looking at the database.

  • The original wwwroot is stored in a Moodle core variable on $CFG->original_wwwroot in the mdl_config table. As far as I know, plugin settings should rather go to mdl_config_plugins.

  • The original wwwroot is set everytime when you visit the DataCleaner config page. This also happens when you visit the DataCleaner config page in the washing box Moodle instance. I think this is unexpected.

I would propose to describe crystal clearly in the README and on the DataCleaner config page how the original wwwroot setting works and what the admin has to know and do to make it work.

Thanks,
Alex

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions