From e7900859b6d1a39a949362a5650127f4fe3de121 Mon Sep 17 00:00:00 2001
From: Calen Pennington
Date: Wed, 6 Mar 2013 15:11:08 -0500
Subject: [PATCH] Remove the 'title' alias for lms.display_name
---
cms/djangoapps/contentstore/views.py | 2 +-
common/lib/xmodule/xmodule/course_module.py | 4 -
lms/djangoapps/course_wiki/views.py | 2 +-
lms/djangoapps/courseware/views.py | 2 +-
lms/templates/dashboard.html | 18 +--
lms/templates/discussion/index.html | 2 +-
lms/templates/navigation.html | 2 +-
lms/templates/test_center_register.html | 154 ++++++++++----------
8 files changed, 91 insertions(+), 95 deletions(-)
diff --git a/cms/djangoapps/contentstore/views.py b/cms/djangoapps/contentstore/views.py
index 1da1069676..bc1a9a19eb 100644
--- a/cms/djangoapps/contentstore/views.py
+++ b/cms/djangoapps/contentstore/views.py
@@ -135,7 +135,7 @@ def index(request):
return render_to_response('index.html', {
'new_course_template': Location('i4x', 'edx', 'templates', 'course', 'Empty'),
- 'courses': [(course.title,
+ 'courses': [(course.lms.display_name,
reverse('course_index', args=[
course.location.org,
course.location.course,
diff --git a/common/lib/xmodule/xmodule/course_module.py b/common/lib/xmodule/xmodule/course_module.py
index b9d3b34cb3..bd76edf540 100644
--- a/common/lib/xmodule/xmodule/course_module.py
+++ b/common/lib/xmodule/xmodule/course_module.py
@@ -741,10 +741,6 @@ class CourseDescriptor(SequenceDescriptor):
exams = [exam for exam in self.test_center_exams if exam.exam_series_code == exam_series_code]
return exams[0] if len(exams) == 1 else None
- @property
- def title(self):
- return self.display_name
-
@property
def number(self):
return self.location.course
diff --git a/lms/djangoapps/course_wiki/views.py b/lms/djangoapps/course_wiki/views.py
index 6e9f2e38de..febe101071 100644
--- a/lms/djangoapps/course_wiki/views.py
+++ b/lms/djangoapps/course_wiki/views.py
@@ -95,7 +95,7 @@ def course_wiki_redirect(request, course_id):
root,
course_slug,
title=course_slug,
- content="This is the wiki for **{0}**'s _{1}_.".format(course.org, course.title),
+ content="This is the wiki for **{0}**'s _{1}_.".format(course.org, course.lms.display_name),
user_message="Course page automatically created.",
user=None,
ip_address=None,
diff --git a/lms/djangoapps/courseware/views.py b/lms/djangoapps/courseware/views.py
index 7930c9de19..c851628c1d 100644
--- a/lms/djangoapps/courseware/views.py
+++ b/lms/djangoapps/courseware/views.py
@@ -282,7 +282,7 @@ def index(request, course_id, chapter=None, section=None,
context = {
'csrf': csrf(request)['csrf_token'],
'accordion': render_accordion(request, course, chapter, section, model_data_cache),
- 'COURSE_TITLE': course.title,
+ 'COURSE_TITLE': course.lms.display_name,
'course': course,
'init': '',
'content': '',
diff --git a/lms/templates/dashboard.html b/lms/templates/dashboard.html
index 18275636ac..18a9cac892 100644
--- a/lms/templates/dashboard.html
+++ b/lms/templates/dashboard.html
@@ -199,7 +199,7 @@
%>
-
+
@@ -216,7 +216,7 @@
% endif
${get_course_about_section(course, 'university')}
-
+
<%
@@ -226,7 +226,7 @@
%>
% if testcenter_exam_info is not None:
- % if registration is None and testcenter_exam_info.is_registering():
+ % if registration is None and testcenter_exam_info.is_registering():
Register for Pearson exam
Registration for the Pearson exam is now open and will close on ${testcenter_exam_info.registration_end_date_text}
@@ -234,25 +234,25 @@
% endif
% if registration is not None:
- % if registration.is_accepted:
+ % if registration.is_accepted:
% endif
- % if registration.is_rejected:
+ % if registration.is_rejected:
% endif
- % if not registration.is_accepted and not registration.is_rejected:
+ % if not registration.is_accepted and not registration.is_rejected:
% endif
% endif
- % endif
+ % endif
<%
cert_status = cert_statuses.get(course.id)
@@ -314,13 +314,13 @@
View Archived Course
% else:
View Course
- % endif
+ % endif
% endif
Unregister
-
+
% endfor
% else:
diff --git a/lms/templates/discussion/index.html b/lms/templates/discussion/index.html
index e30ee4a2db..25d68bf85e 100644
--- a/lms/templates/discussion/index.html
+++ b/lms/templates/discussion/index.html
@@ -26,7 +26,7 @@
-
${course.title} Discussion
+ ${course.lms.display_name} Discussion
diff --git a/lms/templates/navigation.html b/lms/templates/navigation.html
index d574bc3f6e..60988d7068 100644
--- a/lms/templates/navigation.html
+++ b/lms/templates/navigation.html
@@ -41,7 +41,7 @@ site_status_msg = get_site_status_msg(course_id)
))})
% if course:
-
${course.org}: ${course.number} ${course.title}
+
${course.org}: ${course.number} ${course.lms.display_name}
% endif
diff --git a/lms/templates/test_center_register.html b/lms/templates/test_center_register.html
index 6b87860fad..ba72bf3186 100644
--- a/lms/templates/test_center_register.html
+++ b/lms/templates/test_center_register.html
@@ -31,8 +31,8 @@
// when a form is successfully filled out, return back to the dashboard.
location.href="${reverse('dashboard')}";
} else {
- // This is performed by the following code that parses the errors returned as json by the
- // registration form validation.
+ // This is performed by the following code that parses the errors returned as json by the
+ // registration form validation.
var field_errors = json.field_errors;
var non_field_errors = json.non_field_errors;
var fieldname;
@@ -55,7 +55,7 @@
$("[id='"+field_id+"']").addClass('error');
- field_errorlist = field_errors[fieldname];
+ field_errorlist = field_errors[fieldname];
for (i=0; i < field_errorlist.length; i+= 1) {
field_error = field_errorlist[i];
error_msg = '' + field_label + ':' + '' + field_error + '';
@@ -88,24 +88,24 @@
%block>
-
-
+
+
-
-
+
+
% if registration:
Your Pearson VUE Proctored Exam Registration
- % else:
+ % else:
Register for a Pearson VUE Proctored Exam
% endif
-
- <%
- exam_help_href = "mailto:exam-help@edx.org?subject=Pearson VUE Exam - " + get_course_about_section(course, 'university') + " - " + course.number
+
+ <%
+ exam_help_href = "mailto:exam-help@edx.org?subject=Pearson VUE Exam - " + get_course_about_section(course, 'university') + " - " + course.number
%>
% if registration:
@@ -118,14 +118,14 @@
% endif
- % if registration.demographics_is_rejected:
+ % if registration.demographics_is_rejected:
Your demographic information contained an error and was rejected
Please check the information you provided, and correct the errors noted below.
% endif
-
- % if registration.registration_is_rejected:
+
+ % if registration.registration_is_rejected:
Your registration for the Pearson exam has been rejected
Please see your registration status details for more information.
@@ -140,14 +140,14 @@
% endif
% endif
-
+
- % if exam_info.is_registering():
+ % if exam_info.is_registering():