Html and css structure updated plugin, text multilanguage support

1.9.x
aragonc 11 years ago
parent b983be7ef8
commit 0a39a81ea9
  1. 13
      plugin/buycourses/lang/english.php
  2. 13
      plugin/buycourses/lang/spanish.php
  3. 2
      plugin/buycourses/src/buy_course_plugin.class.php
  4. 4
      plugin/buycourses/src/configuration.php
  5. 4
      plugin/buycourses/src/paymentsetup.php
  6. 24
      plugin/buycourses/view/configuration.tpl
  7. 78
      plugin/buycourses/view/index.tpl
  8. 74
      plugin/buycourses/view/paymentsetup.tpl
  9. 2
      plugin/buycourses/view/process_confirm.tpl

@ -67,3 +67,16 @@ $strings['TransfersConfig'] = "Bank transfers configuration:";
$strings['PayPalPaymentOKPleaseConfirm'] = "PayPal reports the transaction is ready to be executed. To acknowledge that you are OK to proceed, please click the confirmation button below. Once clicked, you will be registered to the course and the funds will be transferred from your PayPal account to our shop. You can always access your courses through the 'My courses' tab. Thank you for your custom!";
$strings['EnrollToSessionXSuccessful'] = "Your subscription to the session is complete";
$strings['TheUserIsAlreadyRegisteredInTheSession'] = 'You are already registered in the session';
$strings['OneInstruction'] = 'Create a course or training session in your Chamilo LMS platform.';
$strings['TwoInstruction'] = 'In the <strong> payment settings </strong > sets the currency with which you sell any your courses or sessions.';
$strings['ThreeInstruction'] = 'Set courses to sell in the <strong> Settings courses and prices </strong >';
$strings['Instructions'] = 'Instructions';
$strings['PresentationPlugin'] = 'The BuyCourses Plugin gives you the resources to sell your courses or sessions already created and teach online . Everything under a few simple steps and settings , very simple to use , what do you expect ? starts selling courses through Chamilo LMS.';
$strings['TitlePlugin'] = 'Everything you need to teach and sell online courses';
$strings['PluginInstruction'] = 'You can enable or disable the option to pay via PayPal or bank transfer settings in the configuration section of the plugin.';
$strings['ClickHere'] = 'Click here';
$strings['InfoCurrency'] = 'PSets the currency of payment for your courses.';
$strings['InfoApiCredentials'] = 'To generate your credentials API to integrate with your PayPal account Chamilo LMS , you must follow the following steps';
$strings['InfoApiStepOne'] = 'Go to Option <strong> Profile PayPal </strong> THEN <strong> My Selling Tools </strong>';
$strings['InfoApiStepTwo'] = 'In paragraph <strong> Access API </strong> , click the <strong> Update </strong>';
$strings['InfoApiStepThree'] = 'In Option 2 , Configuration API credentials and permissions , click <strong> View API signature </strong> , Copy of the credentials data in the form';

@ -67,3 +67,16 @@ $strings['TransfersConfig'] = "Configuraci&oacute;n de transferencias:";
$strings['PayPalPaymentOKPleaseConfirm'] = "PayPal nos indicó que todo estaba listo para ejecutar el pago. Por seguridad, le pedimos confirme una última vez su pedido dando clic en el botón de confirmación a bajo. Una vez le haya dado clic, será registrado al curso y el monto correspondiente será retirado de su cuenta PayPal. Siempre puede acceder a sus cursos a partir de la pestaña 'Mis cursos'. Gracias por su compra!";
$strings['EnrollToSessionXSuccessful'] = "Su inscripción en la sesión %s se ha completado.";
$strings['TheUserIsAlreadyRegisteredInTheSession'] = 'El usuario ya está registrado en la sesión.';
$strings['OneInstruction'] = 'Crea un curso o sesion de formación en tu plataforma Chamilo LMS.';
$strings['TwoInstruction'] = 'En la sección <strong>configuración de pagos</strong> configura el tipo de moneda con el que venderas tu cursos o sesiones.';
$strings['ThreeInstruction'] = 'Configura los cursos a vender en la sección <strong>Configuración de cursos y precios</strong>';
$strings['Instructions'] = 'Instrucciones de uso';
$strings['PresentationPlugin'] = 'El Plugin BuyCourses te da los recursos para vender tus cursos o sesiones ya creados y enseñar en línea. Todo bajo unos simples pasos y configuraciones, muy sencillo de utilizar, ¿Qué esperas? empieza a vender cursos a través de Chamilo LMS. ';
$strings['TitlePlugin'] = 'Todo lo que necesitas para enseñar y vender cursos en línea';
$strings['PluginInstruction'] = 'Puedes activar o desactivar la opción de pagos vía PayPal o configuración de transferencias bancarias, en la sección del configuración del plugin.';
$strings['ClickHere'] = 'Clic Aquí';
$strings['InfoCurrency'] = 'Permite configurar el tipo de moneda de pago para tus cursos.';
$strings['InfoApiCredentials'] = 'Para generar tu credenciales API para integrar tu cuenta PayPal con Chamilo LMS, deberás de seguir los siguientes pasos';
$strings['InfoApiStepOne'] = 'Ir a la opción de <strong>Perfil de PayPal</strong>, luego en <strong>Mis herramientas de venta</strong>';
$strings['InfoApiStepTwo'] = 'En el apartado <strong>Acceso API</strong>, clic en la opción <strong>Actualizar</strong>';
$strings['InfoApiStepThree'] = 'En la opción 2, de Configuración de credenciales y permisos de API, clic en <strong>Ver firma de API</strong>,Copiar los datos de las credenciales en el formulario ';

