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
59ff6ce7
Commit
59ff6ce7
authored
Feb 10, 2012
by
Bridger Maxwell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added percentage label to course overview progress
--HG-- branch : bridger-dev
parent
a7f2d967
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
4 deletions
+12
-4
profile_graphs.js
+12
-4
No files found.
profile_graphs.js
View file @
59ff6ce7
...
...
@@ -88,15 +88,16 @@ $(function () {
totalWeight
=
0.0
sectionIndex
=
0
totalScore
=
0.0
overviewBarX
=
tickIndex
%>
%
for
section
in
grade_summary
:
<%
weighted_score
=
section
[
'totalscore'
][
'score'
]
*
section
[
'weight'
]
summary_text
=
"{0} - {1:.0%} of possible {2:.0%}"
.
format
(
section
[
'category'
],
weighted_score
,
section
[
'weight'
])
summary_text
=
"{0} - {1:.0%} of
a
possible {2:.0%}"
.
format
(
section
[
'category'
],
weighted_score
,
section
[
'weight'
])
%>
%
if
section
[
'totalscore'
][
'score'
]
>
0
:
series
.
push
({
label
:
"${section['category']} - Weighted"
,
data
:
[[
$
{
tickIndex
},
$
{
weighted_score
}]],
data
:
[[
$
{
overviewBarX
},
$
{
weighted_score
}]],
color
:
colors
[
$
{
sectionIndex
}].
toString
(),
});
%
endif
...
...
@@ -124,9 +125,16 @@ $(function () {
legend
:
{
show
:
false
},
};
if
(
$
(
"#grade-detail-graph"
).
length
>
0
)
{
$
.
plot
(
$
(
"#grade-detail-graph"
),
series
,
options
);
var
$grade_detail_graph
=
$
(
"#grade-detail-graph"
);
if
(
$grade_detail_graph
.
length
>
0
)
{
var
plot
=
$
.
plot
(
$grade_detail_graph
,
series
,
options
);
var
o
=
plot
.
pointOffset
({
x
:
$
{
overviewBarX
}
,
y
:
$
{
totalScore
}});
$grade_detail_graph
.
append
(
'<div style="position:absolute;left:'
+
(
o
.
left
-
12
)
+
'px;top:'
+
(
o
.
top
-
20
)
+
'px">${"{:.0%}".format(totalScore)}</div>'
);
}
var
previousPoint
=
null
;
$
(
"#grade-detail-graph"
).
bind
(
"plothover"
,
function
(
event
,
pos
,
item
)
{
...
...
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