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
a8a01ce9
Commit
a8a01ce9
authored
Feb 09, 2012
by
Bridger Maxwell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cleaning up profile to output better lists
--HG-- branch : templates-profilecleanup
parent
8b6188b9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
41 deletions
+35
-41
profile.html
+35
-41
No files found.
profile.html
View file @
a8a01ce9
...
...
@@ -91,49 +91,43 @@ $(function() {
<div
id=
"grade-detail-graph"
style=
"width:650px;height:200px;"
></div>
<ol>
<
%
lastChapter =
None
%
>
% for hw in homeworks:
<ol
class=
"chapters"
>
%for chapter in chapters:
<li>
%if hw['chapter'] != lastChapter:
<h2><a
href=
"${reverse('courseware_chapter', args=format_url_params([hw['course'], hw['chapter']])) }"
>
${ hw['chapter'] }
</a></h2>
<
%
lastChapter =
hw['chapter']
%
>
%else:
<h2>
-
</h2>
%endif
<div
class=
"scores"
>
<h3><a
href=
"${reverse('courseware_section', args=format_url_params([hw['course'], hw['chapter'], hw['section']])) }"
>
<
%
earned =
hw['section_total'][0]
total =
hw['section_total'][1]
percentageString =
"{0:.0%}"
.
format
(
float
(
earned
)/
total
)
if
earned
>
0 else ""
%>
${ hw['section'] }
</a>
${"({0}/{1}) {2}".format( earned, total, percentageString )}
</h3>
${hw['subtitle']}
% if 'due' in hw and hw['due']!="":
due ${hw['due']}
% endif
<ul>
%if len(hw['scores']) > 0:
%if hw['graded']:
Problem Scores:
%else:
Practice Scores:
%endif
% for score in hw['scores']:
<li>
${ score[0] }/${ score[1] }
</li>
% endfor
<h2><a
href=
"${reverse('courseware_chapter', args=format_url_params([chapter['course'], chapter['chapter']])) }"
>
${ chapter['chapter'] }
</a></h2>
<ol
class=
"sections"
>
%for section in chapter['sections']:
<li>
<
%
earned =
section['section_total'][0]
total =
section['section_total'][1]
percentageString =
"{0:.0%}"
.
format
(
float
(
earned
)/
total
)
if
earned
>
0 else ""
%>
<h3><a
href=
"${reverse('courseware_section', args=format_url_params([chapter['course'], chapter['chapter'], section['section']])) }"
>
${ section['section'] }
</a>
${"({0}/{1}) {2}".format( earned, total, percentageString )}
</h3>
${section['subtitle']}
%if 'due' in section and section['due']!="":
due ${section['due']}
%endif
</ul>
</div>
</li>
% endfor
</ol>
%if len(section['scores']) > 0:
<ol
class=
"scores"
>
${ "Problem Scores: " if section['graded'] else "Practice Scores: "}
%for score in section['scores']:
<li
class=
"score"
>
${ score[0] }/${ score[1] }
</li>
%endfor
</ol>
%endif
</li>
<!--End section-->
%endfor
</ol>
<!--End sections-->
</li>
<!--End chapter-->
%endfor
</ol>
<!--End chapters-->
</section>
<section
class=
"user-info"
>
...
...
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