UCL-INGI / INGInious

INGInious is a secure and automated exercises assessment platform using your own tests, also providing a pluggable interface with your existing LMS.
http://www.inginious.org
Other
202 stars 139 forks source link

[task_dispensers] grouped actions on tasks #965

Closed anthonygego closed 1 year ago

anthonygego commented 1 year ago

This PR follows #964 and proposes a first implementation of grouped actions on tasks in TOC-based dispensers. This had become a must-have in order to separate course from task sets and move the course data in database only, making the task dispenser settings not modifiable from the files.

This implementation is HTML/JS based only, quite heavy and probably not the cleanest possible (it produces a lot of js code). However, I think it's worth to evaluate the user experience first before refactoring and making this definitive.

The implementation is based on the following requirements:

and resolves this by:

  1. Adding a quick setting preview in the task list, using a filter (one setting at a time is shown)
  2. Refreshing the quick preview each time a field is updated in the task edit modal. This is the dirtiest part of the code right now.
  3. Allowing to select sections/tasks
  4. Adding a grouped setting modal that show only the edit field selected in the filter. That is, if filtered on accessibility, only the accessibility can be changed in the modal.
  5. Refreshing the tasks specific input fields each time the grouped action fields are changed, and trigger the change event of each of these fields, so that point 2 will also work when settings are edited through grouped actions.
  6. Allowing to move and remove a bunch of tasks
  7. Allowing to set the task settings for new tasks, because this is now independent.
  8. Enabling, by default, a compact view of the task list, in order to apply the filters and save the changes more easily while navigating through a long list of tasks.

This whole UI, while still not being the optimal solution, is slowly becoming an implementation nightmare. It's probably the first signs that jQuery is not sufficient anymore as a Javascript frontend framework.

Another issue: this implementation is still not smartphone friendly. However, the main issue is the drag and drop that prevents appropriate usage of the rest of the UI. I think that either toggling on and off the drag and drop, or completely removing it, might be a first solution. But this would be for a future PR...

anthonygego commented 1 year ago

Obsolete.