Skip to content

Commit 41b0ae5

Browse files
author
Francis Gonzales
committed
MOdify variables name
1 parent b6dce2a commit 41b0ae5

25 files changed

+535
-610
lines changed

plugin/buy_courses/database.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@
1212
id_course INT unsigned NOT NULL DEFAULT '0',
1313
code VARCHAR(40),
1414
title VARCHAR(250),
15-
visible CHAR(2) NOT NULL DEFAULT '',
15+
visible int(1),
1616
price FLOAT(11,2) NOT NULL DEFAULT '0',
17-
synchronized CHAR(2) NOT NULL DEFAULT '')";
17+
sync int(1))";
1818
Database::query($sql);
1919
$tableCourse = Database::get_main_table(TABLE_MAIN_COURSE);
2020
$sql = "SELECT id, code, title FROM $tableCourse";

plugin/buy_courses/js/funciones.js

Lines changed: 14 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ $(document).ready(function () {
4646

4747
});
4848

49-
$('#sincronizar').click(function (e) {
50-
$.post("function.php", {tab: "sincronizar"},
49+
$('#sync').click(function (e) {
50+
$.post("function.php", {tab: "sync"},
5151
function (data) {
5252
if (data.status == "false") {
5353
alert(data.contenido);
@@ -71,7 +71,7 @@ $(document).ready(function () {
7171
var vmostrar = "NO";
7272
}
7373
var vcategoria = $("#categoria_cursos").attr("value");
74-
$.post("function.php", {tab: "filtro_cursos", curso: vcurso, pricemin: pmin, pricemax: pmax, mostrar: vmostrar, categoria: vcategoria},
74+
$.post("function.php", {tab: "courses_filter", course: vcurso, pricemin: pmin, pricemax: pmax, mostrar: vmostrar, categoria: vcategoria},
7575
function (data) {
7676
if (data.status == "false") {
7777
alert(data.contenido);
@@ -86,11 +86,11 @@ $(document).ready(function () {
8686
e.stopPropagation();
8787
});
8888

89-
$("#save_money").click(function (e) {
90-
var tipo_moneda = $("#tipo_moneda").attr("value");
91-
$.post("function.php", {tab: "guardar_moneda", moneda: tipo_moneda},
89+
$("#save_currency").click(function (e) {
90+
var currency_type = $("#currency_type").attr("value");
91+
$.post("function.php", {tab: "save_currency", currency: currency_type},
9292
function (data) {
93-
alert(data.contenido);
93+
alert(data.content);
9494
}, "json");
9595

9696
e.preventDefault();
@@ -106,9 +106,9 @@ $(document).ready(function () {
106106
} else {
107107
var vsandbox = "NO";
108108
}
109-
$.post("function.php", {tab: "guardar_paypal", username: name, password: clave, signature: firma, sandbox: vsandbox},
109+
$.post("function.php", {tab: "save_paypal", username: name, password: clave, signature: firma, sandbox: vsandbox},
110110
function (data) {
111-
alert(data.contenido);
111+
alert(data.content);
112112
}, "json");
113113

114114
e.preventDefault();
@@ -143,13 +143,13 @@ $(document).ready(function () {
143143
});
144144

145145
$("#cancelapedido").click(function (e) {
146-
$.post("function.php", {tab: "borrar_variables"});
146+
$.post("function.php", {tab: "unset_variables"});
147147
window.location.replace("list.php");
148148
});
149149

150-
$(".borrar_pedido").click(function (e) {
150+
$(".clear_order").click(function (e) {
151151
var vid = $(this).parent().attr("id");
152-
$.post("function.php", {tab: "borrar_pedido", id: vid},
152+
$.post("function.php", {tab: "clear_order", id: vid},
153153
function (data) {
154154
location.reload();
155155
}, "json");
@@ -158,9 +158,9 @@ $(document).ready(function () {
158158
e.stopPropagation();
159159
});
160160

161-
$(".confirmar_pedido").click(function (e) {
161+
$(".confirm_order").click(function (e) {
162162
var vid = $(this).parent().attr("id");
163-
$.post("function.php", {tab: "confirmar_pedido", id: vid},
163+
$.post("function.php", {tab: "confirm_order", id: vid},
164164
function (data) {
165165
location.reload();
166166
}, "json");
@@ -169,32 +169,6 @@ $(document).ready(function () {
169169
e.stopPropagation();
170170
});
171171

172-
$(".setting_tpv").click(function () {
173-
var vcod = $(this).attr("id");
174-
$.post("function.php", {tab: "cargar_tpv_configuracion", cod: vcod},
175-
function (data) {
176-
$("#resultado_tpv").html(data.contenido);
177-
$("#guardar_datos_tpv").click(function (e) {
178-
var vcod = $("#conf_tpv").attr("value");
179-
var num = $("#num_parametros").attr("value");
180-
var vaction = $("#action").attr("value");
181-
var array = [];
182-
for (var i = 0; i < num; i++) {
183-
var selector = '#valor_tpv' + i;
184-
array.push($(selector).attr("value"));
185-
}
186-
$.post("function.php", {tab: "save_tpv", cod: vcod, nump: num, action: vaction, parametros: array},
187-
function (data) {
188-
alert(data.contenido);
189-
$("#resultado_tpv").html("");
190-
}, "json");
191-
192-
e.preventDefault();
193-
e.stopPropagation();
194-
});
195-
}, "json");
196-
});
197-
198172
$(".slt_tpv").change(function () {
199173
var vcod = $(this).attr("value");
200174
$.post("function.php", {tab: "activar_tpv", cod: vcod});

plugin/buy_courses/lang/english.php

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,29 @@
11
<?php
2-
/**
3-
*
4-
* @copyright (c) 2012 University of Geneva
5-
* @license GNU General Public License - http://www.gnu.org/copyleft/gpl.html
6-
* @author Laurent Opprecht <laurent@opprecht.info>
7-
*/
8-
92
//Needed in order to show the plugin title
10-
$strings['plugin_title'] = "Buy Courses";
3+
$strings['plugin_title'] = "Comprar cursos";
114
$strings['plugin_comment'] = "Configurar precios, tipos de pago, visibilidad de cursos.";
125

136
$strings['Visible'] = "Mostrar en el listado";
147
$strings['Options'] = "Opciones";
158
$strings['Price'] = "Precio";
16-
$strings['sincronizar'] = "Sincronizar cursos de la base de datos";
9+
$strings['SyncCourseDatabase'] = "Sincronizar cursos de la base de datos";
1710

1811
$strings['Private'] = "Privado - acceso autorizado s&oacute;lo para los miembros del curso";
1912
$strings['CourseVisibilityClosed'] = "Cerrado - no hay acceso a este curso";
2013
$strings['OpenToThePlatform'] = "Abierto - acceso autorizado s&oacute;lo para los usuarios registrados en la plataforma";
2114
$strings['OpenToTheWorld'] = "P&uacute;blico - acceso autorizado a cualquier persona";
2215

16+
$strings['bc_setting_courses_available'] = "Configuraci&oacute;n de cursos disponibles";
17+
$strings['bc_setting_pay'] = "Configuraci&oacute;n pagos";
18+
2319
$strings['Description'] = "Descripci&oacute;n";
2420
$strings['Buy'] = "Comprar";
21+
$strings['Filtro_buscar'] = "Filtro de busqueda";
22+
$strings['Curso'] = "Curso";
23+
$strings['Price_Maximum'] = "Precio mayor de";
24+
$strings['Price_Minimum'] = "Precio menor de";
25+
$strings['Mostrar_disponibles'] = "Mostrar cursos disponibles";
26+
$strings['Categorias'] = "Categorias";
2527

2628
$strings['paypal_enable'] = "Habilitar PayPal";
2729
$strings['tarjet_credit_enable'] = "Habilitar TPV";
@@ -42,4 +44,9 @@
4244
$strings['bc_pagos_index'] = 'Configuraci�n pagos';
4345
$strings['bc_pending'] = 'Pedidos pendientes de pago';
4446

45-
$strings['Ref_pedido'] = 'Referencia del pedido';
47+
$strings['Ref_pedido'] = 'Referencia del pedido';
48+
$strings['transferencia_bancaria'] = 'Transferencia Bancaria';
49+
$strings['paypal'] = 'PayPal';
50+
$strings['confirmar_compra'] = 'Confirmar compra de curso';
51+
52+
$strings['The_User_Is_Already_Registered'] = 'El usuario ya está registrado';

plugin/buy_courses/lang/spanish.php

Lines changed: 19 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,13 @@
66
$strings['Visible'] = "Mostrar en el listado";
77
$strings['Options'] = "Opciones";
88
$strings['Price'] = "Precio";
9-
$strings['sincronizar'] = "Sincronizar cursos de la base de datos";
9+
$strings['SyncCourseDatabase'] = "Sincronizar cursos de la base de datos";
1010

1111
$strings['Private'] = "Privado - acceso autorizado s&oacute;lo para los miembros del curso";
1212
$strings['CourseVisibilityClosed'] = "Cerrado - no hay acceso a este curso";
1313
$strings['OpenToThePlatform'] = "Abierto - acceso autorizado s&oacute;lo para los usuarios registrados en la plataforma";
1414
$strings['OpenToTheWorld'] = "P&uacute;blico - acceso autorizado a cualquier persona";
1515

16-
$strings['bc_setting_courses_available'] = "Configuraci&oacute;n de cursos disponibles";
17-
$strings['bc_setting_pay'] = "Configuraci&oacute;n pagos";
18-
1916
$strings['Description'] = "Descripci&oacute;n";
2017
$strings['Buy'] = "Comprar";
2118
$strings['Filtro_buscar'] = "Filtro de busqueda";
@@ -36,15 +33,27 @@
3633
$strings['AlreadyBuy'] = "Ya est� matriculado en el curso";
3734
$strings['Message_conf_transf'] = "Una vez confirmado, recibira un e-mail con los datos bancarios y una referencia del pedido.";
3835
$strings['bc_subject'] = "Confirmaci�n pedido de cursos";
39-
$strings['bc_message'] = "Estimado {{name}}. <br />En cuanto recibamos confirmaci&oacute;n de pago procederemos a dar de alta su usuario en el curso <strong>{{curso}}</strong>.<br><br><strong>No olvide indicar en el concepto de la transferencia el n&uacute;mero de referencia del pedido: <div style='display:inline;text-align:center; font-weight:bold; font-size:20px; color:#333'>{{reference}}</div></strong>";
40-
$strings['bc_registrado'] = 'Ya se encuentra registrado en el curso';
4136
$strings['bc_tmp_registrado'] = 'Se encuentra a la espera de recibir el pago';
4237

43-
$strings['bc_confi_index'] = 'Configuraci�n cursos y precio';
44-
$strings['bc_pagos_index'] = 'Configuraci�n pagos';
45-
$strings['bc_pending'] = 'Pedidos pendientes de pago';
46-
4738
$strings['Ref_pedido'] = 'Referencia del pedido';
4839
$strings['transferencia_bancaria'] = 'Transferencia Bancaria';
4940
$strings['paypal'] = 'PayPal';
5041
$strings['confirmar_compra'] = 'Confirmar compra de curso';
42+
43+
$strings['TheUserIsAlreadyRegistered'] = 'El usuario ya está registrado';
44+
$strings['ProblemToSaveTheCurrencyType'] = 'Problema al guardar el tipo de moneda';
45+
$strings['ProblemToSaveThePaypalParameters'] = 'Problema para guardar los parametros de Paypal';
46+
$strings['ProblemToInsertANewAccount'] = 'Problemas para insertar una nueva cuenta';
47+
$strings['ProblemToDeleteTheAccount'] = 'Problema para eliminar la cuenta';
48+
$strings['ProblemToSaveTheMessage'] = 'Problema para guardar el mensaje';
49+
$strings['ProblemToSubscribeTheUser'] = 'Problema para suscribir el usuario';
50+
$strings['TheSubscriptionAndActivationWereDoneSuccessfully'] = 'La suscripción y la activación se realizaron con éxito.';
51+
$strings['TheUserIsAlreadyRegisteredInTheCourse'] = 'El usuario ya está registrado en el curso.';
52+
$strings['CourseListOnSale'] = 'Lista de cursos a la venta';
53+
$strings['BuyCourses'] = 'Comprar cursos';
54+
$strings['ConfigurationOfCoursesAndPrices'] = 'Configuración de los cursos y precios';
55+
$strings['ConfigurationOfPayments'] = 'Configuración de pagos';
56+
$strings['OrdersPendingOfPayment'] = 'Pedidos pendientes de pago';
57+
$strings['AvailableCoursesConfiguration'] = 'Configuración de cursos disponibles';
58+
$strings['PaymentsConfiguration'] = 'Configuración de Pagos';
59+
$strings['bc_message'] = "Estimado {{name}}. <br />En cuanto recibamos confirmaci&oacute;n de pago procederemos a dar de alta su usuario en el curso <strong>{{curso}}</strong>.<br><br><strong>No olvide indicar en el concepto de la transferencia el n&uacute;mero de referencia del pedido: <div style='display:inline;text-align:center; font-weight:bold; font-size:20px; color:#333'>{{reference}}</div></strong>";

plugin/buy_courses/resources/plugin.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ table td.ta-center, table th.ta-center {
1515
vertical-align: middle;
1616
}
1717

18-
#tabla_cursos td input.price, #tabla_trasferencia td input, #tipo_moneda {
18+
#tabla_cursos td input.price, #tabla_trasferencia td input, #currency_type {
1919
margin: 0;
2020
}
2121

plugin/buy_courses/src/ajax.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
echo Display::tag('h2', $course_info['name']);
1414
echo '<br />';
1515

16-
$sql = "SELECT * FROM $tbl_course_description WHERE c_id = " . $course_info['real_id'] . " AND session_id = 0 ORDER BY id";
16+
$sql = "SELECT * FROM $tbl_course_description WHERE c_id = " . intval($course_info['real_id']) . " AND session_id = 0 ORDER BY id";
1717
$result = Database::query($sql);
1818
if (Database::num_rows($result) > 0) {
1919
while ($description = Database::fetch_object($result)) {

0 commit comments

Comments
 (0)