-

Note: You are currently viewing documentation for Moodle 3.10. Up-to-date documentation for the latest stable version of Moodle may be available here: Anonymous Users.

Development:Anonymous Users: Difference between revisions

From MoodleDocs
No edit summary
No edit summary
Line 4: Line 4:


{{Moodle 2.0}}
{{Moodle 2.0}}
__TOC__


== Objective ==
== 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.
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 ==
__TOC__
 
== Possible Use Cases ==
# '''Activity:''' for example a forum may be switched into anonymous mode by teacher rendering all posts
# '''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
# '''User:''' a user may choose to participate in an activity anonymously
Line 32: Line 32:
* Alias
* Alias
* Alias image
* Alias image
== Code Changes ==


=== New Table ===
=== New Table ===


The anonymity of the activity will depend upon:
A new table '''user_alias_course''' will be added
# Global settings - site administrator can switch anonymous mode on/off
{| border="1"
# Module settings - teacher can set anonymous to on/off/optional
|-
# User settings - user can switch on/off
!field
 
!type
=== Scenarios ===
!description
There are 3 possible scenarios for an activity:
|-
# Teacher sets an activity to run in "Anonymous Mode". Using the example of a forum, all users who post to the forum will do so anonymously;
|id
# Teacher sets an activity to run in "Optional Anonymous Mode". In this scenario moodle will check the user settings to see if they have enabled anonymity;
|int
# Teacher sets an activity as "Not Anonymous".
|autoincrement
 
|-
== User Profile ==
|userid
Proposed new settings in a user's profile:
|int
{| class="nicetable"
|id from the user table
|-
|-
! Field
|courseid
! Type
|int
! Description
|id from the course table
|-
|-
|anonymous_name
|alias
|text
|string
|User can enter an anonymous name they would like to use. This field may be disabled depending on global settings
|the user's alias for this given course
|}
|}
== Core Code ==
== Activity Modules ==

Revision as of 16:33, 3 November 2009

Template:CategoryDeveloper

Note: This page is a work-in-progress. Feedback and suggested improvements are welcome. Please join the discussion on moodle.org or use the page comments.



Template:Moodle 2.0

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

  1. Activity: for example a forum may be switched into anonymous mode by teacher rendering all posts
  2. User: a user may choose to participate in an activity anonymously
  3. 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_alias_course 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