View source: R/create_conversation.R
create_conversation | R Documentation |
Canvas allows for an e-mail like communication with students, called 'conversations', which can be handled from the API.
create_conversation(
canvas,
recipients = NULL,
subject = " ",
body = " ",
force_new = TRUE,
group_conversation = FALSE,
attachments = NULL,
attachment_ids = NULL,
media_comment_id = NULL,
media_comment_type = NULL,
mode = "sync",
scope = NULL,
filter = NULL,
filter_mode = NULL,
context_code = NULL
)
canvas |
An object containing the Canvas API key and base URL, |
recipients |
An array of recipient ids. |
subject |
The subject of the conversation. Maximum length is 255 characters. |
body |
The message to be sent. Unfortunately, Canvas only allows for plain text. |
force_new |
logical. Forces a new message to be created, even if there is an existing private conversation. |
group_conversation |
logical. Defaults to |
attachments |
An array of paths to local files that should be uploaded. |
attachment_ids |
An array of attachments ids. These must be files that have been previously uploaded to the sender's 'conversation attachments' folder. |
media_comment_id |
Media comment id of an audio or video file to be associated with this message. |
media_comment_type |
Type of the associated media file, values allowed are |
mode |
Determines whether the messages will be created/sent synchronously or
asynchronously. Defaults to |
scope |
Used when generating 'visible' in the API response, values allowed are |
filter |
Used when generating 'visible' in the API response. |
filter_mode |
Used when generating 'visible' in the API response, values allowed are |
context_code |
The course or group that is the context for this conversation. Same format as courses or groups in the recipients argument. |
Note that the user should have rights to access the folder.
A confirmation message indicating that the message has been successfully send.
get_single_conversation()
and get_conversations()
.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.