Commit cfb1a18a by Sebastián Collado Montañez

Merge branch 'develop' of http://gitlab.ujaen.es/yotta/pictogram into develop

parents 6daf7fad 3485f6d4
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
"admin_panel": "Admin panel", "admin_panel": "Admin panel",
"alert": "Alert", "alert": "Alert",
"all": "All", "all": "All",
"all_methods": "All methods",
"animation": "Animation", "animation": "Animation",
"apply":"Apply", "apply":"Apply",
"annual": "Annual", "annual": "Annual",
...@@ -75,6 +76,7 @@ ...@@ -75,6 +76,7 @@
"crop_image": "Crop image", "crop_image": "Crop image",
"data_no_saved": "Data can't be saved", "data_no_saved": "Data can't be saved",
"data_saved": "Data saved", "data_saved": "Data saved",
"date_error": "Filter date to must be greater than since",
"day_format": "yyyy/MM/dd", "day_format": "yyyy/MM/dd",
"days": "Days", "days": "Days",
"days_from_first_session": "days from first session", "days_from_first_session": "days from first session",
...@@ -254,6 +256,7 @@ ...@@ -254,6 +256,7 @@
"password_type": "Password", "password_type": "Password",
"pause": "Pause", "pause": "Pause",
"pause_session": "Pause session", "pause_session": "Pause session",
"percent": "Percent",
"personal_data": "Personal data", "personal_data": "Personal data",
"personal_data": "Personal data", "personal_data": "Personal data",
"phone": "Phone number", "phone": "Phone number",
......
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
"admin_panel": "Panel de administración", "admin_panel": "Panel de administración",
"alert": "Alerta", "alert": "Alerta",
"all": "Todos", "all": "Todos",
"all_methods": "Todos los métodos",
"animation": "Animación", "animation": "Animación",
"apply":"Aplicar", "apply":"Aplicar",
"annual": "Anual", "annual": "Anual",
...@@ -75,6 +76,7 @@ ...@@ -75,6 +76,7 @@
"crop_image": "Recortar imagen", "crop_image": "Recortar imagen",
"data_no_saved": "Los datos no se han podido guardar", "data_no_saved": "Los datos no se han podido guardar",
"data_saved": "Datos guardados", "data_saved": "Datos guardados",
"date_error": "La fecha 'desde' debe ser menor que la fecha 'hasta'",
"day_format": "dd/MM/yyyy", "day_format": "dd/MM/yyyy",
"days": "Días", "days": "Días",
"days_from_first_session": "días desde la primera sesión", "days_from_first_session": "días desde la primera sesión",
...@@ -253,6 +255,7 @@ ...@@ -253,6 +255,7 @@
"password_short": "La contraseña es muy corta, debe tener al menos una longitud de {{minlength}} caracteres", "password_short": "La contraseña es muy corta, debe tener al menos una longitud de {{minlength}} caracteres",
"pause": "Pausar", "pause": "Pausar",
"pause_session": "Pausar sesión", "pause_session": "Pausar sesión",
"percent": "Porcentaje",
"personal_data": "Datos personales", "personal_data": "Datos personales",
"personal_data": "Datos personales", "personal_data": "Datos personales",
"phone": "Teléfono", "phone": "Teléfono",
......
...@@ -8,6 +8,7 @@ dashboardControllers.controller('StudentReportsCtrl', function StudentReportsCtr ...@@ -8,6 +8,7 @@ dashboardControllers.controller('StudentReportsCtrl', function StudentReportsCtr
$stateParams, $stateParams,
$http, $http,
config, config,
ngToast,
$filter, $filter,
$translate) { $translate) {
...@@ -63,6 +64,7 @@ dashboardControllers.controller('StudentReportsCtrl', function StudentReportsCtr ...@@ -63,6 +64,7 @@ dashboardControllers.controller('StudentReportsCtrl', function StudentReportsCtr
class:"instruction-opt", name: "- - "+$scope.fulldata.methods[i].instructions[j].name, id_method: $scope.fulldata.methods[i].id}); class:"instruction-opt", name: "- - "+$scope.fulldata.methods[i].instructions[j].name, id_method: $scope.fulldata.methods[i].id});
} }
} }
$scope.filter();
}) })
.error(function(data, status, headers, config) { .error(function(data, status, headers, config) {
console.log("Error from API: " + data.error); console.log("Error from API: " + data.error);
...@@ -86,14 +88,16 @@ dashboardControllers.controller('StudentReportsCtrl', function StudentReportsCtr ...@@ -86,14 +88,16 @@ dashboardControllers.controller('StudentReportsCtrl', function StudentReportsCtr
$scope.filter = function (){ $scope.filter = function (){
if($scope.reportDateSince > $scope.reportDateTo){ if($scope.reportDateSince > $scope.reportDateTo){
//Mostrar error $translate('date_error').then(function (translation) {
ngToast.danger({ content: translation });
});
return; return;
} }
$scope.showPrint = true; $scope.showPrint = true;
$scope.reportDateSinceFormat = moment($scope.reportDateSince).format("DD/MM/YYYY"); $scope.reportDateSinceFormat = moment($scope.reportDateSince).format("DD/MM/YYYY");
$scope.reportDateToFormat = moment($scope.reportDateTo).format("DD/MM/YYYY"); $scope.reportDateToFormat = moment($scope.reportDateTo).format("DD/MM/YYYY");
if($scope.selected_method == "-1"){ if($scope.selected_method == "-1"){
$scope.printName="All methods"; $scope.printName=$translate.instant('all_methods');
$scope.statistics({id: -1, class: "method-opt"}); $scope.statistics({id: -1, class: "method-opt"});
}else{ }else{
$scope.printName=JSON.parse($scope.selected_method).name; $scope.printName=JSON.parse($scope.selected_method).name;
...@@ -201,8 +205,7 @@ dashboardControllers.controller('StudentReportsCtrl', function StudentReportsCtr ...@@ -201,8 +205,7 @@ dashboardControllers.controller('StudentReportsCtrl', function StudentReportsCtr
//CHART DATA //CHART DATA
//*** Error rate chart*** //*** Error rate chart***
$scope.labels1 = $scope.method_chart_dates[0]; $scope.labels1 = $scope.method_chart_dates[0];
$scope.series1 = ['Tasa de error']; $scope.series1 = [$translate.instant('error_rate')];
//$scope.dataChart1 = [error_rate];
$scope.dataChart1 = $scope.error_rate_rate; $scope.dataChart1 = $scope.error_rate_rate;
$scope.optionsChartDateRate = { $scope.optionsChartDateRate = {
elements:{ elements:{
...@@ -215,7 +218,7 @@ dashboardControllers.controller('StudentReportsCtrl', function StudentReportsCtr ...@@ -215,7 +218,7 @@ dashboardControllers.controller('StudentReportsCtrl', function StudentReportsCtr
scales: { scales: {
yAxes: [{ yAxes: [{
scaleLabel: { scaleLabel: {
labelString: "Porcentaje", labelString: $translate.instant('percent'),
display: true display: true
} }
}], }],
...@@ -337,7 +340,7 @@ dashboardControllers.controller('StudentReportsCtrl', function StudentReportsCtr ...@@ -337,7 +340,7 @@ dashboardControllers.controller('StudentReportsCtrl', function StudentReportsCtr
//*** Vocabuary size chart*** //*** Vocabuary size chart***
$scope.labels4 = $scope.method_chart_dates[0]; $scope.labels4 = $scope.method_chart_dates[0];
$scope.series4 = [$translate.instant('Pictograms')]; $scope.series4 = [$translate.instant('pictograms')];
$scope.dataChart4 = $scope.vocab_size; $scope.dataChart4 = $scope.vocab_size;
//*** Phrase size chart*** //*** Phrase size chart***
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment