Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
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-platform
Commits
8dd1210c
Commit
8dd1210c
authored
Mar 21, 2014
by
Sarina Canelake
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
i18n Inst Dash Analytics tab
LMS-2357
parent
71931bcf
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
5 deletions
+9
-5
lms/static/coffee/src/instructor_dashboard/analytics.coffee
+9
-5
No files found.
lms/static/coffee/src/instructor_dashboard/analytics.coffee
View file @
8dd1210c
...
...
@@ -34,7 +34,7 @@ class ProfileDistributionWidget
@
reset_display
()
@
get_profile_distributions
@
feature
,
error
:
std_ajax_err
=>
@
show_error
"Error fetching distribution."
error
:
std_ajax_err
=>
@
show_error
gettext
(
"Error fetching distribution."
)
success
:
(
data
)
=>
feature_res
=
data
.
feature_results
if
feature_res
.
type
is
'EASY_CHOICE'
...
...
@@ -74,7 +74,7 @@ class ProfileDistributionWidget
]
else
console
.
warn
(
"unable to show distribution
#{
feature_res
.
type
}
"
)
@
show_error
'Unavailable metric display.'
@
show_error
gettext
(
'Unavailable metric display.'
)
# fetch distribution data from server.
# `handler` can be either a callback for success
...
...
@@ -110,9 +110,11 @@ class GradeDistributionDisplay
load
:
->
@
get_grade_distributions
error
:
std_ajax_err
=>
@
show_error
"Error fetching grade distributions."
error
:
std_ajax_err
=>
@
show_error
gettext
(
"Error fetching grade distributions."
)
success
:
(
data
)
=>
@
$container
.
find
(
'.last-updated'
).
text
"Last Updated:
#{
data
.
time
}
"
time_updated
=
gettext
(
"Last Updated: <%= timestamp %>"
)
full_time_updated
=
_
.
template
(
time_updated
,
{
timestamp
:
data
.
time
})
@
$container
.
find
(
'.last-updated'
).
text
full_time_updated
# populate selector
@
$problem_selector
.
empty
()
...
...
@@ -145,8 +147,10 @@ class GradeDistributionDisplay
total_students
=
_
.
reduce
([
0
].
concat
grade_info
),
(
accum
,
{
grade
,
max_grade
,
num_students
})
->
accum
+
num_students
msg
=
gettext
(
"<%= num_students %> students scored."
)
full_msg
=
_
.
template
(
msg
,
{
num_students
:
total_students
})
# show total students
@
$container
.
find
(
'.display-text'
).
text
"
#{
total_students
}
students scored."
@
$container
.
find
(
'.display-text'
).
text
full_msg
# render to graph
graph_placeholder
=
$
'<div/>'
,
class
:
'graph-placeholder'
...
...
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