Skip to content

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

Merged
khsergvl merged 10 commits into
mainfrom
sql-automated-marking
Oct 29, 2026
Merged

khsergvl merged 10 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
danielrazavi marked this pull request as ready for review October 20, 2026 16:54
@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

@danielrazavi

Copy link
Copy Markdown
Member Author

@khsergvl we kept those parts specific to A2 because that’s the only assignment the grader supports right now. Once we add support for other assignments, we can make them configurable rather than hardcoded.

khsergvl
khsergvl previously approved these changes Oct 29, 2026

@khsergvl khsergvl left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Thank you so much!

@khsergvl

Copy link
Copy Markdown
Collaborator

@khsergvl we kept those parts specific to A2 because that’s the only assignment the grader supports right now. Once we add support for other assignments, we can make them configurable rather than hardcoded.

Just FYI khsergvl#13

@danielrazavi

Copy link
Copy Markdown
Member Author

Now that the A1 restoration is part of this branch and PR, I'm moving this back to draft while I test both Assignment 1 and Assignment 2 in my fork. I'll mark it ready for review again once testing is finished.

@danielrazavi
danielrazavi marked this pull request as ready for review October 29, 2026 22:10

@khsergvl khsergvl left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work!

@khsergvl
khsergvl merged commit 6df852f into main Oct 29, 2026
2 checks passed
@khsergvl
khsergvl deleted the sql-automated-marking branch October 29, 2026 23:05
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