Minor - flint fixes

pull/3378/head
Julio Montoya 6 years ago
parent 4399ccd5d4
commit 7d31cc6d51
  1. 2
      main/inc/lib/hook/interfaces/HookConditionalLoginObserverInterface.php
  2. 4
      main/inc/lib/hook/interfaces/HookMyStudentsLpTrackingObserverInterface.php
  3. 4
      main/inc/lib/hook/interfaces/HookMyStudentsQuizTrackingObserverInterface.php
  4. 2
      main/install/install.lib.php
  5. 3
      plugin/whispeakauth/Controller/AuthenticationController.php
  6. 6
      plugin/whispeakauth/Controller/BaseController.php
  7. 2
      plugin/whispeakauth/Controller/EnrollmentController.php
  8. 2
      plugin/whispeakauth/Entity/LogEventLp.php
  9. 2
      plugin/whispeakauth/Entity/LogEventQuiz.php
  10. 6
      plugin/whispeakauth/Request/ApiRequest.php
  11. 24
      plugin/whispeakauth/WhispeakAuthPlugin.php
  12. 2
      plugin/whispeakauth/WhispeakConditionalLoginHook.php
  13. 4
      plugin/whispeakauth/WhispeakMyStudentsLpTrackingHook.php
  14. 4
      plugin/whispeakauth/WhispeakMyStudentsQuizTrackingHook.php
  15. 2
      plugin/whispeakauth/admin.php
  16. 2
      plugin/whispeakauth/ajax/record_audio.php
  17. 2
      plugin/zoom/admin.php
  18. 13
      plugin/zoom/lib/zoom_plugin.class.php
  19. 2
      plugin/zoom/start.php

@ -16,8 +16,6 @@ interface HookConditionalLoginObserverInterface extends HookObserverInterface
* </code>
* conditional_function returns false to redirect to the url and returns true to continue with the classical login.
*
* @param HookConditionalLoginEventInterface $hook
*
* @return array
*/
public function hookConditionalLogin(HookConditionalLoginEventInterface $hook);

@ -15,8 +15,6 @@ interface HookMyStudentsLpTrackingObserverInterface extends HookObserverInterfac
* ]
* </code>.
*
* @param HookMyStudentsLpTrackingEventInterface $hook
*
* @return array
*/
public function trackingHeader(HookMyStudentsLpTrackingEventInterface $hook);
@ -30,8 +28,6 @@ interface HookMyStudentsLpTrackingObserverInterface extends HookObserverInterfac
* ]
* </code>.
*
* @param HookMyStudentsLpTrackingEventInterface $hook
*
* @return array
*/
public function trackingContent(HookMyStudentsLpTrackingEventInterface $hook);

@ -15,8 +15,6 @@ interface HookMyStudentsQuizTrackingObserverInterface extends HookObserverInterf
* ]
* </code>.
*
* @param HookMyStudentsQuizTrackingEventInterface $hook
*
* @return array
*/
public function trackingHeader(HookMyStudentsQuizTrackingEventInterface $hook);
@ -30,8 +28,6 @@ interface HookMyStudentsQuizTrackingObserverInterface extends HookObserverInterf
* ]
* </code>.
*
* @param HookMyStudentsQuizTrackingEventInterface $hook
*
* @return array
*/
public function trackingContent(HookMyStudentsQuizTrackingEventInterface $hook);

