Skip to content

Commit

Permalink
Merge pull request #732 from rage/subsort
Browse files Browse the repository at this point in the history
Sort dialogue of old submissions
  • Loading branch information
Heliozoa authored Jan 16, 2025
2 parents 8abb947 + 27f4144 commit 2a7a19f
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

- Fixed downloading old submissions for C# exercises
- Fixed error messages not displaying in some cases when running tests
- Sort dialogue of old submissions by date
- Bumped TMC-langs version to 0.37.0

## [3.0.6] - 2024-11-07
Expand Down
5 changes: 4 additions & 1 deletion src/commands/downloadOldSubmission.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ export async function downloadOldSubmission(
return;
}

submissionsResult.val.sort(
(a, b) => parseDate(a.created_at).getTime() - parseDate(b.created_at).getTime(),
);
if (submissionsResult.val.length === 0) {
dialog.notification(`No previous submissions found for exercise ${exerciseId}`);
return;
Expand All @@ -46,7 +49,7 @@ export async function downloadOldSubmission(
const submission = await dialog.selectItem(
exercise.exerciseSlug + ": Select a submission",
...submissionsResult.val.map<[string, OldSubmission]>((a) => [
dateToString(parseDate(a.processing_attempts_started_at)) +
dateToString(parseDate(a.created_at)) +
"| " +
(a.all_tests_passed ? "Passed" : "Not passed"),
a,
Expand Down
5 changes: 5 additions & 0 deletions webview-ui/src/panels/Welcome.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,11 @@
Certain types of errors were not being displayed when they occurred while running
tests.
</p>
<h4>Sort dialogue of old submissions by date</h4>
<p>
Previously, when downloading an old submission, the list of old submissions was not
sorted in the dialogue.
</p>
<h3>3.0.6 - 2024-11-07</h3>
<h4>Added a warning for a large number of open exercises</h4>
<p>
Expand Down

0 comments on commit 2a7a19f

Please sign in to comment.