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
66c39b69
Commit
66c39b69
authored
Mar 28, 2012
by
Piotr Mitros
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
type converted to isinstance
parent
448754ac
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
3 deletions
+4
-3
.gitignore
+2
-0
djangoapps/courseware/capa/responsetypes.py
+2
-3
No files found.
.gitignore
View file @
66c39b69
...
...
@@ -10,3 +10,4 @@ db.newaskbot
db.oldaskbot
flushdb.sh
build
\#*\#
\ No newline at end of file
djangoapps/courseware/capa/responsetypes.py
View file @
66c39b69
import
json
import
math
import
numbers
import
numpy
import
random
import
scipy
...
...
@@ -158,9 +159,7 @@ class formularesponse(object):
'''
d
=
dict
([(
k
,
numpy
.
complex
(
d
[
k
]))
for
k
in
d
if
type
(
k
)
==
str
and
\
k
.
isalnum
()
and
\
(
type
(
d
[
k
])
==
float
or
\
type
(
d
[
k
])
==
int
or
\
type
(
d
[
k
])
==
complex
)
])
isinstance
(
d
[
k
],
numbers
.
Number
)])
return
d
def
get_answers
(
self
):
...
...
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