Commit 3dc73c65 by Mushtaq Ali

Display studio name properly on empty course page.

parent f09e9f02
...@@ -8,6 +8,7 @@ from chrono import Timer ...@@ -8,6 +8,7 @@ from chrono import Timer
from mock import patch, Mock from mock import patch, Mock
import ddt import ddt
from django.conf import settings
from django.test import RequestFactory from django.test import RequestFactory
from django.test.client import Client from django.test.client import Client
...@@ -99,6 +100,15 @@ class TestCourseListing(ModuleStoreTestCase, XssTestMixin): ...@@ -99,6 +100,15 @@ class TestCourseListing(ModuleStoreTestCase, XssTestMixin):
self.assertEqual(response.status_code, 200) self.assertEqual(response.status_code, 200)
self.assert_no_xss(response, escaping_content) self.assert_no_xss(response, escaping_content)
def test_empty_course_listing(self):
"""
Test on empty course listing, studio name is properly displayed
"""
message = "Are you staff on an existing {studio_name} course?".format(studio_name=settings.STUDIO_SHORT_NAME)
response = self.client.get('/home')
self.assertEqual(response.status_code, 200)
self.assertIn(message, response.content)
def test_get_course_list(self): def test_get_course_list(self):
""" """
Test getting courses with new access group format e.g. 'instructor_edx.course.run' Test getting courses with new access group format e.g. 'instructor_edx.course.run'
......
...@@ -346,7 +346,7 @@ ...@@ -346,7 +346,7 @@
<div class="notice notice-incontext notice-instruction notice-instruction-nocourses list-notices courses-tab active"> <div class="notice notice-incontext notice-instruction notice-instruction-nocourses list-notices courses-tab active">
<div class="notice-item"> <div class="notice-item">
<div class="msg"> <div class="msg">
<h3 class="title">${_("Are you staff on an existing {studio_name} course?").format(studio_name=set)}</h3> <h3 class="title">${_("Are you staff on an existing {studio_name} course?").format(studio_name=settings.STUDIO_SHORT_NAME)}</h3>
<div class="copy"> <div class="copy">
<p>${_('The course creator must give you access to the course. Contact the course creator or administrator for the course you are helping to author.')}</p> <p>${_('The course creator must give you access to the course. Contact the course creator or administrator for the course you are helping to author.')}</p>
</div> </div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment