Moodle

Handle misconfigured external database enrolment plugin

Details

  • Type: Task Task
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: 1.8
  • Fix Version/s: 2.0
  • Component/s: Enrolments
  • Labels:
    None
  • Database:
    MySQL
  • Affected Branches:
    MOODLE_18_STABLE
  • Fixed Branches:
    MOODLE_20_STABLE

Description

When administrator switches "External Database" on in site -> administration -> courses -> enrolments, but neglects to configure the plugin (by clicking Edit and filling values), the entire site becomes inaccessible due to a PHP fatal error:

PHP Fatal error: Cannot access empty property in /moodle/nick/18/enrol/database/enrol.php on line 42

The missing property is $CFG->enrol_localuserfield

The task is to handle any case of misconfiguration for this plugin, by showing a notice and/or sending an email to the administrator.
The plugin should also be disabled until configured properly, so that the site still works.

Activity

Hide
Petr Škoda (skodak) added a comment -

should be fixed now in 2.0, thanks for the report!

Show
Petr Škoda (skodak) added a comment - should be fixed now in 2.0, thanks for the report!

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: