Component summary shows nothing when All Periods is selected

Aperta Adatta ai principianti
#2,401 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
78/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
angular, typescript
Ambito
frontend

Direzione di ricerca

Il bug si trova in ComponentSummaryComponent.setComponent in component-summary.component.ts, intorno alla riga 145, dove hasStudentWork confronta state.periodId con this.periodId. Confrontalo con il controllo sulle annotazioni dei punteggi vicino alla riga 181, che tratta già -1 come tutti i periodi. Esegui la spec del component summary, aggiungi un caso con periodId -1 e lavoro dello studente in un periodo, e verifica che il riepilogo venga mostrato. È completato quando All Periods mostra il riepilogo come un singolo periodo.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

In Grade by Step, selecting "All Periods" hides the completion figure, the summary charts and the AI summaries of every component, even when students have submitted work. Selecting a single period shows them.

How to reproduce

  1. In a run with at least one period, have a student submit work on a component that has a summary (for example a Multiple Choice or Discussion step).
  2. As the teacher, open Grade by Step for that step with a single period selected: the summary appears.
  3. Switch the period selector to "All Periods": the summary disappears.

Cause

ComponentSummaryComponent.setComponent decides whether there is student work with state.periodId === this.periodId (component-summary.component.ts line 145). With All Periods selected periodId is -1, which no state has, so hasStudentWork is false. The same component already treats -1 as matching every period for score annotations (line 181).

Fix

Using the same period match the annotations use fixes it. The change is on my fork, Isaries/WISE-Client branch fix/component-summary-all-periods, and I can open a PR if that helps.

Lingua principale
TypeScript
Stelle
4
Fork
8
Merge medio
3g 8h
PR unite (30g)
12

Preparare l'ambiente

  • Include un Dockerfile o un file Docker Compose
  • Ha un modello di pull request
  • Nessuna guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di WISE-Community/WISE-Client

Tutte le issue di WISE-Community/WISE-Client

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.