Skip to content

Commit 1b6530c

Browse files
author
Francis Gonzales
committed
Rename variables
1 parent 41b0ae5 commit 1b6530c

22 files changed

+146
-175
lines changed

plugin/buy_courses/js/funciones.js

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -29,16 +29,16 @@ $(document).ready(function () {
2929
$(".guardar").click(function () {
3030
var vvisible = $(this).parent().parent().prev().prev().children().attr("checked");
3131
var vprice = $(this).parent().parent().prev().children().attr("value");
32-
var idcurso = $(this).parent().parent().attr("id");
33-
$.post("function.php", {tab: "save_mod", id: idcurso, visible: vvisible, price: vprice},
32+
var courseid = $(this).parent().parent().attr("id");
33+
$.post("function.php", {tab: "save_mod", id: courseid, visible: vvisible, price: vprice},
3434
function (data) {
3535
if (data.status == "false") {
3636
alert("Error database");
3737
} else {
38-
$("#curso" + data.id).children().attr("style", "display:''");
39-
$("#curso" + data.id).children().next().attr("style", "display:none");
40-
$("#curso" + data.id).parent().removeClass("fmod")
41-
$("#curso" + data.id).parent().children().each(function () {
38+
$("#course" + data.id).children().attr("style", "display:''");
39+
$("#course" + data.id).children().next().attr("style", "display:none");
40+
$("#course" + data.id).parent().removeClass("fmod")
41+
$("#course" + data.id).parent().children().each(function () {
4242
$(this).removeClass("btop");
4343
});
4444
}
@@ -62,22 +62,22 @@ $(document).ready(function () {
6262

6363

6464
$('#confirmar_filtro').click(function (e) {
65-
var vcurso = $("#course_name").attr("value");
65+
var vcourse = $("#course_name").attr("value");
6666
var pmin = $("#price_min").attr("value");
6767
var pmax = $("#price_max").attr("value");
6868
if ($("#mostrar_disponibles").attr("checked") == "checked") {
69-
var vmostrar = "SI";
69+
var vshow = "SI";
7070
} else {
71-
var vmostrar = "NO";
71+
var vshow = "NO";
7272
}
73-
var vcategoria = $("#categoria_cursos").attr("value");
74-
$.post("function.php", {tab: "courses_filter", course: vcurso, pricemin: pmin, pricemax: pmax, mostrar: vmostrar, categoria: vcategoria},
73+
var vcategory = $("#courses_category").attr("value");
74+
$.post("function.php", {tab: "courses_filter", course: vcourse, pricemin: pmin, pricemax: pmax, mostrar: vshow, category: vcategory},
7575
function (data) {
7676
if (data.status == "false") {
77-
alert(data.contenido);
78-
$("#resultado_cursos").html('');
77+
alert(data.content);
78+
$("#course_results").html('');
7979
} else {
80-
$("#resultado_cursos").html(data.contenido);
80+
$("#course_results").html(data.content);
8181
}
8282
$(document).ready(acciones_ajax);
8383
}, "json");

plugin/buy_courses/lang/spanish.php

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,11 @@
1616
$strings['Description'] = "Descripción";
1717
$strings['Buy'] = "Comprar";
1818
$strings['Filtro_buscar'] = "Filtro de busqueda";
19-
$strings['Curso'] = "Curso";
2019
$strings['Price_Maximum'] = "Precio mayor de";
2120
$strings['Price_Minimum'] = "Precio menor de";
2221
$strings['Mostrar_disponibles'] = "Mostrar cursos disponibles";
23-
$strings['Categorias'] = "Categorias";
2422

2523
$strings['paypal_enable'] = "Habilitar PayPal";
26-
$strings['tarjet_credit_enable'] = "Habilitar TPV";
2724
$strings['transference_enable'] = "Habilitar transferencia";
2825
$strings['unregistered_users_enable'] = "Permitir usuarios sin registro en la plataforma";
2926

@@ -36,7 +33,6 @@
3633
$strings['bc_tmp_registrado'] = 'Se encuentra a la espera de recibir el pago';
3734

3835
$strings['Ref_pedido'] = 'Referencia del pedido';
39-
$strings['transferencia_bancaria'] = 'Transferencia Bancaria';
4036
$strings['paypal'] = 'PayPal';
4137
$strings['confirmar_compra'] = 'Confirmar compra de curso';
4238

@@ -56,4 +52,6 @@
5652
$strings['OrdersPendingOfPayment'] = 'Pedidos pendientes de pago';
5753
$strings['AvailableCoursesConfiguration'] = 'Configuración de cursos disponibles';
5854
$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>";
55+
$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>";
56+
$strings['Categories'] = "Categorias";
57+
$strings['BankTransference'] = 'Transferencia Bancaria';
File renamed without changes.

plugin/buy_courses/resources/plugin.css

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,20 +11,20 @@ table td.ta-center, table th.ta-center {
1111
text-align: center;
1212
}
1313

14-
#tabla_cursos td, #tabla_trasferencia td, #tabla_pedidos td {
14+
#courses_table td, #transference_table td, #order_table td {
1515
vertical-align: middle;
1616
}
1717

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

22-
#tabla_cursos td.btop {
22+
#courses_table td.btop {
2323
border-top: 1px solid red;
2424
border-bottom: 1px solid red;
2525
}
2626

27-
#tabla_cursos tr.fmod {
27+
#courses_table tr.fmod {
2828
border: 1px solid red;
2929
background: #FFE0E0;
3030
}
@@ -53,23 +53,23 @@ table td.ta-center, table th.ta-center {
5353
text-align: center;
5454
}
5555

56-
textarea#mensaje {
56+
textarea#message {
5757
width: 50%;
5858
}
5959

60-
.envio_resultado {
60+
.send_result {
6161
font-weight: bold;
6262
}
6363

64-
select#lsesiones, select#lcursos, select#lejercicios, select#estado {
64+
select#lsessions, select#lcourses, select#lexercises, select#status {
6565
margin-bottom: 0px;
6666
}
6767

68-
.columna_campo_filtro {
68+
.column_field_filter {
6969
padding: 6px 10px 1px 1px;
7070
text-align: right;
7171
}
7272

7373
.height5 {
7474
height: 5px;
75-
}
75+
}

plugin/buy_courses/src/buy_course_plugin.class.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ static function create()
1818
return $result ? $result : $result = new self();
1919
}
2020

21-
protected function __construct()
21+
public function __construct()
2222
{
2323
parent::__construct('1.0', 'Jose Angel Ruiz, Francis Gonzales', array('paypal_enable' => 'boolean', 'transference_enable' => 'boolean', 'unregistered_users_enable' => 'boolean'));
2424
}

plugin/buy_courses/src/configuration.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,4 +42,4 @@
4242
$content = $tpl->fetch($listing_tpl);
4343
$tpl->assign('content', $content);
4444
$tpl->display_one_col_template();
45-
}
45+
}

plugin/buy_courses/src/error.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,5 @@
1414
unset($_SESSION['TOKEN']);
1515
$_SESSION['bc_success'] = false;
1616
$_SESSION['bc_message'] = 'CancelOrder';
17-
header('Location:list.php');
18-
?>
17+
18+
header('Location:list.php');

plugin/buy_courses/src/expresscheckout.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,5 +58,4 @@
5858
echo "Short Error Message: " . $ErrorShortMsg;
5959
echo "Error Code: " . $ErrorCode;
6060
echo "Error Severity Code: " . $ErrorSeverityCode;
61-
}
62-
?>
61+
}

plugin/buy_courses/src/list.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,12 @@
2727
if ($_SESSION['bc_success'] == true) {
2828
$message = sprintf(utf8_encode($plugin->get_lang($_SESSION['bc_message'])), $_SESSION['bc_url']);
2929
unset($_SESSION['bc_url']);
30-
$tpl->assign('estilo', 'confirmation-message');
30+
$tpl->assign('class', 'confirmation-message');
3131
} else {
3232
$message = utf8_encode($plugin->get_lang($_SESSION['bc_message']));
33-
$tpl->assign('estilo', 'warning-message');
33+
$tpl->assign('class', 'warning-message');
3434
}
35-
$tpl->assign('mensaje', $message);
35+
$tpl->assign('message', $message);
3636
unset($_SESSION['bc_success']);
3737
unset($_SESSION['bc_message']);
3838

@@ -45,11 +45,11 @@
4545
$currencyType = findCurrency();
4646

4747
$tpl->assign('server', $_configuration['root_web']);
48-
$tpl->assign('cursos', $courseList);
49-
$tpl->assign('categorias', $categoryList);
48+
$tpl->assign('courses', $courseList);
49+
$tpl->assign('category', $categoryList);
5050
$tpl->assign('currency', $currencyType);
5151

5252
$listing_tpl = 'buy_courses/view/list.tpl';
5353
$content = $tpl->fetch($listing_tpl);
5454
$tpl->assign('content', $content);
55-
$tpl->display_one_col_template();
55+
$tpl->display_one_col_template();

plugin/buy_courses/src/paymentsetup.php

Lines changed: 19 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -5,47 +5,43 @@
55
require_once dirname(__FILE__) . '/buy_course.lib.php';
66
require_once '../../../main/inc/global.inc.php';
77
require_once 'buy_course_plugin.class.php';
8-
8+
$plugin = Buy_CoursesPlugin::create();
99
$_cid = 0;
10-
$interbreadcrumb[] = array("url" => "list.php", "name" => 'Listado de cursos a la venta');
11-
$interbreadcrumb[] = array("url" => "configuration.php", "name" => get_lang('Configuraci&oacute;n de cursos disponibles'));
10+
$interbreadcrumb[] = array("url" => "list.php", "name" => $plugin->get_lang('CourseListOnSale'));
11+
$interbreadcrumb[] = array("url" => "configuration.php", "name" => $plugin->get_lang('AvailableCoursesConfiguration'));
1212

13-
$tpl = new Template('Configuraci&oacute;n de Pagos');
13+
$tpl = new Template('PaymentConfiguration');
1414

1515
$teacher = api_is_platform_admin();
1616
api_protect_course_script(true);
1717

1818
if ($teacher) {
1919
// Sync course table with the plugin
2020
$listCurrency = listCurrency();
21-
2221
$paypalParams = paypalParameters();
2322
$transferenceParams = transferenceParameters();
2423

25-
$ruta = api_get_path(WEB_PLUGIN_PATH) . 'buy_courses/resources/message_confirmation.png';
26-
$ruta2 = api_get_path(WEB_PLUGIN_PATH) . 'buy_courses/resources/save.png';
27-
$ruta3 = api_get_path(WEB_PLUGIN_PATH) . 'buy_courses/resources/more.png';
28-
$ruta4 = api_get_path(WEB_PLUGIN_PATH) . 'buy_courses/resources/borrar.png';
29-
$ruta5 = api_get_path(WEB_PLUGIN_PATH) . 'buy_courses/resources/acces_tool.gif';
24+
$confirmationImg = api_get_path(WEB_PLUGIN_PATH) . 'buy_courses/resources/message_confirmation.png';
25+
$saveImg = api_get_path(WEB_PLUGIN_PATH) . 'buy_courses/resources/save.png';
26+
$moreImg = api_get_path(WEB_PLUGIN_PATH) . 'buy_courses/resources/more.png';
27+
$deleteImg = api_get_path(WEB_PLUGIN_PATH) . 'buy_courses/resources/delete.png';
28+
$showImg = api_get_path(WEB_PLUGIN_PATH) . 'buy_courses/resources/acces_tool.gif';
3029

3130
$plugin = Buy_CoursesPlugin::create();
32-
$paypal_enable = $plugin->get('paypal_enable');
33-
$tarjeta_enable = $plugin->get('tarjet_credit_enable');
34-
$transference_enable = $plugin->get('transference_enable');
31+
$paypalEnable = $plugin->get('paypal_enable');
32+
$transferenceEnable = $plugin->get('transference_enable');
3533

3634
$tpl->assign('server', $_configuration['root_web']);
3735
$tpl->assign('currencies', $listCurrency);
3836
$tpl->assign('paypal', $paypalParams);
39-
$tpl->assign('transferencia', $transferenceParams);
40-
$tpl->assign('confirmation_img', $ruta);
41-
$tpl->assign('save_img', $ruta2);
42-
$tpl->assign('ruta_more', $ruta3);
43-
$tpl->assign('ruta_borrar', $ruta4);
44-
$tpl->assign('ruta_ver', $ruta5);
45-
$tpl->assign('paypal_enable', $paypal_enable);
46-
$tpl->assign('tarjeta_enable', $tarjeta_enable);
47-
$tpl->assign('transference_enable', $transference_enable);
48-
37+
$tpl->assign('transference', $transferenceParams);
38+
$tpl->assign('confirmation_img', $confirmationImg);
39+
$tpl->assign('save_img', $saveImg);
40+
$tpl->assign('more_img', $moreImg);
41+
$tpl->assign('delete_img', $deleteImg);
42+
$tpl->assign('show_img', $showImg);
43+
$tpl->assign('paypal_enable', $paypalEnable);
44+
$tpl->assign('transference_enable', $transferenceEnable);
4945

5046
$listing_tpl = 'buy_courses/view/paymentsetup.tpl';
5147
$content = $tpl->fetch($listing_tpl);

0 commit comments

Comments
 (0)