|
|
|
|
@ -1,5 +1,9 @@ |
|
|
|
|
<?php |
|
|
|
|
/* For license terms, see /license.txt */ |
|
|
|
|
|
|
|
|
|
use Chamilo\CourseBundle\Entity\CTool; |
|
|
|
|
use Chamilo\CoreBundle\Entity\Course; |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* Description of MsiLti |
|
|
|
|
* |
|
|
|
|
@ -139,16 +143,14 @@ class ImsLtiPlugin extends Plugin |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* Add the course tool |
|
|
|
|
* @param \Chamilo\CoreBundle\Entity\Course $course |
|
|
|
|
* @param Course $course |
|
|
|
|
* @param ImsLtiTool $tool |
|
|
|
|
*/ |
|
|
|
|
public function addCourseTool(\Chamilo\CoreBundle\Entity\Course $course, ImsLtiTool $tool) |
|
|
|
|
public function addCourseTool(Course $course, ImsLtiTool $tool) |
|
|
|
|
{ |
|
|
|
|
$em = Database::getManager(); |
|
|
|
|
|
|
|
|
|
$cToolId = AddCourse::generateToolId($course->getId()); |
|
|
|
|
|
|
|
|
|
$cTool = new \Chamilo\CourseBundle\Entity\CTool(); |
|
|
|
|
$cTool = new CTool(); |
|
|
|
|
$cTool |
|
|
|
|
->setId($cToolId) |
|
|
|
|
->setCId($course->getId()) |
|
|
|
|
@ -167,6 +169,9 @@ class ImsLtiPlugin extends Plugin |
|
|
|
|
$em->flush(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* @return string |
|
|
|
|
*/ |
|
|
|
|
protected function getConfigExtraText() |
|
|
|
|
{ |
|
|
|
|
$text = $this->get_lang('ImsLtiDescription'); |
|
|
|
|
|