| Conditions | 1 |
| Paths | 1 |
| Total Lines | 13 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 11 | public function notifyLearningPathEnd(HookLearningPathEndEventInterface $event): void |
||
| 12 | { |
||
| 13 | $data = $event->getEventData(); |
||
| 14 | $em = Database::getManager(); |
||
| 15 | |||
| 16 | $lpView = $em->find('ChamiloCourseBundle:CLpView', $data['lp_view_id']); |
||
| 17 | $lp = $em->find('ChamiloCourseBundle:CLp', $lpView->getLpId()); |
||
| 18 | |||
| 19 | $learningPathEnded = new LearningPathCompleted($lpView, $lp); |
||
| 20 | |||
| 21 | $statement = $learningPathEnded->generate(); |
||
| 22 | |||
| 23 | $this->saveSharedStatement($statement); |
||
| 24 | } |
||
| 26 |