Commit 8eca6916 by Arturo Montejo Ráez

Merge remote-tracking branch 'origin/master' into develop

parents 16e8b513 da28133a
......@@ -163,8 +163,8 @@ module.exports = {
student.supervision = 1; // requester is tutor of the studend
else if (stu_sup && req.token.office)
student.supervision = 2; // requester is supervisor of student
else if (req.token.isStudent && req.token.id == student.id)
student.supervision = 3 // requester is the student himself
else if (req.token.isStudent && req.token.id == student.id)
student.supervision = 3 // requester is the student himself
if (student.supervision == -1) // should not hace access!!!
return res.forbidden("Access to this student should not be granted to you");
......
......@@ -337,7 +337,7 @@ module.exports = {
phone: params.phone || '',
lang: params.lang || 'es-es',
};
if (params.id_off)
if (params.id_off && params.role == 'therapist_office')
supData.id_off = params.id_off;
console.log(JSON.stringify(supData));
......
......@@ -30,7 +30,7 @@ module.exports = {
var params = req.allParams();
if (!params.id) return res.badRequest("No try defined");
if (params.end) prams.end = new Date().toISOString();
if (params.end) params.end = new Date().toISOString();
Try.update(params.id, params)
.then(function (t) {
......
......@@ -303,7 +303,7 @@ module.exports = {
if (err)
return callback(err, []);
if (!stuSups || stuSups.length == 0)
return callback(new Error("No supervisors found"), []);
return callback(null, []);
var sups = stuSups.map((st) => {return st.supervisor});
return callback(null, sups);
......
......@@ -238,6 +238,7 @@
"next_actions": "Next actions",
"next_sessions": "Next sessions",
"no": "No",
"no_categories": "Without categories",
"nobegin": "No started",
"no_method": "No method defined",
"no_office": "No office",
......@@ -455,6 +456,7 @@
"warning_no_pictos_found": "No pictograms found with specified keyword",
"warning_no_tablet_online":"No Pictogran Tablet online detected",
"warning_two_characters":"Must type at least two characters",
"with_categories": "With categories",
"woman": "Woman",
"year_totals": "Year totals",
"yes": "Yes",
......
......@@ -238,6 +238,7 @@
"next_actions": "Acciones posteriores",
"next_sessions": "Sesiones posteriores",
"no": "No",
"no_categories": "Sin categorías",
"no_method": "Método sin definir",
"no_office": "Sin centro",
"no_instruction": "Instrucción sin definir",
......@@ -455,6 +456,7 @@
"warning_no_pictos_found": "No se encontraron pictogramas con las palabras introducidas",
"warning_no_tablet_online":"No se detectó ningún usuario de Pictogram Tablet online",
"warning_two_characters":"Debe introducir al menos dos caracteres",
"with_categories": "Con categorías",
"woman": "Mujer",
"year_totals": "Totales año",
"yes": "Sí",
......
......@@ -132,7 +132,8 @@ dashboardControllers.controller('StudentCollectionsCtrl', function StudentCollec
$http.get(config.backend + '/stu/' + $scope.studentData.id + '/activeScene')
.success(function (activeScene) {
$scope.showFreeCategory = !activeScene.categories;
$scope.showFreeCategory = !activeScene.categories;
activeScene.name = $translate.instant(activeScene.name);
$scope.viewingScene = activeScene;
activeScene.pictos.forEach(placePicto);
$scope.loadingPictos = false;
......@@ -156,8 +157,10 @@ dashboardControllers.controller('StudentCollectionsCtrl', function StudentCollec
$http.get(config.backend + '/scene/' + idScene)
.success(function (scene) {
$scope.showFreeCategory = !scene.categories;
$scope.viewingScene = scene;
$scope.showFreeCategory = !scene.categories;
scene.name = $translate.instant(scene.name);
$scope.viewingScene = scene;
scene.pictos.forEach(placePicto);
$scope.loadingPictos = false;
//setTimeout(function () { $scope.$apply(); });
......@@ -173,7 +176,8 @@ dashboardControllers.controller('StudentCollectionsCtrl', function StudentCollec
$scope.loadScenesList = function () {
$http.get(config.backend + '/stu/' + $scope.studentData.id +'/scenes')
.success(function (scenes) {
.success(function (scenes) {
scenes.map((sce) => {sce.name = $translate.instant(sce.name); return sce});
$scope.scenesList = scenes;
//setTimeout(function () { $scope.$apply(); });
})
......
......@@ -50,7 +50,7 @@
<div class="row">
<div class="col-md-12">
<ul class="nav nav-tabs tabs_student">
<!-- 0: admin, 1: tutor, 2: therapist -->
<!-- 0: admin, 1: tutor, 2: therapist -->
<li role="presentation" ng-class="{'active' : nav.tab == 'collections'}" ng-if="studentData.supervision != 0">
<a href="/app/#/student/{{studentData.id}}/collections" ng-click="nav.tab = ''"><span class="glyphicon glyphicon-th" aria-hidden="true"></span> {{ 'collections' | translate }}</a>
</li>
......
......@@ -6,7 +6,7 @@
<button class="btn btn-default" btn-radio="'new'" ng-model="section">
<span class="glyphicon glyphicon-record"></span> {{ 'new_session' | translate }}
</button>
<button class="btn btn-default" btn-radio="'previous'" ng-model="section" ng-click="load_tries()">
<button class="btn btn-default" btn-radio="'previous'" ng-model="section" ng-click="load_tries()" ng-if="wsessions.length > 0">
<span class="glyphicon glyphicon-transfer"></span> {{ 'previous_sessions' | translate }}
</button>
</div>
......
......@@ -6,7 +6,7 @@ var ASSETS_PATH = path.join(__dirname, '..', 'assets');
var UPLOAD_PATH = path.join(__dirname, '..', '..', 'upload');
module.exports.pictogram = {
version: "1.1", // actual version of the server, to be checked by the client
version: "1.2", // actual version of the server, to be checked by the client
admins: [
{
email: 'amontejo@ujaen.es',
......
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