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
1bb997bf
authored
Aug 31, 2016
by
Arturo Montejo Ráez
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
fixed issue #552
parent
19086f8e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
4 deletions
sails/src/api/controllers/WorkingSessionController.js
sails/src/assets/scripts/app.js
sails/src/assets/scripts/controllers/main.js
sails/src/api/controllers/WorkingSessionController.js
View file @
1bb997bf
...
@@ -46,6 +46,7 @@ module.exports = {
...
@@ -46,6 +46,7 @@ module.exports = {
id_sup: <supervisor ID>
id_sup: <supervisor ID>
id_stu: <student ID>
id_stu: <student ID>
id_ins: <instruction ID>
id_ins: <instruction ID>
begin: <begin timestamp in ISO format>
* }
* }
* @param {response} res
* @param {response} res
* {
* {
...
@@ -55,18 +56,19 @@ module.exports = {
...
@@ -55,18 +56,19 @@ module.exports = {
create
:
function
(
req
,
res
)
{
create
:
function
(
req
,
res
)
{
var
params
=
req
.
allParams
();
var
params
=
req
.
allParams
();
sails
.
debug
.
lo
g
(
JSON
.
stringify
(
params
));
sails
.
log
.
debu
g
(
JSON
.
stringify
(
params
));
if
(
!
params
.
id_sup
)
res
.
badRequest
(
"No supervisor defined"
);
if
(
!
params
.
id_sup
)
res
.
badRequest
(
"No supervisor defined"
);
if
(
!
params
.
id_ins
)
res
.
badRequest
(
"No instruction defined"
);
if
(
!
params
.
id_ins
)
res
.
badRequest
(
"No instruction defined"
);
if
(
!
params
.
id_stu
)
res
.
badRequest
(
"No student defined"
);
if
(
!
params
.
id_stu
)
res
.
badRequest
(
"No student defined"
);
if
(
!
params
.
begin
)
res
.
badRequest
(
"No start timestamp defined"
);
if
(
!
params
.
desc
)
params
.
desc
=
""
;
if
(
!
params
.
desc
)
params
.
desc
=
""
;
var
data
=
{};
var
data
=
{};
data
.
supervisor
=
params
.
id_sup
;
data
.
supervisor
=
params
.
id_sup
;
data
.
instruction
=
params
.
id_ins
;
data
.
instruction
=
params
.
id_ins
;
data
.
description
=
params
.
desc
;
data
.
description
=
params
.
desc
;
sails
.
debug
.
lo
g
(
"BEGIN "
+
params
.
begin
);
sails
.
log
.
debu
g
(
"BEGIN "
+
params
.
begin
);
data
.
begin
=
params
.
begin
;
// data comes in ISO format
data
.
begin
=
params
.
begin
;
// data comes in ISO format
StuOpenTry
.
findOne
({
or
:
[
// pending open try?
StuOpenTry
.
findOne
({
or
:
[
// pending open try?
...
...
sails/src/assets/scripts/app.js
View file @
1bb997bf
...
@@ -177,4 +177,4 @@ dashboardApp.factory('newconfirm', function ($window, $q, $timeout) {
...
@@ -177,4 +177,4 @@ dashboardApp.factory('newconfirm', function ($window, $q, $timeout) {
// force websocket transport protocol
// force websocket transport protocol
io
.
sails
.
transports
=
[
'polling'
];
//
io.sails.transports=['polling'];
sails/src/assets/scripts/controllers/main.js
View file @
1bb997bf
...
@@ -12,7 +12,8 @@ String.prototype.hashCode = function() {
...
@@ -12,7 +12,8 @@ String.prototype.hashCode = function() {
return
hash
;
return
hash
;
};
};
io
.
sails
.
transports
=
[
'websocket'
];
// force transport protocol for websockets
// io.sails.transports=['websocket'];
// Creamos el módulo dashboardControllers, de donde colgarán todos los controladores
// Creamos el módulo dashboardControllers, de donde colgarán todos los controladores
var
dashboardControllers
=
angular
.
module
(
'dashboardControllers'
,
[
'dashboardConfig'
]);
var
dashboardControllers
=
angular
.
module
(
'dashboardControllers'
,
[
'dashboardConfig'
]);
...
...
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