KASKO, short for kasvatus ja koulutus, is the site for the department responsible for childhood and education in the city of Helsinki. The site includes multiple unit searches and a bit complex system built using the Group contrib module for upper secondary schools.
Env | Branch | Drush alias | URL |
---|---|---|---|
development | * | - | https://helfi-kasko.docker.so/ |
production | main | @main | TBD |
You need to have these applications installed to operate on all environments:
- Docker
- Stonehenge
- For the new person: Your SSH public key needs to be added to servers
For the first time (new project):
$ make new
And following times to start the environment:
$ make up
NOTE: Change these according of the state of your project.
This will log you inside the app container:
$ make shell
The KASKO instance has multiple React searches and features provided by the Group module.
This search paragraph lists TPR units that are tagged with the unit_type
vocabulary term After-school activity.
- The filter search is a View (
after_school_activity_search
) with exposed filters. The View configuration can be found in here. - No React front.
- The paragraph has editable title and description fields
- Can be added to landing pages and the lower content region of standard pages.
This search paragraph lists TPR units that are tagged with the unit_type
vocabulary term Daycare.
- The filter search is a View (
daycare_search
) with exposed filters. The View configuration can be found in here. - No React front.
- The paragraph has editable title and description fields
- Can be added to landing pages and the lower content region of standard pages.
The Group news paragraph lists latest news of a selected group. The block uses a View called latest_group_news
that has two displays for different amount of news listed.
The number of news items to be displayed can be selected from the paragraph field field_group_news_number_of_news
.
This selection determines the View display to be used. The related logic can be found in the hdbt_subtheme
under the
group news paragraph template here.
Additionally, the paragraph has a field called field_group_news_group_id
that is used to identify the group whose
news should be displayed, and a field called field_group_news_archive
where you can define the landing page to which
the paragraph should link. The paragraph also includes editable fields for the title and description.
You can add the paragraph to landing pages and the higher and lower content regions of standard pages.
The Group news archive is simple paged list of all news the selected group has. The paragraph includes only one field
called field_group_news_group_id
that is used to identify the group whose news should be displayed. The list is
a View called group_news_archive
and its configuration can be found here.
You can add the paragraph to landing pages.
The High school search lists high schools, also referred to as upper secondary schools in this instance. This search was one of the first implementations of the unit searches, and it has a slightly different structure compared to the After-school activity search, Daycare search, and Playground search.
The units are selected manually in the paragraph field field_hs_search_units
, and the View filters the TPR units to
display based on the field's content. It is also possible to change the form's submit button text by writing the desired
text in the field_hs_search_meta_button
field. The results are displayed in two tabs, allowing users to either list
schools or display them on a map.
The exposed form has additional functionality provided by high-school-search.js
, which makes it possible to select a
value only for the Emphasis or Mission drop-down. This helps avoid searches that yield no results.
- The filter search is a View (
high_school_search
) with exposed filters. The View configuration can be found in here. - The results can be displayed as a list or on a map.
- No React front.
- The paragraph has editable title, description, units and search button fields.
- Can be added to landing pages and the higher and lower content regions of standard pages.
- The javascript
high-school-search.js
can be found here.
This search paragraph lists TPR units that are tagged with the unit_type
vocabulary term Playground.
- The filter search is a View (
playground_search
) with exposed filters. - No React front.
- The paragraph has editable title and description fields
- Can be added to landing pages and lower content regions of standard pages.
The School search paragraph provides a tabbed interface that allows users to either find the nearest school by entering a street address or find any school by filtering through the school's information. The search results are displayed in a tabbed format, offering both a list view and a map view.
This search functionality is built with React and utilizes a Views listing (comprehensive_school_search
) as a
fallback when JavaScript is disabled. All React-based searches are located in the hdbt
theme, where most of the
related logic is implemented.
- The fallback listing is a View called (
comprehensive_school_search
) and it doesn't have any filters. The fallback View configuration can be found in here. - The search has a React front and the code can be found here.
- The paragraph has editable title and description fields.
- Can be added to landing pages.
The Vocational school search was created based on the High school search, so it has similarities in the implementation details.
The units are selected manually in the paragraph field field_vs_search_units
, and the View filters the TPR units to
display based on the field's content. It is also possible to change the form's submit button text by writing the desired
text in the field_vs_search_meta_button
field.
- The filter search is a View (
vocational_school_search
) with exposed filter. The View configuration can be found in here. - No React front.
- The paragraph has editable title, description, units and search button fields.
- Can be added to landing pages and the higher and lower content regions of standard pages.
This user role grants administrative access to daycare TPR units on the site. Permissions are provided by the
helfi_kasko_content
module. Users can enrich TPR unit content categorized under daycare
. The category assignment is
based on the ontologyword_ids
associated with the TPR units. Read more about TPR unit categorization here.
This user role grants administrative access to playground TPR units on the site. Permissions are provided by the
helfi_kasko_content
module. Users can enrich TPR unit content categorized under playground
. The category assignment
is based on the ontologyword_ids
associated with the TPR units. Read more about TPR unit categorization here.
This user role grants administrative access to comprehensive school TPR units on the site. Permissions are provided
by the helfi_kasko_content
module. Users can enrich TPR unit content categorized under comprehensive school
. The
category assignment is based on the ontologyword_ids
associated with the TPR units. Read more about TPR unit
categorization here.
This user role is designated for the upper secondary school editor. However, it does not provide direct permissions to edit nodes. To gain these permissions, users must be assigned to an upper secondary school group, which grants the necessary editing rights for nodes within the group. This group grants other required permissions such as to use media entities and access to TPR units and services entities. More information about groups can be found here.
KASKO has the Group contrib module enabled. This module restricts upper secondary school editors’ access to a specific set of nodes and allows them to create dedicated website for their school within the KASKO instance. Groups are used only for upper secondary schools and the groups can have standard pages, landing pages, news items and announcements inside the group content.
There is also a custom module called helfi_group
that modifies group menus, alters the standard translation features
for nodes under group control, and allows TPR unit entities to be managed within the group.
- The custom module
helfi_group
can be found from here.
Since groups can have their own news items, the news feature is enabled in the KASKO instance, but it is limited to upper secondary schools. Each school can publish its own news, which is displayed within the school’s specific area. Other KASKO-related news is created in the Etusivu instance in the same manner as other news, and the enabled news feature does not affect this process.
The list of all groups (/admin/group) is empty even there is multiple groups in the database:
Only users with Administrator role (not even Super administrators currently) are able to see all groups and assign members to groups that they are not members themselves. If you are a member of a certain group, but you don't have the Administrator role, you can see the group that you belong to on the listing.
Each of the upper secondary school groups can have news specific to their school. The news items are functionally the same as those used in the Etusivu instance, but they are limited to the school's designated area. News is displayed in two different paragraphs: Group News and Group News Archive.
News items also have the Override Node Options feature enabled, which is not part of the standard installation. This
allows upper secondary school editors to override the News Item Published option without needing permissions to
create news items outside the group they belong to. The override node options functionality is provided by the
override_node_options
contrib module.
Each upper secondary school (high school) has their own group menu. This group menu is used on subpages of the school,
and it can be edited by the group members under the group configuration. The basic functionality of the Group modules
group menu has been customized in the helfi_group
custom module. The group menu is displayed using a block that is
assigned to the First sidebar region and has been restricted to Group type Upper secondary school.
- Read more about the customizations here.
The basic TPR unit template is overridden in hdbt_subtheme
so that different kinds of school cards are rendered in
a specific way. You can check the template in here.
Also the TPR unit ontology word details template is overridden in hdbt_subtheme
in a more detailed way. Check out the
template here.
In KASKO instance the TPR units are categorized based on some of the ontology IDs they have in the TPR API. The
categories are then saved to a field called Categories in the helfi_kasko_content
custom module in
this file.
The categories are then used on role assignment based on unit category and as search filters.
- Read more about the implementation from the
helfi_kasko_content
custom module here.
KASKO has some additional fields on TPR units.
Field categories is used to save the TPR unit categorization that is done based on the ontologyword_ids
. Read more
about it in the TPR unit categorization section.
Comprehensive school editor (peruskoulun sisällöntuottaja) can create, edit, translate and delete their own announcements. They can also see all unpublished announcements. An form alter has been created for announcement node. It prevents comprehensive school editor from creating a site wide announcement.
Reference field where the upper secondary school (high school) front page used to be added. Appears to be unused and possibly deprecated field.
This field is used to save language program and weighted curriculum education information for TPR units. If the
information is present it is shown on the TPR unit entity page. This field is also used in filtering the
High school search results. The field rendering is done in the hdbt
theme
here.
Taxonomy term reference field that is used to categorize the vocational schools. The field is used in filtering the Vocational school search.
The following fields are available globally for all instances to use, but in KASKO, they are customized compared to the standard format.
This is a simple boolean field that determines if Description field is shown on the TPR unit page. The field is used
in the hdbt
theme here.
As the human-readable name suggests, this field includes contact details of daycare centre groups. The information is
displayed on the TPR unit page if there is data in the field and the unit is of type daycare. The field rendering is
done in the hdbt
theme here.
The news item pattern in KASKO is customized compared to the standard format. In KASKO, news items are always related to
an upper secondary school and are displayed within the school’s designated area. The pattern is designed to accommodate
this setup. The customization is done in custom module called helfi_kasko_config
. You can check the code in here.