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
f66bd8cf
authored
Dec 05, 2016
by
Arturo Montejo Ráez
Browse files
Options
_('Browse Files')
Download
Plain Diff
Merge branch 'develop' of
http://scm.ujaen.es/softuno/pictogram
into develop
parents
433bb8b7
8c98dde6
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
45 additions
and
9 deletions
.gitignore
sails/src/api/controllers/SupervisorController.js
sails/src/api/models/Student.js
sails/src/assets/app/i18n/en-gb.json
sails/src/assets/app/i18n/es-es.json
sails/src/assets/scripts/modules/student/views/collections.html
sails/src/assets/scripts/modules/student/views/setup.html
sails/src/assets/scripts/modules/supervisor/controllers/students.js
sails/src/assets/scripts/modules/supervisor/views/setup.html
sails/src/assets/scripts/modules/supervisor/views/students.html
sails/src/assets/styles/main.css
.gitignore
View file @
f66bd8cf
...
...
@@ -46,6 +46,10 @@ sails/upload.zip
.idea
android/Pictogram/.idea
android/Pictogram/commonlibrary/commonlibrary.iml
android/Pictogram/commonlibrary/local.properties
android/Pictogram/commonlibrary/gradle
android/Pictogram/commonlibrary/gradlew
android/Pictogram/commonlibrary/gradlew.bat
android/Pictogram/tablet/tablet.iml
android/Pictogram/watch/watch.iml
android/Pictogram/Pictogrammar.iml
...
...
sails/src/api/controllers/SupervisorController.js
View file @
f66bd8cf
...
...
@@ -405,6 +405,11 @@ module.exports = {
var
students
=
[];
async
.
each
(
stuSups
,
function
(
stuSup
,
cb
)
{
// Filter logically deleted students
if
(
stuSup
.
student
.
office
==
null
)
cb
();
var
student
=
stuSup
.
student
;
student
.
supervision
=
req
.
token
.
office
?
2
:
1
;
VStuLastInstruction
.
findOne
({
student
:
student
.
id
})
...
...
sails/src/api/models/Student.js
View file @
f66bd8cf
...
...
@@ -504,7 +504,6 @@ module.exports = {
if
(
err
||
!
student
)
throw
err
;
// set office to NULL to unlink it
student
.
office
=
null
;
student
.
save
(
function
(
err
,
saved
)
{
if
(
err
)
return
cb
(
err
);
...
...
sails/src/assets/app/i18n/en-gb.json
View file @
f66bd8cf
...
...
@@ -250,6 +250,7 @@
"state_spontaneous"
:
"Spontaneous"
,
"state_supervised"
:
"Supervised"
,
"student_added"
:
"Student added"
,
"student_already_exists"
:
"A student with that username already exists, please try with another one"
,
"student_deleted"
:
"Student deleted"
,
"student_not_added"
:
"Student not added"
,
"student_not_deleted"
:
"Student not deleted"
,
...
...
sails/src/assets/app/i18n/es-es.json
View file @
f66bd8cf
...
...
@@ -251,6 +251,7 @@
"state_spontaneous"
:
"Espontáneo"
,
"state_supervised"
:
"Guiado"
,
"student_added"
:
"Estudiante añadido"
,
"student_already_exists"
:
"Ya existe un estudiante con ese nombre de usuario. Por favor, inténtelo de nuevo con algo diferente."
,
"student_deleted"
:
"Estudiante eliminado"
,
"student_not_added"
:
"Estudiante no añadido"
,
"student_not_deleted"
:
"No se ha podido eliminar el estudiante"
,
...
...
sails/src/assets/scripts/modules/student/views/collections.html
View file @
f66bd8cf
...
...
@@ -37,6 +37,7 @@
popover-trigger=
"mouseenter"
ng-init=
"colIndex = $index"
ng-repeat=
"studentPicto in studentPictoRow track by $index"
>
<div
class=
"picto-description"
>
{{ studentData.attributes.legend?studentPicto.expression.text:'' }}
</div>
<img
src=
"/app/img/redcross.png"
class=
"disabled"
...
...
@@ -108,6 +109,7 @@
ng-repeat=
"studentPicto in studentPictoRow track by $index"
popover=
"{{studentPicto.attributes.expression==null ? studentPicto.expression.text : studentPicto.attributes.expression}}"
popover-trigger=
"mouseenter"
>
<div
class=
"picto-description"
>
{{ studentData.attributes.legend?studentPicto.expression.text:'' }}
</div>
<img
src=
"/app/img/redcross.png"
class=
"disabled"
...
...
@@ -167,6 +169,7 @@
popover-trigger=
"mouseenter"
ng-init=
"colIndex = $index"
ng-repeat=
"studentPicto in studentPictoRow track by $index"
>
<div
class=
"picto-description"
>
{{ studentData.attributes.legend?studentPicto.expression.text:'' }}
</div>
<img
src=
"/app/img/redcross.png"
class=
"disabled"
...
...
sails/src/assets/scripts/modules/student/views/setup.html
View file @
f66bd8cf
...
...
@@ -22,10 +22,11 @@
<input
type=
"username"
class=
"form-control"
id=
"setup_username"
placeholder=
"{{ 'username' | translate }}"
required
ng-model=
"formUser.username"
readonly
/>
</div>
<div
class=
"form-group"
>
<input
type=
"password"
class=
"form-control"
id=
"setup_password1"
placeholder=
"{{ 'password_new_type' | translate }}"
ng-model=
"formUser.password"
/>
<input
style=
"display:none"
type=
"password"
name=
"fakepasswordremembered"
/>
<input
type=
"password"
class=
"form-control"
id=
"setup_password1"
placeholder=
"{{ 'password_new_type' | translate }}"
ng-model=
"formUser.password"
/>
</div>
<div
class=
"form-group"
>
<input
type=
"password"
class=
"form-control"
id=
"setup_password2"
placeholder=
"{{ 'password_confirm' | translate }}"
ng-model=
"formUser.password_confirm"
/>
<input
type=
"password"
class=
"form-control"
id=
"setup_password2"
placeholder=
"{{ 'password_confirm' | translate }}"
ng-model=
"formUser.password_confirm"
/>
</div>
<legend
translate
>
personal_data
</legend>
<div
class=
"form-group"
>
...
...
sails/src/assets/scripts/modules/supervisor/controllers/students.js
View file @
f66bd8cf
...
...
@@ -121,7 +121,7 @@ dashboardControllers.controller('StudentsCtrl', function StudentsCtrl(
// between the new element created and the form fields
$scope
.
resetForm
();
//
Show
the add form to new adding
//
Hide
the add form to new adding
$scope
.
hidestudentadd
=
true
;
// Update counters
...
...
@@ -130,14 +130,17 @@ dashboardControllers.controller('StudentsCtrl', function StudentsCtrl(
})
.
error
(
function
(
err
)
{
var
errorMessage
=
'student_not_added'
;
console
.
log
(
err
);
if
(
typeof
err
==
"string"
&&
err
.
search
(
"Maximum number of enrolments reached"
)
>
0
)
errorMessage
=
'max_licenses_reached'
;
if
(
typeof
err
==
"string"
&&
err
.
search
(
"already exists"
)
>
0
)
errorMessage
=
'student_already_exists'
;
else
if
(
err
&&
err
.
status
===
400
)
errorMessage
=
'invalid_fields'
;
ngToast
.
danger
({
content
:
$translate
.
instant
(
errorMessage
)
});
$scope
.
hidestudentadd
=
true
;
});
};
...
...
sails/src/assets/scripts/modules/supervisor/views/setup.html
View file @
f66bd8cf
...
...
@@ -42,6 +42,7 @@
<fieldset>
<legend
translate
>
change_password
</legend>
<div
class=
"form-group"
>
<input
style=
"display:none"
type=
"password"
name=
"fakepasswordremembered"
/>
<input
type=
"password"
class=
"form-control"
id=
"setup_password1"
placeholder=
"{{ 'password_new_type' | translate }}"
ng-model=
"formdata.password"
/>
</div>
<div
class=
"form-group"
>
...
...
sails/src/assets/scripts/modules/supervisor/views/students.html
View file @
f66bd8cf
...
...
@@ -11,8 +11,11 @@
<!-- Add Student button and Search row -->
<div
class=
"row"
>
<div
class=
"col-xs-3"
>
<button
type=
"button"
class=
"btn btn-success btn-circle btn-lg"
ng-click=
"resetForm(); hidestudentadd = false"
title=
"{{'add'|translate}}"
ng-hide=
"!user.isSupAdmin || !num_licenses_left"
><i
class=
"glyphicon glyphicon-plus"
></i></button>
<p
class=
"text-left"
ng-hide=
"!user.isSupAdmin || !num_licenses_left || !hidestudentadd"
>
<a
ng-click=
"resetForm(); hidestudentadd = false"
class=
"btn btn-success btn-sm"
role=
"button"
>
<span
class=
"glyphicon glyphicon-plus"
aria-hidden=
"true"
></span>
{{ 'add_student' | translate }}
</a>
</p>
</div>
<div
class=
"col-xs-6 input-group"
>
<input
type=
"text"
ng-model=
"search_students"
id=
"search_students"
placeholder=
"{{ 'filter' | translate }}"
class=
"form-control"
aria-describedby=
"basic-addon2"
>
...
...
@@ -33,7 +36,7 @@
</div>
</td>
<td>
<h4>
{{student.
name}} {{student.sur
name}}
</h4>
<h4>
{{student.
surname}}, {{student.
name}}
</h4>
</td>
<td>
<p>
<span>
{{student.current_method | translate}}
</span>
<br
/>
<span
class=
"text-muted"
>
{{student.current_instruction | translate}}
</span>
</p>
...
...
sails/src/assets/styles/main.css
View file @
f66bd8cf
...
...
@@ -451,6 +451,21 @@ textarea.editable{
.picto
.picto_options
.picto_minus
{
position
:
absolute
;
top
:
2px
;
right
:
2px
;
}
/* Text above picto */
.picto-description
{
position
:
absolute
;
bottom
:
0px
;
text-align
:
center
;
width
:
100%
;
background-color
:
rgba
(
1
,
1
,
1
,
0.50
);
color
:
white
;
margin-left
:
-2px
;
font-weight
:
600
;
text-transform
:
uppercase
;
font-size
:
12px
;
word-wrap
:
break-word
;
}
/* In addpicto */
#collections
{
height
:
400px
;
...
...
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