Skip to content

Commit 541014e

Browse files
committed
Merge branch '1.11.x' of github.com:chamilo/chamilo-lms into 1.11.x
2 parents a4e274d + 5ca88d8 commit 541014e

File tree

3 files changed

+22
-5
lines changed

3 files changed

+22
-5
lines changed

main/auth/inscription.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -465,7 +465,9 @@
465465
$termExtraFields = new ExtraFieldValue('terms_and_condition');
466466
$values = $termExtraFields->getAllValuesByItem($term_preview['id']);
467467
foreach ($values as $value) {
468-
echo '<h3>'.$value['display_text'].'</h3><br />'.$value['value'].'<br />';
468+
if (!empty($value['value'])) {
469+
echo '<h3>'.get_lang($value['display_text']).'</h3><br />'.$value['value'].'<br />';
470+
}
469471
}
470472
} else {
471473
echo get_lang('ComingSoon');

plugin/zoom/Entity/Meeting.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -540,7 +540,12 @@ public function getIntroduction()
540540
{
541541
$introduction = sprintf('<h1>%s</h1>', $this->meetingInfoGet->topic);
542542
if (!$this->isGlobalMeeting()) {
543-
$introduction .= sprintf('<p>%s (%s)</p>', $this->formattedStartTime, $this->formattedDuration);
543+
if (!empty($this->formattedStartTime)) {
544+
$introduction .= $this->formattedStartTime;
545+
if (!empty($this->formattedDuration)) {
546+
$introduction .= '( '.$this->formattedDuration.')';
547+
}
548+
}
544549
}
545550
if ($this->user) {
546551
$introduction .= sprintf('<p>%s</p>', $this->user->getFullname());

plugin/zoom/lib/ZoomPlugin.php

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -341,9 +341,14 @@ public function deleteMeeting($meeting, $returnURL)
341341
if (null === $meeting) {
342342
return false;
343343
}
344+
344345
$em = Database::getManager();
345346
try {
346-
$meeting->getMeetingInfoGet()->delete();
347+
// No need to delete a instant meeting.
348+
if (\Chamilo\PluginBundle\Zoom\API\Meeting::TYPE_INSTANT != $meeting->getMeetingInfoGet()->type) {
349+
$meeting->getMeetingInfoGet()->delete();
350+
}
351+
347352
$em->remove($meeting);
348353
$em->flush();
349354

@@ -925,6 +930,7 @@ public function getStartOrJoinMeetingURL($meeting)
925930
}
926931

927932
if (\Chamilo\PluginBundle\Zoom\API\Meeting::TYPE_INSTANT == $meeting->getMeetingInfoGet()->type) {
933+
928934
return $meeting->getMeetingInfoGet()->join_url;
929935
}
930936

@@ -1217,9 +1223,11 @@ private function unregister($meeting, $registrants)
12171223
*/
12181224
private function startInstantMeeting($topic, $user = null, $course = null, $group = null, $session = null)
12191225
{
1226+
$meetingInfoGet = MeetingInfoGet::fromTopicAndType($topic, MeetingInfoGet::TYPE_INSTANT);
1227+
$meetingInfoGet->settings->approval_type = MeetingSettings::APPROVAL_TYPE_AUTOMATICALLY_APPROVE;
12201228
$meeting = $this->createMeetingFromMeeting(
12211229
(new Meeting())
1222-
->setMeetingInfoGet(MeetingInfoGet::fromTopicAndType($topic, MeetingInfoGet::TYPE_INSTANT))
1230+
->setMeetingInfoGet($meetingInfoGet)
12231231
->setUser($user)
12241232
->setGroup($group)
12251233
->setCourse($course)
@@ -1240,12 +1248,14 @@ private function startInstantMeeting($topic, $user = null, $course = null, $grou
12401248
private function createMeetingFromMeeting($meeting)
12411249
{
12421250
$currentUser = api_get_user_entity(api_get_user_id());
1243-
//$meeting->getMeetingInfoGet()->host_email = $currentUser->getEmail();
1251+
12441252
$meeting->getMeetingInfoGet()->settings->contact_email = $currentUser->getEmail();
12451253
$meeting->getMeetingInfoGet()->settings->contact_name = $currentUser->getFullname();
12461254
$recording = 'true' === $this->get('enableCloudRecording') ? 'cloud' : 'local';
12471255
$meeting->getMeetingInfoGet()->settings->auto_recording = $recording;
12481256
$meeting->getMeetingInfoGet()->settings->registrants_email_notification = false;
1257+
1258+
//$meeting->getMeetingInfoGet()->host_email = $currentUser->getEmail();
12491259
//$meeting->getMeetingInfoGet()->settings->alternative_hosts = $currentUser->getEmail();
12501260

12511261
// Send create to Zoom.

0 commit comments

Comments
 (0)