diff --git a/src/Application/Sonata/AdminBundle/ApplicationSonataAdminBundle.php b/src/Application/Sonata/AdminBundle/ApplicationSonataAdminBundle.php new file mode 100755 index 0000000000..2a82062295 --- /dev/null +++ b/src/Application/Sonata/AdminBundle/ApplicationSonataAdminBundle.php @@ -0,0 +1,21 @@ + project. + * + * (c) + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Application\Sonata\NewsBundle\Document; + +use Sonata\NewsBundle\Document\BaseComment as BaseComment; + +/** + * This file has been generated by the EasyExtends bundle ( http://sonata-project.org/easy-extends ) + * + * References : + * working with object : http://www.doctrine-project.org/docs/mongodb_odm/1.0/en/reference/working-with-objects.html + * + * @author + */ +class Comment extends BaseComment +{ + + /** + * @var integer $id + */ + protected $id; + + /** + * Get id + * + * @return integer $id + */ + public function getId() + { + return $this->id; + } + +} \ No newline at end of file diff --git a/src/Application/Sonata/NewsBundle/Document/Post.php b/src/Application/Sonata/NewsBundle/Document/Post.php new file mode 100755 index 0000000000..d7856413d3 --- /dev/null +++ b/src/Application/Sonata/NewsBundle/Document/Post.php @@ -0,0 +1,41 @@ + project. + * + * (c) + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Application\Sonata\NewsBundle\Document; + +use Sonata\NewsBundle\Document\BasePost as BasePost; + +/** + * This file has been generated by the EasyExtends bundle ( http://sonata-project.org/easy-extends ) + * + * References : + * working with object : http://www.doctrine-project.org/docs/mongodb_odm/1.0/en/reference/working-with-objects.html + * + * @author + */ +class Post extends BasePost +{ + + /** + * @var integer $id + */ + protected $id; + + /** + * Get id + * + * @return integer $id + */ + public function getId() + { + return $this->id; + } + +} \ No newline at end of file diff --git a/src/Application/Sonata/NewsBundle/Document/PostRepository.php b/src/Application/Sonata/NewsBundle/Document/PostRepository.php new file mode 100755 index 0000000000..4b52d1b151 --- /dev/null +++ b/src/Application/Sonata/NewsBundle/Document/PostRepository.php @@ -0,0 +1,26 @@ + project. + * + * (c) + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Application\Sonata\NewsBundle\Document; + +use Sonata\NewsBundle\Document\BasePostRepository; + +/** + * This file has been generated by the EasyExtends bundle ( http://sonata-project.org/easy-extends ) + * + * References : + * query builder : http://www.doctrine-project.org/docs/mongodb_odm/1.0/en/reference/query-builder-api.html + * + * @author + */ +class PostRepository extends BasePostRepository +{ + +} \ No newline at end of file diff --git a/src/Application/Sonata/NewsBundle/Entity/Comment.php b/src/Application/Sonata/NewsBundle/Entity/Comment.php new file mode 100755 index 0000000000..3d2dc5477d --- /dev/null +++ b/src/Application/Sonata/NewsBundle/Entity/Comment.php @@ -0,0 +1,40 @@ + project. + * + * (c) + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Application\Sonata\NewsBundle\Entity; + +use Sonata\NewsBundle\Entity\BaseComment as BaseComment; + +/** + * This file has been generated by the Sonata EasyExtends bundle ( http://sonata-project.org/easy-extends ) + * + * References : + * working with object : http://www.doctrine-project.org/projects/orm/2.0/docs/reference/working-with-objects/en + * + * @author + */ +class Comment extends BaseComment +{ + + /** + * @var integer $id + */ + protected $id; + + /** + * Get id + * + * @return integer $id + */ + public function getId() + { + return $this->id; + } +} \ No newline at end of file diff --git a/src/Application/Sonata/NewsBundle/Entity/Post.php b/src/Application/Sonata/NewsBundle/Entity/Post.php new file mode 100755 index 0000000000..8ae8763be1 --- /dev/null +++ b/src/Application/Sonata/NewsBundle/Entity/Post.php @@ -0,0 +1,40 @@ + project. + * + * (c) + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Application\Sonata\NewsBundle\Entity; + +use Sonata\NewsBundle\Entity\BasePost as BasePost; + +/** + * This file has been generated by the Sonata EasyExtends bundle ( http://sonata-project.org/easy-extends ) + * + * References : + * working with object : http://www.doctrine-project.org/projects/orm/2.0/docs/reference/working-with-objects/en + * + * @author + */ +class Post extends BasePost +{ + + /** + * @var integer $id + */ + protected $id; + + /** + * Get id + * + * @return integer $id + */ + public function getId() + { + return $this->id; + } +} \ No newline at end of file diff --git a/src/Application/Sonata/NewsBundle/Entity/PostRepository.php b/src/Application/Sonata/NewsBundle/Entity/PostRepository.php new file mode 100755 index 0000000000..ce8ab047d1 --- /dev/null +++ b/src/Application/Sonata/NewsBundle/Entity/PostRepository.php @@ -0,0 +1,28 @@ + project. + * + * (c) + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Application\Sonata\NewsBundle\Entity; + +use Sonata\NewsBundle\Entity\BasePostRepository; + +/** + * This file has been generated by the EasyExtends bundle ( http://sonata-project.org/easy-extends ) + * + * References : + * custom repository : http://www.doctrine-project.org/projects/orm/2.0/docs/reference/working-with-objects/en#querying:custom-repositories + * query builder : http://www.doctrine-project.org/projects/orm/2.0/docs/reference/query-builder/en + * dql : http://www.doctrine-project.org/projects/orm/2.0/docs/reference/dql-doctrine-query-language/en + * + * @author + */ +class PostRepository extends BasePostRepository +{ + +} \ No newline at end of file diff --git a/src/Application/Sonata/NewsBundle/Resources/config/doctrine/Comment.orm.xml b/src/Application/Sonata/NewsBundle/Resources/config/doctrine/Comment.orm.xml new file mode 100755 index 0000000000..f77a8aa3e0 --- /dev/null +++ b/src/Application/Sonata/NewsBundle/Resources/config/doctrine/Comment.orm.xml @@ -0,0 +1,21 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/src/Application/Sonata/NewsBundle/Resources/config/doctrine/Post.orm.xml b/src/Application/Sonata/NewsBundle/Resources/config/doctrine/Post.orm.xml new file mode 100755 index 0000000000..dd6b8d125c --- /dev/null +++ b/src/Application/Sonata/NewsBundle/Resources/config/doctrine/Post.orm.xml @@ -0,0 +1,21 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/src/Application/Sonata/NewsBundle/Resources/config/serializer/Entity.Comment.xml b/src/Application/Sonata/NewsBundle/Resources/config/serializer/Entity.Comment.xml new file mode 100755 index 0000000000..fa131f5cd5 --- /dev/null +++ b/src/Application/Sonata/NewsBundle/Resources/config/serializer/Entity.Comment.xml @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/src/Application/Sonata/NewsBundle/Resources/config/serializer/Entity.Post.xml b/src/Application/Sonata/NewsBundle/Resources/config/serializer/Entity.Post.xml new file mode 100755 index 0000000000..0170a68b68 --- /dev/null +++ b/src/Application/Sonata/NewsBundle/Resources/config/serializer/Entity.Post.xml @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/src/Application/Sonata/PageBundle/Resources/config/doctrine/Block.orm.xml b/src/Application/Sonata/PageBundle/Resources/config/doctrine/Block.orm.xml new file mode 100644 index 0000000000..c1badef281 --- /dev/null +++ b/src/Application/Sonata/PageBundle/Resources/config/doctrine/Block.orm.xml @@ -0,0 +1,21 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/src/Application/Sonata/PageBundle/Resources/config/doctrine/Page.orm.xml b/src/Application/Sonata/PageBundle/Resources/config/doctrine/Page.orm.xml new file mode 100644 index 0000000000..aa9cb35b80 --- /dev/null +++ b/src/Application/Sonata/PageBundle/Resources/config/doctrine/Page.orm.xml @@ -0,0 +1,21 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/src/Application/Sonata/PageBundle/Resources/config/doctrine/Site.orm.xml b/src/Application/Sonata/PageBundle/Resources/config/doctrine/Site.orm.xml new file mode 100644 index 0000000000..c2ea98db7c --- /dev/null +++ b/src/Application/Sonata/PageBundle/Resources/config/doctrine/Site.orm.xml @@ -0,0 +1,21 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/src/Application/Sonata/PageBundle/Resources/config/doctrine/Snapshot.orm.xml b/src/Application/Sonata/PageBundle/Resources/config/doctrine/Snapshot.orm.xml new file mode 100644 index 0000000000..e048aad9fa --- /dev/null +++ b/src/Application/Sonata/PageBundle/Resources/config/doctrine/Snapshot.orm.xml @@ -0,0 +1,21 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/src/Application/Sonata/PageBundle/Resources/config/serializer/Entity.Block.xml b/src/Application/Sonata/PageBundle/Resources/config/serializer/Entity.Block.xml new file mode 100644 index 0000000000..301aa4fd9d --- /dev/null +++ b/src/Application/Sonata/PageBundle/Resources/config/serializer/Entity.Block.xml @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/src/Application/Sonata/PageBundle/Resources/config/serializer/Entity.Page.xml b/src/Application/Sonata/PageBundle/Resources/config/serializer/Entity.Page.xml new file mode 100644 index 0000000000..d877d76424 --- /dev/null +++ b/src/Application/Sonata/PageBundle/Resources/config/serializer/Entity.Page.xml @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/src/Application/Sonata/PageBundle/Resources/config/serializer/Entity.Site.xml b/src/Application/Sonata/PageBundle/Resources/config/serializer/Entity.Site.xml new file mode 100644 index 0000000000..70c5636d03 --- /dev/null +++ b/src/Application/Sonata/PageBundle/Resources/config/serializer/Entity.Site.xml @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/src/Application/Sonata/PageBundle/Resources/config/serializer/Entity.Snapshot.xml b/src/Application/Sonata/PageBundle/Resources/config/serializer/Entity.Snapshot.xml new file mode 100644 index 0000000000..ab8a6b441c --- /dev/null +++ b/src/Application/Sonata/PageBundle/Resources/config/serializer/Entity.Snapshot.xml @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/src/Application/Sonata/PageBundle/Resources/views/default_2columns_layout.html.twig b/src/Application/Sonata/PageBundle/Resources/views/default_2columns_layout.html.twig new file mode 100644 index 0000000000..9f71ed7cf3 --- /dev/null +++ b/src/Application/Sonata/PageBundle/Resources/views/default_2columns_layout.html.twig @@ -0,0 +1,24 @@ +{% extends 'SonataPageBundle::2columns_layout.html.twig' %} + +{% block sonata_page_body_tag %} + {{ parent() }} + + {% include "SonataSeoBundle:Block:_facebook_sdk.html.twig" %} + {% include "SonataSeoBundle:Block:_twitter_sdk.html.twig" %} + {% include "SonataSeoBundle:Block:_pinterest_sdk.html.twig" %} + +{% endblock %} + +{% block sonata_page_javascripts %} + + + +{% endblock %} + +{% block sonata_page_container %} + {{ parent() }} +{% endblock %} + +{% block sonata_page_breadcrumb %}{% endblock %} diff --git a/src/Application/Sonata/PageBundle/Resources/views/default_layout.html.twig b/src/Application/Sonata/PageBundle/Resources/views/default_layout.html.twig new file mode 100644 index 0000000000..cc4e5f6550 --- /dev/null +++ b/src/Application/Sonata/PageBundle/Resources/views/default_layout.html.twig @@ -0,0 +1,24 @@ +{% extends 'SonataPageBundle::layout.html.twig' %} + +{% block sonata_page_body_tag %} + {{ parent() }} + + {% include "SonataSeoBundle:Block:_facebook_sdk.html.twig" %} + {% include "SonataSeoBundle:Block:_twitter_sdk.html.twig" %} + {% include "SonataSeoBundle:Block:_pinterest_sdk.html.twig" %} + +{% endblock %} + +{% block sonata_page_javascripts %} + + + +{% endblock %} + +{% block sonata_page_container %} + {{ parent() }} +{% endblock %} + +{% block sonata_page_breadcrumb %}{% endblock %} diff --git a/src/Application/Sonata/SeoBundle/ApplicationSonataSeoBundle.php b/src/Application/Sonata/SeoBundle/ApplicationSonataSeoBundle.php new file mode 100644 index 0000000000..fcc59945b8 --- /dev/null +++ b/src/Application/Sonata/SeoBundle/ApplicationSonataSeoBundle.php @@ -0,0 +1,32 @@ + project. + * + * (c) + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Application\Sonata\SeoBundle; + +use Symfony\Component\HttpKernel\Bundle\Bundle; + +/** + * This file has been generated by the EasyExtends bundle ( http://sonata-project.org/easy-extends ) + * + * References : + * bundles : http://symfony.com/doc/current/book/bundles.html + * + * @author + */ +class ApplicationSonataSeoBundle extends Bundle +{ + /** + * {@inheritdoc} + */ + public function getParent() + { + return 'SonataSeoBundle'; + } +} \ No newline at end of file diff --git a/src/Application/Sonata/SeoBundle/Resources/views/Block/breadcrumb.html.twig b/src/Application/Sonata/SeoBundle/Resources/views/Block/breadcrumb.html.twig new file mode 100644 index 0000000000..7c4bc56426 --- /dev/null +++ b/src/Application/Sonata/SeoBundle/Resources/views/Block/breadcrumb.html.twig @@ -0,0 +1,21 @@ +{# + +This file is part of the Sonata package. + +(c) Thomas Rabaix + +For the full copyright and license information, please view the LICENSE +file that was distributed with this source code. + +#} + +{% extends 'knp_menu_ordered.html.twig' %} +{% block label %}{{ item.label|trans(item.getExtra('translation_params', {}), item.getExtra('translation_domain', 'SonataSeoBundle')) }}{% endblock %} + +{% block list %} + {% spaceless %} +
+ {{ parent() }} +
+ {% endspaceless %} +{% endblock %} diff --git a/src/Application/Sonata/UserBundle/Resources/config/validation.xml b/src/Application/Sonata/UserBundle/Resources/config/validation.xml new file mode 100644 index 0000000000..a75fa6968e --- /dev/null +++ b/src/Application/Sonata/UserBundle/Resources/config/validation.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/Application/Sonata/UserBundle/Resources/config/validation/orm.xml b/src/Application/Sonata/UserBundle/Resources/config/validation/orm.xml new file mode 100644 index 0000000000..32fea8c9e6 --- /dev/null +++ b/src/Application/Sonata/UserBundle/Resources/config/validation/orm.xml @@ -0,0 +1,18 @@ + + + + + + + + + + + + + diff --git a/src/Application/Sonata/UserBundle/Resources/views/Security/base_login.html.twig b/src/Application/Sonata/UserBundle/Resources/views/Security/base_login.html.twig new file mode 100644 index 0000000000..14c71c16dd --- /dev/null +++ b/src/Application/Sonata/UserBundle/Resources/views/Security/base_login.html.twig @@ -0,0 +1,90 @@ +{# + +This file is part of the Sonata package. + +(c) Thomas Rabaix + +For the full copyright and license information, please view the LICENSE +file that was distributed with this source code. + +#} + +{% extends "SonataUserBundle::layout.html.twig" %} + +{% block fos_user_content %} +
+
+ {% block sonata_user_login %} +
+ +
+

{{ 'title_user_authentication'|trans({}, 'SonataUserBundle') }}

+
+ +
+ + {% block sonata_user_login_error %} + {% if error %} +
{{ error|trans({}, 'FOSUserBundle') }}
+ {% endif %} + {% endblock %} + + {% block sonata_user_login_form %} +
+ + +
+ + +
+
+ + +
+ + +
+
+ +
+
+
+ +
+
+
+ + + +
+
+ +
+
+
+ {% endblock %} +
+
+ {% endblock %} +
+
+ {% block sonata_user_registration %} + {% render controller("SonataUserBundle:RegistrationFOSUser1:register") %} + {% endblock %} +
+
+{% endblock fos_user_content %} diff --git a/src/Application/Sonata/UserBundle/Resources/views/Security/login.html.twig b/src/Application/Sonata/UserBundle/Resources/views/Security/login.html.twig new file mode 100644 index 0000000000..b7a4b179e0 --- /dev/null +++ b/src/Application/Sonata/UserBundle/Resources/views/Security/login.html.twig @@ -0,0 +1 @@ +{% extends "SonataUserBundle:Security:base_login.html.twig" %} diff --git a/src/Application/Sonata/UserBundle/Resources/views/layout.html.twig b/src/Application/Sonata/UserBundle/Resources/views/layout.html.twig new file mode 100644 index 0000000000..44af44e368 --- /dev/null +++ b/src/Application/Sonata/UserBundle/Resources/views/layout.html.twig @@ -0,0 +1,4 @@ +
+ {% block fos_user_content %} + {% endblock fos_user_content %} +
diff --git a/src/Application/Sonata/UserBundle/Security/Encoder.php b/src/Application/Sonata/UserBundle/Security/Encoder.php new file mode 100644 index 0000000000..64a8ebbc3e --- /dev/null +++ b/src/Application/Sonata/UserBundle/Security/Encoder.php @@ -0,0 +1,24 @@ +encodePassword($raw, $salt); + } +} diff --git a/src/ChamiloLMS/CoreBundle/Entity/AccessUrl.php b/src/ChamiloLMS/CoreBundle/Entity/AccessUrl.php index 80c6519ae2..1737d14821 100644 --- a/src/ChamiloLMS/CoreBundle/Entity/AccessUrl.php +++ b/src/ChamiloLMS/CoreBundle/Entity/AccessUrl.php @@ -17,7 +17,7 @@ class AccessUrl * * @ORM\Column(name="id", type="integer", precision=0, scale=0, nullable=false, unique=false) * @ORM\Id - * @ORM\GeneratedValue(strategy="IDENTITY") + * @ORM\GeneratedValue(strategy="AUTO") */ private $id; diff --git a/src/ChamiloLMS/CoreBundle/Entity/AccessUrlRelCourse.php b/src/ChamiloLMS/CoreBundle/Entity/AccessUrlRelCourse.php index bd2465abe7..156ab91f4c 100644 --- a/src/ChamiloLMS/CoreBundle/Entity/AccessUrlRelCourse.php +++ b/src/ChamiloLMS/CoreBundle/Entity/AccessUrlRelCourse.php @@ -17,7 +17,7 @@ class AccessUrlRelCourse * * @ORM\Column(name="id", type="integer", precision=0, scale=0, nullable=false, unique=false) * @ORM\Id - * @ORM\GeneratedValue(strategy="IDENTITY") + * @ORM\GeneratedValue(strategy="AUTO") */ private $id; diff --git a/src/ChamiloLMS/CoreBundle/Entity/AccessUrlRelSession.php b/src/ChamiloLMS/CoreBundle/Entity/AccessUrlRelSession.php index eca476e1a1..02689b1935 100644 --- a/src/ChamiloLMS/CoreBundle/Entity/AccessUrlRelSession.php +++ b/src/ChamiloLMS/CoreBundle/Entity/AccessUrlRelSession.php @@ -15,9 +15,16 @@ class AccessUrlRelSession /** * @var integer * - * @ORM\Column(name="access_url_id", type="integer", precision=0, scale=0, nullable=false, unique=false) + * @ORM\Column(name="id", type="integer", precision=0, scale=0, nullable=false, unique=false) * @ORM\Id - * @ORM\GeneratedValue(strategy="NONE") + * @ORM\GeneratedValue(strategy="AUTO") + */ + private $id; + + /** + * @var integer + * + * @ORM\Column(name="access_url_id", type="integer", precision=0, scale=0, nullable=false, unique=false) */ private $accessUrlId; @@ -25,8 +32,6 @@ class AccessUrlRelSession * @var integer * * @ORM\Column(name="session_id", type="integer", precision=0, scale=0, nullable=false, unique=false) - * @ORM\Id - * @ORM\GeneratedValue(strategy="NONE") */ private $sessionId; diff --git a/src/ChamiloLMS/CoreBundle/Entity/AccessUrlRelUser.php b/src/ChamiloLMS/CoreBundle/Entity/AccessUrlRelUser.php index d02f95ffd9..4bbe18ebf9 100644 --- a/src/ChamiloLMS/CoreBundle/Entity/AccessUrlRelUser.php +++ b/src/ChamiloLMS/CoreBundle/Entity/AccessUrlRelUser.php @@ -15,9 +15,16 @@ class AccessUrlRelUser /** * @var integer * - * @ORM\Column(name="access_url_id", type="integer", precision=0, scale=0, nullable=false, unique=false) + * @ORM\Column(name="id", type="integer", precision=0, scale=0, nullable=false, unique=false) * @ORM\Id - * @ORM\GeneratedValue(strategy="NONE") + * @ORM\GeneratedValue(strategy="AUTO") + */ + private $id; + + /** + * @var integer + * + * @ORM\Column(name="access_url_id", type="integer", precision=0, scale=0, nullable=false, unique=false) */ private $accessUrlId; @@ -25,12 +32,9 @@ class AccessUrlRelUser * @var integer * * @ORM\Column(name="user_id", type="integer", precision=0, scale=0, nullable=false, unique=false) - * @ORM\Id - * @ORM\GeneratedValue(strategy="NONE") */ private $userId; - /** * Set accessUrlId * diff --git a/src/ChamiloLMS/CoreBundle/Entity/BranchSync.php b/src/ChamiloLMS/CoreBundle/Entity/BranchSync.php index 3221a62e49..a069139de0 100644 --- a/src/ChamiloLMS/CoreBundle/Entity/BranchSync.php +++ b/src/ChamiloLMS/CoreBundle/Entity/BranchSync.php @@ -19,7 +19,7 @@ class BranchSync * * @ORM\Column(name="id", type="integer", precision=0, scale=0, nullable=false, unique=false) * @ORM\Id - * @ORM\GeneratedValue(strategy="IDENTITY") + * @ORM\GeneratedValue(strategy="AUTO") */ private $id; diff --git a/src/ChamiloLMS/CoreBundle/Entity/CDropboxFile.php b/src/ChamiloLMS/CoreBundle/Entity/CDropboxFile.php index bd501029bb..67073365a1 100644 --- a/src/ChamiloLMS/CoreBundle/Entity/CDropboxFile.php +++ b/src/ChamiloLMS/CoreBundle/Entity/CDropboxFile.php @@ -15,21 +15,26 @@ class CDropboxFile /** * @var integer * - * @ORM\Column(name="c_id", type="integer", precision=0, scale=0, nullable=false, unique=false) + * @ORM\Column(name="iid", type="integer", precision=0, scale=0, nullable=false, unique=false) * @ORM\Id - * @ORM\GeneratedValue(strategy="NONE") + * @ORM\GeneratedValue(strategy="AUTO") */ - private $cId; + private $iid; /** * @var integer * * @ORM\Column(name="id", type="integer", precision=0, scale=0, nullable=false, unique=false) - * @ORM\Id - * @ORM\GeneratedValue(strategy="NONE") */ private $id; + /** + * @var integer + * + * @ORM\Column(name="c_id", type="integer", precision=0, scale=0, nullable=false, unique=false) + */ + private $cId; + /** * @var integer * @@ -106,8 +111,8 @@ class CDropboxFile private $file; /** - * @ORM\ManyToOne(targetEntity="User", inversedBy="dropBoxSentFiles") - * @ORM\JoinColumn(name="uploader_id", referencedColumnName="user_id") + * @ORM\ManyToOne(targetEntity="Application\Sonata\UserBundle\Entity\User", inversedBy="dropBoxSentFiles") + * @ORM\JoinColumn(name="uploader_id", referencedColumnName="id") **/ private $userSent; diff --git a/src/ChamiloLMS/CoreBundle/Entity/CDropboxPost.php b/src/ChamiloLMS/CoreBundle/Entity/CDropboxPost.php index d0d03dad7d..08cc071730 100644 --- a/src/ChamiloLMS/CoreBundle/Entity/CDropboxPost.php +++ b/src/ChamiloLMS/CoreBundle/Entity/CDropboxPost.php @@ -15,9 +15,16 @@ class CDropboxPost /** * @var integer * - * @ORM\Column(name="c_id", type="integer", precision=0, scale=0, nullable=false, unique=false) + * @ORM\Column(name="iid", type="integer", precision=0, scale=0, nullable=false, unique=false) * @ORM\Id - * @ORM\GeneratedValue(strategy="NONE") + * @ORM\GeneratedValue(strategy="AUTO") + */ + private $iid; + + /** + * @var integer + * + * @ORM\Column(name="c_id", type="integer", precision=0, scale=0, nullable=false, unique=false) */ private $cId; @@ -25,8 +32,6 @@ class CDropboxPost * @var integer * * @ORM\Column(name="file_id", type="integer", precision=0, scale=0, nullable=false, unique=false) - * @ORM\Id - * @ORM\GeneratedValue(strategy="NONE") */ private $fileId; @@ -34,8 +39,6 @@ class CDropboxPost * @var integer * * @ORM\Column(name="dest_user_id", type="integer", precision=0, scale=0, nullable=false, unique=false) - * @ORM\Id - * @ORM\GeneratedValue(strategy="NONE") */ private $destUserId; @@ -69,8 +72,8 @@ class CDropboxPost /** * - * @ORM\ManyToOne(targetEntity="User", inversedBy="dropBoxReceivedFiles") - * @ORM\JoinColumn(name="dest_user_id", referencedColumnName="user_id") + * @ORM\ManyToOne(targetEntity="Application\Sonata\UserBundle\Entity\User", inversedBy="dropBoxReceivedFiles") + * @ORM\JoinColumn(name="dest_user_id", referencedColumnName="id") **/ private $user; @@ -79,8 +82,7 @@ class CDropboxPost * @ORM\ManyToOne(targetEntity="CDropboxFile", inversedBy="file") * * @ORM\JoinColumns({ - * @ORM\JoinColumn(name="file_id", referencedColumnName="id"), - * @ORM\JoinColumn(name="c_id", referencedColumnName="c_id") + * @ORM\JoinColumn(name="file_id", referencedColumnName="iid") * }) **/ private $file; diff --git a/src/ChamiloLMS/CoreBundle/Entity/CGroupInfo.php b/src/ChamiloLMS/CoreBundle/Entity/CGroupInfo.php index a1ad42a7ac..4cc6f5462a 100644 --- a/src/ChamiloLMS/CoreBundle/Entity/CGroupInfo.php +++ b/src/ChamiloLMS/CoreBundle/Entity/CGroupInfo.php @@ -25,7 +25,7 @@ class CGroupInfo * * @ORM\Column(name="iid", type="integer", precision=0, scale=0, nullable=false, unique=false) * @ORM\Id - * @ORM\GeneratedValue(strategy="IDENTITY") + * @ORM\GeneratedValue(strategy="AUTO") */ private $iid; diff --git a/src/ChamiloLMS/CoreBundle/Entity/CItemProperty.php b/src/ChamiloLMS/CoreBundle/Entity/CItemProperty.php index c91ea2e1fc..ac7802f449 100644 --- a/src/ChamiloLMS/CoreBundle/Entity/CItemProperty.php +++ b/src/ChamiloLMS/CoreBundle/Entity/CItemProperty.php @@ -3,7 +3,7 @@ namespace ChamiloLMS\CoreBundle\Entity; use Doctrine\ORM\Mapping as ORM; - +use Application\Sonata\UserBundle\Entity\User; /** * CItemProperty @@ -25,7 +25,7 @@ class CItemProperty * * @ORM\Column(name="id", type="integer", precision=0, scale=0, nullable=false, unique=false) * @ORM\Id - * @ORM\GeneratedValue(strategy="IDENTITY") + * @ORM\GeneratedValue(strategy="AUTO") */ private $id; @@ -124,8 +124,8 @@ class CItemProperty /** * - * @ORM\ManyToOne(targetEntity="User", inversedBy="items") - * @ORM\JoinColumn(name="to_user_id", referencedColumnName="user_id") + * @ORM\ManyToOne(targetEntity="Application\Sonata\UserBundle\Entity\User", inversedBy="items") + * @ORM\JoinColumn(name="to_user_id", referencedColumnName="id") **/ private $user; diff --git a/src/ChamiloLMS/CoreBundle/Entity/CLp.php b/src/ChamiloLMS/CoreBundle/Entity/CLp.php index 403d59deb4..1730760d19 100644 --- a/src/ChamiloLMS/CoreBundle/Entity/CLp.php +++ b/src/ChamiloLMS/CoreBundle/Entity/CLp.php @@ -15,9 +15,16 @@ class CLp /** * @var integer * - * @ORM\Column(name="id", type="integer", precision=0, scale=0, nullable=false, unique=false) + * @ORM\Column(name="iid", type="integer", precision=0, scale=0, nullable=false, unique=false) * @ORM\Id - * @ORM\GeneratedValue(strategy="IDENTITY") + * @ORM\GeneratedValue(strategy="AUTO") + */ + private $iid; + + /** + * @var integer + * + * @ORM\Column(name="id", type="integer", precision=0, scale=0, nullable=false, unique=false) */ private $id; diff --git a/src/ChamiloLMS/CoreBundle/Entity/CLpCategory.php b/src/ChamiloLMS/CoreBundle/Entity/CLpCategory.php index a5857e91b3..5b963b3f91 100644 --- a/src/ChamiloLMS/CoreBundle/Entity/CLpCategory.php +++ b/src/ChamiloLMS/CoreBundle/Entity/CLpCategory.php @@ -17,7 +17,7 @@ class CLpCategory * * @ORM\Column(name="id", type="integer") * @ORM\Id - * @ORM\GeneratedValue(strategy="IDENTITY") + * @ORM\GeneratedValue(strategy="AUTO") */ private $id; diff --git a/src/ChamiloLMS/CoreBundle/Entity/CQuiz.php b/src/ChamiloLMS/CoreBundle/Entity/CQuiz.php index 68d851b2c1..b213ffc5ed 100644 --- a/src/ChamiloLMS/CoreBundle/Entity/CQuiz.php +++ b/src/ChamiloLMS/CoreBundle/Entity/CQuiz.php @@ -17,7 +17,7 @@ class CQuiz * * @ORM\Column(name="iid", type="integer", precision=0, scale=0, nullable=false, unique=false) * @ORM\Id - * @ORM\GeneratedValue(strategy="IDENTITY") + * @ORM\GeneratedValue(strategy="AUTO") */ private $iid; diff --git a/src/ChamiloLMS/CoreBundle/Entity/CQuizCategory.php b/src/ChamiloLMS/CoreBundle/Entity/CQuizCategory.php index 5be615193b..f02d77c341 100644 --- a/src/ChamiloLMS/CoreBundle/Entity/CQuizCategory.php +++ b/src/ChamiloLMS/CoreBundle/Entity/CQuizCategory.php @@ -18,9 +18,9 @@ class CQuizCategory /** * @var integer * - * @ORM\Column(name="iid", type="integer", precision=0, scale=0, nullable=false, unique=false) + * @ORM\Column(name="iid", type="bigint", precision=0, scale=0, nullable=false, unique=false) * @ORM\Id - * @ORM\GeneratedValue(strategy="IDENTITY") + * @ORM\GeneratedValue(strategy="AUTO") */ private $iid; @@ -31,7 +31,6 @@ class CQuizCategory */ private $cId; - /** * @var string * @@ -48,7 +47,7 @@ class CQuizCategory /** * - * @ORM\Column(name="parent_id", type="integer") + * @ORM\Column(name="parent_id", type="bigint", nullable=true) */ private $parentId; diff --git a/src/ChamiloLMS/CoreBundle/Entity/CQuizQuestion.php b/src/ChamiloLMS/CoreBundle/Entity/CQuizQuestion.php index dc57eff939..fa52135adc 100644 --- a/src/ChamiloLMS/CoreBundle/Entity/CQuizQuestion.php +++ b/src/ChamiloLMS/CoreBundle/Entity/CQuizQuestion.php @@ -19,7 +19,7 @@ class CQuizQuestion * * @ORM\Column(name="iid", type="integer", precision=0, scale=0, nullable=false, unique=false) * @ORM\Id - * @ORM\GeneratedValue(strategy="IDENTITY") + * @ORM\GeneratedValue(strategy="AUTO") */ private $iid; diff --git a/src/ChamiloLMS/CoreBundle/Entity/CQuizQuestionRelCategory.php b/src/ChamiloLMS/CoreBundle/Entity/CQuizQuestionRelCategory.php index b18bd1e53b..e970548183 100644 --- a/src/ChamiloLMS/CoreBundle/Entity/CQuizQuestionRelCategory.php +++ b/src/ChamiloLMS/CoreBundle/Entity/CQuizQuestionRelCategory.php @@ -17,7 +17,7 @@ class CQuizQuestionRelCategory * * @ORM\Column(name="iid", type="integer", precision=0, scale=0, nullable=false, unique=false) * @ORM\Id - * @ORM\GeneratedValue(strategy="IDENTITY") + * @ORM\GeneratedValue(strategy="AUTO") */ private $iid; @@ -25,8 +25,6 @@ class CQuizQuestionRelCategory * @var integer * * @ORM\Column(name="c_id", type="integer", precision=0, scale=0, nullable=false, unique=false) - * @ORM\Id - * @ORM\GeneratedValue(strategy="NONE") */ private $cId; @@ -34,22 +32,20 @@ class CQuizQuestionRelCategory * @var integer * * @ORM\Column(name="question_id", type="integer", precision=0, scale=0, nullable=false, unique=false) - * @ORM\Id - * @ORM\GeneratedValue(strategy="NONE") */ private $questionId; /** * @var integer * - * @ORM\Column(name="category_id", type="integer", precision=0, scale=0, nullable=false, unique=false) + * @ORM\Column(name="category_id", type="bigint", precision=0, scale=0, nullable=false, unique=false) */ private $categoryId; /** Relationships */ /** - * @ORM\ManyToOne(targetEntity="CQuizCategory") + * @ORM\ManyToOne(targetEntity="CQuizCategory", inversedBy="quizQuestionRelCategoryList") * @ORM\JoinColumn(name="category_id", referencedColumnName="iid") */ private $category; diff --git a/src/ChamiloLMS/CoreBundle/Entity/CQuizRelQuestion.php b/src/ChamiloLMS/CoreBundle/Entity/CQuizRelQuestion.php index 7375b62c2b..d3c69e7164 100644 --- a/src/ChamiloLMS/CoreBundle/Entity/CQuizRelQuestion.php +++ b/src/ChamiloLMS/CoreBundle/Entity/CQuizRelQuestion.php @@ -17,7 +17,7 @@ class CQuizRelQuestion * * @ORM\Column(name="iid", type="integer", precision=0, scale=0, nullable=false, unique=false) * @ORM\Id - * @ORM\GeneratedValue(strategy="IDENTITY") + * @ORM\GeneratedValue(strategy="AUTO") */ private $iid; @@ -25,8 +25,6 @@ class CQuizRelQuestion * @var integer * * @ORM\Column(name="c_id", type="integer", precision=0, scale=0, nullable=false, unique=false) - * @ORM\Id - * @ORM\GeneratedValue(strategy="NONE") */ private $cId; @@ -34,8 +32,6 @@ class CQuizRelQuestion * @var integer * * @ORM\Column(name="question_id", type="integer", precision=0, scale=0, nullable=false, unique=false) - * @ORM\Id - * @ORM\GeneratedValue(strategy="NONE") */ private $questionId; @@ -43,8 +39,6 @@ class CQuizRelQuestion * @var integer * * @ORM\Column(name="exercice_id", type="integer", precision=0, scale=0, nullable=false, unique=false) - * @ORM\Id - * @ORM\GeneratedValue(strategy="NONE") */ private $exerciceId; diff --git a/src/ChamiloLMS/CoreBundle/Entity/CTool.php b/src/ChamiloLMS/CoreBundle/Entity/CTool.php index e7fb17dd0d..25a29dc6d0 100644 --- a/src/ChamiloLMS/CoreBundle/Entity/CTool.php +++ b/src/ChamiloLMS/CoreBundle/Entity/CTool.php @@ -18,21 +18,26 @@ class CTool /** * @var integer * - * @ORM\Column(name="c_id", type="integer", precision=0, scale=0, nullable=false, unique=false) + * @ORM\Column(name="iid", type="integer", precision=0, scale=0, nullable=false, unique=false) * @ORM\Id - * @ORM\GeneratedValue(strategy="NONE") + * @ORM\GeneratedValue(strategy="AUTO") */ - private $cId; + private $iid; /** * @var integer * * @ORM\Column(name="id", type="integer", precision=0, scale=0, nullable=false, unique=false) - * @ORM\Id - * @ORM\GeneratedValue(strategy="NONE") */ private $id; + /** + * @var integer + * + * @ORM\Column(name="c_id", type="integer", precision=0, scale=0, nullable=false, unique=false) + */ + private $cId; + /** * @var string * diff --git a/src/ChamiloLMS/CoreBundle/Entity/CToolIntro.php b/src/ChamiloLMS/CoreBundle/Entity/CToolIntro.php index 6f8a49ed48..08bad6f046 100644 --- a/src/ChamiloLMS/CoreBundle/Entity/CToolIntro.php +++ b/src/ChamiloLMS/CoreBundle/Entity/CToolIntro.php @@ -13,29 +13,25 @@ use Doctrine\ORM\Mapping as ORM; class CToolIntro { /** - * @var integer + * @var string * - * @ORM\Column(name="c_id", type="integer", precision=0, scale=0, nullable=false, unique=false) + * @ORM\Column(name="id", type="string", length=50, precision=0, scale=0, nullable=false, unique=false) * @ORM\Id - * @ORM\GeneratedValue(strategy="NONE") + * @ORM\GeneratedValue(strategy="AUTO") */ - private $cId; + private $id; /** - * @var string + * @var integer * - * @ORM\Column(name="id", type="string", length=50, precision=0, scale=0, nullable=false, unique=false) - * @ORM\Id - * @ORM\GeneratedValue(strategy="NONE") + * @ORM\Column(name="c_id", type="integer", precision=0, scale=0, nullable=false, unique=false) */ - private $id; + private $cId; /** * @var integer * * @ORM\Column(name="session_id", type="integer", precision=0, scale=0, nullable=false, unique=false) - * @ORM\Id - * @ORM\GeneratedValue(strategy="NONE") */ private $sessionId; diff --git a/src/ChamiloLMS/CoreBundle/Entity/Comment.php b/src/ChamiloLMS/CoreBundle/Entity/Comment.php new file mode 100644 index 0000000000..c7662adf0d --- /dev/null +++ b/src/ChamiloLMS/CoreBundle/Entity/Comment.php @@ -0,0 +1,28 @@ +users = new ArrayCollection(); $this->items = new ArrayCollection(); - } + }*/ /** * @return ArrayCollection @@ -234,6 +234,16 @@ class Course return $this->users; } + /** + * Set id + * + * @return integer + */ + public function setId($id) + { + $this->id = $id; + } + /** * Get id * diff --git a/src/ChamiloLMS/CoreBundle/Entity/CourseRelUser.php b/src/ChamiloLMS/CoreBundle/Entity/CourseRelUser.php index 6fb214927e..60d7a088a6 100644 --- a/src/ChamiloLMS/CoreBundle/Entity/CourseRelUser.php +++ b/src/ChamiloLMS/CoreBundle/Entity/CourseRelUser.php @@ -7,8 +7,8 @@ use Doctrine\ORM\Mapping as ORM; /** * CourseRelUser * - * @ORM\Table(name="course_rel_user") * @ORM\Entity + * @ORM\Table(name="course_rel_user") */ class CourseRelUser { @@ -17,7 +17,7 @@ class CourseRelUser * * @ORM\Column(name="id", type="integer", precision=0, scale=0, nullable=false, unique=false) * @ORM\Id - * @ORM\GeneratedValue(strategy="IDENTITY") + * @ORM\GeneratedValue(strategy="AUTO") */ private $id; @@ -31,7 +31,7 @@ class CourseRelUser /** * @var integer * - * @ORM\Column(name="user_id", type="integer", precision=0, scale=0, nullable=false, unique=false) + * @ORM\Column(name="user_id", type="integer") */ private $userId; @@ -96,19 +96,19 @@ class CourseRelUser * * @ORM\Column(name="c_id", type="integer", precision=0, scale=0, nullable=false, unique=false) */ - private $cId; + protected $cId; /** - * @ORM\ManyToOne(targetEntity="User", inversedBy="courses") - * @ORM\JoinColumn(name="user_id", referencedColumnName="user_id") + * @ORM\ManyToOne(targetEntity="Application\Sonata\UserBundle\Entity\User", inversedBy="courses") + * @ORM\JoinColumn(name="user_id", referencedColumnName="id") */ - private $user; + protected $user; /** * @ORM\ManyToOne(targetEntity="Course", inversedBy="users") * @ORM\JoinColumn(name="c_id", referencedColumnName="id") */ - private $course; + protected $course; public function __construct(Course $course, User $user) { diff --git a/src/ChamiloLMS/CoreBundle/Entity/CurriculumCategory.php b/src/ChamiloLMS/CoreBundle/Entity/CurriculumCategory.php index 8aa8635adc..9bc6a6c1c2 100644 --- a/src/ChamiloLMS/CoreBundle/Entity/CurriculumCategory.php +++ b/src/ChamiloLMS/CoreBundle/Entity/CurriculumCategory.php @@ -20,7 +20,7 @@ class CurriculumCategory * * @ORM\Column(name="id", type="integer", precision=0, scale=0, nullable=false, unique=false) * @ORM\Id - * @ORM\GeneratedValue(strategy="IDENTITY") + * @ORM\GeneratedValue(strategy="AUTO") */ private $id; diff --git a/src/ChamiloLMS/CoreBundle/Entity/CurriculumItem.php b/src/ChamiloLMS/CoreBundle/Entity/CurriculumItem.php index b97b04ff17..d254a0c1b9 100644 --- a/src/ChamiloLMS/CoreBundle/Entity/CurriculumItem.php +++ b/src/ChamiloLMS/CoreBundle/Entity/CurriculumItem.php @@ -4,6 +4,7 @@ namespace ChamiloLMS\CoreBundle\Entity; use Doctrine\ORM\Mapping as ORM; use Doctrine\Common\Collections\ArrayCollection; +use Application\Sonata\UserBundle\Entity\User; /** * CurriculumItem @@ -18,7 +19,7 @@ class CurriculumItem * * @ORM\Column(name="id", type="integer", precision=0, scale=0, nullable=false, unique=false) * @ORM\Id - * @ORM\GeneratedValue(strategy="IDENTITY") + * @ORM\GeneratedValue(strategy="AUTO") */ private $id; diff --git a/src/ChamiloLMS/CoreBundle/Entity/CurriculumItemRelUser.php b/src/ChamiloLMS/CoreBundle/Entity/CurriculumItemRelUser.php index 91887bed66..86debf76a2 100644 --- a/src/ChamiloLMS/CoreBundle/Entity/CurriculumItemRelUser.php +++ b/src/ChamiloLMS/CoreBundle/Entity/CurriculumItemRelUser.php @@ -3,6 +3,7 @@ namespace ChamiloLMS\CoreBundle\Entity; use Doctrine\ORM\Mapping as ORM; +use Application\Sonata\UserBundle\Entity\User; /** * CurriculumItemRelUser @@ -17,7 +18,7 @@ class CurriculumItemRelUser * * @ORM\Column(name="id", type="integer", precision=0, scale=0, nullable=false, unique=false) * @ORM\Id - * @ORM\GeneratedValue(strategy="IDENTITY") + * @ORM\GeneratedValue(strategy="AUTO") */ private $id; @@ -50,8 +51,8 @@ class CurriculumItemRelUser private $description; /** - * @ORM\ManyToOne(targetEntity="User", inversedBy="curriculumItems")) - * @ORM\JoinColumn(name="user_id", referencedColumnName="user_id", nullable=true) + * @ORM\ManyToOne(targetEntity="Application\Sonata\UserBundle\Entity\User", inversedBy="curriculumItems")) + * @ORM\JoinColumn(name="user_id", referencedColumnName="id", nullable=true) */ private $user; diff --git a/src/ChamiloLMS/CoreBundle/Entity/CurriculumRelUser.php b/src/ChamiloLMS/CoreBundle/Entity/CurriculumRelUser.php index 1de87cfae1..2c6b359fca 100644 --- a/src/ChamiloLMS/CoreBundle/Entity/CurriculumRelUser.php +++ b/src/ChamiloLMS/CoreBundle/Entity/CurriculumRelUser.php @@ -17,7 +17,7 @@ class CurriculumRelUser * * @ORM\Column(name="id", type="integer", precision=0, scale=0, nullable=false, unique=false) * @ORM\Id - * @ORM\GeneratedValue(strategy="IDENTITY") + * @ORM\GeneratedValue(strategy="AUTO") */ private $id; diff --git a/src/ChamiloLMS/CoreBundle/Entity/ExtraField.php b/src/ChamiloLMS/CoreBundle/Entity/ExtraField.php index e774286d92..493545e812 100644 --- a/src/ChamiloLMS/CoreBundle/Entity/ExtraField.php +++ b/src/ChamiloLMS/CoreBundle/Entity/ExtraField.php @@ -16,7 +16,7 @@ class ExtraField * * @ORM\Column(name="id", type="integer", precision=0, scale=0, nullable=false, unique=false) * @ORM\Id - * @ORM\GeneratedValue(strategy="IDENTITY") + * @ORM\GeneratedValue(strategy="AUTO") */ private $id; diff --git a/src/ChamiloLMS/CoreBundle/Entity/ExtraFieldOptionRelFieldOption.php b/src/ChamiloLMS/CoreBundle/Entity/ExtraFieldOptionRelFieldOption.php index 0687e86dba..b5cf3bdbb5 100644 --- a/src/ChamiloLMS/CoreBundle/Entity/ExtraFieldOptionRelFieldOption.php +++ b/src/ChamiloLMS/CoreBundle/Entity/ExtraFieldOptionRelFieldOption.php @@ -17,7 +17,7 @@ class ExtraFieldOptionRelFieldOption * * @ORM\Column(name="id", type="integer", precision=0, scale=0, nullable=false, unique=false) * @ORM\Id - * @ORM\GeneratedValue(strategy="IDENTITY") + * @ORM\GeneratedValue(strategy="AUTO") */ private $id; diff --git a/src/ChamiloLMS/CoreBundle/Entity/ExtraFieldValues.php b/src/ChamiloLMS/CoreBundle/Entity/ExtraFieldValues.php index d3e9530064..87720c2341 100644 --- a/src/ChamiloLMS/CoreBundle/Entity/ExtraFieldValues.php +++ b/src/ChamiloLMS/CoreBundle/Entity/ExtraFieldValues.php @@ -17,7 +17,7 @@ class ExtraFieldValues * * @ORM\Column(name="id", type="integer", precision=0, scale=0, nullable=false, unique=false) * @ORM\Id - * @ORM\GeneratedValue(strategy="IDENTITY") + * @ORM\GeneratedValue(strategy="AUTO") */ private $id; diff --git a/src/ChamiloLMS/CoreBundle/Entity/Groups.php b/src/ChamiloLMS/CoreBundle/Entity/Groups.php index 25d5cf94af..7e67942aa6 100644 --- a/src/ChamiloLMS/CoreBundle/Entity/Groups.php +++ b/src/ChamiloLMS/CoreBundle/Entity/Groups.php @@ -17,7 +17,7 @@ class Groups * * @ORM\Column(name="id", type="integer", precision=0, scale=0, nullable=false, unique=false) * @ORM\Id - * @ORM\GeneratedValue(strategy="IDENTITY") + * @ORM\GeneratedValue(strategy="AUTO") */ private $id; diff --git a/src/ChamiloLMS/CoreBundle/Entity/Jury.php b/src/ChamiloLMS/CoreBundle/Entity/Jury.php index b971d266d8..919f1b98f8 100644 --- a/src/ChamiloLMS/CoreBundle/Entity/Jury.php +++ b/src/ChamiloLMS/CoreBundle/Entity/Jury.php @@ -18,7 +18,7 @@ class Jury * * @ORM\Column(name="id", type="integer", precision=0, scale=0, nullable=false, unique=false) * @ORM\Id - * @ORM\GeneratedValue(strategy="IDENTITY") + * @ORM\GeneratedValue(strategy="AUTO") */ private $id; diff --git a/src/ChamiloLMS/CoreBundle/Entity/JuryMembers.php b/src/ChamiloLMS/CoreBundle/Entity/JuryMembers.php index 1f56683e33..847e6d789d 100644 --- a/src/ChamiloLMS/CoreBundle/Entity/JuryMembers.php +++ b/src/ChamiloLMS/CoreBundle/Entity/JuryMembers.php @@ -4,6 +4,8 @@ namespace ChamiloLMS\CoreBundle\Entity; use Doctrine\ORM\Mapping as ORM; +use Application\Sonata\UserBundle\Entity\User; + /** * JuryMembers * @@ -17,7 +19,7 @@ class JuryMembers * * @ORM\Column(name="id", type="integer", precision=0, scale=0, nullable=false, unique=false) * @ORM\Id - * @ORM\GeneratedValue(strategy="IDENTITY") + * @ORM\GeneratedValue(strategy="AUTO") */ private $id; @@ -43,10 +45,10 @@ class JuryMembers private $juryId; /** - * @ORM\ManyToOne(targetEntity="User") - * @ORM\JoinColumn(name="user_id", referencedColumnName="user_id") + * @ORM\ManyToOne(targetEntity="ChamiloLMS\UserBundle\Entity\User", inversedBy="jury") + * @ORM\JoinColumn(name="user_id", referencedColumnName="id") */ - private $user; + //private $user; /** * @ORM\ManyToOne(targetEntity="Jury", inversedBy="members") diff --git a/src/ChamiloLMS/CoreBundle/Entity/Message.php b/src/ChamiloLMS/CoreBundle/Entity/Message.php new file mode 100644 index 0000000000..c713ec8355 --- /dev/null +++ b/src/ChamiloLMS/CoreBundle/Entity/Message.php @@ -0,0 +1,68 @@ +getSender(); + } + + public function getSentAt() + { + return $this->getTimestamp(); + } + + public function getSubject() + { + return $this->getThread()->getSubject(); + } + + public function getIdentifier() + { + return $this->getId(); + } + +} diff --git a/src/ChamiloLMS/CoreBundle/Entity/MessageMetadata.php b/src/ChamiloLMS/CoreBundle/Entity/MessageMetadata.php new file mode 100644 index 0000000000..b9ae7e4592 --- /dev/null +++ b/src/ChamiloLMS/CoreBundle/Entity/MessageMetadata.php @@ -0,0 +1,36 @@ +fieldId = $fieldId; - + return $this; } /** * Get fieldId * - * @return integer + * @return integer */ public function getFieldId() { @@ -99,14 +99,14 @@ class SessionFieldOptions public function setOptionValue($optionValue) { $this->optionValue = $optionValue; - + return $this; } /** * Get optionValue * - * @return string + * @return string */ public function getOptionValue() { @@ -122,14 +122,14 @@ class SessionFieldOptions public function setOptionDisplayText($optionDisplayText) { $this->optionDisplayText = $optionDisplayText; - + return $this; } /** * Get optionDisplayText * - * @return string + * @return string */ public function getOptionDisplayText() { @@ -145,14 +145,14 @@ class SessionFieldOptions public function setOptionOrder($optionOrder) { $this->optionOrder = $optionOrder; - + return $this; } /** * Get optionOrder * - * @return integer + * @return integer */ public function getOptionOrder() { @@ -168,14 +168,14 @@ class SessionFieldOptions public function setTms($tms) { $this->tms = $tms; - + return $this; } /** * Get tms * - * @return \DateTime + * @return \DateTime */ public function getTms() { diff --git a/src/ChamiloLMS/CoreBundle/Entity/Repository/CourseRepository.php b/src/ChamiloLMS/CoreBundle/Entity/Repository/CourseRepository.php index cf3b88d034..d1f4bc0586 100644 --- a/src/ChamiloLMS/CoreBundle/Entity/Repository/CourseRepository.php +++ b/src/ChamiloLMS/CoreBundle/Entity/Repository/CourseRepository.php @@ -25,7 +25,7 @@ class CourseRepository extends EntityRepository $queryBuilder->select('DISTINCT u'); // Loading EntityUser. - $queryBuilder->from('ChamiloLMS\CoreBundle\Entity\User', 'u'); + $queryBuilder->from('Application\Sonata\UserBundle\Entity\User', 'u'); // Selecting courses for users. $queryBuilder->innerJoin('u.courses', 'c'); diff --git a/src/ChamiloLMS/CoreBundle/Entity/Repository/CurriculumItemRelUserRepository.php b/src/ChamiloLMS/CoreBundle/Entity/Repository/CurriculumItemRelUserRepository.php index 289b891e94..e8b79c834d 100644 --- a/src/ChamiloLMS/CoreBundle/Entity/Repository/CurriculumItemRelUserRepository.php +++ b/src/ChamiloLMS/CoreBundle/Entity/Repository/CurriculumItemRelUserRepository.php @@ -17,7 +17,7 @@ class CurriculumItemRelUserRepository extends EntityRepository * @param \ChamiloLMS\CoreBundle\Entity\CurriculumItem $course * @return bool */ - public function isAllowToInsert(\ChamiloLMS\CoreBundle\Entity\CurriculumItem $item, \ChamiloLMS\CoreBundle\Entity\User $user) + public function isAllowToInsert(\ChamiloLMS\CoreBundle\Entity\CurriculumItem $item, \ChamiloLMS\UserBundle\Entity\User $user) { $max = $item->getMaxRepeat(); $count = $this->createQueryBuilder('a') diff --git a/src/ChamiloLMS/CoreBundle/Entity/Repository/ItemPropertyRepository.php b/src/ChamiloLMS/CoreBundle/Entity/Repository/ItemPropertyRepository.php index fc4b6c34bd..87edd2df91 100644 --- a/src/ChamiloLMS/CoreBundle/Entity/Repository/ItemPropertyRepository.php +++ b/src/ChamiloLMS/CoreBundle/Entity/Repository/ItemPropertyRepository.php @@ -204,7 +204,7 @@ class ItemPropertyRepository extends EntityRepository public function subscribeUsersToItem($tool, Course $course, Session $session = null, $itemId, $newUserList = array()) { $em = $this->getEntityManager(); - $user = $em->getRepository('ChamiloLMS\CoreBundle\Entity\User'); + $user = $em->getRepository('Application\Sonata\UserBundle\Entity\User'); $usersSubscribedToItem = $this->getUsersSubscribedToItem($tool, $itemId, $course, $session); diff --git a/src/ChamiloLMS/CoreBundle/Entity/Repository/UserRepository.php b/src/ChamiloLMS/CoreBundle/Entity/Repository/UserRepository.php index a082bf8d26..5655cc4d11 100644 --- a/src/ChamiloLMS/CoreBundle/Entity/Repository/UserRepository.php +++ b/src/ChamiloLMS/CoreBundle/Entity/Repository/UserRepository.php @@ -3,18 +3,16 @@ namespace ChamiloLMS\CoreBundle\Entity\Repository; use Doctrine\ORM\EntityRepository; -use Symfony\Component\Security\Core\User\UserInterface; -use Symfony\Component\Security\Core\User\UserProviderInterface; use Doctrine\ORM\NoResultException; use Symfony\Component\Security\Core\Exception\UsernameNotFoundException; use Symfony\Component\Security\Core\Exception\UnsupportedUserException; -use ChamiloLMS\CoreBundle\Entity\User; +use ChamiloLMS\UserBundle\Entity\User; /** * Class UserRepository * @package Entity\Repository */ -class UserRepository extends EntityRepository implements UserProviderInterface +class UserRepository extends EntityRepository { /** * @param string $keyword @@ -27,7 +25,7 @@ class UserRepository extends EntityRepository implements UserProviderInterface // Selecting user info $qb->select('DISTINCT b'); - $qb->from('ChamiloLMS\CoreBundle\Entity\User', 'b'); + $qb->from('Application\Sonata\UserBundle\Entity\User', 'b'); // Selecting courses for users //$qb->innerJoin('u.courses', 'c'); @@ -46,7 +44,7 @@ class UserRepository extends EntityRepository implements UserProviderInterface * @return User * @throws UsernameNotFoundException */ - public function loadUserByUsername($username) + /*public function loadUserByUsername($username) { $query = $this ->createQueryBuilder('u') @@ -66,7 +64,7 @@ class UserRepository extends EntityRepository implements UserProviderInterface ); } return $user; - } + }*/ /** * Refreshes the user for the account interface. @@ -80,7 +78,7 @@ class UserRepository extends EntityRepository implements UserProviderInterface * * @return UserInterface */ - public function refreshUser(UserInterface $user) + /*public function refreshUser(UserInterface $user) { //return $user; $class = get_class($user); @@ -88,16 +86,16 @@ class UserRepository extends EntityRepository implements UserProviderInterface throw new UnsupportedUserException(sprintf('Instances of "%s" are not supported.', $class)); } return $this->loadUserByUsername($user->getUsername()); - } + }*/ /** * @param string $class * @return bool */ - public function supportsClass($class) + /*public function supportsClass($class) { return $this->getEntityName() === $class || is_subclass_of($class, $this->getEntityName()); - } + }*/ /** * Get course user relationship based in the course_rel_user table. @@ -111,7 +109,7 @@ class UserRepository extends EntityRepository implements UserProviderInterface $queryBuilder->select('c'); // Loading User. - //$qb->from('ChamiloLMS\CoreBundle\Entity\User', 'u'); + //$qb->from('ChamiloLMS\UserBundle\Entity\User', 'u'); // Selecting course $queryBuilder->innerJoin('ChamiloLMS\CoreBundle\Entity\Course', 'c'); diff --git a/src/ChamiloLMS/CoreBundle/Entity/Role.php b/src/ChamiloLMS/CoreBundle/Entity/Role.php index 8ecdcbf5f5..f2c9693546 100644 --- a/src/ChamiloLMS/CoreBundle/Entity/Role.php +++ b/src/ChamiloLMS/CoreBundle/Entity/Role.php @@ -30,9 +30,9 @@ class Role extends SymfonyRole implements \Serializable private $role; /** - * @ORM\ManyToMany(targetEntity="User", mappedBy="roles") + * @ORM\ManyToMany(targetEntity="Application\Sonata\UserBundle\Entity\User", mappedBy="roles") * @ORM\JoinTable(name="users_roles", - * joinColumns={@ORM\JoinColumn(name="user_id", referencedColumnName="user_id")}) + * joinColumns={@ORM\JoinColumn(name="user_id", referencedColumnName="id")}) */ private $users; @@ -46,6 +46,15 @@ class Role extends SymfonyRole implements \Serializable $this->users = new ArrayCollection(); } + /** + * Return the role field. + * @return string + */ + public function __toString() + { + return (string) $this->role; + } + /** * @see RoleInterface */ diff --git a/src/ChamiloLMS/CoreBundle/Entity/Session.php b/src/ChamiloLMS/CoreBundle/Entity/Session.php index 29692998e2..0adee10c63 100644 --- a/src/ChamiloLMS/CoreBundle/Entity/Session.php +++ b/src/ChamiloLMS/CoreBundle/Entity/Session.php @@ -18,7 +18,7 @@ class Session * * @ORM\Column(name="id", type="integer", precision=0, scale=0, nullable=false, unique=false) * @ORM\Id - * @ORM\GeneratedValue(strategy="IDENTITY") + * @ORM\GeneratedValue(strategy="AUTO") */ private $id; @@ -39,7 +39,7 @@ class Session /** * @var integer * - * @ORM\Column(name="nbr_courses", type="smallint", precision=0, scale=0, nullable=false, unique=false) + * @ORM\Column(name="nbr_courses", type="smallint", precision=0, scale=0, nullable=true, unique=false) */ private $nbrCourses; @@ -53,14 +53,14 @@ class Session /** * @var integer * - * @ORM\Column(name="nbr_classes", type="integer", precision=0, scale=0, nullable=false, unique=false) + * @ORM\Column(name="nbr_classes", type="integer", precision=0, scale=0, nullable=true, unique=false) */ private $nbrClasses; /** * @var integer * - * @ORM\Column(name="session_admin_id", type="integer", precision=0, scale=0, nullable=false, unique=false) + * @ORM\Column(name="session_admin_id", type="integer", precision=0, scale=0, nullable=true, unique=false) */ private $sessionAdminId; @@ -132,6 +132,12 @@ class Session **/ private $items; + /** + * @ORM\ManyToOne(targetEntity="Application\Sonata\UserBundle\Entity\User", inversedBy="sessionAsGeneralCoach") + * @ORM\JoinColumn(name="id_coach", referencedColumnName="id") + **/ + private $generalCoach; + /** * */ @@ -150,6 +156,11 @@ class Session return $this->id; } + public function setId($id) + { + $this->id = $id; + } + /** * Set idCoach * @@ -494,4 +505,19 @@ class Session { return $this->coachAccessEndDate; } + + /** + * Get id + * + * @return integer + */ + public function getGeneralCoach() + { + return $this->generalCoach; + } + + public function setGeneralCoach($coach) + { + $this->generalCoach = $coach; + } } diff --git a/src/ChamiloLMS/CoreBundle/Entity/SessionPath.php b/src/ChamiloLMS/CoreBundle/Entity/SessionPath.php index 38e8e50ecb..24a5608f32 100644 --- a/src/ChamiloLMS/CoreBundle/Entity/SessionPath.php +++ b/src/ChamiloLMS/CoreBundle/Entity/SessionPath.php @@ -15,9 +15,9 @@ class SessionPath /** * @var integer * - * @ORM\Column(name="id", type="integer", precision=0, scale=0, nullable=false, unique=false) + * @ORM\Column(name="id", type="integer") * @ORM\Id - * @ORM\GeneratedValue(strategy="IDENTITY") + * @ORM\GeneratedValue(strategy="AUTO") */ private $id; diff --git a/src/ChamiloLMS/CoreBundle/Entity/SessionTree.php b/src/ChamiloLMS/CoreBundle/Entity/SessionTree.php index 6bf2887b8d..1e2d8324fd 100644 --- a/src/ChamiloLMS/CoreBundle/Entity/SessionTree.php +++ b/src/ChamiloLMS/CoreBundle/Entity/SessionTree.php @@ -19,7 +19,7 @@ class SessionTree * * @ORM\Column(name="id", type="integer", precision=0, scale=0, nullable=false, unique=false) * @ORM\Id - * @ORM\GeneratedValue(strategy="IDENTITY") + * @ORM\GeneratedValue(strategy="AUTO") */ private $id; @@ -47,7 +47,7 @@ class SessionTree /** * @var integer * - * @ORM\Column(name="tool_id", type="integer", precision=0, scale=0, nullable=true, unique=false) + * @ORM\Column(name="tool_id", type="integer") */ private $toolId; diff --git a/src/ChamiloLMS/CoreBundle/Entity/SystemTemplate.php b/src/ChamiloLMS/CoreBundle/Entity/SystemTemplate.php index cd8b38732e..0bfebb93f0 100644 --- a/src/ChamiloLMS/CoreBundle/Entity/SystemTemplate.php +++ b/src/ChamiloLMS/CoreBundle/Entity/SystemTemplate.php @@ -17,7 +17,7 @@ class SystemTemplate * * @ORM\Column(name="id", type="integer", precision=0, scale=0, nullable=false, unique=false) * @ORM\Id - * @ORM\GeneratedValue(strategy="IDENTITY") + * @ORM\GeneratedValue(strategy="AUTO") */ private $id; diff --git a/src/ChamiloLMS/CoreBundle/Entity/Thread.php b/src/ChamiloLMS/CoreBundle/Entity/Thread.php new file mode 100644 index 0000000000..b53a8d73aa --- /dev/null +++ b/src/ChamiloLMS/CoreBundle/Entity/Thread.php @@ -0,0 +1,44 @@ +salt = sha1(uniqid(null, true)); - $this->isActive = true; - $this->registrationDate = new \DateTime(); - - $this->courses = new ArrayCollection(); - $this->items = new ArrayCollection(); - $this->classes = new ArrayCollection(); - $this->roles = new ArrayCollection(); - $this->curriculumItems = new ArrayCollection(); - $this->portals = new ArrayCollection(); - $this->dropBoxSentFiles = new ArrayCollection(); - $this->dropBoxReceivedFiles = new ArrayCollection(); - } - - /** - * @return ArrayCollection - */ - public function getDropBoxSentFiles() - { - return $this->dropBoxSentFiles; - } - - /** - * @return ArrayCollection - */ - public function getDropBoxReceivedFiles() - { - return $this->dropBoxReceivedFiles; - } - - /** - * @return ArrayCollection - */ - public function getCourses() - { - return $this->courses; - } - - public static function getPasswordConstraints() - { - return - array( - new Assert\Length(array('min' => 5)), - // Alpha numeric + "_" or "-" - new Assert\Regex(array( - 'pattern' => '/^[a-z\-_0-9]+$/i', - 'htmlPattern' => '/^[a-z\-_0-9]+$/i') - ), - // Min 3 letters - not needed - /*new Assert\Regex(array( - 'pattern' => '/[a-z]{3}/i', - 'htmlPattern' => '/[a-z]{3}/i') - ),*/ - // Min 2 numbers - new Assert\Regex(array( - 'pattern' => '/[0-9]{2}/', - 'htmlPattern' => '/[0-9]{2}/') - ) - ) - ; - } - - /** - * @param ClassMetadata $metadata - */ - public static function loadValidatorMetadata(ClassMetadata $metadata) - { - $metadata->addPropertyConstraint('firstname', new Assert\NotBlank()); - $metadata->addPropertyConstraint('lastname', new Assert\NotBlank()); - $metadata->addPropertyConstraint('email', new Assert\Email()); - - $metadata->addPropertyConstraint('password', - new Assert\Collection(self::getPasswordConstraints()) - ); - - $metadata->addConstraint(new UniqueEntity(array( - 'fields' => 'username', - 'message' => 'This value is already used.', - ))); - - $metadata->addPropertyConstraint( - 'username', - new Assert\Length(array( - 'min' => 2, - 'max' => 50, - 'minMessage' => 'This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more.', - 'maxMessage' => 'This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less.', - )) - ); - } - - /** - * @inheritDoc - */ - public function isEqualTo(UserInterface $user) - { - if (!$user instanceof User) { - return false; - } - - if ($this->password !== $user->getPassword()) { - return false; - } - - if ($this->getSalt() !== $user->getSalt()) { - return false; - } - - if ($this->username !== $user->getUsername()) { - return false; - } - - return true; - } - - /** - * @return ArrayCollection - */ - public function getPortals() - { - return $this->portals; - } - - /** - * @param $portal - */ - public function setPortal($portal) - { - $this->portals->add($portal); - } - - /** - * @return ArrayCollection - */ - public function getCurriculumItems() - { - return $this->curriculumItems; - } - - /** - * @param $items - */ - public function setCurriculumItems($items) - { - $this->curriculumItems = $items; - } - - /** - * @return bool - */ - public function getIsActive() - { - return $this->active == 1; - } - - /** - * @inheritDoc - */ - public function isAccountNonExpired() - { - return true; - /*$now = new \DateTime(); - return $this->getExpirationDate() < $now;*/ - } - - /** - * @inheritDoc - */ - public function isAccountNonLocked() - { - return true; - } - - /** - * @inheritDoc - */ - public function isCredentialsNonExpired() - { - return true; - } - - /** - * @inheritDoc - */ - public function isEnabled() - { - return $this->getActive() == 1; - } - - /** - * @inheritDoc - */ - public function eraseCredentials() - { - } - - /** - * This function is needed in order to pass roles to the security component - * @inheritDoc - */ - public function getRoles() - { - $roles = $this->roles->toArray(); - $courses = $this->getCourses(); - if (!empty($courses)) { - /** @var CourseRelUser $course */ - foreach ($courses as $course) { - $roles[] = new Auth\Role($this, $course->getStatus(), $course->getCId()); - } - } - return $roles; - } - - /** - * @param $role - * @return $this - */ - public function setRoles($role) - { - $this->roles->add($role); - - return $this; - } - - /** - * @param string $role - * @return bool - */ - public function hasRole($role) - { - if (in_array($role, $this->getRoles())) { - return true; - } - return false; - } - - /** - * @see https://github.com/symfony/symfony/issues/3691 - * @see \Serializable::serialize() - */ - public function serialize() - { - /* - * ! Don't serialize $roles field ! - */ - return \serialize( - array( - $this->userId, - $this->username, - $this->email, - $this->salt, - $this->password, - $this->isActive - ) - ); - } - - /** - * @see \Serializable::unserialize() - */ - public function unserialize($serialized) - { - list ( - $this->userId, - $this->username, - $this->email, - $this->salt, - $this->password, - $this->isActive - ) = \unserialize($serialized); - } - - /** - * - * @return ArrayCollection - */ - public function getRolesObj() - { - return $this->roles; - } - - /** - * Set salt - * - * @param string $salt - * - * @return User - */ - public function setSalt($salt) - { - $this->salt = $salt; - - return $this; - } - - /** - * Get salt - * - * @return string - */ - public function getSalt() - { - return $this->salt; - } - - /** - * @return ArrayCollection - */ - public function getClasses() - { - return $this->classes; - } - - /** - * - */ - public function getLps() - { - //return $this->lps; - /*$criteria = Criteria::create() - ->where(Criteria::expr()->eq("id", "666")) - //->orderBy(array("username" => "ASC")) - //->setFirstResult(0) - //->setMaxResults(20) - ; - $lps = $this->lps->matching($criteria);*/ - /*return $this->lps->filter( - function($entry) use ($idsToFilter) { - return $entry->getId() == 1; - });*/ - } - - /** - * @return string - */ - public function getCompleteName() - { - return $this->lastname .', '. $this->firstname; - } - - /** - * Returns the list of classes for the user - * @return string - */ - public function getCompleteNameWithClasses() - { - $classSubscription = $this->getClasses(); - $classList = array(); - foreach ($classSubscription as $subscription) { - $class = $subscription->getClass(); - $classList[] = $class->getName(); - } - $classString = !empty($classList) ? ' ['.implode(', ', $classList).']' : null; - - return $this->getCompleteName().$classString; - } - - /** - * Get userId - * - * @return integer - */ - public function getUserId() - { - return $this->userId; - } - - /** - * Set lastname - * - * @param string $lastname - * - * @return User - */ - public function setLastname($lastname) - { - $this->lastname = $lastname; - - return $this; - } - - /** - * Get lastname - * - * @return string - */ - public function getLastname() - { - return $this->lastname; - } - - /** - * Set firstname - * - * @param string $firstname - * - * @return User - */ - public function setFirstname($firstname) - { - $this->firstname = $firstname; - - return $this; - } - - /** - * Get firstname - * - * @return string - */ - public function getFirstname() - { - return $this->firstname; - } - - /** - * Set username - * - * @param string $username - * @return User - */ - public function setUsername($username) - { - $this->username = $username; - - return $this; - } - - /** - * Get username - * - * @return string - */ - public function getUsername() - { - return $this->username; - } - - /** - * Set password - * - * @param string $password - * @return User - */ - public function setPassword($password) - { - $this->password = $password; - - return $this; - } - - /** - * Get password - * - * @return string - */ - public function getPassword() - { - return $this->password; - } - - /** - * Set authSource - * - * @param string $authSource - * @return User - */ - public function setAuthSource($authSource) - { - $this->authSource = $authSource; - - return $this; - } - - /** - * Get authSource - * - * @return string - */ - public function getAuthSource() - { - return $this->authSource; - } - - /** - * Set email - * - * @param string $email - * @return User - */ - public function setEmail($email) - { - $this->email = $email; - - return $this; - } - - /** - * Get email - * - * @return string - */ - public function getEmail() - { - return $this->email; - } - - /** - * Set status - * - * @param boolean $status - * @return User - */ - public function setStatus($status) - { - $this->status = $status; - - return $this; - } - - /** - * Get status - * - * @return boolean - */ - public function getStatus() - { - return $this->status; - } - - /** - * Set officialCode - * - * @param string $officialCode - * @return User - */ - public function setOfficialCode($officialCode) - { - $this->officialCode = $officialCode; - - return $this; - } - - /** - * Get officialCode - * - * @return string - */ - public function getOfficialCode() - { - return $this->officialCode; - } - - /** - * Set phone - * - * @param string $phone - * @return User - */ - public function setPhone($phone) - { - $this->phone = $phone; - - return $this; - } - - /** - * Get phone - * - * @return string - */ - public function getPhone() - { - return $this->phone; - } - - /** - * Set pictureUri - * - * @param string $pictureUri - * @return User - */ - public function setPictureUri($pictureUri) - { - $this->pictureUri = $pictureUri; - - return $this; - } - - /** - * Get pictureUri - * - * @return string - */ - public function getPictureUri() - { - return $this->pictureUri; - } - - /** - * Set creatorId - * - * @param integer $creatorId - * @return User - */ - public function setCreatorId($creatorId) - { - $this->creatorId = $creatorId; - - return $this; - } - - /** - * Get creatorId - * - * @return integer - */ - public function getCreatorId() - { - return $this->creatorId; - } - - /** - * Set competences - * - * @param string $competences - * @return User - */ - public function setCompetences($competences) - { - $this->competences = $competences; - - return $this; - } - - /** - * Get competences - * - * @return string - */ - public function getCompetences() - { - return $this->competences; - } - - /** - * Set diplomas - * - * @param string $diplomas - * @return User - */ - public function setDiplomas($diplomas) - { - $this->diplomas = $diplomas; - - return $this; - } - - /** - * Get diplomas - * - * @return string - */ - public function getDiplomas() - { - return $this->diplomas; - } - - /** - * Set openarea - * - * @param string $openarea - * @return User - */ - public function setOpenarea($openarea) - { - $this->openarea = $openarea; - - return $this; - } - - /** - * Get openarea - * - * @return string - */ - public function getOpenarea() - { - return $this->openarea; - } - - /** - * Set teach - * - * @param string $teach - * @return User - */ - public function setTeach($teach) - { - $this->teach = $teach; - - return $this; - } - - /** - * Get teach - * - * @return string - */ - public function getTeach() - { - return $this->teach; - } - - /** - * Set productions - * - * @param string $productions - * @return User - */ - public function setProductions($productions) - { - $this->productions = $productions; - - return $this; - } - - /** - * Get productions - * - * @return string - */ - public function getProductions() - { - return $this->productions; - } - - /** - * Set chatcallUserId - * - * @param integer $chatcallUserId - * @return User - */ - public function setChatcallUserId($chatcallUserId) - { - $this->chatcallUserId = $chatcallUserId; - - return $this; - } - - /** - * Get chatcallUserId - * - * @return integer - */ - public function getChatcallUserId() - { - return $this->chatcallUserId; - } - - /** - * Set chatcallDate - * - * @param \DateTime $chatcallDate - * @return User - */ - public function setChatcallDate($chatcallDate) - { - $this->chatcallDate = $chatcallDate; - - return $this; - } - - /** - * Get chatcallDate - * - * @return \DateTime - */ - public function getChatcallDate() - { - return $this->chatcallDate; - } - - /** - * Set chatcallText - * - * @param string $chatcallText - * @return User - */ - public function setChatcallText($chatcallText) - { - $this->chatcallText = $chatcallText; - - return $this; - } - - /** - * Get chatcallText - * - * @return string - */ - public function getChatcallText() - { - return $this->chatcallText; - } - - /** - * Set language - * - * @param string $language - * @return User - */ - public function setLanguage($language) - { - $this->language = $language; - - return $this; - } - - /** - * Get language - * - * @return string - */ - public function getLanguage() - { - return $this->language; - } - - /** - * Set registrationDate - * - * @param \DateTime $registrationDate - * @return User - */ - public function setRegistrationDate($registrationDate) - { - $this->registrationDate = $registrationDate; - - return $this; - } - - /** - * Get registrationDate - * - * @return \DateTime - */ - public function getRegistrationDate() - { - return $this->registrationDate; - } - - /** - * Set expirationDate - * - * @param \DateTime $expirationDate - * @return User - */ - public function setExpirationDate($expirationDate) - { - $this->expirationDate = $expirationDate; - - return $this; - } - - /** - * Get expirationDate - * - * @return \DateTime - */ - public function getExpirationDate() - { - return $this->expirationDate; - } - - /** - * Set active - * - * @param boolean $active - * @return User - */ - public function setActive($active) - { - $this->active = $active; - - return $this; - } - - /** - * Get active - * - * @return boolean - */ - public function getActive() - { - return $this->active; - } - - /** - * Set openid - * - * @param string $openid - * @return User - */ - public function setOpenid($openid) - { - $this->openid = $openid; - - return $this; - } - - /** - * Get openid - * - * @return string - */ - public function getOpenid() - { - return $this->openid; - } - - /** - * Set theme - * - * @param string $theme - * @return User - */ - public function setTheme($theme) - { - $this->theme = $theme; - - return $this; - } - - /** - * Get theme - * - * @return string - */ - public function getTheme() - { - return $this->theme; - } - - /** - * Set hrDeptId - * - * @param integer $hrDeptId - * @return User - */ - public function setHrDeptId($hrDeptId) - { - $this->hrDeptId = $hrDeptId; - - return $this; - } - - /** - * Get hrDeptId - * - * @return integer - */ - public function getHrDeptId() - { - return $this->hrDeptId; - } - -} diff --git a/src/ChamiloLMS/CoreBundle/Entity/UserCourseSessionGroup.php b/src/ChamiloLMS/CoreBundle/Entity/UserCourseSessionGroup.php index 95e26b2dcb..cf978ca0e4 100644 --- a/src/ChamiloLMS/CoreBundle/Entity/UserCourseSessionGroup.php +++ b/src/ChamiloLMS/CoreBundle/Entity/UserCourseSessionGroup.php @@ -17,8 +17,8 @@ class UserCourseSessionGroup private $course; /** - * @ORM\@ManyToOne(targetEntity="User", inversedBy="userCourseSessionGroup") - * @ORM\JoinColumn(name="user_id", referencedColumnName="user_id", nullable=false) + * @ORM\@ManyToOne(targetEntity="Application\Sonata\UserBundle\Entity\User", inversedBy="userCourseSessionGroup") + * @ORM\JoinColumn(name="user_id", referencedColumnName="id", nullable=false) */ private $user; diff --git a/src/ChamiloLMS/CoreBundle/Entity/UserSessionPath.php b/src/ChamiloLMS/CoreBundle/Entity/UserSessionPath.php index bdaa54979c..4783784bd0 100644 --- a/src/ChamiloLMS/CoreBundle/Entity/UserSessionPath.php +++ b/src/ChamiloLMS/CoreBundle/Entity/UserSessionPath.php @@ -17,7 +17,7 @@ class UserSessionPath * * @ORM\Column(name="id", type="integer", precision=0, scale=0, nullable=false, unique=false) * @ORM\Id - * @ORM\GeneratedValue(strategy="IDENTITY") + * @ORM\GeneratedValue(strategy="AUTO") */ private $id; diff --git a/src/ChamiloLMS/CoreBundle/Entity/Usergroup.php b/src/ChamiloLMS/CoreBundle/Entity/Usergroup.php index 29c0b7d3b2..84083e8a65 100644 --- a/src/ChamiloLMS/CoreBundle/Entity/Usergroup.php +++ b/src/ChamiloLMS/CoreBundle/Entity/Usergroup.php @@ -19,7 +19,7 @@ class Usergroup * * @ORM\Column(name="id", type="integer", precision=0, scale=0, nullable=false, unique=false) * @ORM\Id - * @ORM\GeneratedValue(strategy="IDENTITY") + * @ORM\GeneratedValue(strategy="AUTO") */ private $id; diff --git a/src/ChamiloLMS/CoreBundle/Entity/UsergroupRelUser.php b/src/ChamiloLMS/CoreBundle/Entity/UsergroupRelUser.php index e9c21a53e9..afd09dc8ea 100644 --- a/src/ChamiloLMS/CoreBundle/Entity/UsergroupRelUser.php +++ b/src/ChamiloLMS/CoreBundle/Entity/UsergroupRelUser.php @@ -18,7 +18,7 @@ class UsergroupRelUser * * @ORM\Column(name="id", type="integer", precision=0, scale=0, nullable=false, unique=false) * @ORM\Id - * @ORM\GeneratedValue(strategy="IDENTITY") + * @ORM\GeneratedValue(strategy="AUTO") */ private $id; @@ -38,8 +38,8 @@ class UsergroupRelUser /** * - * @ORM\ManyToOne(targetEntity="User", inversedBy="classes") - * @ORM\JoinColumn(name="user_id", referencedColumnName="user_id") + * @ORM\ManyToOne(targetEntity="Application\Sonata\UserBundle\Entity\User", inversedBy="classes") + * @ORM\JoinColumn(name="user_id", referencedColumnName="id") **/ private $user;