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
0f5e7cd9
Commit
0f5e7cd9
authored
Jan 21, 2013
by
Alexander Kryklia
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
explained for - else
parent
e78c020a
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
0 deletions
+9
-0
common/lib/capa/capa/verifiers/draganddrop.py
+9
-0
No files found.
common/lib/capa/capa/verifiers/draganddrop.py
View file @
0f5e7cd9
...
@@ -217,6 +217,13 @@ class DragAndDrop(object):
...
@@ -217,6 +217,13 @@ class DragAndDrop(object):
if
PositionsCompare
(
u_el
)
==
PositionsCompare
(
c_el
):
if
PositionsCompare
(
u_el
)
==
PositionsCompare
(
c_el
):
break
break
else
:
else
:
# General: the else is executed after the for,
# only if the for terminates normally (not by a break)
# In this case, 'for' is terminated normally if every element
# from 'correct' list isn't equal to concrete element from
# 'user' list. So as we found one element from 'user' list,
# that not in 'correct' list - we return False
return
False
return
False
if
flag
==
'unordered_equal'
:
if
flag
==
'unordered_equal'
:
...
@@ -229,6 +236,8 @@ class DragAndDrop(object):
...
@@ -229,6 +236,8 @@ class DragAndDrop(object):
temp
.
remove
(
c_el
)
temp
.
remove
(
c_el
)
break
break
else
:
else
:
# same as upper - if we found element from 'user' list,
# that not in 'correct' list - we return False.
return
False
return
False
return
True
return
True
...
...
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