Development:Anonymous Users
From MoodleDocs
Note: This article is a work in progress. Please use the page comments or an appropriate moodle.org forum for any recommendations/suggestions for improvement.
Objective
To allow users to switch into an anonymous mode when using certain activities eg when posting to a forum, so that the user's real identity cannot be ascertained by other non-privileged users.
Possible Use Cases
- Activity: for example a forum may be switched into anonymous mode by teacher rendering all posts
- User: a user may choose to participate in an activity anonymously
- Role Play: a teacher may choose to run the whole course in an anonymous mode to allow students to role play
Settings
Global
- Anonymous Mode: On/Off
- Anonymous Images: On/Off
- Enable Course Anonymous Mode: On/Off
Course
- Anonymous Mode: On/Off/Optional
Activity
- Anonymous Mode: On/Off/Optional
User Profile
The following additional fields will be added
- Alias
- Alias image
Code Changes
New Table
A new table user_course_alias will be added
field | type | description |
---|---|---|
id | int | autoincrement |
userid | int | id from the user table |
courseid | int | id from the course table |
alias | string | the user's alias for this given course |