def filter(self, questions):
        filtered_questions = []

        for question in questions:
            q = Question()
            q.stem = 'stem = %s' % question.stem

            for option in question.options:
                q.options.append('option = %s' % option)

            filtered_questions.append(q)

        return filtered_questions
    def filter(self, questions):
        filtered_questions = []

        for question in questions:
            q = Question()
            q.stem = re.sub(r"\s+", ' ', question.stem).strip()

            for option in question.options:
                q.options.append(re.sub(r"\s+", ' ', option).strip())

            filtered_questions.append(q)

        return filtered_questions
Exemple #3
0
    def filter(self, questions):
        filtered_questions = []

        for question in questions:
            q = Question()
            q.stem = re.sub(r"\s+", ' ', question.stem).strip()

            for option in question.options:
                q.options.append(re.sub(r"\s+", ' ', option).strip())

            filtered_questions.append(q)

        return filtered_questions
Exemple #4
0
    def filter(self, questions):
        filtered_questions = []

        for question in questions:
            q = Question()
            q.stem = 'stem = %s' % question.stem

            for option in question.options:
                q.options.append('option = %s' % option)

            filtered_questions.append(q)

        return filtered_questions
    def filter(self, questions):
        filtered_questions = []

        for question in questions:
            q = Question()

            match = re.match(r"^[0-9]*\.?(.*)$", question.stem)
            if match:
                q.stem = match.group(1)
            else:
                q.stem = question.stem

            for option in question.options:
                q.options.append(option)

            filtered_questions.append(q)

        return filtered_questions
Exemple #6
0
    def filter(self, questions):
        filtered_questions = []

        for question in questions:
            q = Question()

            match = re.match(r"^[0-9]*\.?(.*)$", question.stem)
            if match:
                q.stem = match.group(1)
            else:
                q.stem = question.stem

            for option in question.options:
                q.options.append(option)

            filtered_questions.append(q)

        return filtered_questions