Adding new Sonata Bundles + updating entities.

1.10.x
Julio Montoya 12 years ago
parent 2c710512cb
commit d960d4264b
  1. 21
      src/Application/Sonata/AdminBundle/ApplicationSonataAdminBundle.php
  2. 21
      src/Application/Sonata/NewsBundle/ApplicationSonataNewsBundle.php
  3. 41
      src/Application/Sonata/NewsBundle/Document/Comment.php
  4. 41
      src/Application/Sonata/NewsBundle/Document/Post.php
  5. 26
      src/Application/Sonata/NewsBundle/Document/PostRepository.php
  6. 40
      src/Application/Sonata/NewsBundle/Entity/Comment.php
  7. 40
      src/Application/Sonata/NewsBundle/Entity/Post.php
  8. 28
      src/Application/Sonata/NewsBundle/Entity/PostRepository.php
  9. 21
      src/Application/Sonata/NewsBundle/Resources/config/doctrine/Comment.orm.xml
  10. 21
      src/Application/Sonata/NewsBundle/Resources/config/doctrine/Post.orm.xml
  11. 8
      src/Application/Sonata/NewsBundle/Resources/config/serializer/Entity.Comment.xml
  12. 8
      src/Application/Sonata/NewsBundle/Resources/config/serializer/Entity.Post.xml
  13. 21
      src/Application/Sonata/PageBundle/Resources/config/doctrine/Block.orm.xml
  14. 21
      src/Application/Sonata/PageBundle/Resources/config/doctrine/Page.orm.xml
  15. 21
      src/Application/Sonata/PageBundle/Resources/config/doctrine/Site.orm.xml
  16. 21
      src/Application/Sonata/PageBundle/Resources/config/doctrine/Snapshot.orm.xml
  17. 8
      src/Application/Sonata/PageBundle/Resources/config/serializer/Entity.Block.xml
  18. 8
      src/Application/Sonata/PageBundle/Resources/config/serializer/Entity.Page.xml
  19. 8
      src/Application/Sonata/PageBundle/Resources/config/serializer/Entity.Site.xml
  20. 8
      src/Application/Sonata/PageBundle/Resources/config/serializer/Entity.Snapshot.xml
  21. 24
      src/Application/Sonata/PageBundle/Resources/views/default_2columns_layout.html.twig
  22. 24
      src/Application/Sonata/PageBundle/Resources/views/default_layout.html.twig
  23. 32
      src/Application/Sonata/SeoBundle/ApplicationSonataSeoBundle.php
  24. 21
      src/Application/Sonata/SeoBundle/Resources/views/Block/breadcrumb.html.twig
  25. 29
      src/Application/Sonata/UserBundle/Resources/config/validation.xml
  26. 18
      src/Application/Sonata/UserBundle/Resources/config/validation/orm.xml
  27. 90
      src/Application/Sonata/UserBundle/Resources/views/Security/base_login.html.twig
  28. 1
      src/Application/Sonata/UserBundle/Resources/views/Security/login.html.twig
  29. 4
      src/Application/Sonata/UserBundle/Resources/views/layout.html.twig
  30. 24
      src/Application/Sonata/UserBundle/Security/Encoder.php
  31. 2
      src/ChamiloLMS/CoreBundle/Entity/AccessUrl.php
  32. 2
      src/ChamiloLMS/CoreBundle/Entity/AccessUrlRelCourse.php
  33. 13
      src/ChamiloLMS/CoreBundle/Entity/AccessUrlRelSession.php
  34. 14
      src/ChamiloLMS/CoreBundle/Entity/AccessUrlRelUser.php
  35. 2
      src/ChamiloLMS/CoreBundle/Entity/BranchSync.php
  36. 19
      src/ChamiloLMS/CoreBundle/Entity/CDropboxFile.php
  37. 22
      src/ChamiloLMS/CoreBundle/Entity/CDropboxPost.php
  38. 2
      src/ChamiloLMS/CoreBundle/Entity/CGroupInfo.php
  39. 8
      src/ChamiloLMS/CoreBundle/Entity/CItemProperty.php
  40. 11
      src/ChamiloLMS/CoreBundle/Entity/CLp.php
  41. 2
      src/ChamiloLMS/CoreBundle/Entity/CLpCategory.php
  42. 2
      src/ChamiloLMS/CoreBundle/Entity/CQuiz.php
  43. 7
      src/ChamiloLMS/CoreBundle/Entity/CQuizCategory.php
  44. 2
      src/ChamiloLMS/CoreBundle/Entity/CQuizQuestion.php
  45. 10
      src/ChamiloLMS/CoreBundle/Entity/CQuizQuestionRelCategory.php
  46. 8
      src/ChamiloLMS/CoreBundle/Entity/CQuizRelQuestion.php
  47. 15
      src/ChamiloLMS/CoreBundle/Entity/CTool.php
  48. 18
      src/ChamiloLMS/CoreBundle/Entity/CToolIntro.php
  49. 28
      src/ChamiloLMS/CoreBundle/Entity/Comment.php
  50. 28
      src/ChamiloLMS/CoreBundle/Entity/Course.php
  51. 16
      src/ChamiloLMS/CoreBundle/Entity/CourseRelUser.php
  52. 2
      src/ChamiloLMS/CoreBundle/Entity/CurriculumCategory.php
  53. 3
      src/ChamiloLMS/CoreBundle/Entity/CurriculumItem.php
  54. 7
      src/ChamiloLMS/CoreBundle/Entity/CurriculumItemRelUser.php
  55. 2
      src/ChamiloLMS/CoreBundle/Entity/CurriculumRelUser.php
  56. 2
      src/ChamiloLMS/CoreBundle/Entity/ExtraField.php
  57. 2
      src/ChamiloLMS/CoreBundle/Entity/ExtraFieldOptionRelFieldOption.php
  58. 2
      src/ChamiloLMS/CoreBundle/Entity/ExtraFieldValues.php
  59. 2
      src/ChamiloLMS/CoreBundle/Entity/Groups.php
  60. 2
      src/ChamiloLMS/CoreBundle/Entity/Jury.php
  61. 10
      src/ChamiloLMS/CoreBundle/Entity/JuryMembers.php
  62. 68
      src/ChamiloLMS/CoreBundle/Entity/Message.php
  63. 36
      src/ChamiloLMS/CoreBundle/Entity/MessageMetadata.php
  64. 2
      src/ChamiloLMS/CoreBundle/Entity/QuestionFieldOptions.php
  65. 2
      src/ChamiloLMS/CoreBundle/Entity/Repository/CourseRepository.php
  66. 2
      src/ChamiloLMS/CoreBundle/Entity/Repository/CurriculumItemRelUserRepository.php
  67. 2
      src/ChamiloLMS/CoreBundle/Entity/Repository/ItemPropertyRepository.php
  68. 22
      src/ChamiloLMS/CoreBundle/Entity/Repository/UserRepository.php
  69. 13
      src/ChamiloLMS/CoreBundle/Entity/Role.php
  70. 34
      src/ChamiloLMS/CoreBundle/Entity/Session.php
  71. 4
      src/ChamiloLMS/CoreBundle/Entity/SessionPath.php
  72. 4
      src/ChamiloLMS/CoreBundle/Entity/SessionTree.php
  73. 2
      src/ChamiloLMS/CoreBundle/Entity/SystemTemplate.php
  74. 44
      src/ChamiloLMS/CoreBundle/Entity/Thread.php
  75. 34
      src/ChamiloLMS/CoreBundle/Entity/ThreadMetadata.php
  76. 3
      src/ChamiloLMS/CoreBundle/Entity/Tool.php
  77. 6
      src/ChamiloLMS/CoreBundle/Entity/TrackExercise.php
  78. 2
      src/ChamiloLMS/CoreBundle/Entity/TrackExerciseAttemptJury.php
  79. 1246
      src/ChamiloLMS/CoreBundle/Entity/User.php
  80. 4
      src/ChamiloLMS/CoreBundle/Entity/UserCourseSessionGroup.php
  81. 2
      src/ChamiloLMS/CoreBundle/Entity/UserSessionPath.php
  82. 2
      src/ChamiloLMS/CoreBundle/Entity/Usergroup.php
  83. 6
      src/ChamiloLMS/CoreBundle/Entity/UsergroupRelUser.php

