Fixing Moodle Edit Mode That Stops Working After a Deployment

After a server migration, deployment, or git pull, Moodle’s edit mode toggle does nothing. The cause is almost always a missing directory in the Moodle codebase that makes AJAX calls fail silently — not a configuration problem.