# Coursefield — Product Requirements (v2.0)

Coursefield is an online learning platform. Learners browse a catalogue of twelve courses, enroll (free, paid or prerequisite-gated), work through modules of lessons and quizzes, track progress and earn certificates. Instructors get a gradebook for their courses.

**Problem.** Learners need a clear path through a course, in order, with honest progress and fair scoring; instructors need accurate cohort figures to spot learners at risk.

## Users
- **Learner** — Find a course, enroll, watch lessons, take quizzes and earn a certificate only when the course is truly complete.
- **Instructor** — See enrollment, progress and quiz results per course and remind learners who are falling behind.

## Goals
- Content order is enforced everywhere, including direct links.
- Scores, progress and certificates are exact: no rounding up to completion and no credit for partly right answers where the rules say none.
- Quiz limits (time and attempts) are enforced by the platform, not by learner goodwill.

## Sign-in and roles (AUTH)

Sign-in, deep-link return and role-based pages.

- **FR-AUTH-01** (Must) Valid credentials open the Home page with a personal greeting for the learner.
  - URL /learn/
  - Heading "Maya, you are one lesson from your Data Storytelling certificate." for the seeded learner
- **FR-AUTH-02** (Must) A wrong password shows an error banner, keeps the user on the sign-in page and reveals no course content.
- **FR-AUTH-03** (Should) An unauthenticated visit to a protected page redirects to sign-in with a next parameter and returns to that page after sign-in.
  - /learn/certificates redirects to sign-in with next=/certificates and opens Certificates after login
- **FR-AUTH-04** (Must) The gradebook is available to instructors only; a learner is redirected Home and sees no Gradebook menu item; an instructor lands on the gradebook after sign-in.

## Home (HOM)

Learning dashboard and responsive layout.

- **FR-HOM-01** (Must) Home shows four tiles computed from the learner’s history and a "Continue learning" panel ordered by progress.
  - Seeded learner: In progress 3, Lessons completed 23, Certificates 1, Average quiz score 71%
  - Data Storytelling is first at 99% with next lesson "Course wrap-up"
- **FR-HOM-02** (Could) Home uses a tinted frame with sidebar, top search bar and a rounded white sheet; a 24 px regular-weight greeting above four equal tiles; panels on a grid with no clipped text or horizontal scroll.
- **FR-HOM-03** (Could) At 390 px the sidebar becomes a drawer opened by a menu button (Home, Catalog, Certificates) that closes when the dimmed area is pressed; content keeps a 16 px gutter and tiles stack.

## Catalogue (CAT)

Browse, filter, search and sort courses.

- **FR-CAT-01** (Must) The unfiltered catalogue lists all twelve courses with price, level and an enrolled indicator.
  - The count reads 12 courses
  - Python for Analysts shows Free, Beginner and enrolled
- **FR-CAT-02** (Should) Price, level, category and duration filters combine, narrow the list and are kept in the URL and after reload.
  - Price Free: 6 courses; plus Level Beginner: still 6, URL contains price=free and level=Beginner
  - Plus Category Data: Python for Analysts and SQL Essentials
  - Duration "Under 2 hours": 7 courses
- **FR-CAT-03** (Should) Search matches course titles; an unmatched query shows an empty state with a way to clear filters.
  - Searching "Negotiation" leaves only "Negotiation Skills"
- **FR-CAT-04** (Could) Sorting by Shortest orders by duration ascending.
  - Security Awareness for Teams (1h 5m) first, then Writing for Clarity (1h 8m)
- **FR-CAT-05** (Could) On a 390 px phone catalogue cards stack in one column with a 16 px gutter, text of at least 12 px and no horizontal scroll.

## Course syllabus and locks (CRS)

Modules, lessons, durations and module gating.

- **FR-CRS-01** (Should) The course page lists modules with their lessons, durations, completion and lock state.
  - Python for Analysts: Getting started (3 lessons), Core data structures (4 lessons and a quiz), Files and pandas (3 lessons and a quiz)
  - Getting started: "Welcome and course tour" 4m, "Installing Python and Jupyter" 9m, "Your first notebook" 12m, all complete
  - Files and pandas is locked: lock icons and its lessons are not links
- **FR-CRS-02** (Must) A locked module cannot be opened by any route: its lessons are not links, and opening a lesson by direct URL shows a locked message with a link back to the course and no player. The module unlocks when its gating quiz is passed.
  - /learn/lessons/l-py-3-1 shows the locked message while Core data structures check is not passed
  - After passing that quiz Files and pandas is no longer locked

## Enrollment (ENR)

Free, paid and prerequisite-gated enrollment.

- **FR-ENR-01** (Must) Enrolling in a free course starts it immediately with no charge dialog.
  - Panel shows "Free" and "Enroll for free"; lesson 1 is a free preview
  - After enrolling the panel shows a ring at 0% and "Continue: Know your reader"; the catalogue marks the course enrolled
- **FR-ENR-02** (Should) Enrolling in a paid course requires confirming the charge; cancelling (button or Esc) leaves the learner not enrolled.
  - "Enroll for $59" on Interface Design Systems opens a dialog stating the charge
  - Confirming enrolls with the ring at 0%
- **FR-ENR-03** (Should) A course with a prerequisite cannot be enrolled until the prerequisite is complete.
  - Machine Learning Foundations shows a warning to complete Statistics in Practice first, with a link, and a disabled "Enroll for $89"

