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

Rework Task Definition (within Course) #65

Open
eriq-augustine opened this issue Mar 5, 2024 · 0 comments
Open

Rework Task Definition (within Course) #65

eriq-augustine opened this issue Mar 5, 2024 · 0 comments

Comments

@eriq-augustine
Copy link
Collaborator

Right now, each task for a course is defined as a list of tasks of the specific type.
I don't like this because:

  • Most people will only have one of each type of task (at most) and the list can be confusing.
  • We have to aggregate tasks on validation into a single collection.
  • We have to add a reference to each type of task we add into the Course struct.

Instead of this, I would like to just have a list of tasks.
Each item can have values like type, when, and options, and we can validate by having task types register themselves.

...
tasks: [
    {
        "type": "report",
        "when": ...,
        "options": {
            "to": [
                "[email protected]"
            ]
        }
    },
],
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Todo
Development

No branches or pull requests

1 participant