<commit_before>import Chart from 'chart.js'
import AbstractWidget from 'ievv_jsbase/lib/widget/AbstractWidget'
import HttpRequest from 'ievv_jsbase/lib/http/HttpRequest'
import HtmlParser from "ievv_jsbase/lib/dom/HtmlParser";

export default class ExaminerDetailsWidget extends AbstractWidget {
  constructor(element, widgetInstanceId) {
    super(element, widgetInstanceId)
    this.loading_label = this.config.loading_label
    this.chartLabel = this.config.chart_label
    this.assignmentMaxPoints = this.config.assignment_max_points
    this.groups_corrected_count_label = this.config.groups_corrected_count_label
    this.groups_with_passing_grade_count_label = this.config.groups_with_passing_grade_count_label
    this.groups_with_failing_grade_count_label = this.config.groups_with_failing_grade_count_label
    this.groups_waiting_for_feedback_count_label = this.config.groups_waiting_for_feedback_count_label
    this.groups_waiting_for_deadline_to_expire_count_label = this.config.groups_waiting_for_deadline_to_expire_count_label
    this.points_label = this.config.points_label
    this.points_average_label = this.config.points_average_label
    this.points_highest_label = this.config.points_highest_label
    this.points_lowest_label = this.config.points_lowest_label

    // Fetch data from API
    this.requestData()

    // Set loading text.
    let parser = new HtmlParser(`
      <p>${this.loading_label} ...</p>
    `)
    this.element.appendChild(parser.firstRootElement)
  }

  requestData () {
    const assignment_id = this.config.assignment_id
    const relatedexaminer_ids = this.config.relatedexaminer_ids<commit_msg>devilry_statistics: Cleanup<commit_after>import Chart from 'chart.js'
import AbstractWidget from 'ievv_jsbase/lib/widget/AbstractWidget'
import HttpRequest from 'ievv_jsbase/lib/http/HttpRequest'
import HtmlParser from "ievv_jsbase/lib/dom/HtmlParser";

export default class ExaminerDetailsWidget extends AbstractWidget {
  constructor(element, widgetInstanceId) {
    super(element, widgetInstanceId)
    this.loading_label = this.config.loading_label
    this.groups_corrected_count_label = this.config.groups_corrected_count_label
    this.groups_with_passing_grade_count_label = this.config.groups_with_passing_grade_count_label
    this.groups_with_failing_grade_count_label = this.config.groups_with_failing_grade_count_label
    this.groups_waiting_for_feedback_count_label = this.config.groups_waiting_for_feedback_count_label
    this.groups_waiting_for_deadline_to_expire_count_label = this.config.groups_waiting_for_deadline_to_expire_count_label
    this.points_label = this.config.points_label
    this.points_average_label = this.config.points_average_label
    this.points_highest_label = this.config.points_highest_label
    this.points_lowest_label = this.config.points_lowest_label

    // Fetch data from API
    this.requestData()

    // Set loading text.
    let parser = new HtmlParser(`
      <p>${this.loading_label} ...</p>
    `)
    this.element.appendChild(parser.firstRootElement)
  }

  requestData () {
    const assignment_id = this.config.assignment_id
    const relatedexaminer_ids = this.config.relatedexaminer_ids
{'fraction_non_alphanumeric': 0.07162965279949952, 'fraction_numerical': 0.0, 'mean_word_length': 5.421686746987952, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '836681', 'n_tokens_mistral': 1022, 'n_tokens_neox': 987, 'n_words': 140}