Course error - Invalid column name 'introformat'.

Course error - Invalid column name 'introformat'.

by Phil Everist -
Number of replies: 1

Moodle 2.7.2

A new user just started working on a new course today . The course is now displaying the following debug information when selected.

The user mentioned the main content being added was a Checklist activity with many items which the logs confirm.  I have confirmed that CheckList activities work ok in other courses.  

What is the best way to proceed in working out what has failed and how to fix it? 

 

Debug info: Invalid column name 'introformat'.
SELECT name, intro, introformat FROM mdl_lesson WHERE id = ?
[array (
0 => '65',
)]
Error code: dmlreadexception
Stack trace:
  • line 443 of \lib\dml\moodle_database.php: dml_read_exception thrown
  • line 242 of \lib\dml\mssql_native_moodle_database.php: call to moodle_database->query_end()
  • line 724 of \lib\dml\mssql_native_moodle_database.php: call to mssql_native_moodle_database->query_end()
  • line 758 of \lib\dml\mssql_native_moodle_database.php: call to mssql_native_moodle_database->get_recordset_sql()
  • line 1476 of \lib\dml\moodle_database.php: call to mssql_native_moodle_database->get_records_sql()
  • line 1448 of \lib\dml\moodle_database.php: call to moodle_database->get_record_sql()
  • line 1427 of \lib\dml\moodle_database.php: call to moodle_database->get_record_select()
  • line 1116 of \course\lib.php: call to moodle_database->get_record()
  • line 618 of \lib\modinfolib.php: call to get_array_of_activities()
  • line 451 of \lib\modinfolib.php: call to course_modinfo::build_course_cache()
  • line 412 of \lib\modinfolib.php: call to course_modinfo->__construct()
  • line 2062 of \lib\modinfolib.php: call to course_modinfo::instance()
  • line 1851 of \lib\navigationlib.php: call to get_fast_modinfo()
  • line 1915 of \lib\navigationlib.php: call to global_navigation->generate_sections_and_activities()
  • line 443 of \course\format\lib.php: call to global_navigation->load_generic_course_sections()
  • line 145 of \course\format\topics\lib.php: call to format_base->extend_course_navigation()
  • line 1830 of \lib\navigationlib.php: call to format_topics->extend_course_navigation()
  • line 1200 of \lib\navigationlib.php: call to global_navigation->load_course_sections()
  • line 222 of \blocks\navigation\block_navigation.php: call to global_navigation->initialise()
  • line 178 of \blocks\navigation\block_navigation.php: call to block_navigation->get_navigation()
  • line 294 of \blocks\moodleblock.class.php: call to block_navigation->get_content()
  • line 236 of \blocks\moodleblock.class.php: call to block_base->formatted_contents()
Average of ratings: -
In reply to Phil Everist

Re: Course error - Invalid column name 'introformat'.

by Conn Warwicker -
Picture of Core developers Picture of Plugin developers

Do you have access to the database behind the website, to check and make sure the "introformat" field is in your mdl_lesson table? Because it should be.

Another thing you could try is to Purge the Caches. Sometimes when database changes are made, you have to purge the cache for Moodle to bring them through. I don't know what change could have been made to mess that up, but it's worth a try at least.