Skip to content

Show anonymous user banner on assignment viewer page#2920

Open
cqnykamp wants to merge 1 commit into
mainfrom
claude/modest-franklin-8iBLw
Open

Show anonymous user banner on assignment viewer page#2920
cqnykamp wants to merge 1 commit into
mainfrom
claude/modest-franklin-8iBLw

Conversation

@cqnykamp

Copy link
Copy Markdown
Contributor

Summary

Fixes #2862

  • Adds a fixed warning banner below the assignment header in AssignmentViewer when a student is logged in as an anonymous user
  • Banner says: "You are logged in as an anonymous user. Your work is saved in this browser only and may be lost if you clear your browser data."
  • The banner does not direct students to sign in (instructors may intentionally want anonymous students)
  • Adjusts headerHeight from static "80px" to "120px" when the banner is shown, so content is not obscured

Test plan

  • Create an assignment with a class code as an instructor
  • Visit /code/<classCode> as an anonymous user — banner should appear below the assignment title bar
  • Visit /code/<classCode> as a named (non-anonymous) user — banner should not appear
  • New e2e test: "Anonymous user sees banner; non-anonymous user does not" in assignmentWorkflow.cy.ts (@Group1)

https://claude.ai/code/session_01E8aWuAxKotiEZKkwwtwB3p


Generated by Claude Code

When a student accesses an assignment via a class code as an anonymous
user, display a fixed warning banner below the assignment header
informing them their work is only saved in the current browser.

The banner is shown at the /code/:classCode route (AssignmentViewer)
when user.isAnonymous is true. The header height is adjusted to
accommodate the extra 40px banner so content is not obscured.

Adds an e2e test verifying the banner appears for anonymous users and
does not appear for authenticated users.

Closes #2862

https://claude.ai/code/session_01E8aWuAxKotiEZKkwwtwB3p
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Show banner informing students they are logged in anonymously

2 participants