Moodle 5.3 日本語ドキュメント(第一次翻訳):ほぼすべてのページが日本語に翻訳されました。まだ第一次翻訳のため、不自然な表現や誤訳が残っている可能性があります。お気づきの点があれば、ページコメントでお知らせいただくか、直接編集してください。スクリーンショットの多くは、まだ英語版の画面のままです。以前のバージョンの日本語ドキュメントは、バージョンメニューからご覧いただけます。
Moodle 5.3 Japanese documentation (first-pass translation): almost all pages have now been translated into Japanese. As this is a first pass, some wording may read unnaturally or be mistranslated. If you notice anything, please leave a page comment or edit the page directly. Most screenshots still show the English interface. Japanese documentation for earlier versions is available from the version menu.

ユーザのメールフラグ

提供: MoodleDocs
(E-Mail flag for usersから転送)
移動先:案内、検索

ユーザのメールフラグを変更すると、そのユーザはMoodleからのメールを受信できなくなったり、受信できるようになったりします。MoodleにはCLIスクリプトが含まれており、一度に1人または複数のユーザのメールフラグを変更できます。また、メールフラグがオフかオンかの現在の状態を表示することもできます。このスクリプトの使用例としては、メール転送エージェント(例:postfix)のログファイルをスキャンし、そこで報告されているメールアドレスを抽出する処理の自動化が考えられます。メールが無効であったり、配信を拒否されたりした場合、そのアドレスをCLIスクリプトの引数として渡してemailstopフラグを変更し、そのユーザがそれ以上メールを受信しないようにできます。

CLIスクリプトemailstop.phpは、Moodleインストールのadmin/cliにあります。

使用できるコマンドライン引数は次のとおりです:

   -h, --help              Print out a help screen that mentions all possible agruments that can be set.
   -e, --email=email       Specify a user by email, separate many users by comma.
   -i, --id=id             Specify a user by the internal database id, separate many ids by comma.
   -q, --quiet             Do not print anything out to stdout. The success of the script can still be controlled by the exit code.
   -s, --stop=0|1|off|on   Set a new value for emailstop flag
   -u, --username=username Specify user by username, separate many users by comma.

1人または複数のユーザを指定するには、-e、-i、-uのいずれか1つのオプションだけを使用できます。便宜上、複数のユーザを一度に設定でき、その場合はカンマで区切る必要があります(例:php admin/cli/emailstop.php -u=student1,student2,student3)。

-qパラメータを指定すると、stdoutへの出力がすべて抑止されます。そのため、-s引数を付けずに-qを使用しても、あまり意味がありません。

呼び出し例:

   $ php admin/cli/emailstop.php --email=student1@example.org --stop=1 -q

メールアドレスがstudent1@example.orgのユーザのメール受信を無効にします。出力は生成されません。

   $ php admin/cli/emailstop.php --email=student1@example.org

メールアドレスがstudent1@example.orgのユーザのemailstopフラグの状態を表示します。