Línea 3324... |
Línea 3324... |
3324 |
} else {
|
3324 |
} else {
|
3325 |
$quiz = null;
|
3325 |
$quiz = null;
|
3326 |
}
|
3326 |
}
|
Línea -... |
Línea 3327... |
- |
|
3327 |
|
- |
|
3328 |
|
Línea 3327... |
Línea 3329... |
3327 |
|
3329 |
$dtAddedOn = \DateTime::createFromFormat('Y-m-d H:i:s', $slide->added_on);
|
3328 |
|
3330 |
$dtUpdatedOn = \DateTime::createFromFormat('Y-m-d H:i:s', $slide->updated_on);
|
3329 |
|
3331 |
|
3330 |
array_push($record_slides, [
|
3332 |
array_push($record_slides, [
|
3331 |
'uuid' => $slide->uuid,
|
3333 |
'uuid' => $slide->uuid,
|
3332 |
'quiz_uuid' => $quiz ? $quiz->uuid : '',
|
3334 |
'quiz_uuid' => $quiz ? $quiz->uuid : '',
|
3333 |
'name' => $slide->name ? $slide->name : '',
|
3335 |
'name' => $slide->name ? $slide->name : '',
|
3334 |
'description' => $slide->description ? $slide->description : '',
|
3336 |
'description' => $slide->description ? $slide->description : '',
|
3335 |
'position' => $slide->order,
|
3337 |
'position' => $slide->order,
|
- |
|
3338 |
'type' => $slide->type,
|
- |
|
3339 |
'background' => $slide->background ? $this->url()->fromRoute('services/storage',['type' => 'microlearning-slide', 'code' => $slide->uuid, 'filename' => $slide->background], ['force_canonical' => true]) : '',
|
3336 |
'type' => $slide->type,
|
3340 |
'file' => $slide->file ? $this->url()->fromRoute('services/storage',['type' => 'microlearning-slide', 'code' => $slide->uuid, 'filename' => $slide->file], ['force_canonical' => true]) : '',
|
3337 |
'background' => $slide->background ? $this->url()->fromRoute('services/storage',['type' => 'microlearning-slide', 'code' => $slide->uuid, 'filename' => $slide->background], ['force_canonical' => true]) : '',
|
3341 |
'added_on' => $dtAddedOn->format($serviceDatetimeFormat),
|
Línea -... |
Línea 3342... |
- |
|
3342 |
'updated_on' => $dtUpdatedOn->format($serviceDatetimeFormat),
|
- |
|
3343 |
]);
|
- |
|
3344 |
}
|
3338 |
'file' => $slide->file ? $this->url()->fromRoute('services/storage',['type' => 'microlearning-slide', 'code' => $slide->uuid, 'filename' => $slide->file], ['force_canonical' => true]) : '',
|
3345 |
|
3339 |
]);
|
3346 |
$dtAddedOn = \DateTime::createFromFormat('Y-m-d H:i:s', $capsule->added_on);
|
3340 |
}
|
3347 |
$dtUpdatedOn = \DateTime::createFromFormat('Y-m-d H:i:s', $capsule->updated_on);
|
3341 |
|
3348 |
|
3342 |
array_push($record_capsules, [
|
3349 |
array_push($record_capsules, [
|
3343 |
'uuid' => $capsule->uuid,
|
3350 |
'uuid' => $capsule->uuid,
|
3344 |
'name' => $capsule->name ? $capsule->name : '',
|
3351 |
'name' => $capsule->name ? $capsule->name : '',
|
- |
|
3352 |
'description' => $capsule->description ? $capsule->description : '',
|
- |
|
3353 |
'image' => $capsule->image ? $this->url()->fromRoute('services/storage',['type' => 'microlearning-capsule', 'code' => $capsule->uuid, 'filename' => $capsule->image ], ['force_canonical' => true]) : '',
|
3345 |
'description' => $capsule->description ? $capsule->description : '',
|
3354 |
'position' => $capsule->order,
|
3346 |
'image' => $capsule->image ? $this->url()->fromRoute('services/storage',['type' => 'microlearning-capsule', 'code' => $capsule->uuid, 'filename' => $capsule->image ], ['force_canonical' => true]) : '',
|
3355 |
'slides' => $record_slides,
|
Línea -... |
Línea 3356... |
- |
|
3356 |
'added_on' => $dtAddedOn->format($serviceDatetimeFormat),
|
- |
|
3357 |
'updated_on' => $dtUpdatedOn->format($serviceDatetimeFormat),
|
- |
|
3358 |
]);
|
3347 |
'position' => $capsule->order,
|
3359 |
}
|
3348 |
'slides' => $record_slides,
|
3360 |
|
3349 |
]);
|
3361 |
$dtAddedOn = \DateTime::createFromFormat('Y-m-d H:i:s', $topic->added_on);
|
3350 |
}
|
3362 |
$dtUpdatedOn = \DateTime::createFromFormat('Y-m-d H:i:s', $topic->updated_on);
|
3351 |
|
3363 |
|
3352 |
array_push($data['topics'], [
|
3364 |
array_push($data['topics'], [
|
3353 |
'uuid' => $topic->uuid,
|
3365 |
'uuid' => $topic->uuid,
|
3354 |
'name' => $topic->name ? $topic->name : '',
|
3366 |
'name' => $topic->name ? $topic->name : '',
|
3355 |
'description' => $topic->description ? $topic->description : '',
|
3367 |
'description' => $topic->description ? $topic->description : '',
|
3356 |
'image' => $topic->image ? $this->url()->fromRoute('services/storage',['type' => 'microlearning-topic', 'code' => $topic->uuid, 'filename' => $topic->image ], ['force_canonical' => true]) : '',
|
3368 |
'image' => $topic->image ? $this->url()->fromRoute('services/storage',['type' => 'microlearning-topic', 'code' => $topic->uuid, 'filename' => $topic->image ], ['force_canonical' => true]) : '',
|
- |
|
3369 |
'position' => $topic->order,
|
- |
|
3370 |
'company_uuid' => $company->uuid,
|
- |
|
3371 |
'company_name' => $company->name,
|
3357 |
'position' => $topic->order,
|
3372 |
'company_image' => $this->url()->fromRoute('services/storage',['type' => 'company', 'code' => $company->uuid, 'filename' => $company->image], ['force_canonical' => true]),
|
- |
|
3373 |
'capsules' => $record_capsules,
|
- |
|
3374 |
'added_on' => $dtAddedOn->format($serviceDatetimeFormat),
|
- |
|
3375 |
'updated_on' => $dtUpdatedOn->format($serviceDatetimeFormat),
|
- |
|
3376 |
|
3358 |
'company_uuid' => $company->uuid,
|
3377 |
]);
|
3359 |
'company_name' => $company->name,
|
3378 |
|
Línea 3389... |
Línea 3408... |
3389 |
$record_answers = [];
|
3408 |
$record_answers = [];
|
Línea 3390... |
Línea 3409... |
3390 |
|
3409 |
|
3391 |
$answers = $answerMapper->fetchAllByQuizIdAndQuestionId($question->quiz_id, $question->id);
|
3410 |
$answers = $answerMapper->fetchAllByQuizIdAndQuestionId($question->quiz_id, $question->id);
|
3392 |
foreach($answers as $answer)
|
3411 |
foreach($answers as $answer)
|
- |
|
3412 |
{
|
- |
|
3413 |
|
- |
|
3414 |
$dtAddedOn = \DateTime::createFromFormat('Y-m-d H:i:s', $answer->added_on);
|
- |
|
3415 |
$dtUpdatedOn = \DateTime::createFromFormat('Y-m-d H:i:s', $answer->updated_on);
|
3393 |
{
|
3416 |
|
3394 |
array_push($record_answers, [
|
3417 |
array_push($record_answers, [
|
3395 |
'uuid' => $answer->uuid,
|
3418 |
'uuid' => $answer->uuid,
|
3396 |
'text' => trim($answer->text),
|
3419 |
'text' => trim($answer->text),
|
3397 |
'correct' => $answer->correct ? $answer->correct : 0 ,
|
3420 |
'correct' => $answer->correct ? $answer->correct : 0 ,
|
- |
|
3421 |
'points' => intval($answer->points, 10),
|
- |
|
3422 |
'added_on' => $dtAddedOn->format($serviceDatetimeFormat),
|
3398 |
'points' => intval($answer->points, 10),
|
3423 |
'updated_on' => $dtUpdatedOn->format($serviceDatetimeFormat),
|
3399 |
]);
|
3424 |
]);
|
Línea -... |
Línea 3425... |
- |
|
3425 |
}
|
- |
|
3426 |
|
- |
|
3427 |
$dtAddedOn = \DateTime::createFromFormat('Y-m-d H:i:s', $question->added_on);
|
3400 |
}
|
3428 |
$dtUpdatedOn = \DateTime::createFromFormat('Y-m-d H:i:s', $question->updated_on);
|
3401 |
|
3429 |
|
3402 |
array_push($record_questions, [
|
3430 |
array_push($record_questions, [
|
3403 |
'uuid' => $question->uuid,
|
3431 |
'uuid' => $question->uuid,
|
3404 |
'text' => trim($question->text),
|
3432 |
'text' => trim($question->text),
|
3405 |
'type' => $question->type,
|
3433 |
'type' => $question->type,
|
3406 |
'maxlength' => $question->maxlength,
|
3434 |
'maxlength' => $question->maxlength,
|
- |
|
3435 |
'points' => $question->points,
|
- |
|
3436 |
'answers' => $record_answers,
|
3407 |
'points' => $question->points,
|
3437 |
'added_on' => $dtAddedOn->format($serviceDatetimeFormat),
|
3408 |
'answers' => $record_answers,
|
3438 |
'updated_on' => $dtUpdatedOn->format($serviceDatetimeFormat),
|
Línea -... |
Línea 3439... |
- |
|
3439 |
]);
|
- |
|
3440 |
}
|
- |
|
3441 |
|
Línea 3409... |
Línea 3442... |
3409 |
]);
|
3442 |
$dtAddedOn = \DateTime::createFromFormat('Y-m-d H:i:s', $quiz->added_on);
|
3410 |
}
|
3443 |
$dtUpdatedOn = \DateTime::createFromFormat('Y-m-d H:i:s', $quiz->updated_on);
|
3411 |
|
3444 |
|
3412 |
|
3445 |
|
Línea 3419... |
Línea 3452... |
3419 |
'minimum_points_required' => $quiz->minimum_points_required,
|
3452 |
'minimum_points_required' => $quiz->minimum_points_required,
|
3420 |
'max_time' => $quiz->max_time ? $quiz->max_time : 5,
|
3453 |
'max_time' => $quiz->max_time ? $quiz->max_time : 5,
|
3421 |
'company_uuid' => $company->uuid,
|
3454 |
'company_uuid' => $company->uuid,
|
3422 |
'company_name' => $company->name,
|
3455 |
'company_name' => $company->name,
|
3423 |
'company_image' => $this->url()->fromRoute('services/storage',['type' => 'company', 'code' => $company->uuid, 'filename' => $company->image], ['force_canonical' => true]),
|
3456 |
'company_image' => $this->url()->fromRoute('services/storage',['type' => 'company', 'code' => $company->uuid, 'filename' => $company->image], ['force_canonical' => true]),
|
3424 |
'questions' => $record_questions,
|
3457 |
'questions' => $record_questions,
|
- |
|
3458 |
'added_on' => $dtAddedOn->format($serviceDatetimeFormat),
|
- |
|
3459 |
'updated_on' => $dtUpdatedOn->format($serviceDatetimeFormat),
|
3425 |
]);
|
3460 |
]);
|
3426 |
}
|
3461 |
}
|
Línea 3427... |
Línea 3462... |
3427 |
|
3462 |
|
3428 |
$companyExtendUserMapper = CompanyMicrolearningExtendUserMapper::getInstance($this->adapter);
|
3463 |
$companyExtendUserMapper = CompanyMicrolearningExtendUserMapper::getInstance($this->adapter);
|