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
9c94ef9c
Commit
9c94ef9c
authored
Feb 03, 2012
by
Bridger Maxwell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed course overview graph, (course detail graph still remains).
parent
4992be76
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 additions
and
81 deletions
+1
-81
profile.html
+1
-2
profile_graphs.js
+0
-79
No files found.
profile.html
View file @
9c94ef9c
...
@@ -90,8 +90,7 @@ $(function() {
...
@@ -90,8 +90,7 @@ $(function() {
<h1>
Course Progress
</h1>
<h1>
Course Progress
</h1>
<div
id=
"grade-detail-graph"
style=
"width:650px;height:200px;"
></div>
<div
id=
"grade-detail-graph"
style=
"width:650px;height:200px;"
></div>
<div
id=
"grade-overview-graph"
style=
"width:650px;height:130px;"
></div>
<ol>
<ol>
<
%
<
%
lastChapter =
None
lastChapter =
None
...
...
profile_graphs.js
View file @
9c94ef9c
...
@@ -123,83 +123,4 @@ $(function () {
...
@@ -123,83 +123,4 @@ $(function () {
previousPoint
=
null
;
previousPoint
=
null
;
}
}
});
});
/* ------------------------------- Grade overview graph ------------------------------- */
series
=
[];
ticks
=
[];
var
markings
=
[];
var
overview_tooltips
=
{};
<%
totalWeight
=
0.0
sectionIndex
=
0
totalScore
=
0.0
%>
%
for
section
in
grade_summary
:
%
if
section
[
'totalscore'
][
'score'
]
>
0
:
series
.
push
({
label
:
"${section['category']}"
,
data
:
[[
$
{
section
[
'totalscore'
][
'score'
]
*
section
[
'weight'
]},
1
]],
color
:
colors
[
$
{
sectionIndex
}].
toString
(),
##
We
need
at
least
one
to
be
on
xaxis
2
for
the
second
xaxis
labels
to
show
up
$
{
"xaxis: 2"
if
sectionIndex
%
2
==
0
else
""
}
});
%
endif
ticks
.
push
(
[
$
{
totalWeight
+
section
[
'weight'
]
*
0.5
},
"${'{} - {:.0%}'.format(section['category'], section['weight'])}"
]
);
markings
.
push
({
xaxis
:
{
from
:
$
{
totalWeight
},
to
:
$
{
totalWeight
+
section
[
'weight'
]}
},
color
:
colors
[
$
{
sectionIndex
}].
scale
(
"a"
,
0.6
).
toString
()
});
overview_tooltips
[
"${section['category']}"
]
=
[
"${section['totalscore']['summary']}"
];
<%
sectionIndex
+=
1
totalWeight
+=
section
[
'weight'
]
totalScore
+=
section
[
'totalscore'
][
'score'
]
*
section
[
'weight'
]
%>
%
endfor
options
=
{
series
:
{
stack
:
0
,
lines
:
{
show
:
false
,
steps
:
false
},
bars
:
{
show
:
true
,
barWidth
:
0.8
,
align
:
'center'
,
horizontal
:
true
,
linewidth
:
0
,
fill
:
1
},},
xaxis
:
{
min
:
0.0
,
max
:
1.0
},
yaxis
:
{
min
:
0.0
,
max
:
2.0
,
labelWidth
:
50
,
ticks
:[[
1.18
,
"Grade Totals"
]],
tickLength
:
0
},
xaxes
:
[
{
ticks
:
[[
0.87
,
"A 87%"
],
[
0.7
,
"B 70%"
],
[
0.6
,
"C 60%"
]],
position
:
top
},
{
ticks
:
ticks
}],
grid
:
{
markings
:
markings
,
hoverable
:
true
,
clickable
:
true
,
borderWidth
:
1
},
legend
:
{
show
:
false
},
};
var
$gradeOverviewGraph
=
$
(
"#grade-overview-graph"
);
if
(
$gradeOverviewGraph
.
length
>
0
)
{
var
plot
=
$
.
plot
(
$gradeOverviewGraph
,
series
,
options
);
//Put the percent on the graph
var
o
=
plot
.
pointOffset
({
x
:
$
{
totalScore
},
y
:
1
});
$gradeOverviewGraph
.
append
(
'<div style="position:absolute;left:'
+
(
o
.
left
+
4
)
+
'px;top:'
+
(
o
.
top
-
10
)
+
'px">${"{:.0%}".format(totalScore)}</div>'
);
$gradeOverviewGraph
.
bind
(
"plothover"
,
function
(
event
,
pos
,
item
)
{
$
(
"#x"
).
text
(
pos
.
x
.
toFixed
(
2
));
$
(
"#y"
).
text
(
pos
.
y
.
toFixed
(
2
));
if
(
item
)
{
if
(
previousPoint
!=
(
item
.
dataIndex
,
item
.
seriesIndex
))
{
previousPoint
=
(
item
.
dataIndex
,
item
.
seriesIndex
);
$
(
"#tooltip"
).
remove
();
if
(
item
.
series
.
label
in
overview_tooltips
)
{
var
series_tooltips
=
overview_tooltips
[
item
.
series
.
label
];
if
(
item
.
dataIndex
<
series_tooltips
.
length
)
{
var
x
=
item
.
datapoint
[
0
].
toFixed
(
2
),
y
=
item
.
datapoint
[
1
].
toFixed
(
2
);
showTooltip
(
item
.
pageX
,
item
.
pageY
,
series_tooltips
[
item
.
dataIndex
]);
}
}
}
}
else
{
$
(
"#tooltip"
).
remove
();
previousPoint
=
null
;
}
});
}
});
});
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