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
13f9c9bf
authored
Sep 09, 2016
by
Arturo Montejo Ráez
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
working on issue #541
parent
4eec1ac5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
105 additions
and
58 deletions
android/Pictogram/commonlibrary/commonlibrary.iml
android/Pictogram/tablet/tablet.iml
android/Pictogram/watch/watch.iml
sails/src/api/controllers/StudentController.js
sails/src/api/controllers/SupervisorController.js
sails/src/api/hooks/rooms.js
sails/src/assets/app/i18n/en-gb.json
sails/src/assets/app/i18n/es-es.json
sails/src/assets/scripts/modules/student/controllers/student.js
sails/src/assets/scripts/modules/student/views/header.html
sails/src/assets/scripts/modules/student/views/session.html
android/Pictogram/commonlibrary/commonlibrary.iml
View file @
13f9c9bf
...
@@ -65,14 +65,6 @@
...
@@ -65,14 +65,6 @@
<sourceFolder
url=
"file://$MODULE_DIR$/src/main/jni"
isTestSource=
"false"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/main/jni"
isTestSource=
"false"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/main/rs"
isTestSource=
"false"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/main/rs"
isTestSource=
"false"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/main/shaders"
isTestSource=
"false"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/main/shaders"
isTestSource=
"false"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/test/res"
type=
"java-test-resource"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/test/resources"
type=
"java-test-resource"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/test/assets"
type=
"java-test-resource"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/test/aidl"
isTestSource=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/test/java"
isTestSource=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/test/jni"
isTestSource=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/test/rs"
isTestSource=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/test/shaders"
isTestSource=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/androidTest/res"
type=
"java-test-resource"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/androidTest/res"
type=
"java-test-resource"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/androidTest/resources"
type=
"java-test-resource"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/androidTest/resources"
type=
"java-test-resource"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/androidTest/assets"
type=
"java-test-resource"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/androidTest/assets"
type=
"java-test-resource"
/>
...
@@ -81,6 +73,14 @@
...
@@ -81,6 +73,14 @@
<sourceFolder
url=
"file://$MODULE_DIR$/src/androidTest/jni"
isTestSource=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/androidTest/jni"
isTestSource=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/androidTest/rs"
isTestSource=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/androidTest/rs"
isTestSource=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/androidTest/shaders"
isTestSource=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/androidTest/shaders"
isTestSource=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/test/res"
type=
"java-test-resource"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/test/resources"
type=
"java-test-resource"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/test/assets"
type=
"java-test-resource"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/test/aidl"
isTestSource=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/test/java"
isTestSource=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/test/jni"
isTestSource=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/test/rs"
isTestSource=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/test/shaders"
isTestSource=
"true"
/>
<excludeFolder
url=
"file://$MODULE_DIR$/build/intermediates/annotations"
/>
<excludeFolder
url=
"file://$MODULE_DIR$/build/intermediates/annotations"
/>
<excludeFolder
url=
"file://$MODULE_DIR$/build/intermediates/assets"
/>
<excludeFolder
url=
"file://$MODULE_DIR$/build/intermediates/assets"
/>
<excludeFolder
url=
"file://$MODULE_DIR$/build/intermediates/blame"
/>
<excludeFolder
url=
"file://$MODULE_DIR$/build/intermediates/blame"
/>
...
...
android/Pictogram/tablet/tablet.iml
View file @
13f9c9bf
This diff is collapsed.
Click to expand it.
android/Pictogram/watch/watch.iml
View file @
13f9c9bf
...
@@ -64,14 +64,6 @@
...
@@ -64,14 +64,6 @@
<sourceFolder
url=
"file://$MODULE_DIR$/src/DefaultFlavor/jni"
isTestSource=
"false"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/DefaultFlavor/jni"
isTestSource=
"false"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/DefaultFlavor/rs"
isTestSource=
"false"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/DefaultFlavor/rs"
isTestSource=
"false"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/DefaultFlavor/shaders"
isTestSource=
"false"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/DefaultFlavor/shaders"
isTestSource=
"false"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/androidTestDefaultFlavor/res"
type=
"java-test-resource"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/androidTestDefaultFlavor/resources"
type=
"java-test-resource"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/androidTestDefaultFlavor/assets"
type=
"java-test-resource"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/androidTestDefaultFlavor/aidl"
isTestSource=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/androidTestDefaultFlavor/java"
isTestSource=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/androidTestDefaultFlavor/jni"
isTestSource=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/androidTestDefaultFlavor/rs"
isTestSource=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/androidTestDefaultFlavor/shaders"
isTestSource=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/testDefaultFlavor/res"
type=
"java-test-resource"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/testDefaultFlavor/res"
type=
"java-test-resource"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/testDefaultFlavor/resources"
type=
"java-test-resource"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/testDefaultFlavor/resources"
type=
"java-test-resource"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/testDefaultFlavor/assets"
type=
"java-test-resource"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/testDefaultFlavor/assets"
type=
"java-test-resource"
/>
...
@@ -80,6 +72,14 @@
...
@@ -80,6 +72,14 @@
<sourceFolder
url=
"file://$MODULE_DIR$/src/testDefaultFlavor/jni"
isTestSource=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/testDefaultFlavor/jni"
isTestSource=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/testDefaultFlavor/rs"
isTestSource=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/testDefaultFlavor/rs"
isTestSource=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/testDefaultFlavor/shaders"
isTestSource=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/testDefaultFlavor/shaders"
isTestSource=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/androidTestDefaultFlavor/res"
type=
"java-test-resource"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/androidTestDefaultFlavor/resources"
type=
"java-test-resource"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/androidTestDefaultFlavor/assets"
type=
"java-test-resource"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/androidTestDefaultFlavor/aidl"
isTestSource=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/androidTestDefaultFlavor/java"
isTestSource=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/androidTestDefaultFlavor/jni"
isTestSource=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/androidTestDefaultFlavor/rs"
isTestSource=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/androidTestDefaultFlavor/shaders"
isTestSource=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/debug/res"
type=
"java-resource"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/debug/res"
type=
"java-resource"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/debug/resources"
type=
"java-resource"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/debug/resources"
type=
"java-resource"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/debug/assets"
type=
"java-resource"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/debug/assets"
type=
"java-resource"
/>
...
@@ -145,11 +145,15 @@
...
@@ -145,11 +145,15 @@
<excludeFolder
url=
"file://$MODULE_DIR$/build/intermediates/exploded-aar/com.google.android.support/wearable/2.0.0-alpha2/jars"
/>
<excludeFolder
url=
"file://$MODULE_DIR$/build/intermediates/exploded-aar/com.google.android.support/wearable/2.0.0-alpha2/jars"
/>
<excludeFolder
url=
"file://$MODULE_DIR$/build/intermediates/incremental"
/>
<excludeFolder
url=
"file://$MODULE_DIR$/build/intermediates/incremental"
/>
<excludeFolder
url=
"file://$MODULE_DIR$/build/intermediates/incremental-safeguard"
/>
<excludeFolder
url=
"file://$MODULE_DIR$/build/intermediates/incremental-safeguard"
/>
<excludeFolder
url=
"file://$MODULE_DIR$/build/intermediates/instant-run-support"
/>
<excludeFolder
url=
"file://$MODULE_DIR$/build/intermediates/jniLibs"
/>
<excludeFolder
url=
"file://$MODULE_DIR$/build/intermediates/manifests"
/>
<excludeFolder
url=
"file://$MODULE_DIR$/build/intermediates/manifests"
/>
<excludeFolder
url=
"file://$MODULE_DIR$/build/intermediates/pre-dexed"
/>
<excludeFolder
url=
"file://$MODULE_DIR$/build/intermediates/res"
/>
<excludeFolder
url=
"file://$MODULE_DIR$/build/intermediates/res"
/>
<excludeFolder
url=
"file://$MODULE_DIR$/build/intermediates/rs"
/>
<excludeFolder
url=
"file://$MODULE_DIR$/build/intermediates/rs"
/>
<excludeFolder
url=
"file://$MODULE_DIR$/build/intermediates/shaders"
/>
<excludeFolder
url=
"file://$MODULE_DIR$/build/intermediates/shaders"
/>
<excludeFolder
url=
"file://$MODULE_DIR$/build/intermediates/symbols"
/>
<excludeFolder
url=
"file://$MODULE_DIR$/build/intermediates/symbols"
/>
<excludeFolder
url=
"file://$MODULE_DIR$/build/intermediates/transforms"
/>
<excludeFolder
url=
"file://$MODULE_DIR$/build/outputs"
/>
<excludeFolder
url=
"file://$MODULE_DIR$/build/outputs"
/>
<excludeFolder
url=
"file://$MODULE_DIR$/build/tmp"
/>
<excludeFolder
url=
"file://$MODULE_DIR$/build/tmp"
/>
</content>
</content>
...
...
sails/src/api/controllers/StudentController.js
View file @
13f9c9bf
...
@@ -982,11 +982,13 @@ module.exports = {
...
@@ -982,11 +982,13 @@ module.exports = {
subscribe
:
function
(
req
,
res
)
{
subscribe
:
function
(
req
,
res
)
{
var
action
=
req
.
param
(
'action'
);
var
action
=
req
.
param
(
'action'
);
var
attributes
=
req
.
param
(
'attributes'
);
var
attributes
=
req
.
param
(
'attributes'
);
attributes
.
ui
=
attributes
.
ui
?
attributes
.
ui
:
'PCB'
;
if
(
req
.
isSocket
)
{
if
(
req
.
isSocket
)
{
sails
.
hooks
.
rooms
.
subscribeToRoom
(
sails
.
hooks
.
rooms
.
subscribeToRoom
(
sails
.
hooks
.
rooms
.
student
(
attributes
.
id_stu
),
sails
.
hooks
.
rooms
.
student
(
attributes
.
id_stu
),
req
.
socket
req
.
socket
,
attributes
.
ui
);
);
}
}
res
.
ok
({
msg
:
"Subscribed to student "
});
res
.
ok
({
msg
:
"Subscribed to student "
});
...
@@ -1007,11 +1009,8 @@ module.exports = {
...
@@ -1007,11 +1009,8 @@ module.exports = {
// Leave all rooms
// Leave all rooms
for
(
var
i
=
0
;
i
<
rooms
.
length
;
i
++
)
{
for
(
var
i
=
0
;
i
<
rooms
.
length
;
i
++
)
{
//sails.sockets.leave(req.socket, rooms[i]); MODIFICADO POR FERNANDO. SI NO, NO SE ACTUALIZA UPDATE_PEERS
//sails.sockets.leave(req.socket, rooms[i]); MODIFICADO POR FERNANDO. SI NO, NO SE ACTUALIZA UPDATE_PEERS
sails
.
hooks
.
rooms
.
unsubscribeFromRoom
(
sails
.
hooks
.
rooms
.
unsubscribeFromRoom
(
rooms
[
i
],
req
.
socket
);
rooms
[
i
],
sails
.
log
.
debug
(
"Unsusbscribe from room "
+
rooms
[
i
]);
req
.
socket
);
sails
.
log
.
debug
(
"Unsusbscribe from room "
+
rooms
[
i
]);
}
}
res
.
json
({
res
.
json
({
...
...
sails/src/api/controllers/SupervisorController.js
View file @
13f9c9bf
...
@@ -533,11 +533,13 @@ module.exports = {
...
@@ -533,11 +533,13 @@ module.exports = {
subscribe
:
function
(
req
,
res
)
{
subscribe
:
function
(
req
,
res
)
{
var
action
=
req
.
param
(
'action'
);
var
action
=
req
.
param
(
'action'
);
var
attributes
=
req
.
param
(
'attributes'
);
var
attributes
=
req
.
param
(
'attributes'
);
attributes
.
ui
=
attributes
.
ui
?
attributes
.
ui
:
'PCB'
;
if
(
action
===
'subscribe'
&&
req
.
isSocket
&&
attributes
.
id_sup
)
{
if
(
action
===
'subscribe'
&&
req
.
isSocket
&&
attributes
.
id_sup
)
{
sails
.
hooks
.
rooms
.
subscribeToRoom
(
sails
.
hooks
.
rooms
.
subscribeToRoom
(
sails
.
hooks
.
rooms
.
supervisor
(
attributes
.
id_sup
),
sails
.
hooks
.
rooms
.
supervisor
(
attributes
.
id_sup
),
req
.
socket
req
.
socket
,
attributes
.
ui
);
);
res
.
ok
();
res
.
ok
();
}
else
{
}
else
{
...
...
sails/src/api/hooks/rooms.js
View file @
13f9c9bf
...
@@ -7,12 +7,24 @@
...
@@ -7,12 +7,24 @@
* to obtain an ID.
* to obtain an ID.
* @type {Object}
* @type {Object}
*/
*/
var
socketRooms
=
{};
var
socketRooms
=
{};
// {socketId => [roomId, ...]}
module
.
exports
=
function
roomsHook
(
sails
)
{
module
.
exports
=
function
roomsHook
(
sails
)
{
return
{
return
{
/**
* Returns room information
* @param {Socket} socket
* @return {return} room information
{
id: room_id,
ui: 'PCB'|'PDB' // type of user interface
}
*/
getRoom
:
function
(
socket
)
{
getRoom
:
function
(
socket
)
{
return
socketRooms
[
sails
.
sockets
.
getId
(
socket
)];
return
socketRooms
[
sails
.
sockets
.
getId
(
socket
)];
},
},
/**
/**
* Special function that subscribes a socket to a given room.
* Special function that subscribes a socket to a given room.
* This creates the connection and logs to debug with this format:
* This creates the connection and logs to debug with this format:
...
@@ -20,25 +32,33 @@ module.exports = function roomsHook (sails) {
...
@@ -20,25 +32,33 @@ module.exports = function roomsHook (sails) {
* {
* {
* websocketSubscribe: {
* websocketSubscribe: {
* room,
* room,
* socket
* socket,
* interface
* }
* }
* }
* }
*
*
* @param {RoomID} room Room to subscribe
* @param {RoomID} room Room to subscribe
* @param {Socket} socket Socket added to the subscription<
* @param {Socket} socket Socket added to the subscription
* @param {UI} ui Type of UI that sends the suscription ('PDB' or 'PCB')
*/
*/
subscribeToRoom
:
function
(
room
,
socket
)
{
subscribeToRoom
:
function
(
room
,
socket
,
ui
)
{
sails
.
log
.
debug
(
'"websocketSubscribe":'
,
JSON
.
stringify
({
sails
.
log
.
debug
(
'"websocketSubscribe":'
,
JSON
.
stringify
({
room
:
room
,
room
:
room
,
socket
:
socket
.
id
socket
:
socket
.
id
,
ui
:
ui
}));
}));
sails
.
sockets
.
join
(
socket
,
room
,
function
()
{
sails
.
sockets
.
join
(
socket
,
room
,
function
()
{
sails
.
io
.
sockets
.
in
(
room
).
clients
(
function
(
error
,
ids
)
{
sails
.
io
.
sockets
.
in
(
room
).
clients
(
function
(
error
,
ids
)
{
if
(
!
error
)
{
if
(
!
error
)
{
socketRooms
[
sails
.
sockets
.
getId
(
socket
)]
=
var
socket_id
=
sails
.
sockets
.
getId
(
socket
);
socketRooms
[
sails
.
sockets
.
getId
(
socket
)]
?
[
socketRooms
[
sails
.
sockets
.
getId
(
socket
)],
room
]
:
[
room
];
// append to socketRooms
socketRooms
[
socket_id
]
=
socketRooms
[
socket_id
]
?
[
socketRooms
[
socket_id
],
room
]
:
[
room
];
// broadcast data
sails
.
hooks
.
events
.
broadcastEvent
(
sails
.
hooks
.
events
.
broadcastEvent
(
room
,
room
,
sails
.
hooks
.
events
.
roomSubscribersChange
(
ids
.
length
)
sails
.
hooks
.
events
.
roomSubscribersChange
(
ids
.
length
)
...
@@ -70,12 +90,17 @@ module.exports = function roomsHook (sails) {
...
@@ -70,12 +90,17 @@ module.exports = function roomsHook (sails) {
sails
.
sockets
.
leave
(
socket
,
room
,
function
()
{
sails
.
sockets
.
leave
(
socket
,
room
,
function
()
{
sails
.
io
.
sockets
.
in
(
room
).
clients
(
function
(
error
,
ids
)
{
sails
.
io
.
sockets
.
in
(
room
).
clients
(
function
(
error
,
ids
)
{
if
(
!
error
)
{
if
(
!
error
)
{
// broadcast event
sails
.
hooks
.
events
.
broadcastEvent
(
sails
.
hooks
.
events
.
broadcastEvent
(
room
,
room
,
sails
.
hooks
.
events
.
roomSubscribersChange
(
ids
.
length
)
sails
.
hooks
.
events
.
roomSubscribersChange
(
ids
.
length
)
);
);
// look for the room the socket is subscribed to and remove it
if
(
socketRooms
[
sails
.
sockets
.
getId
(
socket
)])
{
if
(
socketRooms
[
sails
.
sockets
.
getId
(
socket
)])
{
var
index
=
socketRooms
[
sails
.
sockets
.
getId
(
socket
)].
indexOf
(
room
);
var
index
=
socketRooms
[
sails
.
sockets
.
getId
(
socket
)].
indexOf
(
room
);
if
(
index
>
-
1
)
{
if
(
index
>
-
1
)
{
socketRooms
[
sails
.
sockets
.
getId
(
socket
)].
splice
(
index
,
1
);
socketRooms
[
sails
.
sockets
.
getId
(
socket
)].
splice
(
index
,
1
);
}
}
...
...
sails/src/assets/app/i18n/en-gb.json
View file @
13f9c9bf
...
@@ -148,6 +148,7 @@
...
@@ -148,6 +148,7 @@
"no"
:
"No"
,
"no"
:
"No"
,
"nobegin"
:
"No started"
,
"nobegin"
:
"No started"
,
"no_method"
:
"No method defined"
,
"no_method"
:
"No method defined"
,
"no_subscribed"
:
"No connection to student account"
,
"no_instruction"
:
"No instruction defined"
,
"no_instruction"
:
"No instruction defined"
,
"no_students_for_user"
:
"You are not associated to any students. Please ask your office to link your account to a Pictogram student."
,
"no_students_for_user"
:
"You are not associated to any students. Please ask your office to link your account to a Pictogram student."
,
"no_space_in_category"
:
"No space left in category"
,
"no_space_in_category"
:
"No space left in category"
,
...
@@ -303,7 +304,7 @@
...
@@ -303,7 +304,7 @@
"vibration"
:
"Vibration"
,
"vibration"
:
"Vibration"
,
"view"
:
"View"
,
"view"
:
"View"
,
"voice"
:
"Voice"
,
"voice"
:
"Voice"
,
"warning_last_session_bad"
:
"
Last session was bad closed. <p/>
Please, you must evaluate last tries and press 'close seesion' button"
,
"warning_last_session_bad"
:
"
Last session was interrupted.
Please, you must evaluate last tries and press 'close seesion' button"
,
"warning_no_tablet_online"
:
"No Pictogran Tablet online detected"
,
"warning_no_tablet_online"
:
"No Pictogran Tablet online detected"
,
"woman"
:
"Woman"
,
"woman"
:
"Woman"
,
"year_totals"
:
"Year totals"
,
"year_totals"
:
"Year totals"
,
...
...
sails/src/assets/app/i18n/es-es.json
View file @
13f9c9bf
...
@@ -150,6 +150,7 @@
...
@@ -150,6 +150,7 @@
"no_instruction"
:
"Instrucción sin definir"
,
"no_instruction"
:
"Instrucción sin definir"
,
"no_students_for_user"
:
"Su cuenta no está asociada a ningún estudiante. Por favor, contacto con su gabinete para enlazar su cuenta a un estudiante."
,
"no_students_for_user"
:
"Su cuenta no está asociada a ningún estudiante. Por favor, contacto con su gabinete para enlazar su cuenta a un estudiante."
,
"no_space_in_category"
:
"No queda espacio en la categoría"
,
"no_space_in_category"
:
"No queda espacio en la categoría"
,
"no_subscribed"
:
"Sin conexión a la cuenta del estudiante"
,
"nobegin"
:
"Sin iniciar"
,
"nobegin"
:
"Sin iniciar"
,
"normal"
:
"Normal"
,
"normal"
:
"Normal"
,
"notes"
:
"Notas"
,
"notes"
:
"Notas"
,
...
@@ -304,7 +305,7 @@
...
@@ -304,7 +305,7 @@
"vibration"
:
"Vibración"
,
"vibration"
:
"Vibración"
,
"view"
:
"Vista"
,
"view"
:
"Vista"
,
"voice"
:
"Voz"
,
"voice"
:
"Voz"
,
"warning_last_session_bad"
:
"
La última sesión no se cerró correctamente. <p/>
Por favor, evalúe los ensayos y pulse 'cerrar sesión' "
,
"warning_last_session_bad"
:
"
La última sesión no se cerró correctamente.
Por favor, evalúe los ensayos y pulse 'cerrar sesión' "
,
"warning_no_tablet_online"
:
"No se detectó ningún usuario de Pictogram Tablet online"
,
"warning_no_tablet_online"
:
"No se detectó ningún usuario de Pictogram Tablet online"
,
"woman"
:
"Mujer"
,
"woman"
:
"Mujer"
,
"year_totals"
:
"Totales año"
,
"year_totals"
:
"Totales año"
,
...
...
sails/src/assets/scripts/modules/student/controllers/student.js
View file @
13f9c9bf
...
@@ -64,7 +64,8 @@ dashboardControllers.controller('StudentCtrl', function StudentCtrl(
...
@@ -64,7 +64,8 @@ dashboardControllers.controller('StudentCtrl', function StudentCtrl(
io
.
socket
.
post
(
'/stu/subscribe'
,
{
io
.
socket
.
post
(
'/stu/subscribe'
,
{
action
:
'subscribe'
,
action
:
'subscribe'
,
attributes
:
{
attributes
:
{
id_stu
:
$scope
.
studentData
.
id
id_stu
:
$scope
.
studentData
.
id
,
ui
:
'PDB'
},
},
token
:
$window
.
sessionStorage
.
token
token
:
$window
.
sessionStorage
.
token
},
},
...
@@ -115,7 +116,8 @@ dashboardControllers.controller('StudentCtrl', function StudentCtrl(
...
@@ -115,7 +116,8 @@ dashboardControllers.controller('StudentCtrl', function StudentCtrl(
io
.
socket
.
post
(
'/stu/subscribe'
,
{
io
.
socket
.
post
(
'/stu/subscribe'
,
{
action
:
'subscribe'
,
action
:
'subscribe'
,
attributes
:
{
attributes
:
{
id_stu
:
$scope
.
studentData
.
id
id_stu
:
$scope
.
studentData
.
id
,
ui
:
'PDB'
},
},
token
:
$window
.
sessionStorage
.
token
token
:
$window
.
sessionStorage
.
token
},
},
...
@@ -124,7 +126,7 @@ dashboardControllers.controller('StudentCtrl', function StudentCtrl(
...
@@ -124,7 +126,7 @@ dashboardControllers.controller('StudentCtrl', function StudentCtrl(
});
});
})
})
.
error
(
function
()
{
.
error
(
function
()
{
// TODO ngToast res.msg (cant connect to student room)
ngToast
.
danger
({
content
:
$translate
.
instant
(
'no_subscribed'
)
});
});
});
// For tab navigation, initially blank goes to collections
// For tab navigation, initially blank goes to collections
...
...
sails/src/assets/scripts/modules/student/views/header.html
View file @
13f9c9bf
...
@@ -19,11 +19,29 @@
...
@@ -19,11 +19,29 @@
<img
ng-src=
"{{studentData.pic}}"
alt=
""
title=
""
/>
<img
ng-src=
"{{studentData.pic}}"
alt=
""
title=
""
/>
</div>
</div>
</div>
</div>
<div
class=
"col-md-1
1
"
>
<div
class=
"col-md-1
0
"
>
<div
style=
"margin-left: 5px"
><h4>
{{studentData.name}} {{studentData.surname}}
</h4></div>
<div
style=
"margin-left: 5px"
><h4>
{{studentData.name}} {{studentData.surname}}
</h4></div>
<div
style=
"margin-left: 5px"
class=
"text-left"
>
{{studentData.current_method | translate}}
</div>
<div
style=
"margin-left: 5px"
class=
"text-left"
>
<div
style=
"margin-left: 5px"
class=
"text-left"
>
{{studentData.current_instruction | translate}}
</div>
<span>
{{studentData.current_instruction | translate}}
</span>
<div
style=
"margin-left: 5px; color: green"
class=
"text-left"
>
{{ 'num_peers' | translate}} : {{studentData.num_peers}}
</div>
<span
class=
"text-muted"
>
({{studentData.current_method | translate}})
</span>
</div>
</div>
<div
class=
"col-md-1"
>
<div
style=
"margin-left: 5px; margin-top: 10px"
class=
"text-left text-success"
ng-if=
"studentData.num_peers > 1"
popover=
"{{ 'num_peers' | translate }}"
popover-trigger=
"mouseenter"
>
<span
class=
"glyphicon glyphicon-transfer"
aria-hidden
></span>
{{studentData.num_peers}}
</div>
<div
style=
"margin-left: 5px; margin-top: 10px"
class=
"text-left text-warning"
ng-if=
"studentData.num_peers == 1"
popover=
"{{ 'num_peers' | translate }}"
popover-trigger=
"mouseenter"
>
<span
class=
"glyphicon glyphicon-transfer"
aria-hidden
></span>
{{studentData.num_peers}}
</div>
<div
style=
"margin-left: 5px; margin-top: 10px"
class=
"text-left text-danger"
ng-if=
"studentData.num_peers == 0"
popover=
"{{ 'num_peers' | translate }}"
popover-trigger=
"mouseenter"
>
<span
class=
"glyphicon glyphicon-transfer"
aria-hidden=
"true"
></span>
{{studentData.num_peers}}
</div>
</div>
</div>
</div>
</div>
<div
class=
"row"
>
<div
class=
"row"
>
...
...
sails/src/assets/scripts/modules/student/views/session.html
View file @
13f9c9bf
<div
class=
"panel panel-default student_tab_panel"
>
<div
class=
"panel panel-default student_tab_panel"
>
<div
class=
"panel-body"
>
<div
class=
"panel-body"
>
<div
ng-show=
"studentData.num_peers<2"
>
<div
class=
"alert alert-danger"
role=
"alert"
ng-show=
"studentData.num_peers<2"
>
<table
style=
"border: 1px solid #666666; padding:5px; background-color:#f5f5f5;"
width=
"50%"
>
<span
class=
"glyphicon glyphicon-exclamation-sign"
aria-hidden=
"true"
></span>
<tr>
<span
class=
"sr-only"
>
Error:
</span>
<td><h4
translate
>
warning_no_tablet_online
</h4></td>
{{ 'warning_no_tablet_online' | translate }}
</tr>
</table>
</div>
</div>
<div
class=
"row"
>
<div
class=
"row"
>
<div
class=
"col-md-6"
>
<div
class=
"col-md-6"
>
...
@@ -46,7 +44,7 @@
...
@@ -46,7 +44,7 @@
</timer>
</timer>
</div>
</div>
<div
class=
"try"
>
<div
class=
"try"
>
<div
class=
"pull-left"
ng-repeat=
"a in actual_try.actions track by $index"
>
<div
class=
"pull-left"
ng-repeat=
"a in actual_try.actions track by $index"
>
<div
class=
"picto"
popover=
"{{ a.attributes.stu_picto.expression.text | translate }}"
popover-trigger=
"mouseenter"
>
<div
class=
"picto"
popover=
"{{ a.attributes.stu_picto.expression.text | translate }}"
popover-trigger=
"mouseenter"
>
<img
ng-src=
"{{ a.attributes.stu_picto.picto.uri }}"
/>
<img
ng-src=
"{{ a.attributes.stu_picto.picto.uri }}"
/>
<div
class=
"action-type"
>
<div
class=
"action-type"
>
...
@@ -123,16 +121,13 @@
...
@@ -123,16 +121,13 @@
</a>
</a>
</div>
</div>
<div
ng-show=
"ws_recover"
>
<div
class=
"alert alert-danger"
role=
"alert"
ng-show=
"ws_recover"
>
<table
style=
"border: 1px solid #666666; padding:5px; background-color:#f5f5f5;"
width=
"50%"
>
<span
class=
"glyphicon glyphicon-exclamation-sign"
aria-hidden=
"true"
></span>
<tr>
<span
class=
"sr-only"
>
Error:
</span>
<td><h4
translate
>
warning_last_session_bad
</h4></td>
{{ 'warning_last_session_bad' | translate }}
<td>
<button
class=
"btn btn-warning btn-sm"
type=
"button"
ng-click=
"close_ws()"
translate
>
close_session
</button>
<button
class=
"btn btn-success btn-sm"
type=
"button"
ng-click=
"close_ws()"
translate
>
close_session
</button>
</td>
</tr>
</table>
</div>
</div>
<div
class=
"list-group"
>
<div
class=
"list-group"
>
<div
class=
"list-group-item"
ng-repeat=
"s in wsessions | orderBy: '-begin' | limitTo: numPerPage:(currentPage-1)*numPerPage"
>
<div
class=
"list-group-item"
ng-repeat=
"s in wsessions | orderBy: '-begin' | limitTo: numPerPage:(currentPage-1)*numPerPage"
>
<div
ng-show=
"showLastTry && wsessions.length > 0"
>
<div
ng-show=
"showLastTry && wsessions.length > 0"
>
...
...
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