Minor - format code

pull/3418/head
Julio Montoya 6 years ago
parent 29789ea4ce
commit 6b1777b740
  1. 15
      plugin/whispeakauth/Request/ApiRequest.php
  2. 2
      plugin/zoom/Entity/MeetingEntity.php
  3. 2
      plugin/zoom/Entity/RecordingEntity.php
  4. 2
      plugin/zoom/Entity/RegistrantEntity.php
  5. 1
      plugin/zoom/admin.php
  6. 2
      plugin/zoom/config.php
  7. 2
      plugin/zoom/lib/MeetingEntityRepository.php
  8. 3
      plugin/zoom/lib/RecordingEntityRepository.php
  9. 3
      plugin/zoom/lib/RegistrantEntityRepository.php
  10. 16
      plugin/zoom/lib/zoom_plugin.class.php

@ -35,8 +35,6 @@ class ApiRequest
/**
* Create a session token to perform an enrollment.
*
* @param \Chamilo\UserBundle\Entity\User $user
*
* @throws \Exception
*
* @return array
@ -55,9 +53,8 @@ class ApiRequest
}
/**
* @param string $token
* @param string $audioFilePath
* @param \Chamilo\UserBundle\Entity\User $user
* @param string $token
* @param string $audioFilePath
*
* @throws \Exception
*
@ -83,8 +80,6 @@ class ApiRequest
}
/**
* @param \Chamilo\UserBundle\Entity\User|null $user
*
* @throws \Exception
*
* @return array
@ -104,9 +99,8 @@ class ApiRequest
}
/**
* @param string $token
* @param \Chamilo\UserBundle\Entity\User $user
* @param string $audioFilePath
* @param string $token
* @param string $audioFilePath
*
* @throws \Exception
*
@ -152,7 +146,6 @@ class ApiRequest
* @param string $uri
* @param string $authBearer
* @param string $lang
* @param array $multipart
*
* @throws \Exception
*

@ -1,4 +1,5 @@
<?php
/* For licensing terms, see /license.txt */
namespace Chamilo\PluginBundle\Zoom;
@ -22,7 +23,6 @@ use Exception;
/**
* Class MeetingEntity.
*
* @package Chamilo\PluginBundle\Zoom
* @ORM\Entity(repositoryClass="Chamilo\PluginBundle\Zoom\MeetingEntityRepository")
* @ORM\Table(
* name="plugin_zoom_meeting",

@ -1,4 +1,5 @@
<?php
/* For licensing terms, see /license.txt */
namespace Chamilo\PluginBundle\Zoom;
@ -14,7 +15,6 @@ use Exception;
/**
* Class RecordingEntity.
*
* @package Chamilo\PluginBundle\Zoom
* @ORM\Entity(repositoryClass="Chamilo\PluginBundle\Zoom\RecordingEntityRepository")
* @ORM\Table(
* name="plugin_zoom_recording",

@ -1,4 +1,5 @@
<?php
/* For licensing terms, see /license.txt */
namespace Chamilo\PluginBundle\Zoom;
@ -13,7 +14,6 @@ use Exception;
/**
* Class RegistrantEntity.
*
* @package Chamilo\PluginBundle\Zoom
* @ORM\Entity(repositoryClass="Chamilo\PluginBundle\Zoom\RegistrantEntityRepository")
* @ORM\Table(
* name="plugin_zoom_registrant",

@ -1,4 +1,5 @@
<?php
/* For license terms, see /license.txt */
$course_plugin = 'zoom'; // needed in order to load the plugin lang variables

@ -1,3 +1,5 @@
<?php
/* For licensing terms, see /license.txt */
require_once __DIR__.'/../../main/inc/global.inc.php';

@ -14,8 +14,6 @@ use Doctrine\ORM\EntityRepository;
/**
* Class MeetingEntityRepository.
*
* @package Chamilo\PluginBundle\Zoom
*/
class MeetingEntityRepository extends EntityRepository
{

@ -1,4 +1,5 @@
<?php
/* For licensing terms, see /license.txt */
namespace Chamilo\PluginBundle\Zoom;
@ -12,8 +13,6 @@ use Doctrine\ORM\EntityRepository;
/**
* Class RecordingEntityRepository.
*
* @package Chamilo\PluginBundle\Zoom
*/
class RecordingEntityRepository extends EntityRepository
{

@ -1,4 +1,5 @@
<?php
/* For licensing terms, see /license.txt */
namespace Chamilo\PluginBundle\Zoom;
@ -10,8 +11,6 @@ use Doctrine\ORM\EntityRepository;
/**
* Class RegistrantEntityRepository.
*
* @package Chamilo\PluginBundle\Zoom
*/
class RegistrantEntityRepository extends EntityRepository
{

@ -1,4 +1,5 @@
<?php
/* For licensing terms, see /license.txt */
use Chamilo\CoreBundle\Entity\Course;
@ -366,7 +367,10 @@ class ZoomPlugin extends Plugin
$users = $meetingEntity->getRegistrableUsers();
foreach ($users as $user) {
$userIdSelect->addOption(api_get_person_name($user->getFirstname(), $user->getLastname()), $user->getId());
$userIdSelect->addOption(
api_get_person_name($user->getFirstname(), $user->getLastname()),
$user->getId()
);
}
if ($form->validate()) {
@ -690,7 +694,15 @@ class ZoomPlugin extends Plugin
$path = '/zoom_meeting_recording_file_'.$file->id.'.'.$file->file_type;
$docId = DocumentManager::addCloudLink($courseInfo, $path, $file->play_url, $name);
if (!$docId) {
throw new Exception(get_lang(DocumentManager::cloudLinkExists($courseInfo, $path, $file->play_url) ? 'UrlAlreadyExists' : 'ErrorAddCloudLink'));
throw new Exception(
get_lang(
DocumentManager::cloudLinkExists(
$courseInfo,
$path,
$file->play_url
) ? 'UrlAlreadyExists' : 'ErrorAddCloudLink'
)
);
}
}

Loading…
Cancel
Save