@ -5,6 +5,7 @@
* @package chamilo.plugin.buycourses
* @author Jose Angel Ruiz <jaruiz@nosolored.com>
* @author Imanol Losada <imanol.losada@beeznest.com>
* @author Alex Aragón <alex.aragon@beeznest.com>
*/
/**
* Plugin class for the BuyCourses plugin
@ -27,6 +28,7 @@ class BuyCoursesPlugin extends Plugin
'1.0',
'Jose Angel Ruiz - NoSoloRed (original author),
Francis Gonzales and Yannick Warnier - BeezNest (integration),
Alex Aragón - BeezNest (Design icons and css styles),
Imanol Losada - BeezNest (introduction of sessions purchase)',
array(
'include_sessions' => 'boolean',

@ -33,8 +33,8 @@ if ($teacher) {
$visibility[] = getCourseVisibilityIcon('3');
$coursesList = listCourses();
$confirmationImgPath = api_get_path(WEB_PLUGIN_PATH) . 'buycourses/resources/message_confirmation.png';
$saveImgPath = api_get_path(WEB_PLUGIN_PATH) . 'buycourses/resources/save.png';
$confirmationImgPath = api_get_path(WEB_PLUGIN_PATH) . 'buycourses/resources/img/32/accept.png';
$saveImgPath = api_get_path(WEB_PLUGIN_PATH) . 'buycourses/resources/img/32/save.png';
$currencyType = findCurrency();
$tpl->assign('server', $_configuration['root_web']);

@ -28,8 +28,8 @@ if ($teacher) {
$confirmationImg = api_get_path(WEB_PLUGIN_PATH) . 'buycourses/resources/message_confirmation.png';
$saveImg = api_get_path(WEB_PLUGIN_PATH) . 'buycourses/resources/save.png';
$moreImg = api_get_path(WEB_PLUGIN_PATH) . 'buycourses/resources/more.png';
$deleteImg = api_get_path(WEB_PLUGIN_PATH) . 'buycourses/resources/delete.png';
$moreImg = api_get_path(WEB_PLUGIN_PATH) . 'buycourses/resources/img/32/new.png';
$deleteImg = api_get_path(WEB_PLUGIN_PATH) . 'buycourses/resources/img/32/delete.png';
$showImg = api_get_path(WEB_PLUGIN_PATH) . 'buycourses/resources/acces_tool.gif';
$paypalEnable = $plugin->get('paypal_enable');

@ -1,6 +1,6 @@
<script type='text/javascript' src="../js/buycourses.js"></script>
<link rel="stylesheet" type="text/css" href="../resources/plugin.css"/>
<link rel="stylesheet" type="text/css" href="../resources/css/style.css"/>
<script>
$(function() {
@ -22,11 +22,11 @@ $(function() {
<div class="span12">
<table id="courses_table" class="data_table">
<tr class="row_odd">
<th>{{ 'Title'|get_lang }}</th>
<th>{{ 'OfficialCode'|get_lang }}</th>
<th class="ta-center">{{ 'Visible'|get_lang }}</th>
<th class="span2">{{ 'Price'|get_plugin_lang('BuyCoursesPlugin') }}</th>
<th class="span1 ta-center">{{ 'Option'|get_lang }}</th>
<th class="bg-color">{{ 'Title'|get_lang }}</th>
<th class="bg-color">{{ 'OfficialCode'|get_lang }}</th>
<th class="ta-center bg-color">{{ 'Visible'|get_lang }}</th>
<th class="span2 bg-color">{{ 'Price'|get_plugin_lang('BuyCoursesPlugin') }}</th>
<th class="span1 ta-center bg-color">{{ 'Option'|get_lang }}</th>
</tr>
{% set i = 0 %}
@ -64,12 +64,12 @@ $(function() {
<div class="span12">
<table id="courses_table" class="data_table">
<tr class="row_odd">
<th>{{ 'Title'|get_lang }}</th>
<th>{{ 'StartDate'|get_lang }}</th>
<th>{{ 'EndDate'|get_lang }}</th>
<th class="ta-center">{{ 'Visible'|get_lang }}</th>
<th class="span2">{{ 'Price'|get_plugin_lang('BuyCoursesPlugin') }}</th>
<th class="span1 ta-center">{{ 'Option'|get_lang }}</th>
<th class="bg-color">{{ 'Title'|get_lang }}</th>
<th class="bg-color">{{ 'StartDate'|get_lang }}</th>
<th class="bg-color">{{ 'EndDate'|get_lang }}</th>
<th class="bg-color ta-center">{{ 'Visible'|get_lang }}</th>
<th class="bg-color span2">{{ 'Price'|get_plugin_lang('BuyCoursesPlugin') }}</th>
<th class="bg-color span1 ta-center">{{ 'Option'|get_lang }}</th>
</tr>
{% set i = 0 %}

@ -1,19 +1,63 @@
<div class="well sidebar-nav static normal-message">
<h4> {{title}} </h4>
<ul class="nav nav-list">
<li>
<a href="src/list.php"> {{ BuyCourses }} </a>
</li>
<link rel="stylesheet" type="text/css" href="resources/css/style.css"/>
<div class="row">
<div class="span12">
<div class="row">
{% if isAdmin == 'true' %}
<li>
<a href="src/configuration.php"> {{ ConfigurationOfCoursesAndPrices }} </a>
</li>
<li>
<a href="src/paymentsetup.php"> {{ ConfigurationOfPayments }} </a>
</li>
<li>
<a href="src/pending_orders.php"> {{ OrdersPendingOfPayment }} </a>
</li>
<div class="span12">
<div>
<h2>{{ 'TitlePlugin'|get_plugin_lang('BuyCoursesPlugin') }}</h2>
<p>{{ 'PresentationPlugin'|get_plugin_lang('BuyCoursesPlugin') }}</p>
</div>
<div class="normal-message">
<h3>{{ 'Instructions'|get_plugin_lang('BuyCoursesPlugin') }}</h3>
<ul>
<li>{{ 'OneInstruction'|get_plugin_lang('BuyCoursesPlugin') }}</li>
<li>{{ 'TwoInstruction'|get_plugin_lang('BuyCoursesPlugin') }}</li>
<li>{{ 'ThreeInstruction'|get_plugin_lang('BuyCoursesPlugin') }}</li>
</ul>
</div>
</div>
{% endif %}
</ul>
</div>
<div class="span12">
</div>
</div>
<div class="row">
<div class="span3">
<div class="thumbnail">
<img src="resources/img/128/buycourses.png">
<div class="caption">
<a class="btn" href="src/list.php">{{ BuyCourses }}</a>
</div>
</div>
</div>
{% if isAdmin == 'true' %}
<div class="span3">
<div class="thumbnail">
<img src="resources/img/128/settings.png">
<div class="caption">
<a class="btn" href="src/configuration.php">{{ ConfigurationOfCoursesAndPrices }}</a>
</div>
</div>
</div>
<div class="span3">
<div class="thumbnail">
<img src="resources/img/128/paymentsettings.png">
<div class="caption">
<a class="btn" href="src/paymentsetup.php">{{ ConfigurationOfPayments }} </a>
</div>
</div>
</div>
<div class="span3">
<div class="thumbnail">
<img src="resources/img/128/backlogs.png">
<div class="caption">
<a class="btn" href="src/pending_orders.php"> {{ OrdersPendingOfPayment }} </a>
</div>
</div>
</div>
{% endif %}
</div>
</div>
</div>

@ -1,11 +1,22 @@
<script type='text/javascript' src="../js/buycourses.js"></script>
<link rel="stylesheet" type="text/css" href="../resources/plugin.css"/>
<link rel="stylesheet" type="text/css" href="../resources/css/style.css"/>
<div class="row">
<div class="span12">
<h3>{{ 'CurrencyType'|get_plugin_lang('BuyCoursesPlugin') }}:</h3>
<select id="currency_type">
<p class="normal-message">{{ 'PluginInstruction'|get_plugin_lang('BuyCoursesPlugin') }}<a href="{{ server }}main/admin/configure_plugin.php?name=buycourses">{{ 'ClickHere'|get_plugin_lang('BuyCoursesPlugin') }}</a></p>
</div>
</div>
<div class="row">
<div class="span6">
<div class="info">
<h3>{{ 'CurrencyType'|get_plugin_lang('BuyCoursesPlugin') }}</h3>
<p>{{ 'InfoCurrency'|get_plugin_lang('BuyCoursesPlugin') }}</p>
</div>
<div class="input-content">
<select id="currency_type">
<option value="" selected="selected">{{ 'SelectACurrency'|get_plugin_lang('BuyCoursesPlugin') }}</option>
{% for currency in currencies %}
{% if currency.status == 1 %}
@ -17,31 +28,54 @@
{% endfor %}
</select>
<input type="button" id="save_currency" class="btn btn-primary" value="{{ 'Save'|get_lang }}" />
{% if paypal_enable == "true" %}
<hr />
</div>
</div>
{% if paypal_enable == "true" %}
<div class="span6">
<div class="info">
<h3>{{ 'PayPalConfig'|get_plugin_lang('BuyCoursesPlugin') }}</h3>
{% if paypal.sandbox == "YES" %}
{{ 'Sandbox'|get_plugin_lang('BuyCoursesPlugin') }}: <input type="checkbox" id="sandbox" value="YES" checked="checked"/>
</div>
<div class="input-content">
<p>{{ 'InfoApiCredentials'|get_plugin_lang('BuyCoursesPlugin') }}</p>
<ul>
<li>{{ 'InfoApiStepOne'|get_plugin_lang('BuyCoursesPlugin') }}</li>
<li>{{ 'InfoApiStepTwo'|get_plugin_lang('BuyCoursesPlugin') }}</li>
<li>{{ 'InfoApiStepThree'|get_plugin_lang('BuyCoursesPlugin') }}</li>
</ul>
<label class="control-label">API_UserName: </label><input type="text" id="username" value="{{ paypal.username | e}}" />
<label class="control-label">API_Password: </label><input type="text" id="password" value="{{ paypal.password | e }}"/>
<label class="control-label">API_Signature: </label> <input type="text" id="signature" value="{{ paypal.signature | e }}"/>
{% if paypal.sandbox == "YES" %}
<label class="checkbox">
<input type="checkbox" id="sandbox" value="YES" checked="checked"> {{ 'Sandbox'|get_plugin_lang('BuyCoursesPlugin') }}
</label>
{% else %}
{{ 'Sandbox'|get_plugin_lang('BuyCoursesPlugin') }}: <input type="checkbox" id="sandbox" value="YES" />
{% endif %}
<br />
API_UserName: <input type="text" id="username" value="{{ paypal.username | e}}" /><br/>
API_Password: <input type="text" id="password" value="{{ paypal.password | e }}"/><br/>
API_Signature: <input type="text" id="signature" value="{{ paypal.signature | e }}"/><br/>
<label class="checkbox">
<input type="checkbox" id="sandbox" value="YES" />{{ 'Sandbox'|get_plugin_lang('BuyCoursesPlugin') }}
</label>
{% endif %}
<input type="button" id="save_paypal" class="btn btn-primary" value="{{ 'Save'|get_lang }}"/>
{% endif %}
</div>
</div>
{% endif %}
</div>
<div class="row">
<div class="span12">
{% if transfer_enable == "true" %}
<hr />
<h3>{{ 'TransfersConfig'|get_plugin_lang('BuyCoursesPlugin') }}</h3>
<table id="transfer_table" class="data_table">
<tr class="row_odd">
<th>{{ 'Name'|get_lang }}</th>
<th>{{ 'BankAccount'|get_plugin_lang('BuyCoursesPlugin') }}</th>
<th>{{ 'SWIFT'|get_lang }}</th>
<th class="span1 ta-center">{{ 'Option'|get_lang }}</th>
<th class="bg-color">{{ 'Name'|get_lang }}</th>
<th class="bg-color">{{ 'BankAccount'|get_plugin_lang('BuyCoursesPlugin') }}</th>
<th class="bg-color">{{ 'SWIFT'|get_lang }}</th>
<th class="span1 ta-center bg-color">{{ 'Option'|get_lang }}</th>
</tr>
{% set i = 0 %}

@ -1,6 +1,6 @@
<script type='text/javascript' src="../js/buycourses.js"></script>
<link rel="stylesheet" type="text/css" href="../resources/plugin.css"/>
<link rel="stylesheet" type="text/css" href="../resources/css/style.css"/>
<div class="row">
<div class="span12">

Loading…
Cancel
Save