Skip to content

SLG Creating new tasks

Ekaterina Bogacheva edited this page Jul 10, 2024 · 4 revisions

The SLGDataAccessService class encapsulates the data access functionality required for creating tasks.

How to add data for a new task?

For example, you want to add a new task for a Topic 'Classes'.

Navigate to SLGDataAccessService, choose createSubtopicsForClasses. Check whether a category for your task already exists within the listOfSubtopics, if not - add it first.

All lessons of every topic are collected in a dictionary lessonsForSubtopic, where a key is a title of a subtopic and a corresponding value - an ordered collection of lessons.

Navigate to the last task within chosen subtopic and call a constructor for chosen type of task, fill it with required data.

How to add a new topic?

To add a new topic add a new element to topics-array within initialize method of SLGDataAccessService. Content of a new topic should go to a new method creteSubtopicsFor[TopicName], similar to existing ones.

Clone this wiki locally