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
3ecafa9b
Commit
3ecafa9b
authored
Feb 19, 2013
by
Diana Huang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add hot keys to rubrics
parent
215f6aeb
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
41 additions
and
1 deletions
+41
-1
common/lib/xmodule/xmodule/js/src/combinedopenended/display.coffee
+40
-0
lms/static/coffee/src/staff_grading/staff_grading.coffee
+1
-1
No files found.
common/lib/xmodule/xmodule/js/src/combinedopenended/display.coffee
View file @
3ecafa9b
...
...
@@ -4,7 +4,46 @@ class @Rubric
@
initialize
:
(
location
)
->
$
(
'.rubric'
).
data
(
"location"
,
location
)
$
(
'input[class="score-selection"]'
).
change
@
tracking_callback
# set up the hotkeys
$
(
window
).
keydown
@
keypress_callback
# display the 'current' carat
@
categories
=
$
(
'.rubric-category'
)
@
category
=
$
(
@
categories
.
first
())
@
category
.
prepend
(
'> '
)
@
category_index
=
0
@
keypress_callback
:
(
event
)
=>
# don't try to do this when user is typing in a text input
if
$
(
event
.
target
).
is
(
'input, textarea'
)
return
# for when we select via top row
if
event
.
which
>=
48
and
event
.
which
<=
57
selected
=
event
.
which
-
48
# for when we select via numpad
else
if
event
.
which
>=
96
and
event
.
which
<=
105
selected
=
event
.
which
-
96
# we don't want to do anything since we haven't pressed a number
else
return
# if we actually have a current category (not past the end)
if
(
@
category
.
length
>
0
)
# find the valid selections for this category
inputs
=
$
(
"input[name='score-selection-
#{
@
category_index
}
']"
)
max_score
=
inputs
.
length
-
1
if
selected
>
max_score
or
selected
<
0
return
inputs
.
filter
(
"input[value=
#{
selected
}
]"
).
click
()
# move to the next category
old_category_text
=
@
category
.
html
().
substring
(
5
)
@
category
.
html
(
old_category_text
)
@
category_index
++
@
category
=
$
(
@
categories
[
@
category_index
])
@
category
.
prepend
(
'> '
)
@
tracking_callback
:
(
event
)
->
target_selection
=
$
(
event
.
target
).
val
()
# chop off the beginning of the name so that we can get the number of the category
...
...
@@ -306,6 +345,7 @@ class @CombinedOpenEnded
if
response
.
success
@
rubric_wrapper
.
html
(
response
.
rubric_html
)
@
rubric_wrapper
.
show
()
Rubric
.
initialize
(
@
location
)
@
answer_area
.
html
(
response
.
student_response
)
@
child_state
=
'assessing'
@
find_assessment_elements
()
...
...
lms/static/coffee/src/staff_grading/staff_grading.coffee
View file @
3ecafa9b
...
...
@@ -219,7 +219,7 @@ class @StaffGrading
setup_score_selection
:
=>
@
score_selection_container
.
html
(
@
rubric
)
$
(
'
.score-selection'
).
click
=>
@
graded_callback
()
$
(
'
input[class="score-selection"]'
).
change
=>
@
graded_callback
()
Rubric
.
initialize
(
@
location
)
...
...
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