diff --git a/lms/djangoapps/instructor/tests/test_instructor_dashboard.py b/lms/djangoapps/instructor/tests/views/test_instructor_dashboard.py similarity index 96% rename from lms/djangoapps/instructor/tests/test_instructor_dashboard.py rename to lms/djangoapps/instructor/tests/views/test_instructor_dashboard.py index 957c577433..535676a320 100644 --- a/lms/djangoapps/instructor/tests/test_instructor_dashboard.py +++ b/lms/djangoapps/instructor/tests/views/test_instructor_dashboard.py @@ -38,10 +38,16 @@ class TestInstructorDashboard(ModuleStoreTestCase, LoginEnrollmentTestCase): patch.stopall() def get_dashboard_enrollment_message(self): + """ + Returns expected dashboard enrollment message with link to Insights. + """ return 'Enrollment data is now available in Example.'.format(unicode(self.course.id)) def get_dashboard_demographic_message(self): + """ + Returns expected dashboard demographic message with link to Insights. + """ return 'Demographic data is now available in Example.'.format(unicode(self.course.id)) diff --git a/lms/djangoapps/instructor/views/instructor_dashboard.py b/lms/djangoapps/instructor/views/instructor_dashboard.py index 585b2fffb6..8495e0c5de 100644 --- a/lms/djangoapps/instructor/views/instructor_dashboard.py +++ b/lms/djangoapps/instructor/views/instructor_dashboard.py @@ -275,7 +275,7 @@ def _is_small_course(course_key): def _section_student_admin(course, access): """ Provide data for the corresponding dashboard section """ course_key = course.id - is_small_course =_is_small_course(course_key) + is_small_course = _is_small_course(course_key) section_data = { 'section_key': 'student_admin', @@ -364,7 +364,7 @@ def _section_send_email(course, access): def _get_dashboard_link(course_key): - # Construct a URL to the external analytics dashboard + """ Construct a URL to the external analytics dashboard """ analytics_dashboard_url = '{0}/courses/{1}'.format(settings.ANALYTICS_DASHBOARD_URL, unicode(course_key)) link = "{1}".format(analytics_dashboard_url, settings.ANALYTICS_DASHBOARD_NAME)