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
1b344e4d
Commit
1b344e4d
authored
Jun 24, 2013
by
Jean Manuel Nater
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed some unused functions.
parent
7fd11905
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
45 deletions
+0
-45
lms/djangoapps/courseware/tests/test_view_authentication.py
+0
-45
No files found.
lms/djangoapps/courseware/tests/test_view_authentication.py
View file @
1b344e4d
...
...
@@ -29,27 +29,6 @@ class TestViewAuth(ModuleStoreTestCase, LoginEnrollmentTestCase):
ACCOUNT_INFO
=
[(
'view@test.com'
,
'foo'
),
(
'view2@test.com'
,
'foo'
)]
@classmethod
def
_instructor_urls
(
self
,
course
):
"""
`course` is an instance of CourseDescriptor whose section URLs are to be returned.
Returns a list of URLs corresponding to sections in the passed in course.
"""
urls
=
[
reverse
(
name
,
kwargs
=
{
'course_id'
:
course
.
id
})
for
name
in
(
'instructor_dashboard'
,
'gradebook'
,
'grade_summary'
,)]
email
,
_
=
self
.
ACCOUNT_INFO
[
0
]
student_id
=
User
.
objects
.
get
(
email
=
email
)
.
id
urls
.
append
(
reverse
(
'student_progress'
,
kwargs
=
{
'course_id'
:
course
.
id
,
'student_id'
:
student_id
}))
return
urls
@staticmethod
def
_reverse_urls
(
names
,
course
):
"""
...
...
@@ -65,30 +44,6 @@ class TestViewAuth(ModuleStoreTestCase, LoginEnrollmentTestCase):
return
[
reverse
(
name
,
kwargs
=
{
'course_id'
:
course
.
id
})
for
name
in
names
]
def
_dark_student_urls
(
self
,
course
):
"""
List of urls that students should be able to see only
after launch, but staff should see before
"""
urls
=
self
.
_reverse_urls
([
'info'
,
'progress'
],
course
)
urls
.
extend
([
reverse
(
'book'
,
kwargs
=
{
'course_id'
:
course
.
id
,
'book_index'
:
index
})
for
index
,
book
in
enumerate
(
course
.
textbooks
)
])
return
urls
def
_light_student_urls
(
self
,
course
):
"""
List of urls that students should be able to see before
launch.
`course` is an instance of CourseDescriptor.
"""
urls
=
self
.
_reverse_urls
([
'about_course'
],
course
)
urls
.
append
(
reverse
(
'courses'
))
return
urls
def
_check_non_staff_light
(
self
,
course
):
"""
Check that non-staff have access to light urls.
...
...
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