@ -1681,7 +1681,7 @@ function display_configuration_parameter(
$inputType = 'password';
$eyeForPassword =
'<input type="checkbox" id="showPassword" class="hidden">'.'<label for="showPassword">'.
Display::returnFontAwesomeIcon('eye',null, true, 'showPasswordEye').
Display::returnFontAwesomeIcon('eye', null, true, 'showPasswordEye').
'</label> ';
}
$html .= '<div class="col-sm-6 '.$hiddenPasswordClass.'"><input class="form-control" type="'.$inputType.'" size="'.FORM_FIELD_DISPLAY_LENGTH.'" maxlength="'.MAX_FORM_FIELD_LENGTH.'" name="'.$formFieldName.'" value="'.api_htmlentities($parameterValue,

@ -30,7 +30,6 @@ class AuthenticationController extends BaseController
/** @var array $lpQuestionInfo */
$lpQuestionInfo = ChamiloSession::read(WhispeakAuthPlugin::SESSION_QUIZ_QUESTION, []);
if (ChamiloSession::read(WhispeakAuthPlugin::SESSION_AUTH_PASSWORD, false)) {
ChamiloSession::erase(WhispeakAuthPlugin::SESSION_AUTH_PASSWORD);
@ -319,7 +318,7 @@ class AuthenticationController extends BaseController
}
/**
* @inheritDoc
* {@inheritdoc}
*/
protected function displayPage(array $variables)
{

@ -27,15 +27,11 @@ abstract class BaseController
$this->plugin = \WhispeakAuthPlugin::create();
}
/**
* @param array $variables
*/
abstract protected function displayPage(array $variables);
/**
* @param \Chamilo\UserBundle\Entity\User $user
*
* @throws \Exception
*
* @return string
*/
protected function uploadAudioFile(User $user)

@ -72,7 +72,7 @@ class EnrollmentController extends BaseController
}
/**
* @inheritDoc
* {@inheritdoc}
*/
protected function displayPage(array $variables)
{

@ -72,7 +72,7 @@ class LogEventLp extends LogEvent
}
/**
* @inheritDoc
* {@inheritdoc}
*/
public function getTypeString()
{

@ -72,7 +72,7 @@ class LogEventQuiz extends LogEvent
}
/**
* @inheritDoc
* {@inheritdoc}
*/
public function getTypeString()
{

@ -35,8 +35,6 @@ class ApiRequest
/**
* Create a session token to perform an enrollment.
*
* @param \Chamilo\UserBundle\Entity\User $user
*
* @throws \Exception
*
* @return array
@ -80,8 +78,6 @@ class ApiRequest
}
/**
* @param \Chamilo\UserBundle\Entity\User|null $user
*
* @throws \Exception
*
* @return array
@ -140,8 +136,6 @@ class ApiRequest
* @param string $method
* @param string $uri
* @param string $authBearer
* @param array $query
* @param array $multipart
*
* @throws \Exception
*

@ -282,7 +282,6 @@ class WhispeakAuthPlugin extends Plugin implements HookPluginInterface
}
/**
* @param User $user
* @param string $uid
*
* @throws \Doctrine\ORM\OptimisticLockException
@ -454,8 +453,7 @@ class WhispeakAuthPlugin extends Plugin implements HookPluginInterface
}
/**
* @param int $questionId
* @param Exercise $exercise
* @param int $questionId
*
* @throws Exception
*
@ -679,6 +677,16 @@ class WhispeakAuthPlugin extends Plugin implements HookPluginInterface
return $totalCount;
}
/**
* @return string
*/
public function getApiUrl()
{
$url = $this->get(self::SETTING_API_URL);
return trim($url, " \t\n\r \v/").'/';
}
/**
* Install extra fields for user, learning path and quiz question.
*/
@ -833,14 +841,4 @@ class WhispeakAuthPlugin extends Plugin implements HookPluginInterface
$sql = "DROP TABLE IF EXISTS $table";
Database::query($sql);
}
/**
* @return string
*/
public function getApiUrl()
{
$url = $this->get(self::SETTING_API_URL);
return trim($url, " \t\n\r \v/").'/';
}
}

@ -29,8 +29,6 @@ class WhispeakConditionalLoginHook extends HookObserver implements HookCondition
* </code>
* conditional_function returns false to redirect to the url and returns true to continue with the classical login.
*
* @param HookConditionalLoginEventInterface $hook
*
* @return array
*/
public function hookConditionalLogin(HookConditionalLoginEventInterface $hook)

@ -18,8 +18,6 @@ class WhispeakMyStudentsLpTrackingHook extends HookObserver implements HookMyStu
}
/**
* @param HookMyStudentsLpTrackingEventInterface $hook
*
* @return array
*/
public function trackingHeader(HookMyStudentsLpTrackingEventInterface $hook)
@ -31,8 +29,6 @@ class WhispeakMyStudentsLpTrackingHook extends HookObserver implements HookMyStu
}
/**
* @param HookMyStudentsLpTrackingEventInterface $hook
*
* @throws \Doctrine\ORM\Query\QueryException
*
* @return array

@ -26,8 +26,6 @@ class WhispeakMyStudentsQuizTrackingHook extends HookObserver implements HookMyS
* ]
* </code>.
*
* @param HookMyStudentsQuizTrackingEventInterface $hook
*
* @return array
*/
public function trackingHeader(HookMyStudentsQuizTrackingEventInterface $hook)
@ -49,8 +47,6 @@ class WhispeakMyStudentsQuizTrackingHook extends HookObserver implements HookMyS
* ]
* </code>.
*
* @param HookMyStudentsQuizTrackingEventInterface $hook
*
* @throws \Doctrine\ORM\Query\QueryException
*
* @return array

@ -71,7 +71,7 @@ if ($form->validate()) {
$pageContent = '';
/**
* @var int $userId
* @var int $userId
* @var array|LogEvent[] $logEvents
*/
foreach ($results as $userId => $logEvents) {

@ -30,7 +30,7 @@ if ($isEnrollment) {
}
if ($isAuthentify) {
$controller= new AuthenticationController();
$controller = new AuthenticationController();
try {
$controller->ajax();

@ -1,8 +1,6 @@
<?php
/* For license terms, see /license.txt */
use Chamilo\PluginBundle\Zoom\CourseMeetingList;
$course_plugin = 'zoom'; // needed in order to load the plugin lang variables
$cidReset = true;

@ -286,8 +286,7 @@ class ZoomPlugin extends Plugin
}
$userIdSelect->setSelected($registeredUserIds);
return [ $form, $registrants ];
return [$form, $registrants];
}
/**
@ -878,15 +877,7 @@ 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'));
}
}

@ -1,8 +1,6 @@
<?php
/* For license terms, see /license.txt */
use Doctrine\Common\Collections\Criteria;
$course_plugin = 'zoom'; // needed in order to load the plugin lang variables
require_once __DIR__.'/config.php';

Loading…
Cancel
Save