Skip to content

Conversation

@jonmcalder
Copy link

This closes issue #561.

The 'Hint' value for questions in lesson.yaml can now be (optionally) populated with a string of hints separated by semi-colons. Each time a question is answered incorrectly one of these hints will be sampled and presented. This update will not affect behavior for questions with only one hint.

…ple hints. If multiple hints are provided, they should be separated by a ";". This closes issue swirldev#561.
@elinw
Copy link

elinw commented Nov 13, 2016

That's really great, I feel like I'm writing a book with some of the hints since there are so many possible ways to go wrong.

@stevenhobbs
Copy link

Thanks for sharing this approach! I'm trying unsuccessfully to set this up. All hints are shown simultaneously even when separated by semicolons in the yaml file. The code written by @jonmcalder is a little beyond me. I tried including it in my initLesson.R file thinking it would add the functionality I seek, but to no avail. Can anyone (@jonmcalder or @elinw) provide more guidance? Thanks!

@jonmcalder
Copy link
Author

Hi @stevenhobbs! This was a long time ago and I had completely forgotten about it 🤣

I verified that the above does work when incorporated into {swirl}, and the approach seems simple and reasonable enough (to me at least). Though maybe the randomisation of which hint gets shown (when) still leaves a lot to be desired...

However I can't think of any reasonable way this functionality could be added to a lesson without any changes to {swirl} itself. I think {swirl} already has to do some pretty funky stuff snapshotting user environments etc in order to function the way it does, so I wouldn't even want to try and speculate on how one could possibly inject custom code or response behaviour into the {swirl} evaluation environment via the lesson content itself.

@seankross if you see this maybe you could chime in here? Was this PR ever considered? Was it overlooked for any particular reasons? Could it be feasible in it's current form or something similar?

@stevenhobbs
Copy link

Thank you for the reply @jonmcalder! I noticed this was a while ago and figured it was a long shot, so I appreciate your re-engagement. I didn't realize the code would be incorporated into swirl directly instead of into a course's initLesson.R file, but I suppose this makes sense. I'm guessing I'm not skilled enough to go into the swirl code and add this though and I'm unclear how this functionality would get into my student's installation of swirl. I think I have a dangerous level of competency, just enough to tinker around and probably wreak havoc. :)

@seankross
Copy link
Member

Hi all,

The main impediment to incorporating features like this into swirl is that there is currently no way to test swirl's interactive features. If this were possible, then we could test features like this across existing courses to track breaking changes. Unfortunately building out an interactive testing system is not going to get toward the top of my priority list any time soon. I sincerely appreciate the interest and enthusiasm but right now the scope of my focus for swirl is keeping it running for the greatest number of learners possible.

Sean

@stevenhobbs
Copy link

You're very welcome and thank you so much for the reply!

@jonmcalder
Copy link
Author

jonmcalder commented Jun 10, 2020

Thanks @seankross! Makes sense and I had wondered if that (testing for breaking changes) may be the issue.

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 this pull request may close these issues.

4 participants