CourseObjectFulfillment.php in Course 3.x
File
modules/course_migrate/src/Plugin/migrate/source/CourseObjectFulfillment.php
View source
<?php
namespace Drupal\course_migrate\Plugin\migrate\source;
use Drupal\Core\Database\Query\SelectInterface;
use Drupal\migrate_drupal\Plugin\migrate\source\d7\FieldableEntity;
class CourseObjectFulfillment extends FieldableEntity {
public function getIds() {
$ids = [];
$ids['cofid']['type'] = 'integer';
return $ids;
}
public function query() {
$query = $this
->select('course_outline_fulfillment', 'cof')
->fields('cof');
return $query;
}
public function fields() {
return [
'cofid' => 'Course object fulfillment ID',
'coid' => 'Course object ID',
'uid' => 'User ID',
'complete' => 'Complete',
'grade_result' => 'Grade result',
'date_started' => 'Date started',
'date_completed' => 'Date completed',
'info' => 'Object data',
'uuid' => 'uuid',
'instance' => 'Instance',
];
}
}