LDEV-4507 Use DTOs instead of entities as page attributes
It seems that using entities as page attributes outside a transaction
causes undesired effect. Portrait tag fetches data from DB and existing
entities, including group participants, get flushed from session. It
overwrites changes made by learners being added to a group.