Skip to content

Link the data files of zweedse voorouders and data-visualization in the feedback - #65

Merged
TomNaessens merged 2 commits into
masterfrom
bug/zweedse-voorouders-file-links
Oct 20, 2026
Merged

TomNaessens merged 2 commits into
masterfrom
bug/zweedse-voorouders-file-links

Conversation

@TomNaessens

@TomNaessens TomNaessens commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Follow-up to #60: the zweedse voorouders suite called familyMembers("dataN.txt") without declaring the file, so TESTed added no link to it in the feedback and students couldn't open the data their tests used. data-visualization had the same gap with its CSV files.

  • zweedse voorouders: every context now declares its file as input_files (path: "dataN.txt", content: !path "data/dataN.txt"). The 50 data files moved from workdir/ to evaluation/data/ (where TESTed copies input files from), with a copy in description/media/data/ (where the feedback link points). preparation/generator.js writes the same shape, so a regeneration keeps the links. The data itself is unchanged.
  • data-visualization: the 19 testcases that read a CSV declare it the same way; the 4 CSVs moved from workdir/ to evaluation/ (the copies in description/media/ were already there and identical).

How it works in TESTed (universal-judge master 8960b3e6): input_files copies each file from evaluation/ into that testcase's run and adds {"location": "href", "content": "media/<file>"} to its close-context; Dodona turns the file name in the testcase into a link that opens the file from description/media/.

Feedback of the first context: data1.txt in let relations1 = familyMembers("data1.txt") is a link

Clicking data1.txt opens it in a file viewer

The other exercises were checked for the same gap: mad libs, echo and input-through-prompt read no files, and the Python files example already declares and links unsorted.txt. The Bash line-count example in #54 declared its files but had no description/media/ copy, so its links would have 404'd; fixed there.

Rebased onto #63 (merged), which moved tested/data-visualization to tested/python/data-visualization; the change now applies there, with the same suite.

Part of https://github.com/dodona-edu/dodona/issues/8846.

Manual testing instructions

  1. In a Dodona dev checkout, use a clone of this branch as the example repository remote (or check it out in the local clone under data/exercises/) and reprocess it; sign in as zeus (http://dodona.localhost:3000/dev_sign_in/1).
  2. Open "Zweedse voorouders" (tested/javascript/zweedse voorouders) and submit its solution/solution.js: correct, and in the first context data1.txt in let relations1 = familyMembers("data1.txt") is a link.
  3. Click it: a file viewer opens with the 7 lines of data1.txt.
  4. Edge case: open "Data visualization" and submit solution/solution.py: each tab's testcases link the CSV they read (e.g. pokemon.csv).
Verification

dodona-authoring verify skill, ghcr.io/dodona-edu/dodona-tested, universal-judge master; "en"/"nl" are runs the way Dodona does them:

Exercise DSL Reference Wrong solution en nl contexts with a file link
zweedse voorouders valid 350/350 rejected 350/350 350/350 150/150 (before: 0/150)
data-visualization valid 30/30 rejected 30/30 30/30 19/19 (before: 0/19)

Feedback excerpt (zweedse voorouders, first context):

{"data": {"files": {"data1.txt": {"location": "href", "content": "media/data/data1.txt"}}}, "command": "close-context"}

Generator: run on a scratch copy, its output has the same structure line for line as the committed suite (756 structural lines identical, 1712 lines after masking names and values).

Local Dodona (origin/main 5ecd1fcef, TESTed judge from universal-judge master, this branch as the repository remote): the reference solution was accepted; the data1.txt link resolves to /en/submissions/1/media/data/data1.txt?token=..., and the returned file is byte-identical to description/media/data/data1.txt.

🤖 Generated with Claude Code

@TomNaessens TomNaessens added the bug Something isn't working label Oct 19, 2026
@TomNaessens TomNaessens self-assigned this Oct 19, 2026
@TomNaessens
TomNaessens marked this pull request as ready for review October 19, 2026 19:26
TomNaessens and others added 2 commits October 19, 2026 22:25
The suite read dataN.txt from workdir/ without declaring it, so TESTed added no
link and students couldn't open the data their tests used. Each context now
declares its file as input_files (copied from evaluation/data/, linked to
description/media/data/), and the generator writes the same shape.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@TomNaessens
TomNaessens force-pushed the bug/zweedse-voorouders-file-links branch from fafd07f to 46db236 Compare October 19, 2026 20:25
@TomNaessens
TomNaessens merged commit 33478c8 into master Oct 20, 2026
11 checks passed
@TomNaessens
TomNaessens deleted the bug/zweedse-voorouders-file-links branch October 20, 2026 08:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants