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
bf92efd0
authored
Nov 30, 2017
by
Arturo Montejo Ráez
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
filtering of TSV data
parent
5abbbaeb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
sails/src/assets/scripts/modules/student/controllers/reports.js
sails/src/assets/scripts/modules/student/controllers/reports.js
View file @
bf92efd0
...
@@ -79,7 +79,7 @@ dashboardControllers.controller('StudentReportsCtrl', function StudentReportsCtr
...
@@ -79,7 +79,7 @@ dashboardControllers.controller('StudentReportsCtrl', function StudentReportsCtr
$scope
.
genTSV
=
function
()
{
$scope
.
genTSV
=
function
()
{
var
method_filter
=
-
1
;
var
method_filter
=
-
1
;
if
(
$scope
.
selected_method
!=
'-1'
)
if
(
$scope
.
selected_method
!=
'-1'
)
method_filter
=
JSON
.
parse
(
$scope
.
selected_method
)
.
id
;
method_filter
=
JSON
.
parse
(
$scope
.
selected_method
);
tsvData
=
"method"
+
SEPARATOR
+
"instruction"
+
SEPARATOR
+
"instruction_begin"
+
SEPARATOR
+
"instruction_end"
+
SEPARATOR
+
"session_begin"
+
SEPARATOR
+
"session_end"
+
SEPARATOR
+
"try_begin"
+
SEPARATOR
+
"try_end"
+
SEPARATOR
+
"action"
+
SEPARATOR
+
"action_timestamp"
+
SEPARATOR
+
"action_expression\n"
;
tsvData
=
"method"
+
SEPARATOR
+
"instruction"
+
SEPARATOR
+
"instruction_begin"
+
SEPARATOR
+
"instruction_end"
+
SEPARATOR
+
"session_begin"
+
SEPARATOR
+
"session_end"
+
SEPARATOR
+
"try_begin"
+
SEPARATOR
+
"try_end"
+
SEPARATOR
+
"action"
+
SEPARATOR
+
"action_timestamp"
+
SEPARATOR
+
"action_expression\n"
;
data
=
$scope
.
fulldata
;
data
=
$scope
.
fulldata
;
for
(
var
i
=
0
;
i
<
data
.
methods
.
length
;
i
++
)
{
for
(
var
i
=
0
;
i
<
data
.
methods
.
length
;
i
++
)
{
...
@@ -90,7 +90,9 @@ dashboardControllers.controller('StudentReportsCtrl', function StudentReportsCtr
...
@@ -90,7 +90,9 @@ dashboardControllers.controller('StudentReportsCtrl', function StudentReportsCtr
for
(
var
m
=
0
;
m
<
data
.
methods
[
i
].
instructions
[
j
].
working_sessions
[
k
].
tries
[
l
].
actions
.
length
;
m
++
)
{
for
(
var
m
=
0
;
m
<
data
.
methods
[
i
].
instructions
[
j
].
working_sessions
[
k
].
tries
[
l
].
actions
.
length
;
m
++
)
{
if
(
new
Date
(
data
.
methods
[
i
].
instructions
[
j
].
begin
).
getTime
()
>
$scope
.
reportDateSince
.
getTime
()
&&
if
(
new
Date
(
data
.
methods
[
i
].
instructions
[
j
].
begin
).
getTime
()
>
$scope
.
reportDateSince
.
getTime
()
&&
new
Date
(
data
.
methods
[
i
].
instructions
[
j
].
begin
).
getTime
()
<
$scope
.
reportDateTo
.
getTime
()
&&
new
Date
(
data
.
methods
[
i
].
instructions
[
j
].
begin
).
getTime
()
<
$scope
.
reportDateTo
.
getTime
()
&&
(
method_filter
==
-
1
||
data
.
methods
[
i
].
id
==
method_filter
))
{
(
method_filter
==
-
1
||
(
method_filter
.
class
===
"method-opt"
&&
data
.
methods
[
i
].
id
==
method_filter
.
id
)
||
(
method_filter
.
class
===
"instruction-opt"
&&
data
.
methods
[
i
].
instructions
[
j
].
id
==
method_filter
.
id
)))
{
var
expression
=
""
;
var
expression
=
""
;
if
(
data
.
methods
[
i
].
instructions
[
j
].
working_sessions
[
k
].
tries
[
l
].
actions
[
m
].
description
&&
if
(
data
.
methods
[
i
].
instructions
[
j
].
working_sessions
[
k
].
tries
[
l
].
actions
[
m
].
description
&&
data
.
methods
[
i
].
instructions
[
j
].
working_sessions
[
k
].
tries
[
l
].
actions
[
m
].
description
.
attributes
&&
data
.
methods
[
i
].
instructions
[
j
].
working_sessions
[
k
].
tries
[
l
].
actions
[
m
].
description
.
attributes
&&
...
@@ -114,6 +116,7 @@ dashboardControllers.controller('StudentReportsCtrl', function StudentReportsCtr
...
@@ -114,6 +116,7 @@ dashboardControllers.controller('StudentReportsCtrl', function StudentReportsCtr
}
}
}
}
}
}
console
.
log
(
tsvData
);
};
};
/**
/**
...
...
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