course backup: Unknown column 'h.completionpass' in 'field list'

course backup: Unknown column 'h.completionpass' in 'field list'

by Josefina Osán -
Number of replies: 2

Hello!!

I'm having problems trying to make a backup of a course.
I'm not sure what to do with the problem.

I'll appreciate all help! 

Thank you! 


Información de depuración: Unknown column 'h.completionpass' in 'field list'

SELECT h.id,
hl.machine_name,
hl.major_version,
hl.minor_version,
h.name,
h.intro,
h.introformat,
h.json_content,
h.embed_type,
h.disable,
h.content_type,
h.slug,
h.timecreated,
h.timemodified,
h.authors,
h.source,
h.year_from,
h.year_to,
h.license_version,
h.changes,
h.license_extras,
h.author_comments,
h.license,
h.completionpass
FROM mdlry_hvp h
JOIN mdlry_hvp_libraries hl ON hl.id = h.main_library_id
WHERE h.id = ?
[array (
0 => 115,
)]
Error code: dmlreadexception
×Trazado de la pila (stack):
  • line 486 of /lib/dml/moodle_database.php: dml_read_exception thrown
  • line 1186 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()
  • line 56 of /backup/util/dbops/backup_structure_dbops.class.php: call to mysqli_native_moodle_database->get_recordset_sql()
  • line 359 of /backup/util/structure/backup_nested_element.class.php: call to backup_structure_dbops::get_iterator()
  • line 77 of /backup/util/structure/backup_nested_element.class.php: call to backup_nested_element->get_iterator()
  • line 107 of /backup/util/structure/backup_nested_element.class.php: call to backup_nested_element->process()
  • line 97 of /backup/util/plan/backup_structure_step.class.php: call to backup_nested_element->process()
  • line 181 of /backup/util/plan/base_task.class.php: call to backup_structure_step->execute()
  • line 222 of /backup/moodle2/backup_activity_task.class.php: call to base_task->execute()
  • line 178 of /backup/util/plan/base_plan.class.php: call to backup_activity_task->execute()
  • line 119 of /backup/util/plan/backup_plan.class.php: call to base_plan->execute()
  • line 375 of /backup/controller/backup_controller.class.php: call to backup_plan->execute()
  • line 136 of /backup/util/ui/backup_ui.class.php: call to backup_controller->execute_plan()
  • line 175 of /backup/backup.php: call to backup_ui->execute()

Average of ratings: -
In reply to Josefina Osán

Re: course backup: Unknown column 'h.completionpass' in 'field list'

by Leon Stringer -
Picture of Core developers Picture of Particularly helpful Moodlers

You've got version 2020080400 of the H5P plugin but the H5P database tables were not upgraded from the previous version. You can probably resolve the error by adding the missing column:

ALTER TABLE mdlry_hvp ADD COLUMN `completionpass` tinyint(1) DEFAULT 0

Run this statement either in phpMydmin or in the database shell, mysql. Always perform a database backup before making this kind of change.

In reply to Leon Stringer

Re: course backup: Unknown column 'h.completionpass' in 'field list'

by Josefina Osán -
Thank you so much!!! It worked ok!