RunestoneComponents icon indicating copy to clipboard operation
RunestoneComponents copied to clipboard

:selectquestion directive does not load if you are not logged in

Open bhoffman0 opened this issue 4 years ago • 12 comments

The :selectquestion directive for a parsons/active code toggle problem does not seem to load if you are not logged in (it gives some javascript errors below), but it does load with no errors if you are logged in.

What Course are you in py4e

What Page were you on https://runestone.academy/runestone/books/published/py4e-int/functions/mixedupcode.html

Describe the bug image

bhoffman0 avatar Jun 28 '21 20:06 bhoffman0

Correct! I just discovered that myself last week.

The question is what should we do? I guess we can select a question, but not save that we selected that one for you. So much of select question relies on the database to remember state for you.

bnmnetp avatar Jun 28 '21 20:06 bnmnetp

I think just selecting the first one would be fine.

bhoffman0 avatar Jun 28 '21 20:06 bhoffman0

Also, :selectquestion does not preview in the Assignment or Grading previews: image

bhoffman0 avatar Jul 18 '21 17:07 bhoffman0

It's really hard to do a preview because the question is not in the database yet. I'm not sure if a preview is worth it for all of the special case code / complexity that would be added to support a preview.

bnmnetp avatar Jul 18 '21 17:07 bnmnetp

Could you show the rst text for it so that teachers know which question divids it is using and can go look at those? Barb wants to add selectquestion toggle to the parsons probs in CSAwesome, so I just want to make sure it works before switching all the parsons problems to that.

bhoffman0 avatar Jul 18 '21 17:07 bhoffman0

I'll look at it tomorrow and see what can be done. So many priorities. I didn't realize you all were going to be going all in on this new feature.

bnmnetp avatar Jul 18 '21 21:07 bnmnetp

It's not a huge priority. We can wait if it's not ready for primetime yet.

bhoffman0 avatar Jul 18 '21 22:07 bhoffman0

I can understand why people would want to see something for a preview its just not something we ever considered. The whole mindset -- originally -- for the selectquestions was to use them in exams that were written as rst files, not in the web editor.

The other assumption was that they were for students who were logged in and that all of the required information was in the database.

Its awesome that this new directive has inspired these new ideas! It is just going to take some time for us to get there for other use cases.

Thanks for your patience!

bnmnetp avatar Jul 18 '21 22:07 bnmnetp

A little more work, but the preview in the assignmnet builder now looks like this:

Screen Shot 2021-07-21 at 9 46 13 AM

bnmnetp avatar Jul 21 '21 14:07 bnmnetp

Nice! Thank you!

bhoffman0 avatar Jul 21 '21 15:07 bhoffman0

It seems like the selectquestion component doesn't work on the csawesome server but it does on the runestone server? image

bhoffman0 avatar Jul 22 '21 18:07 bhoffman0

csawesome was a few updates behind academy. I have updated csawesome as of this afternoon.

bnmnetp avatar Jul 22 '21 21:07 bnmnetp