Errors while running learnr & grader on a shiny server but not when run as a document

I am trying to run a learnr tutorial with grader on my own shiny server. The "Submit Answer" function works when I run the document in an Rstudio session, but when I run it on the server, I get the error:

Error in get(name, envir = asNamespace(pkg), inherits = FALSE) : object 'check_result' not found

I'm not sure if this is relevant, but the server .log show this:

Warning in selectChildren(jobs, timeout) : cannot wait for child 1367 as it does not exist

Thank you!

The minimal .Rmd that reproduces the error for me is:

Sorry, this isn't formatting properly at all!

---
title: "grader_shiny_test"
output: 
  learnr::tutorial:
    progressive: true
    allow_skip: true
runtime: shiny_prerendered
---

```{r setup, include=FALSE}
library(learnr)
library(grader)
tutorial_options(exercise.checker = grade_learnr)
knitr::opts_chunk$set(echo = FALSE)
Modify the following code by deleting the second argument.

```{r ex2_2, exercise=TRUE}
round(1234.567, digits=2)
```{r ex2_2-solution}
round(1234.567)
```{r ex2_2-check}
grader:::check_result(
  results(
    result(1235, "good job", correct=TRUE)
  )
)
1 Like

This topic was automatically closed 54 days after the last reply. New replies are no longer allowed.