Fix merge conflicts
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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(
|
||||
|
||||
@@ -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', '')
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user