Skip to content

Commit

Permalink
Export good_quiz_path()
Browse files Browse the repository at this point in the history
  • Loading branch information
cansavvy committed Jul 1, 2024
1 parent 8244b8f commit 6484c23
Showing 1 changed file with 28 additions and 22 deletions.
50 changes: 28 additions & 22 deletions R/data.R
Original file line number Diff line number Diff line change
Expand Up @@ -47,55 +47,61 @@ download_ottr_template <- function(dir = "inst/extdata", type = "rmd") {
return(output_dir)
}

#' Get file path to an key encryption RDS
key_encrypt_creds_path <- function() {

#' Path to good example quiz
#'
#' @export
#' @return The file path to an example good quiz included in the package that should pass the quiz checks.
#'
good_quiz_path <- function() {
list.files(
pattern = "encrypt_pass.rds",
pattern = "quiz_good.md$",
recursive = TRUE,
system.file("extdata", package = "ottrpal"),
full.names = TRUE
)
}
#' Get file path to an encrypted credentials RDS
encrypt_creds_path <- function() {

#' Path to bad example quiz
#'
#' @export
#' @return The file path to an example bad quiz included in the package that will fail the quiz checks.
#'
#' @examples
#'
#' quiz_path <- bad_quiz_path()
bad_quiz_path <- function() {
list.files(
pattern = "encrypt.rds",
pattern = "quiz_bad.md$",
recursive = TRUE,
system.file("extdata", package = "ottrpal"),
full.names = TRUE
)
}

#' Get file path to an default credentials RDS
encrypt_creds_user_path <- function() {
#' Get file path to an key encryption RDS
key_encrypt_creds_path <- function() {
list.files(
pattern = "encrypted_default_user_creds.rds",
pattern = "encrypt_pass.rds",
recursive = TRUE,
system.file("extdata", package = "ottrpal"),
full.names = TRUE
)
}

good_quiz_path <- function() {
#' Get file path to an encrypted credentials RDS
encrypt_creds_path <- function() {
list.files(
pattern = "quiz_good.md$",
pattern = "encrypt.rds",
recursive = TRUE,
system.file("extdata", package = "ottrpal"),
full.names = TRUE
)
}

#' Path to bad example quiz
#'
#' @export
#' @return The file path to an example bad quiz included in the package that will fail the quiz checks.
#'
#' @examples
#'
#' quiz_path <- bad_quiz_path()
bad_quiz_path <- function() {
#' Get file path to an default credentials RDS
encrypt_creds_user_path <- function() {
list.files(
pattern = "quiz_bad.md$",
pattern = "encrypted_default_user_creds.rds",
recursive = TRUE,
system.file("extdata", package = "ottrpal"),
full.names = TRUE
Expand Down

0 comments on commit 6484c23

Please sign in to comment.