Exemplo n.º 1
0
def input_problem_answer(_, problem_type, correctness):
    """
    Have the browser input an answer (either correct or incorrect)
    """
    assert(correctness in ['correct', 'incorrect'])
    assert(problem_type in PROBLEM_DICT)
    answer_problem(world.scenario_dict['COURSE'].number, problem_type, correctness)
Exemplo n.º 2
0
def input_problem_answer(_, problem_type, correctness):
    """
    Have the browser input an answer (either correct or incorrect)
    """
    assert(correctness in ['correct', 'incorrect'])
    assert(problem_type in PROBLEM_DICT)
    answer_problem(problem_type, correctness)
Exemplo n.º 3
0
    def setup_problem_attempts(self, step, not_attempted=None):
        r"that the conditioned problem has (?P<not_attempted>not )?been attempted$"
        visit_scenario_item("CONDITION_SOURCE")

        if not_attempted is None:
            answer_problem(self.COURSE_NUM, "string", True)
            world.css_click("input.check")
Exemplo n.º 4
0
    def setup_problem_attempts(self, step, not_attempted=None):
        r'that the conditioned problem has (?P<not_attempted>not )?been attempted$'
        visit_scenario_item('CONDITION_SOURCE')

        if not_attempted is None:
            answer_problem(self.COURSE_NUM, 'string', True)
            world.css_click("button.check")
Exemplo n.º 5
0
def answer_problem_step(step, problem_type, correctness):
    """ Mark a given problem type correct or incorrect, then submit it.

    *problem_type* is a string representing the type of problem (e.g. 'drop down')
    *correctness* is in ['correct', 'incorrect']
    """

    assert correctness in ["correct", "incorrect"]
    assert problem_type in PROBLEM_DICT
    answer_problem(problem_type, correctness)

    # Submit the problem
    check_problem(step)
Exemplo n.º 6
0
def answer_problem_step(step, problem_type, correctness):
    """ Mark a given problem type correct or incorrect, then submit it.

    *problem_type* is a string representing the type of problem (e.g. 'drop down')
    *correctness* is in ['correct', 'incorrect']
    """

    assert (correctness in ['correct', 'incorrect'])
    assert (problem_type in PROBLEM_DICT)
    answer_problem(problem_type, correctness)

    # Submit the problem
    check_problem(step)