vfremaux / moodle-block_vmoodle

Provides Moodle Virtualisation capabilities and Moodle array management
8 stars 3 forks source link

fatal error when creating new instance - missing global $DB definition #4

Open pavelxkrejci opened 10 years ago

pavelxkrejci commented 10 years ago

When creating new instance - after submitting new instance form I get error:

Notice: Undefined variable: DB in /var/www/moodle/blocks/vmoodle/classes/Host_Form.php on line 301 Fatal error: Call to a member function get_record_sql() on a non-object in /var/www/moodle/blocks/vmoodle/classes/Host_Form.php on line 301

There is missing global $DB definiton in function validation(), line 231

vfremaux commented 10 years ago

please write this global $CFG, $DB; as first line of the fucntion "validaton()" in the mentionned file... fixing here....