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
9f2bce00
Commit
9f2bce00
authored
May 14, 2012
by
David Ormsbee
Committed by
Calen Pennington
Jun 07, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Catch common case where problem answers are specified with units but don't expect them in the input
parent
3cbb74ae
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
common/lib/capa/checker.py
+4
-0
No files found.
common/lib/capa/checker.py
View file @
9f2bce00
...
...
@@ -11,6 +11,7 @@ import sys
from
cStringIO
import
StringIO
from
calc
import
UndefinedVariable
from
capa_problem
import
LoncapaProblem
logging
.
basicConfig
(
format
=
"
%(levelname)
s
%(message)
s"
)
...
...
@@ -108,6 +109,9 @@ def check_that_suggested_answers_work(problem):
log
.
debug
(
real_results
)
assert
(
all
(
result
==
'correct'
for
answer_id
,
result
in
real_results
.
items
()))
except
UndefinedVariable
as
uv_exc
:
log
.
error
(
"The variable
\"
{0}
\"
specified in the "
.
format
(
uv_exc
)
+
"solution isn't recognized (is it a units measure?)."
)
except
AssertionError
:
log
.
error
(
"The following generated answers were not accepted for {0}:"
.
format
(
problem
))
...
...
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