Commit a80dd73b authored by Nigel McNie's avatar Nigel McNie
Browse files

Move the 'description' field for books in LEAP export to be on the...


Move the 'description' field for books in LEAP export to be on the contribution entry; import it from there.

Part two of the previous commit to clarify the meaning of the
description field on books.
Signed-off-by: default avatarNigel McNie <nigel@catalyst.net.nz>
parent 76b19779
......@@ -402,7 +402,8 @@ class LeapExportElementResumeCompositeChildBook extends LeapExportElementResumeC
public function ensure_siblings() {
$this->siblings = array(
'relation' => new LeapExportElementResumeCompositeSibling($this->parentartefact, $this->exporter, $this, array(
'title' => $this->originalrecord->contribution
'title' => $this->originalrecord->contribution,
'content' => $this->originalrecord->description,
), 'achievement', 'relation')
);
}
......@@ -411,7 +412,6 @@ class LeapExportElementResumeCompositeChildBook extends LeapExportElementResumeC
return array(
'end' => $record->date,
'title' => $record->title,
'content' => $record->description,
);
}
......
......@@ -267,17 +267,18 @@ class LeapImportResume extends LeapImportArtefactPlugin {
$dates = PluginImportLeap::get_leap_dates($entry);
$enddate = (isset($dates['end'])) ? self::convert_leap_date_to_resume_date($dates['end']) : '';
$contribution = '';
$contribution = $description = '';
if (count($otherentries)) {
$role = $importer->get_entry_by_id($otherentries[0]);
$contribution = $role->title;
$description = PluginImportLeap::get_entry_content($role, $importer);
}
$values = array(
'date' => $enddate,
'title' => $entry->title,
'contribution' => $contribution,
'description' => PluginImportLeap::get_entry_content($entry, $importer), // TODO Still debate over what this is the description of
'description' => $description,
'displayorder' => '', // TODO: get from the grouping, or failing that, from this entry itself
);
ArtefactTypeResumeComposite::ensure_composite_value($values, 'book', $importer->get('usr'));
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment