Merge pull request #1177 from MITx/bug/dhm/dec12

Bug/dhm/dec12
This commit is contained in:
chrisndodge
2012-12-19 08:33:17 -08:00
2 changed files with 5 additions and 3 deletions

View File

@@ -986,7 +986,7 @@ def course_info_updates(request, org, course, provided_id=None):
try:
return HttpResponse(json.dumps(update_course_updates(location, request.POST, provided_id)), mimetype="application/json")
except etree.XMLSyntaxError:
return HttpResponse("Failed to save: malformed html", status=515, content_type="text/plain")
return HttpResponseBadRequest("Failed to save: malformed html", content_type="text/plain")
@expect_json

View File

@@ -163,8 +163,10 @@ class CourseDetails:
def recompose_video_tag(video_key):
# TODO should this use a mako template? Of course, my hope is that this is a short-term workaround for the db not storing
# the right thing
result = '<iframe width="560" height="315" src="http://www.youtube.com/embed/' + \
video_key + '?autoplay=1&rel=0" frameborder="0" allowfullscreen=""></iframe>'
result = None
if video_key:
result = '<iframe width="560" height="315" src="http://www.youtube.com/embed/' + \
video_key + '?autoplay=1&rel=0" frameborder="0" allowfullscreen=""></iframe>'
return result