Commit 21fa3ddc authored by Nigel McNie's avatar Nigel McNie
Browse files

Blackhole the special Mahara resume selections.



Resume import now done!!
Signed-off-by: default avatarNigel McNie <nigel@catalyst.net.nz>
parent 7e293cf8
......@@ -72,6 +72,11 @@ class LeapImportResume extends LeapImportArtefactPlugin {
*/
const STRATEGY_IMPORT_AS_MEMBERSHIP = 7;
/**
* Selections made for grouping resume fields are blackholed
*/
const STRATEGY_IMPORT_AS_SELECTION = 8;
/**
* Description of strategies used
*/
......@@ -202,6 +207,18 @@ class LeapImportResume extends LeapImportArtefactPlugin {
));
}
// Special Mahara selections made for grouping resume entries
$correctmaharaplugin = count($entry->xpath('mahara:artefactplugin[@mahara:plugin="resume"]')) == 1;
if ($correctmaharaplugin
&& PluginImportLeap::is_rdf_type($entry, $importer, 'selection')
&& PluginImportLeap::is_correct_category_scheme($entry, $importer, 'selection_type', 'Grouping')) {
return array(array(
'strategy' => self::STRATEGY_IMPORT_AS_SELECTION,
'score' => 100,
'other_required_entries' => array(),
));
}
return array();
}
......@@ -343,6 +360,9 @@ class LeapImportResume extends LeapImportArtefactPlugin {
);
ArtefactTypeResumeComposite::ensure_composite_value($values, 'membership', $importer->get('usr'));
break;
case self::STRATEGY_IMPORT_AS_SELECTION:
// This space intentionally left blank
break;
default:
throw new ImportException($importer, 'TODO: get_string: unknown strategy chosen for importing entry');
}
......
Markdown is supported
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