Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
adae2a9d
Commit
adae2a9d
authored
Aug 05, 2015
by
Jonathan Piacenti
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix problem submission test.
parent
3304c056
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
17 deletions
+2
-17
lms/djangoapps/courseware/tests/test_submitting_problems.py
+2
-17
No files found.
lms/djangoapps/courseware/tests/test_submitting_problems.py
View file @
adae2a9d
...
@@ -438,7 +438,8 @@ class TestCourseGrader(TestSubmittingProblems):
...
@@ -438,7 +438,8 @@ class TestCourseGrader(TestSubmittingProblems):
# Now fetch the state entry for that problem.
# Now fetch the state entry for that problem.
student_module
=
StudentModule
.
objects
.
get
(
student_module
=
StudentModule
.
objects
.
get
(
course_id
=
self
.
course
.
id
,
course_id
=
self
.
course
.
id
,
student
=
self
.
student_user
student
=
self
.
student_user
,
module_state_key
=
self
.
problem_location
(
'p1'
)
)
)
# count how many state history entries there are
# count how many state history entries there are
baseline
=
StudentModuleHistory
.
objects
.
filter
(
baseline
=
StudentModuleHistory
.
objects
.
filter
(
...
@@ -1069,22 +1070,6 @@ class TestAnswerDistributions(TestSubmittingProblems):
...
@@ -1069,22 +1070,6 @@ class TestAnswerDistributions(TestSubmittingProblems):
},
},
}
}
)
)
for
student_module
in
student_modules
:
if
student_module
.
module_state_key
.
name
==
problem_name
:
for
val
in
(
'Correct'
,
True
,
False
,
0
,
0.0
,
1
,
1.0
,
None
):
state
=
json
.
loads
(
student_module
.
state
)
state
[
"student_answers"
][
'i4x-MITx-100-problem-p1_2_1'
]
=
val
student_module
.
state
=
json
.
dumps
(
state
)
student_module
.
save
()
self
.
assertEqual
(
grades
.
answer_distributions
(
self
.
course
.
id
),
{
(
'p1'
,
'p1'
,
'i4x-MITx-100-problem-p1_2_1'
):
{
str
(
val
):
1
},
}
)
def
test_missing_content
(
self
):
def
test_missing_content
(
self
):
# If there's a StudentModule entry for content that no longer exists,
# If there's a StudentModule entry for content that no longer exists,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment