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
f68b5f30
Commit
f68b5f30
authored
Sep 05, 2012
by
Calen Pennington
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #598 from MITx/kimth/solutions
Let admins see answers of problems at any time
parents
b5500176
2415e8de
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
0 deletions
+5
-0
common/lib/xmodule/xmodule/capa_module.py
+4
-0
common/lib/xmodule/xmodule/x_module.py
+1
-0
No files found.
common/lib/xmodule/xmodule/capa_module.py
View file @
f68b5f30
...
@@ -347,6 +347,10 @@ class CapaModule(XModule):
...
@@ -347,6 +347,10 @@ class CapaModule(XModule):
if
self
.
show_answer
==
"never"
:
if
self
.
show_answer
==
"never"
:
return
False
return
False
# Admins can see the answer, unless the problem explicitly prevents it
if
self
.
system
.
user_is_staff
:
return
True
if
self
.
show_answer
==
'attempted'
:
if
self
.
show_answer
==
'attempted'
:
return
self
.
attempts
>
0
return
self
.
attempts
>
0
...
...
common/lib/xmodule/xmodule/x_module.py
View file @
f68b5f30
...
@@ -771,6 +771,7 @@ class ModuleSystem(object):
...
@@ -771,6 +771,7 @@ class ModuleSystem(object):
self
.
replace_urls
=
replace_urls
self
.
replace_urls
=
replace_urls
self
.
node_path
=
node_path
self
.
node_path
=
node_path
self
.
anonymous_student_id
=
anonymous_student_id
self
.
anonymous_student_id
=
anonymous_student_id
self
.
user_is_staff
=
user
.
is_staff
def
get
(
self
,
attr
):
def
get
(
self
,
attr
):
''' provide uniform access to attributes (like etree).'''
''' provide uniform access to attributes (like etree).'''
...
...
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