@ -0,0 +1,21 @@
<?php
/* For licensing terms, see /license.txt */
namespace Application\Sonata\AdminBundle;
use Symfony\Component\HttpKernel\Bundle\Bundle;
/**
* Class ApplicationSonataAdminBundle
* @package Application\Sonata\AdminBundle
*/
class ApplicationSonataAdminBundle extends Bundle
{
/**
* {@inheritdoc}
*/
public function getParent()
{
return 'SonataAdminBundle';
}
}

@ -0,0 +1,21 @@
<?php
/* For licensing terms, see /license.txt */
namespace Application\Sonata\NewsBundle;
use Symfony\Component\HttpKernel\Bundle\Bundle;
/**
* Class ApplicationSonataNewsBundle
* @package Application\Sonata\NewsBundle
*/
class ApplicationSonataNewsBundle extends Bundle
{
/**
* {@inheritdoc}
*/
public function getParent()
{
return 'SonataNewsBundle';
}
}

@ -0,0 +1,41 @@
<?php
/**
* This file is part of the <name> project.
*
* (c) <yourname> <youremail>
*
* 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 <yourname> <youremail>
*/
class Comment extends BaseComment
{
/**
* @var integer $id
*/
protected $id;
/**
* Get id
*
* @return integer $id
*/
public function getId()
{
return $this->id;
}
}

@ -0,0 +1,41 @@
<?php
/**
* This file is part of the <name> project.
*
* (c) <yourname> <youremail>
*
* 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 <yourname> <youremail>
*/
class Post extends BasePost
{
/**
* @var integer $id
*/
protected $id;
/**
* Get id
*
* @return integer $id
*/
public function getId()
{
return $this->id;
}
}

@ -0,0 +1,26 @@
<?php
/**
* This file is part of the <name> project.
*
* (c) <yourname> <youremail>
*
* 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 <yourname> <youremail>
*/
class PostRepository extends BasePostRepository
{
}

@ -0,0 +1,40 @@
<?php
/**
* This file is part of the <name> project.
*
* (c) <yourname> <youremail>
*
* 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 <yourname> <youremail>
*/
class Comment extends BaseComment
{
/**
* @var integer $id
*/
protected $id;
/**
* Get id
*
* @return integer $id
*/
public function getId()
{
return $this->id;
}
}

@ -0,0 +1,40 @@
<?php
/**
* This file is part of the <name> project.
*
* (c) <yourname> <youremail>
*
* 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 <yourname> <youremail>
*/
class Post extends BasePost
{
/**
* @var integer $id
*/
protected $id;
/**
* Get id
*
* @return integer $id
*/
public function getId()
{
return $this->id;
}
}

@ -0,0 +1,28 @@
<?php
/**
* This file is part of the <name> project.
*
* (c) <yourname> <youremail>
*
* 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 <yourname> <youremail>
*/
class PostRepository extends BasePostRepository
{
}

@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<doctrine-mapping xmlns="http://doctrine-project.org/schemas/orm/doctrine-mapping" xsi="http://www.w3.org/2001/XMLSchema-instance" schemaLocation="http://doctrine-project.org/schemas/orm/doctrine-mapping http://doctrine-project.org/schemas/orm/doctrine-mapping.xsd">
<!--
This file has been generated by the EasyExtends bundle ( http://sonata-project.org/easy-extends )
References :
xsd : https://github.com/doctrine/doctrine2/blob/master/doctrine-mapping.xsd
xml mapping : http://www.doctrine-project.org/projects/orm/2.0/docs/reference/xml-mapping/en
association mapping : http://www.doctrine-project.org/projects/orm/2.0/docs/reference/association-mapping/en
-->
<entity
name="Application\Sonata\NewsBundle\Entity\Comment"
table="news__comment"
repository-class="Doctrine\ORM\EntityRepository">
<id name="id" type="integer" column="id">
<generator strategy="AUTO"/>
</id>
</entity>
</doctrine-mapping>

@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<doctrine-mapping xmlns="http://doctrine-project.org/schemas/orm/doctrine-mapping" xsi="http://www.w3.org/2001/XMLSchema-instance" schemaLocation="http://doctrine-project.org/schemas/orm/doctrine-mapping http://doctrine-project.org/schemas/orm/doctrine-mapping.xsd">
<!--
This file has been generated by the EasyExtends bundle ( http://sonata-project.org/easy-extends )
References :
xsd : https://github.com/doctrine/doctrine2/blob/master/doctrine-mapping.xsd
xml mapping : http://www.doctrine-project.org/projects/orm/2.0/docs/reference/xml-mapping/en
association mapping : http://www.doctrine-project.org/projects/orm/2.0/docs/reference/association-mapping/en
-->
<entity
name="Application\Sonata\NewsBundle\Entity\Post"
table="news__post"
repository-class="Application\Sonata\NewsBundle\Entity\PostRepository">
<id name="id" type="integer" column="id">
<generator strategy="AUTO"/>
</id>
</entity>
</doctrine-mapping>

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<serializer>
<class name="Application\Sonata\NewsBundle\Entity\Comment" exclusion-policy="all" xml-root-name="comment">
<property xml-attribute-map="true" name="id" type="integer" expose="true" since-version="1.0" groups="sonata_api_read,sonata_api_write,sonata_search" />
</class>
</serializer>

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<serializer>
<class name="Application\Sonata\NewsBundle\Entity\Post" exclusion-policy="all" xml-root-name="post">
<property xml-attribute-map="true" name="id" type="integer" expose="true" since-version="1.0" groups="sonata_api_read,sonata_api_write,sonata_search" />
</class>
</serializer>

@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<doctrine-mapping xmlns="http://doctrine-project.org/schemas/orm/doctrine-mapping" xsi="http://www.w3.org/2001/XMLSchema-instance" schemaLocation="http://doctrine-project.org/schemas/orm/doctrine-mapping http://doctrine-project.org/schemas/orm/doctrine-mapping.xsd">
<!--
This file has been generated by the EasyExtends bundle ( http://sonata-project.org/easy-extends )
References :
xsd : https://github.com/doctrine/doctrine2/blob/master/doctrine-mapping.xsd
xml mapping : http://www.doctrine-project.org/projects/orm/2.0/docs/reference/xml-mapping/en
association mapping : http://www.doctrine-project.org/projects/orm/2.0/docs/reference/association-mapping/en
-->
<entity
name="Application\Sonata\PageBundle\Entity\Block"
table="page__bloc"
repository-class="Doctrine\ORM\EntityRepository">
<id name="id" type="integer" column="id">
<generator strategy="AUTO"/>
</id>
</entity>
</doctrine-mapping>

@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<doctrine-mapping xmlns="http://doctrine-project.org/schemas/orm/doctrine-mapping" xsi="http://www.w3.org/2001/XMLSchema-instance" schemaLocation="http://doctrine-project.org/schemas/orm/doctrine-mapping http://doctrine-project.org/schemas/orm/doctrine-mapping.xsd">
<!--
This file has been generated by the EasyExtends bundle ( http://sonata-project.org/easy-extends )
References :
xsd : https://github.com/doctrine/doctrine2/blob/master/doctrine-mapping.xsd
xml mapping : http://www.doctrine-project.org/projects/orm/2.0/docs/reference/xml-mapping/en
association mapping : http://www.doctrine-project.org/projects/orm/2.0/docs/reference/association-mapping/en
-->
<entity
name="Application\Sonata\PageBundle\Entity\Page"
table="page__page"
>
<id name="id" type="integer" column="id">
<generator strategy="AUTO"/>
</id>
</entity>
</doctrine-mapping>

@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<doctrine-mapping xmlns="http://doctrine-project.org/schemas/orm/doctrine-mapping" xsi="http://www.w3.org/2001/XMLSchema-instance" schemaLocation="http://doctrine-project.org/schemas/orm/doctrine-mapping http://doctrine-project.org/schemas/orm/doctrine-mapping.xsd">
<!--
This file has been generated by the EasyExtends bundle ( http://sonata-project.org/easy-extends )
References :
xsd : https://github.com/doctrine/doctrine2/blob/master/doctrine-mapping.xsd
xml mapping : http://www.doctrine-project.org/projects/orm/2.0/docs/reference/xml-mapping/en
association mapping : http://www.doctrine-project.org/projects/orm/2.0/docs/reference/association-mapping/en
-->
<entity
name="Application\Sonata\PageBundle\Entity\Site"
table="page__site"
>
<id name="id" type="integer" column="id">
<generator strategy="AUTO"/>
</id>
</entity>
</doctrine-mapping>

@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<doctrine-mapping xmlns="http://doctrine-project.org/schemas/orm/doctrine-mapping" xsi="http://www.w3.org/2001/XMLSchema-instance" schemaLocation="http://doctrine-project.org/schemas/orm/doctrine-mapping http://doctrine-project.org/schemas/orm/doctrine-mapping.xsd">
<!--
This file has been generated by the EasyExtends bundle ( http://sonata-project.org/easy-extends )
References :
xsd : https://github.com/doctrine/doctrine2/blob/master/doctrine-mapping.xsd
xml mapping : http://www.doctrine-project.org/projects/orm/2.0/docs/reference/xml-mapping/en
association mapping : http://www.doctrine-project.org/projects/orm/2.0/docs/reference/association-mapping/en
-->
<entity
name="Application\Sonata\PageBundle\Entity\Snapshot"
table="page__snapshot"
>
<id name="id" type="integer" column="id">
<generator strategy="AUTO"/>
</id>
</entity>
</doctrine-mapping>

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<serializer>
<class name="Application\Sonata\PageBundle\Entity\Block" exclusion-policy="all" xml-root-name="block">
<property xml-attribute-map="true" name="id" type="integer" expose="true" since-version="1.0" groups="sonata_api_read,sonata_api_write,sonata_search" />
</class>
</serializer>

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<serializer>
<class name="Application\Sonata\PageBundle\Entity\Page" exclusion-policy="all" xml-root-name="page">
<property xml-attribute-map="true" name="id" type="integer" expose="true" since-version="1.0" groups="sonata_api_read,sonata_api_write,sonata_search" />
</class>
</serializer>

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<serializer>
<class name="Application\Sonata\PageBundle\Entity\Site" exclusion-policy="all" xml-root-name="site">
<property xml-attribute-map="true" name="id" type="integer" expose="true" since-version="1.0" groups="sonata_api_read,sonata_api_write,sonata_search" />
</class>
</serializer>

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<serializer>
<class name="Application\Sonata\PageBundle\Entity\Snapshot" exclusion-policy="all" xml-root-name="snapshot">
<property xml-attribute-map="true" name="id" type="integer" expose="true" since-version="1.0" groups="sonata_api_read,sonata_api_write,sonata_search" />
</class>
</serializer>

@ -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 %}
<script type="text/javascript">
var basket_update_confirmation_message = '{{ 'sonata_basket_update_confirmation'|trans({}, 'SonataDemoBundle')|escape('js') }}';
</script>
<script src="{{ asset('assetic/sonata_front_js.js') }}" type="text/javascript"></script>
{% endblock %}
{% block sonata_page_container %}
{{ parent() }}
{% endblock %}
{% block sonata_page_breadcrumb %}{% endblock %}

@ -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 %}
<script type="text/javascript">
var basket_update_confirmation_message = '{{ 'sonata_basket_update_confirmation'|trans({}, 'SonataDemoBundle')|escape('js') }}';
</script>
<script src="{{ asset('assetic/sonata_front_js.js') }}" type="text/javascript"></script>
{% endblock %}
{% block sonata_page_container %}
{{ parent() }}
{% endblock %}
{% block sonata_page_breadcrumb %}{% endblock %}

@ -0,0 +1,32 @@
<?php
/**
* This file is part of the <name> project.
*
* (c) <yourname> <youremail>
*
* 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 <yourname> <youremail>
*/
class ApplicationSonataSeoBundle extends Bundle
{
/**
* {@inheritdoc}
*/
public function getParent()
{
return 'SonataSeoBundle';
}
}

@ -0,0 +1,21 @@
{#
This file is part of the Sonata package.
(c) Thomas Rabaix <thomas.rabaix@sonata-project.org>
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 %}
<div class="sonata_breadcrumb">
{{ parent() }}
</div>
{% endspaceless %}
{% endblock %}

@ -0,0 +1,29 @@
<?xml version="1.0" ?>
<constraint-mapping xmlns="http://symfony.com/schema/dic/constraint-mapping"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://symfony.com/schema/dic/constraint-mapping
http://symfony.com/schema/dic/constraint-mapping/constraint-mapping-1.0.xsd">
<class name="FOS\UserBundle\Model\User">
<constraint name="Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity">
<option name="fields">usernameCanonical</option>
<option name="errorPath">username</option>
<option name="message">fos_user.username.already_used</option>
<option name="groups">
<value>ProfileCustom</value>
</option>
</constraint>
</class>
<class name="Application\Sonata\UserBundle\Entity\User">
<constraint name="Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity">
<option name="fields">usernameCanonical</option>
<option name="errorPath">username</option>
<option name="message">fos_user.username.already_used</option>
<option name="groups">
<value>ProfileCustom</value>
</option>
</constraint>
</class>
</constraint-mapping>

@ -0,0 +1,18 @@
<?xml version="1.0" ?>
<constraint-mapping xmlns="http://symfony.com/schema/dic/constraint-mapping"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://symfony.com/schema/dic/constraint-mapping
http://symfony.com/schema/dic/constraint-mapping/constraint-mapping-1.0.xsd">
<class name="Application\Sonata\UserBundle\Entity\User">
<constraint name="Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity">
<option name="fields">usernameCanonical</option>
<option name="errorPath">username</option>
<option name="message">fos_user.username.already_used</option>
<option name="groups">
<value>ProfileCustom</value>
</option>
</constraint>
</class>
</constraint-mapping>

@ -0,0 +1,90 @@
{#
This file is part of the Sonata package.
(c) Thomas Rabaix <thomas.rabaix@sonata-project.org>
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 %}
<div class="row">
<div class="col-sm-6">
{% block sonata_user_login %}
<div class="panel panel-info">
<div class="panel-heading">
<h2 class="panel-title">{{ 'title_user_authentication'|trans({}, 'SonataUserBundle') }}</h2>
</div>
<div class="panel-body">
{% block sonata_user_login_error %}
{% if error %}
<div class="alert alert-danger alert-danger">{{ error|trans({}, 'FOSUserBundle') }}</div>
{% endif %}
{% endblock %}
{% block sonata_user_login_form %}
<form action="{{ path("fos_user_security_check") }}" method="post" role="form"
class="form-horizontal">
<input type="hidden" name="_csrf_token" value="{{ csrf_token }}"/>
<div class="form-group">
<label for="username"
class="col-sm-4 control-label">{{ 'security.login.username'|trans({}, 'SonataUserBundle') }}</label>
<div class="col-sm-8"><input type="text" class="form-control" id="username"
name="_username" value="{{ last_username }}"
required="required"/></div>
</div>
<div class="form-group control-group">
<label for="password"
class="col-sm-4 control-label">{{ 'security.login.password'|trans({}, 'SonataUserBundle') }}</label>
<div class="col-sm-8"><input type="password" class="form-control" id="password"
name="_password" required="required"/></div>
</div>
<div class="form-group">
<div class="col-sm-offset-4 col-sm-8">
<div class="checkbox control-group">
<label for="remember_me">
<input type="checkbox" id="remember_me" name="_remember_me" value="on"/>
{{ 'security.login.remember_me'|trans({}, 'FOSUserBundle') }}
</label>
</div>
</div>
</div>
<div class="form-group control-group">
<div class="controls col-sm-offset-4 col-sm-8">
<a href="{{ path('fos_user_resetting_request') }}">{{ 'forgotten_password'|trans({}, 'SonataUserBundle') }}</a>
</div>
</div>
<div class="form-group">
<div class="col-sm-offset-4 col-sm-8">
<input type="submit" id="_submit" name="_submit" class="btn btn-primary"
value="{{ 'security.login.submit'|trans({}, 'FOSUserBundle') }}"/>
</div>
</div>
</form>
{% endblock %}
</div>
</div>
{% endblock %}
</div>
<div class="col-sm-6">
{% block sonata_user_registration %}
{% render controller("SonataUserBundle:RegistrationFOSUser1:register") %}
{% endblock %}
</div>
</div>
{% endblock fos_user_content %}

@ -0,0 +1 @@
{% extends "SonataUserBundle:Security:base_login.html.twig" %}

@ -0,0 +1,4 @@
<div>
{% block fos_user_content %}
{% endblock fos_user_content %}
</div>

@ -0,0 +1,24 @@
<?php
/* For licensing terms, see /license.txt */
namespace Application\Sonata\UserBundle\Security;
use Symfony\Component\Security\Core\Encoder\PasswordEncoderInterface;
/**
* Class Encoder
* @package Application\Sonata\UserBundle\Security
*/
class Encoder implements PasswordEncoderInterface
{
public function encodePassword($raw, $salt)
{
// Do not use salt here.
return sha1($raw);
}
public function isPasswordValid($encoded, $raw, $salt)
{
return $encoded === $this->encodePassword($raw, $salt);
}
}

@ -17,7 +17,7 @@ class AccessUrl
* *
* @ORM\Column(name="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\Id
* @ORM\GeneratedValue(strategy="IDENTITY") * @ORM\GeneratedValue(strategy="AUTO")
*/ */
private $id; private $id;

@ -17,7 +17,7 @@ class AccessUrlRelCourse
* *
* @ORM\Column(name="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\Id
* @ORM\GeneratedValue(strategy="IDENTITY") * @ORM\GeneratedValue(strategy="AUTO")
*/ */
private $id; private $id;

@ -15,9 +15,16 @@ class AccessUrlRelSession
/** /**
* @var integer * @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\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; private $accessUrlId;
@ -25,8 +32,6 @@ class AccessUrlRelSession
* @var integer * @var integer
* *
* @ORM\Column(name="session_id", type="integer", precision=0, scale=0, nullable=false, unique=false) * @ORM\Column(name="session_id", type="integer", precision=0, scale=0, nullable=false, unique=false)
* @ORM\Id
* @ORM\GeneratedValue(strategy="NONE")
*/ */
private $sessionId; private $sessionId;

@ -15,9 +15,16 @@ class AccessUrlRelUser
/** /**
* @var integer * @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\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; private $accessUrlId;
@ -25,12 +32,9 @@ class AccessUrlRelUser
* @var integer * @var integer
* *
* @ORM\Column(name="user_id", type="integer", precision=0, scale=0, nullable=false, unique=false) * @ORM\Column(name="user_id", type="integer", precision=0, scale=0, nullable=false, unique=false)
* @ORM\Id
* @ORM\GeneratedValue(strategy="NONE")
*/ */
private $userId; private $userId;
/** /**
* Set accessUrlId * Set accessUrlId
* *

@ -19,7 +19,7 @@ class BranchSync
* *
* @ORM\Column(name="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\Id
* @ORM\GeneratedValue(strategy="IDENTITY") * @ORM\GeneratedValue(strategy="AUTO")
*/ */
private $id; private $id;

@ -15,21 +15,26 @@ class CDropboxFile
/** /**
* @var integer * @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\Id
* @ORM\GeneratedValue(strategy="NONE") * @ORM\GeneratedValue(strategy="AUTO")
*/ */
private $cId; private $iid;
/** /**
* @var integer * @var integer
* *
* @ORM\Column(name="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")
*/ */
private $id; private $id;
/**
* @var integer
*
* @ORM\Column(name="c_id", type="integer", precision=0, scale=0, nullable=false, unique=false)
*/
private $cId;
/** /**
* @var integer * @var integer
* *
@ -106,8 +111,8 @@ class CDropboxFile
private $file; private $file;
/** /**
* @ORM\ManyToOne(targetEntity="User", inversedBy="dropBoxSentFiles") * @ORM\ManyToOne(targetEntity="Application\Sonata\UserBundle\Entity\User", inversedBy="dropBoxSentFiles")
* @ORM\JoinColumn(name="uploader_id", referencedColumnName="user_id") * @ORM\JoinColumn(name="uploader_id", referencedColumnName="id")
**/ **/
private $userSent; private $userSent;

@ -15,9 +15,16 @@ class CDropboxPost
/** /**
* @var integer * @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\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; private $cId;
@ -25,8 +32,6 @@ class CDropboxPost
* @var integer * @var integer
* *
* @ORM\Column(name="file_id", type="integer", precision=0, scale=0, nullable=false, unique=false) * @ORM\Column(name="file_id", type="integer", precision=0, scale=0, nullable=false, unique=false)
* @ORM\Id
* @ORM\GeneratedValue(strategy="NONE")
*/ */
private $fileId; private $fileId;
@ -34,8 +39,6 @@ class CDropboxPost
* @var integer * @var integer
* *
* @ORM\Column(name="dest_user_id", type="integer", precision=0, scale=0, nullable=false, unique=false) * @ORM\Column(name="dest_user_id", type="integer", precision=0, scale=0, nullable=false, unique=false)
* @ORM\Id
* @ORM\GeneratedValue(strategy="NONE")
*/ */
private $destUserId; private $destUserId;
@ -69,8 +72,8 @@ class CDropboxPost
/** /**
* *
* @ORM\ManyToOne(targetEntity="User", inversedBy="dropBoxReceivedFiles") * @ORM\ManyToOne(targetEntity="Application\Sonata\UserBundle\Entity\User", inversedBy="dropBoxReceivedFiles")
* @ORM\JoinColumn(name="dest_user_id", referencedColumnName="user_id") * @ORM\JoinColumn(name="dest_user_id", referencedColumnName="id")
**/ **/
private $user; private $user;
@ -79,8 +82,7 @@ class CDropboxPost
* @ORM\ManyToOne(targetEntity="CDropboxFile", inversedBy="file") * @ORM\ManyToOne(targetEntity="CDropboxFile", inversedBy="file")
* *
* @ORM\JoinColumns({ * @ORM\JoinColumns({
* @ORM\JoinColumn(name="file_id", referencedColumnName="id"), * @ORM\JoinColumn(name="file_id", referencedColumnName="iid")
* @ORM\JoinColumn(name="c_id", referencedColumnName="c_id")
* }) * })
**/ **/
private $file; private $file;

@ -25,7 +25,7 @@ class CGroupInfo
* *
* @ORM\Column(name="iid", 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\Id
* @ORM\GeneratedValue(strategy="IDENTITY") * @ORM\GeneratedValue(strategy="AUTO")
*/ */
private $iid; private $iid;

@ -3,7 +3,7 @@
namespace ChamiloLMS\CoreBundle\Entity; namespace ChamiloLMS\CoreBundle\Entity;
use Doctrine\ORM\Mapping as ORM; use Doctrine\ORM\Mapping as ORM;
use Application\Sonata\UserBundle\Entity\User;
/** /**
* CItemProperty * CItemProperty
@ -25,7 +25,7 @@ class CItemProperty
* *
* @ORM\Column(name="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\Id
* @ORM\GeneratedValue(strategy="IDENTITY") * @ORM\GeneratedValue(strategy="AUTO")
*/ */
private $id; private $id;
@ -124,8 +124,8 @@ class CItemProperty
/** /**
* *
* @ORM\ManyToOne(targetEntity="User", inversedBy="items") * @ORM\ManyToOne(targetEntity="Application\Sonata\UserBundle\Entity\User", inversedBy="items")
* @ORM\JoinColumn(name="to_user_id", referencedColumnName="user_id") * @ORM\JoinColumn(name="to_user_id", referencedColumnName="id")
**/ **/
private $user; private $user;

@ -15,9 +15,16 @@ class CLp
/** /**
* @var integer * @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\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; private $id;

@ -17,7 +17,7 @@ class CLpCategory
* *
* @ORM\Column(name="id", type="integer") * @ORM\Column(name="id", type="integer")
* @ORM\Id * @ORM\Id
* @ORM\GeneratedValue(strategy="IDENTITY") * @ORM\GeneratedValue(strategy="AUTO")
*/ */
private $id; private $id;

@ -17,7 +17,7 @@ class CQuiz
* *
* @ORM\Column(name="iid", 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\Id
* @ORM\GeneratedValue(strategy="IDENTITY") * @ORM\GeneratedValue(strategy="AUTO")
*/ */
private $iid; private $iid;

@ -18,9 +18,9 @@ class CQuizCategory
/** /**
* @var integer * @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\Id
* @ORM\GeneratedValue(strategy="IDENTITY") * @ORM\GeneratedValue(strategy="AUTO")
*/ */
private $iid; private $iid;
@ -31,7 +31,6 @@ class CQuizCategory
*/ */
private $cId; private $cId;
/** /**
* @var string * @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; private $parentId;

@ -19,7 +19,7 @@ class CQuizQuestion
* *
* @ORM\Column(name="iid", 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\Id
* @ORM\GeneratedValue(strategy="IDENTITY") * @ORM\GeneratedValue(strategy="AUTO")
*/ */
private $iid; private $iid;

@ -17,7 +17,7 @@ class CQuizQuestionRelCategory
* *
* @ORM\Column(name="iid", 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\Id
* @ORM\GeneratedValue(strategy="IDENTITY") * @ORM\GeneratedValue(strategy="AUTO")
*/ */
private $iid; private $iid;
@ -25,8 +25,6 @@ class CQuizQuestionRelCategory
* @var integer * @var integer
* *
* @ORM\Column(name="c_id", type="integer", precision=0, scale=0, nullable=false, unique=false) * @ORM\Column(name="c_id", type="integer", precision=0, scale=0, nullable=false, unique=false)
* @ORM\Id
* @ORM\GeneratedValue(strategy="NONE")
*/ */
private $cId; private $cId;
@ -34,22 +32,20 @@ class CQuizQuestionRelCategory
* @var integer * @var integer
* *
* @ORM\Column(name="question_id", type="integer", precision=0, scale=0, nullable=false, unique=false) * @ORM\Column(name="question_id", type="integer", precision=0, scale=0, nullable=false, unique=false)
* @ORM\Id
* @ORM\GeneratedValue(strategy="NONE")
*/ */
private $questionId; private $questionId;
/** /**
* @var integer * @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; private $categoryId;
/** Relationships */ /** Relationships */
/** /**
* @ORM\ManyToOne(targetEntity="CQuizCategory") * @ORM\ManyToOne(targetEntity="CQuizCategory", inversedBy="quizQuestionRelCategoryList")
* @ORM\JoinColumn(name="category_id", referencedColumnName="iid") * @ORM\JoinColumn(name="category_id", referencedColumnName="iid")
*/ */
private $category; private $category;

@ -17,7 +17,7 @@ class CQuizRelQuestion
* *
* @ORM\Column(name="iid", 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\Id
* @ORM\GeneratedValue(strategy="IDENTITY") * @ORM\GeneratedValue(strategy="AUTO")
*/ */
private $iid; private $iid;
@ -25,8 +25,6 @@ class CQuizRelQuestion
* @var integer * @var integer
* *
* @ORM\Column(name="c_id", type="integer", precision=0, scale=0, nullable=false, unique=false) * @ORM\Column(name="c_id", type="integer", precision=0, scale=0, nullable=false, unique=false)
* @ORM\Id
* @ORM\GeneratedValue(strategy="NONE")
*/ */
private $cId; private $cId;
@ -34,8 +32,6 @@ class CQuizRelQuestion
* @var integer * @var integer
* *
* @ORM\Column(name="question_id", type="integer", precision=0, scale=0, nullable=false, unique=false) * @ORM\Column(name="question_id", type="integer", precision=0, scale=0, nullable=false, unique=false)
* @ORM\Id
* @ORM\GeneratedValue(strategy="NONE")
*/ */
private $questionId; private $questionId;
@ -43,8 +39,6 @@ class CQuizRelQuestion
* @var integer * @var integer
* *
* @ORM\Column(name="exercice_id", type="integer", precision=0, scale=0, nullable=false, unique=false) * @ORM\Column(name="exercice_id", type="integer", precision=0, scale=0, nullable=false, unique=false)
* @ORM\Id
* @ORM\GeneratedValue(strategy="NONE")
*/ */
private $exerciceId; private $exerciceId;

@ -18,21 +18,26 @@ class CTool
/** /**
* @var integer * @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\Id
* @ORM\GeneratedValue(strategy="NONE") * @ORM\GeneratedValue(strategy="AUTO")
*/ */
private $cId; private $iid;
/** /**
* @var integer * @var integer
* *
* @ORM\Column(name="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")
*/ */
private $id; private $id;
/**
* @var integer
*
* @ORM\Column(name="c_id", type="integer", precision=0, scale=0, nullable=false, unique=false)
*/
private $cId;
/** /**
* @var string * @var string
* *

@ -13,29 +13,25 @@ use Doctrine\ORM\Mapping as ORM;
class CToolIntro 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\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\Column(name="c_id", type="integer", precision=0, scale=0, nullable=false, unique=false)
* @ORM\Id
* @ORM\GeneratedValue(strategy="NONE")
*/ */
private $id; private $cId;
/** /**
* @var integer * @var integer
* *
* @ORM\Column(name="session_id", type="integer", precision=0, scale=0, nullable=false, unique=false) * @ORM\Column(name="session_id", type="integer", precision=0, scale=0, nullable=false, unique=false)
* @ORM\Id
* @ORM\GeneratedValue(strategy="NONE")
*/ */
private $sessionId; private $sessionId;

@ -0,0 +1,28 @@
<?php
namespace ChamiloLMS\CoreBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
use FOS\CommentBundle\Entity\Comment as BaseComment;
/**
* @ORM\Entity
* @ORM\ChangeTrackingPolicy("DEFERRED_EXPLICIT")
*/
class Comment extends BaseComment
{
/**
* @ORM\Id
* @ORM\Column(type="integer")
* @ORM\GeneratedValue(strategy="AUTO")
*/
protected $id;
/**
* Thread of this comment
*
* @var Thread
* @ORM\ManyToOne(targetEntity="ChamiloLMS\CoreBundle\Entity\Thread")
*/
protected $thread;
}

@ -18,7 +18,7 @@ class Course
* *
* @ORM\Column(name="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\Id
* @ORM\GeneratedValue(strategy="IDENTITY") * @ORM\GeneratedValue(strategy="AUTO")
*/ */
private $id; private $id;
@ -81,7 +81,7 @@ class Course
/** /**
* @var integer * @var integer
* *
* @ORM\Column(name="show_score", type="integer", precision=0, scale=0, nullable=false, unique=false) * @ORM\Column(name="show_score", type="integer", precision=0, scale=0, nullable=true, unique=false)
*/ */
private $showScore; private $showScore;
@ -158,35 +158,35 @@ class Course
/** /**
* @var boolean * @var boolean
* *
* @ORM\Column(name="subscribe", type="boolean", precision=0, scale=0, nullable=false, unique=false) * @ORM\Column(name="subscribe", type="boolean", precision=0, scale=0, nullable=true, unique=false)
*/ */
private $subscribe; private $subscribe;
/** /**
* @var boolean * @var boolean
* *
* @ORM\Column(name="unsubscribe", type="boolean", precision=0, scale=0, nullable=false, unique=false) * @ORM\Column(name="unsubscribe", type="boolean", precision=0, scale=0, nullable=true, unique=false)
*/ */
private $unsubscribe; private $unsubscribe;
/** /**
* @var string * @var string
* *
* @ORM\Column(name="registration_code", type="string", length=255, precision=0, scale=0, nullable=false, unique=false) * @ORM\Column(name="registration_code", type="string", length=255, precision=0, scale=0, nullable=true, unique=false)
*/ */
private $registrationCode; private $registrationCode;
/** /**
* @var string * @var string
* *
* @ORM\Column(name="legal", type="text", precision=0, scale=0, nullable=false, unique=false) * @ORM\Column(name="legal", type="text", precision=0, scale=0, nullable=true, unique=false)
*/ */
private $legal; private $legal;
/** /**
* @var integer * @var integer
* *
* @ORM\Column(name="activate_legal", type="integer", precision=0, scale=0, nullable=false, unique=false) * @ORM\Column(name="activate_legal", type="integer", precision=0, scale=0, nullable=true, unique=false)
*/ */
private $activateLegal; private $activateLegal;
@ -212,11 +212,11 @@ class Course
**/ **/
//private $curriculumCategories; //private $curriculumCategories;
public function __construct() /*public function __construct()
{ {
$this->users = new ArrayCollection(); $this->users = new ArrayCollection();
$this->items = new ArrayCollection(); $this->items = new ArrayCollection();
} }*/
/** /**
* @return ArrayCollection * @return ArrayCollection
@ -234,6 +234,16 @@ class Course
return $this->users; return $this->users;
} }
/**
* Set id
*
* @return integer
*/
public function setId($id)
{
$this->id = $id;
}
/** /**
* Get id * Get id
* *

@ -7,8 +7,8 @@ use Doctrine\ORM\Mapping as ORM;
/** /**
* CourseRelUser * CourseRelUser
* *
* @ORM\Table(name="course_rel_user")
* @ORM\Entity * @ORM\Entity
* @ORM\Table(name="course_rel_user")
*/ */
class CourseRelUser class CourseRelUser
{ {
@ -17,7 +17,7 @@ class CourseRelUser
* *
* @ORM\Column(name="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\Id
* @ORM\GeneratedValue(strategy="IDENTITY") * @ORM\GeneratedValue(strategy="AUTO")
*/ */
private $id; private $id;
@ -31,7 +31,7 @@ class CourseRelUser
/** /**
* @var integer * @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; private $userId;
@ -96,19 +96,19 @@ class CourseRelUser
* *
* @ORM\Column(name="c_id", type="integer", precision=0, scale=0, nullable=false, unique=false) * @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\ManyToOne(targetEntity="Application\Sonata\UserBundle\Entity\User", inversedBy="courses")
* @ORM\JoinColumn(name="user_id", referencedColumnName="user_id") * @ORM\JoinColumn(name="user_id", referencedColumnName="id")
*/ */
private $user; protected $user;
/** /**
* @ORM\ManyToOne(targetEntity="Course", inversedBy="users") * @ORM\ManyToOne(targetEntity="Course", inversedBy="users")
* @ORM\JoinColumn(name="c_id", referencedColumnName="id") * @ORM\JoinColumn(name="c_id", referencedColumnName="id")
*/ */
private $course; protected $course;
public function __construct(Course $course, User $user) public function __construct(Course $course, User $user)
{ {

@ -20,7 +20,7 @@ class CurriculumCategory
* *
* @ORM\Column(name="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\Id
* @ORM\GeneratedValue(strategy="IDENTITY") * @ORM\GeneratedValue(strategy="AUTO")
*/ */
private $id; private $id;

@ -4,6 +4,7 @@ namespace ChamiloLMS\CoreBundle\Entity;
use Doctrine\ORM\Mapping as ORM; use Doctrine\ORM\Mapping as ORM;
use Doctrine\Common\Collections\ArrayCollection; use Doctrine\Common\Collections\ArrayCollection;
use Application\Sonata\UserBundle\Entity\User;
/** /**
* CurriculumItem * CurriculumItem
@ -18,7 +19,7 @@ class CurriculumItem
* *
* @ORM\Column(name="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\Id
* @ORM\GeneratedValue(strategy="IDENTITY") * @ORM\GeneratedValue(strategy="AUTO")
*/ */
private $id; private $id;

@ -3,6 +3,7 @@
namespace ChamiloLMS\CoreBundle\Entity; namespace ChamiloLMS\CoreBundle\Entity;
use Doctrine\ORM\Mapping as ORM; use Doctrine\ORM\Mapping as ORM;
use Application\Sonata\UserBundle\Entity\User;
/** /**
* CurriculumItemRelUser * CurriculumItemRelUser
@ -17,7 +18,7 @@ class CurriculumItemRelUser
* *
* @ORM\Column(name="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\Id
* @ORM\GeneratedValue(strategy="IDENTITY") * @ORM\GeneratedValue(strategy="AUTO")
*/ */
private $id; private $id;
@ -50,8 +51,8 @@ class CurriculumItemRelUser
private $description; private $description;
/** /**
* @ORM\ManyToOne(targetEntity="User", inversedBy="curriculumItems")) * @ORM\ManyToOne(targetEntity="Application\Sonata\UserBundle\Entity\User", inversedBy="curriculumItems"))
* @ORM\JoinColumn(name="user_id", referencedColumnName="user_id", nullable=true) * @ORM\JoinColumn(name="user_id", referencedColumnName="id", nullable=true)
*/ */
private $user; private $user;

@ -17,7 +17,7 @@ class CurriculumRelUser
* *
* @ORM\Column(name="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\Id
* @ORM\GeneratedValue(strategy="IDENTITY") * @ORM\GeneratedValue(strategy="AUTO")
*/ */
private $id; private $id;

@ -16,7 +16,7 @@ class ExtraField
* *
* @ORM\Column(name="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\Id
* @ORM\GeneratedValue(strategy="IDENTITY") * @ORM\GeneratedValue(strategy="AUTO")
*/ */
private $id; private $id;

@ -17,7 +17,7 @@ class ExtraFieldOptionRelFieldOption
* *
* @ORM\Column(name="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\Id
* @ORM\GeneratedValue(strategy="IDENTITY") * @ORM\GeneratedValue(strategy="AUTO")
*/ */
private $id; private $id;

@ -17,7 +17,7 @@ class ExtraFieldValues
* *
* @ORM\Column(name="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\Id
* @ORM\GeneratedValue(strategy="IDENTITY") * @ORM\GeneratedValue(strategy="AUTO")
*/ */
private $id; private $id;

@ -17,7 +17,7 @@ class Groups
* *
* @ORM\Column(name="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\Id
* @ORM\GeneratedValue(strategy="IDENTITY") * @ORM\GeneratedValue(strategy="AUTO")
*/ */
private $id; private $id;

@ -18,7 +18,7 @@ class Jury
* *
* @ORM\Column(name="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\Id
* @ORM\GeneratedValue(strategy="IDENTITY") * @ORM\GeneratedValue(strategy="AUTO")
*/ */
private $id; private $id;

@ -4,6 +4,8 @@ namespace ChamiloLMS\CoreBundle\Entity;
use Doctrine\ORM\Mapping as ORM; use Doctrine\ORM\Mapping as ORM;
use Application\Sonata\UserBundle\Entity\User;
/** /**
* JuryMembers * JuryMembers
* *
@ -17,7 +19,7 @@ class JuryMembers
* *
* @ORM\Column(name="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\Id
* @ORM\GeneratedValue(strategy="IDENTITY") * @ORM\GeneratedValue(strategy="AUTO")
*/ */
private $id; private $id;
@ -43,10 +45,10 @@ class JuryMembers
private $juryId; private $juryId;
/** /**
* @ORM\ManyToOne(targetEntity="User") * @ORM\ManyToOne(targetEntity="ChamiloLMS\UserBundle\Entity\User", inversedBy="jury")
* @ORM\JoinColumn(name="user_id", referencedColumnName="user_id") * @ORM\JoinColumn(name="user_id", referencedColumnName="id")
*/ */
private $user; //private $user;
/** /**
* @ORM\ManyToOne(targetEntity="Jury", inversedBy="members") * @ORM\ManyToOne(targetEntity="Jury", inversedBy="members")

@ -0,0 +1,68 @@
<?php
namespace ChamiloLMS\CoreBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
use Doctrine\Common\Collections\ArrayCollection;
use FOS\MessageBundle\Entity\Message as BaseMessage;
use Avanzu\AdminThemeBundle\Model\MessageInterface as ThemeMessage;
/**
* @ORM\Entity
*/
class Message extends BaseMessage implements ThemeMessage
{
/**
* @ORM\Id
* @ORM\Column(type="integer")
* @ORM\GeneratedValue(strategy="AUTO")
*/
protected $id;
/**
* @ORM\ManyToOne(
* targetEntity="ChamiloLMS\CoreBundle\Entity\Thread",
* inversedBy="messages"
* )
* @var ThreadInterface
*/
protected $thread;
/**
* @ORM\ManyToOne(targetEntity="Application\Sonata\UserBundle\Entity\User")
* @var ParticipantInterface
*/
protected $sender;
/**
* @ORM\OneToMany(
* targetEntity="ChamiloLMS\CoreBundle\Entity\MessageMetadata",
* mappedBy="message",
* cascade={"all"}
* )
* @var MessageMetadata
*/
protected $metadata;
//
public function getFrom()
{
return $this->getSender();
}
public function getSentAt()
{
return $this->getTimestamp();
}
public function getSubject()
{
return $this->getThread()->getSubject();
}
public function getIdentifier()
{
return $this->getId();
}
}

@ -0,0 +1,36 @@
<?php
namespace ChamiloLMS\CoreBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
use FOS\MessageBundle\Entity\MessageMetadata as BaseMessageMetadata;
use FOS\MessageBundle\Model\MessageInterface;
use FOS\MessageBundle\Model\ParticipantInterface;
/**
* @ORM\Entity
*/
class MessageMetadata extends BaseMessageMetadata
{
/**
* @ORM\Id
* @ORM\Column(type="integer")
* @ORM\GeneratedValue(strategy="AUTO")
*/
protected $id;
/**
* @ORM\ManyToOne(
* targetEntity="ChamiloLMS\CoreBundle\Entity\Message",
* inversedBy="metadata"
* )
* @var MessageInterface
*/
protected $message;
/**
* @ORM\ManyToOne(targetEntity="Application\Sonata\UserBundle\Entity\User")
* @var ParticipantInterface
*/
protected $participant;
}

@ -17,7 +17,7 @@ class SessionFieldOptions
* *
* @ORM\Column(name="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\Id
* @ORM\GeneratedValue(strategy="IDENTITY") * @ORM\GeneratedValue(strategy="AUTO")
*/ */
private $id; private $id;

@ -25,7 +25,7 @@ class CourseRepository extends EntityRepository
$queryBuilder->select('DISTINCT u'); $queryBuilder->select('DISTINCT u');
// Loading EntityUser. // Loading EntityUser.
$queryBuilder->from('ChamiloLMS\CoreBundle\Entity\User', 'u'); $queryBuilder->from('Application\Sonata\UserBundle\Entity\User', 'u');
// Selecting courses for users. // Selecting courses for users.
$queryBuilder->innerJoin('u.courses', 'c'); $queryBuilder->innerJoin('u.courses', 'c');

@ -17,7 +17,7 @@ class CurriculumItemRelUserRepository extends EntityRepository
* @param \ChamiloLMS\CoreBundle\Entity\CurriculumItem $course * @param \ChamiloLMS\CoreBundle\Entity\CurriculumItem $course
* @return bool * @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(); $max = $item->getMaxRepeat();
$count = $this->createQueryBuilder('a') $count = $this->createQueryBuilder('a')

@ -204,7 +204,7 @@ class ItemPropertyRepository extends EntityRepository
public function subscribeUsersToItem($tool, Course $course, Session $session = null, $itemId, $newUserList = array()) public function subscribeUsersToItem($tool, Course $course, Session $session = null, $itemId, $newUserList = array())
{ {
$em = $this->getEntityManager(); $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); $usersSubscribedToItem = $this->getUsersSubscribedToItem($tool, $itemId, $course, $session);

@ -3,18 +3,16 @@
namespace ChamiloLMS\CoreBundle\Entity\Repository; namespace ChamiloLMS\CoreBundle\Entity\Repository;
use Doctrine\ORM\EntityRepository; use Doctrine\ORM\EntityRepository;
use Symfony\Component\Security\Core\User\UserInterface;
use Symfony\Component\Security\Core\User\UserProviderInterface;
use Doctrine\ORM\NoResultException; use Doctrine\ORM\NoResultException;
use Symfony\Component\Security\Core\Exception\UsernameNotFoundException; use Symfony\Component\Security\Core\Exception\UsernameNotFoundException;
use Symfony\Component\Security\Core\Exception\UnsupportedUserException; use Symfony\Component\Security\Core\Exception\UnsupportedUserException;
use ChamiloLMS\CoreBundle\Entity\User; use ChamiloLMS\UserBundle\Entity\User;
/** /**
* Class UserRepository * Class UserRepository
* @package Entity\Repository * @package Entity\Repository
*/ */
class UserRepository extends EntityRepository implements UserProviderInterface class UserRepository extends EntityRepository
{ {
/** /**
* @param string $keyword * @param string $keyword
@ -27,7 +25,7 @@ class UserRepository extends EntityRepository implements UserProviderInterface
// Selecting user info // Selecting user info
$qb->select('DISTINCT b'); $qb->select('DISTINCT b');
$qb->from('ChamiloLMS\CoreBundle\Entity\User', 'b'); $qb->from('Application\Sonata\UserBundle\Entity\User', 'b');
// Selecting courses for users // Selecting courses for users
//$qb->innerJoin('u.courses', 'c'); //$qb->innerJoin('u.courses', 'c');
@ -46,7 +44,7 @@ class UserRepository extends EntityRepository implements UserProviderInterface
* @return User * @return User
* @throws UsernameNotFoundException * @throws UsernameNotFoundException
*/ */
public function loadUserByUsername($username) /*public function loadUserByUsername($username)
{ {
$query = $this $query = $this
->createQueryBuilder('u') ->createQueryBuilder('u')
@ -66,7 +64,7 @@ class UserRepository extends EntityRepository implements UserProviderInterface
); );
} }
return $user; return $user;
} }*/
/** /**
* Refreshes the user for the account interface. * Refreshes the user for the account interface.
@ -80,7 +78,7 @@ class UserRepository extends EntityRepository implements UserProviderInterface
* *
* @return UserInterface * @return UserInterface
*/ */
public function refreshUser(UserInterface $user) /*public function refreshUser(UserInterface $user)
{ {
//return $user; //return $user;
$class = get_class($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)); throw new UnsupportedUserException(sprintf('Instances of "%s" are not supported.', $class));
} }
return $this->loadUserByUsername($user->getUsername()); return $this->loadUserByUsername($user->getUsername());
} }*/
/** /**
* @param string $class * @param string $class
* @return bool * @return bool
*/ */
public function supportsClass($class) /*public function supportsClass($class)
{ {
return $this->getEntityName() === $class || is_subclass_of($class, $this->getEntityName()); return $this->getEntityName() === $class || is_subclass_of($class, $this->getEntityName());
} }*/
/** /**
* Get course user relationship based in the course_rel_user table. * Get course user relationship based in the course_rel_user table.
@ -111,7 +109,7 @@ class UserRepository extends EntityRepository implements UserProviderInterface
$queryBuilder->select('c'); $queryBuilder->select('c');
// Loading User. // Loading User.
//$qb->from('ChamiloLMS\CoreBundle\Entity\User', 'u'); //$qb->from('ChamiloLMS\UserBundle\Entity\User', 'u');
// Selecting course // Selecting course
$queryBuilder->innerJoin('ChamiloLMS\CoreBundle\Entity\Course', 'c'); $queryBuilder->innerJoin('ChamiloLMS\CoreBundle\Entity\Course', 'c');

@ -30,9 +30,9 @@ class Role extends SymfonyRole implements \Serializable
private $role; private $role;
/** /**
* @ORM\ManyToMany(targetEntity="User", mappedBy="roles") * @ORM\ManyToMany(targetEntity="Application\Sonata\UserBundle\Entity\User", mappedBy="roles")
* @ORM\JoinTable(name="users_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; private $users;
@ -46,6 +46,15 @@ class Role extends SymfonyRole implements \Serializable
$this->users = new ArrayCollection(); $this->users = new ArrayCollection();
} }
/**
* Return the role field.
* @return string
*/
public function __toString()
{
return (string) $this->role;
}
/** /**
* @see RoleInterface * @see RoleInterface
*/ */

@ -18,7 +18,7 @@ class Session
* *
* @ORM\Column(name="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\Id
* @ORM\GeneratedValue(strategy="IDENTITY") * @ORM\GeneratedValue(strategy="AUTO")
*/ */
private $id; private $id;
@ -39,7 +39,7 @@ class Session
/** /**
* @var integer * @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; private $nbrCourses;
@ -53,14 +53,14 @@ class Session
/** /**
* @var integer * @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; private $nbrClasses;
/** /**
* @var integer * @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; private $sessionAdminId;
@ -132,6 +132,12 @@ class Session
**/ **/
private $items; 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; return $this->id;
} }
public function setId($id)
{
$this->id = $id;
}
/** /**
* Set idCoach * Set idCoach
* *
@ -494,4 +505,19 @@ class Session
{ {
return $this->coachAccessEndDate; return $this->coachAccessEndDate;
} }
/**
* Get id
*
* @return integer
*/
public function getGeneralCoach()
{
return $this->generalCoach;
}
public function setGeneralCoach($coach)
{
$this->generalCoach = $coach;
}
} }

@ -15,9 +15,9 @@ class SessionPath
/** /**
* @var integer * @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\Id
* @ORM\GeneratedValue(strategy="IDENTITY") * @ORM\GeneratedValue(strategy="AUTO")
*/ */
private $id; private $id;

@ -19,7 +19,7 @@ class SessionTree
* *
* @ORM\Column(name="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\Id
* @ORM\GeneratedValue(strategy="IDENTITY") * @ORM\GeneratedValue(strategy="AUTO")
*/ */
private $id; private $id;
@ -47,7 +47,7 @@ class SessionTree
/** /**
* @var integer * @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; private $toolId;

@ -17,7 +17,7 @@ class SystemTemplate
* *
* @ORM\Column(name="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\Id
* @ORM\GeneratedValue(strategy="IDENTITY") * @ORM\GeneratedValue(strategy="AUTO")
*/ */
private $id; private $id;

@ -0,0 +1,44 @@
<?php
namespace ChamiloLMS\CoreBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
use FOS\MessageBundle\Entity\Thread as BaseThread;
/**
* @ORM\Entity
* @ORM\ChangeTrackingPolicy("DEFERRED_EXPLICIT")
*/
class Thread extends BaseThread
{
/**
* @ORM\Id
* @ORM\Column(type="integer")
* @ORM\GeneratedValue(strategy="AUTO")
*/
protected $id;
/**
* @ORM\ManyToOne(targetEntity="Application\Sonata\UserBundle\Entity\User")
*/
protected $createdBy;
/**
* @ORM\OneToMany(
* targetEntity="ChamiloLMS\CoreBundle\Entity\Message",
* mappedBy="thread"
* )
* @var Message[]|\Doctrine\Common\Collections\Collection
*/
protected $messages;
/**
* @ORM\OneToMany(
* targetEntity="ChamiloLMS\CoreBundle\Entity\ThreadMetadata",
* mappedBy="thread",
* cascade={"all"}
* )
* @var ThreadMetadata[]|\Doctrine\Common\Collections\Collection
*/
protected $metadata;
}

@ -0,0 +1,34 @@
<?php
namespace ChamiloLMS\CoreBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
use FOS\MessageBundle\Entity\ThreadMetadata as BaseThreadMetadata;
/**
* @ORM\Entity
*/
class ThreadMetadata extends BaseThreadMetadata
{
/**
* @ORM\Id
* @ORM\Column(type="integer")
* @ORM\GeneratedValue(strategy="AUTO")
*/
protected $id;
/**
* @ORM\ManyToOne(
* targetEntity="ChamiloLMS\CoreBundle\Entity\Thread",
* inversedBy="metadata"
* )
* @var ThreadInterface
*/
protected $thread;
/**
* @ORM\ManyToOne(targetEntity="Application\Sonata\UserBundle\Entity\User")
* @var ParticipantInterface
*/
protected $participant;
}

@ -17,7 +17,7 @@ class Tool
* *
* @ORM\Column(name="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\Id
* @ORM\GeneratedValue(strategy="IDENTITY") * @ORM\GeneratedValue(strategy="AUTO")
*/ */
private $id; private $id;
@ -42,7 +42,6 @@ class Tool
*/ */
private $description; private $description;
/** /**
* Get id * Get id
* *

@ -17,7 +17,7 @@ class TrackExercise
* *
* @ORM\Column(name="exe_id", type="integer", precision=0, scale=0, nullable=false, unique=false) * @ORM\Column(name="exe_id", type="integer", precision=0, scale=0, nullable=false, unique=false)
* @ORM\Id * @ORM\Id
* @ORM\GeneratedValue(strategy="IDENTITY") * @ORM\GeneratedValue(strategy="AUTO")
*/ */
private $exeId; private $exeId;
@ -167,8 +167,8 @@ class TrackExercise
private $attempt; private $attempt;
/** /**
* @ORM\ManyToOne(targetEntity="User") * @ORM\ManyToOne(targetEntity="Application\Sonata\UserBundle\Entity\User")
* @ORM\JoinColumn(name="exe_user_id", referencedColumnName="user_id") * @ORM\JoinColumn(name="exe_user_id", referencedColumnName="id")
*/ */
private $user; private $user;

@ -17,7 +17,7 @@ class TrackExerciseAttemptJury
* *
* @ORM\Column(name="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\Id
* @ORM\GeneratedValue(strategy="IDENTITY") * @ORM\GeneratedValue(strategy="AUTO")
*/ */
private $id; private $id;

File diff suppressed because it is too large Load Diff

@ -17,8 +17,8 @@ class UserCourseSessionGroup
private $course; private $course;
/** /**
* @ORM\@ManyToOne(targetEntity="User", inversedBy="userCourseSessionGroup") * @ORM\@ManyToOne(targetEntity="Application\Sonata\UserBundle\Entity\User", inversedBy="userCourseSessionGroup")
* @ORM\JoinColumn(name="user_id", referencedColumnName="user_id", nullable=false) * @ORM\JoinColumn(name="user_id", referencedColumnName="id", nullable=false)
*/ */
private $user; private $user;

@ -17,7 +17,7 @@ class UserSessionPath
* *
* @ORM\Column(name="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\Id
* @ORM\GeneratedValue(strategy="IDENTITY") * @ORM\GeneratedValue(strategy="AUTO")
*/ */
private $id; private $id;

@ -19,7 +19,7 @@ class Usergroup
* *
* @ORM\Column(name="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\Id
* @ORM\GeneratedValue(strategy="IDENTITY") * @ORM\GeneratedValue(strategy="AUTO")
*/ */
private $id; private $id;

@ -18,7 +18,7 @@ class UsergroupRelUser
* *
* @ORM\Column(name="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\Id
* @ORM\GeneratedValue(strategy="IDENTITY") * @ORM\GeneratedValue(strategy="AUTO")
*/ */
private $id; private $id;
@ -38,8 +38,8 @@ class UsergroupRelUser
/** /**
* *
* @ORM\ManyToOne(targetEntity="User", inversedBy="classes") * @ORM\ManyToOne(targetEntity="Application\Sonata\UserBundle\Entity\User", inversedBy="classes")
* @ORM\JoinColumn(name="user_id", referencedColumnName="user_id") * @ORM\JoinColumn(name="user_id", referencedColumnName="id")
**/ **/
private $user; private $user;

Loading…
Cancel
Save