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

chore: calc version bump #35590

Merged
merged 1 commit into from
Oct 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion requirements/edx-sandbox/base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ numpy==1.26.4
# matplotlib
# openedx-calc
# scipy
openedx-calc==3.1.0
openedx-calc==3.1.2
# via -r requirements/edx-sandbox/base.in
packaging==24.1
# via matplotlib
Expand Down
2 changes: 1 addition & 1 deletion requirements/edx-sandbox/releases/quince.txt
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ numpy==1.22.4
# matplotlib
# openedx-calc
# scipy
openedx-calc==3.1.0
openedx-calc==3.1.2
# via -r requirements/edx-sandbox/base.in
packaging==23.2
# via matplotlib
Expand Down
2 changes: 1 addition & 1 deletion requirements/edx-sandbox/releases/redwood.txt
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ numpy==1.24.4
# matplotlib
# openedx-calc
# scipy
openedx-calc==3.1.0
openedx-calc==3.1.2
# via -r requirements/edx-sandbox/base.in
packaging==24.0
# via matplotlib
Expand Down
2 changes: 1 addition & 1 deletion requirements/edx/base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -801,7 +801,7 @@ openai==0.28.1
# edx-enterprise
openedx-atlas==0.6.2
# via -r requirements/edx/kernel.in
openedx-calc==3.1.0
openedx-calc==3.1.2
# via -r requirements/edx/kernel.in
openedx-django-pyfs==3.7.0
# via
Expand Down
2 changes: 1 addition & 1 deletion requirements/edx/development.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1340,7 +1340,7 @@ openedx-atlas==0.6.2
# via
# -r requirements/edx/doc.txt
# -r requirements/edx/testing.txt
openedx-calc==3.1.0
openedx-calc==3.1.2
# via
# -r requirements/edx/doc.txt
# -r requirements/edx/testing.txt
Expand Down
2 changes: 1 addition & 1 deletion requirements/edx/doc.txt
Original file line number Diff line number Diff line change
Expand Up @@ -959,7 +959,7 @@ openai==0.28.1
# edx-enterprise
openedx-atlas==0.6.2
# via -r requirements/edx/base.txt
openedx-calc==3.1.0
openedx-calc==3.1.2
# via -r requirements/edx/base.txt
openedx-django-pyfs==3.7.0
# via
Expand Down
2 changes: 1 addition & 1 deletion requirements/edx/testing.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1010,7 +1010,7 @@ openai==0.28.1
# edx-enterprise
openedx-atlas==0.6.2
# via -r requirements/edx/base.txt
openedx-calc==3.1.0
openedx-calc==3.1.2
# via -r requirements/edx/base.txt
openedx-django-pyfs==3.7.0
# via
Expand Down
14 changes: 14 additions & 0 deletions xmodule/capa/tests/test_responsetypes.py
Original file line number Diff line number Diff line change
Expand Up @@ -1538,6 +1538,20 @@ def test_floats(self):
problem = self.build_problem(answer=given_answer)
self.assert_multiple_grade(problem, correct_responses, incorrect_responses)

def test_percentage(self):
"""
Test percentage
"""
problem_setup = [
# [given_answer, [list of correct responses], [list of incorrect responses]]
["1%", ["1%", "1.0%", "1.00%", "0.01"], [""]],
["2.0%", ["2%", "2.0%", "2.00%", "0.02"], [""]],
["4.00%", ["4%", "4.0%", "4.00%", "0.04"], [""]],
]
for given_answer, correct_responses, incorrect_responses in problem_setup:
problem = self.build_problem(answer=given_answer)
self.assert_multiple_grade(problem, correct_responses, incorrect_responses)

def test_grade_with_script(self):
script_text = "computed_response = math.sqrt(4)"
problem = self.build_problem(answer="$computed_response", script=script_text)
Expand Down
Loading