 class @Rubric
   constructor: () ->
 
-  @initialize: (location) ->
-    $('.rubric').data("location", location) 
-    $('input[class="score-selection"]').change @tracking_callback
+  @initialize: (location,el) ->
+    @el = el
+    @$el = $(el)
+    @$('.rubric').data("location", location)
+    @$('input[class="score-selection"]').change @tracking_callback
     # set up the hotkeys
     $(window).unbind('keydown', @keypress_callback)
     $(window).keydown @keypress_callback

      @errors_area.html(@out_of_sync_message)

  gentle_alert: (msg) =>
    if @el.find('.open-ended-alert').length
      @el.find('.open-ended-alert').remove()
    alert_elem = "<div class='open-ended-alert'>" + msg + "</div>"
    @el.find('.open-ended-action').after(alert_elem)
    @el.find('.open-ended-alert').css(opacity: 0).animate(opacity: 1, 700)

  queueing: =>
    if @child_state=="assessing" and @child_type=="openended"

    evaluation_scoring = $(event.target).parent()

    fd = new FormData()
    feedback = @$(evaluation_scoring).find('textarea.feedback-on-feedback')[0].value
    submission_id = @$(external_grader_message).find('input.submission_id')[0].value
    grader_id = @$(external_grader_message).find('input.grader_id')[0].value
    score = @$(evaluation_scoring).find("input:radio[name='evaluation-score']:checked").val()

    fd.append('feedback', feedback)
    fd.append('submission_id', submission_id)
