Problem with feedback.

Problem with feedback.

by Muhammad Abdullah Ijaz -
Number of replies: 1

hello,

i have uploaded over 33k mcqs using GIFT format.

these mcqs have been allotted into different quiz.

now the problem is that the mcqs shows explanation only when correct option has selected.

and i should have entered general feedback rather than specific feedback for that particular option.

so please tell me is there any way for changing that feedback? or do i have to upload and set each and everything again sad


I also have DB access. can i change all questions from there?

Average of ratings: -
In reply to Muhammad Abdullah Ijaz

Re: Problem with feedback.

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

Well, if you have direct access to the database, you probably can update thing in bulk, but it will be a bit risky, so take suitable precautions (backups) if you decide to try this.

The first thing would be to make an SQL query that just gets the right data, which might be something like this

SELECT q.id, q.name, answer.feedback, answer.feedbackformat
FROM mdl_question q
JOIN mdl_question_answers answer ON answer.question = q.id
WHERE answer.fraction = 1

Note, I have not tested any of these queries. They are approximately right, but you will need to fix the details yourself. You may need to add some extra WHERE clauses to limit this to just the questions you recently imported.

Once you are sure that is associating the right feedback with the right question, you can then try to write the corresponding update. The syntax for UPDATE queries with a JOIN is different depending on what type of database this is (MySQL, Postgres, etc.). You may need to use subqueries rather than a join. I would need to read the database manual to work it out, and I don't have time now. (I also don't know which DB you are using). Hopefully you know enough SQL that you can solve it.

Average of ratings: Useful (1)