'
# If this fails, it is likely because ENABLE_INSTRUCTOR_EMAIL is set to False
-<<<<<<< HEAD
- self.assertTrue(email_link in response.content)
-
- # Select the Email view of the instructor dash
- session = self.client.session
- session[u'idash_mode:{0}'.format(self.course.location.course_key.to_deprecated_string())] = 'Email'
- session.save()
- response = self.client.get(url)
- selected_email_link = '
'
- self.assertTrue(selected_email_link in response.content)
-=======
self.assertTrue(email_section in response.content)
->>>>>>> edx/master
@patch.dict(settings.FEATURES, {'ENABLE_INSTRUCTOR_EMAIL': True, 'REQUIRE_COURSE_EMAIL_AUTH': False})
def test_optout_course(self):
@@ -93,10 +77,6 @@ class TestOptoutCourseEmails(ModuleStoreTestCase):
self.client.login(username=self.instructor.username, password="test")
self.navigate_to_email_view()
-<<<<<<< HEAD
- url = reverse('instructor_dashboard', kwargs={'course_id': self.course.id.to_deprecated_string()})
-=======
->>>>>>> edx/master
test_email = {
'action': 'Send email',
'send_to': 'all',
@@ -125,10 +105,6 @@ class TestOptoutCourseEmails(ModuleStoreTestCase):
self.client.login(username=self.instructor.username, password="test")
self.navigate_to_email_view()
-<<<<<<< HEAD
- url = reverse('instructor_dashboard', kwargs={'course_id': self.course.id.to_deprecated_string()})
-=======
->>>>>>> edx/master
test_email = {
'action': 'Send email',
'send_to': 'all',
diff --git a/lms/djangoapps/bulk_email/tests/test_email.py b/lms/djangoapps/bulk_email/tests/test_email.py
index f4fa614efd..42bb39e850 100644
--- a/lms/djangoapps/bulk_email/tests/test_email.py
+++ b/lms/djangoapps/bulk_email/tests/test_email.py
@@ -71,34 +71,18 @@ class TestEmailSendFromDashboard(ModuleStoreTestCase):
self.client.login(username=self.instructor.username, password="test")
# Pull up email view on instructor dashboard
-<<<<<<< HEAD
self.url = reverse('instructor_dashboard', kwargs={'course_id': self.course.id.to_deprecated_string()})
-=======
- self.url = reverse('instructor_dashboard', kwargs={'course_id': self.course.id})
# Response loads the whole instructor dashboard, so no need to explicitly
# navigate to a particular email section
->>>>>>> edx/master
response = self.client.get(self.url)
email_section = '
'
# If this fails, it is likely because ENABLE_INSTRUCTOR_EMAIL is set to False
-<<<<<<< HEAD
- self.assertTrue(email_link in response.content)
-
- # Select the Email view of the instructor dash
- session = self.client.session
- session[u'idash_mode:{0}'.format(self.course.location.course_key.to_deprecated_string())] = 'Email'
- session.save()
- response = self.client.get(self.url)
- selected_email_link = '
Email'
- self.assertTrue(selected_email_link in response.content)
-=======
self.assertTrue(email_section in response.content)
- self.send_mail_url = reverse('send_email', kwargs={'course_id': self.course.id})
+ self.send_mail_url = reverse('send_email', kwargs={'course_id': self.course.id.to_deprecated_string()})
self.success_content = {
- 'course_id': self.course.id,
+ 'course_id': self.course.id.to_deprecated_string(),
'success': True,
}
->>>>>>> edx/master
def tearDown(self):
"""
diff --git a/lms/djangoapps/bulk_email/tests/test_err_handling.py b/lms/djangoapps/bulk_email/tests/test_err_handling.py
index 7388100f6f..d9942adf8a 100644
--- a/lms/djangoapps/bulk_email/tests/test_err_handling.py
+++ b/lms/djangoapps/bulk_email/tests/test_err_handling.py
@@ -55,16 +55,12 @@ class TestEmailErrors(ModuleStoreTestCase):
# load initial content (since we don't run migrations as part of tests):
call_command("loaddata", "course_email_template.json")
-<<<<<<< HEAD
self.url = reverse('instructor_dashboard', kwargs={'course_id': self.course.id.to_deprecated_string()})
-=======
- self.url = reverse('instructor_dashboard', kwargs={'course_id': self.course.id})
- self.send_mail_url = reverse('send_email', kwargs={'course_id': self.course.id})
+ self.send_mail_url = reverse('send_email', kwargs={'course_id': self.course.id.to_deprecated_string()})
self.success_content = {
- 'course_id': self.course.id,
+ 'course_id': self.course.id.to_deprecated_string(),
'success': True,
}
->>>>>>> edx/master
def tearDown(self):
patch.stopall()
diff --git a/lms/djangoapps/class_dashboard/tests/test_dashboard_data.py b/lms/djangoapps/class_dashboard/tests/test_dashboard_data.py
index 3e9adb950b..19f07aa476 100644
--- a/lms/djangoapps/class_dashboard/tests/test_dashboard_data.py
+++ b/lms/djangoapps/class_dashboard/tests/test_dashboard_data.py
@@ -252,20 +252,6 @@ class TestGetProblemGradeDistribution(ModuleStoreTestCase):
b_section_has_problem = get_array_section_has_problem(self.course.id)
self.assertEquals(b_section_has_problem[0], True)
-<<<<<<< HEAD:lms/djangoapps/class_dashboard/tests/test_dashboard_data.py
- def test_dashboard(self):
-
- url = reverse('instructor_dashboard', kwargs={'course_id': self.course.id.to_deprecated_string()})
- response = self.client.post(
- url,
- {
- 'idash_mode': 'Metrics'
- }
- )
- self.assertContains(response, '
Course Statistics At A Glance
')
-
-=======
->>>>>>> edx/master:lms/djangoapps/class_dashboard/tests/test_dashboard_data.py
def test_has_instructor_access_for_class(self):
"""
Test for instructor access
diff --git a/lms/djangoapps/courseware/courses.py b/lms/djangoapps/courseware/courses.py
index a7ab309952..0cf0af2f63 100644
--- a/lms/djangoapps/courseware/courses.py
+++ b/lms/djangoapps/courseware/courses.py
@@ -103,18 +103,9 @@ def get_opt_course_with_access(user, action, course_key):
def course_image_url(course):
-<<<<<<< HEAD
- """ Determine whether this is an XML or Studio-backed course, and return the appropriate course_image URL """
- if course.static_asset_path or modulestore().get_modulestore_type(course.id) == XML_MODULESTORE_TYPE:
- return '/static/' + (course.static_asset_path or getattr(course, 'data_dir', '')) + "/images/course_image.jpg"
- else:
- loc = StaticContent.compute_location(course.location.course_key, course.course_image)
- _path = loc.to_deprecated_string()
- return _path
-=======
"""Try to look up the image url for the course. If it's not found,
log an error and return the dead link"""
- if course.static_asset_path or modulestore().get_modulestore_type(course.location.course_id) == XML_MODULESTORE_TYPE:
+ if course.static_asset_path or modulestore().get_modulestore_type(course.id) == XML_MODULESTORE_TYPE:
# If we are a static course with the course_image attribute
# set different than the default, return that path so that
# courses can use custom course image paths, otherwise just
@@ -125,10 +116,9 @@ def course_image_url(course):
else:
url += '/images/course_image.jpg'
else:
- loc = StaticContent.compute_location(course.location.org, course.location.course, course.course_image)
- url = StaticContent.get_url_path_from_location(loc)
+ loc = StaticContent.compute_location(course.id, course.course_image)
+ url = loc.to_deprecated_string()
return url
->>>>>>> edx/master
def find_file(filesystem, dirs, filename):
diff --git a/lms/djangoapps/django_comment_client/base/views.py b/lms/djangoapps/django_comment_client/base/views.py
index b25c418b02..cea4f6786b 100644
--- a/lms/djangoapps/django_comment_client/base/views.py
+++ b/lms/djangoapps/django_comment_client/base/views.py
@@ -86,26 +86,15 @@ def create_thread(request, course_id, commentable_id):
if 'body' not in post or not post['body'].strip():
return JsonError(_("Body can't be empty"))
-<<<<<<< HEAD
- thread = cc.Thread(**extract(post, ['body', 'title']))
- thread.update_attributes(**{
- 'anonymous': anonymous,
- 'anonymous_to_peers': anonymous_to_peers,
- 'commentable_id': commentable_id,
- 'course_id': course_id.to_deprecated_string(),
- 'user_id': request.user.id,
- })
-=======
thread = cc.Thread(
anonymous=anonymous,
anonymous_to_peers=anonymous_to_peers,
commentable_id=commentable_id,
- course_id=course_id,
+ course_id=course_id.to_deprecated_string(),
user_id=request.user.id,
body=post["body"],
title=post["title"]
)
->>>>>>> edx/master
user = cc.User.from_django_user(request.user)
@@ -190,26 +179,15 @@ def _create_comment(request, course_key, thread_id=None, parent_id=None):
else:
anonymous_to_peers = False
-<<<<<<< HEAD
- comment.update_attributes(**{
- 'anonymous': anonymous,
- 'anonymous_to_peers': anonymous_to_peers,
- 'user_id': request.user.id,
- 'course_id': course_key.to_deprecated_string(),
- 'thread_id': thread_id,
- 'parent_id': parent_id,
- })
-=======
comment = cc.Comment(
anonymous=anonymous,
anonymous_to_peers=anonymous_to_peers,
user_id=request.user.id,
- course_id=course_id,
+ course_id=course_id.to_deprecated_string(),
thread_id=thread_id,
parent_id=parent_id,
body=post["body"]
)
->>>>>>> edx/master
comment.save()
if post.get('auto_subscribe', 'false').lower() == 'true':
user = cc.User.from_django_user(request.user)
diff --git a/lms/djangoapps/instructor/tests/test_email.py b/lms/djangoapps/instructor/tests/test_email.py
index 26307dbab1..5691076708 100644
--- a/lms/djangoapps/instructor/tests/test_email.py
+++ b/lms/djangoapps/instructor/tests/test_email.py
@@ -35,11 +35,7 @@ class TestNewInstructorDashboardEmailViewMongoBacked(ModuleStoreTestCase):
self.client.login(username=instructor.username, password="test")
# URL for instructor dash
-<<<<<<< HEAD
- self.url = reverse('instructor_dashboard_2', kwargs={'course_id': self.course.id.to_deprecated_string()})
-=======
- self.url = reverse('instructor_dashboard', kwargs={'course_id': self.course.id})
->>>>>>> edx/master
+ self.url = reverse('instructor_dashboard', kwargs={'course_id': self.course.id.to_deprecated_string()})
# URL for email view
self.email_link = '
Email'
@@ -127,11 +123,7 @@ class TestNewInstructorDashboardEmailViewXMLBacked(ModuleStoreTestCase):
self.client.login(username=instructor.username, password="test")
# URL for instructor dash
-<<<<<<< HEAD
- self.url = reverse('instructor_dashboard_2', kwargs={'course_id': self.course_key.to_deprecated_string()})
-=======
- self.url = reverse('instructor_dashboard', kwargs={'course_id': self.course_name})
->>>>>>> edx/master
+ self.url = reverse('instructor_dashboard', kwargs={'course_id': self.course_key.to_deprecated_string()})
# URL for email view
self.email_link = '
Email'
diff --git a/lms/djangoapps/instructor/tests/test_legacy_anon_csv.py b/lms/djangoapps/instructor/tests/test_legacy_anon_csv.py
index 79761da274..70a055d8ec 100644
--- a/lms/djangoapps/instructor/tests/test_legacy_anon_csv.py
+++ b/lms/djangoapps/instructor/tests/test_legacy_anon_csv.py
@@ -53,11 +53,7 @@ class TestInstructorDashboardAnonCSV(ModuleStoreTestCase, LoginEnrollmentTestCas
def test_download_anon_csv(self):
course = self.toy
-<<<<<<< HEAD
- url = reverse('instructor_dashboard', kwargs={'course_id': course.id.to_deprecated_string()})
-=======
- url = reverse('instructor_dashboard_legacy', kwargs={'course_id': course.id})
->>>>>>> edx/master
+ 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
diff --git a/lms/djangoapps/instructor/tests/test_legacy_download_csv.py b/lms/djangoapps/instructor/tests/test_legacy_download_csv.py
index af5949793e..21068835a1 100644
--- a/lms/djangoapps/instructor/tests/test_legacy_download_csv.py
+++ b/lms/djangoapps/instructor/tests/test_legacy_download_csv.py
@@ -50,11 +50,7 @@ class TestInstructorDashboardGradeDownloadCSV(ModuleStoreTestCase, LoginEnrollme
def test_download_grades_csv(self):
course = self.toy
-<<<<<<< HEAD
- url = reverse('instructor_dashboard', kwargs={'course_id': course.id.to_deprecated_string()})
-=======
- url = reverse('instructor_dashboard_legacy', kwargs={'course_id': course.id})
->>>>>>> edx/master
+ url = reverse('instructor_dashboard_legacy', kwargs={'course_id': course.id.to_deprecated_string()})
msg = "url = {0}\n".format(url)
response = self.client.post(url, {'action': 'Download CSV of all student grades for this course'})
msg += "instructor dashboard download csv grades: response = '{0}'\n".format(response)
diff --git a/lms/djangoapps/instructor/tests/test_legacy_email.py b/lms/djangoapps/instructor/tests/test_legacy_email.py
index 480004627f..7a5bb183e8 100644
--- a/lms/djangoapps/instructor/tests/test_legacy_email.py
+++ b/lms/djangoapps/instructor/tests/test_legacy_email.py
@@ -32,11 +32,7 @@ class TestInstructorDashboardEmailView(ModuleStoreTestCase):
self.client.login(username=instructor.username, password="test")
# URL for instructor dash
-<<<<<<< HEAD
- self.url = reverse('instructor_dashboard', kwargs={'course_id': self.course.id.to_deprecated_string()})
-=======
- self.url = reverse('instructor_dashboard_legacy', kwargs={'course_id': self.course.id})
->>>>>>> edx/master
+ self.url = reverse('instructor_dashboard_legacy', kwargs={'course_id': self.course.id.to_deprecated_string()})
# URL for email view
self.email_link = '
Email'
diff --git a/lms/djangoapps/instructor/tests/test_legacy_enrollment.py b/lms/djangoapps/instructor/tests/test_legacy_enrollment.py
index 2c4ccd5516..dbfd13e7f5 100644
--- a/lms/djangoapps/instructor/tests/test_legacy_enrollment.py
+++ b/lms/djangoapps/instructor/tests/test_legacy_enrollment.py
@@ -52,11 +52,7 @@ class TestInstructorEnrollsStudent(ModuleStoreTestCase, LoginEnrollmentTestCase)
course = self.course
# Run the Un-enroll students command
-<<<<<<< HEAD
- url = reverse('instructor_dashboard', kwargs={'course_id': course.id.to_deprecated_string()})
-=======
- url = reverse('instructor_dashboard_legacy', kwargs={'course_id': course.id})
->>>>>>> edx/master
+ url = reverse('instructor_dashboard_legacy', kwargs={'course_id': course.id.to_deprecated_string()})
response = self.client.post(
url,
{
@@ -88,11 +84,7 @@ class TestInstructorEnrollsStudent(ModuleStoreTestCase, LoginEnrollmentTestCase)
course = self.course
# Run the Enroll students command
-<<<<<<< HEAD
- url = reverse('instructor_dashboard', kwargs={'course_id': course.id.to_deprecated_string()})
-=======
- url = reverse('instructor_dashboard_legacy', kwargs={'course_id': course.id})
->>>>>>> edx/master
+ url = reverse('instructor_dashboard_legacy', kwargs={'course_id': course.id.to_deprecated_string()})
response = self.client.post(url, {'action': 'Enroll multiple students', 'multiple_students': 'student1_1@test.com, student1_2@test.com', 'auto_enroll': 'on'})
# Check the page output
@@ -137,11 +129,7 @@ class TestInstructorEnrollsStudent(ModuleStoreTestCase, LoginEnrollmentTestCase)
course = self.course
-<<<<<<< HEAD
- url = reverse('instructor_dashboard', kwargs={'course_id': course.id.to_deprecated_string()})
-=======
- url = reverse('instructor_dashboard_legacy', kwargs={'course_id': course.id})
->>>>>>> edx/master
+ url = reverse('instructor_dashboard_legacy', kwargs={'course_id': course.id.to_deprecated_string()})
response = self.client.post(url, {'action': 'Enroll multiple students', 'multiple_students': 'student0@test.com', 'auto_enroll': 'on'})
self.assertContains(response, '
student0@test.com | ')
self.assertContains(response, '
already enrolled | ')
@@ -154,11 +142,7 @@ class TestInstructorEnrollsStudent(ModuleStoreTestCase, LoginEnrollmentTestCase)
course = self.course
# Run the Enroll students command
-<<<<<<< HEAD
- url = reverse('instructor_dashboard', kwargs={'course_id': course.id.to_deprecated_string()})
-=======
- url = reverse('instructor_dashboard_legacy', kwargs={'course_id': course.id})
->>>>>>> edx/master
+ url = reverse('instructor_dashboard_legacy', kwargs={'course_id': course.id.to_deprecated_string()})
response = self.client.post(url, {'action': 'Enroll multiple students', 'multiple_students': 'student2_1@test.com, student2_2@test.com'})
# Check the page output
@@ -215,11 +199,7 @@ class TestInstructorEnrollsStudent(ModuleStoreTestCase, LoginEnrollmentTestCase)
# Create activated, but not enrolled, user
UserFactory.create(username="student3_0", email="student3_0@test.com", first_name='Autoenrolled')
-<<<<<<< HEAD
- url = reverse('instructor_dashboard', kwargs={'course_id': course.id.to_deprecated_string()})
-=======
- url = reverse('instructor_dashboard_legacy', kwargs={'course_id': course.id})
->>>>>>> edx/master
+ url = reverse('instructor_dashboard_legacy', kwargs={'course_id': course.id.to_deprecated_string()})
response = self.client.post(url, {'action': 'Enroll multiple students', 'multiple_students': 'student3_0@test.com, student3_1@test.com, student3_2@test.com', 'auto_enroll': 'on', 'email_students': 'on'})
# Check the page output
@@ -274,11 +254,7 @@ class TestInstructorEnrollsStudent(ModuleStoreTestCase, LoginEnrollmentTestCase)
cea = CourseEnrollmentAllowed(email='student4_0@test.com', course_id=course.id)
cea.save()
-<<<<<<< HEAD
- url = reverse('instructor_dashboard', kwargs={'course_id': course.id.to_deprecated_string()})
-=======
- url = reverse('instructor_dashboard_legacy', kwargs={'course_id': course.id})
->>>>>>> edx/master
+ url = reverse('instructor_dashboard_legacy', kwargs={'course_id': course.id.to_deprecated_string()})
response = self.client.post(url, {'action': 'Unenroll multiple students', 'multiple_students': 'student4_0@test.com, student2@test.com, student3@test.com', 'email_students': 'on'})
# Check the page output
@@ -325,11 +301,7 @@ class TestInstructorEnrollsStudent(ModuleStoreTestCase, LoginEnrollmentTestCase)
# Create activated, but not enrolled, user
UserFactory.create(username="student5_0", email="student5_0@test.com", first_name="ShibTest", last_name="Enrolled")
-<<<<<<< HEAD
- url = reverse('instructor_dashboard', kwargs={'course_id': course.id.to_deprecated_string()})
-=======
- url = reverse('instructor_dashboard_legacy', kwargs={'course_id': course.id})
->>>>>>> edx/master
+ url = reverse('instructor_dashboard_legacy', kwargs={'course_id': course.id.to_deprecated_string()})
response = self.client.post(url, {'action': 'Enroll multiple students', 'multiple_students': 'student5_0@test.com, student5_1@test.com', 'auto_enroll': 'on', 'email_students': 'on'})
# Check the page output
diff --git a/lms/djangoapps/instructor/tests/test_legacy_forum_admin.py b/lms/djangoapps/instructor/tests/test_legacy_forum_admin.py
index bc67ef4928..a236742eeb 100644
--- a/lms/djangoapps/instructor/tests/test_legacy_forum_admin.py
+++ b/lms/djangoapps/instructor/tests/test_legacy_forum_admin.py
@@ -68,11 +68,7 @@ class TestInstructorDashboardForumAdmin(ModuleStoreTestCase, LoginEnrollmentTest
def test_add_forum_admin_users_for_unknown_user(self):
course = self.toy
-<<<<<<< HEAD
- url = reverse('instructor_dashboard', kwargs={'course_id': course.id.to_deprecated_string()})
-=======
- url = reverse('instructor_dashboard_legacy', kwargs={'course_id': course.id})
->>>>>>> edx/master
+ url = reverse('instructor_dashboard_legacy', kwargs={'course_id': course.id.to_deprecated_string()})
username = 'unknown'
for action in ['Add', 'Remove']:
for rolename in FORUM_ROLES:
@@ -81,11 +77,7 @@ class TestInstructorDashboardForumAdmin(ModuleStoreTestCase, LoginEnrollmentTest
def test_add_forum_admin_users_for_missing_roles(self):
course = self.toy
-<<<<<<< HEAD
- url = reverse('instructor_dashboard', kwargs={'course_id': course.id.to_deprecated_string()})
-=======
- url = reverse('instructor_dashboard_legacy', kwargs={'course_id': course.id})
->>>>>>> edx/master
+ url = reverse('instructor_dashboard_legacy', kwargs={'course_id': course.id.to_deprecated_string()})
username = 'u1'
for action in ['Add', 'Remove']:
for rolename in FORUM_ROLES:
@@ -95,11 +87,7 @@ class TestInstructorDashboardForumAdmin(ModuleStoreTestCase, LoginEnrollmentTest
def test_remove_forum_admin_users_for_missing_users(self):
course = self.toy
self.initialize_roles(course.id)
-<<<<<<< HEAD
- url = reverse('instructor_dashboard', kwargs={'course_id': course.id.to_deprecated_string()})
-=======
- url = reverse('instructor_dashboard_legacy', kwargs={'course_id': course.id})
->>>>>>> edx/master
+ url = reverse('instructor_dashboard_legacy', kwargs={'course_id': course.id.to_deprecated_string()})
username = 'u1'
action = 'Remove'
for rolename in FORUM_ROLES:
@@ -109,11 +97,7 @@ class TestInstructorDashboardForumAdmin(ModuleStoreTestCase, LoginEnrollmentTest
def test_add_and_remove_forum_admin_users(self):
course = self.toy
self.initialize_roles(course.id)
-<<<<<<< HEAD
- url = reverse('instructor_dashboard', kwargs={'course_id': course.id.to_deprecated_string()})
-=======
- url = reverse('instructor_dashboard_legacy', kwargs={'course_id': course.id})
->>>>>>> edx/master
+ url = reverse('instructor_dashboard_legacy', kwargs={'course_id': course.id.to_deprecated_string()})
username = 'u2'
for rolename in FORUM_ROLES:
response = self.client.post(url, {'action': action_name('Add', rolename), FORUM_ADMIN_USER[rolename]: username})
@@ -126,11 +110,7 @@ class TestInstructorDashboardForumAdmin(ModuleStoreTestCase, LoginEnrollmentTest
def test_add_and_read_forum_admin_users(self):
course = self.toy
self.initialize_roles(course.id)
-<<<<<<< HEAD
- url = reverse('instructor_dashboard', kwargs={'course_id': course.id.to_deprecated_string()})
-=======
- url = reverse('instructor_dashboard_legacy', kwargs={'course_id': course.id})
->>>>>>> edx/master
+ url = reverse('instructor_dashboard_legacy', kwargs={'course_id': course.id.to_deprecated_string()})
username = 'u2'
for rolename in FORUM_ROLES:
# perform an add, and follow with a second identical add:
@@ -142,11 +122,7 @@ class TestInstructorDashboardForumAdmin(ModuleStoreTestCase, LoginEnrollmentTest
def test_add_nonstaff_forum_admin_users(self):
course = self.toy
self.initialize_roles(course.id)
-<<<<<<< HEAD
- url = reverse('instructor_dashboard', kwargs={'course_id': course.id.to_deprecated_string()})
-=======
- url = reverse('instructor_dashboard_legacy', kwargs={'course_id': course.id})
->>>>>>> edx/master
+ url = reverse('instructor_dashboard_legacy', kwargs={'course_id': course.id.to_deprecated_string()})
username = 'u1'
rolename = FORUM_ROLE_ADMINISTRATOR
response = self.client.post(url, {'action': action_name('Add', rolename), FORUM_ADMIN_USER[rolename]: username})
@@ -155,11 +131,7 @@ class TestInstructorDashboardForumAdmin(ModuleStoreTestCase, LoginEnrollmentTest
def test_list_forum_admin_users(self):
course = self.toy
self.initialize_roles(course.id)
-<<<<<<< HEAD
- url = reverse('instructor_dashboard', kwargs={'course_id': course.id.to_deprecated_string()})
-=======
- url = reverse('instructor_dashboard_legacy', kwargs={'course_id': course.id})
->>>>>>> edx/master
+ url = reverse('instructor_dashboard_legacy', kwargs={'course_id': course.id.to_deprecated_string()})
username = 'u2'
added_roles = [FORUM_ROLE_STUDENT] # u2 is already added as a student to the discussion forums
self.assertTrue(has_forum_access(username, course.id, 'Student'))
diff --git a/lms/djangoapps/instructor/tests/test_legacy_gradebook.py b/lms/djangoapps/instructor/tests/test_legacy_gradebook.py
index b62a5aed49..522e0dac2f 100644
--- a/lms/djangoapps/instructor/tests/test_legacy_gradebook.py
+++ b/lms/djangoapps/instructor/tests/test_legacy_gradebook.py
@@ -68,14 +68,10 @@ class TestGradebook(ModuleStoreTestCase):
module_state_key=item.location
)
-<<<<<<< HEAD
self.response = self.client.get(reverse(
- 'gradebook',
+ 'gradebook_legacy',
args=(self.course.id.to_deprecated_string(),)
))
-=======
- self.response = self.client.get(reverse('gradebook_legacy', args=(self.course.id,)))
->>>>>>> edx/master
def test_response_code(self):
self.assertEquals(self.response.status_code, 200)
diff --git a/lms/djangoapps/instructor/tests/test_legacy_raw_download_csv.py b/lms/djangoapps/instructor/tests/test_legacy_raw_download_csv.py
index d54c88c59f..0dee6607c7 100644
--- a/lms/djangoapps/instructor/tests/test_legacy_raw_download_csv.py
+++ b/lms/djangoapps/instructor/tests/test_legacy_raw_download_csv.py
@@ -45,11 +45,7 @@ class TestRawGradeCSV(TestSubmittingProblems):
resp = self.submit_question_answer('p2', {'2_1': 'Correct'})
self.assertEqual(resp.status_code, 200)
-<<<<<<< HEAD
- url = reverse('instructor_dashboard', kwargs={'course_id': self.course.id.to_deprecated_string()})
-=======
- url = reverse('instructor_dashboard_legacy', kwargs={'course_id': self.course.id})
->>>>>>> edx/master
+ url = reverse('instructor_dashboard_legacy', kwargs={'course_id': self.course.id.to_deprecated_string()})
msg = "url = {0}\n".format(url)
response = self.client.post(url, {'action': 'Download CSV of all RAW grades'})
msg += "instructor dashboard download raw csv grades: response = '{0}'\n".format(response)
diff --git a/lms/djangoapps/instructor/tests/test_legacy_reset.py b/lms/djangoapps/instructor/tests/test_legacy_reset.py
index 0ae56429b7..02e45c6131 100644
--- a/lms/djangoapps/instructor/tests/test_legacy_reset.py
+++ b/lms/djangoapps/instructor/tests/test_legacy_reset.py
@@ -61,11 +61,7 @@ class InstructorResetStudentStateTest(ModuleStoreTestCase, LoginEnrollmentTestCa
sub_api.set_score(submission['uuid'], 1, 2)
# Delete student state using the instructor dash
-<<<<<<< HEAD
- url = reverse('instructor_dashboard', kwargs={'course_id': self.course.id.to_deprecated_string()})
-=======
- url = reverse('instructor_dashboard_legacy', kwargs={'course_id': self.course.id})
->>>>>>> edx/master
+ url = reverse('instructor_dashboard_legacy', kwargs={'course_id': self.course.id.to_deprecated_string()})
response = self.client.post(url, {
'action': 'Delete student state for module',
'unique_student_identifier': self.student.email,
diff --git a/lms/djangoapps/instructor/views/api.py b/lms/djangoapps/instructor/views/api.py
index ff5ee9aace..68cc25dd1d 100644
--- a/lms/djangoapps/instructor/views/api.py
+++ b/lms/djangoapps/instructor/views/api.py
@@ -1082,15 +1082,11 @@ def send_email(request, course_id):
# Submit the task, so that the correct InstructorTask object gets created (for monitoring purposes)
instructor_task.api.submit_bulk_course_email(request, course_id, email.id) # pylint: disable=E1101
-<<<<<<< HEAD
- response_payload = {'course_id': course_id.to_deprecated_string()}
-=======
response_payload = {
- 'course_id': course_id,
+ 'course_id': course_id.to_deprecated_string(),
'success': True,
}
->>>>>>> edx/master
return JsonResponse(response_payload)
diff --git a/lms/djangoapps/instructor/views/instructor_dashboard.py b/lms/djangoapps/instructor/views/instructor_dashboard.py
index 08d8ac3656..5e86c9b910 100644
--- a/lms/djangoapps/instructor/views/instructor_dashboard.py
+++ b/lms/djangoapps/instructor/views/instructor_dashboard.py
@@ -83,11 +83,7 @@ def instructor_dashboard_2(request, course_id):
context = {
'course': course,
-<<<<<<< HEAD
- 'old_dashboard_url': reverse('instructor_dashboard', kwargs={'course_id': course_key.to_deprecated_string()}),
-=======
- 'old_dashboard_url': reverse('instructor_dashboard_legacy', kwargs={'course_id': course_id}),
->>>>>>> edx/master
+ 'old_dashboard_url': reverse('instructor_dashboard_legacy', kwargs={'course_id': course_id.to_deprecated_string()}),
'studio_url': studio_url,
'sections': sections,
'disable_buttons': disable_buttons,
@@ -169,21 +165,13 @@ def _section_student_admin(course_key, access):
'section_key': 'student_admin',
'section_display_name': _('Student Admin'),
'access': access,
-<<<<<<< HEAD
- 'get_student_progress_url_url': reverse('get_student_progress_url', kwargs={'course_id': course_key.to_deprecated_string()}),
- 'enrollment_url': reverse('students_update_enrollment', kwargs={'course_id': course_key.to_deprecated_string()}),
- 'reset_student_attempts_url': reverse('reset_student_attempts', kwargs={'course_id': course_key.to_deprecated_string()}),
- 'rescore_problem_url': reverse('rescore_problem', kwargs={'course_id': course_key.to_deprecated_string()}),
- 'list_instructor_tasks_url': reverse('list_instructor_tasks', kwargs={'course_id': course_key.to_deprecated_string()}),
-=======
'is_small_course': is_small_course,
- 'get_student_progress_url_url': reverse('get_student_progress_url', kwargs={'course_id': course_id}),
- 'enrollment_url': reverse('students_update_enrollment', kwargs={'course_id': course_id}),
- 'reset_student_attempts_url': reverse('reset_student_attempts', kwargs={'course_id': course_id}),
- 'rescore_problem_url': reverse('rescore_problem', kwargs={'course_id': course_id}),
- 'list_instructor_tasks_url': reverse('list_instructor_tasks', kwargs={'course_id': course_id}),
- 'spoc_gradebook_url': reverse('spoc_gradebook', kwargs={'course_id': course_id}),
->>>>>>> edx/master
+ 'get_student_progress_url_url': reverse('get_student_progress_url', kwargs={'course_id': course_id.to_deprecated_string()}),
+ 'enrollment_url': reverse('students_update_enrollment', kwargs={'course_id': course_id.to_deprecated_string()}),
+ 'reset_student_attempts_url': reverse('reset_student_attempts', kwargs={'course_id': course_id.to_deprecated_string()}),
+ 'rescore_problem_url': reverse('rescore_problem', kwargs={'course_id': course_id.to_deprecated_string()}),
+ 'list_instructor_tasks_url': reverse('list_instructor_tasks', kwargs={'course_id': course_id.to_deprecated_string()}),
+ 'spoc_gradebook_url': reverse('spoc_gradebook', kwargs={'course_id': course_id.to_deprecated_string()}),
}
return section_data
diff --git a/lms/djangoapps/instructor/views/legacy.py b/lms/djangoapps/instructor/views/legacy.py
index 2fcadc3027..aedd4990ea 100644
--- a/lms/djangoapps/instructor/views/legacy.py
+++ b/lms/djangoapps/instructor/views/legacy.py
@@ -1038,14 +1038,7 @@ def instructor_dashboard(request, course_id):
'metrics_results': metrics_results,
}
-<<<<<<< HEAD
- if settings.FEATURES.get('ENABLE_INSTRUCTOR_BETA_DASHBOARD'):
- context['beta_dashboard_url'] = reverse(
- 'instructor_dashboard_2', kwargs={'course_id': course_key.to_deprecated_string()}
- )
-=======
- context['standard_dashboard_url'] = reverse('instructor_dashboard', kwargs={'course_id': course_id})
->>>>>>> edx/master
+ context['standard_dashboard_url'] = reverse('instructor_dashboard', kwargs={'course_id': course_id.to_deprecated_string()})
return render_to_response('courseware/instructor_dashboard.html', context)