Fix display for students and remove error_logs - OpenMeetings plugin - refs BT#7046 refs #5491

1.9.x
Yannick Warnier 11 years ago
parent a6c10e8a91
commit d73e743263
  1. 3
      plugin/openmeetings/lib/openmeetings.class.php
  2. 2
      plugin/openmeetings/lib/openmeetings_gateway.php
  3. 11
      plugin/openmeetings/listing.php
  4. 2
      plugin/openmeetings/listing.tpl

@ -135,7 +135,7 @@ class OpenMeetings
$roomId = null;
$meetingData = \Database::select('*', $this->table, array('where' => array('c_id = ?' => $this->chamiloCourseId, ' AND session_id = ? ' => $this->chamiloSessionId)), 'first');
if ($meetingData != false && count($meetingData) > 0) {
error_log(print_r($meetingData,1));
//error_log(print_r($meetingData,1));
//error_log('Found previous room reference - reusing');
// There has been a room in the past for this course. It should
// still be on the server, so update (instead of creating a new one)
@ -349,6 +349,7 @@ class OpenMeetings
function getCourseMeetings()
{
$newMeetingsList = array();
$openMeeting = false;
$item = array();
$meetingsList = \Database::select('*', $this->table, array('where' => array('c_id = ? ' => api_get_course_int_id(), ' AND session_id = ? ' => api_get_session_id())));

@ -144,7 +144,7 @@ class OpenMeetingsGateway
. "&isDemoRoom=false"
. "&demoTime=0"
. "&isModeratedRoom=" . $this->var_to_str($isModeratedRoom));
error_log($url);
//error_log($url);
$result = $this->rest->call($url);
if ($result->fault) {

@ -76,14 +76,17 @@ $meetings = $om->getCourseMeetings();
if (!empty($meetings)) {
$meetings = array_reverse($meetings);
}
//error_log(__FILE__.':'.__LINE__.': '.print_r($meetings,1));
$openMeeting = false;
foreach ($meetings as $meeting) {
if ($meeting['status'] == 1) {
$openMeeting = true;
}
}
$users_online = $meetings->participantCount;
//$status = !$meetings->isClosed;
$status = $om->isServerRunning();
$meeting_exists = !$meetings->isClosed;//$om->meeting_exists(api_get_course_id());
$show_join_button = false;
if ($meeting_exists || $teacher) {
if ($openMeeting || $teacher) {
$show_join_button = true;
}

@ -6,7 +6,7 @@
<a href="{{ conference_url }}" target="_blank" class="btn btn-primary btn-large">
{{ 'EnterConference'|get_lang }}
</a>
<span id="users_online" class="label label-warning">{{ 'XUsersOnLine'| get_lang | format(users_online) }} </span>
<!--span id="users_online" class="label label-warning">{{ 'XUsersOnLine'| get_lang | format(users_online) }} </span-->
</div>
{% endif %}

Loading…
Cancel
Save