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
Line 357: Line 357:
| userid
| userid
| int (10)
| int (10)
| 0
|  
|  
| 0
|
|
|-
|-
| dialogueid
| dialogueid
| int (10)
| int (10)
| 0
|  
|  
| 0
|
|
|-
|-
| conversationid
| conversationid
| int (10)
| int (10)
| 0
|  
|  
| 0
|
|
|-
|-
| replyid
| replyid
| int (10)
| int (10)
| 0
|  
|  
| 0
|
|
|-
|-
| firstread
| firstread
| int (10)
| int (10)
| 0
|  
|  
| 0
|
|
|-
|-
| lastread
| lastread
| int (10)
| int (10)
| 0
|  
|  
| 0
|
|
|}
|}

Revision as of 22:25, 12 September 2010

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

Introduction

The Dialogue module allows students or teachers to start two-way dialogues 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.

Usage scenarios

  • Teacher sends same course welcome message to all students in “Course A” including future students. Not other roles. Multiple messages.
  • Teacher sends same group welcome message to all members of “Group A” including future members. All roles in “Group A”. Multiple messages.
  • Teacher sends same message to some students. Multiple messages.
  • A Teacher can send “Message” to a student. Student can view but not respond. Single user message.
  • A Student can send “Message” to a Teacher. But not to other students. Single user message.
  • Teacher A leaves, Teacher B needs to close a Dialogue that posts to all Students.
  • A specific Student (eg Class Rep with specified role) can send a “Message” to all students. Ongoing conversation allowed.
  • A Student can send a “Message” to a specific students (eg Class Rep with specified role). Ongoing conversation 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
Conversation

User interface mock-ups

Dialogue listing

Dialogue view

Dialogue new

Recipient picker

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 dialogue 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 dialogue 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 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.

Group support

Visible groups mode

User can open a dialogue with any person in any visible group.

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.


Note: New capability mod/dialogue:receive will also determine what roles (student, teacher e.t.c) a user can open a dialogue 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

Follow 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 will include post content and link to specific dialogue conversation else will new post type message and 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 multiple open dialogue???

Logging

Dialogue events that will be logged.

  • open
  • view
  • reply
  • edit
  • close
  • delete

Database structures

File:DRAFT dialogue2.0 schema.png

dialogue

Field Type Default Description Notes
id int (10) auto-numbered
course int (10) 0 the course id this dialogue
intro text (medium) the description/assignment of the workshop
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
notificationcontent int (2) 0

dialogue_conversations

Field Type Default Description Notes
id int (10) auto-numbered
course int (10) 0
dialogueid int (10) 0
subject varchar (255)
ownerid int (10) 0
recipientid int (10) 0
text text (medium)
format int (3) 0
attachment int (2) 0
lastreply int (2) 0
sent int (2) 0
closed int (2) 0
deleted int (2) 0
timemodified int (10) 0

dialogue_replies

Field Type Default Description Notes
id int (10) auto-numbered
conversationid int (10) 0
parentid int (10) 0
ownerid int (10) 0
text text (medium)
format int (3) 0
attachment int (2) 0
sent int (2) 0
timemodified int (10) 0

dialogue_read

Field Type Default Description Notes
id int (10) auto-numbered
userid int (10) 0
dialogueid int (10) 0
conversationid int (10) 0
replyid int (10) 0
firstread int (10) 0
lastread int (10) 0

dialogue_automated

Field Type Default Description Notes
id int (10) auto-numbered
course int (10) 0
dialogueid int (10) 0
subject varchar (255)
ownerid int (10) 0
recipients text (small) 0
text text (medium)
format int (3) 0
timestart int (10) 0
timeend int (10) 0
timemodified int (10) 0

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 TO-DO administrator, manager
mod/dialogue:replyany TO-DO administrator, manager
mod/dialogue:closeany TO-DO administrator, manager
mod/dialogue:deleteany TO-DO administrator, manager

Backup and Restore

Upgrade Process

Translations

Current 1.9x translations

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