Skip to content

[FRONTEND] Rename 'Public' course listing to 'All' and include restricted courses #276

Description

@smattymatty

Claiming This Task

Before you start working, check the Assignees section. If no one is assigned, leave a comment claiming the issue and assign it## Claiming This Task

Before you start working, check the Assignees section. If no one is assigned, leave a comment claiming the issue and assign it to yourself. This prevents duplicate work.

See the Community Wiki for contributing guidelines and git workflow.

Current Situation

What's the problem, or what's the current state if suggesting an enhancement?

Proposed Solution

How should this be fixed or improved?

Benefits

How does this help the project, its contributors, or its users?

Files to be Altered (if known)

List specific files or directories. Leave blank if unsure.

Additional Context (Optional)

Screenshots, links, or other relevant information.
to yourself. This prevents duplicate work.

See the Community Wiki for contributing guidelines and git workflow.

Problem

The "Public" course listing only shows courses with visibility: "public". Restricted courses (visibility: "restricted") are completely invisible in the public listing — users can't discover them even though they're meant to be discoverable (just gated behind approval/invite to join). This defeats the purpose of the "restricted" visibility setting.

Private courses are correctly hidden since they're invite-only via share links.

Requirements

  1. Rename "Public" listing to "All" — the toggle currently shows "View Public" / "View Mine". Change "View Public" to "View All" (and the page title from "Public Courses" to "All Courses")
  2. Default the "All" listing to show both public and restricted courses — these are the discoverable courses
  3. Add a visibility filter to the filter dropdown — let users filter by "Public", "Restricted", or show both (default)
  4. Private courses remain hidden in the "All" listing — they are only accessible via direct invite/share link
  5. Update i18n keys — rename existing public listing keys and add any new filter labels in both en.json and ar.json
  6. Backend already supports this — the GET /api/courses/ endpoint accepts a visibility query param and already returns restricted courses when requested. No backend changes needed.

Architecture Context

  • CourseListPage.tsx — main file to modify. Currently has view="public" and view="me" modes
  • coursesApi.tslistCourses() already accepts visibility as a filter param
  • CourseListParams type already supports visibility?: CourseVisibility
  • The filter dropdown already exists in the page (subject, language, country filters). Visibility just needs to be added as another filter option.
  • Routes: /courses/public should still work (perhaps redirect or alias to /courses/all, or just keep the URL but change the behavior)

API Dependencies

GET /api/courses/ — already fully supports visibility filtering via query params. No backend changes needed.

Files to be Altered

  • Frontend/EduLiteFrontend/src/pages/CourseListPage.tsx — rename public view, update default query to include restricted, add visibility filter
  • Frontend/EduLiteFrontend/src/App.jsx — consider renaming /courses/public route or adding /courses/all alias
  • Frontend/EduLiteFrontend/src/i18n/locales/en.json — update course.list.* keys (publicTitle → allTitle, viewPublic → viewAll, etc.)
  • Frontend/EduLiteFrontend/src/i18n/locales/ar.json — matching Arabic translations

Testing Requirements

  • "All" listing shows both public and restricted courses by default
  • Private courses do NOT appear in the "All" listing
  • Visibility filter works: selecting "Public" shows only public, selecting "Restricted" shows only restricted, "All" shows both
  • "My Courses" listing is unchanged
  • Enrolled restricted courses are not dimmed (existing fix)
  • Dark mode and mobile responsive
  • Arabic translations display correctly
  • No console errors

Additional Context

Currently a user creating a "restricted" course would find it invisible in the browse listing, making it undiscoverable. The only way others could find it would be through a direct link. This change makes restricted courses browsable while still requiring approval/invite to actually join — which is the intended UX for "restricted" visibility.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions