RunestoneInteractive / rs

A New Monorepo structure for Runestone
Other
39 stars 67 forks source link

Set practice to true so that WW problems are available in the practice tool #258

Closed bnmnetp closed 1 year ago

bnmnetp commented 1 year ago

All WW problems are marked as being available for practice.

Long term it is better for authors to use the @practice attribute to set it to true if they want it available.

Tanaquil18 commented 1 year ago

Nice!

WeBWorK problem authors? I'm authoring a bunch of webwork problems now for Chapters 1-4, but they'll all be the source = address kind, not written in the PreTeXt source itself.

Tanaquil18 commented 1 year ago

The practice tool doesn't seem to be working for WeBWorK, for a course using safranski-acs. No matter what I change the settings to, when I use my student account to test it out, it says 2 more problems available to practice, 2 more problems needed, and after I complete a problem and I hit one of the bars about how confident I was, I get a "Runestone ticket issued" page. I hit back and it gives me a different practice problem, but then everything repeats.

I don't know if it's possible, but it'd be nice to vary the seeds of the webwork problems, so that even if it's the same problem they've had assigned or have practice before, the numbers or graphs are different when they see it in practice.

bnmnetp commented 1 year ago

Here is the crash log:

 File "/usr/local/lib/python3.10/site-packages/rsptx/web2py_server/application
s/runestone/controllers/assignments.py", line 1467, in <module>
  File "/usr/local/lib/python3.10/site-packages/rsptx/web2py_server/gluon/globa
ls.py", line 430, in <lambda>
    self._caller = lambda f: f()
  File "/usr/local/lib/python3.10/site-packages/rsptx/web2py_server/gluon/tools
.py", line 4535, in f
    return action(*a, **b)
  File "/usr/local/lib/python3.10/site-packages/rsptx/web2py_server/application
s/runestone/controllers/assignments.py", line 1063, in checkanswer
    do_check_answer(
  File "/usr/local/lib/python3.10/site-packages/rsptx/web2py_server/application
s/runestone/modules/rs_grading.py", line 1326, in do_check_answer
    chapter_label, sub_chapter_label = lastQuestion.topic.split("/")
AttributeError: 'NoneType' object has no attribute 'split'

I suspect that the topic field is not populated when we process the manifest... I'll look into a few possibilities.

  1. We can construct the topic when processing the manifest by chapter_id/subchapter_id

I have manually populated the topic field for safranski-acs to see where that gets us. Try it again and let me know. changing the seed is nice but probably can't happen without help from Alex.

bnmnetp commented 1 year ago

I think the research behind the practice tool would argue against changing the seed. You want them to see a problem that they have solved or at least tried to solve in the past. Getting a new seed is a different kind of practice than what this tool was designed for. But I'll ask to be sure.

bnmnetp commented 1 year ago

I have implemented the fix to build the topic. If things are working for you in the safranski-acs with my workaround, I'll make a new release and rebuild ac-single

Tanaquil18 commented 1 year ago

Thanks! I'll check it out later tonight or tomorrow morning and report back.

Asking about changing the seed was dumb actually, because students can always hit "randomize" on any webwork problem to change the seed themselves.

Tanaquil18 commented 1 year ago

It works now! I'm going to figure out how to incorporate that somehow in the fall.