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
fe42d8e9
Commit
fe42d8e9
authored
Feb 04, 2013
by
Victor Shnayder
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix typo, add comment
parent
6088a926
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
common/lib/xmodule/xmodule/capa_module.py
+6
-4
No files found.
common/lib/xmodule/xmodule/capa_module.py
View file @
fe42d8e9
...
...
@@ -414,12 +414,14 @@ class CapaModule(XModule):
elif
self
.
show_answer
==
"never"
:
return
False
elif
self
.
system
.
user_is_staff
:
# This i after the 'never' check because admins can see the answer
# This i
s
after the 'never' check because admins can see the answer
# unless the problem explicitly prevents it
return
True
elif
self
.
show_answer
==
'attempted'
:
return
self
.
attempts
>
0
elif
self
.
show_answer
==
'answered'
:
# NOTE: this is slightly different from 'attempted' -- resetting the problems
# makes lcp.done False, but leaves attempts unchanged.
return
self
.
lcp
.
done
elif
self
.
show_answer
==
'closed'
:
return
self
.
closed
()
...
...
@@ -674,18 +676,18 @@ class CapaDescriptor(RawDescriptor):
# TODO (vshnayder): do problems have any other metadata? Do they
# actually use type and points?
metadata_attributes
=
RawDescriptor
.
metadata_attributes
+
(
'type'
,
'points'
)
def
get_context
(
self
):
_context
=
RawDescriptor
.
get_context
(
self
)
_context
.
update
({
'markdown'
:
self
.
metadata
.
get
(
'markdown'
,
''
)})
return
_context
@property
def
editable_metadata_fields
(
self
):
"""Remove metadata from the editable fields since it has its own editor"""
subset
=
super
(
CapaDescriptor
,
self
)
.
editable_metadata_fields
if
'markdown'
in
subset
:
subset
.
remove
(
'markdown'
)
subset
.
remove
(
'markdown'
)
return
subset
...
...
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