Moodle - 自定义电子邮件通知?

时间:2015-12-02 10:16:04

标签: moodle moodle-api

我试图修改学生完成测验后收到的电子邮件。 我想在邮件中添加一些信息(比如每个答案的反馈,分数ecc。)但是,在moodle文档中,我读到我只能添加的信息很少:( $ a strings):{{ 3}}

您知道我是否可以添加更多信息?或者你能解释一下如何手动添加这些信息,谢谢。

1 个答案:

答案 0 :(得分:1)

自定义可以通过语言模块完成,因为我相信你已经解决了。

$ a只是一个可变载体。要访问完整信息,您需要添加如下参数: $ A-> ParameterToPass

可通过的参数是:

$a->coursename
The name of the course
$a->courseshortname
The shortname of the course
$a->quizname
The name of the quiz
$a->quizreporturl
The URL of the results overview for this quiz (.../mod/quiz/report.php?q=quizid)
$a->quizreportlink
The URL of the results overview URL and quiz name as a HTML link
$a->quizreviewurl
The URL of the review page for this attempt (.../mod/quiz/review.php?attempt=attemptid)
$a->quizreviewlink
The attempt review URL and quiz name as a HTML link
$a->quizurl
The URL of the main page of the quiz (.../mod/quiz/view.php?q=quizid)
$a->quizlink
The URL of the quiz and the quiz name as a HTML link
$a->attemptsubmissiontime
The time the attempt was submitted, formatted using userdate().
$a->timetaken
How long the quiz attempt lasted.
$a->studentname
The name of the person who submitted the quiz.
$a->studentidnumber
The idnumber of the person who submitted the quiz.
$a->studentusername
The username of the person who submitted the quiz.
$a->username
The name of the user the email is being sent to.
$a->useridnumber
The idnumber of the user the email is being sent to.
$a->userusername
The username of the user the email is being sent to.

(取自https://docs.moodle.org/30/en/Quiz_submission_email_notification

这是针对Moodle 3.0的 - 如果您告诉我们您正在使用哪种Moodle版本,为了将来参考,您可以获得更准确的回复。

您无法将得分/结果作为参数传递的原因是因为并非所有Moodle测验的评论模式都能让用户查看得分 - 特别是如果启用了手动标记(例如存在论文类型的问题)。相反,您可以将URL传递给评论。这样可以确保如果审核不可用,则会在用户点击链接时通知用户,而不是在电子邮件中包含空白声明,这可能会造成混淆。