Minor - flint fixes

pull/3016/head
Julio Montoya 5 years ago
parent b05893ef3e
commit 2c33a7f81a
  1. 2
      main/inc/lib/course.lib.php
  2. 3
      main/inc/lib/usermanager.lib.php
  3. 4
      main/webservices/access_url.php
  4. 14
      plugin/advanced_subscription/src/HookAdvancedSubscription.php
  5. 9
      plugin/advanced_subscription/test/ws_session_user.php
  6. 3
      src/ContactBundle/Entity/Category.php
  7. 4
      src/CoreBundle/Entity/Course.php
  8. 1
      src/CoreBundle/Entity/Manager/SequenceResourceManager.php
  9. 1
      src/CoreBundle/Entity/Resource/ResourceFile.php
  10. 1
      src/CoreBundle/Framework/Container.php
  11. 8
      src/CoreBundle/Migrations/Schema/V200/Version20.php
  12. 1
      src/CoreBundle/Resources/config/services.yml
  13. 1
      src/CoreBundle/Settings/AbstractSettingsSchema.php
  14. 3
      src/CoreBundle/ToolChain.php
  15. 2
      src/CourseBundle/Resources/config/services.yml
  16. 2
      src/FaqBundle/Entity/Category.php
  17. 1
      src/FaqBundle/Entity/CategoryTranslation.php
  18. 1
      src/SkillBundle/Entity/SkillRelCourse.php
  19. 1
      src/TicketBundle/Entity/AssignedLog.php

@ -4,11 +4,11 @@
use Chamilo\CoreBundle\Entity\Course;
use Chamilo\CoreBundle\Entity\ExtraField as EntityExtraField;
use Chamilo\CoreBundle\Framework\Container;
use Chamilo\CoreBundle\ToolChain;
use Chamilo\CoreBundle\Hook\HookCreateCourse;
use Chamilo\CourseBundle\Component\CourseCopy\CourseBuilder;
use Chamilo\CourseBundle\Component\CourseCopy\CourseRestorer;
use Chamilo\CourseBundle\Manager\SettingsManager;
use Chamilo\CoreBundle\ToolChain;
use ChamiloSession as Session;
/**

@ -7,7 +7,6 @@ use Chamilo\CoreBundle\Entity\SkillRelUserComment;
use Chamilo\CoreBundle\Framework\Container;
use Chamilo\CoreBundle\Hook\HookCreateUser;
use Chamilo\CoreBundle\Hook\HookUpdateUser;
use Chamilo\CoreBundle\Repository\AccessUrlRepository;
use Chamilo\UserBundle\Entity\User;
use Chamilo\UserBundle\Repository\UserRepository;
use ChamiloSession as Session;
@ -18,8 +17,6 @@ use ChamiloSession as Session;
* This library provides functions for user management.
* Include/require it in your code to use its functionality.
*
* @package chamilo.library
*
* @author Julio Montoya <gugli100@gmail.com> Social network groups added 2009/12
*/
class UserManager

@ -1,10 +1,6 @@
<?php
/* For licensing terms, see /license.txt */
/**
* @package chamilo.webservices
*/
use Chamilo\CoreBundle\Framework\Container;
use Chamilo\CoreBundle\Hook\HookWSRegistration;

@ -1,14 +1,6 @@
<?php
/* For licensing terms, see /license.txt */
/**
* Hook Observer for Advanced subscription plugin.
*
* @author Daniel Alejandro Barreto Alva <daniel.barreto@beeznest.com>
*
* @package chamilo.plugin.advanced_subscription
*/
use Chamilo\CoreBundle\Hook\HookObserver;
use Chamilo\CoreBundle\Hook\Interfaces\HookAdminBlockEventInterface;
use Chamilo\CoreBundle\Hook\Interfaces\HookAdminBlockObserverInterface;
@ -18,6 +10,12 @@ use Chamilo\CoreBundle\Hook\Interfaces\HookNotificationTitleEventInterface;
use Chamilo\CoreBundle\Hook\Interfaces\HookWSRegistrationEventInterface;
use Chamilo\CoreBundle\Hook\Interfaces\HookWSRegistrationObserverInterface;
/**
* Hook Observer for Advanced subscription plugin.
*
* @author Daniel Alejandro Barreto Alva <daniel.barreto@beeznest.com>
*/
require_once __DIR__.'/../config.php';
/**

@ -1,16 +1,13 @@
<?php
/* For license terms, see /license.txt */
use Chamilo\CoreBundle\Framework\Container;
/**
* A script to test session details by user web service.
*
* @package chamilo.plugin.advanced_subscription
*/
use Chamilo\CoreBundle\Framework\Container;
require_once __DIR__.'/../config.php';
// Protect test
api_protect_admin_script();
// exit;

