upgrade
This commit is contained in:
35
plugin/migrationmoodle/src/Loader/CourseModulesUrlLoader.php
Normal file
35
plugin/migrationmoodle/src/Loader/CourseModulesUrlLoader.php
Normal file
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
/* For licensing terms, see /license.txt */
|
||||
|
||||
namespace Chamilo\PluginBundle\MigrationMoodle\Loader;
|
||||
|
||||
use Chamilo\PluginBundle\MigrationMoodle\Interfaces\LoaderInterface;
|
||||
|
||||
/**
|
||||
* Class CourseModulesUrlLoader.
|
||||
*
|
||||
* @package Chamilo\PluginBundle\MigrationMoodle\Loader
|
||||
*/
|
||||
class CourseModulesUrlLoader implements LoaderInterface
|
||||
{
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function load(array $incomingData)
|
||||
{
|
||||
$lp = new \learnpath(
|
||||
$incomingData['c_code'],
|
||||
$incomingData['lp_id'],
|
||||
1
|
||||
);
|
||||
|
||||
return $lp->add_item(
|
||||
0,
|
||||
0,
|
||||
'link',
|
||||
0,
|
||||
$incomingData['title'],
|
||||
''
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user