Merge exams grading into homework
Redirect /teacher/exams/grading* to /teacher/homework/submissions; remove exam grading UI/actions/data-access; add homework student workflow and update design docs.
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
import { HomeworkAssignmentForm } from "@/modules/homework/components/homework-assignment-form"
|
||||
import { getExams } from "@/modules/exams/data-access"
|
||||
import { EmptyState } from "@/shared/components/ui/empty-state"
|
||||
import { FileQuestion } from "lucide-react"
|
||||
|
||||
export default async function CreateHomeworkAssignmentPage() {
|
||||
const exams = await getExams({})
|
||||
const options = exams.map((e) => ({ id: e.id, title: e.title }))
|
||||
|
||||
return (
|
||||
<div className="flex h-full flex-col space-y-8 p-8">
|
||||
<div className="flex items-center justify-between">
|
||||
<div>
|
||||
<h2 className="text-2xl font-bold tracking-tight">Create Assignment</h2>
|
||||
<p className="text-muted-foreground">Dispatch homework from an existing exam.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{options.length === 0 ? (
|
||||
<EmptyState
|
||||
title="No exams available"
|
||||
description="Create an exam first, then dispatch it as homework."
|
||||
icon={FileQuestion}
|
||||
action={{ label: "Create Exam", href: "/teacher/exams/create" }}
|
||||
/>
|
||||
) : (
|
||||
<HomeworkAssignmentForm exams={options} />
|
||||
)}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user