Environment bar - Moodle local plugin
This displays a configurable fixed div across across the top of your
Moodle site which can change depending on where it has been deployed.
This is useful with development and production for identifying which server you currently reside on based on the URL.
Showing what environment you are in needs to be reliable. If it doesn't work for any reason then you may as well not have it. The way this plugin works is that in your production system you specify what your different environments are. Then after a refresh of production data back to a staging environment it can auto detect that it is no longer in production and warn the end user. Further more if there isn't any config at all, then it will assume you are in a development environment.
By doing it this way, by saying 'Are we not in production' vs 'Are we in a dev environment' the logic becomes much more resilient to mistakes, refreshed databases, and still works even if you forget to do anything and just have a fresh database. ie it is the only near perfect fail safe way to detect a non-production environment.