Note:

If you want to create a new page for developers, you should create it on the Moodle Developer Resource site.

Dialogue 2.0 specification: Difference between revisions

From MoodleDocs
(43 intermediate revisions by 2 users not shown)
Line 9: Line 9:
| Tracker
| Tracker
| http://tracker.moodle.org/browse/CONTRIB-2059 | CONTRIB-2059
| http://tracker.moodle.org/browse/CONTRIB-2059 | CONTRIB-2059
|-
| Discussion
| [http://moodle.org/mod/forum/discuss.php?d=157941 Review and comments]
|}
|}


== Introduction ==
== Introduction ==
The Dialogue module  allows students or teachers to start two-way conversation with another person. They are course activities that can be useful when the teacher wants a place to give private feedback to a student on their online activity. For example, if a student is participating in a language forum and made a grammatical error that the teacher wants to point out without embarrassing the student, a dialogue is the perfect place. A dialogue activity would also be an excellent way for counsellors within an institution to interact with students - all activities are logged and email is available but not necessarily required.
The Dialogue module  allows students or teachers to start a two-way conversation with another person. The Dialogue is a course activity that can be useful when the teacher wants a place to give private feedback to a student on their online activity. For example, if a student is participating in a language forum and made a grammatical error that the teacher wants to point out without embarrassing the student, a dialogue is the perfect place. A dialogue activity would also be an excellent way for counselors within an institution to interact with students - all activities are logged and email is available but not necessarily required.  The Dialogue is also a useful alternative to email or private Messages as the conversations are located within a course.  The Dialogue module can be backed up with other course activities.
=== Usage scenarios ===
=== Usage scenarios ===
*Teacher sends same course welcome message to all students in “Course A” including future students. Not other roles. Multiple messages.
* Teacher posts the same message to all students in ‘Course A’, future enrolled students also receive the same message. Individual conversation created between teacher and each student. Multiple replies are allowed.
*Teacher sends same group welcome message to all members of “Group A” including future members. All roles in “Group A”. Multiple messages.
* Teacher posts the same message to all members of ‘Group A’, future group members also receive the same message. Individual conversation created between teacher and each user (any role) in ‘Group A’. Multiple replies are allowed.
*Teacher sends same message to some students. Multiple messages.
* Teacher posts the same message to specific students in ‘Course A’.  Individual conversation created between teacher and each student. Multiple replies are allowed.
*A Teacher can send “Message” to a student. Student can view but not respond. Single user message.
* Teacher posts a message to a specific student in ‘Course A’.  Individual conversation created between teacher and specific student . Student can view but not reply. Multiple followup replies are allowed for teacher.
*A Student can send “Message” to a Teacher. But not to other students. Single user message.
* Student posts a message to a specific teacher in ‘Course A’. Individual conversation created between teacher and student. Multiple followup replies are allowed.
*Teacher A leaves, Teacher B needs to close a Dialogue that posts to all Students.
* Teacher A leaves, Teacher B needs to manage all conversations to allow followup replies, close and delete.
*A specific Student (eg Class Rep with specified role) can send a “Message” to all students. Ongoing conversation allowed.  
* Specific Student (eg Class Rep with own role) posts a message to all students in ‘Course A’.  Individual conversation created between Class Rep and each student.  Multiple followup replies are allowed.
*A Student can send a “Message” to a specific students (eg Class Rep with specified role). Ongoing conversation allowed.
* Specific Student (eg Class Rep with own role) posts a message to a specific student in ‘Course A’. Individual conversation created between Class Rep and specific student.  Multiple followup replies are allowed.
*All Teachers can view and participate in any existing conversation in a shared teaching situation.
* Specific Student posts a message into a specific role (eg Class Rep role). Individual conversation created between specific student and Class Rep.  Multiple followup replies are allowed.
* All Teachers can view and participate in any existing conversation in a shared teaching situation.
 
=== Design goals ===
=== Design goals ===
# Retain existing functionality.
# Retain existing functionality.
Line 35: Line 40:
|-
|-
| Dialogue
| Dialogue
| An instance of an dialogue activity module.  
| An instance of a dialogue activity module.  
|-
|-
| Conversation
| Conversation
| An instance of communication between to two users within a dialogue. Follow vertical linear pattern.
| An instance of communication between two users within a dialogue activity. Follow vertical linear pattern.
|-
|-
| Reply
| Reply
Line 55: Line 60:
=== Dialogue new ===
=== Dialogue new ===
==== Recipient picker ====
==== Recipient picker ====
Advanced features, Ajax recipient picker, must be able to handle both single and multiple recipient selection.
'''Basic features'''
Use a standard drop down for single recipient selection.
 
