Línea 170... |
Línea 170... |
170 |
'name' => $record['name'],
|
170 |
'name' => $record['name'],
|
171 |
'description' => $record['description'],
|
171 |
'description' => $record['description'],
|
172 |
'text' => $record['text'],
|
172 |
'text' => $record['text'],
|
173 |
'language' => $language,
|
173 |
'language' => $language,
|
174 |
'status' => $status,
|
174 |
'status' => $status,
|
175 |
'link_take_a_test' => $allowTakeATest && ( empty($record['status']) || $record['status'] == CompanySelfEvaluationTest::STATUS_DRAFT)
|
175 |
'link_take_a_test' => $allowTakeATest && ( empty($record['status']) || $record['status'] == CompanySelfEvaluationTest::STATUS_DRAFT) ? $this->url()->fromRoute('profile/self-evaluation/take-a-test', ['id' => $record['uuid']]) : '',
|
176 |
? $this->url()->fromRoute('profile/self-evaluation/take-a-test', ['id' => $record['uuid']]) : '',
|
- |
|
177 |
'link_report' => $allowReport && $record['status'] == CompanySelfEvaluationTest::STATUS_COMPLETED ? $this->url()->fromRoute('profile/self-evaluation/report', ['id' => $record['uuid']]) : '',
|
176 |
'link_report' => $allowReport && $record['status'] == CompanySelfEvaluationTest::STATUS_COMPLETED ? $this->url()->fromRoute('profile/self-evaluation/report', ['id' => $record['uuid']]) : '',
|
178 |
];
|
177 |
];
|
Línea 288... |
Línea 287... |
288 |
|
287 |
|
289 |
//Check if the form is already registered
|
288 |
//Check if the form is already registered
|
Línea 290... |
Línea 289... |
290 |
$companySelfEvaluationTest = $companySelfEvaluationTestMapper->fetchOneBy($companySelfEvaluationForm->id, $currentUser->id);
|
289 |
$companySelfEvaluationTest = $companySelfEvaluationTestMapper->fetchOneBy($companySelfEvaluationForm->id, $currentUser->id);
|
291 |
|
290 |
|
292 |
$result = $companySelfEvaluationTest ?
|
291 |
$result = $companySelfEvaluationTest ?
|
Línea 293... |
Línea 292... |
293 |
$companySelfEvaluationTestMapper->update($selfEvaluationTest, $companySelfEvaluationTest->id):
|
292 |
$companySelfEvaluationTestMapper->update($selfEvaluationTest, $companySelfEvaluationTest->id) :
|
294 |
$companySelfEvaluationTestMapper->insert($selfEvaluationTest);
|
293 |
$companySelfEvaluationTestMapper->insert($selfEvaluationTest);
|