Skip to content

Accept valid A2 SQL alternatives and improve grading feedback - #484

Open
danielrazavi wants to merge 9 commits into
mainfrom
sql-automated-marking
Open

danielrazavi wants to merge 9 commits into
mainfrom
sql-automated-marking

Conversation

@danielrazavi

@danielrazavi danielrazavi commented Oct 20, 2026 •

Copy link
Copy Markdown
Member

Follow-up to #481: accept different valid SQL answers without accepting incorrect results.

Fixes

Feedback from Issue Fix / commit
@khsergvl Different column names or order could fail Match values, not names; still check which values belong together and how often rows appear. 18c75f8
@niyazmnazari Q4 required unnecessary purchase details Vendor/time columns are optional; clearer feedback. e126332
@niyazmnazari Ordinary -- query comments caused errors Only complete answer markers are treated as markers. 1e7d3d4
@niyazmnazari Q9 temporary tables failed and blocked Q10-12 Temporary tables now work throughout Q9-12. 97ea818
@niyazmnazari Q4 rejected date-only running counts Accept counts grouping purchases by date or identical timestamp. a3cd528
@niyazmnazari Q3 required displaying the rank Rank can stay inside the query. 387711b
@niyazmnazari Q8 revenue needed a specific name/position Revenue can have any alias and appear before extra columns. 15be64b

Both A2 versions (DC Cohort and Microcredential Cohort) now remind students to track names used in earlier queries, rather than impose output-name restrictions.

Cleaner feedback: correct answers' SQL/output is collapsed; wrong answers and errors stay expanded. Status/messages always remain visible. bb2e41b

What I Tested

  • Ran 31 automated tests with the private instructor solutions; all passed.
  • Submitted correct answers with every Q1-8 output column renamed and reordered; all 12 questions passed.
  • Deliberately mixed up Q2 customer/date pairings without changing the individual values; Q2 correctly failed.
  • Submitted all-wrong answers; Q1-9 failed and Q10-12 were blocked because Q9 was wrong.
  • Confirmed new commits automatically rerun grading, correct answers collapse their SQL/output, and wrong answers stay expanded.

No sample answers or instructor solutions are added to the course repo.

@github-actions

Copy link
Copy Markdown

Thanks for your contribution! 🎉

Please remember to tag or request a review from the DSI team. Give us up to 72 hours to review your pull request. We appreciate your patience and efforts.

@danielrazavi

Copy link
Copy Markdown
Member Author

@khsergvl @niyazmnazari thanks again for the feedback! I've addressed the points you raised and tested the changes in my fork, including renamed/reordered columns and a deliberately wrong answer to check it still gets rejected. The description links each fix and the test results. Could you take a look and review when you have a chance?

@khsergvl

Copy link
Copy Markdown
Collaborator

@danielrazavi there is a need to make this part abstract:
2

And here:

https://github.com/UofT-DSI/sql/blob/main/.github/workflows/sql_assignment_runner.yml#L93

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.

2 participants