Show both course id and the archive file when they differ when listing course archives in the admin course. (hotfix of #3116) - #3117
Merged
Alex-Jordan merged 2 commits intoAug 6, 2026
Conversation
…ives in the admin course.
The previous setup did not take into account what would happen if
multiple archive files contained the same course id. So instead of the
`listArchivedCourse` method returning a hash of the form
```perl
{
myTestCourse => {
filename => 'myTestCourse.tar.gz',
size => '605 KB'
}
}
```
it now returns a hash of the form
```perl
{
'myTestCourse.tar.gz' => {
courseID => 'myTestCourse',
size => '605 KB',
lastModified => 1778667472
}
}
```
Note that the `lastModified` key is only included because that is what
is saved in the cache file, and that is just directly returned if the
archive file has not been modified. Although, at this point it is not
used elsewhere.
Both the courseID and the filename are then displayed. The format
displayed is `myTestCourse (myTestCourse.tar.gz, 605 KB)`.
If there is also an archive file `myTestCourseAlt.tar.gz` then it will
also be listed as something like`myTestCourse (myTestCourseAlt.tar.gz, 1.6 MB)`.
somiaj
approved these changes
Aug 6, 2026
Alex-Jordan
approved these changes
Aug 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is an alternate for #3115.