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