INGInious
INGInious copied to clipboard
[frontend/task_edit] Subproblems are not shown in specified order.
Describe the bug
The problem data dictionary exported to the template here :
https://github.com/UCL-INGI/INGInious/blob/6e14ae8edb65b0ce18059863655659ba9efea129/inginious/frontend/pages/course_admin/task_edit.py#L63
is a Python OrderedDict.
The Javascript JSON load method does not load the keys an an ordered dictionary anymore : https://github.com/UCL-INGI/INGInious/blob/6e14ae8edb65b0ce18059863655659ba9efea129/inginious/frontend/templates/course_admin/task_edit.html#L170
Therefore, the subproblems are shown in an unexpected order in the task edition interface.
INGInious installation details
- Version: v0.8+
To Reproduce Steps to reproduce the behavior:
- Create a task with problem ids "01", "02", ..."10".
- The task editor may show "10" before all the others.
Expected behavior Subproblems should be displayed in the order specified in the YAML file.
A workaround is to export the dict as a list (using OrdrerdDict.items()
) and adapt the studio_load
method for such a data format.
I can't reproduce the bug, plus the project architecture seems to have been modified (but the two highlighted lines haven't been modified), perhaps this has been corrected?