Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Roster info message #6905

Merged
merged 1 commit into from
Dec 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ import {
CautionIcon,
ClockIcon,
FileGenericIcon,
InfoIcon,
Link,
} from '@hypothesis/frontend-shared';
import classnames from 'classnames';
import { useCallback, useMemo, useState } from 'preact/hooks';
Expand Down Expand Up @@ -426,6 +428,19 @@ export default function AssignmentActivity() {
}
}}
/>
{!students.isLoading && !students.data?.last_updated && (
<Link
variant="text-light"
classes="flex items-center gap-1"
href="https://web.hypothes.is/help/student-roster-displays-in-the-lms-reporting-dashboards/"
target="_blank"
data-testid="missing-roster-message"
>
<InfoIcon />
Full roster data for this assignment is not available. This only shows
students who have previously launched it.
acelaya marked this conversation as resolved.
Show resolved Hide resolved
</Link>
)}
</div>
);
}
Original file line number Diff line number Diff line change
Expand Up @@ -727,8 +727,12 @@ describe('AssignmentActivity', () => {

const wrapper = createComponent();
const lastSyncDate = wrapper.find('[data-testid="last-roster-date"]');
const missingRosterMessage = wrapper.find(
'[data-testid="missing-roster-message"]',
);

assert.equal(lastSyncDate.exists(), shouldDisplayLastSyncInfo);
assert.equal(missingRosterMessage.exists(), !shouldDisplayLastSyncInfo);
});
});

Expand Down
Loading