Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
X
xblock-drag-and-drop-v2
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
OpenEdx
xblock-drag-and-drop-v2
Commits
c67d91cd
Commit
c67d91cd
authored
Aug 27, 2016
by
Matjaz Gregoric
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Address review comments.
parent
ae4ef34e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
4 deletions
+3
-4
drag_and_drop_v2/drag_and_drop_v2.py
+3
-4
No files found.
drag_and_drop_v2/drag_and_drop_v2.py
View file @
c67d91cd
...
@@ -638,9 +638,8 @@ class DragAndDropBlock(XBlock, XBlockWithSettingsMixin, ThemableXBlockMixin):
...
@@ -638,9 +638,8 @@ class DragAndDropBlock(XBlock, XBlockWithSettingsMixin, ThemableXBlockMixin):
def
_get_user_state
(
self
):
def
_get_user_state
(
self
):
""" Get all user-specific data, and any applicable feedback """
""" Get all user-specific data, and any applicable feedback """
item_state
=
self
.
_get_item_state
()
item_state
=
self
.
_get_item_state
()
# In assessment mode, if item is placed correctly and than the page is refreshed, "correct"
# In assessment mode, we do not want to leak the correctness info for individual items to the frontend,
# will spill to the frontend, making item "disabled", thus allowing students to obtain answer by trial
# so we remove "correct" from all items when in assessment mode.
# and error + refreshing the page. In order to avoid that, we remove "correct" from an item here
if
self
.
mode
==
self
.
ASSESSMENT_MODE
:
if
self
.
mode
==
self
.
ASSESSMENT_MODE
:
for
item
in
item_state
.
values
():
for
item
in
item_state
.
values
():
del
item
[
"correct"
]
del
item
[
"correct"
]
...
@@ -665,7 +664,7 @@ class DragAndDropBlock(XBlock, XBlockWithSettingsMixin, ThemableXBlockMixin):
...
@@ -665,7 +664,7 @@ class DragAndDropBlock(XBlock, XBlockWithSettingsMixin, ThemableXBlockMixin):
"""
"""
# IMPORTANT: this method should always return a COPY of self.item_state - it is called from get_user_state
# IMPORTANT: this method should always return a COPY of self.item_state - it is called from get_user_state
# handler and
manipulated there to hide correctness of items placed
# handler and
the data it returns is manipulated there to hide correctness of items placed.
state
=
{}
state
=
{}
for
item_id
,
raw_item
in
self
.
item_state
.
iteritems
():
for
item_id
,
raw_item
in
self
.
item_state
.
iteritems
():
...
...
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