/**
  * Magic method getter, redirects to read only values.
  *
  * For module plugins we pretend the object has 'visible' property for compatibility
  * with plugins developed for Moodle version below 2.4
  *
  * @param string $name
  * @return mixed
  */
 public function __get($name)
 {
     if ($name === 'visible') {
         debugging('This is now an instance of plugininfo_mod, please use $module->is_enabled() instead of $module->visible', DEBUG_DEVELOPER);
         return $this->is_enabled() !== false;
     }
     return parent::__get($name);
 }