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 request: Run only selected lines of an exercise chunk #512

Closed
petzi53 opened this issue Apr 14, 2021 · 4 comments · Fixed by #514
Closed

Feature request: Run only selected lines of an exercise chunk #512

petzi53 opened this issue Apr 14, 2021 · 4 comments · Fixed by #514

Comments

@petzi53
Copy link

petzi53 commented Apr 14, 2021

Many times I have seen exercise chunks where a complex task is broken down into several steps. The code snippets consist of some prefilled parts and some parts with underscores to be substituted by the student's code. The following illustrating screenshot is taken from a lesson of the OpenIntro project.

task-with-several-steps

In those cases, where a task is broken down into several steps, it would be beneficial from an educational perspective when students could experiment and see if a part of their solution already works. At the moment, students have to cut those parts not ready for evaluation, try their solution, and then continue their work with pasting the code snippet from the clipboard to the exercise environment.

An alternative could be to provide students with an extra empty exercise chunk as a sandbox to try their experiments.

But the easiest solution would be to run just a part of the exercise chunk as possible in RStudio by selecting code lines.

I do not know if this feature request could be implemented (easily), but it would provide a great enhancement.

@gadenbuie
Copy link
Member

Thanks for the suggestion! Perfect timing, this also came up for me today and thankfully it was an easy feature to implement.

@markwsac
Copy link

Great. Would it also apply to "Submit Code" as well? I meant if it submits the whole code or selected code if code is selected.

@gadenbuie
Copy link
Member

No, Submit Code will send all of the code in the exercise editor. Submitting only part of the exercise for checking would very likely lead to significant confusion for the user and the tutorial author.

@petzi53
Copy link
Author

petzi53 commented Apr 16, 2021

@gadenbuie Thank you. That was a swift reaction and a happy coincidence!

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

Successfully merging a pull request may close this issue.

3 participants