Merge branch '1.11.x' of github.com:chamilo/chamilo-lms into 1.11.x

pull/2487/head
Yannick Warnier 10 years ago
commit 437377539b
  1. 4
      main/inc/ajax/install.ajax.php
  2. 134
      main/install/index.php
  3. 23
      main/install/install.lib.php
  4. 13
      plugin/bbb/README.md
  5. 189
      src/Chamilo/TicketBundle/Entity/Category.php
  6. 2
      src/Chamilo/TicketBundle/Entity/Priority.php

@ -38,7 +38,7 @@ switch ($action) {
// save contact information with web service
// create a client
$client = new nusoap_client('http://version.chamilo.org/contact.php?wsdl', true);
$client = new SoapClient('https://version.chamilo.org/contact.php?wsdl');
// call method ws_add_contact_information
$contact_params = array(
@ -53,7 +53,7 @@ switch ($action) {
'company_city' => $company_city
);
$result = $client->call('ws_add_contact_information', array('contact_params' => $contact_params));
$result = $client->__soapCall('ws_add_contact_information', array('contact_params' => $contact_params));
echo $result;
}

@ -15,7 +15,10 @@
* @package chamilo.install
*/
use ChamiloSession as Session;
use ChamiloSession as Session,
Chamilo\TicketBundle\Entity\Project as TicketProject,
Chamilo\TicketBundle\Entity\Category as TicketCategory,
Chamilo\TicketBundle\Entity\Priority as TicketPriority;
ini_set('display_errors', '1');
ini_set('log_errors', '1');
@ -367,34 +370,44 @@ if ($encryptPassForm == '1') {
});
function send_contact_information() {
var data_post = "";
data_post += "person_name="+$("#person_name").val()+"&";
data_post += "person_email="+$("#person_email").val()+"&";
data_post += "company_name="+$("#company_name").val()+"&";
data_post += "company_activity="+$("#company_activity option:selected").val()+"&";
data_post += "person_role="+$("#person_role option:selected").val()+"&";
data_post += "company_country="+$("#country option:selected").val()+"&";
data_post += "company_city="+$("#company_city").val()+"&";
data_post += "language="+$("#language option:selected").val()+"&";
data_post += "financial_decision="+$("input[@name='financial_decision']:checked").val();
$.ajax({
contentType: "application/x-www-form-urlencoded",
beforeSend: function(objeto) {},
type: "POST",
url: "<?php echo api_get_path(WEB_AJAX_PATH) ?>install.ajax.php?a=send_contact_information",
data: data_post,
success: function(datos) {
if (datos == 'required_field_error') {
message = "<?php echo get_lang('FormHasErrorsPleaseComplete') ?>";
} else if (datos == '1') {
message = "<?php echo get_lang('ContactInformationHasBeenSent') ?>";
} else {
message = "<?php echo get_lang('Error').': '.get_lang('ContactInformationHasNotBeenSent') ?>";
if (!document.getElementById('accept_licence').checked) {
alert('Debe aceptar la licencia para poder usar este software')
;return false;
} else {
var data_post = "";
data_post += "person_name="+$("#person_name").val()+"&";
data_post += "person_email="+$("#person_email").val()+"&";
data_post += "company_name="+$("#company_name").val()+"&";
data_post += "company_activity="+$("#company_activity option:selected").val()+"&";
data_post += "person_role="+$("#person_role option:selected").val()+"&";
data_post += "company_country="+$("#country option:selected").val()+"&";
data_post += "company_city="+$("#company_city").val()+"&";
data_post += "language="+$("#language option:selected").val()+"&";
data_post += "financial_decision="+$("input[name='financial_decision']:checked").val();
$.ajax({
contentType: "application/x-www-form-urlencoded",
beforeSend: function(objeto) {},
type: "POST",
url: "<?php echo api_get_path(WEB_AJAX_PATH) ?>install.ajax.php?a=send_contact_information",
beforeSend : function() {
$('#loader-button').append(' <em class="fa fa-spinner fa-pulse fa-fw"></em>');
},
data: data_post,
success: function(datos) {
if (datos == 'required_field_error') {
message = "<?php echo get_lang('FormHasErrorsPleaseComplete') ?>";
} else if (datos == '1') {
message = "<?php echo get_lang('ContactInformationHasBeenSent') ?>";
} else {
message = "<?php echo get_lang('Error').': '.get_lang('ContactInformationHasNotBeenSent') ?>";
}
alert(message);
$('#license-next').trigger('click');
$('#loader-button').html('');
}
alert(message);
}
});
});
}
}
</script>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo api_get_system_encoding(); ?>" />
@ -821,14 +834,14 @@ if (@$_POST['step2']) {
$connection->executeQuery('CREATE TABLE version (id int unsigned NOT NULL AUTO_INCREMENT, version varchar(255), PRIMARY KEY(id), UNIQUE(version))');
// Tickets
$table = Database::get_main_table(TABLE_TICKET_PROJECT);
$ticketProject = new TicketProject();
$ticketProject
->setId(1)
->setName('Ticket System')
->setInsertUserId(1);
// Default Project Table Ticket
$attributes = array(
'id' => 1,
'name' => 'Ticket System'
);
Database::insert($table, $attributes);
$manager->persist($ticketProject);
$manager->flush();
$categories = array(
get_lang('TicketEnrollment') => get_lang('TicketsAboutEnrollment'),
@ -840,29 +853,27 @@ if (@$_POST['step2']) {
);
$i = 1;
$table = Database::get_main_table(TABLE_TICKET_CATEGORY);
/**
* @var string $category
* @var string $description
*/
foreach ($categories as $category => $description) {
// Online evaluation requires a course
if ($i == 6) {
$attributes = array(
'id' => $i,
'name' => $category,
'description' => $description,
'project_id' => 1,
'course_required' => 1
);
} else {
$attributes = array(
'id' => $i,
'project_id' => 1,
'description' => $description,
'name' => $category,
'course_required' => 0
);
}
$ticketCategory = new TicketCategory();
$ticketCategory
->setId($i)
->setName($category)
->setDescription($description)
->setProject($ticketProject)
->setInsertUserId(1);
$isRequired = $i == 6;
$ticketCategory->setCourseRequired($isRequired);
$manager->persist($ticketCategory);
$manager->flush();
Database::insert($table, $attributes);
$i++;
}
@ -876,12 +887,15 @@ if (@$_POST['step2']) {
$table = Database::get_main_table(TABLE_TICKET_PRIORITY);
$i = 1;
foreach ($defaultPriorities as $code => $priority) {
$attributes = array(
'id' => $i,
'name' => $priority,
'code' => $code
);
Database::insert($table, $attributes);
$ticketPriority = new TicketPriority();
$ticketPriority
->setId($i)
->setName($priority)
->setCode($code)
->setInsertUserId(1);
$manager->persist($ticketPriority);
$manager->flush();
$i++;
}

@ -1136,14 +1136,6 @@ function display_license_agreement()
<?php echo get_lang('IAccept'); ?>
</label>
</div>
<button type="submit" class="btn btn-default" name="step1" value="&lt; <?php echo get_lang('Previous'); ?>" >
<em class="fa fa-backward"> </em> <?php echo get_lang('Previous'); ?>
</button>
<input type="hidden" name="is_executable" id="is_executable" value="-" />
<button type="submit" class="btn btn-success" name="step3" onclick="javascript: if(!document.getElementById('accept_licence').checked) { alert('<?php echo get_lang('YouMustAcceptLicence')?>');return false;}" value="<?php echo get_lang('Next'); ?> &gt;" >
<em class="fa fa-forward"> </em> <?php echo get_lang('Next'); ?>
</button>
</div>
</div>
<div class="row">
@ -1165,6 +1157,15 @@ function display_license_agreement()
<p><?php echo get_contact_registration_form() ?></p><br />
</div>
</div>
<button type="submit" class="btn btn-default" name="step1" value="&lt; <?php echo get_lang('Previous'); ?>" >
<em class="fa fa-backward"> </em> <?php echo get_lang('Previous'); ?>
</button>
<input type="hidden" name="is_executable" id="is_executable" value="-" />
<button type="submit" id="license-next" class="btn btn-success" name="step3" onclick="javascript: if(!document.getElementById('accept_licence').checked) { alert('<?php echo get_lang('YouMustAcceptLicence')?>');return false;}" value="<?php echo get_lang('Next'); ?> &gt;" >
<em class="fa fa-forward"> </em> <?php echo get_lang('Next'); ?>
</button>
<?php
}
@ -1176,7 +1177,7 @@ function get_contact_registration_form()
{
$html ='
<form class="form-horizontal">
<div class="form-horizontal">
<div class="panel panel-default">
<div class="panel-body">
<div id="div_sent_information"></div>
@ -1285,13 +1286,13 @@ function get_contact_registration_form()
<div class="clear"></div>
<div class="form-group">
<div class="col-sm-3">&nbsp;</div>
<div class="col-sm-9"><button type="button" class="btn btn-default" onclick="javascript:send_contact_information();" value="'.get_lang('SendInformation').'" ><em class="fa fa-floppy-o"></em> '.get_lang('SendInformation').'</button></div>
<div class="col-sm-9"><button type="button" class="btn btn-default" onclick="javascript:send_contact_information();" value="'.get_lang('SendInformation').'" ><em class="fa fa-floppy-o"></em> '.get_lang('SendInformation').'</button> <span id="loader-button"></span></div>
</div>
<div class="form-group">
<div class="col-sm-3">&nbsp;</div>
<div class="col-sm-9"><span class="form_required">*</span><small>'.get_lang('FieldRequired').'</small></div>
</div></div></div>
</form>';
</div>';
return $html;
}

@ -4,15 +4,24 @@ This plugin allows you to have videoconference rooms in each course.
It requires you to have a BigBlueButton videoconference server installed on another server (ideally).
Check www.bigbluebutton.org for more about BigBlueButton.
## Migrating from Chamilo LMS 1.9.x to 1.10.x
## Migrating to Chamilo LMS 1.10.x
For Chamilo 1.10.x, the Videoconference plugin has two new settings options: *Enable global conference* and *Enable conference in course groups*.
##### Database changes
You need execute this SQL query en your database after making the migration process from 1.9.x.
You need execute these SQL queries in your database after making the migration process from 1.9.x.
```sql
ALTER TABLE plugin_bbb_meeting ADD voice_bridge int NOT NULL DEFAULT 1;
ALTER TABLE plugin_bbb_meeting ADD group_id int unsigned NOT NULL DEFAULT 0;
```
## Migrating to Chamilo LMS 1.11.x
For Chamilo 1.11.x, Videoconference plugin has two new settings options:
##### Database changes
You need execute this SQL query in your database after making the Chamilo migration process from 1.10.x.
> If you are migrating from 1.9.x versions, you need execute the SQL queries from the migration to 1.10.x before.
```sql
ALTER TABLE plugin_bbb_meeting ADD user_id int unsigned NOT NULL DEFAULT 0;
ALTER TABLE plugin_bbb_meeting ADD access_url int NOT NULL DEFAULT 1;
```

@ -88,4 +88,193 @@ class Category
* @ORM\Column(name="sys_lastedit_datetime", type="datetime", nullable=true, unique=false)
*/
protected $lastEditDateTime;
/**
* Category constructor.
*/
public function __construct()
{
$this->totalTickets = 0;
$this->insertDateTime = new \DateTime();
}
/**
* @return int
*/
public function getId()
{
return $this->id;
}
/**
* @param int $id
* @return Category
*/
public function setId($id)
{
$this->id = $id;
return $this;
}
/**
* @return string
*/
public function getName()
{
return $this->name;
}
/**
* @param string $name
* @return Category
*/
public function setName($name)
{
$this->name = $name;
return $this;
}
/**
* @return string
*/
public function getDescription()
{
return $this->description;
}
/**
* @param string $description
* @return Category
*/
public function setDescription($description)
{
$this->description = $description;
return $this;
}
/**
* @return int
*/
public function getTotalTickets()
{
return $this->totalTickets;
}
/**
* @param int $totalTickets
* @return Category
*/
public function setTotalTickets($totalTickets)
{
$this->totalTickets = $totalTickets;
return $this;
}
/**
* @return boolean
*/
public function isCourseRequired()
{
return $this->courseRequired;
}
/**
* @param boolean $courseRequired
* @return Category
*/
public function setCourseRequired($courseRequired)
{
$this->courseRequired = $courseRequired;
return $this;
}
/**
* @return Project
*/
public function getProject()
{
return $this->project;
}
/**
* @param Project $project
* @return Category
*/
public function setProject($project)
{
$this->project = $project;
return $this;
}
/**
* @return int
*/
public function getInsertUserId()
{
return $this->insertUserId;
}
/**
* @param int $insertUserId
* @return Category
*/
public function setInsertUserId($insertUserId)
{
$this->insertUserId = $insertUserId;
return $this;
}
/**
* @return \DateTime
*/
public function getInsertDateTime()
{
return $this->insertDateTime;
}
/**
* @param \DateTime $insertDateTime
* @return Category
*/
public function setInsertDateTime($insertDateTime)
{
$this->insertDateTime = $insertDateTime;
return $this;
}
/**
* @return int
*/
public function getLastEditUserId()
{
return $this->lastEditUserId;
}
/**
* @param int $lastEditUserId
* @return Category
*/
public function setLastEditUserId($lastEditUserId)
{
$this->lastEditUserId = $lastEditUserId;
return $this;
}
/**
* @return \DateTime
*/
public function getLastEditDateTime()
{
return $this->lastEditDateTime;
}
/**
* @param \DateTime $lastEditDateTime
* @return Category
*/
public function setLastEditDateTime($lastEditDateTime)
{
$this->lastEditDateTime = $lastEditDateTime;
return $this;
}
}

@ -94,6 +94,8 @@ class Priority
public function __construct()
{
$this->insertDateTime = new \DateTime();
$this->color = '';
$this->urgency = '';
}
/**

Loading…
Cancel
Save