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
ee683c9d
Commit
ee683c9d
authored
Jul 10, 2013
by
Jason Bau
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add user msg for peer eval for when #graded > #required
parent
88e580bc
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
3 deletions
+25
-3
common/lib/xmodule/xmodule/js/src/peergrading/peer_grading_problem.coffee
+10
-1
common/lib/xmodule/xmodule/peer_grading_module.py
+14
-1
lms/templates/peer_grading/peer_grading_problem.html
+1
-1
No files found.
common/lib/xmodule/xmodule/js/src/peergrading/peer_grading_problem.coffee
View file @
ee683c9d
...
@@ -343,8 +343,17 @@ class @PeerGradingProblem
...
@@ -343,8 +343,17 @@ class @PeerGradingProblem
submission_callback
:
(
response
)
=>
submission_callback
:
(
response
)
=>
if
response
.
success
if
response
.
success
@
is_calibrated_check
()
@
is_calibrated_check
()
required
=
@
grading_wrapper
.
data
(
'required'
)
graded
=
@
grading_wrapper
.
data
(
'graded'
)
+
1
@
grading_wrapper
.
data
(
'graded'
,
graded
)
@
grading_wrapper
.
attr
(
'data-graded'
,
graded
)
#just in case someone wants to read the DOM
message
=
"<p>Successfully saved your feedback. Fetched the next essay.</p>"
if
graded
>=
required
message
=
"<p>Successfully saved your feedback. Fetched the next essay.
<b>You have completed the required number of peer evaluations, but may
choose to continue grading if you'd like.</b></p>"
@
grading_message
.
fadeIn
()
@
grading_message
.
fadeIn
()
@
grading_message
.
html
(
"<p>Successfully saved your feedback. Fetched the next essay.</p>"
)
@
grading_message
.
html
(
message
)
else
else
if
response
.
error
if
response
.
error
@
render_error
(
response
.
error
)
@
render_error
(
response
.
error
)
...
...
common/lib/xmodule/xmodule/peer_grading_module.py
View file @
ee683c9d
...
@@ -177,8 +177,9 @@ class PeerGradingModule(PeerGradingFields, XModule):
...
@@ -177,8 +177,9 @@ class PeerGradingModule(PeerGradingFields, XModule):
return
json
.
dumps
(
d
,
cls
=
ComplexEncoder
)
return
json
.
dumps
(
d
,
cls
=
ComplexEncoder
)
def
query_data_for_location
(
self
):
def
query_data_for_location
(
self
,
location
=
None
):
student_id
=
self
.
system
.
anonymous_student_id
student_id
=
self
.
system
.
anonymous_student_id
if
not
location
:
location
=
self
.
link_to_location
location
=
self
.
link_to_location
success
=
False
success
=
False
response
=
{}
response
=
{}
...
@@ -567,12 +568,24 @@ class PeerGradingModule(PeerGradingFields, XModule):
...
@@ -567,12 +568,24 @@ class PeerGradingModule(PeerGradingFields, XModule):
elif
data
.
get
(
'location'
)
is
not
None
:
elif
data
.
get
(
'location'
)
is
not
None
:
problem_location
=
data
.
get
(
'location'
)
problem_location
=
data
.
get
(
'location'
)
success
,
response
=
self
.
query_data_for_location
(
location
=
problem_location
)
if
not
success
:
log
.
error
(
"No instance data found and could not get data from controller for loc {0} student {1}"
.
format
(
problem_location
,
self
.
system
.
anonymous_student_id
))
return
{
'html'
:
""
,
'success'
:
False
}
count_graded
=
response
[
'count_graded'
]
count_required
=
response
[
'count_required'
]
ajax_url
=
self
.
ajax_url
ajax_url
=
self
.
ajax_url
html
=
self
.
system
.
render_template
(
'peer_grading/peer_grading_problem.html'
,
{
html
=
self
.
system
.
render_template
(
'peer_grading/peer_grading_problem.html'
,
{
'view_html'
:
''
,
'view_html'
:
''
,
'problem_location'
:
problem_location
,
'problem_location'
:
problem_location
,
'course_id'
:
self
.
system
.
course_id
,
'course_id'
:
self
.
system
.
course_id
,
'ajax_url'
:
ajax_url
,
'ajax_url'
:
ajax_url
,
'count_graded'
:
count_graded
,
'count_required'
:
count_required
,
# Checked above
# Checked above
'staff_access'
:
False
,
'staff_access'
:
False
,
'use_single_location'
:
self
.
use_for_single_location
,
'use_single_location'
:
self
.
use_for_single_location
,
...
...
lms/templates/peer_grading/peer_grading_problem.html
View file @
ee683c9d
...
@@ -24,7 +24,7 @@
...
@@ -24,7 +24,7 @@
</div>
</div>
<section
class=
"grading-wrapper"
>
<section
class=
"grading-wrapper"
data-graded=
"${count_graded}"
data-required=
"${count_required}"
>
<h2>
Student Response
</h2>
<h2>
Student Response
</h2>
<div
class=
"grading-container"
>
<div
class=
"grading-container"
>
...
...
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