admin.py 967 Bytes
Newer Older
1 2
from django.contrib import admin

3 4 5 6 7 8
from .models import AssessmentWorkflow, AssessmentWorkflowStep


class AssessmentWorkflowStepInline(admin.StackedInline):
    model = AssessmentWorkflowStep
    extra = 0
9 10

class AssessmentWorkflowAdmin(admin.ModelAdmin):
11 12 13 14 15 16 17
    """Admin for the user's overall workflow through open assessment.

    Unlike many of the other models, we allow editing here. This is so that we
    can manually move a user's entry to "done" and give them a separate score
    in the submissions app if that's required. Unlike rubrics and assessments,
    there is no expectation of immutability for `AssessmentWorkflow`.
    """
18
    list_display = (
19
        'uuid', 'status', 'submission_uuid', 'course_id', 'item_id', 'status_changed'
20
    )
21 22
    list_filter = ('status',)
    search_fields = ('uuid', 'submission_uuid', 'course_id', 'item_id')
23
    inlines = (AssessmentWorkflowStepInline,)
24 25

admin.site.register(AssessmentWorkflow, AssessmentWorkflowAdmin)