Commit 7456cee4 by Arturo Montejo Ráez

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

parents 9979181c daa52080
...@@ -11,6 +11,8 @@ mocha-report.xml ...@@ -11,6 +11,8 @@ mocha-report.xml
########## ##########
sails/upload sails/upload
sails/symbolstx* sails/symbolstx*
sails/arasaac*
sails/arasaac
sails/src/assets/symbolstx* sails/src/assets/symbolstx*
sails/src/assets/upload sails/src/assets/upload
sails/upload.tgz sails/upload.tgz
......
...@@ -286,10 +286,10 @@ public class Picto extends Img { ...@@ -286,10 +286,10 @@ public class Picto extends Img {
public String get_legend() { public String get_legend() {
String legend; String legend;
try { try {
legend=this.attributes.getString(JSON_ATTTRS.LEGEND); legend=this.attributes.has(JSON_ATTTRS.LEGEND) ? this.attributes.getString(JSON_ATTTRS.LEGEND) : JSON_ATTTR_LEGEND_VALUES.NONE;
} catch (JSONException e) { } catch (JSONException e) {
legend=JSON_ATTTR_LEGEND_VALUES.NONE; // By default legend=JSON_ATTTR_LEGEND_VALUES.NONE; // By default
Log.e(LOG_TAG," Error getting legend:"+e.getMessage()); Log.e(LOG_TAG," Error getting legend:"+e.getMessage()+ "attributes: "+this.attributes.toString());
} }
return legend.equalsIgnoreCase("null") ? JSON_ATTTR_LEGEND_VALUES.NONE : legend; return legend.equalsIgnoreCase("null") ? JSON_ATTTR_LEGEND_VALUES.NONE : legend;
} }
......
...@@ -269,7 +269,7 @@ public class User { ...@@ -269,7 +269,7 @@ public class User {
/** /**
* *
* @return input feedback of the student configuration (default: "vibration") * @return delivery method
*/ */
public JSON_STUDENT_ATTTRS.delivery delivery() { public JSON_STUDENT_ATTTRS.delivery delivery() {
JSON_STUDENT_ATTTRS.delivery delivery; JSON_STUDENT_ATTTRS.delivery delivery;
......
...@@ -55,8 +55,8 @@ ...@@ -55,8 +55,8 @@
<!--Upload local img --> <!--Upload local img -->
<string name="enterImgLabel">Introduzca etiqueta de la imagen</string> <string name="enterImgLabel">Introduzca etiqueta de la imagen</string>
<string name="notNewCats">No puede añadir nuevas categorias</string> <string name="notNewCats">No puede añadir nuevas categorias</string>
<string name="upload_error">No pudo subirse al servidor. Se intentará más adelante</string> <string name="upload_error">No pudo subirse a Pictogram Web. Se intentará más adelante</string>
<string name="upload_ok">Se subió correctamente al servidor</string> <string name="upload_ok">Se subió correctamente a Pictogram Web</string>
<string name="upload_duplicated">Pictograma ya presente en la colección. Utilice otra imagen</string> <string name="upload_duplicated">Pictograma ya presente en la colección. Utilice otra imagen</string>
......
...@@ -122,7 +122,27 @@ public class PictoAnimation { ...@@ -122,7 +122,27 @@ public class PictoAnimation {
} }
}); });
moveAnim.addListener(new Animator.AnimatorListener() {
@Override
public void onAnimationStart(Animator animation) {
}
@Override
public void onAnimationEnd(Animator animation) {
if (up) activity.ttsButton.setImageAlpha(255);
}
@Override
public void onAnimationCancel(Animator animation) {
}
@Override
public void onAnimationRepeat(Animator animation) {
}
});
moveAnim.setDuration(500); moveAnim.setDuration(500);
moveAnim.start(); moveAnim.start();
} }
......
...@@ -183,9 +183,7 @@ public class PictogramActivity extends Activity implements VocabularyTalk.iVocab ...@@ -183,9 +183,7 @@ public class PictogramActivity extends Activity implements VocabularyTalk.iVocab
} }
}); });
if (this.vocabulary != null && this.vocabulary.size() > 0) {
Log.d(LOG_TAG, "Vocabulario correcto de tam:" + vocabulary.size());
}
this.tapeAdapter = new TapeAdapter(); this.tapeAdapter = new TapeAdapter();
this.tapeGridView = (GridView) this.findViewById(R.id.tape_grid_view); this.tapeGridView = (GridView) this.findViewById(R.id.tape_grid_view);
...@@ -403,7 +401,9 @@ public class PictogramActivity extends Activity implements VocabularyTalk.iVocab ...@@ -403,7 +401,9 @@ public class PictogramActivity extends Activity implements VocabularyTalk.iVocab
@Override @Override
protected void onStop() { protected void onStop() {
super.onStop(); super.onStop();
tts.destroy();
Log.e(LOG_TAG, "Closing Pictogram Activity"); Log.e(LOG_TAG, "Closing Pictogram Activity");
PCBcontext.getNetService().closeNotifyStatus(); PCBcontext.getNetService().closeNotifyStatus();
} }
...@@ -912,7 +912,7 @@ public class PictogramActivity extends Activity implements VocabularyTalk.iVocab ...@@ -912,7 +912,7 @@ public class PictogramActivity extends Activity implements VocabularyTalk.iVocab
@Override @Override
public void onClick(View arg0) { public void onClick(View arg0) {
LinkedList<Picto> lp = tapeAdapter.getAll(); LinkedList<Picto> lp = tapeAdapter.getAll();
// This triggers the "Show" websocket action // This triggers the "Show" websocket action SI hay algo en la cinta y esta no está vacia
if (lp.size()>0 && !PictogramActivity.this.tapeAdapter.play()) { if (lp.size()>0 && !PictogramActivity.this.tapeAdapter.play()) {
PCBcontext.getActionLog().log(new PictosAction(lp)); PCBcontext.getActionLog().log(new PictosAction(lp));
tapeAdapter.ttsAllNew(tts); tapeAdapter.ttsAllNew(tts);
...@@ -926,11 +926,13 @@ public class PictogramActivity extends Activity implements VocabularyTalk.iVocab ...@@ -926,11 +926,13 @@ public class PictogramActivity extends Activity implements VocabularyTalk.iVocab
protected void showOnlyTape(boolean onlyTape) { protected void showOnlyTape(boolean onlyTape) {
boolean tape_delivered_prev=this.tape_delivered; boolean tape_delivered_prev=this.tape_delivered;
Log.e(LOG_TAG,"ONLY TAPE->"+onlyTape+" "+ttsButton.isEnabled());
this.tape_delivered=onlyTape; this.tape_delivered=onlyTape;
if (onlyTape) { if (onlyTape) {
if (!tape_delivered_prev) { if (!tape_delivered_prev) {
if (PCBcontext.getPcbdb().getCurrentUser().delivery()== User.JSON_STUDENT_ATTTRS.delivery.one) if (PCBcontext.getPcbdb().getCurrentUser().delivery()== User.JSON_STUDENT_ATTTRS.delivery.one)
ttsButton.setEnabled(false); ttsButton.setEnabled(false);
Log.e(LOG_TAG,"ONLY TAPE0->"+onlyTape+" "+ttsButton.isEnabled());
if (this.pictoMainGridView.getAnimation() != this.hidePictoMainViewAnimation) { if (this.pictoMainGridView.getAnimation() != this.hidePictoMainViewAnimation) {
this.showPictoCategoriesViewButton.setVisibility(View.INVISIBLE); this.showPictoCategoriesViewButton.setVisibility(View.INVISIBLE);
this.pictoCategoryGridView.setVisibility(View.INVISIBLE); this.pictoCategoryGridView.setVisibility(View.INVISIBLE);
...@@ -946,8 +948,9 @@ protected void showOnlyTape(boolean onlyTape) { ...@@ -946,8 +948,9 @@ protected void showOnlyTape(boolean onlyTape) {
} }
} }
else { else {
if (PCBcontext.getPcbdb().getCurrentUser().delivery()== User.JSON_STUDENT_ATTTRS.delivery.one)
ttsButton.setEnabled(true); ttsButton.setEnabled(true);
ttsButton.refreshDrawableState();
Log.e(LOG_TAG,"ONLY TAPE1->"+onlyTape+" "+ttsButton.isEnabled());
new PictoAnimation().animateTapeViewVertical(this,true); new PictoAnimation().animateTapeViewVertical(this,true);
if (this.pictoMainGridView.getAnimation() != this.hidePictoMainViewAnimation) { if (this.pictoMainGridView.getAnimation() != this.hidePictoMainViewAnimation) {
this.showPictoCategoriesViewButton.setVisibility(View.VISIBLE); this.showPictoCategoriesViewButton.setVisibility(View.VISIBLE);
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
<string name="session_header">Seleccion de método e instrucción</string> <string name="session_header">Seleccion de método e instrucción</string>
<string name="session_error">Error de conexión</string> <string name="session_error">Error de conexión</string>
<string name="session_noinstructions">Alumno sin ninguna instrucción asignada. Por favor, asigne al menos una instrucción al alumno desde Pictogram Web</string> <string name="session_noinstructions">Alumno sin ninguna instrucción asignada. Por favor, asigne al menos una instrucción al alumno desde Pictogram Web</string>
<string name="session_loading">Desargando instrucciones</string> <string name="session_loading">Descargando instrucciones</string>
<string name="session_empty">Este alumno no tiene ningún método asignado. Por favor asigne un método a este alumno en</string> <string name="session_empty">Este alumno no tiene ningún método asignado. Por favor asigne un método a este alumno en</string>
<string name="session_notclosed">Este alumno tiene una sesión abierta. Por favor cierre la sesión desde Pictogram Web en</string> <string name="session_notclosed">Este alumno tiene una sesión abierta. Por favor cierre la sesión desde Pictogram Web en</string>
<string name="session_closed_ok">Sesión grabada correctamente. Hora</string> <string name="session_closed_ok">Sesión grabada correctamente. Hora</string>
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
<string name="session_header">Select method and instruction</string> <string name="session_header">Select method and instruction</string>
<string name="session_error">Server Error </string> <string name="session_error">Server Error </string>
<string name="session_noinstructions">Student without any instrucction assigment</string> <string name="session_noinstructions">Student without any instrucction assigment</string>
<string name="session_loading">Desargando instrucciones</string> <string name="session_loading">Descargando instrucciones</string>
<string name="session_empty">Este alumno no tiene ningún método asignado. Por favor asigne un método a este alumno en</string> <string name="session_empty">Este alumno no tiene ningún método asignado. Por favor asigne un método a este alumno en</string>
<string name="session_notclosed">Este alumno tiene una sesión abierta. Por favor cierre la sesión en el panel de control de Pictogram Web</string> <string name="session_notclosed">Este alumno tiene una sesión abierta. Por favor cierre la sesión en el panel de control de Pictogram Web</string>
<string name="session_closed_ok">Sesión grabada correctamente</string> <string name="session_closed_ok">Sesión grabada correctamente</string>
......
...@@ -7,7 +7,7 @@ export LANG=en_US.UTF-8 ...@@ -7,7 +7,7 @@ export LANG=en_US.UTF-8
echo "-- Installing build-essentials and g++" echo "-- Installing build-essentials and g++"
sudo apt-get update sudo apt-get update
sudo apt-get install build-essential g++ sudo apt-get install -y build-essential g++
# installing ansible # installing ansible
echo "-- Installing ansible" echo "-- Installing ansible"
......
-- MySQL dump 10.13 Distrib 5.7.13, for Linux (x86_64)
--
-- Host: localhost Database: pictodbclean
-- ------------------------------------------------------
-- Server version 5.7.13
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
--
-- Table structure for table `pictocat`
--
DROP TABLE IF EXISTS `pictocat`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `pictocat` (
`id` int(11) NOT NULL,
`id_supercat` int(11) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='Identifies a category, which, itself, may belong to another category';
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `pictocat`
--
LOCK TABLES `pictocat` WRITE;
/*!40000 ALTER TABLE `pictocat` DISABLE KEYS */;
INSERT INTO `pictocat` VALUES (1,0),(2,1),(3,1),(4,0),(5,0),(6,1),(7,0),(8,1),(9,0),(10,0),(11,0),(12,0),(13,0),(14,0),(15,0),(16,0),(17,16),(18,16),(19,0),(20,0),(21,16),(22,0),(23,22),(24,16),(25,16),(26,0),(27,0),(28,0),(29,0),(30,29),(31,29),(32,29),(33,0),(34,0),(35,22),(36,0),(37,5),(38,0),(39,0),(40,12),(41,15),(42,0),(43,0),(44,0),(45,9),(46,0),(47,0),(48,0),(49,0),(50,0),(51,0),(52,0),(53,0),(54,53),(55,53),(56,53),(57,53),(58,53),(59,53),(60,53),(61,53),(62,53),(63,53),(64,53),(65,51),(66,20),(67,0),(68,0),(69,0),(70,0),(71,0),(72,20),(73,0),(74,0),(75,0),(76,71),(77,20),(78,51),(79,0),(80,0),(81,5),(82,22),(83,0),(84,0),(85,84),(86,84),(87,51),(88,0),(89,20),(90,0),(91,51),(92,80),(93,0),(94,0),(95,0),(96,0),(97,0),(98,97),(99,97),(100,80),(101,69),(102,51),(103,51),(104,0),(105,51),(106,69),(107,69),(108,0),(109,69),(110,69),(111,69),(112,69),(113,69),(114,0),(115,71),(116,0),(117,0),(118,0),(119,0),(120,0),(121,0),(122,0);
/*!40000 ALTER TABLE `pictocat` ENABLE KEYS */;
UNLOCK TABLES;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-- Dump completed on 2017-01-17 9:48:07
--
-- Creacion y volcado de datos para la tabla `pictocattree`
--
source /vagrant/roles/database/files/pictocat_tree_populate.sql
source /vagrant/roles/database/files/catexp.sql
...@@ -48,17 +48,14 @@ COMMENT="This table registers and action performed by a user at a given time, al ...@@ -48,17 +48,14 @@ COMMENT="This table registers and action performed by a user at a given time, al
-- --
-- Estructura de tabla para la tabla `catexp` -- Estructura de tabla para la tabla `catexp`
-- --
CREATE TABLE IF NOT EXISTS `catexp`( CREATE TABLE `catexp` (
`id` int(11) NOT NULL AUTO_INCREMENT, `id` int(11) NOT NULL AUTO_INCREMENT,
`id_cat` int(11) NOT NULL, `id_cat` int(11) NOT NULL,
`lang` char(5), `lang` char(5) DEFAULT NULL,
`exp` varchar(30) NOT NULL, `exp` varchar(30) NOT NULL,
PRIMARY KEY(`id`), PRIMARY KEY (`id`),
UNIQUE(exp,lang), UNIQUE KEY `exp` (`exp`,`lang`)
CHECK (lang IN ('es-es','en-gb','en-us')) ) ENGINE=InnoDB AUTO_INCREMENT=27958 DEFAULT CHARSET=utf8 COMMENT='Stores the expressions available in several languages for a given category (id_cat)';
)
COMMENT="Stores the expressions available in several languages for a given category (id_cat)";
-- -------------------------------------------------------- -- --------------------------------------------------------
-- --
...@@ -201,9 +198,9 @@ COMMENT="Stablish access rights to pictos"; ...@@ -201,9 +198,9 @@ COMMENT="Stablish access rights to pictos";
CREATE TABLE IF NOT EXISTS `pictocat`( CREATE TABLE IF NOT EXISTS `pictocat`(
`id` int(11) PRIMARY KEY, `id` int(11) PRIMARY KEY,
`id_supercat` int(11) `id_supercat` int(11) DEFAULT NULL
) )
COMMENT="Identifies a category, which, itself, may belong to another category"; ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT="Identifies a category, which, itself, may belong to another category";
-- -------------------------------------------------------- -- --------------------------------------------------------
......
...@@ -24,14 +24,6 @@ ...@@ -24,14 +24,6 @@
state: import state: import
target: "{{ server_path }}/{{ database_files_relative_path }}/symbolstix.sql" target: "{{ server_path }}/{{ database_files_relative_path }}/symbolstix.sql"
- name: Imports symbolstix categories
mysql_db:
login_user: "{{ database_user }}"
login_password: "{{ database_user_passwd }}"
name: "{{ database_name }}"
state: import
target: "{{ server_path }}/{{ database_files_relative_path }}/pictocat.sql"
- name: Imports application essential data - name: Imports application essential data
mysql_db: mysql_db:
login_user: "{{ database_user }}" login_user: "{{ database_user }}"
......
...@@ -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***
......
<!-- Reports tab--> <!-- Reports tab-->
<div class="panel panel-default student_tab_panel"> <div class="panel panel-default student_tab_panel">
<div class="panel-body"> <div class="panel-body">
<!-- reports title -->
<div id="reportsTitle" hidden>
<br>
<div class="row"> <div class="row">
<div class="col-md-4"> <div class="col-xs-2">
<h1>{{'methods' | translate}}</h1> <img src="img/logo_pictogram.png" alt="Pictogram" title="Pictogram">
</div>
<div class="col-xs-5">
<h3 style="margin-top:0px;">{{ user.office.name }}</h3>
</div>
<div class="col-xs-5">
<h3 style="margin-top:0px;">{{ studentData.name }} {{ studentData.surname }}</h3>
<h4><b>{{ printName | translate }}</b> {{ 'tpl_date_frame' | translate:{'begin':reportDateSince, 'end':reportDateTo} }}</h4>
</div>
</div>
</div> </div>
<!-- filter selector -->
<div id="filter">
<div class="row">
<div class="col-xs-12">
<h1 class="page-header">{{'filter' | translate}}</h1>
</div> </div>
<div class="row" id="filter"> </div>
<div class="col-md-3"> <!-- selectors -->
<div class="row">
<div class="col-xs-3 col-xs-offset-1">
<div class="form-group"> <div class="form-group">
<p class="input-group"> <p class="input-group">
<select class="form-control" name="method_select" id="method_select" ng-model="selected_method"> <select class="form-control" name="method_select" id="method_select" ng-model="selected_method">
...@@ -18,7 +37,7 @@ ...@@ -18,7 +37,7 @@
</p> </p>
</div> </div>
</div> </div>
<div class="col-md-3"> <div class="col-xs-3">
<div class="form-group"> <div class="form-group">
<p class="input-group"> <p class="input-group">
<input type="text" class="form-control" datepicker-popup=" {{ 'day_format' | translate }}" ng-model="reportDateSince" placeholder="{{ 'since' | translate }}" is-open="openedSince" close-text="{{'close' | translate}}" /> <input type="text" class="form-control" datepicker-popup=" {{ 'day_format' | translate }}" ng-model="reportDateSince" placeholder="{{ 'since' | translate }}" is-open="openedSince" close-text="{{'close' | translate}}" />
...@@ -28,7 +47,7 @@ ...@@ -28,7 +47,7 @@
</p> </p>
</div> </div>
</div> </div>
<div class="col-md-3"> <div class="col-xs-3">
<div class="form-group"> <div class="form-group">
<p class="input-group"> <p class="input-group">
<input type="text" class="form-control" datepicker-popup=" {{ 'day_format' | translate }}" ng-model="reportDateTo" placeholder="{{ 'to' | translate }}" is-open="openedTo" close-text="{{'close' | translate}}" /> <input type="text" class="form-control" datepicker-popup=" {{ 'day_format' | translate }}" ng-model="reportDateTo" placeholder="{{ 'to' | translate }}" is-open="openedTo" close-text="{{'close' | translate}}" />
...@@ -37,61 +56,78 @@ ...@@ -37,61 +56,78 @@
</span> </span>
</p> </p>
</div> </div>
</div> </div>
<div class="col-md-3"> <div class="col-xs-1">
<div class="form-group"> <div class="form-group">
<p class="input-group"> <p class="input-group">
<button type="button" class="btn btn-default" ng-click="filter()">{{'filter' | translate}}</i></button> <button type="button" class="btn btn-default" ng-click="filter()">{{'filter' | translate}}</i></button>
</p> </p>
</div> </div>
</div> </div>
</div> </div>
<hr> <!--/. selectors -->
<div class="row" ng-if="showPrint" id="filter-info">
<div class="col-md-4">
<h3>{{printName | translate}}</h3>
</div> </div>
<div class="col-md-8"> <!--/. filter selector -->
<h2><small>{{ 'tpl_date_frame' | translate:{'begin':reportDateSince, 'end':reportDateTo} }}</small></h2>
<!-- inform-content -->
<div id="inform-content">
<div class="row">
<div class="col-xs-12">
<h1 ng-if="!showPrint" class="page-header">{{'methods' | translate}}</h1>
<h1 ng-if="showPrint" class="page-header">{{printName | translate}} <small id="inform-content-date">{{ 'tpl_date_frame' | translate:{'begin':reportDateSince, 'end':reportDateTo} }}</small></h1>
</div> </div>
</div> </div>
<hr ng-if="showPrint">
<!-- graphics headers -->
<div class="row"> <div class="row">
<div class="col-lg-4 bg-light-gray"> <div class="col-xs-4">
<h1 class="text-center"><small>{{'error_rate' | translate}}</small></h1> <h1 class="text-center"><small>{{'error_rate' | translate}}</small></h1>
<hr>
<canvas id="error_rate" class="chart chart-line" chart-options="optionsChartDateRate" chart-data="dataChart1" chart-labels="labels1" chart-series="series1"></canvas>
</div> </div>
<div class="col-lg-4"> <div class="col-xs-4">
<h1 class="text-center"><small>{{'average_time_per_try' | translate}}</small></h1> <h1 class="text-center"><small>{{'average_time_per_try' | translate}}</small></h1>
<hr>
<canvas id="avg_time_trie" class="chart chart-line" chart-options="optionsChartDateSeconds" chart-data="dataChart2" chart-labels="labels2" chart-series="series2"></canvas>
</div> </div>
<div class="col-lg-4 bg-light-gray"> <div class="col-xs-4">
<h1 class="text-center"><small>{{'average_time_between_pictos' | translate}}</small></h1> <h1 class="text-center"><small>{{'average_time_between_pictos' | translate}}</small></h1>
<hr> </div>
</div>
<!-- graphics -->
<div class="row">
<div class="col-xs-4 bg-light-gray">
<canvas id="error_rate" class="chart chart-line" chart-options="optionsChartDateRate" chart-data="dataChart1" chart-labels="labels1" chart-series="series1"></canvas>
</div>
<div class="col-xs-4">
<canvas id="avg_time_trie" class="chart chart-line" chart-options="optionsChartDateSeconds" chart-data="dataChart2" chart-labels="labels2" chart-series="series2"></canvas>
</div>
<div class="col-xs-4 bg-light-gray">
<canvas id="avg_time_pictos" class="chart chart-line" chart-options="optionsChartDateSeconds" chart-data="dataChart3" chart-labels="labels3" chart-series="series3"></canvas> <canvas id="avg_time_pictos" class="chart chart-line" chart-options="optionsChartDateSeconds" chart-data="dataChart3" chart-labels="labels3" chart-series="series3"></canvas>
</div> </div>
</div> </div>
<br>
<!-- table -->
<div class="row"> <div class="row">
<div class="col-lg-12"> <div class="col-xs-12">
<table class="table table-bordered"> <table class="table table-bordered">
<tbody> <thead>
<tr> <tr>
<td>&nbsp;</td> <th>&nbsp;</td>
<td>{{ 'totals' | translate }}</td> <th>{{ 'totals' | translate }}</th>
<td>{{ 'state_correct' | translate }}</td> <th><span class="glyphicon glyphicon-ok color_green" aria-hidden="true"></span> {{ 'state_correct' | translate }}</th>
<td>{{ 'state_supervised' | translate }}</td> <th><span class="glyphicon glyphicon-ok-circle color_blue" aria-hidden="true"></span> {{ 'state_supervised' | translate }}</th>
<td>{{ 'state_spontaneous' | translate }}</td> <th><span class="glyphicon glyphicon-user color_blue" aria-hidden="true"></span> {{ 'state_spontaneous' | translate }}</th>
<td>{{ 'state_fail' | translate }}</td> <th><span class="glyphicon glyphicon-remove color_red" aria-hidden="true"></span> {{ 'state_fail' | translate }}</th>
<td>{{ 'state_discarded' | translate }}</td> <th><span class="glyphicon glyphicon-trash color_red" aria-hidden="true"></span> {{ 'state_discarded' | translate }}</th>
<td>{{ 'state_demonstration' | translate }}</td> <th><span class="glyphicon glyphicon-edit color_orange" aria-hidden="true"></span> {{ 'state_demonstration' | translate }}</th>
<td>{{ 'state_broken' | translate }}</td> <th><span class="glyphicon glyphicon-flash color_black" aria-hidden="true"></span> {{ 'state_broken' | translate }}</th>
<th><span class="glyphicon glyphicon-question-sign color_blue" aria-hidden="true"></span> {{ 'state_not_evaluated' | translate }}</th>
</tr> </tr>
</thead>
<tbody>
<tr> <tr>
<td>{{ 'tries' | translate }}</td> <td><b>{{ 'tries' | translate }}</b></td>
<td>{{ tries_count.total }}</td> <td>{{ tries_count.total }}</td>
<td>{{ tries_count.success }}</td> <td>{{ tries_count.success }}</td>
<td>{{ tries_count.supervised_success }}</td> <td>{{ tries_count.supervised_success }}</td>
...@@ -100,34 +136,41 @@ ...@@ -100,34 +136,41 @@
<td>{{ tries_count.discarded }}</td> <td>{{ tries_count.discarded }}</td>
<td>{{ tries_count.model }}</td> <td>{{ tries_count.model }}</td>
<td>{{ tries_count.broken }}</td> <td>{{ tries_count.broken }}</td>
<td>{{ tries_count.null }}</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
</div> </div>
</div> </div>
<!-- graphics headers 2 -->
<div class="row"> <div class="row">
<div class="col-md-4"> <div class="col-xs-4 bg-light-gray">
<h1>{{'vocabulary' | translate}}</h1> <h1 class="text-center"><small>{{'vocabulary_size' | translate}}</small></h1>
</div> </div>
<div class="col-xs-4">
<h1 class="text-center"><small>{{'phrase_size' | translate}}</small></h1>
</div> </div>
<hr> <div class="col-xs-4">
<h1 class="text-center"><small>{{'phrase_build_time' | translate}}</small></h1>
</div>
</div>
<!-- graphics 2 -->
<div class="row"> <div class="row">
<div class="col-lg-4 bg-light-gray"> <div class="col-xs-4 bg-light-gray">
<h1 class="text-center"><small>{{'vocabulary_size' | translate}}</small></h1>
<hr>
<canvas id="vocab_size" class="chart chart-line" chart-options="optionsChartDatePictos" chart-data="dataChart4" chart-labels="labels4" chart-series="series4"></canvas> <canvas id="vocab_size" class="chart chart-line" chart-options="optionsChartDatePictos" chart-data="dataChart4" chart-labels="labels4" chart-series="series4"></canvas>
</div> </div>
<div class="col-lg-4"> <div class="col-xs-4">
<h1 class="text-center"><small>{{'phrase_size' | translate}}</small></h1>
<hr>
<canvas id="phrase_size" class="chart chart-line" chart-options="optionsChartDatePictos" chart-data="dataChart5" chart-labels="labels5" chart-series="series5"></canvas> <canvas id="phrase_size" class="chart chart-line" chart-options="optionsChartDatePictos" chart-data="dataChart5" chart-labels="labels5" chart-series="series5"></canvas>
</div> </div>
<div class="col-lg-4"> <div class="col-xs-4">
<h1 class="text-center"><small>{{'phrase_build_time' | translate}}</small></h1>
<hr>
<canvas id="phrases_time" class="chart chart-line" chart-options="optionsChartDateSeconds" chart-data="dataChart6" chart-labels="labels6" chart-series="series6"></canvas> <canvas id="phrases_time" class="chart chart-line" chart-options="optionsChartDateSeconds" chart-data="dataChart6" chart-labels="labels6" chart-series="series6"></canvas>
</div> </div>
</div> </div>
</div>
<!--/. inform-content -->
</div> </div>
<!-- END .panel-body --> <!-- END .panel-body -->
</div> </div>
......
...@@ -1031,3 +1031,21 @@ form .progress { ...@@ -1031,3 +1031,21 @@ form .progress {
padding-bottom: 20px; padding-bottom: 20px;
border-bottom: 1px solid #e7e7e7; border-bottom: 1px solid #e7e7e7;
} }
@media print {
#reportsTitle{
display: inherit;
}
#filter{
display: none;
}
#filter-info{
display: none;
}
#inform-content-date{
display: none;
}
.languages{
display: none;
}
}
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