Skip to contents

Create a new material

Usage

create_material(
  course_id = NULL,
  topic_id = NULL,
  publish = FALSE,
  title = NULL,
  description = NULL,
  link = NULL,
  load_url = TRUE
)

Arguments

course_id

Course id of where to make the new materials. Can find from end of URL e.g. "https://classroom.google.com/c/COURSE_ID_IS_HERE"

topic_id

topic ID to be looked for.

publish

TRUE/FALSE, automatically publish the coursework upon posting? Default is to be posted as a draft (students will not see it until you click Post).

title

Name of new material

description

A description for the new material

link

A URL to go with the associated material

load_url

Load URL into an HTML Browser

Value

List of metadata of newly created material.

Examples

if (FALSE) {
course_id <- get_course_list()$courses$id[3]
topic_id <- get_topic_list(course_id)$topic$topicId[1]

create_material(course_id, topic_id, title = "new material")
}