Change question behavior for submitted quizzes

Change question behavior for submitted quizzes

ໂດຍ Zvonko Martinović -
ຈຳນວນການຕອບກັບ: 2

Hello, what would be the easiest way to change question behavior for submitted quizzes?

One of our teacher has created a quiz and set it "Manually graded". Lots of students have completed the test but now he would like to be able to auto grade all question. Of course, setting quiz to "Deferred feedback" is not doing anything for submitted quizzes.

I guess this can be changed in DB but what tables and records do I need to edit? Maybe a short sql to do it for the entire quiz would be nice :D

Thanks,
Zvonko

ການຈັດອັນດັບສະເລ່ຍ: -
ໃນການຕອບກັບຫາ Zvonko Martinović

Re: Change question behavior for submitted quizzes

ໂດຍ Tim Hunt -
ຮູບພາບຂອງ Core developers ຮູບພາບຂອງ Documentation writers ຮູບພາບຂອງ Particularly helpful Moodlers ຮູບພາບຂອງ Peer reviewers ຮູບພາບຂອງ Plugin developers

There is no easy way to do this.

See this forum thread https://moodle.org/mod/forum/discuss.php?d=221113#p965242 for the scary details of fixing this in the database.

Once you have made these changes in the database, you need to go to Quiz administration -> Results -> Grades, and regrade the quiz.

ການຈັດອັນດັບສະເລ່ຍ: -
ໃນການຕອບກັບຫາ Tim Hunt

Re: Change question behavior for submitted quizzes

ໂດຍ Zvonko Martinović -

Nice ຍິ້ມ

We only need to skip essay questions as they need to be manually graded, so for me this seems to work:

UPDATE mdl_question_attempts
SET behaviour = 'deferredfeedback'
FROM mdl_question
WHERE questionusageid IN (
    SELECT uniqueid
    FROM mdl_quiz_attempts
    WHERE quiz = {quiz_id}
)
AND questionid = mdl_question.id
AND qtype <> 'essay'
AND behaviour = 'manualgraded'

Thanks Tim!

ການຈັດອັນດັບສະເລ່ຍ: -