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
2aca6264
Commit
2aca6264
authored
Mar 24, 2012
by
Bridger Maxwell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Changed gradebook to be a table.
parent
56241850
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
90 additions
and
14 deletions
+90
-14
templates/gradebook.html
+60
-14
templates/gradebook_profilegraphs.html
+30
-0
No files found.
templates/gradebook.html
View file @
2aca6264
<
%
inherit
file=
"main.html"
/>
<
%
inherit
file=
"main.html"
/>
<
%
namespace
name=
"profile_graphs"
file=
"profile_graphs.js"
/>
<
%
block
name=
"headextra"
>
<
%
block
name=
"headextra"
>
<script
type=
"text/javascript"
src=
"/static/js/flot/jquery.flot.js"
></script>
<script
type=
"text/javascript"
src=
"/static/js/flot/jquery.flot.js"
></script>
<script
type=
"text/javascript"
src=
"/static/js/flot/jquery.flot.stack.js"
></script>
<script
type=
"text/javascript"
src=
"/static/js/flot/jquery.flot.stack.js"
></script>
<script
type=
"text/javascript"
src=
"/static/js/flot/jquery.flot.symbol.js"
></script>
<script
type=
"text/javascript"
src=
"/static/js/flot/jquery.flot.symbol.js"
></script>
% for s in students:
<script>
<style
type=
"text/css"
>
$
{
profile_graphs
.
body
(
s
[
'grade_info'
][
'grade_summary'
],
"grade-detail-graph-"
+
str
(
s
[
'id'
]))}
.grade_a
{
color
:
green
;}
</script>
.grade_b
{
color
:
Chocolate
;}
%endfor
.grade_c
{
color
:
DimGray
;}
.grade_none
{
color
:
LightGray
;}
</style>
</
%
block>
</
%
block>
<
%
include
file=
"navigation.html"
args=
"active_page=''"
/>
<
%
include
file=
"navigation.html"
args=
"active_page=''"
/>
...
@@ -17,14 +19,58 @@
...
@@ -17,14 +19,58 @@
<div
class=
"gradebook-wrapper"
>
<div
class=
"gradebook-wrapper"
>
<section
class=
"gradebook-content"
>
<section
class=
"gradebook-content"
>
<h1>
Gradebook
</h1>
<h1>
Gradebook
</h1>
<ol>
% for s in students:
%if len(students) > 0:
<li>
<table>
<h2><a
href=
/profile/${s['id']}
>
${s['username']}
</a></h2>
<
%
<div
id=
"grade-detail-graph-${s['id']}"
style=
"width:1000px;height:300px;"
></div>
templateSummary =
students[0]['grade_info']['grade_summary']
</li>
%
>
% endfor
</ol>
<tr>
<!-- Header Row -->
<th>
Student
</th>
%for section in templateSummary:
%if 'subscores' in section:
%for subsection in section['subscores']:
<th>
${subsection['label']}
</th>
%endfor
<th>
${section['totallabel']}
</th>
%else:
<th>
${section['category']}
</th>
%endif
%endfor
</tr>
<
%
def
name=
"percent_data(percentage)"
>
<
%
data_class =
"grade_none"
if
percentage
>
.87:
data_class = "grade_a"
elif percentage > .70:
data_class = "grade_b"
elif percentage > .6:
data_class = "grade_c"
%>
<td
class=
"${data_class}"
>
${ "{0:.0%}".format( percentage ) }
</td>
</
%
def>
%for student in students:
<tr>
<td><a
href=
"/discussion/users/${student['id']}/${student['username']}/"
>
${student['username']}
</a></td>
%for section in student['grade_info']['grade_summary']:
%if 'subscores' in section:
%for subsection in section['subscores']:
${percent_data( subsection['percentage'] )}
%endfor
${percent_data( section['totalscore'] )}
%else:
${percent_data( section['totalscore'] )}
%endif
%endfor
</tr>
%endfor
</table>
%endif
</section>
</section>
</div>
</div>
</section>
</section>
templates/gradebook_profilegraphs.html
0 → 100644
View file @
2aca6264
<
%
inherit
file=
"main.html"
/>
<
%
namespace
name=
"profile_graphs"
file=
"profile_graphs.js"
/>
<
%
block
name=
"headextra"
>
<script
type=
"text/javascript"
src=
"/static/js/flot/jquery.flot.js"
></script>
<script
type=
"text/javascript"
src=
"/static/js/flot/jquery.flot.stack.js"
></script>
<script
type=
"text/javascript"
src=
"/static/js/flot/jquery.flot.symbol.js"
></script>
% for s in students:
<script>
$
{
profile_graphs
.
body
(
s
[
'grade_info'
][
'grade_summary'
],
"grade-detail-graph-"
+
str
(
s
[
'id'
]))}
</script>
%endfor
</
%
block>
<
%
include
file=
"navigation.html"
args=
"active_page=''"
/>
<section
class=
"main-content"
>
<div
class=
"gradebook-wrapper"
>
<section
class=
"gradebook-content"
>
<h1>
Gradebook
</h1>
<ol>
% for s in students:
<li>
<h2><a
href=
/profile/${s['id']}
>
${s['username']}
</a></h2>
<div
id=
"grade-detail-graph-${s['id']}"
style=
"width:1000px;height:300px;"
></div>
</li>
% endfor
</ol>
</section>
</div>
</section>
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