Updating entities

1.10.x
Julio Montoya 11 years ago
parent 7b67e537d4
commit 509348a22f
  1. 2
      src/ChamiloLMS/CoreBundle/Entity/JuryMembers.php
  2. 138
      src/ChamiloLMS/CoreBundle/Entity/Role.php
  3. 2
      src/ChamiloLMS/CoreBundle/Entity/TrackExercise.php
  4. 2
      src/ChamiloLMS/CourseBundle/Entity/CItemProperty.php
  5. 6
      src/ChamiloLMS/CourseBundle/Entity/CQuizQuestion.php
  6. 2
      src/ChamiloLMS/CourseBundle/Entity/CTool.php

@ -60,7 +60,7 @@ class JuryMembers
* @ORM\ManyToOne(targetEntity="Role", inversedBy="rolesFromJury")
* @ORM\JoinColumn(name="role_id", referencedColumnName="id")
*/
private $role;
//private $role;
public function getRole()
{

@ -1,138 +0,0 @@
<?php
namespace ChamiloLMS\CoreBundle\Entity;
use Symfony\Component\Security\Core\Role\Role as SymfonyRole;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Table(name="roles")
* @ORM\Entity()
*/
class Role extends SymfonyRole implements \Serializable
{
/**
* @ORM\Column(name="id", type="integer")
* @ORM\Id()
* @ORM\GeneratedValue(strategy="AUTO")
*/
private $id;
/**
* @ORM\Column(name="name", type="string", length=255)
*/
private $name;
/**
* @ORM\Column(name="role", type="string", length=255, unique=true)
*/
private $role;
/**
* @ORM\ManyToMany(targetEntity="Application\Sonata\UserBundle\Entity\User", mappedBy="roles")
* @ORM\JoinTable(name="users_roles",
* joinColumns={@ORM\JoinColumn(name="user_id", referencedColumnName="id")})
*/
private $users;
/**
* @ORM\OneToMany(targetEntity="JuryMembers", mappedBy="role")
**/
private $rolesFromJury;
public function __construct()
{
$this->users = new ArrayCollection();
}
/**
* Return the role field.
* @return string
*/
public function __toString()
{
return (string) $this->role;
}
/**
* @see RoleInterface
*/
public function getRole()
{
return $this->role;
}
/**
* Get id
*
* @return integer
*/
public function getId()
{
return $this->id;
}
/**
* Set name
*
* @param string $name
* @return Role
*/
public function setName($name)
{
$this->name = $name;
return $this;
}
/**
* Get name
*
* @return string
*/
public function getName()
{
return $this->name;
}
/**
* Set name
*
* @param string $role
* @return Role
*/
public function setRole($role)
{
$this->role = $role;
return $this;
}
/**
* @see \Serializable::serialize()
*/
public function serialize()
{
/*
* ! Don't serialize $users field !
*/
return \serialize(array(
$this->id,
$this->name,
$this->role
));
}
/**
* @see \Serializable::unserialize()
*/
public function unserialize($serialized)
{
list(
$this->id,
$this->name,
$this->role
) = \unserialize($serialized);
}
}

@ -155,7 +155,7 @@ class TrackExercise
private $juryId;
/**
* @ORM\ManyToOne(targetEntity="CQuiz")
* @ORM\ManyToOne(targetEntity="ChamiloLMS\CourseBundle\Entity\CQuiz")
* @ORM\JoinColumn(name="exe_exo_id", referencedColumnName="iid")
*/
private $exercise;

@ -4,6 +4,8 @@ namespace ChamiloLMS\CourseBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
use Application\Sonata\UserBundle\Entity\User;
use ChamiloLMS\CoreBundle\Entity\Course;
use ChamiloLMS\CoreBundle\Entity\Session;
/**
* CItemProperty

@ -1,6 +1,6 @@
<?php
namespace ChamiloLMS\CoreBundle\Entity;
namespace ChamiloLMS\CourseBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
use Gedmo\Mapping\Annotation as Gedmo;
@ -10,7 +10,7 @@ use Doctrine\Common\Collections\ArrayCollection;
* CQuizQuestion
*
* @ORM\Table(name="c_quiz_question")
* @ORM\Entity(repositoryClass="ChamiloLMS\CoreBundle\Entity\Repository\CQuizQuestionRepository")
* @ORM\Entity(repositoryClass="ChamiloLMS\CourseBundle\Entity\Repository\CQuizQuestionRepository")
*/
class CQuizQuestion
{
@ -107,7 +107,7 @@ class CQuizQuestion
private $quizQuestionRelCategoryList;
/**
* @ORM\OneToMany(targetEntity="QuestionFieldValues", mappedBy="question")
* @ORM\OneToMany(targetEntity="ChamiloLMS\CoreBundle\Entity\QuestionFieldValues", mappedBy="question")
*/
private $extraFields;

@ -121,7 +121,7 @@ class CTool
private $description;
/**
* @ORM\ManyToOne(targetEntity="Course")
* @ORM\ManyToOne(targetEntity="ChamiloLMS\CoreBundle\Entity\Course")
* @ORM\JoinColumn(name="c_id", referencedColumnName="id")
*/
private $course;

Loading…
Cancel
Save