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

[Feature]: Support testing code and displaying feedback for interactive coding exercises #161

Closed
joelostblom opened this issue Mar 1, 2024 · 2 comments
Labels
t: feature-request Request the addition of a new feature

Comments

@joelostblom
Copy link

Feature Description

I am interested in creating coding exercises as part of a text book and I'm trying to explore if quarto-webr can be used for this purpose. The criteria I have in mind are the following:

  • Inlined in the textbook as a single cell with a run button (this seems possible based on https://quarto-webr.thecoatlessprofessor.com/)
  • Can run some type of tests on the submitted code, whether that is a full autograder package like ottr or just hidden assert statements from a file
  • Can provide/display feedback based on what is wrong in the code (ie which test fails) and the correct solution

I'm imagining something like this:

image

That screenshot is from https://github.com/ines/course-starter-python which seems to not be actively maintained any longer, and I would prefer to use a more established framework such as Jupyter Book or Quarto together with something like quarto-webr or JupyterLite for the textbook.

To what extent is something like this currently achievable with quarto-webr (e.g. can I have tests run on the code each time a submit button is clicked?) and would this type of component be considered in scope for the project and likely to see development in the future or is it something that needs to happen more on the Quarto side of things?

@joelostblom joelostblom added the t: feature-request Request the addition of a new feature label Mar 1, 2024
@coatless
Copy link
Owner

coatless commented Mar 1, 2024

It's on deck: #121

We're looking to support a similar syntax to {learnr} to reduce the amount of porting required. So, we'll stack the hint/solution/et cetera on the code cell via labels.

This wouldn't be an upstream request in Quarto; just a modification of the custom compute cell introduced in quarto-webr.

@joelostblom
Copy link
Author

Awesome! Sorry I completely missed that issue when I went through the list. I will comment there instead and close this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
t: feature-request Request the addition of a new feature
Projects
None yet
Development

No branches or pull requests

2 participants