[[Image:DRAFT dialogue2.0 mockup-recipentpicker.png]]
 
Multiple user selection
 
[[Image:DRAFT dialogue2.0 mockup-standardmultirecipentpicker.png | sample | 600px]]
 
Use standard multiple user selection interface as found in enrol users, groups e.t.c
 
'''Advanced features'''
Ajax recipient picker, must be able to handle both single and multiple recipient selection.
 
[[Image: DRAFT_dialogue2.0_mockup-ajaxrecipentpicker.png | sample | 300px ]]
[[Image: DRAFT_dialogue2.0_mockup-ajaxrecipentpicker.png | sample | 300px ]]


Line 63: Line 81:


=== Auto open multiple ===
=== Auto open multiple ===
If a user has the capability mod/dialogue:autoopenmultiple with permission set to allow, they can open a automated dialogue that will contain the same subject, body, attachment(s) with:
If a user has the capability mod/dialogue:autoopenmultiple with permission set to allow, they can open a automated conversation that will contain the same subject, body, attachment(s) with:
* "All Participants" -> All course members
* "All Participants" -> All course members
Any newly enrolled users will receive dialogue.  
Any newly enrolled users will receive dialogue.  
If in group mode
If in group mode
* "A Group" -> All members in that group.
* "A Group" -> All members in that group.
Line 72: Line 91:




'''Note:''' New capability mod/dialogue:receive will also determine what roles (student, teacher e.t.c) a user can open a dialogue with.  
<p class="note">'''Note:''' New capability mod/dialogue:receive will also determine what roles (student, teacher e.t.c) a user can open a dialogue with.</p>




This information will be stored to a new table '''mdl_dialogue_automated''' this will allow user to delete dialogue at anytime if they want to stop opening dialogues  with newly enrolled users or group members. Depending of time, could also add a date range option to control opening.
This information will be stored to a new table '''mdl_dialogue_automated''' this will allow user to delete conversation at anytime if they want to stop opening conversations with newly enrolled users or group members. Depending on time, could also add a date range option to control opening.


=== Group support ===
=== Group support ===
==== Visible groups mode ====
==== Visible groups mode ====
User can open a dialogue with any person in any visible group.
User will see all groups listed in the recipient picker.  User can open a conversation with any user or group of users.
 
==== Separate groups mode ====
==== Separate groups mode ====
User can open a dialogue with any person in a group they are a member of unless has capability moodle/site:accessallgroups with permission allow.
User will see groups they are a member of listed in the recipient picker.  User can open a conversation with any user in a group they are a member of.


User with capability moodle/site:accessallgroups with permission allow will see all groups listed in the recipient picker and can open a conversation with any user regardless of group membership.


'''Note:''' New capability mod/dialogue:receive will also determine what roles (student, teacher e.t.c) a user can open a dialogue with.
 
<p class="note">'''Note:''' New capability mod/dialogue:receive will also determine what roles (student, teacher e.t.c) a user can open a conversation with.</p>


=== File attachments ===
=== File attachments ===
Line 95: Line 117:


==== Dialogue module instance options ====
==== Dialogue module instance options ====
Follow options can be configured when creating a new dialogue module instance or updating/editing a dialogue module instance.
The following options can be configured when creating a new dialogue module instance or updating/editing a dialogue module instance.
*Enable notifications
*Enable notifications
:Allow notifications, passed on to Messaging API.
:Allow notifications, passed on to Messaging API.
*Include post content in notification
*Include post content in notification
:If enabled will include post content and link to specific dialogue conversation else will new post type message and link to specific dialogue conversation.
:If enabled notification will include post content and a link to specific dialogue conversation.  If not enabled notification will include post title and a link to specific dialogue conversation.


=== Event API ===
=== Event API ===
Line 115: Line 137:
:Can use for dialogue unread count, filters(All, Unread, Read e.t.c) providing direct linking.
:Can use for dialogue unread count, filters(All, Unread, Read e.t.c) providing direct linking.
'''dialogue_extend_settings_navigation(settings_navigation $settingsnav, navigation_node $dialoguenode)'''
'''dialogue_extend_settings_navigation(settings_navigation $settingsnav, navigation_node $dialoguenode)'''
:Can use for showing automated multiple open dialogue???
:Can use for showing automated open conversations


=== Logging ===
=== Logging ===
Line 121: Line 143:
* open
* open
* view
* view
* viewall - index
* reply
* reply
* edit
* edit
Line 127: Line 150:


