Plugins: Zoom - meeting activity, refactor code (WIP)

BT#17288
pull/3433/head
Julio Montoya 5 years ago
parent e435f5220d
commit 5810d8d691
  1. 2
      plugin/zoom/Entity/Meeting.php
  2. 32
      plugin/zoom/Entity/MeetingActivity.php
  3. 1
      plugin/zoom/lang/english.php
  4. 1
      plugin/zoom/lang/french.php
  5. 1
      plugin/zoom/lang/spanish.php
  6. 22
      plugin/zoom/view/activity.tpl

@ -119,7 +119,6 @@ class Meeting
* @var MeetingActivity[]|ArrayCollection
*
* @ORM\OneToMany(targetEntity="MeetingActivity", mappedBy="meeting", cascade={"persist", "remove"})
*
*/
protected $activities;
@ -127,7 +126,6 @@ class Meeting
* @var Registrant[]|ArrayCollection
*
* @ORM\OneToMany(targetEntity="Registrant", mappedBy="meeting", cascade={"persist", "remove"})
*
*/
protected $registrants;

@ -4,22 +4,8 @@
namespace Chamilo\PluginBundle\Zoom;
use Chamilo\CoreBundle\Entity\Course;
use Chamilo\CoreBundle\Entity\CourseRelUser;
use Chamilo\CoreBundle\Entity\Session;
use Chamilo\CoreBundle\Entity\SessionRelCourseRelUser;
use Chamilo\CourseBundle\Entity\CGroupInfo;
use Chamilo\PluginBundle\Zoom\API\MeetingInfoGet;
use Chamilo\PluginBundle\Zoom\API\MeetingListItem;
use Chamilo\PluginBundle\Zoom\API\MeetingSettings;
use Chamilo\UserBundle\Entity\User;
use Database;
use DateInterval;
use DateTime;
use DateTimeZone;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\ORM\Mapping as ORM;
use Exception;
/**
* Class Meeting.
@ -63,8 +49,16 @@ class MeetingActivity
*/
protected $event;
/**
* @var \DateTime
*
* @ORM\Column(name="created_at", type="datetime", nullable=false)
*/
protected $createdAt;
public function __construct()
{
$this->createdAt = new \DateTime();
}
/**
@ -143,6 +137,14 @@ class MeetingActivity
return $this;
}
/**
* @return DateTime
*/
public function getCreatedAt()
{
return $this->createdAt;
}
/**
* @return string
*/
@ -171,6 +173,4 @@ class MeetingActivity
return $this;
}
}

@ -140,3 +140,4 @@ $strings['Meetings'] = "Meetings";
$strings['ConferenceType'] = "Conference type";
$strings['ForEveryone'] = "Everyone";
$strings['SomeUsers'] = "Some users (Select later)";
$strings['Activity'] = "Activity";

@ -134,3 +134,4 @@ $strings['Recordings'] = "Enregistrements";
$strings['CreateGlobalVideoConference'] = "Créer une conférence global";
$strings['JoinURLNotAvailable'] = "URL pas disponible";
$strings['Meetings'] = "Conférences";
$strings['Activity'] = "Activité";

@ -134,3 +134,4 @@ $strings['Recordings'] = "Grabaciones";
$strings['CreateGlobalVideoConference'] = "Crear una videoconferencia global";
$strings['JoinURLNotAvailable'] = "URL no disponible";
$strings['Meetings'] = "Conferencias";
$strings['Activity'] = "Actividad";

@ -2,25 +2,39 @@
{{ meeting.typeName }} {{ meeting.meetingId }}
</h4>
<a class="btn btn-primary" href="meeting.php?meetingId={{ meeting.meetingId }}">
{{ 'Edit'|get_lang }}
</a>
<table class="table">
<thead>
<tr>
<th>{{ 'Name'|get_plugin_lang('ZoomPlugin') }}</th>
<th>{{ 'Type'|get_lang }}</th>
<th>{{ 'Event'|get_lang }} </th>
<th>{{ 'Action'|get_plugin_lang('ZoomPlugin') }}</th>
<th>{{ 'Date'|get_lang }}</th>
<th>{{ 'Details'|get_lang }} </th>
</tr>
</thead>
<tbody>
{% for activity in meeting.activities %}
<tr>
<td>
{{ activity.type }}
</td>
<td>
{{ activity.name }}
</td>
<td>
{{ activity.type }}
{{ activity.createdAt }}
</td>
<td>
{{ activity.eventDecoded }}
{% if activity.eventDecoded.registrant %}
{{ 'User' | get_lang }} :
{{ activity.eventDecoded.registrant.first_name }} -
{{ activity.eventDecoded.registrant.last_name }} -
{{ activity.eventDecoded.registrant.email }} -
{{ activity.eventDecoded.registrant.status }}
{% endif %}
</td>
</tr>
{% endfor %}

Loading…
Cancel
Save