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
60531e30
Commit
60531e30
authored
Jan 16, 2013
by
Diana Huang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add progress bars to the staff grading and peer grading views.
parent
aec40ead
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
55 additions
and
13 deletions
+55
-13
lms/static/coffee/src/peer_grading/peer_grading.coffee
+14
-0
lms/static/coffee/src/staff_grading/staff_grading.coffee
+10
-4
lms/static/sass/course/_staff_grading.scss
+20
-3
lms/templates/peer_grading/peer_grading.html
+11
-6
No files found.
lms/static/coffee/src/peer_grading/peer_grading.coffee
View file @
60531e30
...
@@ -9,5 +9,19 @@ class PeerGrading
...
@@ -9,5 +9,19 @@ class PeerGrading
@
message_container
=
$
(
'.message-container'
)
@
message_container
=
$
(
'.message-container'
)
@
message_container
.
toggle
(
not
@
message_container
.
is
(
':empty'
))
@
message_container
.
toggle
(
not
@
message_container
.
is
(
':empty'
))
@
problem_list
=
$
(
'.problem-list'
)
@
construct_progress_bar
()
construct_progress_bar
:
()
=>
problems
=
@
problem_list
.
find
(
'tr'
).
next
()
problems
.
each
(
(
index
,
element
)
=>
problem
=
$
(
element
)
progress_bar
=
problem
.
find
(
'.progress-bar'
)
bar_value
=
parseInt
(
problem
.
data
(
'graded'
))
bar_max
=
parseInt
(
problem
.
data
(
'required'
))
progress_bar
.
progressbar
({
value
:
bar_value
,
max
:
bar_max
})
)
$
(
document
).
ready
(()
->
new
PeerGrading
())
$
(
document
).
ready
(()
->
new
PeerGrading
())
lms/static/coffee/src/staff_grading/staff_grading.coffee
View file @
60531e30
...
@@ -343,9 +343,10 @@ class StaffGrading
...
@@ -343,9 +343,10 @@ class StaffGrading
@
problem_list
.
html
(
'''
@
problem_list
.
html
(
'''
<tr>
<tr>
<th>Problem Name</th>
<th>Problem Name</th>
<th>Number Graded</th>
<th>Graded</th>
<th>Number Pending</th>
<th>Pending</th>
<th>Number Required</th>
<th>Required</th>
<th>Progress</th>
</tr>
</tr>
'''
)
'''
)
@
breadcrumbs
.
html
(
''
)
@
breadcrumbs
.
html
(
''
)
...
@@ -389,10 +390,15 @@ class StaffGrading
...
@@ -389,10 +390,15 @@ class StaffGrading
render_list
:
()
->
render_list
:
()
->
for
problem
in
@
problems
for
problem
in
@
problems
problem_row
=
$
(
'<tr>'
)
problem_row
=
$
(
'<tr>'
)
problem_row
.
append
(
$
(
'<td>'
).
append
(
@
problem_link
(
problem
)))
problem_row
.
append
(
$
(
'<td
class="problem-name"
>'
).
append
(
@
problem_link
(
problem
)))
problem_row
.
append
(
$
(
'<td>'
).
append
(
"
#{
problem
.
num_graded
}
"
))
problem_row
.
append
(
$
(
'<td>'
).
append
(
"
#{
problem
.
num_graded
}
"
))
problem_row
.
append
(
$
(
'<td>'
).
append
(
"
#{
problem
.
num_pending
}
"
))
problem_row
.
append
(
$
(
'<td>'
).
append
(
"
#{
problem
.
num_pending
}
"
))
problem_row
.
append
(
$
(
'<td>'
).
append
(
"
#{
problem
.
num_required
}
"
))
problem_row
.
append
(
$
(
'<td>'
).
append
(
"
#{
problem
.
num_required
}
"
))
row_progress_bar
=
$
(
'<div>'
).
addClass
(
'progress-bar'
)
progress_value
=
parseInt
(
problem
.
num_graded
)
progress_max
=
parseInt
(
problem
.
num_pending
)
+
progress_value
row_progress_bar
.
progressbar
({
value
:
progress_value
,
max
:
progress_max
})
problem_row
.
append
(
$
(
'<td>'
).
append
(
row_progress_bar
))
@
problem_list
.
append
(
problem_row
)
@
problem_list
.
append
(
problem_row
)
render_problem
:
()
->
render_problem
:
()
->
...
...
lms/static/sass/course/_staff_grading.scss
View file @
60531e30
...
@@ -29,11 +29,28 @@ div.peer-grading{
...
@@ -29,11 +29,28 @@ div.peer-grading{
display
:
none
;
display
:
none
;
}
}
ul
.problem-list
{
{
li
text-align
:
center
;
table-layout
:
auto
;
width
:
100%
;
th
{
padding
:
10px
;
}
td
{
padding
:
10px
;
}
td
.problem-name
{
text-align
:left
;
}
.ui-progressbar
{
{
margin
:
16px
0px
;
height
:
1em
;
margin
:
0px
;
padding
:
0px
;
}
}
}
}
...
...
lms/templates/peer_grading/peer_grading.html
View file @
60531e30
...
@@ -30,14 +30,15 @@
...
@@ -30,14 +30,15 @@
<table
class=
"problem-list"
>
<table
class=
"problem-list"
>
<tr>
<tr>
<th>
Problem Name
</th>
<th>
Problem Name
</th>
<th>
Number Graded
</th>
<th>
Graded
</th>
<th>
Number Pending
</th>
<th>
Pending
</th>
<th>
Number Required
</th>
<th>
Required
</th>
<th>
Progress
</th>
</tr>
</tr>
%for problem in problem_list:
%for problem in problem_list:
<tr>
<tr
data-graded=
"${problem['num_graded']}"
data-required=
"${problem['num_required']}"
>
<td>
<td
class=
"problem-name"
>
<a
href=
"${ajax_url}
/problem?location=$problem['location']
"
>
${problem['problem_name']}
</a>
<a
href=
"${ajax_url}
problem?location=${problem['location']}
"
>
${problem['problem_name']}
</a>
</td>
</td>
<td>
<td>
${problem['num_graded']}
${problem['num_graded']}
...
@@ -48,6 +49,10 @@
...
@@ -48,6 +49,10 @@
<td>
<td>
${problem['num_required']}
${problem['num_required']}
</td>
</td>
<td>
<div
class=
"progress-bar"
>
</div>
</td>
</tr>
</tr>
%endfor
%endfor
</table>
</table>
...
...
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