Skip to content

Add global_id to users JSON response and corresponding tests#6869

Open
albertoleoncio wants to merge 1 commit intoWikiEducationFoundation:masterfrom
albertoleoncio:patch-1
Open

Add global_id to users JSON response and corresponding tests#6869
albertoleoncio wants to merge 1 commit intoWikiEducationFoundation:masterfrom
albertoleoncio:patch-1

Conversation

@albertoleoncio
Copy link
Copy Markdown

What this PR does

  • Adds user global_id to the course users JSON payload at /courses/:slug/users.json, aligning JSON output with course_students_csv.
  • This change is needed because global_id had already been added to the CSV in Issue #5195 Added global_id column next to username column to CSV export of editor data #5232 (requested by me), but a later change in 3f347ae now requires login before accessing that CSV.
  • I've updated my downstream integration to consume JSON instead of CSV. This PR restores parity by exposing global_id in the JSON response as well.
  • Adds request-spec coverage to ensure global_id remains present in the users JSON payload.

AI usage

I used GitHub Copilot (GPT-5.3-Codex) to:

  • Locate where /courses/:slug/users.json is serialized.
  • Add global_id to the users JSON payload.
  • Draft and validate a focused request spec for this behavior.

I reviewed the changes and test result manually.

Screenshots

Before:

  • Not applicable (no UI change).

After:

  • Not applicable (no UI change).

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.

1 participant