feat: add published_at field support to announcements with scheduled publishing and student visibility filtering
Add published_at field to announcement creation and updates, allowing instructors to schedule announcement publishing. Update student announcement filtering to only show PUBLISHED announcements where published_at <= now. Modify announcement creation to set published_at to provided value or current time for PUBLISHED status. Update announcement updates to handle published_at changes while
This commit is contained in:
parent
67f10c4287
commit
05755992a7
3 changed files with 41 additions and 8 deletions
|
|
@ -75,6 +75,7 @@ export class AnnouncementsController {
|
|||
content: parsed.content,
|
||||
status: parsed.status,
|
||||
is_pinned: parsed.is_pinned,
|
||||
published_at: parsed.published_at ? new Date(parsed.published_at) : undefined,
|
||||
files,
|
||||
});
|
||||
}
|
||||
|
|
@ -107,6 +108,7 @@ export class AnnouncementsController {
|
|||
content: body.content,
|
||||
status: body.status,
|
||||
is_pinned: body.is_pinned,
|
||||
published_at: body.published_at ? new Date(body.published_at) : undefined,
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue