Conditions | 2 |
Paths | 1 |
Total Lines | 18 |
Code Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
19 | public function generate(): Activity |
||
20 | { |
||
21 | $course = api_get_course_entity(); |
||
22 | $session = api_get_session_entity(); |
||
23 | |||
24 | $languageIso = api_get_language_isocode($course->getCourseLanguage()); |
||
25 | |||
26 | $courseUrl = api_get_course_url( |
||
27 | $course->getCode(), |
||
28 | $session ? $session->getId() : 0 |
||
29 | ); |
||
30 | |||
31 | return new Activity( |
||
32 | IRI::fromString($courseUrl), |
||
33 | new Definition( |
||
34 | LanguageMap::create([$languageIso => $course->getTitle()]), |
||
35 | null, |
||
36 | IRI::fromString('http://id.tincanapi.com/activitytype/lms/course') |
||
37 | ) |
||
41 |