=== Database structures ===
=== Database structures ===
[[Image:DRAFT_dialogue2.0_schema.png | sample | 600px ]]
[[Image:dialogue2.0_schema.png | sample | 600px ]]
==== dialogue ====
==== dialogue ====
{| class="nicetable"
{| class="nicetable"
Line 146: Line 169:
| int (10)
| int (10)
| 0
| 0
| the course id this dialogue
| the course id of this dialogue
|
|
|-
|-
Line 152: Line 175:
| text (medium)
| text (medium)
|  
|  
| the description/assignment of the workshop
| the description/assignment of the dialogue
|
|
|-
|-
Line 242: Line 265:
|
|
|-
|-
| text
| message
| text (medium)
| text (medium)
| ''
| ''
Line 267: Line 290:
|-
|-
| sent
| sent
| int (2)
| int (10)
| 0
| 0
| flag to indicate if message has been sent to recipient
| flag to indicate if message has been sent to recipient, date sent
|
|
|-
|-
| closed
| closed
| int (2)
| int (10)
| 0
| 0
| flag to indicate if conversation has been closed
| flag to indicate if conversation has been closed, date closed
|
|
|-
|-
| deleted
| deleted
| int (2)
| int (10)
| 0
| 0
| flag to indicate conversation as deleted
| flag to indicate conversation as deleted
| '''???''' Unsure
| Keep, retrieve only conversations not marked as deleted? date deleted
|-
|-
| timemodified
| timemodified
Line 316: Line 339:
| 0
| 0
| the previous reply if exists, else if 0 directly follows conversation
| the previous reply if exists, else if 0 directly follows conversation
| '''???''' unsure
|  
|-
|-
| ownerid
| ownerid
Line 324: Line 347:
|  
|  
|-
|-
| text
| message
| text (medium)
| text (medium)
| ''
| ''
Line 373: Line 396:
| int (10)
| int (10)
| 0
| 0
| user if of person who viewed conversation or reply
| user id of person who viewed conversation or reply
|
|
|-
|-
Line 452: Line 475:
| serialised array or object
| serialised array or object
|-
|-
| text
| message
| text (medium)
| text (medium)
| ''
| ''
Line 468: Line 491:
| 0
| 0
| the datetime start range, users enrolled after will receive
| the datetime start range, users enrolled after will receive
| '''???''' may be later implemented
| later implementation
|-
|-
| timeend
| timeend
Line 474: Line 497:
| 0
| 0
| the datetime end range, users enrolled before will receive
| the datetime end range, users enrolled before will receive
| '''???''' may be later implemented
| later implementation
|-
|-
| timemodified
| timemodified
Line 553: Line 576:


=== Backup and Restore ===
=== Backup and Restore ===
Create backup and restore functions under 2.0
'''1.9x'''
Restoring a 1.9x backup into a 2.0 Moodle? TO-DO
=== Upgrade Process ===
=== Upgrade Process ===
Will need to map existing table structure to new table structure once finalised.
Will need to map existing table structure to new table structure once finalised.
Line 563: Line 591:
* it Italiano Italian
* it Italiano Italian


[[Category:Contributed code]]
== Project schedule ==
=== Milestone 1 ===
Date: 08/10/2010
 
Goal: The specification is reviewed and agreed on by the community. The implementation plan is transferred into sub-tasks in the tracker

Revision as of 06:50, 10 June 2011

This page tracks and summarises the progress of rewrite of the Dialogue module for Moodle 2.0. Moodle 2.0


Dialogue 2.0 specification
Status Draft
Tracker CONTRIB-2059
Discussion Review and comments

Introduction

The Dialogue module allows students or teachers to start a two-way conversation with another person. The Dialogue is a course activity that can be useful when the teacher wants a place to give private feedback to a student on their online activity. For example, if a student is participating in a language forum and made a grammatical error that the teacher wants to point out without embarrassing the student, a dialogue is the perfect place. A dialogue activity would also be an excellent way for counselors within an institution to interact with students - all activities are logged and email is available but not necessarily required. The Dialogue is also a useful alternative to email or private Messages as the conversations are located within a course. The Dialogue module can be backed up with other course activities.

Usage scenarios

  • Teacher posts the same message to all students in ‘Course A’, future enrolled students also receive the same message. Individual conversation created between teacher and each student. Multiple replies are allowed.
  • Teacher posts the same message to all members of ‘Group A’, future group members also receive the same message. Individual conversation created between teacher and each user (any role) in ‘Group A’. Multiple replies are allowed.
  • Teacher posts the same message to specific students in ‘Course A’. Individual conversation created between teacher and each student. Multiple replies are allowed.
  • Teacher posts a message to a specific student in ‘Course A’. Individual conversation created between teacher and specific student . Student can view but not reply. Multiple followup replies are allowed for teacher.
  • Student posts a message to a specific teacher in ‘Course A’. Individual conversation created between teacher and student. Multiple followup replies are allowed.
  • Teacher A leaves, Teacher B needs to manage all conversations to allow followup replies, close and delete.
  • Specific Student (eg Class Rep with own role) posts a message to all students in ‘Course A’. Individual conversation created between Class Rep and each student. Multiple followup replies are allowed.
  • Specific Student (eg Class Rep with own role) posts a message to a specific student in ‘Course A’. Individual conversation created between Class Rep and specific student. Multiple followup replies are allowed.
  • Specific Student posts a message into a specific role (eg Class Rep role). Individual conversation created between specific student and Class Rep. Multiple followup replies are allowed.
  • All Teachers can view and participate in any existing conversation in a shared teaching situation.

Design goals

  1. Retain existing functionality.
  2. Enhance usage scenarios, flexibility and control.
  3. Enhance user interface.

Glossary

Term Definition
Dialogue An instance of a dialogue activity module.
Conversation An instance of communication between two users within a dialogue activity. Follow vertical linear pattern.
Reply A message posted in reply to conversational text.

User interface mock-ups

Dialogue listing

sample

Dialogue view

sample

sample

Dialogue new

Recipient picker

Basic features Use a standard drop down for single recipient selection.

DRAFT dialogue2.0 mockup-recipentpicker.png

Multiple user selection

sample

Use standard multiple user selection interface as found in enrol users, groups e.t.c

Advanced features Ajax recipient picker, must be able to handle both single and multiple recipient selection.

sample

Implementation plan

Multiple dialogue open

If user has capability mod/dialogue:openmultiple with permission set to allow, they can select multiple users to open a conversation with that will contain the same subject, body, attachment(s).

Auto open multiple

If a user has the capability mod/dialogue:autoopenmultiple with permission set to allow, they can open a automated conversation that will contain the same subject, body, attachment(s) with:

  • "All Participants" -> All course members

Any newly enrolled users will receive dialogue.

If in group mode

  • "A Group" -> All members in that group.
  • "Multiple Groups" -> e.g Group A, Group C will open with any member of a selected group.

Any new group member will receive dialogue.


Note: New capability mod/dialogue:receive will also determine what roles (student, teacher e.t.c) a user can open a dialogue with.


This information will be stored to a new table mdl_dialogue_automated this will allow user to delete conversation at anytime if they want to stop opening conversations with newly enrolled users or group members. Depending on time, could also add a date range option to control opening.

Group support

Visible groups mode

User will see all groups listed in the recipient picker. User can open a conversation with any user or group of users.

Separate groups mode

User will see groups they are a member of listed in the recipient picker. User can open a conversation with any user in a group they are a member of.

User with capability moodle/site:accessallgroups with permission allow will see all groups listed in the recipient picker and can open a conversation with any user regardless of group membership.


Note: New capability mod/dialogue:receive will also determine what roles (student, teacher e.t.c) a user can open a conversation with.

File attachments

File API

Use filemanager element in the formslib to get one or more file from user for each post, file(s) stored permanently for future viewing.

Notifications

Messaging API

Setup messageprovider for routing notifications.

Dialogue module instance options

The following options can be configured when creating a new dialogue module instance or updating/editing a dialogue module instance.

  • Enable notifications
Allow notifications, passed on to Messaging API.
  • Include post content in notification
If enabled notification will include post content and a link to specific dialogue conversation. If not enabled notification will include post title and a link to specific dialogue conversation.

Event API

user_enrolled()

Can be used for any automated opening of dialogues for new course participants when all participants were selected in a multi-open dialogue.

groups_member_added()

Can be used for any automated opening of dialogues for new group members when group(s) were elected in a multi-open dialogue.

user_unenrolled()

Cleanup function, delete any dialogues that user is a recipient.

Navigation functions

dialogue_extend_navigation($navref, $course, $module, $cm)

Can use for dialogue unread count, filters(All, Unread, Read e.t.c) providing direct linking.

dialogue_extend_settings_navigation(settings_navigation $settingsnav, navigation_node $dialoguenode)

Can use for showing automated open conversations

Logging

Dialogue events that will be logged.

  • open
  • view
  • viewall - index
  • reply
  • edit
  • close
  • delete

Database structures

sample

dialogue

Field Type Default Description Notes
id int (10) auto-numbered
course int (10) 0 the course id of this dialogue
intro text (medium) the description/assignment of the dialogue
introformat int (3) 0 the format of the intro field
timemodified int (10) 0 the timestamp when the module was modified
edittime int (10) 0
maxattachments int (3) 1 number of attachments
maxbytes int (10) 100000 maximum size of the one attached file
notifications int (2) 1 allow post notifications, will use MessagingAPI
notificationcontent int (2) 0 include post content in notification

dialogue_conversations

Field Type Default Description Notes
id int (10) auto-numbered
course int (10) 0 the course id this dialogue
dialogueid int (10) 0 the dialogue instance id
subject varchar (255) brief summary of message
ownerid int (10) 0 user id of person who started conversation
recipientid int (10) 0 user id of person who is to receive conversation
message text (medium) message text
format int (3) 0 the format type of message
attachment int (2) 0 if post contains attachment(s)
lastreply int (2) 0 reply id of last post in the conversation
sent int (10) 0 flag to indicate if message has been sent to recipient, date sent
closed int (10) 0 flag to indicate if conversation has been closed, date closed
deleted int (10) 0 flag to indicate conversation as deleted Keep, retrieve only conversations not marked as deleted? date deleted
timemodified int (10) 0 the timestamp when the module was modified

dialogue_replies

Field Type Default Description Notes
id int (10) auto-numbered
conversationid int (10) 0 the conversation id that reply relates to.
parentid int (10) 0 the previous reply if exists, else if 0 directly follows conversation
ownerid int (10) 0 user id of person who posted reply
message text (medium) message text
format int (3) 0 the format type of message
attachment int (2) 0 if post contains attachment(s)
sent int (2) 0 flag to indicate if message has been sent to recipient
timemodified int (10) 0 the timestamp when the module was modified

dialogue_read

Field Type Default Description Notes
id int (10) auto-numbered
userid int (10) 0 user id of person who viewed conversation or reply
dialogueid int (10) 0 the dialogue id that the conversation relates to.
conversationid int (10) 0 the conversation id that reply relates to
replyid int (10) 0 the reply id, can be 0 if user has just viewed start of conversation
firstread int (10) 0 datetime first read
lastread int (10) 0 datetime last read

dialogue_automated

Field Type Default Description Notes
id int (10) auto-numbered
course int (10) 0 the course id this dialogue
dialogueid int (10) 0 the dialogue instance id
subject varchar (255) brief summary of message
ownerid int (10) 0 user id of person who started conversation
recipients text (small) 0 indicators for "All participants" or selected groups serialised array or object
message text (medium) message text
format int (3) 0 the format type of message
timestart int (10) 0 the datetime start range, users enrolled after will receive later implementation
timeend int (10) 0 the datetime end range, users enrolled before will receive later implementation
timemodified int (10) 0 the timestamp when the module was modified

Capabilities and Permissions

Capability Description Role permissions(defaults) Notes
mod/dialogue:open Open a dialogue with single recipient teacher
mod/dialogue:receive Can receive a dialogue student Can be used to control what roles are displayed in the recipient picker
mod/dialogue:reply Can reply to a dialogue teacher, student
mod/dialogue:closeown Can close a dialogue if have ownership teacher, student
mod/dialogue:deleteown Can delete a dialogue if have ownership teacher, student
mod/dialogue:deleteownreply Can delete own reply teacher, student Add ability to delete last reply in dialogue thread. Maybe/Maybe not?
mod/dialogue:openmultiple Can start a dialogue with multiple recipients teacher For sending the same dialogue to multiple recipients. Used for targeting particular group(s) of users or whole class.
mod/dialogue:autoopenmultiple Can start a automated dialogue with course participants or group members which includes future members. teacher
mod/dialogue:viewany view any conversation, reply administrator
mod/dialogue:replyany can reply in any conversation to any reply administrator
mod/dialogue:closeany can close any conversation administrator
mod/dialogue:deleteany can delete any conversation administrator

Backup and Restore

Create backup and restore functions under 2.0

1.9x Restoring a 1.9x backup into a 2.0 Moodle? TO-DO

Upgrade Process

Will need to map existing table structure to new table structure once finalised.

Translations

Current 1.9x translations

  • en English
  • de Deutsch German
  • es Español Spanish
  • it Italiano Italian

Project schedule

Milestone 1

Date: 08/10/2010

Goal: The specification is reviewed and agreed on by the community. The implementation plan is transferred into sub-tasks in the tracker