Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding a markdown class #48

Open
krcarriere opened this issue Jun 9, 2024 · 0 comments
Open

Adding a markdown class #48

krcarriere opened this issue Jun 9, 2024 · 0 comments

Comments

@krcarriere
Copy link

You can load Markdowns via class: script, but I don't think swirlify also includes a way to 'test' for a correct Markdown answer.

It's a very obscure feature, but in PSYCH, we have these Notes scripts that load for the student for them to simply save and then submit. It's fine for what it is, but it would be so much better organized if the notes could be provided as a Markdown, and swirlify would let the student pass through without truly evaluating the Markdown.

My limited testing suggests that even creating a very basic way to pass a custom test (create a test that just asks itself if 1+1==2),

pass_notes <- function() {
    (1+1==2)
}

- Class: script
  Output: To save the notes for this module, copy and paste the code provided into your own RNotebook. Type submit() when you have finished saving these notes. 
  AnswerTests: pass_notes()
  Hint: "Don't change anything, just type submit(). If you did and you don't know how to fix it, just type skip(), and you'll be all set."
  Script: Notes.Rmd

The script class will still want to check for specific things related to the script class. It passes the user's submission, to be sure, but it throws an error message along the way:

Error in source(e$script_temp_path, encoding = "UTF-8") :
attempt to use zero-length variable name

Which isn't ideal. Maybe I'm not thinking this through or making a simple mistake.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant