Skip to content
Snippets Groups Projects
Commit 6d87efe5 authored by Elmar Ludwig's avatar Elmar Ludwig
Browse files

use new PlanelementService to update longname and foreigntext, fixes #9

parent 6b812799
No related branches found
No related tags found
No related merge requests found
......@@ -194,7 +194,8 @@ class HISinOneSync
if ($update) {
$planelement = [
'planelementId' => $element_id,
'defaulttext' => $course_name
'defaulttext' => $course_name,
'longtext' => $course_name
];
$planelementService->updatePlanelementOfEvent(['planelement' => $planelement]);
......@@ -205,13 +206,30 @@ class HISinOneSync
$element_id = 0;
if ($update) {
$element_id = $planelementService->createNewPlanelementOfEvent(
['unitId' => $unit_id, 'termType' => $term_info[2], 'termYear' => $term_info[0], 'defaulttext' => $course_name]
)->planelementId;
$planelement = [
'unitId' => $unit_id,
'termType' => $term_info[2],
'termYear' => $term_info[0],
'defaulttext' => $course_name,
'longtext' => $course_name
];
$element_id = $planelementService->createNewPlanelementOfEvent($planelement)->planelementId;
}
}
if ($element_id) {
if ($update) {
$planelement = [
'planelementId' => $element_id,
'defaulttext' => $course_name_en ?: $course_name,
'longtext' => $course_name_en ?: $course_name,
'language' => 'en'
];
$planelementService->updatePlanelementOfEvent(['planelement' => $planelement]);
}
$persons = $courseInterfaceService->getPersonResponsibleForPlanelement(['planelementId' => $element_id])->personPlanelements;
$persons_matched = [];
$person_ids = [];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment