Proyectos de Subversion LeadersLinked - Services

Rev

Rev 162 | Rev 165 | Ir a la última revisión | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 162 Rev 164
Línea 147... Línea 147...
147
            
147
            
148
            $companies = [];
148
            $companies = [];
149
            foreach($records as $record)
149
            foreach($records as $record)
150
            {
150
            {
-
 
151
                array_push($companies, [
151
                array_push($companies, [
152
                    'uuid' => $record->uuid,
152
                    'name' => $record->name, 
153
                    'name' => $record->name, 
153
                    'image' => $this->url()->fromRoute('services/storage',['type' => 'company', 'code' => $record->uuid, 'filename' => $record->image], ['force_canonical' => true]),
154
                    'image' => $this->url()->fromRoute('storage',['type' => 'company', 'code' => $record->uuid, 'filename' => $record->image], ['force_canonical' => true]),
154
                    'link_progress' => $this->url()->fromRoute('microlearning/progress',['id' => $record->uuid], ['force_canonical' => true]),
155
                    'link_progress' => $this->url()->fromRoute('microlearning/progress',['id' => $record->uuid], ['force_canonical' => true]),
155
                ]);
156
                ]);
Línea 156... Línea 157...
156
            }
157
            }
Línea 504... Línea 505...
504
                $topic = $topicMapper->fetchOne($capsule->topic_id);
505
                $topic = $topicMapper->fetchOne($capsule->topic_id);
Línea 505... Línea 506...
505
                
506
                
