Change visibility to access.

EDUCATOR-396
This commit is contained in:
cahrens
2017-05-16 15:27:31 -04:00
parent 816ba4e6f7
commit 106ac3a136
16 changed files with 44 additions and 48 deletions

View File

@@ -126,7 +126,7 @@ class ComponentVisibilityEditorView(BaseComponentEditorView):
"""
This returns the message shown at the top of the visibility dialog about the
current visibility state (at the time that the dialog was opened).
For example, "Current visible to: All Learners and Staff".
For example, "Access is restricted to: All Learners and Staff".
"""
return self.q(css=self._bounded_selector('.visibility-header'))[0].text

View File

@@ -322,10 +322,10 @@ class BaseGroupConfigurationsTest(ContainerBase):
CHOOSE_ONE = "Select a group type"
CONTENT_GROUP_PARTITION = ComponentVisibilityEditorView.CONTENT_GROUP_PARTITION
ENROLLMENT_TRACK_PARTITION = ComponentVisibilityEditorView.ENROLLMENT_TRACK_PARTITION
MISSING_GROUP_LABEL = 'Deleted Group\nThis group no longer exists. Choose another group or make this component visible to All Learners and Staff.'
MISSING_GROUP_LABEL = 'Deleted Group\nThis group no longer exists. Choose another group or do not restrict access to this component.'
VALIDATION_ERROR_LABEL = 'This component has validation issues.'
VALIDATION_ERROR_MESSAGE = "Error:\nThis component's visibility settings refer to deleted or invalid groups."
GROUP_VISIBILITY_MESSAGE = 'Some content in this unit is visible only to specific groups of learners.'
VALIDATION_ERROR_MESSAGE = "Error:\nThis component's access settings refer to deleted or invalid groups."
GROUP_VISIBILITY_MESSAGE = 'Access to some content in this unit is restricted to specific groups of learners.'
def setUp(self):
super(BaseGroupConfigurationsTest, self).setUp()
@@ -377,10 +377,13 @@ class BaseGroupConfigurationsTest(ContainerBase):
"""
Check that the current visibility is displayed at the top of the dialog.
"""
self.assertEqual(
"Currently visible to: {groups}".format(groups=expected_current_groups),
visibility_editor.current_groups_message
)
if expected_current_groups == self.ALL_LEARNERS_AND_STAFF:
self.assertEqual("Access is not restricted", visibility_editor.current_groups_message)
else:
self.assertEqual(
"Access is restricted to: {groups}".format(groups=expected_current_groups),
visibility_editor.current_groups_message
)
def verify_selected_partition_scheme(self, visibility_editor, expected_scheme):
"""
@@ -651,7 +654,7 @@ class EnrollmentTrackVisibilityModalTest(BaseGroupConfigurationsTest):
if not expected_groups:
self.assertIsNone(component.get_partition_group_message)
else:
self.assertEqual("Visible to: " + expected_groups, component.get_partition_group_message)
self.assertEqual("Access restricted to: " + expected_groups, component.get_partition_group_message)
def test_setting_enrollment_tracks(self):
"""