Skip to content
This repository was archived by the owner on Jun 30, 2024. It is now read-only.

Conversation

@bjones1
Copy link
Contributor

@bjones1 bjones1 commented Jul 16, 2020

Depends on RunestoneInteractive/RunestoneComponents#1029. A MVP for dynamic problems.

.. fillintheblank:: fitb_dynamic
    :dynamic:
        a = random.randrange(0, 10)
        b = random.randrange(0, 10)

    What is {{=a}} + {{=b}}?

    -   :int(ans) == a + b: Correct!
        :int(ans) == a - b: That's subtraction.
        :int(ans) == a * b: That's multiplication.
        :float(ans) == approx(a / b): That's division.
        :x: I don't know what you're doing.

@bjones1 bjones1 force-pushed the dynamic_problems branch 3 times, most recently from db1aa74 to 2744e8a Compare July 16, 2020 21:49
@bjones1
Copy link
Contributor Author

bjones1 commented Jul 17, 2020

Note that these test failures result from not having the updated Runestone components -- templated items such as {{=a}} raise an exception, since the components doesn't store source code for calculating a. All tests pass with the updated components.

@bjones1 bjones1 force-pushed the dynamic_problems branch from 2744e8a to 615ca3b Compare July 18, 2020 03:22
@github-actions
Copy link

Stale pull request message

@github-actions
Copy link

Stale pull request message

@bjones1
Copy link
Contributor Author

bjones1 commented Apr 23, 2021

I'd actually like to re-consider this after the last PR for improved testing is merged.

@github-actions
Copy link

Stale pull request message

@bjones1
Copy link
Contributor Author

bjones1 commented Jul 30, 2021

Let's leave this closed. If RunestoneInteractive/RunestoneComponents#1225 is merged, then I'll rewrite this for the bookserver.

@bjones1 bjones1 deleted the dynamic_problems branch September 20, 2021 14:36
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants