@@ -508,15 +509,17 @@ class SplitTestDescriptor(SplitTestFields, SequenceDescriptor, StudioEditableDes
ifself.user_partition_id<0:
messages.append(ValidationMessage(
self,
_(u"You must select a group configuration for this content experiment."),
ValidationMessageType.warning
_(u"The experiment is not associated with a group configuration."),
ValidationMessageType.warning,
'edit-button',
_(u"Select a Group Configuration")
))
else:
user_partition=self.get_selected_partition()
ifnotuser_partition:
messages.append(ValidationMessage(
self,
_(u"This content experiment will not be shown to students because it refers to a group configuration that has been deleted. You can delete this experiment or reinstate the group configuration to repair it."), \
_(u"The experiment uses a deleted group configuration. Select a valid group configuration or delete this experiment."),
ValidationMessageType.error
))
else:
...
...
@@ -524,13 +527,15 @@ class SplitTestDescriptor(SplitTestFields, SequenceDescriptor, StudioEditableDes
_(u"This content experiment is missing groups that are defined in the current configuration. You can press the 'Create Missing Groups' button to create them."),
ValidationMessageType.error
_(u"The experiment does not contain all of the groups in the configuration."),
ValidationMessageType.error,
'add-missing-groups-button',
_(u"Add Missing Groups")
))
iflen(inactive_children)>0:
messages.append(ValidationMessage(
self,
_(u"This content experiment has children that are not associated with the selected group configuration. You can move content into an active group or delete it if it is unneeded."),
_(u"The experiment has an inactive group. Move content into active groups, then delete the inactive group."),
ValidationMessageType.warning
))
returnmessages
...
...
@@ -543,16 +548,17 @@ class SplitTestDescriptor(SplitTestFields, SequenceDescriptor, StudioEditableDes
Called from Studio view.
"""
user_partition=self.get_selected_partition()
changed=False
forgroupinuser_partition.groups:
str_group_id=unicode(group.id)
changed=False
ifstr_group_idnotinself.group_id_to_child:
self._create_vertical_for_group(group)
changed=True
ifchanged:
# request does not have a user attribute, so pass None for user.
self.system.modulestore.update_item(self,None)
ifchanged:
# request does not have a user attribute, so pass None for user.