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
ddf1874c
Commit
ddf1874c
authored
May 14, 2014
by
Calen Pennington
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix merge conflicts
parent
661f37ec
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
4 additions
and
42 deletions
+4
-42
lms/djangoapps/courseware/tests/test_views.py
+2
-13
lms/djangoapps/instructor/tests/test_api.py
+0
-7
lms/djangoapps/instructor/tests/test_legacy_anon_csv.py
+0
-8
lms/djangoapps/instructor/views/api.py
+1
-7
lms/djangoapps/instructor/views/legacy.py
+1
-7
No files found.
lms/djangoapps/courseware/tests/test_views.py
View file @
ddf1874c
...
...
@@ -451,16 +451,11 @@ class ProgressPageTests(ModuleStoreTestCase):
MakoMiddleware
()
.
process_request
(
self
.
request
)
<<<<<<<
HEAD
course
=
CourseFactory
(
start
=
datetime
(
2013
,
9
,
16
,
7
,
17
,
28
))
self
.
course
=
modulestore
()
.
get_course
(
course
.
id
)
# pylint: disable=no-member
=======
course
=
CourseFactory
(
start
=
datetime
(
2013
,
9
,
16
,
7
,
17
,
28
),
grade_cutoffs
=
{
u'çü†øƒƒ'
:
0.75
,
'Pass'
:
0.5
},
)
self
.
course
=
modulestore
()
.
get_instance
(
course
.
id
,
course
.
location
)
# pylint: disable=no-member
>>>>>>>
edx
/
master
self
.
course
=
modulestore
()
.
get_course
(
course
.
id
)
# pylint: disable=no-member
self
.
chapter
=
ItemFactory
(
category
=
'chapter'
,
parent_location
=
self
.
course
.
location
)
# pylint: disable=no-member
self
.
section
=
ItemFactory
(
category
=
'sequential'
,
parent_location
=
self
.
chapter
.
location
)
...
...
@@ -469,15 +464,9 @@ class ProgressPageTests(ModuleStoreTestCase):
def
test_pure_ungraded_xblock
(
self
):
ItemFactory
(
category
=
'acid'
,
parent_location
=
self
.
vertical
.
location
)
<<<<<<<
HEAD
resp
=
views
.
progress
(
self
.
request
,
self
.
course
.
id
.
to_deprecated_string
())
self
.
assertEquals
(
resp
.
status_code
,
200
)
=======
resp
=
views
.
progress
(
self
.
request
,
self
.
course
.
id
)
self
.
assertEqual
(
resp
.
status_code
,
200
)
def
test_non_asci_grade_cutoffs
(
self
):
resp
=
views
.
progress
(
self
.
request
,
self
.
course
.
id
)
resp
=
views
.
progress
(
self
.
request
,
self
.
course
.
id
.
to_deprecated_string
()
)
self
.
assertEqual
(
resp
.
status_code
,
200
)
>>>>>>>
edx
/
master
lms/djangoapps/instructor/tests/test_api.py
View file @
ddf1874c
...
...
@@ -1330,15 +1330,8 @@ class TestInstructorAPILevelsDataDump(ModuleStoreTestCase, LoginEnrollmentTestCa
"""
Test the CSV output for the anonymized user ids.
"""
<<<<<<<
HEAD
url
=
reverse
(
'get_anon_ids'
,
kwargs
=
{
'course_id'
:
self
.
course
.
id
.
to_deprecated_string
()})
with
patch
(
'instructor.views.api.unique_id_for_user'
)
as
mock_unique
:
mock_unique
.
return_value
=
'42'
response
=
self
.
client
.
get
(
url
,
{})
=======
url
=
reverse
(
'get_anon_ids'
,
kwargs
=
{
'course_id'
:
self
.
course
.
id
})
response
=
self
.
client
.
get
(
url
,
{})
>>>>>>>
edx
/
master
self
.
assertEqual
(
response
[
'Content-Type'
],
'text/csv'
)
body
=
response
.
content
.
replace
(
'
\r
'
,
''
)
self
.
assertTrue
(
body
.
startswith
(
...
...
lms/djangoapps/instructor/tests/test_legacy_anon_csv.py
View file @
ddf1874c
...
...
@@ -56,16 +56,8 @@ class TestInstructorDashboardAnonCSV(ModuleStoreTestCase, LoginEnrollmentTestCas
@patch.object
(
instructor
.
views
.
legacy
,
'unique_id_for_user'
,
Mock
(
return_value
=
'41'
))
def
test_download_anon_csv
(
self
):
course
=
self
.
toy
<<<<<<<
HEAD
url
=
reverse
(
'instructor_dashboard_legacy'
,
kwargs
=
{
'course_id'
:
course
.
id
.
to_deprecated_string
()})
with
patch
(
'instructor.views.legacy.unique_id_for_user'
)
as
mock_unique
:
mock_unique
.
return_value
=
42
response
=
self
.
client
.
post
(
url
,
{
'action'
:
'Download CSV of all student anonymized IDs'
})
=======
url
=
reverse
(
'instructor_dashboard_legacy'
,
kwargs
=
{
'course_id'
:
course
.
id
})
response
=
self
.
client
.
post
(
url
,
{
'action'
:
'Download CSV of all student anonymized IDs'
})
>>>>>>>
edx
/
master
self
.
assertEqual
(
response
[
'Content-Type'
],
'text/csv'
)
body
=
response
.
content
.
replace
(
'
\r
'
,
''
)
...
...
lms/djangoapps/instructor/views/api.py
View file @
ddf1874c
...
...
@@ -630,15 +630,9 @@ def get_anon_ids(request, course_id): # pylint: disable=W0613
students
=
User
.
objects
.
filter
(
courseenrollment__course_id
=
course_id
,
)
.
order_by
(
'id'
)
<<<<<<<
HEAD
header
=
[
'User ID'
,
'Anonymized user ID'
]
rows
=
[[
s
.
id
,
unique_id_for_user
(
s
)]
for
s
in
students
]
return
csv_response
(
course_id
.
to_deprecated_string
()
.
replace
(
'/'
,
'-'
)
+
'-anon-ids.csv'
,
header
,
rows
)
=======
header
=
[
'User ID'
,
'Anonymized user ID'
,
'Course Specific Anonymized user ID'
]
rows
=
[[
s
.
id
,
unique_id_for_user
(
s
),
anonymous_id_for_user
(
s
,
course_id
)]
for
s
in
students
]
return
csv_response
(
course_id
.
replace
(
'/'
,
'-'
)
+
'-anon-ids.csv'
,
header
,
rows
)
>>>>>>>
edx
/
master
return
csv_response
(
course_id
.
to_deprecated_string
()
.
replace
(
'/'
,
'-'
)
+
'-anon-ids.csv'
,
header
,
rows
)
@ensure_csrf_cookie
...
...
lms/djangoapps/instructor/views/legacy.py
View file @
ddf1874c
...
...
@@ -692,15 +692,9 @@ def instructor_dashboard(request, course_id):
courseenrollment__course_id
=
course_key
,
)
.
order_by
(
'id'
)
<<<<<<<
HEAD
datatable
=
{
'header'
:
[
'User ID'
,
'Anonymized user ID'
]}
datatable
[
'data'
]
=
[[
s
.
id
,
unique_id_for_user
(
s
)]
for
s
in
students
]
return
return_csv
(
course_key
.
to_deprecated_string
()
.
replace
(
'/'
,
'-'
)
+
'-anon-ids.csv'
,
datatable
)
=======
datatable
=
{
'header'
:
[
'User ID'
,
'Anonymized user ID'
,
'Course Specific Anonymized user ID'
]}
datatable
[
'data'
]
=
[[
s
.
id
,
unique_id_for_user
(
s
),
anonymous_id_for_user
(
s
,
course_id
)]
for
s
in
students
]
return
return_csv
(
course_id
.
replace
(
'/'
,
'-'
)
+
'-anon-ids.csv'
,
datatable
)
>>>>>>>
edx
/
master
return
return_csv
(
course_id
.
to_deprecated_string
()
.
replace
(
'/'
,
'-'
)
+
'-anon-ids.csv'
,
datatable
)
#----------------------------------------
# Group management
...
...
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