From 0a39a81ea9b3cbed4b7302e0dcbc2e9236b18c38 Mon Sep 17 00:00:00 2001 From: aragonc Date: Tue, 21 Oct 2014 16:19:04 -0500 Subject: [PATCH] Html and css structure updated plugin, text multilanguage support --- plugin/buycourses/lang/english.php | 13 ++++ plugin/buycourses/lang/spanish.php | 13 ++++ .../src/buy_course_plugin.class.php | 2 + plugin/buycourses/src/configuration.php | 4 +- plugin/buycourses/src/paymentsetup.php | 4 +- plugin/buycourses/view/configuration.tpl | 24 +++--- plugin/buycourses/view/index.tpl | 78 +++++++++++++++---- plugin/buycourses/view/paymentsetup.tpl | 74 +++++++++++++----- plugin/buycourses/view/process_confirm.tpl | 2 +- 9 files changed, 160 insertions(+), 54 deletions(-) diff --git a/plugin/buycourses/lang/english.php b/plugin/buycourses/lang/english.php index 2a81b17f81..8294003f51 100644 --- a/plugin/buycourses/lang/english.php +++ b/plugin/buycourses/lang/english.php @@ -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 payment settings sets the currency with which you sell any your courses or sessions.'; +$strings['ThreeInstruction'] = 'Set courses to sell in the Settings courses and prices '; +$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 Profile PayPal THEN My Selling Tools '; +$strings['InfoApiStepTwo'] = 'In paragraph Access API , click the Update '; +$strings['InfoApiStepThree'] = 'In Option 2 , Configuration API credentials and permissions , click View API signature , Copy of the credentials data in the form'; \ No newline at end of file diff --git a/plugin/buycourses/lang/spanish.php b/plugin/buycourses/lang/spanish.php index 90ed780839..7e2e58dffe 100644 --- a/plugin/buycourses/lang/spanish.php +++ b/plugin/buycourses/lang/spanish.php @@ -67,3 +67,16 @@ $strings['TransfersConfig'] = "Configuració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 configuración de pagos configura el tipo de moneda con el que venderas tu cursos o sesiones.'; +$strings['ThreeInstruction'] = 'Configura los cursos a vender en la sección Configuración de cursos y precios'; +$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 Perfil de PayPal, luego en Mis herramientas de venta'; +$strings['InfoApiStepTwo'] = 'En el apartado Acceso API, clic en la opción Actualizar'; +$strings['InfoApiStepThree'] = 'En la opción 2, de Configuración de credenciales y permisos de API, clic en Ver firma de API,Copiar los datos de las credenciales en el formulario '; diff --git a/plugin/buycourses/src/buy_course_plugin.class.php b/plugin/buycourses/src/buy_course_plugin.class.php index 81f53b30de..a3e61f9b43 100644 --- a/plugin/buycourses/src/buy_course_plugin.class.php +++ b/plugin/buycourses/src/buy_course_plugin.class.php @@ -5,6 +5,7 @@ * @package chamilo.plugin.buycourses * @author Jose Angel Ruiz * @author Imanol Losada + * @author Alex Aragón */ /** * 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', diff --git a/plugin/buycourses/src/configuration.php b/plugin/buycourses/src/configuration.php index 17c64e6348..5f84896ca1 100644 --- a/plugin/buycourses/src/configuration.php +++ b/plugin/buycourses/src/configuration.php @@ -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']); diff --git a/plugin/buycourses/src/paymentsetup.php b/plugin/buycourses/src/paymentsetup.php index c9edca196b..6310008fda 100644 --- a/plugin/buycourses/src/paymentsetup.php +++ b/plugin/buycourses/src/paymentsetup.php @@ -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'); diff --git a/plugin/buycourses/view/configuration.tpl b/plugin/buycourses/view/configuration.tpl index e5aad1e38d..cc5a0aba7f 100644 --- a/plugin/buycourses/view/configuration.tpl +++ b/plugin/buycourses/view/configuration.tpl @@ -1,6 +1,6 @@ - + - - +
-

{{ 'CurrencyType'|get_plugin_lang('BuyCoursesPlugin') }}:

- {% for currency in currencies %} {% if currency.status == 1 %} @@ -17,31 +28,54 @@ {% endfor %} - - {% if paypal_enable == "true" %} -
+
+
+ {% if paypal_enable == "true" %} +
+

{{ 'PayPalConfig'|get_plugin_lang('BuyCoursesPlugin') }}

- {% if paypal.sandbox == "YES" %} - {{ 'Sandbox'|get_plugin_lang('BuyCoursesPlugin') }}: +
+
+ +

{{ 'InfoApiCredentials'|get_plugin_lang('BuyCoursesPlugin') }}

+
    +
  • {{ 'InfoApiStepOne'|get_plugin_lang('BuyCoursesPlugin') }}
  • +
  • {{ 'InfoApiStepTwo'|get_plugin_lang('BuyCoursesPlugin') }}
  • +
  • {{ 'InfoApiStepThree'|get_plugin_lang('BuyCoursesPlugin') }}
  • +
+ + + + + {% if paypal.sandbox == "YES" %} + {% else %} - {{ 'Sandbox'|get_plugin_lang('BuyCoursesPlugin') }}: - {% endif %} -
- API_UserName:
- API_Password:
- API_Signature:
+ + + {% endif %} + - {% endif %} +
+
+ {% endif %} + +
+
+ {% if transfer_enable == "true" %}

{{ 'TransfersConfig'|get_plugin_lang('BuyCoursesPlugin') }}

- - - - + + + + {% set i = 0 %} diff --git a/plugin/buycourses/view/process_confirm.tpl b/plugin/buycourses/view/process_confirm.tpl index 7744c3f7cf..8b3307d55f 100644 --- a/plugin/buycourses/view/process_confirm.tpl +++ b/plugin/buycourses/view/process_confirm.tpl @@ -1,6 +1,6 @@ - +
{{ 'Name'|get_lang }}{{ 'BankAccount'|get_plugin_lang('BuyCoursesPlugin') }}{{ 'SWIFT'|get_lang }}{{ 'Option'|get_lang }}{{ 'Name'|get_lang }}{{ 'BankAccount'|get_plugin_lang('BuyCoursesPlugin') }}{{ 'SWIFT'|get_lang }}{{ 'Option'|get_lang }}