<commit_before>require "rest-client"

module Integrations

  module U4sm<commit_msg>Add new method to u4sm integration to post grades to db<commit_after>require "rest-client"

module Integrations

  module U4sm
    def self.post_grades_to_db(sis_course_id, sis_section_id, gradetype, grades)
      grade = SisGrade.find_or_create_by(
        sis_course_id: sis_course_id,
        sis_section_id: sis_section_id,
        gradetype: gradetype,
      )

      grade.update_grades(grades)
    end

{'fraction_non_alphanumeric': 0.06288032454361055, 'fraction_numerical': 0.006085192697768763, 'mean_word_length': 3.796116504854369, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4642539', 'n_tokens_mistral': 174, 'n_tokens_neox': 161, 'n_words': 36}