Skip to contents

This fuction will extract the resources that exist and are listed in the config file.

Usage

get_dropdown(path = ".", folder, trim = TRUE)

get_episodes(path = ".", trim = TRUE)

get_learners(path = ".", trim = TRUE)

get_instructors(path = ".", trim = TRUE)

get_profiles(path = ".", trim = TRUE)

Arguments

path

the path to the lesson, defaults to the current working directory

folder

the folder to extract fromt he dropdown menues

trim

if TRUE (default), only the file name will be presented. When FALSE, the full path will be prepended.

Value

a character vector of episodes in order of presentation

Examples

tmp <- tempfile()
create_lesson(tmp, open = FALSE, rmd = FALSE)
#> → Creating Lesson in /tmp/RtmpQSXDNq/file17064e4661ed...
#>  No schedule set, using Rmd files in episodes/ directory.
#> → Creating Lesson in /tmp/RtmpQSXDNq/file17064e4661ed...

#> To remove this message, define your schedule in config.yaml or use `set_episodes()` to generate it.
#> → Creating Lesson in /tmp/RtmpQSXDNq/file17064e4661ed...

#> ────────────────────────────────────────────────────────────────────────
#> → Creating Lesson in /tmp/RtmpQSXDNq/file17064e4661ed...

#>  To save this configuration, use
#> 
#> set_episodes(path = path, order = ep, write = TRUE)
#> → Creating Lesson in /tmp/RtmpQSXDNq/file17064e4661ed...

#>  Edit /tmp/RtmpQSXDNq/file17064e4661ed/episodes/introduction.md.
#> → Creating Lesson in /tmp/RtmpQSXDNq/file17064e4661ed...

#>  First episode created in /tmp/RtmpQSXDNq/file17064e4661ed/episodes/introduction.md
#> → Creating Lesson in /tmp/RtmpQSXDNq/file17064e4661ed...

#>  Workflows up-to-date!
#> → Creating Lesson in /tmp/RtmpQSXDNq/file17064e4661ed...

#>  Lesson successfully created in /tmp/RtmpQSXDNq/file17064e4661ed
#> → Creating Lesson in /tmp/RtmpQSXDNq/file17064e4661ed...

#> /tmp/RtmpQSXDNq/file17064e4661ed
get_episodes(tmp)
#> [1] "introduction.md"
get_learners(tmp) # information for learners
#> [1] "reference.md" "setup.md"