Skip to content

Commit 2a7a19f

Browse files
authored
Merge pull request #732 from rage/subsort
Sort dialogue of old submissions
2 parents 8abb947 + 27f4144 commit 2a7a19f

File tree

3 files changed

+10
-1
lines changed

3 files changed

+10
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

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

910
## [3.0.6] - 2024-11-07

src/commands/downloadOldSubmission.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@ export async function downloadOldSubmission(
3838
return;
3939
}
4040

41+
submissionsResult.val.sort(
42+
(a, b) => parseDate(a.created_at).getTime() - parseDate(b.created_at).getTime(),
43+
);
4144
if (submissionsResult.val.length === 0) {
4245
dialog.notification(`No previous submissions found for exercise ${exerciseId}`);
4346
return;
@@ -46,7 +49,7 @@ export async function downloadOldSubmission(
4649
const submission = await dialog.selectItem(
4750
exercise.exerciseSlug + ": Select a submission",
4851
...submissionsResult.val.map<[string, OldSubmission]>((a) => [
49-
dateToString(parseDate(a.processing_attempts_started_at)) +
52+
dateToString(parseDate(a.created_at)) +
5053
"| " +
5154
(a.all_tests_passed ? "Passed" : "Not passed"),
5255
a,

webview-ui/src/panels/Welcome.svelte

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,11 @@
8383
Certain types of errors were not being displayed when they occurred while running
8484
tests.
8585
</p>
86+
<h4>Sort dialogue of old submissions by date</h4>
87+
<p>
88+
Previously, when downloading an old submission, the list of old submissions was not
89+
sorted in the dialogue.
90+
</p>
8691
<h3>3.0.6 - 2024-11-07</h3>
8792
<h4>Added a warning for a large number of open exercises</h4>
8893
<p>

0 commit comments

Comments
 (0)