Quarter Management

Infinite Campus shows one quarter's grades at a time. IC Insight handles this by detecting which quarter is visible on the current page and merging each quarter's data into a single cached entry per course.


How Quarters Are Detected

When the content script parses a grades page, it runs parseQuarterInfo() using three strategies in order:

Strategy 1 - Term Picker Element

Looks for the tl-app-term-picker custom element and reads its .header-text for a pattern like Term Q1. Date ranges are extracted from a .term-picker__sub-header-text or similar sub-header element, looking for a MM/DD/YYYY – MM/DD/YYYY pattern.

Strategy 2 - Full Body Text Search

If the term picker isn't found, scans the full document.body text for the pattern Term Q# followed by a parenthesized date range.

Strategy 3 - Term-Only Fallback

If no date range is found, stores the quarter with empty start/end dates so the page can still be cached.

Quarter IDs are always Q1, Q2, Q3, or Q4 (upper-cased). Quarter names are Quarter 1 through Quarter 4.


Caching Multiple Quarters

Each time you click Cache (or the overlay auto-caches on parse), IC Insight merges the newly parsed quarter(s) into the existing cached entry for the course:

  1. The existing cache entry's quarters array is loaded.
  2. For each newly parsed quarter, if a quarter with the same ID already exists in the cache, it is replaced. If not, the new quarter is appended.
  3. All quarters are sorted by ID (Q1 before Q2, etc.).
  4. The overall grade is recomputed from the merged set of all quarters.

Result: To cache all four quarters, visit each quarter's tab in IC and click Cache (or use Refresh All from the Dashboard). The Dashboard shows data from all cached quarters combined.

Missing Quarter Prompt

After caching, IC Insight checks which quarters are available on the page (by reading the tab picker) and which are not yet cached. If multiple quarters are available and some are missing from the cache, a yellow warning banner appears:

"Please cache Q2, Q3 to complete your data. Navigate to each quarter tab or go to 'All Terms' and click Refresh to save the data."

The banner auto-dismisses after 15 seconds.


Gradebook Logic: Rolling vs. Traditional

This setting (Options → Quarter Settings) controls how IC Insight combines assignments across quarters.

Rolling Gradebook (default)

In IC's rolling gradebook, each quarter's grade is cumulative: Q2 includes all of Q1 and Q2's work, Q3 includes Q1+Q2+Q3, and so on.

IC Insight models this by:

  1. Finding the latest quarter in the cached data.
  2. For each category in the latest quarter, injecting synthetic assignments that represent the total earned/possible of matching categories in each earlier quarter.
  3. Calculating the grade only from the latest quarter's categories (which now include the synthetic rolled-up history).

A synthetic assignment looks like:

{
  "name": "Q1",
  "earned": 450,
  "possible": 500,
  "ungraded": false,
  "synthetic": true
}

Note: synthetic (and the runtime id field) are ephemeral properties that only exist in memory during a render cycle. Synthetic assignments are never persisted to the cache or to any storage key.

Synthetic assignments are never cached and never shown with action buttons (they cannot be dropped or edited). They are generated fresh at render time.

Note: In rolling mode, the "Cumulative" display mode in Options is disabled (greyed out) because rolling already inherently accumulates all past work.

Traditional Gradebook

In a traditional gradebook, each quarter is independent. IC Insight calculates the grade using only the current quarter's assignments (those belonging to the active quarter based on the current date). The overall shown on the Dashboard is that single quarter's grade.

In traditional mode, the Grade Display Mode setting becomes active:

  • Current Quarter: show only the active quarter's grade.
  • Cumulative: average all quarters' grades together.

Backup and Zero-Grade Protection

Before overwriting a cache entry, IC Insight stores the previous entry under ${courseKey}_BACKUP. If the newly parsed data produces a 0% overall but the previous cached entry had a non-zero grade, the update is rejected and the existing entry is preserved. This prevents bad page-load states (e.g. IC still loading when Refresh was clicked) from wiping out good data.