emeneo / moodle-format_event

The moodle course format "Event" is intended to be used for short training events. Upon course creation, it creates a corresponding calendar event.
1 stars 0 forks source link

fatal error when creating course with event format. #2

Closed danmarsden closed 5 years ago

danmarsden commented 5 years ago

When trying to create a new course and choosing the "event" course format I get the following error:

Debug info: SELECT * FROM {course} WHERE id = ? [array ( 0 => 0, )] Error code: invalidrecord ×Stack trace: line 1546 of /lib/dml/moodle_database.php: dml_missing_record_exception thrown line 1522 of /lib/dml/moodle_database.php: call to moodle_database->get_record_select() line 588 of /lib/datalib.php: call to moodle_database->get_record() line 331 of /course/format/event/lib.php: call to get_course() line 2450 of /course/lib.php: call to format_event->update_course_format_options() line 162 of /course/edit.php: call to create_course()

danmarsden commented 5 years ago

uncommenting that line seemed to allow the course to be created.

Flottertotte commented 5 years ago

Hi Dan, Thanks for reporting the bug. Unfortunately your solution (uncommenting that line) will make the plugin not work properly, ie many of its functionality wont work anymore.

Workaround

  1. create a course with format "topics"
  2. go back to the course settings and change the course format to "Event" and save.
danmarsden commented 5 years ago

thanks - typically we don't perform another review of the plugin/code until you upload the updated version into the plugins db. When you have fixed this please update the plugins db and flag it as ready for review again (this issue will block approval in the plugins db as we require plugins to be functional before public release.) thanks!

Flottertotte commented 5 years ago

Hi Dan, we have uploaded the updated version into the plugin db :)