506
                $response = [
507
                $response = [
507
                    'success' => true,
508
                    'success' => true,
-
 
509
                    'data' => [
508
                    'data' => [
510
                        'uuid'              => $capsule->uuid,
509
                        'name'              => $capsule->name ? $capsule->name : '',
511
                        'name'              => $capsule->name ? $capsule->name : '',
510
                        'description'       => $capsule->description ? $capsule->description : '',
512
                        'description'       => $capsule->description ? $capsule->description : '',
511
                        'image'             => $capsule->image ? $this->url()->fromRoute('services/storage',['type' => 'microlearning-capsule', 'code' => $capsule->uuid, 'filename' => $capsule->image ], ['force_canonical' => true])  : '',
513
                        'image'             => $capsule->image ? $this->url()->fromRoute('storage',['type' => 'microlearning-capsule', 'code' => $capsule->uuid, 'filename' => $capsule->image ], ['force_canonical' => true])  : '',
512
                        'link_comments'     => $this->url()->fromRoute('microlearning/capsules-comments', ['capsule_id' => $capsule->uuid], ['force_canonical' => true]),
514
                        'link_comments'     => $this->url()->fromRoute('microlearning/capsules-comments', ['capsule_id' => $capsule->uuid], ['force_canonical' => true]),
513
                        'link_comment_add'  => $this->url()->fromRoute('microlearning/capsules-comments/add', ['capsule_id' => $capsule->uuid],['force_canonical' => true]),
515
                        'link_comment_add'  => $this->url()->fromRoute('microlearning/capsules-comments/add', ['capsule_id' => $capsule->uuid],['force_canonical' => true]),
514
                        'link_slides'       => $this->url()->fromRoute('microlearning/slides', ['topic_id' => $topic->uuid,  'capsule_id' => $capsule->uuid], ['force_canonical' => true]),
516
                        'link_slides'       => $this->url()->fromRoute('microlearning/slides', ['topic_id' => $topic->uuid,  'capsule_id' => $capsule->uuid], ['force_canonical' => true]),
515
                        'total_comments'    => strval($dataCountAndRatingAverage['total_comments']),
517
                        'total_comments'    => strval($dataCountAndRatingAverage['total_comments']),
Línea 594... Línea 596...
594
                
596
                
595
                array_push($capsules, [
597
                array_push($capsules, [
596
                    'uuid'              => $capsule->uuid,
598
                    'uuid'              => $capsule->uuid,
597
                    'name'              => $capsule->name ? $capsule->name : '',
599
                    'name'              => $capsule->name ? $capsule->name : '',
598
                    'description'       => $capsule->description ? $capsule->description : '',
600
                    'description'       => $capsule->description ? $capsule->description : '',
599
                    'image'             => $capsule->image ? $this->url()->fromRoute('services/storage',['type' => 'microlearning-capsule', 'code' => $capsule->uuid, 'filename' => $capsule->image ], ['force_canonical' => true])  : '',
601
                    'image'             => $capsule->image ? $this->url()->fromRoute('storage',['type' => 'microlearning-capsule', 'code' => $capsule->uuid, 'filename' => $capsule->image ], ['force_canonical' => true])  : '',
600
                    'position'          => $capsule->order,
602
                    'position'          => $capsule->order,
601
                    'link_comments'     => $this->url()->fromRoute('microlearning/capsules-comments', ['capsule_id' => $capsule->uuid], ['force_canonical' => true]),
603
                    'link_comments'     => $this->url()->fromRoute('microlearning/capsules-comments', ['capsule_id' => $capsule->uuid], ['force_canonical' => true]),
602
                    'link_comment_add'  => $this->url()->fromRoute('microlearning/capsules-comments/add', ['capsule_id' => $capsule->uuid],['force_canonical' => true]),
604
                    'link_comment_add'  => $this->url()->fromRoute('microlearning/capsules-comments/add', ['capsule_id' => $capsule->uuid],['force_canonical' => true]),
603
                    'link_slides'       => $this->url()->fromRoute('microlearning/slides', ['topic_id' => $topic->uuid,  'capsule_id' => $capsule->uuid], ['force_canonical' => true]),
605
                    'link_slides'       => $this->url()->fromRoute('microlearning/slides', ['topic_id' => $topic->uuid,  'capsule_id' => $capsule->uuid], ['force_canonical' => true]),
Línea 693... Línea 695...
693
                
695
                
694
                array_push($capsules, [
696
                array_push($capsules, [
695
                    'uuid'              => $capsule->uuid,
697
                    'uuid'              => $capsule->uuid,
696
                    'name'              => $capsule->name ? $capsule->name : '',
698
                    'name'              => $capsule->name ? $capsule->name : '',
697
                    'description'       => $capsule->description ? $capsule->description : '',
699
                    'description'       => $capsule->description ? $capsule->description : '',
698
                    'image'             => $capsule->image ? $this->url()->fromRoute('services/storage',['type' => 'microlearning-capsule', 'code' => $capsule->uuid, 'filename' => $capsule->image ], ['force_canonical' => true])  : '',
700
                    'image'             => $capsule->image ? $this->url()->fromRoute('storage',['type' => 'microlearning-capsule', 'code' => $capsule->uuid, 'filename' => $capsule->image ], ['force_canonical' => true])  : '',
699
                    'position'          => $capsule->order,
701
                    'position'          => $capsule->order,
700
                    'link_comments'     => $this->url()->fromRoute('microlearning/capsules-comments', ['capsule_id' => $capsule->uuid], ['force_canonical' => true]),
702
                    'link_comments'     => $this->url()->fromRoute('microlearning/capsules-comments', ['capsule_id' => $capsule->uuid], ['force_canonical' => true]),
701
                    'link_comment_add'  => $this->url()->fromRoute('microlearning/capsules-comments/add', ['capsule_id' => $capsule->uuid],['force_canonical' => true]),
703
                    'link_comment_add'  => $this->url()->fromRoute('microlearning/capsules-comments/add', ['capsule_id' => $capsule->uuid],['force_canonical' => true]),
702
                    'link_slides'       => $this->url()->fromRoute('microlearning/slides', ['topic_id' => $topic->uuid,  'capsule_id' => $capsule->uuid], ['force_canonical' => true]),
704
                    'link_slides'       => $this->url()->fromRoute('microlearning/slides', ['topic_id' => $topic->uuid,  'capsule_id' => $capsule->uuid], ['force_canonical' => true]),
Línea 791... Línea 793...
791
                
793
                
792
                array_push($capsules, [
794
                array_push($capsules, [
793
                    'uuid'              => $capsule->uuid,
795
                    'uuid'              => $capsule->uuid,
794
                    'name'              => $capsule->name ? $capsule->name : '',
796
                    'name'              => $capsule->name ? $capsule->name : '',
795
                    'description'       => $capsule->description ? $capsule->description : '',
797
                    'description'       => $capsule->description ? $capsule->description : '',
796
                    'image'             => $capsule->image ? $this->url()->fromRoute('services/storage',['type' => 'microlearning-capsule', 'code' => $capsule->uuid, 'filename' => $capsule->image ], ['force_canonical' => true])  : '',
798
                    'image'             => $capsule->image ? $this->url()->fromRoute('storage',['type' => 'microlearning-capsule', 'code' => $capsule->uuid, 'filename' => $capsule->image ], ['force_canonical' => true])  : '',
797
                    'position'          => $capsule->order,
799
                    'position'          => $capsule->order,
798
                    'link_comments'     => $this->url()->fromRoute('microlearning/capsules-comments', ['capsule_id' => $capsule->uuid], ['force_canonical' => true]),
800
                    'link_comments'     => $this->url()->fromRoute('microlearning/capsules-comments', ['capsule_id' => $capsule->uuid], ['force_canonical' => true]),
799
                    'link_comment_add'  => $this->url()->fromRoute('microlearning/capsules-comments/add', ['capsule_id' => $capsule->uuid],['force_canonical' => true]),
801
                    'link_comment_add'  => $this->url()->fromRoute('microlearning/capsules-comments/add', ['capsule_id' => $capsule->uuid],['force_canonical' => true]),
800
                    'link_slides'       => $this->url()->fromRoute('microlearning/slides', ['topic_id' => $topic->uuid,  'capsule_id' => $capsule->uuid], ['force_canonical' => true]),
802
                    'link_slides'       => $this->url()->fromRoute('microlearning/slides', ['topic_id' => $topic->uuid,  'capsule_id' => $capsule->uuid], ['force_canonical' => true]),
Línea 1063... Línea 1065...
1063
                }
1065
                }
Línea 1064... Línea 1066...
1064
                
1066
                
-
 
1067
                
1065
                
1068
            
1066
            
1069
                array_push($data, [
1067
                array_push($data, [
1070
                    'uuid'          => $topic->uuid,
1068
                    'name'          => $topic->name ? $topic->name : '',
1071
                    'name'          => $topic->name ? $topic->name : '',
1069
                    'description'   => $topic->description ? $topic->description : '',
1072
                    'description'   => $topic->description ? $topic->description : '',
1070
                    'image'         => $topic->image ? $this->url()->fromRoute('services/storage',['type' => 'microlearning-topic', 'code' => $topic->uuid, 'filename' => $topic->image ], ['force_canonical' => true]) : '',
1073
                    'image'         => $topic->image ? $this->url()->fromRoute('storage',['type' => 'microlearning-topic', 'code' => $topic->uuid, 'filename' => $topic->image ], ['force_canonical' => true]) : '',
1071
                    'progress'      => $progress,
1074
                    'progress'      => $progress,
1072
                    'completed'     => $completed,
1075
                    'completed'     => $completed,
Línea 1159... Línea 1162...
1159
                
1162
                
1160
                
1163
                
1161
            $data = [
1164
            $data = [
1162
                'name'          => $topic->name ? $topic->name : '',
1165
                'name'          => $topic->name ? $topic->name : '',
1163
                'description'   => $topic->description ? $topic->description : '',
1166
                'description'   => $topic->description ? $topic->description : '',
1164
                'image'         => $topic->image ? $this->url()->fromRoute('services/storage',['type' => 'microlearning-topic', 'code' => $topic->uuid, 'filename' => $topic->image ], ['force_canonical' => true]) : '',
1167
                'image'         => $topic->image ? $this->url()->fromRoute('storage',['type' => 'microlearning-topic', 'code' => $topic->uuid, 'filename' => $topic->image ], ['force_canonical' => true]) : '',
1165
                'progress'      => $progress,
1168
                'progress'      => $progress,
1166
                'completed'     => $completed,
1169
                'completed'     => $completed,
1167
                'order'         => $topic->order,
1170
                'order'         => $topic->order,
Línea 1248... Línea 1251...
1248
                
1251
                
1249
                
1252
                
1250
                array_push($data, [
1253
                array_push($data, [
1251
                    'name'              => $capsule->name ? $capsule->name : '',
1254
                    'name'              => $capsule->name ? $capsule->name : '',
1252
                    'description'       => $capsule->description ? $capsule->description : '',
1255
                    'description'       => $capsule->description ? $capsule->description : '',
1253
                    'image'             => $capsule->image ? $this->url()->fromRoute('services/storage',['type' => 'microlearning-capsule', 'code' => $capsule->uuid, 'filename' => $capsule->image ], ['force_canonical' => true])  : '',
1256
                    'image'             => $capsule->image ? $this->url()->fromRoute('storage',['type' => 'microlearning-capsule', 'code' => $capsule->uuid, 'filename' => $capsule->image ], ['force_canonical' => true])  : '',
1254
                    'link_comments'     => $this->url()->fromRoute('microlearning/capsules-comments', ['capsule_id' => $capsule->uuid], ['force_canonical' => true]),
1257
                    'link_comments'     => $this->url()->fromRoute('microlearning/capsules-comments', ['capsule_id' => $capsule->uuid], ['force_canonical' => true]),
1255
                    'link_comment_add'  => $this->url()->fromRoute('microlearning/capsules-comments/add', ['capsule_id' => $capsule->uuid],['force_canonical' => true]),
1258
                    'link_comment_add'  => $this->url()->fromRoute('microlearning/capsules-comments/add', ['capsule_id' => $capsule->uuid],['force_canonical' => true]),
1256
                    'link_slides'       => $this->url()->fromRoute('microlearning/slides', ['topic_id' => $topic->uuid,  'capsule_id' => $capsule->uuid], ['force_canonical' => true]),
1259
                    'link_slides'       => $this->url()->fromRoute('microlearning/slides', ['topic_id' => $topic->uuid,  'capsule_id' => $capsule->uuid], ['force_canonical' => true]),
Línea 1354... Línea 1357...
1354
            $dataCountAndRatingAverage = $capsuleCommentMapper->fetchCountAndRatingAverage($capsule->company_id, $capsule->topic_id, $capsule->id);
1357
            $dataCountAndRatingAverage = $capsuleCommentMapper->fetchCountAndRatingAverage($capsule->company_id, $capsule->topic_id, $capsule->id);
Línea 1355... Línea 1358...
1355
                
1358
                
-
 
1359
                
1356
                
1360
                
1357
                
1361
            $data = [
1358
            $data = [
1362
                    'uuid'              => $capsule->uuid,
1359
                    'name'              => $capsule->name ? $capsule->name : '',
1363
                    'name'              => $capsule->name ? $capsule->name : '',
1360
                    'description'       => $capsule->description ? $capsule->description : '',
1364
                    'description'       => $capsule->description ? $capsule->description : '',
1361
                    'image'             => $capsule->image ? $this->url()->fromRoute('services/storage',['type' => 'microlearning-capsule', 'code' => $capsule->uuid, 'filename' => $capsule->image ], ['force_canonical' => true])  : '',
1365
                    'image'             => $capsule->image ? $this->url()->fromRoute('storage',['type' => 'microlearning-capsule', 'code' => $capsule->uuid, 'filename' => $capsule->image ], ['force_canonical' => true])  : '',
1362
                    'link_comments'     => $this->url()->fromRoute('microlearning/capsules-comments', ['capsule_id' => $capsule->uuid], ['force_canonical' => true]),
1366
                    'link_comments'     => $this->url()->fromRoute('microlearning/capsules-comments', ['capsule_id' => $capsule->uuid], ['force_canonical' => true]),
1363
                    'link_comment_add'  => $this->url()->fromRoute('microlearning/capsules-comments/add', ['capsule_id' => $capsule->uuid],['force_canonical' => true]),
1367
                    'link_comment_add'  => $this->url()->fromRoute('microlearning/capsules-comments/add', ['capsule_id' => $capsule->uuid],['force_canonical' => true]),
Línea 1461... Línea 1465...
1461
                array_push($data, [
1465
                array_push($data, [
1462
                    'quiz'          => '',
1466
                    'quiz'          => '',
1463
                    'name'          => $slide->name ? $slide->name : '',
1467
                    'name'          => $slide->name ? $slide->name : '',
1464
                    'description'   => $slide->description ? $slide->description : '',
1468
                    'description'   => $slide->description ? $slide->description : '',
1465
                    'type'          => $slide->type,
1469
                    'type'          => $slide->type,
1466
                    'background'    => $slide->background ? $this->url()->fromRoute('services/storage',['type' => 'microlearning-slide', 'code' => $slide->uuid, 'filename' => $slide->background], ['force_canonical' => true]) : '',
1470
                    'background'    => $slide->background ? $this->url()->fromRoute('storage',['type' => 'microlearning-slide', 'code' => $slide->uuid, 'filename' => $slide->background], ['force_canonical' => true]) : '',
1467
                    'file'          => $slide->file ? $this->url()->fromRoute('services/storage',['type' => 'microlearning-slide', 'code' => $slide->uuid, 'filename' => $slide->file], ['force_canonical' => true]) : '',
1471
                    'file'          => $slide->file ? $this->url()->fromRoute('storage',['type' => 'microlearning-slide', 'code' => $slide->uuid, 'filename' => $slide->file], ['force_canonical' => true]) : '',
1468
                    'order'         => $slide->order,
1472
                    'order'         => $slide->order,
1469
                    'completed'     => $completed,
1473
                    'completed'     => $completed,
1470
                    'link_get'      => $this->url()->fromRoute('microlearning/get-slide', ['id' => $slide->uuid], ['force_canonical' => true]),
1474
                    'link_get'      => $this->url()->fromRoute('microlearning/get-slide', ['id' => $slide->uuid], ['force_canonical' => true]),
1471
                    'added_on'      => $slide->added_on,
1475
                    'added_on'      => $slide->added_on,
1472
                    'updated_on'    => $slide->updated_on,
1476
                    'updated_on'    => $slide->updated_on,
Línea 1566... Línea 1570...
1566
                
1570
                
1567
                
1571
                
-
 
1572
                
1568
                
1573
            $data =[
1569
            $data =[
1574
                'quiz'          => '',
1570
                'quiz'          => '',
1575
                'uuid'          => $slide->uuid,
1571
                'name'          => $slide->name ? $slide->name : '',
1576
                'name'          => $slide->name ? $slide->name : '',
1572
                'description'   => $slide->description ? $slide->description : '',
1577
                'description'   => $slide->description ? $slide->description : '',
1573
                'type'          => $slide->type,
1578
                'type'          => $slide->type,
1574
                'background'    => $slide->background ? $this->url()->fromRoute('services/storage',['type' => 'microlearning-slide', 'code' => $slide->uuid, 'filename' => $slide->background], ['force_canonical' => true]) : '',
1579
                'background'    => $slide->background ? $this->url()->fromRoute('storage',['type' => 'microlearning-slide', 'code' => $slide->uuid, 'filename' => $slide->background], ['force_canonical' => true]) : '',
1575
                'file'          => $slide->file ? $this->url()->fromRoute('services/storage',['type' => 'microlearning-slide', 'code' => $slide->uuid, 'filename' => $slide->file], ['force_canonical' => true]) : '',
1580
                'file'          => $slide->file ? $this->url()->fromRoute('storage',['type' => 'microlearning-slide', 'code' => $slide->uuid, 'filename' => $slide->file], ['force_canonical' => true]) : '',
1576
                'order'         => $slide->order,
1581
                'order'         => $slide->order,
1577
                'completed'     => $completed,
1582
                'completed'     => $completed,
Línea 1625... Línea 1630...
1625
                    continue;
1630
                    continue;
1626
                }
1631
                }
Línea 1627... Línea 1632...
1627
                
1632
                
1628
                $record = [
1633
                $record = [
1629
                    'name' => $company->name,
1634
                    'name' => $company->name,
1630
                    'image' => $this->url()->fromRoute('services/storage',['type' => 'company', 'code' => $company->uuid, 'filename' => $company->image], ['force_canonical' => true]),
1635
                    'image' => $this->url()->fromRoute('storage',['type' => 'company', 'code' => $company->uuid, 'filename' => $company->image], ['force_canonical' => true]),
1631
                    'details' => [],
1636
                    'details' => [],
Línea 1632... Línea 1637...
1632
                ];
1637
                ];
1633
                
1638