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
e47f0e45
Commit
e47f0e45
authored
Jan 16, 2013
by
Alexander Kryklia
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
unorderly->unordered
parent
099c79c8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
+6
-6
common/lib/capa/capa/verifiers/draganddrop.py
+3
-3
common/lib/capa/capa/verifiers/tests_draganddrop.py
+3
-3
No files found.
common/lib/capa/capa/verifiers/draganddrop.py
View file @
e47f0e45
...
...
@@ -144,7 +144,7 @@ class DragAndDrop(object):
# every element are equal with correct positions
for
groupname
in
self
.
correct_groups
:
rules_executed
=
0
for
rule
in
(
'exact'
,
'anyof'
,
'unorder
ly
_equal'
):
for
rule
in
(
'exact'
,
'anyof'
,
'unorder
ed
_equal'
):
# every group has only one rule
if
self
.
correct_positions
[
groupname
]
.
get
(
rule
,
None
):
rules_executed
+=
1
...
...
@@ -190,7 +190,7 @@ class DragAndDrop(object):
- draggables can be placed in any order:
user ['1','2','3','4'] is 'anyof' equal to ['4', '2', '1', 3']
'unorder
ly
_equal' is same as 'exact' but disregards on order
'unorder
ed
_equal' is same as 'exact' but disregards on order
Equality functions:
...
...
@@ -220,7 +220,7 @@ class DragAndDrop(object):
else
:
return
False
if
flag
==
'unorder
ly
_equal'
:
if
flag
==
'unorder
ed
_equal'
:
if
len
(
correct
)
!=
len
(
user
):
return
False
temp
=
correct
[:]
...
...
common/lib/capa/capa/verifiers/tests_draganddrop.py
View file @
e47f0e45
...
...
@@ -343,17 +343,17 @@ class Test_DragAndDrop_Grade(unittest.TestCase):
{
'draggables'
:
[
'a'
],
'targets'
:
[
'target1'
,
'target4'
,
'target7'
,
'target10'
],
'rule'
:
'unorder
ly
_equal'
'rule'
:
'unorder
ed
_equal'
},
{
'draggables'
:
[
'b'
],
'targets'
:
[
'target2'
,
'target5'
,
'target8'
],
'rule'
:
'unorder
ly
_equal'
'rule'
:
'unorder
ed
_equal'
},
{
'draggables'
:
[
'c'
],
'targets'
:
[
'target3'
,
'target6'
,
'target9'
],
'rule'
:
'unorder
ly
_equal'
'rule'
:
'unorder
ed
_equal'
}]
self
.
assertTrue
(
draganddrop
.
grade
(
user_input
,
correct_answer
))
...
...
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