skala
Julio Montoya 13 years ago
commit d44b6e8a1d
  1. 0
      404.php
  2. 5
      documentation/changelog.html
  3. 62
      documentation/migration-checklist.html
  4. 6
      main/course_home/activity.php
  5. 14
      main/course_home/course_home.php
  6. 2
      main/course_home/vertical_activity.php
  7. 2
      main/inc/lib/course_home.lib.php
  8. 2
      main/inc/lib/mail.lib.inc.php
  9. 61
      plugin/bbb/bbb.lib.php
  10. 30
      plugin/bbb/start.php

@ -110,6 +110,11 @@ This version of Chamilo only includes new features:
<ul>
</ul>
</li>
<li>Videoconference
<ul>
<li>A fix was applied to avoid a bug in BigBlueButton by which all videoconference rooms are marked as "not running" (BT#3102). Financed by NoSoloRed</li>
</ul>
</li>
<li>Style changes
<ul>

@ -0,0 +1,62 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Chamilo Migration Checklist</title><link rel="stylesheet" href="default.css" type="text/css" media="screen,projection" />
<link rel="shortcut icon" href="../favicon.ico" type="image/x-icon" />
<style type="text/css">
<!--
page { width: 21cm; height: 29.7cm; margin: 2cm }
pre { font-family: "Courier New", monospace }
p { margin-bottom: 0.21cm }
.code {margin: 1em 1em 1em 2em; padding: 0.5em; background-color: rgb(229, 229, 229); vertical-align: top; border: 1px solid #999999;}
-->
</style>
</head>
<body>
<div id="header1">
<h1>Chamilo Migration Checklist</h1>
</div>
<a href="index.html">Documentation</a> &gt; Migration checklist
<div id="outerframe">
<div id="main">
<p>In seldom cases, Chamilo will generate a series of problems after a migration. This list is a helper designed mainly by <a href="http://www.beeznest.com/" target="_blank">BeezNest</a> after its many migration jobs assisting large companies to migrate this critical piece of software.</p>
<h2><b>Contents</b></h2>
<ol>
<li><a href="#1.Version-specific-issues">Version specific issues</a></li>
<li><a href="#2.Documents">Documents</a></li>
<li><a href="#3.Database-entries">Database entries</a></li>
</ol>
<h2><a name="1.Version-specific-issues"></a>1. Version specific issues</h2>
<p>Sadly, some issues happen over certain migrations and, so far, the difficulty of fixing things is still less than the difficulty of knowing exactly what to do to improve the migration script for all scenarios</p>
<h2><a name="2.Documents"></a>2. Documents</h2>
<ul>
<li>The worst that could happen is a change of codification while migrating from 1.8.5 to 1.8.8.4. Codification problems are nightmares because you generally get a limited number of characters you can freely change without affecting already existing files. Scrips can be made to ananlyse and fix most of the problems, but you will still need a lot of manual review before you can be sure you eliminated all problems</li>
</ul>
<h2><a name="3.Database-entries"></a>3. Database entries</h2>
<ul>
<li>Some users reported problems with quizzes: when migrating from 1.8.5 to 1.8.8.4, the quiz_question table has a question_order field filled with 1's. This generates a bug when using exercises marked random, as you only ever get one question to the test. <b>Solution:</b> update the question_order field to have sequential numbers.</li>
<li></li>
</ul>
<hr />
Don't have time or resources to optimize your Chamilo installation yourself? Hire an <a href="http://www.chamilo.org/en/providers">official Chamilo provider</a> and get it sorted out professionally by specialists.
<a href="http://validator.w3.org/check?uri=referer"><img src="http://www.w3.org/Icons/valid-xhtml10-blue" alt="Valid XHTML 1.0 Transitional" style="margin: 1em; float: right;" height="31" width="88" /></a>
<a href="http://jigsaw.w3.org/css-validator/">
<img src="http://jigsaw.w3.org/css-validator/images/vcss-blue" style="margin: 1em; float: right;" alt="Valid CSS" />
</a>
<hr />
<h2>Authors</h2>
<ul>
<li>Yannick Warnier, Zend Certified PHP Engineer, BeezNest Belgium SPRL, <a href="mailto:ywarnier@beeznest.net">ywarnier@beeznest.net</a></li>
</ul>
</body></html>

@ -20,13 +20,13 @@ require_once api_get_path(LIBRARY_PATH).'course_home.lib.php';
if (api_is_allowed_to_edit(null, true)) {
// HIDE
if (!empty($_GET['hide'])) {
$sql = "UPDATE $tool_table SET visibility=0 WHERE id='".intval($_GET["id"])."'";
$sql = "UPDATE $tool_table SET visibility=0 WHERE id=".intval($_GET['id']);
Database::query($sql);
Display::display_confirmation_message(get_lang('ToolIsNowHidden'));
} elseif (!empty($_GET['restore'])) {
// visibility 0,2 -> 1
// REACTIVATE
$sql = "UPDATE $tool_table SET visibility=1 WHERE id='".intval($_GET["id"])."'";
$sql = "UPDATE $tool_table SET visibility=1 WHERE id=".intval($_GET['id']);
Database::query($sql);
Display::display_confirmation_message(get_lang('ToolIsNowVisible'));
}
@ -120,7 +120,7 @@ if (api_is_allowed_to_edit(null, true) && !api_is_coach()) {
if ($theme == 'activity_big') {
$rows = 4;
}
$my_list = CourseHome::get_tools_category(TOOL_ADMIN_PLATEFORM);
$my_list = CourseHome::get_tools_category(TOOL_ADMIN_PLATFORM);
CourseHome::show_tools_category($my_list, $rows);
?>
</div>

@ -111,7 +111,7 @@ if (!isset($cidReq)) {
$classError = 'init';
$error_no[$classError][] = '2';
$error_level[$classError][] = 'info';
$error_msg[$classError][] = "[".__FILE__."][".__LINE__."] cidReq was Missing $cidReq take $dbname;";
$error_msg[$classError][] = "[".__FILE__."][".__LINE__."] cidReq was missing $cidReq take $dbname;";
}
if (isset($_SESSION['_gid'])) {
@ -134,7 +134,7 @@ define('TOOL_AUTHORING', 'toolauthoring');
define('TOOL_INTERACTION', 'toolinteraction');
define('TOOL_COURSE_PLUGIN', 'toolcourseplugin'); //all plugins that can be enabled in courses
define('TOOL_ADMIN', 'tooladmin');
define('TOOL_ADMIN_PLATEFORM', 'tooladminplatform');
define('TOOL_ADMIN_PLATFORM', 'tooladminplatform');
//define('TOOL_ADMIN_PLATFORM_VISIBLE', 'tooladminplatformvisible');
//define('TOOL_ADMIN_PLATFORM_INVISIBLE', 'tooladminplatforminvisible');
@ -159,11 +159,11 @@ api_session_unregister('toolgroup');
$is_speacialcourse = CourseManager::is_special_course($course_code);
if ($is_speacialcourse){
$autoreg = Security::remove_XSS($_GET['autoreg']);
if ($autoreg == 1) {
CourseManager::subscribe_user($user_id, $course_code, $status = STUDENT);
}
if ($is_speacialcourse) {
$autoreg = Security::remove_XSS($_GET['autoreg']);
if ($autoreg == 1) {
CourseManager::subscribe_user($user_id, $course_code, $status = STUDENT);
}
}
/* Is the user allowed here? */

@ -132,7 +132,7 @@ if (api_is_allowed_to_edit(null, true) && !api_is_coach()) {
<div class="courseadminview-activity-3col">
<span class="viewcaption"><?php echo get_lang('Administration'); ?></span>
<?php
$my_list = CourseHome::get_tools_category(TOOL_ADMIN_PLATEFORM);
$my_list = CourseHome::get_tools_category(TOOL_ADMIN_PLATFORM);
CourseHome::show_tools_category($my_list);
?>
</div>

@ -461,7 +461,7 @@ class CourseHome {
$result = Database::query($sql);
$col_link ="##003399";
break;
case TOOL_ADMIN_PLATEFORM:
case TOOL_ADMIN_PLATFORM:
$sql = "SELECT * FROM $course_tool_table WHERE category = 'admin' $condition_session ORDER BY id";
$result = Database::query($sql);
$col_link ="##003399";

@ -88,7 +88,7 @@ function api_mail($recipient_name, $recipient_email, $subject, $message, $sender
// Send the mail message.
if (!$mail->Send()) {
//echo 'ERROR: mail not sent to '.$recipient_name.' ('.$recipient_email.') because of '.$mail->ErrorInfo.'<br />';
error_log('ERROR: mail not sent to '.$recipient_name.' ('.$recipient_email.') because of '.$mail->ErrorInfo.'<br />');
return 0;
}

@ -183,7 +183,6 @@ function wc_isMeetingRunningURL($myIP,$mySecuritySalt,$myMeetingID) {
$queryStr = "meetingID=".$myMeetingID;
$checksum = sha1('isMeetingRunning'.$queryStr.$mySecuritySalt);
$secQueryURL = "http://".$myIP.$checkAPI.$queryStr."&checksum=".$checksum;
return $secQueryURL;
}
@ -276,8 +275,35 @@ function wc_listAttendees() {
/**
* This API is not yet supported in bigbluebutton
*/
function wc_getMeetingInfo() {
return false;
function wc_getMeetingInfo($myIP,$mySecuritySalt,$meetingID,$modPW) {
$checkAPI = "/bigbluebutton/api/getMeetingInfo?";
$queryStr = 'meetingID='.$meetingID.'&password='.$modPW;
$checksum = sha1('getMeetingInfo'.$queryStr.$mySecuritySalt);
$secQueryURL = "http://".$myIP.$checkAPI.$queryStr."&checksum=".$checksum;
$myResponse = @file_get_contents($secQueryURL);
if ($myResponse === false) { return false;}
$doc = new DOMDocument();
$doc->loadXML($myResponse);
$returnCodeNode = $doc->getElementsByTagName("returncode");
$returnCode = $returnCodeNode->item(0)->nodeValue;
$createTimeNode = $doc->getElementsByTagName("createTime");
$createTime = $createTimeNode->item(0)->nodeValue;
$runningNode = $doc->getElementsByTagName("running");
$running = $runningNode->item(0)->nodeValue;
$attendeesNode = $doc->getElementsByTagName("attendee");
$attendees = array();
foreach ($attendeesNode as $attendeeNode) {
$attendee = array();
if ($attendeeNode->childNodes->length) {
foreach ($attendeeNode->childNodes as $i) {
//see http://code.google.com/p/bigbluebutton/wiki/API#Get_Meeting_Info for details
$attendee[$i->nodeName] = $i->nodeValue;
}
}
$attendees[] = $attendee;
}
$info = array('returnCode'=>$returnCode,'createTime'=>$createTime,'attendees'=>$attendees,'running'=>$running);
return $info;
}
/**
@ -313,3 +339,32 @@ function wc_needUpgrade() {
}
return $returnValue;
}
/**
* Gets a list of all meetings currently running
*/
function wc_getRunningMeetings($myIP,$mySecuritySalt) {
$checkAPI = "/bigbluebutton/api/getMeetings?";
$queryStr = '';
$checksum = sha1('getMeetings'.$queryStr.$mySecuritySalt);
$secQueryURL = "http://".$myIP.$checkAPI.$queryStr."&checksum=".$checksum;
$myResponse = @file_get_contents($secQueryURL);
if ($myResponse === false) { return false;}
$doc = new DOMDocument();
$doc->loadXML($myResponse);
$returnCodeNode = $doc->getElementsByTagName("returncode");
$returnCode = $returnCodeNode->item(0)->nodeValue;
$meetingsNode = $doc->getElementsByTagName("meeting");
$meetings = array();
foreach ($meetingsNode as $meetingNode) {
$meeting = array();
if ($meetingNode->childNodes->length) {
foreach ($meetingNode->childNodes as $i) {
//see http://code.google.com/p/bigbluebutton/wiki/API#Get_Meetings for details
$meeting[$i->nodeName] = $i->nodeValue;
}
}
$meetings[] = $meeting;
}
return $meetings;
}

@ -44,12 +44,40 @@ $user_id = api_get_user_id();
$is_running = wc_isMeetingRunning($bbb_host,$bbb_salt,$meeting_name);
if ($is_running == 'true') {
// The conference is running, everything is fine, join
header('location: '.wc_joinMeetingURL($bbb_host,$bbb_salt,$full_user_name,$meeting_name,($teacher?$meeting_mod_pw:$meeting_att_pw),$user_id));
exit;
} else { //$is_running = false or 'false'
// The conference room does not seem to be running...
// First, try harder and ignore the "running" status
$meetings = wc_getRunningMeetings($bbb_host,$bbb_salt);
$found = false;
foreach ($meetings as $meeting) {
//Try to find our meeting room in the list...
if ($meeting['meetingID'] == $meeting_name) {
$meeting_info = wc_getMeetingInfo($bbb_host,$bbb_salt,$meeting_name,$meeting_mod_pw);
error_log('Found passive meeting created '.($meeting_info['createTime']).' seconds ago with '.count($meeting_info['attendees']).' attendees - joining as '.($teacher?'teacher':'student'));
//if the user is a teacher, or if there are already attendees in
// the conference room, then allow joining it
if ($teacher or count($meeting_info['attendees'])>0) {
header('location: '.wc_joinMeetingURL($bbb_host,$bbb_salt,$full_user_name,$meeting_name,($teacher?$meeting_mod_pw:$meeting_att_pw),$user_id));
exit;
}
}
}
// That conference room is really not running or it has no
// accompanying moderator subscribed
if ($teacher) {
// The user is a teacher, so he has the right to create the
// room, so create it and join it
wc_createMeeting($bbb_host,$bbb_salt,$meeting_name,$meeting_name,$meeting_att_pw,$meeting_mod_pw,$meeting_wel_ms,api_get_path(WEB_COURSE_PATH).'/'.$ccode);
header('location: '.wc_joinMeetingURL($bbb_host,$bbb_salt,$full_user_name,$meeting_name,$meeting_mod_pw,$user_id));
header('location: '.wc_joinMeetingURL($bbb_host,$bbb_salt,$full_user_name,$meeting_name,($teacher?$meeting_mod_pw:$meeting_att_pw),$user_id));
exit;
} else {
// There is no conference room for this course and the user
// is a mere student, so he cannot start a conference room by
// himself: a teacher has to launch it first
header('location: '.api_get_path(WEB_COURSE_PATH).'/'.$ccode);
exit;
}
}

Loading…
Cancel
Save