Environment bar
插件本地插件稳定版

Environment bar

local_envbarDmitrii Metelkin

  • Moodle 1.9–5.1
  • 更新 2025-12-10

Warn users with a notification block across the top of the screen when you’re browsing a non-production server like staging or a local development box.
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.
Principals
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.

返回插件目录