Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
edx-platform-release
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Hsin-Yu Chien
edx-platform-release
Commits
0c1e18ff
Commit
0c1e18ff
authored
5 years ago
by
Feanil Patel
Browse files
Options
Downloads
Patches
Plain Diff
BOM-622 Fix more type errors.
parent
0e1ad4cd
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
lms/djangoapps/ccx/tests/test_views.py
+5
-6
5 additions, 6 deletions
lms/djangoapps/ccx/tests/test_views.py
lms/djangoapps/ccx/views.py
+1
-1
1 addition, 1 deletion
lms/djangoapps/ccx/views.py
with
6 additions
and
7 deletions
lms/djangoapps/ccx/tests/test_views.py
+
5
−
6
View file @
0c1e18ff
...
...
@@ -346,7 +346,7 @@ class TestCoachDashboard(CcxTestCase, LoginEnrollmentTestCase):
self
.
assertEqual
(
response
.
status_code
,
200
)
self
.
assertTrue
(
re
.
search
(
'
<form action=
"
.+create_ccx
"'
,
response
.
content
))
response
.
content
.
decode
(
'
utf-8
'
)
))
def
test_create_ccx_with_ccx_connector_set
(
self
):
"""
...
...
@@ -365,7 +365,7 @@ class TestCoachDashboard(CcxTestCase, LoginEnrollmentTestCase):
"
A CCX can only be created on this course through an external service.
"
"
Contact a course admin to give you access.
"
)
self
.
assertTrue
(
re
.
search
(
error_message
,
response
.
content
))
self
.
assertTrue
(
re
.
search
(
error_message
,
response
.
content
.
decode
(
'
utf-8
'
)
))
def
test_create_ccx
(
self
,
ccx_name
=
'
New CCX
'
):
"""
...
...
@@ -392,7 +392,7 @@ class TestCoachDashboard(CcxTestCase, LoginEnrollmentTestCase):
course_key
=
CourseKey
.
from_string
(
ccx_key
)
self
.
assertTrue
(
CourseEnrollment
.
is_enrolled
(
self
.
coach
,
course_key
))
self
.
assertTrue
(
re
.
search
(
'
id=
"
ccx-schedule
"'
,
response
.
content
))
self
.
assertTrue
(
re
.
search
(
'
id=
"
ccx-schedule
"'
,
response
.
content
.
decode
(
'
utf-8
'
)
))
# check if the max amount of student that can be enrolled has been overridden
ccx
=
CustomCourseForEdX
.
objects
.
get
()
...
...
@@ -1104,9 +1104,8 @@ class TestCCXGrades(FieldOverrideTestMixin, SharedModuleStoreTestCase, LoginEnro
response
[
'
content-disposition
'
],
'
attachment
'
)
rows
=
response
.
content
.
strip
().
split
(
'
\r
'
)
rows
=
response
.
content
.
decode
(
'
utf-8
'
).
strip
().
split
(
'
\r
'
)
headers
=
rows
[
0
]
# picking first student records
data
=
dict
(
list
(
zip
(
headers
.
strip
().
split
(
'
,
'
),
rows
[
1
].
strip
().
split
(
'
,
'
))))
self
.
assertNotIn
(
'
HW 04
'
,
data
)
...
...
@@ -1276,7 +1275,7 @@ class TestStudentViewsWithCCX(ModuleStoreTestCase):
self
.
client
.
login
(
username
=
self
.
student
.
username
,
password
=
self
.
student_password
)
response
=
self
.
client
.
get
(
reverse
(
'
dashboard
'
))
self
.
assertEqual
(
response
.
status_code
,
200
)
self
.
assertTrue
(
re
.
search
(
'
Test CCX
'
,
response
.
content
))
self
.
assertTrue
(
re
.
search
(
'
Test CCX
'
,
response
.
content
.
decode
(
'
utf-8
'
)
))
def
test_load_courseware
(
self
):
self
.
client
.
login
(
username
=
self
.
student
.
username
,
password
=
self
.
student_password
)
...
...
This diff is collapsed.
Click to expand it.
lms/djangoapps/ccx/views.py
+
1
−
1
View file @
0c1e18ff
...
...
@@ -539,7 +539,7 @@ def ccx_grades_csv(request, course, ccx=None):
if
not
header
:
# Encode the header row in utf-8 encoding in case there are
# unicode characters
header
=
[
section
[
'
label
'
].
encode
(
'
utf-8
'
)
header
=
[
section
[
'
label
'
].
encode
(
'
utf-8
'
)
if
six
.
PY2
else
section
[
'
label
'
]
for
section
in
course_grade
.
summary
[
u
'
section_breakdown
'
]]
rows
.
append
([
"
id
"
,
"
email
"
,
"
username
"
,
"
grade
"
]
+
header
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment