Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Grouped actions and tasksets #982

Merged
merged 38 commits into from
Jan 10, 2024
Merged

Grouped actions and tasksets #982

merged 38 commits into from
Jan 10, 2024

Conversation

anthonygego
Copy link
Member

@anthonygego anthonygego commented Nov 9, 2023

This PR introduces grouped actions and tasksets under courses. Grouped actions concern the task dispenser admin view so that all the task parameters

  • Grouped actions:

    1. During edition, task settings are stored in a Javascript dictionary instead of printing as many modals as there are tasks in the HTML. Each time the modal is opened, a javascript function for each setting is called and fetches the taskid from a data- tag attribute and populates the modal fields based on the settings dictionary.
    2. As grouped actions would not have sense if modals have to be opened to see the current setting for each task, each setting can be shown below the task name, using a filter which is also used to know what grouped action to perform.
    3. A grouped action modal contains all the settings but only the one selected in the filter is shown.
    4. Whenever a field is modified, the settings dictionary is updated for the selected task(s).
    5. Moving and deleting tasks has also been added as grouped actions.
  • Tasksets : as illustrated in the Figure below, courses have been divided in two separate objects where the remaining course is a task dispensing object located in database, while the tasksets actually manage the tasks themselves located in the filesystem.
    Capture d’écran du 2023-11-09 16-08-26

    To ease the implementation, the course factory has been duplicated. A taskset factory keep the YAML file loading part and the new course factory is a mockup above the database to avoid modifying too much code at a time.
    The latter also imports older courses by checking for a course.yaml file and if some entry already exists in database for the course id associated to the folder name.
    Several pages have been added to manage the taskset where the task dispenser is also used to provide course templating at the time of instantiation.
    The task dispenser is no more able to manage task files as courses only have read access to the tasksets.

TODO:

  • Check for task categories in submission view
  • Fix task order imported from the older TOC dispenser structure {"taskid2":1, "taskid1":0} -> ["taskid1", "taskid2"]

@nrybowski
Copy link
Member

LGTM.

The issue mentioned previously is resolved .

@nrybowski nrybowski merged commit c06f1c1 into master Jan 10, 2024
1 of 2 checks passed
@nrybowski nrybowski deleted the tasksets branch January 10, 2024 21:43
@nrybowski nrybowski restored the tasksets branch January 10, 2024 21:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants