<commit_before># -*- coding: utf-8 -*-
from __future__ import unicode_literals

# Devilry imports
from devilry.devilry_qualifiesforexam.from_devilry_utils.groups_groupedby_relatedstudent_and_assignments import \
    GroupsGroupedByRelatedStudentAndAssignment


class PeriodResultsCollector(object):
    """
    Collects the results on a period for students.
    """

    def __init__(self, period, qualifying_assignment_ids=None):
        """
        Args:
            period: The period the results are collected for.
        """
        self.period = period
        self.qualifying_assignment_ids = qualifying_assignment_ids

    def student_qualifies_for_exam(self, aggregated_relstudentinfo):
        """
        This function is specific for the plugin and must be implemented by a subclass.

        Args:
            aggregated_relstudentinfo: Object with assignmentinfo for student on period.
<commit_msg>devilry_qualifiesforexam/pluginhelpers.py: Refactored after path change.<commit_after># -*- coding: utf-8 -*-
from __future__ import unicode_literals

# Devilry imports
from devilry.devilry_qualifiesforexam.utils.groups_groupedby_relatedstudent_and_assignments import \
    GroupsGroupedByRelatedStudentAndAssignment


class PeriodResultsCollector(object):
    """
    Collects the results on a period for students.
    """

    def __init__(self, period, qualifying_assignment_ids=None):
        """
        Args:
            period: The period the results are collected for.
        """
        self.period = period
        self.qualifying_assignment_ids = qualifying_assignment_ids

    def student_qualifies_for_exam(self, aggregated_relstudentinfo):
        """
        This function is specific for the plugin and must be implemented by a subclass.

        Args:
            aggregated_relstudentinfo: Object with assignmentinfo for student on period.

{'fraction_non_alphanumeric': 0.06303418803418803, 'fraction_numerical': 0.0010683760683760685, 'mean_word_length': 3.3761682242990654, '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': '4662860', 'n_tokens_mistral': 515, 'n_tokens_neox': 493, 'n_words': 136}