Skip to content

Adding a markdown class  #48

@krcarriere

Description

@krcarriere

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions