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
745c0527
Commit
745c0527
authored
Feb 01, 2013
by
Diana Huang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove duplicate Javascript and remove total grade selection.
parent
ba30c2ce
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
47 deletions
+3
-47
lms/static/coffee/src/peer_grading/peer_grading_problem.coffee
+3
-32
lms/static/coffee/src/staff_grading/staff_grading.coffee
+0
-15
No files found.
lms/static/coffee/src/peer_grading/peer_grading_problem.coffee
View file @
745c0527
...
...
@@ -232,23 +232,11 @@ class PeerGradingProblem
fetch_submission_essay
:
()
=>
@
backend
.
post
(
'get_next_submission'
,
{
location
:
@
location
},
@
render_submission
)
# finds the scores for each rubric category
get_score_list
:
()
=>
# find the number of categories:
num_categories
=
$
(
'table.rubric tr'
).
length
score_lst
=
[]
# get the score for each one
for
i
in
[
0
..(
num_categories
-
2
)]
score
=
$
(
"input[name='score-selection-
#{
i
}
']:checked"
).
val
()
score_lst
.
push
(
score
)
return
score_lst
construct_data
:
()
->
data
=
rubric_scores
:
@
get_score_list
()
score
:
@
grade
rubric_scores
:
Rubric
.
get_score_list
()
score
:
Rubric
.
get_total_score
()
location
:
@
location
submission_id
:
@
essay_id_input
.
val
()
submission_key
:
@
submission_key_input
.
val
()
...
...
@@ -316,7 +304,7 @@ class PeerGradingProblem
# called after a grade is selected on the interface
graded_callback
:
(
event
)
=>
# check to see whether or not any categories have not been scored
if
Rubric
.
check_complete
()
:
if
Rubric
.
check_complete
()
# show button if we have scores for all categories
@
show_submit_button
()
...
...
@@ -439,25 +427,8 @@ class PeerGradingProblem
setup_score_selection
:
(
max_score
)
=>
# first, get rid of all the old inputs, if any.
@
score_selection_container
.
html
(
"""
<h3>Overall Score</h3>
<p>Choose an overall score for this submission.</p>
"""
)
# Now create new labels and inputs for each possible score.
for
score
in
[
0
..
max_score
]
id
=
'score-'
+
score
label
=
"""<label for="
#{
id
}
">
#{
score
}
</label>"""
input
=
"""
<input type="radio" name="grade-selection" id="
#{
id
}
" value="
#{
score
}
"/>
"""
# " fix broken parsing in emacs
@
score_selection_container
.
append
(
input
+
label
)
# And now hook up an event handler again
$
(
"input[name='score-selection']"
).
change
@
graded_callback
$
(
"input[name='grade-selection']"
).
change
@
graded_callback
...
...
lms/static/coffee/src/staff_grading/staff_grading.coffee
View file @
745c0527
...
...
@@ -212,21 +212,6 @@ class @StaffGrading
setup_score_selection
:
=>
# first, get rid of all the old inputs, if any.
@
grade_selection_container
.
html
(
"""
<h3>Overall Score</h3>
<p>Choose an overall score for this submission.</p>
"""
)
# Now create new labels and inputs for each possible score.
for
score
in
[
0
..
@
max_score
]
id
=
'score-'
+
score
label
=
"""<label for="
#{
id
}
">
#{
score
}
</label>"""
input
=
"""
<input type="radio" class="grade-selection" name="grade-selection" id="
#{
id
}
" value="
#{
score
}
"/>
"""
# " fix broken parsing in emacs
@
grade_selection_container
.
append
(
input
+
label
)
$
(
'.grade-selection'
).
click
=>
@
graded_callback
()
@
score_selection_container
.
html
(
@
rubric
)
$
(
'.score-selection'
).
click
=>
@
graded_callback
()
...
...
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