Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
yotta
/
pictogram
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
60
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
8b8869a6
authored
Jun 05, 2017
by
Arturo Montejo Ráez
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
fixed issued
#261
parent
fafde781
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
6 deletions
sails/src/api/controllers/StudentController.js
sails/src/api/models/Student.js
sails/src/assets/scripts/modules/student/views/header.html
sails/src/config/pictogram.js
sails/src/api/controllers/StudentController.js
View file @
8b8869a6
...
...
@@ -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"
);
...
...
sails/src/api/models/Student.js
View file @
8b8869a6
...
...
@@ -303,7 +303,7 @@ module.exports = {
if
(
err
)
return
callback
(
err
,
[]);
if
(
!
stuSups
||
stuSups
.
length
==
0
)
return
callback
(
n
ew
Error
(
"No supervisors found"
)
,
[]);
return
callback
(
n
ull
,
[]);
var
sups
=
stuSups
.
map
((
st
)
=>
{
return
st
.
supervisor
});
return
callback
(
null
,
sups
);
...
...
sails/src/assets/scripts/modules/student/views/header.html
View file @
8b8869a6
...
...
@@ -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>
...
...
sails/src/config/pictogram.js
View file @
8b8869a6
...
...
@@ -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'
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment