Commit 943a5657 by Diana Huang

Log rubric selection clicks

parent bb3fc20b
class @Rubric class @Rubric
constructor: () -> 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 # finds the scores for each rubric category
@get_score_list: () => @get_score_list: () =>
# find the number of categories: # find the number of categories:
...@@ -45,6 +60,8 @@ class @CombinedOpenEnded ...@@ -45,6 +60,8 @@ class @CombinedOpenEnded
@task_count = @el.data('task-count') @task_count = @el.data('task-count')
@task_number = @el.data('task-number') @task_number = @el.data('task-number')
@accept_file_upload = @el.data('accept-file-upload') @accept_file_upload = @el.data('accept-file-upload')
@location = @el.data('location')
Rubric.initialize(@location)
@allow_reset = @el.data('allow_reset') @allow_reset = @el.data('allow_reset')
@reset_button = @$('.reset-button') @reset_button = @$('.reset-button')
...@@ -153,7 +170,6 @@ class @CombinedOpenEnded ...@@ -153,7 +170,6 @@ class @CombinedOpenEnded
@legend_container= $('.legend-container') @legend_container= $('.legend-container')
message_post: (event)=> message_post: (event)=>
Logger.log 'message_post', @answers
external_grader_message=$(event.target).parent().parent().parent() external_grader_message=$(event.target).parent().parent().parent()
evaluation_scoring = $(event.target).parent() evaluation_scoring = $(event.target).parent()
...@@ -182,6 +198,7 @@ class @CombinedOpenEnded ...@@ -182,6 +198,7 @@ class @CombinedOpenEnded
$('section.evaluation').slideToggle() $('section.evaluation').slideToggle()
@message_wrapper.html(response.message_html) @message_wrapper.html(response.message_html)
$.ajaxWithPrefix("#{@ajax_url}/save_post_assessment", settings) $.ajaxWithPrefix("#{@ajax_url}/save_post_assessment", settings)
......
...@@ -420,6 +420,7 @@ class @PeerGradingProblem ...@@ -420,6 +420,7 @@ class @PeerGradingProblem
@submit_button.hide() @submit_button.hide()
@action_button.hide() @action_button.hide()
@calibration_feedback_panel.hide() @calibration_feedback_panel.hide()
Rubric.initialize(@location)
render_calibration_feedback: (response) => render_calibration_feedback: (response) =>
......
...@@ -340,6 +340,7 @@ class CombinedOpenEndedV1Module(): ...@@ -340,6 +340,7 @@ class CombinedOpenEndedV1Module():
'status': self.get_status(False), 'status': self.get_status(False),
'display_name': self.display_name, 'display_name': self.display_name,
'accept_file_upload': self.accept_file_upload, 'accept_file_upload': self.accept_file_upload,
'location': self.location,
'legend_list' : LEGEND_LIST, 'legend_list' : LEGEND_LIST,
} }
...@@ -823,4 +824,4 @@ class CombinedOpenEndedV1Descriptor(XmlDescriptor, EditingDescriptor): ...@@ -823,4 +824,4 @@ class CombinedOpenEndedV1Descriptor(XmlDescriptor, EditingDescriptor):
for child in ['task']: for child in ['task']:
add_child(child) add_child(child)
return elt return elt
\ No newline at end of file
...@@ -148,6 +148,7 @@ The standard chunk of Lorem Ipsum used since the 1500s is reproduced below for t ...@@ -148,6 +148,7 @@ The standard chunk of Lorem Ipsum used since the 1500s is reproduced below for t
class @StaffGrading class @StaffGrading
constructor: (backend) -> constructor: (backend) ->
AjaxPrefix.addAjaxPrefix(jQuery, -> "")
@backend = backend @backend = backend
# all the jquery selectors # all the jquery selectors
...@@ -218,6 +219,7 @@ class @StaffGrading ...@@ -218,6 +219,7 @@ class @StaffGrading
setup_score_selection: => setup_score_selection: =>
@score_selection_container.html(@rubric) @score_selection_container.html(@rubric)
$('.score-selection').click => @graded_callback() $('.score-selection').click => @graded_callback()
Rubric.initialize(@location)
graded_callback: () => graded_callback: () =>
......
<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"> <div class="status-container">
${status|n} ${status|n}
</div> </div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment