首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >Moodle自动发送证书

Moodle自动发送证书
EN

Stack Overflow用户
提问于 2014-02-26 05:46:13
回答 2查看 2K关注 0票数 0

我正在配置moodle证书插件,我有问题。有没有办法将证书插件配置为考试通过后自动发送证书?

第二个问题:有没有办法通过电子邮件发送测验结果?

感谢您的回答

EN

回答 2

Stack Overflow用户

发布于 2014-02-26 16:10:50

有一个quiz_attempt_submitted事件

代码语言:javascript
运行
复制
/mod/quiz/db/events.php

,它发送具有以下属性的对象

代码语言:javascript
运行
复制
->component   = 'mod_quiz';
->attemptid   = // The id of the quiz attempt that was submitted.
->timefinish  = // The timestamp of when the attempt was submitted.
->timestamp   = // The timestamp of when the attempt was submitted.
->userid      = // The user id that the attempt belongs to.
->submitterid = // The user id of the user who sumitted the attempt.
->quizid      = // The quiz id of the quiz the attempt belongs to.
->cmid        = // The course_module id of the quiz the attempt belongs to.
->courseid    = // The course id of the course the quiz belongs to.

您可以编写一个本地插件来响应提交的事件,并检查它们是否通过了考试。如果他们有,那就发一封电子邮件。

http://docs.moodle.org/dev/Events_API#Handling_an_event

创建/local/sendcertificate/db/events.php,如下所示

代码语言:javascript
运行
复制
$handlers = array (
    'quiz_attempt_submitted' => array (
        'handlerfile'      => '/local/sendcertificate/lib.php',
        'handlerfunction'  => 'local_sendcertificate_quizsubmitted',
        'schedule'         => 'instant',
        'internal'         => 1,
    ),
);

然后在/local/sendcertificate/lib.php中

代码语言:javascript
运行
复制
function local_sendcertificate_quizsubmitted($quizattempt) {
     // Check if quizattempt is successful
     // Generate the certificate as a pdf
     // Email it to the user
}

您还需要为本地插件添加几个文件

http://docs.moodle.org/dev/Local_plugins

票数 2
EN

Stack Overflow用户

发布于 2014-02-26 15:52:45

'mod_certificate‘和'mod_simplecertificate’都没有通过电子邮件自动发送证书的选项(‘通过考试’,我想你的意思是‘用户在Moodle中完成了某种活动’)。

您可以将证书配置为在学生查看证书时通过电子邮件发送给教师(或其他用户的特定列表)(并且可以将证书设置为仅在满足特定条件时才可查看)。

要做你想做的事情,唯一的方法是让开发人员通过代码添加功能。

可以将测验模块配置为在提交测验时自动发送电子邮件(向提交测验的教师和/或学生),并在测验过期时发送电子邮件。您可以通过电子邮件发送结果的唯一方法是手动导出结果,然后自己通过电子邮件发送。

同样,这是一个可以由开发人员添加的功能,但如果不更改代码,则无法完成此功能。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/22026954

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档