From 3bbc7430f274fcccf23fc79fbcf5a291ca0b8e83 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=90=D0=BB=D0=B5=D0=BA=D1=81=D0=B0=D0=BD=D0=B4=D1=80?= Date: Thu, 21 Nov 2013 15:31:23 +0200 Subject: [PATCH] BLD-530: Fix 500 error in transcripts. --- CHANGELOG.rst | 2 ++ cms/djangoapps/contentstore/features/transcripts.feature | 1 + cms/djangoapps/contentstore/features/transcripts.py | 1 + cms/djangoapps/contentstore/views/component.py | 9 ++++++--- cms/templates/unit.html | 4 ++-- 5 files changed, 12 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 584b0621695a..4c0c4bc5a5c5 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -5,6 +5,8 @@ These are notable changes in edx-platform. This is a rolling list of changes, in roughly chronological order, most recent first. Add your entries at or near the top. Include a label indicating the component affected. +Blades: Fix transcripts 500 error in studio (BLD-530) + Blades: Allow multiple strings as the correct answer to a string response question. BLD-474. Blades: a11y - Videos will alert screenreaders when the video is over. diff --git a/cms/djangoapps/contentstore/features/transcripts.feature b/cms/djangoapps/contentstore/features/transcripts.feature index dad9cbb49e01..159c8a3c5abc 100644 --- a/cms/djangoapps/contentstore/features/transcripts.feature +++ b/cms/djangoapps/contentstore/features/transcripts.feature @@ -641,6 +641,7 @@ Feature: Video Component Editor And I save changes Then when I view the video it does show the captions + And I see "好 各位同学" text in the captions And I edit the component And I open tab "Advanced" diff --git a/cms/djangoapps/contentstore/features/transcripts.py b/cms/djangoapps/contentstore/features/transcripts.py index 5cbb65dc9d16..4fac5e5b9340 100644 --- a/cms/djangoapps/contentstore/features/transcripts.py +++ b/cms/djangoapps/contentstore/features/transcripts.py @@ -116,6 +116,7 @@ def i_see_status_message(_step, status): world.wait(DELAY) world.wait_for_ajax_complete() + assert not world.css_visible(SELECTORS['error_bar']) assert world.css_has_text(SELECTORS['status_bar'], STATUSES[status.strip()]) diff --git a/cms/djangoapps/contentstore/views/component.py b/cms/djangoapps/contentstore/views/component.py index 70d7bef7cece..327e75c7f47e 100644 --- a/cms/djangoapps/contentstore/views/component.py +++ b/cms/djangoapps/contentstore/views/component.py @@ -249,9 +249,12 @@ def edit_unit(request, location): ) components = [ - loc_mapper().translate_location( - course.location.course_id, component.location, False, True - ) + [ + component.location.url(), + loc_mapper().translate_location( + course.location.course_id, component.location, False, True + ) + ] for component in item.get_children() ] diff --git a/cms/templates/unit.html b/cms/templates/unit.html index e83dd45da08f..233b3fbd166a 100644 --- a/cms/templates/unit.html +++ b/cms/templates/unit.html @@ -48,8 +48,8 @@

    - % for locator in components: -
  1. + % for id, locator in components: +
  2. % endfor