Proyectos de Subversion LeadersLinked - Services

Rev

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

Rev 236 Rev 244
Línea 1451... Línea 1451...
1451
                $completed = 0;
1451
                $completed = 0;
1452
            }
1452
            }
Línea 1453... Línea 1453...
1453
                
1453
                
Línea -... Línea 1454...
-
 
1454
            $dataCountAndRatingAverage = $capsuleCommentMapper->fetchCountAndRatingAverage($capsule->company_id, $capsule->topic_id, $capsule->id);
-
 
1455
                
-
 
1456
            
-
 
1457
            $slideMapper = CompanyMicrolearningSlideMapper::getInstance($this->adapter);
-
 
1458
            $totalSlides = $slideMapper->fetchTotalCountByCompanyIdAndTopicIdAndCapsuleId($capsule->company_id, $capsule->topic_id, $capsule->id);
-
 
1459
            
-
 
1460
         
-
 
1461
            $slide = $slideMapper->fetchFirstByCompanyIdAndTopicIdAndCapsuleId($capsule->company_id, $capsule->topic_id, $capsule->id);
-
 
1462
            if($slide) {
-
 
1463
                   
-
 
1464
                $link_first_slide = $this->url()->fromRoute('microlearning/get-slide', ['id' => $slide->uuid], ['force_canonical' => true]);
-
 
1465
                $type_first_slide = $slide->type;
-
 
1466
                
-
 
1467
                
-
 
1468
            } else {
-
 
1469
                $link_first_slide = '';
-
 
1470
                $type_first_slide = '';
-
 
1471
            }
Línea 1454... Línea 1472...
1454
            $dataCountAndRatingAverage = $capsuleCommentMapper->fetchCountAndRatingAverage($capsule->company_id, $capsule->topic_id, $capsule->id);
1472
                
1455
                
1473
            
1456
                
1474
                
Línea 1465... Línea 1483...
1465
                    'link_slides'       => $this->url()->fromRoute('microlearning/slides', ['topic_id' => $topic->uuid,  'capsule_id' => $capsule->uuid], ['force_canonical' => true]),
1483
                    'link_slides'       => $this->url()->fromRoute('microlearning/slides', ['topic_id' => $topic->uuid,  'capsule_id' => $capsule->uuid], ['force_canonical' => true]),
1466
                    'total_comments'    => strval($dataCountAndRatingAverage['total_comments']),
1484
                    'total_comments'    => strval($dataCountAndRatingAverage['total_comments']),
1467
                    'total_rating'      => strval($dataCountAndRatingAverage['total_rating']),
1485
                    'total_rating'      => strval($dataCountAndRatingAverage['total_rating']),
1468
                    'progress'          => $progress,
1486
                    'progress'          => $progress,
1469
                    'completed'         => $completed,
1487
                    'completed'         => $completed,
-
 
1488
                    'total_slides'      =>  $totalSlides,
-
 
1489
                    'link_first_slide'  => $link_first_slide,
-
 
1490
                    'type_first_slide'  => $type_first_slide,
1470
                    'order'             => $capsule->order,
1491
                    'order'             => $capsule->order,
1471
                    'added_on'          => $capsule->added_on,
1492
                    'added_on'          => $capsule->added_on,
1472
                    'updated_on'        => $capsule->updated_on,
1493
                    'updated_on'        => $capsule->updated_on,
1473
            ];
1494
            ];