Quantcast
Channel: Backup and restore
Viewing all articles
Browse latest Browse all 6586

Re: error/error_question_answers_missing_in_db

$
0
0
by Sam Alexander.  

I had this same issue.  After some investigation I found out leading and trailing spaces in some answers in the question bank were causing the error.  You can see if you have any problem answers by using a MySQL query.  Here is the one I used to find the problem database entries:

SELECT answer FROM `mdl_question_answers` WHERE answer LIKE " %" OR "% ";

Note - the syntax is "<space>%" OR "%<space>"

If there are any answers in the mdl_question_answers table that have a leading or trailing space, you can clean them up with the following UPDATE command using TRIM:

UPDATE mdl_question_answers SET answer = TRIM(answer) WHERE answer LIKE " %" OR "% ";

After cleaning them up I was able to import between classes without errors.

Hope this alleviates your problem.

 

Sam Alexander


Viewing all articles
Browse latest Browse all 6586

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>