get_announcements: Get announcements for a course

View source: R/announcements.R

get_announcementsR Documentation

Get announcements for a course

Description

We transform the course id from a numeric (e.g. 123) to a context id (e.g. course_123).

Usage

get_announcements(
  course_id,
  start_date = NULL,
  end_date = NULL,
  active_only = FALSE
)

Arguments

course_id

numeric course id

start_date

Only return announcements posted since the start_date (inclusive). Defaults to 14 days ago. The value should be formatted as: yyyy-mm-dd or ISO 8601 YYYY-MM-DDTHH:MM:SSZ.

end_date

Only return announcements posted before the end_date (inclusive). Defaults to 28 days from start_date. The value should be formatted as: yyyy-mm-dd or ISO 8601 YYYY-MM-DDTHH:MM:SSZ. Announcements scheduled for future posting will only be returned to course administrators.

active_only

Only return active announcements that have been published. Applies only to requesting users that have permission to view unpublished items. Defaults to false for users with access to view unpublished items, otherwise true and unmodifiable.

Value

announcements for a given course

Examples

## Not run: get_announcements(course_id = 27)
## Not run: get_announcements(course_id = 27, start_date = "2017-02-01")

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