Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
edx-platform-release
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Hsin-Yu Chien
edx-platform-release
Commits
0ed06504
Commit
0ed06504
authored
11 years ago
by
Don Mitchell
Browse files
Options
Downloads
Plain Diff
Merge pull request #448 from edx/dhm/xml_default
Set to old xml defaults IFF no specified policy for problem nor course.
parents
9a61038c
65468629
Loading
Loading
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
common/lib/xmodule/xmodule/capa_module.py
+3
-2
3 additions, 2 deletions
common/lib/xmodule/xmodule/capa_module.py
with
3 additions
and
2 deletions
common/lib/xmodule/xmodule/capa_module.py
+
3
−
2
View file @
0ed06504
...
...
@@ -1161,10 +1161,11 @@ class CapaDescriptor(CapaFields, RawDescriptor):
Augment regular translation w/ setting the pre-Studio defaults.
"""
problem
=
super
(
CapaDescriptor
,
cls
).
from_xml
(
xml_data
,
system
,
org
,
course
)
course_policy
=
system
.
policy
.
setdefault
(
'
course/{}
'
.
format
(
system
.
url_name
),
{})
# pylint: disable=W0212
if
'
showanswer
'
not
in
problem
.
_model_data
:
if
'
showanswer
'
not
in
problem
.
_model_data
and
'
showanswer
'
not
in
course_policy
:
problem
.
showanswer
=
"
closed
"
if
'
rerandomize
'
not
in
problem
.
_model_data
:
if
'
rerandomize
'
not
in
problem
.
_model_data
and
'
rerandomize
'
not
in
course_policy
:
problem
.
rerandomize
=
"
always
"
return
problem
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment