Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-analytics-dashboard
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-analytics-dashboard
Commits
3a9c8d89
Commit
3a9c8d89
authored
Mar 04, 2015
by
Dennis Jen
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #274 from edx/dsjen/display-table-hyphens
Replace zeros with hyphens in the performance pages.
parents
cd261944
178031dc
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
15 additions
and
5 deletions
+15
-5
analytics_dashboard/static/js/performance-answer-distribution-main.js
+2
-1
analytics_dashboard/static/js/performance-graded-content-assignment-main.js
+2
-1
analytics_dashboard/static/js/performance-graded-content-assignment-types-main.js
+2
-1
analytics_dashboard/static/js/test/specs/data-table-view-spec.js
+5
-1
analytics_dashboard/static/js/views/data-table-view.js
+4
-1
No files found.
analytics_dashboard/static/js/performance-answer-distribution-main.js
View file @
3a9c8d89
...
...
@@ -64,7 +64,8 @@ require(['vendor/domReady!', 'load/init-page'], function(doc, page) {
model
:
courseModel
,
modelAttribute
:
'answerDistribution'
,
columns
:
tableColumns
,
sorting
:
[
'-count'
]
sorting
:
[
'-count'
],
replaceZero
:
'-'
});
});
...
...
analytics_dashboard/static/js/performance-graded-content-assignment-main.js
View file @
3a9c8d89
...
...
@@ -59,7 +59,8 @@ require(['vendor/domReady!', 'load/init-page'], function (doc, page) {
model
:
model
,
modelAttribute
:
'problems'
,
columns
:
tableColumns
,
sorting
:
[
'index'
]
sorting
:
[
'index'
],
replaceZero
:
'-'
});
});
});
analytics_dashboard/static/js/performance-graded-content-assignment-types-main.js
View file @
3a9c8d89
...
...
@@ -70,7 +70,8 @@ require(['vendor/domReady!', 'load/init-page'], function (doc, page) {
model
:
model
,
modelAttribute
:
'assignments'
,
columns
:
tableColumns
,
sorting
:
[
'index'
]
sorting
:
[
'index'
],
replaceZero
:
'-'
});
});
});
analytics_dashboard/static/js/test/specs/data-table-view-spec.js
View file @
3a9c8d89
...
...
@@ -108,11 +108,15 @@ define(['models/course-model', 'views/data-table-view'], function(CourseModel, D
view
=
new
DataTableView
({
el
:
document
.
createElement
(
'div'
),
model
:
model
,
modelAttribute
:
'ages'
modelAttribute
:
'ages'
,
replaceZero
:
'-'
}),
func
=
view
.
createFormatNumberFunc
(
dataType
),
row
=
{};
row
[
dataType
]
=
0
;
expect
(
func
(
row
,
renderType
)).
toBe
(
'-'
);
row
[
dataType
]
=
3
;
expect
(
func
(
row
,
renderType
)).
toBe
(
'3'
);
...
...
analytics_dashboard/static/js/views/data-table-view.js
View file @
3a9c8d89
...
...
@@ -98,11 +98,14 @@ define(['dataTablesBootstrap', 'jquery', 'naturalSort', 'underscore', 'utils/uti
* numbers.
*/
createFormatNumberFunc
:
function
(
columnKey
)
{
var
self
=
this
;
return
function
(
row
,
type
)
{
var
value
=
row
[
columnKey
],
display
=
value
;
if
(
type
===
'display'
)
{
if
(
!
_
(
value
).
isUndefined
()
&&
!
_
(
value
).
isNull
()){
if
(
_
(
self
.
options
).
has
(
'replaceZero'
)
&&
value
===
0
)
{
display
=
self
.
options
.
replaceZero
;
}
else
if
(
!
_
(
value
).
isUndefined
()
&&
!
_
(
value
).
isNull
()){
display
=
Utils
.
localizeNumber
(
Number
(
value
));
}
}
...
...
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