Log rubric selection clicks
This commit is contained in:
@@ -1,6 +1,21 @@
|
||||
class @Rubric
|
||||
constructor: () ->
|
||||
|
||||
@initialize: (location) ->
|
||||
$('.rubric').data("location", location)
|
||||
$('input[class="score-selection"]').change @tracking_callback
|
||||
|
||||
@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
|
||||
category = $(event.target).prop("name").substring(16)
|
||||
location = $('.rubric').data('location')
|
||||
# probably want the original problem location as well
|
||||
|
||||
data = {location: location, selection: target_selection, category: category}
|
||||
Logger.log 'rubric_select', data
|
||||
|
||||
|
||||
# finds the scores for each rubric category
|
||||
@get_score_list: () =>
|
||||
# find the number of categories:
|
||||
@@ -45,6 +60,8 @@ class @CombinedOpenEnded
|
||||
@task_count = @el.data('task-count')
|
||||
@task_number = @el.data('task-number')
|
||||
@accept_file_upload = @el.data('accept-file-upload')
|
||||
@location = @el.data('location')
|
||||
Rubric.initialize(@location)
|
||||
|
||||
@allow_reset = @el.data('allow_reset')
|
||||
@reset_button = @$('.reset-button')
|
||||
@@ -153,7 +170,6 @@ class @CombinedOpenEnded
|
||||
@legend_container= $('.legend-container')
|
||||
|
||||
message_post: (event)=>
|
||||
Logger.log 'message_post', @answers
|
||||
external_grader_message=$(event.target).parent().parent().parent()
|
||||
evaluation_scoring = $(event.target).parent()
|
||||
|
||||
@@ -182,6 +198,7 @@ class @CombinedOpenEnded
|
||||
$('section.evaluation').slideToggle()
|
||||
@message_wrapper.html(response.message_html)
|
||||
|
||||
|
||||
$.ajaxWithPrefix("#{@ajax_url}/save_post_assessment", settings)
|
||||
|
||||
|
||||
|
||||
@@ -420,6 +420,7 @@ class @PeerGradingProblem
|
||||
@submit_button.hide()
|
||||
@action_button.hide()
|
||||
@calibration_feedback_panel.hide()
|
||||
Rubric.initialize(@location)
|
||||
|
||||
|
||||
render_calibration_feedback: (response) =>
|
||||
|
||||
@@ -340,6 +340,7 @@ class CombinedOpenEndedV1Module():
|
||||
'status': self.get_status(False),
|
||||
'display_name': self.display_name,
|
||||
'accept_file_upload': self.accept_file_upload,
|
||||
'location': self.location,
|
||||
'legend_list' : LEGEND_LIST,
|
||||
}
|
||||
|
||||
@@ -823,4 +824,4 @@ class CombinedOpenEndedV1Descriptor(XmlDescriptor, EditingDescriptor):
|
||||
for child in ['task']:
|
||||
add_child(child)
|
||||
|
||||
return elt
|
||||
return elt
|
||||
|
||||
@@ -148,6 +148,7 @@ The standard chunk of Lorem Ipsum used since the 1500s is reproduced below for t
|
||||
|
||||
class @StaffGrading
|
||||
constructor: (backend) ->
|
||||
AjaxPrefix.addAjaxPrefix(jQuery, -> "")
|
||||
@backend = backend
|
||||
|
||||
# all the jquery selectors
|
||||
@@ -218,6 +219,7 @@ class @StaffGrading
|
||||
setup_score_selection: =>
|
||||
@score_selection_container.html(@rubric)
|
||||
$('.score-selection').click => @graded_callback()
|
||||
Rubric.initialize(@location)
|
||||
|
||||
|
||||
graded_callback: () =>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<section id="combined-open-ended" class="combined-open-ended" data-ajax-url="${ajax_url}" data-allow_reset="${allow_reset}" data-state="${state}" data-task-count="${task_count}" data-task-number="${task_number}" data-accept-file-upload = "${accept_file_upload}">
|
||||
<section id="combined-open-ended" class="combined-open-ended" data-location="${location}" data-ajax-url="${ajax_url}" data-allow_reset="${allow_reset}" data-state="${state}" data-task-count="${task_count}" data-task-number="${task_number}" data-accept-file-upload = "${accept_file_upload}">
|
||||
<div class="status-container">
|
||||
${status|n}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user