Skip to main content

Overview

The notifications system allows admins and instructors to post announcements that appear on the home page for all users or specific classes.

Creating notifications

As an admin or instructor

  1. Navigate to Notifications in the main menu
  2. Click Create New Notification
  3. Fill in the notification details:
    • Title: Short headline for the notification
    • Description: Brief summary (shown in listing)
    • Text: Full notification content (supports HTML)
  4. Click Publish
The notification immediately appears on the home page for all users.

Notification structure

title
string
required
The notification headline displayed prominently
description
string
A brief summary shown in the notification list
text
text
required
Full notification body (supports HTML formatting)
author
integer
required
User ID of the notification creator
last_author
integer
User ID of the last person to edit the notification

Managing notifications

Editing notifications

  1. Go to Notifications
  2. Click Edit on the notification
  3. Update the content
  4. Click Save
The last_author field tracks who made the most recent edit.

Deleting notifications

  1. Open the notification
  2. Click Delete
  3. Confirm deletion
Deleting a notification is permanent and cannot be undone.

Notification display

Home page

Notifications appear at the top of the home page:
Route: GET /home/
  • Most recent notifications shown first
  • Title and description visible in list
  • Click to expand and read full text
  • Author name displayed with timestamp

Formatting

The notification text field supports HTML:
<h3>Important: Assignment 3 Deadline Extended</h3>
<p>Due to technical issues, the deadline for Assignment 3 
has been extended to <strong>Friday, March 15 at 11:59 PM</strong>.</p>
<ul>
  <li>All submissions before the new deadline will be accepted</li>
  <li>Late penalties reset to the new deadline</li>
  <li>Contact your instructor with questions</li>
</ul>
Be careful with HTML formatting - invalid HTML can break the display. Test notifications after creating them.

Common use cases

Assignment announcements

Notify students about new assignments, deadline changes, or clarifications.

System maintenance

Warn users about scheduled downtime or system updates.

Course updates

Share syllabus changes, office hours, or exam schedules.

Platform help

Provide tips for using Wecode features or troubleshooting common issues.

Permissions

ActionAdminHead InstructorInstructorStudent
Create notification
Edit own notification
Edit any notificationLimited
Delete notificationOwn only
View notifications
All authenticated users can view notifications, but only instructors and admins can create them.

API reference

Model: Notification

Location: app/Models/Notification.php

Fillable fields

protected $fillable = [
    'title',        // string - Notification headline
    'text',         // text - Full notification body (HTML)
    'author',       // integer - Creator user ID
    'description',  // string - Brief summary
    'last_author'   // integer - Last editor user ID
];

Relationships

// Get the notification creator
$notification->user()

// Get the user who last edited the notification
$notification->last_user()

Routes

MethodURIActionPermission
GET/notificationsList all notificationsAuthenticated
GET/notifications/createShow create formInstructor+
POST/notificationsStore new notificationInstructor+
GET/notifications/{id}Show notificationAuthenticated
GET/notifications/{id}/editShow edit formInstructor+
PUT/PATCH/notifications/{id}Update notificationInstructor+
DELETE/notifications/{id}Delete notificationInstructor+

Best practices

Writing effective notifications

1

Clear headline

Use descriptive titles that immediately convey the purpose: “Assignment 2 Due Tomorrow” instead of “Important Update”
2

Action items first

Put critical information and required actions at the beginning of the text
3

Scannable content

Use bullet points, bold text, and headings to make information easy to scan
4

Include dates

Always specify dates and times clearly, including timezone if relevant

Managing notification volume

  • Consolidate related updates into a single notification rather than posting multiple times
  • Remove outdated notifications after events pass (e.g., delete after assignment deadline)
  • Prioritize important information - too many notifications can cause users to ignore them

HTML formatting tips

<!-- Good: Simple, valid HTML -->
<p>The midterm exam is <strong>Wednesday, March 20</strong> at 2:00 PM.</p>
<p>Topics covered: Chapters 1-5</p>

<!-- Avoid: Complex nested structures -->
<div style="background:red;padding:20px;">
  <span style="font-size:24px;">...</span>
</div>
Keep HTML simple to ensure compatibility and readability.

Examples

Assignment deadline change

Title: Assignment 3 Deadline Extended
Description: New deadline: March 15, 11:59 PM
Text:
Due to server issues on March 10, the Assignment 3 deadline 
has been extended to <strong>Friday, March 15 at 11:59 PM</strong>.

All previous submissions are safe and will be graded under 
the new deadline. Late penalties have been reset.

System maintenance

Title: Scheduled Maintenance - Saturday 2-4 AM
Description: Wecode will be offline for 2 hours this Saturday
Text:
<p><strong>When:</strong> Saturday, March 9, 2:00-4:00 AM EST</p>
<p><strong>Impact:</strong> Wecode will be completely unavailable</p>
<p>Please complete any submissions before 2:00 AM. 
The system will automatically resume at 4:00 AM.</p>

New feature announcement

Title: New Feature: Practice Problems
Description: Shareable practice problems now available
Text:
Instructors can now mark problems as "practice problems" that 
students can attempt outside of assignments.

<ul>
  <li>Find practice problems in the Practice menu</li>
  <li>Unlimited submissions</li>
  <li>Instant feedback</li>
  <li>Not graded</li>
</ul>

Perfect for exam preparation!

Build docs developers (and LLMs) love