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
5d620931
Commit
5d620931
authored
Jul 31, 2014
by
Joe Blaylock
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #95 from Stanford-Online/jbau/rc/fix-anon-access-tests-for-real
Jbau/rc/fix anon access tests for real
parents
58089fb0
49d41b46
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
3 deletions
+2
-3
lms/djangoapps/courseware/access.py
+1
-3
lms/djangoapps/courseware/tests/test_access.py
+1
-0
No files found.
lms/djangoapps/courseware/access.py
View file @
5d620931
...
...
@@ -333,9 +333,7 @@ def _has_access_descriptor(user, action, descriptor, course_key=None):
# after start date, all registered users can see it
# nonregistered users shouldn't be able to access certain descriptor types
debug
(
"Allow: now > effective start date"
)
# JRBL Edited this to make the unit tests pass
#return UserProfile.has_registered(user) or _can_load_descriptor_nonregistered(descriptor)
return
True
return
UserProfile
.
has_registered
(
user
)
or
_can_load_descriptor_nonregistered
(
descriptor
)
# otherwise, need staff access
return
_has_staff_access_to_descriptor
(
user
,
descriptor
,
course_key
)
...
...
lms/djangoapps/courseware/tests/test_access.py
View file @
5d620931
...
...
@@ -102,6 +102,7 @@ class AccessTestCase(TestCase):
"""
mock_unit
=
Mock
()
mock_unit
.
_class_tags
=
{}
# Needed for detached check in _has_access_descriptor
mock_unit
.
category
=
"problem"
def
verify_access
(
student_should_have_access
):
""" Verify the expected result from _has_access_descriptor """
...
...
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