Files
edx-platform/lms/djangoapps/teams/admin.py
Simon Chen c5f03adb0e Add the organization protected attribute to team
This is needed so Masters learners will not be in the same team as verfied and audit learners. If the team is designated as organization protected, it will not be visible or accessible by verified or audit track learners
MST-34
2019-11-12 13:03:55 -05:00

29 lines
879 B
Python

"""
Admin registration for Course Teams.
"""
from __future__ import absolute_import, unicode_literals
from django.contrib import admin
from .models import CourseTeam, CourseTeamMembership
@admin.register(CourseTeam)
class CourseTeamAdmin(admin.ModelAdmin):
"""
Admin config for course teams.
"""
list_display = ('course_id', 'topic_id', 'team_id', 'name', 'team_size', 'organization_protected')
search_fields = ('course_id', 'topic_id', 'team_id', 'name', 'description')
ordering = ('course_id', 'topic_id', 'team_id')
readonly_fields = ('team_size',)
@admin.register(CourseTeamMembership)
class CourseTeamMembershipAdmin(admin.ModelAdmin):
"""
Admin config for course team memberships.
"""
list_display = ('team', 'user', 'date_joined', 'last_activity_at')
search_fields = ('team__team_id', 'user__username', 'user__email')