Internal - Fix entities, format code

pull/3543/head
Julio Montoya 5 years ago
parent 9671942029
commit 241b61b0ed
  1. 4
      public/main/gradebook/lib/fe/catform.class.php
  2. 10
      public/main/gradebook/lib/fe/evalform.class.php
  3. 2
      public/main/gradebook/lib/fe/linkform.class.php
  4. 18
      src/CoreBundle/Entity/SysCalendar.php
  5. 2
      src/CourseBundle/Entity/CCalendarEventAttachment.php
  6. 3
      src/CourseBundle/Entity/CForumCategory.php
  7. 1
      src/CourseBundle/Entity/CForumPost.php
  8. 1
      src/CourseBundle/Entity/CGroupCategory.php
  9. 1
      src/CourseBundle/Entity/CLinkCategory.php
  10. 1
      src/CourseBundle/Entity/CLpItem.php
  11. 10
      src/CourseBundle/Entity/CStudentPublicationComment.php
  12. 10
      src/CourseBundle/Entity/CStudentPublicationRelDocument.php
  13. 10
      src/CourseBundle/Entity/CStudentPublicationRelUser.php
  14. 1
      src/CourseBundle/Entity/CThematic.php
  15. 6
      src/CourseBundle/Entity/CTool.php

@ -79,9 +79,9 @@ class CatForm extends FormValidator
$line .= '--';
}
if ($cat[0] != $this->category_object->get_parent_id()) {
$select->addoption($line.' '.$cat[1], $cat[0]);
$select->addOption($line.' '.$cat[1], $cat[0]);
} else {
$select->addoption($line.' '.$cat[1], $cat[0], 'disabled');
$select->addOption($line.' '.$cat[1], $cat[0], 'disabled');
}
$line = '';
}

@ -145,7 +145,7 @@ class EvalForm extends FormValidator
foreach ($this->evaluation_object->get_not_subscribed_students() as $user) {
if ((!isset($this->extra)) || empty($this->extra) || api_strtoupper(api_substr($user[1], 0, 1)) == $this->extra
) {
$select->addoption($user[1].' '.$user[2].' ('.$user[3].')', $user[0]);
$select->addOption($user[1].' '.$user[2].' ('.$user[3].')', $user[0]);
}
}
$this->addButtonCreate(get_lang('Add users to evaluation'), 'submit_button');
@ -294,7 +294,7 @@ class EvalForm extends FormValidator
for ($i = 0; $i < $cat[2]; $i++) {
$line .= '&mdash;';
}
$select->addoption($line.' '.$cat[1], $cat[0]);
$select->addOption($line.' '.$cat[1], $cat[0]);
$line = '';
}
$this->addButtonSave(get_lang('Validate'), 'submit');
@ -571,14 +571,14 @@ class EvalForm extends FormValidator
if (empty($grade_model_id)) {
if (0 == $my_cat->get_parent_id()) {
$default_weight = $my_cat->get_weight();
$select_gradebook->addoption(get_lang('Default'), $my_cat->get_id());
$select_gradebook->addOption(get_lang('Default'), $my_cat->get_id());
$cats_added[] = $my_cat->get_id();
} else {
$select_gradebook->addoption($my_cat->get_name(), $my_cat->get_id());
$select_gradebook->addOption($my_cat->get_name(), $my_cat->get_id());
$cats_added[] = $my_cat->get_id();
}
} else {
$select_gradebook->addoption(get_lang('Select'), 0);
$select_gradebook->addOption(get_lang('Select'), 0);
}
if ($this->evaluation_object->get_category_id() == $my_cat->get_id()) {
$default_weight = $my_cat->get_weight();

@ -74,7 +74,7 @@ class LinkForm extends FormValidator
for ($i = 0; $i < $cat[2]; $i++) {
$line .= '&mdash;';
}
$select->addoption($line.' '.$cat[1], $cat[0]);
$select->addOption($line.' '.$cat[1], $cat[0]);
$line = '';
}
$this->addElement('submit', null, get_lang('Validate'));

@ -14,6 +14,15 @@ use Doctrine\ORM\Mapping as ORM;
*/
class SysCalendar
{
/**
* @var int
*
* @ORM\Column(name="id", type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="IDENTITY")
*/
protected $id;
/**
* @var string
*
@ -56,15 +65,6 @@ class SysCalendar
*/
protected $allDay;
/**
* @var int
*
* @ORM\Column(name="id", type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="IDENTITY")
*/
protected $id;
/**
* Set title.
*

@ -68,7 +68,7 @@ class CCalendarEventAttachment extends AbstractResource implements ResourceInter
/**
* @var CCalendarEvent
*
* @ORM\ManyToOne(targetEntity="Chamilo\CourseBundle\Entity\CCalendarEvent", cascade={"persist"}, inversedBy="attachments")
* @ORM\ManyToOne(targetEntity="CCalendarEvent", cascade={"persist"}, inversedBy="attachments")
* @ORM\JoinColumn(name="agenda_id", referencedColumnName="iid", onDelete="CASCADE")
*/
protected $event;

@ -85,7 +85,7 @@ class CForumCategory extends AbstractResource implements ResourceInterface
protected $catId;
/**
* @var ArrayCollection
* @var ArrayCollection|CForumForum[]
*
* @ORM\OneToMany(targetEntity="Chamilo\CourseBundle\Entity\CForumForum", mappedBy="forumCategory")
*/
@ -95,6 +95,7 @@ class CForumCategory extends AbstractResource implements ResourceInterface
{
$this->locked = 0;
$this->catId = 0;
$this->forums = new ArrayCollection();
}
public function __toString(): string

@ -136,6 +136,7 @@ class CForumPost extends AbstractResource implements ResourceInterface
public function __construct()
{
$this->postParentId = null;
$this->attachments = new ArrayCollection();
}
public function __toString(): string

@ -137,7 +137,6 @@ class CGroupCategory extends AbstractResource implements ResourceInterface
$this->selfRegAllowed = 0;
$this->selfUnregAllowed = 0;
$this->groupsPerUser = 0;
$this->announcementsState = 1;
$this->calendarState = 1;
$this->documentAccess = 1;

@ -62,6 +62,7 @@ class CLinkCategory extends AbstractResource implements ResourceInterface
public function __construct()
{
$this->displayOrder = 0;
$this->links = new ArrayCollection();
}
public function __toString(): string

@ -201,7 +201,6 @@ class CLpItem
*/
public function __construct()
{
$this->iid = 0;
$this->maxScore = 100.0;
}

@ -233,16 +233,6 @@ class CStudentPublicationComment extends AbstractResource implements ResourceInt
return $this->sentAt;
}
/**
* Get id.
*
* @return int
*/
public function getId()
{
return $this->id;
}
/**
* Resource identifier.
*/

@ -123,16 +123,6 @@ class CStudentPublicationRelDocument
return $this->cId;
}
/**
* Get id.
*
* @return int
*/
public function getId()
{
return $this->id;
}
/**
* @return int
*/

@ -122,14 +122,4 @@ class CStudentPublicationRelUser
{
return $this->cId;
}
/**
* Get id.
*
* @return int
*/
public function getId()
{
return $this->id;
}
}

@ -95,7 +95,6 @@ class CThematic extends AbstractResource implements ResourceInterface
public function __construct()
{
$this->id = 0;
$this->plans = new ArrayCollection();
$this->advances = new ArrayCollection();
}

@ -87,18 +87,16 @@ class CTool extends AbstractResource implements ResourceInterface
*/
public function __construct()
{
// Default values
$this->id = 0;
}
public function __toString(): string
{
return (string) $this->getName();
return $this->getName();
}
public function getName(): string
{
return $this->name;
return (string) $this->name;
}
public function setName(string $name): self

Loading…
Cancel
Save