Work: Rename property for calendar event #4769

pull/4781/head
Angel Fernando Quiroz Campos 3 years ago
parent 90760f657c
commit 3c7e89ce76
  1. 2
      public/main/work/work.lib.php
  2. 10
      src/CourseBundle/Entity/CStudentPublicationAssignment.php
  3. 2
      tests/CourseBundle/Repository/CStudentPublicationAssignmentRepositoryTest.php

@ -5205,7 +5205,7 @@ function updatePublicationAssignment($workId, $params, $courseInfo, $groupId)
}
$assignment
->setAddToCalendar($agendaId)
->setEventCalendarId($agendaId)
->setEnableQualification(1 === $qualification)
->setPublication($publication)
;

@ -26,7 +26,7 @@ class CStudentPublicationAssignment implements Stringable
protected ?DateTime $endsOn = null;
#[ORM\Column(name: 'add_to_calendar', type: 'integer', nullable: false)]
protected int $addToCalendar;
protected int $eventCalendarId;
#[ORM\Column(name: 'enable_qualification', type: 'boolean', nullable: false)]
protected bool $enableQualification;
@ -69,14 +69,14 @@ class CStudentPublicationAssignment implements Stringable
return $this;
}
public function getAddToCalendar(): int
public function getEventCalendarId(): int
{
return $this->addToCalendar;
return $this->eventCalendarId;
}
public function setAddToCalendar(int $addToCalendar): self
public function setEventCalendarId(int $eventCalendarId): self
{
$this->addToCalendar = $addToCalendar;
$this->eventCalendarId = $eventCalendarId;
return $this;
}

@ -38,7 +38,7 @@ class CStudentPublicationAssignmentRepositoryTest extends AbstractApiTest
$em->persist($publication);
$assignment = (new CStudentPublicationAssignment())
->setAddToCalendar(0)
->setEventCalendarId(0)
->setEnableQualification(true)
->setEndsOn(new DateTime())
->setExpiresOn(new DateTime())

Loading…
Cancel
Save