Minor - merge with 1.11.x

pull/2487/merge
Julio Montoya 7 years ago
parent 95973606cc
commit 88bc49f75b
  1. 18
      src/CoreBundle/Entity/AccessUrl.php
  2. 19
      src/CoreBundle/Entity/AccessUrlRelCourse.php
  3. 4
      src/CoreBundle/Entity/AccessUrlRelCourseCategory.php
  4. 18
      src/CoreBundle/Entity/AccessUrlRelSession.php
  5. 64
      src/CoreBundle/Entity/Course.php
  6. 10
      src/CoreBundle/Entity/CourseCategory.php
  7. 18
      src/CoreBundle/Entity/CourseModule.php
  8. 29
      src/CoreBundle/Entity/CourseRelUser.php
  9. 19
      src/CoreBundle/Entity/CourseRelUserCatalogue.php
  10. 2
      src/CoreBundle/Entity/Legal.php
  11. 2
      src/CoreBundle/Entity/PortfolioCategory.php
  12. 62
      src/CoreBundle/Entity/Session.php
  13. 24
      src/CoreBundle/Entity/SessionRelCourseRelUser.php
  14. 5
      src/CoreBundle/Entity/SessionRelUser.php
  15. 24
      src/CoreBundle/Entity/Skill.php
  16. 19
      src/CoreBundle/Entity/SkillRelUser.php
  17. 31
      src/CourseBundle/Entity/CItemProperty.php
  18. 1
      src/CourseBundle/Entity/CTool.php

@ -13,6 +13,15 @@ use Doctrine\ORM\Mapping as ORM;
*/ */
class AccessUrl class AccessUrl
{ {
/**
* @var int
*
* @ORM\Column(name="id", type="integer", precision=0, scale=0, nullable=false, unique=false)
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
*/
protected $id;
/** /**
* @ORM\OneToMany(targetEntity="AccessUrlRelCourse", mappedBy="url", cascade={"persist"}, orphanRemoval=true) * @ORM\OneToMany(targetEntity="AccessUrlRelCourse", mappedBy="url", cascade={"persist"}, orphanRemoval=true)
*/ */
@ -32,14 +41,7 @@ class AccessUrl
* @ORM\OneToMany(targetEntity="Chamilo\CoreBundle\Entity\SessionCategory", mappedBy="url", cascade={"persist"}, orphanRemoval=true) * @ORM\OneToMany(targetEntity="Chamilo\CoreBundle\Entity\SessionCategory", mappedBy="url", cascade={"persist"}, orphanRemoval=true)
*/ */
protected $sessionCategory; protected $sessionCategory;
/**
* @var int
*
* @ORM\Column(name="id", type="integer", precision=0, scale=0, nullable=false, unique=false)
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
*/
protected $id;
/** /**
* @var string * @var string

@ -13,6 +13,15 @@ use Doctrine\ORM\Mapping as ORM;
*/ */
class AccessUrlRelCourse class AccessUrlRelCourse
{ {
/**
* @var int
*
* @ORM\Column(name="id", type="integer", precision=0, scale=0, nullable=false, unique=false)
* @ORM\Id
* @ORM\GeneratedValue()
*/
protected $id;
/** /**
* @ORM\ManyToOne(targetEntity="Course", inversedBy="urls", cascade={"persist"}) * @ORM\ManyToOne(targetEntity="Course", inversedBy="urls", cascade={"persist"})
* @ORM\JoinColumn(name="c_id", referencedColumnName="id") * @ORM\JoinColumn(name="c_id", referencedColumnName="id")
@ -24,21 +33,13 @@ class AccessUrlRelCourse
* @ORM\JoinColumn(name="access_url_id", referencedColumnName="id") * @ORM\JoinColumn(name="access_url_id", referencedColumnName="id")
*/ */
protected $url; protected $url;
/**
* @var int
*
* @ORM\Column(name="id", type="integer", precision=0, scale=0, nullable=false, unique=false)
* @ORM\Id
* @ORM\GeneratedValue()
*/
protected $id;
/** /**
* @return string * @return string
*/ */
public function __toString() public function __toString()
{ {
return strval('-'); return '-';
} }
/** /**

@ -41,7 +41,7 @@ class AccessUrlRelCourseCategory
* *
* @param int $accessUrlId * @param int $accessUrlId
* *
* @return AccessUrlRelSession * @return $this
*/ */
public function setAccessUrlId($accessUrlId) public function setAccessUrlId($accessUrlId)
{ {
@ -71,7 +71,7 @@ class AccessUrlRelCourseCategory
/** /**
* @param int $courseCategoryId * @param int $courseCategoryId
* *
* @return AccessUrlRelCourseCategory * @return $this
*/ */
public function setCourseCategoryId($courseCategoryId) public function setCourseCategoryId($courseCategoryId)
{ {

@ -13,6 +13,15 @@ use Doctrine\ORM\Mapping as ORM;
*/ */
class AccessUrlRelSession class AccessUrlRelSession
{ {
/**
* @var int
*
* @ORM\Column(name="id", type="integer", nullable=false, unique=false)
* @ORM\Id
* @ORM\GeneratedValue()
*/
protected $id;
/** /**
* @ORM\ManyToOne(targetEntity="Session", inversedBy="urls", cascade={"persist"}) * @ORM\ManyToOne(targetEntity="Session", inversedBy="urls", cascade={"persist"})
* @ORM\JoinColumn(name="session_id", referencedColumnName="id") * @ORM\JoinColumn(name="session_id", referencedColumnName="id")
@ -24,14 +33,7 @@ class AccessUrlRelSession
* @ORM\JoinColumn(name="access_url_id", referencedColumnName="id") * @ORM\JoinColumn(name="access_url_id", referencedColumnName="id")
*/ */
protected $url; protected $url;
/**
* @var int
*
* @ORM\Column(name="id", type="integer", nullable=false, unique=false)
* @ORM\Id
* @ORM\GeneratedValue()
*/
protected $id;
/** /**
* Get id. * Get id.

@ -38,6 +38,15 @@ class Course
const OPEN_WORLD = 3; const OPEN_WORLD = 3;
const HIDDEN = 4; const HIDDEN = 4;
/**
* @var int
*
* @ORM\Column(name="id", type="integer", nullable=false, unique=false)
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
*/
protected $id;
/** /**
* "orphanRemoval" is needed to delete the CourseRelUser relation * "orphanRemoval" is needed to delete the CourseRelUser relation
* in the CourseAdmin class. The setUsers, getUsers, removeUsers and * in the CourseAdmin class. The setUsers, getUsers, removeUsers and
@ -137,15 +146,6 @@ class Course
*/ */
protected $sharedSurveys; protected $sharedSurveys;
/**
* @var int
*
* @ORM\Column(name="id", type="integer", nullable=false, unique=false)
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
*/
protected $id;
/** /**
* @var string * @var string
* *
@ -365,7 +365,7 @@ class Course
*/ */
public function __toString() public function __toString()
{ {
return strval($this->getTitle()); return (string) $this->getTitle();
} }
/** /**
@ -714,6 +714,14 @@ class Course
return $this->title; return $this->title;
} }
/**
* @return string
*/
public function getTitleAndCode()
{
return $this->getTitle().' ('.$this->getCode().')';
}
/** /**
* Set description. * Set description.
* *
@ -1297,36 +1305,6 @@ class Course
return $this->issuedSkills; return $this->issuedSkills;
} }
/**
* Check if the course has a picture.
*
* @return bool
*/
public function hasPicture()
{
return file_exists(api_get_path(SYS_COURSE_PATH).$this->directory.'/course-pic85x85.png');
}
/**
* Get the course picture path.
*
* @param bool $fullSize
*
* @return null|string
*/
public function getPicturePath($fullSize = false)
{
if (!$this->hasPicture()) {
return null;
}
if ($fullSize) {
return api_get_path(WEB_COURSE_PATH).$this->directory.'/course-pic.png';
}
return api_get_path(WEB_COURSE_PATH).$this->directory.'/course-pic85x85.png';
}
/** /**
* @param CourseRelUser $subscription * @param CourseRelUser $subscription
* *
@ -1336,11 +1314,11 @@ class Course
{ {
if ($this->getUsers()->count()) { if ($this->getUsers()->count()) {
$criteria = Criteria::create()->where( $criteria = Criteria::create()->where(
Criteria::expr()->eq("user", $subscription->getUser()) Criteria::expr()->eq('user', $subscription->getUser())
)->andWhere( )->andWhere(
Criteria::expr()->eq("status", $subscription->getStatus()) Criteria::expr()->eq('status', $subscription->getStatus())
)->andWhere( )->andWhere(
Criteria::expr()->eq("relationType", $subscription->getRelationType()) Criteria::expr()->eq('relationType', $subscription->getRelationType())
); );
$relation = $this->getUsers()->matching($criteria); $relation = $this->getUsers()->matching($criteria);

@ -23,10 +23,6 @@ use Doctrine\ORM\Mapping as ORM;
*/ */
class CourseCategory class CourseCategory
{ {
/**
* @ORM\OneToMany(targetEntity="CourseCategory", mappedBy="parent")
*/
protected $children;
/** /**
* @var int * @var int
* *
@ -36,6 +32,12 @@ class CourseCategory
*/ */
protected $id; protected $id;
/**
* @ORM\OneToMany(targetEntity="CourseCategory", mappedBy="parent")
*/
protected $children;
/** /**
* @var string * @var string
* *

@ -13,6 +13,15 @@ use Doctrine\ORM\Mapping as ORM;
*/ */
class CourseModule class CourseModule
{ {
/**
* @var int
*
* @ORM\Column(name="id", type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="IDENTITY")
*/
protected $id;
/** /**
* @var string * @var string
* *
@ -55,15 +64,6 @@ class CourseModule
*/ */
protected $position; protected $position;
/**
* @var int
*
* @ORM\Column(name="id", type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="IDENTITY")
*/
protected $id;
/** /**
* Set name. * Set name.
* *

@ -21,6 +21,15 @@ use Doctrine\ORM\Mapping as ORM;
*/ */
class CourseRelUser class CourseRelUser
{ {
/**
* @var int
*
* @ORM\Column(name="id", type="integer", nullable=false, unique=false)
* @ORM\Id
* @ORM\GeneratedValue
*/
protected $id;
/** /**
* @ORM\ManyToOne(targetEntity="Chamilo\UserBundle\Entity\User", inversedBy="courses", cascade={"persist"}) * @ORM\ManyToOne(targetEntity="Chamilo\UserBundle\Entity\User", inversedBy="courses", cascade={"persist"})
* @ORM\JoinColumn(name="user_id", referencedColumnName="id") * @ORM\JoinColumn(name="user_id", referencedColumnName="id")
@ -32,14 +41,6 @@ class CourseRelUser
* @ORM\JoinColumn(name="c_id", referencedColumnName="id") * @ORM\JoinColumn(name="c_id", referencedColumnName="id")
*/ */
protected $course; protected $course;
/**
* @var int
*
* @ORM\Column(name="id", type="integer", precision=0, scale=0, nullable=false, unique=false)
* @ORM\Id
* @ORM\GeneratedValue
*/
protected $id;
/** /**
* @var int * @var int
@ -47,14 +48,14 @@ class CourseRelUser
* @todo use status instead of this * @todo use status instead of this
* *
* @deprecated * @deprecated
* @ORM\Column(name="relation_type", type="integer", precision=0, scale=0, nullable=false, unique=false) * @ORM\Column(name="relation_type", type="integer", nullable=false, unique=false)
*/ */
protected $relationType; protected $relationType;
/** /**
* @var bool * @var bool
* *
* @ORM\Column(name="status", type="integer", precision=0, scale=0, nullable=false, unique=false) * @ORM\Column(name="status", type="integer", nullable=false, unique=false)
*/ */
protected $status; protected $status;
@ -68,21 +69,21 @@ class CourseRelUser
/** /**
* @var int * @var int
* *
* @ORM\Column(name="sort", type="integer", precision=0, scale=0, nullable=true, unique=false) * @ORM\Column(name="sort", type="integer", nullable=true, unique=false)
*/ */
protected $sort; protected $sort;
/** /**
* @var int * @var int
* *
* @ORM\Column(name="user_course_cat", type="integer", precision=0, scale=0, nullable=true, unique=false) * @ORM\Column(name="user_course_cat", type="integer", nullable=true, unique=false)
*/ */
protected $userCourseCat; protected $userCourseCat;
/** /**
* @var int * @var int
* *
* @ORM\Column(name="legal_agreement", type="integer", precision=0, scale=0, nullable=true, unique=false) * @ORM\Column(name="legal_agreement", type="integer", nullable=true, unique=false)
*/ */
protected $legalAgreement; protected $legalAgreement;
@ -99,7 +100,7 @@ class CourseRelUser
*/ */
public function __toString() public function __toString()
{ {
return strval($this->getCourse()->getCode()); return (string) $this->getCourse()->getCode();
} }
/** /**

@ -21,6 +21,15 @@ use Doctrine\ORM\Mapping as ORM;
*/ */
class CourseRelUserCatalogue class CourseRelUserCatalogue
{ {
/**
* @var int
*
* @ORM\Column(name="id", type="integer", nullable=false, unique=false)
* @ORM\Id
* @ORM\GeneratedValue
*/
protected $id;
/** /**
* @ORM\ManyToOne(targetEntity="Chamilo\UserBundle\Entity\User", inversedBy="courses", cascade={"persist"}) * @ORM\ManyToOne(targetEntity="Chamilo\UserBundle\Entity\User", inversedBy="courses", cascade={"persist"})
* @ORM\JoinColumn(name="user_id", referencedColumnName="id") * @ORM\JoinColumn(name="user_id", referencedColumnName="id")
@ -32,14 +41,6 @@ class CourseRelUserCatalogue
* @ORM\JoinColumn(name="c_id", referencedColumnName="id") * @ORM\JoinColumn(name="c_id", referencedColumnName="id")
*/ */
protected $course; protected $course;
/**
* @var int
*
* @ORM\Column(name="id", type="integer", precision=0, scale=0, nullable=false, unique=false)
* @ORM\Id
* @ORM\GeneratedValue
*/
protected $id;
/** /**
* @var bool * @var bool
@ -60,7 +61,7 @@ class CourseRelUserCatalogue
*/ */
public function __toString() public function __toString()
{ {
return strval($this->getCourse()->getCode()); return (string) $this->getCourse()->getCode();
} }
/** /**

@ -9,7 +9,7 @@ use Doctrine\ORM\Mapping as ORM;
* Legal. * Legal.
* *
* @ORM\Table(name="legal") * @ORM\Table(name="legal")
* @ORM\Entity * @ORM\Entity(repositoryClass="Chamilo\CoreBundle\Entity\Repository\LegalRepository")
*/ */
class Legal class Legal
{ {

@ -51,7 +51,7 @@ class PortfolioCategory
* @var User * @var User
* *
* @ORM\ManyToOne(targetEntity="Chamilo\UserBundle\Entity\User") * @ORM\ManyToOne(targetEntity="Chamilo\UserBundle\Entity\User")
* @ORM\JoinColumn(name="user_id", referencedColumnName="id", nullable=false) * @ORM\JoinColumn(name="user_id", referencedColumnName="id", nullable=false, onDelete="CASCADE")
*/ */
protected $user; protected $user;

@ -38,6 +38,15 @@ class Session
const DRH = 1; const DRH = 1;
const COACH = 2; const COACH = 2;
/**
* @var int
*
* @ORM\Column(name="id", type="integer", nullable=false, unique=false)
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
*/
protected $id;
/** /**
* @var ArrayCollection * @var ArrayCollection
* @ORM\OneToMany(targetEntity="SessionRelCourse", mappedBy="session", cascade={"persist"}, orphanRemoval=true) * @ORM\OneToMany(targetEntity="SessionRelCourse", mappedBy="session", cascade={"persist"}, orphanRemoval=true)
@ -76,15 +85,6 @@ class Session
*/ */
protected $currentUrl; protected $currentUrl;
/**
* @var int
*
* @ORM\Column(name="id", type="integer", nullable=false, unique=false)
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
*/
protected $id;
/** /**
* @var string * @var string
* *
@ -382,11 +382,11 @@ class Session
{ {
if ($this->getUsers()->count()) { if ($this->getUsers()->count()) {
$criteria = Criteria::create()->where( $criteria = Criteria::create()->where(
Criteria::expr()->eq("user", $subscription->getUser()) Criteria::expr()->eq('user', $subscription->getUser())
)->andWhere( )->andWhere(
Criteria::expr()->eq("session", $subscription->getSession()) Criteria::expr()->eq('session', $subscription->getSession())
)->andWhere( )->andWhere(
Criteria::expr()->eq("relationType", $subscription->getRelationType()) Criteria::expr()->eq('relationType', $subscription->getRelationType())
); );
$relation = $this->getUsers()->matching($criteria); $relation = $this->getUsers()->matching($criteria);
@ -435,7 +435,7 @@ class Session
{ {
if ($this->getCourses()->count()) { if ($this->getCourses()->count()) {
$criteria = Criteria::create()->where( $criteria = Criteria::create()->where(
Criteria::expr()->eq("course", $course) Criteria::expr()->eq('course', $course)
); );
$relation = $this->getCourses()->matching($criteria); $relation = $this->getCourses()->matching($criteria);
@ -551,7 +551,7 @@ class Session
* *
* @param string $name * @param string $name
* *
* @return Session * @return $this
*/ */
public function setName($name) public function setName($name)
{ {
@ -575,7 +575,7 @@ class Session
* *
* @param string $description * @param string $description
* *
* @return Session * @return $this
*/ */
public function setDescription($description) public function setDescription($description)
{ {
@ -1071,11 +1071,11 @@ class Session
{ {
if ($this->getUserCourseSubscriptions()->count()) { if ($this->getUserCourseSubscriptions()->count()) {
$criteria = Criteria::create()->where( $criteria = Criteria::create()->where(
Criteria::expr()->eq("user", $subscription->getUser()) Criteria::expr()->eq('user', $subscription->getUser())
)->andWhere( )->andWhere(
Criteria::expr()->eq("course", $subscription->getCourse()) Criteria::expr()->eq('course', $subscription->getCourse())
)->andWhere( )->andWhere(
Criteria::expr()->eq("session", $subscription->getSession()) Criteria::expr()->eq('session', $subscription->getSession())
); );
$relation = $this->getUserCourseSubscriptions()->matching($criteria); $relation = $this->getUserCourseSubscriptions()->matching($criteria);
@ -1146,7 +1146,7 @@ class Session
/** /**
* Get user from course by status. * Get user from course by status.
* *
* @param \Chamilo\CoreBundle\Entity\Course $course * @param Course $course
* @param int $status * @param int $status
* *
* @return \Doctrine\Common\Collections\ArrayCollection|\Doctrine\Common\Collections\Collection * @return \Doctrine\Common\Collections\ArrayCollection|\Doctrine\Common\Collections\Collection
@ -1155,35 +1155,15 @@ class Session
{ {
$criteria = Criteria::create() $criteria = Criteria::create()
->where( ->where(
Criteria::expr()->eq("course", $course) Criteria::expr()->eq('course', $course)
) )
->andWhere( ->andWhere(
Criteria::expr()->eq("status", $status) Criteria::expr()->eq('status', $status)
); );
return $this->userCourseSubscriptions->matching($criteria); return $this->userCourseSubscriptions->matching($criteria);
} }
public function getBuyCoursePluginPrice()
{
// start buycourse validation
// display the course price and buy button if the buycourses plugin is enabled and this course is configured
$plugin = \BuyCoursesPlugin::create();
$isThisCourseInSale = $plugin->buyCoursesForGridCatalogValidator($this->id, \BuyCoursesPlugin::PRODUCT_TYPE_SESSION);
$return = [];
if ($isThisCourseInSale) {
// set the Price label
$return['html'] = $isThisCourseInSale['html'];
// set the Buy button instead register.
if ($isThisCourseInSale['verificator']) {
$return['buy_button'] = $plugin->returnBuyCourseButton($this->id, \BuyCoursesPlugin::PRODUCT_TYPE_SESSION);
}
}
// end buycourse validation
return $return;
}
/** /**
* @param ArrayCollection $studentPublications * @param ArrayCollection $studentPublications
* *

@ -28,6 +28,15 @@ class SessionRelCourseRelUser
2 => 'course_coach', 2 => 'course_coach',
]; ];
/**
* @var int
*
* @ORM\Column(name="id", type="integer", nullable=false, unique=false)
* @ORM\Id
* @ORM\GeneratedValue
*/
protected $id;
/** /**
* @var User * @var User
* @ORM\ManyToOne(targetEntity="Chamilo\UserBundle\Entity\User", inversedBy="sessionCourseSubscriptions", cascade={"persist"}) * @ORM\ManyToOne(targetEntity="Chamilo\UserBundle\Entity\User", inversedBy="sessionCourseSubscriptions", cascade={"persist"})
@ -52,30 +61,21 @@ class SessionRelCourseRelUser
/** /**
* @var int * @var int
* *
* @ORM\Column(name="id", type="integer", precision=0, scale=0, nullable=false, unique=false) * @ORM\Column(name="visibility", type="integer", nullable=false, unique=false)
* @ORM\Id
* @ORM\GeneratedValue
*/
protected $id;
/**
* @var int
*
* @ORM\Column(name="visibility", type="integer", precision=0, scale=0, nullable=false, unique=false)
*/ */
protected $visibility; protected $visibility;
/** /**
* @var int * @var int
* *
* @ORM\Column(name="status", type="integer", precision=0, scale=0, nullable=false, unique=false) * @ORM\Column(name="status", type="integer", nullable=false, unique=false)
*/ */
protected $status; protected $status;
/** /**
* @var int * @var int
* *
* @ORM\Column(name="legal_agreement", type="integer", precision=0, scale=0, nullable=true, unique=false) * @ORM\Column(name="legal_agreement", type="integer", nullable=true, unique=false)
*/ */
protected $legalAgreement; protected $legalAgreement;

@ -23,6 +23,7 @@ class SessionRelUser
0 => 'student', 0 => 'student',
1 => 'drh', 1 => 'drh',
]; ];
/** /**
* @var int * @var int
* *
@ -30,7 +31,7 @@ class SessionRelUser
* @ORM\Id * @ORM\Id
* @ORM\GeneratedValue * @ORM\GeneratedValue
*/ */
protected $iid; protected $id;
/** /**
* @ORM\ManyToOne(targetEntity="Session", inversedBy="users", cascade={"persist"}) * @ORM\ManyToOne(targetEntity="Session", inversedBy="users", cascade={"persist"})
@ -90,7 +91,7 @@ class SessionRelUser
*/ */
public function __construct() public function __construct()
{ {
$this->moved_to = null; $this->movedTo = null;
$this->movedStatus = null; $this->movedStatus = null;
$this->movedAt = null; $this->movedAt = null;
$this->registeredAt = new \DateTime('now', new \DateTimeZone('UTC')); $this->registeredAt = new \DateTime('now', new \DateTimeZone('UTC'));

@ -261,30 +261,6 @@ class Skill
return $this->icon; return $this->icon;
} }
/**
* Get the icon (badge image) URL.
*
* @param bool $getSmall Optional. Allow get the small image
*
* @return string
*/
public function getWebIconPath($getSmall = false)
{
if ($getSmall) {
if (empty($this->icon)) {
return \Display::return_icon('badges-default.png', null, null, ICON_SIZE_BIG, null, true);
}
return api_get_path(WEB_UPLOAD_PATH).'badges/'.sha1($this->name).'-small.png';
}
if (empty($this->icon)) {
return \Display::return_icon('badges-default.png', null, null, ICON_SIZE_HUGE, null, true);
}
return api_get_path(WEB_UPLOAD_PATH)."badges/{$this->icon}";
}
/** /**
* Set criteria. * Set criteria.
* *

@ -24,6 +24,16 @@ use Doctrine\ORM\Mapping as ORM;
*/ */
class SkillRelUser class SkillRelUser
{ {
/**
* @var int
*
* @ORM\Column(name="id", type="integer")
* @ORM\Id
* @ORM\GeneratedValue
*/
protected $id;
/** /**
* @ORM\OneToMany(targetEntity="SkillRelUserComment", mappedBy="skillRelUser") * @ORM\OneToMany(targetEntity="SkillRelUserComment", mappedBy="skillRelUser")
*/ */
@ -39,15 +49,6 @@ class SkillRelUser
*/ */
protected $validationStatus; protected $validationStatus;
/**
* @var int
*
* @ORM\Column(name="id", type="integer")
* @ORM\Id
* @ORM\GeneratedValue
*/
protected $id;
/** /**
* @ORM\ManyToOne(targetEntity="Chamilo\UserBundle\Entity\User", inversedBy="achievedSkills", cascade={"persist"}) * @ORM\ManyToOne(targetEntity="Chamilo\UserBundle\Entity\User", inversedBy="achievedSkills", cascade={"persist"})
* @ORM\JoinColumn(name="user_id", referencedColumnName="id", nullable=false) * @ORM\JoinColumn(name="user_id", referencedColumnName="id", nullable=false)

@ -15,6 +15,22 @@ use Doctrine\ORM\Mapping as ORM;
*/ */
class CItemProperty class CItemProperty
{ {
/**
* @var int
*
* @ORM\Column(name="iid", type="integer")
* @ORM\Id
* @ORM\GeneratedValue
*/
protected $iid;
/**
* @var int
*
* @ORM\Column(name="id", type="integer", nullable=true)
*/
protected $id;
/** //, inversedBy="users", /** //, inversedBy="users",
* @ORM\ManyToOne(targetEntity="Chamilo\CoreBundle\Entity\Course", cascade={"persist"}) * @ORM\ManyToOne(targetEntity="Chamilo\CoreBundle\Entity\Course", cascade={"persist"})
* @ORM\JoinColumn(name="c_id", referencedColumnName="id") * @ORM\JoinColumn(name="c_id", referencedColumnName="id")
@ -44,21 +60,6 @@ class CItemProperty
* @ORM\JoinColumn(name="session_id", referencedColumnName="id") * @ORM\JoinColumn(name="session_id", referencedColumnName="id")
*/ */
protected $session; protected $session;
/**
* @var int
*
* @ORM\Column(name="iid", type="integer")
* @ORM\Id
* @ORM\GeneratedValue
*/
protected $iid;
/**
* @var int
*
* @ORM\Column(name="id", type="integer", nullable=true)
*/
protected $id;
/** /**
* @var string * @var string

@ -21,6 +21,7 @@ use Doctrine\ORM\Mapping as ORM;
class CTool class CTool
{ {
protected $originalImage; protected $originalImage;
/** /**
* @var int * @var int
* *

Loading…
Cancel
Save