「カスタムロールの作成」の版間の差分

提供:MoodleDocs
移動先:案内検索
37行目: 37行目:
オーバーライドに使用するカスタムロール、またはシステム管理者がアップグレード後に新しいケイパビリティを手動で設定したい場合、ロールアーキタイプを設定する必要はありません。
オーバーライドに使用するカスタムロール、またはシステム管理者がアップグレード後に新しいケイパビリティを手動で設定したい場合、ロールアーキタイプを設定する必要はありません。


The archetypes (which relate directly to the built-in roles) are:
内臓されたロールに直接関わるアーキタイプは次のとおりです: The archetypes (which relate directly to the built-in roles) are:
* manager
* manager
* coursecreator
* coursecreator

2016年1月31日 (日) 15:02時点における版

作成中です - Mitsuhiro Yoshida (トーク)

新しいロールの作成

カスタムロールを作成するには:

  1. 「管理 > サイト管理 > ユーザ > パーミッション > ロールを定義する」にアクセスしてください。
  2. 「ロールを追加する」ボタンをクリックしてください。
  3. 新しいロールにテンプレートを選択するか、プリセットをアップロードしてください。
  4. 例えば「親」のようにロール省略名を設定してください。ロールを参照する必要があるため、省略名はModle内の他のプラグインに必要です (例えばファイルからユーザをアップロードする場合、登録プラグイン経由で設定する場合)。
  5. あなたはすべてのカスタムロールにフルネームを提供する必要があります。ロールに複数言語で名称を付けたい場合、あなたは多言語シンタックスを使用することができます。
  6. ロール説明を入力してください (任意)。
  7. 適切なロールアーキタイプを選択してください (詳細情報は下記をご覧ください)。
  8. ロールが割り当てられるコンテクストを選択してください。例) 親ロールの「User」
  9. 必要に応じて、パーミッションを設定してください。
  10. ページの最上部または最下部に移動して、「このロールを作成する」ボタンをクリックしてください。


新しいロールを追加してコンテクストタイプを設定する
必要に応じて「許可」を選択する
「拡張要素を表示する」オプションを有効にした場合の追加オプション

ロールアーキタイプ

ロールアーキタイプは

  • ハードコードされたロールのテンプレートです。
  • アップグレード中に新しいケイパビリティのデフォルトを追加する時に使用されます - アーキタイプなし = アップグレード中に新しいケイパビリティはありません。
  • ロールリセット時のデフォルト決定に使用されます - アーキタイプなし = リセットによりケイパビリティすべてが削除されます。

オーバーライドに使用するカスタムロール、またはシステム管理者がアップグレード後に新しいケイパビリティを手動で設定したい場合、ロールアーキタイプを設定する必要はありません。

内臓されたロールに直接関わるアーキタイプは次のとおりです: The archetypes (which relate directly to the built-in roles) are:

  • manager
  • coursecreator
  • editingteacher
  • teacher
  • guest
  • user
  • frontpage

Creating a duplicate role

To create a duplicate role:

  1. Go to Administration > Site administration > Users > Permissions > Define roles.
  2. Click the "Add a new role" button.
  3. Select existing role as a template
  4. Give a name and set permissions for your new role; scroll down and click "Create this role".

New role considerations

A new role is not automatically listed in course descriptions even if was created by copying a role that is listed, such as Teacher. If you want the new role to appear in the course listing, you must set it explicitly via Administration > Site administration > Appearance > Courses>Course Contacts"

Testing a new role

Administration > Switch role to Use the "Switch role to" link to see what another role will see in that context.

Since switching roles confines you to those roles you can assign in a course context, this method is only useful for testing course-scoped capabilities (i.e. it will not be useful for testing permissions that apply outside the course context, like moodle/user:edit).

Tip: You can always create test user and assign the new role to them. Then logout as admin and login as the test user. This is really the best way to test a new role.

Example custom roles

  • Parent - for providing parents/mentors/tutors with permission to view certain information about their children/mentees/tutees
  • Demo teacher - for providing a demonstration teacher account with a password which can't be changed
  • Forum moderator - for providing a user with permission in a particular forum to edit or delete forum posts, split discussions and move discussions to other forums
  • Forum poster role - a highly restricted custom role which may be given to a visitor account to enable them to post in forums in a guest access course.
  • Calendar editor - for enabling a user to add site or course events to the calendar
  • Blogger - for limiting blogging to specific users only
  • Quiz user with unlimited time - for allowing a user unlimited time to attempt a quiz which has a time limit set
  • Question creator - for enabling students to create questions for use in quizzes
  • Question sharer - for allowing teachers to share questions between courses
  • Course requester role - for restricting users who can make course requests
  • Feedback template creator - for allowing teachers to save as "Public" a Feedback template.
  • Grading forms publisher for allowing teachers to share Advanced grading forms with others
  • Grading forms manager for allowing teachers to share Advanced grading forms with others and to delete templates others have created.
  • Grade viewer for allowing users to view but not edit grades.
  • Gallery owner role - may be used to provide editing capabilities (add and edit gallery images) to users on individual Lightbox Galleries.
  • Course tagger - for allowing users other than managers and editing teachers to tag courses.

Uploading users to a system role

Where certain custom roles are applied in the system context, it is possible to upload users to that role in bulk by adding the field sysrole1 (etc) to the CSV file

関連情報

Using Moodle forum discussions: