Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-ora2
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-ora2
Commits
65a5f0c3
Commit
65a5f0c3
authored
Mar 11, 2014
by
Will Daly
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Accept numeric xblock trace values
parent
a29c5383
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
1 deletions
+9
-1
apps/openassessment/xblock/openassessmentblock.py
+1
-1
apps/openassessment/xblock/test/test_openassessment.py
+8
-0
No files found.
apps/openassessment/xblock/openassessmentblock.py
View file @
65a5f0c3
...
...
@@ -242,7 +242,7 @@ class OpenAssessmentBlock(
Useful for logging, debugging, and uniqueification.
"""
return
self
.
scope_ids
.
usage_id
,
self
.
scope_ids
.
user_id
return
unicode
(
self
.
scope_ids
.
usage_id
),
unicode
(
self
.
scope_ids
.
user_id
)
def
get_student_item_dict
(
self
):
"""Create a student_item_dict from our surrounding context.
...
...
apps/openassessment/xblock/test/test_openassessment.py
View file @
65a5f0c3
...
...
@@ -100,6 +100,14 @@ class TestOpenAssessment(XBlockHandlerTestCase):
student_view
=
xblock
.
student_view
({})
self
.
assertIsNotNone
(
student_view
)
@scenario
(
'data/basic_scenario.xml'
,
user_id
=
2
)
def
test_numeric_scope_ids
(
self
,
xblock
):
# Even if we're passed a numeric user ID, we should store it as a string
# because that's what our models expect.
student_item
=
xblock
.
get_student_item_dict
()
self
.
assertEqual
(
student_item
[
'student_id'
],
'2'
)
self
.
assertIsInstance
(
student_item
[
'item_id'
],
unicode
)
class
TestDates
(
XBlockHandlerTestCase
):
...
...
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