## Lesson player and notes (LSN)

Video lesson with transcript, completion and notes.

- **FR-LSN-01** (Must) Playing a lesson to the end marks it complete, makes the next lesson available and advances course progress.
  - "Spread and variance" is a 16:00 lesson with player, transcript and notes tabs and an outline of six lessons
  - Speed 2x and the scrubber move the time counter and the highlighted transcript line
  - After completion the course page shows 2 of 6 lessons complete
- **FR-LSN-02** (Should) Notes autosave and are shown again after a reload.
  - The existing note of "Your first notebook" reads "Restart the kernel after installing packages."
  - After editing, a saved indicator appears and the new text persists after reload
- **FR-LSN-03** (Could) A note is limited to 500 characters; 500 is accepted and the counter reads 500, the 501st is refused or explained.

## Quizzes (QUZ)

Single, multiple-choice, ordering and matching questions with timer, attempts and pass mark.

- **FR-QUZ-01** (Should) The quiz overview states question count, points, pass mark, attempts allowed and the history of previous attempts.
  - Core data structures check: 6 questions, 9 points, pass mark 70%, 3 attempts; one previous attempt 56% not passed; two attempts remain
- **FR-QUZ-02** (Must) A fully correct attempt scores 100%, passes and unlocks the next module; the answer controls of all four question types work.
  - Result "100%, 9 of 9 points, Passed"
  - The question navigator marks answered questions
- **FR-QUZ-03** (Must) A multiple-choice question earns its points only when the learner selects exactly the correct set of options.
  - Ticking only list and dict for the three mutable types: 0 / 2 points, marked Incorrect, correct answer lists list, dict and set; the quiz scores 78% (7 of 9 points)
  - Single-choice questions score normally
- **FR-QUZ-04** (Should) A matching question awards points in proportion to correct pairs.
  - Two of four pairs right: 1 of 2 points, "Partly correct", quiz 89% (8 of 9)
- **FR-QUZ-05** (Could) Ordering questions can be answered with up/down buttons as well as dragging, and the chosen order is kept when navigating away and back.
- **FR-QUZ-06** (Should) Submitting with unanswered questions warns first, then fails the quiz when below the pass mark and consumes an attempt.
  - Only Q1 answered: result 11%, 1 of 9 points, Not passed; five questions "Not answered"
  - Retake button reads "Try again (1 left)"
- **FR-QUZ-07** (Must) The attempt limit is enforced: once all attempts are used no new attempt can start and no retake is offered.
  - Joins and grouping check allows 2 attempts, pass mark 75%, 60 seconds; after the second attempt (one already used) the start button is disabled or replaced by a "no attempts left" notice
- **FR-QUZ-08** (Could) A timed quiz shows a countdown from the time limit that turns red under 10 seconds.
  - Timer starts at 1:00 and counts down every second
- **FR-QUZ-09** (Must) When the countdown reaches zero the answers given so far are submitted automatically and the learner is taken to the result.
  - A banner says time ran out and answers were submitted automatically
  - With only question 1 answered correctly the score is 14% (1 of 7 points)
- **FR-QUZ-10** (Should) The result review lists every question with a verdict, points, the learner answer, the correct answer and a one-line explanation.
  - The 56% attempt shows 5 of 9 points, pass mark 70%, Not passed and six review entries

## Progress and certificates (PRG)

Progress rings and certificate issue.

- **FR-PRG-01** (Must) Progress is shown as a percentage rounded down; 100% and "Course complete" appear only when every lesson is complete, and a certificate is issued only then.
  - Data Storytelling with 8 of 9 lessons (one minute of 240 left) reads 99%, "8 of 9 lessons" and has no certificate link
  - Completing "Course wrap-up" gives 100%, "Course complete", and "View certificate CF-2026-52930"; Certificates then lists two cards
- **FR-PRG-02** (Should) Certificates lists earned certificates and each opens a certificate page with holder name, course, ID and issue date; unknown IDs show "Certificate not found" with a link to all certificates.
  - SQL Essentials: CF-2026-40817, issued 14 August 2026, holder Maya Okafor
- **FR-PRG-03** (Could) The certificate page is a centred, framed, printable card that fits a 390 px viewport without horizontal scroll.

## Instructor gradebook (GRD)

Cohort figures and reminders.

- **FR-GRD-01** (Should) The gradebook shows enrollment and status counts per course that equal the rows listed, and status filters list exactly the matching learners.
  - Python for Analysts: Enrolled 14, At risk 4; chips On track 6, At risk 4, Completed 4
  - At risk: Elif Demir, Grace Nakamura, Jonas Weber, Liam Doherty
- **FR-GRD-02** (Could) Column headers sort the table with a sort arrow and the course select swaps the data.
  - Progress descending then ascending; Liam Doherty (22%) first when ascending
  - SQL Essentials: one quiz column, fourteen rows, five Completed
- **FR-GRD-03** (Could) Send reminder is offered only for at-risk learners, needs confirmation naming the learner and idle days, then shows a toast and a disabled "Reminded" button.
  - Elif Demir: idle 22 days
  - On-track learners have no reminder button

## Glossary and rules

- **Pass mark** — Minimum quiz percentage needed to pass and to unlock the gated module.
- **At risk** — A learner who has been idle and is behind on progress; eligible for a reminder.

## Out of scope

- Real video playback
- Payments
- Email delivery of reminders
