Skip to content

Commit d8b0b70

Browse files
committed
Merge branch '1.10.x' of github.com:chamilo/chamilo-lms into 1.10.x
2 parents ff78b33 + 613cf96 commit d8b0b70

File tree

6 files changed

+60
-3
lines changed

6 files changed

+60
-3
lines changed

app/Migrations/Schema/V110/Version110.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@ public function up(Schema $schema)
3434
$this->addSql("CREATE TABLE IF NOT EXISTS c_student_publication_comment (id INT, work_id INT NOT NULL, c_id INT NOT NULL, comment text, file VARCHAR(255), user_id int NOT NULL, sent_at datetime NOT NULL)");
3535
$this->addSql("CREATE TABLE IF NOT EXISTS c_attendance_calendar_rel_group (iid int NOT NULL auto_increment PRIMARY KEY, id INT, c_id INT NOT NULL, group_id INT NOT NULL, calendar_id INT NOT NULL)");
3636

37-
//$this->addSql("ALTER TABLE skill_rel_user ADD COLUMN course_id INT NOT NULL DEFAULT 0 AFTER id");
38-
//$this->addSql("ALTER TABLE skill_rel_user ADD COLUMN session_id INT NOT NULL DEFAULT 0 AFTER course_id");
39-
//$this->addSql("ALTER TABLE skill_rel_user ADD INDEX idx_select_cs (course_id, session_id)");
37+
$this->addSql("ALTER TABLE skill_rel_user ADD COLUMN course_id INT NOT NULL DEFAULT 0 AFTER id");
38+
$this->addSql("ALTER TABLE skill_rel_user ADD COLUMN session_id INT NOT NULL DEFAULT 0 AFTER course_id");
39+
$this->addSql("ALTER TABLE skill_rel_user ADD INDEX idx_select_cs (course_id, session_id)");
4040

4141
$table = $schema->getTable('session');
4242
if (!$table->hasColumn('description')) {

plugin/text/index.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<?php
2+
/* See license terms in /license.txt */
3+
4+
/**
5+
* @package chamilo.plugin.text
6+
*/
7+
8+
if (!empty($plugin_info['settings']['text_content'])) {
9+
echo $plugin_info['settings']['text_content'];
10+
}

plugin/text/install.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
<?php
2+
/* See license terms in /license.txt */

plugin/text/plugin.php

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
<?php
2+
/* See license terms in /license.txt */
3+
4+
/**
5+
* This script is a configuration file for the date plugin.
6+
* You can use it as a master for other platform plugins (course plugins are slightly different).
7+
* These settings will be used in the administration interface for plugins (Chamilo configuration settings->Plugins)
8+
* @package chamilo.plugin
9+
* @author Julio Montoya <[email protected]>
10+
*/
11+
12+
/* Plugin config */
13+
14+
//the plugin title
15+
$plugin_info['title'] = 'Text';
16+
//the comments that go with the plugin
17+
$plugin_info['comment'] = "Displays a text message";
18+
//the plugin version
19+
$plugin_info['version'] = '1.0';
20+
//the plugin author
21+
$plugin_info['author'] = 'Julio Montoya';
22+
23+
/* Plugin optional settings */
24+
25+
$form = new FormValidator('text_form');
26+
$form->addTextarea('content', get_lang('Content'));
27+
$form->addButtonSave(get_lang('Save'), 'submit_button');
28+
29+
$content = '';
30+
$setting = api_get_setting('text_content');
31+
32+
if (!empty($setting) && is_array($setting)) {
33+
if (isset($setting['text'])) {
34+
$content = $setting['text'];
35+
}
36+
}
37+
38+
$form->setDefaults(array('content' => $content));
39+
40+
$plugin_info['settings_form'] = $form;

plugin/text/readme.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
README
2+
3+
Display a text in a region.

plugin/text/uninstall.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
<?php
2+
/* See license terms in /license.txt */

0 commit comments

Comments
 (0)