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
6d5478a4
Commit
6d5478a4
authored
May 16, 2014
by
Calen Pennington
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Migrate new code from merge to use OK standards
parent
d4280e85
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
7 deletions
+7
-7
cms/djangoapps/contentstore/views/tests/test_import_export.py
+5
-5
lms/djangoapps/class_dashboard/dashboard_data.py
+2
-2
No files found.
cms/djangoapps/contentstore/views/tests/test_import_export.py
View file @
6d5478a4
...
@@ -115,7 +115,7 @@ class ImportTestCase(CourseTestCase):
...
@@ -115,7 +115,7 @@ class ImportTestCase(CourseTestCase):
"""
"""
# Create a non_staff user and add it to course staff only
# Create a non_staff user and add it to course staff only
__
,
nonstaff_user
=
self
.
create_non_staff_authed_user_client
(
authenticate
=
False
)
__
,
nonstaff_user
=
self
.
create_non_staff_authed_user_client
(
authenticate
=
False
)
auth
.
add_users
(
self
.
user
,
CourseStaffRole
(
self
.
course
.
location
),
nonstaff_user
)
auth
.
add_users
(
self
.
user
,
CourseStaffRole
(
self
.
course
.
id
),
nonstaff_user
)
course
=
self
.
store
.
get_item
(
self
.
course_location
)
course
=
self
.
store
.
get_item
(
self
.
course_location
)
self
.
assertIsNotNone
(
course
)
self
.
assertIsNotNone
(
course
)
...
@@ -135,8 +135,8 @@ class ImportTestCase(CourseTestCase):
...
@@ -135,8 +135,8 @@ class ImportTestCase(CourseTestCase):
self
.
assertNotEqual
(
display_name_before_import
,
display_name_after_import
)
self
.
assertNotEqual
(
display_name_before_import
,
display_name_after_import
)
# Now check that non_staff user has his same role
# Now check that non_staff user has his same role
self
.
assertFalse
(
CourseInstructorRole
(
self
.
course
_location
)
.
has_user
(
nonstaff_user
))
self
.
assertFalse
(
CourseInstructorRole
(
self
.
course
.
id
)
.
has_user
(
nonstaff_user
))
self
.
assertTrue
(
CourseStaffRole
(
self
.
course
_location
)
.
has_user
(
nonstaff_user
))
self
.
assertTrue
(
CourseStaffRole
(
self
.
course
.
id
)
.
has_user
(
nonstaff_user
))
# Now course staff user can also successfully import course
# Now course staff user can also successfully import course
self
.
client
.
login
(
username
=
nonstaff_user
.
username
,
password
=
'foo'
)
self
.
client
.
login
(
username
=
nonstaff_user
.
username
,
password
=
'foo'
)
...
@@ -146,8 +146,8 @@ class ImportTestCase(CourseTestCase):
...
@@ -146,8 +146,8 @@ class ImportTestCase(CourseTestCase):
self
.
assertEquals
(
resp
.
status_code
,
200
)
self
.
assertEquals
(
resp
.
status_code
,
200
)
# Now check that non_staff user has his same role
# Now check that non_staff user has his same role
self
.
assertFalse
(
CourseInstructorRole
(
self
.
course
_location
)
.
has_user
(
nonstaff_user
))
self
.
assertFalse
(
CourseInstructorRole
(
self
.
course
.
id
)
.
has_user
(
nonstaff_user
))
self
.
assertTrue
(
CourseStaffRole
(
self
.
course
_location
)
.
has_user
(
nonstaff_user
))
self
.
assertTrue
(
CourseStaffRole
(
self
.
course
.
id
)
.
has_user
(
nonstaff_user
))
## Unsafe tar methods #####################################################
## Unsafe tar methods #####################################################
# Each of these methods creates a tarfile with a single type of unsafe
# Each of these methods creates a tarfile with a single type of unsafe
...
...
lms/djangoapps/class_dashboard/dashboard_data.py
View file @
6d5478a4
...
@@ -193,8 +193,8 @@ def get_d3_problem_grade_distrib(course_id):
...
@@ -193,8 +193,8 @@ def get_d3_problem_grade_distrib(course_id):
# Compute percent of students with this grade
# Compute percent of students with this grade
student_count_percent
=
0
student_count_percent
=
0
if
total_student_count
.
get
(
child
.
location
.
url
()
,
0
)
>
0
:
if
total_student_count
.
get
(
child
.
location
,
0
)
>
0
:
student_count_percent
=
count_grade
*
100
/
total_student_count
[
child
.
location
.
url
()
]
student_count_percent
=
count_grade
*
100
/
total_student_count
[
child
.
location
]
# Tooltip parameters for problem in grade distribution view
# Tooltip parameters for problem in grade distribution view
tooltip
=
{
tooltip
=
{
...
...
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