gpt4 book ai didi

php - 如何在 Moodle 中获得测验问题的正确答案/答案数量?

转载 作者:行者123 更新时间:2023-11-29 03:48:11 25 4
gpt4 key购买 nike

我对 Moodle 完全陌生。我一直在想测验问题分析目的。

我怎样才能得到号码。正确响应或错误响应的数量以及负责这些答案的人的 user_id。有没有已经存储它的表?

最佳答案

我有同样的任务,我终于解决了。我发现问题在名为 mdl_question_attempt_steps 的表中进行了评分,我将其与 moodle 问题结合起来并按问题分组并计算正确和错误的答案。

经过 8 个多小时的搜索和阅读非常复杂的 moodle 代码,这就是查询。

SELECT questionid, 
COUNT( CASE WHEN state = "gradedright" THEN 1 END ) AS rightanswer,
COUNT( CASE WHEN state = "gradedwrong" THEN 1 END ) AS wronganswer
FROM `mdl_question_attempt_steps`
JOIN mdl_question_attempts ON ( `questionattemptid` = mdl_question_attempts.id )
JOIN mdl_question ON ( `questionid` = mdl_question.id )
GROUP BY questionid

祝你好运!

关于php - 如何在 Moodle 中获得测验问题的正确答案/答案数量?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28249864/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com