Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lms/djangoapps/courseware/tests/test_course_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ def setUp(self):

def test_logged_in(self):
self.setup_user()
url = reverse('info', args=[self.course.id])
url = reverse('info', args=[self.course.id.to_deprecated_string()])
resp = self.client.get(url)
self.assertEqual(resp.status_code, 200)
self.assertIn("OOGIE BLOOGIE", resp.content)

def test_anonymous_user(self):
url = reverse('info', args=[self.course.id])
url = reverse('info', args=[self.course.id.to_deprecated_string()])
resp = self.client.get(url)
self.assertEqual(resp.status_code, 200)
self.assertNotIn("OOGIE BLOOGIE", resp.content)
Expand Down
2 changes: 1 addition & 1 deletion lms/djangoapps/courseware/tests/test_masquerade.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def make_instructor(course):

def get_cw_section(self):
url = reverse('courseware_section',
kwargs={'course_id': self.graded_course.id,
kwargs={'course_id': self.graded_course.id.to_deprecated_string(),
'chapter': 'GradedChapter',
'section': 'Homework1'})

Expand Down
2 changes: 1 addition & 1 deletion lms/djangoapps/courseware/tests/test_navigation.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ def test_redirects_second_time(self):
}))

resp = self.client.get(reverse('courseware',
kwargs={'course_id': self.course.id}))
kwargs={'course_id': self.course.id.to_deprecated_string()}))

self.assertRedirects(resp, reverse('courseware_chapter',
kwargs={
Expand Down
2 changes: 1 addition & 1 deletion lms/djangoapps/courseware/tests/test_split_module.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ def _check_split_test(self, user_tag):

resp = self.client.get(reverse(
'courseware_section',
kwargs={'course_id': self.course.id,
kwargs={'course_id': self.course.id.to_deprecated_string(),
'chapter': self.chapter.url_name,
'section': self.sequential.url_name}
))
Expand Down
6 changes: 3 additions & 3 deletions lms/djangoapps/courseware/tests/test_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ def test_course_about_in_cart(self):
in_cart_span = '<span class="add-to-cart">'
# don't mock this course due to shopping cart existence checking
course = CourseFactory.create(org="new", number="unenrolled", display_name="course")
request = self.request_factory.get(reverse('about_course', args=[course.id]))
request = self.request_factory.get(reverse('about_course', args=[course.id.to_deprecated_string()]))
request.user = AnonymousUser()
response = views.course_about(request, course.id.to_deprecated_string())
self.assertEqual(response.status_code, 200)
Expand Down Expand Up @@ -244,7 +244,7 @@ def test_submission_history_xss(self):

# try it with an existing user and a malicious location
url = reverse('submission_history', kwargs={
'course_id': self.course_id,
'course_id': self.course_id.to_deprecated_string(),
'student_username': 'dummy',
'location': '<script>alert("hello");</script>'
})
Expand All @@ -253,7 +253,7 @@ def test_submission_history_xss(self):

# try it with a malicious user and a non-existent location
url = reverse('submission_history', kwargs={
'course_id': self.course_id,
'course_id': self.course_id.to_deprecated_string(),
'student_username': '<script>alert("hello");</script>',
'location': 'dummy'
})
Expand Down
2 changes: 1 addition & 1 deletion lms/templates/courseware/course_about.html
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
};
$("#add_to_cart_post").click(function(event){
$.ajax({
url: "${reverse('add_course_to_cart', args=[course.id])}",
url: "${reverse('add_course_to_cart', args=[course.id.to_deprecated_string()])}",
type: "POST",
/* Rant: HAD TO USE COMPLETE B/C PROMISE.DONE FOR SOME REASON DOES NOT WORK ON THIS PAGE. */
complete: add_course_complete_handler
Expand Down
4 changes: 2 additions & 2 deletions lms/templates/courseware/instructor_dashboard.html
Original file line number Diff line number Diff line change
Expand Up @@ -187,11 +187,11 @@ <h2>${_("Grade Downloads")}</h2>
% endif

<p>
<a href="${reverse('gradebook', kwargs=dict(course_id=course.id))}" class="${'is-disabled' if disable_buttons else ''}">${_("Gradebook")}</a>
<a href="${reverse('gradebook', kwargs=dict(course_id=course.id.to_deprecated_string()))}" class="${'is-disabled' if disable_buttons else ''}">${_("Gradebook")}</a>
</p>

<p>
<a href="${reverse('grade_summary', kwargs=dict(course_id=course.id))}" class="${'is-disabled' if disable_buttons else ''}">${_("Grade summary")}</a>
<a href="${reverse('grade_summary', kwargs=dict(course_id=course.id.to_deprecated_string()))}" class="${'is-disabled' if disable_buttons else ''}">${_("Grade summary")}</a>
</p>

<p>
Expand Down
2 changes: 1 addition & 1 deletion lms/templates/courseware/progress.html
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ <h2>${ chapter['display_name'] }</h2>
percentageString = "{0:.0%}".format( float(earned)/total) if earned > 0 and total > 0 else ""
%>

<h3><a href="${reverse('courseware_section', kwargs=dict(course_id=course.id, chapter=chapter['url_name'], section=section['url_name']))}">
<h3><a href="${reverse('courseware_section', kwargs=dict(course_id=course.id.to_deprecated_string(), chapter=chapter['url_name'], section=section['url_name']))}">
${ section['display_name'] }
%if total > 0 or earned > 0:
<span class="sr">
Expand Down