concord-consortium/lara

View on GitHub
lib/c_rater/api_wrapper.rb

Summary

Maintainability
A
1 hr
Test Coverage
A
97%

Method get_feedback has 26 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  def get_feedback(item_id, response_id, response_text)
    xml = request_xml(item_id, response_id, response_text)
    resp = HTTParty.post(@url, request_options(xml))
    # C-Rater API seems to always return HTTP 200 and error message provided in XML body.
    # This code assumes that there is only one XML structure that is correct for us (that includes score)
Severity: Minor
Found in lib/c_rater/api_wrapper.rb - About 1 hr to fix

    Method initialize has 5 arguments (exceeds 4 allowed). Consider refactoring.
    Open

      def initialize(client_id, username, password, url = nil, api_key = nil)
    Severity: Minor
    Found in lib/c_rater/api_wrapper.rb - About 35 mins to fix

      There are no issues that match your filters.

      Category
      Status