def _get_alerts(self): alerts = [] if not courses.is_editable_fs(self.app_context): alerts.append('Read-only course.') if not self.app_context.now_available: alerts.append('The course is not publicly available.') return '\n'.join(alerts)