Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
problem-builder
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
problem-builder
Commits
3385ce31
Commit
3385ce31
authored
Mar 02, 2015
by
Braden MacDonald
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix auto generated ID fields in old mongo
parent
adf8de62
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
3 deletions
+3
-3
mentoring/components/answer.py
+1
-1
mentoring/components/choice.py
+1
-1
mentoring/components/message.py
+1
-1
No files found.
mentoring/components/answer.py
View file @
3385ce31
...
...
@@ -223,7 +223,7 @@ class AnswerBlock(AnswerMixin, StepMixin, StudioEditableXBlockMixin, XBlock):
"""
# Generate a random 'name' value
if
template_id
==
'studio_default'
:
return
{
'
metadata'
:
{
'name'
:
uuid
.
uuid4
()
.
hex
[:
7
]},
'data'
:
{
}}
return
{
'
data'
:
{
'name'
:
uuid
.
uuid4
()
.
hex
[:
7
]
}}
return
{
'metadata'
:
{},
'data'
:
{}}
...
...
mentoring/components/choice.py
View file @
3385ce31
...
...
@@ -107,7 +107,7 @@ class ChoiceBlock(StudioEditableXBlockMixin, XBlock):
# Generate a random 'value' value. We can't just use default=UNIQUE_ID on the field,
# because that doesn't work properly with import/export, re-run, or duplicating the block
if
template_id
==
'studio_default'
:
return
{
'
metadata'
:
{
'value'
:
uuid
.
uuid4
()
.
hex
[:
7
]},
'data'
:
{
}}
return
{
'
data'
:
{
'value'
:
uuid
.
uuid4
()
.
hex
[:
7
]
}}
return
{
'metadata'
:
{},
'data'
:
{}}
@classmethod
...
...
mentoring/components/message.py
View file @
3385ce31
...
...
@@ -85,7 +85,7 @@ class MentoringMessageBlock(XBlock, StudioEditableXBlockMixin):
"""
Used to interact with Studio's create_xblock method to instantiate pre-defined templates.
"""
return
{
'
metadata'
:
{
'type'
:
template_id
,
'content'
:
"Message goes here."
},
'data'
:
{
}}
return
{
'
data'
:
{
'type'
:
template_id
,
'content'
:
"Message goes here."
}}
@classmethod
def
parse_xml
(
cls
,
node
,
runtime
,
keys
,
id_generator
):
...
...
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