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. 28
      plugin/zoom/view/activity.tpl
  7. 2
      plugin/zoom/view/meeting.tpl

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

@ -4,22 +4,8 @@
namespace Chamilo\PluginBundle\Zoom; 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 DateTime;
use DateTimeZone;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\ORM\Mapping as ORM; use Doctrine\ORM\Mapping as ORM;
use Exception;
/** /**
* Class Meeting. * Class Meeting.
@ -63,8 +49,16 @@ class MeetingActivity
*/ */
protected $event; protected $event;
/**
* @var \DateTime
*
* @ORM\Column(name="created_at", type="datetime", nullable=false)
*/
protected $createdAt;
public function __construct() public function __construct()
{ {
$this->createdAt = new \DateTime();
} }
/** /**
@ -143,6 +137,14 @@ class MeetingActivity
return $this; return $this;
} }
/**
* @return DateTime
*/
public function getCreatedAt()
{
return $this->createdAt;
}
/** /**
* @return string * @return string
*/ */
@ -171,6 +173,4 @@ class MeetingActivity
return $this; return $this;
} }
} }

@ -140,3 +140,4 @@ $strings['Meetings'] = "Meetings";
$strings['ConferenceType'] = "Conference type"; $strings['ConferenceType'] = "Conference type";
$strings['ForEveryone'] = "Everyone"; $strings['ForEveryone'] = "Everyone";
$strings['SomeUsers'] = "Some users (Select later)"; $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['CreateGlobalVideoConference'] = "Créer une conférence global";
$strings['JoinURLNotAvailable'] = "URL pas disponible"; $strings['JoinURLNotAvailable'] = "URL pas disponible";
$strings['Meetings'] = "Conférences"; $strings['Meetings'] = "Conférences";
$strings['Activity'] = "Activité";

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

@ -2,25 +2,39 @@
{{ meeting.typeName }} {{ meeting.meetingId }} {{ meeting.typeName }} {{ meeting.meetingId }}
</h4> </h4>
<a class="btn btn-primary" href="meeting.php?meetingId={{ meeting.meetingId }}">
{{ 'Edit'|get_lang }}
</a>
<table class="table"> <table class="table">
<thead> <thead>
<tr> <tr>
<th>{{ 'Name'|get_plugin_lang('ZoomPlugin') }}</th> <th>{{ 'Type'|get_lang }}</th>
<th>{{ 'Type'|get_lang }}</th> <th>{{ 'Action'|get_plugin_lang('ZoomPlugin') }}</th>
<th>{{ 'Event'|get_lang }} </th> <th>{{ 'Date'|get_lang }}</th>
</tr> <th>{{ 'Details'|get_lang }} </th>
</tr>
</thead> </thead>
<tbody> <tbody>
{% for activity in meeting.activities %} {% for activity in meeting.activities %}
<tr> <tr>
<td>
{{ activity.type }}
</td>
<td> <td>
{{ activity.name }} {{ activity.name }}
</td> </td>
<td> <td>
{{ activity.type }} {{ activity.createdAt }}
</td> </td>
<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> </td>
</tr> </tr>
{% endfor %} {% endfor %}

@ -17,7 +17,7 @@
</a> </a>
{% endif %} {% endif %}
<a class="btn btn-default" href="activity.php?meetingId={{ meeting.meetingId }}"> <a class="btn btn-default" href="activity.php?meetingId={{ meeting.meetingId }}">
{{ 'Activity'|get_plugin_lang('ZoomPlugin') }} {{ 'Activity'|get_plugin_lang('ZoomPlugin') }}
</a> </a>
{% endif %} {% endif %}

Loading…
Cancel
Save