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
e5c6414d
Commit
e5c6414d
authored
Jan 14, 2013
by
Vik Paruchuri
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adding score selection back into staff grading view
parent
50f951d9
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
4 deletions
+23
-4
lms/static/coffee/src/staff_grading/staff_grading.coffee
+21
-4
lms/templates/instructor/staff_grading.html
+2
-0
No files found.
lms/static/coffee/src/staff_grading/staff_grading.coffee
View file @
e5c6414d
...
...
@@ -175,6 +175,7 @@ class StaffGrading
@
feedback_area
=
$
(
'.feedback-area'
)
@
score_selection_container
=
$
(
'.score-selection-container'
)
@
grade_selection_container
=
$
(
'.grade-selection-container'
)
@
submit_button
=
$
(
'.submit-button'
)
@
action_button
=
$
(
'.action-button'
)
...
...
@@ -202,6 +203,7 @@ class StaffGrading
@
num_graded
=
0
@
num_pending
=
0
@
score_lst
=
[]
@
score
=
null
@
problems
=
null
...
...
@@ -216,10 +218,23 @@ class StaffGrading
setup_score_selection
:
=>
# first, get rid of all the old inputs, if any.
@
grade_selection_container
.
html
(
'Choose score: '
)
# 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
@
grade_selection_container
.
append
(
input
+
label
)
@
score_selection_container
.
html
(
@
rubric
)
$
(
'.score-selection'
).
click
=>
@
graded_callback
()
graded_callback
:
()
=>
@
grade
=
$
(
"input[name='grade-selection']:selected"
).
val
()
# check to see whether or not any categories have not been scored
num_categories
=
$
(
'table.rubric tr'
).
length
for
i
in
[
0
..(
num_categories
-
1
)]
...
...
@@ -230,8 +245,6 @@ class StaffGrading
@
state
=
state_graded
@
submit_button
.
show
()
set_button_text
:
(
text
)
=>
@
action_button
.
attr
(
'value'
,
text
)
...
...
@@ -272,6 +285,7 @@ class StaffGrading
skip_and_get_next
:
()
=>
data
=
score
:
@
grade
rubric_scores
:
@
get_score_list
()
feedback
:
@
feedback_area
.
val
()
submission_id
:
@
submission_id
...
...
@@ -285,8 +299,8 @@ class StaffGrading
submit_and_get_next
:
()
->
data
=
score
:
@
grade
rubric_scores
:
@
get_score_list
()
score
:
0
feedback
:
@
feedback_area
.
val
()
submission_id
:
@
submission_id
location
:
@
location
...
...
@@ -303,6 +317,8 @@ class StaffGrading
@
rubric
=
response
.
rubric
@
submission_id
=
response
.
submission_id
@
feedback_area
.
val
(
''
)
@
grade
=
null
@
max_score
=
response
.
max_score
@
ml_error_info
=
response
.
ml_error_info
@
prompt_name
=
response
.
problem_name
@
num_graded
=
response
.
num_graded
...
...
@@ -322,9 +338,10 @@ class StaffGrading
@
ml_error_info
=
null
@
submission_id
=
null
@
message
=
message
@
grade
=
null
@
max_score
=
0
@
state
=
state_no_data
render_view
:
()
->
# clear the problem list and breadcrumbs
@
problem_list
.
html
(
''
)
...
...
lms/templates/instructor/staff_grading.html
View file @
e5c6414d
...
...
@@ -71,6 +71,8 @@
</div>
</div>
<div
class=
"evaluation"
>
<p
class=
"grade-selection-container"
>
</p>
<p
class=
"score-selection-container"
>
</p>
<textarea
name=
"feedback"
placeholder=
"Feedback for student (optional)"
...
...
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