commit
7382179b6d
@ -1,99 +0,0 @@ |
||||
<h1> |
||||
<a id="user-content-advanced-subscription-plugin-for-chamilo-lms" class="anchor" href="#advanced-subscription-plugin-for-chamilo-lms" aria-hidden="true"><span class="octicon octicon-link"></span></a>Advanced subscription plugin for Chamilo LMS</h1> |
||||
|
||||
<p>Plugin for managing the registration queue and communication to sessions |
||||
from an external website creating a queue to control session subscription |
||||
and sending emails to approve student subscription request</p> |
||||
|
||||
<h1> |
||||
<a id="user-content-requirements" class="anchor" href="#requirements" aria-hidden="true"><span class="octicon octicon-link"></span></a>Requirements</h1> |
||||
|
||||
<p>Chamilo LMS 1.10 or greater</p> |
||||
|
||||
<h1> |
||||
<a id="user-content-settings" class="anchor" href="#settings" aria-hidden="true"><span class="octicon octicon-link"></span></a>Settings</h1> |
||||
|
||||
<table> |
||||
<thead> |
||||
<tr> |
||||
<th>Parameters</th> |
||||
<th>Description</th> |
||||
</tr> |
||||
</thead> |
||||
<tbody> |
||||
<tr> |
||||
<td>Webservice url</td> |
||||
<td>Url to external website to get user profile (SOAP)</td> |
||||
</tr> |
||||
<tr> |
||||
<td>Induction requirement</td> |
||||
<td>Checkbox to enable induction as requirement</td> |
||||
</tr> |
||||
<tr> |
||||
<td>Courses count limit</td> |
||||
<td>Number of times a student is allowed at most to course by year</td> |
||||
</tr> |
||||
<tr> |
||||
<td>Yearly hours limit</td> |
||||
<td>Teaching hours a student is allowed at most to course by year</td> |
||||
</tr> |
||||
<tr> |
||||
<td>Yearly cost unit converter</td> |
||||
<td>The cost of a taxation unit value (TUV)</td> |
||||
</tr> |
||||
<tr> |
||||
<td>Yearly cost limit</td> |
||||
<td>Number of TUV student courses is allowed at most to cost by year</td> |
||||
</tr> |
||||
<tr> |
||||
<td>Year start date</td> |
||||
<td>Date (dd/mm) when the year limit is renewed</td> |
||||
</tr> |
||||
<tr> |
||||
<td>Minimum percentage profile</td> |
||||
<td>Minimum percentage required from external website profile</td> |
||||
</tr> |
||||
</tbody> |
||||
</table> |
||||
|
||||
<h1> |
||||
<a id="user-content-hooks" class="anchor" href="#hooks" aria-hidden="true"><span class="octicon octicon-link"></span></a>Hooks</h1> |
||||
|
||||
<p>This plugin use the next hooks:</p> |
||||
|
||||
<ul class="task-list"> |
||||
<li>HookAdminBlock</li> |
||||
<li>HookWSRegistration</li> |
||||
<li>HookNotificationContent</li> |
||||
<li>HookNotificationTitle</li> |
||||
</ul> |
||||
|
||||
<h1> |
||||
<a id="user-content-web-services" class="anchor" href="#web-services" aria-hidden="true"><span class="octicon octicon-link"></span></a>Web services</h1> |
||||
|
||||
<ul class="task-list"> |
||||
<li>HookAdvancedSubscription..WSSessionListInCategory</li> |
||||
<li>HookAdvancedSubscription..WSSessionGetDetailsByUser</li> |
||||
<li>HookAdvancedSubscription..WSListSessionsDetailsByCategory</li> |
||||
</ul> |
||||
|
||||
<p>See <code>/plugin/advanced_subscription/src/HookAdvancedSubscription.php</code> to check Web services inputs and outputs</p> |
||||
|
||||
<h1> |
||||
<a id="user-content-how-plugin-works" class="anchor" href="#how-plugin-works" aria-hidden="true"><span class="octicon octicon-link"></span></a>How plugin works?</h1> |
||||
|
||||
<p>After install plugin, fill the parameters needed (described above) |
||||
Use Web services to communicate course session inscription from external website |
||||
This allow to student to search course session and subscribe if is qualified |
||||
and allowed to subscribe. |
||||
The normal process is:</p> |
||||
|
||||
<ul class="task-list"> |
||||
<li>Student search course session</li> |
||||
<li>Student read session info depending student data</li> |
||||
<li>Student request a subscription</li> |
||||
<li>A confirmation email is send to student</li> |
||||
<li>An email is send to users (superior or admins) who will accept or reject student request</li> |
||||
<li>When the user aceept o reject, an email will be send to student, superior or admins respectively</li> |
||||
<li>To complete the subscription, the request must be validated and accepted by an admin</li> |
||||
</ul> |
@ -0,0 +1,87 @@ |
||||
<?php |
||||
/* For licensing terms, see /license.txt */ |
||||
|
||||
/** |
||||
* Class CourseBlockPlugin |
||||
*/ |
||||
class CourseBlockPlugin extends Plugin |
||||
{ |
||||
public $isCoursePlugin = true; |
||||
|
||||
// When creating a new course this settings are added to the course |
||||
public $course_settings = array( |
||||
array( |
||||
'name' => 'course_block_footer_left', |
||||
'type' => 'textarea' |
||||
), |
||||
array( |
||||
'name' => 'course_block_footer_center', |
||||
'type' => 'textarea' |
||||
), |
||||
array( |
||||
'name' => 'course_block_footer_right', |
||||
'type' => 'textarea' |
||||
) |
||||
); |
||||
|
||||
/** |
||||
* @return CourseBlockPlugin |
||||
*/ |
||||
public static function create() |
||||
{ |
||||
static $result = null; |
||||
return $result ? $result : $result = new self(); |
||||
} |
||||
|
||||
/** |
||||
* |
||||
*/ |
||||
protected function __construct() |
||||
{ |
||||
parent::__construct( |
||||
'0.1', |
||||
'Julio Montoya', |
||||
array( |
||||
'tool_enable' => 'boolean' |
||||
) |
||||
); |
||||
} |
||||
|
||||
///public function |
||||
|
||||
public function install() |
||||
{ |
||||
// Installing course settings |
||||
$this->install_course_fields_in_all_courses(false); |
||||
} |
||||
|
||||
public function uninstall() |
||||
{ |
||||
// Deleting course settings |
||||
$this->uninstall_course_fields_in_all_courses(); |
||||
} |
||||
|
||||
/** |
||||
* @param string $region |
||||
* @return string |
||||
*/ |
||||
public function renderRegion($region) |
||||
{ |
||||
$content = ''; |
||||
switch ($region) { |
||||
case 'footer_left': |
||||
$content = api_get_course_setting('course_block_footer_left'); |
||||
$content = $content === -1 ? '' : $content; |
||||
break; |
||||
case 'footer_center': |
||||
$content = api_get_course_setting('course_block_footer_center'); |
||||
$content = $content === -1 ? '' : $content; |
||||
break; |
||||
case 'footer_right': |
||||
$content = api_get_course_setting('course_block_footer_right'); |
||||
$content = $content === -1 ? '' : $content; |
||||
break; |
||||
} |
||||
return $content; |
||||
} |
||||
} |
@ -0,0 +1,8 @@ |
||||
1. Enabled the plugin from the list of plugins. |
||||
2. Click "Configure" once the plugin was enabled. |
||||
3. Select tool_enable = Yes and save. |
||||
4. Go into a *course* (not course session) and enter the Settings tool. |
||||
5. In the "Course block" section fill the footer options. |
||||
6. Once the form was saved, you will notice that the text you fill in step .5 |
||||
will appear in the Chamilo footer. |
||||
|
@ -0,0 +1,5 @@ |
||||
<?php |
||||
/* For licensing terms, see /license.txt */ |
||||
|
||||
require_once __DIR__ . '/../../main/inc/global.inc.php'; |
||||
require_once __DIR__.'/CourseBlockPlugin.php'; |
@ -0,0 +1,2 @@ |
||||
<?php |
||||
|
@ -0,0 +1,9 @@ |
||||
<?php |
||||
/* For license terms, see /license.txt */ |
||||
|
||||
require_once dirname(__FILE__) . '/config.php'; |
||||
|
||||
if (!api_is_platform_admin()) { |
||||
die ('You must have admin permissions to install plugins'); |
||||
} |
||||
CourseBlockPlugin::create()->install(); |
@ -0,0 +1,11 @@ |
||||
<?php |
||||
|
||||
$strings['plugin_title'] = "Course block"; |
||||
$strings['plugin_comment'] = "Add header and footer in a course"; |
||||
$strings['tool_enable'] = 'Enable plugin'; |
||||
$strings['tool_enable_help'] = 'Once enabled, you will have to configure the plugin inside the course configuration, then from the course homepage (a button will appear there only for the teacher)'; |
||||
|
||||
$strings['course_block_footer_left'] = 'Footer left'; |
||||
$strings['course_block_footer_center'] = 'Footer center'; |
||||
$strings['course_block_footer_right'] = 'Footer right'; |
||||
|
@ -0,0 +1,2 @@ |
||||
<?php |
||||
|
@ -0,0 +1,2 @@ |
||||
<?php |
||||
|
@ -0,0 +1,4 @@ |
||||
<?php |
||||
|
||||
require_once __DIR__ . '/config.php'; |
||||
$plugin_info = CourseBlockPlugin::create()->get_info(); |
@ -1,4 +1,5 @@ |
||||
README |
||||
Installation |
||||
============ |
||||
|
||||
1. Enabled the plugin from the list of plugins. |
||||
2. Click "Configure" once the plugin was enabled. |
@ -1,5 +1,4 @@ |
||||
<?php |
||||
|
||||
require_once dirname(__FILE__) . '/config.php'; |
||||
|
||||
require_once __DIR__ . '/config.php'; |
||||
$plugin_info = CourseLegalPlugin::create()->get_info(); |
||||
|
@ -1,5 +1,5 @@ |
||||
<?php |
||||
|
||||
require_once dirname(__FILE__).'/config.php'; |
||||
require_once __DIR__.'/config.php'; |
||||
$plugin_info = openmeetingsPlugin::create()->get_info(); |
||||
|
||||
|
@ -1,2 +0,0 @@ |
||||
<h1>Skype Plugin</h1> |
||||
<p>Create Skype user field</p> |
@ -1,25 +0,0 @@ |
||||
<h1>Chamilo Tour Plugin</h1> |
||||
<p>Shows people how to use your Chamilo LMS</p> |
||||
<h2>Set the blocks for the tour</h2> |
||||
<p>Edit the <code>plugin/tour/config/tour.json</code> file adding the page classes and steps</p> |
||||
<p>To set the steps in a page, add an object like this:</p> |
||||
<pre> |
||||
{ |
||||
"pageClass": "page unique class selector", |
||||
"steps": [ |
||||
{ |
||||
"elementSelector": "element class or id", |
||||
"message": "LanguageVariable" |
||||
}, |
||||
{ |
||||
"elementSelector": "element class or id", |
||||
"message": "LanguageVariable" |
||||
}, |
||||
] |
||||
} |
||||
</pre> |
||||
Then set the language variables inside the <code>plugin/tour/lang/$language.php</code> file<br> |
||||
<h2>Set a region to plugin</h2> |
||||
<p>You must assign a Region to Tour plugin in the Configuration Settings</p> |
||||
<p>Choose preferably <code>header_right</code></p> |
||||
<br> |
Loading…
Reference in new issue