Outline tab links to a hidden dates tab

Open Beginner friendly
#2,250 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
88/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
javascript, react
Domain
frontend

Research direction

Read CourseDates.jsx and the scheduled content alert component under src/course-home/outline-tab/, then check CourseInProgress.jsx for how the dates tab URL is read from the tab list. Update the outline links to follow that pattern and review the outline tests. Done means both links are absent when the tabs list has no dates tab and both remain available when it does.

Written by the indexing model from the issue text.

Description

The outline tab links to the dates tab when the learner's tab list has no dates tab. Two cases: a course whose Dates tab is hidden, where the "View Course Schedule" button opens a dates page with no dates on it; and a learner who has not yet passed the entrance exam, for whom only the "Entrance Exam" tab is listed, where that button and the dates widget's "View all course dates" link both open the dates page.

Status (2026-11-12): #2252 fixes this in the frontend-base version of Learning, the package under frontend-base/ on the frontend-base branch. The frontend-build and frontend-platform version under src/ still has the bug. If a fix is wanted there, #2252's change needs to be backported to it.

[!NOTE]
This issue was written by Claude (Claude Code) and reviewed before posting.

Claude Plan

Mechanism

Read from the code at the linked commits; not reproduced in a browser.

  • Both links take datesTabLink from the outline response: the anchor in CourseDates.jsx, and the button in ScheduledCotentAlert.jsx, whose only gate is datesTabLink &&. The outline view sets dates_tab_link for every course without looking at the tab (outline/views.py), so the gate is always true.
  • The tab list is the course metadata response's tabs, built by get_course_tab_list. It has no dates tab when the tab is hidden (DatesTab.is_enabled; the tab is is_hideable), and it has only the courseware tab, renamed "Entrance Exam", for a learner who must complete the entrance exam (L337-L345).
  • Hidden tab. The outline view and the dates view both empty course_date_blocks when DatesTab.is_enabled is false (outline/views.py, dates/views.py). The dates widget renders nothing without blocks (CourseDates.jsx), so its link is not shown. The scheduled content alert, shown to an enrolled learner in a course with unreleased content (hooks.js), still shows its button, and the dates page it opens gets an empty course_date_blocks.
  • Entrance exam. DatesTab.is_enabled is still true, so the widget renders with its link, the alert shows its button, and the dates page lists the course's dates. That the tab is meant to be out of reach is read from get_course_tab_list's own comment (L334-L335): "If the user has to take an entrance exam, we'll need to hide away all but the "Courseware" tab."

Elsewhere in Learning

The course exit page's in-progress view gates the same kind of button on the tab list: CourseInProgress.jsx reads useDatesTabUrl(), the dates tab's URL from tabs, and renders its schedule button only when there is one (L44-L48).

Fix

  • CourseDates.jsx and the scheduled content alert read useDatesTabUrl() in place of the response's datesTabLink, and render the link or button only when the hook returns a URL, as CourseInProgress.jsx does.
  • Tests: the outline suite gains, for a course whose tabs has no dates tab, a case with date blocks and no "View all course dates" link, and a case with scheduled content and no "View Course Schedule" button.

Acceptance

  • A course whose tabs has no dates tab shows no "View Course Schedule" button in the scheduled content alert and no "View all course dates" link in the dates widget
  • A course with a dates tab shows both as today
Dominant language
JavaScript
Stars
71
Forks
341
Avg merge
4d 18h
Merged PRs (30d)
20

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from openedx/frontend-app-learning

All issues in openedx/frontend-app-learning

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.