Duplicate Learning Path which contains Classes

Created on 5 December 2023, 12 months ago

Problem/Motivation

If module `opigno_class` is enabled and there is group of type `Learning Path`, which contains classes and we click on `Duplicate` link, then there is WSOD with following error in logs :
"Drupal\Core\Entity\EntityStorageException: The provided plugin provided does not support the entity's bundle. in Drupal\group\Entity\Storage\GroupContentStorage->createForEntityInGroup() (line 54 of web/modules/contrib/group/src/Entity/Storage/GroupContentStorage.php)."

This happens, because here function `trainingDuplicate` assumes, that there may be only `opigno_course`.

Steps to reproduce

Install Opigno LMS, and enable necessary modules, including `opigno_class` and `opigno_course`. Add Learning path with course and class and try to duplicate it.

Proposed resolution

Update code, so it assumes, that there may be not only courses.

Remaining tasks

Review patch, fix if necessary and commit.

🐛 Bug report
Status

Needs review

Version

3.1

Component

Code

Created by

🇷🇺Russia ilya.no

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024