You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We want to use this plugin in a way that all environments are set in config.php so that there isn't any need for manual plugin configuration in the GUI.
This bug happens using version 2022011401 from Moodle.org on a Moodle 4.0.x instance.
Steps to reproduce:
In config.php of the prod instance, add a configuration like this:
// URL of the prod instance (set it here instead of relying on the magic of the plugin).
$CFG->local_envbar_prodwwwroot = https://prod.mymoodle.org';/
// Secret key to allow communication between non-prod environments and the prod environment.
$CFG->local_envbar_secretkey = 'foobar42';
// Array of existing non-prod environments.
$CFG->local_envbar_items = array(
array(
'showtext' => 'TEST', 'matchpattern' => https://test.mymoodle.org',/
'colourbg' => 'crimson', 'colourtext' => 'white'
)
);
Add the same identical configuration to the test instance.
Expected result:
On the test instance, the "last reset" information in the envbar should show the correct last reset date when the instance was last reset from prod.
Actual result:
On the test instance, the "last reset" information in the envbar always says "Never been refreshed"
=> even if we reset the test instance with the database from prod
=> and even if I force-set the last refresh time on /local/envbar/last_refresh.php within the test instance.
Analysis:
Doing some debugging, I saw that the local_envbar database table is completely empty in both prod and test
I also spotted that the code to display the last refresh information in the envbar seems to rely on the fact that the environment is registered in the local_envbar database table.
I could confirm that, if I remove the $CFG->local_envbar_items setting from config.php on the test instance and register the test environment manually in the GUI, the last refresh time is shown instantly in the envbar.
The text was updated successfully, but these errors were encountered:
Prerequisites:
Steps to reproduce:
Expected result:
Actual result:
=> even if we reset the test instance with the database from prod
=> and even if I force-set the last refresh time on /local/envbar/last_refresh.php within the test instance.
Analysis:
The text was updated successfully, but these errors were encountered: