我是moodle的新手,目前我正在做问卷调查模块,在这个模块中,我们为课程创建调查问卷(由教师创建,学生在课程详细页面上查看,他们将在那里回答)。现在,我想知道是哪个用户创建了该调查问卷(即用户i )。我已经找了很久,但没有找到任何答案。
发布于 2012-03-16 21:01:55
如果调查问卷表有一个createdby字段,那么您可以使用该字段,否则,您必须搜索logs表,如下所示:
// You'll need to get the right coursemoduleid first from the course_modules table
$cmid = 27;
$conditions = array('module' => 'questionnaire',
'coursemoduleid' => $cmid,
'action' => 'add');
$creationrecord = $DB->get_record('log', $conditions);
$creator = $creationrecord->userid;https://stackoverflow.com/questions/9666335
复制相似问题