@ -11,7 +11,6 @@ use Knp\DoctrineBehaviors\Model as ORMBehaviors;
*
* @ORM\Entity
* @ORM\Table(name="contact_category")
*
*/
class Category
{
@ -28,12 +27,14 @@ class Category
/**
* @var string
*
* @ORM\Column(name="name", type="string", nullable=false)
*/
protected $name;
/**
* @var string
*
* @ORM\Column(name="email", type="string")
*/
protected $email;

@ -1333,7 +1333,7 @@ class Course extends AbstractResource implements ResourceInterface
*
* @return bool
*/
protected function hasSubscription(CourseRelUser $subscription)
public function hasSubscription(CourseRelUser $subscription)
{
if ($this->getUsers()->count()) {
$criteria = Criteria::create()->where(
@ -1358,7 +1358,7 @@ class Course extends AbstractResource implements ResourceInterface
* @param string $role
* @param string $status
*/
protected function addUser(User $user, $relationType, $role, $status)
public function addUser(User $user, $relationType, $role, $status)
{
$courseRelUser = new CourseRelUser();
$courseRelUser->setCourse($this);

@ -8,7 +8,6 @@ use Sonata\CoreBundle\Model\BaseEntityManager;
/**
* Class SequenceResourceManager
* CRUD for the course.
*
*/
class SequenceResourceManager extends BaseEntityManager
{

@ -88,7 +88,6 @@ class ResourceFile
protected $dimensions;
/**
*
* @var int
*
* @Assert\NotBlank()

@ -9,7 +9,6 @@ use Chamilo\CoreBundle\Repository\AccessUrlRepository;
use Chamilo\CoreBundle\ToolChain;
use Chamilo\CourseBundle\Repository\CDocumentRepository;
use Chamilo\CourseBundle\Repository\CExerciseCategoryRepository;
use Chamilo\CourseBundle\Repository\CQuizCategoryRepository;
use Chamilo\CourseBundle\Repository\CQuizQuestionCategoryRepository;
use Chamilo\CourseBundle\Repository\CQuizRepository;
use Chamilo\PageBundle\Entity\Page;

@ -954,6 +954,14 @@ class Version20 extends AbstractMigrationChamilo
$this->addSql("ALTER TABLE c_exercise_category ADD CONSTRAINT FK_B94C157E1BAD783F FOREIGN KEY (resource_node_id) REFERENCES resource_node (id);");
$this->addSql("CREATE UNIQUE INDEX UNIQ_B94C157E1BAD783F ON c_exercise_category (resource_node_id);");
$this->addSql("ALTER TABLE course ADD resource_node_id INT DEFAULT NULL;");
$this->addSql("ALTER TABLE course ADD CONSTRAINT FK_169E6FB91BAD783F FOREIGN KEY (resource_node_id) REFERENCES resource_node (id)");
$this->addSql("CREATE UNIQUE INDEX UNIQ_169E6FB91BAD783F ON course (resource_node_id)");
$this->addSql("ALTER TABLE access_url ADD resource_node_id INT DEFAULT NULL");
$this->addSql("ALTER TABLE access_url ADD CONSTRAINT FK_9436187B1BAD783F FOREIGN KEY (resource_node_id) REFERENCES resource_node (id)");
$this->addSql("CREATE UNIQUE INDEX UNIQ_9436187B1BAD783F ON access_url (resource_node_id)");
//course_module drop ?
}

@ -293,4 +293,3 @@ services:
Liip\ImagineBundle\Service\FilterService:
alias: 'liip_imagine.service.filter'

@ -3,7 +3,6 @@
namespace Chamilo\CoreBundle\Settings;
use Chamilo\CoreBundle\Entity\Manager\CourseManager;
use Sylius\Bundle\SettingsBundle\Schema\AbstractSettingsBuilder;
use Sylius\Bundle\SettingsBundle\Schema\SchemaInterface;

@ -41,8 +41,7 @@ use Doctrine\Common\Persistence\ObjectManager;
* 1. Create a new tool class here: src/Chamilo/CoreBundle/Tool
* 2. Add the class as a service here: src/Chamilo/CoreBundle/Resources/config/tools.yml (see examples there)
* 3. Create a new course. When you create a new course the new tool will be created
*
* 3. Create a new course. When you create a new course the new tool will be created.
*/
class ToolChain
{

@ -126,5 +126,3 @@ services:
- '@chamilo_course.repository.parameter'
- '@sylius.factory.settings'
- '@event_dispatcher'

@ -5,8 +5,8 @@ namespace Chamilo\FaqBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
use Gedmo\Mapping\Annotation as Gedmo;
use Knp\DoctrineBehaviors\Model as ORMBehaviors;
use Gedmo\Timestampable\Traits\TimestampableEntity;
use Knp\DoctrineBehaviors\Model as ORMBehaviors;
/**
* Class Category.

@ -24,7 +24,6 @@ use Knp\DoctrineBehaviors\Model as ORMBehaviors;
* )
* )
* })
*
*/
class CategoryTranslation
{

@ -7,7 +7,6 @@ use Chamilo\CoreBundle\Entity\Course;
use Chamilo\CoreBundle\Entity\Session;
use Chamilo\CoreBundle\Entity\Skill;
use Doctrine\ORM\Mapping as ORM;
use Gedmo\Mapping\Annotation as Gedmo;
use Gedmo\Timestampable\Traits\TimestampableEntity;
/**

@ -13,7 +13,6 @@ use Doctrine\ORM\Mapping as ORM;
* name="ticket_assigned_log",
* )
* @ORM\Entity
*
*/
class AssignedLog
{

Loading…
Cancel
Save