| Conditions | 2 |
| Paths | 2 |
| Total Lines | 11 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 17 | public function hookCreateCourse(HookCreateCourseEventInterface $hook): void |
||
| 18 | { |
||
| 19 | $data = $hook->getEventData(); |
||
| 20 | |||
| 21 | $type = $data['type']; |
||
| 22 | $courseInfo = $data['course_info']; |
||
| 23 | |||
| 24 | $plugin = XApiPlugin::create(); |
||
| 25 | |||
| 26 | if (HOOK_EVENT_TYPE_POST == $type) { |
||
| 27 | $plugin->addCourseToolForTinCan($courseInfo['real_id']); |
||
| 28 | } |
||
| 31 |