Browse Source

Merge 1.10.x

Julio 9 years ago
parent
commit
6a3b6868ef

+ 10 - 1
app/Migrations/Schema/V110/Version20150603181728.php

@@ -28,7 +28,16 @@ class Version20150603181728 extends AbstractMigrationChamilo
      */
      */
     public function up(Schema $schema)
     public function up(Schema $schema)
     {
     {
-        $this->addSql('ALTER TABLE c_lp ADD max_attempts INT NOT NULL, ADD subscribe_users INT NOT NULL DEFAULT 0');
+        $table = $schema->getTable('c_lp');
+        if (!$table->hasColumn('max_attempts')) {
+            $this->addSql('ALTER TABLE c_lp ADD max_attempts INT NOT NULL');
+
+        }
+
+        if (!$table->hasColumn('subscribe_users')) {
+            $this->addSql('ALTER TABLE c_lp ADD subscribe_users INT NOT NULL DEFAULT 0');
+        }
+
         $this->addSql('
         $this->addSql('
             ALTER TABLE c_item_property
             ALTER TABLE c_item_property
             MODIFY c_id INT DEFAULT NULL,
             MODIFY c_id INT DEFAULT NULL,

+ 86 - 0
documentation/changelog.html

@@ -46,6 +46,92 @@
 <p><i>Note: most #wxyz references are issue numbers you can find in <a href="http://support.chamilo.org/projects/chamilo-18/issues" target="_blank">our public bug tracking system</a>. Some references marked BT#xyz are developments made externally for BeezNest customers and integrated into Chamilo. The details of these tasks cannot be seen for confidentiality reasons, but the code change is public and can be reviewed by anyone.</i></p>
 <p><i>Note: most #wxyz references are issue numbers you can find in <a href="http://support.chamilo.org/projects/chamilo-18/issues" target="_blank">our public bug tracking system</a>. Some references marked BT#xyz are developments made externally for BeezNest customers and integrated into Chamilo. The details of these tasks cannot be seen for confidentiality reasons, but the code change is public and can be reviewed by anyone.</i></p>
 <p>&nbsp;</p>
 <p>&nbsp;</p>
 
 
+    <a name="1.10.6"></a>
+
+    <h1>Chamilo 1.10.6 - ???, ?? of April 2016</h1>
+    <h3>Release notes - summary</h3>
+    <p>Chamilo 1.10.6 is a minor, bugfix release of the 1.10.x branch, with a few new features and bugfixes on top of 1.10.4.</p>
+    <h3>Release name</h3>
+    <p><a href="http://www.openstreetmap.org/node/1947201#map=14/51.3786/-2.3580">NNNh</a> .....</p>
+    <h3>Security fixes</h3>
+    <ul>
+        <li>None that we know of.</li>
+    </ul>
+    <h3>Possibly breaking changes</h3>
+    <ul>
+        <li>None that we know of.</li>
+    </ul>
+    <h3>Notable new Features</h3>
+    <h4>For end-users, teachers and Chamilo admins</h4>
+    <ul>
+        <li>(<a href="https://github.com/chamilo/chamilo-lms/commit/10729dea98234918de3e7e8c8718503ba5e2efbd">10729dea</a> - <a href="https://task.beeznest.com/issues/10952">BT#10952</a>) Add multiple attachment in agenda</li>
+        <li>(<a href="https://github.com/chamilo/chamilo-lms/commit/940fbdd51c97e6feecebbd156130ba8818d98ad8">940fbdd5</a> - <a href="https://task.beeznest.com/issues/10052">BT#10052</a>) Adding setting "exercise_enable_category_order"</li>
+        <li>(<a href="https://github.com/chamilo/chamilo-lms/commit/6b51fae1a37d3c7b3f7c656e3631cb2eb50d028e">6b51fae1</a> - <a href="https://task.beeznest.com/issues/10052">BT#10052</a>) Add function needed for BT#10052</li>
+    </ul>
+    <h4>For developers and sysadmins</h4>
+    <ul>
+        <li>(<a href="https://github.com/chamilo/chamilo-lms/commit/7b82a178a2059ca4784d66419ad8887d0745a5a0">7b82a178</a> - <a href="https://task.beeznest.com/issues/11005">BT#11005</a>) Save track_e_course_access before removing the session information</li>
+        <li>(<a href="https://github.com/chamilo/chamilo-lms/commit/12c7e7eccbf933ccf29306dcb720972792a9f8f2">12c7e7ec</a> - <a href="https://support.chamilo.org/issues/8175">#8175</a>) Use custom CKEditor</li>
+    </ul>
+
+    <h3>Improvements (minor features) and debug</h3>
+    <ul>
+        <li>(<a href="https://github.com/chamilo/chamilo-lms/commit/37d5af337e3ea895f6b5b7dec55e9dc4dbecfe2e">37d5af33</a>) Fix forms when adding/editing lp items</li>
+        <li>(<a href="https://github.com/chamilo/chamilo-lms/commit/36635d142199d3c8e6a5adbfd1b531dbbe85d318">36635d14</a>) Fix URL for create forum in lp</li>
+        <li>(<a href="https://github.com/chamilo/chamilo-lms/commit/1f0c917fc949132afbc50f070dd2bb3ef25f18a6">1f0c917f</a>) Fix report titles.</li>
+        <li>(<a href="https://github.com/chamilo/chamilo-lms/commit/90da1acf4666c7ec7e295d1d739cc0eb207cb68b">90da1acf</a>) Use api_get_course_info</li>
+        <li>(<a href="https://github.com/chamilo/chamilo-lms/commit/ece4c9d8f227f8fcf39bc4a2c995af8eb35c9d3b">ece4c9d8</a>) If in a session show all LPs not only LP added in session.</li>
+        <li>(<a href="https://github.com/chamilo/chamilo-lms/commit/5bcac3efc308d4c2dc4a6708f59b16bbc02c4206">5bcac3ef</a>) Fix constructor</li>
+        <li>(<a href="https://github.com/chamilo/chamilo-lms/commit/33dafb19fa049fa9b70263d4daf9fc0b8ab6292a">33dafb19</a> - <a href="https://task.beeznest.com/issues/11062">BT#11062</a>) Change scrollbar to scrollbar-light</li>
+        <li>(<a href="https://github.com/chamilo/chamilo-lms/commit/405b2c7bdf7918ef5a7c12f56a7b305eb74f3dd1">405b2c7b</a>) Add SMTP debug information</li>
+        <li>(<a href="https://github.com/chamilo/chamilo-lms/commit/10f30d19c69e5880cdca9d7adc19c1ccadb766ec">10f30d19</a>) Fix link</li>
+        <li>(<a href="https://github.com/chamilo/chamilo-lms/commit/5e5859107b0d6d247626bce7f6d1e308dc009bfc">5e585910</a>) Fix social group doesnt show in group list when adding an image (1.10.x)</li>
+        <li>(<a href="https://github.com/chamilo/chamilo-lms/commit/f34bae386d81c613c11411c921d81e7d9656cfd0">f34bae38</a> - <a href="https://support.chamilo.org/issues/8188">#8188</a>) Fix menu tabs (broken in 1.10.4)</li>
+        <li>(<a href="https://github.com/chamilo/chamilo-lms/commit/88b3acf7002421f9e7c60b1619d507bfd15c9d9d">88b3acf7</a> - <a href="https://support.chamilo.org/issues/8185">#8185</a>) Update bower assets</li>
+        <li>(<a href="https://github.com/chamilo/chamilo-lms/commit/cede17daf3925bfe56b108476dfb33140023d164">cede17da</a>) Use 1 setting instead of 2</li>
+        <li>(<a href="https://github.com/chamilo/chamilo-lms/commit/7f42c3251a15e3b91bc114fdd3db5ec8cb6dc04f">7f42c325</a>) Use __construct</li>
+        <li>(<a href="https://github.com/chamilo/chamilo-lms/commit/997288805472841bbfc3bf3caedf996f1db0acba">99728880</a> - <a href="https://support.chamilo.org/issues/8157">#8157</a>) Replace mysql with pdo_mysql extension</li>
+        <li>(<a href="https://github.com/chamilo/chamilo-lms/commit/c002d1e8f752b14e111e43ee65926eba37e558f7">c002d1e8</a>) Fix fatal error.</li>
+        <li>(<a href="https://github.com/chamilo/chamilo-lms/commit/64f6ccf359425a726f4be99df86c371ad59e9c16">64f6ccf3</a> - <a href="https://task.beeznest.com/issues/11021">BT#11021</a>) Remove button for download video file in lp</li>
+        <li>(<a href="https://github.com/chamilo/chamilo-lms/commit/380db06ab13e4524247999e92cb4065aeaf12ef1">380db06a</a> - <a href="https://task.beeznest.com/issues/11021">BT#11021</a>) Fix template for jplayer viewer</li>
+        <li>(<a href="https://github.com/chamilo/chamilo-lms/commit/ecf16fb37b0e14bd54ec624bf6055925f8d26366">ecf16fb3</a> - <a href="https://task.beeznest.com/issues/11021">BT#11021</a>) Show lp video items in iframe</li>
+        <li>(<a href="https://github.com/chamilo/chamilo-lms/commit/615a1224e97b16a510a65b1f9fe389f74aec011c">615a1224</a> - <a href="https://task.beeznest.com/issues/10936">BT#10936</a>) Set user id from function</li>
+        <li>(<a href="https://github.com/chamilo/chamilo-lms/commit/a231628dc85d72a6728c6b2a3360d8c94011817e">a231628d</a> - <a href="https://task.beeznest.com/issues/10936">BT#10936</a>) Fix fatal error</li>
+        <li>(<a href="https://github.com/chamilo/chamilo-lms/commit/db12470781fa479ed7c25d0a61af62eda07cb2af">db124707</a> - <a href="https://task.beeznest.com/issues/10936">BT#10936</a>) Fix fatal error</li>
+        <li>(<a href="https://github.com/chamilo/chamilo-lms/commit/8f864966c9bc725047b09270e21db891399fb1ab">8f864966</a> - <a href="https://support.chamilo.org/issues/8173">#8173</a>) Fix Renaming a document in upload document's form</li>
+        <li>(<a href="https://github.com/chamilo/chamilo-lms/commit/8f652341004346d57558183aa9f9134a97a58339">8f652341</a>) Fix select bootstrap overflow visible</li>
+        <li>(<a href="https://github.com/chamilo/chamilo-lms/commit/cec0161eff56dd0a81c778bfe24a2e7d618f1691">cec0161e</a> - <a href="https://support.chamilo.org/issues/8166">#8166</a>) Fix create course when doesn't exists an admin with id 1</li>
+        <li>(<a href="https://github.com/chamilo/chamilo-lms/commit/55c17b801c573e1f65fd036efaf1cd114040d3db">55c17b80</a> - <a href="https://task.beeznest.com/issues/10997">BT#10997</a>) Fix Migrations</li>
+        <li>(<a href="https://github.com/chamilo/chamilo-lms/commit/a1f5d466b7baec90de31b31a40a09f606e728404">a1f5d466</a> - <a href="https://support.chamilo.org/issues/8024">#8024</a>) Add clock-exercise.png</li>
+        <li>(<a href="https://github.com/chamilo/chamilo-lms/commit/d46b5c15141020c681d26fb46bd9242a6e5e12a1">d46b5c15</a> - <a href="https://support.chamilo.org/issues/8024">#8024</a>) Fixed css clock CT#8024</li>
+        <li>(<a href="https://github.com/chamilo/chamilo-lms/commit/4292a69177fb993561ad07aadce77fedfe0b4244">4292a691</a> - <a href="https://support.chamilo.org/issues/8154">#8154</a>) Fix attached files in mail</li>
+        <li>(<a href="https://github.com/chamilo/chamilo-lms/commit/6c56132f69b3124ed36d6a0f577b95bed6888580">6c56132f</a> - <a href="https://task.beeznest.com/issues/10997">BT#10997</a>) Remove condition hiding the user ID when teacher cannot subscribe students to course, because it causes the user_id data to be nullified, which prevents links to work properly</li>
+        <li>(<a href="https://github.com/chamilo/chamilo-lms/commit/bdb5a042a50d40c40b8775b241deb5b97b998d57">bdb5a042</a> - <a href="https://task.beeznest.com/issues/10979">BT#10979</a>) Fix and remove E_NOTICE when search_enabled is true</li>
+        <li>(<a href="https://github.com/chamilo/chamilo-lms/commit/798b6f52089b52092cd597b76eef0ec9e3a41c16">798b6f52</a> - <a href="https://support.chamilo.org/issues/8135">#8135</a>) Fix previous/next buttons in calendar</li>
+        <li>(<a href="https://github.com/chamilo/chamilo-lms/commit/28117fcfc2e04dcaa2528e589a45fcd72787db1f">28117fcf</a>) Fix issue with foreign keys when removing URLs and avoid a notice</li>
+        <li>(<a href="https://github.com/chamilo/chamilo-lms/commit/767d99cf540650ac8b43690986690f6c0964bb15">767d99cf</a> - <a href="https://task.beeznest.com/issues/10927">BT#10927</a>) Add from and too</li>
+        <li>(<a href="https://github.com/chamilo/chamilo-lms/commit/44706ef925530c642933112adc084cb313e05148">44706ef9</a> - <a href="https://support.chamilo.org/issues/8140">#8140</a>) Remove user from all portals</li>
+        <li>(<a href="https://github.com/chamilo/chamilo-lms/commit/9f4f4a53ded2d67fd9416a8d10137277bcd5fefa">9f4f4a53</a> - <a href="https://task.beeznest.com/issues/10979">BT#10979</a>) Fix E_NOTICEs when search_enabled is true</li>
+    </ul>
+    <h3>Stylesheets and theming</h3>
+    <ul>
+        <li>None that we know of.</li>
+    </ul>
+    <h3>Web services</h3>
+    <ul>
+        <li>None that we know of.</li>
+    </ul>
+    <h3>Removals</h3>
+    <ul>
+        <li>None that we know of.</li>
+    </ul>
+    <h3>Known issues</h3>
+    <ul>
+        <li>IMS/QTI import/export has issues</li>
+        <li>In Internet Explorer 9, learning paths might not show other pages than the first to be opened. We lacked computers with IE9 at the time of release of 1.10.4. Guaranteeing IE9 support will likely require additional services. See <a href="https://support.chamilo.org/issues/8075">the corresponding bug report</a></li>
+    </ul>
+
+
     <a name="1.10.4"></a>
     <a name="1.10.4"></a>
 
 
     <h1>Chamilo 1.10.4 - Bath, 22th of March 2016</h1>
     <h1>Chamilo 1.10.4 - Bath, 22th of March 2016</h1>

+ 2 - 1
main/exercice/exercise.class.php

@@ -127,6 +127,7 @@ class Exercise
 
 
         $id  = intval($id);
         $id  = intval($id);
         if (empty($this->course_id)) {
         if (empty($this->course_id)) {
+
             return false;
             return false;
         }
         }
         $sql = "SELECT * FROM $TBL_EXERCISES WHERE c_id = ".$this->course_id." AND id = ".$id;
         $sql = "SELECT * FROM $TBL_EXERCISES WHERE c_id = ".$this->course_id." AND id = ".$id;
@@ -5744,7 +5745,7 @@ class Exercise
      */
      */
     private function setMediaList($questionList)
     private function setMediaList($questionList)
     {
     {
-        $mediaList= array();
+        $mediaList = array();
         if (!empty($questionList)) {
         if (!empty($questionList)) {
             foreach ($questionList as $questionId) {
             foreach ($questionList as $questionId) {
                 $objQuestionTmp = Question::read($questionId, $this->course_id);
                 $objQuestionTmp = Question::read($questionId, $this->course_id);

+ 1 - 0
main/install/index.php

@@ -31,6 +31,7 @@ define('MAX_FORM_FIELD_LENGTH', 80);
 
 
 // Including necessary libraries.
 // Including necessary libraries.
 require_once '../inc/lib/api.lib.php';
 require_once '../inc/lib/api.lib.php';
+require_once '../inc/lib/text.lib.php';
 
 
 api_check_php_version('../inc/');
 api_check_php_version('../inc/');
 
 

+ 0 - 2
plugin/ticket/config.install.php

@@ -8,7 +8,5 @@
  */
  */
 
 
 require_once '../../main/inc/global.inc.php';
 require_once '../../main/inc/global.inc.php';
-require_once api_get_path(LIBRARY_PATH).'plugin.class.php';
-
 require_once 'src/ticket.class.php';
 require_once 'src/ticket.class.php';
 require_once 'src/ticket_plugin.class.php';
 require_once 'src/ticket_plugin.class.php';

+ 1 - 0
plugin/ticket/config.php

@@ -4,6 +4,7 @@
 /**
 /**
  * @package chamilo.plugin.ticket
  * @package chamilo.plugin.ticket
  */
  */
+
 /* Tables names constants */
 /* Tables names constants */
 define('PLUGIN_NAME', 'ticket');
 define('PLUGIN_NAME', 'ticket');
 define('TABLE_TICKET_ASSIGNED_LOG', 'plugin_ticket_assigned_log');
 define('TABLE_TICKET_ASSIGNED_LOG', 'plugin_ticket_assigned_log');

+ 7 - 4
plugin/ticket/database.php

@@ -1,4 +1,6 @@
 <?php
 <?php
+/* For licensing terms, see /license.txt */
+
 /**
 /**
  * Contains the SQL for the tickets management plugin database structure
  * Contains the SQL for the tickets management plugin database structure
  */
  */
@@ -42,6 +44,7 @@ $categoRow = array(
     $objPlugin->get_lang('VirtualCampus') => $objPlugin->get_lang('TicketsAboutVirtualCampus'),
     $objPlugin->get_lang('VirtualCampus') => $objPlugin->get_lang('TicketsAboutVirtualCampus'),
     $objPlugin->get_lang('OnlineEvaluation') => $objPlugin->get_lang('TicketsAboutOnlineEvaluation')
     $objPlugin->get_lang('OnlineEvaluation') => $objPlugin->get_lang('TicketsAboutOnlineEvaluation')
 );
 );
+
 $i = 1;
 $i = 1;
 foreach ($categoRow as $category => $description) {
 foreach ($categoRow as $category => $description) {
     //Online evaluation requires a course
     //Online evaluation requires a course
@@ -67,7 +70,7 @@ foreach ($categoRow as $category => $description) {
     Database::insert($table, $attributes);
     Database::insert($table, $attributes);
     $i++;
     $i++;
 }
 }
-//END default categories
+
 $table = Database::get_main_table(TABLE_TICKET_MESSAGE);
 $table = Database::get_main_table(TABLE_TICKET_MESSAGE);
 $sql = "CREATE TABLE IF NOT EXISTS ".$table." (
 $sql = "CREATE TABLE IF NOT EXISTS ".$table." (
         id int UNSIGNED NOT NULL AUTO_INCREMENT,
         id int UNSIGNED NOT NULL AUTO_INCREMENT,
@@ -117,6 +120,7 @@ $sql = "CREATE TABLE IF NOT EXISTS ".$table." (
         sys_lastedit_datetime datetime DEFAULT NULL,
         sys_lastedit_datetime datetime DEFAULT NULL,
         PRIMARY KEY (id))";
         PRIMARY KEY (id))";
 Database::query($sql);
 Database::query($sql);
+
 //Default Priorities
 //Default Priorities
 $defaultPriorities = array(
 $defaultPriorities = array(
     'NRM' => $objPlugin->get_lang('PriorityNormal'),
     'NRM' => $objPlugin->get_lang('PriorityNormal'),
@@ -134,7 +138,6 @@ foreach ($defaultPriorities as $pId => $priority) {
     Database::insert($table, $attributes);
     Database::insert($table, $attributes);
     $i++;
     $i++;
 }
 }
-//End
 
 
 $table = Database::get_main_table(TABLE_TICKET_PROJECT);
 $table = Database::get_main_table(TABLE_TICKET_PROJECT);
 $sql = "CREATE TABLE IF NOT EXISTS ".$table." (
 $sql = "CREATE TABLE IF NOT EXISTS ".$table." (
@@ -150,6 +153,7 @@ $sql = "CREATE TABLE IF NOT EXISTS ".$table." (
         sys_lastedit_datetime datetime DEFAULT NULL,
         sys_lastedit_datetime datetime DEFAULT NULL,
         PRIMARY KEY (id))";
         PRIMARY KEY (id))";
 Database::query($sql);
 Database::query($sql);
+
 //Default Project Table Ticket
 //Default Project Table Ticket
 $attributes = array(
 $attributes = array(
     'id' => 1,
     'id' => 1,
@@ -157,7 +161,6 @@ $attributes = array(
     'name' => 'Ticket System'
     'name' => 'Ticket System'
 );
 );
 Database::insert($table, $attributes);
 Database::insert($table, $attributes);
-//END
 
 
 //STATUS
 //STATUS
 $table = Database::get_main_table(TABLE_TICKET_STATUS);
 $table = Database::get_main_table(TABLE_TICKET_STATUS);
@@ -168,6 +171,7 @@ $sql = "CREATE TABLE IF NOT EXISTS ".$table." (
         description varchar(255) DEFAULT NULL,
         description varchar(255) DEFAULT NULL,
         PRIMARY KEY (id))";
         PRIMARY KEY (id))";
 Database::query($sql);
 Database::query($sql);
+
 //Default status
 //Default status
 $defaultStatus = array(
 $defaultStatus = array(
     'NAT' => $objPlugin->get_lang('StatusNew'),
     'NAT' => $objPlugin->get_lang('StatusNew'),
@@ -187,7 +191,6 @@ foreach ($defaultStatus as $abr => $status) {
     Database::insert($table, $attributes);
     Database::insert($table, $attributes);
     $i ++;
     $i ++;
 }
 }
-//END
 
 
 $table = Database::get_main_table(TABLE_TICKET_TICKET);
 $table = Database::get_main_table(TABLE_TICKET_TICKET);
 $sql = "CREATE TABLE IF NOT EXISTS ".$table." (
 $sql = "CREATE TABLE IF NOT EXISTS ".$table." (

+ 1 - 1
plugin/ticket/install.php

@@ -7,5 +7,5 @@
  * @package chamilo.plugin.ticket
  * @package chamilo.plugin.ticket
  */
  */
 
 
-require_once dirname(__FILE__).'/config.php';
+require_once __DIR__.'/config.php';
 TicketPlugin::create()->install();
 TicketPlugin::create()->install();

+ 1 - 1
plugin/ticket/plugin.php

@@ -4,5 +4,5 @@
 /**
 /**
  * @package chamilo.plugin.ticket
  * @package chamilo.plugin.ticket
  */
  */
-require_once dirname(__FILE__).'/config.php';
+require_once __DIR__.'/config.php';
 $plugin_info = TicketPlugin::create()->get_info();
 $plugin_info = TicketPlugin::create()->get_info();

+ 3 - 1
plugin/ticket/src/assign_tickets.php

@@ -1,5 +1,6 @@
 <?php
 <?php
 /* For licensing terms, see /license.txt */
 /* For licensing terms, see /license.txt */
+
 /**
 /**
  *
  *
  * @package chamilo.plugin.ticket
  * @package chamilo.plugin.ticket
@@ -64,7 +65,8 @@ while ($row = Database::fetch_assoc($result_forum)) {
 echo '</select></div><div>';
 echo '</select></div><div>';
 echo '<div class="row">
 echo '<div class="row">
         <div class="formw">
         <div class="formw">
-        <button class="save" name="edit" type="button" value="' . get_lang('Edit') . '" onClick="save(' . "$id" . ');">' . get_lang('Edit') . '</button>
+        <button class="save" name="edit" type="button" value="' . get_lang('Edit') . '" onClick="save(' . "$id" . ');">' .
+            get_lang('Edit') . '</button>
         </div>
         </div>
     </div>';
     </div>';
 echo '</form>';
 echo '</form>';

+ 1 - 2
plugin/ticket/src/course_user_list.php

@@ -18,8 +18,6 @@ foreach ($coursesList as $key => $course) {
     $courseInfo = CourseManager::get_course_information($course['code']);
     $courseInfo = CourseManager::get_course_information($course['code']);
     $arrCourseList[$courseInfo['code']] = $courseInfo['title'];
     $arrCourseList[$courseInfo['code']] = $courseInfo['title'];
 }
 }
-//End Course List
-
 
 
 $userLabel = Display::tag('label', get_lang('User'), array('class' => 'control-label'));
 $userLabel = Display::tag('label', get_lang('User'), array('class' => 'control-label'));
 $personName = api_get_person_name($userInfo['firstname'], $userInfo['lastname']);
 $personName = api_get_person_name($userInfo['firstname'], $userInfo['lastname']);
@@ -40,6 +38,7 @@ $courseControl = Display::div($courseSelect, array('class' => 'controls'));
 
 
 $userDiv = Display::div($userLabel . " " . $userControl, array('class' => 'control-group'));
 $userDiv = Display::div($userLabel . " " . $userControl, array('class' => 'control-group'));
 $courseDiv = Display::div($courseLabel . " " . $courseControl, array('class' => 'control-group'));
 $courseDiv = Display::div($courseLabel . " " . $courseControl, array('class' => 'control-group'));
+
 echo $userDiv;
 echo $userDiv;
 echo $courseDiv;
 echo $courseDiv;
 
 

+ 2 - 1
plugin/ticket/src/myticket.php

@@ -194,7 +194,8 @@ if (isset($_GET['action'])) {
             break;
             break;
     }
     }
 }
 }
-//$nameTools = api_xml_http_response_encode($plugin->get_lang('MyTickets'));
+
+// $nameTools = api_xml_http_response_encode($plugin->get_lang('MyTickets'));
 $user_id = api_get_user_id();
 $user_id = api_get_user_id();
 $isAdmin = api_is_platform_admin();
 $isAdmin = api_is_platform_admin();
 
 

+ 6 - 2
plugin/ticket/src/report.php

@@ -4,6 +4,7 @@
 /**
 /**
  * @package chamilo.plugin.ticket
  * @package chamilo.plugin.ticket
  */
  */
+
 $language_file = array('trad4all');
 $language_file = array('trad4all');
 $cidReset = true;
 $cidReset = true;
 require_once '../config.php';
 require_once '../config.php';
@@ -14,7 +15,7 @@ api_block_anonymous_users();
 if (!api_is_allowed_to_edit()) {
 if (!api_is_allowed_to_edit()) {
     api_not_allowed();
     api_not_allowed();
 }
 }
-//$nameTools = api_xml_http_response_encode(get_lang('Soporte Virtual'));
+
 $this_section = 'Reports';
 $this_section = 'Reports';
 unset($_SESSION['this_section']);
 unset($_SESSION['this_section']);
 
 
@@ -24,7 +25,8 @@ $(document).ready(function(){
     $( "#keyword_start_date_start" ).datepicker({ dateFormat: ' . "'yy-mm-dd'" . ' });
     $( "#keyword_start_date_start" ).datepicker({ dateFormat: ' . "'yy-mm-dd'" . ' });
     $( "#keyword_start_date_end" ).datepicker({ dateFormat: ' . "'yy-mm-dd'" . ' });
     $( "#keyword_start_date_end" ).datepicker({ dateFormat: ' . "'yy-mm-dd'" . ' });
 });
 });
-function validate(){
+
+function validate() {
     if( $("#keyword_start_date_start").val() != "" &&  $("#keyword_start_date_end").val() != ""){
     if( $("#keyword_start_date_start").val() != "" &&  $("#keyword_start_date_end").val() != ""){
         datestart = $("#keyword_start_date_start").val();
         datestart = $("#keyword_start_date_start").val();
         dateend = $("#keyword_start_date_end").val();
         dateend = $("#keyword_start_date_end").val();
@@ -35,6 +37,7 @@ function validate(){
         }
         }
     }
     }
 }
 }
+
 function load_course_list (div_course,my_user_id) {
 function load_course_list (div_course,my_user_id) {
 	 $.ajax({
 	 $.ajax({
 		contentType: "application/x-www-form-urlencoded",
 		contentType: "application/x-www-form-urlencoded",
@@ -84,6 +87,7 @@ $tools['quiz'] = array('id' => 'quiz', 'name' => get_lang('Quiz'));
 $tools['student_publication'] = array('id' => 'student_publication', 'name' => get_lang('Student_publication'));
 $tools['student_publication'] = array('id' => 'student_publication', 'name' => get_lang('Student_publication'));
 $tools['user'] = array('id' => 'user', 'name' => get_lang('User'));
 $tools['user'] = array('id' => 'user', 'name' => get_lang('User'));
 $tools['forum'] = array('id' => 'forum', 'name' => get_lang('Forum'));
 $tools['forum'] = array('id' => 'forum', 'name' => get_lang('Forum'));
+
 /**
 /**
  * Returns the escaped string.
  * Returns the escaped string.
  * @param string $s
  * @param string $s

+ 16 - 13
plugin/ticket/src/ticket.class.php

@@ -336,8 +336,8 @@ class TicketManager
         $obj = Database::fetch_object($result);
         $obj = Database::fetch_object($result);
         $message_id = $obj->total_messages + 1;
         $message_id = $obj->total_messages + 1;
         $now = api_get_utc_datetime();
         $now = api_get_utc_datetime();
-
-        $sql_insert_message = "INSERT INTO $table_support_messages (
+        // insert msg
+        $sql = "INSERT INTO $table_support_messages (
             ticket_id,
             ticket_id,
             message_id,
             message_id,
             subject,
             subject,
@@ -360,16 +360,19 @@ class TicketManager
             '" . $now . "',
             '" . $now . "',
             '$status'
             '$status'
         )";
         )";
-        Database::query($sql_insert_message);
-        $sql_update_total_message = "UPDATE $table_support_tickets
-                        SET sys_lastedit_user_id ='$user_id',
-                            sys_lastedit_datetime ='$now',
-                            total_messages = (
-                                SELECT COUNT(*) as total_messages
-                                  FROM $table_support_messages
-                                  WHERE ticket_id ='$ticket_id'
-                            ) WHERE ticket_id ='$ticket_id' ";
-        Database::query($sql_update_total_message);
+        Database::query($sql);
+
+        // update_total_message
+        $sql = "UPDATE $table_support_tickets
+                SET sys_lastedit_user_id ='$user_id',
+                    sys_lastedit_datetime ='$now',
+                    total_messages = (
+                        SELECT COUNT(*) as total_messages
+                        FROM $table_support_messages
+                        WHERE ticket_id ='$ticket_id'
+                    )
+                WHERE ticket_id ='$ticket_id' ";
+        Database::query($sql);
 
 
         $sql_message_att_id = "SELECT COUNT(*) as total_attach
         $sql_message_att_id = "SELECT COUNT(*) as total_attach
                 FROM $table_support_message_attachments
                 FROM $table_support_message_attachments
@@ -1239,6 +1242,7 @@ class TicketManager
         $sql .= "  AND ticket.project_id != '' ";
         $sql .= "  AND ticket.project_id != '' ";
         $res = Database::query($sql);
         $res = Database::query($sql);
         $obj = Database::fetch_object($res);
         $obj = Database::fetch_object($res);
+
         return $obj->unread;
         return $obj->unread;
     }
     }
 
 
@@ -1512,7 +1516,6 @@ class TicketManager
             }
             }
         }
         }
 
 
-        //$sql .= " ORDER BY col$column $direction";
         $sql .= " LIMIT $from,$number_of_items";
         $sql .= " LIMIT $from,$number_of_items";
 
 
         $result = Database::query($sql);
         $result = Database::query($sql);

+ 11 - 3
plugin/ticket/src/ticket_assign_log.php

@@ -4,7 +4,9 @@
 /**
 /**
  * @package chamilo.plugin.ticket
  * @package chamilo.plugin.ticket
  */
  */
+
 require_once '../config.php';
 require_once '../config.php';
+
 $plugin = TicketPlugin::create();
 $plugin = TicketPlugin::create();
 
 
 $ticket_id = intval($_POST['ticket_id']);
 $ticket_id = intval($_POST['ticket_id']);
@@ -22,9 +24,15 @@ $history = TicketManager::get_assign_log($ticket_id);
     ?>
     ?>
     <?php for ($k = 0; $k < count($history); $k++) { ?>
     <?php for ($k = 0; $k < count($history); $k++) { ?>
         <tr>
         <tr>
-            <td width="125px"><?php echo api_convert_encoding($history[$k]['assignuser'], 'UTF-8', $charset); ?></td>
-            <td width="100px"><?php echo api_convert_encoding($history[$k]['assigned_date'], 'UTF-8', $charset); ?></td>
-            <td width="125px"><?php echo api_convert_encoding($history[$k]['insertuser'], 'UTF-8', $charset); ?></td>
+            <td width="125px">
+                <?php echo api_convert_encoding($history[$k]['assignuser'], 'UTF-8', $charset); ?>
+            </td>
+            <td width="100px">
+                <?php echo api_convert_encoding($history[$k]['assigned_date'], 'UTF-8', $charset); ?>
+            </td>
+            <td width="125px">
+                <?php echo api_convert_encoding($history[$k]['insertuser'], 'UTF-8', $charset); ?>
+            </td>
         </tr>
         </tr>
     <?php } ?>
     <?php } ?>
 </table>
 </table>

+ 1 - 1
plugin/ticket/src/ticket_plugin.class.php

@@ -58,7 +58,7 @@ class TicketPlugin extends Plugin
         $settings = $this->get_settings();
         $settings = $this->get_settings();
         $plugSetting = current($settings);
         $plugSetting = current($settings);
 
 
-        //Delete settings
+        // Delete settings
         $sql = "DELETE FROM $tblSettings WHERE variable = 'ticket_tool_enable'";
         $sql = "DELETE FROM $tblSettings WHERE variable = 'ticket_tool_enable'";
         Database::query($sql);
         Database::query($sql);
 
 

+ 4 - 3
plugin/ticket/src/tutor_report.lib.php

@@ -32,8 +32,9 @@ function initializeReport($course_code)
     if (intval($obj->cant) != $weeksCount) {
     if (intval($obj->cant) != $weeksCount) {
 
 
         if (intval($obj->cant) > $weeksCount) {
         if (intval($obj->cant) > $weeksCount) {
-            $sql = "DELETE FROM $table_reporte_semanas WHERE  week_id > $weeksCount AND course_code = '$course_code'";
-            Database::query("DELETE FROM $table_reporte_semanas WHERE  week_id > $weeksCount AND course_code = '$course_code'");
+            $sql = "DELETE FROM $table_reporte_semanas
+                    WHERE  week_id > $weeksCount AND course_code = '$course_code'";
+            Database::query($sql);
         } else {
         } else {
             for ($i = $obj->cant + 1; $i <= $weeksCount; $i++) {
             for ($i = $obj->cant + 1; $i <= $weeksCount; $i++) {
                 if (!Database::query("INSERT INTO $table_reporte_semanas (week_id, course_code, forum_id, work_id, quiz_id, pc_id)
                 if (!Database::query("INSERT INTO $table_reporte_semanas (week_id, course_code, forum_id, work_id, quiz_id, pc_id)
@@ -139,7 +140,6 @@ function showResults($courseInfo, $weeksCount, $page)
             <option value="14" ' . (($weeksCount == 14) ? 'selected="selected"' : "") . '>14 weeks</option>
             <option value="14" ' . (($weeksCount == 14) ? 'selected="selected"' : "") . '>14 weeks</option>
             </select>';
             </select>';
 
 
-
     if ($weeksCount == 14) {
     if ($weeksCount == 14) {
         $html .= '<span style="float:right;"><a href="tutor.php?page=' . (($page == 1) ? 2 : 1) . '">' . (($page == 1) ? "Siguiente" : "Anterior") . '</a></span>';
         $html .= '<span style="float:right;"><a href="tutor.php?page=' . (($page == 1) ? 2 : 1) . '">' . (($page == 1) ? "Siguiente" : "Anterior") . '</a></span>';
     }
     }
@@ -196,6 +196,7 @@ function showStudentResult($datos, $pagina)
         $fila.= '<td align="center">' . (($dato['thread_ok'] == 1) ? Display::return_icon('check.png') : Display::return_icon('aspa.png')) . '</td>';
         $fila.= '<td align="center">' . (($dato['thread_ok'] == 1) ? Display::return_icon('check.png') : Display::return_icon('aspa.png')) . '</td>';
     }
     }
     $fila.= '</tr>';
     $fila.= '</tr>';
+
     return $fila;
     return $fila;
 }
 }
 
 

+ 1 - 1
plugin/ticket/start.php

@@ -6,7 +6,7 @@
  * @package chamilo.plugin.ticket
  * @package chamilo.plugin.ticket
  */
  */
 $course_plugin = 'ticket'; //needed in order to load the plugin lang variables
 $course_plugin = 'ticket'; //needed in order to load the plugin lang variables
-require_once dirname(__FILE__).'/config.php';
+require_once __DIR__.'/config.php';
 $tool_name = get_lang('Ticket');
 $tool_name = get_lang('Ticket');
 $tpl = new Template($tool_name);
 $tpl = new Template($tool_name);
 
 

+ 1 - 1
plugin/ticket/uninstall.php

@@ -7,5 +7,5 @@
  * the global database and the courses tables
  * the global database and the courses tables
  * @package chamilo.plugin.ticket
  * @package chamilo.plugin.ticket
  */
  */
-require_once dirname(__FILE__).'/config.php';
+require_once __DIR.'/config.php';
 TicketPlugin::create()->uninstall();
 TicketPlugin::create()->uninstall();