Diferencia entre revisiones de «error/moodle/error question answers missing in db»

De MoodleDocs
(Updated as per 3.1 page)
(Updated as per 3.1 page)
Línea 7: Línea 7:
* Unusual combinations of whitespace in the question_answers. (When these are written out to to the XML in the backup file, then read back in, this can change the whitespace so that it no longer matches exactly. However, once we identified that, we changed to code so that this should no longer be a problem.)
* Unusual combinations of whitespace in the question_answers. (When these are written out to to the XML in the backup file, then read back in, this can change the whitespace so that it no longer matches exactly. However, once we identified that, we changed to code so that this should no longer be a problem.)
* More generally, in MDL-34812, this was linked to questions where text had been pasted from MS Word.
* More generally, in MDL-34812, this was linked to questions where text had been pasted from MS Word.
There were other reports about this problem occurring on '''sites that were previously upgraded from Moodle 1.x'''. If you have experienced this error please comment on tracker issue MDL-26442 with as much details as you can, this will greatly help developers to reproduce the error in the dev environment and fix the problem.


== Soluciones Posibles ==
== Soluciones Posibles ==

Revisión del 12:29 1 jun 2016

Nota: Pendiente de Traducir. ¡Anímese a traducir esta página!.     ( y otras páginas pendientes)

This error occurs occasionally when you are restoring a quizzes or question bank that has shared questions. The restore process will look to see if the shared questions already exist in database where the backup is being restored. If they do, it will link to the existing questions in the database, instead of creating new copied of the shared questions. This error occurs when that process fails.

In order to restore the shared questions, all the different parts of the question like question_answer rows (e.g. the choices of a multiple choice question) have to be matched up. This error occurs when the restore process looks in the database for a particular row that matches something in the backup file, and fails to find it.

In the past, more specific causes of this have been tracked down to:

  • Unusual combinations of whitespace in the question_answers. (When these are written out to to the XML in the backup file, then read back in, this can change the whitespace so that it no longer matches exactly. However, once we identified that, we changed to code so that this should no longer be a problem.)
  • More generally, in MDL-34812, this was linked to questions where text had been pasted from MS Word.

There were other reports about this problem occurring on sites that were previously upgraded from Moodle 1.x. If you have experienced this error please comment on tracker issue MDL-26442 with as much details as you can, this will greatly help developers to reproduce the error in the dev environment and fix the problem.

Soluciones Posibles

  1. Restaure manualmente las preguntas dentro del curso y re-cree el examen.
  1. Intente copiar las preguntas del nivel del sistema al curso. Use el botón para editar y después haga click en el botón para Hacer copia al fondo de la página. Después, intente moverla y si eso dispara un error, entonces Usted ya sabrá cual es la pregunta que está causando el problema.

Otras notas

El archivo que le estuvo causando este error al usuario que lo reportó era /backup/moodle2/restore_qtype_plugin.class.php cerca de la línea 159.