fixed issued #261

parent fafde781
......@@ -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");
......
......@@ -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);
......
......@@ -20,7 +20,7 @@
</div>
</div>
<div class="col-md-9">
<div style="margin-left: 5px"><h4>{{studentData.name}} {{studentData.surname}}</h4></div>
<div style="margin-left: 5px"><h4>{{studentData.name}} {{studentData.surname}} ID: {{studentData.supervision}}</h4></div>
<div style="margin-left: 5px" class="text-left">
<span>{{studentData.current_instruction | translate}} </span><br/>
<span class="text-muted">({{studentData.current_method | translate}})</span>
......@@ -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 @@ 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