Minor - flint fixes

pull/3140/head
Julio Montoya 6 years ago
parent 145553110e
commit 25d82d3473
  1. 2
      main/inc/lib/display.lib.php
  2. 3
      main/inc/lib/message.lib.php
  3. 2
      plugin/migrationmoodle/src/Loader/CourseCategoriesLoader.php
  4. 2
      plugin/migrationmoodle/src/Loader/CourseFilesLoader.php
  5. 1
      plugin/migrationmoodle/src/Loader/CourseIntroductionLoader.php
  6. 2
      plugin/migrationmoodle/src/Loader/LessonPagesLoader.php
  7. 2
      plugin/migrationmoodle/src/Loader/UserLearnPathLessonAttemptLoader.php
  8. 17
      plugin/migrationmoodle/src/Loader/UserLearnPathLessonBranchLoader.php
  9. 14
      plugin/migrationmoodle/src/Loader/UserLearnPathLessonTimerLoader.php
  10. 1
      plugin/migrationmoodle/src/Loader/UserLearnPathQuizLoader.php
  11. 1
      plugin/migrationmoodle/src/Loader/UserLearnPathsLoader.php
  12. 1
      plugin/migrationmoodle/src/Loader/UsersScormsViewLoader.php
  13. 2
      plugin/migrationmoodle/src/MigrationMoodlePlugin.php
  14. 2
      plugin/migrationmoodle/src/Script/BaseScript.php

@ -892,7 +892,7 @@ class Display
// When moving this to production, the return_icon() calls should
// ask for the SVG version directly
$svgIcons = api_get_setting('icons_mode_svg');
if ($svgIcons == 'true' && $return_only_path == false) {
if ($svgIcons === 'true' && $return_only_path == false) {
$svgImage = substr($image, 0, -3).'svg';
if (is_file($code_path.$theme.'svg/'.$svgImage)) {
$icon = $w_code_path.$theme.'svg/'.$svgImage;

@ -1,4 +1,5 @@
<?php
/* For licensing terms, see /license.txt */
use Chamilo\CoreBundle\Entity\Message;
@ -10,8 +11,6 @@ use ChamiloSession as Session;
*
* This class provides methods for messages management.
* Include/require it in your code to use its features.
*
* @package chamilo.library
*/
class MessageManager
{

@ -15,8 +15,6 @@ class CourseCategoriesLoader implements LoaderInterface
/**
* Load the data and return the ID inserted.
*
* @param array $incomingData
*
* @return int
*/
public function load(array $incomingData)

@ -20,8 +20,6 @@ class CourseFilesLoader implements LoaderInterface
/**
* Load the data and return the ID inserted.
*
* @param array $incomingData
*
* @throws \Exception
*
* @return int

@ -3,7 +3,6 @@
namespace Chamilo\PluginBundle\MigrationMoodle\Loader;
use Chamilo\CourseBundle\Entity\CToolIntro;
use Chamilo\PluginBundle\MigrationMoodle\Interfaces\LoaderInterface;
/**

@ -17,8 +17,6 @@ class LessonPagesLoader implements LoaderInterface
/**
* Load the data and return the ID inserted.
*
* @param array $incomingData
*
* @return int
*/
public function load(array $incomingData)

@ -11,8 +11,6 @@ namespace Chamilo\PluginBundle\MigrationMoodle\Loader;
class UserLearnPathLessonAttemptLoader extends UserLearnPathLessonBranchLoader
{
/**
* @param array $incomingData
*
* @throws \Exception
*
* @return int

@ -3,7 +3,6 @@
namespace Chamilo\PluginBundle\MigrationMoodle\Loader;
use Chamilo\CourseBundle\Entity\CLpItemView;
use Chamilo\PluginBundle\MigrationMoodle\Interfaces\LoaderInterface;
/**
@ -52,10 +51,9 @@ class UserLearnPathLessonBranchLoader implements LoaderInterface
}
/**
* @param array $incomingData
* @return array
*
* @throws \Exception
*
* @return array
*/
private function findViewOfItem(array $incomingData)
{
@ -70,18 +68,16 @@ class UserLearnPathLessonBranchLoader implements LoaderInterface
);
if (!$itemView) {
throw new \Exception("Item view not found for "
."item ({$incomingData['item_id']}) and user ({$incomingData['user_id']}).");
throw new \Exception("Item view not found for "."item ({$incomingData['item_id']}) and user ({$incomingData['user_id']}).");
}
return $itemView;
}
/**
* @param array $incomingData
* @return array
*
* @throws \Exception
*
* @return array
*/
private function findViewOfPreviousItem(array $incomingData)
{
@ -96,8 +92,7 @@ class UserLearnPathLessonBranchLoader implements LoaderInterface
$previousItemView = \Database::fetch_assoc($result);
if (!$previousItemView) {
throw new \Exception("Item view not found for "
."previous item ({$incomingData['item_id']}) and user ({$incomingData['user_id']}).");
throw new \Exception("Item view not found for "."previous item ({$incomingData['item_id']}) and user ({$incomingData['user_id']}).");
}
return $previousItemView;

@ -3,7 +3,6 @@
namespace Chamilo\PluginBundle\MigrationMoodle\Loader;
use Chamilo\CourseBundle\Entity\CLpItemView;
use Chamilo\PluginBundle\MigrationMoodle\Interfaces\LoaderInterface;
/**
@ -34,10 +33,9 @@ class UserLearnPathLessonTimerLoader implements LoaderInterface
}
/**
* @param array $incomingData
* @return array
*
* @throws \Exception
*
* @return array
*/
private function findViewOfParentItem(array $incomingData)
{
@ -60,10 +58,9 @@ class UserLearnPathLessonTimerLoader implements LoaderInterface
}
/**
* @param array $incomingData
* @return array
*
* @throws \Exception
*
* @return array
*/
private function findViewOfFirstItem(array $incomingData)
{
@ -85,8 +82,7 @@ class UserLearnPathLessonTimerLoader implements LoaderInterface
);
if (!$itemView) {
throw new \Exception("Item view not found for item with"
." parent item ({$incomingData['parent_item_id']}) and user ({$incomingData['user_id']})");
throw new \Exception("Item view not found for item with"." parent item ({$incomingData['parent_item_id']}) and user ({$incomingData['user_id']})");
}
return $itemView;

@ -3,7 +3,6 @@
namespace Chamilo\PluginBundle\MigrationMoodle\Loader;
use Chamilo\CourseBundle\Entity\CLpItemView;
use Chamilo\PluginBundle\MigrationMoodle\Interfaces\LoaderInterface;
/**

@ -3,7 +3,6 @@
namespace Chamilo\PluginBundle\MigrationMoodle\Loader;
use Chamilo\CoreBundle\Entity\SessionRelCourseRelUser;
use Chamilo\PluginBundle\MigrationMoodle\Interfaces\LoaderInterface;
/**

@ -3,7 +3,6 @@
namespace Chamilo\PluginBundle\MigrationMoodle\Loader;
use Chamilo\CoreBundle\Entity\Session;
use Chamilo\PluginBundle\MigrationMoodle\Interfaces\LoaderInterface;
/**

@ -157,7 +157,7 @@ class MigrationMoodlePlugin extends Plugin implements HookPluginInterface
'where' => [
'name = ?' => Database::escape_string($name.'_task'),
'or name = ?' => Database::escape_string($name.'_script'),
]
],
],
'first'
);

@ -32,7 +32,7 @@ abstract class BaseScript
$this->process();
}
abstract function process();
abstract public function process();
/**
* @param string $message

Loading…
Cancel
Save