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
c084679e
Commit
c084679e
authored
Aug 20, 2012
by
Bridger Maxwell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed tests from profile->progress rename.
parent
fdebadba
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
9 deletions
+9
-9
lms/djangoapps/course_wiki/tests/tests.py
+5
-5
lms/djangoapps/courseware/tests/tests.py
+3
-3
lms/templates/gradebook.html
+1
-1
No files found.
lms/djangoapps/course_wiki/tests/tests.py
View file @
c084679e
...
@@ -36,7 +36,7 @@ class WikiRedirectTestCase(PageLoader):
...
@@ -36,7 +36,7 @@ class WikiRedirectTestCase(PageLoader):
"""
"""
Test that requesting wiki URLs redirect properly to or out of classes.
Test that requesting wiki URLs redirect properly to or out of classes.
An enrolled in student going from /courses/edX/toy/2012_Fall/pro
file
An enrolled in student going from /courses/edX/toy/2012_Fall/pro
gress
to /wiki/some/fake/wiki/page/ will redirect to
to /wiki/some/fake/wiki/page/ will redirect to
/courses/edX/toy/2012_Fall/wiki/some/fake/wiki/page/
/courses/edX/toy/2012_Fall/wiki/some/fake/wiki/page/
...
@@ -48,10 +48,10 @@ class WikiRedirectTestCase(PageLoader):
...
@@ -48,10 +48,10 @@ class WikiRedirectTestCase(PageLoader):
self
.
enroll
(
self
.
toy
)
self
.
enroll
(
self
.
toy
)
referer
=
reverse
(
"pro
file
"
,
kwargs
=
{
'course_id'
:
self
.
toy
.
id
})
referer
=
reverse
(
"pro
gress
"
,
kwargs
=
{
'course_id'
:
self
.
toy
.
id
})
destination
=
reverse
(
"wiki:get"
,
kwargs
=
{
'path'
:
'some/fake/wiki/page/'
})
destination
=
reverse
(
"wiki:get"
,
kwargs
=
{
'path'
:
'some/fake/wiki/page/'
})
redirected_to
=
referer
.
replace
(
"pro
file
"
,
"wiki/some/fake/wiki/page/"
)
redirected_to
=
referer
.
replace
(
"pro
gress
"
,
"wiki/some/fake/wiki/page/"
)
resp
=
self
.
client
.
get
(
destination
,
HTTP_REFERER
=
referer
)
resp
=
self
.
client
.
get
(
destination
,
HTTP_REFERER
=
referer
)
self
.
assertEqual
(
resp
.
status_code
,
302
)
self
.
assertEqual
(
resp
.
status_code
,
302
)
...
@@ -77,11 +77,11 @@ class WikiRedirectTestCase(PageLoader):
...
@@ -77,11 +77,11 @@ class WikiRedirectTestCase(PageLoader):
"""
"""
course_wiki_home
=
reverse
(
'course_wiki'
,
kwargs
=
{
'course_id'
:
course
.
id
})
course_wiki_home
=
reverse
(
'course_wiki'
,
kwargs
=
{
'course_id'
:
course
.
id
})
referer
=
reverse
(
"pro
file
"
,
kwargs
=
{
'course_id'
:
self
.
toy
.
id
})
referer
=
reverse
(
"pro
gress
"
,
kwargs
=
{
'course_id'
:
self
.
toy
.
id
})
resp
=
self
.
client
.
get
(
course_wiki_home
,
follow
=
True
,
HTTP_REFERER
=
referer
)
resp
=
self
.
client
.
get
(
course_wiki_home
,
follow
=
True
,
HTTP_REFERER
=
referer
)
course_wiki_page
=
referer
.
replace
(
'pro
file
'
,
'wiki/'
+
self
.
toy
.
wiki_slug
+
"/"
)
course_wiki_page
=
referer
.
replace
(
'pro
gress
'
,
'wiki/'
+
self
.
toy
.
wiki_slug
+
"/"
)
ending_location
=
resp
.
redirect_chain
[
-
1
][
0
]
ending_location
=
resp
.
redirect_chain
[
-
1
][
0
]
ending_status
=
resp
.
redirect_chain
[
-
1
][
1
]
ending_status
=
resp
.
redirect_chain
[
-
1
][
1
]
...
...
lms/djangoapps/courseware/tests/tests.py
View file @
c084679e
...
@@ -303,7 +303,7 @@ class TestViewAuth(PageLoader):
...
@@ -303,7 +303,7 @@ class TestViewAuth(PageLoader):
'instructor_dashboard'
,
'instructor_dashboard'
,
'gradebook'
,
'gradebook'
,
'grade_summary'
,)]
'grade_summary'
,)]
urls
.
append
(
reverse
(
'student_pro
file
'
,
kwargs
=
{
'course_id'
:
course
.
id
,
urls
.
append
(
reverse
(
'student_pro
gress
'
,
kwargs
=
{
'course_id'
:
course
.
id
,
'student_id'
:
user
(
self
.
student
)
.
id
}))
'student_id'
:
user
(
self
.
student
)
.
id
}))
return
urls
return
urls
...
@@ -388,7 +388,7 @@ class TestViewAuth(PageLoader):
...
@@ -388,7 +388,7 @@ class TestViewAuth(PageLoader):
list of urls that students should be able to see only
list of urls that students should be able to see only
after launch, but staff should see before
after launch, but staff should see before
"""
"""
urls
=
reverse_urls
([
'info'
,
'courseware'
,
'pro
file
'
],
course
)
urls
=
reverse_urls
([
'info'
,
'courseware'
,
'pro
gress
'
],
course
)
urls
.
extend
([
urls
.
extend
([
reverse
(
'book'
,
kwargs
=
{
'course_id'
:
course
.
id
,
'book_index'
:
book
.
title
})
reverse
(
'book'
,
kwargs
=
{
'course_id'
:
course
.
id
,
'book_index'
:
book
.
title
})
for
book
in
course
.
textbooks
for
book
in
course
.
textbooks
...
@@ -411,7 +411,7 @@ class TestViewAuth(PageLoader):
...
@@ -411,7 +411,7 @@ class TestViewAuth(PageLoader):
"""list of urls that only instructors/staff should be able to see"""
"""list of urls that only instructors/staff should be able to see"""
urls
=
reverse_urls
([
'instructor_dashboard'
,
'gradebook'
,
'grade_summary'
],
urls
=
reverse_urls
([
'instructor_dashboard'
,
'gradebook'
,
'grade_summary'
],
course
)
course
)
urls
.
append
(
reverse
(
'student_pro
file
'
,
kwargs
=
{
'course_id'
:
course
.
id
,
urls
.
append
(
reverse
(
'student_pro
gress
'
,
kwargs
=
{
'course_id'
:
course
.
id
,
'student_id'
:
user
(
self
.
student
)
.
id
}))
'student_id'
:
user
(
self
.
student
)
.
id
}))
return
urls
return
urls
...
...
lms/templates/gradebook.html
View file @
c084679e
...
@@ -49,7 +49,7 @@
...
@@ -49,7 +49,7 @@
%for student in students:
%for student in students:
<tr>
<tr>
<td>
<td>
<a
href=
"${reverse('student_pro
file
', kwargs=dict(course_id=course_id, student_id=student['id']))}"
>
${student['username']}
</a>
<a
href=
"${reverse('student_pro
gress
', kwargs=dict(course_id=course_id, student_id=student['id']))}"
>
${student['username']}
</a>
</td>
</td>
</tr>
</tr>
%endfor
%endfor
...
...
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