Tests & Quizzes: order of attachments are not properly ordered
Description
Activity
Christina Schwiebert May 7, 2021 at 10:17 AM
I was able to reproduce this on 22/trunk https://trunk-mysql.nightly.sakaiproject.org, build 90cd7a6f
I encountered three different orders of the files. None appeared to be alphabetical by file type or file name.
Order 1 - The order the instructor uploaded the files in
Order 2 - The order in which the files appear in the Assessment Builder, and when editing the question with the attachments
Order 3 - The order of attachments in the Preview and student view
Order 1: (including first letters of file name to show randomness)
L---.mp4
S—.png
P—.xml
W—.png
F—.gif
F—.doc
Order 2:
F—.gif
P–.xml
L—.mp4
F—.doc
W—.png
S—.png
Order 3:
F—.gif
F—.doc
L—.mp4
S—.png
W—.png
P—.xml
If the original order is not kept, the order of attachments listed in the Assessment builder and in the preview/student view should be consistent.
Test plan:
As instructor, create a test with a single question.
Attach multiple files (different file types and file names) to the question. Record the order of the attachments.
Save the question. Record the order of the attachments in the Assessment Builder.
Edit the question. Record the order of the attachments.
Preview the question. Record the order of the attachments.
Publish the assessment and take the test as a student. Record the order of the attachments.
The order should ideally be the same between 2, 3, 4, 5, and 6. If not possible, then at very least the order between 3, 4, 5, and 6 should be the same.
Order of attachments are not properly ordered as its original attachments.
Testing on qa3-us, I tried to attach files in assessment, part and question attachments in the same order:
1. quicktime/.mov
2. image/.jpg
3. image/.gif
4. image/.png
5. flash/.swf
But when I do preview I got order of attachments are mixed up in all places:
Assessment attachment shows:
1. mov
2. png
3. gif
4. swf
5. jpg
Part attachment shows:
1. jpg
2. mov
3. png
4. gif
5. swf
Question attachment shows:
1. jpg
2. swf
3. jpg
4. mov
5. png
Taking assessment as student all assessment, part, question attachment show the same order:
1. mov
2. jpg
3. gif
4. png
5.swf
I think it wherever: in preview (assessment, part, question attachment) and in student view (assessment, part, question attachment) should shows the images in the exact order as in the attachment in authoring when files are attached.