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')}

-

${course.number} ${course.title}

+

${course.number} ${course.lms.display_name}

<% @@ -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:
Schedule Pearson exam

Registration number: ${registration.client_candidate_id}

Write this down! You’ll need it to schedule your exam.

% endif - % if registration.is_rejected: + % if registration.is_rejected:

Your registration for the Pearson exam has been rejected. Please see your registration status details. Otherwise contact edX at exam-help@edx.org for further help.

% endif - % if not registration.is_accepted and not registration.is_rejected: + % if not registration.is_accepted and not registration.is_rejected:

Your registration for the Pearson exam is pending. Within a few days, you should see a confirmation number here, which can be used to schedule your exam.

% 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 @@ -
    - +
    +
    -

    ${get_course_about_section(course, 'university')} ${course.number} ${course.title}

    - +

    ${get_course_about_section(course, 'university')} ${course.number} ${course.lms.display_name}

    + % 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():
    - % else: + % else:
    @@ -155,12 +155,12 @@

    Your previous information is available below, however you may not edit any of the information.

    % endif - + % if registration:

    - Please use the following form if you need to update your demographic information used in your Pearson VUE Proctored Exam. Required fields are noted by bold text and an asterisk (*). + Please use the following form if you need to update your demographic information used in your Pearson VUE Proctored Exam. Required fields are noted by bold text and an asterisk (*).

    - % else: + % else:

    Please provide the following demographic information to register for a Pearson VUE Proctored Exam. Required fields are noted by bold text and an asterisk (*).

    @@ -175,11 +175,11 @@
    - +
    1. - +
    2. @@ -199,14 +199,14 @@
    - +
    - +
    1. - +
    2. @@ -221,7 +221,7 @@
    3. -
    4. +
    5. @@ -238,15 +238,15 @@
    - +
    - +
    1. - +
      @@ -274,12 +274,12 @@
    - + % if registration: % if registration.accommodation_request and len(registration.accommodation_request) > 0:
    % endif - % else: + % else:
    % endif @@ -287,13 +287,13 @@ % if registration.accommodation_request and len(registration.accommodation_request) > 0:

    Note: Your previous accommodation request below needs to be reviewed in detail and will add a significant delay to your registration process.

    % endif - % else: + % else:

    Note: Accommodation requests are not part of your demographic information, and cannot be changed once submitted. Accommodation requests, which are reviewed on a case-by-case basis, will add significant delay to the registration process.

    % endif - +
    - +
      % if registration: % if registration.accommodation_request and len(registration.accommodation_request) > 0: @@ -302,21 +302,21 @@

      ${registration.accommodation_request}

      % endif - % else: + % else:
    1. - +
    2. % endif
    - +
    % if registration: Cancel Update - % else: + % else: Cancel Registration % endif @@ -325,68 +325,68 @@

      -
      +
    % if registration: % if registration.accommodation_request and len(registration.accommodation_request) > 0: % endif - % else: + % else: Special (ADA) Accommodations % endif - +