create_canvas_module_item: Create a module item

View source: R/uploads.R

create_canvas_module_itemR Documentation

Create a module item

Description

Create a module item

Usage

create_canvas_module_item(
  course_id,
  module_id,
  type,
  content_id = NULL,
  title = NULL,
  position = NULL,
  indent = NULL,
  page_url = NULL,
  external_url = NULL,
  new_tab = NULL
)

Arguments

course_id

a valid course id

module_id

a valid module id

type

string - type of module item (must be one of: File, Page, Discussion, Assignment, Quiz, SubHeader, ExternalUrl, ExternalTool)

content_id

integer - The id of the content to link to the module item. Required, except for ‘ExternalUrl’, ‘Page’, and ‘SubHeader’ types.

title

integer - The name of the module item and associated content

position

integer - The position of this item in the module

indent

integer - 0-based indent level; module items may be indented to show a hierarchy

page_url

string - Suffix for the linked wiki page (e.g. ‘front-page’). Required for ‘Page’ type.

external_url

string - External url that the item points to. (Required for ‘ExternalUrl’ and ‘ExternalTool’ types)

new_tab

boolean - Whether the external tool opens in a new tab. Only applies to ‘ExternalTool’ type.

Value

invisible

Examples

create_canvas_module_item(
  course_id = 432432,
  module_id = 1,
  type = "SubHeader",
  title = "Before Class")

daranzolin/rcanvas documentation built on May 18, 2024, 2:33 p.m.